vendor: 2,017 bytes, lines 1-9
1var FR=e=>{throw TypeError(e)};var Pw=(e,t,n)=>t.has(e)||FR("Cannot "+n);var re=(e,t,n)=>(Pw(e,t,"read from private field"),n?n.call(e):t.get(e)),nt=(e,t,n)=>t.has(e)?FR("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),qe=(e,t,n,r)=>(Pw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Pt=(e,t,n)=>(Pw(e,t,"access private method"),n);var Ag=(e,t,n,r)=>({set _(i){qe(e,t,i,n)},get _(){return re(e,t,r)}});function aZ(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 o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).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 Cg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kw={exports:{}},Bf={},Ow={exports:{}},At={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var qR;
vendor: 4,214 bytes, line 9
9function oZ(){if(qR)return At;qR=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function p($){return $===null||typeof $!="object"?null:($=f&&$[f]||$["@@iterator"],typeof $=="function"?$:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function v($,V,z){this.props=$,this.context=V,this.refs=y,this.updater=z||m}v.prototype.isReactComponent={},v.prototype.setState=function($,V){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,V,"setState")},v.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function b(){}b.prototype=v.prototype;function w($,V,z){this.props=$,this.context=V,this.refs=y,this.updater=z||m}var N=w.prototype=new b;N.constructor=w,x(N,v.prototype),N.isPureReactComponent=!0;var S=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function O($,V,z){var Q,J={},Y=null,X=null;if(V!=null)for(Q in V.ref!==void 0&&(X=V.ref),V.key!==void 0&&(Y=""+V.key),V)_.call(V,Q)&&!k.hasOwnProperty(Q)&&(J[Q]=V[Q]);var ne=arguments.length-2;if(ne===1)J.children=z;else if(1<ne){for(var Z=Array(ne),se=0;se<ne;se++)Z[se]=arguments[se+2];J.children=Z}if($&&$.defaultProps)for(Q in ne=$.defaultProps,ne)J[Q]===void 0&&(J[Q]=ne[Q]);return{$$typeof:e,type:$,key:Y,ref:X,props:J,_owner:E.current}}function I($,V){return{$$typeof:e,type:$.type,key:V,ref:$.ref,props:$.props,_owner:$._owner}}function A($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function C($){var V={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(z){return V[z]})}var R=/\/+/g;function D($,V){return typeof $=="object"&&$!==null&&$.key!=null?C(""+$.key):V.toString(36)}function q($,V,z,Q,J){var Y=typeof $;(Y==="undefined"||Y==="boolean")&&($=null);var X=!1;if($===null)X=!0;else switch(Y){case"string":case"number":X=!0;break;case"object":switch($.$$typeof){case e:case t:X=!0}}if(X)return X=$,J=J(X),$=Q===""?"."+D(X,0):Q,S(J)?(z="",$!=null&&(z=$.replace(R,"$&/")+"/"),q(J,V,z,"",function(se){return se})):J!=null&&(A(J)&&(J=I(J,z+(!J.key||X&&X.key===J.key?"":(""+J.key).replace(R,"$&/")+"/")+$)),V.push(J)),1;if(X=0,Q=Q===""?".":Q+":",S($))for(var ne=0;ne<$.length;ne++){Y=$[ne];var Z=Q+D(Y,ne);X+=q(Y,V,z,Z,J)}else if(Z=p($),typeof Z=="function")for($=Z.call($),ne=0;!(Y=$.next()).done;)Y=Y.value,Z=Q+D(Y,ne++),X+=q(Y,V,z,Z,J);else if(Y==="object")throw V=String($),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return X}function F($,V,z){if($==null)return $;var Q=[],J=0;return q($,Q,"","",function(Y){return V.call(z,Y,J++)}),Q}function H($){if($._status===-1){var V=$._result;V=V(),V.then(function(z){($._status===0||$._status===-1)&&($._status=1,$._result=z)},function(z){($._status===0||$._status===-1)&&($._status=2,$._result=z)}),$._status===-1&&($._status=0,$._result=V)}if($._status===1)return $._result.default;throw $._result}var U={current:null},W={transition:null},G={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:W,ReactCurrentOwner:E};function L(){throw Error("act(...) is not supported in production builds of React.")}return At.Children={map:F,forEach:function($,V,z){F($,function(){V.apply(this,arguments)},z)},count:function($){var V=0;return F($,function(){V++}),V},toArray:function($){return F($,function(V){return V})||[]},only:function($){if(!A($))throw Error("React.Children.only expected to receive a single React element child.");return $}},At.Component=v,At.Fragment=n,At.Profiler=i,At.PureComponent=w,At.StrictMode=r,At.Suspense=c,At.__SECRET_INT
vendor: 7,237 bytes, lines 9-25
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,At.act=L,At.cloneElement=function($,V,z){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var Q=x({},$.props),J=$.key,Y=$.ref,X=$._owner;if(V!=null){if(V.ref!==void 0&&(Y=V.ref,X=E.current),V.key!==void 0&&(J=""+V.key),$.type&&$.type.defaultProps)var ne=$.type.defaultProps;for(Z in V)_.call(V,Z)&&!k.hasOwnProperty(Z)&&(Q[Z]=V[Z]===void 0&&ne!==void 0?ne[Z]:V[Z])}var Z=arguments.length-2;if(Z===1)Q.children=z;else if(1<Z){ne=Array(Z);for(var se=0;se<Z;se++)ne[se]=arguments[se+2];Q.children=ne}return{$$typeof:e,type:$.type,key:J,ref:Y,props:Q,_owner:X}},At.createContext=function($){return $={$$typeof:o,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:s,_context:$},$.Consumer=$},At.createElement=O,At.createFactory=function($){var V=O.bind(null,$);return V.type=$,V},At.createRef=function(){return{current:null}},At.forwardRef=function($){return{$$typeof:l,render:$}},At.isValidElement=A,At.lazy=function($){return{$$typeof:d,_payload:{_status:-1,_result:$},_init:H}},At.memo=function($,V){return{$$typeof:u,type:$,compare:V===void 0?null:V}},At.startTransition=function($){var V=W.transition;W.transition={};try{$()}finally{W.transition=V}},At.unstable_act=L,At.useCallback=function($,V){return U.current.useCallback($,V)},At.useContext=function($){return U.current.useContext($)},At.useDebugValue=function(){},At.useDeferredValue=function($){return U.current.useDeferredValue($)},At.useEffect=function($,V){return U.current.useEffect($,V)},At.useId=function(){return U.current.useId()},At.useImperativeHandle=function($,V,z){return U.current.useImperativeHandle($,V,z)},At.useInsertionEffect=function($,V){return U.current.useInsertionEffect($,V)},At.useLayoutEffect=function($,V){return U.current.useLayoutEffect($,V)},At.useMemo=function($,V){return U.current.useMemo($,V)},At.useReducer=function($,V,z){return U.current.useReducer($,V,z)},At.useRef=function($){return U.current.useRef($)},At.useState=function($){return U.current.useState($)},At.useSyncExternalStore=function($,V,z){return U.current.useSyncExternalStore($,V,z)},At.useTransition=function(){return U.current.useTransition()},At.version="18.3.1",At}var zR;function Kp(){return zR||(zR=1,Ow.exports=oZ()),Ow.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var UR;function lZ(){if(UR)return Bf;UR=1;var e=Kp(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,u){var d,f={},p=null,m=null;u!==void 0&&(p=""+u),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(d in c)r.call(c,d)&&!s.hasOwnProperty(d)&&(f[d]=c[d]);if(l&&l.defaultProps)for(d in c=l.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:l,key:p,ref:m,props:f,_owner:i.current}}return Bf.Fragment=n,Bf.jsx=o,Bf.jsxs=o,Bf}var VR;function cZ(){return VR||(VR=1,kw.exports=lZ()),kw.exports}var a=cZ(),T=Kp();const ee=Lt(T),Gk=aZ({__proto__:null,default:ee},[T]);var Tg={},Aw={exports:{}},ri={},Cw={exports:{}},Tw={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var WR;function uZ(){return WR||(WR=1,(function(e){function t(W,G){var L=W.length;W.push(G);e:for(;0<L;){var $=L-1>>>1,V=W[$];if(0<i(V,G))W[$]=G,W[L]=V,L=$;else break e}}function n(W){return W.length===0?null:W[0]}function r(W){if(W.length===0)return null;var G=W[0],L=W.pop();if(L!==G){W[0]=L;e:for(var $=0,V=W.length,z=V>>>1;$<z;){var Q=2*($+1)-1,J=W[Q],Y=Q+1,X=W[Y];if(0>i(J,L))Y<V&&0>i(X,J)?(W[$]=X,W[Y]=L,$=Y):(W[$]=J,W[Q]=L,$=Q);else if(Y<V&&0>i(X,L))W[$]=X,W[Y]=L,$=Y;else break e}}return G}function i(W,G){var L=W.sortIndex-G.sortIndex;return L!==0?L:W.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,p=3,m=!1,x=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(W){for(var G=n(u);G!==null;){if(G.callback===null)r(u);else if(G.startTime<=W)r(u),G.sortIndex=G.expirationTime,t(c,G);else break;G=n(u)}}function S(W){if(y=!1,N(W),!x)if(n(c)!==null)x=!0,H(_);else{var G=n(u);G!==null&&U(S,G.startTime-W)}}function _(W,G){x=!1,y&&(y=!1,b(O),O=-1),m=!0;var L=p;try{for(N(G),f=n(c);f!==null&&(!(f.expirationTime>G)||W&&!C());){var $=f.callback;if(typeof $=="function"){f.callback=null,p=f.priorityLevel;var V=$(f.expirationTime<=G);G=e.unstable_now(),typeof V=="function"?f.callback=V:f===n(c)&&r(c),N(G)}else r(c);f=n(c)}if(f!==null)var z=!0;else{var Q=n(u);Q!==null&&U(S,Q.startTime-G),z=!1}return z}finally{f=null,p=L,m=!1}}var E=!1,k=null,O=-1,I=5,A=-1;function C(){return!(e.unstable_now()-A<I)}function R(){if(k!==null){var W=e.unstable_now();A=W;var G=!0;try{G=k(!0,W)}finally{G?D():(E=!1,k=null)}}else E=!1}var D;if(typeof w=="function")D=function(){w(R)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,F=q.port2;q.port1.onmessage=R,D=function(){F.postMessage(null)}}else D=function(){v(R,0)};function H(W){k=W,E||(E=!0,D())}function U(W,G){O=v(function(){W(e.unstable_now())},G)}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(W){W.callback=null},e.unstable_continueExecution=function(){x||m||(x=!0,H(_))},e.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<W?Math.floor(1e3/W):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(W){switch(p){case 1:case 2:case 3:var G=3;break;default:G=p}var L=p;p=G;try{return W()}finally{p=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(W,G){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var L=p;p=W;try{return G()}finally{p=L}},e.unstable_scheduleCallback=function(W,G,L){var $=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?$+L:$):L=$,W){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=L+V,W={id:d++,callback:G,priorityLevel:W,startTime:L,expirationTime:V,sortIndex:-1},L>
vendor: 4,556 bytes, lines 25-33
25$?(W.sortIndex=L,t(u,W),n(c)===null&&W===n(u)&&(y?(b(O),O=-1):y=!0,U(S,L-$))):(W.sortIndex=V,t(c,W),x||m||(x=!0,H(_))),W},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(W){var G=p;return function(){var L=p;p=G;try{return W.apply(this,arguments)}finally{p=L}}}})(Tw)),Tw}var HR;function dZ(){return HR||(HR=1,Cw.exports=uZ()),Cw.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var GR;function fZ(){if(GR)return ri;GR=1;var e=Kp(),t=dZ();function n(h){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+h,j=1;j<arguments.length;j++)g+="&args[]="+encodeURIComponent(arguments[j]);return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(h,g){o(h,g),o(h+"Capture",g)}function o(h,g){for(i[h]=g,h=0;h<g.length;h++)r.add(g[h])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[: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]*$/,d={},f={};function p(h){return c.call(f,h)?!0:c.call(d,h)?!1:u.test(h)?f[h]=!0:(d[h]=!0,!1)}function m(h,g,j,P){if(j!==null&&j.type===0)return!1;switch(typeof g){case"function":case"symbol":return!0;case"boolean":return P?!1:j!==null?!j.acceptsBooleans:(h=h.toLowerCase().slice(0,5),h!=="data-"&&h!=="aria-");default:return!1}}function x(h,g,j,P){if(g===null||typeof g>"u"||m(h,g,j,P))return!0;if(P)return!1;if(j!==null)switch(j.type){case 3:return!g;case 4:return g===!1;case 5:return isNaN(g);case 6:return isNaN(g)||1>g}return!1}function y(h,g,j,P,M,B,K){this.acceptsBooleans=g===2||g===3||g===4,this.attributeName=P,this.attributeNamespace=M,this.mustUseProperty=j,this.propertyName=h,this.type=g,this.sanitizeURL=B,this.removeEmptyString=K}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(h){v[h]=new y(h,0,!1,h,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(h){var g=h[0];v[g]=new y(g,1,!1,h[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(h){v[h]=new y(h,2,!1,h.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(h){v[h]=new y(h,2,!1,h,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(h){v[h]=new y(h,3,!1,h.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(h){v[h]=new y(h,3,!0,h,null,!1,!1)}),["capture","download"].forEach(function(h){v[h]=new y(h,4,!1,h,null,!1,!1)}),["cols","rows","size","span"].forEach(function(h){v[h]=new y(h,6,!1,h,null,!1,!1)}),["rowSpan","start"].forEach(function(h){v[h]=new y(h,5,!1,h.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function w(h){return h[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
33-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(h){var g=h.replace(b,w);v[g]=new y(g,1,!1,h,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(h){var g=h.replace(b,w);v[g]=new y(g,1,!1,h,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(h){var g=h.replace(b,w);v[g]=new y(g,1,!1,h,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(h){v[h]=new y(h,1,!1,h.toLowerCase(),null,!1,!1)}),v.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(h){v[h]=new y(h,1,!1,h.toLowerCase(),null,!0,!0)});function N(h,g,j,P){var M=v.hasOwnProperty(g)?v[g]:null;(M!==null?M.type!==0:P||!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(x(g,j,M,P)&&(j=null),P||M===null?p(g)&&(j===null?h.removeAttribute(g):h.setAttribute(g,""+j)):M.mustUseProperty?h[M.propertyName]=j===null?M.type===3?!1:"":j:(g=M.attributeName,P=M.attributeNamespace,j===null?h.removeAttribute(g):(M=M.type,j=M===3||M===4&&j===!0?"":""+j,P?h.setAttributeNS(P,g,j):h.setAttribute(g,j))))}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),E=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),C=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),U=Symbol.for("react.offscreen"),W=Symbol.iterator;function G(h){return h===null||typeof h!="object"?null:(h=W&&h[W]||h["@@iterator"],typeof h=="function"?h:null)}var L=Object.assign,$;function V(h){if($===void 0)try{throw Error()}catch(j){var g=j.stack.trim().match(/\n( *(at )?)/);$=g&&g[1]||""}return` 34`+$+h}var z=!1;function Q(h,g){if(!h||z)return"";z=!0;var j=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(g)if(g=function(){throw Error()},Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(me){var P=me}Reflect.construct(h,[],g)}else{try{g.call()}catch(me){P=me}h.call(g.prototype)}else{try{throw Error()}catch(me){P=me}h()}}catch(me){if(me&&P&&typeof me.stack=="string"){for(var M=me.stack.split(` 35`),B=P.stack.split(` 36`),K=M.length-1,te=B.length-1;1<=K&&0<=te&&M[K]!==B[te];)te--;for(;1<=K&&0<=te;K--,te--)if(M[K]!==B[te]){if(K!==1||te!==1)do if(K--,te--,0>te||M[K]!==B[te]){var ie=` 37`+M[K].replace(" at new "," at ");return h.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",h.displayName)),ie}while(1<=K&&0<=te);break}}}finally{z=!1,Error.prepareStackTrace=j}return(h=h?h.displayName||h.name:"")?V(h):""}function J(h){switch(h.tag){case 5:return V(h.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return h=Q(h.type,!1),h;case 11:return h=Q(h.type.render,!1),h;case 1:return h=Q(h.type,!0),h;default:return""}}function Y(h){if(h==null)return null;if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case k:return"Fragment";case E:return"Portal";case I:return"Profiler";case O:return"StrictMode";case D:return"Suspense";case q:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case C:return(h.displayName||"Context")+".Consumer";case A:return(h._context.displayName||"Context")+".Provider";case R:var g=h.render;return h=h.displayName,h||(h=g.displayName||g.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case F:return g=h.displayName||null,g!==null?g:Y(h.type)||"Memo";case H:g=h._payload,h=h._init;try{return Y(h(g))}catch{}}return null}function X(h){var g=h.type;switch(h.tag){case 24:return"Cache";case 9:return(g.displayName||"Context")+".Consumer";case 10:return(g._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return h=g.render,h=h.displayName||h.name||"",g.displayName||(h!==""?"ForwardRef("+h+")":"ForwardRef");case 7:return"Fragment";case 5:return g;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(g);case 8:return g===O?"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 g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g}return null}function ne(h){switch(typeof h){case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function Z(h){var g=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function se(h){var g=Z(h)?"checked":"value",j=Object.getOwnPropertyDescriptor(h.constructor.prototype,g),P=""+h[g];
vendor: 39,273 bytes, lines 37-38
37if(!h.hasOwnProperty(g)&&typeof j<"u"&&typeof j.get=="function"&&typeof j.set=="function"){var M=j.get,B=j.set;return Object.defineProperty(h,g,{configurable:!0,get:function(){return M.call(this)},set:function(K){P=""+K,B.call(this,K)}}),Object.defineProperty(h,g,{enumerable:j.enumerable}),{getValue:function(){return P},setValue:function(K){P=""+K},stopTracking:function(){h._valueTracker=null,delete h[g]}}}}function pe(h){h._valueTracker||(h._valueTracker=se(h))}function oe(h){if(!h)return!1;var g=h._valueTracker;if(!g)return!0;var j=g.getValue(),P="";return h&&(P=Z(h)?h.checked?"true":"false":h.value),h=P,h!==j?(g.setValue(h),!0):!1}function Oe(h){if(h=h||(typeof document<"u"?document:void 0),typeof h>"u")return null;try{return h.activeElement||h.body}catch{return h.body}}function $e(h,g){var j=g.checked;return L({},g,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:j??h._wrapperState.initialChecked})}function Ze(h,g){var j=g.defaultValue==null?"":g.defaultValue,P=g.checked!=null?g.checked:g.defaultChecked;j=ne(g.value!=null?g.value:j),h._wrapperState={initialChecked:P,initialValue:j,controlled:g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null}}function xt(h,g){g=g.checked,g!=null&&N(h,"checked",g,!1)}function pt(h,g){xt(h,g);var j=ne(g.value),P=g.type;if(j!=null)P==="number"?(j===0&&h.value===""||h.value!=j)&&(h.value=""+j):h.value!==""+j&&(h.value=""+j);else if(P==="submit"||P==="reset"){h.removeAttribute("value");return}g.hasOwnProperty("value")?ve(h,g.type,j):g.hasOwnProperty("defaultValue")&&ve(h,g.type,ne(g.defaultValue)),g.checked==null&&g.defaultChecked!=null&&(h.defaultChecked=!!g.defaultChecked)}function ye(h,g,j){if(g.hasOwnProperty("value")||g.hasOwnProperty("defaultValue")){var P=g.type;if(!(P!=="submit"&&P!=="reset"||g.value!==void 0&&g.value!==null))return;g=""+h._wrapperState.initialValue,j||g===h.value||(h.value=g),h.defaultValue=g}j=h.name,j!==""&&(h.name=""),h.defaultChecked=!!h._wrapperState.initialChecked,j!==""&&(h.name=j)}function ve(h,g,j){(g!=="number"||Oe(h.ownerDocument)!==h)&&(j==null?h.defaultValue=""+h._wrapperState.initialValue:h.defaultValue!==""+j&&(h.defaultValue=""+j))}var Me=Array.isArray;function Be(h,g,j,P){if(h=h.options,g){g={};for(var M=0;M<j.length;M++)g["$"+j[M]]=!0;for(j=0;j<h.length;j++)M=g.hasOwnProperty("$"+h[j].value),h[j].selected!==M&&(h[j].selected=M),M&&P&&(h[j].defaultSelected=!0)}else{for(j=""+ne(j),g=null,M=0;M<h.length;M++){if(h[M].value===j){h[M].selected=!0,P&&(h[M].defaultSelected=!0);return}g!==null||h[M].disabled||(g=h[M])}g!==null&&(g.selected=!0)}}function je(h,g){if(g.dangerouslySetInnerHTML!=null)throw Error(n(91));return L({},g,{value:void 0,defaultValue:void 0,children:""+h._wrapperState.initialValue})}function mt(h,g){var j=g.value;if(j==null){if(j=g.children,g=g.defaultValue,j!=null){if(g!=null)throw Error(n(92));if(Me(j)){if(1<j.length)throw Error(n(93));j=j[0]}g=j}g==null&&(g=""),j=g}h._wrapperState={initialValue:ne(j)}}function bt(h,g){var j=ne(g.value),P=ne(g.defaultValue);j!=null&&(j=""+j,j!==h.value&&(h.value=j),g.defaultValue==null&&h.defaultValue!==j&&(h.defaultValue=j)),P!=null&&(h.defaultValue=""+P)}function wt(h){var g=h.textContent;g===h._wrapperState.initialValue&&g!==""&&g!==null&&(h.value=g)}function xe(h){switch(h){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 ke(h,g){return h==null||h==="http://www.w3.org/1999/xhtml"?xe(g):h==="http://www.w3.org/2000/svg"&&g==="foreignObject"?"http://www.w3.org/1999/xhtml":h}var ze,Et=(function(h){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(g,j,P,M){MSApp.execUnsafeLocalFunction(function(){return h(g,j,P,M)})}:h})(function(h,g){if(h.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in h)h.innerHTML=g;else{for(ze=ze||document.createElement("div"),ze.innerHTML="<svg>"+g.valueOf().toString()+"</svg>",g=ze.firstChild;h.firstChild;)h.removeChild(h.firstChild);for(;g.firstChild;)h.appendChild(g.firstChild)}});function rt(h,g){if(g){var j=h.firstChild;if(j&&j===h.lastChild&&j.nodeType===3){j.nodeValue=g;return}}h.textContent=g}var en={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},ha=["Webkit","ms","Moz","O"];Object.keys(en).forEach(function(h){ha.forEach(function(g){g=g+h.charAt(0).toUpperCase()+h.substring(1),en[g]=en[h]})});function $i(h,g,j){return g==null||typeof g=="boolean"||g===""?"":j||typeof g!="number"||g===0||en.hasOwnProperty(h)&&en[h]?(""+g).trim():g+"px"}function to(h,g){h=h.style;for(var j in g)if(g.hasOwnProperty(j)){var P=j.indexOf("--")===0,M=$i(j,g[j],P);j==="float"&&(j="cssFloat"),P?h.setProperty(j,M):h[j]=M}}var ml=L({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 hr(h,g){if(g){if(ml[h]&&(g.children!=null||g.dangerouslySetInnerHTML!=null))throw Error(n(137,h));if(g.dangerouslySetInnerHTML!=null){if(g.children!=null)throw Error(n(60));if(typeof g.dangerouslySetInnerHTML!="object"||!("__html"in g.dangerouslySetInnerHTML))throw Error(n(61))}if(g.style!=null&&typeof g.style!="object")throw Error(n(62))}}function $s(h,g){if(h.indexOf("-")===-1)return typeof g.is=="string";switch(h){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 gi=null;function z0(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var U0=null,Dc=null,Lc=null;function rC(h){if(h=Nf(h)){if(typeof U0!="function")throw Error(n(280));var g=h.stateNode;g&&(g=Wm(g),U0(h.stateNode,h.type,g))}}function iC(h){Dc?Lc?Lc.push(h):Lc=[h]:Dc=h}function sC(){if(Dc){var h=Dc,g=Lc;if(Lc=Dc=null,rC(h),g)for(h=0;h<g.length;h++)rC(g[h])}}function aC(h,g){return h(g)}function oC(){}var V0=!1;function lC(h,g,j){if(V0)return h(g,j);V0=!0;try{return aC(h,g,j)}finally{V0=!1,(Dc!==null||Lc!==null)&&(oC(),sC())}}function nf(h,g){var j=h.stateNode;if(j===null)return null;var P=Wm(j);if(P===null)return null;j=P[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(P=!P.disabled)||(h=h.type,P=!(h==="button"||h==="input"||h==="select"||h==="textarea")),h=!P;break e;default:h=!1}if(h)return null;if(j&&typeof j!="function")throw Error(n(231,g,typeof j));return j}var W0=!1;if(l)try{var rf={};Object.defineProperty(rf,"passive",{get:function(){W0=!0}}),window.addEventListener("test",rf,rf),window.removeEventListener("test",rf,rf)}catch{W0=!1}function fX(h,g,j,P,M,B,K,te,ie){var me=Array.prototype.slice.call(arguments,3);try{g.apply(j,me)}catch(_e){this.onError(_e)}}var sf=!1,Sm=null,Nm=!1,H0=null,hX={onError:function(h){sf=!0,Sm=h}};function pX(h,g,j,P,M,B,K,te,ie){sf=!1,Sm=null,fX.apply(hX,arguments)}function mX(h,g,j,P,M,B,K,te,ie){if(pX.apply(this,arguments),sf){if(sf){var me=Sm;sf=!1,Sm=null}else throw Error(n(198));Nm||(Nm=!0,H0=me)}}function gl(h){var g=h,j=h;if(h.alternate)for(;g.return;)g=g.return;else{h=g;do g=h,(g.flags&4098)!==0&&(j=g.return),h=g.return;while(h)}return g.tag===3?j:null}function cC(h){if(h.tag===13){var g=h.memoizedState;if(g===null&&(h=h.alternate,h!==null&&(g=h.memoizedState)),g!==null)return g.dehydrated}return null}function uC(h){if(gl(h)!==h)throw Error(n(188))}function gX(h){var g=h.alternate;if(!g){if(g=gl(h),g===null)throw Error(n(188));return g!==h?null:h}for(var j=h,P=g;;){var M=j.return;if(M===null)break;var B=M.alternate;if(B===null){if(P=M.return,P!==null){j=P;continue}break}if(M.child===B.child){for(B=M.child;B;){if(B===j)return uC(M),h;if(B===P)return uC(M),g;B=B.sibling}throw Error(n(188))}if(j.return!==P.return)j=M,P=B;else{for(var K=!1,te=M.child;te;){if(te===j){K=!0,j=M,P=B;break}if(te===P){K=!0,P=M,j=B;break}te=te.sibling}if(!K){for(te=B.child;te;){if(te===j){K=!0,j=B,P=M;break}if(te===P){K=!0,P=B,j=M;break}te=te.sibling}if(!K)throw Error(n(189))}}if(j.alternate!==P)throw Error(n(190))}if(j.tag!==3)throw Error(n(188));return j.stateNode.current===j?h:g}function dC(h){return h=gX(h),h!==null?fC(h):null}function fC(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){var g=fC(h);if(g!==null)return g;h=h.sibling}return null}var hC=t.unstable_scheduleCallback,pC=t.unstable_cancelCallback,yX=t.unstable_shouldYield,vX=t.unstable_requestPaint,kn=t.unstable_now,xX=t.unstable_getCurrentPriorityLevel,G0=t.unstable_ImmediatePriority,mC=t.unstable_UserBlockingPriority,_m=t.unstable_NormalPriority,bX=t.unstable_LowPriority,gC=t.unstable_IdlePriority,Em=null,Bs=null;function wX(h){if(Bs&&typeof Bs.onCommitFiberRoot=="function")try{Bs.onCommitFiberRoot(Em,h,void 0,(h.current.flags&128)===128)}catch{}}var ds=Math.clz32?Math.clz32:NX,jX=Math.log,SX=Math.LN2;function NX(h){return h>>>=0,h===0?32:31-(jX(h)/SX|0)|0}var Pm=64,km=4194304;function af(h){switch(h&-h){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 h&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function Om(h,g){var j=h.pendingLanes;if(j===0)return 0;var P=0,M=h.suspendedLanes,B=h.pingedLanes,K=j&268435455;if(K!==0){var te=K&~M;te!==0?P=af(te):(B&=K,B!==0&&(P=af(B)))}else K=j&~M,K!==0?P=af(K):B!==0&&(P=af(B));if(P===0)return 0;if(g!==0&&g!==P&&(g&M)===0&&(M=P&-P,B=g&-g,M>=B||M===16&&(B&4194240)!==0))return g;if((P&4)!==0&&(P|=j&16),g=h.entangledLanes,g!==0)for(h=h.entanglements,g&=P;0<g;)j=31-ds(g),M=1<<j,P|=h[j],g&=~M;return P}function _X(h,g){switch(h){case 1:case 2:case 4:return g+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 g+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 EX(h,g){for(var j=h.suspendedLanes,P=h.pingedLanes,M=h.expirationTimes,B=h.pendingLanes;0<B;){var K=31-ds(B),te=1<<K,ie=M[K];ie===-1?((te&j)===0||(te&P)!==0)&&(M[K]=_X(te,g)):ie<=g&&(h.expiredLanes|=te),B&=~te}}function K0(h){return h=h.pendingLanes&-1073741825,h!==0?h:h&1073741824?1073741824:0}function yC(){var h=Pm;return Pm<<=1,(Pm&4194240)===0&&(Pm=64),h}function Y0(h){for(var g=[],j=0;31>j;j++)g.push(h);return g}function of(h,g,j){h.pendingLanes|=g,g!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,g=31-ds(g),h[g]=j}function PX(h,g){var j=h.pendingLanes&~g;h.pendingLanes=g,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=g,h.mutableReadLanes&=g,h.entangledLanes&=g,g=h.entanglements;var P=h.eventTimes;for(h=h.expirationTimes;0<j;){var M=31-ds(j),B=1<<M;g[M]=0,P[M]=-1,h[M]=-1,j&=~B}}function X0(h,g){var j=h.entangledLanes|=g;for(h=h.entanglements;j;){var P=31-ds(j),M=1<<P;M&g|h[P]&g&&(h[P]|=g),j&=~M}}var Kt=0;function vC(h){return h&=-h,1<h?4<h?(h&268435455)!==0?16:536870912:4:1}var xC,Q0,bC,wC,jC,Z0=!1,Am=[],no=null,ro=null,io=null,lf=new Map,cf=new Map,so=[],kX="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 SC(h,g){switch(h){case"focusin":case"focusout":no=null;break;case"dragenter":case"dragleave":ro=null;break;case"mouseover":case"mouseout":io=null;break;case"pointerover":case"pointerout":lf.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":cf.delete(g.pointerId)}}function uf(h,g,j,P,M,B){return h===null||h.nativeEvent!==B?(h={blockedOn:g,domEventName:j,eventSystemFlags:P,nativeEvent:B,targetContainers:[M]},g!==null&&(g=Nf(g),g!==null&&Q0(g)),h):(h.eventSystemFlags|=P,g=h.targetContainers,M!==null&&g.indexOf(M)===-1&&g.push(M),h)}function OX(h,g,j,P,M){switch(g){case"focusin":return no=uf(no,h,g,j,P,M),!0;case"dragenter":return ro=uf(ro,h,g,j,P,M),!0;case"mouseover":return io=uf(io,h,g,j,P,M),!0;case"pointerover":var B=M.pointerId;return lf.set(B,uf(lf.get(B)||null,h,g,j,P,M)),!0;case"gotpointercapture":return B=M.pointerId,cf.set(B,uf(cf.get(B)||null,h,g,j,P,M)),!0}return!1}function NC(h){var g=yl(h.target);if(g!==null){var j=gl(g);if(j!==null){if(g=j.tag,g===13){if(g=cC(j),g!==null){h.blockedOn=g,jC(h.priority,function(){bC(j)});return}}else if(g===3&&j.stateNode.current.memoizedState.isDehydrated){h.blockedOn=j.tag===3?j.stateNode.containerInfo:null;return}}}h.blockedOn=null}function Cm(h){if(h.blockedOn!==null)return!1;for(var g=h.targetContainers;0<g.length;){var j=eb(h.domEventName,h.eventSystemFlags,g[0],h.nativeEvent);if(j===null){j=h.nativeEvent;var P=new j.constructor(j.type,j);gi=P,j.target.dispatchEvent(P),gi=null}else return g=Nf(j),g!==null&&Q0(g),h.blockedOn=j,!1;g.shift()}return!0}function _C(h,g,j){Cm(h)&&j.delete(g)}function AX(){Z0=!1,no!==null&&Cm(no)&&(no=null),ro!==null&&Cm(ro)&&(ro=null),io!==null&&Cm(io)&&(io=null),lf.forEach(_C),cf.forEach(_C)}function df(h,g){h.blockedOn===g&&(h.blockedOn=null,Z0||(Z0=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,AX)))}function ff(h){function g(M){return df(M,h)}if(0<Am.length){df(Am[0],h);for(var j=1;j<Am.length;j++){var P=Am[j];P.blockedOn===h&&(P.blockedOn=null)}}for(no!==null&&df(no,h),ro!==null&&df(ro,h),io!==null&&df(io,h),lf.forEach(g),cf.forEach(g),j=0;j<so.length;j++)P=so[j],P.blockedOn===h&&(P.blockedOn=null);for(;0<so.length&&(j=so[0],j.blockedOn===null);)NC(j),j.blockedOn===null&&so.shift()}var $c=S.ReactCurrentBatchConfig,Tm=!0;function CX(h,g,j,P){var M=Kt,B=$c.transition;$c.transition=null;try{Kt=1,J0(h,g,j,P)}finally{Kt=M,$c.transition=B}}function TX(h,g,j,P){var M=Kt,B=$c.transition;$c.transition=null;try{Kt=4,J0(h,g,j,P)}finally{Kt=M,$c.transition=B}}function J0(h,g,j,P){if(Tm){var M=eb(h,g,j,P);if(M===null)yb(h,g,P,Rm,j),SC(h,P);else if(OX(M,h,g,j,P))P.stopPropagation();else if(SC(h,P),g&4&&-1<kX.indexOf(h)){for(;M!==null;){var B=Nf(M);if(B!==null&&xC(B),B=eb(h,g,j,P),B===null&&yb(h,g,P,Rm,j),B===M)break;M=B}M!==null&&P.stopPropagation()}else yb(h,g,P,null,j)}}var Rm=null;function eb(h,g,j,P){if(Rm=null,h=z0(P),h=yl(h),h!==null)if(g=gl(h),g===null)h=null;else if(j=g.tag,j===13){if(h=cC(g),h!==null)return h;h=null}else if(j===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;h=null}else g!==h&&(h=null);return Rm=h,null}function EC(h){switch(h){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(xX()){case G0:return 1;case mC:return 4;case _m:case bX:return 16;case gC:return 536870912;default:return 16}default:return 16}}var ao=null,tb=null,Im=null;function PC(){if(Im)return Im;var h,g=tb,j=g.length,P,M="value"in ao?ao.value:ao.textContent,B=M.length;for(h=0;h<j&&g[h]===M[h];h++);var K=j-h;for(P=1;P<=K&&g[j-P]===M[B-P];P++);return Im=M.slice(h,1<P?1-P:void 0)}function Mm(h){var g=h.keyCode;return"charCode"in h?(h=h.charCode,h===0&&g===13&&(h=13)):h=g,h===10&&(h=13),32<=h||h===13?h:0}function Dm(){return!0}function kC(){return!1}function yi(h){function g(j,P,M,B,K){this._reactName=j,this._targetInst=M,this.type=P,this.nativeEvent=B,this.target=K,this.currentTarget=null;for(var te in h)h.hasOwnProperty(te)&&(j=h[te],this[te]=j?j(B):B[te]);return this.isDefaultPrevented=(B.defaultPrevented!=null?B.defaultPrevented:B.returnValue===!1)?Dm:kC,this.isPropagationStopped=kC,this}return L(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var j=this.nativeEvent;j&&(j.preventDefault?j.preventDefault():typeof j.returnValue!="unknown"&&(j.returnValue=!1),this.isDefaultPrevented=Dm)},stopPropagation:function(){var j=this.nativeEvent;j&&(j.stopPropagation?j.stopPropagation():typeof j.cancelBubble!="unknown"&&(j.cancelBubble=!0),this.isPropagationStopped=Dm)},persist:function(){},isPersistent:Dm}),g}var Bc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(h){return h.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nb=yi(Bc),hf=L({},Bc,{view:0,detail:0}),RX=yi(hf),rb,ib,pf,Lm=L({},hf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ab,button:0,buttons:0,relatedTarget:function(h){return h.relatedTarget===void 0?h.fromElement===h.srcElement?h.toElement:h.fromElement:h.relatedTarget},movementX:function(h){return"movementX"in h?h.movementX:(h!==pf&&(pf&&h.type==="mousemove"?(rb=h.screenX-pf.screenX,ib=h.screenY-pf.screenY):ib=rb=0,pf=h),rb)},movementY:function(h){return"movementY"in h?h.movementY:ib}}),OC=yi(Lm),IX=L({},Lm,{dataTransfer:0}),MX=yi(IX),DX=L({},hf,{relatedTarget:0}),sb=yi(DX),LX=L({},Bc,{animationName:0,elapsedTime:0,pseudoElement:0}),$X=yi(LX),BX=L({},Bc,{clipboardData:function(h){return"clipboardData"in h?h.clipboardData:window.clipboardData}}),FX=yi(BX),qX=L({},Bc,{data:0}),AC=yi(qX),zX={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UX={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"},VX={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function WX(h){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(h):(h=VX[h])?!!g[h]:!1}function ab(){return WX}var HX=L({},hf,{key:function(h){if(h.key){var g=zX[h.key]||h.key;if(g!=="Unidentified")return g}return h.type==="keypress"?(h=Mm(h),h===13?"Enter":String.fromCharCode(h)):h.type==="keydown"||h.type==="keyup"?UX[h.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ab,charCode:function(h){return h.type==="keypress"?Mm(h):0},keyCode:function(h){return h.type==="keydown"||h.type==="keyup"?h.keyCode:0},which:function(h){return h.type==="keypress"?Mm(h):h.type==="keydown"||h.type==="keyup"?h.keyCode:0}}),GX=yi(HX),KX=L({},Lm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),CC=yi(KX),YX=L({},hf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ab}),XX=yi(YX),QX=L({},Bc,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZX=yi(QX),JX=L({},Lm,{deltaX:function(h){return"deltaX"in h?h.deltaX:"wheelDeltaX"in h?-h.wheelDeltaX:0},deltaY:function(h){return"deltaY"in h?h.deltaY:"wheelDeltaY"in h?-h.wheelDeltaY:"wheelDelta"in h?-h.wheelDelta:0},deltaZ:0,deltaMode:0}),eQ=yi(JX),tQ=[9,13,27,32],ob=l&&"CompositionEvent"in window,mf=null;l&&"documentMode"in document&&(mf=document.documentMode);var nQ=l&&"TextEvent"in window&&!mf,TC=l&&(!ob||mf&&8<mf&&11>=mf),RC=" ",IC=!1;function MC(h,g){switch(h){case"keyup":return tQ.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function DC(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var Fc=!1;function rQ(h,g){switch(h){case"compositionend":return DC(g);case"keypress":return g.which!==32?null:(IC=!0,RC);case"textInput":return h=g.data,h===RC&&IC?null:h;default:return null}}function iQ(h,g){if(Fc)return h==="compositionend"||!ob&&MC(h,g)?(h=PC(),Im=tb=ao=null,Fc=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return TC&&g.locale!=="ko"?null:g.data;default:return null}}var sQ={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 LC(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g==="input"?!!sQ[h.type]:g==="textarea"}function $C(h,g,j,P){iC(P),g=zm(g,"onChange"),0<g.length&&(j=new nb("onChange","change",null,j,P),h.push({event:j,listeners:g}))}var gf=null,yf=null;function aQ(h){nT(h,0)}function $m(h){var g=Wc(h);if(oe(g))return h}function oQ(h,g){if(h==="change")return g}var BC=!1;if(l){var lb;if(l){var cb="oninput"in document;if(!cb){var FC=document.createElement("div");FC.setAttribute("oninput","return;"),cb=typeof FC.oninput=="function"}lb=cb}else lb=!1;BC=lb&&(!document.documentMode||9<document.documentMode)}function qC(){gf&&(gf.detachEvent("onpropertychange",zC),yf=gf=null)}function zC(h){if(h.propertyName==="value"&&$m(yf)){var g=[];$C(g,yf,h,z0(h)),lC(aQ,g)}}function lQ(h,g,j){h==="focusin"?(qC(),gf=g,yf=j,gf.attachEvent("onpropertychange",zC)):h==="focusout"&&qC()}function cQ(h){if(h==="selectionchange"||h==="keyup"||h==="keydown")return $m(yf)}function uQ(h,g){if(h==="click")return $m(g)}function dQ(h,g){if(h==="input"||h==="change")return $m(g)}function fQ(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var fs=typeof Object.is=="function"?Object.is:fQ;function vf(h,g){if(fs(h,g))return!0;if(typeof h!="object"||h===null||typeof g!="object"||g===null)return!1;var j=Object.keys(h),P=Object.keys(g);if(j.length!==P.length)return!1;for(P=0;P<j.length;P++){var M=j[P];if(!c.call(g,M)||!fs(h[M],g[M]))return!1}return!0}function UC(h){for(;h&&h.firstChild;)h=h.firstChild;return h}function VC(h,g){var j=UC(h);h=0;for(var P;j;){if(j.nodeType===3){if(P=h+j.textContent.length,h<=g&&P>=g)return{node:j,offset:g-h};h=P}e:{for(;j;){if(j.nextSibling){j=j.nextSibling;break e}j=j.parentNode}j=void 0}j=UC(j)}}function WC(h,g){return h&&g?h===g?!0:h&&h.nodeType===3?!1:g&&g.nodeType===3?WC(h,g.parentNode):"contains"in h?h.contains(g):h.compareDocumentPosition?!!(h.compareDocumentPosition(g)&16):!1:!1}function HC(){for(var h=window,g=Oe();g instanceof h.HTMLIFrameElement;){try{var j=typeof g.contentWindow.location.href=="string"}catch{j=!1}if(j)h=g.contentWindow;else break;g=Oe(h.document)}return g}function ub(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g&&(g==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||g==="textarea"||h.contentEditable==="true")}function hQ(h){var g=HC(),j=h.focusedElem,P=h.selectionRange;if(g!==j&&j&&j.ownerDocument&&WC(j.ownerDocument.documentElement,j)){if(P!==null&&ub(j)){if(g=P.start,h=P.end,h===void 0&&(h=g),"selectionStart"in j)j.selectionStart=g,j.selectionEnd=Math.min(h,j.value.length);else if(h=(g=j.ownerDocument||document)&&g.defaultView||window,h.getSelection){h=h.getSelection();var M=j.textContent.length,B=Math.min(P.start,M);P=P.end===void 0?B:Math.min(P.end,M),!h.extend&&B>P&&(M=P,P=B,B=M),M=VC(j,B);var K=VC(j,P);M&&K&&(h.rangeCount!==1||h.anchorNode!==M.node||h.anchorOffset!==M.offset||h.focusNode!==K.node||h.focusOffset!==K.offset)&&(g=g.createRange(),g.setStart(M.node,M.offset),h.removeAllRanges(),B>P?(h.addRange(g),h.extend(K.node,K.offset)):(g.setEnd(K.node,K.offset),h.addRange(g)))}}for(g=[],h=j;h=h.parentNode;)h.nodeType===1&&g.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<g.length;j++)h=g[j],h.element.scrollLeft=h.left,h.element.scrollTop=h.top}}var pQ=l&&"documentMode"in document&&11>=document.documentMode,qc=null,db=null,xf=null,fb=!1;function GC(h,g,j){var P=j.window===j?j.document:j.nodeType===9?j:j.ownerDocument;fb||qc==null||qc!==Oe(P)||(P=qc,"selectionStart"in P&&ub(P)?P={start:P.selectionStart,end:P.selectionEnd}:(P=(P.ownerDocument&&P.ownerDocument.defaultView||window).getSelection(),P={anchorNode:P.anchorNode,anchorOffset:P.anchorOffset,focusNode:P.focusNode,focusOffset:P.focusOffset}),xf&&vf(xf,P)||(xf=P,P=zm(db,"onSelect"),0<P.length&&(g=new nb("onSelect","select",null,g,j),h.push({event:g,listeners:P}),g.target=qc)))}function Bm(h,g){var j={};return j[h.toLowerCase()]=g.toLowerCase(),j["Webkit"+h]="webkit"+g,j["Moz"+h]="moz"+g,j}var zc={animationend:Bm("Animation","AnimationEnd"),animationiteration:Bm("Animation","AnimationIteration"),animationstart:Bm("Animation","AnimationStart"),transitionend:Bm("Transition","TransitionEnd")},hb={},KC={};l&&(KC=document.createElement("div").style,"AnimationEvent"in window||(delete zc.animationend.animation,delete zc.animationiteration.animation,delete zc.animationstart.animation),"TransitionEvent"in window||delete zc.transitionend.transition);function Fm(h){if(hb[h])return hb[h];if(!zc[h])return h;var g=zc[h],j;for(j in g)if(g.hasOwnProperty(j)&&j in KC)return hb[h]=g[j];return h}var YC=Fm("animationend"),XC=Fm("animationiteration"),QC=Fm("animationstart"),ZC=Fm("transitionend"),JC=new Map,eT="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 oo(h,g){JC.set(h,g),s(g,[h])}for(var pb=0;pb<eT.length;pb++){var mb=eT[pb],mQ=mb.toLowerCase(),gQ=mb[0].toUpperCase()+mb.slice(1);oo(mQ,"on"+gQ)}oo(YC,"onAnimationEnd"),oo(XC,"onAnimationIteration"),oo(QC,"onAnimationStart"),oo("dblclick","onDoubleClick"),oo("focusin","onFocus"),oo("focusout","onBlur"),oo(ZC,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bf="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(" "),yQ=new Set("cancel close invalid load scroll toggle".split(" ").concat(bf));function tT(h,g,j){var P=h.type||"unknown-event";h.currentTarget=j,mX(P,g,void 0,h),h.currentTarget=null}function nT(h,g){g=(g&4)!==0;for(var j=0;j<h.length;j++){var P=h[j],M=P.event;P=P.listeners;e:{var B=void 0;if(g)for(var K=P.length-1;0<=K;K--){var te=P[K],ie=te.instance,me=te.currentTarget;if(te=te.listener,ie!==B&&M.isPropagationStopped())break e;tT(M,te,me),B=ie}else for(K=0;K<P.length;K++){if(te=P[K],ie=te.instance,me=te.currentTarget,te=te.listener,ie!==B&&M.isPropagationStopped())break e;tT(M,te,me),B=ie}}}if(Nm)throw h=H0,Nm=!1,H0=null,h}function ln(h,g){var j=g[Sb];j===void 0&&(j=g[Sb]=new Set);var P=h+"__bubble";j.has(P)||(rT(g,h,2,!1),j.add(P))}function gb(h,g,j){var P=0;g&&(P|=4),rT(j,h,P,g)}var qm="_reactListening"+Math.random().toString(36).slice(2);function wf(h){if(!h[qm]){h[qm]=!0,r.forEach(function(j){j!=="selectionchange"&&(yQ.has(j)||gb(j,!1,h),gb(j,!0,h))});var g=h.nodeType===9?h:h.ownerDocument;g===null||g[qm]||(g[qm]=!0,gb("selectionchange",!1,g))}}function rT(h,g,j,P){switch(EC(g)){case 1:var M=CX;break;case 4:M=TX;break;default:M=J0}j=M.bind(null,g,j,h),M=void 0,!W0||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(M=!0),P?M!==void 0?h.addEventListener(g,j,{capture:!0,passive:M}):h.addEventListener(g,j,!0):M!==void 0?h.addEventListener(g,j,{passive:M}):h.addEventListener(g,j,!1)}function yb(h,g,j,P,M){var B=P;if((g&1)===0&&(g&2)===0&&P!==null)e:for(;;){if(P===null)return;var K=P.tag;if(K===3||K===4){var te=P.stateNode.containerInfo;if(te===M||te.nodeType===8&&te.parentNode===M)break;if(K===4)for(K=P.return;K!==null;){var ie=K.tag;if((ie===3||ie===4)&&(ie=K.stateNode.containerInfo,ie===M||ie.nodeType===8&&ie.parentNode===M))return;K=K.return}for(;te!==null;){if(K=yl(te),K===null)return;if(ie=K.tag,ie===5||ie===6){P=B=K;continue e}te=te.parentNode}}P=P.return}lC(function(){var me=B,_e=z0(j),Ee=[];e:{var Ne=JC.get(h);if(Ne!==void 0){var Ue=nb,He=h;switch(h){case"keypress":if(Mm(j)===0)break e;case"keydown":case"keyup":Ue=GX;break;case"focusin":He="focus",Ue=sb;break;case"focusout":He="blur",Ue=sb;break;case"beforeblur":case"afterblur":Ue=sb;break;case"click":if(j.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ue=OC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ue=MX;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ue=XX;break;case YC:case XC:case QC:Ue=$X;break;case ZC:Ue=ZX;break;case"scroll":Ue=RX;break;case"wheel":Ue=eQ;break;case"copy":case"cut":case"paste":Ue=FX;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ue=CC}var Qe=(g&4)!==0,On=!Qe&&h==="scroll",ue=Qe?Ne!==null?Ne+"Capture":null:Ne;Qe=[];for(var le=me,fe;le!==null;){fe=le;var Te=fe.stateNode;if(fe.tag===5&&Te!==null&&(fe=Te,ue!==null&&(Te=nf(le,ue),Te!=null&&Qe.push(jf(le,Te,fe)))),On)break;le=le.return}0<Qe.length&&(Ne=new Ue(Ne,He,null,j,_e),Ee.push({event:Ne,listeners:Qe}))}}if((g&7)===0){e:{if(Ne=h==="mouseover"||h==="pointerover",Ue=h==="mouseout"||h==="pointerout",Ne&&j!==gi&&(He=j.relatedTarget||j.fromElement)&&(yl(He)||He[pa]))break e;if((Ue||Ne)&&(Ne=_e.window===_e?_e:(Ne=_e.ownerDocument)?Ne.defaultView||Ne.parentWindow:window,Ue?(He=j.relatedTarget||j.toElement,Ue=me,He=He?yl(He):null,He!==null&&(On=gl(He),He!==On||He.tag!==5&&He.tag!==6)&&(He=null)):(Ue=null,He=me),Ue!==He)){if(Qe=OC,Te="onMouseLeave",ue="onMouseEnter",le="mouse",(h==="pointerout"||h==="pointerover")&&(Qe=CC,Te="onPointerLeave",ue="onPointerEnter",le="pointer"),On=Ue==null?Ne:Wc(Ue),fe=He==null?Ne:Wc(He),Ne=new Qe(Te,le+"leave",Ue,j,_e),Ne.target=On,Ne.relatedTarget=fe,Te=null,yl(_e)===me&&(Qe=new Qe(ue,le+"enter",He,j,_e),Qe.target=fe,Qe.relatedTarget=On,Te=Qe),On=Te,Ue&&He)t:{for(Qe=Ue,ue=He,le=0,fe=Qe;fe;fe=Uc(fe))le++;for(fe=0,Te=ue;Te;Te=Uc(Te))fe++;for(;0<le-fe;)Qe=Uc(Qe),le--;for(;0<fe-le;)ue=Uc(ue),fe--;for(;le--;){if(Qe===ue||ue!==null&&Qe===ue.alternate)break t;Qe=Uc(Qe),ue=Uc(ue)}Qe=null}else Qe=null;Ue!==null&&iT(Ee,Ne,Ue,Qe,!1),He!==null&&On!==null&&iT(Ee,On,He,Qe,!0)}}e:{if(Ne=me?Wc(me):window,Ue=Ne.nodeName&&Ne.nodeName.toLowerCase(),Ue==="select"||Ue==="input"&&Ne.type==="file")var Je=oQ;else if(LC(Ne))if(BC)Je=dQ;else{Je=cQ;var at=lQ}else(Ue=Ne.nodeName)&&Ue.toLowerCase()==="input"&&(Ne.type==="checkbox"||Ne.type==="radio")&&(Je=uQ);if(Je&&(Je=Je(h,me))){$C(Ee,Je,j,_e);break e}at&&at(h,Ne,me),h==="focusout"&&(at=Ne._wrapperState)&&at.controlled&&Ne.type==="number"&&ve(Ne,"number",Ne.value)}switch(at=me?Wc(me):window,h){case"focusin":(LC(at)||at.contentEditable==="true")&&(qc=at,db=me,xf=null);break;case"focusout":xf=db=qc=null;break;case"mousedown":fb=!0;break;case"contextmenu":case"mouseup":case"dragend":fb=!1,GC(Ee,j,_e);break;case"selectionchange":if(pQ)break;case"keydown":case"keyup":GC(Ee,j,_e)}var ot;if(ob)e:{switch(h){case"compositionstart":var gt="onCompositionStart";break e;case"compositionend":gt="onCompositionEnd";break e;case"compositionupdate":gt="onCompositionUpdate";break e}gt=void 0}else Fc?MC(h,j)&&(gt="onCompositionEnd"):h==="keydown"&&j.keyCode===229&&(gt="onCompositionStart");gt&&(TC&&j.locale!=="ko"&&(Fc||gt!=="onCompositionStart"?gt==="onCompositionEnd"&&Fc&&(ot=PC()):(ao=_e,tb="value"in ao?ao.value:ao.textContent,Fc=!0)),at=zm(me,gt),0<at.length&&(gt=new AC(gt,h,null,j,_e),Ee.push({event:gt,listeners:at}),ot?gt.data=ot:(ot=DC(j),ot!==null&&(gt.data=ot)))),(ot=nQ?rQ(h,j):iQ(h,j))&&(me=zm(me,"onBeforeInput"),0<me.length&&(_e=new AC("onBeforeInput","beforeinput",null,j,_e),Ee.push({event:_e,listeners:me}),_e.data=ot))}nT(Ee,g)})}function jf(h,g,j){return{instance:h,listener:g,currentTarget:j}}function zm(h,g){for(var j=g+"Capture",P=[];h!==null;){var M=h,B=M.stateNode;M.tag===5&&B!==null&&(M=B,B=nf(h,j),B!=null&&P.unshift(jf(h,B,M)),B=nf(h,g),B!=null&&P.push(jf(h,B,M))),h=h.return}return P}function Uc(h){if(h===null)return null;do h=h.return;while(h&&h.tag!==5);return h||null}function iT(h,g,j,P,M){for(var B=g._reactName,K=[];j!==null&&j!==P;){var te=j,ie=te.alternate,me=te.stateNode;if(ie!==null&&ie===P)break;te.tag===5&&me!==null&&(te=me,M?(ie=nf(j,B),ie!=null&&K.unshift(jf(j,ie,te))):M||(ie=nf(j,B),ie!=null&&K.push(jf(j,ie,te)))),j=j.return}K.length!==0&&h.push({event:g,listeners:K})}var vQ=/\r\n?/g,xQ=/\u0000|\uFFFD/g;function sT(h){return(typeof h=="string"?h:""+h).replace(vQ,` 38`).replace(xQ,"")}function Um(h,g,j){if(g=sT(g),sT(h)!==g&&j)throw Error(n(425))}function Vm(){}var vb=null,xb=null;function bb(h,g){return h==="textarea"||h==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var wb=typeof setTimeout=="function"?setTimeout:void 0,bQ=typeof clearTimeout=="function"?clearTimeout:void 0,aT=typeof Promise=="function"?Promise:void 0,wQ=typeof queueMicrotask=="function"?queueMicrotask:typeof aT<"u"?function(h){return aT.resolve(null).then(h).catch(jQ)}:wb;function jQ(h){setTimeout(function(){throw h})}function jb(h,g){var j=g,P=0;do{var M=j.nextSibling;if(h.removeChild(j),M&&M.nodeType===8)if(j=M.data,j==="/$"){if(P===0){h.removeChild(M),ff(g);return}P--}else j!=="$"&&j!=="$?"&&j!=="$!"||P++;j=M}while(j);ff(g)}function lo(h){for(;h!=null;h=h.nextSibling){var g=h.nodeType;if(g===1||g===3)break;if(g===8){if(g=h.data,g==="$"||g==="$!"||g==="$?")break;if(g==="/$")return null}}return h}function oT(h){h=h.previousSibling;for(var g=0;h;){if(h.nodeType===8){var j=h.data;if(j==="$"||j==="$!"||j==="$?"){if(g===0)return h;g--}else j==="/$"&&g++}h=h.previousSibling}return null}var Vc=Math.random().toString(36).slice(2),Fs="__reactFiber$"+Vc,Sf="__reactProps$"+Vc,pa="__reactContainer$"+Vc,Sb="__reactEvents$"+Vc,SQ="__reactListeners$"+Vc,NQ="__reactHandles$"+Vc;function yl(h){var g=h[Fs];if(g)return g;for(var j=h.parentNode;j;){if(g=j[pa]||j[Fs]){if(j=g.alternate,g.child!==null||j!==null&&j.child!==null)for(h=oT(h);h!==null;){if(j=h[Fs])return j;h=oT(h)}return g}h=j,j=h.parentNode}return null}function Nf(h){return h=h[Fs]||h[pa],!h||h.tag!==5&&h.tag!==6&&h.tag!==13&&h.tag!==3?null:h}function Wc(h){if(h.tag===5||h.tag===6)return h.stateNode;throw Error(n(33))}function Wm(h){return h[Sf]||null}var Nb=[],Hc=-1;function co(h){return{current:h}}function cn(h){0>Hc||(h.current=Nb[Hc],Nb[Hc]=null,Hc--)}function tn(h,g){Hc++,Nb[Hc]=h.current,h.current=g}var uo={},Nr=co(uo),Zr=co(!1),vl=uo;function Gc(h,g){var j=h.type.contextTypes;if(!j)return uo;var P=h.stateNode;if(P&&P.__reactInternalMemoizedUnmaskedChildContext===g)return P.__reactInternalMemoizedMaskedChildContext;var M={},B;for(B in j)M[B]=g[B];return P&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=g,h.__reactInternalMemoizedMaskedChildContext=M),M}function Jr(h){return h=h.childContextTypes,h!=null}function Hm(){cn(Zr),cn(Nr)}function lT(h,g,j){if(Nr.current!==uo)throw Error(n(168));tn(Nr,g),tn(Zr,j)}function cT(h,g,j){var P=h.stateNode;if(g=g.childContextTypes,typeof P.getChildContext!="function")return j;P=P.getChildContext();for(var M in P)if(!(M in g))throw Error(n(108,X(h)||"Unknown",M));return L({},j,P)}function Gm(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||uo,vl=Nr.current,tn(Nr,h),tn(Zr,Zr.current),!0}function uT(h,g,j){var P=h.stateNode;if(!P)throw Error(n(169));j?(h=cT(h,g,vl),P.__reactInternalMemoizedMergedChildContext=h,cn(Zr),cn(Nr),tn(Nr,h)):cn(Zr),tn(Zr,j)}var ma=null,Km=!1,_b=!1;function dT(h){ma===null?ma=[h]:ma.push(h)}function _Q(h){Km=!0,dT(h)}function fo(){if(!_b&&ma!==null){_b=!0;var h=0,g=Kt;try{var j=ma;for(Kt=1;h<j.length;h++){var P=j[h];do P=P(!0);while(P!==null)}ma=null,Km=!1}catch(M){throw ma!==null&&(ma=ma.slice(h+1)),hC(G0,fo),M}finally{Kt=g,_b=!1}}return null}var Kc=[],Yc=0,Ym=null,Xm=0,Bi=[],Fi=0,xl=null,ga=1,ya="";function bl(h,g){Kc[Yc++]=Xm,Kc[Yc++]=Ym,Ym=h,Xm=g}function fT(h,g,j){Bi[Fi++]=ga,Bi[Fi++]=ya,Bi[Fi++]=xl,xl=h;var P=ga;h=ya;var M=32-ds(P)-1;P&=~(1<<M),j+=1;var B=32-ds(g)+M;if(30<B){var K=M-M%5;B=(P&(1<<K)-1).toString(32),P>>=K,M-=K,ga=1<<32-ds(g)+M|j<<M|P,ya=B+h}else ga=1<<B|j<<M|P,ya=h}
vendor: 5,417 bytes, line 38
38function Eb(h){h.return!==null&&(bl(h,1),fT(h,1,0))}function Pb(h){for(;h===Ym;)Ym=Kc[--Yc],Kc[Yc]=null,Xm=Kc[--Yc],Kc[Yc]=null;for(;h===xl;)xl=Bi[--Fi],Bi[Fi]=null,ya=Bi[--Fi],Bi[Fi]=null,ga=Bi[--Fi],Bi[Fi]=null}var vi=null,xi=null,hn=!1,hs=null;function hT(h,g){var j=Vi(5,null,null,0);j.elementType="DELETED",j.stateNode=g,j.return=h,g=h.deletions,g===null?(h.deletions=[j],h.flags|=16):g.push(j)}function pT(h,g){switch(h.tag){case 5:var j=h.type;return g=g.nodeType!==1||j.toLowerCase()!==g.nodeName.toLowerCase()?null:g,g!==null?(h.stateNode=g,vi=h,xi=lo(g.firstChild),!0):!1;case 6:return g=h.pendingProps===""||g.nodeType!==3?null:g,g!==null?(h.stateNode=g,vi=h,xi=null,!0):!1;case 13:return g=g.nodeType!==8?null:g,g!==null?(j=xl!==null?{id:ga,overflow:ya}:null,h.memoizedState={dehydrated:g,treeContext:j,retryLane:1073741824},j=Vi(18,null,null,0),j.stateNode=g,j.return=h,h.child=j,vi=h,xi=null,!0):!1;default:return!1}}function kb(h){return(h.mode&1)!==0&&(h.flags&128)===0}function Ob(h){if(hn){var g=xi;if(g){var j=g;if(!pT(h,g)){if(kb(h))throw Error(n(418));g=lo(j.nextSibling);var P=vi;g&&pT(h,g)?hT(P,j):(h.flags=h.flags&-4097|2,hn=!1,vi=h)}}else{if(kb(h))throw Error(n(418));h.flags=h.flags&-4097|2,hn=!1,vi=h}}}function mT(h){for(h=h.return;h!==null&&h.tag!==5&&h.tag!==3&&h.tag!==13;)h=h.return;vi=h}function Qm(h){if(h!==vi)return!1;if(!hn)return mT(h),hn=!0,!1;var g;if((g=h.tag!==3)&&!(g=h.tag!==5)&&(g=h.type,g=g!=="head"&&g!=="body"&&!bb(h.type,h.memoizedProps)),g&&(g=xi)){if(kb(h))throw gT(),Error(n(418));for(;g;)hT(h,g),g=lo(g.nextSibling)}if(mT(h),h.tag===13){if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(n(317));e:{for(h=h.nextSibling,g=0;h;){if(h.nodeType===8){var j=h.data;if(j==="/$"){if(g===0){xi=lo(h.nextSibling);break e}g--}else j!=="$"&&j!=="$!"&&j!=="$?"||g++}h=h.nextSibling}xi=null}}else xi=vi?lo(h.stateNode.nextSibling):null;return!0}function gT(){for(var h=xi;h;)h=lo(h.nextSibling)}function Xc(){xi=vi=null,hn=!1}function Ab(h){hs===null?hs=[h]:hs.push(h)}var EQ=S.ReactCurrentBatchConfig;function _f(h,g,j){if(h=j.ref,h!==null&&typeof h!="function"&&typeof h!="object"){if(j._owner){if(j=j._owner,j){if(j.tag!==1)throw Error(n(309));var P=j.stateNode}if(!P)throw Error(n(147,h));var M=P,B=""+h;return g!==null&&g.ref!==null&&typeof g.ref=="function"&&g.ref._stringRef===B?g.ref:(g=function(K){var te=M.refs;K===null?delete te[B]:te[B]=K},g._stringRef=B,g)}if(typeof h!="string")throw Error(n(284));if(!j._owner)throw Error(n(290,h))}return h}function Zm(h,g){throw h=Object.prototype.toString.call(g),Error(n(31,h==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":h))}function yT(h){var g=h._init;return g(h._payload)}function vT(h){function g(ue,le){if(h){var fe=ue.deletions;fe===null?(ue.deletions=[le],ue.flags|=16):fe.push(le)}}function j(ue,le){if(!h)return null;for(;le!==null;)g(ue,le),le=le.sibling;return null}function P(ue,le){for(ue=new Map;le!==null;)le.key!==null?ue.set(le.key,le):ue.set(le.index,le),le=le.sibling;return ue}function M(ue,le){return ue=bo(ue,le),ue.index=0,ue.sibling=null,ue}function B(ue,le,fe){return ue.index=fe,h?(fe=ue.alternate,fe!==null?(fe=fe.index,fe<le?(ue.flags|=2,le):fe):(ue.flags|=2,le)):(ue.flags|=1048576,le)}function K(ue){return h&&ue.alternate===null&&(ue.flags|=2),ue}function te(ue,le,fe,Te){return le===null||le.tag!==6?(le=ww(fe,ue.mode,Te),le.return=ue,le):(le=M(le,fe),le.return=ue,le)}function ie(ue,le,fe,Te){var Je=fe.type;return Je===k?_e(ue,le,fe.props.children,Te,fe.key):le!==null&&(le.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===H&&yT(Je)===le.type)?(Te=M(le,fe.props),Te.ref=_f(ue,le,fe),Te.return=ue,Te):(Te=jg(fe.type,fe.key,fe.props,null,ue.mode,Te),Te.ref=_f(ue,le,fe),Te.return=ue,Te)}function me(ue,le,fe,Te){return le===null||le.tag!==4||le.stateNode.containerInfo!==fe.containerInfo||le.stateNode.implementation!==fe.implementation?(le=jw(fe,ue.mode,Te),le.return=ue,le):(le=M(le,fe.children||[]),le.return=ue,le)}function _e(ue,le,fe,Te,Je){return le===null||le.tag!==7?(le=kl(fe,ue.mode,Te,Je),le.return=ue,le):(le=M(le,fe),le.return=ue,le)}function Ee(ue,le,fe){if(typeof le=="string"&&le!==""||typeof le=="number")return le=ww(""+le,ue.mode,fe),le.return=ue,le;if(typeof le=="object"&&le!==null){switch(le.$$typeof){case _:return fe=jg(le.type,le.key,le.props,null,ue.mode,fe),fe.ref=_f(ue,null,le),fe.return=ue,fe;case E:return le=jw(le,ue.mode,fe),le.return=ue,le;case H:var Te=le._init;return Ee(ue,Te(le._payload),fe)}if(Me(le)||G(le))return le=kl(le,ue.mode,fe,null),le.return=ue,le;Zm(ue,le)}return null}function Ne(ue,le,fe,Te){var Je=le!==null?le.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number")return Je!==null?null:te(ue,le,""+fe,Te);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case _:return fe.key===Je?ie(ue,le,fe,Te):null;case E:return fe.key===Je?me(ue,le,fe,Te):null;case H:return Je=fe._init,Ne(ue,le,Je(fe._payload),Te)}if(Me(fe)||G(fe))return Je!==null?null:_e(ue,le,fe,Te,null);Zm(ue,fe)}return null}function Ue(ue,le,fe,Te,Je){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return ue=ue.get(fe)||null,te(le,ue,""+Te,Je);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case _:return ue=ue.get(Te.key===null?fe:Te.key)||null,ie(le,ue,Te,Je);case E:return ue=ue.get(Te.key===null?fe:Te.key)||null,me(le,ue,Te,Je);case H:var at=Te._init;return Ue(ue,le,fe,at(Te._payload),Je)}
vendor: 8,717 bytes, line 38
38if(Me(Te)||G(Te))return ue=ue.get(fe)||null,_e(le,ue,Te,Je,null);Zm(le,Te)}return null}function He(ue,le,fe,Te){for(var Je=null,at=null,ot=le,gt=le=0,rr=null;ot!==null&><fe.length;gt++){ot.index>gt?(rr=ot,ot=null):rr=ot.sibling;var Ft=Ne(ue,ot,fe[gt],Te);if(Ft===null){ot===null&&(ot=rr);break}h&&ot&&Ft.alternate===null&&g(ue,ot),le=B(Ft,le,gt),at===null?Je=Ft:at.sibling=Ft,at=Ft,ot=rr}if(gt===fe.length)return j(ue,ot),hn&&bl(ue,gt),Je;if(ot===null){for(;gt<fe.length;gt++)ot=Ee(ue,fe[gt],Te),ot!==null&&(le=B(ot,le,gt),at===null?Je=ot:at.sibling=ot,at=ot);return hn&&bl(ue,gt),Je}for(ot=P(ue,ot);gt<fe.length;gt++)rr=Ue(ot,ue,gt,fe[gt],Te),rr!==null&&(h&&rr.alternate!==null&&ot.delete(rr.key===null?gt:rr.key),le=B(rr,le,gt),at===null?Je=rr:at.sibling=rr,at=rr);return h&&ot.forEach(function(wo){return g(ue,wo)}),hn&&bl(ue,gt),Je}function Qe(ue,le,fe,Te){var Je=G(fe);if(typeof Je!="function")throw Error(n(150));if(fe=Je.call(fe),fe==null)throw Error(n(151));for(var at=Je=null,ot=le,gt=le=0,rr=null,Ft=fe.next();ot!==null&&!Ft.done;gt++,Ft=fe.next()){ot.index>gt?(rr=ot,ot=null):rr=ot.sibling;var wo=Ne(ue,ot,Ft.value,Te);if(wo===null){ot===null&&(ot=rr);break}h&&ot&&wo.alternate===null&&g(ue,ot),le=B(wo,le,gt),at===null?Je=wo:at.sibling=wo,at=wo,ot=rr}if(Ft.done)return j(ue,ot),hn&&bl(ue,gt),Je;if(ot===null){for(;!Ft.done;gt++,Ft=fe.next())Ft=Ee(ue,Ft.value,Te),Ft!==null&&(le=B(Ft,le,gt),at===null?Je=Ft:at.sibling=Ft,at=Ft);return hn&&bl(ue,gt),Je}for(ot=P(ue,ot);!Ft.done;gt++,Ft=fe.next())Ft=Ue(ot,ue,gt,Ft.value,Te),Ft!==null&&(h&&Ft.alternate!==null&&ot.delete(Ft.key===null?gt:Ft.key),le=B(Ft,le,gt),at===null?Je=Ft:at.sibling=Ft,at=Ft);return h&&ot.forEach(function(sZ){return g(ue,sZ)}),hn&&bl(ue,gt),Je}function On(ue,le,fe,Te){if(typeof fe=="object"&&fe!==null&&fe.type===k&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case _:e:{for(var Je=fe.key,at=le;at!==null;){if(at.key===Je){if(Je=fe.type,Je===k){if(at.tag===7){j(ue,at.sibling),le=M(at,fe.props.children),le.return=ue,ue=le;break e}}else if(at.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===H&&yT(Je)===at.type){j(ue,at.sibling),le=M(at,fe.props),le.ref=_f(ue,at,fe),le.return=ue,ue=le;break e}j(ue,at);break}else g(ue,at);at=at.sibling}fe.type===k?(le=kl(fe.props.children,ue.mode,Te,fe.key),le.return=ue,ue=le):(Te=jg(fe.type,fe.key,fe.props,null,ue.mode,Te),Te.ref=_f(ue,le,fe),Te.return=ue,ue=Te)}return K(ue);case E:e:{for(at=fe.key;le!==null;){if(le.key===at)if(le.tag===4&&le.stateNode.containerInfo===fe.containerInfo&&le.stateNode.implementation===fe.implementation){j(ue,le.sibling),le=M(le,fe.children||[]),le.return=ue,ue=le;break e}else{j(ue,le);break}else g(ue,le);le=le.sibling}le=jw(fe,ue.mode,Te),le.return=ue,ue=le}return K(ue);case H:return at=fe._init,On(ue,le,at(fe._payload),Te)}if(Me(fe))return He(ue,le,fe,Te);if(G(fe))return Qe(ue,le,fe,Te);Zm(ue,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"?(fe=""+fe,le!==null&&le.tag===6?(j(ue,le.sibling),le=M(le,fe),le.return=ue,ue=le):(j(ue,le),le=ww(fe,ue.mode,Te),le.return=ue,ue=le),K(ue)):j(ue,le)}return On}var Qc=vT(!0),xT=vT(!1),Jm=co(null),eg=null,Zc=null,Cb=null;function Tb(){Cb=Zc=eg=null}function Rb(h){var g=Jm.current;cn(Jm),h._currentValue=g}function Ib(h,g,j){for(;h!==null;){var P=h.alternate;if((h.childLanes&g)!==g?(h.childLanes|=g,P!==null&&(P.childLanes|=g)):P!==null&&(P.childLanes&g)!==g&&(P.childLanes|=g),h===j)break;h=h.return}}function Jc(h,g){eg=h,Cb=Zc=null,h=h.dependencies,h!==null&&h.firstContext!==null&&((h.lanes&g)!==0&&(ei=!0),h.firstContext=null)}function qi(h){var g=h._currentValue;if(Cb!==h)if(h={context:h,memoizedValue:g,next:null},Zc===null){if(eg===null)throw Error(n(308));Zc=h,eg.dependencies={lanes:0,firstContext:h}}else Zc=Zc.next=h;return g}var wl=null;function Mb(h){wl===null?wl=[h]:wl.push(h)}function bT(h,g,j,P){var M=g.interleaved;return M===null?(j.next=j,Mb(g)):(j.next=M.next,M.next=j),g.interleaved=j,va(h,P)}function va(h,g){h.lanes|=g;var j=h.alternate;for(j!==null&&(j.lanes|=g),j=h,h=h.return;h!==null;)h.childLanes|=g,j=h.alternate,j!==null&&(j.childLanes|=g),j=h,h=h.return;return j.tag===3?j.stateNode:null}var ho=!1;function Db(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wT(h,g){h=h.updateQueue,g.updateQueue===h&&(g.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects})}function xa(h,g){return{eventTime:h,lane:g,tag:0,payload:null,callback:null,next:null}}function po(h,g,j){var P=h.updateQueue;if(P===null)return null;if(P=P.shared,($t&2)!==0){var M=P.pending;return M===null?g.next=g:(g.next=M.next,M.next=g),P.pending=g,va(h,j)}return M=P.interleaved,M===null?(g.next=g,Mb(P)):(g.next=M.next,M.next=g),P.interleaved=g,va(h,j)}function tg(h,g,j){if(g=g.updateQueue,g!==null&&(g=g.shared,(j&4194240)!==0)){var P=g.lanes;P&=h.pendingLanes,j|=P,g.lanes=j,X0(h,j)}}function jT(h,g){var j=h.updateQueue,P=h.alternate;if(P!==null&&(P=P.updateQueue,j===P)){var M=null,B=null;if(j=j.firstBaseUpdate,j!==null){do{var K={eventTime:j.eventTime,lane:j.lane,tag:j.tag,payload:j.payload,callback:j.callback,next:null};B===null?M=B=K:B=B.next=K,j=j.next}while(j!==null);B===null?M=B=g:B=B.next=g}else M=B=g;j={baseState:P.baseState,firstBaseUpdate:M,lastBaseUpdate:B,shared:P.shared,effects:P.effects},h.updateQueue=j;return}h=j.lastBaseUpdate,h===null?j.firstBaseUpdate=g:h.next=g,j.lastBaseUpdate=g}function ng(h,g,j,P){var M=h.updateQueue;ho=!1;var B=M.firstBaseUpdate,K=M.lastBaseUpdate,te=M.shared.pending;if(te!==null){M.shared.pending=null;var ie=te,me=ie.next;ie.next=null,K===null?B=me:K.next=me,K=ie;var _e=h.alternate;_e!==null&&(_e=_e.updateQueue,te=_e.lastBaseUpdate,te!==K&&(te===null?_e.firstBaseUpdate=me:te.next=me,_e.lastBaseUpdate=ie))}if(B!==null){var Ee=M.baseState;K=0,_e=me=ie=null,te=B;do{var Ne=te.lane,Ue=te.eventTime;if((P&Ne)===Ne){_e!==null&&(_e=_e.next={eventTime:Ue,lane:0,tag:te.tag,payload:te.payload,callback:te.callback,next:null});e:{var He=h,Qe=te;switch(Ne=g,Ue=j,Qe.tag){case 1:if(He=Qe.payload,typeof He=="function"){Ee=He.call(Ue,Ee,Ne);break e}Ee=He;break e;case 3:He.flags=He.flags&-65537|128;case 0:if(He=Qe.payload,Ne=typeof He=="function"?He.call(Ue,Ee,Ne):He,Ne==null)break e;Ee=L({},Ee,Ne);break e;case 2:ho=!0}}te.callback!==null&&te.lane!==0&&(h.flags|=64,Ne=M.effects,Ne===null?M.effects=[te]:Ne.push(te))}else Ue={eventTime:Ue,lane:Ne,tag:te.tag,payload:te.payload,callback:te.callback,next:null},_e===null?(me=_e=Ue,ie=Ee):_e=_e.next=Ue,K|=Ne;if(te=te.next,te===null){if(te=M.shared.pending,te===null)break;Ne=te,te=Ne.next,Ne.next=null,M.lastBaseUpdate=Ne,M.shared.pending=null}}while(!0);if(_e===null&&(ie=Ee),M.baseState=ie,M.firstBaseUpdate=me,M.lastBaseUpdate=_e,g=M.shared.interleaved,g!==null){M=g;do K|=M.lane,M=M.next;while(M!==g)}else B===null&&(M.shared.lanes=0);Nl|=K,h.lanes=K,h.memoizedState=Ee}}function ST(h,g,j){if(h=g.effects,g.effects=null,h!==null)for(g=0;g<h.length;g++){var P=h[g],M=P.callback;if(M!==null){if(P.callback=null,P=j,typeof M!="function")throw Error(n(191,M));M.call(P)}}}var Ef={},qs=co(Ef),Pf=co(Ef),kf=co(Ef);function jl(h){if(h===Ef)throw Error(n(174));return h}function Lb(h,g){switch(tn(kf,g),tn(Pf,h),tn(qs,Ef),h=g.nodeType,h){case 9:case 11:g=(g=g.documentElement)?g.namespaceURI:ke(null,"");break;default:h=h===8?g.parentNode:g,g=h.namespaceURI||null,h=h.tagName,g=ke(g,h)}cn(qs),tn(qs,g)}function eu(){cn(qs),cn(Pf),cn(kf)}function NT(h){jl(kf.current);var g=jl(qs.current),j=ke(g,h.type);g!==j&&(tn(Pf,h),tn(qs,j))}function $b(h){Pf.current===h&&(cn(qs),cn(Pf))}var yn=co(0);function rg(h){for(var g=h;g!==null;){if(g.tag===13){var j=g.memoizedState;if(j!==null&&(j=j.dehydrated,j===null||j.data==="$?"||j.data==="$!"))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var Bb=[];function Fb(){for(var h=0;h<Bb.length;h++)Bb[h]._workInProgressVersionPrimary=null;Bb.length=0}var ig=S.ReactCurrentDispatcher,qb=S.ReactCurrentBatchConfig,Sl=0,vn=null,Vn=null,tr=null,sg=!1,Of=!1,Af=0,PQ=0;function _r(){throw Error(n(321))}function zb(h,g){if(g===null)return!1;for(var j=0;j<g.length&&j<h.length;j++)if(!fs(h[j],g[j]))return!1;return!0}function Ub(h,g,j,P,M,B){if(Sl=B,vn=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,ig.current=h===null||h.memoizedState===null?CQ:TQ,h=j(P,M),Of){B=0;
vendor: 5,615 bytes, line 38
38do{if(Of=!1,Af=0,25<=B)throw Error(n(301));B+=1,tr=Vn=null,g.updateQueue=null,ig.current=RQ,h=j(P,M)}while(Of)}if(ig.current=lg,g=Vn!==null&&Vn.next!==null,Sl=0,tr=Vn=vn=null,sg=!1,g)throw Error(n(300));return h}function Vb(){var h=Af!==0;return Af=0,h}function zs(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tr===null?vn.memoizedState=tr=h:tr=tr.next=h,tr}function zi(){if(Vn===null){var h=vn.alternate;h=h!==null?h.memoizedState:null}else h=Vn.next;var g=tr===null?vn.memoizedState:tr.next;if(g!==null)tr=g,Vn=h;else{if(h===null)throw Error(n(310));Vn=h,h={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},tr===null?vn.memoizedState=tr=h:tr=tr.next=h}return tr}function Cf(h,g){return typeof g=="function"?g(h):g}function Wb(h){var g=zi(),j=g.queue;if(j===null)throw Error(n(311));j.lastRenderedReducer=h;var P=Vn,M=P.baseQueue,B=j.pending;if(B!==null){if(M!==null){var K=M.next;M.next=B.next,B.next=K}P.baseQueue=M=B,j.pending=null}if(M!==null){B=M.next,P=P.baseState;var te=K=null,ie=null,me=B;do{var _e=me.lane;if((Sl&_e)===_e)ie!==null&&(ie=ie.next={lane:0,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null}),P=me.hasEagerState?me.eagerState:h(P,me.action);else{var Ee={lane:_e,action:me.action,hasEagerState:me.hasEagerState,eagerState:me.eagerState,next:null};ie===null?(te=ie=Ee,K=P):ie=ie.next=Ee,vn.lanes|=_e,Nl|=_e}me=me.next}while(me!==null&&me!==B);ie===null?K=P:ie.next=te,fs(P,g.memoizedState)||(ei=!0),g.memoizedState=P,g.baseState=K,g.baseQueue=ie,j.lastRenderedState=P}if(h=j.interleaved,h!==null){M=h;do B=M.lane,vn.lanes|=B,Nl|=B,M=M.next;while(M!==h)}else M===null&&(j.lanes=0);return[g.memoizedState,j.dispatch]}function Hb(h){var g=zi(),j=g.queue;if(j===null)throw Error(n(311));j.lastRenderedReducer=h;var P=j.dispatch,M=j.pending,B=g.memoizedState;if(M!==null){j.pending=null;var K=M=M.next;do B=h(B,K.action),K=K.next;while(K!==M);fs(B,g.memoizedState)||(ei=!0),g.memoizedState=B,g.baseQueue===null&&(g.baseState=B),j.lastRenderedState=B}return[B,P]}function _T(){}function ET(h,g){var j=vn,P=zi(),M=g(),B=!fs(P.memoizedState,M);if(B&&(P.memoizedState=M,ei=!0),P=P.queue,Gb(OT.bind(null,j,P,h),[h]),P.getSnapshot!==g||B||tr!==null&&tr.memoizedState.tag&1){if(j.flags|=2048,Tf(9,kT.bind(null,j,P,M,g),void 0,null),nr===null)throw Error(n(349));(Sl&30)!==0||PT(j,g,M)}return M}function PT(h,g,j){h.flags|=16384,h={getSnapshot:g,value:j},g=vn.updateQueue,g===null?(g={lastEffect:null,stores:null},vn.updateQueue=g,g.stores=[h]):(j=g.stores,j===null?g.stores=[h]:j.push(h))}function kT(h,g,j,P){g.value=j,g.getSnapshot=P,AT(g)&&CT(h)}function OT(h,g,j){return j(function(){AT(g)&&CT(h)})}function AT(h){var g=h.getSnapshot;h=h.value;try{var j=g();return!fs(h,j)}catch{return!0}}function CT(h){var g=va(h,1);g!==null&&ys(g,h,1,-1)}function TT(h){var g=zs();return typeof h=="function"&&(h=h()),g.memoizedState=g.baseState=h,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cf,lastRenderedState:h},g.queue=h,h=h.dispatch=AQ.bind(null,vn,h),[g.memoizedState,h]}function Tf(h,g,j,P){return h={tag:h,create:g,destroy:j,deps:P,next:null},g=vn.updateQueue,g===null?(g={lastEffect:null,stores:null},vn.updateQueue=g,g.lastEffect=h.next=h):(j=g.lastEffect,j===null?g.lastEffect=h.next=h:(P=j.next,j.next=h,h.next=P,g.lastEffect=h)),h}function RT(){return zi().memoizedState}function ag(h,g,j,P){var M=zs();vn.flags|=h,M.memoizedState=Tf(1|g,j,void 0,P===void 0?null:P)}function og(h,g,j,P){var M=zi();P=P===void 0?null:P;var B=void 0;if(Vn!==null){var K=Vn.memoizedState;if(B=K.destroy,P!==null&&zb(P,K.deps)){M.memoizedState=Tf(g,j,B,P);return}}vn.flags|=h,M.memoizedState=Tf(1|g,j,B,P)}function IT(h,g){return ag(8390656,8,h,g)}function Gb(h,g){return og(2048,8,h,g)}function MT(h,g){return og(4,2,h,g)}function DT(h,g){return og(4,4,h,g)}function LT(h,g){if(typeof g=="function")return h=h(),g(h),function(){g(null)};if(g!=null)return h=h(),g.current=h,function(){g.current=null}}function $T(h,g,j){return j=j!=null?j.concat([h]):null,og(4,4,LT.bind(null,g,h),j)}function Kb(){}function BT(h,g){var j=zi();g=g===void 0?null:g;var P=j.memoizedState;return P!==null&&g!==null&&zb(g,P[1])?P[0]:(j.memoizedState=[h,g],h)}function FT(h,g){var j=zi();g=g===void 0?null:g;var P=j.memoizedState;return P!==null&&g!==null&&zb(g,P[1])?P[0]:(h=h(),j.memoizedState=[h,g],h)}function qT(h,g,j){return(Sl&21)===0?(h.baseState&&(h.baseState=!1,ei=!0),h.memoizedState=j):(fs(j,g)||(j=yC(),vn.lanes|=j,Nl|=j,h.baseState=!0),g)}function kQ(h,g){var j=Kt;Kt=j!==0&&4>j?j:4,h(!0);var P=qb.transition;qb.transition={};try{h(!1),g()}finally{Kt=j,qb.transition=P}}function zT(){return zi().memoizedState}function OQ(h,g,j){var P=vo(h);if(j={lane:P,action:j,hasEagerState:!1,eagerState:null,next:null},UT(h))VT(g,j);else if(j=bT(h,g,j,P),j!==null){var M=Br();ys(j,h,P,M),WT(j,g,P)}}function AQ(h,g,j){var P=vo(h),M={lane:P,action:j,hasEagerState:!1,eagerState:null,next:null};if(UT(h))VT(g,M);else{var B=h.alternate;if(h.lanes===0&&(B===null||B.lanes===0)&&(B=g.lastRenderedReducer,B!==null))try{var K=g.lastRenderedState,te=B(K,j);if(M.hasEagerState=!0,M.eagerState=te,fs(te,K)){var ie=g.interleaved;ie===null?(M.next=M,Mb(g)):(M.next=ie.next,ie.next=M),g.interleaved=M;return}}catch{}finally{}j=bT(h,g,M,P),j!==null&&(M=Br(),ys(j,h,P,M),WT(j,g,P))}}function UT(h){var g=h.alternate;return h===vn||g!==null&&g===vn}function VT(h,g){Of=sg=!0;var j=h.pending;j===null?g.next=g:(g.next=j.next,j.next=g),h.pending=g}function WT(h,g,j){if((j&4194240)!==0){var P=g.lanes;
vendor: 8,776 bytes, lines 38-40
38P&=h.pendingLanes,j|=P,g.lanes=j,X0(h,j)}}var lg={readContext:qi,useCallback:_r,useContext:_r,useEffect:_r,useImperativeHandle:_r,useInsertionEffect:_r,useLayoutEffect:_r,useMemo:_r,useReducer:_r,useRef:_r,useState:_r,useDebugValue:_r,useDeferredValue:_r,useTransition:_r,useMutableSource:_r,useSyncExternalStore:_r,useId:_r,unstable_isNewReconciler:!1},CQ={readContext:qi,useCallback:function(h,g){return zs().memoizedState=[h,g===void 0?null:g],h},useContext:qi,useEffect:IT,useImperativeHandle:function(h,g,j){return j=j!=null?j.concat([h]):null,ag(4194308,4,LT.bind(null,g,h),j)},useLayoutEffect:function(h,g){return ag(4194308,4,h,g)},useInsertionEffect:function(h,g){return ag(4,2,h,g)},useMemo:function(h,g){var j=zs();return g=g===void 0?null:g,h=h(),j.memoizedState=[h,g],h},useReducer:function(h,g,j){var P=zs();return g=j!==void 0?j(g):g,P.memoizedState=P.baseState=g,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:g},P.queue=h,h=h.dispatch=OQ.bind(null,vn,h),[P.memoizedState,h]},useRef:function(h){var g=zs();return h={current:h},g.memoizedState=h},useState:TT,useDebugValue:Kb,useDeferredValue:function(h){return zs().memoizedState=h},useTransition:function(){var h=TT(!1),g=h[0];return h=kQ.bind(null,h[1]),zs().memoizedState=h,[g,h]},useMutableSource:function(){},useSyncExternalStore:function(h,g,j){var P=vn,M=zs();if(hn){if(j===void 0)throw Error(n(407));j=j()}else{if(j=g(),nr===null)throw Error(n(349));(Sl&30)!==0||PT(P,g,j)}M.memoizedState=j;var B={value:j,getSnapshot:g};return M.queue=B,IT(OT.bind(null,P,B,h),[h]),P.flags|=2048,Tf(9,kT.bind(null,P,B,j,g),void 0,null),j},useId:function(){var h=zs(),g=nr.identifierPrefix;if(hn){var j=ya,P=ga;j=(P&~(1<<32-ds(P)-1)).toString(32)+j,g=":"+g+"R"+j,j=Af++,0<j&&(g+="H"+j.toString(32)),g+=":"}else j=PQ++,g=":"+g+"r"+j.toString(32)+":";return h.memoizedState=g},unstable_isNewReconciler:!1},TQ={readContext:qi,useCallback:BT,useContext:qi,useEffect:Gb,useImperativeHandle:$T,useInsertionEffect:MT,useLayoutEffect:DT,useMemo:FT,useReducer:Wb,useRef:RT,useState:function(){return Wb(Cf)},useDebugValue:Kb,useDeferredValue:function(h){var g=zi();return qT(g,Vn.memoizedState,h)},useTransition:function(){var h=Wb(Cf)[0],g=zi().memoizedState;return[h,g]},useMutableSource:_T,useSyncExternalStore:ET,useId:zT,unstable_isNewReconciler:!1},RQ={readContext:qi,useCallback:BT,useContext:qi,useEffect:Gb,useImperativeHandle:$T,useInsertionEffect:MT,useLayoutEffect:DT,useMemo:FT,useReducer:Hb,useRef:RT,useState:function(){return Hb(Cf)},useDebugValue:Kb,useDeferredValue:function(h){var g=zi();return Vn===null?g.memoizedState=h:qT(g,Vn.memoizedState,h)},useTransition:function(){var h=Hb(Cf)[0],g=zi().memoizedState;return[h,g]},useMutableSource:_T,useSyncExternalStore:ET,useId:zT,unstable_isNewReconciler:!1};function ps(h,g){if(h&&h.defaultProps){g=L({},g),h=h.defaultProps;for(var j in h)g[j]===void 0&&(g[j]=h[j]);return g}return g}function Yb(h,g,j,P){g=h.memoizedState,j=j(P,g),j=j==null?g:L({},g,j),h.memoizedState=j,h.lanes===0&&(h.updateQueue.baseState=j)}var cg={isMounted:function(h){return(h=h._reactInternals)?gl(h)===h:!1},enqueueSetState:function(h,g,j){h=h._reactInternals;var P=Br(),M=vo(h),B=xa(P,M);B.payload=g,j!=null&&(B.callback=j),g=po(h,B,M),g!==null&&(ys(g,h,M,P),tg(g,h,M))},enqueueReplaceState:function(h,g,j){h=h._reactInternals;var P=Br(),M=vo(h),B=xa(P,M);B.tag=1,B.payload=g,j!=null&&(B.callback=j),g=po(h,B,M),g!==null&&(ys(g,h,M,P),tg(g,h,M))},enqueueForceUpdate:function(h,g){h=h._reactInternals;var j=Br(),P=vo(h),M=xa(j,P);M.tag=2,g!=null&&(M.callback=g),g=po(h,M,P),g!==null&&(ys(g,h,P,j),tg(g,h,P))}};function HT(h,g,j,P,M,B,K){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(P,B,K):g.prototype&&g.prototype.isPureReactComponent?!vf(j,P)||!vf(M,B):!0}function GT(h,g,j){var P=!1,M=uo,B=g.contextType;return typeof B=="object"&&B!==null?B=qi(B):(M=Jr(g)?vl:Nr.current,P=g.contextTypes,B=(P=P!=null)?Gc(h,M):uo),g=new g(j,B),h.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=cg,h.stateNode=g,g._reactInternals=h,P&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=M,h.__reactInternalMemoizedMaskedChildContext=B),g}function KT(h,g,j,P){h=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(j,P),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(j,P),g.state!==h&&cg.enqueueReplaceState(g,g.state,null)}function Xb(h,g,j,P){var M=h.stateNode;M.props=j,M.state=h.memoizedState,M.refs={},Db(h);var B=g.contextType;typeof B=="object"&&B!==null?M.context=qi(B):(B=Jr(g)?vl:Nr.current,M.context=Gc(h,B)),M.state=h.memoizedState,B=g.getDerivedStateFromProps,typeof B=="function"&&(Yb(h,g,B,j),M.state=h.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(g=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),g!==M.state&&cg.enqueueReplaceState(M,M.state,null),ng(h,j,M,P),M.state=h.memoizedState),typeof M.componentDidMount=="function"&&(h.flags|=4194308)}function tu(h,g){try{var j="",P=g;do j+=J(P),P=P.return;while(P);var M=j}catch(B){M=` 39Error generating stack: `+B.message+` 40`+B.stack}return{value:h,source:g,stack:M,digest:null}}function Qb(h,g,j){return{value:h,source:null,stack:j??null,digest:g??null}}function Zb(h,g){try{console.error(g.value)}catch(j){setTimeout(function(){throw j})}}var IQ=typeof WeakMap=="function"?WeakMap:Map;function YT(h,g,j){j=xa(-1,j),j.tag=3,j.payload={element:null};var P=g.value;return j.callback=function(){gg||(gg=!0,hw=P),Zb(h,g)},j}function XT(h,g,j){j=xa(-1,j),j.tag=3;var P=h.type.getDerivedStateFromError;if(typeof P=="function"){var M=g.value;j.payload=function(){return P(M)},j.callback=function(){Zb(h,g)}}var B=h.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(j.callback=function(){Zb(h,g),typeof P!="function"&&(go===null?go=new Set([this]):go.add(this));var K=g.stack;this.componentDidCatch(g.value,{componentStack:K!==null?K:""})}),j}function QT(h,g,j){var P=h.pingCache;if(P===null){P=h.pingCache=new IQ;var M=new Set;P.set(g,M)}else M=P.get(g),M===void 0&&(M=new Set,P.set(g,M));M.has(j)||(M.add(j),h=KQ.bind(null,h,g,j),g.then(h,h))}function ZT(h){do{var g;if((g=h.tag===13)&&(g=h.memoizedState,g=g!==null?g.dehydrated!==null:!0),g)return h;h=h.return}while(h!==null);return null}function JT(h,g,j,P,M){return(h.mode&1)===0?(h===g?h.flags|=65536:(h.flags|=128,j.flags|=131072,j.flags&=-52805,j.tag===1&&(j.alternate===null?j.tag=17:(g=xa(-1,1),g.tag=2,po(j,g,1))),j.lanes|=1),h):(h.flags|=65536,h.lanes=M,h)}var MQ=S.ReactCurrentOwner,ei=!1;function $r(h,g,j,P){g.child=h===null?xT(g,null,j,P):Qc(g,h.child,j,P)}function eR(h,g,j,P,M){j=j.render;var B=g.ref;return Jc(g,M),P=Ub(h,g,j,P,B,M),j=Vb(),h!==null&&!ei?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~M,ba(h,g,M)):(hn&&j&&Eb(g),g.flags|=1,$r(h,g,P,M),g.child)}function tR(h,g,j,P,M){if(h===null){var B=j.type;return typeof B=="function"&&!bw(B)&&B.defaultProps===void 0&&j.compare===null&&j.defaultProps===void 0?(g.tag=15,g.type=B,nR(h,g,B,P,M)):(h=jg(j.type,null,P,g,g.mode,M),h.ref=g.ref,h.return=g,g.child=h)}if(B=h.child,(h.lanes&M)===0){var K=B.memoizedProps;if(j=j.compare,j=j!==null?j:vf,j(K,P)&&h.ref===g.ref)return ba(h,g,M)}return g.flags|=1,h=bo(B,P),h.ref=g.ref,h.return=g,g.child=h}function nR(h,g,j,P,M){if(h!==null){var B=h.memoizedProps;if(vf(B,P)&&h.ref===g.ref)if(ei=!1,g.pendingProps=P=B,(h.lanes&M)!==0)(h.flags&131072)!==0&&(ei=!0);else return g.lanes=h.lanes,ba(h,g,M)}return Jb(h,g,j,P,M)}function rR(h,g,j){var P=g.pendingProps,M=P.children,B=h!==null?h.memoizedState:null;if(P.mode==="hidden")if((g.mode&1)===0)g.memoizedState={baseLanes:0,cachePool:null,transitions:null},tn(ru,bi),bi|=j;else{if((j&1073741824)===0)return h=B!==null?B.baseLanes|j:j,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:h,cachePool:null,transitions:null},g.updateQueue=null,tn(ru,bi),bi|=h,null;g.memoizedState={baseLanes:0,cachePool:null,transitions:null},P=B!==null?B.baseLanes:j,tn(ru,bi),bi|=P}else B!==null?(P=B.baseLanes|j,g.memoizedState=null):P=j,tn(ru,bi),bi|=P;return $r(h,g,M,j),g.child}function iR(h,g){var j=g.ref;(h===null&&j!==null||h!==null&&h.ref!==j)&&(g.flags|=512,g.flags|=2097152)}function Jb(h,g,j,P,M){var B=Jr(j)?vl:Nr.current;return B=Gc(g,B),Jc(g,M),j=Ub(h,g,j,P,B,M),P=Vb(),h!==null&&!ei?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~M,ba(h,g,M)):(hn&&P&&Eb(g),g.flags|=1,$r(h,g,j,M),g.child)}function sR(h,g,j,P,M){if(Jr(j)){var B=!0;Gm(g)}else B=!1;
vendor: 13,596 bytes, line 40
40if(Jc(g,M),g.stateNode===null)dg(h,g),GT(g,j,P),Xb(g,j,P,M),P=!0;else if(h===null){var K=g.stateNode,te=g.memoizedProps;K.props=te;var ie=K.context,me=j.contextType;typeof me=="object"&&me!==null?me=qi(me):(me=Jr(j)?vl:Nr.current,me=Gc(g,me));var _e=j.getDerivedStateFromProps,Ee=typeof _e=="function"||typeof K.getSnapshotBeforeUpdate=="function";Ee||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(te!==P||ie!==me)&&KT(g,K,P,me),ho=!1;var Ne=g.memoizedState;K.state=Ne,ng(g,P,K,M),ie=g.memoizedState,te!==P||Ne!==ie||Zr.current||ho?(typeof _e=="function"&&(Yb(g,j,_e,P),ie=g.memoizedState),(te=ho||HT(g,j,te,P,Ne,ie,me))?(Ee||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount()),typeof K.componentDidMount=="function"&&(g.flags|=4194308)):(typeof K.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=P,g.memoizedState=ie),K.props=P,K.state=ie,K.context=me,P=te):(typeof K.componentDidMount=="function"&&(g.flags|=4194308),P=!1)}else{K=g.stateNode,wT(h,g),te=g.memoizedProps,me=g.type===g.elementType?te:ps(g.type,te),K.props=me,Ee=g.pendingProps,Ne=K.context,ie=j.contextType,typeof ie=="object"&&ie!==null?ie=qi(ie):(ie=Jr(j)?vl:Nr.current,ie=Gc(g,ie));var Ue=j.getDerivedStateFromProps;(_e=typeof Ue=="function"||typeof K.getSnapshotBeforeUpdate=="function")||typeof K.UNSAFE_componentWillReceiveProps!="function"&&typeof K.componentWillReceiveProps!="function"||(te!==Ee||Ne!==ie)&&KT(g,K,P,ie),ho=!1,Ne=g.memoizedState,K.state=Ne,ng(g,P,K,M);var He=g.memoizedState;te!==Ee||Ne!==He||Zr.current||ho?(typeof Ue=="function"&&(Yb(g,j,Ue,P),He=g.memoizedState),(me=ho||HT(g,j,me,P,Ne,He,ie)||!1)?(_e||typeof K.UNSAFE_componentWillUpdate!="function"&&typeof K.componentWillUpdate!="function"||(typeof K.componentWillUpdate=="function"&&K.componentWillUpdate(P,He,ie),typeof K.UNSAFE_componentWillUpdate=="function"&&K.UNSAFE_componentWillUpdate(P,He,ie)),typeof K.componentDidUpdate=="function"&&(g.flags|=4),typeof K.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof K.componentDidUpdate!="function"||te===h.memoizedProps&&Ne===h.memoizedState||(g.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||te===h.memoizedProps&&Ne===h.memoizedState||(g.flags|=1024),g.memoizedProps=P,g.memoizedState=He),K.props=P,K.state=He,K.context=ie,P=me):(typeof K.componentDidUpdate!="function"||te===h.memoizedProps&&Ne===h.memoizedState||(g.flags|=4),typeof K.getSnapshotBeforeUpdate!="function"||te===h.memoizedProps&&Ne===h.memoizedState||(g.flags|=1024),P=!1)}return ew(h,g,j,P,B,M)}function ew(h,g,j,P,M,B){iR(h,g);var K=(g.flags&128)!==0;if(!P&&!K)return M&&uT(g,j,!1),ba(h,g,B);P=g.stateNode,MQ.current=g;var te=K&&typeof j.getDerivedStateFromError!="function"?null:P.render();return g.flags|=1,h!==null&&K?(g.child=Qc(g,h.child,null,B),g.child=Qc(g,null,te,B)):$r(h,g,te,B),g.memoizedState=P.state,M&&uT(g,j,!0),g.child}function aR(h){var g=h.stateNode;g.pendingContext?lT(h,g.pendingContext,g.pendingContext!==g.context):g.context&&lT(h,g.context,!1),Lb(h,g.containerInfo)}function oR(h,g,j,P,M){return Xc(),Ab(M),g.flags|=256,$r(h,g,j,P),g.child}var tw={dehydrated:null,treeContext:null,retryLane:0};function nw(h){return{baseLanes:h,cachePool:null,transitions:null}}function lR(h,g,j){var P=g.pendingProps,M=yn.current,B=!1,K=(g.flags&128)!==0,te;if((te=K)||(te=h!==null&&h.memoizedState===null?!1:(M&2)!==0),te?(B=!0,g.flags&=-129):(h===null||h.memoizedState!==null)&&(M|=1),tn(yn,M&1),h===null)return Ob(g),h=g.memoizedState,h!==null&&(h=h.dehydrated,h!==null)?((g.mode&1)===0?g.lanes=1:h.data==="$!"?g.lanes=8:g.lanes=1073741824,null):(K=P.children,h=P.fallback,B?(P=g.mode,B=g.child,K={mode:"hidden",children:K},(P&1)===0&&B!==null?(B.childLanes=0,B.pendingProps=K):B=Sg(K,P,0,null),h=kl(h,P,j,null),B.return=g,h.return=g,B.sibling=h,g.child=B,g.child.memoizedState=nw(j),g.memoizedState=tw,h):rw(g,K));if(M=h.memoizedState,M!==null&&(te=M.dehydrated,te!==null))return DQ(h,g,K,P,te,M,j);if(B){B=P.fallback,K=g.mode,M=h.child,te=M.sibling;var ie={mode:"hidden",children:P.children};return(K&1)===0&&g.child!==M?(P=g.child,P.childLanes=0,P.pendingProps=ie,g.deletions=null):(P=bo(M,ie),P.subtreeFlags=M.subtreeFlags&14680064),te!==null?B=bo(te,B):(B=kl(B,K,j,null),B.flags|=2),B.return=g,P.return=g,P.sibling=B,g.child=P,P=B,B=g.child,K=h.child.memoizedState,K=K===null?nw(j):{baseLanes:K.baseLanes|j,cachePool:null,transitions:K.transitions},B.memoizedState=K,B.childLanes=h.childLanes&~j,g.memoizedState=tw,P}return B=h.child,h=B.sibling,P=bo(B,{mode:"visible",children:P.children}),(g.mode&1)===0&&(P.lanes=j),P.return=g,P.sibling=null,h!==null&&(j=g.deletions,j===null?(g.deletions=[h],g.flags|=16):j.push(h)),g.child=P,g.memoizedState=null,P}function rw(h,g){return g=Sg({mode:"visible",children:g},h.mode,0,null),g.return=h,h.child=g}function ug(h,g,j,P){return P!==null&&Ab(P),Qc(g,h.child,null,j),h=rw(g,g.pendingProps.children),h.flags|=2,g.memoizedState=null,h}function DQ(h,g,j,P,M,B,K){if(j)return g.flags&256?(g.flags&=-257,P=Qb(Error(n(422))),ug(h,g,K,P)):g.memoizedState!==null?(g.child=h.child,g.flags|=128,null):(B=P.fallback,M=g.mode,P=Sg({mode:"visible",children:P.children},M,0,null),B=kl(B,M,K,null),B.flags|=2,P.return=g,B.return=g,P.sibling=B,g.child=P,(g.mode&1)!==0&&Qc(g,h.child,null,K),g.child.memoizedState=nw(K),g.memoizedState=tw,B);if((g.mode&1)===0)return ug(h,g,K,null);if(M.data==="$!"){if(P=M.nextSibling&&M.nextSibling.dataset,P)var te=P.dgst;return P=te,B=Error(n(419)),P=Qb(B,P,void 0),ug(h,g,K,P)}if(te=(K&h.childLanes)!==0,ei||te){if(P=nr,P!==null){switch(K&-K){case 4:M=2;break;case 16:M=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:M=32;break;case 536870912:M=268435456;break;default:M=0}M=(M&(P.suspendedLanes|K))!==0?0:M,M!==0&&M!==B.retryLane&&(B.retryLane=M,va(h,M),ys(P,h,M,-1))}return xw(),P=Qb(Error(n(421))),ug(h,g,K,P)}return M.data==="$?"?(g.flags|=128,g.child=h.child,g=YQ.bind(null,h),M._reactRetry=g,null):(h=B.treeContext,xi=lo(M.nextSibling),vi=g,hn=!0,hs=null,h!==null&&(Bi[Fi++]=ga,Bi[Fi++]=ya,Bi[Fi++]=xl,ga=h.id,ya=h.overflow,xl=g),g=rw(g,P.children),g.flags|=4096,g)}function cR(h,g,j){h.lanes|=g;var P=h.alternate;P!==null&&(P.lanes|=g),Ib(h.return,g,j)}function iw(h,g,j,P,M){var B=h.memoizedState;B===null?h.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:P,tail:j,tailMode:M}:(B.isBackwards=g,B.rendering=null,B.renderingStartTime=0,B.last=P,B.tail=j,B.tailMode=M)}function uR(h,g,j){var P=g.pendingProps,M=P.revealOrder,B=P.tail;if($r(h,g,P.children,j),P=yn.current,(P&2)!==0)P=P&1|2,g.flags|=128;else{if(h!==null&&(h.flags&128)!==0)e:for(h=g.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&cR(h,j,g);else if(h.tag===19)cR(h,j,g);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===g)break e;for(;h.sibling===null;){if(h.return===null||h.return===g)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}P&=1}if(tn(yn,P),(g.mode&1)===0)g.memoizedState=null;else switch(M){case"forwards":for(j=g.child,M=null;j!==null;)h=j.alternate,h!==null&&rg(h)===null&&(M=j),j=j.sibling;j=M,j===null?(M=g.child,g.child=null):(M=j.sibling,j.sibling=null),iw(g,!1,M,j,B);break;case"backwards":for(j=null,M=g.child,g.child=null;M!==null;){if(h=M.alternate,h!==null&&rg(h)===null){g.child=M;break}h=M.sibling,M.sibling=j,j=M,M=h}iw(g,!0,j,null,B);break;case"together":iw(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function dg(h,g){(g.mode&1)===0&&h!==null&&(h.alternate=null,g.alternate=null,g.flags|=2)}function ba(h,g,j){if(h!==null&&(g.dependencies=h.dependencies),Nl|=g.lanes,(j&g.childLanes)===0)return null;if(h!==null&&g.child!==h.child)throw Error(n(153));if(g.child!==null){for(h=g.child,j=bo(h,h.pendingProps),g.child=j,j.return=g;h.sibling!==null;)h=h.sibling,j=j.sibling=bo(h,h.pendingProps),j.return=g;j.sibling=null}return g.child}function LQ(h,g,j){switch(g.tag){case 3:aR(g),Xc();break;case 5:NT(g);break;case 1:Jr(g.type)&&Gm(g);break;case 4:Lb(g,g.stateNode.containerInfo);break;case 10:var P=g.type._context,M=g.memoizedProps.value;tn(Jm,P._currentValue),P._currentValue=M;break;case 13:if(P=g.memoizedState,P!==null)return P.dehydrated!==null?(tn(yn,yn.current&1),g.flags|=128,null):(j&g.child.childLanes)!==0?lR(h,g,j):(tn(yn,yn.current&1),h=ba(h,g,j),h!==null?h.sibling:null);tn(yn,yn.current&1);break;case 19:if(P=(j&g.childLanes)!==0,(h.flags&128)!==0){if(P)return uR(h,g,j);g.flags|=128}if(M=g.memoizedState,M!==null&&(M.rendering=null,M.tail=null,M.lastEffect=null),tn(yn,yn.current),P)break;return null;case 22:case 23:return g.lanes=0,rR(h,g,j)}return ba(h,g,j)}var dR,sw,fR,hR;dR=function(h,g){for(var j=g.child;j!==null;){if(j.tag===5||j.tag===6)h.appendChild(j.stateNode);else if(j.tag!==4&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===g)break;for(;j.sibling===null;){if(j.return===null||j.return===g)return;j=j.return}j.sibling.return=j.return,j=j.sibling}},sw=function(){},fR=function(h,g,j,P){var M=h.memoizedProps;if(M!==P){h=g.stateNode,jl(qs.current);var B=null;switch(j){case"input":M=$e(h,M),P=$e(h,P),B=[];break;case"select":M=L({},M,{value:void 0}),P=L({},P,{value:void 0}),B=[];break;case"textarea":M=je(h,M),P=je(h,P),B=[];break;default:typeof M.onClick!="function"&&typeof P.onClick=="function"&&(h.onclick=Vm)}hr(j,P);var K;j=null;for(me in M)if(!P.hasOwnProperty(me)&&M.hasOwnProperty(me)&&M[me]!=null)if(me==="style"){var te=M[me];for(K in te)te.hasOwnProperty(K)&&(j||(j={}),j[K]="")}else me!=="dangerouslySetInnerHTML"&&me!=="children"&&me!=="suppressContentEditableWarning"&&me!=="suppressHydrationWarning"&&me!=="autoFocus"&&(i.hasOwnProperty(me)?B||(B=[]):(B=B||[]).push(me,null));for(me in P){var ie=P[me];if(te=M!=null?M[me]:void 0,P.hasOwnProperty(me)&&ie!==te&&(ie!=null||te!=null))if(me==="style")if(te){for(K in te)!te.hasOwnProperty(K)||ie&&ie.hasOwnProperty(K)||(j||(j={}),j[K]="");for(K in ie)ie.hasOwnProperty(K)&&te[K]!==ie[K]&&(j||(j={}),j[K]=ie[K])}else j||(B||(B=[]),B.push(me,j)),j=ie;else me==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,te=te?te.__html:void 0,ie!=null&&te!==ie&&(B=B||[]).push(me,ie)):me==="children"?typeof ie!="string"&&typeof ie!="number"||(B=B||[]).push(me,""+ie):me!=="suppressContentEditableWarning"&&me!=="suppressHydrationWarning"&&(i.hasOwnProperty(me)?(ie!=null&&me==="onScroll"&&ln("scroll",h),B||te===ie||(B=[])):(B=B||[]).push(me,ie))}j&&(B=B||[]).push("style",j);var me=B;(g.updateQueue=me)&&(g.flags|=4)}},hR=function(h,g,j,P){j!==P&&(g.flags|=4)};function Rf(h,g){if(!hn)switch(h.tailMode){case"hidden":g=h.tail;for(var j=null;g!==null;)g.alternate!==null&&(j=g),g=g.sibling;j===null?h.tail=null:j.sibling=null;break;case"collapsed":j=h.tail;for(var P=null;j!==null;)j.alternate!==null&&(P=j),j=j.sibling;P===null?g||h.tail===null?h.tail=null:h.tail.sibling=null:P.sibling=null}}function Er(h){var g=h.alternate!==null&&h.alternate.child===h.child,j=0,P=0;if(g)for(var M=h.child;M!==null;)j|=M.lanes|M.childLanes,P|=M.subtreeFlags&14680064,P|=M.flags&14680064,M.return=h,M=M.sibling;else for(M=h.child;M!==null;)j|=M.lanes|M.childLanes,P|=M.subtreeFlags,P|=M.flags,M.return=h,M=M.sibling;return h.subtreeFlags|=P,h.childLanes=j,g}function $Q(h,g,j){var P=g.pendingProps;switch(Pb(g),g.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Er(g),null;case 1:return Jr(g.type)&&Hm(),Er(g),null;case 3:return P=g.stateNode,eu(),cn(Zr),cn(Nr),Fb(),P.pendingContext&&(P.context=P.pendingContext,P.pendingContext=null),(h===null||h.child===null)&&(Qm(g)?g.flags|=4:h===null||h.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,hs!==null&&(gw(hs),hs=null))),sw(h,g),Er(g),null;case 5:$b(g);var M=jl(kf.current);if(j=g.type,h!==null&&g.stateNode!=null)fR(h,g,j,P,M),h.ref!==g.ref&&(g.flags|=512,g.flags|=2097152);else{if(!P){if(g.stateNode===null)throw Error(n(166));return Er(g),null}if(h=jl(qs.current),Qm(g)){P=g.stateNode,j=g.type;var B=g.memoizedProps;switch(P[Fs]=g,P[Sf]=B,h=(g.mode&1)!==0,j){case"dialog":ln("cancel",P),ln("close",P);break;case"iframe":case"object":case"embed":ln("load",P);break;case"video":case"audio":for(M=0;M<bf.length;M++)ln(bf[M],P);break;case"source":ln("error",P);break;case"img":case"image":case"link":ln("error",P),ln("load",P);break;case"details":ln("toggle",P);break;case"input":Ze(P,B),ln("invalid",P);break;case"select":P._wrapperState={wasMultiple:!!B.multiple},ln("invalid",P);break;case"textarea":mt(P,B),ln("invalid",P)}hr(j,B),M=null;for(var K in B)if(B.hasOwnProperty(K)){var te=B[K];K==="children"?typeof te=="string"?P.textContent!==te&&(B.suppressHydrationWarning!==!0&&Um(P.textContent,te,h),M=["children",te]):typeof te=="number"&&P.textContent!==""+te&&(B.suppressHydrationWarning!==!0&&Um(P.textContent,te,h),M=["children",""+te]):i.hasOwnProperty(K)&&te!=null&&K==="onScroll"&&ln("scroll",P)}switch(j){case"input":pe(P),ye(P,B,!0);break;case"textarea":pe(P),wt(P);break;case"select":case"option":break;default:typeof B.onClick=="function"&&(P.onclick=Vm)}P=M,g.updateQueue=P,P!==null&&(g.flags|=4)}else{K=M.nodeType===9?M:M.ownerDocument,h==="http://www.w3.org/1999/xhtml"&&(h=xe(j)),h==="http://www.w3.org/1999/xhtml"?j==="script"?(h=K.createElement("div"),h.innerHTML="<script><\/script>
40",h=h.removeChild(h.firstChild)):typeof P.is=="string"?h=K.createElement(j,{is:P.is}):(h=K.createElement(j),j==="select"&&(K=h,P.multiple?K.multiple=!0:P.size&&(K.size=P.size))):h=K.createElementNS(h,j),h[Fs]=g,h[Sf]=P,dR(h,g,!1,!1),g.stateNode=h;e:{switch(K=$s(j,P),j){case"dialog":ln("cancel",h),ln("close",h),M=P;break;case"iframe":case"object":case"embed":ln("load",h),M=P;break;case"video":case"audio":for(M=0;M<bf.length;M++)ln(bf[M],h);M=P;break;case"source":ln("error",h),M=P;break;case"img":case"image":case"link":ln("error",h),ln("load",h),M=P;break;case"details":ln("toggle",h),M=P;break;case"input":Ze(h,P),M=$e(h,P),ln("invalid",h);break;case"option":M=P;break;case"select":h._wrapperState={wasMultiple:!!P.multiple},M=L({},P,{value:void 0}),ln("invalid",h);break;case"textarea":mt(h,P),M=je(h,P),ln("invalid",h);break;default:M=P}hr(j,M),te=M;for(B in te)if(te.hasOwnProperty(B)){var ie=te[B];B==="style"?to(h,ie):B==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,ie!=null&&Et(h,ie)):B==="children"?typeof ie=="string"?(j!=="textarea"||ie!=="")&&rt(h,ie):typeof ie=="number"&&rt(h,""+ie):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(i.hasOwnProperty(B)?ie!=null&&B==="onScroll"&&ln("scroll",h):ie!=null&&N(h,B,ie,K))}switch(j){case"input":pe(h),ye(h,P,!1);break;case"textarea":pe(h),wt(h);break;case"option":P.value!=null&&h.setAttribute("value",""+ne(P.value));break;case"select":h.multiple=!!P.multiple,B=P.value,B!=null?Be(h,!!P.multiple,B,!1):P.defaultValue!=null&&Be(h,!!P.multiple,P.defaultValue,!0);break;default:typeof M.onClick=="function"&&(h.onclick=Vm)}switch(j){case"button":case"input":case"select":case"textarea":P=!!P.autoFocus;break e;case"img":P=!0;break e;default:P=!1}}P&&(g.flags|=4)}g.ref!==null&&(g.flags|=512,g.flags|=2097152)}return Er(g),null;case 6:if(h&&g.stateNode!=null)hR(h,g,h.memoizedProps,P);else{if(typeof P!="string"&&g.stateNode===null)throw Error(n(166));if(j=jl(kf.current),jl(qs.current),Qm(g)){if(P=g.stateNode,j=g.memoizedProps,P[Fs]=g,(B=P.nodeValue!==j)&&(h=vi,h!==null))switch(h.tag){case 3:Um(P.nodeValue,j,(h.mode&1)!==0);break;case 5:h.memoizedProps.suppressHydrationWarning!==!0&&Um(P.nodeValue,j,(h.mode&1)!==0)}B&&(g.flags|=4)}else P=(j.nodeType===9?j:j.ownerDocument).createTextNode(P),P[Fs]=g,g.stateNode=P}return Er(g),null;case 13:if(cn(yn),P=g.memoizedState,h===null||h.memoizedState!==null&&h.memoizedState.dehydrated!==null){if(hn&&xi!==null&&(g.mode&1)!==0&&(g.flags&128)===0)gT(),Xc(),g.flags|=98560,B=!1;else if(B=Qm(g),P!==null&&P.dehydrated!==null){if(h===null){if(!B)throw Error(n(318));if(B=g.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(n(317));B[Fs]=g}else Xc(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;Er(g),B=!1}else hs!==null&&(gw(hs),hs=null),B=!0;if(!B)return g.flags&65536?g:null}return(g.flags&128)!==0?(g.lanes=j,g):(P=P!==null,P!==(h!==null&&h.memoizedState!==null)&&P&&(g.child.flags|=8192,(g.mode&1)!==0&&(h===null||(yn.current&1)!==0?Wn===0&&(Wn=3):xw())),g.updateQueue!==null&&(g.flags|=4),Er(g),null);case 4:return eu(),sw(h,g),h===null&&wf(g.stateNode.containerInfo),Er(g),null;case 10:return Rb(g.type._context),Er(g),null;case 17:return Jr(g.type)&&Hm(),Er(g),null;case 19:if(cn(yn),B=g.memoizedState,B===null)return Er(g),null;if(P=(g.flags&128)!==0,K=B.rendering,K===null)if(P)Rf(B,!1);else{if(Wn!==0||h!==null&&(h.flags&128)!==0)for(h=g.child;h!==null;){if(K=rg(h),K!==null){for(g.flags|=128,Rf(B,!1),P=K.updateQueue,P!==null&&(g.updateQueue=P,g.flags|=4),g.subtreeFlags=0,P=j,j=g.child;j!==null;)B=j,h=P,B.flags&=14680066,K=B.alternate,K===null?(B.childLanes=0,B.lanes=h,B.child=null,B.subtreeFlags=0,B.memoizedProps=null,B.memoizedState=null,B.updateQueue=null,B.dependencies=null,B.stateNode=null):(B.childLanes=K.childLanes,B.lanes=K.lanes,B.child=K.child,B.subtreeFlags=0,B.deletions=null,B.memoizedProps=K.memoizedProps,B.memoizedState=K.memoizedState,B.updateQueue=K.updateQueue,B.type=K.type,h=K.dependencies,B.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),j=j.sibling;return tn(yn,yn.current&1|2),g.child}h=h.sibling}B.tail!==null&&kn()>iu&&(g.flags|=128,P=!0,Rf(B,!1),g.lanes=4194304)}else{if(!P)if(h=rg(K),h!==null){if(g.flags|=128,P=!0,j=h.updateQueue,j!==null&&(g.updateQueue=j,g.flags|=4),Rf(B,!0),B.tail===null&&B.tailMode==="hidden"&&!K.alternate&&!hn)return Er(g),null}else 2*kn()-B.renderingStartTime>iu&&j!==1073741824&&(g.flags|=128,P=!0,Rf(B,!1),g.lanes=4194304);B.isBackwards?(K.sibling=g.child,g.child=K):(j=B.last,j!==null?j.sibling=K:g.child=K,B.last=K)}return B.tail!==null?(g=B.tail,B.rendering=g,B.tail=g.sibling,B.renderingStartTime=kn(),g.sibling=null,j=yn.current,tn(yn,P?j&1|2:j&1),g):(Er(g),null);case 22:case 23:return vw(),P=g.memoizedState!==null,h!==null&&h.memoizedState!==null!==P&&(g.flags|=8192),P&&(g.mode&1)!==0?(bi&1073741824)!==0&&(Er(g),g.subtreeFlags&6&&(g.flags|=8192)):Er(g),null;case 24:return null;case 25:return null}throw Error(n(156,g.tag))}function BQ(h,g){switch(Pb(g),g.tag){case 1:return Jr(g.type)&&Hm(),h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 3:return eu(),cn(Zr),cn(Nr),Fb(),h=g.flags,(h&65536)!==0&&(h&128)===0?(g.flags=h&-65537|128,g):null;case 5:return $b(g),null;case 13:if(cn(yn),h=g.memoizedState,h!==null&&h.dehydrated!==null){if(g.alternate===null)throw Error(n(340));Xc()}return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 19:return cn(yn),null;case 4:return eu(),null;case 10:return Rb(g.type._context),null;case 22:case 23:return vw(),null;case 24:return null;default:return null}}var fg=!1,Pr=!1,FQ=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function nu(h,g){var j=h.ref;if(j!==null)if(typeof j=="function")try{j(null)}catch(P){bn(h,g,P)}else j.current=null}function aw(h,g,j){try{j()}catch(P){bn(h,g,P)}}var pR=!1;function qQ(h,g){if(vb=Tm,h=HC(),ub(h)){if("selectionStart"in h)var j={start:h.selectionStart,end:h.selectionEnd};else e:{j=(j=h.ownerDocument)&&j.defaultView||window;var P=j.getSelection&&j.getSelection();if(P&&P.rangeCount!==0){j=P.anchorNode;var M=P.anchorOffset,B=P.focusNode;P=P.focusOffset;try{j.nodeType,B.nodeType}catch{j=null;break e}var K=0,te=-1,ie=-1,me=0,_e=0,Ee=h,Ne=null;t:for(;;){for(var Ue;Ee!==j||M!==0&&Ee.nodeType!==3||(te=K+M),Ee!==B||P!==0&&Ee.nodeType!==3||(ie=K+P),Ee.nodeType===3&&(K+=Ee.nodeValue.length),(Ue=Ee.f
vendor: 20,837 bytes, line 40
40irstChild)!==null;)Ne=Ee,Ee=Ue;for(;;){if(Ee===h)break t;if(Ne===j&&++me===M&&(te=K),Ne===B&&++_e===P&&(ie=K),(Ue=Ee.nextSibling)!==null)break;Ee=Ne,Ne=Ee.parentNode}Ee=Ue}j=te===-1||ie===-1?null:{start:te,end:ie}}else j=null}j=j||{start:0,end:0}}else j=null;for(xb={focusedElem:h,selectionRange:j},Tm=!1,Ve=g;Ve!==null;)if(g=Ve,h=g.child,(g.subtreeFlags&1028)!==0&&h!==null)h.return=g,Ve=h;else for(;Ve!==null;){g=Ve;try{var He=g.alternate;if((g.flags&1024)!==0)switch(g.tag){case 0:case 11:case 15:break;case 1:if(He!==null){var Qe=He.memoizedProps,On=He.memoizedState,ue=g.stateNode,le=ue.getSnapshotBeforeUpdate(g.elementType===g.type?Qe:ps(g.type,Qe),On);ue.__reactInternalSnapshotBeforeUpdate=le}break;case 3:var fe=g.stateNode.containerInfo;fe.nodeType===1?fe.textContent="":fe.nodeType===9&&fe.documentElement&&fe.removeChild(fe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){bn(g,g.return,Te)}if(h=g.sibling,h!==null){h.return=g.return,Ve=h;break}Ve=g.return}return He=pR,pR=!1,He}function If(h,g,j){var P=g.updateQueue;if(P=P!==null?P.lastEffect:null,P!==null){var M=P=P.next;do{if((M.tag&h)===h){var B=M.destroy;M.destroy=void 0,B!==void 0&&aw(g,j,B)}M=M.next}while(M!==P)}}function hg(h,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var j=g=g.next;do{if((j.tag&h)===h){var P=j.create;j.destroy=P()}j=j.next}while(j!==g)}}function ow(h){var g=h.ref;if(g!==null){var j=h.stateNode;switch(h.tag){case 5:h=j;break;default:h=j}typeof g=="function"?g(h):g.current=h}}function mR(h){var g=h.alternate;g!==null&&(h.alternate=null,mR(g)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(g=h.stateNode,g!==null&&(delete g[Fs],delete g[Sf],delete g[Sb],delete g[SQ],delete g[NQ])),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function gR(h){return h.tag===5||h.tag===3||h.tag===4}function yR(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||gR(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function lw(h,g,j){var P=h.tag;if(P===5||P===6)h=h.stateNode,g?j.nodeType===8?j.parentNode.insertBefore(h,g):j.insertBefore(h,g):(j.nodeType===8?(g=j.parentNode,g.insertBefore(h,j)):(g=j,g.appendChild(h)),j=j._reactRootContainer,j!=null||g.onclick!==null||(g.onclick=Vm));else if(P!==4&&(h=h.child,h!==null))for(lw(h,g,j),h=h.sibling;h!==null;)lw(h,g,j),h=h.sibling}function cw(h,g,j){var P=h.tag;if(P===5||P===6)h=h.stateNode,g?j.insertBefore(h,g):j.appendChild(h);else if(P!==4&&(h=h.child,h!==null))for(cw(h,g,j),h=h.sibling;h!==null;)cw(h,g,j),h=h.sibling}var pr=null,ms=!1;function mo(h,g,j){for(j=j.child;j!==null;)vR(h,g,j),j=j.sibling}function vR(h,g,j){if(Bs&&typeof Bs.onCommitFiberUnmount=="function")try{Bs.onCommitFiberUnmount(Em,j)}catch{}switch(j.tag){case 5:Pr||nu(j,g);case 6:var P=pr,M=ms;pr=null,mo(h,g,j),pr=P,ms=M,pr!==null&&(ms?(h=pr,j=j.stateNode,h.nodeType===8?h.parentNode.removeChild(j):h.removeChild(j)):pr.removeChild(j.stateNode));break;case 18:pr!==null&&(ms?(h=pr,j=j.stateNode,h.nodeType===8?jb(h.parentNode,j):h.nodeType===1&&jb(h,j),ff(h)):jb(pr,j.stateNode));break;case 4:P=pr,M=ms,pr=j.stateNode.containerInfo,ms=!0,mo(h,g,j),pr=P,ms=M;break;case 0:case 11:case 14:case 15:if(!Pr&&(P=j.updateQueue,P!==null&&(P=P.lastEffect,P!==null))){M=P=P.next;do{var B=M,K=B.destroy;B=B.tag,K!==void 0&&((B&2)!==0||(B&4)!==0)&&aw(j,g,K),M=M.next}while(M!==P)}mo(h,g,j);break;case 1:if(!Pr&&(nu(j,g),P=j.stateNode,typeof P.componentWillUnmount=="function"))try{P.props=j.memoizedProps,P.state=j.memoizedState,P.componentWillUnmount()}catch(te){bn(j,g,te)}mo(h,g,j);break;case 21:mo(h,g,j);break;case 22:j.mode&1?(Pr=(P=Pr)||j.memoizedState!==null,mo(h,g,j),Pr=P):mo(h,g,j);break;default:mo(h,g,j)}}function xR(h){var g=h.updateQueue;if(g!==null){h.updateQueue=null;var j=h.stateNode;j===null&&(j=h.stateNode=new FQ),g.forEach(function(P){var M=XQ.bind(null,h,P);j.has(P)||(j.add(P),P.then(M,M))})}}function gs(h,g){var j=g.deletions;if(j!==null)for(var P=0;P<j.length;P++){var M=j[P];try{var B=h,K=g,te=K;e:for(;te!==null;){switch(te.tag){case 5:pr=te.stateNode,ms=!1;break e;case 3:pr=te.stateNode.containerInfo,ms=!0;break e;case 4:pr=te.stateNode.containerInfo,ms=!0;break e}te=te.return}if(pr===null)throw Error(n(160));vR(B,K,M),pr=null,ms=!1;var ie=M.alternate;ie!==null&&(ie.return=null),M.return=null}catch(me){bn(M,g,me)}}if(g.subtreeFlags&12854)for(g=g.child;g!==null;)bR(g,h),g=g.sibling}function bR(h,g){var j=h.alternate,P=h.flags;switch(h.tag){case 0:case 11:case 14:case 15:if(gs(g,h),Us(h),P&4){try{If(3,h,h.return),hg(3,h)}catch(Qe){bn(h,h.return,Qe)}try{If(5,h,h.return)}catch(Qe){bn(h,h.return,Qe)}}break;case 1:gs(g,h),Us(h),P&512&&j!==null&&nu(j,j.return);break;case 5:if(gs(g,h),Us(h),P&512&&j!==null&&nu(j,j.return),h.flags&32){var M=h.stateNode;try{rt(M,"")}catch(Qe){bn(h,h.return,Qe)}}if(P&4&&(M=h.stateNode,M!=null)){var B=h.memoizedProps,K=j!==null?j.memoizedProps:B,te=h.type,ie=h.updateQueue;if(h.updateQueue=null,ie!==null)try{te==="input"&&B.type==="radio"&&B.name!=null&&xt(M,B),$s(te,K);var me=$s(te,B);for(K=0;K<ie.length;K+=2){var _e=ie[K],Ee=ie[K+1];_e==="style"?to(M,Ee):_e==="dangerouslySetInnerHTML"?Et(M,Ee):_e==="children"?rt(M,Ee):N(M,_e,Ee,me)}switch(te){case"input":pt(M,B);break;case"textarea":bt(M,B);break;case"select":var Ne=M._wrapperState.wasMultiple;M._wrapperState.wasMultiple=!!B.multiple;var Ue=B.value;Ue!=null?Be(M,!!B.multiple,Ue,!1):Ne!==!!B.multiple&&(B.defaultValue!=null?Be(M,!!B.multiple,B.defaultValue,!0):Be(M,!!B.multiple,B.multiple?[]:"",!1))}M[Sf]=B}catch(Qe){bn(h,h.return,Qe)}}break;case 6:if(gs(g,h),Us(h),P&4){if(h.stateNode===null)throw Error(n(162));M=h.stateNode,B=h.memoizedProps;try{M.nodeValue=B}catch(Qe){bn(h,h.return,Qe)}}break;case 3:if(gs(g,h),Us(h),P&4&&j!==null&&j.memoizedState.isDehydrated)try{ff(g.containerInfo)}catch(Qe){bn(h,h.return,Qe)}break;case 4:gs(g,h),Us(h);break;case 13:gs(g,h),Us(h),M=h.child,M.flags&8192&&(B=M.memoizedState!==null,M.stateNode.isHidden=B,!B||M.alternate!==null&&M.alternate.memoizedState!==null||(fw=kn())),P&4&&xR(h);break;case 22:if(_e=j!==null&&j.memoizedState!==null,h.mode&1?(Pr=(me=Pr)||_e,gs(g,h),Pr=me):gs(g,h),Us(h),P&8192){if(me=h.memoizedState!==null,(h.stateNode.isHidden=me)&&!_e&&(h.mode&1)!==0)for(Ve=h,_e=h.child;_e!==null;){for(Ee=Ve=_e;Ve!==null;){switch(Ne=Ve,Ue=Ne.child,Ne.tag){case 0:case 11:case 14:case 15:If(4,Ne,Ne.return);break;case 1:nu(Ne,Ne.return);var He=Ne.stateNode;if(typeof He.componentWillUnmount=="function"){P=Ne,j=Ne.return;try{g=P,He.props=g.memoizedProps,He.state=g.memoizedState,He.componentWillUnmount()}catch(Qe){bn(P,j,Qe)}}break;case 5:nu(Ne,Ne.return);break;case 22:if(Ne.memoizedState!==null){SR(Ee);continue}}Ue!==null?(Ue.return=Ne,Ve=Ue):SR(Ee)}_e=_e.sibling}e:for(_e=null,Ee=h;;){if(Ee.tag===5){if(_e===null){_e=Ee;try{M=Ee.stateNode,me?(B=M.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none"):(te=Ee.stateNode,ie=Ee.memoizedProps.style,K=ie!=null&&ie.hasOwnProperty("display")?ie.display:null,te.style.display=$i("display",K))}catch(Qe){bn(h,h.return,Qe)}}}else if(Ee.tag===6){if(_e===null)try{Ee.stateNode.nodeValue=me?"":Ee.memoizedProps}catch(Qe){bn(h,h.return,Qe)}}else if((Ee.tag!==22&&Ee.tag!==23||Ee.memoizedState===null||Ee===h)&&Ee.child!==null){Ee.child.return=Ee,Ee=Ee.child;continue}if(Ee===h)break e;for(;Ee.sibling===null;){if(Ee.return===null||Ee.return===h)break e;_e===Ee&&(_e=null),Ee=Ee.return}_e===Ee&&(_e=null),Ee.sibling.return=Ee.return,Ee=Ee.sibling}}break;case 19:gs(g,h),Us(h),P&4&&xR(h);break;case 21:break;default:gs(g,h),Us(h)}}function Us(h){var g=h.flags;if(g&2){try{e:{for(var j=h.return;j!==null;){if(gR(j)){var P=j;break e}j=j.return}throw Error(n(160))}switch(P.tag){case 5:var M=P.stateNode;P.flags&32&&(rt(M,""),P.flags&=-33);var B=yR(h);cw(h,B,M);break;case 3:case 4:var K=P.stateNode.containerInfo,te=yR(h);lw(h,te,K);break;default:throw Error(n(161))}}catch(ie){bn(h,h.return,ie)}h.flags&=-3}g&4096&&(h.flags&=-4097)}function zQ(h,g,j){Ve=h,wR(h)}function wR(h,g,j){for(var P=(h.mode&1)!==0;Ve!==null;){var M=Ve,B=M.child;if(M.tag===22&&P){var K=M.memoizedState!==null||fg;if(!K){var te=M.alternate,ie=te!==null&&te.memoizedState!==null||Pr;te=fg;var me=Pr;if(fg=K,(Pr=ie)&&!me)for(Ve=M;Ve!==null;)K=Ve,ie=K.child,K.tag===22&&K.memoizedState!==null?NR(M):ie!==null?(ie.return=K,Ve=ie):NR(M);for(;B!==null;)Ve=B,wR(B),B=B.sibling;Ve=M,fg=te,Pr=me}jR(h)}else(M.subtreeFlags&8772)!==0&&B!==null?(B.return=M,Ve=B):jR(h)}}function jR(h){for(;Ve!==null;){var g=Ve;if((g.flags&8772)!==0){var j=g.alternate;try{if((g.flags&8772)!==0)switch(g.tag){case 0:case 11:case 15:Pr||hg(5,g);break;case 1:var P=g.stateNode;if(g.flags&4&&!Pr)if(j===null)P.componentDidMount();else{var M=g.elementType===g.type?j.memoizedProps:ps(g.type,j.memoizedProps);P.componentDidUpdate(M,j.memoizedState,P.__reactInternalSnapshotBeforeUpdate)}var B=g.updateQueue;B!==null&&ST(g,B,P);break;case 3:var K=g.updateQueue;if(K!==null){if(j=null,g.child!==null)switch(g.child.tag){case 5:j=g.child.stateNode;break;case 1:j=g.child.stateNode}ST(g,K,j)}break;case 5:var te=g.stateNode;if(j===null&&g.flags&4){j=te;var ie=g.memoizedProps;switch(g.type){case"button":case"input":case"select":case"textarea":ie.autoFocus&&j.focus();break;case"img":ie.src&&(j.src=ie.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(g.memoizedState===null){var me=g.alternate;if(me!==null){var _e=me.memoizedState;if(_e!==null){var Ee=_e.dehydrated;Ee!==null&&ff(Ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Pr||g.flags&512&&ow(g)}catch(Ne){bn(g,g.return,Ne)}}if(g===h){Ve=null;break}if(j=g.sibling,j!==null){j.return=g.return,Ve=j;break}Ve=g.return}}function SR(h){for(;Ve!==null;){var g=Ve;if(g===h){Ve=null;break}var j=g.sibling;if(j!==null){j.return=g.return,Ve=j;break}Ve=g.return}}function NR(h){for(;Ve!==null;){var g=Ve;try{switch(g.tag){case 0:case 11:case 15:var j=g.return;try{hg(4,g)}catch(ie){bn(g,j,ie)}break;case 1:var P=g.stateNode;if(typeof P.componentDidMount=="function"){var M=g.return;try{P.componentDidMount()}catch(ie){bn(g,M,ie)}}var B=g.return;try{ow(g)}catch(ie){bn(g,B,ie)}break;case 5:var K=g.return;try{ow(g)}catch(ie){bn(g,K,ie)}}}catch(ie){bn(g,g.return,ie)}if(g===h){Ve=null;break}var te=g.sibling;if(te!==null){te.return=g.return,Ve=te;break}Ve=g.return}}var UQ=Math.ceil,pg=S.ReactCurrentDispatcher,uw=S.ReactCurrentOwner,Ui=S.ReactCurrentBatchConfig,$t=0,nr=null,$n=null,mr=0,bi=0,ru=co(0),Wn=0,Mf=null,Nl=0,mg=0,dw=0,Df=null,ti=null,fw=0,iu=1/0,wa=null,gg=!1,hw=null,go=null,yg=!1,yo=null,vg=0,Lf=0,pw=null,xg=-1,bg=0;function Br(){return($t&6)!==0?kn():xg!==-1?xg:xg=kn()}function vo(h){return(h.mode&1)===0?1:($t&2)!==0&&mr!==0?mr&-mr:EQ.transition!==null?(bg===0&&(bg=yC()),bg):(h=Kt,h!==0||(h=window.event,h=h===void 0?16:EC(h.type)),h)}function ys(h,g,j,P){if(50<Lf)throw Lf=0,pw=null,Error(n(185));of(h,j,P),(($t&2)===0||h!==nr)&&(h===nr&&(($t&2)===0&&(mg|=j),Wn===4&&xo(h,mr)),ni(h,P),j===1&&$t===0&&(g.mode&1)===0&&(iu=kn()+500,Km&&fo()))}function ni(h,g){var j=h.callbackNode;EX(h,g);var P=Om(h,h===nr?mr:0);if(P===0)j!==null&&pC(j),h.callbackNode=null,h.callbackPriority=0;else if(g=P&-P,h.callbackPriority!==g){if(j!=null&&pC(j),g===1)h.tag===0?_Q(ER.bind(null,h)):dT(ER.bind(null,h)),wQ(function(){($t&6)===0&&fo()}),j=null;else{switch(vC(P)){case 1:j=G0;break;case 4:j=mC;break;case 16:j=_m;break;case 536870912:j=gC;break;default:j=_m}j=IR(j,_R.bind(null,h))}h.callbackPriority=g,h.callbackNode=j}}function _R(h,g){if(xg=-1,bg=0,($t&6)!==0)throw Error(n(327));var j=h.callbackNode;if(su()&&h.callbackNode!==j)return null;var P=Om(h,h===nr?mr:0);if(P===0)return null;if((P&30)!==0||(P&h.expiredLanes)!==0||g)g=wg(h,P);else{g=P;var M=$t;$t|=2;var B=kR();(nr!==h||mr!==g)&&(wa=null,iu=kn()+500,El(h,g));do try{HQ();break}catch(te){PR(h,te)}while(!0);Tb(),pg.current=B,$t=M,$n!==null?g=0:(nr=null,mr=0,g=Wn)}if(g!==0){if(g===2&&(M=K0(h),M!==0&&(P=M,g=mw(h,M))),g===1)throw j=Mf,El(h,0),xo(h,P),ni(h,kn()),j;if(g===6)xo(h,P);else{if(M=h.current.alternate,(P&30)===0&&!VQ(M)&&(g=wg(h,P),g===2&&(B=K0(h),B!==0&&(P=B,g=mw(h,B))),g===1))throw j=Mf,El(h,0),xo(h,P),ni(h,kn()),j;switch(h.finishedWork=M,h.finishedLanes=P,g){case 0:case 1:throw Error(n(345));case 2:Pl(h,ti,wa);break;case 3:if(xo(h,P),(P&130023424)===P&&(g=fw+500-kn(),10<g)){if(Om(h,0)!==0)break;if(M=h.suspendedLanes,(M&P)!==P){Br(),h.pingedLanes|=h.suspendedLanes&M;break}h.timeoutHandle=wb(Pl.bind(null,h,ti,wa),g);break}Pl(h,ti,wa);break;case 4:if(xo(h,P),(P&4194240)===P)break;for(g=h.eventTimes,M=-1;0<P;){var K=31-ds(P);B=1<<K,K=g[K],K>M&&(M=K),P&=~B}if(P=M,P=kn()-P,P=(120>P?120:480>P?480:1080>P?1080:1920>P?1920:3e3>P?3e3:4320>P?4320:1960*UQ(P/1960))-P,10<P){h.timeoutHandle=wb(Pl.bind(null,h,ti,wa),P);break}Pl(h,ti,wa);break;case 5:Pl(h,ti,wa);break;default:throw Error(n(329))}}}return ni(h,kn()),h.callbackNode===j?_R.bind(null,h):null}function mw(h,g){var j=Df;return h.current.memoizedState.isDehydrated&&(El(h,g).flags|=256),h=wg(h,g),h!==2&&(g=ti,ti=j,g!==null&&gw(g)),h}function gw(h){ti===null?ti=h:ti.push.apply(ti,h)}function VQ(h){for(var g=h;;){if(g.flags&16384){var j=g.updateQueue;if(j!==null&&(j=j.stores,j!==null))for(var P=0;P<j.length;P++){var M=j[P],B=M.getSnapshot;M=M.value;try{if(!fs(B(),M))return!1}catch{return!1}}}if(j=g.child,g.subtreeFlags&16384&&j!==null)j.return=g,g=j;else{if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function xo(h,g){for(g&=~dw,g&=~mg,h.suspendedLanes|=g,h.pingedLanes&=~g,h=h.expirationTimes;0<g;){var j=31-ds(g),P=1<<j;h[j]=-1,g&=~P}}function ER(h){if(($t&6)!==0)throw Error(n(327));su();var g=Om(h,0);if((g&1)===0)return ni(h,kn()),null;var j=wg(h,g);if(h.tag!==0&&j===2){var P=K0(h);P!==0&&(g=P,j=mw(h,P))}if(j===1)throw j=Mf,El(h,0),xo(h,g),ni(h,kn()),j;if(j===6)throw Error(n(345));return h.finishedWork=h.current.alternate,h.finishedLanes=g,Pl(h,ti,wa),ni(h,kn()),null}function yw(h,g){var j=$t;$t|=1;try{return h(g)}finally{$t=j,$t===0&&(iu=kn()+500,Km&&fo())}}function _l(h){yo!==null&&yo.tag===0&&($t&6)===0&&su();var g=$t;$t|=1;var j=Ui.transition,P=Kt;try{if(Ui.transition=null,Kt=1,h)return h()}finally{Kt=P,Ui.transition=j,$t=g,($t&6)===0&&fo()}}function vw(){bi=ru.current,cn(ru)}function El(h,g){h.finishedWork=null,h.finishedLanes=0;var j=h.timeoutHandle;if(j!==-1&&(h.timeoutHandle=-1,bQ(j)),$n!==null)for(j=$n.return;j!==null;){var P=j;switch(Pb(P),P.tag){case 1:P=P.type.childContextTypes,P!=null&&Hm();break;case 3:eu(),cn(Zr),cn(Nr),Fb();break;case 5:$b(P);break;case 4:eu();break;case 13:cn(yn);break;case 19:cn(yn);break;case 10:Rb(P.type._context);break;case 22:case 23:vw()}j=j.return}if(nr=h,$n=h=bo(h.current,null),mr=bi=g,Wn=0,Mf=null,dw=mg=Nl=0,ti=Df=null,wl!==null){for(g=0;g<wl.length;g++)if(j=wl[g],P=j.interleaved,P!==null){j.interleaved=null;var M=P.next,B=j.pending;if(B!==null){var K=B.next;B.next=M,P.next=K}j.pending=P}wl=null}return h}function PR(h,g){do{var j=$n;try{if(Tb(),ig.current=lg,sg){for(var P=vn.memoizedState;P!==null;){var M=P.queue;M!==null&&(M.pending=null),P=P.next}sg=!1}if(Sl=0,tr=Vn=vn=null,Of=!1,Af=0,uw.current=null,j===null||j.return===null){Wn=1,Mf=g,$n=null;break}e:{var B=h,K=j.return,te=j,ie=g;if(g=mr,te.flags|=32768,ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var me=ie,_e=te,Ee=_e.tag;if((_e.mode&1)===0&&(Ee===0||Ee===11||Ee===15)){var Ne=_e.alternate;Ne?(_e.updateQueue=Ne.updateQueue,_e.memoizedState=Ne.memoizedState,_e.lanes=Ne.lanes):(_e.updateQueue=null,_e.memoizedState=null)}var Ue=ZT(K);if(Ue!==null){Ue.flags&=-257,JT(Ue,K,te,B,g),Ue.mode&1&&QT(B,me,g),g=Ue,ie=me;var He=g.updateQueue;if(He===null){var Qe=new Set;Qe.add(ie),g.updateQueue=Qe}else He.add(ie);break e}else{if((g&1)===0){QT(B,me,g),xw();break e}ie=Error(n(426))}}else if(hn&&te.mode&1){var On=ZT(K);if(On!==null){(On.flags&65536)===0&&(On.flags|=256),JT(On,K,te,B,g),Ab(tu(ie,te));break e}}B=ie=tu(ie,te),Wn!==4&&(Wn=2),Df===null?Df=[B]:Df.push(B),B=K;do{switch(B.tag){case 3:B.flags|=65536,g&=-g,B.lanes|=g;var ue=YT(B,ie,g);jT(B,ue);break e;case 1:te=ie;var le=B.type,fe=B.stateNode;if((B.flags&128)===0&&(typeof le.getDerivedStateFromError=="function"||fe!==null&&typeof fe.componentDidCatch=="function"&&(go===null||!go.has(fe)))){B.flags|=65536,g&=-g,B.lanes|=g;var Te=XT(B,te,g);jT(B,Te);break e}}B=B.return}while(B!==null)}AR(j)}catch(Je){g=Je,$n===j&&j!==null&&($n=j=j.return);continue}break}while(!0)}function kR(){var h=pg.current;return pg.current=lg,h===null?lg:h}function xw(){(Wn===0||Wn===3||Wn===2)&&(Wn=4),nr===null||(Nl&268435455)===0&&(mg&268435455)===0||xo(nr,mr)}function wg(h,g){var j=$t;$t|=2;var P=kR();(nr!==h||mr!==g)&&(wa=null,El(h,g));do try{WQ();break}catch(M){PR(h,M)}while(!0);if(Tb(),$t=j,pg.current=P,$n!==null)throw Error(n(261));return nr=null,mr=0,Wn}function WQ(){for(;$n!==null;)OR($n)}function HQ(){for(;$n!==null&&!yX();)OR($n)}function OR(h){var g=RR(h.alternate,h,bi);h.memoizedProps=h.pendingProps,g===null?AR(h):$n=g,uw.current=null}function AR(h){var g=h;do{var j=g.alternate;if(h=g.return,(g.flags&32768)===0){if(j=$Q(j,g,bi),j!==null){$n=j;return}}else{if(j=BQ(j,g),j!==null){j.flags&=32767,$n=j;return}if(h!==null)h.flags|=32768,h.subtreeFlags=0,h.deletions=null;else{Wn=6,$n=null;return}}if(g=g.sibling,g!==null){$n=g;return}$n=g=h}while(g!==null);Wn===0&&(Wn=5)}function Pl(h,g,j){var P=Kt,M=Ui.transition;try{Ui.transition=null,Kt=1,GQ(h,g,j,P)}finally{Ui.transition=M,Kt=P}return null}function GQ(h,g,j,P){do su();while(yo!==null);if(($t&6)!==0)throw Error(n(327));j=h.finishedWork;var M=h.finishedLanes;if(j===null)return null;if(h.finishedWork=null,h.finishedLanes=0,j===h.current)throw Error(n(177));h.callbackNode=null,h.callbackPriority=0;var B=j.lanes|j.childLanes;if(PX(h,B),h===nr&&($n=nr=null,mr=0),(j.subtreeFlags&2064)===0&&(j.flags&2064)===0||yg||(yg=!0,IR(_m,function(){return su(),null})),B=(j.flags&15990)!==0,(j.subtreeFlags&15990)!==0||B){B=Ui.transition,Ui.transition=null;var K=Kt;Kt=1;var te=$t;$t|=4,uw.current=null,qQ(h,j),bR(j,h),hQ(xb),Tm=!!vb,xb=vb=null,h.current=j,zQ(j),vX(),$t=te,Kt=K,Ui.transition=B}else h.current=j;if(yg&&(yg=!1,yo=h,vg=M),B=h.pendingLanes,B===0&&(go=null),wX(j.stateNode),ni(h,kn()),g!==null)for(P=h.onRecoverableError,j=0;j<g.length;j++)M=g[j],P(M.value,{componentStack:M.stack,digest:M.digest});if(gg)throw gg=!1,h=hw,hw=null,h;return(vg&1)!==0&&h.tag!==0&&su(),B=h.pendingLanes,(B&1)!==0?h===pw?Lf++:(Lf=0,pw=h):Lf=0,fo(),null}function su(){if(yo!==null){var h=vC(vg),g=Ui.transition,j=Kt;try{if(Ui.transition=null,Kt=16>h?16:h,yo===null)var P=!1;else{if(h=yo,yo=null,vg=0,($t&6)!==0)throw Error(n(331));var M=$t;for($t|=4,Ve=h.current;Ve!==null;){var B=Ve,K=B.child;if((Ve.flags&16)!==0){var te=B.deletions;if(te!==null){for(var ie=0;ie<te.length;ie++){var me=te[ie];for(Ve=me;Ve!==null;){var _e=Ve;switch(_e.tag){case 0:case 11:case 15:If(8,_e,B)}var Ee=_e.child;if(Ee!==null)Ee.return=_e,Ve=Ee;else for(;Ve!==null;){_e=Ve;var Ne=_e.sibling,Ue=_e.return;if(mR(_e),_e===me){Ve=null;break}if(Ne!==null){Ne.return=Ue,Ve=Ne;break}Ve=Ue}}}var He=B.alternate;if(He!==null){var Qe=He.child;if(Qe!==null){He.child=null;do{var On=Qe.sibling;Qe.sibling=null,Qe=On}while(Qe!==null)}}Ve=B}}if((B.subtreeFlags&2064)!==0&&K!==null)K.return=B,Ve=K;else e:for(;Ve!==null;){if(B=Ve,(B.flags&2048)!==0)switch(B.tag){case 0:case 11:case 15:If(9,B,B.return)}var ue=B.sibling;if(ue!==null){ue.return=B.return,Ve=ue;break e}Ve=B.return}}var le=h.current;for(Ve=le;Ve!==null;){K=Ve;var fe=K.child;if((K.subtreeFlags&2064)!==0&&fe!==null)fe.return=K,Ve=fe;else e:for(K=le;Ve!==null;){if(te=Ve,(te.flags&2048)!==0)try{switch(te.tag){case 0:case 11:case 15:hg(9,te)}}catch(Je){bn(te,te.return,Je)}if(te===K){Ve=null;break e}var Te=te.sibling;if(Te!==null){Te.return=te.return,Ve=Te;break e}Ve=te.return}}if($t=M,fo(),Bs&&typeof Bs.onPostCommitFiberRoot=="function")try{Bs.onPostCommitFiberRoot(Em,h)}catch{}P=!0}return P}finally{Kt=j,Ui.transition=g}}return!1}function CR(h,g,j){g=tu(j,g),g=YT(h,g,1),h=po(h,g,1),g=Br(),h!==null&&(of(h,1,g),ni(h,g))}function bn(h,g,j){if(h.tag===3)CR(h,h,j);else for(;g!==null;){if(g.tag===3){CR(g,h,j);break}else if(g.tag===1){var P=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof P.componentDidCatch=="function"&&(go===null||!go.has(P))){h=tu(j,h),h=XT(g,h,1),g=po(g,h,1),h=Br(),g!==null&&(of(g,1,h),ni(g,h));break}}g=g.return}}function KQ(h,g,j){var P=h.pingCache;P!==null&&P.delete(g),g=Br(),h.pingedLanes|=h.suspendedLanes&j,nr===h&&
vendor: 4,494 bytes, line 40
40(mr&j)===j&&(Wn===4||Wn===3&&(mr&130023424)===mr&&500>kn()-fw?El(h,0):dw|=j),ni(h,g)}function TR(h,g){g===0&&((h.mode&1)===0?g=1:(g=km,km<<=1,(km&130023424)===0&&(km=4194304)));var j=Br();h=va(h,g),h!==null&&(of(h,g,j),ni(h,j))}function YQ(h){var g=h.memoizedState,j=0;g!==null&&(j=g.retryLane),TR(h,j)}function XQ(h,g){var j=0;switch(h.tag){case 13:var P=h.stateNode,M=h.memoizedState;M!==null&&(j=M.retryLane);break;case 19:P=h.stateNode;break;default:throw Error(n(314))}P!==null&&P.delete(g),TR(h,j)}var RR;RR=function(h,g,j){if(h!==null)if(h.memoizedProps!==g.pendingProps||Zr.current)ei=!0;else{if((h.lanes&j)===0&&(g.flags&128)===0)return ei=!1,LQ(h,g,j);ei=(h.flags&131072)!==0}else ei=!1,hn&&(g.flags&1048576)!==0&&fT(g,Xm,g.index);switch(g.lanes=0,g.tag){case 2:var P=g.type;dg(h,g),h=g.pendingProps;var M=Gc(g,Nr.current);Jc(g,j),M=Ub(null,g,P,h,M,j);var B=Vb();return g.flags|=1,typeof M=="object"&&M!==null&&typeof M.render=="function"&&M.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,Jr(P)?(B=!0,Gm(g)):B=!1,g.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,Db(g),M.updater=cg,g.stateNode=M,M._reactInternals=g,Xb(g,P,h,j),g=ew(null,g,P,!0,B,j)):(g.tag=0,hn&&B&&Eb(g),$r(null,g,M,j),g=g.child),g;case 16:P=g.elementType;e:{switch(dg(h,g),h=g.pendingProps,M=P._init,P=M(P._payload),g.type=P,M=g.tag=ZQ(P),h=ps(P,h),M){case 0:g=Jb(null,g,P,h,j);break e;case 1:g=sR(null,g,P,h,j);break e;case 11:g=eR(null,g,P,h,j);break e;case 14:g=tR(null,g,P,ps(P.type,h),j);break e}throw Error(n(306,P,""))}return g;case 0:return P=g.type,M=g.pendingProps,M=g.elementType===P?M:ps(P,M),Jb(h,g,P,M,j);case 1:return P=g.type,M=g.pendingProps,M=g.elementType===P?M:ps(P,M),sR(h,g,P,M,j);case 3:e:{if(aR(g),h===null)throw Error(n(387));P=g.pendingProps,B=g.memoizedState,M=B.element,wT(h,g),ng(g,P,null,j);var K=g.memoizedState;if(P=K.element,B.isDehydrated)if(B={element:P,isDehydrated:!1,cache:K.cache,pendingSuspenseBoundaries:K.pendingSuspenseBoundaries,transitions:K.transitions},g.updateQueue.baseState=B,g.memoizedState=B,g.flags&256){M=tu(Error(n(423)),g),g=oR(h,g,P,j,M);break e}else if(P!==M){M=tu(Error(n(424)),g),g=oR(h,g,P,j,M);break e}else for(xi=lo(g.stateNode.containerInfo.firstChild),vi=g,hn=!0,hs=null,j=xT(g,null,P,j),g.child=j;j;)j.flags=j.flags&-3|4096,j=j.sibling;else{if(Xc(),P===M){g=ba(h,g,j);break e}$r(h,g,P,j)}g=g.child}return g;case 5:return NT(g),h===null&&Ob(g),P=g.type,M=g.pendingProps,B=h!==null?h.memoizedProps:null,K=M.children,bb(P,M)?K=null:B!==null&&bb(P,B)&&(g.flags|=32),iR(h,g),$r(h,g,K,j),g.child;case 6:return h===null&&Ob(g),null;case 13:return lR(h,g,j);case 4:return Lb(g,g.stateNode.containerInfo),P=g.pendingProps,h===null?g.child=Qc(g,null,P,j):$r(h,g,P,j),g.child;case 11:return P=g.type,M=g.pendingProps,M=g.elementType===P?M:ps(P,M),eR(h,g,P,M,j);case 7:return $r(h,g,g.pendingProps,j),g.child;case 8:return $r(h,g,g.pendingProps.children,j),g.child;case 12:return $r(h,g,g.pendingProps.children,j),g.child;case 10:e:{if(P=g.type._context,M=g.pendingProps,B=g.memoizedProps,K=M.value,tn(Jm,P._currentValue),P._currentValue=K,B!==null)if(fs(B.value,K)){if(B.children===M.children&&!Zr.current){g=ba(h,g,j);break e}}else for(B=g.child,B!==null&&(B.return=g);B!==null;){var te=B.dependencies;if(te!==null){K=B.child;for(var ie=te.firstContext;ie!==null;){if(ie.context===P){if(B.tag===1){ie=xa(-1,j&-j),ie.tag=2;var me=B.updateQueue;if(me!==null){me=me.shared;var _e=me.pending;_e===null?ie.next=ie:(ie.next=_e.next,_e.next=ie),me.pending=ie}}B.lanes|=j,ie=B.alternate,ie!==null&&(ie.lanes|=j),Ib(B.return,j,g),te.lanes|=j;break}ie=ie.next}}else if(B.tag===10)K=B.type===g.type?null:B.child;else if(B.tag===18){if(K=B.return,K===null)throw Error(n(341));K.lanes|=j,te=K.alternate,te!==null&&(te.lanes|=j),Ib(K,j,g),K=B.sibling}else K=B.child;if(K!==null)K.return=B;else for(K=B;K!==null;){if(K===g){K=null;break}if(B=K.sibling,B!==null){B.return=K.return,K=B;break}K=K.return}B=K}$r(h,g,M.children,j),g=g.child}return g;case 9:return M=g.type,P=g.pendingProps.children,Jc(g,j),M=qi(M),P=P(M),g.flags|=1,$r(h,g,P,j),g.child;case 14:return P=g.type,M=ps(P,g.pendingProps),M=ps(P.type,M),tR(h,g,P,M,j);case 15:return nR(h,g,g.type,g.pendingProps,j);case 17:return P=g.type,M=g.pendingProps,M=g.elementType===P?M:ps(P,M),dg(h,g),g.tag=1,Jr(P)?(h=!0,Gm(g)):h=!1,Jc(g,j),GT(g,P,M),Xb(g,P,M,j),ew(null,g,P,!0,h,j);case 19:return uR(h,g,j);case 22:return rR(h,g,j)}throw Error(n(156,g.tag))};function IR(h,g){return hC(h,g)}
vendor: 9,845 bytes, line 40
40function QQ(h,g,j,P){this.tag=h,this.key=j,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=P,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vi(h,g,j,P){return new QQ(h,g,j,P)}function bw(h){return h=h.prototype,!(!h||!h.isReactComponent)}function ZQ(h){if(typeof h=="function")return bw(h)?1:0;if(h!=null){if(h=h.$$typeof,h===R)return 11;if(h===F)return 14}return 2}function bo(h,g){var j=h.alternate;return j===null?(j=Vi(h.tag,g,h.key,h.mode),j.elementType=h.elementType,j.type=h.type,j.stateNode=h.stateNode,j.alternate=h,h.alternate=j):(j.pendingProps=g,j.type=h.type,j.flags=0,j.subtreeFlags=0,j.deletions=null),j.flags=h.flags&14680064,j.childLanes=h.childLanes,j.lanes=h.lanes,j.child=h.child,j.memoizedProps=h.memoizedProps,j.memoizedState=h.memoizedState,j.updateQueue=h.updateQueue,g=h.dependencies,j.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},j.sibling=h.sibling,j.index=h.index,j.ref=h.ref,j}function jg(h,g,j,P,M,B){var K=2;if(P=h,typeof h=="function")bw(h)&&(K=1);else if(typeof h=="string")K=5;else e:switch(h){case k:return kl(j.children,M,B,g);case O:K=8,M|=8;break;case I:return h=Vi(12,j,g,M|2),h.elementType=I,h.lanes=B,h;case D:return h=Vi(13,j,g,M),h.elementType=D,h.lanes=B,h;case q:return h=Vi(19,j,g,M),h.elementType=q,h.lanes=B,h;case U:return Sg(j,M,B,g);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case A:K=10;break e;case C:K=9;break e;case R:K=11;break e;case F:K=14;break e;case H:K=16,P=null;break e}throw Error(n(130,h==null?h:typeof h,""))}return g=Vi(K,j,g,M),g.elementType=h,g.type=P,g.lanes=B,g}function kl(h,g,j,P){return h=Vi(7,h,P,g),h.lanes=j,h}function Sg(h,g,j,P){return h=Vi(22,h,P,g),h.elementType=U,h.lanes=j,h.stateNode={isHidden:!1},h}function ww(h,g,j){return h=Vi(6,h,null,g),h.lanes=j,h}function jw(h,g,j){return g=Vi(4,h.children!==null?h.children:[],h.key,g),g.lanes=j,g.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},g}function JQ(h,g,j,P,M){this.tag=g,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Y0(0),this.expirationTimes=Y0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Y0(0),this.identifierPrefix=P,this.onRecoverableError=M,this.mutableSourceEagerHydrationData=null}function Sw(h,g,j,P,M,B,K,te,ie){return h=new JQ(h,g,j,te,ie),g===1?(g=1,B===!0&&(g|=8)):g=0,B=Vi(3,null,null,g),h.current=B,B.stateNode=h,B.memoizedState={element:P,isDehydrated:j,cache:null,transitions:null,pendingSuspenseBoundaries:null},Db(B),h}function eZ(h,g,j){var P=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:P==null?null:""+P,children:h,containerInfo:g,implementation:j}}function MR(h){if(!h)return uo;h=h._reactInternals;e:{if(gl(h)!==h||h.tag!==1)throw Error(n(170));var g=h;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(Jr(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(n(171))}if(h.tag===1){var j=h.type;if(Jr(j))return cT(h,j,g)}return g}function DR(h,g,j,P,M,B,K,te,ie){return h=Sw(j,P,!0,h,M,B,K,te,ie),h.context=MR(null),j=h.current,P=Br(),M=vo(j),B=xa(P,M),B.callback=g??null,po(j,B,M),h.current.lanes=M,of(h,M,P),ni(h,P),h}function Ng(h,g,j,P){var M=g.current,B=Br(),K=vo(M);return j=MR(j),g.context===null?g.context=j:g.pendingContext=j,g=xa(B,K),g.payload={element:h},P=P===void 0?null:P,P!==null&&(g.callback=P),h=po(M,g,K),h!==null&&(ys(h,M,K,B),tg(h,M,K)),K}function _g(h){if(h=h.current,!h.child)return null;switch(h.child.tag){case 5:return h.child.stateNode;default:return h.child.stateNode}}function LR(h,g){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var j=h.retryLane;h.retryLane=j!==0&&j<g?j:g}}function Nw(h,g){LR(h,g),(h=h.alternate)&&LR(h,g)}function tZ(){return null}var $R=typeof reportError=="function"?reportError:function(h){console.error(h)};function _w(h){this._internalRoot=h}Eg.prototype.render=_w.prototype.render=function(h){var g=this._internalRoot;if(g===null)throw Error(n(409));Ng(h,g,null,null)},Eg.prototype.unmount=_w.prototype.unmount=function(){var h=this._internalRoot;if(h!==null){this._internalRoot=null;var g=h.containerInfo;_l(function(){Ng(null,h,null,null)}),g[pa]=null}};function Eg(h){this._internalRoot=h}Eg.prototype.unstable_scheduleHydration=function(h){if(h){var g=wC();h={blockedOn:null,target:h,priority:g};for(var j=0;j<so.length&&g!==0&&g<so[j].priority;j++);so.splice(j,0,h),j===0&&NC(h)}};function Ew(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function Pg(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11&&(h.nodeType!==8||h.nodeValue!==" react-mount-point-unstable "))}function BR(){}function nZ(h,g,j,P,M){if(M){if(typeof P=="function"){var B=P;P=function(){var me=_g(K);B.call(me)}}var K=DR(g,P,h,0,null,!1,!1,"",BR);return h._reactRootContainer=K,h[pa]=K.current,wf(h.nodeType===8?h.parentNode:h),_l(),K}for(;M=h.lastChild;)h.removeChild(M);if(typeof P=="function"){var te=P;P=function(){var me=_g(ie);te.call(me)}}var ie=Sw(h,0,!1,null,null,!1,!1,"",BR);return h._reactRootContainer=ie,h[pa]=ie.current,wf(h.nodeType===8?h.parentNode:h),_l(function(){Ng(g,ie,j,P)}),ie}function kg(h,g,j,P,M){var B=j._reactRootContainer;if(B){var K=B;if(typeof M=="function"){var te=M;M=function(){var ie=_g(K);te.call(ie)}}Ng(g,K,h,M)}else K=nZ(j,g,h,M,P);return _g(K)}xC=function(h){switch(h.tag){case 3:var g=h.stateNode;if(g.current.memoizedState.isDehydrated){var j=af(g.pendingLanes);j!==0&&(X0(g,j|1),ni(g,kn()),($t&6)===0&&(iu=kn()+500,fo()))}break;case 13:_l(function(){var P=va(h,1);if(P!==null){var M=Br();ys(P,h,1,M)}}),Nw(h,1)}},Q0=function(h){if(h.tag===13){var g=va(h,134217728);if(g!==null){var j=Br();ys(g,h,134217728,j)}Nw(h,134217728)}},bC=function(h){if(h.tag===13){var g=vo(h),j=va(h,g);if(j!==null){var P=Br();ys(j,h,g,P)}Nw(h,g)}},wC=function(){return Kt},jC=function(h,g){var j=Kt;try{return Kt=h,g()}finally{Kt=j}},U0=function(h,g,j){switch(g){case"input":if(pt(h,j),g=j.name,j.type==="radio"&&g!=null){for(j=h;j.parentNode;)j=j.parentNode;for(j=j.querySelectorAll("input[name="+JSON.stringify(""+g)+'][type="radio"]'),g=0;g<j.length;g++){var P=j[g];if(P!==h&&P.form===h.form){var M=Wm(P);if(!M)throw Error(n(90));oe(P),pt(P,M)}}}break;case"textarea":bt(h,j);break;case"select":g=j.value,g!=null&&Be(h,!!j.multiple,g,!1)}},aC=yw,oC=_l;var rZ={usingClientEntryPoint:!1,Events:[Nf,Wc,Wm,iC,sC,yw]},$f={findFiberByHostInstance:yl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},iZ={bundleType:$f.bundleType,version:$f.version,rendererPackageName:$f.rendererPackageName,rendererConfig:$f.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(h){return h=dC(h),h===null?null:h.stateNode},findFiberByHostInstance:$f.findFiberByHostInstance||tZ,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 Og=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Og.isDisabled&&Og.supportsFiber)try{Em=Og.inject(iZ),Bs=Og}catch{}}return ri.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rZ,ri.createPortal=function(h,g){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ew(g))throw Error(n(200));return eZ(h,g,null,j)},ri.createRoot=function(h,g){if(!Ew(h))throw Error(n(299));var j=!1,P="",M=$R;return g!=null&&(g.unstable_strictMode===!0&&(j=!0),g.identifierPrefix!==void 0&&(P=g.identifierPrefix),g.onRecoverableError!==void 0&&(M=g.onRecoverableError)),g=Sw(h,1,!1,null,null,j,!1,P,M),h[pa]=g.current,wf(h.nodeType===8?h.parentNode:h),new _w(g)},ri.findDOMNode=function(h){if(h==null)return null;if(h.nodeType===1)return h;var g=h._reactInternals;if(g===void 0)throw typeof h.render=="function"?Error(n(188)):(h=Object.keys(h).join(","),Error(n(268,h)));return h=dC(g),h=h===null?null:h.stateNode,h},ri.flushSync=function(h){return _l(h)},ri.hydrate=function(h,g,j){if(!Pg(g))throw Error(n(200));return kg(null,h,g,!0,j)},ri.hydrateRoot=function(h,g,j){if(!Ew(h))throw Error(n(405));var P=j!=null&&j.hydratedSources||null,M=!1,B="",K=$R;if(j!=null&&(j.unstable_strictMode===!0&&(M=!0),j.identifierPrefix!==void 0&&(B=j.identifierPrefix),j.onRecoverableError!==void 0&&(K=j.onRecoverableError)),g=DR(g,null,h,1,j??null,M,!1,B,K),h[pa]=g.current,wf(h),P)for(h=0;h<P.length;h++)j=P[h],M=j._getVersion,M=M(j._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[j,M]:g.mutableSourceEagerHydrationData.push(j,M);return new Eg(g)},ri.render=function(h,g,j){if(!Pg(g))throw Error(n(200));return kg(null,h,g,!1,j)},ri.unmountComponentAtNode=function(h){if(!Pg(h))throw Error(n(40));return h._reactRootContainer?(_l(function(){kg(null,null,h,!1,function(){h._reactRootContainer=null,h[pa]=null})}),!0):!1},ri.unstable_batchedUpdates=yw,ri.unstable_renderSubtreeIntoContainer=function(h,g,j,P){if(!Pg(j))throw Error(n(200));if(h==null||h._reactInternals===void 0)throw Error(n(38));return kg(h,g,j,!1,P)},ri.version="18.3.1-next-f1338f8080-20240426",ri}var KR;function Kk(){if(KR)return Aw.exports;
40KR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Aw.exports=fZ(),Aw.exports}var YR;function hZ(){if(YR)return Tg;YR=1;var e=Kk();return Tg.createRoot=e.createRoot,Tg.hydrateRoot=e.hydrateRoot,Tg}var pZ=hZ();const mZ=Lt(pZ),gZ=20,yZ=1e6,Aa={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Rw=0;function vZ(){return Rw=(Rw+1)%Number.MAX_VALUE,Rw.toString()}const Iw=new Map,XR=e=>{if(Iw.has(e))return;const t=setTimeout(()=>{Iw.delete(e),jh({type:Aa.REMOVE_TOAST,toastId:e})},yZ);Iw.set(e,t)},xZ=(e,t)=>{switch(t.type){case Aa.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,gZ)};case Aa.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Aa.DISMISS_TOAST:{const{toastId:n}=t;return n?XR(n):e.toasts.forEach(r=>{XR(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case Aa.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},by=[];let wy={toasts:[]};function jh(e){wy=xZ(wy,e),by.forEach(t=>{t(wy)})}function bZ({...e}){const t=vZ(),n=i=>jh({type:Aa.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>jh({type:Aa.DISMISS_TOAST,toastId:t});return jh({type:Aa.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function wZ(){const[e,t]=T.useState(wy);return T.useEffect(()=>(by.push(t),()=>{const n=by.indexOf(t);n>-1&&by.splice(n,1)}),[e]),{...e,toast:bZ,dismiss:n=>jh({type:Aa.DISMISS_TOAST,toastId:n})}}function Gq(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=Gq(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function St(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Gq(e))&&(r&&(r+=" "),r+=t);return r}const QR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ZR=St,Yp=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ZR(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],f=s==null?void 0:s[u];if(d===null)return null;const p=QR(d)||QR(f);return i[u][p]}),l=n&&Object.entries(n).reduce((u,d)=>{let[f,p]=d;return p===void 0||(u[f]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(x=>{let[y,v]=x;return Array.isArray(v)?v.includes({...s,...l}[y]):{...s,...l}[y]===v})?[...u,f,p]:u},[]);return ZR(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.475.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const jZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kq=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.475.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var SZ={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"};/** 51 * @license lucide-react v0.475.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const NZ=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...l},c)=>T.createElement("svg",{ref:c,...SZ,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Kq("lucide",i),...l},[...o.map(([u,d])=>T.createElement(u,d)),...Array.isArray(s)?s:[s]]));/** 56 * @license lucide-react v0.475.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Ce=(e,t)=>{const n=T.forwardRef(({className:r,...i},s)=>T.createElement(NZ,{ref:s,iconNode:t,className:Kq(`lucide-${jZ(e)}`,r),...i}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.475.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const _Z=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],EZ=Ce("AlignLeft",_Z);/** 66 * @license lucide-react v0.475.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const PZ=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],kZ=Ce("ArrowDownToLine",PZ);/** 71 * @license lucide-react v0.475.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const OZ=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Yq=Ce("ArrowDown",OZ);/** 76 * @license lucide-react v0.475.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const AZ=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],rl=Ce("ArrowLeft",AZ);/** 81 * @license lucide-react v0.475.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const CZ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Sh=Ce("ArrowRight",CZ);/** 86 * @license lucide-react v0.475.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const TZ=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Xq=Ce("ArrowUp",TZ);/** 91 * @license lucide-react v0.475.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const RZ=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Qq=Ce("BookOpen",RZ);/** 96 * @license lucide-react v0.475.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const IZ=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],X_=Ce("Brain",IZ);/** 101 * @license lucide-react v0.475.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const MZ=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],DZ=Ce("CalendarDays",MZ);/** 106 * @license lucide-react v0.475.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const LZ=[["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"}]],Yr=Ce("Calendar",LZ);/** 111 * @license lucide-react v0.475.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const $Z=[["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"}]],Zq=Ce("ChartColumn",$Z);/** 116 * @license lucide-react v0.475.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const BZ=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],Fa=Ce("ChartNoAxesColumn",BZ);/** 121 * @license lucide-react v0.475.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const FZ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Nh=Ce("Check",FZ);/** 126 * @license lucide-react v0.475.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const qZ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wx=Ce("ChevronDown",qZ);/** 131 * @license lucide-react v0.475.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const zZ=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],UZ=Ce("ChevronLeft",zZ);/** 136 * @license lucide-react v0.475.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const VZ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Yk=Ce("ChevronRight",VZ);/** 141 * @license lucide-react v0.475.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const WZ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Xk=Ce("ChevronUp",WZ);/** 146 * @license lucide-react v0.475.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const HZ=[["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"}]],Kr=Ce("CircleAlert",HZ);/** 151 * @license lucide-react v0.475.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const GZ=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Cn=Ce("CircleCheckBig",GZ);/** 156 * @license lucide-react v0.475.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const KZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],_n=Ce("CircleCheck",KZ);/** 161 * @license lucide-react v0.475.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const YZ=[["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"}]],As=Ce("CircleX",YZ);/** 166 * @license lucide-react v0.475.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const XZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Rn=Ce("Clock",XZ);/** 171 * @license lucide-react v0.475.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const QZ=[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]],ZZ=Ce("Code",QZ);/** 176 * @license lucide-react v0.475.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const JZ=[["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"}]],or=Ce("Copy",JZ);/** 181 * @license lucide-react v0.475.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const eJ=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],Qk=Ce("Crown",eJ);/** 186 * @license lucide-react v0.475.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const tJ=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],qy=Ce("DollarSign",tJ);/** 191 * @license lucide-react v0.475.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const nJ=[["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"}]],Gu=Ce("ExternalLink",nJ);/** 196 * @license lucide-react v0.475.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const rJ=[["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"}]],Rg=Ce("EyeOff",rJ);/** 201 * @license lucide-react v0.475.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const iJ=[["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"}]],Qn=Ce("Eye",iJ);/** 206 * @license lucide-react v0.475.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const sJ=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Jq=Ce("Facebook",sJ);/** 211 * @license lucide-react v0.475.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const aJ=[["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"}]],os=Ce("FileText",aJ);/** 216 * @license lucide-react v0.475.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const oJ=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],lJ=Ce("Flag",oJ);/** 221 * @license lucide-react v0.475.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const cJ=[["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"}]],uJ=Ce("Flame",cJ);/** 226 * @license lucide-react v0.475.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of th
229is source tree. 230 */const dJ=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],JR=Ce("GitCompare",dJ);/** 231 * @license lucide-react v0.475.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const fJ=[["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"}]],e8=Ce("Globe",fJ);/** 236 * @license lucide-react v0.475.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const hJ=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],pJ=Ce("GripVertical",hJ);/** 241 * @license lucide-react v0.475.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const mJ=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],t8=Ce("Hash",mJ);/** 246 * @license lucide-react v0.475.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const gJ=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],yJ=Ce("History",gJ);/** 251 * @license lucide-react v0.475.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const vJ=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],eI=Ce("Inbox",vJ);/** 256 * @license lucide-react v0.475.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const xJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Q_=Ce("Info",xJ);/** 261 * @license lucide-react v0.475.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const bJ=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],wJ=Ce("LayoutDashboard",bJ);/** 266 * @license lucide-react v0.475.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const jJ=[["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"}]],zy=Ce("Lightbulb",jJ);/** 271 * @license lucide-react v0.475.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const SJ=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],tI=Ce("Link2",SJ);/** 276 * @license lucide-react v0.475.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const NJ=[["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"}]],Z_=Ce("Link",NJ);/** 281 * @license lucide-react v0.475.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const _J=[["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"}]],sc=Ce("Linkedin",_J);/** 286 * @license lucide-react v0.475.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const EJ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lt=Ce("LoaderCircle",EJ);/** 291 * @license lucide-react v0.475.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const PJ=[["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"}]],kJ=Ce("Lock",PJ);/** 296 * @license lucide-react v0.475.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const OJ=[["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"}]],AJ=Ce("LogOut",OJ);/** 301 * @license lucide-react v0.475.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const CJ=[["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"}]],xr=Ce("Mail",CJ);/** 306 * @license lucide-react v0.475.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const TJ=[["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"}]],RJ=Ce("MapPin",TJ);
310/** 311 * @license lucide-react v0.475.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const IJ=[["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"}]],MJ=Ce("Menu",IJ);/** 316 * @license lucide-react v0.475.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const DJ=[["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"}]],li=Ce("MessageSquare",DJ);/** 321 * @license lucide-react v0.475.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const LJ=[["path",{d:"M5 12h14",key:"1ays0h"}]],$J=Ce("Minus",LJ);/** 326 * @license lucide-react v0.475.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const BJ=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],FJ=Ce("Monitor",BJ);/** 331 * @license lucide-react v0.475.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const qJ=[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]],n8=Ce("MousePointer",qJ);/** 336 * @license lucide-react v0.475.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const zJ=[["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"}]],UJ=Ce("Newspaper",zJ);/** 341 * @license lucide-react v0.475.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const VJ=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],r8=Ce("PenLine",VJ);/** 346 * @license lucide-react v0.475.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const WJ=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],J_=Ce("PenTool",WJ);/** 351 * @license lucide-react v0.475.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const HJ=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],nI=Ce("Play",HJ);/** 356 * @license lucide-react v0.475.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const GJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Yo=Ce("Plus",GJ);/** 361 * @license lucide-react v0.475.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const KJ=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],i8=Ce("Radio",KJ);/** 366 * @license lucide-react v0.475.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const YJ=[["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"}]],ss=Ce("RefreshCw",YJ);/** 371 * @license lucide-react v0.475.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const XJ=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],QJ=Ce("RotateCcw",XJ);/** 376 * @license lucide-react v0.475.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const ZJ=[["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"}]],s8=Ce("Save",ZJ);/** 381 * @license lucide-react v0.475.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const JJ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],lr=Ce("Search",JJ);
385/** 386 * @license lucide-react v0.475.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const eee=[["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"}]],ci=Ce("Send",eee);/** 391 * @license lucide-react v0.475.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const tee=[["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"}]],Uy=Ce("Settings",tee);/** 396 * @license lucide-react v0.475.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const nee=[["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"}]],Ad=Ce("Share2",nee);/** 401 * @license lucide-react v0.475.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const ree=[["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:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],a8=Ce("ShieldAlert",ree);/** 406 * @license lucide-react v0.475.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const iee=[["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"}]],o8=Ce("ShieldCheck",iee);/** 411 * @license lucide-react v0.475.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const see=[["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"}]],l8=Ce("Shield",see);/** 416 * @license lucide-react v0.475.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const aee=[["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"}]],Ct=Ce("Sparkles",aee);/** 421 * @license lucide-react v0.475.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const oee=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],c8=Ce("SquarePen",oee);/** 426 * @license lucide-react v0.475.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const lee=[["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"}]],u8=Ce("Star",lee);
430/** 431 * @license lucide-react v0.475.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const cee=[["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"}]],d8=Ce("Tag",cee);/** 436 * @license lucide-react v0.475.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const uee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],dc=Ce("Target",uee);/** 441 * @license lucide-react v0.475.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const dee=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],fee=Ce("TestTube",dee);/** 446 * @license lucide-react v0.475.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const hee=[["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"}]],qa=Ce("Trash2",hee);/** 451 * @license lucide-react v0.475.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const pee=[["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"}]],Zk=Ce("TrendingDown",pee);/** 456 * @license lucide-react v0.475.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const mee=[["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"}]],Xr=Ce("TrendingUp",mee);/** 461 * @license lucide-react v0.475.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const gee=[["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"}]],rI=Ce("TriangleAlert",gee);/** 466 * @license lucide-react v0.475.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const yee=[["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"}]],Mw=Ce("Trophy",yee);/** 471 * @license lucide-react v0.475.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const vee=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],Ku=Ce("Twitter",vee);/** 476 * @license lucide-react v0.475.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const xee=[["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"}]],iI=Ce("Upload",xee);/** 481 * @license lucide-react v0.475.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const bee=[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],sI=Ce("UserPlus",bee);/** 486 * @license lucide-react v0.475.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const wee=[["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"}]],jee=Ce("User",wee);/** 491 * @license lucide-react v0.475.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const See=[["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"}]],Is=Ce("Users",See);/** 496 * @license lucide-react v0.475.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const Nee=[["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"}]],f8=Ce("Video",Nee);/** 501 * @license lucide-react v0.475.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const _ee=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}
vendor: 5,445 bytes, lines 505-515
505]],Tr=Ce("WandSparkles",_ee);/** 506 * @license lucide-react v0.475.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const Eee=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jx=Ce("X",Eee);/** 511 * @license lucide-react v0.475.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const Pee=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],zh=Ce("Zap",Pee),Jk="-",kee=e=>{const t=Aee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Jk);return l[0]===""&&l.length!==1&&l.shift(),h8(l,t)||Oee(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},h8=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?h8(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Jk);return(o=t.validators.find(({validator:l})=>l(s)))==null?void 0:o.classGroupId},aI=/^\[(.+)\]$/,Oee=e=>{if(aI.test(e)){const t=aI.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Aee=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)eE(n[i],r,i,t);return r},eE=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const s=i===""?t:oI(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(Cee(i)){eE(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{eE(o,oI(t,s),n,r)})})},oI=(e,t)=>{let n=e;return t.split(Jk).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Cee=e=>e.isThemeGetter,Tee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},tE="!",nE=":",Ree=nE.length,Iee=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let o=0,l=0,c=0,u;for(let x=0;x<i.length;x++){let y=i[x];if(o===0&&l===0){if(y===nE){s.push(i.slice(c,x)),c=x+Ree;continue}if(y==="/"){u=x;continue}}y==="["?o++:y==="]"?o--:y==="("?l++:y===")"&&l--}const d=s.length===0?i:i.substring(c),f=Mee(d),p=f!==d,m=u&&u>c?u-c:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:m}};if(t){const i=t+nE,s=r;r=o=>o.startsWith(i)?s(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},Mee=e=>e.endsWith(tE)?e.substring(0,e.length-1):e.startsWith(tE)?e.substring(1):e,Dee=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let s=[];return r.forEach(o=>{o[0]==="["||t[o]?(i.push(...s.sort(),o),s=[]):s.push(o)}),i.push(...s.sort()),i}},Lee=e=>({cache:Tee(e.cacheSize),parseClassName:Iee(e),sortModifiers:Dee(e),...kee(e)}),$ee=/\s+/,Bee=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,o=[],l=e.trim().split($ee);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:x,maybePostfixModifierPosition:y}=n(d);if(f){c=d+(c.length>0?" "+c:c);continue}let v=!!y,b=r(v?x.substring(0,y):x);if(!b){if(!v){c=d+(c.length>0?" "+c:c);continue}if(b=r(x),!b){c=d+(c.length>0?" "+c:c);continue}v=!1}const w=s(p).join(":"),N=m?w+tE:w,S=N+b;if(o.includes(S))continue;o.push(S);const _=i(b,v);for(let E=0;E<_.length;++E){const k=_[E];o.push(N+k)}c=d+(c.length>0?" "+c:c)}return c};function Fee(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=p8(t))&&(r&&(r+=" "),r+=n);return r}const p8=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=p8(e[r]))&&(n&&(n+=" "),n+=t);return n};function qee(e,...t){let n,r,i,s=o;function o(c){const u=t.reduce((d,f)=>f(d),e());return n=Lee(u),r=n.cache.get,i=n.cache.set,s=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=Bee(c,n);return i(c,d),d}return function(){return s(Fee.apply(null,arguments))}}const Hn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},m8=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,g8=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zee=/^\d+\/\d+$/,Uee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vee=/\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$/,Wee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,au=e=>zee.test(e),kt=e=>!!e&&!Number.isNaN(Number(e)),jo=e=>!!e&&Number.isInteger(Number(e)),Dw=e=>e.endsWith("%")&&kt(e.slice(0,-1)),ja=e=>Uee.test(e),Kee=()=>!0,Yee=e=>Vee.test(e)&&!Wee.test(e),y8=()=>!1,Xee=e=>Hee.test(e),Qee=e=>Gee.test(e),Zee=e=>!Ge(e)&&!Ke(e),Jee=e=>Cd(e,b8,y8),Ge=e=>m8.test(e),Ol=e=>Cd(e,w8,Yee),Lw=e=>Cd(e,ite,kt),lI=e=>Cd(e,v8,y8),ete=e=>Cd(e,x8,Qee),Ig=e=>Cd(e,j8,Xee),Ke=e=>g8.test(e),Ff=e=>Td(e,w8),tte=e=>
vendor: 4,581 bytes, line 515
515Td(e,ste),cI=e=>Td(e,v8),nte=e=>Td(e,b8),rte=e=>Td(e,x8),Mg=e=>Td(e,j8,!0),Cd=(e,t,n)=>{const r=m8.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Td=(e,t,n=!1)=>{const r=g8.exec(e);return r?r[1]?t(r[1]):n:!1},v8=e=>e==="position"||e==="percentage",x8=e=>e==="image"||e==="url",b8=e=>e==="length"||e==="size"||e==="bg-size",w8=e=>e==="length",ite=e=>e==="number",ste=e=>e==="family-name",j8=e=>e==="shadow",ate=()=>{const e=Hn("color"),t=Hn("font"),n=Hn("text"),r=Hn("font-weight"),i=Hn("tracking"),s=Hn("leading"),o=Hn("breakpoint"),l=Hn("container"),c=Hn("spacing"),u=Hn("radius"),d=Hn("shadow"),f=Hn("inset-shadow"),p=Hn("text-shadow"),m=Hn("drop-shadow"),x=Hn("blur"),y=Hn("perspective"),v=Hn("aspect"),b=Hn("ease"),w=Hn("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...S(),Ke,Ge],E=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],O=()=>[Ke,Ge,c],I=()=>[au,"full","auto",...O()],A=()=>[jo,"none","subgrid",Ke,Ge],C=()=>["auto",{span:["full",jo,Ke,Ge]},jo,Ke,Ge],R=()=>[jo,"auto",Ke,Ge],D=()=>["auto","min","max","fr",Ke,Ge],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],H=()=>["auto",...O()],U=()=>[au,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],W=()=>[e,Ke,Ge],G=()=>[...S(),cI,lI,{position:[Ke,Ge]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",nte,Jee,{size:[Ke,Ge]}],V=()=>[Dw,Ff,Ol],z=()=>["","none","full",u,Ke,Ge],Q=()=>["",kt,Ff,Ol],J=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[kt,Dw,cI,lI],ne=()=>["","none",x,Ke,Ge],Z=()=>["none",kt,Ke,Ge],se=()=>["none",kt,Ke,Ge],pe=()=>[kt,Ke,Ge],oe=()=>[au,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ja],breakpoint:[ja],color:[Kee],container:[ja],"drop-shadow":[ja],ease:["in","out","in-out"],font:[Zee],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ja],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ja],shadow:[ja],spacing:["px",kt],text:[ja],"text-shadow":[ja],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",au,Ge,Ke,v]}],container:["container"],columns:[{columns:[kt,Ge,Ke,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[jo,"auto",Ke,Ge]}],basis:[{basis:[au,"full","auto",l,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kt,au,"auto","initial","none",Ge]}],grow:[{grow:["",kt,Ke,Ge]}],shrink:[{shrink:["",kt,Ke,Ge]}],order:[{order:[jo,"first","last","none",Ke,Ge]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":R()}
vendor: 11,010 bytes, line 515
515],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:H()}],mx:[{mx:H()}],my:[{my:H()}],ms:[{ms:H()}],me:[{me:H()}],mt:[{mt:H()}],mr:[{mr:H()}],mb:[{mb:H()}],ml:[{ml:H()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[l,"screen",...U()]}],"min-w":[{"min-w":[l,"screen","none",...U()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,Ff,Ol]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ke,Lw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Dw,Ge]}],"font-family":[{font:[tte,Ge,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ke,Ge]}],"line-clamp":[{"line-clamp":[kt,"none",Ke,Lw]}],leading:[{leading:[s,...O()]}],"list-image":[{"list-image":["none",Ke,Ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ke,Ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[kt,"from-font","auto",Ke,Ol]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[kt,"auto",Ke,Ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ke,Ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ke,Ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:G()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jo,Ke,Ge],radial:["",Ke,Ge],conic:[jo,Ke,Ge]},rte,ete]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:V()}],"gradient-via-pos":[{via:V()}],"gradient-to-pos":[{to:V()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kt,Ke,Ge]}],"outline-w":[{outline:["",kt,Ff,Ol]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",d,Mg,Ig]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",f,Mg,Ig]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[kt,Ol]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",p,Mg,Ig]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[kt,Ke,Ge]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[kt]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[Ke,Ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[kt]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:G()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ke,Ge]}],filter:[{filter:["","none",Ke,Ge]}],blur:[{blur:ne()}],brightness:[{brightness:[kt,Ke,Ge]}],contrast:[{contrast:[kt,Ke,Ge]}],"drop-shadow":[{"drop-shadow":["","none",m,Mg,Ig]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",kt,Ke,Ge]}],"hue-rotate":[{"hue-rotate":[kt,Ke,Ge]}],invert:[{invert:["",kt,Ke,Ge]}],saturate:[{saturate:[kt,Ke,Ge]}],sepia:[{sepia:["",kt,Ke,Ge]}],"backdrop-filter":[{"backdrop-filter":["","none",Ke,Ge]}],"backdrop-blur":[{"backdrop-blur":ne()}],"backdrop-brightness":[{"backdrop-brightness":[kt,Ke,Ge]}],"backdrop-contrast":[{"backdrop-contrast":[kt,Ke,Ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kt,Ke,Ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kt,Ke,Ge]}],"backdrop-invert":[{"backdrop-invert":["",kt,Ke,Ge]}],"backdrop-opacity":[{"backdrop-opacity":[kt,Ke,Ge]}],"backdrop-saturate":[{"backdrop-saturate":[kt,Ke,Ge]}],"backdrop-sepia":[{"backdrop-sepia":["",kt,Ke,Ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ke,Ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kt,"initial",Ke,Ge]}],ease:[{ease:["linear","initial",b,Ke,Ge]}],delay:[{delay:[kt,Ke,Ge]}],animate:[{animate:["none",w,Ke,Ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Ke,Ge]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Z()}],"rotate-x":[{"rotate-x":Z()}],"rotate-y":[{"rotate-y":Z()}],"rotate-z":[{"rotate-z":Z()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Ke,Ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:oe()}],"translate-x":[{"translate-x":oe()}],"translate-y":[{"translate-y":oe()}],"translate-z":[{"translate-z":oe()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}
vendor: 6,663 bytes, line 515
515],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ke,Ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",Ke,Ge]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[kt,Ff,Ol,Lw]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},S8=qee(ate);function Ot(...e){return S8(St(e))}const N8=T.forwardRef(({...e},t)=>a.jsx("div",{ref:t,className:"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}));N8.displayName="ToastProvider";const _8=T.forwardRef(({...e},t)=>a.jsx("div",{ref:t,className:"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}));_8.displayName="ToastViewport";const ote=Yp("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"}}),E8=T.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,className:Ot(ote({variant:t}),e),...n}));E8.displayName="Toast";const lte=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));lte.displayName="ToastAction";const P8=T.forwardRef(({className:e,...t},n)=>a.jsx("button",{ref:n,className:Ot("absolute right-2 top-2 rounded-md p-1 text-foreground
515/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(jx,{className:"h-4 w-4"})}));P8.displayName="ToastClose";const k8=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("text-sm font-semibold",e),...t}));k8.displayName="ToastTitle";const O8=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("text-sm opacity-90",e),...t}));O8.displayName="ToastDescription";function cte(){const{toasts:e}=wZ();return a.jsxs(N8,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return a.jsxs(E8,{...s,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(k8,{children:n}),r&&a.jsx(O8,{children:r})]}),i,a.jsx(P8,{})]},t)}),a.jsx(_8,{})]})}var Rd=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(){}},ute={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ao,Hk,Dq,dte=(Dq=class{constructor(){nt(this,Ao,ute);nt(this,Hk,!1)}setTimeoutProvider(e){qe(this,Ao,e)}setTimeout(e,t){return re(this,Ao).setTimeout(e,t)}clearTimeout(e){re(this,Ao).clearTimeout(e)}setInterval(e,t){return re(this,Ao).setInterval(e,t)}clearInterval(e){re(this,Ao).clearInterval(e)}},Ao=new WeakMap,Hk=new WeakMap,Dq),Ul=new dte;function fte(e){setTimeout(e,0)}var fc=typeof window>"u"||"Deno"in globalThis;function Vr(){}function hte(e,t){return typeof e=="function"?e(t):e}function rE(e){return typeof e=="number"&&e>=0&&e!==1/0}function A8(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zo(e,t){return typeof e=="function"?e(t):e}function Ji(e,t){return typeof e=="function"?e(t):e}function uI(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==eO(o,t.options))return!1}else if(!Uh(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||s&&!s(t))}function dI(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(hc(t.options.mutationKey)!==hc(s))return!1}else if(!Uh(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function eO(e,t){return((t==null?void 0:t.queryKeyHashFn)||hc)(e)}function hc(e){return JSON.stringify(e,(t,n)=>iE(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Uh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Uh(e[n],t[n])):!1}var pte=Object.prototype.hasOwnProperty;function C8(e,t){if(e===t)return e;const n=fI(e)&&fI(t);if(!n&&!(iE(e)&&iE(t)))return t;const i=(n?e:Object.keys(e)).length,s=n?t:Object.keys(t),o=s.length,l=n?new Array(o):{};let c=0;for(let u=0;u<o;u++){const d=n?u:s[u],f=e[d],p=t[d];if(f===p){l[d]=f,(n?u<i:pte.call(e,d))&&c++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){l[d]=p;continue}const m=C8(f,p);l[d]=m,m===f&&c++}return i===o&&c===i?e:l}function Vy(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 fI(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function iE(e){if(!hI(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!hI(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function hI(e){return Object.prototype.toString.call(e)==="[object Object]"}function mte(e){return new Promise(t=>{Ul.setTimeout(t,e)})}function sE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?C8(e,t):t}function gte(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function yte(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var tO=Symbol();function T8(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===tO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function R8(e,t){return typeof e=="function"?e(...t):!!e}var Xl,Co,Mu,Lq,vte=(Lq=class extends Rd{constructor(){super();nt(this,Xl);nt(this,Co);nt(this,Mu);qe(this,Mu,t=>{if(!fc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){re(this,Co)||this.setEventListener(re(this,Mu))}onUnsubscribe(){var t;this.hasListeners()||((t=re(this,Co))==null||t.call(this),qe(this,Co,void 0))}setEventListener(t){var n;qe(this,Mu,t),(n=re(this,Co))==null||n.call(this),qe(this,Co,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){re(this,Xl)!==t&&(qe(this,Xl,t),this.onFocus())}onFocus(){const t=this.isFocused();
515this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof re(this,Xl)=="boolean"?re(this,Xl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Xl=new WeakMap,Co=new WeakMap,Mu=new WeakMap,Lq),nO=new vte;function aE(){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}var xte=fte;function bte(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=xte;const s=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{s(()=>{l(...c)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var Yn=bte(),Du,To,Lu,$q,wte=($q=class extends Rd{constructor(){super();nt(this,Du,!0);nt(this,To);nt(this,Lu);qe(this,Lu,t=>{if(!fc&&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(){re(this,To)||this.setEventListener(re(this,Lu))}onUnsubscribe(){var t;this.hasListeners()||((t=re(this,To))==null||t.call(this),qe(this,To,void 0))}setEventListener(t){var n;qe(this,Lu,t),(n=re(this,To))==null||n.call(this),qe(this,To,t(this.setOnline.bind(this)))}setOnline(t){re(this,Du)!==t&&(qe(this,Du,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return re(this,Du)}},Du=new WeakMap,To=new WeakMap,Lu=new WeakMap,$q),Wy=new wte;function jte(e){return Math.min(1e3*2**e,3e4)}function I8(e){return(e??"online")==="online"?Wy.isOnline():!0}var oE=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function M8(e){let t=!1,n=0,r;const i=aE(),s=()=>i.status!=="pending",o=y=>{var v;if(!s()){const b=new oE(y);p(b),(v=e.onCancel)==null||v.call(e,b)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>nO.isFocused()&&(e.networkMode==="always"||Wy.isOnline())&&e.canRun(),d=()=>I8(e.networkMode)&&e.canRun(),f=y=>{s()||(r==null||r(),i.resolve(y))},p=y=>{s()||(r==null||r(),i.reject(y))},m=()=>new Promise(y=>{var v;r=b=>{(s()||u())&&y(b)},(v=e.onPause)==null||v.call(e)}).then(()=>{var y;r=void 0,s()||(y=e.onContinue)==null||y.call(e)}),x=()=>{if(s())return;let y;const v=n===0?e.initialPromise:void 0;try{y=v??e.fn()}catch(b){y=Promise.reject(b)}Promise.resolve(y).then(f).catch(b=>{var E;if(s())return;const w=e.retry??(fc?0:3),N=e.retryDelay??jte,S=typeof N=="function"?N(n,b):N,_=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(t||!_){p(b);return}n++,(E=e.onFail)==null||E.call(e,n,b),mte(S).then(()=>u()?void 0:m()).then(()=>{t?p(b):x()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?x():m().then(x),i)}}var Ql,Bq,D8=(Bq=class{constructor(){nt(this,Ql)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rE(this.gcTime)&&qe(this,Ql,Ul.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fc?1/0:300*1e3))}clearGcTimeout(){re(this,Ql)&&(Ul.clearTimeout(re(this,Ql)),qe(this,Ql,void 0))}},Ql=new WeakMap,Bq),Zl,$u,Zi,Jl,ir,Up,ec,js,Na,Fq,Ste=(Fq=class extends D8{constructor(t){super();nt(this,js);nt(this,Zl);nt(this,$u);nt(this,Zi);nt(this,Jl);nt(this,ir);nt(this,Up);nt(this,ec);qe(this,ec,!1),qe(this,Up,t.defaultOptions),this.setOptions(t.options),this.observers=[],qe(this,Jl,t.client),qe(this,Zi,re(this,Jl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,qe(this,Zl,pI(this.options)),this.state=t.state??re(this,Zl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=re(this,ir))==null?void 0:t.promise}setOptions(t){if(this.options={...re(this,Up),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=pI(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),qe(this,Zl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&re(this,Zi).remove(this)}setData(t,n){const r=sE(this.state.data,t,this.options);return Pt(this,js,Na).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Pt(this,js,Na).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=re(this,ir))==null?void 0:r.promise;return(i=re(this,ir))==null||i.cancel(t),n?n.then(Vr).catch(Vr):Prom
515ise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(re(this,Zl))}isActive(){return this.observers.some(t=>Ji(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===tO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>zo(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:!A8(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=re(this,ir))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=re(this,ir))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),re(this,Zi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(re(this,ir)&&(re(this,ec)?re(this,ir).cancel({revert:!0}):re(this,ir).cancelRetry()),this.scheduleGc()),re(this,Zi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pt(this,js,Na).call(this,{type:"invalidate"})}async fetch(t,n){var c,u,d,f,p,m,x,y,v,b,w,N;if(this.state.fetchStatus!=="idle"&&((c=re(this,ir))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(re(this,ir))return re(this,ir).continueRetry(),re(this,ir).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(_=>_.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,i=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(qe(this,ec,!0),r.signal)})},s=()=>{const S=T8(this.options,n),E=(()=>{const k={client:re(this,Jl),queryKey:this.queryKey,meta:this.meta};return i(k),k})();return qe(this,ec,!1),this.options.persister?this.options.persister(S,E,this):S(E)},l=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:re(this,Jl),state:this.state,fetchFn:s};return i(S),S})();(u=this.options.behavior)==null||u.onFetch(l,this),qe(this,$u,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Pt(this,js,Na).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta}),qe(this,ir,M8({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:S=>{S instanceof oE&&S.revert&&this.setState({...re(this,$u),fetchStatus:"idle"}),r.abort()},onFail:(S,_)=>{Pt(this,js,Na).call(this,{type:"failed",failureCount:S,error:_})},onPause:()=>{Pt(this,js,Na).call(this,{type:"pause"})},onContinue:()=>{Pt(this,js,Na).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const S=await re(this,ir).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(m=(p=re(this,Zi).config).onSuccess)==null||m.call(p,S,this),(y=(x=re(this,Zi).config).onSettled)==null||y.call(x,S,this.state.error,this),S}catch(S){if(S instanceof oE){if(S.silent)return re(this,ir).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw Pt(this,js,Na).call(this,{type:"error",error:S}),(b=(v=re(this,Zi).config).onError)==null||b.call(v,S,this),(N=(w=re(this,Zi).config).onSettled)==null||N.call(w,this.state.data,S,this),S}finally{this.scheduleGc()}}},Zl=new WeakMap,$u=new WeakMap,Zi=new WeakMap,Jl=new WeakMap,ir=new WeakMap,Up=new WeakMap,ec=new WeakMap,js=new WeakSet,Na=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,...L8(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...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}};return qe(this,$u,t.manual?i:void 0),i;case"error":const s=t.error;
vendor: 13,859 bytes, line 515
515return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Yn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),re(this,Zi).notify({query:this,type:"updated",action:t})})},Fq);function L8(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I8(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function pI(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 si,Rt,Vp,zr,tc,Bu,Ea,Ro,Wp,Fu,qu,nc,rc,Io,zu,Gt,dh,lE,cE,uE,dE,fE,hE,pE,$8,qq,Nte=(qq=class extends Rd{constructor(t,n){super();nt(this,Gt);nt(this,si);nt(this,Rt);nt(this,Vp);nt(this,zr);nt(this,tc);nt(this,Bu);nt(this,Ea);nt(this,Ro);nt(this,Wp);nt(this,Fu);nt(this,qu);nt(this,nc);nt(this,rc);nt(this,Io);nt(this,zu,new Set);this.options=n,qe(this,si,t),qe(this,Ro,null),qe(this,Ea,aE()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(re(this,Rt).addObserver(this),mI(re(this,Rt),this.options)?Pt(this,Gt,dh).call(this):this.updateResult(),Pt(this,Gt,dE).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mE(re(this,Rt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mE(re(this,Rt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pt(this,Gt,fE).call(this),Pt(this,Gt,hE).call(this),re(this,Rt).removeObserver(this)}setOptions(t){const n=this.options,r=re(this,Rt);if(this.options=re(this,si).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ji(this.options.enabled,re(this,Rt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pt(this,Gt,pE).call(this),re(this,Rt).setOptions(this.options),n._defaulted&&!Vy(this.options,n)&&re(this,si).getQueryCache().notify({type:"observerOptionsUpdated",query:re(this,Rt),observer:this});const i=this.hasListeners();i&&gI(re(this,Rt),r,this.options,n)&&Pt(this,Gt,dh).call(this),this.updateResult(),i&&(re(this,Rt)!==r||Ji(this.options.enabled,re(this,Rt))!==Ji(n.enabled,re(this,Rt))||zo(this.options.staleTime,re(this,Rt))!==zo(n.staleTime,re(this,Rt)))&&Pt(this,Gt,lE).call(this);const s=Pt(this,Gt,cE).call(this);i&&(re(this,Rt)!==r||Ji(this.options.enabled,re(this,Rt))!==Ji(n.enabled,re(this,Rt))||s!==re(this,Io))&&Pt(this,Gt,uE).call(this,s)}getOptimisticResult(t){const n=re(this,si).getQueryCache().build(re(this,si),t),r=this.createResult(n,t);return Ete(this,r)&&(qe(this,zr,r),qe(this,Bu,this.options),qe(this,tc,re(this,Rt).state)),r}getCurrentResult(){return re(this,zr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&re(this,Ea).status==="pending"&&re(this,Ea).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){re(this,zu).add(t)}getCurrentQuery(){return re(this,Rt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=re(this,si).defaultQueryOptions(t),r=re(this,si).getQueryCache().build(re(this,si),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Pt(this,Gt,dh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),re(this,zr)))}createResult(t,n){var I;const r=re(this,Rt),i=this.options,s=re(this,zr),o=re(this,tc),l=re(this,Bu),u=t!==r?t.state:re(this,Vp),{state:d}=t;let f={...d},p=!1,m;if(n._optimisticResults){const A=this.hasListeners(),C=!A&&mI(t,n),R=A&&gI(t,r,n,i);(C||R)&&(f={...f,...L8(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:x,errorUpdatedAt:y,status:v}=f;m=f.data;let b=!1;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let A;s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(A=s.data,b=!0):A=typeof n.placeholderData=="function"?n.placeholderData((I=re(this,qu))==null?void 0:I.state.data,re(this,qu)):n.placeholderData,A!==void 0&&(v="success",m=sE(s==null?void 0:s.data,A,n),p=!0)}if(n.select&&m!==void 0&&!b)if(s&&m===(o==null?void 0:o.data)&&n.select===re(this,Wp))m=re(this,Fu);else try{qe(this,Wp,n.select),m=n.select(m),m=sE(s==null?void 0:s.data,m,n),qe(this,Fu,m),qe(this,Ro,null)}catch(A){qe(this,Ro,A)}re(this,Ro)&&(x=re(this,Ro),m=re(this,Fu),y=Date.now(),v="error");const w=f.fetchStatus==="fetching",N=v==="pending",S=v==="error",_=N&&w,E=m!==void 0,O={status:v,fetchStatus:f.fetchStatus,isPending:N,isSuccess:v==="success",isError:S,isInitialLoading:_,isLoading:_,data:m,dataUpdatedAt:f.dataUpdatedAt,error:x,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!N,isLoadingError:S&&!E,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:S&&E,isStale:rO(t,n),refetch:this.refetch,promise:re(this,Ea),isEnabled:Ji(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=D=>{O.status==="error"?D.reject(O.error):O.data!==void 0&&D.resolve(O.data)},C=()=>{const D=qe(this,Ea,O.promise=aE());A(D)},R=re(this,Ea);switch(R.status){case"pending":t.queryHash===r.queryHash&&A(R);break;case"fulfilled":(O.status==="error"||O.data!==R.value)&&C();break;case"rejected":(O.status!=="error"||O.error!==R.reason)&&C();break}}return O}updateResult(){const t=re(this,zr),n=this.createResult(re(this,Rt),this.options);if(qe(this,tc,re(this,Rt).state),qe(this,Bu,this.options),re(this,tc).data!==void 0&&qe(this,qu,re(this,Rt)),Vy(n,t))return;qe(this,zr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!re(this,zu).size)return!0;const o=new Set(s??re(this,zu));return this.options.throwOnError&&o.add("error"),Object.keys(re(this,zr)).some(l=>{const c=l;return re(this,zr)[c]!==t[c]&&o.has(c)})};Pt(this,Gt,$8).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pt(this,Gt,dE).call(this)}},si=new WeakMap,Rt=new WeakMap,Vp=new WeakMap,zr=new WeakMap,tc=new WeakMap,Bu=new WeakMap,Ea=new WeakMap,Ro=new WeakMap,Wp=new WeakMap,Fu=new WeakMap,qu=new WeakMap,nc=new WeakMap,rc=new WeakMap,Io=new WeakMap,zu=new WeakMap,Gt=new WeakSet,dh=function(t){Pt(this,Gt,pE).call(this);let n=re(this,Rt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Vr)),n},lE=function(){Pt(this,Gt,fE).call(this);const t=zo(this.options.staleTime,re(this,Rt));if(fc||re(this,zr).isStale||!rE(t))return;const r=A8(re(this,zr).dataUpdatedAt,t)+1;qe(this,nc,Ul.setTimeout(()=>{re(this,zr).isStale||this.updateResult()},r))},cE=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(re(this,Rt)):this.options.refetchInterval)??!1},uE=function(t){Pt(this,Gt,hE).call(this),qe(this,Io,t),!(fc||Ji(this.options.enabled,re(this,Rt))===!1||!rE(re(this,Io))||re(this,Io)===0)&&qe(this,rc,Ul.setInterval(()=>{(this.options.refetchIntervalInBackground||nO.isFocused())&&Pt(this,Gt,dh).call(this)},re(this,Io)))},dE=function(){Pt(this,Gt,lE).call(this),Pt(this,Gt,uE).call(this,Pt(this,Gt,cE).call(this))},fE=function(){re(this,nc)&&(Ul.clearTimeout(re(this,nc)),qe(this,nc,void 0))},hE=function(){re(this,rc)&&(Ul.clearInterval(re(this,rc)),qe(this,rc,void 0))},pE=function(){const t=re(this,si).getQueryCache().build(re(this,si),this.options);if(t===re(this,Rt))return;const n=re(this,Rt);qe(this,Rt,t),qe(this,Vp,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},$8=function(t){Yn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(re(this,zr))}),re(this,si).getQueryCache().notify({query:re(this,Rt),type:"observerResultsUpdated"})})},qq);function _te(e,t){return Ji(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function mI(e,t){return _te(e,t)||e.state.data!==void 0&&mE(e,t,t.refetchOnMount)}function mE(e,t,n){if(Ji(t.enabled,e)!==!1&&zo(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&rO(e,t)}return!1}function gI(e,t,n,r){return(e!==t||Ji(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&rO(e,n)}function rO(e,t){return Ji(t.enabled,e)!==!1&&e.isStaleByTime(zo(t.staleTime,e))}function Ete(e,t){return!Vy(e.getCurrentResult(),t)}function yI(e){return{onFetch:(t,n)=>{var d,f,p,m,x;const r=t.options,i=(p=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],o=((x=t.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let y=!1;const v=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},b=T8(t.options,t.fetchOptions),w=async(N,S,_)=>{if(y)return Promise.reject();if(S==null&&N.pages.length)return Promise.resolve(N);const k=(()=>{const C={client:t.client,queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};return v(C),C})(),O=await b(k),{maxPages:I}=t.options,A=_?yte:gte;return{pages:A(N.pages,O,I),pageParams:A(N.pageParams,S,I)}};if(i&&s.length){const N=i==="backward",S=N?Pte:vI,_={pages:s,pageParams:o},E=S(r,_);l=await w(_,E,N)}else{const N=e??s.length;do{const S=c===0?o[0]??r.initialPageParam:vI(r,l);if(c>0&&S==null)break;l=await w(l,S),c++}while(c<N)}return l};t.options.persister?t.fetchFn=()=>{var y,v;return(v=(y=t.options).persister)==null?void 0:v.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function vI(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 Pte(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 Hp,Hs,Ur,ic,Gs,_o,zq,kte=(zq=class extends D8{constructor(t){super();nt(this,Gs);nt(this,Hp);nt(this,Hs);nt(this,Ur);nt(this,ic);qe(this,Hp,t.client),this.mutationId=t.mutationId,qe(this,Ur,t.mutationCache),qe(this,Hs,[]),this.state=t.state||B8(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){re(this,Hs).includes(t)||(re(this,Hs).push(t),this.clearGcTimeout(),re(this,Ur).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){qe(this,Hs,re(this,Hs).filter(n=>n!==t)),this.scheduleGc(),re(this,Ur).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){re(this,Hs).length||(this.state.status==="pending"?this.scheduleGc():re(this,Ur).remove(this))}continue(){var t;return((t=re(this,ic))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,u,d,f,p,m,x,y,v,b,w,N,S,_,E,k,O,I;const n=()=>{Pt(this,Gs,_o).call(this,{type:"continue"})},r={client:re(this,Hp),meta:this.options.meta,mutationKey:this.options.mutationKey};qe(this,ic,M8({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,C)=>{Pt(this,Gs,_o).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{Pt(this,Gs,_o).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>re(this,Ur).canRun(this)}));const i=this.state.status==="pending",s=!re(this,ic).canStart();try{if(i)n();else{Pt(this,Gs,_o).call(this,{type:"pending",variables:t,isPaused:s}),await((l=(o=re(this,Ur).config).onMutate)==null?void 0:l.call(o,t,this,r));const C=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,r));C!==this.state.context&&Pt(this,Gs,_o).call(this,{type:"pending",context:C,variables:t,isPaused:s})}const A=await re(this,ic).start();return await((f=(d=re(this,Ur).config).onSuccess)==null?void 0:f.call(d,A,t,this.state.context,this,r)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,A,t,this.state.context,r)),await((y=(x=re(this,Ur).config).onSettled)==null?void 0:y.call(x,A,null,this.state.variables,this.state.context,this,r)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,A,null,t,this.state.context,r)),Pt(this,Gs,_o).call(this,{type:"success",data:A}),A}catch(A){try{throw await((N=(w=re(this,Ur).config).onError)==null?void 0:N.call(w,A,t,this.state.context,this,r)),await((_=(S=this.options).onError)==null?void 0:_.call(S,A,t,this.state.context,r)),await((k=(E=re(this,Ur).config).onSettled)==null?void 0:k.call(E,void 0,A,this.state.variables,this.state.context,this,r)),await((I=(O=this.options).onSettled)==null?void 0:I.call(O,void 0,A,t,this.state.context,r)),A}finally{Pt(this,Gs,_o).call(this,{type:"error",error:A})}}finally{re(this,Ur).runNext(this)}}},Hp=new WeakMap,Hs=new WeakMap,Ur=new WeakMap,ic=new WeakMap,Gs=new WeakSet,_o=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};
515case"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),Yn.batch(()=>{re(this,Hs).forEach(r=>{r.onMutationUpdate(t)}),re(this,Ur).notify({mutation:this,type:"updated",action:t})})},zq);function B8(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Pa,Ss,Gp,Uq,Ote=(Uq=class extends Rd{constructor(t={}){super();nt(this,Pa);nt(this,Ss);nt(this,Gp);this.config=t,qe(this,Pa,new Set),qe(this,Ss,new Map),qe(this,Gp,0)}build(t,n,r){const i=new kte({client:t,mutationCache:this,mutationId:++Ag(this,Gp)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){re(this,Pa).add(t);const n=Dg(t);if(typeof n=="string"){const r=re(this,Ss).get(n);r?r.push(t):re(this,Ss).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(re(this,Pa).delete(t)){const n=Dg(t);if(typeof n=="string"){const r=re(this,Ss).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&re(this,Ss).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Dg(t);if(typeof n=="string"){const r=re(this,Ss).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=Dg(t);if(typeof n=="string"){const i=(r=re(this,Ss).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(){Yn.batch(()=>{re(this,Pa).forEach(t=>{this.notify({type:"removed",mutation:t})}),re(this,Pa).clear(),re(this,Ss).clear()})}getAll(){return Array.from(re(this,Pa))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dI(n,r))}findAll(t={}){return this.getAll().filter(n=>dI(t,n))}notify(t){Yn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Yn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Vr))))}},Pa=new WeakMap,Ss=new WeakMap,Gp=new WeakMap,Uq);function Dg(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ka,Mo,ai,Oa,Ba,jy,gE,Vq,Ate=(Vq=class extends Rd{constructor(n,r){super();nt(this,Ba);nt(this,ka);nt(this,Mo);nt(this,ai);nt(this,Oa);qe(this,ka,n),this.setOptions(r),this.bindMethods(),Pt(this,Ba,jy).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=re(this,ka).defaultMutationOptions(n),Vy(this.options,r)||re(this,ka).getMutationCache().notify({type:"observerOptionsUpdated",mutation:re(this,ai),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&hc(r.mutationKey)!==hc(this.options.mutationKey)?this.reset():((i=re(this,ai))==null?void 0:i.state.status)==="pending"&&re(this,ai).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=re(this,ai))==null||n.removeObserver(this)}onMutationUpdate(n){Pt(this,Ba,jy).call(this),Pt(this,Ba,gE).call(this,n)}getCurrentResult(){return re(this,Mo)}reset(){var n;(n=re(this,ai))==null||n.removeObserver(this),qe(this,ai,void 0),Pt(this,Ba,jy).call(this),Pt(this,Ba,gE).call(this)}mutate(n,r){var i;return qe(this,Oa,r),(i=re(this,ai))==null||i.removeObserver(this),qe(this,ai,re(this,ka).getMutationCache().build(re(this,ka),this.options)),re(this,ai).addObserver(this),re(this,ai).execute(n)}},ka=new WeakMap,Mo=new WeakMap,ai=new WeakMap,Oa=new WeakMap,Ba=new WeakSet,jy=function(){var r;const n=((r=re(this,ai))==null?void 0:r.state)??B8();qe(this,Mo,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},gE=function(n){Yn.batch(()=>{var r,i,s,o,l,c,u,d;if(re(this,Oa)&&this.hasListeners()){const f=re(this,Mo).variables,p=re(this,Mo).context,m={client:re(this,ka),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((i=(r=re(this,Oa)).onSuccess)==null||i.call(r,n.data,f,p,m),(o=(s=re(this,Oa)).onSettled)==null||o.call(s,n.data,null,f,p,m)):(n==null?void 0:n.type)==="error"&&((c=(l=re(this,Oa)).onError)==null||c.call(l,n.error,f,p,m),(d=(u=re(this,Oa)).onSettled)==null||d.call(u,void 0,n.error,f,p,m))}
vendor: 6,246 bytes, line 515
515this.listeners.forEach(f=>{f(re(this,Mo))})})},Vq),Ks,Wq,Cte=(Wq=class extends Rd{constructor(t={}){super();nt(this,Ks);this.config=t,qe(this,Ks,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??eO(i,n);let o=this.get(s);return o||(o=new Ste({client:t,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){re(this,Ks).has(t.queryHash)||(re(this,Ks).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=re(this,Ks).get(t.queryHash);n&&(t.destroy(),n===t&&re(this,Ks).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Yn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return re(this,Ks).get(t)}getAll(){return[...re(this,Ks).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>uI(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>uI(t,r)):n}notify(t){Yn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Yn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Yn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ks=new WeakMap,Wq),wn,Do,Lo,Uu,Vu,$o,Wu,Hu,Hq,Tte=(Hq=class{constructor(e={}){nt(this,wn);nt(this,Do);nt(this,Lo);nt(this,Uu);nt(this,Vu);nt(this,$o);nt(this,Wu);nt(this,Hu);qe(this,wn,e.queryCache||new Cte),qe(this,Do,e.mutationCache||new Ote),qe(this,Lo,e.defaultOptions||{}),qe(this,Uu,new Map),qe(this,Vu,new Map),qe(this,$o,0)}mount(){Ag(this,$o)._++,re(this,$o)===1&&(qe(this,Wu,nO.subscribe(async e=>{e&&(await this.resumePausedMutations(),re(this,wn).onFocus())})),qe(this,Hu,Wy.subscribe(async e=>{e&&(await this.resumePausedMutations(),re(this,wn).onOnline())})))}unmount(){var e,t;Ag(this,$o)._--,re(this,$o)===0&&((e=re(this,Wu))==null||e.call(this),qe(this,Wu,void 0),(t=re(this,Hu))==null||t.call(this),qe(this,Hu,void 0))}isFetching(e){return re(this,wn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return re(this,Do).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=re(this,wn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=re(this,wn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(zo(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return re(this,wn).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=re(this,wn).get(r.queryHash),s=i==null?void 0:i.state.data,o=hte(t,s);if(o!==void 0)return re(this,wn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Yn.batch(()=>re(this,wn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=re(this,wn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=re(this,wn);Yn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=re(this,wn);return Yn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Yn.batch(()=>re(this,wn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Vr).catch(Vr)}invalidateQueries(e,t={}){return Yn.batch(()=>(re(this,wn).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=Yn.batch(()=>re(this,wn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Vr)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Vr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=re(this,wn).build(this,t);return n.isStaleByTime(zo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vr).catch(Vr)}fetchInfiniteQuery(e){return e.behavior=yI(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vr).catch(Vr)}ensureInfiniteQueryData(e){return e.behavior=yI(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Wy.isOnline()?re(this,Do).resumePausedMutations():Promise.resolve()}getQueryCache(){return re(this,wn)}getMutationCache(){return re(this,Do)}getDefaultOptions(){return re(this,Lo)}setDefaultOptions(e){qe(this,Lo,e)}setQueryDefaults(e,t){re(this,Uu).set(hc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...re(this,Uu).values()],n={};return t.forEach(r=>{Uh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){re(this,Vu).set(hc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...re(this,Vu).values()],n={};return t.forEach(r=>{Uh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...re(this,Lo).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=eO(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===tO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...re(this,Lo).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){re(this,wn).clear(),re(this,Do).clear()}},wn=new WeakMap,Do=new WeakMap,Lo=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,$o=new WeakMap,Wu=new WeakMap,Hu=new WeakMap,Hq),F8=T.createContext(void 0),Ln=e=>{const t=T.useContext(F8);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Rte=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(F8.Provider,{value:e,children:t})),q8=T.createContext(!1),Ite=()=>T.useContext(q8);q8.Provider;function Mte(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
515var Dte=T.createContext(Mte()),Lte=()=>T.useContext(Dte),$te=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Bte=e=>{T.useEffect(()=>{e.clearReset()},[e])},Fte=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||R8(n,[e.error,r])),qte=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zte=(e,t)=>e.isLoading&&e.isFetching&&!t,Ute=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xI=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Vte(e,t,n){var f,p,m,x,y;const r=Ite(),i=Lte(),s=Ln(),o=s.defaultQueryOptions(e);(p=(f=s.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.call(f,o),o._optimisticResults=r?"isRestoring":"optimistic",qte(o),$te(o,i),Bte(i);const l=!s.getQueryCache().get(o.queryHash),[c]=T.useState(()=>new t(s,o)),u=c.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(v=>{const b=d?c.subscribe(Yn.batchCalls(v)):Vr;return c.updateResult(),b},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(o)},[o,c]),Ute(o,u))throw xI(o,c,i);if(Fte({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((x=(m=s.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||x.call(m,o,u),o.experimental_prefetchInRender&&!fc&&zte(u,r)){const v=l?xI(o,c,i):(y=s.getQueryCache().get(o.queryHash))==null?void 0:y.promise;v==null||v.catch(Vr).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function st(e,t){return Vte(e,Nte)}function wr(e,t){const n=Ln(),[r]=T.useState(()=>new Ate(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const i=T.useSyncExternalStore(T.useCallback(o=>r.subscribe(Yn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((o,l)=>{r.mutate(o,l).catch(Vr)},[r]);if(i.error&&R8(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}const Wte=new Tte({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function Hte(){const[e,t]=T.useState(!1),n=T.useRef(!1),[r,i]=T.useState(!1),s=T.useRef(!1),[o,l]=T.useState(!1),c=T.useRef(!1),u=T.useRef([]),d=T.useRef([]),f=T.useRef([]),p=T.useRef(null),m=(O=!1)=>{const I=document.createElement("div");return I.style.position="absolute",I.style.pointerEvents="none",I.style.transition="all 0.1s ease-in-out",I.style.zIndex="9999",O?I.style.border="2px solid #2563EB":(I.style.border="2px solid #95a5fc",I.style.backgroundColor="rgba(99, 102, 241, 0.05)"),I},x=(O,I,A=!1)=>{if(!I||!n.current)return;I.offsetWidth;const C=I.getBoundingClientRect();O.style.top=`${C.top+window.scrollY}px`,O.style.left=`${C.left+window.scrollX}px`,O.style.width=`${C.width}px`,O.style.height=`${C.height}px`;let R=O.querySelector("div");R||(R=document.createElement("div"),R.textContent=I.tagName.toLowerCase(),R.style.position="absolute",R.style.top="-27px",R.style.left="-2px",R.style.padding="2px 8px",R.style.fontSize="11px",R.style.fontWeight=A?"500":"400",R.style.color=A?"#ffffff":"#526cff",R.style.backgroundColor=A?"#526cff":"#DBEAFE",R.style.borderRadius="3px",R.style.boxShadow="none",R.style.minWidth="24px",R.style.textAlign="center",O.appendChild(R))},y=O=>{if(!O)return[];const I=[...document.querySelectorAll(`[data-source-location="${O}"]`)];return I.length>0?I:[...document.querySelectorAll(`[data-visual-selector-id="${O}"]`)]},v=()=>{u.current.forEach(O=>{O&&O.parentNode&&O.remove()}),u.current=[],f.current=[]},b=O=>{if(!n.current||s.current)return;if(c.current){v();return}if(O.target.tagName.toLowerCase()==="path"){v();return}const I=O.target.closest("[data-source-location], [data-visual-selector-id]");if(!I){v();return}const A=I.dataset.sourceLocation||I.dataset.visualSelectorId;if(I.dataset.sourceLocation,p.current===A){v();return}const C=y(A);
515v(),C.forEach(R=>{const D=m(!1);document.body.appendChild(D),u.current.push(D),x(D,R)}),f.current=C},w=()=>{s.current||v()},N=O=>{var F;if(!n.current)return;if(c.current){O.preventDefault(),O.stopPropagation(),O.stopImmediatePropagation(),window.parent.postMessage({type:"close-dropdowns"},"*");return}if(O.target.tagName.toLowerCase()==="path")return;O.preventDefault(),O.stopPropagation(),O.stopImmediatePropagation();const I=O.target.closest("[data-source-location], [data-visual-selector-id]");if(!I)return;const A=I.dataset.sourceLocation||I.dataset.visualSelectorId;I.dataset.sourceLocation,d.current.forEach(H=>{H&&H.parentNode&&H.remove()}),d.current=[],y(A).forEach(H=>{const U=m(!0);document.body.appendChild(U),d.current.push(U),x(U,H,!0)}),p.current=A,v();const R=I.getBoundingClientRect(),D={top:R.top,left:R.left,right:R.right,bottom:R.bottom,width:R.width,height:R.height,centerX:R.left+R.width/2,centerY:R.top+R.height/2},q={type:"element-selected",tagName:I.tagName,classes:((F=I.className)==null?void 0:F.baseVal)||I.className||"",visualSelectorId:A,content:I.innerText,dataSourceLocation:I.dataset.sourceLocation,isDynamicContent:I.dataset.dynamicContent==="true",linenumber:I.dataset.linenumber,filename:I.dataset.f
515ilename,position:D};window.parent.postMessage(q,"*")},S=()=>{d.current.forEach(O=>{O&&O.parentNode&&O.remove()}),d.current=[],p.current=null},_=(O,I,A=!1)=>{const C=y(O);C.length!==0&&(C.forEach(R=>{var D;if(A)R.className=I;else{const q=((D=R.className)==null?void 0:D.baseVal)||R.className||"";R.className=S8(q,I)}}),setTimeout(()=>{var R,D;p.current===O&&d.current.forEach((q,F)=>{F<C.length&&x(q,C[F])}),f.current.length>0&&((D=(R=f.current[0])==null?void 0:R.dataset)==null?void 0:D.visualSelectorId)===O&&u.current.forEach((F,H)=>{H<f.current.length&&x(F,f.current[H])})},50))},E=(O,I)=>{const A=y(O);A.length!==0&&(A.forEach(C=>{C.innerText=I}),setTimeout(()=>{p.current===O&&d.current.forEach((C,R)=>{R<A.length&&x(C,A[R])})},50))},k=O=>{t(O),n.current=O,O?(document.body.style.cursor="crosshair",document.addEventListener("mouseover",b),document.addEventListener("mouseout",w),document.addEventListener("click",N,!0)):(v(),d.current.forEach(I=>{I&&I.parentNode&&I.remove()}),d.current=[],f.current=[],p.current=null,document.body.style.cursor="default",document.removeEventListener("mouseover",b),document.removeEventListener("mouseout",w),document.removeEventListener("click",N,!0))};return T.useEffect(()=>{document.querySelectorAll("[data-linenumber]:not([data-visual-selector-id])").forEach((C,R)=>
515{const D=`visual-id-${C.dataset.filename}-${C.dataset.linenumber}-${R}`;C.dataset.visualSelectorId=D});const I=()=>{if(p.current){const C=y(p.current);if(C.length>0){const D=C[0].getBoundingClientRect(),q=window.innerHeight,F=window.innerWidth,H=D.top<q&&D.bottom>0&&D.left<F&&D.right>0,U={top:D.top,left:D.left,right:D.right,bottom:D.bottom,width:D.width,height:D.height,centerX:D.left+D.width/2,centerY:D.top+D.height/2};window.parent.postMessage({type:"element-position-update",position:U,isInViewport:H,visualSelectorId:p.current},"*")}}},A=C=>{const R=C.data;switch(R.type){case"toggle-visual-edit-mode":k(R.data.enabled);break;case"update-classes":R.data&&R.data.classes!==void 0?_(R.data.visualSelectorId,R.data.classes,R.data.replace||!1):console.warn("[Agent] Invalid update-classes message:",R);break;case"unselect-element":S();break;case"refresh-page":window.location.reload();break;case"update-content":R.data&&R.data.content!==void 0?E(R.data.visualSelectorId,R.data.content):console.warn("[Agent] Invalid update-content message:",R);break;case"request-element-position":if(p.current){const D=y(p.current);if(D.length>0){const F=D[0].getBoundingClientRect(),H=window.innerHeight,U=window.innerWidth,W=F.top<H&&F.bottom>0&&F.left<U&&F.right>0,G={top:F.top,left:F.left,right:F.right,bottom:F.bottom,width:F.width,height:F.height,centerX:F.left+F.width/2,centerY:F.top+F.height/2};window.parent.postMessage({type:"element-position-update",position:G,isInViewport:W,visualSelectorId:p.current},"*")}}break;case"popover-drag-state":R.data&&R.data.isDragging!==void 0&&(i(R.data.isDragging),s.current=R.data.isDragging,R.data.isDragging&&v());break;case"dropdown-state":R.data&&R.data.isOpen!==void 0&&(l(R.data.isOpen),c.current=R.data.isOpen,R.data.isOpen&&v());break}};return window.addEventListener("message",A),window.addEventListener("scroll",I,!0),document.addEventListener("scroll",I,!0),window.parent.postMessage({type:"visual-edit-agent-ready"},"*"),()=>{window.removeEventListener("message",A),window.removeEventListener("scroll",I,!0),document.removeEventListener("scroll",I,!0),document.removeEventListener("mouseover",b),document.removeEventListener("mouseout",w),document.removeEventListener("click",N,!0),v(),d.current.forEach(C=>{C&&C.parentNode&&C.remove()})}},[]),T.useEffect(()=>{n.current=e},[e]),T.useEffect(()=>{s.current=r},[r]),T.useEffect(()=>{c.current=o},[o]),T.useEffect(()=>{const O=()=>{if(p.current){const A=y(p.current);d.current.forEach((C,R)=>{R<A.length&&x(C,A[R])})}f.current.length>0&&u.current.forEach((A,C)=>{C<f.current.length&&x(A,f.current[C])})},I=new MutationObserver(A=>{A.some(R=>{const D=F=>{if(F.nodeType===Node.ELEMENT_NODE){if(F.dataset&&F.dataset.visualSelectorId)return!0;for(let H=0;H<F.children.length;H++)if(D(F.children[H]))return!0}return!1};return R.type==="attributes"&&(R.attributeName==="style"||R.attributeName==="class"||R.attributeName==="width"||R.attributeName==="height")&&D(R.target)})&&setTimeout(O,50)});return I.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["style","class","width","height"]}),window.addEventListener("resize",O),window.addEventListener("scroll",O),()=>{window.removeEventListener("resize",O),window.removeEventListener("scroll",O),I.disconnect()}},[]),null}var _c=Kk();const z8=Lt(_c);/** 516 * @remix-run/router v1.23.0 517 * 518 * Copyright (c) Remix Software Inc. 519 * 520 * This source code is licensed under the MIT license found in the 521 * LICENSE.md file in the root directory of this source tree. 522 * 523 * @license MIT 524 */function Vh(){return Vh=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},Vh.apply(this,arguments)}var Bo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Bo||(Bo={}));const bI="popstate";function Gte(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:l}=r.location;return yE("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Hy(i)}return Yte(t,n,null,e)}function zn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function U8(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Kte(){return Math.random().toString(36).substr(2,8)}function wI(e,t){return{usr:e.state,key:e.key,idx:t}}function yE(e,t,n,r){return n===void 0&&(n=null),Vh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Id(t):t,{state:n,key:t&&t.key||r||Kte()})}function Hy(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 Id(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 Yte(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=Bo.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Vh({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=Bo.Pop;let v=d(),b=v==null?null:v-u;u=v,c&&c({action:l,location:y.location,delta:b})}function p(v,b){l=Bo.Push;let w=yE(y.location,v,b);u=d()+1;let N=wI(w,u),S=y.createHref(w);try{o.pushState(N,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(S)}s&&c&&c({action:l,location:y.location,delta:1})}function m(v,b){l=Bo.Replace;let w=yE(y.location,v,b);u=d();let N=wI(w,u),S=y.createHref(w);o.replaceState(N,"",S),s&&c&&c({action:l,location:y.location,delta:0})}function x(v){let b=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof v=="string"?v:Hy(v);return w=w.replace(/ $/,"%20"),zn(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let y={get action(){return l},get location(){return e(i,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(bI,f),c=v,()=>{i.removeEventListener(bI,f),c=null}},createHref(v){return t(i,v)},createURL:x,encodeLocation(v){let b=x(v);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:m,go(v){return o.go(v)}};return y}var jI;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(jI||(jI={}));function Xte(e,t,n){return n===void 0&&(n="/"),Qte(e,t,n)}function Qte(e,t,n,r){let i=typeof t=="string"?Id(t):t,s=iO(i.pathname||"/",n);if(s==null)return null;let o=V8(e);Zte(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=une(s);l=one(o[c],u)}return l}function V8(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(zn(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
524id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Uo([r,c.relativePath]),d=n.concat(c);s.children&&s.children.length>0&&(zn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),V8(s.children,t,d,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:sne(u,s.index),routesMeta:d})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of W8(s.path))i(s,o,c)}),t}function W8(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 o=W8(r.join("/")),l=[];return l.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Zte(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ane(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jte=/^:[\w-]+$/,ene=3,tne=2,nne=1,rne=10,ine=-2,SI=e=>e==="*";function sne(e,t){let n=e.split("/"),r=n.length;return n.some(SI)&&(r+=ine),t&&(r+=tne),n.filter(i=>!SI(i)).reduce((i,s)=>i+(Jte.test(s)?ene:s===""?nne:rne),r)}function ane(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 one(e,t,n){let{routesMeta:r}=e,i={},s="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=s==="/"?t:t.slice(s.length)||"/",f=lne({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),p=c.route;if(!f)return null;
vendor: 9,474 bytes, lines 524-533
524Object.assign(i,f.params),o.push({params:i,pathname:Uo([s,f.pathname]),pathnameBase:pne(Uo([s,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(s=Uo([s,f.pathnameBase]))}return o}function lne(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=cne(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:p,isOptional:m}=d;if(p==="*"){let y=l[f]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const x=l[f];return m&&!x?u[p]=void 0:u[p]=(x||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function cne(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),U8(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,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function une(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return U8(!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 iO(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 dne(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Id(e):e;return{pathname:n?n.startsWith("/")?n:fne(n,t):t,search:mne(r),hash:gne(i)}}function fne(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 $w(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 hne(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function H8(e,t){let n=hne(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function G8(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Id(e):(i=Vh({},e),zn(!i.pathname||!i.pathname.includes("?"),$w("?","pathname","search",i)),zn(!i.pathname||!i.pathname.includes("#"),$w("#","pathname","hash",i)),zn(!i.search||!i.search.includes("#"),$w("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}l=f>=0?t[f]:"/"}let c=dne(i,l),u=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const Uo=e=>e.join("/").replace(/\/\/+/g,"/"),pne=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mne=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gne=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yne(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const K8=["post","put","patch","delete"];new Set(K8);const vne=["get",...K8];new Set(vne);/** 525 * React Router v6.30.1 526 * 527 * Copyright (c) Remix Software Inc. 528 * 529 * This source code is licensed under the MIT license found in the 530 * LICENSE.md file in the root directory of this source tree. 531 * 532 * @license MIT 533 */function Wh(){return Wh=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},Wh.apply(this,arguments)}const sO=T.createContext(null),xne=T.createContext(null),Ec=T.createContext(null),Sx=T.createContext(null),Pc=T.createContext({outlet:null,matches:[],isDataRoute:!1}),Y8=T.createContext(null);function bne(e,t){let{relative:n}=t===void 0?{}:t;Xp()||zn(!1);let{basename:r,navigator:i}=T.useContext(Ec),{hash:s,pathname:o,search:l}=Q8(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:Uo([r,o])),i.createHref({pathname:c,search:l,hash:s})}function Xp(){return T.useContext(Sx)!=null}function Md(){return Xp()||zn(!1),T.useContext(Sx).location}function X8(e){T.useContext(Ec).static||T.useLayoutEffect(e)}function kc(){let{isDataRoute:e}=T.useContext(Pc);return e?Rne():wne()}function wne(){Xp()||zn(!1);let e=T.useContext(sO),{basename:t,future:n,navigator:r}=T.useContext(Ec),{matches:i}=T.useContext(Pc),{pathname:s}=Md(),o=JSON.stringify(H8(i,n.v7_relativeSplatPath)),l=T.useRef(!1);return X8(()=>{l.current=!0}),T.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=G8(u,JSON.parse(o),s,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Uo([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,s,e])}function Q8(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=T.useContext(Ec),{matches:i}=T.useContext(Pc),{pathname:s}=Md(),o=JSON.stringify(H8(i,r.v7_relativeSplatPath));return T.useMemo(()=>G8(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function jne(e,t){return Sne(e,t)}function Sne(e,t,n,r){Xp()||zn(!1);let{navigator:i}=T.useContext(Ec),{matches:s}=T.useContext(Pc),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Md(),d;if(t){var f;let v=typeof t=="string"?Id(t):t;c==="/"||(f=v.pathname)!=null&&f.startsWith(c)||zn(!1),d=v}else d=u;let p=d.pathname||"/",m=p;if(c!=="/"){let v=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(v.length).join("/")}let x=Xte(e,{pathname:m}),y=kne(x&&x.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:Uo([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:Uo([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),s,n,r);return t&&y?T.createElement(Sx.Provider,{value:{location:Wh({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Bo.Pop}},y):y}function Nne(){let e=Tne(),t=yne(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 T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:i},n):null,null)}const _ne=T.createElement(Nne,null);class Ene extends T.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?T.createElement(Pc.Provider,{value:this.props.routeContext},T.createElement(Y8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Pne(e){let{routeContext:t,match:n,children:r}=e,i=T.useContext(sO);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(Pc.Provider,{value:t},r)}function kne(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 o=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||zn(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:p,errors:m}=n,x=f.route.loader&&p[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||x){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,p)=>{let m,x=!1,y=null,v=null;n&&(m=l&&f.route.id?l[f.route.id]:void 0,y=f.route.errorElement||_ne,c&&(u<0&&p===0?(Ine("route-fallback"),x=!0,v=null):u===p&&(x=!0,v=f.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,p+1)),w=()=>{let N;return m?N=y:x?N=v:f.route.Component?N=T.createElement(f.route.Component,null):f.route.element?N=f.route.element:N=d,T.createElement(Pne,{match:f,routeContext:{outlet:d,matches:b,isDataRoute:n!=null},children:N})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?T.createElement(Ene,{location:n.location,revalidation:n.revalidation,component:y,error:m,children:w(),routeC
533ontext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var Z8=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Z8||{}),J8=(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})(J8||{});function One(e){let t=T.useContext(sO);return t||zn(!1),t}function Ane(e){let t=T.useContext(xne);return t||zn(!1),t}function Cne(e){let t=T.useContext(Pc);return t||zn(!1),t}function ez(e){let t=Cne(),n=t.matches[t.matches.length-1];return n.route.id||zn(!1),n.route.id}function Tne(){var e;let t=T.useContext(Y8),n=Ane(),r=ez();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Rne(){let{router:e}=One(Z8.UseNavigateStable),t=ez(J8.UseNavigateStable),n=T.useRef(!1);return X8(()=>{n.current=!0}),T.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Wh({fromRouteId:t},s)))},[e,t])}const NI={};function Ine(e,t,n){NI[e]||(NI[e]=!0)}function Mne(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Sy(e){zn(!1)}function Dne(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Bo.Pop,navigator:s,static:o=!1,future:l}=e;Xp()&&zn(!1);let c=t.replace(/^\/*/,"/"),u=T.useMemo(()=>({basename:c,navigator:s,static:o,future:Wh({v7_relativeSplatPath:!1},l)}),[c,l,s,o]);typeof r=="string"&&(r=Id(r));let{pathname:d="/",search:f="",hash:p="",state:m=null,key:x="default"}=r,y=T.useMemo(()=>{let v=iO(d,c);return v==null?null:{location:{pathname:v,search:f,hash:p,state:m,key:x},navigationType:i}},[c,d,f,p,m,x,i]);return y==null?null:T.createElement(Ec.Provider,{value:u},T.createElement(Sx.Provider,{children:n,value:y}))}function Lne(e){let{children:t,location:n}=e;return jne(vE(t),n)}new Promise(()=>{});function vE(e,t){t===void 0&&(t=[]);let n=[];return T.Children.forEach(e,(r,i)=>{if(!T.isValidElement(r))return;let s=[...t,i];if(r.type===T.Fragment){n.push.apply(n,vE(r.props.children,s));return}r.type!==Sy&&zn(!1),!r.props.index||!r.props.children||zn(!1);let o={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&&(o.children=vE(r.props.children,s)),n.push(o)}),n}/** 534 * React Router DOM v6.30.1 535 * 536 * Copyright (c) Remix Software Inc. 537 * 538 * This source code is licensed under the MIT license found in the 539 * LICENSE.md file in the root directory of this source tree. 540 * 541 * @license MIT 542 */function xE(){return xE=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},xE.apply(this,arguments)}function $ne(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 Bne(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Fne(e,t){return e.button===0&&(!t||t==="_self")&&!Bne(e)}const qne=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],zne="6";try{window.__reactRouterVersion=zne}catch{}const Une="startTransition",_I=Gk[Une];function Vne(e){let{basename:t,children:n,future:r,window:i}=e,s=T.useRef();s.current==null&&(s.current=Gte({window:i,v5Compat:!0}));let o=s.current,[l,c]=T.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=T.useCallback(f=>{u&&_I?_I(()=>c(f)):c(f)},[c,u]);return T.useLayoutEffect(()=>o.listen(d),[o,d]),T.useEffect(()=>Mne(r),[r]),T.createElement(Dne,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Wne=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hne=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ft=T.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,p=$ne(t,qne),{basename:m}=T.useContext(Ec),x,y=!1;if(typeof u=="string"&&Hne.test(u)&&(x=u,Wne))try{let N=new URL(window.location.href),S=u.startsWith("//")?new URL(N.protocol+u):new URL(u),_=iO(S.pathname,m);S.origin===N.origin&&_!=null?u=_+S.search+S.hash:y=!0}catch{}let v=bne(u,{relative:i}),b=Gne(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:f});function w(N){r&&r(N),N.defaultPrevented||b(N)}return T.createElement("a",xE({},p,{href:x||v,onClick:y||s?r:w,ref:n,target:c}))});var EI;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(EI||(EI={}));var PI;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(PI||(PI={}));function Gne(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:l}=t===void 0?{}:t,c=kc(),u=Md(),d=Q8(e,{relative:o});return T.useCallback(f=>{if(Fne(f,n)){f.preventDefault();let p=r!==void 0?r:Hy(u)===Hy(d);c(e,{replace:p,state:i,preventScrollReset:s,relative:o,viewTransition:l})}},[u,c,d,r,i,n,e,s,o,l])}function tz(e,t){return function(){return e.apply(t,arguments)}}const{toString:Kne}=Object.prototype,{getPrototypeOf:aO}=Object,{iterator:Nx,toStringTag:nz}=Symbol,_x=(e=>t=>{const n=Kne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ms=e=>(e=e.toLowerCase(),t=>_x(t)===e),Ex=e=>t=>typeof t===e,{isArray:Dd}=Array,Yu=Ex("undefined");function Qp(e){return e!==null&&!Yu(e)&&e.constructor!==null&&!Yu(e.constructor)&&ui(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rz=Ms("ArrayBuffer");function Yne(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rz(e.buffer),t}const Xne=Ex("string"),ui=Ex("function"),iz=Ex("number"),Zp=e=>e!==null&&typeof e=="object",Qne=e=>e===!0||e===!1,Ny=e=>{if(_x(e)!=="object")return!1;const t=aO(e);
vendor: 2,481 bytes, line 542
542return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(nz in e)&&!(Nx in e)},Zne=e=>{if(!Zp(e)||Qp(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Jne=Ms("Date"),ere=Ms("File"),tre=Ms("Blob"),nre=Ms("FileList"),rre=e=>Zp(e)&&ui(e.pipe),ire=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ui(e.append)&&((t=_x(e))==="formdata"||t==="object"&&ui(e.toString)&&e.toString()==="[object FormData]"))},sre=Ms("URLSearchParams"),[are,ore,lre,cre]=["ReadableStream","Request","Response","Headers"].map(Ms),ure=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jp(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dd(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Qp(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let l;for(r=0;r<o;r++)l=s[r],t.call(null,e[l],l,e)}}function sz(e,t){if(Qp(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,az=e=>!Yu(e)&&e!==Vl;function bE(){const{caseless:e,skipUndefined:t}=az(this)&&this||{},n={},r=(i,s)=>{const o=e&&sz(n,s)||s;Ny(n[o])&&Ny(i)?n[o]=bE(n[o],i):Ny(i)?n[o]=bE({},i):Dd(i)?n[o]=i.slice():(!t||!Yu(i))&&(n[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Jp(arguments[i],r);return n}const dre=(e,t,n,{allOwnKeys:r}={})=>(Jp(t,(i,s)=>{n&&ui(i)?e[s]=tz(i,n):e[s]=i},{allOwnKeys:r}),e),fre=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hre=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},pre=(e,t,n,r)=>{let i,s,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&aO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},mre=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},gre=e=>{if(!e)return null;if(Dd(e))return e;let t=e.length;if(!iz(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yre=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&aO(Uint8Array)),vre=(e,t)=>{const r=(e&&e[Nx]).call(e);let i;for(;
vendor: 5,320 bytes, line 542
542(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},xre=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bre=Ms("HTMLFormElement"),wre=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),kI=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),jre=Ms("RegExp"),oz=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jp(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},Sre=e=>{oz(e,(t,n)=>{if(ui(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ui(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Nre=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Dd(e)?r(e):r(String(e).split(t)),n},_re=()=>{},Ere=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Pre(e){return!!(e&&ui(e.append)&&e[nz]==="FormData"&&e[Nx])}const kre=e=>{const t=new Array(10),n=(r,i)=>{if(Zp(r)){if(t.indexOf(r)>=0)return;if(Qp(r))return r;if(!("toJSON"in r)){t[i]=r;const s=Dd(r)?[]:{};return Jp(r,(o,l)=>{const c=n(o,i+1);!Yu(c)&&(s[l]=c)}),t[i]=void 0,s}}return r};return n(e,0)},Ore=Ms("AsyncFunction"),Are=e=>e&&(Zp(e)||ui(e))&&ui(e.then)&&ui(e.catch),lz=((e,t)=>e?setImmediate:t?((n,r)=>(Vl.addEventListener("message",({source:i,data:s})=>{i===Vl&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Vl.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ui(Vl.postMessage)),Cre=typeof queueMicrotask<"u"?queueMicrotask.bind(Vl):typeof process<"u"&&process.nextTick||lz,Tre=e=>e!=null&&ui(e[Nx]),ge={isArray:Dd,isArrayBuffer:rz,isBuffer:Qp,isFormData:ire,isArrayBufferView:Yne,isString:Xne,isNumber:iz,isBoolean:Qne,isObject:Zp,isPlainObject:Ny,isEmptyObject:Zne,isReadableStream:are,isRequest:ore,isResponse:lre,isHeaders:cre,isUndefined:Yu,isDate:Jne,isFile:ere,isBlob:tre,isRegExp:jre,isFunction:ui,isStream:rre,isURLSearchParams:sre,isTypedArray:yre,isFileList:nre,forEach:Jp,merge:bE,extend:dre,trim:ure,stripBOM:fre,inherits:hre,toFlatObject:pre,kindOf:_x,kindOfTest:Ms,endsWith:mre,toArray:gre,forEachEntry:vre,matchAll:xre,isHTMLForm:bre,hasOwnProperty:kI,hasOwnProp:kI,reduceDescriptors:oz,freezeMethods:Sre,toObjectSet:Nre,toCamelCase:wre,noop:_re,toFiniteNumber:Ere,findKey:sz,global:Vl,isContextDefined:az,isSpecCompliantForm:Pre,toJSONObject:kre,isAsyncFn:Ore,isThenable:Are,setImmediate:lz,asap:Cre,isIterable:Tre};function Nt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ge.inherits(Nt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ge.toJSONObject(this.config),code:this.code,status:this.status}}});const cz=Nt.prototype,uz={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{uz[e]={value:e}});Object.defineProperties(Nt,uz);Object.defineProperty(cz,"isAxiosError",{value:!0});Nt.from=(e,t,n,r,i,s)=>{const o=Object.create(cz);ge.toFlatObject(e,o,function(d){return d!==Error.prototype},u=>u!=="isAxiosError");const l=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return Nt.call(o,l,c,n,r,i),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",s&&Object.assign(o,s),o};const Rre=null;function wE(e){return ge.isPlainObject(e)||ge.isArray(e)}function dz(e){return ge.endsWith(e,"[]")?e.slice(0,-2):e}function OI(e,t,n){return e?e.concat(t).map(function(i,s){return i=dz(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function Ire(e){return ge.isArray(e)&&!e.some(wE)}const Mre=ge.toFlatObject(ge,{},null,function(t){return/^is[A-Z]/.test(t)});function Px(e,t,n){if(!ge.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ge.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,v){return!ge.isUndefined(v[y])});const r=n.metaTokens,i=n.visitor||d,s=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&ge.isSpecCompliantForm(t);if(!ge.isFunction(i))throw new TypeError("visitor must be a function");function u(x){if(x===null)return"";if(ge.isDate(x))return x.toISOString();if(ge.isBoolean(x))return x.toString();if(!c&&ge.isBlob(x))throw new Nt("Blob is not supported. Use a Buffer instead.");return ge.isArrayBuffer(x)||ge.isTypedArray(x)?c&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,y,v){let b=x;if(x&&!v&&typeof x=="object"){if(ge.endsWith(y,"{}"))y=r?y:y.slice(0,-2),x=JSON.stringify(x);else if(ge.isArray(x)&&Ire(x)||(ge.isFileList(x)||ge.endsWith(y,"[]"))&&(b=ge.toArray(x)))return y=dz(y),b.forEach(function(N,S){!(ge.isUndefined(N)||N===null)&&t.append(o===!0?OI([y],S,s):o===null?y:y+"[]",u(N))}),!1}return wE(x)?!0:(t.append(OI(v,y,s),u(x)),!1)}const f=[],p=Object.assign(Mre,{defaultVisitor:d,convertValue:u,isVisitable:wE});
vendor: 4,178 bytes, line 542
542function m(x,y){if(!ge.isUndefined(x)){if(f.indexOf(x)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(x),ge.forEach(x,function(b,w){(!(ge.isUndefined(b)||b===null)&&i.call(t,b,ge.isString(w)?w.trim():w,y,p))===!0&&m(b,y?y.concat(w):[w])}),f.pop()}}if(!ge.isObject(e))throw new TypeError("data must be an object");return m(e),t}function AI(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function oO(e,t){this._pairs=[],e&&Px(e,this,t)}const fz=oO.prototype;fz.append=function(t,n){this._pairs.push([t,n])};fz.toString=function(t){const n=t?function(r){return t.call(this,r,AI)}:AI;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Dre(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hz(e,t,n){if(!t)return e;const r=n&&n.encode||Dre;ge.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=ge.isURLSearchParams(t)?t.toString():new oO(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class CI{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ge.forEach(this.handlers,function(r){r!==null&&t(r)})}}const pz={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Lre=typeof URLSearchParams<"u"?URLSearchParams:oO,$re=typeof FormData<"u"?FormData:null,Bre=typeof Blob<"u"?Blob:null,Fre={isBrowser:!0,classes:{URLSearchParams:Lre,FormData:$re,Blob:Bre},protocols:["http","https","file","blob","url","data"]},lO=typeof window<"u"&&typeof document<"u",jE=typeof navigator=="object"&&navigator||void 0,qre=lO&&(!jE||["ReactNative","NativeScript","NS"].indexOf(jE.product)<0),zre=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ure=lO&&window.location.href||"http://localhost",Vre=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:lO,hasStandardBrowserEnv:qre,hasStandardBrowserWebWorkerEnv:zre,navigator:jE,origin:Ure},Symbol.toStringTag,{value:"Module"})),Cr={...Vre,...Fre};function Wre(e,t){return Px(e,new Cr.classes.URLSearchParams,{visitor:function(n,r,i,s){return Cr.isNode&&ge.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Hre(e){return ge.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gre(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function mz(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=s>=n.length;return o=!o&&ge.isArray(i)?i.length:o,c?(ge.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!l):((!i[o]||!ge.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&ge.isArray(i[o])&&(i[o]=Gre(i[o])),!l)}if(ge.isFormData(e)&&ge.isFunction(e.entries)){const n={};return ge.forEachEntry(e,(r,i)=>{t(Hre(r),i,n,0)}),n}return null}function Kre(e,t,n){if(ge.isString(e))try{return(t||JSON.parse)(e),ge.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const em={transitional:pz,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=ge.isObject(t);if(s&&ge.isHTMLForm(t)&&(t=new FormData(t)),ge.isFormData(t))return i?JSON.stringify(mz(t)):t;if(ge.isArrayBuffer(t)||ge.isBuffer(t)||ge.isStream(t)||ge.isFile(t)||ge.isBlob(t)||ge.isReadableStream(t))return t;if(ge.isArrayBufferView(t))return t.buffer;if(ge.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Wre(t,this.formSerializer).toString();if((l=ge.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Px(l?{"files[]":t}
vendor: 4,299 bytes, lines 542-544
542:t,c&&new c,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),Kre(t)):t}],transformResponse:[function(t){const n=this.transitional||em.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ge.isResponse(t)||ge.isReadableStream(t))return t;if(t&&ge.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?Nt.from(l,Nt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Cr.classes.FormData,Blob:Cr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ge.forEach(["delete","get","head","post","put","patch"],e=>{em.headers[e]={}});const Yre=ge.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Xre=e=>{const t={};let n,r,i;return e&&e.split(` 543`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&Yre[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},TI=Symbol("internals");function qf(e){return e&&String(e).trim().toLowerCase()}function _y(e){return e===!1||e==null?e:ge.isArray(e)?e.map(_y):String(e)}function Qre(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Zre=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Bw(e,t,n,r,i){if(ge.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ge.isString(t)){if(ge.isString(r))return t.indexOf(r)!==-1;if(ge.isRegExp(r))return r.test(t)}}function Jre(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function eie(e,t){const n=ge.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let di=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(l,c,u){const d=qf(c);if(!d)throw new Error("header name must be a non-empty string");const f=ge.findKey(i,d);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=_y(l))}const o=(l,c)=>ge.forEach(l,(u,d)=>s(u,d,c));if(ge.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ge.isString(t)&&(t=t.trim())&&!Zre(t))o(Xre(t),n);else if(ge.isObject(t)&&ge.isIterable(t)){let l={},c,u;for(const d of t){if(!ge.isArray(d))throw TypeError("Object iterator must return a key-value pair");l[u=d[0]]=(c=l[u])?ge.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}o(l,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=qf(t),t){const r=ge.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Qre(i);if(ge.isFunction(n))return n.call(this,i,r);if(ge.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qf(t),t){const r=ge.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Bw(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=qf(o),o){const l=ge.findKey(r,o);l&&(!n||Bw(r,r[l],l,n))&&(delete r[l],i=!0)}}return ge.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||Bw(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return ge.forEach(this,(i,s)=>{const o=ge.findKey(r,s);if(o){n[o]=_y(i),delete n[s];return}const l=t?Jre(s):String(s).trim();l!==s&&delete n[s],n[l]=_y(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ge.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ge.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 544`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);
vendor: 4,680 bytes, line 544
544return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[TI]=this[TI]={accessors:{}}).accessors,i=this.prototype;function s(o){const l=qf(o);r[l]||(eie(i,o),r[l]=!0)}return ge.isArray(t)?t.forEach(s):s(t),this}};di.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ge.reduceDescriptors(di.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ge.freezeMethods(di);function Fw(e,t){const n=this||em,r=t||n,i=di.from(r.headers);let s=r.data;return ge.forEach(e,function(l){s=l.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function gz(e){return!!(e&&e.__CANCEL__)}function Ld(e,t,n){Nt.call(this,e??"canceled",Nt.ERR_CANCELED,t,n),this.name="CanceledError"}ge.inherits(Ld,Nt,{__CANCEL__:!0});function yz(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Nt("Request failed with status code "+n.status,[Nt.ERR_BAD_REQUEST,Nt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function tie(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function nie(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[s];o||(o=u),n[i]=c,r[i]=u;let f=s,p=0;for(;f!==i;)p+=n[f++],f=f%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const m=d&&u-d;return m?Math.round(p*1e3/m):void 0}}function rie(e,t){let n=0,r=1e3/t,i,s;const o=(u,d=Date.now())=>{n=d,i=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?o(u,d):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const Gy=(e,t,n=3)=>{let r=0;const i=nie(50,250);return rie(s=>{const o=s.loaded,l=s.lengthComputable?s.total:void 0,c=o-r,u=i(c),d=o<=l;r=o;const f={loaded:o,total:l,progress:l?o/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-o)/u:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},RI=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},II=e=>(...t)=>ge.asap(()=>e(...t)),iie=Cr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Cr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Cr.origin),Cr.navigator&&/(msie|trident)/i.test(Cr.navigator.userAgent)):()=>!0,sie=Cr.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];ge.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ge.isString(r)&&o.push("path="+r),ge.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function aie(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function oie(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function vz(e,t,n){let r=!aie(t);return e&&(r||n==!1)?oie(e,t):t}const MI=e=>e instanceof di?{...e}:e;function pc(e,t){t=t||{};const n={};function r(u,d,f,p){return ge.isPlainObject(u)&&ge.isPlainObject(d)?ge.merge.call({caseless:p},u,d):ge.isPlainObject(d)?ge.merge({},d):ge.isArray(d)?d.slice():d}function i(u,d,f,p){if(ge.isUndefined(d)){if(!ge.isUndefined(u))return r(void 0,u,f,p)}else return r(u,d,f,p)}function s(u,d){if(!ge.isUndefined(d))return r(void 0,d)}function o(u,d){if(ge.isUndefined(d)){if(!ge.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function l(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(u,d,f)=>i(MI(u),MI(d),f,!0)};return ge.forEach(Object.keys({...e,...t}),function(d){const f=c[d]||i,p=f(e[d],t[d],d);ge.isUndefined(p)&&f!==l||(n[d]=p)}),n}const xz=e=>{const t=pc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:l}=t;if(t.headers=o=di.from(o),t.url=hz(vz(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),ge.isFormData(n)){if(Cr.hasStandardBrowserEnv||Cr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(ge.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];
vendor: 4,196 bytes, line 544
544Object.entries(c).forEach(([d,f])=>{u.includes(d.toLowerCase())&&o.set(d,f)})}}if(Cr.hasStandardBrowserEnv&&(r&&ge.isFunction(r)&&(r=r(t)),r||r!==!1&&iie(t.url))){const c=i&&s&&sie.read(s);c&&o.set(i,c)}return t},lie=typeof XMLHttpRequest<"u",cie=lie&&function(e){return new Promise(function(n,r){const i=xz(e);let s=i.data;const o=di.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=i,d,f,p,m,x;function y(){m&&m(),x&&x(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function b(){if(!v)return;const N=di.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),_={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:N,config:e,request:v};yz(function(k){n(k),y()},function(k){r(k),y()},_),v=null}"onloadend"in v?v.onloadend=b:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(b)},v.onabort=function(){v&&(r(new Nt("Request aborted",Nt.ECONNABORTED,e,v)),v=null)},v.onerror=function(S){const _=S&&S.message?S.message:"Network Error",E=new Nt(_,Nt.ERR_NETWORK,e,v);E.event=S||null,r(E),v=null},v.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const _=i.transitional||pz;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Nt(S,_.clarifyTimeoutError?Nt.ETIMEDOUT:Nt.ECONNABORTED,e,v)),v=null},s===void 0&&o.setContentType(null),"setRequestHeader"in v&&ge.forEach(o.toJSON(),function(S,_){v.setRequestHeader(_,S)}),ge.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),l&&l!=="json"&&(v.responseType=i.responseType),u&&([p,x]=Gy(u,!0),v.addEventListener("progress",p)),c&&v.upload&&([f,m]=Gy(c),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(d=N=>{v&&(r(!N||N.type?new Ld(null,e,v):N),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const w=tie(i.url);if(w&&Cr.protocols.indexOf(w)===-1){r(new Nt("Unsupported protocol "+w+":",Nt.ERR_BAD_REQUEST,e));return}v.send(s||null)})},uie=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,l();const d=u instanceof Error?u:this.reason;r.abort(d instanceof Nt?d:new Ld(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,s(new Nt(`timeout ${t} of ms exceeded`,Nt.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>ge.asap(l),c}},die=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},fie=async function*(e,t){for await(const n of hie(e))yield*die(n,t)},hie=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},DI=(e,t,n,r)=>{const i=fie(e,t);let s=0,o,l=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await i.next();if(u){l(),c.close();return}let f=d.byteLength;if(n){let p=s+=f;n(p)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},LI=64*1024,{isFunction:Lg}=ge,pie=(({Request:e,Response:t})=>({Request:e,Response:t}))(ge.global),{ReadableStream:$I,TextEncoder:BI}=ge.global,FI=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mie=e=>{e=ge.merge.call({skipUndefined:!0},pie,e);const{fetch:t,Request:n,Response:r}=e,i=t?Lg(t):typeof fetch=="function",s=Lg(n),o=Lg(r);if(!i)return!1;const l=i&&Lg($I),c=i&&(typeof BI=="function"?(x=>y=>x.encode(y))(new BI):async x=>new Uint8Array(await new n(x).arrayBuffer())),u=s&&l&&FI(()=>{let x=!1;const y=new n(Cr.origin,{body:new $I,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!y}),d=o&&l&&FI(()=>
vendor: 8,639 bytes, lines 544-547
544ge.isReadableStream(new r("").body)),f={stream:d&&(x=>x.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!f[x]&&(f[x]=(y,v)=>{let b=y&&y[x];if(b)return b.call(y);throw new Nt(`Response type '${x}' is not supported`,Nt.ERR_NOT_SUPPORT,v)})});const p=async x=>{if(x==null)return 0;if(ge.isBlob(x))return x.size;if(ge.isSpecCompliantForm(x))return(await new n(Cr.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(ge.isArrayBufferView(x)||ge.isArrayBuffer(x))return x.byteLength;if(ge.isURLSearchParams(x)&&(x=x+""),ge.isString(x))return(await c(x)).byteLength},m=async(x,y)=>{const v=ge.toFiniteNumber(x.getContentLength());return v??p(y)};return async x=>{let{url:y,method:v,data:b,signal:w,cancelToken:N,timeout:S,onDownloadProgress:_,onUploadProgress:E,responseType:k,headers:O,withCredentials:I="same-origin",fetchOptions:A}=xz(x),C=t||fetch;k=k?(k+"").toLowerCase():"text";let R=uie([w,N&&N.toAbortSignal()],S),D=null;const q=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let F;try{if(E&&u&&v!=="get"&&v!=="head"&&(F=await m(O,b))!==0){let $=new n(y,{method:"POST",body:b,duplex:"half"}),V;if(ge.isFormData(b)&&(V=$.headers.get("content-type"))&&O.setContentType(V),$.body){const[z,Q]=RI(F,Gy(II(E)));b=DI($.body,LI,z,Q)}}ge.isString(I)||(I=I?"include":"omit");const H=s&&"credentials"in n.prototype,U={...A,signal:R,method:v.toUpperCase(),headers:O.normalize().toJSON(),body:b,duplex:"half",credentials:H?I:void 0};D=s&&new n(y,U);let W=await(s?C(D,A):C(y,U));const G=d&&(k==="stream"||k==="response");if(d&&(_||G&&q)){const $={};["status","statusText","headers"].forEach(J=>{$[J]=W[J]});const V=ge.toFiniteNumber(W.headers.get("content-length")),[z,Q]=_&&RI(V,Gy(II(_),!0))||[];W=new r(DI(W.body,LI,z,()=>{Q&&Q(),q&&q()}),$)}k=k||"text";let L=await f[ge.findKey(f,k)||"text"](W,x);return!G&&q&&q(),await new Promise(($,V)=>{yz($,V,{data:L,headers:di.from(W.headers),status:W.status,statusText:W.statusText,config:x,request:D})})}catch(H){throw q&&q(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new Nt("Network Error",Nt.ERR_NETWORK,x,D),{cause:H.cause||H}):Nt.from(H,H&&H.code,x,D)}}},gie=new Map,bz=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:i}=t,s=[r,i,n];let o=s.length,l=o,c,u,d=gie;for(;l--;)c=s[l],u=d.get(c),u===void 0&&d.set(c,u=l?new Map:mie(t)),d=u;return u};bz();const SE={http:Rre,xhr:cie,fetch:{get:bz}};ge.forEach(SE,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qI=e=>`- ${e}`,yie=e=>ge.isFunction(e)||e===null||e===!1,wz={getAdapter:(e,t)=>{e=ge.isArray(e)?e:[e];const{length:n}=e;let r,i;const s={};for(let o=0;o<n;o++){r=e[o];let l;if(i=r,!yie(r)&&(i=SE[(l=String(r)).toLowerCase()],i===void 0))throw new Nt(`Unknown adapter '${l}'`);if(i&&(ge.isFunction(i)||(i=i.get(t))))break;s[l||"#"+o]=i}if(!i){const o=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since : 545`+o.map(qI).join(` 546`):" "+qI(o[0]):"as no adapter specified";throw new Nt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return i},adapters:SE};function qw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ld(null,e)}function zI(e){return qw(e),e.headers=di.from(e.headers),e.data=Fw.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wz.getAdapter(e.adapter||em.adapter,e)(e).then(function(r){return qw(e),r.data=Fw.call(e,e.transformResponse,r),r.headers=di.from(r.headers),r},function(r){return gz(r)||(qw(e),r&&r.response&&(r.response.data=Fw.call(e,e.transformResponse,r.response),r.response.headers=di.from(r.response.headers))),Promise.reject(r)})}const jz="1.12.2",kx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{kx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const UI={};kx.transitional=function(t,n,r){function i(s,o){return"[Axios v"+jz+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,l)=>{if(t===!1)throw new Nt(i(o," has been removed"+(n?" in "+n:"")),Nt.ERR_DEPRECATED);return n&&!UI[o]&&(UI[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,l):!0}};kx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function vie(e,t,n){if(typeof e!="object")throw new Nt("options must be an object",Nt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const l=e[s],c=l===void 0||o(l,s,e);if(c!==!0)throw new Nt("option "+s+" must be "+c,Nt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Nt("Unknown option "+s,Nt.ERR_BAD_OPTION)}}const Ey={assertOptions:vie,validators:kx},Vs=Ey.validators;let ac=class{constructor(t){this.defaults=t||{},this.interceptors={request:new CI,response:new CI}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` 547`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=pc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ey.assertOptions(r,{silentJSONParsing:Vs.transitional(Vs.boolean),forcedJSONParsing:Vs.transitional(Vs.boolean),clarifyTimeoutError:Vs.transitional(Vs.boolean)},!1),i!=null&&(ge.isFunction(i)?n.paramsSerializer={serialize:i}:Ey.assertOptions(i,{encode:Vs.function,serialize:Vs.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ey.assertOptions(n,{baseUrl:Vs.spelling("baseURL"),withXsrfToken:Vs.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&ge.merge(s.common,s[n.method]);s&&ge.forEach(["delete","get","head","post","put","patch","common"],x=>{delete s[x]}),n.headers=di.concat(o,s);const l=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let d,f=0,p;if(!c){const x=[zI.bind(this),void 0];for(x.unshift(...l),x.push(...u),p=x.length,d=Promise.resolve(n);f<p;)d=d.then(x[f++],x[f++]);return d}p=l.length;let m=n;for(;f<p;){const x=l[f++],y=l[f++];try{m=x(m)}catch(v){y.call(this,v);break}}try{d=zI.call(this,m)}catch(x){return Promise.reject(x)}for(f=0,p=u.length;f<p;)d=d.then(u[f++],u[f++]);return d}getUri(t){t=pc(this.defaults,t);const n=vz(t.baseURL,t.url,t.allowAbsoluteUrls);return hz(n,t.params,t.paramsSerializer)}};ge.forEach(["delete","get","head","options"],function(t){ac.prototype[t]=function(n,r){return this.request(pc(r||{},{method:t,url:n,data:(r||{}).data}))}});ge.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,l){return this.request(pc(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}ac.prototype[t]=n(),ac.prototype[t+"Form"]=n(!0)});let xie=class Sz{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(l=>{r.subscribe(l),s=l}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,l){r.reason||(r.reason=new Ld(s,o,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Sz(function(i){t=i}),cancel:t}}};function bie(e){return function(n){return e.apply(null,n)}}function wie(e){return ge.isObject(e)&&e.isAxiosError===!0}const NE={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
547alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(NE).forEach(([e,t])=>{NE[t]=e});function Nz(e){const t=new ac(e),n=tz(ac.prototype.request,t);return ge.extend(n,ac.prototype,t,{allOwnKeys:!0}),ge.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Nz(pc(e,i))},n}const In=Nz(em);In.Axios=ac;In.CanceledError=Ld;In.CancelToken=xie;In.isCancel=gz;In.VERSION=jz;In.toFormData=Px;In.AxiosError=Nt;In.Cancel=In.CanceledError;In.all=function(t){return Promise.all(t)};In.spread=bie;In.isAxiosError=wie;In.mergeConfig=pc;In.AxiosHeaders=di;In.formToJSON=e=>
547mz(ge.isHTMLForm(e)?new FormData(e):e);In.getAdapter=wz.getAdapter;In.HttpStatusCode=NE;In.default=In;const{Axios:L6e,AxiosError:$6e,CanceledError:B6e,isCancel:F6e,CancelToken:q6e,VERSION:z6e,all:U6e,Cancel:V6e,isAxiosError:W6e,spread:H6e,toFormData:G6e,AxiosHeaders:K6e,HttpStatusCode:Y6e,formToJSON:X6e,getAdapter:Q6e,mergeConfig:Z6e}=In,jie=typeof window>"u",VI=!jie&&window.self!==window.top,zw=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),gr=[];for(let e=0;e<256;++e)gr.push((e+256).toString(16).slice(1));function Sie(e,t=0){return(gr[e[t+0]]+gr[e[t+1]]+gr[e[t+2]]+gr[e[t+3]]+"-"+gr[e[t+4]]+gr[e[t+5]]+"-"+gr[e[t+6]]+gr[e[t+7]]+"-"+gr[e[t+8]]+gr[e[t+9]]+"-"+gr[e[t+10]]+gr[e[t+11]]+gr[e[t+12]]+gr[e[t+13]]+gr[e[t+14]]+gr[e[t+15]]).toLowerCase()}let Uw;const Nie=new Uint8Array(16);function _ie(){if(!Uw){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Uw=crypto.getRandomValues.bind(crypto)}return Uw(Nie)}const Eie=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),WI={randomUUID:Eie};function Pie(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??_ie();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Sie(r)}function kie(e,t,n){return WI.randomUUID&&!e?WI.randomUUID():Pie(e)}class Oie extends Error{constructor(t,n,r,i,s){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=s}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function fh({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const s=In.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(s.defaults.headers.common.Authorization=`Bearer ${n}`),s.interceptors.request.use(o=>{typeof window<"u"&&o.headers.set("X-Origin-URL",window.location.href);const l=kie();if(o.requestId=l,VI)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),r&&s.interceptors.response.use(o=>{var l;const c=(l=o.config)===null||l===void 0?void 0:l.requestId;try{VI&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var l,c,u,d,f,p,m,x;const y=((c=(l=o.response)===null||l===void 0?void 0:l.data)===null||c===void 0?void 0:c.message)||((d=(u=o.response)===null||u===void 0?void 0:u.data)===null||d===void 0?void 0:d.detail)||o.message,v=new Oie(y,(f=o.response)===null||f===void 0?void 0:f.status,(m=(p=o.response)===null||p===void 0?void 0:p.data)===null||m===void 0?void 0:m.code,(x=o.response)===null||x===void 0?void 0:x.data,o);return i==null||i(v),Promise.reject(v)}),s}function HI(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,s){if(!(typeof s!="string"||s==="then"||s.startsWith("_")))return Cie(t,n,s,r)}})}function Aie(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function Cie(e,t,n,r){const i=`/apps/${t}/entities/${n}`;return{async list(s,o,l,c){const u={};return s&&(u.sort=s),o&&(u.limit=o),l&&(u.skip=l),c&&(u.fields=Array.isArray(c)?c.join(","):c),e.get(i,{params:u})},async filter(s,o,l,c,u){const d={q:JSON.stringify(s)};return o&&(d.sort=o),l&&(d.limit=l),c&&(d.skip=c),u&&(d.fields=Array.isArray(u)?u.join(","):u),e.get(i,{params:d})},async get(s){return e.get(`${i}/${s}`)},async create(s){return e.post(i,s)},async update(s,o){return e.put(`${i}/${s}`,o)},async delete(s){return e.delete(`${i}/${s}`)},async deleteMany(s){return e.delete(i,{data:s})},async bulkCreate(s){return e.post(`${i}/bulk`,s)},async updateMany(s,o){return e.patch(`${i}/update-many`,{query:s,data:o})},async bulkUpdate(s){return e.put(`${i}/bulk`,s)},async importEntities(s){const o=new FormData;return o.append("file",s,s.name),e.post(`${i}/import`,o,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(s){const o=`entities:${t}:${n}`;return r().subscribeToRoom(o,{update_model:u=>{const d=Aie(u.data);if(d)try{s(d)}catch(f){console.error("[Base44 SDK] Subscription callback error:",f)}}})}}}function Tie(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:s,queryParams:o,...l}=i??{},c={...l,...s&&{path_params:s},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,c)}}}function GI(e,t){const n=Tie(e,t);return new Proxy({}
547,{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${l}`);let c,u;return l instanceof FormData||l&&Object.values(l).some(d=>d instanceof File)?(c=new FormData,Object.keys(l).forEach(d=>{l[d]instanceof File?c.append(d,l[d],l[d].name):typeof l[d]=="object"&&l[d]!==null?c.append(d,JSON.stringify(l[d])):c.append(d,l[d])}),u="multipart/form-data"):(c=l,u="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,c||l,{headers:{"Content-Type":u}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${o}`,c||l,{headers:{"Content-Type":u}})}}})}})}function Rie(e,t,n,r){return{async me(){return e.get(`/apps/${n}/entities/User/me`)},async updateMe(i){return e.put(`/apps/${n}/entities/User/me`,i)},redirectToLogin(i){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const s=i?new URL(i,window.location.origin).toString():window.location.href,o=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(s)}`;window.location.href=o},loginWithProvider(i,s="/"){const o=new URL(s,window.location.origin).toString(),l=`app_id=${n}&from_url=${encodeURIComponent(o)}`;let c;i==="sso"?c=`/apps/${n}/auth/sso/login`:c=`/apps/auth${i==="google"?"":`/${i}`}/login`;const u=`${r.appBaseUrl}/api${c}?${l}`;window.location.href=u},logout(i){if(delete e.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(l){console.error("Failed to remove token from localStorage:",l)}const s=i||window.location.href,o=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(s)}`;window.location.href=o}},setToken(i,s=!0){if(i&&(e.defaults.headers.common.Authorization=`Bearer ${i}`,t.defaults.headers.common.Authorization=`Bearer ${i}`,s&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",i),window.localStorage.setItem("token",i)}catch(o){console.error("Failed to save token to localStorage:",o)}},async loginViaEmailPassword(i,s,o){var l;try{const c=await e.post(`/apps/${n}/auth/login`,{email:i,password:s,...o&&{turnstile_token:o}}),{access_token:u,user:d}=c;return u&&this.setToken(u),{access_token:u,user:d}}catch(c){throw((l=c.response)===null||l===void 0?void 0:l.status)===401&&await this.logout(),c}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(i,s){return e.post(`/apps/${n}/users/invite-user`,{user_email:i,role:s})},register(i){return e.post(`/apps/${n}/auth/register`,i)},verifyOtp({email:i,otpCode:s}){return e.post(`/apps/${n}/auth/verify-otp`,{email:i,otp_code:s})},resendOtp(i){return e.post(`/apps/${n}/auth/resend-otp`,{email:i})},resetPasswordRequest(i){return e.post(`/apps/${n}/auth/reset-password-request`,{email:i})},resetPassword({resetToken:i,newPassword:s}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:i,new_password:s})},changePassword({userId:i,currentPassword:s,newPassword:o}){return e.post(`/apps/${n}/auth/change-password`,{user_id:i,current_password:s,new_password:o})}}}function Iie(e,t,n){return{async getAccessToken(r){const i=`/apps/${t}/auth/sso/accesstoken/${r}`,s={};return n&&(s["on-behalf-of"]=`Bearer ${n}`),e.get(i,{headers:s})}}}function Mie(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const s=await e.get(`/apps/${t}/external-auth/tokens/${n}`);return{accessToken:s.access_token,connectionConfig:(r=s.connection_config)!==null&&r!==void 0?r:null}}}}function Die(e,t){return{async getCurrentAppUserAccessToken(n){if(!n||typeof n!="str
547ing")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${n}/token`)).access_token},async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${n}`)}}}function Ky(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let s=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(s=o.get(n),s){if(r&&Lie(s,{storageKey:t}),i){o.delete(n);const l=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return s}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return s=window.localStorage.getItem(t),s}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function Lie(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function KI(e,t,n){const r=(s,o)=>s?`${String(s).replace(/\/$/,"")}${o}`:o,i=s=>{const o=new Headers;if(n!=null&&n.getAuthHeaders){const l=n.getAuthHeaders();Object.entries(l).forEach(([c,u])=>{u!=null&&o.set(c,String(u))})}return s&&new Headers(s).forEach((l,c)=>{o.set(c,l)}),o};return{async invoke(s,o){if(typeof o=="string")throw new Error(`Function ${s} must receive an object with named parameters, received: ${o}`);let l,c;return o instanceof FormData||o&&Object.values(o).some(u=>u instanceof File)?(l=new FormData,Object.keys(o).forEach(u=>{o[u]instanceof File?l.append(u,o[u],o[u].name):typeof o[u]=="object"&&o[u]!==null?l.append(u,JSON.stringify(o[u])):l.append(u,o[u])}),c="multipart/form-data"):(l=o,c="application/json"),e.post(`/apps/${t}/functions/${s}`,l||o,{headers:{"Content-Type":c}})},async fetch(s,o={}){const c=`/functions${s.startsWith("/")?s:`/${s}`}`,u=i(o.headers),d={...o,headers:u};return await fetch(r(n==null?void 0:n.baseURL,c),d)}}}function YI({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const s=`/apps/${n}/agents`,o={},l=()=>e.get(`${s}/conversations`),c=x=>e.get(`${s}/conversations/${x}`);return{getConversations:l,getConversation:c,listConversations:x=>e.get(`${s}/conversations`,{params:x}),createConversation:x=>e.post(`${s}/conversations`,x),addMessage:async(x,y)=>e.post(`${s}/conversations/v2/${x.id}/messages`,y),subscribeToConversation:(x,y)=>{const v=`/agent-conversations/${x}`,b=t(),w=c(x).then(N=>(o[x]=N,N));return b.subscribeToRoom(v,{connect:()=>{},update_model:async({data:N})=>{const S=JSON.parse(N);if(S._message){await w;const _=S._message,E=o[x];if(E){const k=E.messages||[],O=k.findIndex(A=>A.id===_.id),I=O!==-1?k.map((A,C)=>C===O?_:A):[...k,_];o[x]={...E,messages:I},y==null||y(o[x])}}}})},getWhatsAppConnectURL:x=>{const y=`${r}/api/apps/${n}/agents/${encodeURIComponent(x)}/whatsapp`,v=i??Ky();return v?`${y}?token=${v}`:y}}}function XI(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function $ie(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const sa=Object.create(null);sa.open="0";sa.close="1";sa.ping="2";sa.pong="3";sa.message="4";sa.upgrade="5";sa.noop="6";const Py=Object.create(null);Object.keys(sa).forEach(e=>{Py[sa[e]]=e});const _E={type:"error",data:"parser error"},_z=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ez=typeof ArrayBuffer=="function",Pz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cO=({type:e,data:t},n,r)=>
vendor: 39,585 bytes, line 547
547_z&&t instanceof Blob?n?r(t):QI(t,r):Ez&&(t instanceof ArrayBuffer||Pz(t))?n?r(t):QI(new Blob([t]),r):r(sa[e]+(t||"")),QI=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function ZI(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Vw;function Bie(e,t){if(_z&&e.data instanceof Blob)return e.data.arrayBuffer().then(ZI).then(t);if(Ez&&(e.data instanceof ArrayBuffer||Pz(e.data)))return t(ZI(e.data));cO(e,!1,n=>{Vw||(Vw=new TextEncoder),t(Vw.encode(n))})}const JI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hh=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<JI.length;e++)hh[JI.charCodeAt(e)]=e;const Fie=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)s=hh[e.charCodeAt(r)],o=hh[e.charCodeAt(r+1)],l=hh[e.charCodeAt(r+2)],c=hh[e.charCodeAt(r+3)],d[i++]=s<<2|o>>4,d[i++]=(o&15)<<4|l>>2,d[i++]=(l&3)<<6|c&63;return u},qie=typeof ArrayBuffer=="function",uO=(e,t)=>{if(typeof e!="string")return{type:"message",data:kz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:zie(e.substring(1),t)}:Py[n]?e.length>1?{type:Py[n],data:e.substring(1)}:{type:Py[n]}:_E},zie=(e,t)=>{if(qie){const n=Fie(e);return kz(n,t)}else return{base64:!0,data:e}},kz=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Oz="�",Uie=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{cO(s,!1,l=>{r[o]=l,++i===n&&t(r.join(Oz))})})},Vie=(e,t)=>{const n=e.split(Oz),r=[];for(let i=0;i<n.length;i++){const s=uO(n[i],t);if(r.push(s),s.type==="error")break}return r};function Wie(){return new TransformStream({transform(e,t){Bie(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let Ww;function $g(e){return e.reduce((t,n)=>t+n.length,0)}function Bg(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Hie(e,t){Ww||(Ww=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,l){for(n.push(o);;){if(r===0){if($g(n)<1)break;const c=Bg(n,1);s=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if($g(n)<2)break;const c=Bg(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if($g(n)<8)break;const c=Bg(n,8),u=new DataView(c.buffer,c.byteOffset,c.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){l.enqueue(_E);break}i=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if($g(n)<i)break;const c=Bg(n,i);l.enqueue(uO(s?c:Ww.decode(c),t)),r=0}if(i===0||i>e){l.enqueue(_E);break}}}})}const Az=4;function qn(e){if(e)return Gie(e)}function Gie(e){for(var t in qn.prototype)e[t]=qn.prototype[t];return e}qn.prototype.on=qn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};qn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};qn.prototype.off=qn.prototype.removeListener=qn.prototype.removeAllListeners=qn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};qn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};qn.prototype.emitReserved=qn.prototype.emit;qn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};qn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Ox=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),es=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Kie="arraybuffer";function Cz(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Yie=es.setTimeout,Xie=es.clearTimeout;function Ax(e,t){t.useNativeTimers?(e.setTimeoutFn=Yie.bind(es),e.clearTimeoutFn=Xie.bind(es)):(e.setTimeoutFn=es.setTimeout.bind(es),e.clearTimeoutFn=es.clearTimeout.bind(es))}const Qie=1.33;function Zie(e){return typeof e=="string"?Jie(e):Math.ceil((e.byteLength||e.size)*Qie)}function Jie(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Tz(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ese(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function tse(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class nse extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dO extends qn{constructor(t){super(),this.writable=!1,Ax(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new nse(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=uO(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=ese(t);return n.length?"?"+n:""}}class rse extends dO{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Vie(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Uie(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Tz()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Rz=!1;try{Rz=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const ise=Rz;function sse(){}class ase extends rse{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Js extends qn{constructor(t,n,r){super(),this.createRequest=t,Ax(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Cz(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Js.requestsCount++,Js.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=sse,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Js.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Js.requestsCount=0;Js.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",eM);else if(typeof addEventListener=="function"){const e="onpagehide"in es?"pagehide":"unload";addEventListener(e,eM,!1)}}function eM(){for(let e in Js.requests)Js.requests.hasOwnProperty(e)&&Js.requests[e].abort()}const ose=(function(){const e=Iz({xdomain:!1});return e&&e.responseType!==null})();class lse extends ase{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=ose&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Js(Iz,this.uri(),t)}}function Iz(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||ise))return new XMLHttpRequest}catch{}if(!t)try{return new es[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Mz=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class cse extends dO{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Mz?{}:Cz(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;cO(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Ox(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Tz()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Hw=es.WebSocket||es.MozWebSocket;class use extends cse{createSocket(t,n,r){return Mz?new Hw(t,n,r):n?new Hw(t,n):new Hw(t)}doWrite(t,n){this.ws.send(n)}}class dse extends dO{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Hie(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Wie();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),s())}).catch(l=>{})};s();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Ox(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const fse={websocket:use,webtransport:dse,polling:lse},hse=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pse=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function EE(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=hse.exec(e||""),s={},o=14;for(;o--;)s[pse[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=mse(s,s.path),s.queryKey=gse(s,s.query),s}function mse(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function gse(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const PE=typeof addEventListener=="function"&&typeof removeEventListener=="function",ky=[];PE&&addEventListener("offline",()=>{ky.forEach(e=>e())},!1);class Vo extends qn{constructor(t,n){if(super(),this.binaryType=Kie,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=EE(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=EE(n.host).host);Ax(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=tse(this.opts.query)),PE&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ky.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Az,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Vo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Vo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Zie(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ox(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Vo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),PE&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ky.indexOf(this._offlineEventListener);r!==-1&&ky.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Vo.protocol=Az;class yse extends Vo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Vo.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Vo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function s(){r||(r=!0,d(),n.close(),n=null)}const o=f=>{const p=new Error("probe error: "+f);p.transport=n.name,s(),this.emitReserved("upgradeError",p)};function l(){o("transport closed")}function c(){o("socket closed")}function u(f){n&&f.name!==n.name&&s()}const d=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",l),this.off("close",c),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",l),this.once("close",c),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let vse=class extends yse{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>fse[i]).filter(i=>!!i)),super(t,r)}};function xse(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=EE(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const bse=typeof ArrayBuffer=="function",wse=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Dz=Object.prototype.toString,jse=typeof Blob=="function"||typeof Blob<"u"&&Dz.call(Blob)==="[object BlobConstructor]",Sse=typeof File=="function"||typeof File<"u"&&Dz.call(File)==="[object FileConstructor]";function fO(e){return bse&&(e instanceof ArrayBuffer||wse(e))||jse&&e instanceof Blob||Sse&&e instanceof File}function Oy(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Oy(e[n]))return!0;return!1}if(fO(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Oy(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Oy(e[n]))return!0;return!1}function Nse(e){const t=[],n=e.data,r=e;return r.data=kE(n,t),r.attachments=t.length,{packet:r,buffers:t}}function kE(e,t){if(!e)return e;if(fO(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=kE(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=kE(e[r],t));return n}return e}function _se(e,t){return e.data=OE(e.data,t),delete e.attachments,e}function OE(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=OE(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=OE(e[n],t));return e}const Ese=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Pse=5;var It;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(It||(It={}));class kse{constructor(t){this.replacer=t}encode(t){return(t.type===It.EVENT||t.type===It.ACK)&&Oy(t)?this.encodeAsBinary({type:t.type===It.EVENT?It.BINARY_EVENT:It.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===It.BINARY_EVENT||t.type===It.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Nse(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function tM(e){return Object.prototype.toString.call(e)==="[object Object]"}class hO extends qn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===It.BINARY_EVENT;r||n.type===It.BINARY_ACK?(n.type=r?It.EVENT:It.ACK,this.reconstructor=new Ose(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(fO(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(It[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===It.BINARY_EVENT||r.type===It.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(hO.isPayloadValid(r.type,s))r.data=s;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case It.CONNECT:return tM(n);case It.DISCONNECT:return n===void 0;case It.CONNECT_ERROR:return typeof n=="string"||tM(n);case It.EVENT:case It.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Ese.indexOf(n[0])===-1);case It.ACK:case It.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ose{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=_se(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ase=Object.freeze(Object.defineProperty({__proto__:null,Decoder:hO,Encoder:kse,get PacketType(){return It},protocol:Pse},Symbol.toStringTag,{value:"Module"}));function Ns(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Cse=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Lz extends qn{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Ns(t,"open",this.onopen.bind(this)),Ns(t,"packet",this.onpacket.bind(this)),Ns(t,"error",this.onerror.bind(this)),Ns(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(Cse.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:It.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),o.id=d}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),o=(...l)=>{this.io.clearTimeoutFn(s),n.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,l)=>o?i(o):r(l);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:It.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case It.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case It.EVENT:case It.BINARY_EVENT:this.onevent(t);break;case It.ACK:case It.BINARY_ACK:this.onack(t);break;case It.DISCONNECT:this.ondisconnect();break;case It.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:It.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:It.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function $d(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}$d.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};$d.prototype.reset=function(){this.attempts=0};$d.prototype.setMin=function(e){this.ms=e};$d.prototype.setMax=function(e){this.max=e};$d.prototype.setJitter=function(e){this.jitter=e};class AE extends qn{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ax(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new $d({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Ase;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new vse(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Ns(n,"open",function(){r.onopen(),t&&t()}),s=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=Ns(n,"error",s);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Ns(t,"ping",this.onping.bind(this)),Ns(t,"data",this.ondata.bind(this)),Ns(t,"error",this.onerror.bind(this)),Ns(t,"close",this.onclose.bind(this)),Ns(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Ox(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Lz(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
547cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const zf={};function Ay(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=xse(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=zf[i]&&s in zf[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new AE(r,t):(zf[i]||(zf[i]=new AE(r,t)),c=zf[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Ay,{Manager:AE,Socket:Lz,io:Ay,connect:Ay});function nM(e,t){var n;const r=Ay(e.serverUrl,{path:e.mountPath,transports:e.transports,query:{app_id:e.appId,token:(n=e.token)!==null&&n!==void 0?n:Ky()}});return r.on("connect",async()=>{var i;return console.log("connect",r.id),(i=t.connect)===null||i===void 0?void 0:i.call(t)}),r.on("update_model",async i=>{var s;return(s=t.update_model)===null||s===void 0?void 0:s.call(t,i)}),r.on("error",async i=>{var s;return(s=t.error)===null||s===void 0?void 0:s.call(t,i)}),r.on("connect_error",async i=>{var s;return console.error("connect_error",i),(s=t.error)===null||s===void 0?void 0:s.call(t,i)}),r}function Tse({config:e}){let t={...e};const n={},r={connect:async()=>{const m=[];Object.keys(n).forEach(x=>{c(x);const y=f(x);y==null||y.forEach(({connect:v})=>{const b=async()=>v==null?void 0:v();m.push(b())})}),await Promise.all(m)},update_model:async m=>{const y=f(m.room).map(v=>{var b;return(b=v.update_model)===null||b===void 0?void 0:b.call(v,m)});await Promise.all(y)},error:async m=>{console.error("error",m);const x=Object.values(n).flat().map(y=>{var v;return(v=y.error)===null||v===void 0?void 0:v.call(y,m)});await Promise.all(x)}};let i=nM(e,r);function s(){o()}function o(){i&&i.disconnect()}function l(m){s(),t={...t,...m},i=nM(t,r)}function c(m){i.emit("join",m)}function u(m){i.emit("leave",m)}async function d(m,x){var y;const v=JSON.stringify(x);return(y=r.update_model)===null||y===void 0?void 0:y.call(r,{room:m,data:v})}function f(m){return n[m]}return{socket:i,subscribeToRoom:(m,x)=>(n[m]||(c(m),n[m]=[]),n[m].push(x),()=>{var y,v;n[m]=(v=(y=n[m])===null||y===void 0?void 0:y.filter(b=>b!==x))!==null&&v!==void 0?v:[],n[m].length===0&&u(m)}),updateConfig:l,updateModel:d,disconnect:o}}const Uf=typeof window<"u"?window:{base44SharedInstances:{}};function Rse(e,t){return Uf.base44SharedInstances||(Uf.base44SharedInstances={}),Uf.base44SharedInstances[e]||(Uf.base44SharedInstances[e]={instance:t()}),Uf.base44SharedInstances[e].instance}const Ise="__user_heartbeat_event__",Mse="__initialization_event__",Dse="__session_duration_event__",rM="analytics-enable",iM="base44_analytics_session_id",Lse={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},$se="analytics",Qt=Rse($se,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...Lse,...Hse()}})),Bse=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r})=>{var i;const{maxQueueSize:s,throttleTime:o,batchSize:l}=Qt.config;if(!(!((i=Qt.config)===null||i===void 0)&&i.enabled))return{track:()=>{},cleanup:()=>{}};let c;const u=`${t}/api/apps/${n}/analytics/track/batch`,d=async N=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:N}})},f=N=>{try{const S=JSON.stringify({events:N}),_=new Blob([S],{type:"application/json"});return typeof navigator>"u"||S.length>6e4||!navigator.sendBeacon(u,_)}catch{return!1}},p=async(N,S={})=>
547{if(N.length===0)return;const _=await Wse(r),E=N.map(Vse(_));try{(!S.isBeacon||!f(E))&&await d(E)}catch{}},m=()=>{aM(p,{throttleTime:o,batchSize:l})},x=N=>{if(Qt.requestsQueue.length>=s)return;const S=Use();Qt.requestsQueue.push({...N,...S}),m()},y=()=>{aM(p,{throttleTime:o,batchSize:l}),c=oM(x),qse()},v=()=>{sM(),c==null||c(),zse(x);const N=Qt.requestsQueue.splice(0);p(N,{isBeacon:!0})},b=()=>{typeof window>"u"||(document.visibilityState==="hidden"?v():document.visibilityState==="visible"&&y())},w=()=>{sM(),c==null||c(),typeof window<"u"&&window.removeEventListener("visibilitychange",b)};return m(),c=oM(x),Fse(x),typeof window<"u"&&window.addEventListener("visibilitychange",b),{track:x,cleanup:w}};function sM(){Qt.isProcessing=!1}async function aM(e,t){if(Qt.isProcessing)return;Qt.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;Qt.isProcessing&&Qt.requestsQueue.length>0;){const i=Qt.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(s=>setTimeout(s,n))}Qt.isProcessing=!1}function oM(e){var t;if(Qt.isHeartBeatProcessing||((t=Qt.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Qt.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:Ise})},Qt.config.heartBeatInterval);return()=>{clearInterval(n),Qt.isHeartBeatProcessing=!1}}function Fse(e){typeof window>"u"||Qt.wasInitializationTracked||(Qt.wasInitializationTracked=!0,e({eventName:Mse,properties:{referrer:document==null?void 0:document.referrer}}))}function qse(){typeof window>"u"||Qt.sessionStartTime!==null||(Qt.sessionStartTime=new Date().toISOString())}function zse(e){if(typeof window>"u"||Qt.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Qt.sessionStartTime).getTime();Qt.sessionStartTime=null,e({eventName:Dse,properties:{sessionDuration:t}})}function Use(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function Vse(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Gw=null;async function Wse(e){if(!Qt.sessionContext){if(!Gw){const t=Gse();Gw=e.me().then(n=>({user_id:n.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Qt.sessionContext=await Gw}return Qt.sessionContext}function Hse(){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search).get(rM);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(rM);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function Gse(){if(typeof window>"u")return zw();try{const e=localStorage.getItem(iM);if(!e){const t=zw();return localStorage.setItem(iM,t),t}return e}catch{return zw()}}function Kse(e){var t,n;const{serverUrl:r="https://base44.app",appId:i,token:s,serviceToken:o,requiresAuth:l=!1,appBaseUrl:c,options:u,functionsVersion:d,headers:f}=e,p=typeof c=="string"?c:"",m={serverUrl:r,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:i,token:s};let x=null;const y=()=>(x||(x=Tse({config:m})),x),v={...f,"X-App-Id":String(i)},b=d?{...v,"Base44-Functions-Version":d}:v,w=fh({baseURL:`${r}/api`,headers:v,token:s,onError:u==null?void 0:u.onError}),N=fh({baseURL:`${r}/api`,headers:b,token:s,interceptResponses:!1,onError:u==null?void 0:u.onError}),S=fh({baseURL:`${r}/api`,headers:v,token:o,onError:u==null?void 0:u.onError}),_=fh({baseURL:`${r}/api`,headers:b,token:o,interceptResponses:!1}),E=Rie(w,N,i,{appBaseUrl:p}),k={entities:HI({axios:w,appId:i,getSocket:y}),integrations:GI(w,i),connectors:Die(w,i),auth:E,functions:KI(N,i,{getAuthHeaders:()=>{const A={},C=s||Ky();return C&&(A.Authorization=`Bearer ${C}`),A},baseURL:(t=N.defaults)===null||t===void 0?void 0:t.baseURL}),agents:YI({axios:w,getSocket:y,appId:i,serverUrl:r,token:s}),appLogs:XI(w,i),users:$ie(w,i),analytics:Bse({axiosClient:w,serverUrl:r,appId:i,userAuthModule:E}),cleanup:()=>{k.analytics.cleanup(),x&&x.disconnect()}},O={entities:HI({axios:S,appId:i,getSocket:y}),integrations:GI(S,i),sso:Iie(S,i,s),connectors:Mie(S,i),functions:KI(_,i,{getAuthHeaders:()=>{const A={};return o&&(A.Authorization=`Bearer ${o}`),A},baseURL:(n=_.defaults)===null||n===void 0?void 0:n.baseURL}
547),agents:YI({axios:S,getSocket:y,appId:i,serverUrl:r,token:s}),appLogs:XI(S,i),cleanup:()=>{x&&x.disconnect()}};if(typeof window<"u"){const A=s||Ky();A&&k.auth.setToken(A)}return l&&typeof window<"u"&&setTimeout(async()=>{try{await k.auth.isAuthenticated()||k.auth.redirectToLogin(window.location.href)}catch(A){console.error("Authentication check failed:",A),k.auth.redirectToLogin(window.location.href)}},0),{...k,setToken(A){k.auth.setToken(A),x&&x.updateConfig({token:A}),m.token=A},getConfig(){return{serverUrl:r,appId:i,requiresAuth:l}},get asServiceRole(){if(!o)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return O}}}const $z=typeof window>"u",Yse=$z?{localStorage:new Map}:window,_h=Yse.localStorage,Xse=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Vf=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if($z)return t;const r=`base44_${Xse(e)}`,i=new URLSearchParams(window.location.search),s=i.get(e);if(n){i.delete(e);const l=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(s)return _h.setItem(r,s),s;if(t)return _h.setItem(r,t),t;const o=_h.getItem(r);return o||null},Qse=()=>(Vf("clear_access_token")==="true"&&(_h.removeItem("base44_access_token"),_h.removeItem("token")),{appId:Vf("app_id",{defaultValue:"694550624d51876009ebb367"}),token:Vf("access_token",{removeFromUrl:!0}),fromUrl:Vf("from_url",{defaultValue:window.location.href}),functionsVersion:Vf("functions_version",{defaultValue:"prod"})}),ph={...Qse()},{appId:Zse,token:Jse,functionsVersion:eae}=ph,ce=Kse({appId:Zse,token:Jse,functionsVersion:eae,serverUrl:"",requiresAuth:!1}),tae=Object.freeze(Object.defineProperty({__proto__:null,base44:ce},Symbol.toStringTag,{value:"Module"})),Bz=T.createContext(),nae=({children:e})=>{const[t,n]=T.useState(null),[r,i]=T.useState(!1),[s,o]=T.useState(!0),[l,c]=T.useState(!0),[u,d]=T.useState(null),[f,p]=T.useState(null);T.useEffect(()=>{m()},[]);const m=async()=>{var b,w;try{c(!0),d(null);const N=fh({baseURL:"/api/apps/public",headers:{"X-App-Id":ph.appId},token:ph.token,interceptResponses:!0});try{const S=await N.get(`/prod/public-settings/by-id/${ph.appId}`);p(S),ph.token?await x():(o(!1),i(!1)),c(!1)}catch(S){if(console.error("App state check failed:",S),S.status===403&&((w=(b=S.data)==null?void 0:b.extra_data)!=null&&w.reason)){const _=S.data.extra_data.reason;d(_==="auth_required"?{type:"auth_required",message:"Authentication required"}:_==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:_,message:S.message})}else d({type:"unknown",message:S.message||"Failed to load app"});c(!1),o(!1)}}catch(N){console.error("Unexpected error:",N),d({type:"unknown",message:N.message||"An unexpected error occurred"}),c(!1),o(!1)}},x=async()=>{try{o(!0);const b=await ce.auth.me();n(b),i(!0),o(!1)}catch(b){console.error("User auth check failed:",b),o(!1),i(!1),(b.status===401||b.status===403)&&d({type:"auth_required",message:"Authentication required"})}},y=(b=!0)=>{n(null),i(!1),b?ce.auth.logout(window.location.href):ce.auth.logout()},v=()=>{ce.auth.redirectToLogin(window.location.href)};return a.jsx(Bz.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:s,isLoadingPublicSettings:l,authError:u,appPublicSettings:f,logout:y,navigateToLogin:v,checkAppState:m},children:e})},Fz=()=>{const e=T.useContext(Bz);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e};function Xe(e){return"/"+e.replace(/ /g,"-")}function lM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qz(...e){return t=>{let n=!1;const r=e.map(i=>{const s=lM(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():lM(e[i],null)}}}}function gn(...e){return T.useCallback(qz(...e),e)}function Xu(e){const t=iae(e),n=T.forwardRef((r,i)=>{const{children:s,...o}=r,l=T.Children.toArray(s),c=l.find(aae);if(c){const u=c.props.children,d=l.map(f=>f===c?T.Children.count(u)>1?T.Children.only(null):T.isValidElement(u)?u.props.children:null:f);return a.jsx(t,{...o,ref:i,children:T.isValidElement(u)?T.cloneElement(u,void 0,d):null})}return a.jsx(t,{...o,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var rae=Xu("Slot");function iae(e){const t=T.forwardRef((n,r)=>{const{children:i,...s}=n;
vendor: 19,439 bytes, lines 547-555
547if(T.isValidElement(i)){const o=lae(i),l=oae(s,i.props);return i.type!==T.Fragment&&(l.ref=r?qz(r,o):o),T.cloneElement(i,l)}return T.Children.count(i)>1?T.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sae=Symbol("radix.slottable");function aae(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sae}function oae(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]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function lae(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)}const cae=Yp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ae=T.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?rae:"button";return a.jsx(o,{className:Ot(cae({variant:t,size:n,className:e})),ref:s,...i})});ae.displayName="Button";const Cx=T.createContext(null);function pO(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const mO=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class uae extends T.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function dae({children:e,isPresent:t}){const n=T.useId(),r=T.useRef(null),i=T.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=T.useContext(mO);return T.useInsertionEffect(()=>{const{width:o,height:l,top:c,left:u}=i.current;if(t||!r.current||!o||!l)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return s&&(d.nonce=s),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` 548 [data-motion-pop-id="${n}"] { 549 position: absolute !important; 550 width: ${o}px !important; 551 height: ${l}px !important; 552 top: ${c}px !important; 553 left: ${u}px !important; 554 } 555 `),()=>{document.head.removeChild(d)}},[t]),a.jsx(uae,{isPresent:t,childRef:r,sizeRef:i,children:T.cloneElement(e,{ref:r})})}const fae=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const l=pO(hae),c=T.useId(),u=T.useCallback(f=>{l.set(f,!0);for(const p of l.values())if(!p)return;r&&r()},[l,r]),d=T.useMemo(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),u]:[n,u]);return T.useMemo(()=>{l.forEach((f,p)=>l.set(p,!1))},[n]),T.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=a.jsx(dae,{isPresent:n,children:e})),a.jsx(Cx.Provider,{value:d,children:e})};function hae(){return new Map}const gO=T.createContext({}),Ai=e=>e;let zz=Ai;function yO(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ia=e=>e*1e3,Ma=e=>e/1e3,Fg=e=>e.key||"";function cM(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const vO=typeof window<"u",Uz=vO?T.useLayoutEffect:T.useEffect,hi=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const l=T.useMemo(()=>cM(e),[e]),c=l.map(Fg),u=T.useRef(!0),d=T.useRef(l),f=pO(()=>new Map),[p,m]=T.useState(l),[x,y]=T.useState(l);Uz(()=>{u.current=!1,d.current=l;for(let w=0;w<x.length;w++){const N=Fg(x[w]);c.includes(N)?f.delete(N):f.get(N)!==!0&&f.set(N,!1)}},[x,c.length,c.join("-")]);const v=[];if(l!==p){let w=[...l];for(let N=0;N<x.length;N++){const S=x[N],_=Fg(S);c.includes(_)||(w.splice(N,0,S),v.push(S))}o==="wait"&&v.length&&(w=v),y(cM(w)),m(l);return}const{forceRender:b}=T.useContext(gO);return a.jsx(a.Fragment,{children:x.map(w=>{const N=Fg(w),S=l===x||c.includes(N),_=()=>{if(f.has(N))f.set(N,!0);else return;let E=!0;f.forEach(k=>{k||(E=!1)}),E&&(b==null||b(),y(d.current),i&&i())};return a.jsx(fae,{isPresent:S,initial:!u.current||r?void 0:!1,custom:S?void 0:n,presenceAffectsLayout:s,mode:o,onExitComplete:S?void 0:_,children:w},N)})})},pae={useManualTiming:!1};function mae(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,d=!1,f=!1)=>{const m=f&&r?t:n;return d&&s.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(l),t.clear(),r=!1,i&&(i=!1,c.process(u))}};return c}const qg=["read","resolveKeyframes","update","preRender","render","postRender"],gae=40;function Vz(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=qg.reduce((b,w)=>(b[w]=mae(s),b),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:p}=o,m=()=>{const b=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(b-i.timestamp,gae),1),i.timestamp=b,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},x=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:qg.reduce((b,w)=>{const N=o[w];return b[w]=(S,_=!1,E=!1)=>(n||x(),N.schedule(S,_,E)),b},{}),cancel:b=>{for(let w=0;w<qg.length;w++)o[qg[w]].cancel(b)},state:i,steps:o}}const{schedule:fn,cancel:Xo,state:vr,steps:Kw}=Vz(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ai,!0),Wz=T.createContext({strict:!1}),uM={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"]},Zu={};for(const e in uM)Zu[e]={isEnabled:t=>uM[e].some(n=>!!t[n])};function yae(e){for(const t in e)Zu[t]={...Zu[t],...e[t]}}const vae=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 Yy(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||vae.has(e)}let Hz=e=>!Yy(e);function xae(e){e&&(Hz=t=>t.startsWith("on")?!Yy(t):e(t))}try{xae(require("@emotion/is-prop-valid").default)}catch{}function bae(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Hz(i)||n===!0&&Yy(i)||!t&&!Yy(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function wae(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Tx=T.createContext({});function Hh(e){return typeof e=="string"||Array.isArray(e)}function Rx(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const xO=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bO=["initial",...xO];function Ix(e){return Rx(e.animate)||bO.some(t=>Hh(e[t]))}function Gz(e){return!!(Ix(e)||e.variants)}function jae(e,t){if(Ix(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hh(n)?n:void 0,animate:Hh(r)?r:void 0}}return e.inherit!==!1?t:{}}function Sae(e){const{initial:t,animate:n}=jae(e,T.useContext(Tx));return T.useMemo(()=>({initial:t,animate:n}),[dM(t),dM(n)])}function dM(e){return Array.isArray(e)?e.join(" "):e}const Nae=Symbol.for("motionComponentSymbol");function vu(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _ae(e,t,n){return T.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):vu(n)&&(n.current=r))},[t])}const wO=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Eae="framerAppearId",Kz="data-"+wO(Eae),{schedule:jO}=Vz(queueMicrotask,!1),Yz=T.createContext({});function Pae(e,t,n,r,i){var s,o;const{visualElement:l}=T.useContext(Tx),c=T.useContext(Wz),u=T.useContext(Cx),d=T.useContext(mO).reducedMotion,f=T.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const p=f.current,m=T.useContext(Yz);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&kae(f.current,n,i,m);const x=T.useRef(!1);T.useInsertionEffect(()=>{p&&x.current&&p.update(n,u)});const y=n[Kz],v=T.useRef(!!y&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,y))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,y)));return Uz(()=>{p&&(x.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),jO.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())}),T.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,y)}),v.current=!1))}),p}function kae(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Xz(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||l&&vu(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function Xz(e){if(e)return e.options.allowProjection!==!1?e.projection:Xz(e.parent)}function Oae({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var s,o;e&&yae(e);function l(u,d){let f;const p={...T.useContext(mO),...u,layoutId:Aae(u)},{isStatic:m}=p,x=Sae(u),y=r(u,m);if(!m&&vO){Cae();const v=Tae(p);f=v.MeasureLayout,x.visualElement=Pae(i,y,p,t,v.ProjectionNode)}return a.jsxs(Tx.Provider,{value:x,children:[f&&x.visualElement?a.jsx(f,{visualElement:x.visualElement,...p}):null,n(i,u,_ae(y,x.visualElement,d),y,m,x.visualElement)]})}l.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const c=T.forwardRef(l);return c[Nae]=i,c}function Aae({layoutId:e}){const t=T.useContext(gO).id;return t&&e!==void 0?t+"-"+e:e}function Cae(e,t){T.useContext(Wz).strict}function Tae(e){const{drag:t,layout:n}=Zu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Rae=["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 SO(e){return typeof e!="string"||e.includes("-")?!1:!!(Rae.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qz(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Zz=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Jz(e,t,n,r){Qz(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Zz.has(i)?i:wO(i),t.attrs[i])}const Rr=e=>!!(e&&e.getVelocity),Xy={};function Iae(e){Object.assign(Xy,e)}const tm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Oc=new Set(tm);function e7(e,{layout:t,layoutId:n}){return Oc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xy[e]||e==="opacity")}function NO(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(Rr(i[o])||t.style&&Rr(t.style[o])||e7(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function t7(e,t,n){const r=NO(e,t,n);for(const i in e)if(Rr(e[i])||Rr(t[i])){const s=tm.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function fM(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _O(e,t,n,r){if(typeof t=="function"){const[i,s]=fM(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]=fM(r);t=t(n!==void 0?n:e.custom,i,s)}return t}const CE=e=>Array.isArray(e),Mae=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Dae=e=>CE(e)?e[e.length-1]||0:e;function Cy(e){const t=Rr(e)?e.get():e;return Mae(t)?t.toValue():t}function Lae({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,s){const o={latestValues:$ae(r,i,s,e),renderState:t()};return n&&(o.mount=l=>n(r,l,o)),o}const n7=e=>(t,n)=>{const r=T.useContext(Tx),i=T.useContext(Cx),s=()=>Lae(e,t,r,i);return n?s():pO(s)};function $ae(e,t,n,r){const i={},s=r(e,{});for(const p in s)i[p]=Cy(s[p]);let{initial:o,animate:l}=e;const c=Ix(e),u=Gz(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?l:o;if(f&&typeof f!="boolean"&&!Rx(f)){const p=Array.isArray(f)?f:[f];for(let m=0;m<p.length;m++){const x=_O(e,p[m]);if(x){const{transitionEnd:y,transition:v,...b}=x;for(const w in b){let N=b[w];if(Array.isArray(N)){const S=d?N.length-1:0;N=N[S]}N!==null&&(i[w]=N)}for(const w in y)i[w]=y[w]}}}return i}const EO=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),r7=()=>({...EO(),attrs:{}}),i7=(e,t)=>t&&typeof e=="number"?t.transform(e):e,za=(e,t,n)=>n>t?t:n<e?e:n,Bd={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Gh={...Bd,transform:e=>za(0,1,e)},zg={...Bd,default:1},nm=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Eo=nm("deg"),ea=nm("%"),dt=nm("px"),Bae=nm("vh"),Fae=nm("vw"),hM={...ea,parse:e=>ea.parse(e)/100,transform:e=>ea.transform(e*100)},qae={borderWidth:dt,borderTopWidth:dt,borderRightWidth:dt,borderBottomWidth:dt,borderLeftWidth:dt,borderRadius:dt,radius:dt,borderTopLeftRadius:dt,borderTopRightRadius:dt,borderBottomRightRadius:dt,borderBottomLeftRadius:dt,width:dt,maxWidth:dt,height:dt,maxHeight:dt,top:dt,right:dt,bottom:dt,left:dt,padding:dt,paddingTop:dt,paddingRight:dt,paddingBottom:dt,paddingLeft:dt,margin:dt,marginTop:dt,marginRight:dt,marginBottom:dt,marginLeft:dt,backgroundPositionX:dt,backgroundPositionY:dt},zae={rotate:Eo,rotateX:Eo,rotateY:Eo,rotateZ:Eo,scale:zg,scaleX:zg,scaleY:zg,scaleZ:zg,skew:Eo,skewX:Eo,skewY:Eo,distance:dt,translateX:dt,translateY:dt,translateZ:dt,x:dt,y:dt,z:dt,perspective:dt,transformPerspective:dt,opacity:Gh,originX:hM,originY:hM,originZ:dt},pM={...Bd,transform:Math.round},PO={...qae,...zae,zIndex:pM,size:dt,fillOpacity:Gh,strokeOpacity:Gh,numOctaves:pM},Uae={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vae=tm.length;function Wae(e,t,n){let r="",i=!0;for(let s=0;s<Vae;s++){const o=tm[s],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=i7(l,PO[o]);if(!c){i=!1;const d=Uae[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}const s7=e=>t=>typeof t=="string"&&t.startsWith(e),a7=s7("--"),Hae=s7("var(--"),kO=e=>Hae(e)?Gae.test(e.split("/*")[0].trim()):!1,Gae=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function OO(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(Oc.has(c)){o=!0;continue}else if(a7(c)){i[c]=u;continue}else{const d=i7(u,PO[c]);c.startsWith("origin")?(l=!0,s[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=Wae(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;r.transformOrigin=`${c} ${u} ${d}`}}function mM(e,t,n){return typeof e=="string"?e:dt.transform(t+n*e)}function Kae(e,t,n){const r=mM(t,e.x,e.width),i=mM(n,e.y,e.height);return`${r} ${i}`}const Yae={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xae={offset:"strokeDashoffset",array:"strokeDasharray"};function Qae(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Yae:Xae;e[s.offset]=dt.transform(-r);const o=dt.transform(t),l=dt.transform(n);e[s.array]=`${o} ${l}`}function AO(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(OO(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:m,dimensions:x}=e;p.transform&&(x&&(m.transform=p.transform),delete p.transform),x&&(i!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=Kae(x,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&Qae(p,o,l,c,!1)}const CO=e=>typeof e=="string"&&e.toLowerCase()==="svg",Zae={useVisualState:n7({scrapeMotionValuesFromProps:t7,createRenderState:r7,onMount:(e,t,{renderState:n,latestValues:r})=>{fn.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),fn.render(()=>{AO(n,r,CO(t.tagName),e.transformTemplate),Jz(t,n)})}})},Jae={useVisualState:n7({scrapeMotionValuesFromProps:NO,createRenderState:EO})};function o7(e,t,n){for(const r in t)!Rr(t[r])&&!e7(r,n)&&(e[r]=t[r])}function eoe({transformTemplate:e},t){return T.useMemo(()=>{const n=EO();return OO(n,t,e),Object.assign({},n.vars,n.style)},[t])}function toe(e,t){const n=e.style||{},r={};return o7(r,n,e),Object.assign(r,eoe(e,t)),r}function noe(e,t){const n={},r=toe(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"}
555`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function roe(e,t,n,r){const i=T.useMemo(()=>{const s=r7();return AO(s,t,CO(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};o7(s,e.style,e),i.style={...s,...i.style}}return i}function ioe(e=!1){return(n,r,i,{latestValues:s},o)=>{const c=(SO(n)?roe:noe)(r,s,o,n),u=bae(r,typeof n=="string",e),d=n!==T.Fragment?{...u,...c,ref:i}:{},{children:f}=r,p=T.useMemo(()=>Rr(f)?f.get():f,[f]);return T.createElement(n,{...d,children:p})}}function soe(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...SO(r)?Zae:Jae,preloadedFeatures:e,useRender:ioe(i),createVisualElement:t,Component:r};return Oae(o)}}function l7(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Mx(e,t,n){const r=e.getProps();return _O(r,t,n!==void 0?n:r.custom,e)}const aoe=yO(()=>window.ScrollTimeline!==void 0);class ooe{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(aoe()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class loe extends ooe{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function TO(e,t){return e?e[t]||e.default||e:void 0}const TE=2e4;function c7(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<TE;)t+=n,r=e.next(t);return t>=TE?1/0:t}function RO(e){return typeof e=="function"}function gM(e,t){e.timeline=t,e.onfinish=null}const IO=e=>Array.isArray(e)&&typeof e[0]=="number",coe={linearEasing:void 0};function uoe(e,t){const n=yO(e);return()=>{var r;return(r=coe[t])!==null&&r!==void 0?r:n()}}const Qy=uoe(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 8,751 bytes, line 555
555,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),u7=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(Qu(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function d7(e){return!!(typeof e=="function"&&Qy()||!e||typeof e=="string"&&(e in RE||Qy())||IO(e)||Array.isArray(e)&&e.every(d7))}const mh=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,RE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mh([0,.65,.55,1]),circOut:mh([.55,0,1,.45]),backIn:mh([.31,.01,.66,-.59]),backOut:mh([.33,1.53,.69,.99])};function f7(e,t){if(e)return typeof e=="function"&&Qy()?u7(e,t):IO(e)?mh(e):Array.isArray(e)?e.map(n=>f7(n,t)||RE.easeOut):RE[e]}const bs={x:!1,y:!1};function h7(){return bs.x||bs.y}function doe(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function p7(e,t){const n=doe(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function yM(e){return t=>{t.pointerType==="touch"||h7()||e(t)}}function foe(e,t,n={}){const[r,i,s]=p7(e,n),o=yM(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=yM(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,i)});return r.forEach(l=>{l.addEventListener("pointerenter",o,i)}),s}const m7=(e,t)=>t?e===t?!0:m7(e,t.parentElement):!1,MO=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hoe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function poe(e){return hoe.has(e.tagName)||e.tabIndex!==-1}const gh=new WeakSet;function vM(e){return t=>{t.key==="Enter"&&e(t)}}function Yw(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const moe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=vM(()=>{if(gh.has(n))return;Yw(n,"down");const i=vM(()=>{Yw(n,"up")}),s=()=>Yw(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 xM(e){return MO(e)&&!h7()}function goe(e,t,n={}){const[r,i,s]=p7(e,n),o=l=>{const c=l.currentTarget;if(!xM(l)||gh.has(c))return;gh.add(c);const u=t(l),d=(m,x)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!xM(m)||!gh.has(c))&&(gh.delete(c),typeof u=="function"&&u(m,{success:x}))},f=m=>{d(m,n.useGlobalTarget||m7(c,m.target))},p=m=>{d(m,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",p,i)};return r.forEach(l=>{!poe(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),l.addEventListener("focus",u=>moe(u,i),i)}),s}function yoe(e){return e==="x"||e==="y"?bs[e]?null:(bs[e]=!0,()=>{bs[e]=!1}):bs.x||bs.y?null:(bs.x=bs.y=!0,()=>{bs.x=bs.y=!1})}let Ty;function voe(){Ty=void 0}const ta={now:()=>(Ty===void 0&&ta.set(vr.isProcessing||pae.useManualTiming?vr.timestamp:performance.now()),Ty),set:e=>{Ty=e,queueMicrotask(voe)}};function DO(e,t){e.indexOf(t)===-1&&e.push(t)}function LO(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class $O{constructor(){this.subscriptions=[]}add(t){return DO(this.subscriptions,t),()=>LO(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 o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function g7(e,t){return t?e*(1e3/t):0}const bM=30,xoe=e=>!isNaN(parseFloat(e));class boe{constructor(t,n={}){this.version="11.16.4",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=ta.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ta.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=xoe(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 $O);const r=this.events[t].add(n);return t==="change"?()=>{r(),fn.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ta.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bM)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bM);return g7(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Kh(e,t){return new boe(e,t)}function woe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Kh(n))}function joe(e,t){const n=Mx(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const l=Dae(s[o]);woe(e,o,l)}}function Soe(e){return!!(Rr(e)&&e.add)}function IE(e,t){const n=e.getValue("willChange");if(Soe(n))return n.add(t)}function y7(e){return e.props[Kz]}const v7=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Noe=1e-7,_oe=12;function Eoe(e,t,n,r,i){let s,o,l=0;do o=t+(n-t)/2,s=v7(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>Noe&&++l<_oe);return o}function rm(e,t,n,r){if(e===t&&n===r)return Ai;const i=s=>Eoe(s,0,1,e,n);return s=>s===0||s===1?s:v7(i(s),t,r)}const x7=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,b7=e=>t=>1-e(1-t),w7=rm(.33,1.53,.69,.99),BO=b7(w7),j7=x7(BO),S7=e=>(e*=2)<1?.5*BO(e):.5*(2-Math.pow(2,-10*(e-1))),FO=e=>1-Math.sin(Math.acos(e)),N7=b7(FO),_7=x7(FO),E7=e=>/^0[^.\s]+$/u.test(e);function Poe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||E7(e):!0}const P7=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),koe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ooe(e){const t=koe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function k7(e,t,n=1){const[r,i]=Ooe(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return P7(o)?parseFloat(o):o}return kO(i)?k7(i,t,n+1):i}const Aoe=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),wM=e=>e===Bd||e===dt,jM=(e,t)=>parseFloat(e.split(", ")[t]),SM=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return jM(i[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?jM(s[1],e):0}},Coe=new Set(["x","y","z"]),Toe=tm.filter(e=>!Coe.has(e));function Roe(e){const t=[];return Toe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ju={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:SM(4,13),y:SM(5,14)};Ju.translateX=Ju.x;Ju.translateY=Ju.y;const O7=e=>t=>t.test(e),Ioe={test:e=>e==="auto",parse:e=>e},A7=[Bd,dt,ea,Eo,Fae,Bae,Ioe],NM=e=>A7.find(O7(e)),oc=new Set;let ME=!1,DE=!1;function C7(){if(DE){const e=Array.from(oc).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Roe(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);
vendor: 4,966 bytes, line 555
555i&&i.forEach(([s,o])=>{var l;(l=r.getValue(s))===null||l===void 0||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}DE=!1,ME=!1,oc.forEach(e=>e.complete()),oc.clear()}function T7(){oc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(DE=!0)})}function Moe(){T7(),C7()}class qO{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(oc.add(this),ME||(ME=!0,fn.read(T7),fn.resolveKeyframes(C7))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),oc.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,oc.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Eh=e=>Math.round(e*1e5)/1e5,zO=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Doe(e){return e==null}const Loe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,UO=(e,t)=>n=>!!(typeof n=="string"&&Loe.test(n)&&n.startsWith(e)||t&&!Doe(n)&&Object.prototype.hasOwnProperty.call(n,t)),R7=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,l]=r.match(zO);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},$oe=e=>za(0,255,e),Xw={...Bd,transform:e=>Math.round($oe(e))},Wl={test:UO("rgb","red"),parse:R7("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Xw.transform(e)+", "+Xw.transform(t)+", "+Xw.transform(n)+", "+Eh(Gh.transform(r))+")"};function Boe(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 LE={test:UO("#"),parse:Boe,transform:Wl.transform},xu={test:UO("hsl","hue"),parse:R7("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ea.transform(Eh(t))+", "+ea.transform(Eh(n))+", "+Eh(Gh.transform(r))+")"},kr={test:e=>Wl.test(e)||LE.test(e)||xu.test(e),parse:e=>Wl.test(e)?Wl.parse(e):xu.test(e)?xu.parse(e):LE.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wl.transform(e):xu.transform(e)},Foe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qoe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(zO))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Foe))===null||n===void 0?void 0:n.length)||0)>0}const I7="number",M7="color",zoe="var",Uoe="var(",_M="${}",Voe=/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 Yh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const l=t.replace(Voe,c=>(kr.test(c)?(r.color.push(s),i.push(M7),n.push(kr.parse(c))):c.startsWith(Uoe)?(r.var.push(s),i.push(zoe),n.push(c)):(r.number.push(s),i.push(I7),n.push(parseFloat(c))),++s,_M)).split(_M);return{values:n,split:l,indexes:r,types:i}}function D7(e){return Yh(e).values}function L7(e){const{split:t,types:n}=Yh(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const l=n[o];l===I7?s+=Eh(i[o]):l===M7?s+=kr.transform(i[o]):s+=i[o]}return s}}const Woe=e=>typeof e=="number"?0:e;function Hoe(e){const t=D7(e);return L7(e)(t.map(Woe))}const Qo={test:qoe,parse:D7,createTransformer:L7,getAnimatableNone:Hoe},Goe=new Set(["brightness","contrast","saturate","opacity"]);function Koe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(zO)||[];if(!r)return e;const i=n.replace(r,"");let s=Goe.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const Yoe=/\b([a-z-]*)\(.*?\)/gu,$E={...Qo,getAnimatableNone:e=>{const t=e.match(Yoe);return t?t.map(Koe).join(" "):e}},Xoe={...PO,color:kr,backgroundColor:kr,outlineColor:kr,fill:kr,stroke:kr,borderColor:kr,borderTopColor:kr,borderRightColor:kr,borderBottomColor:kr,borderLeftColor:kr,filter:$E,WebkitFilter:$E},VO=e=>Xoe[e];function $7(e,t){let n=VO(e);return n!==$E&&(n=Qo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
vendor: 8,701 bytes, line 555
555const Qoe=new Set(["auto","none","0"]);function Zoe(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!Qoe.has(s)&&Yh(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=$7(n,i)}class B7 extends qO{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),kO(u))){const d=k7(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Aoe.has(r)||t.length!==2)return;const[i,s]=t,o=NM(i),l=NM(s);if(o!==l)if(wM(o)&&wM(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)Poe(t[i])&&r.push(i);r.length&&Zoe(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=Ju[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,l=i[o];i[o]=Ju[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const EM=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qo.test(e)||e==="0")&&!e.startsWith("url("));function Joe(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 ele(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],o=EM(i,t),l=EM(s,t);return!o||!l?!1:Joe(e)||(n==="spring"||RO(n))&&r}const tle=e=>e!==null;function Dx(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(tle),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const nle=40;class F7{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ta.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>nle?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Moe(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ta.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!ele(t,r,i,s))if(o)this.options.duration=0;else{c==null||c(Dx(t,this.options,n)),l==null||l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const xn=(e,t,n)=>e+(t-e)*n;function Qw(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 rle({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=Qw(c,l,e+1/3),s=Qw(c,l,e),o=Qw(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Zy(e,t){return n=>n>0?t:e}const Zw=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ile=[LE,Wl,xu],sle=e=>ile.find(t=>t.test(e));function PM(e){const t=sle(e);if(!t)return!1;let n=t.parse(e);return t===xu&&(n=rle(n)),n}const kM=(e,t)=>{const n=PM(e),r=PM(t);if(!n||!r)return Zy(e,t);const i={...n};return s=>(i.red=Zw(n.red,r.red,s),i.green=Zw(n.green,r.green,s),i.blue=Zw(n.blue,r.blue,s),i.alpha=xn(n.alpha,r.alpha,s),Wl.transform(i))},ale=(e,t)=>n=>t(e(n)),im=(...e)=>e.reduce(ale),BE=new Set(["none","hidden"]);function ole(e,t){return BE.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function lle(e,t){return n=>xn(e,t,n)}function WO(e){return typeof e=="number"?lle:typeof e=="string"?kO(e)?Zy:kr.test(e)?kM:dle:Array.isArray(e)?q7:typeof e=="object"?kr.test(e)?kM:cle:Zy}function q7(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>WO(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function cle(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=WO(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function ule(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],l=e.indexes[o][i[o]],c=(n=e.values[l])!==null&&n!==void 0?n:0;r[s]=c,i[o]++}return r}const dle=(e,t)=>{const n=Qo.createTransformer(t),r=Yh(e),i=Yh(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?BE.has(e)&&!i.values.length||BE.has(t)&&!r.values.length?ole(e,t):im(q7(ule(r,i),i.values),n):Zy(e,t)};function z7(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xn(e,t,n):WO(e)(e,t)}const fle=5;function U7(e,t,n){const r=Math.max(t-fle,0);return g7(n-e(r),t-r)}const jn={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},Jw=.001;function hle({duration:e=jn.duration,bounce:t=jn.bounce,velocity:n=jn.velocity,mass:r=jn.mass}){let i,s,o=1-t;o=za(jn.minDamping,jn.maxDamping,o),e=za(jn.minDuration,jn.maxDuration,Ma(e)),o<1?(i=u=>{const d=u*o,f=d*e,p=d-n,m=FE(u,o),x=Math.exp(-f);return Jw-p/m*x},s=u=>{const f=u*o*e,p=f*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,x=Math.exp(-f),y=FE(Math.pow(u,2),o);return(-i(u)+Jw>0?-1:1)*((p-m)*x)/y}):(i=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-Jw+d*f},s=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=mle(i,s,l);if(e=Ia(e),isNaN(c))return{stiffness:jn.stiffness,damping:jn.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const ple=12;function mle(e,t,n){let r=n;for(let i=1;i<ple;i++)r=r-e(r)/t(r);return r}function FE(e,t){return e*Math.sqrt(1-t*t)}const gle=["duration","bounce"],yle=["stiffness","damping","mass"];function OM(e,t){return t.some(n=>e[n]!==void 0)}function vle(e){let t={velocity:jn.velocity,stiffness:jn.stiffness,damping:jn.damping,mass:jn.mass,isResolvedFromDuration:!1,...e};if(!OM(e,yle)&&OM(e,gle))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*za(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:jn.mass,stiffness:i,damping:s}}else{const n=hle(e);t={...t,...n,mass:jn.mass},t.isResolvedFromDuration=!0}return t}function V7(e=jn.visualDuration,t=jn.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],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:f,velocity:p,isResolvedFromDuration:m}=vle({...n,velocity:-Ma(n.velocity||0)}),x=p||0,y=u/(2*Math.sqrt(c*d)),v=o-s,b=Ma(Math.sqrt(c/d)),w=Math.abs(v)<5;r||(r=w?jn.restSpeed.granular:jn.restSpeed.default),i||(i=w?jn.restDelta.granular:jn.restDelta.default);let N;if(y<1){const _=FE(b,y);N=E=>{const k=Math.exp(-y*b*E);return o-k*((x+y*b*v)/_*Math.sin(_*E)+v*Math.cos(_*E))}}else if(y===1)N=_=>o-Math.exp(-b*_)*(v+(x+b*v)*_);else{const _=b*Math.sqrt(y*y-1);N=E=>{const k=Math.exp(-y*b*E),O=Math.min(_*E,300);return o-k*((x+y*b*v)*Math.sinh(O)+_*v*Math.cosh(O))/_}}const S={calculatedDuration:m&&f||null,next:_=>{const E=N(_);if(m)l.done=_>=f;else{let k=0;y<1&&(k=_===0?Ia(x):U7(N,_,E));const O=Math.abs(k)<=r,I=Math.abs(o-E)<=i;l.done=O&&I}return l.value=l.done?o:E,l},toString:()=>{const _=Math.min(c7(S),TE),E=u7(k=>S.next(_*k).value,_,30);return _+"ms "+E}};return S}function AM({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],p={done:!1,value:f},m=O=>l!==void 0&&O<l||c!==void 0&&O>c,x=O=>l===void 0?c:c===void 0||Math.abs(l-O)<Math.abs(c-O)?l:c;let y=n*t;
vendor: 4,302 bytes, line 555
555const v=f+y,b=o===void 0?v:o(v);b!==v&&(y=b-f);const w=O=>-y*Math.exp(-O/r),N=O=>b+w(O),S=O=>{const I=w(O),A=N(O);p.done=Math.abs(I)<=u,p.value=p.done?b:A};let _,E;const k=O=>{m(p.value)&&(_=O,E=V7({keyframes:[p.value,x(p.value)],velocity:U7(N,O,p.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return k(0),{calculatedDuration:null,next:O=>{let I=!1;return!E&&_===void 0&&(I=!0,S(O),k(O)),_!==void 0&&O>=_?E.next(O-_):(!I&&S(O),p)}}}const xle=rm(.42,0,1,1),ble=rm(0,0,.58,1),W7=rm(.42,0,.58,1),wle=e=>Array.isArray(e)&&typeof e[0]!="number",jle={linear:Ai,easeIn:xle,easeInOut:W7,easeOut:ble,circIn:FO,circInOut:_7,circOut:N7,backIn:BO,backInOut:j7,backOut:w7,anticipate:S7},CM=e=>{if(IO(e)){zz(e.length===4);const[t,n,r,i]=e;return rm(t,n,r,i)}else if(typeof e=="string")return jle[e];return e};function Sle(e,t,n){const r=[],i=n||z7,s=e.length-1;for(let o=0;o<s;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ai:t;l=im(c,l)}r.push(l)}return r}function Nle(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(zz(s===t.length),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=Sle(t,r,i),l=o.length,c=u=>{let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Qu(e[d],e[d+1],u);return o[d](f)};return n?u=>c(za(e[0],e[s-1],u)):c}function _le(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Qu(0,t,r);e.push(xn(n,1,i))}}function Ele(e){const t=[0];return _le(t,e.length-1),t}function Ple(e,t){return e.map(n=>n*t)}function kle(e,t){return e.map(()=>t||W7).splice(0,e.length-1)}function Jy({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=wle(r)?r.map(CM):CM(r),s={done:!1,value:t[0]},o=Ple(n&&n.length===t.length?n:Ele(t),e),l=Nle(o,t,{ease:Array.isArray(i)?i:kle(t,i)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const Ole=e=>{const t=({timestamp:n})=>e(n);return{start:()=>fn.update(t,!0),stop:()=>Xo(t),now:()=>vr.isProcessing?vr.timestamp:ta.now()}},Ale={decay:AM,inertia:AM,tween:Jy,keyframes:Jy,spring:V7},Cle=e=>e/100;class HO extends F7{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||qO,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(s,l,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,l=RO(n)?n:Ale[n]||Jy;let c,u;l!==Jy&&typeof t[0]!="number"&&(c=im(Cle,z7(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=c7(d));const{calculatedDuration:f}=d,p=f+i,m=p*(r+1)-i;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:p,repeat:m,repeatType:x,repeatDelay:y,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-p*(this.speed>=0?1:-1),w=this.speed>=0?b<0:b>d;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let N=this.currentTime,S=s;if(m){const O=Math.min(this.currentTime,d)/f;
vendor: 59,218 bytes, line 555
555let I=Math.floor(O),A=O%1;!A&&O>=1&&(A=1),A===1&&I--,I=Math.min(I,m+1),!!(I%2)&&(x==="reverse"?(A=1-A,y&&(A-=y/f)):x==="mirror"&&(S=o)),N=za(0,1,A)*f}const _=w?{done:!1,value:c[0]}:S.next(N);l&&(_.value=l(_.value));let{done:E}=_;!w&&u!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return k&&i!==void 0&&(_.value=Dx(c,this.options,i)),v&&v(_.value),k&&this.finish(),_}get duration(){const{resolved:t}=this;return t?Ma(t.calculatedDuration):0}get time(){return Ma(this.currentTime)}set time(t){t=Ia(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ma(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Ole,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Tle=new Set(["opacity","clipPath","filter","transform"]);function Rle(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=f7(l,i);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Ile=yO(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ev=10,Mle=2e4;function Dle(e){return RO(e.type)||e.type==="spring"||!d7(e.ease)}function Lle(e,t){const n=new HO({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<Mle;)r=n.sample(s),i.push(r.value),s+=ev;return{times:void 0,keyframes:i,duration:s-ev,ease:"linear"}}const H7={anticipate:S7,backInOut:j7,circInOut:_7};function $le(e){return e in H7}class TM extends F7{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new B7(s,(o,l)=>this.onKeyframesResolved(o,l),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:s,ease:o,type:l,motionValue:c,name:u,startTime:d}=this.options;if(!(!((r=c.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Qy()&&$le(o)&&(o=H7[o]),Dle(this.options)){const{onComplete:p,onUpdate:m,motionValue:x,element:y,...v}=this.options,b=Lle(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),i=b.duration,s=b.times,o=b.ease,l="keyframes"}const f=Rle(c.owner.current,u,t,{...this.options,duration:i,times:s,ease:o});return f.startTime=d??this.calcStartTime(),this.pendingTimeline?(gM(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:p}=this.options;c.set(Dx(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:s,type:l,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Ma(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Ma(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ia(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ai;const{animation:r}=n;gM(r,t)}return Ai}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:p,...m}=this.options,x=new HO({...m,keyframes:r,duration:i,type:s,ease:o,times:l,isGenerator:!0}),y=Ia(this.time);u.setWithVelocity(x.sample(y-ev).value,x.sample(y).value,ev)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:l}=t;return Ile()&&r&&Tle.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&s!=="mirror"&&o!==0&&l!=="inertia"}}const Ble={type:"spring",stiffness:500,damping:25,restSpeed:10},Fle=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qle={type:"keyframes",duration:.8},zle={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ule=(e,{keyframes:t})=>t.length>2?qle:Oc.has(e)?e.startsWith("scale")?Fle(t[1]):Ble:zle;function Vle({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const GO=(e,t,n,r={},i,s)=>o=>{const l=TO(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ia(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:i};Vle(l)||(d={...d,...Ule(e,d)}),d.duration&&(d.duration=Ia(d.duration)),d.repeatDelay&&(d.repeatDelay=Ia(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const p=Dx(d.keyframes,l);if(p!==void 0)return fn.update(()=>{d.onUpdate(p),d.onComplete()}),new loe([])}return!s&&TM.supports(d)?new TM(d):new HO(d)};function Wle({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function G7(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in c){const p=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),m=c[f];if(m===void 0||d&&Wle(d,f))continue;const x={delay:n,...TO(o||{},f)};let y=!1;if(window.MotionHandoffAnimation){const b=y7(e);if(b){const w=window.MotionHandoffAnimation(b,f,fn);w!==null&&(x.startTime=w,y=!0)}}IE(e,f),p.start(GO(f,p,m,e.shouldReduceMotion&&Oc.has(f)?{type:!1}:x,e,y));const v=p.animation;v&&u.push(v)}return l&&Promise.all(u).then(()=>{fn.update(()=>{l&&joe(e,l)})}),u}function qE(e,t,n={}){var r;const i=Mx(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(G7(e,i,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:p}=s;return Hle(e,t,d+u,f,p,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,d]=c==="beforeChildren"?[o,l]:[l,o];return u().then(()=>d())}else return Promise.all([o(),l(n.delay)])}function Hle(e,t,n=0,r=0,i=1,s){const o=[],l=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(Gle).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(qE(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function Gle(e,t){return e.sortNodePosition(t)}function Kle(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>qE(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=qE(e,t,n);else{const i=typeof t=="function"?Mx(e,t,n.custom):t;r=Promise.all(G7(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Yle=bO.length;function K7(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?K7(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Yle;n++){const r=bO[n],i=e.props[r];(Hh(i)||i===!1)&&(t[r]=i)}return t}const Xle=[...xO].reverse(),Qle=xO.length;function Zle(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Kle(e,n,r)))}function Jle(e){let t=Zle(e),n=RM(),r=!0;const i=c=>(u,d)=>{var f;const p=Mx(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(p){const{transition:m,transitionEnd:x,...y}=p;u={...u,...y,...x}}return u};function s(c){t=c(e)}function o(c){const{props:u}=e,d=K7(e.parent)||{},f=[],p=new Set;let m={},x=1/0;for(let v=0;v<Qle;v++){const b=Xle[v],w=n[b],N=u[b]!==void 0?u[b]:d[b],S=Hh(N),_=b===c?w.isActive:null;_===!1&&(x=v);let E=N===d[b]&&N!==u[b]&&S;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...m},!w.isActive&&_===null||!N&&!w.prevProp||Rx(N)||typeof N=="boolean")continue;const k=ece(w.prevProp,N);let O=k||b===c&&w.isActive&&!E&&S||v>x&&S,I=!1;const A=Array.isArray(N)?N:[N];let C=A.reduce(i(b),{});_===!1&&(C={});const{prevResolvedValues:R={}}=w,D={...R,...C},q=U=>{O=!0,p.has(U)&&(I=!0,p.delete(U)),w.needsAnimating[U]=!0;const W=e.getValue(U);W&&(W.liveStyle=!1)};for(const U in D){const W=C[U],G=R[U];if(m.hasOwnProperty(U))continue;let L=!1;CE(W)&&CE(G)?L=!l7(W,G):L=W!==G,L?W!=null?q(U):p.add(U):W!==void 0&&p.has(U)?q(U):w.protectedKeys[U]=!0}w.prevProp=N,w.prevResolvedValues=C,w.isActive&&(m={...m,...C}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(E&&k)||I)&&f.push(...A.map(U=>({animation:U,options:{type:b}})))}if(p.size){const v={};p.forEach(b=>{const w=e.getBaseTarget(b),N=e.getValue(b);N&&(N.liveStyle=!0),v[b]=w??null}),f.push({animation:v})}let y=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(c,u)}),n[c].isActive=u;const f=o(c);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=RM(),r=!0}}}function ece(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!l7(t,e):!1}function Al(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function RM(){return{animate:Al(!0),whileInView:Al(),whileHover:Al(),whileTap:Al(),whileDrag:Al(),whileFocus:Al(),exit:Al()}}class il{constructor(t){this.isMounted=!1,this.node=t}update(){}}class tce extends il{constructor(t){super(t),t.animationState||(t.animationState=Jle(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Rx(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let nce=0;class rce extends il{constructor(){super(...arguments),this.id=nce++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const ice={animation:{Feature:tce},exit:{Feature:rce}};function Xh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function sm(e){return{point:{x:e.pageX,y:e.pageY}}}const sce=e=>t=>MO(t)&&e(t,sm(t));function Ph(e,t,n,r){return Xh(e,t,sce(n),r)}const IM=(e,t)=>Math.abs(e-t);function ace(e,t){const n=IM(e.x,t.x),r=IM(e.y,t.y);return Math.sqrt(n**2+r**2)}class Y7{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=t1(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=ace(f.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:x}=f,{timestamp:y}=vr;this.history.push({...x,timestamp:y});const{onStart:v,onMove:b}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=e1(p,this.transformPagePoint),fn.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:m,onSessionEnd:x,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=t1(f.type==="pointercancel"?this.lastMoveEventInfo:e1(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),x&&x(f,v)},!MO(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=sm(t),l=e1(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=vr;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,t1(l,this.history)),this.removeListeners=im(Ph(this.contextWindow,"pointermove",this.handlePointerMove),Ph(this.contextWindow,"pointerup",this.handlePointerUp),Ph(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xo(this.updatePoint)}}function e1(e,t){return t?{point:t(e.point)}:e}function MM(e,t){return{x:e.x-t.x,y:e.y-t.y}}function t1({point:e},t){return{point:e,delta:MM(e,X7(t)),offset:MM(e,oce(t)),velocity:lce(t,.1)}}function oce(e){return e[0]}function X7(e){return e[e.length-1]}function lce(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=X7(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ia(t)));)n--;if(!r)return{x:0,y:0};const s=Ma(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const Q7=1e-4,cce=1-Q7,uce=1+Q7,Z7=.01,dce=0-Z7,fce=0+Z7;function Di(e){return e.max-e.min}function hce(e,t,n){return Math.abs(e-t)<=n}function DM(e,t,n,r=.5){e.origin=r,e.originPoint=xn(t.min,t.max,e.origin),e.scale=Di(n)/Di(t),e.translate=xn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=cce&&e.scale<=uce||isNaN(e.scale))&&(e.scale=1),(e.translate>=dce&&e.translate<=fce||isNaN(e.translate))&&(e.translate=0)}function kh(e,t,n,r){DM(e.x,t.x,n.x,r?r.originX:void 0),DM(e.y,t.y,n.y,r?r.originY:void 0)}function LM(e,t,n){e.min=n.min+t.min,e.max=e.min+Di(t)}function pce(e,t,n){LM(e.x,t.x,n.x),LM(e.y,t.y,n.y)}function $M(e,t,n){e.min=t.min-n.min,e.max=e.min+Di(t)}function Oh(e,t,n){$M(e.x,t.x,n.x),$M(e.y,t.y,n.y)}function mce(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xn(n,e,r.max):Math.min(e,n)),e}function BM(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 gce(e,{top:t,left:n,bottom:r,right:i}){return{x:BM(e.x,n,i),y:BM(e.y,t,r)}}function FM(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 yce(e,t){return{x:FM(e.x,t.x),y:FM(e.y,t.y)}}function vce(e,t){let n=.5;const r=Di(e),i=Di(t);return i>r?n=Qu(t.min,t.max-r,e.min):r>i&&(n=Qu(e.min,e.max-i,t.min)),za(0,1,n)}function xce(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 zE=.35;function bce(e=zE){return e===!1?e=0:e===!0&&(e=zE),{x:qM(e,"left","right"),y:qM(e,"top","bottom")}}function qM(e,t,n){return{min:zM(e,t),max:zM(e,n)}}function zM(e,t){return typeof e=="number"?e:e[t]||0}const UM=()=>({translate:0,scale:1,origin:0,originPoint:0}),bu=()=>({x:UM(),y:UM()}),VM=()=>({min:0,max:0}),An=()=>({x:VM(),y:VM()});function Xi(e){return[e("x"),e("y")]}function J7({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function wce({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function jce(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 n1(e){return e===void 0||e===1}function UE({scale:e,scaleX:t,scaleY:n}){return!n1(e)||!n1(t)||!n1(n)}function Dl(e){return UE(e)||eU(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function eU(e){return WM(e.x)||WM(e.y)}function WM(e){return e&&e!=="0%"}function tv(e,t,n){const r=e-n,i=t*r;return n+i}function HM(e,t,n,r,i){return i!==void 0&&(e=tv(e,i,r)),tv(e,n,r)+t}function VE(e,t=0,n=1,r,i){e.min=HM(e.min,t,n,r,i),e.max=HM(e.max,t,n,r,i)}function tU(e,{x:t,y:n}){VE(e.x,t.translate,t.scale,t.originPoint),VE(e.y,n.translate,n.scale,n.originPoint)}const GM=.999999999999,KM=1.0000000000001;function Sce(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let l=0;l<i;l++){s=n[l],o=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&ju(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,tU(e,o)),r&&Dl(s.latestValues)&&ju(e,s.latestValues))}t.x<KM&&t.x>GM&&(t.x=1),t.y<KM&&t.y>GM&&(t.y=1)}function wu(e,t){e.min=e.min+t,e.max=e.max+t}function YM(e,t,n,r,i=.5){const s=xn(e.min,e.max,i);VE(e,t,n,s,r)}function ju(e,t){YM(e.x,t.x,t.scaleX,t.scale,t.originX),YM(e.y,t.y,t.scaleY,t.scale,t.originY)}function nU(e,t){return J7(jce(e.getBoundingClientRect(),t))}function Nce(e,t,n){const r=nU(e,n),{scroll:i}=t;return i&&(wu(r.x,i.offset.x),wu(r.y,i.offset.y)),r}const rU=({current:e})=>e?e.ownerDocument.defaultView:null,_ce=new WeakMap;class Ece{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=An(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(sm(d).point)},s=(d,f)=>{const{drag:p,dragPropagation:m,onDragStart:x}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=yoe(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xi(v=>{let b=this.getAxisMotionValue(v).get()||0;if(ea.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const N=w.layout.layoutBox[v];N&&(b=Di(N)*(parseFloat(b)/100))}}this.originPoint[v]=b}),x&&fn.postRender(()=>x(d,f)),IE(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:x,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=Pce(v),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),y&&y(d,f)},l=(d,f)=>this.stop(d,f),c=()=>Xi(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Y7(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:rU(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&fn.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Ug(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=mce(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&vu(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=gce(i.layoutBox,n):this.constraints=!1,this.elastic=bce(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Xi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=xce(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!vu(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Nce(r,i.root,this.visualElement.getTransformPagePoint());let o=yce(i.layout.layoutBox,s);if(n){const l=n(wce(o));this.hasMutatedConstraints=!!l,l&&(o=J7(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Xi(d=>{if(!Ug(d,n,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,x)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return IE(this.visualElement,t),r.start(GO(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xi(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xi(n=>{const{drag:r}=this.getProps();if(!Ug(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];s.set(t[n]-xn(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!vu(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Xi(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=vce({min:c,max:c},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xi(o=>{if(!Ug(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(xn(c,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;_ce.set(this.visualElement,this);const t=this.visualElement.current,n=Ph(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();vu(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),fn.read(r);const o=Xh(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Xi(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{o(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=zE,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:l}}}function Ug(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Pce(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class kce extends il{constructor(t){super(t),this.removeGroupControls=Ai,this.removeListeners=Ai,this.controls=new Ece(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ai}unmount(){this.removeGroupControls(),this.removeListeners()}}const XM=e=>(t,n)=>{e&&fn.postRender(()=>e(t,n))};class Oce extends il{constructor(){super(...arguments),this.removePointerDownListener=Ai}onPointerDown(t){this.session=new Y7(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rU(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:XM(t),onStart:XM(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&fn.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Ph(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Ace(){const e=T.useContext(Cx);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=T.useId();T.useEffect(()=>r(i),[]);const s=T.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,s]:[!0]}const Ry={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function QM(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Wf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(dt.test(e))e=parseFloat(e);else return e;const n=QM(e,t.target.x),r=QM(e,t.target.y);return`${n}% ${r}%`}},Cce={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Qo.parse(e);if(i.length>5)return r;const s=Qo.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=c;const u=xn(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class Tce extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;Iae(Rce),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ry.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||fn.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jO.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function iU(e){const[t,n]=Ace(),r=T.useContext(gO);return a.jsx(Tce,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(Yz),isPresent:t,safeToRemove:n})}const Rce={borderRadius:{...Wf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wf,borderTopRightRadius:Wf,borderBottomLeftRadius:Wf,borderBottomRightRadius:Wf,boxShadow:Cce};function Ice(e,t,n){const r=Rr(e)?e:Kh(e);return r.start(GO("",r,t,n)),r.animation}function Mce(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Dce=(e,t)=>e.depth-t.depth;class Lce{constructor(){this.children=[],this.isDirty=!1}add(t){DO(this.children,t),this.isDirty=!0}remove(t){LO(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dce),this.isDirty=!1,this.children.forEach(t)}}function $ce(e,t){const n=ta.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(Xo(r),e(s-t))};return fn.read(r,!0),()=>Xo(r)}const sU=["TopLeft","TopRight","BottomLeft","BottomRight"],Bce=sU.length,ZM=e=>typeof e=="string"?parseFloat(e):e,JM=e=>typeof e=="number"||dt.test(e);function Fce(e,t,n,r,i,s){i?(e.opacity=xn(0,n.opacity!==void 0?n.opacity:1,qce(r)),e.opacityExit=xn(t.opacity!==void 0?t.opacity:1,0,zce(r))):s&&(e.opacity=xn(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<Bce;o++){const l=`border${sU[o]}Radius`;let c=eD(t,l),u=eD(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||JM(c)===JM(u)?(e[l]=Math.max(xn(ZM(c),ZM(u),r),0),(ea.test(u)||ea.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=xn(t.rotate||0,n.rotate||0,r))}function eD(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const qce=aU(0,.5,N7),zce=aU(.5,.95,Ai);function aU(e,t,n){return r=>r<e?0:r>t?1:n(Qu(e,t,r))}function tD(e,t){e.min=t.min,e.max=t.max}function Wi(e,t){tD(e.x,t.x),tD(e.y,t.y)}function nD(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function rD(e,t,n,r,i){return e-=t,e=tv(e,1/n,r),i!==void 0&&(e=tv(e,1/i,r)),e}function Uce(e,t=0,n=1,r=.5,i,s=e,o=e){if(ea.test(t)&&(t=parseFloat(t),t=xn(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=xn(s.min,s.max,r);e===s&&(l-=t),e.min=rD(e.min,t,n,l,i),e.max=rD(e.max,t,n,l,i)}function iD(e,t,[n,r,i],s,o){Uce(e,t[n],t[r],t[i],t.scale,s,o)}const Vce=["x","scaleX","originX"],Wce=["y","scaleY","originY"];function sD(e,t,n,r){iD(e.x,t,Vce,n?n.x:void 0,r?r.x:void 0),iD(e.y,t,Wce,n?n.y:void 0,r?r.y:void 0)}function aD(e){return e.translate===0&&e.scale===1}function oU(e){return aD(e.x)&&aD(e.y)}function oD(e,t){return e.min===t.min&&e.max===t.max}function Hce(e,t){return oD(e.x,t.x)&&oD(e.y,t.y)}function lD(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function lU(e,t){return lD(e.x,t.x)&&lD(e.y,t.y)}function cD(e){return Di(e.x)/Di(e.y)}function uD(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Gce{constructor(){this.members=[]}add(t){DO(this.members,t),t.scheduleRender()}remove(t){if(LO(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Kce(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:p,skewX:m,skewY:x}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),x&&(r+=`skewY(${x}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Ll={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},yh=typeof window<"u"&&window.MotionDebug!==void 0,r1=["","X","Y","Z"],Yce={visibility:"hidden"},dD=1e3;let Xce=0;function i1(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function cU(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=y7(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",fn,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&cU(r)}function uU({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=Xce++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,yh&&(Ll.totalNodes=Ll.resolvedTargetDeltas=Ll.recalculatedProjection=0),this.nodes.forEach(Jce),this.nodes.forEach(iue),this.nodes.forEach(sue),this.nodes.forEach(eue),yh&&window.MotionDebug.record(Ll)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Lce)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new $O),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Mce(o),this.instance=o;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=$ce(p,250),Ry.hasAnimatedSinceResize&&(Ry.hasAnimatedSinceResize=!1,this.nodes.forEach(hD))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:x})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const y=this.options.transition||d.getDefaultTransition()||uue,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=d.getProps(),w=!this.targetLayout||!lU(this.targetLayout,x)||m,N=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||N||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,N);const S={...TO(y,"layout"),onPlay:v,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||hD(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=x})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Xo(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(aue),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&cU(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(fD);return}this.isUpdating||this.nodes.forEach(nue),this.isUpdating=!1,this.nodes.forEach(rue),this.nodes.forEach(Qce),this.nodes.forEach(Zce),this.clearAllSnapshots();const l=ta.now();vr.delta=za(0,1e3/60,l-vr.timestamp),vr.timestamp=l,vr.isProcessing=!0,Kw.update.process(vr),Kw.preRender.process(vr),Kw.render.process(vr),vr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jO.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tue),this.sharedNodes.forEach(oue)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=An(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!oU(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(l||Dl(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),due(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return An();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(fue))){const{scroll:d}=this.root;d&&(wu(c.x,d.offset.x),wu(c.y,d.offset.y))}return c}removeElementScroll(o){var l;const c=An();if(Wi(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:p}=d;d!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&Wi(c,o),wu(c.x,f.offset.x),wu(c.y,f.offset.y))}return c}applyTransform(o,l=!1){const c=An();Wi(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&ju(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Dl(d.latestValues)&&ju(c,d.latestValues)}return Dl(this.latestValues)&&ju(c,this.latestValues),c}removeTransform(o){const l=An();Wi(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Dl(u.latestValues))continue;UE(u.latestValues)&&u.updateSnapshot();const d=An(),f=u.measurePageBox();Wi(d,f),sD(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Dl(this.latestValues)&&sD(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==vr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:p}=this.options;if(!(!this.layout||!(f||p))){if(this.resolvedRelativeTargetAt=vr.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=An(),this.relativeTargetOrigin=An(),Oh(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),Wi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=An(),this.targetWithTransforms=An()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pce(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Wi(this.target,this.layout.layoutBox),tU(this.target,this.targetDelta)):Wi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=An(),this.relativeTargetOrigin=An(),Oh(this.relativeTargetOrigin,this.target,m.target),Wi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}yh&&Ll.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||UE(this.parent.latestValues)||eU(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===vr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;Wi(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,m=this.treeScale.y;Sce(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=An());const{target:x}=l;if(!x){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(nD(this.prevProjectionDelta.x,this.projectionDelta.x),nD(this.prevProjectionDelta.y,this.projectionDelta.y)),kh(this.projectionDelta,this.layoutCorrected,x,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==m||!uD(this.projectionDelta.x,this.prevProjectionDelta.x)||!uD(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",x)),yh&&Ll.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=bu(),this.projectionDelta=bu(),this.projectionDeltaWithTransform=bu()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=bu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=An(),m=c?c.source:void 0,x=this.layout?this.layout.source:void 0,y=m!==x,v=this.getStack(),b=!v||v.members.length<=1,w=!!(y&&!b&&this.options.crossfade===!0&&!this.path.some(cue));this.animationProgress=0;let N;this.mixTargetDelta=S=>{const _=S/1e3;pD(f.x,o.x,_),pD(f.y,o.y,_),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oh(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),lue(this.relativeTarget,this.relativeTargetOrigin,p,_),N&&Hce(this.relativeTarget,N)&&(this.isProjectionDirty=!1),N||(N=An()),Wi(N,this.relativeTarget)),y&&(this.animationValues=d,Fce(d,u,this.latestValues,_,w,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Xo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fn.update(()=>{Ry.hasAnimatedSinceResize=!0,this.currentAnimation=Ice(0,dD,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(dD),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&dU(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||An();const f=Di(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const p=Di(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}Wi(l,c),ju(l,d),kh(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Gce),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&i1("z",o,u,this.animationValues);for(let d=0;d<r1.length;d++)i1(`rotate${r1[d]}`,o,u,this.animationValues),i1(`skew${r1[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Yce;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Cy(o==null?void 0:o.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=Cy(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Dl(this.latestValues)&&(y.transform=d?d({},""):"none",this.hasProjected=!1),y}const p=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=Kce(this.projectionDeltaWithTransform,this.treeScale,p),d&&(u.transform=d(p,u.transform));const{x:m,y:x}=this.projectionDelta;u.transformOrigin=`${m.origin*100}% ${x.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(l=p.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const y in Xy){if(p[y]===void 0)continue;const{correct:v,applyTo:b}=Xy[y],w=u.transform==="none"?p[y]:v(p[y],f);if(b){const N=b.length;for(let S=0;S<N;S++)u[b[S]]=w}else u[y]=w}return this.options.layoutId&&(u.pointerEvents=f===this?Cy(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(fD),this.root.sharedNodes.clear()}}}function Qce(e){e.updateLayout()}function Zce(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s==="size"?Xi(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],m=Di(p);p.min=r[f].min,p.max=p.min+m}):dU(s,n.layoutBox,r)&&Xi(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],m=Di(r[f]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const l=bu();kh(l,r,n.layoutBox);const c=bu();o?kh(c,e.applyTransform(i,!0),n.measuredBox):kh(c,r,n.layoutBox);const u=!oU(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:m}=f;if(p&&m){const x=An();Oh(x,n.layoutBox,p.layoutBox);const y=An();Oh(y,r,m.layoutBox),lU(x,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=x,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Jce(e){yh&&Ll.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function eue(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tue(e){e.clearSnapshot()}function fD(e){e.clearMeasurements()}function nue(e){e.isLayoutDirty=!1}function rue(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function hD(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function iue(e){e.resolveTargetDelta()}function sue(e){e.calcProjection()}function aue(e){e.resetSkewAndRotation()}function oue(e){e.removeLeadSnapshot()}function pD(e,t,n){e.translate=xn(t.translate,0,n),e.scale=xn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mD(e,t,n,r){e.min=xn(t.min,n.min,r),e.max=xn(t.max,n.max,r)}function lue(e,t,n,r){mD(e.x,t.x,n.x,r),mD(e.y,t.y,n.y,r)}function cue(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uue={duration:.45,ease:[.4,0,.1,1]},gD=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),yD=gD("applewebkit/")&&!gD("chrome/")?Math.round:Ai;function vD(e){e.min=yD(e.min),e.max=yD(e.max)}function due(e){vD(e.x),vD(e.y)}function dU(e,t,n){return e==="position"||e==="preserve-aspect"&&!hce(cD(t),cD(n),.2)}function fue(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const hue=uU({attachResizeListener:(e,t)=>Xh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),s1={current:void 0},fU=uU({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!s1.current){const e=new hue({});e.mount(window),e.setOptions({layoutScroll:!0}),s1.current=e}return s1.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),pue={pan:{Feature:Oce},drag:{Feature:kce,ProjectionNode:fU,MeasureLayout:iU}};function xD(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&&fn.postRender(()=>s(t,sm(t)))}class mue extends il{mount(){const{current:t}=this.node;t&&(this.unmount=foe(t,n=>(xD(this.node,n,"Start"),r=>xD(this.node,r,"End"))))}unmount(){}}class gue extends il{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=im(Xh(this.node.current,"focus",()=>this.onFocus()),Xh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function bD(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&fn.postRender(()=>s(t,sm(t)))}class yue extends il{mount(){const{current:t}=this.node;t&&(this.unmount=goe(t,n=>(bD(this.node,n,"Start"),(r,{success:i})=>bD(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const WE=new WeakMap,a1=new WeakMap,vue=e=>{const t=WE.get(e.target);t&&t(e)},xue=e=>{e.forEach(vue)};function bue({root:e,...t}){const n=e||document;a1.has(n)||a1.set(n,{});const r=a1.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(xue,{root:e,...t})),r[i]}function wue(e,t,n){const r=bue(t);return WE.set(e,n),r.observe(e),()=>{WE.delete(e),r.unobserve(e)}}const jue={some:0,all:1};class Sue extends il{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,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:jue[i]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),p=u?d:f;p&&p(c)};return wue(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;
vendor: 5,455 bytes, line 555
555["amount","margin","root"].some(Nue(t,n))&&this.startObserver()}unmount(){}}function Nue({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _ue={inView:{Feature:Sue},tap:{Feature:yue},focus:{Feature:gue},hover:{Feature:mue}},Eue={layout:{ProjectionNode:fU,MeasureLayout:iU}},HE={current:null},hU={current:!1};function Pue(){if(hU.current=!0,!!vO)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>HE.current=e.matches;e.addListener(t),t()}else HE.current=!1}function kue(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Rr(i))e.addValue(r,i);else if(Rr(s))e.addValue(r,Kh(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Kh(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const wD=new WeakMap,Oue=[...A7,kr,Qo],Aue=e=>Oue.find(O7(e)),jD=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Cue{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=qO,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 p=ta.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,fn.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Ix(n),this.isVariantNode=Gz(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];c[p]!==void 0&&Rr(m)&&m.set(c[p],!1)}}mount(t){this.current=t,wD.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((n,r)=>this.bindToMotionValue(r,n)),hU.current||Pue(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:HE.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){wD.delete(this.current),this.projection&&this.projection.unmount(),Xo(this.notifyUpdate),Xo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Oc.has(t),i=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&fn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),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 Zu){const n=Zu[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):An()}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<jD.length;r++){const i=jD[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=kue(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}
vendor: 4,227 bytes, line 555
555addVariantChild(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=Kh(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(P7(i)||E7(i))?i=parseFloat(i):!Aue(i)&&Qo.test(n)&&(i=$7(t,n)),this.setBaseTarget(t,Rr(i)?i.get():i)),Rr(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=_O(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Rr(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $O),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class pU extends Cue{constructor(){super(...arguments),this.KeyframeResolver=B7}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Rr(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Tue(e){return window.getComputedStyle(e)}class Rue extends pU{constructor(){super(...arguments),this.type="html",this.renderInstance=Qz}readValueFromInstance(t,n){if(Oc.has(n)){const r=VO(n);return r&&r.default||0}else{const r=Tue(t),i=(a7(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return nU(t,n)}build(t,n,r){OO(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return NO(t,n,r)}}class Iue extends pU{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=An}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Oc.has(n)){const r=VO(n);return r&&r.default||0}return n=Zz.has(n)?n:wO(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return t7(t,n,r)}build(t,n,r){AO(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Jz(t,n,r,i)}mount(t){this.isSVGTag=CO(t.tagName),super.mount(t)}}const Mue=(e,t)=>SO(e)?new Iue(t):new Rue(t,{allowProjection:e!==T.Fragment}),Due=soe({...ice,..._ue,...pue,...Eue},Mue),Pe=wae(Due);function Lue(){return a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx("header",{className:"sticky top-0 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[a.jsxs(ft,{to:Xe("Blog"),className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:a.jsx(Ct,{className:"w-5 h-5 text-white"})}),a.jsx("span",{className:"font-bold text-xl text-slate-900",children:"TechBlog"})]}),a.jsx(ft,{to:Xe("Blog"),children:a.jsxs(ae,{variant:"ghost",className:"gap-2",children:[a.jsx(rl,{className:"w-4 h-4"}),"Back to Blog"]})})]})}),a.jsx("article",{className:"max-w-4xl mx-auto px-4 py-16",children:a.jsxs(Pe.div,{initial:{opacity:0,y:20}
555,animate:{opacity:1,y:0},children:[a.jsx("h1",{className:"text-4xl font-bold text-slate-900 mb-6",children:"About TechBlog"}),a.jsxs("div",{className:"prose prose-slate prose-lg max-w-none",children:[a.jsx("p",{className:"lead text-xl text-slate-600 mb-8",children:"Your trusted source for technology news, insights, and analysis."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Our Mission"}),a.jsx("p",{children:"TechBlog is dedicated to providing accurate, timely, and insightful coverage of the technology industry. We focus on delivering factual news and analysis that helps technology professionals, developers, and enthusiasts stay informed about the latest developments in software, AI, cloud computing, cybersecurity, and more."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"What We Cover"}),a.jsx("p",{children:"Our editorial coverage includes:"}),a.jsxs("ul",{className:"space-y-2",children:[a.jsx("li",{children:"Artificial Intelligence and Machine Learning advancements"}),a.jsx("li",{children:"Software development tools and frameworks"}),a.jsx("li",{children:"Cloud computing and SaaS platforms"}),a.jsx("li",{children:"Cybersecurity developments and best practices"}),a.jsx("li",{children:"Programming languages and technologies"}),a.jsx("li",{children:"Tech industry news and company announcements"}),a.jsx("li",{children:"Startup ecosystem and innovation"}),a.jsx("li",{children:"Developer tools and productivity solutions"})]}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Editorial Standards"}),a.jsx("p",{children:"We are committed to maintaining the highest editorial standards. Our content is:"}),a.jsxs("ul",{className:"space-y-2",children:[a.jsxs("li",{children:[a.jsx("strong",{children:"Factual and accurate:"})," We verify information and cite credible sources"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Unbiased and neutral:"})," We present information objectively without hype or exaggeration"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Original and informative:"})," Every article provides genuine value to our readers"]}),a.jsxs("li",{children:[a.jsx("strong",{children:"Professional and well-researched:"})," We maintain journalistic integrity in all our coverage"]})]}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"AI-Assisted Content"}),a.jsx("p",{children:"Some of our content is created with the assistance of artificial intelligence technology. However, all articles undergo editorial review to ensure accuracy, quality, and compliance with our standards. We believe in transparency about our content creation process and are committed to responsible AI use."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Contact Us"}),a.jsxs("p",{children:["We welcome feedback, suggestions, and story tips from our readers. For editorial inquiries or general questions, please visit our ",a.jsx(ft,{to:Xe("Contact"),className:"text-indigo-600 hover:underline",children:"contact page"}),"."]}),a.jsx("div",{className:"mt-12 p-6 bg-indigo-50 rounded-xl border border-indigo-100",children:a.jsxs("p",{className:"text-slate-700 mb-0",children:[a.jsx("strong",{children:"Last Updated:"})," December 2024"]})})]})]})}),a.jsx("footer",{className:"border-t border-slate-200 mt-16",children:a.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8",children:a.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"© 2024 TechBlog. All rights reserved."}),a.jsxs("div",{className:"flex gap-6 text-sm",children:[a.jsx(ft,{to:Xe("Privacy"),className:"text-slate-600 hover:text-indigo-600",children:"Privacy Policy"}),a.jsx(ft,{to:Xe("Terms"),className:"text-slate-600 hover:text-indigo-600",children:"Terms of Service"}),a.jsx(ft,{to:Xe("Contact"),className:"text-slate-600 hover:text-indigo-600",children:"Contact"})]})]})})})]})}const de=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("rounded-xl border bg-card text-card-foreground shadow",e),...t}));
555de.displayName="Card";const Re=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("flex flex-col space-y-1.5 p-6",e),...t}));Re.displayName="CardHeader";const Ie=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("font-semibold leading-none tracking-tight",e),...t}));Ie.displayName="CardTitle";const mn=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("text-sm text-muted-foreground",e),...t}));mn.displayName="CardDescription";const he=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("p-6 pt-0",e),...t}));he.displayName="CardContent";const $ue=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("flex items-center p-6 pt-0",e),...t}));$ue.displayName="CardFooter";function ou({title:e,value:t,change:n,icon:r,color:i="indigo",suffix:s="",delay:o=0}){const l={indigo:"bg-indigo-50 text-indigo-600",emerald:"bg-emerald-50 text-emerald-600",amber:"bg-amber-50 text-amber-600",purple:"bg-purple-50 text-purple-600",blue:"bg-blue-50 text-blue-600",pink:"bg-pink-50 text-pink-600"},c=()=>n>0?a.jsx(Xq,{className:"w-3 h-3"}):n<0?a.jsx(Yq,{className:"w-3 h-3"}):a.jsx($J,{className:"w-3 h-3"}),u=()=>n>0?"text-emerald-600 bg-emerald-50":n<0?"text-red-600 bg-red-50":"text-slate-400 bg-slate-50";return a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o,duration:.4},children:a.jsx(de,{className:"border-slate-200 hover:shadow-md transition-shadow",children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm text-slate-500 mb-1",children:e}),a.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[t.toLocaleString(),s]}),n!==void 0&&a.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 px-2 py-0.5 rounded-full text-xs font-medium ${u()}`,children:[c(),Math.abs(n),"% vs last period"]})]}),a.jsx("div",{className:`w-12 h-12 rounded-xl ${l[i]} flex items-center justify-center`,children:a.jsx(r,{className:"w-6 h-6"})})]})})})})}var o1,SD;function pi(){if(SD)return o1;SD=1;var e=Array.isArray;return o1=e,o1}var l1,ND;function mU(){if(ND)return l1;ND=1;var e=typeof Cg=="object"&&Cg&&Cg.Object===Object&&Cg;return l1=e,l1}var c1,_D;function ua(){if(_D)return c1;_D=1;var e=mU(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return c1=n,c1}var u1,ED;function am(){if(ED)return u1;ED=1;var e=ua(),t=e.Symbol;return u1=t,u1}var d1,PD;function Bue(){if(PD)return d1;PD=1;var e=am(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function s(o){var l=n.call(o,i),c=o[i];try{o[i]=void 0;var u=!0}catch{}var d=r.call(o);return u&&(l?o[i]=c:delete o[i]),d}return d1=s,d1}var f1,kD;function Fue(){if(kD)return f1;kD=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return f1=n,f1}var h1,OD;function Qa(){if(OD)return h1;OD=1;var e=am(),t=Bue(),n=Fue(),r="[object Null]",i="[object Undefined]",s=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:r:s&&s in Object(l)?t(l):n(l)}return h1=o,h1}var p1,AD;function Za(){if(AD)return p1;AD=1;function e(t){return t!=null&&typeof t=="object"}return p1=e,p1}var m1,CD;function Fd(){if(CD)return m1;CD=1;var e=Qa(),t=Za(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return m1=r,m1}var g1,TD;function KO(){if(TD)return g1;TD=1;var e=pi(),t=Fd(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,o){if(e(s))return!1;var l=typeof s;return l=="number"||l=="symbol"||l=="boolean"||s==null||t(s)?!0:r.test(s)||!n.test(s)||o!=null&&s in Object(o)}return g1=i,g1}var y1,RD;function sl(){if(RD)return y1;RD=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return y1=e,y1}var v1,ID;function YO(){if(ID)return v1;ID=1;var e=Qa(),t=sl(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==r||c==i||c==n||c==s}return v1=o,v1}var x1,MD;function que(){if(MD)return x1;MD=1;
vendor: 4,530 bytes, line 555
555var e=ua(),t=e["__core-js_shared__"];return x1=t,x1}var b1,DD;function zue(){if(DD)return b1;DD=1;var e=que(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return b1=n,b1}var w1,LD;function gU(){if(LD)return w1;LD=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return w1=n,w1}var j1,$D;function Uue(){if($D)return j1;$D=1;var e=YO(),t=zue(),n=sl(),r=gU(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||t(p))return!1;var m=e(p)?d:s;return m.test(r(p))}return j1=f,j1}var S1,BD;function Vue(){if(BD)return S1;BD=1;function e(t,n){return t==null?void 0:t[n]}return S1=e,S1}var N1,FD;function Ac(){if(FD)return N1;FD=1;var e=Uue(),t=Vue();function n(r,i){var s=t(r,i);return e(s)?s:void 0}return N1=n,N1}var _1,qD;function Lx(){if(qD)return _1;qD=1;var e=Ac(),t=e(Object,"create");return _1=t,_1}var E1,zD;function Wue(){if(zD)return E1;zD=1;var e=Lx();function t(){this.__data__=e?e(null):{},this.size=0}return E1=t,E1}var P1,UD;function Hue(){if(UD)return P1;UD=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return P1=e,P1}var k1,VD;function Gue(){if(VD)return k1;VD=1;var e=Lx(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;if(e){var l=o[s];return l===t?void 0:l}return r.call(o,s)?o[s]:void 0}return k1=i,k1}var O1,WD;function Kue(){if(WD)return O1;WD=1;var e=Lx(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var s=this.__data__;return e?s[i]!==void 0:n.call(s,i)}return O1=r,O1}var A1,HD;function Yue(){if(HD)return A1;HD=1;var e=Lx(),t="__lodash_hash_undefined__";function n(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=e&&i===void 0?t:i,this}return A1=n,A1}var C1,GD;function Xue(){if(GD)return C1;GD=1;var e=Wue(),t=Hue(),n=Gue(),r=Kue(),i=Yue();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,C1=s,C1}var T1,KD;function Que(){if(KD)return T1;KD=1;function e(){this.__data__=[],this.size=0}return T1=e,T1}var R1,YD;function XO(){if(YD)return R1;YD=1;function e(t,n){return t===n||t!==t&&n!==n}return R1=e,R1}var I1,XD;function $x(){if(XD)return I1;XD=1;var e=XO();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return I1=t,I1}var M1,QD;function Zue(){if(QD)return M1;QD=1;var e=$x(),t=Array.prototype,n=t.splice;function r(i){var s=this.__data__,o=e(s,i);if(o<0)return!1;var l=s.length-1;return o==l?s.pop():n.call(s,o,1),--this.size,!0}return M1=r,M1}var D1,ZD;function Jue(){if(ZD)return D1;ZD=1;var e=$x();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return D1=t,D1}var L1,JD;function ede(){if(JD)return L1;JD=1;var e=$x();function t(n){return e(this.__data__,n)>-1}return L1=t,L1}var $1,e4;function tde(){if(e4)return $1;e4=1;var e=$x();function t(n,r){var i=this.__data__,s=e(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return $1=t,$1}var B1,t4;function Bx(){if(t4)return B1;t4=1;var e=Que(),t=Zue(),n=Jue(),r=ede(),i=tde();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,B1=s,B1}var F1,n4;function QO(){if(n4)return F1;n4=1;var e=Ac(),t=ua(),n=e(t,"Map");return F1=n,F1}var q1,r4;function nde(){if(r4)return q1;r4=1;var e=Xue(),t=Bx(),n=QO();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return q1=r,q1}var z1,i4;function rde(){if(i4)return z1;i4=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return z1=e,z1}var U1,s4;function Fx(){if(s4)return U1;s4=1;var e=rde();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return U1=t,U1}var V1,a4;function ide(){if(a4)return V1;a4=1;var e=Fx();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return V1=t,V1}var W1,o4;function sde(){if(o4)return W1;o4=1;var e=Fx();function t(n){return e(this,n).get(n)}return W1=t,W1}var H1,l4;
vendor: 11,397 bytes, lines 555-563
555function ade(){if(l4)return H1;l4=1;var e=Fx();function t(n){return e(this,n).has(n)}return H1=t,H1}var G1,c4;function ode(){if(c4)return G1;c4=1;var e=Fx();function t(n,r){var i=e(this,n),s=i.size;return i.set(n,r),this.size+=i.size==s?0:1,this}return G1=t,G1}var K1,u4;function ZO(){if(u4)return K1;u4=1;var e=nde(),t=ide(),n=sde(),r=ade(),i=ode();function s(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,K1=s,K1}var Y1,d4;function yU(){if(d4)return Y1;d4=1;var e=ZO(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var s=function(){var o=arguments,l=i?i.apply(this,o):o[0],c=s.cache;if(c.has(l))return c.get(l);var u=r.apply(this,o);return s.cache=c.set(l,u)||c,u};return s.cache=new(n.Cache||e),s}return n.Cache=e,Y1=n,Y1}var X1,f4;function lde(){if(f4)return X1;f4=1;var e=yU(),t=500;function n(r){var i=e(r,function(o){return s.size===t&&s.clear(),o}),s=i.cache;return i}return X1=n,X1}var Q1,h4;function cde(){if(h4)return Q1;h4=1;var e=lde(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(t,function(o,l,c,u){s.push(c?u.replace(n,"$1"):l||o)}),s});return Q1=r,Q1}var Z1,p4;function JO(){if(p4)return Z1;p4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=Array(i);++r<i;)s[r]=n(t[r],r,t);return s}return Z1=e,Z1}var J1,m4;function ude(){if(m4)return J1;m4=1;var e=am(),t=JO(),n=pi(),r=Fd(),i=e?e.prototype:void 0,s=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return s?s.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return J1=o,J1}var ej,g4;function vU(){if(g4)return ej;g4=1;var e=ude();function t(n){return n==null?"":e(n)}return ej=t,ej}var tj,y4;function xU(){if(y4)return tj;y4=1;var e=pi(),t=KO(),n=cde(),r=vU();function i(s,o){return e(s)?s:t(s,o)?[s]:n(r(s))}return tj=i,tj}var nj,v4;function qx(){if(v4)return nj;v4=1;var e=Fd();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return nj=t,nj}var rj,x4;function eA(){if(x4)return rj;x4=1;var e=xU(),t=qx();function n(r,i){i=e(i,r);for(var s=0,o=i.length;r!=null&&s<o;)r=r[t(i[s++])];return s&&s==o?r:void 0}return rj=n,rj}var ij,b4;function bU(){if(b4)return ij;b4=1;var e=eA();function t(n,r,i){var s=n==null?void 0:e(n,r);return s===void 0?i:s}return ij=t,ij}var dde=bU();const Ci=Lt(dde);var sj,w4;function fde(){if(w4)return sj;w4=1;function e(t){return t==null}return sj=e,sj}var hde=fde();const jt=Lt(hde);var aj,j4;function pde(){if(j4)return aj;j4=1;var e=Qa(),t=pi(),n=Za(),r="[object String]";function i(s){return typeof s=="string"||!t(s)&&n(s)&&e(s)==r}return aj=i,aj}var mde=pde();const mc=Lt(mde);var gde=YO();const yt=Lt(gde);var yde=sl();const qd=Lt(yde);var oj={exports:{}},Vt={};/** 556 * @license React 557 * react-is.production.min.js 558 * 559 * Copyright (c) Facebook, Inc. and its affiliates. 560 * 561 * This source code is licensed under the MIT license found in the 562 * LICENSE file in the root directory of this source tree. 563 */var S4;function vde(){if(S4)return Vt;S4=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var b=v.$$typeof;switch(b){case e:switch(v=v.type,v){case n:case i:case r:case u:case d:return v;default:switch(v=v&&v.$$typeof,v){case l:case o:case c:case p:case f:case s:return v;default:return b}}case t:return b}}}return Vt.ContextConsumer=o,Vt.ContextProvider=s,Vt.Element=e,Vt.ForwardRef=c,Vt.Fragment=n,Vt.Lazy=p,Vt.Memo=f,Vt.Portal=t,Vt.Profiler=i,Vt.StrictMode=r,Vt.Suspense=u,Vt.SuspenseList=d,Vt.isAsyncMode=function(){return!1},Vt.isConcurrentMode=function(){return!1},Vt.isContextConsumer=function(v){return y(v)===o},Vt.isContextProvider=function(v){return y(v)===s},Vt.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Vt.isForwardRef=function(v){return y(v)===c},Vt.isFragment=function(v){return y(v)===n},Vt.isLazy=function(v){return y(v)===p},Vt.isMemo=function(v){return y(v)===f},Vt.isPortal=function(v){return y(v)===t},Vt.isProfiler=function(v){return y(v)===i},Vt.isStrictMode=function(v){return y(v)===r},Vt.isSuspense=function(v){return y(v)===u},Vt.isSuspenseList=function(v){return y(v)===d},Vt.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===i||v===r||v===u||v===d||v===m||typeof v=="object"&&v!==null&&(v.$$typeof===p||v.$$typeof===f||v.$$typeof===s||v.$$typeof===o||v.$$typeof===c||v.$$typeof===x||v.getModuleId!==void 0)},Vt.typeOf=y,Vt}var N4;function xde(){return N4||(N4=1,oj.exports=vde()),oj.exports}var bde=xde(),lj,_4;function wU(){if(_4)return lj;_4=1;var e=Qa(),t=Za(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return lj=r,lj}var cj,E4;function wde(){if(E4)return cj;E4=1;var e=wU();function t(n){return e(n)&&n!=+n}return cj=t,cj}var jde=wde();const om=Lt(jde);var Sde=wU();const Nde=Lt(Sde);var Wr=function(t){return t===0?0:t>0?1:-1},Hl=function(t){return mc(t)&&t.indexOf("%")===t.length-1},Le=function(t){return Nde(t)&&!om(t)},_de=function(t){return jt(t)},Zn=function(t){return Le(t)||mc(t)},Ede=0,zd=function(t){var n=++Ede;return"".concat(t||"").concat(n)},Hr=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(!Le(t)&&!mc(t))return r;var s;if(Hl(t)){var o=t.indexOf("%");s=n*parseFloat(t.slice(0,o))/100}else s=+t;return om(s)&&(s=r),i&&s>n&&(s=n),s},Oo=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Pde=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},_i=function(t,n){return Le(t)&&Le(n)?function(r){return t+r*(n-t)}:function(){return n}};function nv(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Ci(r,t))===n})}var kde=function(t,n){return Le(t)&&Le(n)?t-n:mc(t)&&mc(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function ku(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 GE(e){"@babel/helpers - typeof";return GE=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},GE(e)}var Ode=["viewBox","children"],Ade=["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"],P4=["points","pathLength"],uj={svg:Ode,polygon:P4,polyline:P4},tA=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
563ocus","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"],rv=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(T.isValidElement(t)&&(r=t.props),!qd(r))return null;var i={};return Object.keys(r).forEach(function(s){tA.includes(s)&&(i[s]=n||function(o){return r[s](r,o)})}),i},Cde=function(t,n,r){return function(i){return t(n,r,i),null}},gc=function(t,n,r){if(!qd(t)||GE(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(s){var o=t[s];tA.includes(s)&&typeof o=="function"&&(i||(i={}),i[s]=Cde(o,n,r))}),i},Tde=["children"],Rde=["children"];function k4(e,t){if(e==null)return{};var n=Ide(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 Ide(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 KE(e){"@babel/helpers - typeof";return KE=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},KE(e)}var O4={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"}
vendor: 6,263 bytes, line 563
563,Da=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},A4=null,dj=null,nA=function e(t){if(t===A4&&Array.isArray(dj))return dj;var n=[];return T.Children.forEach(t,function(r){jt(r)||(bde.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),dj=n,A4=t,n};function Ti(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Da(i)}):r=[Da(t)],nA(e).forEach(function(i){var s=Ci(i,"type.displayName")||Ci(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function Ni(e,t){var n=Ti(e,t);return n&&n[0]}var C4=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Le(r)||r<=0||!Le(i)||i<=0)},Mde=["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"],Dde=function(t){return t&&t.type&&mc(t.type)&&Mde.indexOf(t.type)>=0},Lde=function(t){return t&&KE(t)==="object"&&"clipDot"in t},$de=function(t,n,r,i){var s,o=(s=uj==null?void 0:uj[i])!==null&&s!==void 0?s:[];return n.startsWith("data-")||!yt(t)&&(i&&o.includes(n)||Ade.includes(n))||r&&tA.includes(n)},ct=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(T.isValidElement(t)&&(i=t.props),!qd(i))return null;var s={};return Object.keys(i).forEach(function(o){var l;$de((l=i)===null||l===void 0?void 0:l[o],o,n,r)&&(s[o]=i[o])}),s},YE=function e(t,n){if(t===n)return!0;var r=T.Children.count(t);if(r!==T.Children.count(n))return!1;if(r===0)return!0;if(r===1)return T4(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var s=t[i],o=n[i];if(Array.isArray(s)||Array.isArray(o)){if(!e(s,o))return!1}else if(!T4(s,o))return!1}return!0},T4=function(t,n){if(jt(t)&&jt(n))return!0;if(!jt(t)&&!jt(n)){var r=t.props||{},i=r.children,s=k4(r,Tde),o=n.props||{},l=o.children,c=k4(o,Rde);return i&&l?ku(s,c)&&YE(i,l):!i&&!l?ku(s,c):!1}return!1},R4=function(t,n){var r=[],i={};return nA(t).forEach(function(s,o){if(Dde(s))r.push(s);else if(s){var l=Da(s.type),c=n[l]||{},u=c.handler,d=c.once;if(u&&(!d||!i[l])){var f=u(s,l,o);r.push(f),i[l]=!0}}}),r},Bde=function(t){var n=t&&t.type;return n&&O4[n]?O4[n]:null},Fde=function(t,n){return nA(n).indexOf(t)},qde=["children","width","height","viewBox","className","style","title","desc"];function XE(){return XE=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},XE.apply(this,arguments)}function zde(e,t){if(e==null)return{};var n=Ude(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 Ude(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 QE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,s=e.className,o=e.style,l=e.title,c=e.desc,u=zde(e,qde),d=i||{width:n,height:r,x:0,y:0},f=St("recharts-surface",s);return ee.createElement("svg",XE({},ct(u,!0,"svg"),{className:f,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),ee.createElement("title",null,l),ee.createElement("desc",null,c),t)}var Vde=["children","className"];function ZE(){return ZE=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},ZE.apply(this,arguments)}function Wde(e,t){if(e==null)return{};var n=Hde(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 Hde(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 qt=ee.forwardRef(function(e,t){var n=e.children,r=e.className,i=Wde(e,Vde),s=St("recharts-layer",r);return ee.createElement("g",ZE({className:s},ct(i,!0),{ref:t}),n)}),Os=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]},fj,I4;function Gde(){if(I4)return fj;I4=1;function e(t,n,r){var i=-1,s=t.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(s);++i<s;)o[i]=t[i+n];return o}return fj=e,fj}var hj,M4;function Kde(){if(M4)return hj;M4=1;var e=Gde();function t(n,r,i){var s=n.length;return i=i===void 0?s:i,!r&&i>=s?n:e(n,r,i)}return hj=t,hj}var pj,D4;function jU(){if(D4)return pj;D4=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+s+"]");function c(u){return l.test(u)}return pj=c,pj}var mj,L4;function Yde(){if(L4)return mj;L4=1;function e(t){return t.split("")}return mj=e,mj}var gj,$4;function Xde(){if($4)return gj;$4=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,s="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",x=u+"?",y="["+s+"]?",v="(?:"+m+"(?:"+[d,f,p].join("|")+")"+y+x+")*",b=y+x+v,w="(?:"+[d+l+"?",l,f,p,o].join("|")+")",N=RegExp(c+"(?="+c+")|"+w+b,"g");function S(_){return _.match(N)||[]}return gj=S,gj}var yj,B4;
vendor: 3,636 bytes, line 563
563function Qde(){if(B4)return yj;B4=1;var e=Yde(),t=jU(),n=Xde();function r(i){return t(i)?n(i):e(i)}return yj=r,yj}var vj,F4;function Zde(){if(F4)return vj;F4=1;var e=Kde(),t=jU(),n=Qde(),r=vU();function i(s){return function(o){o=r(o);var l=t(o)?n(o):void 0,c=l?l[0]:o.charAt(0),u=l?e(l,1).join(""):o.slice(1);return c[s]()+u}}return vj=i,vj}var xj,q4;function Jde(){if(q4)return xj;q4=1;var e=Zde(),t=e("toUpperCase");return xj=t,xj}var efe=Jde();const zx=Lt(efe);function sn(e){return function(){return e}}const SU=Math.cos,iv=Math.sin,Ds=Math.sqrt,sv=Math.PI,Ux=2*sv,JE=Math.PI,eP=2*JE,$l=1e-6,tfe=eP-$l;function NU(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function nfe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NU;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 rfe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?NU:nfe(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,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+o}`}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 o=this._x1,l=this._y1,c=r-t,u=i-n,d=o-t,f=l-n,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>$l)if(!(Math.abs(f*c-u*d)>$l)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-o,x=i-l,y=c*c+u*u,v=m*m+x*x,b=Math.sqrt(y),w=Math.sqrt(p),N=s*Math.tan((JE-Math.acos((y+p-v)/(2*b*w)))/2),S=N/w,_=N/b;Math.abs(S-1)>$l&&this._append`L${t+S*d},${n+S*f}`,this._append`A${s},${s},0,0,${+(f*m>d*x)},${this._x1=t+_*c},${this._y1=n+_*u}`}}arc(t,n,r,i,s,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=t+l,d=n+c,f=1^o,p=o?i-s:s-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>$l||Math.abs(this._y1-d)>$l)&&this._append`L${u},${d}`,r&&(p<0&&(p=p%eP+eP),p>tfe?this._append`A${r},${r},0,1,${f},${t-l},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:p>$l&&this._append`A${r},${r},0,${+(p>=JE)},${f},${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 rA(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 rfe(t)}function iA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _U(e){this._context=e}_U.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 Vx(e){return new _U(e)}function EU(e){return e[0]}function PU(e){return e[1]}function kU(e,t){var n=sn(!0),r=null,i=Vx,s=null,o=rA(l);e=typeof e=="function"?e:e===void 0?EU:sn(e),t=typeof t=="function"?t:t===void 0?PU:sn(t);function l(c){var u,d=(c=iA(c)).length,f,p=!1,m;
563for(r==null&&(s=i(m=o())),u=0;u<=d;++u)!(u<d&&n(f=c[u],u,c))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+e(f,u,c),+t(f,u,c));if(m)return s=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:sn(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:sn(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:sn(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(s=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=s=null:s=i(r=c),l):r},l}function Vg(e,t,n){var r=null,i=sn(!0),s=null,o=Vx,l=null,c=rA(u);e=typeof e=="function"?e:e===void 0?EU:sn(+e),t=typeof t=="function"?t:sn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?PU:sn(+n);function u(f){var p,m,x,y=(f=iA(f)).length,v,b=!1,w,N=new Array(y),S=new Array(y);for(s==null&&(l=o(w=c())),p=0;p<=y;++p){if(!(p<y&&i(v=f[p],p,f))===b)if(b=!b)m=p,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),x=p-1;x>=m;--x)l.point(N[x],S[x]);l.lineEnd(),l.areaEnd()}b&&(N[p]=+e(v,p,f),S[p]=+t(v,p,f),l.point(r?+r(v,p,f):N[p],n?+n(v,p,f):S[p]))}if(w)return l=null,w+""||null}function d(){return kU().defined(i).curve(o).context(s)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:sn(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:sn(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:sn(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:sn(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:sn(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:sn(+f),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(f){return arguments.length?(i=typeof f=="function"?f:sn(!!f),u):i},u.curve=function(f){return arguments.length?(o=f,s!=null&&(l=o(s)),u):o},u.context=function(f){return arguments.length?(f==null?s=l=null:l=o(s=f),u):s},u}class OU{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 ife(e){return new OU(e,!0)}function sfe(e){return new OU(e,!1)}const sA={draw(e,t){const n=Ds(t/sv);e.moveTo(n,0),e.arc(0,0,n,0,Ux)}},afe={draw(e,t){const n=Ds(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()}},AU=Ds(1/3),ofe=AU*2,lfe={draw(e,t){const n=Ds(t/ofe),r=n*AU;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},cfe={draw(e,t){const n=Ds(t),r=-n/2;e.rect(r,r,n,n)}},ufe=.8908130915292852,CU=iv(sv/10)/iv(7*sv/10),dfe=iv(Ux/10)*CU,ffe=-SU(Ux/10)*CU,hfe={draw(e,t){const n=Ds(t*ufe),r=dfe*n,i=ffe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let s=1;s<5;++s){const o=Ux*s/5,l=SU(o),c=iv(o);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*i,c*r+l*i)}e.closePath()}},bj=Ds(3),pfe={draw(e,t){const n=-Ds(t/(bj*3));e.moveTo(0,n*2),e.lineTo(-bj*n,-n),e.lineTo(bj*n,-n),e.closePath()}},Hi=-.5,Gi=Ds(3)/2,tP=1/Ds(12),mfe=(tP/2+1)*3,gfe={draw(e,t){const n=Ds(t/mfe),r=n/2,i=n*tP,s=r,o=n*tP+n,l=-s,c=o;e.moveTo(r,i),e.lineTo(s,o),e.lineTo(l,c),e.lineTo(Hi*r-Gi*i,Gi*r+Hi*i),e.lineTo(Hi*s-Gi*o,Gi*s+Hi*o),e.lineTo(Hi*l-Gi*c,Gi*l+Hi*c),e.lineTo(Hi*r+Gi*i,Hi*i-Gi*r),e.lineTo(Hi*s+Gi*o,Hi*o-Gi*s),e.lineTo(Hi*l+Gi*c,Hi*c-Gi*l),e.closePath()}};function yfe(e,t){let n=null,r=rA(i);e=typeof e=="function"?e:sn(e||sA),t=typeof t=="function"?t:sn(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,
vendor: 6,548 bytes, line 563
563s+""||null}return i.type=function(s){return arguments.length?(e=typeof s=="function"?s:sn(s),i):e},i.size=function(s){return arguments.length?(t=typeof s=="function"?s:sn(+s),i):t},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function av(){}function ov(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 TU(e){this._context=e}TU.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:ov(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:ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vfe(e){return new TU(e)}function RU(e){this._context=e}RU.prototype={areaStart:av,areaEnd:av,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:ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xfe(e){return new RU(e)}function IU(e){this._context=e}IU.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:ov(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bfe(e){return new IU(e)}function MU(e){this._context=e}MU.prototype={areaStart:av,areaEnd:av,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 wfe(e){return new MU(e)}function z4(e){return e<0?-1:1}function U4(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(s*i+o*r)/(r+i);return(z4(s)+z4(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(l))||0}function V4(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function wj(e,t,n){var r=e._x0,i=e._y0,s=e._x1,o=e._y1,l=(s-r)/3;e._context.bezierCurveTo(r+l,i+l*t,s-l,o-l*n,s,o)}function lv(e){this._context=e}lv.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:wj(this,this._t0,V4(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,wj(this,V4(this,n=U4(this,e,t)),n);break;default:wj(this,this._t0,n=U4(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function DU(e){this._context=new LU(e)}(DU.prototype=Object.create(lv.prototype)).point=function(e,t){lv.prototype.point.call(this,t,e)};function LU(e){this._context=e}LU.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 jfe(e){return new lv(e)}function Sfe(e){return new DU(e)}function $U(e){this._context=e}$U.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=W4(e),i=W4(t),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[o],t[o]);(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 W4(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),o=new Array(n);for(i[0]=0,s[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(o[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 Nfe(e){return new $U(e)}function Wx(e,t){this._context=e,this._t=t}Wx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 17,560 bytes, lines 563-566
563default:{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 _fe(e){return new Wx(e,.5)}function Efe(e){return new Wx(e,0)}function Pfe(e){return new Wx(e,1)}function ed(e,t){if((o=e.length)>1)for(var n=1,r,i,s=e[t[0]],o,l=s.length;n<o;++n)for(i=s,s=e[t[n]],r=0;r<l;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function nP(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function kfe(e,t){return e[t]}function Ofe(e){const t=[];return t.key=e,t}function Afe(){var e=sn([]),t=nP,n=ed,r=kfe;function i(s){var o=Array.from(e.apply(this,arguments),Ofe),l,c=o.length,u=-1,d;for(const f of s)for(l=0,++u;l<c;++l)(o[l][u]=[0,+r(f,o[l].key,u,s)]).data=f;for(l=0,d=iA(t(o));l<c;++l)o[d[l]].index=l;return n(o,d),o}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:sn(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:sn(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?nP:typeof s=="function"?s:sn(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??ed,i):n},i}function Cfe(e,t){if((r=e.length)>0){for(var n,r,i=0,s=e[0].length,o;i<s;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ed(e,t)}}function Tfe(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,s=r.length;n<s;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}ed(e,t)}}function Rfe(e,t){if(!(!((o=e.length)>0)||!((s=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,s,o;r<s;++r){for(var l=0,c=0,u=0;l<o;++l){for(var d=e[t[l]],f=d[r][1]||0,p=d[r-1][1]||0,m=(f-p)/2,x=0;x<l;++x){var y=e[t[x]],v=y[r][1]||0,b=y[r-1][1]||0;m+=v-b}c+=f,u+=m*f}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,ed(e,t)}}function Qh(e){"@babel/helpers - typeof";return Qh=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},Qh(e)}var Ife=["type","size","sizeType"];function rP(){return rP=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},rP.apply(this,arguments)}function H4(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 G4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H4(Object(n),!0).forEach(function(r){Mfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mfe(e,t,n){return t=Dfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dfe(e){var t=Lfe(e,"string");return Qh(t)=="symbol"?t:t+""}function Lfe(e,t){if(Qh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $fe(e,t){if(e==null)return{};var n=Bfe(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 Bfe(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 BU={symbolCircle:sA,symbolCross:afe,symbolDiamond:lfe,symbolSquare:cfe,symbolStar:hfe,symbolTriangle:pfe,symbolWye:gfe},Ffe=Math.PI/180,qfe=function(t){var n="symbol".concat(zx(t));return BU[n]||sA},zfe=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*Ffe;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}},Ufe=function(t,n){BU["symbol".concat(zx(t))]=n},aA=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,s=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,c=$fe(t,Ife),u=G4(G4({},c),{},{type:r,size:s,sizeType:l}),d=function(){var v=qfe(r),b=yfe().type(v).size(zfe(s,l,r));return b()},f=u.className,p=u.cx,m=u.cy,x=ct(u,!0);return p===+p&&m===+m&&s===+s?ee.createElement("path",rP({},x,{className:St("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(m,")"),d:d()})):null};aA.registerSymbol=Ufe;function td(e){"@babel/helpers - typeof";return td=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},td(e)}function iP(){return iP=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},iP.apply(this,arguments)}function K4(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 Vfe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K4(Object(n),!0).forEach(function(r){Zh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hfe(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,qU(r.key),r)}}function Gfe(e,t,n){return t&&Hfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kfe(e,t,n){return t=cv(t),Yfe(e,FU()?Reflect.construct(t,n||[],cv(e).constructor):t.apply(e,n))}function Yfe(e,t){if(t&&(td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xfe(e)}function Xfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FU=function(){return!!e})()}function cv(e){return cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cv(e)}function Qfe(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&&sP(e,t)}function sP(e,t){return sP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sP(e,t)}function Zh(e,t,n){return t=qU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qU(e){var t=Zfe(e,"string");return td(t)=="symbol"?t:t+""}function Zfe(e,t){if(td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(td(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ki=32,oA=(function(e){function t(){return Wfe(this,t),Kfe(this,t,arguments)}return Qfe(t,e),Gfe(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,s=Ki/2,o=Ki/6,l=Ki/3,c=r.inactive?i:r.color;if(r.type==="plainline")return ee.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:s,x2:Ki,y2:s,className:"recharts-legend-icon"});if(r.type==="line")return ee.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(s,"h").concat(l,` 564 A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(s,` 565 H`).concat(Ki,"M").concat(2*l,",").concat(s,` 566 A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(s),className:"recharts-legend-icon"});if(r.type==="rect")return ee.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Ki/8,"h").concat(Ki,"v").concat(Ki*3/4,"h").concat(-Ki,"z"),className:"recharts-legend-icon"});if(ee.isValidElement(r.legendIcon)){var u=Vfe({},r);return delete u.legendIcon,ee.cloneElement(r.legendIcon,u)}return ee.createElement(aA,{fill:c,cx:s,cy:s,size:Ki,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,s=i.payload,o=i.iconSize,l=i.layout,c=i.formatter,u=i.inactiveColor,d={x:0,y:0,width:Ki,height:Ki},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(m,x){var y=m.formatter||c,v=St(Zh(Zh({"recharts-legend-item":!0},"legend-item-".concat(x),!0),"inactive",m.inactive));if(m.type==="none")return null;var b=yt(m.value)?null:m.value;Os(!yt(m.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 w=m.inactive?u:m.color;return ee.createElement("li",iP({className:v,style:f,key:"legend-item-".concat(x)},gc(r.props,m,x)),ee.createElement(QE,{width:o,height:o,viewBox:d,style:p},r.renderIcon(m)),ee.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},y?y(b,m,x):b))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,o=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:s==="horizontal"?o:"left"};return ee.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(T.PureComponent);Zh(oA,"displayName","Legend");Zh(oA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var jj,Y4;function Jfe(){if(Y4)return jj;Y4=1;var e=Bx();function t(){this.__data__=new e,this.size=0}return jj=t,jj}var Sj,X4;function ehe(){if(X4)return Sj;X4=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Sj=e,Sj}var Nj,Q4;function the(){if(Q4)return Nj;Q4=1;function e(t){return this.__data__.get(t)}return Nj=e,Nj}var _j,Z4;function nhe(){if(Z4)return _j;Z4=1;function e(t){return this.__data__.has(t)}return _j=e,_j}var Ej,J4;function rhe(){if(J4)return Ej;J4=1;var e=Bx(),t=QO(),n=ZO(),r=200;function i(s,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([s,o]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(s,o),this.size=l.size,this}return Ej=i,Ej}var Pj,e5;function zU(){if(e5)return Pj;e5=1;var e=Bx(),t=Jfe(),n=ehe(),r=the(),i=nhe(),s=rhe();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,Pj=o,Pj}var kj,t5;function ihe(){if(t5)return kj;t5=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return kj=t,kj}var Oj,n5;function she(){if(n5)return Oj;n5=1;function e(t){return this.__data__.has(t)}return Oj=e,Oj}var Aj,r5;function UU(){if(r5)return Aj;r5=1;var e=ZO(),t=ihe(),n=she();function r(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new e;++s<o;)this.add(i[s])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Aj=r,Aj}var Cj,i5;function VU(){if(i5)return Cj;i5=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Cj=e,Cj}var Tj,s5;function WU(){if(s5)return Tj;s5=1;function e(t,n){return t.has(n)}return Tj=e,Tj}var Rj,a5;function HU(){if(a5)return Rj;a5=1;var e=UU(),t=VU(),n=WU(),r=1,i=2;function s(o,l,c,u,d,f){var p=c&r,m=o.length,x=l.length;if(m!=x&&!(p&&x>m))return!1;var y=f.get(o),v=f.get(l);if(y&&v)return y==l&&v==o;var b=-1,w=!0,N=c&i?new e:void 0;for(f.set(o,l),f.set(l,o);++b<m;){var S=o[b],_=l[b];if(u)var E=p?u(_,S,b,l,o,f):u(S,_,b,o,l,f);if(E!==void 0){if(E)continue;w=!1;break}if(N){if(!t(l,function(k,O){if(!n(N,O)&&(S===k||d(S,k,c,u,f)))return N.push(O)})){w=!1;break}}else if(!(S===_||d(S,_,c,u,f))){w=!1;break}}return f.delete(o),f.delete(l),w}return Rj=s,Rj}var Ij,o5;function ahe(){if(o5)return Ij;o5=1;var e=ua(),t=e.Uint8Array;return Ij=t,Ij}var Mj,l5;function ohe(){if(l5)return Mj;l5=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,s){r[++n]=[s,i]}),r}return Mj=e,Mj}var Dj,c5;function lA(){if(c5)return Dj;c5=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Dj=e,Dj}var Lj,u5;function lhe(){if(u5)return Lj;u5=1;var e=am(),t=ahe(),n=XO(),r=HU(),i=ohe(),s=lA(),o=1,l=2,c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",x="[object Set]",y="[object String]",v="[object Symbol]",b="[object ArrayBuffer]",w="[object DataView]",N=e?e.prototype:void 0,S=N?N.valueOf:void 0;function _(E,k,O,I,A,C,R){switch(O){case w:if(E.byteLength!=k.byteLength||E.byteOffset!=k.byteOffset)return!1;E=E.buffer,k=k.buffer;case b:return!(E.byteLength!=k.byteLength||!C(new t(E),new t(k)));case c:case u:case p:return n(+E,+k);case d:return E.name==k.name&&E.message==k.message;case m:case y:return E==k+"";case f:var D=i;case x:var q=I&o;if(D||(D=s),E.size!=k.size&&!q)return!1;var F=R.get(E);if(F)return F==k;I|=l,R.set(E,k);var H=r(D(E),D(k),I,A,C,R);return R.delete(E),H;case v:if(S)return S.call(E)==S.call(k)}return!1}return Lj=_,Lj}var $j,d5;function GU(){if(d5)return $j;d5=1;function e(t,n){for(var r=-1,i=n.length,s=t.length;++r<i;)t[s+r]=n[r];return t}return $j=e,$j}var Bj,f5;function che(){if(f5)return Bj;f5=1;var e=GU(),t=pi();function n(r,i,s){var o=i(r);return t(r)?o:e(o,s(r))}return Bj=n,Bj}var Fj,h5;function uhe(){if(h5)return Fj;h5=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,s=0,o=[];++r<i;){var l=t[r];n(l,r,t)&&(o[s++]=l)}return o}return Fj=e,Fj}var qj,p5;function dhe(){if(p5)return qj;p5=1;function e(){return[]}return qj=e,qj}var zj,m5;function fhe(){if(m5)return zj;m5=1;var e=uhe(),t=dhe(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return r.call(o,l)}))}:t;return zj=s,zj}var Uj,g5;function hhe(){if(g5)return Uj;g5=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Uj=e,Uj}var Vj,y5;function phe(){if(y5)return Vj;y5=1;var e=Qa(),t=Za(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Vj=r,Vj}var Wj,v5;function cA(){if(v5)return Wj;v5=1;var e=phe(),t=Za(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return Wj=s,Wj}var vh={exports:{}},Hj,x5;function mhe(){if(x5)return Hj;x5=1;function e(){return!1}return Hj=e,Hj}vh.exports;var b5;function KU(){return b5||(b5=1,(function(e,t){var n=ua(),r=mhe(),i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,o=s&&s.exports===i,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r;e.exports=u})(vh,vh.exports)),vh.exports}var Gj,w5;function uA(){if(w5)return Gj;w5=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var s=typeof r;return i=i??e,!!i&&(s=="number"||s!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Gj=n,Gj}var Kj,j5;function dA(){if(j5)return Kj;j5=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Kj=t,Kj}var Yj,S5;function ghe(){if(S5)return Yj;S5=1;var e=Qa(),t=dA(),n=Za(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",x="[object String]",y="[object WeakMap]",v="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",N="[object Float64Array]",S="[object Int8Array]",_="[object Int16Array]",E="[object Int32Array]",k="[object Uint8Array]",O="[object Uint8ClampedArray]",I="[object Uint16Array]",A="[object Uint32Array]",C={};C[w]=C[N]=C[S]=C[_]=C[E]=C[k]=C[O]=C[I]=C[A]=!0,C[r]=C[i]=C[v]=C[s]=C[b]=C[o]=C[l]=C[c]=C[u]=C[d]=C[f]=C[p]=C[m]=C[x]=C[y]=!1;function R(D){return n(D)&&t(D.length)&&!!C[e(D)]}return Yj=R,Yj}var Xj,N5;function YU(){if(N5)return Xj;N5=1;function e(t){return function(n){return t(n)}}return Xj=e,Xj}var xh={exports:{}};xh.exports;var _5;function yhe(){return _5||(_5=1,(function(e,t){var n=mU(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===r,o=s&&n.process,l=(function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(xh,xh.exports)),xh.exports}var Qj,E5;function XU(){if(E5)return Qj;E5=1;var e=ghe(),t=YU(),n=yhe(),r=n&&n.isTypedArray,i=r?t(r):e;return Qj=i,Qj}var Zj,P5;function vhe(){if(P5)return Zj;P5=1;var e=hhe(),t=cA(),n=pi(),r=KU(),i=uA(),s=XU(),o=Object.prototype,l=o.hasOwnProperty;function c(u,d){var f=n(u),p=!f&&t(u),m=!f&&!p&&r(u),x=!f&&!p&&!m&&s(u),y=f||p||m||x,v=y?e(u.length,String):[],b=v.length;
vendor: 2,528 bytes, line 566
566for(var w in u)(d||l.call(u,w))&&!(y&&(w=="length"||m&&(w=="offset"||w=="parent")||x&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||i(w,b)))&&v.push(w);return v}return Zj=c,Zj}var Jj,k5;function xhe(){if(k5)return Jj;k5=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Jj=t,Jj}var eS,O5;function QU(){if(O5)return eS;O5=1;function e(t,n){return function(r){return t(n(r))}}return eS=e,eS}var tS,A5;function bhe(){if(A5)return tS;A5=1;var e=QU(),t=e(Object.keys,Object);return tS=t,tS}var nS,C5;function whe(){if(C5)return nS;C5=1;var e=xhe(),t=bhe(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!e(s))return t(s);var o=[];for(var l in Object(s))r.call(s,l)&&l!="constructor"&&o.push(l);return o}return nS=i,nS}var rS,T5;function lm(){if(T5)return rS;T5=1;var e=YO(),t=dA();function n(r){return r!=null&&t(r.length)&&!e(r)}return rS=n,rS}var iS,R5;function Hx(){if(R5)return iS;R5=1;var e=vhe(),t=whe(),n=lm();function r(i){return n(i)?e(i):t(i)}return iS=r,iS}var sS,I5;function jhe(){if(I5)return sS;I5=1;var e=che(),t=fhe(),n=Hx();function r(i){return e(i,n,t)}return sS=r,sS}var aS,M5;function She(){if(M5)return aS;M5=1;var e=jhe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,o,l,c,u,d){var f=l&t,p=e(s),m=p.length,x=e(o),y=x.length;if(m!=y&&!f)return!1;for(var v=m;v--;){var b=p[v];if(!(f?b in o:r.call(o,b)))return!1}var w=d.get(s),N=d.get(o);if(w&&N)return w==o&&N==s;var S=!0;d.set(s,o),d.set(o,s);for(var _=f;++v<m;){b=p[v];var E=s[b],k=o[b];if(c)var O=f?c(k,E,b,o,s,d):c(E,k,b,s,o,d);if(!(O===void 0?E===k||u(E,k,l,c,d):O)){S=!1;break}_||(_=b=="constructor")}if(S&&!_){var I=s.constructor,A=o.constructor;I!=A&&"constructor"in s&&"constructor"in o&&!(typeof I=="function"&&I instanceof I&&typeof A=="function"&&A instanceof A)&&(S=!1)}return d.delete(s),d.delete(o),S}return aS=i,aS}var oS,D5;function Nhe(){if(D5)return oS;D5=1;var e=Ac(),t=ua(),n=e(t,"DataView");return oS=n,oS}var lS,L5;function _he(){if(L5)return lS;L5=1;var e=Ac(),t=ua(),n=e(t,"Promise");return lS=n,lS}var cS,$5;function ZU(){if($5)return cS;$5=1;var e=Ac(),t=ua(),n=e(t,"Set");return cS=n,cS}var uS,B5;function Ehe(){if(B5)return uS;B5=1;var e=Ac(),t=ua(),n=e(t,"WeakMap");return uS=n,uS}var dS,F5;function Phe(){if(F5)return dS;F5=1;var e=Nhe(),t=QO(),n=_he(),r=ZU(),i=Ehe(),s=Qa(),o=gU(),l="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=o(e),x=o(t),y=o(n),v=o(r),b=o(i),w=s;
vendor: 47,535 bytes, lines 566-574
566return(e&&w(new e(new ArrayBuffer(1)))!=p||t&&w(new t)!=l||n&&w(n.resolve())!=u||r&&w(new r)!=d||i&&w(new i)!=f)&&(w=function(N){var S=s(N),_=S==c?N.constructor:void 0,E=_?o(_):"";if(E)switch(E){case m:return p;case x:return l;case y:return u;case v:return d;case b:return f}return S}),dS=w,dS}var fS,q5;function khe(){if(q5)return fS;q5=1;var e=zU(),t=HU(),n=lhe(),r=She(),i=Phe(),s=pi(),o=KU(),l=XU(),c=1,u="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function x(y,v,b,w,N,S){var _=s(y),E=s(v),k=_?d:i(y),O=E?d:i(v);k=k==u?f:k,O=O==u?f:O;var I=k==f,A=O==f,C=k==O;if(C&&o(y)){if(!o(v))return!1;_=!0,I=!1}if(C&&!I)return S||(S=new e),_||l(y)?t(y,v,b,w,N,S):n(y,v,k,b,w,N,S);if(!(b&c)){var R=I&&m.call(y,"__wrapped__"),D=A&&m.call(v,"__wrapped__");if(R||D){var q=R?y.value():y,F=D?v.value():v;return S||(S=new e),N(q,F,b,w,S)}}return C?(S||(S=new e),r(y,v,b,w,N,S)):!1}return fS=x,fS}var hS,z5;function fA(){if(z5)return hS;z5=1;var e=khe(),t=Za();function n(r,i,s,o,l){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,s,o,n,l)}return hS=n,hS}var pS,U5;function Ohe(){if(U5)return pS;U5=1;var e=zU(),t=fA(),n=1,r=2;function i(s,o,l,c){var u=l.length,d=u,f=!c;if(s==null)return!d;for(s=Object(s);u--;){var p=l[u];if(f&&p[2]?p[1]!==s[p[0]]:!(p[0]in s))return!1}for(;++u<d;){p=l[u];var m=p[0],x=s[m],y=p[1];if(f&&p[2]){if(x===void 0&&!(m in s))return!1}else{var v=new e;if(c)var b=c(x,y,m,s,o,v);if(!(b===void 0?t(y,x,n|r,c,v):b))return!1}}return!0}return pS=i,pS}var mS,V5;function JU(){if(V5)return mS;V5=1;var e=sl();function t(n){return n===n&&!e(n)}return mS=t,mS}var gS,W5;function Ahe(){if(W5)return gS;W5=1;var e=JU(),t=Hx();function n(r){for(var i=t(r),s=i.length;s--;){var o=i[s],l=r[o];i[s]=[o,l,e(l)]}return i}return gS=n,gS}var yS,H5;function e9(){if(H5)return yS;H5=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return yS=e,yS}var vS,G5;function Che(){if(G5)return vS;G5=1;var e=Ohe(),t=Ahe(),n=e9();function r(i){var s=t(i);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(o){return o===i||e(o,i,s)}}return vS=r,vS}var xS,K5;function The(){if(K5)return xS;K5=1;function e(t,n){return t!=null&&n in Object(t)}return xS=e,xS}var bS,Y5;function Rhe(){if(Y5)return bS;Y5=1;var e=xU(),t=cA(),n=pi(),r=uA(),i=dA(),s=qx();function o(l,c,u){c=e(c,l);for(var d=-1,f=c.length,p=!1;++d<f;){var m=s(c[d]);if(!(p=l!=null&&u(l,m)))break;l=l[m]}return p||++d!=f?p:(f=l==null?0:l.length,!!f&&i(f)&&r(m,f)&&(n(l)||t(l)))}return bS=o,bS}var wS,X5;function Ihe(){if(X5)return wS;X5=1;var e=The(),t=Rhe();function n(r,i){return r!=null&&t(r,i,e)}return wS=n,wS}var jS,Q5;function Mhe(){if(Q5)return jS;Q5=1;var e=fA(),t=bU(),n=Ihe(),r=KO(),i=JU(),s=e9(),o=qx(),l=1,c=2;function u(d,f){return r(d)&&i(f)?s(o(d),f):function(p){var m=t(p,d);return m===void 0&&m===f?n(p,d):e(f,m,l|c)}}return jS=u,jS}var SS,Z5;function Ud(){if(Z5)return SS;Z5=1;function e(t){return t}return SS=e,SS}var NS,J5;function Dhe(){if(J5)return NS;J5=1;function e(t){return function(n){return n==null?void 0:n[t]}}return NS=e,NS}var _S,eL;function Lhe(){if(eL)return _S;eL=1;var e=eA();function t(n){return function(r){return e(r,n)}}return _S=t,_S}var ES,tL;function $he(){if(tL)return ES;tL=1;var e=Dhe(),t=Lhe(),n=KO(),r=qx();function i(s){return n(s)?e(r(s)):t(s)}return ES=i,ES}var PS,nL;function da(){if(nL)return PS;nL=1;var e=Che(),t=Mhe(),n=Ud(),r=pi(),i=$he();function s(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return PS=s,PS}var kS,rL;function t9(){if(rL)return kS;rL=1;function e(t,n,r,i){for(var s=t.length,o=r+(i?1:-1);i?o--:++o<s;)if(n(t[o],o,t))return o;return-1}return kS=e,kS}var OS,iL;function Bhe(){if(iL)return OS;iL=1;function e(t){return t!==t}return OS=e,OS}var AS,sL;function Fhe(){if(sL)return AS;sL=1;function e(t,n,r){for(var i=r-1,s=t.length;++i<s;)if(t[i]===n)return i;return-1}return AS=e,AS}var CS,aL;function qhe(){if(aL)return CS;aL=1;var e=t9(),t=Bhe(),n=Fhe();function r(i,s,o){return s===s?n(i,s,o):e(i,t,o)}return CS=r,CS}var TS,oL;function zhe(){if(oL)return TS;oL=1;var e=qhe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return TS=t,TS}var RS,lL;function Uhe(){if(lL)return RS;lL=1;function e(t,n,r){for(var i=-1,s=t==null?0:t.length;++i<s;)if(r(n,t[i]))return!0;return!1}return RS=e,RS}var IS,cL;function Vhe(){if(cL)return IS;cL=1;function e(){}return IS=e,IS}var MS,uL;function Whe(){if(uL)return MS;uL=1;var e=ZU(),t=Vhe(),n=lA(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(s){return new e(s)}:t;return MS=i,MS}var DS,dL;function Hhe(){if(dL)return DS;dL=1;var e=UU(),t=zhe(),n=Uhe(),r=WU(),i=Whe(),s=lA(),o=200;function l(c,u,d){var f=-1,p=t,m=c.length,x=!0,y=[],v=y;if(d)x=!1,p=n;else if(m>=o){var b=u?null:i(c);if(b)return s(b);x=!1,p=r,v=new e}else v=u?[]:y;e:for(;++f<m;){var w=c[f],N=u?u(w):w;if(w=d||w!==0?w:0,x&&N===N){for(var S=v.length;S--;)if(v[S]===N)continue e;u&&v.push(N),y.push(w)}else p(v,N,d)||(v!==y&&v.push(N),y.push(w))}return y}return DS=l,DS}var LS,fL;function Ghe(){if(fL)return LS;fL=1;var e=da(),t=Hhe();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return LS=n,LS}var Khe=Ghe();const hL=Lt(Khe);function n9(e,t,n){return t===!0?hL(e,n):yt(t)?hL(e,t):e}function nd(e){"@babel/helpers - typeof";return nd=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},nd(e)}var Yhe=["ref"];function pL(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 Sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pL(Object(n),!0).forEach(function(r){Gx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mL(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,i9(r.key),r)}}function Qhe(e,t,n){return t&&mL(e.prototype,t),n&&mL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zhe(e,t,n){return t=uv(t),Jhe(e,r9()?Reflect.construct(t,n||[],uv(e).constructor):t.apply(e,n))}function Jhe(e,t){if(t&&(nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return epe(e)}function epe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r9=function(){return!!e})()}function uv(e){return uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uv(e)}function tpe(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&&aP(e,t)}function aP(e,t){return aP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},aP(e,t)}function Gx(e,t,n){return t=i9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i9(e){var t=npe(e,"string");return nd(t)=="symbol"?t:t+""}function npe(e,t){if(nd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function rpe(e,t){if(e==null)return{};var n=ipe(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 ipe(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 spe(e){return e.value}function ape(e,t){if(ee.isValidElement(e))return ee.cloneElement(e,t);if(typeof e=="function")return ee.createElement(e,t);t.ref;var n=rpe(t,Yhe);return ee.createElement(oA,n)}var gL=1,lc=(function(e){function t(){var n;Xhe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Zhe(this,t,[].concat(i)),Gx(n,"lastBoundingBox",{width:-1,height:-1}),n}return tpe(t,e),Qhe(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)>gL||Math.abs(i.height-this.lastBoundingBox.height)>gL)&&(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?Sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,o=i.align,l=i.verticalAlign,c=i.margin,u=i.chartWidth,d=i.chartHeight,f,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&s==="vertical"){var m=this.getBBoxSnapshot();f={left:((u||0)-m.width)/2}}else f=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var x=this.getBBoxSnapshot();p={top:((d||0)-x.height)/2}}else p=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Sa(Sa({},f),p)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,o=i.width,l=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,d=i.payload,f=Sa(Sa({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return ee.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){r.wrapperNode=m}},ape(s,Sa(Sa({},this.props),{},{payload:n9(d,u,spe)})))}}],[{key:"getWithHeight",value:function(r,i){var s=Sa(Sa({},this.defaultProps),r.props),o=s.layout;return o==="vertical"&&Le(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(T.PureComponent);Gx(lc,"displayName","Legend");Gx(lc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var $S,yL;function ope(){if(yL)return $S;yL=1;var e=am(),t=cA(),n=pi(),r=e?e.isConcatSpreadable:void 0;function i(s){return n(s)||t(s)||!!(r&&s&&s[r])}return $S=i,$S}var BS,vL;function s9(){if(vL)return BS;vL=1;var e=GU(),t=ope();function n(r,i,s,o,l){var c=-1,u=r.length;for(s||(s=t),l||(l=[]);++c<u;){var d=r[c];i>0&&s(d)?i>1?n(d,i-1,s,o,l):e(l,d):o||(l[l.length]=d)}return l}return BS=n,BS}var FS,xL;function lpe(){if(xL)return FS;xL=1;function e(t){return function(n,r,i){for(var s=-1,o=Object(n),l=i(n),c=l.length;c--;){var u=l[t?c:++s];if(r(o[u],u,o)===!1)break}return n}}return FS=e,FS}var qS,bL;function cpe(){if(bL)return qS;bL=1;var e=lpe(),t=e();return qS=t,qS}var zS,wL;function a9(){if(wL)return zS;wL=1;var e=cpe(),t=Hx();function n(r,i){return r&&e(r,i,t)}return zS=n,zS}var US,jL;function upe(){if(jL)return US;jL=1;var e=lm();function t(n,r){return function(i,s){if(i==null)return i;if(!e(i))return n(i,s);for(var o=i.length,l=r?o:-1,c=Object(i);(r?l--:++l<o)&&s(c[l],l,c)!==!1;);return i}}return US=t,US}var VS,SL;function hA(){if(SL)return VS;SL=1;var e=a9(),t=upe(),n=t(e);return VS=n,VS}var WS,NL;function o9(){if(NL)return WS;NL=1;var e=hA(),t=lm();function n(r,i){var s=-1,o=t(r)?Array(r.length):[];return e(r,function(l,c,u){o[++s]=i(l,c,u)}),o}return WS=n,WS}var HS,_L;function dpe(){if(_L)return HS;_L=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return HS=e,HS}var GS,EL;function fpe(){if(EL)return GS;EL=1;var e=Fd();function t(n,r){if(n!==r){var i=n!==void 0,s=n===null,o=n===n,l=e(n),c=r!==void 0,u=r===null,d=r===r,f=e(r);if(!u&&!f&&!l&&n>r||l&&c&&d&&!u&&!f||s&&c&&d||!i&&d||!o)return 1;if(!s&&!l&&!f&&n<r||f&&i&&o&&!s&&!l||u&&i&&o||!c&&o||!d)return-1}return 0}return GS=t,GS}var KS,PL;function hpe(){if(PL)return KS;PL=1;var e=fpe();function t(n,r,i){for(var s=-1,o=n.criteria,l=r.criteria,c=o.length,u=i.length;++s<c;){var d=e(o[s],l[s]);if(d){if(s>=u)return d;var f=i[s];return d*(f=="desc"?-1:1)}}return n.index-r.index}return KS=t,KS}var YS,kL;function ppe(){if(kL)return YS;kL=1;var e=JO(),t=eA(),n=da(),r=o9(),i=dpe(),s=YU(),o=hpe(),l=Ud(),c=pi();function u(d,f,p){f.length?f=e(f,function(y){return c(y)?function(v){return t(v,y.length===1?y[0]:y)}:y}):f=[l];var m=-1;f=e(f,s(n));var x=r(d,function(y,v,b){var w=e(f,function(N){return N(y)});return{criteria:w,index:++m,value:y}});return i(x,function(y,v){return o(y,v,p)})}return YS=u,YS}var XS,OL;function mpe(){if(OL)return XS;OL=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return XS=e,XS}var QS,AL;function gpe(){if(AL)return QS;AL=1;var e=mpe(),t=Math.max;function n(r,i,s){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,l=-1,c=t(o.length-i,0),u=Array(c);++l<c;)u[l]=o[i+l];l=-1;for(var d=Array(i+1);++l<i;)d[l]=o[l];return d[i]=s(u),e(r,this,d)}}return QS=n,QS}var ZS,CL;function ype(){if(CL)return ZS;CL=1;function e(t){return function(){return t}}return ZS=e,ZS}var JS,TL;function l9(){if(TL)return JS;TL=1;var e=Ac(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return JS=t,JS}var eN,RL;function vpe(){if(RL)return eN;RL=1;var e=ype(),t=l9(),n=Ud(),r=t?function(i,s){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return eN=r,eN}var tN,IL;function xpe(){if(IL)return tN;IL=1;var e=800,t=16,n=Date.now;function r(i){var s=0,o=0;return function(){var l=n(),c=t-(l-o);if(o=l,c>0){if(++s>=e)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return tN=r,tN}var nN,ML;function bpe(){if(ML)return nN;ML=1;var e=vpe(),t=xpe(),n=t(e);return nN=n,nN}var rN,DL;function wpe(){if(DL)return rN;DL=1;var e=Ud(),t=gpe(),n=bpe();function r(i,s){return n(t(i,s,e),i+"")}return rN=r,rN}var iN,LL;function Kx(){if(LL)return iN;LL=1;var e=XO(),t=lm(),n=uA(),r=sl();function i(s,o,l){if(!r(l))return!1;var c=typeof o;return(c=="number"?t(l)&&n(o,l.length):c=="string"&&o in l)?e(l[o],s):!1}return iN=i,iN}var sN,$L;function jpe(){if($L)return sN;$L=1;var e=s9(),t=ppe(),n=wpe(),r=Kx(),i=n(function(s,o){if(s==null)return[];var l=o.length;return l>1&&r(s,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(s,e(o,1),[])});return sN=i,sN}var Spe=jpe();const pA=Lt(Spe);function Jh(e){"@babel/helpers - typeof";return Jh=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},Jh(e)}function oP(){return oP=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},oP.apply(this,arguments)}function Npe(e,t){return kpe(e)||Ppe(e,t)||Epe(e,t)||_pe()}function _pe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 567In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Epe(e,t){if(e){if(typeof e=="string")return BL(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 BL(e,t)}}function BL(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 Ppe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function kpe(e){if(Array.isArray(e))return e}function FL(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 aN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FL(Object(n),!0).forEach(function(r){Ope(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ope(e,t,n){return t=Ape(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ape(e){var t=Cpe(e,"string");return Jh(t)=="symbol"?t:t+""}function Cpe(e,t){if(Jh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tpe(e){return Array.isArray(e)&&Zn(e[0])&&Zn(e[1])?e.join(" ~ "):e}var Rpe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,s=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,p=t.itemSorter,m=t.wrapperClassName,x=t.labelClassName,y=t.label,v=t.labelFormatter,b=t.accessibilityLayer,w=b===void 0?!1:b,N=function(){if(d&&d.length){var R={padding:0,margin:0},D=(p?pA(d,p):d).map(function(q,F){if(q.type==="none")return null;var H=aN({display:"block",paddingTop:4,paddingBottom:4,color:q.color||"#000"},l),U=q.formatter||f||Tpe,W=q.value,G=q.name,L=W,$=G;if(U&&L!=null&&$!=null){var V=U(W,G,q,F,d);if(Array.isArray(V)){var z=Npe(V,2);L=z[0],$=z[1]}else L=V}return ee.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(F),style:H},Zn($)?ee.createElement("span",{className:"recharts-tooltip-item-name"},$):null,Zn($)?ee.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,ee.createElement("span",{className:"recharts-tooltip-item-value"},L),ee.createElement("span",{className:"recharts-tooltip-item-unit"},q.unit||""))});return ee.createElement("ul",{className:"recharts-tooltip-item-list",style:R},D)}return null},S=aN({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),_=aN({margin:0},u),E=!jt(y),k=E?y:"",O=St("recharts-default-tooltip",m),I=St("recharts-tooltip-label",x);E&&v&&d!==void 0&&d!==null&&(k=v(y,d));var A=w?{role:"status","aria-live":"assertive"}:{};return ee.createElement("div",oP({className:O,style:S},A),ee.createElement("p",{className:I,style:_},ee.isValidElement(k)?k:"".concat(k)),N())};function ep(e){"@babel/helpers - typeof";return ep=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},ep(e)}function Wg(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=Mpe(e,"string");return ep(t)=="symbol"?t:t+""}function Mpe(e,t){if(ep(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ep(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Hf="recharts-tooltip-wrapper",Dpe={visibility:"hidden"};function Lpe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return St(Hf,Wg(Wg(Wg(Wg({},"".concat(Hf,"-right"),Le(n)&&t&&Le(t.x)&&n>=t.x),"".concat(Hf,"-left"),Le(n)&&t&&Le(t.x)&&n<t.x),"".concat(Hf,"-bottom"),Le(r)&&t&&Le(t.y)&&r>=t.y),"".concat(Hf,"-top"),Le(r)&&t&&Le(t.y)&&r<t.y))}function qL(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,s=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(s&&Le(s[r]))return s[r];var d=n[r]-l-i,f=n[r]+i;if(t[r])return o[r]?d:f;if(o[r]){var p=d,m=c[r];return p<m?Math.max(f,c[r]):Math.max(d,c[r])}var x=f+l,y=c[r]+u;return x>y?Math.max(d,c[r]):Math.max(f,c[r])}function $pe(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 Bpe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,s=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,d,f;return o.height>0&&o.width>0&&n?(d=qL({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),f=qL({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=$pe({translateX:d,translateY:f,useTranslate3d:l})):u=Dpe,{cssProperties:u,cssClasses:Lpe({translateX:d,translateY:f,coordinate:n})}}function rd(e){"@babel/helpers - typeof";return rd=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},rd(e)}function zL(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 UL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zL(Object(n),!0).forEach(function(r){cP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qpe(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,u9(r.key),r)}}function zpe(e,t,n){return t&&qpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Upe(e,t,n){return t=dv(t),Vpe(e,c9()?Reflect.construct(t,n||[],dv(e).constructor):t.apply(e,n))}function Vpe(e,t){if(t&&(rd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wpe(e)}function Wpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c9=function(){return!!e})()}function dv(e){return dv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dv(e)}function Hpe(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&&lP(e,t)}function lP(e,t){return lP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lP(e,t)}function cP(e,t,n){return t=u9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u9(e){var t=Gpe(e,"string");return rd(t)=="symbol"?t:t+""}function Gpe(e,t){if(rd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var VL=1,Kpe=(function(e){function t(){var n;Fpe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=Upe(this,t,[].concat(i)),cP(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),cP(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),n}return Hpe(t,e),zpe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>VL||Math.abs(r.height-this.state.lastBoundingBox.height)>VL)&&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,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.children,d=i.coordinate,f=i.hasPayload,p=i.isAnimationActive,m=i.offset,x=i.position,y=i.reverseDirection,v=i.useTranslate3d,b=i.viewBox,w=i.wrapperStyle,N=Bpe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:m,position:x,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:b}),S=N.cssClasses,_=N.cssProperties,E=UL(UL({transition:p&&s?"transform ".concat(l,"ms ").concat(c):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&f?"visible":"hidden",position:"absolute",top:0,left:0},w);return ee.createElement("div",{tabIndex:-1,className:S,style:E,ref:function(O){r.wrapperNode=O}},u)}}])})(T.PureComponent),Ype=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Cc={isSsr:Ype()};function id(e){"@babel/helpers - typeof";return id=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},id(e)}function WL(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 HL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WL(Object(n),!0).forEach(function(r){mA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qpe(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,f9(r.key),r)}}function Zpe(e,t,n){return t&&Qpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jpe(e,t,n){return t=fv(t),eme(e,d9()?Reflect.construct(t,n||[],fv(e).constructor):t.apply(e,n))}function eme(e,t){if(t&&(id(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tme(e)}function tme(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d9=function(){return!!e})()}function fv(e){return fv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fv(e)}function nme(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&&uP(e,t)}function uP(e,t){return uP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},uP(e,t)}function mA(e,t,n){return t=f9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f9(e){var t=rme(e,"string");return id(t)=="symbol"?t:t+""}function rme(e,t){if(id(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(id(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ime(e){return e.dataKey}function sme(e,t){return ee.isValidElement(e)?ee.cloneElement(e,t):typeof e=="function"?ee.createElement(e,t):ee.createElement(Rpe,t)}var Nn=(function(e){function t(){return Xpe(this,t),Jpe(this,t,arguments)}return nme(t,e),Zpe(t,[{key:"render",value:function(){var r=this,i=this.props,s=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.content,d=i.coordinate,f=i.filterNull,p=i.isAnimationActive,m=i.offset,x=i.payload,y=i.payloadUniqBy,v=i.position,b=i.reverseDirection,w=i.useTranslate3d,N=i.viewBox,S=i.wrapperStyle,_=x??[];f&&_.length&&(_=n9(x.filter(function(k){return k.value!=null&&(k.hide!==!0||r.props.includeHidden)}),y,ime));var E=_.length>0;return ee.createElement(Kpe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:s,coordinate:d,hasPayload:E,offset:m,position:v,reverseDirection:b,useTranslate3d:w,viewBox:N,wrapperStyle:S},sme(u,HL(HL({},this.props),{},{payload:_})))}}])})(T.PureComponent);mA(Nn,"displayName","Tooltip");mA(Nn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Cc.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 oN,GL;function ame(){if(GL)return oN;GL=1;var e=ua(),t=function(){return e.Date.now()};return oN=t,oN}var lN,KL;function ome(){if(KL)return lN;KL=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return lN=t,lN}var cN,YL;function lme(){if(YL)return cN;YL=1;var e=ome(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return cN=n,cN}var uN,XL;function h9(){if(XL)return uN;XL=1;var e=lme(),t=sl(),n=Fd(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=s.test(u);return f||o.test(u)?l(u.slice(2),f?2:8):i.test(u)?r:+u}return uN=c,uN}var dN,QL;function cme(){if(QL)return dN;QL=1;var e=sl(),t=ame(),n=h9(),r="Expected a function",i=Math.max,s=Math.min;function o(l,c,u){var d,f,p,m,x,y,v=0,b=!1,w=!1,N=!0;if(typeof l!="function")throw new TypeError(r);c=n(c)||0,e(u)&&(b=!!u.leading,w="maxWait"in u,p=w?i(n(u.maxWait)||0,c):p,N="trailing"in u?!!u.trailing:N);function S(D){var q=d,F=f;return d=f=void 0,v=D,m=l.apply(F,q),m}function _(D){return v=D,x=setTimeout(O,c),b?S(D):m}function E(D){var q=D-y,F=D-v,H=c-q;return w?s(H,p-F):H}function k(D){var q=D-y,F=D-v;return y===void 0||q>=c||q<0||w&&F>=p}function O(){var D=t();if(k(D))return I(D);x=setTimeout(O,E(D))}function I(D){return x=void 0,N&&d?S(D):(d=f=void 0,m)}function A(){x!==void 0&&clearTimeout(x),v=0,d=y=f=x=void 0}function C(){return x===void 0?m:I(t())}function R(){var D=t(),q=k(D);if(d=arguments,f=this,y=D,q){if(x===void 0)return _(y);if(w)return clearTimeout(x),x=setTimeout(O,c),S(y)}return x===void 0&&(x=setTimeout(O,c)),m}return R.cancel=A,R.flush=C,R}return dN=o,dN}var fN,ZL;function ume(){if(ZL)return fN;ZL=1;var e=cme(),t=sl(),n="Expected a function";function r(i,s,o){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return t(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(i,s,{leading:l,maxWait:s,trailing:c})}return fN=r,fN}var dme=ume();const p9=Lt(dme);function tp(e){"@babel/helpers - typeof";return tp=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},tp(e)}function JL(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 Hg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JL(Object(n),!0).forEach(function(r){fme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fme(e,t,n){return t=hme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hme(e){var t=pme(e,"string");return tp(t)=="symbol"?t:t+""}function pme(e,t){if(tp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mme(e,t){return xme(e)||vme(e,t)||yme(e,t)||gme()}function gme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 568In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yme(e,t){if(e){if(typeof e=="string")return e3(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 e3(e,t)}}function e3(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 vme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function xme(e){if(Array.isArray(e))return e}var Li=T.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,s=e.width,o=s===void 0?"100%":s,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,p=e.maxHeight,m=e.children,x=e.debounce,y=x===void 0?0:x,v=e.id,b=e.className,w=e.onResize,N=e.style,S=N===void 0?{}:N,_=T.useRef(null),E=T.useRef();E.current=w,T.useImperativeHandle(t,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var k=T.useState({containerWidth:i.width,containerHeight:i.height}),O=mme(k,2),I=O[0],A=O[1],C=T.useCallback(function(D,q){A(function(F){var H=Math.round(D),U=Math.round(q);return F.containerWidth===H&&F.containerHeight===U?F:{containerWidth:H,containerHeight:U}})},[]);T.useEffect(function(){var D=function(G){var L,$=G[0].contentRect,V=$.width,z=$.height;C(V,z),(L=E.current)===null||L===void 0||L.call(E,V,z)};y>0&&(D=p9(D,y,{trailing:!0,leading:!1}));var q=new ResizeObserver(D),F=_.current.getBoundingClientRect(),H=F.width,U=F.height;return C(H,U),q.observe(_.current),function(){q.disconnect()}},[C,y]);var R=T.useMemo(function(){var D=I.containerWidth,q=I.containerHeight;if(D<0||q<0)return null;Os(Hl(o)||Hl(c),`The width(%s) and height(%s) are both fixed numbers, 569 maybe you don't need to use a ResponsiveContainer.`,o,c),Os(!n||n>0,"The aspect(%s) must be greater than zero.",n);var F=Hl(o)?D:o,H=Hl(c)?q:c;n&&n>0&&(F?H=F/n:H&&(F=H*n),p&&H>p&&(H=p)),Os(F>0||H>0,`The width(%s) and height(%s) of chart should be greater than 0, 570 please check the style of container, or the props width(%s) and height(%s), 571 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 572 height and width.`,F,H,o,c,d,f,n);var U=!Array.isArray(m)&&Da(m.type).endsWith("Chart");return ee.Children.map(m,function(W){return ee.isValidElement(W)?T.cloneElement(W,Hg({width:F,height:H},U?{style:Hg({height:"100%",width:"100%",maxHeight:H,maxWidth:F},W.props.style)}:{})):W})},[n,m,c,p,f,d,I,o]);return ee.createElement("div",{id:v?"".concat(v):void 0,className:St("recharts-responsive-container",b),style:Hg(Hg({},S),{},{width:o,height:c,minWidth:d,minHeight:f,maxHeight:p}),ref:_},R)}),cm=function(t){return null};cm.displayName="Cell";function np(e){"@babel/helpers - typeof";return np=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},np(e)}function t3(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 dP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t3(Object(n),!0).forEach(function(r){bme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bme(e,t,n){return t=wme(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wme(e){var t=jme(e,"string");return np(t)=="symbol"?t:t+""}function jme(e,t){if(np(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(np(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lu={widthCache:{},cacheCount:0},Sme=2e3,Nme={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},n3="recharts_measurement_span";function _me(e){var t=dP({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Ah=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Cc.isSsr)return{width:0,height:0};var r=_me(n),i=JSON.stringify({text:t,copyStyle:r});if(lu.widthCache[i])return lu.widthCache[i];try{var s=document.getElementById(n3);s||(s=document.createElement("span"),s.setAttribute("id",n3),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var o=dP(dP({},Nme),r);Object.assign(s.style,o),s.textContent="".concat(t);var l=s.getBoundingClientRect(),c={width:l.width,height:l.height};return lu.widthCache[i]=c,++lu.cacheCount>Sme&&(lu.cacheCount=0,lu.widthCache={}),c}catch{return{width:0,height:0}}},Eme=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function rp(e){"@babel/helpers - typeof";return rp=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},rp(e)}function hv(e,t){return Ame(e)||Ome(e,t)||kme(e,t)||Pme()}function Pme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 573In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kme(e,t){if(e){if(typeof e=="string")return r3(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 r3(e,t)}}function r3(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 Ome(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Ame(e){if(Array.isArray(e))return e}function Cme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i3(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,Rme(r.key),r)}}function Tme(e,t,n){return t&&i3(e.prototype,t),n&&i3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rme(e){var t=Ime(e,"string");return rp(t)=="symbol"?t:t+""}function Ime(e,t){if(rp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var s3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,a3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Mme=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Dme=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,m9={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Lme=Object.keys(m9),Su="NaN";function $me(e,t){return e*m9[t]}var Gg=(function(){function e(t,n){Cme(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Mme.test(n)&&(this.num=NaN,this.unit=""),Lme.includes(n)&&(this.num=$me(t,n),this.unit="px")}return Tme(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=Dme.exec(n))!==null&&r!==void 0?r:[],s=hv(i,3),o=s[1],l=s[2];return new e(parseFloat(o),l??"")}}])})();function g9(e){if(e.includes(Su))return Su;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=s3.exec(t))!==null&&n!==void 0?n:[],i=hv(r,4),s=i[1],o=i[2],l=i[3],c=Gg.parse(s??""),u=Gg.parse(l??""),d=o==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return Su;t=t.replace(s3,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,p=(f=a3.exec(t))!==null&&f!==void 0?f:[],m=hv(p,4),x=m[1],y=m[2],v=m[3],b=Gg.parse(x??""),w=Gg.parse(v??""),N=y==="+"?b.add(w):b.subtract(w);if(N.isNaN())return Su;t=t.replace(a3,N.toString())}return t}var o3=/\(([^()]*)\)/;function Bme(e){for(var t=e;t.includes("(");){var n=o3.exec(t),r=hv(n,2),i=r[1];t=t.replace(o3,g9(i))}return t}function Fme(e){var t=e.replace(/\s+/g,"");return t=Bme(t),t=g9(t),t}function qme(e){try{return Fme(e)}catch{return Su}}function hN(e){var t=qme(e.slice(5,-1));return t===Su?"":t}var zme=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Ume=["dx","dy","angle","className","breakAll"];function fP(){return fP=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},fP.apply(this,arguments)}function l3(e,t){if(e==null)return{};var n=Vme(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 Vme(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 c3(e,t){return Kme(e)||Gme(e,t)||Hme(e,t)||Wme()}function Wme(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 574In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hme(e,t){if(e){if(typeof e=="string")return u3(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 u3(e,t)}}function u3(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 Gme(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function Kme(e){if(Array.isArray(e))return e}var y9=/[ \f\n\r\t\v\u2028\u2029]+/,v9=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var s=[];jt(n)||(r?s=n.toString().split(""):s=n.toString().split(y9));var o=s.map(function(c){return{word:c,width:Ah(c,i).width}}),l=r?0:Ah(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},Yme=function(t,n,r,i,s){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,d=Le(o),f=l,p=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce(function(H,U){var W=U.word,G=U.width,L=H[H.length-1];if(L&&(i==null||s||L.width+G+r<Number(i)))L.words.push(W),L.width+=G+r;else{var $={words:[W],width:G};H.push($)}return H},[])},m=p(n),x=function(F){return F.reduce(function(H,U){return H.width>U.width?H:U})};if(!d)return m;for(var y="â¦",v=function(F){var H=f.slice(0,F),U=v9({breakAll:u,style:c,children:H+y}).wordsWithComputedWidth,W=p(U),G=W.length>
574o||x(W).width>Number(i);return[G,W]},b=0,w=f.length-1,N=0,S;b<=w&&N<=f.length-1;){var _=Math.floor((b+w)/2),E=_-1,k=v(E),O=c3(k,2),I=O[0],A=O[1],C=v(_),R=c3(C,1),D=R[0];if(!I&&!D&&(b=_+1),I&&D&&(w=_-1),!I&&D){S=A;break}N++}return S||m},d3=function(t){var n=jt(t)?[]:t.toString().split(y9);return[{words:n}]},Xme=function(t){var n=t.width,r=t.scaleToFit,i=t.children,s=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!Cc.isSsr){var c,u,d=v9({breakAll:o,children:i,style:s});if(d){var f=d.wordsWithComputedWidth,p=d.spaceWidth;c=f,u=p}else return d3(i);return Yme({breakAll:o,children:i,maxLines:l,style:s},c,u,n,r)}return d3(i)},f3="#808080",yc=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,p=t.textAnchor,m=p===void 0?"start":p,x=t.verticalAnchor,y=x===void 0?"end":x,v=t.fill,b=v===void 0?f3:v,w=l3(t,zme),N=T.useMemo(function(){return Xme({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:f,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,f,w.style,w.width]),S=w.dx,_=w.dy,E=w.angle,k=w.className,O=w.breakAll,I=l3(w,Ume);if(!Zn(r)||!Zn(s))return null;var A=r+(Le(S)?S:0),C=s+(Le(_)?_:0),R;switch(y){case"start":R=hN("calc(".concat(u,")"));break;case"middle":R=hN("calc(".concat((N.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:R=hN("calc(".concat(N.length-1," * -").concat(l,")"));break}var D=[];if(f){var q=N[0].width,F=w.width;D.push("scale(".concat((Le(F)?F/q:1)/q,")"))}return E&&D.push("rotate(".concat(E,", ").concat(A,", ").concat(C,")")),D.length&&(I.transform=D.join(" ")),ee.createElement("text",fP({},ct(I,!0),{x:A,y:C,className:St("recharts-text",k),textAnchor:m,fill:b.includes("url")?f3:b}),N.map(function(H,U){var W=H.words.join(O?"":" ");return ee.createElement("tspan",{x:A,dy:U===0?R:l,key:"".concat(W,"-").concat(U)},W)}))};function Wo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qme(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gA(e){let t,n,r;e.length!==2?(t=Wo,n=(l,c)=>Wo(e(l),c),r=(l,c)=>e(l)-c):(t=e===Wo||e===Qme?e:Zme,n=e,r=e);function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<0?u=f+1:d=f}while(u<d)}return u}function s(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function o(l,c,u=0,d=l.length){const f=i(l,c,u,d-1);return f>u&&r(l[f-1],c)>-r(l[f],c)?f-1:f}return{left:i,center:o,right:s}}function Zme(){return 0}function x9(e){return e===null?NaN:+e}function*Jme(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const ege=gA(Wo),um=ege.right;gA(x9).center;class h3 extends Map{constructor(t,n=rge){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(p3(this,t))}has(t){return super.has(p3(this,t))}set(t,n){return super.set(tge(this,t),n)}delete(t){return super.delete(nge(this,t))}}function p3({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function tge({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function nge({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function rge(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ige(e=Wo){if(e===Wo)return b9;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 b9(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const sge=Math.sqrt(50),age=Math.sqrt(10),oge=Math.sqrt(2);function pv(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=sge?10:s>=age?5:s>=oge?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?pv(e,t,n*2):[l,c,u]}function hP(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,o]=r?pv(t,e,n):pv(e,t,n);if(!(s>=i))return[];const l=s-i+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(s-u)/-o;else for(let u=0;u<l;++u)c[u]=(s-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function pP(e,t,n){return t=+t,e=+e,n=+n,pv(e,t,n)[2]}function mP(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?pP(t,e,n):pP(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function m3(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function g3(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}
574function w9(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?b9:ige(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),m=Math.max(n,Math.floor(t-u*f/c+p)),x=Math.min(r,Math.floor(t+(c-u)*f/c+p));w9(e,t,m,x,i)}const s=e[t];let o=n,l=r;for(Gf(e,n,t),i(e[r],s)>0&&Gf(e,n,r);o<l;){for(Gf(e,o,l),++o,--l;i(e[o],s)<0;)++o;for(;i(e[l],s)>0;)--l}i(e[n],s)===0?Gf(e,n,l):(++l,Gf(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function Gf(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function lge(e,t,n){if(e=Float64Array.from(Jme(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return g3(e);if(t>=1)return m3(e);var r,i=(r-1)*t,s=Math.floor(i),o=m3(w9(e,s).subarray(0,s+1)),l=g3(e.subarray(s+1));return o+(l-o)*(i-s)}}function cge(e,t,n=x9){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),o=+n(e[s],s,e),l=+n(e[s+1],s+1,e);return o+(l-o)*(i-s)}}function uge(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 us(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ja(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 gP=Symbol("implicit");function yA(){var e=new h3,t=[],n=[],r=gP;function i(s){let o=e.get(s);if(o===void 0){if(r!==gP)return r;e.set(s,o=t.push(s)-1)}return n[o%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new h3;for(const o of s)e.has(o)||e.set(o,t.push(o)-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 yA(t,n).unknown(r)},us.apply(i,arguments),i}function ip(){var e=yA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,o,l=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var p=t().length,m=i<r,x=m?i:r,y=m?r:i;s=(y-x)/Math.max(1,p-c+u*2),l&&(s=Math.floor(s)),x+=(y-x-s*(p-c))*d,o=s*(1-c),l&&(x=Math.round(x),o=Math.round(o));var v=uge(p).map(function(b){return x+s*b});return n(m?v.reverse():v)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([r,i]=p,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(p){return[r,i]=p,r=+r,i=+i,l=!0,f()},e.bandwidth=function(){return o},e.step=function(){return s},e.round=function(p){return arguments.length?(l=!!p,f()):l},e.padding=function(p){return arguments.length?(c=Math.min(1,u=+p),f()):c},e.paddingInner=function(p){return arguments.length?(c=Math.min(1,p),f()):c},e.paddingOuter=function(p){return arguments.length?(u=+p,f()):u},e.align=function(p){return arguments.length?(d=Math.max(0,Math.min(1,p)),f()):d},e.copy=function(){return ip(t(),[r,i]).round(l).paddingInner(c).paddingOuter(u).align(d)},us.apply(f(),arguments)}function j9(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return j9(t())},e}function Ch(){return j9(ip.apply(null,arguments).paddingInner(1))}function vA(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function S9(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function dm(){}var sp=.7,mv=1/sp,Ou="\\s*([+-]?\\d+)\\s*",ap="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",na="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dge=/^#([0-9a-f]{3,8})$/,fge=new RegExp(`^rgb\\(${Ou},${Ou},${Ou}\\)$`),hge=new RegExp(`^rgb\\(${na},${na},${na}\\)$`),pge=new RegExp(`^rgba\\(${Ou},${Ou},${Ou},${ap}\\)$`),mge=new RegExp(`^rgba\\(${na},${na},${na},${ap}\\)$`),gge=new RegExp(`^hsl\\(${ap},${na},${na}\\)$`),yge=new RegExp(`^hsla\\(${ap},${na},${na},${ap}\\)$`),y3={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};vA(dm,op,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:v3,formatHex:v3,formatHex8:vge,formatHsl:xge,formatRgb:x3,toString:x3});function v3(){return this.rgb().formatHex()}function vge(){return this.rgb().formatHex8()}function xge(){return N9(this).formatHsl()}function x3(){return this.rgb().formatRgb()}function op(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=dge.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?b3(t):n===3?new oi(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Kg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Kg(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=fge.exec(e))?new oi(t[1],t[2],t[3],1):(t=hge.exec(e))?new oi(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pge.exec(e))?Kg(t[1],t[2],t[3],t[4]):(t=mge.exec(e))?Kg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=gge.exec(e))?
vendor: 4,830 bytes, line 574
574S3(t[1],t[2]/100,t[3]/100,1):(t=yge.exec(e))?S3(t[1],t[2]/100,t[3]/100,t[4]):y3.hasOwnProperty(e)?b3(y3[e]):e==="transparent"?new oi(NaN,NaN,NaN,0):null}function b3(e){return new oi(e>>16&255,e>>8&255,e&255,1)}function Kg(e,t,n,r){return r<=0&&(e=t=n=NaN),new oi(e,t,n,r)}function bge(e){return e instanceof dm||(e=op(e)),e?(e=e.rgb(),new oi(e.r,e.g,e.b,e.opacity)):new oi}function yP(e,t,n,r){return arguments.length===1?bge(e):new oi(e,t,n,r??1)}function oi(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}vA(oi,yP,S9(dm,{brighter(e){return e=e==null?mv:Math.pow(mv,e),new oi(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sp:Math.pow(sp,e),new oi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new oi(cc(this.r),cc(this.g),cc(this.b),gv(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:w3,formatHex:w3,formatHex8:wge,formatRgb:j3,toString:j3}));function w3(){return`#${Gl(this.r)}${Gl(this.g)}${Gl(this.b)}`}function wge(){return`#${Gl(this.r)}${Gl(this.g)}${Gl(this.b)}${Gl((isNaN(this.opacity)?1:this.opacity)*255)}`}function j3(){const e=gv(this.opacity);return`${e===1?"rgb(":"rgba("}${cc(this.r)}, ${cc(this.g)}, ${cc(this.b)}${e===1?")":`, ${e})`}`}function gv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gl(e){return e=cc(e),(e<16?"0":"")+e.toString(16)}function S3(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ps(e,t,n,r)}function N9(e){if(e instanceof Ps)return new Ps(e.h,e.s,e.l,e.opacity);if(e instanceof dm||(e=op(e)),!e)return new Ps;if(e instanceof Ps)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),o=NaN,l=s-i,c=(s+i)/2;return l?(t===s?o=(n-r)/l+(n<r)*6:n===s?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?s+i:2-s-i,o*=60):l=c>0&&c<1?0:o,new Ps(o,l,c,e.opacity)}function jge(e,t,n,r){return arguments.length===1?N9(e):new Ps(e,t,n,r??1)}function Ps(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}vA(Ps,jge,S9(dm,{brighter(e){return e=e==null?mv:Math.pow(mv,e),new Ps(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sp:Math.pow(sp,e),new Ps(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 oi(pN(e>=240?e-240:e+120,i,r),pN(e,i,r),pN(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ps(N3(this.h),Yg(this.s),Yg(this.l),gv(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=gv(this.opacity);return`${e===1?"hsl(":"hsla("}${N3(this.h)}, ${Yg(this.s)*100}%, ${Yg(this.l)*100}%${e===1?")":`, ${e})`}`}}));function N3(e){return e=(e||0)%360,e<0?e+360:e}function Yg(e){return Math.max(0,Math.min(1,e||0))}function pN(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 xA=e=>()=>e;function Sge(e,t){return function(n){return e+n*t}}function Nge(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 _ge(e){return(e=+e)==1?_9:function(t,n){return n-t?Nge(t,n,e):xA(isNaN(t)?n:t)}}function _9(e,t){var n=t-e;return n?Sge(e,n):xA(isNaN(e)?t:e)}const _3=(function e(t){var n=_ge(t);function r(i,s){var o=n((i=yP(i)).r,(s=yP(s)).r),l=n(i.g,s.g),c=n(i.b,s.b),u=_9(i.opacity,s.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=c(d),i.opacity=u(d),i+""}}return r.gamma=e,r})(1);function Ege(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 Pge(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function kge(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=Vd(e[o],t[o]);for(;o<n;++o)s[o]=t[o];return function(l){for(o=0;o<r;++o)s[o]=i[o](l);return s}}function Oge(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function yv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Age(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]=Vd(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var vP=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mN=new RegExp(vP.source,"g");function Cge(e){return function(){return e}}function Tge(e){return function(t){return e(t)+""}}function Rge(e,t){var n=vP.lastIndex=mN.lastIndex=0,r,i,s,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=vP.exec(e))&&(i=mN.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),l[o]?l[o]+=s:l[++o]=s),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:yv(r,i)}
vendor: 9,096 bytes, line 574
574)),n=mN.lastIndex;return n<t.length&&(s=t.slice(n),l[o]?l[o]+=s:l[++o]=s),l.length<2?c[0]?Tge(c[0].x):Cge(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function Vd(e,t){var n=typeof t,r;return t==null||n==="boolean"?xA(t):(n==="number"?yv:n==="string"?(r=op(t))?(t=r,_3):Rge:t instanceof op?_3:t instanceof Date?Oge:Pge(t)?Ege:Array.isArray(t)?kge:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Age:yv)(e,t)}function bA(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Ige(e,t){t===void 0&&(t=e,e=Vd);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(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return s[l](o-l)}}function Mge(e){return function(){return e}}function vv(e){return+e}var E3=[0,1];function Gr(e){return e}function xP(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Mge(isNaN(t)?NaN:.5)}function Dge(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Lge(e,t,n){var r=e[0],i=e[1],s=t[0],o=t[1];return i<r?(r=xP(i,r),s=n(o,s)):(r=xP(r,i),s=n(s,o)),function(l){return s(r(l))}}function $ge(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=xP(e[o],e[o+1]),s[o]=n(t[o],t[o+1]);return function(l){var c=um(e,l,1,r)-1;return s[c](i[c](l))}}function fm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Yx(){var e=E3,t=E3,n=Vd,r,i,s,o=Gr,l,c,u;function d(){var p=Math.min(e.length,t.length);return o!==Gr&&(o=Dge(e[0],e[p-1])),l=p>2?$ge:Lge,c=u=null,f}function f(p){return p==null||isNaN(p=+p)?s:(c||(c=l(e.map(r),t,n)))(r(o(p)))}return f.invert=function(p){return o(i((u||(u=l(t,e.map(r),yv)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,vv),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=bA,d()},f.clamp=function(p){return arguments.length?(o=p?!0:Gr,d()):o!==Gr},f.interpolate=function(p){return arguments.length?(n=p,d()):n},f.unknown=function(p){return arguments.length?(s=p,f):s},function(p,m){return r=p,i=m,d()}}function wA(){return Yx()(Gr,Gr)}function Bge(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xv(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 sd(e){return e=xv(Math.abs(e)),e?e[1]:NaN}function Fge(e,t){return function(n,r){for(var i=n.length,s=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),s.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=e[o=(o+1)%e.length];return s.reverse().join(t)}}function qge(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var zge=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lp(e){if(!(t=zge.exec(e)))throw new Error("invalid format: "+e);var t;return new jA({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]})}lp.prototype=jA.prototype;function jA(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+""}jA.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 Uge(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 E9;function Vge(e,t){var n=xv(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(E9=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+xv(e,Math.max(0,t+s-1))[0]}function P3(e,t){var n=xv(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 k3={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Bge,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)=>P3(e*100,t),r:P3,s:Vge,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function O3(e){return e}var A3=Array.prototype.map,C3=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Wge(e){var t=e.grouping===void 0||e.thousands===void 0?O3:Fge(A3.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?O3:qge(A3.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=lp(f);var p=f.fill,m=f.align,x=f.sign,y=f.symbol,v=f.zero,b=f.width,w=f.comma,N=f.precision,S=f.trim,_=f.type;_==="n"?(w=!0,_="g"):k3[_]||(N===void 0&&(N=12),S=!0,_="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var E=y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",k=y==="$"?r:/[%p]/.test(_)?o:"",O=k3[_],I=/[defgprs%]/.test(_);N=N===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function A(C){var R=E,D=k,q,F,H;if(_==="c")D=O(C)+D,C="";else{C=+C;var U=C<0||1/C<0;if(C=isNaN(C)?c:O(Math.abs(C),N),S&&(C=Uge(C)),U&&+C==0&&x!=="+"&&(U=!1),R=(U?x==="("?x:l:x==="-"||x==="("?"":x)+R,D=(_==="s"?C3[8+E9/3]:"")+D+(U&&x==="("?")":""),I){for(q=-1,F=C.length;++q<F;)if(H=C.charCodeAt(q),48>H||H>57){D=(H===46?i+C.slice(q+1):C.slice(q))+D,C=C.slice(0,q);break}}}w&&!v&&(C=t(C,1/0));var W=R.length+C.length+D.length,G=W<b?new Array(b-W+1).join(p):"";switch(w&&v&&(C=t(G+C,G.length?b-D.length:1/0),G=""),m){case"<":C=R+C+D+G;break;case"=":C=R+G+C+D;break;case"^":C=G.slice(0,W=G.length>>1)+R+C+D+G.slice(W);break;default:C=G+R+C+D;break}return s(C)}return A.toString=function(){return f+""},A}function d(f,p){var m=u((f=lp(f),f.type="f",f)),x=Math.max(-8,Math.min(8,Math.floor(sd(p)/3)))*3,y=Math.pow(10,-x),v=C3[8+x/3];return function(b){return m(y*b)+v}}return{format:u,formatPrefix:d}}var Xg,SA,P9;Hge({thousands:",",grouping:[3],currency:["$",""]});function Hge(e){return Xg=Wge(e),SA=Xg.format,P9=Xg.formatPrefix,Xg}function Gge(e){return Math.max(0,-sd(Math.abs(e)))}function Kge(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(sd(t)/3)))*3-sd(Math.abs(e)))}function Yge(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,sd(t)-sd(e))+1}function k9(e,t,n,r){var i=mP(e,t,n),s;switch(r=lp(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Kge(i,o))&&(r.precision=s),P9(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Yge(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Gge(i))&&(r.precision=s-(r.type==="%")*2);break}}return SA(r)}function al(e){var t=e.domain;return e.ticks=function(n){var r=t();return hP(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return k9(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,o=r[i],l=r[s],c,u,d=10;for(l<o&&(u=o,o=l,l=u,u=i,i=s,s=u);d-- >0;){if(u=pP(o,l,n),u===c)return r[i]=o,r[s]=l,t(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function bv(){var e=wA();return e.copy=function(){return fm(e,bv())},us.apply(e,arguments),al(e)}function O9(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,vv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return O9(e).unknown(t)},e=arguments.length?Array.from(e,vv):[0,1],al(n)}function A9(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],o;return s<i&&(o=n,n=r,r=o,o=i,i=s,s=o),e[n]=t.floor(i),e[r]=t.ceil(s),e}function T3(e){return Math.log(e)}function R3(e){return Math.exp(e)}function Xge(e){return-Math.log(-e)}function Qge(e){return-Math.exp(-e)}function Zge(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Jge(e){return e===10?Zge:e===Math.E?Math.exp:t=>Math.pow(e,t)}function eye(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 I3(e){return(t,n)=>-e(-t,n)}function NA(e){const t=e(T3,R3),n=t.domain;let r=10,i,s;
vendor: 4,374 bytes, line 574
574function o(){return i=eye(r),s=Jge(r),n()[0]<0?(i=I3(i),s=I3(s),e(Xge,Qge)):e(T3,R3),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let p=i(u),m=i(d),x,y;const v=l==null?10:+l;let b=[];if(!(r%1)&&m-p<v){if(p=Math.floor(p),m=Math.ceil(m),u>0){for(;p<=m;++p)for(x=1;x<r;++x)if(y=p<0?x/s(-p):x*s(p),!(y<u)){if(y>d)break;b.push(y)}}else for(;p<=m;++p)for(x=r-1;x>=1;--x)if(y=p>0?x/s(-p):x*s(p),!(y<u)){if(y>d)break;b.push(y)}b.length*2<v&&(b=hP(u,d,v))}else b=hP(p,m,Math.min(m-p,v)).map(s);return f?b.reverse():b},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=lp(c)).precision==null&&(c.trim=!0),c=SA(c)),l===1/0)return c;const u=Math.max(1,r*l/t.ticks().length);return d=>{let f=d/s(Math.round(i(d)));return f*r<r-.5&&(f*=r),f<=u?c(d):""}},t.nice=()=>n(A9(n(),{floor:l=>s(Math.floor(i(l))),ceil:l=>s(Math.ceil(i(l)))})),t}function C9(){const e=NA(Yx()).domain([1,10]);return e.copy=()=>fm(e,C9()).base(e.base()),us.apply(e,arguments),e}function M3(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function D3(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function _A(e){var t=1,n=e(M3(t),D3(t));return n.constant=function(r){return arguments.length?e(M3(t=+r),D3(t)):t},al(n)}function T9(){var e=_A(Yx());return e.copy=function(){return fm(e,T9()).constant(e.constant())},us.apply(e,arguments)}function L3(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function tye(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function nye(e){return e<0?-e*e:e*e}function EA(e){var t=e(Gr,Gr),n=1;function r(){return n===1?e(Gr,Gr):n===.5?e(tye,nye):e(L3(n),L3(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},al(t)}function PA(){var e=EA(Yx());return e.copy=function(){return fm(e,PA()).exponent(e.exponent())},us.apply(e,arguments),e}function rye(){return PA.apply(null,arguments).exponent(.5)}function $3(e){return Math.sign(e)*e*e}function iye(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function R9(){var e=wA(),t=[0,1],n=!1,r;function i(s){var o=iye(e(s));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(s){return e.invert($3(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,vv)).map($3)),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 R9(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},us.apply(i,arguments),al(i)}function I9(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=cge(e,o/l);return s}function s(o){return o==null||isNaN(o=+o)?r:t[um(n,o)]}return s.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},s.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Wo),i()},s.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},s.unknown=function(o){return arguments.length?(r=o,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return I9().domain(e).range(t).unknown(r)},us.apply(s,arguments)}function M9(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function o(c){return c!=null&&c<=c?i[um(r,c,0,n)]:s}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,l()):i.slice()},o.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(s=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return M9().domain([e,t]).range(i).unknown(s)},us.apply(al(o),arguments)}function D9(){var e=[.5],t=[0,1],n,r=1;function i(s){return s!=null&&s<=s?t[um(e,s,0,r)]:n}return i.domain=function(s){return arguments.length?(e=Array.from(s),r=M
vendor: 4,094 bytes, line 574
574ath.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 o=t.indexOf(s);return[e[o-1],e[o]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return D9().domain(e).range(t).unknown(n)},us.apply(i,arguments)}const gN=new Date,yN=new Date;function er(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 o=i(s),l=i.ceil(s);return s-o<l-s?o:l},i.offset=(s,o)=>(t(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,l)=>{const c=[];if(s=i.ceil(s),l=l==null?1:Math.floor(l),!(s<o)||!(l>0))return c;let u;do c.push(u=new Date(+s)),t(s,l),e(s);while(u<s&&s<o);return c},i.filter=s=>er(o=>{if(o>=o)for(;e(o),!s(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!s(o););else for(;--l>=0;)for(;t(o,1),!s(o););}),n&&(i.count=(s,o)=>(gN.setTime(+s),yN.setTime(+o),e(gN),e(yN),Math.floor(n(gN,yN))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const wv=er(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?er(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):wv);wv.range;const Ca=1e3,rs=Ca*60,Ta=rs*60,Ua=Ta*24,kA=Ua*7,B3=Ua*30,vN=Ua*365,Kl=er(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ca)},(e,t)=>(t-e)/Ca,e=>e.getUTCSeconds());Kl.range;const OA=er(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ca)},(e,t)=>{e.setTime(+e+t*rs)},(e,t)=>(t-e)/rs,e=>e.getMinutes());OA.range;const AA=er(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rs)},(e,t)=>(t-e)/rs,e=>e.getUTCMinutes());AA.range;const CA=er(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ca-e.getMinutes()*rs)},(e,t)=>{e.setTime(+e+t*Ta)},(e,t)=>(t-e)/Ta,e=>e.getHours());CA.range;const TA=er(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ta)},(e,t)=>(t-e)/Ta,e=>e.getUTCHours());TA.range;const hm=er(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rs)/Ua,e=>e.getDate()-1);hm.range;const Xx=er(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>e.getUTCDate()-1);Xx.range;const L9=er(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ua,e=>Math.floor(e/Ua));L9.range;function Tc(e){return er(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())*rs)/kA)}const Qx=Tc(0),jv=Tc(1),sye=Tc(2),aye=Tc(3),ad=Tc(4),oye=Tc(5),lye=Tc(6);Qx.range;jv.range;sye.range;aye.range;ad.range;oye.range;lye.range;function Rc(e){return er(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)/kA)}const Zx=Rc(0),Sv=Rc(1),cye=Rc(2),uye=Rc(3),od=Rc(4),dye=Rc(5),fye=Rc(6);Zx.range;Sv.range;cye.range;uye.range;od.range;dye.range;fye.range;const RA=er(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());RA.range;const IA=er(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());IA.range;const Va=er(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());Va.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:er(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)});Va.range;const Wa=er(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());Wa.every=e=>
vendor: 3,346 bytes, line 574
574!isFinite(e=Math.floor(e))||!(e>0)?null:er(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)});Wa.range;function $9(e,t,n,r,i,s){const o=[[Kl,1,Ca],[Kl,5,5*Ca],[Kl,15,15*Ca],[Kl,30,30*Ca],[s,1,rs],[s,5,5*rs],[s,15,15*rs],[s,30,30*rs],[i,1,Ta],[i,3,3*Ta],[i,6,6*Ta],[i,12,12*Ta],[r,1,Ua],[r,2,2*Ua],[n,1,kA],[t,1,B3],[t,3,3*B3],[e,1,vN]];function l(u,d,f){const p=d<u;p&&([u,d]=[d,u]);const m=f&&typeof f.range=="function"?f:c(u,d,f),x=m?m.range(u,+d+1):[];return p?x.reverse():x}function c(u,d,f){const p=Math.abs(d-u)/f,m=gA(([,,v])=>v).right(o,p);if(m===o.length)return e.every(mP(u/vN,d/vN,f));if(m===0)return wv.every(Math.max(mP(u,d,f),1));const[x,y]=o[p/o[m-1][2]<o[m][2]/p?m-1:m];return x.every(y)}return[l,c]}const[hye,pye]=$9(Wa,IA,Zx,L9,TA,AA),[mye,gye]=$9(Va,RA,Qx,hm,CA,OA);function xN(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 bN(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 Kf(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function yye(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=Yf(i),d=Xf(i),f=Yf(s),p=Xf(s),m=Yf(o),x=Xf(o),y=Yf(l),v=Xf(l),b=Yf(c),w=Xf(c),N={a:U,A:W,b:G,B:L,c:null,d:W3,e:W3,f:Fye,g:Xye,G:Zye,H:Lye,I:$ye,j:Bye,L:B9,m:qye,M:zye,p:$,q:V,Q:K3,s:Y3,S:Uye,u:Vye,U:Wye,V:Hye,w:Gye,W:Kye,x:null,X:null,y:Yye,Y:Qye,Z:Jye,"%":G3},S={a:z,A:Q,b:J,B:Y,c:null,d:H3,e:H3,f:rve,g:hve,G:mve,H:eve,I:tve,j:nve,L:q9,m:ive,M:sve,p:X,q:ne,Q:K3,s:Y3,S:ave,u:ove,U:lve,V:cve,w:uve,W:dve,x:null,X:null,y:fve,Y:pve,Z:gve,"%":G3},_={a:A,A:C,b:R,B:D,c:q,d:U3,e:U3,f:Rye,g:z3,G:q3,H:V3,I:V3,j:Oye,L:Tye,m:kye,M:Aye,p:I,q:Pye,Q:Mye,s:Dye,S:Cye,u:jye,U:Sye,V:Nye,w:wye,W:_ye,x:F,X:H,y:z3,Y:q3,Z:Eye,"%":Iye};N.x=E(n,N),N.X=E(r,N),N.c=E(t,N),S.x=E(n,S),S.X=E(r,S),S.c=E(t,S);function E(Z,se){return function(pe){var oe=[],Oe=-1,$e=0,Ze=Z.length,xt,pt,ye;for(pe instanceof Date||(pe=new Date(+pe));++Oe<Ze;)Z.charCodeAt(Oe)===37&&(oe.push(Z.slice($e,Oe)),(pt=F3[xt=Z.charAt(++Oe)])!=null?xt=Z.charAt(++Oe):pt=xt==="e"?" ":"0",(ye=se[xt])&&(xt=ye(pe,pt)),oe.push(xt),$e=Oe+1);return oe.push(Z.slice($e,Oe)),oe.join("")}}function k(Z,se){return function(pe){var oe=Kf(1900,void 0,1),Oe=O(oe,Z,pe+="",0),$e,Ze;if(Oe!=pe.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(oe.s*1e3+("L"in oe?oe.L:0));if(se&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+oe.p*12),oe.m===void 0&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?($e=bN(Kf(oe.y,0,1)),Ze=$e.getUTCDay(),$e=Ze>4||Ze===0?Sv.ceil($e):Sv($e),$e=Xx.offset($e,(oe.V-1)*7),oe.y=$e.getUTCFullYear(),oe.m=$e.getUTCMonth(),oe.d=$e.getUTCDate()+(oe.w+6)%7):($e=xN(Kf(oe.y,0,1)),Ze=$e.getDay(),$e=Ze>4||Ze===0?jv.ceil($e):jv($e),$e=hm.offset($e,(oe.V-1)*7),oe.y=$e.getFullYear(),oe.m=$e.getMonth(),oe.d=$e.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),Ze="Z"in oe?bN(Kf(oe.y,0,1)).getUTCDay():xN(Kf(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(Ze+5)%7:oe.w+oe.U*7-(Ze+6)%7);
vendor: 6,514 bytes, line 574
574return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,bN(oe)):xN(oe)}}function O(Z,se,pe,oe){for(var Oe=0,$e=se.length,Ze=pe.length,xt,pt;Oe<$e;){if(oe>=Ze)return-1;if(xt=se.charCodeAt(Oe++),xt===37){if(xt=se.charAt(Oe++),pt=_[xt in F3?se.charAt(Oe++):xt],!pt||(oe=pt(Z,pe,oe))<0)return-1}else if(xt!=pe.charCodeAt(oe++))return-1}return oe}function I(Z,se,pe){var oe=u.exec(se.slice(pe));return oe?(Z.p=d.get(oe[0].toLowerCase()),pe+oe[0].length):-1}function A(Z,se,pe){var oe=m.exec(se.slice(pe));return oe?(Z.w=x.get(oe[0].toLowerCase()),pe+oe[0].length):-1}function C(Z,se,pe){var oe=f.exec(se.slice(pe));return oe?(Z.w=p.get(oe[0].toLowerCase()),pe+oe[0].length):-1}function R(Z,se,pe){var oe=b.exec(se.slice(pe));return oe?(Z.m=w.get(oe[0].toLowerCase()),pe+oe[0].length):-1}function D(Z,se,pe){var oe=y.exec(se.slice(pe));return oe?(Z.m=v.get(oe[0].toLowerCase()),pe+oe[0].length):-1}function q(Z,se,pe){return O(Z,t,se,pe)}function F(Z,se,pe){return O(Z,n,se,pe)}function H(Z,se,pe){return O(Z,r,se,pe)}function U(Z){return o[Z.getDay()]}function W(Z){return s[Z.getDay()]}function G(Z){return c[Z.getMonth()]}function L(Z){return l[Z.getMonth()]}function $(Z){return i[+(Z.getHours()>=12)]}function V(Z){return 1+~~(Z.getMonth()/3)}function z(Z){return o[Z.getUTCDay()]}function Q(Z){return s[Z.getUTCDay()]}function J(Z){return c[Z.getUTCMonth()]}function Y(Z){return l[Z.getUTCMonth()]}function X(Z){return i[+(Z.getUTCHours()>=12)]}function ne(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var se=E(Z+="",N);return se.toString=function(){return Z},se},parse:function(Z){var se=k(Z+="",!1);return se.toString=function(){return Z},se},utcFormat:function(Z){var se=E(Z+="",S);return se.toString=function(){return Z},se},utcParse:function(Z){var se=k(Z+="",!0);return se.toString=function(){return Z},se}}}var F3={"-":"",_:" ",0:"0"},fr=/^\s*\d+/,vye=/^%/,xye=/[\\^$*+?|[\]().{}]/g;function zt(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 bye(e){return e.replace(xye,"\\$&")}function Yf(e){return new RegExp("^(?:"+e.map(bye).join("|")+")","i")}function Xf(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function wye(e,t,n){var r=fr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function jye(e,t,n){var r=fr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Sye(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Nye(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function _ye(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function q3(e,t,n){var r=fr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function z3(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Eye(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 Pye(e,t,n){var r=fr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function kye(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function U3(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Oye(e,t,n){var r=fr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function V3(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Aye(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Cye(e,t,n){var r=fr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Tye(e,t,n){var r=fr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Rye(e,t,n){var r=fr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Iye(e,t,n){var r=vye.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Mye(e,t,n){var r=fr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Dye(e,t,n){var r=fr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function W3(e,t){return zt(e.getDate(),t,2)}function Lye(e,t){return zt(e.getHours(),t,2)}function $ye(e,t){return zt(e.getHours()%12||12,t,2)}function Bye(e,t){return zt(1+hm.count(Va(e),e),t,3)}function B9(e,t){return zt(e.getMilliseconds(),t,3)}function Fye(e,t){return B9(e,t)+"000"}function qye(e,t){return zt(e.getMonth()+1,t,2)}function zye(e,t){return zt(e.getMinutes(),t,2)}function Uye(e,t){return zt(e.getSeconds(),t,2)}function Vye(e){var t=e.getDay();return t===0?7:t}function Wye(e,t){return zt(Qx.count(Va(e)-1,e),t,2)}function F9(e){var t=e.getDay();return t>=4||t===0?ad(e):ad.ceil(e)}function Hye(e,t){return e=F9(e),zt(ad.count(Va(e),e)+(Va(e).getDay()===4),t,2)}function Gye(e){return e.getDay()}function Kye(e,t){return zt(jv.count(Va(e)-1,e),t,2)}function Yye(e,t){return zt(e.getFullYear()%100,t,2)}function Xye(e,t){return e=F9(e),zt(e.getFullYear()%100,t,2)}function Qye(e,t){return zt(e.getFullYear()%1e4,t,4)}function Zye(e,t){var n=e.getDay();return e=n>=4||n===0?ad(e):ad.ceil(e),zt(e.getFullYear()%1e4,t,4)}function Jye(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+zt(t/60|0,"0",2)+zt(t%60,"0",2)}function H3(e,t){return zt(e.getUTCDate(),t,2)}function eve(e,t){return zt(e.getUTCHours(),t,2)}function tve(e,t){return zt(e.getUTCHours()%12||12,t,2)}function nve(e,t){return zt(1+Xx.count(Wa(e),e),t,3)}function q9(e,t){return zt(e.getUTCMilliseconds(),t,3)}function rve(e,t){return q9(e,t)+"000"}function ive(e,t){return zt(e.getUTCMonth()+1,t,2)}function sve(e,t){return zt(e.getUTCMinutes(),t,2)}function ave(e,t){return zt(e.getUTCSeconds(),t,2)}function ove(e){var t=e.getUTCDay();return t===0?7:t}function lve(e,t){return zt(Zx.count(Wa(e)-1,e),t,2)}function z9(e){var t=e.getUTCDay();return t>=4||t===0?od(e):od.ceil(e)}function cve(e,t){return e=z9(e),zt(od.count(Wa(e),e)+(Wa(e).getUTCDay()===4),t,2)}function uve(e){return e.getUTCDay()}function dve(e,t){return zt(Sv.count(Wa(e)-1,e),t,2)}function fve(e,t){return zt(e.getUTCFullYear()%100,t,2)}function hve(e,t){return e=z9(e),zt(e.getUTCFullYear()%100,t,2)}function pve(e,t){return zt(e.getUTCFullYear()%1e4,t,4)}function mve(e,t){var n=e.getUTCDay();return e=n>=4||n===0?od(e):od.ceil(e),zt(e.getUTCFullYear()%1e4,t,4)}function gve(){return"+0000"}function G3(){return"%"}function K3(e){return+e}function Y3(e){return Math.floor(+e/1e3)}var cu,U9,V9;yve({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
574ay","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 yve(e){return cu=yye(e),U9=cu.format,cu.parse,V9=cu.utcFormat,cu.utcParse,cu}function vve(e){return new Date(e)}function xve(e){return e instanceof Date?+e:+new Date(+e)}function MA(e,t,n,r,i,s,o,l,c,u){var d=wA(),f=d.invert,p=d.domain,m=u(".%L"),x=u(":%S"),y=u("%I:%M"),v=u("%I %p"),b=u("%a %d"),w=u("%b %d"),N=u("%B"),S=u("%Y");function _(E){return(c(E)<E?m:l(E)<E?x:o(E)<E?y:s(E)<E?v:r(E)<E?i(E)<E?b:w:n(E)<E?N:S)(E)}return d.invert=function(E){return new Date(f(E))},d.domain=function(E){return arguments.length?p(Array.from(E,xve)):p().map(vve)},d.ticks=function(E){var k=p();return e(k[0],k[k.length-1],E??10)},d.tickFormat=function(E,k){return k==null?_:u(k)},d.nice=function(E){var k=p();return(!E||typeof E.range!="function")&&(E=t(k[0],k[k.length-1],E??10)),E?p(A9(k,E)):d},d.copy=function(){return fm(d,MA(e,t,n,r,i,s,o,l,c,u))},d}function bve(){return us.apply(MA(mye,gye,Va,RA,Qx,hm,CA,OA,Kl,U9).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function wve(){return us.apply(MA(hye,pye,Wa,IA,Zx,Xx,TA,AA,Kl,V9).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Jx(){var e=0,t=1,n,r,i,s,o=Gr,l=!1,c;function u(f){return f==null||isNaN(f=+f)?c:o(i===0?.5:(f=(s(f)-n)*i,l?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=s(e=+e),r=s(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(l=!!f,u):l},u.interpolator=function(f){return arguments.length?(o=f,u):o};function d(f){return function(p){var m,x;return arguments.length?([m,x]=p,o=f(m,x),u):[o(0),o(1)]}}return u.range=d(Vd),u.rangeRound=d(bA),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return s=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),u}}function ol(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function W9(){var e=al(Jx()(Gr));return e.copy=function(){return ol(e,W9())},Ja.apply(e,arguments)}function H9(){var e=NA(Jx()).domain([1,10]);return e.copy=function(){return ol(e,H9()).base(e.base())},Ja.apply(e,arguments)}function G9(){var e=_A(Jx());return e.copy=function(){return ol(e,G9()).constant(e.constant())},Ja.apply(e,arguments)}function DA(){var e=EA(Jx());return e.copy=function(){return ol(e,DA()).exponent(e.exponent())},Ja.apply(e,arguments)}function jve(){return DA.apply(null,arguments).exponent(.5)}function K9(){var e=[],t=Gr;function n(r){if(r!=null&&!isNaN(r=+r))return t((um(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(Wo),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)=>lge(e,s/r))},n.copy=function(){return K9(t).domain(e)},Ja.apply(n,arguments)}function e0(){var e=0,t=.5,n=1,r=1,i,s,o,l,c,u=Gr,d,f=!1,p;function m(y){return isNaN(y=+y)?p:(y=.5+((y=+d(y))-s)*(r*y<r*s?l:c),u(f?Math.max(0,Math.min(1,y)):y))}m.domain=function(y){return arguments.length?([e,t,n]=y,i=d(e=+e),s=d(t=+t),o=d(n=+n),l=i===s?0:.5/(s-i),c=s===o?0:.5/(o-s),r=s<i?-1:1,m):[e,t,n]},m.clamp=function(y){return arguments.length?(f=!!y,m):f},m.interpolator=function(y){return arguments.length?(u=y,m):u};function x(y){return function(v){var b,w,N;return arguments.length?([b,w,N]=v,u=Ige(y,[b,w,N]),m):[u(0),u(.5),u(1)]}}return m.range=x(Vd),m.rangeRound=x(bA),m.unknown=function(y){return arguments.length?(p=y,m):p},function(y){return d=y,i=y(e),s=y(t),o=y(n),l=i===s?0:.5/(s-i),c=s===o?0:.5/(o-s),r=s<i?-1:1,m}}function Y9(){var e=al(e0()(Gr));return e.copy=function(){return ol(e,Y9())},Ja.apply(e,arguments)}function X9(){var e=NA(e0()).domain([.1,1,10]);return e.copy=function(){return ol(e,X9()).base(e.base())},Ja.apply(e,arguments)}function Q9(){var e=_A(e0());return e.copy=function(){return ol(e,Q9()).constant(e.constant())},Ja.apply(e,arguments)}function LA(){var e=EA(e0());return e.copy=function(){return ol(e,LA()).exponent(e.exponent())},Ja.apply(e,arguments)}function Sve(){return LA.apply(null,arguments).exponent(.5)}const X3=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:ip,scaleDiverging:Y9,scaleDivergingLog:X9,scaleDivergingPow:LA,scaleDivergingSqrt:Sve,scaleDivergingSymlog:Q9,scaleIdentity:O9,scaleImplicit:gP,scaleLinear:bv,scaleLog:C9,scaleOrdinal:yA,scalePoint:Ch,scalePow:PA,scaleQuantile:I9,scaleQuantize:M9,scaleRadial:R9,scaleSequential:W9,scaleSequentialLog:H9,scaleSequentialPow:DA,scaleSequentialQuantile:K9,scaleSequentialSqrt:jve,scaleSequentialSymlog:G9,scaleSqrt:rye,scaleSymlog:T9,scaleThreshold:D9,scaleTime:bve,scaleUtc:wve,tickFormat:k9},Symbol.toStringTag,{value:"Module"}));var wN,Q3;function t0(){if(Q3)return wN;Q3=1;var e=Fd();function t(n,r,i){for(var s=-1,o=n.length;++s<o;){var l=n[s],c=r(l);
vendor: 69,139 bytes, lines 574-601
574if(c!=null&&(u===void 0?c===c&&!e(c):i(c,u)))var u=c,d=l}return d}return wN=t,wN}var jN,Z3;function Z9(){if(Z3)return jN;Z3=1;function e(t,n){return t>n}return jN=e,jN}var SN,J3;function Nve(){if(J3)return SN;J3=1;var e=t0(),t=Z9(),n=Ud();function r(i){return i&&i.length?e(i,n,t):void 0}return SN=r,SN}var _ve=Nve();const n0=Lt(_ve);var NN,e$;function J9(){if(e$)return NN;e$=1;function e(t,n){return t<n}return NN=e,NN}var _N,t$;function Eve(){if(t$)return _N;t$=1;var e=t0(),t=J9(),n=Ud();function r(i){return i&&i.length?e(i,n,t):void 0}return _N=r,_N}var Pve=Eve();const r0=Lt(Pve);var EN,n$;function kve(){if(n$)return EN;n$=1;var e=JO(),t=da(),n=o9(),r=pi();function i(s,o){var l=r(s)?e:n;return l(s,t(o,3))}return EN=i,EN}var PN,r$;function Ove(){if(r$)return PN;r$=1;var e=s9(),t=kve();function n(r,i){return e(t(r,i),1)}return PN=n,PN}var Ave=Ove();const Cve=Lt(Ave);var kN,i$;function eV(){if(i$)return kN;i$=1;var e=fA();function t(n,r){return e(n,r)}return kN=t,kN}var Tve=eV();const pm=Lt(Tve);var Wd=1e9,Rve={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},BA,pn=!0,ls="[DecimalError] ",uc=ls+"Invalid argument: ",$A=ls+"Exponent out of range: ",Hd=Math.floor,Bl=Math.pow,Ive=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Pi,sr=1e7,un=7,tV=9007199254740991,Nv=Hd(tV/un),We={};We.absoluteValue=We.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};We.comparedTo=We.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};We.decimalPlaces=We.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*un;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};We.dividedBy=We.div=function(e){return La(this,new this.constructor(e))};We.dividedToIntegerBy=We.idiv=function(e){var t=this,n=t.constructor;return Zt(La(t,new n(e),0,1),n.precision)};We.equals=We.eq=function(e){return!this.cmp(e)};We.exponent=function(){return Un(this)};We.greaterThan=We.gt=function(e){return this.cmp(e)>0};We.greaterThanOrEqualTo=We.gte=function(e){return this.cmp(e)>=0};We.isInteger=We.isint=function(){return this.e>this.d.length-2};We.isNegative=We.isneg=function(){return this.s<0};We.isPositive=We.ispos=function(){return this.s>0};We.isZero=function(){return this.s===0};We.lessThan=We.lt=function(e){return this.cmp(e)<0};We.lessThanOrEqualTo=We.lte=function(e){return this.cmp(e)<1};We.logarithm=We.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(Pi))throw Error(ls+"NaN");if(n.s<1)throw Error(ls+(n.s?"NaN":"-Infinity"));return n.eq(Pi)?new r(0):(pn=!1,t=La(cp(n,s),cp(e,s),s),pn=!0,Zt(t,i))};We.minus=We.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iV(t,e):nV(t,(e.s=-e.s,e))};We.modulo=We.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ls+"NaN");return n.s?(pn=!1,t=La(n,e,0,1).times(e),pn=!0,n.minus(t)):Zt(new r(n),i)};We.naturalExponential=We.exp=function(){return rV(this)};We.naturalLogarithm=We.ln=function(){return cp(this)};We.negated=We.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};We.plus=We.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?nV(t,e):iV(t,(e.s=-e.s,e))};We.precision=We.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(uc+e);if(t=Un(i)+1,r=i.d.length-1,n=r*un+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};We.squareRoot=We.sqrt=function(){var e,t,n,r,i,s,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(ls+"NaN")}for(e=Un(l),pn=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=Qs(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Hd((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 c(t)):r=new c(i.toString()),n=c.precision,i=o=n+3;;)if(s=r,r=s.plus(La(l,s,o+2)).times(.5),Qs(s.d).slice(0,o)===(t=Qs(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Zt(s,n+1,0),s.times(s).eq(l)){r=s;break}}else if(t!="9999")break;o+=4}return pn=!0,Zt(r,n)};We.times=We.mul=function(e){var t,n,r,i,s,o,l,c,u,d=this,f=d.constructor,p=d.d,m=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=p.length,u=m.length,c<u&&(s=p,p=m,m=s,o=c,c=u,u=o),s=[],o=c+u,r=o;r--;)s.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)l=s[i]+m[r]*p[i-r-1]+t,s[i--]=l%sr|0,t=l/sr|0;s[i]=(s[i]+t)%sr|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=n,pn?Zt(e,f.precision):e};We.toDecimalPlaces=We.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(aa(e,0,Wd),t===void 0?t=r.rounding:aa(t,0,8),Zt(n,e+Un(n)+1,t))};We.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=vc(r,!0):(aa(e,0,Wd),t===void 0?t=i.rounding:aa(t,0,8),r=Zt(new i(r),e+1,t),n=vc(r,!0,e+1)),n};We.toFixed=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?vc(i):(aa(e,0,Wd),t===void 0?t=s.rounding:aa(t,0,8),r=Zt(new s(i),e+Un(i)+1,t),n=vc(r.abs(),!1,e+Un(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};We.toInteger=We.toint=function(){var e=this,t=e.constructor;return Zt(new t(e),Un(e)+1,t.rounding)};We.toNumber=function(){return+this};We.toPower=We.pow=function(e){var t,n,r,i,s,o,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(Pi);if(l=new c(l),!l.s){if(e.s<1)throw Error(ls+"Infinity");return l}if(l.eq(Pi))return l;if(r=c.precision,e.eq(Pi))return Zt(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,s=l.s,o){if((n=d<0?-d:d)<=tV){for(i=new c(Pi),t=Math.ceil(r/un+4),pn=!1;n%2&&(i=i.times(l),a$(i.d,t)),n=Hd(n/2),n!==0;)l=l.times(l),a$(l.d,t);return pn=!0,e.s<0?new c(Pi).div(i):Zt(i,r)}}else if(s<0)throw Error(ls+"NaN");return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,pn=!1,i=e.times(cp(l,r+u)),pn=!0,i=rV(i),i.s=s,i};We.toPrecision=function(e,t){var n,r,i=this,s=i.constructor;return e===void 0?(n=Un(i),r=vc(i,n<=s.toExpNeg||n>=s.toExpPos)):(aa(e,1,Wd),t===void 0?t=s.rounding:aa(t,0,8),i=Zt(new s(i),e,t),n=Un(i),r=vc(i,e<=n||n<=s.toExpNeg,e)),r};We.toSignificantDigits=We.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(aa(e,1,Wd),t===void 0?t=r.rounding:aa(t,0,8)),Zt(new r(n),e,t)};We.toString=We.valueOf=We.val=We.toJSON=We[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Un(e),n=e.constructor;return vc(e,t<=n.toExpNeg||t>=n.toExpPos)};function nV(e,t){var n,r,i,s,o,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),pn?Zt(t,f):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),s=o-i,s){for(s<0?(r=c,s=-s,l=u.length):(r=u,i=o,l=c.length),o=Math.ceil(f/un),l=o>l?o+1:l+1,s>l&&(s=l,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(l=c.length,s=u.length,l-s<0&&(s=l,r=u,u=c,c=r),n=0;s;)n=(c[--s]=c[s]+u[s]+n)/sr|0,c[s]%=sr;for(n&&(c.unshift(n),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,pn?Zt(t,f):t}function aa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(uc+e)}function Qs(e){var t,n,r,i=e.length-1,s="",o=e[0];if(i>0){for(s+=o,t=1;t<i;t++)r=e[t]+"",n=un-r.length,n&&(s+=ko(n)),s+=r;o=e[t],r=o+"",n=un-r.length,n&&(s+=ko(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}var La=(function(){function e(r,i){var s,o=0,l=r.length;for(r=r.slice();l--;)s=r[l]*i+o,r[l]=s%sr|0,o=s/sr|0;return o&&r.unshift(o),r}function t(r,i,s,o){var l,c;if(s!=o)c=s>o?1:-1;else for(l=c=0;l<s;l++)if(r[l]!=i[l]){c=r[l]>i[l]?1:-1;break}return c}function n(r,i,s){for(var o=0;s--;)r[s]-=o,o=r[s]<i[s]?1:0,r[s]=o*sr+r[s]-i[s];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,s,o){var l,c,u,d,f,p,m,x,y,v,b,w,N,S,_,E,k,O,I=r.constructor,A=r.s==i.s?1:-1,C=r.d,R=i.d;if(!r.s)return new I(r);if(!i.s)throw Error(ls+"Division by zero");for(c=r.e-i.e,k=R.length,_=C.length,m=new I(A),x=m.d=[],u=0;R[u]==(C[u]||0);)++u;if(R[u]>(C[u]||0)&&--c,s==null?w=s=I.precision:o?w=s+(Un(r)-Un(i))+1:w=s,w<0)return new I(0);if(w=w/un+2|0,u=0,k==1)for(d=0,R=R[0],w++;(u<_||d)&&w--;u++)N=d*sr+(C[u]||0),x[u]=N/R|0,d=N%R|0;else{for(d=sr/(R[0]+1)|0,d>1&&(R=e(R,d),C=e(C,d),k=R.length,_=C.length),S=k,y=C.slice(0,k),v=y.length;v<k;)y[v++]=0;O=R.slice(),O.unshift(0),E=R[0],R[1]>=sr/2&&++E;do d=0,l=t(R,y,k,v),l<0?(b=y[0],k!=v&&(b=b*sr+(y[1]||0)),d=b/E|0,d>1?(d>=sr&&(d=sr-1),f=e(R,d),p=f.length,v=y.length,l=t(f,y,p,v),l==1&&(d--,n(f,k<p?O:R,p))):(d==0&&(l=d=1),f=R.slice()),p=f.length,p<v&&f.unshift(0),n(y,f,v),l==-1&&(v=y.length,l=t(R,y,k,v),l<1&&(d++,n(y,k<v?O:R,v))),v=y.length):l===0&&(d++,y=[0]),x[u++]=d,l&&y[0]?y[v++]=C[S]||0:(y=[C[S]],v=1);while((S++<_||y[0]!==void 0)&&w--)}return x[0]||x.shift(),m.e=c,Zt(m,o?s+Un(m)+1:s)}})();function rV(e,t){var n,r,i,s,o,l,c=0,u=0,d=e.constructor,f=d.precision;if(Un(e)>16)throw Error($A+Un(e));if(!e.s)return new d(Pi);for(pn=!1,l=f,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(Bl(2,u))/Math.LN10*2+5|0,l+=r,n=i=s=new d(Pi),d.precision=l;;){if(i=Zt(i.times(e),l),n=n.times(++c),o=s.plus(La(i,n,l)),Qs(o.d).slice(0,l)===Qs(s.d).slice(0,l)){for(;u--;)s=Zt(s.times(s),l);return d.precision=f,t==null?(pn=!0,Zt(s,f)):s}s=o}}function Un(e){for(var t=e.e*un,n=e.d[0];n>=10;n/=10)t++;return t}function ON(e,t,n){if(t>e.LN10.sd())throw pn=!0,n&&(e.precision=n),Error(ls+"LN10 precision limit exceeded");return Zt(new e(e.LN10),t)}function ko(e){for(var t="";e--;)t+="0";return t}function cp(e,t){var n,r,i,s,o,l,c,u,d,f=1,p=10,m=e,x=m.d,y=m.constructor,v=y.precision;if(m.s<1)throw Error(ls+(m.s?"NaN":"-Infinity"));if(m.eq(Pi))return new y(0);if(t==null?(pn=!1,u=v):u=t,m.eq(10))return t==null&&(pn=!0),ON(y,u);if(u+=p,y.precision=u,n=Qs(x),r=n.charAt(0),s=Un(m),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Qs(m.d),r=n.charAt(0),f++;s=Un(m),r>1?(m=new y("0."+n),s++):m=new y(r+"."+n.slice(1))}else return c=ON(y,u+2,v).times(s+""),m=cp(new y(r+"."+n.slice(1)),u-p).plus(c),y.precision=v,t==null?(pn=!0,Zt(m,v)):m;for(l=o=m=La(m.minus(Pi),m.plus(Pi),u),d=Zt(m.times(m),u),i=3;;){if(o=Zt(o.times(d),u),c=l.plus(La(o,new y(i),u)),Qs(c.d).slice(0,u)===Qs(l.d).slice(0,u))return l=l.times(2),s!==0&&(l=l.plus(ON(y,u+2,v).times(s+""))),l=La(l,new y(f),u),y.precision=v,t==null?(pn=!0,Zt(l,v)):l;l=c,i+=2}}function s$(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=Hd(n/un),e.d=[],r=(n+1)%un,n<0&&(r+=un),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=un;r<i;)e.d.push(+t.slice(r,r+=un));t=t.slice(r),r=un-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),pn&&(e.e>Nv||e.e<-Nv))throw Error($A+n)}else e.s=0,e.e=0,e.d=[0];return e}function Zt(e,t,n){var r,i,s,o,l,c,u,d,f=e.d;for(o=1,s=f[0];s>=10;s/=10)o++;if(r=t-o,r<0)r+=un,i=t,u=f[d=0];else{if(d=Math.ceil((r+1)/un),s=f.length,d>=s)return e;for(u=s=f[d],o=1;s>=10;s/=10)o++;r%=un,i=r-un+o}if(n!==void 0&&(s=Bl(10,o-i-1),l=u/s%10|0,c=t<0||f[d+1]!==void 0||u%s,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?i>0?u/Bl(10,o-i):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(s=Un(e),f.length=1,t=t-s-1,f[0]=Bl(10,(un-t%un)%un),e.e=Hd(-t/un)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,s=1,d--):(f.length=d+1,s=Bl(10,un-r),f[d]=i>0?(u/Bl(10,o-i)%Bl(10,i)|0)*s:0),c)for(;;)if(d==0){(f[0]+=s)==sr&&(f[0]=1,++e.e);break}else{if(f[d]+=s,f[d]!=sr)break;f[d--]=0,s=1}for(r=f.length;f[--r]===0;)f.pop();if(pn&&(e.e>Nv||e.e<-Nv))throw Error($A+Un(e));return e}function iV(e,t){var n,r,i,s,o,l,c,u,d,f,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),pn?Zt(t,m):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(d=o<0,d?(n=c,o=-o,l=f.length):(n=f,r=u,l=c.length),i=Math.max(Math.ceil(m/un),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=c.length,l=f.length,d=i<l,d&&(l=i),i=0;i<l;i++)if(c[i]!=f[i]){d=c[i]<f[i];break}o=0}for(d&&(n=c,c=f,f=n,t.s=-t.s),l=c.length,i=f.length-l;i>0;--i)c[l++]=0;for(i=f.length;i>o;){if(c[--i]<f[i]){for(s=i;s&&c[--s]===0;)c[s]=sr-1;--c[s],c[i]+=sr}c[i]-=f[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,pn?Zt(t,m):t):new p(0)}function vc(e,t,n){var r,i=Un(e),s=Qs(e.d),o=s.length;return t?(n&&(r=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+ko(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+ko(-i-1)+s,n&&(r=n-o)>0&&(s+=ko(r))):i>=o?(s+=ko(i+1-o),n&&(r=n-i-1)>0&&(s=s+"."+ko(r))):((r=i+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(s+="."),s+=ko(r))),e.s<0?"-"+s:s}function a$(e,t){if(e.length>t)return e.length=t,!0}function sV(e){var t,n,r;function i(s){var o=this;if(!(o instanceof i))return new i(s);if(o.constructor=i,s instanceof i){o.s=s.s,o.e=s.e,o.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(uc+s);if(s>0)o.s=1;else if(s<0)s=-s,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(s===~~s&&s<1e7){o.e=0,o.d=[s];return}return s$(o,s.toString())}else if(typeof s!="string")throw Error(uc+s);if(s.charCodeAt(0)===45?(s=s.slice(1),o.s=-1):o.s=1,Ive.test(s))s$(o,s);else throw Error(uc+s)}if(i.prototype=We,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=sV,i.config=i.set=Mve,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 Mve(e){if(!e||typeof e!="object")throw Error(ls+"Object expected");var t,n,r,i=["precision",1,Wd,"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(Hd(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(uc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(uc+n+": "+r);return this}var BA=sV(Rve);Pi=new BA(1);const Xt=BA;function Dve(e){return Fve(e)||Bve(e)||$ve(e)||Lve()}function Lve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 575In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $ve(e,t){if(e){if(typeof e=="string")return bP(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 bP(e,t)}}function Bve(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Fve(e){if(Array.isArray(e))return bP(e)}function bP(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 qve=function(t){return t},aV={},oV=function(t){return t===aV},o$=function(t){return function n(){return arguments.length===0||arguments.length===1&&oV(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},zve=function e(t,n){return t===1?n:o$(function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=i.filter(function(l){return l!==aV}).length;return o>=t?n.apply(void 0,i):e(t-o,o$(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=i.map(function(f){return oV(f)?c.shift():f});return n.apply(void 0,Dve(d).concat(c))}))})},i0=function(t){return zve(t.length,t)},wP=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},Uve=i0(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Vve=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return qve;var i=n.reverse(),s=i[0],o=i.slice(1);return function(){return o.reduce(function(l,c){return c(l)},s.apply(void 0,arguments))}},jP=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},lV=function(t){var n=null,r=null;return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return n&&s.every(function(l,c){return l===n[c]})||(n=s,r=t.apply(void 0,s)),r}};function Wve(e){var t;return e===0?t=1:t=Math.floor(new Xt(e).abs().log(10).toNumber())+1,t}function Hve(e,t,n){for(var r=new Xt(e),i=0,s=[];r.lt(t)&&i<1e5;)s.push(r.toNumber()),r=r.add(n),i++;return s}var Gve=i0(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),Kve=i0(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Yve=i0(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const s0={rangeStep:Hve,getDigitCount:Wve,interpolateNumber:Gve,uninterpolateNumber:Kve,uninterpolateTruncation:Yve};function SP(e){return Zve(e)||Qve(e)||cV(e)||Xve()}function Xve(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 576In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qve(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Zve(e){if(Array.isArray(e))return NP(e)}function up(e,t){return txe(e)||exe(e,t)||cV(e,t)||Jve()}function Jve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 577In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cV(e,t){if(e){if(typeof e=="string")return NP(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 NP(e,t)}}function NP(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 exe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,s=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,s=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw s}}return n}}function txe(e){if(Array.isArray(e))return e}function uV(e){var t=up(e,2),n=t[0],r=t[1],i=n,s=r;return n>r&&(i=r,s=n),[i,s]}function dV(e,t,n){if(e.lte(0))return new Xt(0);var r=s0.getDigitCount(e.toNumber()),i=new Xt(10).pow(r),s=e.div(i),o=r!==1?.05:.1,l=new Xt(Math.ceil(s.div(o).toNumber())).add(n).mul(o),c=l.mul(i);return t?c:new Xt(Math.ceil(c))}function nxe(e,t,n){var r=1,i=new Xt(e);if(!i.isint()&&n){var s=Math.abs(e);s<1?(r=new Xt(10).pow(s0.getDigitCount(e)-1),i=new Xt(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new Xt(Math.floor(e)))}else e===0?i=new Xt(Math.floor((t-1)/2)):n||(i=new Xt(Math.floor(e)));var o=Math.floor((t-1)/2),l=Vve(Uve(function(c){return i.add(new Xt(c-o).mul(r)).toNumber()}),wP);return l(0,t)}function fV(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 Xt(0),tickMin:new Xt(0),tickMax:new Xt(0)};var s=dV(new Xt(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Xt(0):(o=new Xt(e).add(t).div(2),o=o.sub(new Xt(o).mod(s)));var l=Math.ceil(o.sub(e).div(s).toNumber()),c=Math.ceil(new Xt(t).sub(o).div(s).toNumber()),u=l+c+1;return u>n?fV(e,t,n,r,i+1):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:s,tickMin:o.sub(new Xt(l).mul(s)),tickMax:o.add(new Xt(c).mul(s))})}function rxe(e){var t=up(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,o=Math.max(i,2),l=uV([n,r]),c=up(l,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(SP(wP(0,i-1).map(function(){return 1/0}))):[].concat(SP(wP(0,i-1).map(function(){return-1/0})),[d]);return n>r?jP(f):f}if(u===d)return nxe(u,i,s);var p=fV(u,d,o,s),m=p.step,x=p.tickMin,y=p.tickMax,v=s0.rangeStep(x,y.add(new Xt(.1).mul(m)),m);return n>r?jP(v):v}function ixe(e,t){var n=up(e,2),r=n[0],i=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=uV([r,i]),l=up(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[r,i];if(c===u)return[c];var d=Math.max(t,2),f=dV(new Xt(u).sub(c).div(d-1),s,0),p=[].concat(SP(s0.rangeStep(new Xt(c),new Xt(u).sub(new Xt(.99).mul(f)),f)),[u]);return r>i?jP(p):p}var sxe=lV(rxe),axe=lV(ixe),oxe="Invariant failed";function Zo(e,t){throw new Error(oxe)}var lxe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ld(e){"@babel/helpers - typeof";return ld=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},ld(e)}function _v(){return _v=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},_v.apply(this,arguments)}function cxe(e,t){return hxe(e)||fxe(e,t)||dxe(e,t)||uxe()}function uxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 578In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dxe(e,t){if(e){if(typeof e=="string")return l$(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 l$(e,t)}}function l$(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 fxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function hxe(e){if(Array.isArray(e))return e}function pxe(e,t){if(e==null)return{};var n=mxe(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 mxe(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 gxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yxe(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,mV(r.key),r)}}function vxe(e,t,n){return t&&yxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xxe(e,t,n){return t=Ev(t),bxe(e,hV()?Reflect.construct(t,n||[],Ev(e).constructor):t.apply(e,n))}function bxe(e,t){if(t&&(ld(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wxe(e)}function wxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hV=function(){return!!e})()}function Ev(e){return Ev=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ev(e)}function jxe(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&&_P(e,t)}function _P(e,t){return _P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_P(e,t)}function pV(e,t,n){return t=mV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mV(e){var t=Sxe(e,"string");return ld(t)=="symbol"?t:t+""}function Sxe(e,t){if(ld(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ld(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mm=(function(e){function t(){return gxe(this,t),xxe(this,t,arguments)}return jxe(t,e),vxe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,s=r.layout,o=r.width,l=r.dataKey,c=r.data,u=r.dataPointFormatter,d=r.xAxis,f=r.yAxis,p=pxe(r,lxe),m=ct(p,!1);this.props.direction==="x"&&d.type!=="number"&&Zo();var x=c.map(function(y){var v=u(y,l),b=v.x,w=v.y,N=v.value,S=v.errorVal;if(!S)return null;var _=[],E,k;if(Array.isArray(S)){var O=cxe(S,2);E=O[0],k=O[1]}else E=k=S;if(s==="vertical"){var I=d.scale,A=w+i,C=A+o,R=A-o,D=I(N-E),q=I(N+k);_.push({x1:q,y1:C,x2:q,y2:R}),_.push({x1:D,y1:A,x2:q,y2:A}),_.push({x1:D,y1:C,x2:D,y2:R})}else if(s==="horizontal"){var F=f.scale,H=b+i,U=H-o,W=H+o,G=F(N-E),L=F(N+k);_.push({x1:U,y1:L,x2:W,y2:L}),_.push({x1:H,y1:G,x2:H,y2:L}),_.push({x1:U,y1:G,x2:W,y2:G})}return ee.createElement(qt,_v({className:"recharts-errorBar",key:"bar-".concat(_.map(function($){return"".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))},m),_.map(function($){return ee.createElement("line",_v({},$,{key:"line-".concat($.x1,"-").concat($.x2,"-").concat($.y1,"-").concat($.y2)}))}))});return ee.createElement(qt,{className:"recharts-errorBars"},x)}}])})(ee.Component);pV(mm,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});pV(mm,"displayName","ErrorBar");function dp(e){"@babel/helpers - typeof";return dp=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},dp(e)}function c$(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 Cl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c$(Object(n),!0).forEach(function(r){Nxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nxe(e,t,n){return t=_xe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _xe(e){var t=Exe(e,"string");return dp(t)=="symbol"?t:t+""}function Exe(e,t){if(dp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gV=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,s=t.legendContent,o=Ni(n,lc);if(!o)return null;var l=lc.defaultProps,c=l!==void 0?Cl(Cl({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:s==="children"?u=(r||[]).reduce(function(d,f){var p=f.item,m=f.props,x=m.sectors||m.data||[];return d.concat(x.map(function(y){return{type:o.props.iconType||p.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):u=(r||[]).map(function(d){var f=d.item,p=f.type.defaultProps,m=p!==void 0?Cl(Cl({},p),f.props):{},x=m.dataKey,y=m.name,v=m.legendType,b=m.hide;return{inactive:b,dataKey:x,type:c.iconType||v||"square",color:FA(f),value:y||x,payload:m}}),Cl(Cl(Cl({},c),lc.getWithHeight(o,i)),{},{payload:u,item:o})};function fp(e){"@babel/helpers - typeof";return fp=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},fp(e)}function u$(e){return Axe(e)||Oxe(e)||kxe(e)||Pxe()}function Pxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 579In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kxe(e,t){if(e){if(typeof e=="string")return EP(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 EP(e,t)}}function Oxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Axe(e){if(Array.isArray(e))return EP(e)}function EP(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 d$(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 Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d$(Object(n),!0).forEach(function(r){Au(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Au(e,t,n){return t=Cxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cxe(e){var t=Txe(e,"string");return fp(t)=="symbol"?t:t+""}function Txe(e,t){if(fp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xn(e,t,n){return jt(e)||jt(t)?n:Zn(t)?Ci(e,t,n):yt(t)?t(e):n}function Th(e,t,n,r){var i=Cve(e,function(l){return Xn(l,t)});if(n==="number"){var s=i.filter(function(l){return Le(l)||parseFloat(l)});return s.length?[r0(s),n0(s)]:[1/0,-1/0]}var o=r?i.filter(function(l){return!jt(l)}):i;return o.map(function(l){return Zn(l)||l instanceof Date?l:""})}var Rxe=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,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var c=s.range,u=0;u<l;u++){var d=u>0?i[u-1].coordinate:i[l-1].coordinate,f=i[u].coordinate,p=u>=l-1?i[0].coordinate:i[u+1].coordinate,m=void 0;if(Wr(f-d)!==Wr(p-f)){var x=[];if(Wr(p-f)===Wr(c[1]-c[0])){m=p;var y=f+c[1]-c[0];x[0]=Math.min(y,(y+d)/2),x[1]=Math.max(y,(y+d)/2)}else{m=d;var v=p+c[1]-c[0];x[0]=Math.min(f,(v+f)/2),x[1]=Math.max(f,(v+f)/2)}var b=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(t>b[0]&&t<=b[1]||t>=x[0]&&t<=x[1]){o=i[u].index;break}}else{var w=Math.min(d,p),N=Math.max(d,p);if(t>(w+f)/2&&t<=(N+f)/2){o=i[u].index;break}}}else for(var S=0;S<l;S++)if(S===0&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S>0&&S<l-1&&t>(r[S].coordinate+r[S-1].coordinate)/2&&t<=(r[S].coordinate+r[S+1].coordinate)/2||S===l-1&&t>(r[S].coordinate+r[S-1].coordinate)/2){o=r[S].index;break}return o},FA=function(t){var n,r=t,i=r.type.displayName,s=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Sn(Sn({},t.type.defaultProps),t.props):t.props,o=s.stroke,l=s.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},Ixe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var o={},l=Object.keys(s),c=0,u=l.length;c<u;c++)for(var d=s[l[c]].stackGroups,f=Object.keys(d),p=0,m=f.length;p<m;p++){var x=d[f[p]],y=x.items,v=x.cateAxisId,b=y.filter(function(k){return Da(k.type).indexOf("Bar")>=0});if(b&&b.length){var w=b[0].type.defaultProps,N=w!==void 0?Sn(Sn({},w),b[0].props):b[0].props,S=N.barSize,_=N[v];o[_]||(o[_]=[]);var E=jt(S)?n:S;o[_].push({item:b[0],stackList:b.slice(1),barSize:jt(E)?void 0:Hr(E,r,0)})}}return o},Mxe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,s=t.sizeList,o=s===void 0?[]:s,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=Hr(n,i,0,!0),d,f=[];if(o[0].barSize===+o[0].barSize){var p=!1,m=i/c,x=o.reduce(function(S,_){return S+_.barSize||0},0);x+=(c-1)*u,x>=i&&(x-=(c-1)*u,u=0),x>=i&&m>0&&(p=!0,m*=.9,x=c*m);var y=(i-x)/2>>0,v={offset:y-u,size:0};d=o.reduce(function(S,_){var E={item:_.item,position:{offset:v.offset+v.size+u,size:p?m:_.barSize}},k=[].concat(u$(S),[E]);return v=k[k.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(O){k.push({item:O,position:v})}),k},f)}else{var b=Hr(r,i,0,!0);i-2*b-(c-1)*u<=0&&(u=0);var w=(i-2*b-(c-1)*u)/c;w>1&&(w>>=0);var N=l===+l?Math.min(w,l):w;d=o.reduce(function(S,_,E){var k=[].concat(u$(S),[{item:_.item,position:{offset:b+(w+u)*E+(w-N)/2,size:N}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(O){k.push({item:O,position:k[k.length-1].position})}),k},f)}return d},Dxe=function(t,n,r,i){var s=r.children,o=r.width,l=r.margin,c=o-(l.left||0)-(l.right||0),u=gV({children:s,legendWidth:c});if(u){var d=i||{},f=d.width,p=d.height,m=u.align,x=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&x==="middle")&&m!=="center"&&Le(t[m]))return Sn(Sn({},t),{},Au({},m,t[m]+(f||0)));if((y==="horizontal"||y==="vertical"&&m==="center")&&x!=="middle"&&Le(t[x]))return Sn(Sn({},t),{},Au({},x,t[x]+(p||0)))}return t},Lxe=function(t,n,r){return jt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},yV=function(t,n,r,i,s){var o=n.props.children,l=Ti(o,mm).filter(function(u){return Lxe(i,s,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=Xn(d,r);if(jt(f))return u;var p=Array.isArray(f)?[r0(f),n0(f)]:[f,f],m=c.reduce(function(x,y){var v=Xn(d,y,0),b=p[0]-Math.abs(Array.isArray(v)?v[0]:v),w=p[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(b,x[0]),Math.max(w,x[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},$xe=function(t,n,r,i,s){var o=n.map(function(l){return yV(t,l,r,s,i)}).filter(function(l){return!jt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},vV=function(t,n,r,i,s){var o=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&yV(t,c,u,i)||Th(t,u,r,s)});if(r==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)l[u[d]]||(l[u[d]]=!0,c.push(u[d]));return c},[])},xV=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},bV=function(t,n,r,i){if(i)return t.map(function(c){return c.coordinate});var s,o,l=t.map(function(c){return c.coordinate===n&&(s=!0),c.coordinate===r&&(o=!0),c.coordinate});return s||l.push(n),o||l.push(r),l},Ra=function(t,n,r){if(!t)return null;var i=t.scale,s=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Wr(l[0]-l[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var p=s?s.indexOf(f):f;return{coordinate:i(p)+u,value:f,offset:u}});return d.filter(function(f){return!om(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,p){return{coordinate:i(f)+u,value:f,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+u,value:f,offset:u}}):i.domain().map(function(f,p){return{coordinate:i(f)+u,value:s?s[f]:f,index:p,offset:u}})},AN=new WeakMap,Qg=function(t,n){if(typeof n!="function")return t;AN.has(t)||AN.set(t,new WeakMap);var r=AN.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},wV=function(t,n,r){var i=t.scale,s=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:ip(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:bv(),realScaleType:"linear"}:s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Ch(),realScaleType:"point"}:s==="category"?{scale:ip(),realScaleType:"band"}:{scale:bv(),realScaleType:"linear"};if(mc(i)){var c="scale".concat(zx(i));return{scale:(X3[c]||Ch)(),realScaleType:X3[c]?c:"point"}}return yt(i)?{scale:i}:{scale:Ch(),realScaleType:"point"}},f$=1e-4,jV=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])-f$,o=Math.max(i[0],i[1])+f$,l=t(n[0]),c=t(n[r-1]);(l<s||l>o||c<s||c>o)&&t.domain([n[0],n[r-1]])}},Bxe=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},Fxe=function(t,n){if(!n||n.length!==2||!Le(n[0])||!Le(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(!Le(t[0])||t[0]<r)&&(s[0]=r),(!Le(t[1])||t[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<r&&(s[1]=r),s},qxe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,o=0,l=0;l<n;++l){var c=om(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=s,t[l][r][1]=s+c,s=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1])}},zxe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var s=0,o=0;o<n;++o){var l=om(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]=0,t[o][r][1]=0)}},Uxe={sign:qxe,expand:Cfe,none:ed,silhouette:Tfe,wiggle:Rfe,positive:zxe},Vxe=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),s=Uxe[r],o=Afe().keys(i).value(function(l,c){return+Xn(l,c,0)}).order(nP).offset(s);return o(t)},Wxe=function(t,n,r,i,s,o){if(!t)return null;var l=o?n.reverse():n,c={},u=l.reduce(function(f,p){var m,x=(m=p.type)!==null&&m!==void 0&&m.defaultProps?Sn(Sn({},p.type.defaultProps),p.props):p.props,y=x.stackId,v=x.hide;if(v)return f;var b=x[r],w=f[b]||{hasStack:!1,stackGroups:{}};if(Zn(y)){var N=w.stackGroups[y]||{numericAxisId:r,cateAxisId:i,items:[]};N.items.push(p),w.hasStack=!0,w.stackGroups[y]=N}else w.stackGroups[zd("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Sn(Sn({},f),{},Au({},b,w))},c),d={};return Object.keys(u).reduce(function(f,p){var m=u[p];if(m.hasStack){var x={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(y,v){var b=m.stackGroups[v];return Sn(Sn({},y),{},Au({},v,{numericAxisId:r,cateAxisId:i,items:b.items,stackedData:Vxe(t,b.items,s)}))},x)}return Sn(Sn({},f),{},Au({},p,m))},d)},SV=function(t,n){var r=n.realScaleType,i=n.type,s=n.tickCount,o=n.originalDomain,l=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(s&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=sxe(u,s,l);return t.domain([r0(d),n0(d)]),{niceTicks:d}}if(s&&i==="number"){var f=t.domain(),p=axe(f,s,l);return{niceTicks:p}}return null};function h$(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,s=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!jt(i[t.dataKey])){var l=nv(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n[s]?n[s].coordinate+r/2:null}var c=Xn(i,jt(o)?t.dataKey:o);return jt(c)?null:t.scale(c)}var p$=function(t){var n=t.axis,r=t.ticks,i=t.offset,s=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var c=Xn(o,n.dataKey,n.domain[l]);return jt(c)?null:n.scale(c)-s/2+i},Hxe=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]},Gxe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Sn(Sn({},t.type.defaultProps),t.props):t.props,s=i.stackId;if(Zn(s)){var o=n[s];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},Kxe=function(t){return t.reduce(function(n,r){return[r0(r.concat([n[0]]).filter(Le)),n0(r.concat([n[1]]).filter(Le))]},[1/0,-1/0])},NV=function(t,n,r){return Object.keys(t).reduce(function(i,s){var o=t[s],l=o.stackedData,c=l.reduce(function(u,d){var f=Kxe(d.slice(n,r+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},m$=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,g$=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PP=function(t,n,r){if(yt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Le(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(m$.test(t[0])){var s=+m$.exec(t[0])[1];i[0]=n[0]-s}else yt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Le(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(g$.test(t[1])){var o=+g$.exec(t[1])[1];i[1]=n[1]+o}else yt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Pv=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=pA(n,function(f){return f.coordinate}),o=1/0,l=1,c=s.length;l<c;l++){var u=s[l],d=s[l-1];o=Math.min((u.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},y$=function(t,n,r){return!t||!t.length||pm(t,Ci(r,"type.defaultProps.domain"))?n:t},_V=function(t,n){var r=t.type.defaultProps?Sn(Sn({},t.type.defaultProps),t.props):t.props,i=r.dataKey,s=r.name,o=r.unit,l=r.formatter,c=r.tooltipType,u=r.chartType,d=r.hide;return Sn(Sn({},ct(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:s||i,color:FA(t),value:Xn(n,i),type:c,payload:n,chartType:u,hide:d})};function hp(e){"@babel/helpers - typeof";return hp=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},hp(e)}function v$(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 _a(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v$(Object(n),!0).forEach(function(r){EV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EV(e,t,n){return t=Yxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yxe(e){var t=Xxe(e,"string");return hp(t)=="symbol"?t:t+""}function Xxe(e,t){if(hp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qxe(e,t){return t0e(e)||e0e(e,t)||Jxe(e,t)||Zxe()}function Zxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 580In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jxe(e,t){if(e){if(typeof e=="string")return x$(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 x$(e,t)}}function x$(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 e0e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function t0e(e){if(Array.isArray(e))return e}var kv=Math.PI/180,n0e=function(t){return t*180/Math.PI},on=function(t,n,r,i){return{x:t+Math.cos(-kv*i)*r,y:n+Math.sin(-kv*i)*r}},PV=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},r0e=function(t,n,r,i,s){var o=t.width,l=t.height,c=t.startAngle,u=t.endAngle,d=Hr(t.cx,o,o/2),f=Hr(t.cy,l,l/2),p=PV(o,l,r),m=Hr(t.innerRadius,p,0),x=Hr(t.outerRadius,p,p*.8),y=Object.keys(n);return y.reduce(function(v,b){var w=n[b],N=w.domain,S=w.reversed,_;if(jt(w.range))i==="angleAxis"?_=[c,u]:i==="radiusAxis"&&(_=[m,x]),S&&(_=[_[1],_[0]]);else{_=w.range;var E=_,k=Qxe(E,2);c=k[0],u=k[1]}var O=wV(w,s),I=O.realScaleType,A=O.scale;A.domain(N).range(_),jV(A);var C=SV(A,_a(_a({},w),{},{realScaleType:I})),R=_a(_a(_a({},w),C),{},{range:_,radius:x,realScaleType:I,scale:A,cx:d,cy:f,innerRadius:m,outerRadius:x,startAngle:c,endAngle:u});return _a(_a({},v),{},EV({},b,R))},{})},i0e=function(t,n){var r=t.x,i=t.y,s=n.x,o=n.y;return Math.sqrt(Math.pow(r-s,2)+Math.pow(i-o,2))},s0e=function(t,n){var r=t.x,i=t.y,s=n.cx,o=n.cy,l=i0e({x:r,y:i},{x:s,y:o});if(l<=0)return{radius:l};var c=(r-s)/l,u=Math.acos(c);return i>o&&(u=2*Math.PI-u),{radius:l,angle:n0e(u),angleInRadian:u}},a0e=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),s=Math.floor(r/360),o=Math.min(i,s);return{startAngle:n-o*360,endAngle:r-o*360}},o0e=function(t,n){var r=n.startAngle,i=n.endAngle,s=Math.floor(r/360),o=Math.floor(i/360),l=Math.min(s,o);return t+l*360},b$=function(t,n){var r=t.x,i=t.y,s=s0e({x:r,y:i},n),o=s.radius,l=s.angle,c=n.innerRadius,u=n.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var d=a0e(n),f=d.startAngle,p=d.endAngle,m=l,x;if(f<=p){for(;m>p;)m-=360;for(;m<f;)m+=360;x=m>=f&&m<=p}else{for(;m>f;)m-=360;for(;m<p;)m+=360;x=m>=p&&m<=f}return x?_a(_a({},n),{},{radius:o,angle:o0e(m,n)}):null},kV=function(t){return!T.isValidElement(t)&&!yt(t)&&typeof t!="boolean"?t.className:""};function pp(e){"@babel/helpers - typeof";return pp=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},pp(e)}var l0e=["offset"];function c0e(e){return h0e(e)||f0e(e)||d0e(e)||u0e()}function u0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 581In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d0e(e,t){if(e){if(typeof e=="string")return kP(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 kP(e,t)}}function f0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function h0e(e){if(Array.isArray(e))return kP(e)}function kP(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 p0e(e,t){if(e==null)return{};var n=m0e(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 m0e(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 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 Kn(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){g0e(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 g0e(e,t,n){return t=y0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y0e(e){var t=v0e(e,"string");return pp(t)=="symbol"?t:t+""}function v0e(e,t){if(pp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mp(){return mp=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},mp.apply(this,arguments)}var x0e=function(t){var n=t.value,r=t.formatter,i=jt(t.children)?n:t.children;return yt(r)?r(i):i},b0e=function(t,n){var r=Wr(n-t),i=Math.min(Math.abs(n-t),360);return r*i},w0e=function(t,n,r){var i=t.position,s=t.viewBox,o=t.offset,l=t.className,c=s,u=c.cx,d=c.cy,f=c.innerRadius,p=c.outerRadius,m=c.startAngle,x=c.endAngle,y=c.clockWise,v=(f+p)/2,b=b0e(m,x),w=b>=0?1:-1,N,S;i==="insideStart"?(N=m+w*o,S=y):i==="insideEnd"?(N=x-w*o,S=!y):i==="end"&&(N=x+w*o,S=y),S=b<=0?S:!S;var _=on(u,d,v,N),E=on(u,d,v,N+(S?1:-1)*359),k="M".concat(_.x,",").concat(_.y,` 582 A`).concat(v,",").concat(v,",0,1,").concat(S?0:1,`, 583 `).concat(E.x,",").concat(E.y),O=jt(t.id)?zd("recharts-radial-line-"):t.id;return ee.createElement("text",mp({},r,{dominantBaseline:"central",className:St("recharts-radial-bar-label",l)}),ee.createElement("defs",null,ee.createElement("path",{id:O,d:k})),ee.createElement("textPath",{xlinkHref:"#".concat(O)},n))},j0e=function(t){var n=t.viewBox,r=t.offset,i=t.position,s=n,o=s.cx,l=s.cy,c=s.innerRadius,u=s.outerRadius,d=s.startAngle,f=s.endAngle,p=(d+f)/2;if(i==="outside"){var m=on(o,l,u+r,p),x=m.x,y=m.y;return{x,y,textAnchor:x>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var v=(c+u)/2,b=on(o,l,v,p),w=b.x,N=b.y;return{x:w,y:N,textAnchor:"middle",verticalAnchor:"middle"}},S0e=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,s=t.position,o=n,l=o.x,c=o.y,u=o.width,d=o.height,f=d>=0?1:-1,p=f*i,m=f>0?"end":"start",x=f>0?"start":"end",y=u>=0?1:-1,v=y*i,b=y>0?"end":"start",w=y>0?"start":"end";if(s==="top"){var N={x:l+u/2,y:c-f*i,textAnchor:"middle",verticalAnchor:m};return Kn(Kn({},N),r?{height:Math.max(c-r.y,0),width:u}:{})}if(s==="bottom"){var S={x:l+u/2,y:c+d+p,textAnchor:"middle",verticalAnchor:x};return Kn(Kn({},S),r?{height:Math.max(r.y+r.height-(c+d),0),width:u}:{})}if(s==="left"){var _={x:l-v,y:c+d/2,textAnchor:b,verticalAnchor:"middle"};return Kn(Kn({},_),r?{width:Math.max(_.x-r.x,0),height:d}:{})}if(s==="right"){var E={x:l+u+v,y:c+d/2,textAnchor:w,verticalAnchor:"middle"};return Kn(Kn({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:d}:{})}var k=r?{width:u,height:d}:{};return s==="insideLeft"?Kn({x:l+v,y:c+d/2,textAnchor:w,verticalAnchor:"middle"},k):s==="insideRight"?Kn({x:l+u-v,y:c+d/2,textAnchor:b,verticalAnchor:"middle"},k):s==="insideTop"?Kn({x:l+u/2,y:c+p,textAnchor:"middle",verticalAnchor:x},k):s==="insideBottom"?Kn({x:l+u/2,y:c+d-p,textAnchor:"middle",verticalAnchor:m},k):s==="insideTopLeft"?Kn({x:l+v,y:c+p,textAnchor:w,verticalAnchor:x},k):s==="insideTopRight"?Kn({x:l+u-v,y:c+p,textAnchor:b,verticalAnchor:x},k):s==="insideBottomLeft"?Kn({x:l+v,y:c+d-p,textAnchor:w,verticalAnchor:m},k):s==="insideBottomRight"?Kn({x:l+u-v,y:c+d-p,textAnchor:b,verticalAnchor:m},k):qd(s)&&(Le(s.x)||Hl(s.x))&&(Le(s.y)||Hl(s.y))?Kn({x:l+Hr(s.x,u),y:c+Hr(s.y,d),textAnchor:"end",verticalAnchor:"end"},k):Kn({x:l+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},k)},N0e=function(t){return"cx"in t&&Le(t.cx)};function ar(e){var t=e.offset,n=t===void 0?5:t,r=p0e(e,l0e),i=Kn({offset:n},r),s=i.viewBox,o=i.position,l=i.value,c=i.children,u=i.content,d=i.className,f=d===void 0?"":d,p=i.textBreakAll;if(!s||jt(l)&&jt(c)&&!T.isValidElement(u)&&!yt(u))return null;if(T.isValidElement(u))return T.cloneElement(u,i);var m;if(yt(u)){if(m=T.createElement(u,i),T.isValidElement(m))return m}else m=x0e(i);var x=N0e(s),y=ct(i,!0);if(x&&(o==="insideStart"||o==="insideEnd"||o==="end"))return w0e(i,m,y);var v=x?j0e(i):S0e(i);return ee.createElement(yc,mp({className:St("recharts-label",f)},y,v,{breakAll:p}),m)}ar.displayName="Label";var OV=function(t){var n=t.cx,r=t.cy,i=t.angle,s=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,p=t.y,m=t.top,x=t.left,y=t.width,v=t.height,b=t.clockWise,w=t.labelViewBox;if(w)return w;if(Le(y)&&Le(v)){if(Le(f)&&Le(p))return{x:f,y:p,width:y,height:v};if(Le(m)&&Le(x))return{x:m,y:x,width:y,height:v}}return Le(f)&&Le(p)?{x:f,y:p,width:0,height:0}:Le(n)&&Le(r)?{cx:n,cy:r,startAngle:s||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:d||c||l||0,clockWise:b}:t.viewBox?t.viewBox:{}},_0e=function(t,n){return t?t===!0?ee.createElement(ar,{key:"label-implicit",viewBox:n}):Zn(t)?ee.createElement(ar,{key:"label-implicit",viewBox:n,value:t}):T.isValidElement(t)?t.type===ar?T.cloneElement(t,{key:"label-implicit",viewBox:n}):ee.createElement(ar,{key:"label-implicit",content:t,viewBox:n}):yt(t)?ee.createElement(ar,{key:"label-implicit",content:t,viewBox:n}):qd(t)?ee.createElement(ar,mp({viewBox:n},t,{key:"label-implicit"})):null:null},E0e=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=OV(t),o=Ti(i,ar).map(function(c,u){return T.cloneElement(c,{viewBox:n||s,key:"label-".concat(u)})});if(!r)return o;var l=_0e(t.label,n||s);return[l].concat(c0e(o))};ar.parseViewBox=OV;ar.renderCallByParent=E0e;var CN,j$;function P0e(){if(j$)return CN;j$=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return CN=e,CN}var k0e=P0e();const O0e=Lt(k0e);function gp(e){"@babel/helpers - typeof";return gp=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},gp(e)}var A0e=["valueAccessor"],C0e=["data","dataKey","clockWise","id","textBreakAll"];function T0e(e){return D0e(e)||M0e(e)||I0e(e)||R0e()}function R0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 584In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I0e(e,t){if(e){if(typeof e=="string")return OP(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 OP(e,t)}}function M0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function D0e(e){if(Array.isArray(e))return OP(e)}function OP(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 Ov(){return Ov=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},Ov.apply(this,arguments)}function S$(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 N$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(n),!0).forEach(function(r){L0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L0e(e,t,n){return t=$0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $0e(e){var t=B0e(e,"string");return gp(t)=="symbol"?t:t+""}function B0e(e,t){if(gp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _$(e,t){if(e==null)return{};var n=F0e(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 F0e(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 q0e=function(t){return Array.isArray(t.value)?O0e(t.value):t.value};function $a(e){var t=e.valueAccessor,n=t===void 0?q0e:t,r=_$(e,A0e),i=r.data,s=r.dataKey,o=r.clockWise,l=r.id,c=r.textBreakAll,u=_$(r,C0e);return!i||!i.length?null:ee.createElement(qt,{className:"recharts-label-list"},i.map(function(d,f){var p=jt(s)?n(d,f):Xn(d&&d.payload,s),m=jt(l)?{}:{id:"".concat(l,"-").concat(f)};return ee.createElement(ar,Ov({},ct(d,!0),u,m,{parentViewBox:d.parentViewBox,value:p,textBreakAll:c,viewBox:ar.parseViewBox(jt(o)?d:N$(N$({},d),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}$a.displayName="LabelList";function z0e(e,t){return e?e===!0?ee.createElement($a,{key:"labelList-implicit",data:t}):ee.isValidElement(e)||yt(e)?ee.createElement($a,{key:"labelList-implicit",data:t,content:e}):qd(e)?ee.createElement($a,Ov({data:t},e,{key:"labelList-implicit"})):null:null}function U0e(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=Ti(r,$a).map(function(o,l){return T.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var s=z0e(e.label,t);return[s].concat(T0e(i))}$a.renderCallByParent=U0e;function yp(e){"@babel/helpers - typeof";return yp=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},yp(e)}function AP(){return AP=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},AP.apply(this,arguments)}function E$(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 P$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E$(Object(n),!0).forEach(function(r){V0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V0e(e,t,n){return t=W0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W0e(e){var t=H0e(e,"string");return yp(t)=="symbol"?t:t+""}function H0e(e,t){if(yp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var G0e=function(t,n){var r=Wr(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Zg=function(t){var n=t.cx,r=t.cy,i=t.radius,s=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(l?1:-1)+i,f=Math.asin(c/d)/kv,p=u?s:s+o*f,m=on(n,r,d,p),x=on(n,r,i,p),y=u?s-o*f:s,v=on(n,r,d*Math.cos(f*kv),y);return{center:m,circleTangency:x,lineTangency:v,theta:f}},AV=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,o=t.startAngle,l=t.endAngle,c=G0e(o,l),u=o+c,d=on(n,r,s,o),f=on(n,r,s,u),p="M ".concat(d.x,",").concat(d.y,` 585 A `).concat(s,",").concat(s,`,0, 586 `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`, 587 `).concat(f.x,",").concat(f.y,` 588 `);if(i>0){var m=on(n,r,i,o),x=on(n,r,i,u);p+="L ".concat(x.x,",").concat(x.y,` 589 A `).concat(i,",").concat(i,`,0, 590 `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`, 591 `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},K0e=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,s=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=Wr(d-u),p=Zg({cx:n,cy:r,radius:s,angle:u,sign:f,cornerRadius:o,cornerIsExternal:c}),m=p.circleTangency,x=p.lineTangency,y=p.theta,v=Zg({cx:n,cy:r,radius:s,angle:d,sign:-f,cornerRadius:o,cornerIsExternal:c}),b=v.circleTangency,w=v.lineTangency,N=v.theta,S=c?Math.abs(u-d):Math.abs(u-d)-y-N;if(S<0)return l?"M ".concat(x.x,",").concat(x.y,` 592 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 593 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 594 `):AV({cx:n,cy:r,innerRadius:i,outerRadius:s,startAngle:u,endAngle:d});var _="M ".concat(x.x,",").concat(x.y,` 595 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(m.x,",").concat(m.y,` 596 A`).concat(s,",").concat(s,",0,").concat(+(S>180),",").concat(+(f<0),",").concat(b.x,",").concat(b.y,` 597 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(w.x,",").concat(w.y,` 598 `);if(i>0){var E=Zg({cx:n,cy:r,radius:i,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),k=E.circleTangency,O=E.lineTangency,I=E.theta,A=Zg({cx:n,cy:r,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),C=A.circleTangency,R=A.lineTangency,D=A.theta,q=c?Math.abs(u-d):Math.abs(u-d)-I-D;if(q<0&&o===0)return"".concat(_,"L").concat(n,",").concat(r,"Z");_+="L".concat(R.x,",").concat(R.y,` 599 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,` 600 A`).concat(i,",").concat(i,",0,").concat(+(q>180),",").concat(+(f>0),",").concat(k.x,",").concat(k.y,` 601 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,"Z")}else _+="L".concat(n,",").concat(r,"Z");return _},Y0e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},CV=function(t){var n=P$(P$({},Y0e),t),r=n.cx,i=n.cy,s=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,p=n.className;if(o<s||d===f)return null;var m=St("recharts-sector",p),x=o-s,y=Hr(l,x,0,!0),v;return y>0&&Math.abs(d-f)<360?v=K0e({cx:r,cy:i,innerRadius:s,outerRadius:o,cornerRadius:Math.min(y,x/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):v=AV({cx:r,cy:i,innerRadius:s,outerRadius:o,startAngle:d,endAngle:f}),ee.createElement("path",AP({},ct(n,!0),{className:m,d:v,role:"img"}))};function vp(e){"@babel/helpers - typeof";return vp=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},vp(e)}function CP(){return CP=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},CP.apply(this,arguments)}function k$(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 O$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k$(Object(n),!0).forEach(function(r){X0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X0e(e,t,n){return t=Q0e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q0e(e){var t=Z0e(e,"string");return vp(t)=="symbol"?t:t+""}function Z0e(e,t){if(vp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var A$={curveBasisClosed:xfe,curveBasisOpen:bfe,curveBasis:vfe,curveBumpX:ife,curveBumpY:sfe,curveLinearClosed:wfe,curveLinear:Vx,curveMonotoneX:jfe,curveMonotoneY:Sfe,curveNatural:Nfe,curveStep:_fe,curveStepAfter:Pfe,curveStepBefore:Efe},Jg=function(t){return t.x===+t.x&&t.y===+t.y},Qf=function(t){return t.x},Zf=function(t){return t.y},J0e=function(t,n){if(yt(t))return t;var r="curve".concat(zx(t));return(r==="curveMonotone"||r==="curveBump")&&n?A$["".concat(r).concat(n==="vertical"?"Y":"X")]:A$[r]||Vx},ebe=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,s=i===void 0?[]:i,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=J0e(r,l),f=u?s.filter(function(y){return Jg(y)}):s,p;if(Array.isArray(o)){var m=u?o.filter(function(y){return Jg(y)}):o,x=f.map(function(y,v){return O$(O$({},y),{},{base:m[v]})});return l==="vertical"?p=Vg().y(Zf).x1(Qf).x0(function(y){return y.base.x}):p=Vg().x(Qf).y1(Zf).y0(function(y){return y.base.y}),p.defined(Jg).curve(d),p(x)}return l==="vertical"&&Le(o)?p=Vg().y(Zf).x1(Qf).x0(o):Le(o)?p=Vg().x(Qf).y1(Zf).y0(o):p=kU().x(Qf).y(Zf),p.defined(Jg).curve(d),p(f)},Av=function(t){var n=t.className,r=t.points,i=t.path,s=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?ebe(t):i;return T.createElement("path",CP({},ct(t,!1),rv(t),{className:St("recharts-curve",n),d:o,ref:s}))},TN={exports:{}},RN,C$;function tbe(){if(C$)return RN;C$=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return RN=e,RN}var IN,T$;function nbe(){if(T$)return IN;T$=1;var e=tbe();function t(){}function n(){}return n.resetWarningCache=t,IN=function(){function r(o,l,c,u,d,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},IN}var R$;function rbe(){return R$||(R$=1,TN.exports=nbe()()),TN.exports}var ibe=rbe();const Wt=Lt(ibe);var sbe=Object.getOwnPropertyNames,abe=Object.getOwnPropertySymbols,obe=Object.prototype.hasOwnProperty;function I$(e,t){return function(r,i,s){return e(r,i,s)&&t(r,i,s)}}function ey(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var s=i.cache,o=s.get(n),l=s.get(r);if(o&&l)return o===r&&l===n;s.set(n,r),s.set(r,n);var c=e(n,r,i);return s.delete(n),s.delete(r),c}}function M$(e){return sbe(e).concat(abe(e))}var lbe=Object.hasOwn||(function(e,t){return obe.call(e,t)});function Ic(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var cbe="__v",ube="__o",dbe="_owner",D$=Object.getOwnPropertyDescriptor,L$=Object.keys;function fbe(e,t,n){var 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 hbe(e,t){return Ic(e.getTime(),t.getTime())}function pbe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function mbe(e,t){return e===t}function $$(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),s=e.entries(),o,l,c=0;(o=s.next())&&!o.done;){for(var u=t.entries(),d=!1,f=0;(l=u.next())&&!l.done;){if(i[f]){f++;continue}var p=o.value,m=l.value;if(n.equals(p[0],m[0],c,f,e,t,n)&&n.equals(p[1],m[1],p[0],m[0],e,t,n)){d=i[f]=!0;break}f++}if(!d)return!1;c++}return!0}var gbe=Ic;function ybe(e,t,n){var r=L$(e),i=r.length;if(L$(t).length!==i)return!1;for(;i-- >0;)if(!TV(e,t,n,r[i]))return!1;return!0}function Jf(e,t,n){var r=M$(e),i=r.length;if(M$(t).length!==i)return!1;for(var s,o,l;i-- >0;)if(s=r[i],!TV(e,t,n,s)||(o=D$(e,s),l=D$(t,s),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function vbe(e,t){return Ic(e.valueOf(),t.valueOf())}function xbe(e,t){return e.source===t.source&&e.flags===t.flags}function B$(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),s=e.values(),o,l;(o=s.next())&&!o.done;){for(var c=t.values(),u=!1,d=0;(l=c.next())&&!l.done;){if(!i[d]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){u=i[d]=!0;break}d++}if(!u)return!1}return!0}function bbe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function wbe(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 TV(e,t,n,r){return(r===dbe||r===ube||r===cbe)&&(e.$$typeof||t.$$typeof)?!0:lbe
601(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var jbe="[object Arguments]",Sbe="[object Boolean]",Nbe="[object Date]",_be="[object Error]",Ebe="[object Map]",Pbe="[object Number]",kbe="[object Object]",Obe="[object RegExp]",Abe="[object Set]",Cbe="[object String]",Tbe="[object URL]",Rbe=Array.isArray,F$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,q$=Object.assign,Ibe=Object.prototype.toString.call.bind(Object.prototype.toString);function Mbe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,s=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,p=e.areUrlsEqual;return function(x,y,v){if(x===y)return!0;if(x==null||y==null)return!1;var b=typeof x;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(x,y,v):b==="function"?i(x,y,v):!1;var w=x.constructor;if(w!==y.constructor)return!1;if(w===Object)return l(x,y,v);if(Rbe(x))return t(x,y,v);if(F$!=null&&F$(x))return f(x,y,v);if(w===Date)return n(x,y,v);if(w===RegExp)return u(x,y,v);if(w===Map)return s(x,y,v);if(w===Set)return d(x,y,v);var N=Ibe(x);return N===Nbe?n(x,y,v):N===Obe?u(x,y,v):N===Ebe?s(x,y,v):N===Abe?d(x,y,v):N===kbe?typeof x.then!="function"&&typeof y.then!="function"&&l(x,y,v):N===Tbe?p(x,y,v):N===_be?r(x,y,v):N===jbe?l(x,y,v):N===Sbe||N===Pbe||N===Cbe?c(x,y,v):!1}}function Dbe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Jf:fbe,areDatesEqual:hbe,areErrorsEqual:pbe,areFunctionsEqual:mbe,areMapsEqual:r?I$($$,Jf):$$,areNumbersEqual:gbe,areObjectsEqual:r?Jf:ybe,arePrimitiveWrappersEqual:vbe,areRegExpsEqual:xbe,areSetsEqual:r?I$(B$,Jf):B$,areTypedArraysEqual:r?Jf:bbe,areUrlsEqual:wbe};if(n&&(i=q$({},i,n(i))),t){var s=ey(i.areArraysEqual),o=ey(i.areMapsEqual),l=ey(i.areObjectsEqual),c=ey(i.areSetsEqual);i=q$({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return i}function Lbe(e){return function(t,n,r,i,s,o,l){return e(t,n,l)}}function $be(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,s=e.strict;if(r)return function(c,u){var d=r(),f=d.cache,p=f===void 0?t?new WeakMap:void 0:f,m=d.meta;return n(c,u,{cache:p,equals:i,meta:m,strict:s})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var o={cache:void 0,equals:i,meta:void 0,strict:s};return function(c,u){return n(c,u,o)}}var Bbe=ll();ll({strict:!0});ll({circular:!0});ll({circular:!0,strict:!0});ll({createInternalComparator:function(){return Ic}});ll({strict:!0,createInternalComparator:function(){return Ic}});ll({circular:!0,createInternalComparator:function(){return Ic}});ll({circular:!0,createInternalComparator:function(){return Ic},strict:!0});function ll(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,s=e.strict,o=s===void 0?!1:s,l=Dbe(e),c=Mbe(l),u=r?r(c):Lbe(c);return $be({circular:n,comparator:c,createState:i,equals:u,strict:o})}function Fbe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function z$(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):Fbe(i)};requestAnimationFrame(r)}function TP(e){"@babel/helpers - typeof";return TP=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},TP(e)}function qbe(e){return Wbe(e)||Vbe(e)||Ube(e)||zbe()}function zbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 602In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ube(e,t){if(e){if(typeof e=="string")return U$(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 U$(e,t)}}function U$(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 Vbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wbe(e){if(Array.isArray(e))return e}function Hbe(){var e={},t=function(){return null}
vendor: 60,012 bytes, lines 602-620
602,n=!1,r=function i(s){if(!n){if(Array.isArray(s)){if(!s.length)return;var o=s,l=qbe(o),c=l[0],u=l.slice(1);if(typeof c=="number"){z$(i.bind(null,u),c);return}i(c),z$(i.bind(null,u));return}TP(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 xp(e){"@babel/helpers - typeof";return xp=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},xp(e)}function V$(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 W$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V$(Object(n),!0).forEach(function(r){RV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RV(e,t,n){return t=Gbe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gbe(e){var t=Kbe(e,"string");return xp(t)==="symbol"?t:String(t)}function Kbe(e,t){if(xp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ybe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(s){return i.includes(s)})})},Xbe=function(t){return t},Qbe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Rh=function(t,n){return Object.keys(n).reduce(function(r,i){return W$(W$({},r),{},RV({},i,t(i,n[i])))},{})},H$=function(t,n,r){return t.map(function(i){return"".concat(Qbe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Zbe(e,t){return twe(e)||ewe(e,t)||IV(e,t)||Jbe()}function Jbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 603In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ewe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function twe(e){if(Array.isArray(e))return e}function nwe(e){return swe(e)||iwe(e)||IV(e)||rwe()}function rwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 604In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IV(e,t){if(e){if(typeof e=="string")return RP(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 RP(e,t)}}function iwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function swe(e){if(Array.isArray(e))return RP(e)}function RP(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 Cv=1e-4,MV=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},DV=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},G$=function(t,n){return function(r){var i=MV(t,n);return DV(i,r)}},awe=function(t,n){return function(r){var i=MV(t,n),s=[].concat(nwe(i.map(function(o,l){return o*l}).slice(1)),[0]);return DV(s,r)}},K$=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],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,s=0,o=1,l=1;break;case"ease":i=.25,s=.1,o=.25,l=1;break;case"ease-in":i=.42,s=0,o=1,l=1;break;case"ease-out":i=.42,s=0,o=.58,l=1;break;case"ease-in-out":i=0,s=0,o=.58,l=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),d=Zbe(u,4);i=d[0],s=d[1],o=d[2],l=d[3]}}}var f=G$(i,o),p=G$(s,l),m=awe(i,o),x=function(b){return b>1?1:b<0?0:b},y=function(b){for(var w=b>1?1:b,N=w,S=0;S<8;++S){var _=f(N)-w,E=m(N);if(Math.abs(_-w)<Cv||E<Cv)return p(N);N=x(N-_/E)}return p(N)};return y.isStepper=!1,y},owe=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,o=t.dt,l=o===void 0?17:o,c=function(d,f,p){var m=-(d-f)*r,x=p*s,y=p+(m-x)*l/1e3,v=p*l/1e3+d;return Math.abs(v-f)<Cv&&Math.abs(y)<Cv?[f,0]:[v,y]};return c.isStepper=!0,c.dt=l,c},lwe=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 K$(i);case"spring":return owe();default:if(i.split("(")[0]==="cubic-bezier")return K$(i)}return typeof i=="function"?i:null};function bp(e){"@babel/helpers - typeof";return bp=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},bp(e)}function Y$(e){return dwe(e)||uwe(e)||LV(e)||cwe()}function cwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 605In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dwe(e){if(Array.isArray(e))return MP(e)}function X$(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 yr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X$(Object(n),!0).forEach(function(r){IP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IP(e,t,n){return t=fwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fwe(e){var t=hwe(e,"string");return bp(t)==="symbol"?t:String(t)}function hwe(e,t){if(bp(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bp(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pwe(e,t){return ywe(e)||gwe(e,t)||LV(e,t)||mwe()}function mwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 606In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LV(e,t){if(e){if(typeof e=="string")return MP(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 MP(e,t)}}function MP(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 gwe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function ywe(e){if(Array.isArray(e))return e}var Tv=function(t,n,r){return t+(n-t)*r},DP=function(t){var n=t.from,r=t.to;return n!==r},vwe=function e(t,n,r){var i=Rh(function(s,o){if(DP(o)){var l=t(o.from,o.to,o.velocity),c=pwe(l,2),u=c[0],d=c[1];return yr(yr({},o),{},{from:u,velocity:d})}return o},n);return r<1?Rh(function(s,o){return DP(o)?yr(yr({},o),{},{velocity:Tv(o.velocity,i[s].velocity,r),from:Tv(o.from,i[s].from,r)}):o},n):e(t,i,r-1)};const xwe=(function(e,t,n,r,i){var s=Ybe(e,t),o=s.reduce(function(v,b){return yr(yr({},v),{},IP({},b,[e[b],t[b]]))},{}),l=s.reduce(function(v,b){return yr(yr({},v),{},IP({},b,{from:e[b],velocity:0,to:t[b]}))},{}),c=-1,u,d,f=function(){return null},p=function(){return Rh(function(b,w){return w.from},l)},m=function(){return!Object.values(l).filter(DP).length},x=function(b){u||(u=b);var w=b-u,N=w/n.dt;l=vwe(n,l,N),i(yr(yr(yr({},e),t),p())),u=b,m()||(c=requestAnimationFrame(f))},y=function(b){d||(d=b);var w=(b-d)/r,N=Rh(function(_,E){return Tv.apply(void 0,Y$(E).concat([n(w)]))},o);if(i(yr(yr(yr({},e),t),N)),w<1)c=requestAnimationFrame(f);else{var S=Rh(function(_,E){return Tv.apply(void 0,Y$(E).concat([n(1)]))},o);i(yr(yr(yr({},e),t),S))}};return f=n.isStepper?x:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function cd(e){"@babel/helpers - typeof";return cd=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},cd(e)}var bwe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function wwe(e,t){if(e==null)return{};var n=jwe(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 jwe(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 MN(e){return Ewe(e)||_we(e)||Nwe(e)||Swe()}function Swe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 607In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nwe(e,t){if(e){if(typeof e=="string")return LP(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 LP(e,t)}}function _we(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ewe(e){if(Array.isArray(e))return LP(e)}function LP(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 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 vs(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){bh(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 bh(e,t,n){return t=$V(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kwe(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,$V(r.key),r)}}function Owe(e,t,n){return t&&kwe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $V(e){var t=Awe(e,"string");return cd(t)==="symbol"?t:String(t)}function Awe(e,t){if(cd(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cd(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(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&&$P(e,t)}function $P(e,t){return $P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$P(e,t)}function Twe(e){var t=Rwe();return function(){var r=Rv(e),i;if(t){var s=Rv(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return BP(this,i)}}function BP(e,t){if(t&&(cd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FP(e)}function FP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rwe(){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 Rv(e){return Rv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rv(e)}var oa=(function(e){Cwe(n,e);var t=Twe(n);function n(r,i){var s;Pwe(this,n),s=t.call(this,r,i);var o=s.props,l=o.isActive,c=o.attributeName,u=o.from,d=o.to,f=o.steps,p=o.children,m=o.duration;if(s.handleStyleChange=s.handleStyleChange.bind(FP(s)),s.changeStyle=s.changeStyle.bind(FP(s)),!l||m<=0)return s.state={style:{}},typeof p=="function"&&(s.state={style:d}),BP(s);if(f&&f.length)s.state={style:f[0].style};else if(u){if(typeof p=="function")return s.state={style:u},BP(s);s.state={style:c?bh({},c,u):u}}else s.state={style:{}};return s}return Owe(n,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,o=i.canBegin;this.mounted=!0,!(!s||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isActive,l=s.canBegin,c=s.attributeName,u=s.shouldReAnimate,d=s.to,f=s.from,p=this.state.style;if(l){if(!o){var m={style:c?bh({},c,d):d};this.state&&p&&(c&&p[c]!==d||!c&&p!==d)&&this.setState(m);return}if(!(Bbe(i.to,d)&&i.canBegin&&i.isActive)){var x=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=x||u?f:i.to;if(this.state&&p){var v={style:c?bh({},c,y):y};(c&&p[c]!==y||!c&&p!==y)&&this.setState(v)}this.runAnimation(vs(vs({},this.props),{},{from:y,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,o=i.from,l=i.to,c=i.duration,u=i.easing,d=i.begin,f=i.onAnimationEnd,p=i.onAnimationStart,m=xwe(o,l,lwe(u),c,this.changeStyle),x=function(){s.stopJSAnimation=m()};this.manager.start([p,d,x,c,f])}},{key:"runStepAnimation",value:function(i){var s=this,o=i.steps,l=i.begin,c=i.onAnimationStart,u=o[0],d=u.style,f=u.duration,p=f===void 0?0:f,m=function(y,v,b){if(b===0)return y;var w=v.duration,N=v.easing,S=N===void 0?"ease":N,_=v.style,E=v.properties,k=v.onAnimationEnd,O=b>0?o[b-1]:v,I=E||Object.keys(_);if(typeof S=="function"||S==="spring")return[].concat(MN(y),[s.runJSAnimation.bind(s,{from:O.style,to:_,duration:w,easing:S}),w]);var A=H$(I,w,S),C=vs(vs(vs({},O.style),_),{},{transition:A});return[].concat(MN(y),[C,w,k]).filter(Xbe)};return this.manager.start([c].concat(MN(o.reduce(m,[d,Math.max(p,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Hbe());var s=i.begin,o=i.duration,l=i.attributeName,c=i.to,u=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,p=i.steps,m=i.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var y=l?bh({},l,c):c,v=H$(Object.keys(y),o,u);x.start([d,s,vs(vs({},y),{},{transition:v}),o,f])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=wwe(i,bwe),u=T.Children.count(s),d=this.state.style;if(typeof s=="function")return s(d);if(!l||u===0||o<=0)return s;var f=function(m){var x=m.props,y=x.style,v=y===void 0?{}:y,b=x.className,w=T.cloneElement(m,vs(vs({},c),{},{style:vs(vs({},v),d),className:b}));return w};return u===1?f(T.Children.only(s)):ee.createElement("div",null,T.Children.map(s,function(p){return f(p)}))}}]),n})(T.PureComponent);oa.displayName="Animate";oa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};oa.propTypes={from:Wt.oneOfType([Wt.object,Wt.string]),to:Wt.oneOfType([Wt.object,Wt.string]),attributeName:Wt.string,duration:Wt.number,begin:Wt.number,easing:Wt.oneOfType([Wt.string,Wt.func]),steps:Wt.arrayOf(Wt.shape({duration:Wt.number.isRequired,style:Wt.object.isRequired,easing:Wt.oneOfType([Wt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Wt.func]),properties:Wt.arrayOf("string"),onAnimationEnd:Wt.func})),children:Wt.oneOfType([Wt.node,Wt.func]),isActive:Wt.bool,canBegin:Wt.bool,onAnimationEnd:Wt.func,shouldReAnimate:Wt.bool,onAnimationStart:Wt.func,onAnimationReStart:Wt.func};function Iv(){return Iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iv.apply(null,arguments)}function wp(e){"@babel/helpers - typeof";return wp=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},wp(e)}function Mv(){return Mv=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},Mv.apply(this,arguments)}function Iwe(e,t){return $we(e)||Lwe(e,t)||Dwe(e,t)||Mwe()}function Mwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 608In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dwe(e,t){if(e){if(typeof e=="string")return Z$(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 Z$(e,t)}}function Z$(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 Lwe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function $we(e){if(Array.isArray(e))return e}function J$(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 e6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J$(Object(n),!0).forEach(function(r){Bwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bwe(e,t,n){return t=Fwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fwe(e){var t=qwe(e,"string");return wp(t)=="symbol"?t:t+""}function qwe(e,t){if(wp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var t6=function(t,n,r,i,s){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),l=i>=0?1:-1,c=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,d;if(o>0&&s instanceof Array){for(var f=[0,0,0,0],p=0,m=4;p<m;p++)f[p]=s[p]>o?o:s[p];d="M".concat(t,",").concat(n+l*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),d+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, 609 `).concat(t+r,",").concat(n+l*f[1])),d+="L ".concat(t+r,",").concat(n+i-l*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, 610 `).concat(t+r-c*f[2],",").concat(n+i)),d+="L ".concat(t+c*f[3],",").concat(n+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, 611 `).concat(t,",").concat(n+i-l*f[3])),d+="Z"}else if(o>0&&s===+s&&s>0){var x=Math.min(o,s);d="M ".concat(t,",").concat(n+l*x,` 612 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+c*x,",").concat(n,` 613 L `).concat(t+r-c*x,",").concat(n,` 614 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+r,",").concat(n+l*x,` 615 L `).concat(t+r,",").concat(n+i-l*x,` 616 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t+r-c*x,",").concat(n+i,` 617 L `).concat(t+c*x,",").concat(n+i,` 618 A `).concat(x,",").concat(x,",0,0,").concat(u,",").concat(t,",").concat(n+i-l*x," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},zwe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,s=n.x,o=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(s,s+l),d=Math.max(s,s+l),f=Math.min(o,o+c),p=Math.max(o,o+c);return r>=u&&r<=d&&i>=f&&i<=p}return!1},Uwe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},qA=function(t){var n=e6(e6({},Uwe),t),r=T.useRef(),i=T.useState(-1),s=Iwe(i,2),o=s[0],l=s[1];T.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&l(S)}catch{}},[]);var c=n.x,u=n.y,d=n.width,f=n.height,p=n.radius,m=n.className,x=n.animationEasing,y=n.animationDuration,v=n.animationBegin,b=n.isAnimationActive,w=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var N=St("recharts-rectangle",m);return w?ee.createElement(oa,{canBegin:o>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:y,animationEasing:x,isActive:w},function(S){var _=S.width,E=S.height,k=S.x,O=S.y;return ee.createElement(oa,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,isActive:b,easing:x},ee.createElement("path",Mv({},ct(n,!0),{className:N,d:t6(k,O,_,E,p),ref:r})))}):ee.createElement("path",Mv({},ct(n,!0),{className:N,d:t6(c,u,d,f,p)}))},Vwe=["points","className","baseLinePoints","connectNulls"];function Nu(){return Nu=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},Nu.apply(this,arguments)}function Wwe(e,t){if(e==null)return{};var n=Hwe(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 Hwe(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 n6(e){return Xwe(e)||Ywe(e)||Kwe(e)||Gwe()}function Gwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 619In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kwe(e,t){if(e){if(typeof e=="string")return qP(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 qP(e,t)}}function Ywe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xwe(e){if(Array.isArray(e))return qP(e)}function qP(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 r6=function(t){return t&&t.x===+t.x&&t.y===+t.y},Qwe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){r6(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),r6(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Ih=function(t,n){var r=Qwe(t);n&&(r=[r.reduce(function(s,o){return[].concat(n6(s),n6(o))},[])]);var i=r.map(function(s){return s.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},Zwe=function(t,n,r){var i=Ih(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Ih(n.reverse(),r).slice(1))},Jwe=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,s=t.connectNulls,o=Wwe(t,Vwe);if(!n||!n.length)return null;var l=St("recharts-polygon",r);if(i&&i.length){var c=o.stroke&&o.stroke!=="none",u=Zwe(n,i,s);return ee.createElement("g",{className:l},ee.createElement("path",Nu({},ct(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),c?ee.createElement("path",Nu({},ct(o,!0),{fill:"none",d:Ih(n,s)})):null,c?ee.createElement("path",Nu({},ct(o,!0),{fill:"none",d:Ih(i,s)})):null)}var d=Ih(n,s);return ee.createElement("path",Nu({},ct(o,!0),{fill:d.slice(-1)==="Z"?o.fill:"none",className:l,d}))};function zP(){return zP=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},zP.apply(this,arguments)}var a0=function(t){var n=t.cx,r=t.cy,i=t.r,s=t.className,o=St("recharts-dot",s);return n===+n&&r===+r&&i===+i?T.createElement("circle",zP({},ct(t,!1),rv(t),{className:o,cx:n,cy:r,r:i})):null};function jp(e){"@babel/helpers - typeof";return jp=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},jp(e)}var e1e=["x","y","top","left","width","height","className"];function UP(){return UP=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},UP.apply(this,arguments)}function i6(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 t1e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i6(Object(n),!0).forEach(function(r){n1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n1e(e,t,n){return t=r1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1e(e){var t=i1e(e,"string");return jp(t)=="symbol"?t:t+""}function i1e(e,t){if(jp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function s1e(e,t){if(e==null)return{};var n=a1e(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 a1e(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 o1e=function(t,n,r,i,s,o){return"M".concat(t,",").concat(s,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},l1e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,s=i===void 0?0:i,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,p=t.height,m=p===void 0?0:p,x=t.className,y=s1e(t,e1e),v=t1e({x:r,y:s,top:l,left:u,width:f,height:m},y);return!Le(r)||!Le(s)||!Le(f)||!Le(m)||!Le(l)||!Le(u)?null:ee.createElement("path",UP({},ct(v,!0),{className:St("recharts-cross",x),d:o1e(r,s,f,m,l,u)}))},DN,s6;function c1e(){if(s6)return DN;s6=1;var e=t0(),t=Z9(),n=da();function r(i,s){return i&&i.length?e(i,n(s,2),t):void 0}return DN=r,DN}var u1e=c1e();const d1e=Lt(u1e);var LN,a6;function f1e(){if(a6)return LN;a6=1;var e=t0(),t=da(),n=J9();function r(i,s){return i&&i.length?e(i,t(s,2),n):void 0}return LN=r,LN}var h1e=f1e();const p1e=Lt(h1e);var m1e=["cx","cy","angle","ticks","axisLine"],g1e=["ticks","tick","angle","tickFormatter","stroke"];function ud(e){"@babel/helpers - typeof";return ud=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},ud(e)}function Mh(){return Mh=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},Mh.apply(this,arguments)}function o6(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 Tl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o6(Object(n),!0).forEach(function(r){o0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l6(e,t){if(e==null)return{};var n=y1e(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 y1e(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 v1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c6(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,FV(r.key),r)}}function x1e(e,t,n){return t&&c6(e.prototype,t),n&&c6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function b1e(e,t,n){return t=Dv(t),w1e(e,BV()?Reflect.construct(t,n||[],Dv(e).constructor):t.apply(e,n))}function w1e(e,t){if(t&&(ud(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j1e(e)}function j1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BV=function(){return!!e})()}function Dv(e){return Dv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dv(e)}function S1e(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&&VP(e,t)}function VP(e,t){return VP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},VP(e,t)}function o0(e,t,n){return t=FV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FV(e){var t=N1e(e,"string");return ud(t)=="symbol"?t:t+""}function N1e(e,t){if(ud(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ud(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var l0=(function(e){function t(){return v1e(this,t),b1e(this,t,arguments)}return S1e(t,e),x1e(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,s=this.props,o=s.angle,l=s.cx,c=s.cy;return on(l,c,i,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,s=r.cy,o=r.angle,l=r.ticks,c=d1e(l,function(d){return d.coordinate||0}),u=p1e(l,function(d){return d.coordinate||0});return{cx:i,cy:s,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,s=r.cy,o=r.angle,l=r.ticks,c=r.axisLine,u=l6(r,m1e),d=l.reduce(function(x,y){return[Math.min(x[0],y.coordinate),Math.max(x[1],y.coordinate)]},[1/0,-1/0]),f=on(i,s,d[0],o),p=on(i,s,d[1],o),m=Tl(Tl(Tl({},ct(u,!1)),{},{fill:"none"},ct(c,!1)),{},{x1:f.x,y1:f.y,x2:p.x,y2:p.y});return ee.createElement("line",Mh({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,i=this.props,s=i.ticks,o=i.tick,l=i.angle,c=i.tickFormatter,u=i.stroke,d=l6(i,g1e),f=this.getTickTextAnchor(),p=ct(d,!1),m=ct(o,!1),x=s.map(function(y,v){var b=r.getTickValueCoord(y),w=Tl(Tl(Tl(Tl({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(b.x,", ").concat(b.y,")")},p),{},{stroke:"none",fill:u},m),{},{index:v},b),{},{payload:y});return ee.createElement(qt,Mh({className:St("recharts-polar-radius-axis-tick",kV(o)),key:"tick-".concat(y.coordinate)},gc(r.props,y,v)),t.renderTickItem(o,w,c?c(y.value,v):y.value))});return ee.createElement(qt,{className:"recharts-polar-radius-axis-ticks"},x)}},{key:"render",value:function(){var r=this.props,i=r.ticks,s=r.axisLine,o=r.tick;return!i||!i.length?null:ee.createElement(qt,{className:St("recharts-polar-radius-axis",this.props.className)},s&&this.renderAxisLine(),o&&this.renderTicks(),ar.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,s){var o;return ee.isValidElement(r)?o=ee.cloneElement(r,i):yt(r)?o=r(i):o=ee.createElement(yc,Mh({},i,{className:"recharts-polar-radius-axis-tick-value"}),s),o}}])})(T.PureComponent);o0(l0,"displayName","PolarRadiusAxis");o0(l0,"axisType","radiusAxis");o0(l0,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function dd(e){"@babel/helpers - typeof";return dd=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},dd(e)}function zl(){return zl=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},zl.apply(this,arguments)}function u6(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 Rl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u6(Object(n),!0).forEach(function(r){c0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d6(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,zV(r.key),r)}}function E1e(e,t,n){return t&&d6(e.prototype,t),n&&d6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function P1e(e,t,n){return t=Lv(t),k1e(e,qV()?Reflect.construct(t,n||[],Lv(e).constructor):t.apply(e,n))}function k1e(e,t){if(t&&(dd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O1e(e)}function O1e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qV=function(){return!!e})()}function Lv(e){return Lv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lv(e)}function A1e(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&&WP(e,t)}function WP(e,t){return WP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WP(e,t)}function c0(e,t,n){return t=zV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zV(e){var t=C1e(e,"string");return dd(t)=="symbol"?t:t+""}function C1e(e,t){if(dd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var T1e=Math.PI/180,f6=1e-5,u0=(function(e){function t(){return _1e(this,t),P1e(this,t,arguments)}return A1e(t,e),E1e(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.cx,o=i.cy,l=i.radius,c=i.orientation,u=i.tickSize,d=u||8,f=on(s,o,l,r.coordinate),p=on(s,o,l+(c==="inner"?-1:1)*d,r.coordinate);return{x1:f.x,y1:f.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,s=Math.cos(-r.coordinate*T1e),o;return s>f6?o=i==="outer"?"start":"end":s<-f6?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,s=r.cy,o=r.radius,l=r.axisLine,c=r.axisLineType,u=Rl(Rl({},ct(this.props,!1)),{},{fill:"none"},ct(l,!1));if(c==="circle")return ee.createElement(a0,zl({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:s,r:o}));var d=this.props.ticks,f=d.map(function(p){return on(i,s,o,p.coordinate)});return ee.createElement(Jwe,zl({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,s=i.ticks,o=i.tick,l=i.tickLine,c=i.tickFormatter,u=i.stroke,d=ct(this.props,!1),f=ct(o,!1),p=Rl(Rl({},d),{},{fill:"none"},ct(l,!1)),m=s.map(function(x,y){var v=r.getTickLineCoord(x),b=r.getTickTextAnchor(x),w=Rl(Rl(Rl({textAnchor:b},d),{},{stroke:"none",fill:u},f),{},{index:y,payload:x,x:v.x2,y:v.y2});return ee.createElement(qt,zl({className:St("recharts-polar-angle-axis-tick",kV(o)),key:"tick-".concat(x.coordinate)},gc(r.props,x,y)),l&&ee.createElement("line",zl({className:"recharts-polar-angle-axis-tick-line"},p,v)),o&&t.renderTickItem(o,w,c?c(x.value,y):x.value))});return ee.createElement(qt,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,i=r.ticks,s=r.radius,o=r.axisLine;return s<=0||!i||!i.length?null:ee.createElement(qt,{className:St("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,s){var o;return ee.isValidElement(r)?o=ee.cloneElement(r,i):yt(r)?o=r(i):o=ee.createElement(yc,zl({},i,{className:"recharts-polar-angle-axis-tick-value"}),s),o}}])})(T.PureComponent);c0(u0,"displayName","PolarAngleAxis");c0(u0,"axisType","angleAxis");c0(u0,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var $N,h6;function R1e(){if(h6)return $N;h6=1;var e=QU(),t=e(Object.getPrototypeOf,Object);return $N=t,$N}var BN,p6;function I1e(){if(p6)return BN;p6=1;var e=Qa(),t=R1e(),n=Za(),r="[object Object]",i=Function.prototype,s=Object.prototype,o=i.toString,l=s.hasOwnProperty,c=o.call(Object);function u(d){if(!n(d)||e(d)!=r)return!1;var f=t(d);if(f===null)return!0;var p=l.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==c}return BN=u,BN}var M1e=I1e();const D1e=Lt(M1e);var FN,m6;function L1e(){if(m6)return FN;m6=1;var e=Qa(),t=Za(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return FN=r,FN}var $1e=L1e();const B1e=Lt($1e);function Sp(e){"@babel/helpers - typeof";return Sp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sp(e)}function $v(){return $v=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},$v.apply(this,arguments)}function F1e(e,t){return V1e(e)||U1e(e,t)||z1e(e,t)||q1e()}function q1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 620In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z1e(e,t){if(e){if(typeof e=="string")return g6(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 g6(e,t)}}function g6(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 U1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function V1e(e){if(Array.isArray(e))return e}function y6(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 v6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y6(Object(n),!0).forEach(function(r){W1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function W1e(e,t,n){return t=H1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H1e(e){var t=G1e(e,"string");return Sp(t)=="symbol"?t:t+""}function G1e(e,t){if(Sp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var x6=function(t,n,r,i,s){var o=r-i,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+s),l+="L ".concat(t+r-o/2-i,",").concat(n+s),l+="L ".concat(t,",").concat(n," Z"),l},K1e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Y1e=function(t){var n=v6(v6({},K1e),t),r=T.useRef(),i=T.useState(-1),s=F1e(i,2),o=s[0],l=s[1];T.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var N=r.current.getTotalLength();N&&l(N)}catch{}},[]);var c=n.x,u=n.y,d=n.upperWidth,f=n.lowerWidth,p=n.height,m=n.className,x=n.animationEasing,y=n.animationDuration,v=n.animationBegin,b=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||p!==+p||d===0&&f===0||p===0)return null;var w=St("recharts-trapezoid",m);return b?ee.createElement(oa,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:p,x:c,y:u},duration:y,animationEasing:x,isActive:b},function(N){var S=N.upperWidth,_=N.lowerWidth,E=N.height,k=N.x,O=N.y;return ee.createElement(oa,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:y,easing:x},ee.createElement("path",$v({},ct(n,!0),{className:w,d:x6(k,O,S,_,E),ref:r})))}):ee.createElement("g",null,ee.createElement("path",$v({},ct(n,!0),{className:w,d:x6(c,u,d,f,p)})))},X1e=["option","shapeType","propTransformer","activeClassName","isActive"];function Np(e){"@babel/helpers - typeof";return Np=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},Np(e)}function Q1e(e,t){if(e==null)return{};var n=Z1e(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 Z1e(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 b6(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 Bv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b6(Object(n),!0).forEach(function(r){J1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J1e(e,t,n){return t=eje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eje(e){var t=tje(e,"string");return Np(t)=="symbol"?t:t+""}function tje(e,t){if(Np(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Np(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nje(e,t){return Bv(Bv({},t),e)}function rje(e,t){return e==="symbols"}function w6(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return ee.createElement(qA,n);case"trapezoid":return ee.createElement(Y1e,n);case"sector":return ee.createElement(CV,n);case"symbols":if(rje(t))return ee.createElement(aA,n);break;default:return null}}function ije(e){return T.isValidElement(e)?e.props:e}function UV(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?nje:r,s=e.activeClassName,o=s===void 0?"recharts-active-shape":s,l=e.isActive,c=Q1e(e,X1e),u;if(T.isValidElement(t))u=T.cloneElement(t,Bv(Bv({},c),ije(t)));else if(yt(t))u=t(c);else if(D1e(t)&&!B1e(t)){var d=i(t,c);u=ee.createElement(w6,{shapeType:n,elementProps:d})}else{var f=c;u=ee.createElement(w6,{shapeType:n,elementProps:f})}return l?ee.createElement(qt,{className:o},u):u}function d0(e,t){return t!=null&&"trapezoids"in e.props}function f0(e,t){return t!=null&&"sectors"in e.props}function _p(e,t){return t!=null&&"points"in e.props}function sje(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 aje(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function oje(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function lje(e,t){var n;return d0(e,t)?n=sje:f0(e,t)?n=aje:_p(e,t)&&(n=oje),n}function cje(e,t){var n;return d0(e,t)?n="trapezoids":f0(e,t)?n="sectors":_p(e,t)&&(n="points"),n}function uje(e,t){if(d0(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(f0(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 _p(e,t)?t.payload:{}}function dje(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=cje(n,t),s=uje(n,t),o=r.filter(function(c,u){var d=pm(s,c),f=n.props[i].filter(function(x){var y=lje(n,t);return y(x,t)}),p=n.props[i].indexOf(f[f.length-1]),m=u===p;return d&&m}),l=r.indexOf(o[o.length-1]);return l}var Iy;function fd(e){"@babel/helpers - typeof";return fd=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},fd(e)}function _u(){return _u=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},_u.apply(this,arguments)}function j6(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 rn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j6(Object(n),!0).forEach(function(r){ns(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S6(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,WV(r.key),r)}}function hje(e,t,n){return t&&S6(e.prototype,t),n&&S6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pje(e,t,n){return t=Fv(t),mje(e,VV()?Reflect.construct(t,n||[],Fv(e).constructor):t.apply(e,n))}function mje(e,t){if(t&&(fd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gje(e)}function gje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VV=function(){return!!e})()}function Fv(e){return Fv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fv(e)}function yje(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&&HP(e,t)}function HP(e,t){return HP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HP(e,t)}function ns(e,t,n){return t=WV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WV(e){var t=vje(e,"string");return fd(t)=="symbol"?t:t+""}function vje(e,t){if(fd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eo=(function(e){function t(n){var r;return fje(this,t),r=pje(this,t,[n]),ns(r,"pieRef",null),ns(r,"sectorRefs",[]),ns(r,"id",zd("recharts-pie-")),ns(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),yt(i)&&i()}),ns(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),yt(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return yje(t,e),hje(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var s=this.props,o=s.label,l=s.labelLine,c=s.dataKey,u=s.valueKey,d=ct(this.props,!1),f=ct(o,!1),p=ct(l,!1),m=o&&o.offsetRadius||20,x=r.map(function(y,v){var b=(y.startAngle+y.endAngle)/2,w=on(y.cx,y.cy,y.outerRadius+m,b),N=rn(rn(rn(rn({},d),y),{},{stroke:"none"},f),{},{index:v,textAnchor:t.getTextAnchor(w.x,y.cx)},w),S=rn(rn(rn(rn({},d),y),{},{fill:"none",stroke:y.fill},p),{},{index:v,points:[on(y.cx,y.cy,y.outerRadius,b),w]}),_=c;return jt(c)&&jt(u)?_="value":jt(c)&&(_=u),ee.createElement(qt,{key:"label-".concat(y.startAngle,"-").concat(y.endAngle,"-").concat(y.midAngle,"-").concat(v)},l&&t.renderLabelLineItem(l,S,"line"),t.renderLabelItem(o,N,Xn(y,_)))});return ee.createElement(qt,{className:"recharts-pie-labels"},x)}},{key:"renderSectorsStatically",value:function(r){var i=this,s=this.props,o=s.activeShape,l=s.blendStroke,c=s.inactiveShape;return r.map(function(u,d){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var f=i.isActiveIndex(d),p=c&&i.hasActiveIndex()?c:null,m=f?o:p,x=rn(rn({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return ee.createElement(qt,_u({ref:function(v){v&&!i.sectorRefs.includes(v)&&i.sectorRefs.push(v)},tabIndex:-1,className:"recharts-pie-sector"},gc(i.props,u,d),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(d)}),ee.createElement(UV,_u({option:m,isActive:f,shapeType:"sector"},x)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,s=i.sectors,o=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,u=i.animationEasing,d=i.animationId,f=this.state,p=f.prevSectors,m=f.prevIsAnimationActive;return ee.createElement(oa,{begin:l,duration:c,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(x){var y=x.t,v=[],b=s&&s[0],w=b.startAngle;return s.forEach(function(N,S){var _=p&&p[S],E=S>0?Ci(N,"paddingAngle",0):0;if(_){var k=_i(_.endAngle-_.startAngle,N.endAngle-N.startAngle),O=rn(rn({},N),{},{startAngle:w+E,endAngle:w+k(y)+E});v.push(O),w=O.endAngle}else{var I=N.endAngle,A=N.startAngle,C=_i(0,I-A),R=C(y),D=rn(rn({},N),{},{startAngle:w+E,endAngle:w+R+E});v.push(D),w=D.endAngle}}),ee.createElement(qt,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(s){if(!s.altKey)switch(s.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,s=r.isAnimationActive,o=this.state.prevSectors;return s&&i&&i.length&&(!o||!pm(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,s=i.hide,o=i.sectors,l=i.className,c=i.label,u=i.cx,d=i.cy,f=i.innerRadius,p=i.outerRadius,m=i.isAnimationActive,x=this.state.isAnimationFinished;if(s||!o||!o.length||!Le(u)||!Le(d)||!Le(f)||!Le(p))return null;var y=St("recharts-pie",l);return ee.createElement(qt,{tabIndex:this.props.rootTabIndex,className:y,ref:function(b){r.pieRef=b}},this.renderSectors(),c&&this.renderLabels(o),ar.renderCallByParent(this.props,null,!1),(!m||x)&&$a.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,s){if(ee.isValidElement(r))return ee.cloneElement(r,i);if(yt(r))return r(i);var o=St("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return ee.createElement(Av,_u({},i,{key:s,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,i,s){if(ee.isValidElement(r))return ee.cloneElement(r,i);var o=s;if(yt(r)&&(o=r(i),ee.isValidElement(o)))return o;var l=St("recharts-pie-label-text",typeof r!="boolean"&&!yt(r)?r.className:"");return ee.createElement(yc,_u({},i,{alignmentBaseline:"middle",className:l}),o)}}])})(T.PureComponent);Iy=eo;ns(eo,"displayName","Pie");ns(eo,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!Cc.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});ns(eo,"parseDeltaAngle",function(e,t){var n=Wr(t-e),r=Math.min(Math.abs(t-e),360);return n*r});ns(eo,"getRealPieData",function(e){var t=e.data,n=e.children,r=ct(e,!1),i=Ti(n,cm);return t&&t.length?t.map(function(s,o){return rn(rn(rn({payload:s},r),s),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(s){return rn(rn({},r),s.props)}):[]});ns(eo,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,s=t.height,o=PV(i,s),l=r+Hr(e.cx,i,i/2),c=n+Hr(e.cy,s,s/2),u=Hr(e.innerRadius,o,0),d=Hr(e.outerRadius,o,o*.8),f=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}});ns(eo,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?rn(rn({},t.type.defaultProps),t.props):t.props,i=Iy.getRealPieData(r);if(!i||!i.length)return null;var s=r.cornerRadius,o=r.startAngle,l=r.endAngle,c=r.paddingAngle,u=r.dataKey,d=r.nameKey,f=r.valueKey,p=r.tooltipType,m=Math.abs(r.minAngle),x=Iy.parseCoordinateOfPie(r,n),y=Iy.parseDeltaAngle(o,l),v=Math.abs(y),b=u;jt(u)&&jt(f)?(Os(!1,`Use "dataKey" to specify the value of pie,
621 the props "valueKey" will be deprecated in 1.1.0`),b="value"):jt(u)&&(Os(!1,`Use "dataKey" to specify the value of pie, 622 the props "valueKey" will be deprecated in 1.1.0`),b=f);var w=i.filter(function(O){return Xn(O,b,0)!==0}).length,N=(v>=360?w:w-1)*c,S=v-w*m-N,_=i.reduce(function(O,I){var A=Xn(I,b,0);return O+(Le(A)?A:0)},0),E;if(_>0){var k;E=i.map(function(O,I){var A=Xn(O,b,0),C=Xn(O,d,I),R=(Le(A)?A:0)/_,D;I?D=k.endAngle+Wr(y)*c*(A!==0?1:0):D=o;var q=D+Wr(y)*((A!==0?m:0)+R*S),F=(D+q)/2,H=(x.innerRadius+x.outerRadius)/2,U=[{name:C,value:A,payload:O,dataKey:b,type:p}],W=on(x.cx,x.cy,H,F);return k=rn(rn(rn({percent:R,cornerRadius:s,name:C,tooltipPayload:U,midAngle:F,middleRadius:H,tooltipPosition:W},O),x),{},{value:Xn(O,b),startAngle:D,endAngle:q,payload:O,paddingAngle:Wr(y)*c}),k})}return rn(rn({},x),{},{sectors:E,data:i})});var qN,N6;function xje(){if(N6)return qN;N6=1;var e=Math.ceil,t=Math.max;function n(r,i,s,o){for(var l=-1,c=t(e((i-r)/(s||1)),0),u=Array(c);c--;)u[o?c:++l]=r,r+=s;return u}return qN=n,qN}var zN,_6;function HV(){if(_6)return zN;_6=1;var e=h9(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var s=i<0?-1:1;return s*n}return i===i?i:0}return zN=r,zN}var UN,E6;function bje(){if(E6)return UN;E6=1;var e=xje(),t=Kx(),n=HV();function r(i){return function(s,o,l){return l&&typeof l!="number"&&t(s,o,l)&&(o=l=void 0),s=n(s),o===void 0?(o=s,s=0):o=n(o),l=l===void 0?s<o?1:-1:n(l),e(s,o,l,i)}}return UN=r,UN}var VN,P6;function wje(){if(P6)return VN;P6=1;var e=bje(),t=e();return VN=t,VN}var jje=wje();const qv=Lt(jje);function Ep(e){"@babel/helpers - typeof";return Ep=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},Ep(e)}function k6(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 O6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k6(Object(n),!0).forEach(function(r){GV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GV(e,t,n){return t=Sje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sje(e){var t=Nje(e,"string");return Ep(t)=="symbol"?t:t+""}function Nje(e,t){if(Ep(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ep(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _je=["Webkit","Moz","O","ms"],Eje=function(t,n){var r=t.replace(/(\w)/,function(s){return s.toUpperCase()}),i=_je.reduce(function(s,o){return O6(O6({},s),{},GV({},o+r,n))},{});return i[t]=n,i};function hd(e){"@babel/helpers - typeof";return hd=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},hd(e)}function zv(){return zv=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},zv.apply(this,arguments)}function A6(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 WN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A6(Object(n),!0).forEach(function(r){Si(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C6(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,YV(r.key),r)}}function kje(e,t,n){return t&&C6(e.prototype,t),n&&C6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oje(e,t,n){return t=Uv(t),Aje(e,KV()?Reflect.construct(t,n||[],Uv(e).
vendor: 124,575 bytes, lines 622-627
622constructor):t.apply(e,n))}function Aje(e,t){if(t&&(hd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cje(e)}function Cje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KV=function(){return!!e})()}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function Tje(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&&GP(e,t)}function GP(e,t){return GP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GP(e,t)}function Si(e,t,n){return t=YV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YV(e){var t=Rje(e,"string");return hd(t)=="symbol"?t:t+""}function Rje(e,t){if(hd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ije=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,s=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Ch().domain(qv(0,c)).range([s,s+o-l]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:d}},T6=function(t){return t.changedTouches&&!!t.changedTouches.length},pd=(function(e){function t(n){var r;return Pje(this,t),r=Oje(this,t,[n]),Si(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Si(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Si(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,s=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:s,startIndex:l})}),r.detachDragEndListener()}),Si(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Si(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Si(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Si(r,"handleSlideDragStart",function(i){var s=T6(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 Tje(t,e),kje(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,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,d=u.length-1,f=Math.min(i,s),p=Math.max(i,s),m=t.getIndexInRange(o,f),x=t.getIndexInRange(o,p);return{startIndex:m-m%c,endIndex:x===d?d:x-x%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,s=i.data,o=i.tickFormatter,l=i.dataKey,c=Xn(s[r],l,r);return yt(o)?o(c,r):c}},{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,o=i.startX,l=i.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,p=c.startIndex,m=c.endIndex,x=c.onChange,y=r.pageX-s;y>0?y=Math.min(y,u+d-f-l,u+d-f-o):y<0&&(y=Math.max(y,u-o,u-l));var v=this.getIndex({startX:o+y,endX:l+y});(v.startIndex!==p||v.endIndex!==m)&&x&&x(v),this.setState({startX:o+y,endX:l+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var s=T6(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,o=i.movingTravellerId,l=i.endX,c=i.startX,u=this.state[o],d=this.props,f=d.x,p=d.width,m=d.travellerWidth,x=d.onChange,y=d.gap,v=d.data,b={startX:this.state.startX,endX:this.state.endX},w=r.pageX-s;w>0?w=Math.min(w,f+p-m-u):w<0&&(w=Math.max(w,f-u)),b[o]=u+w;var N=this.getIndex(b),S=N.startIndex,_=N.endIndex,E=function(){var O=v.length-1;return o==="startX"&&(l>c?S%y===0:_%y===0)||l<c&&_===O||o==="endX"&&(l>c?_%y===0:S%y===0)||l>c&&_===O};this.setState(Si(Si({},o,u+w),"brushMoveStartX",r.pageX),function(){x&&E()&&x(N)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var s=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,d=this.state[i],f=l.indexOf(d);if(f!==-1){var p=f+r;if(!(p===-1||p>=l.length)){var m=l[p];i==="startX"&&m>=u||i==="endX"&&m<=c||this.setState(Si({},i,m),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,o=r.width,l=r.height,c=r.fill,u=r.stroke;return ee.createElement("rect",{stroke:u,fill:c,x:i,y:s,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,l=r.height,c=r.data,u=r.children,d=r.padding,f=T.Children.only(u);return f?ee.cloneElement(f,{x:i,y:s,width:o,height:l,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var s,o,l=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,p=c.traveller,m=c.ariaLabel,x=c.data,y=c.startIndex,v=c.endIndex,b=Math.max(r,this.props.x),w=WN(WN({},ct(this.props,!1)),{},{x:b,y:u,width:d,height:f}),N=m||"Min value: ".concat((s=x[y])===null||s===void 0?void 0:s.name,", Max value: ").concat((o=x[v])===null||o===void 0?void 0:o.name);return ee.createElement(qt,{tabIndex:0,role:"slider","aria-label":N,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),l.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,w))}},{key:"renderSlide",value:function(r,i){var s=this.props,o=s.y,l=s.height,c=s.stroke,u=s.travellerWidth,d=Math.min(r,i)+u,f=Math.max(Math.abs(i-r)-u,0);return ee.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:d,y:o,width:f,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,s=r.endIndex,o=r.y,l=r.height,c=r.travellerWidth,u=r.stroke,d=this.state,f=d.startX,p=d.endX,m=5,x={pointerEvents:"none",fill:u};return ee.createElement(qt,{className:"recharts-brush-texts"},ee.createElement(yc,zv({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,p)-m,y:o+l/2},x),this.getTextOfTick(i)),ee.createElement(yc,zv({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,p)+c+m,y:o+l/2},x),this.getTextOfTick(s)))}},{key:"render",value:function(){var r=this.props,i=r.data,s=r.className,o=r.children,l=r.x,c=r.y,u=r.width,d=r.height,f=r.alwaysShowText,p=this.state,m=p.startX,x=p.endX,y=p.isTextActive,v=p.isSlideMoving,b=p.isTravellerMoving,w=p.isTravellerFocused;if(!i||!i.length||!Le(l)||!Le(c)||!Le(u)||!Le(d)||u<=0||d<=0)return null;var N=St("recharts-brush",s),S=ee.Children.count(o)===1,_=Eje("userSelect","none");return ee.createElement(qt,{className:N,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(m,x),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(x,"endX"),(y||v||b||w||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,s=r.y,o=r.width,l=r.height,c=r.stroke,u=Math.floor(s+l/2)-1;return ee.createElement(ee.Fragment,null,ee.createElement("rect",{x:i,y:s,width:o,height:l,fill:c,stroke:"none"}),ee.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),ee.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var s;return ee.isValidElement(r)?s=ee.cloneElement(r,i):yt(r)?s=r(i):s=t.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(r,i){var s=r.data,o=r.width,l=r.x,c=r.travellerWidth,u=r.updateId,d=r.startIndex,f=r.endIndex;if(s!==i.prevData||u!==i.prevUpdateId)return WN({prevData:s,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},s&&s.length?Ije({data:s,width:o,x:l,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+o-c]);var p=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:s,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var s=r.length,o=0,l=s-1;l-o>1;){var c=Math.floor((o+l)/2);r[c]>i?l=c:o=c}return i>=r[l]?l:o}}])})(T.PureComponent);Si(pd,"displayName","Brush");Si(pd,"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 HN,R6;function Mje(){if(R6)return HN;R6=1;var e=hA();function t(n,r){var i;return e(n,function(s,o,l){return i=r(s,o,l),!i}),!!i}return HN=t,HN}var GN,I6;function Dje(){if(I6)return GN;I6=1;var e=VU(),t=da(),n=Mje(),r=pi(),i=Kx();function s(o,l,c){var u=r(o)?e:n;return c&&i(o,l,c)&&(l=void 0),u(o,t(l,3))}return GN=s,GN}var Lje=Dje();const $je=Lt(Lje);var ra=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},KN,M6;function Bje(){if(M6)return KN;M6=1;var e=l9();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return KN=t,KN}var YN,D6;function Fje(){if(D6)return YN;D6=1;var e=Bje(),t=a9(),n=da();function r(i,s){var o={};return s=n(s,3),t(i,function(l,c,u){e(o,c,s(l,c,u))}),o}return YN=r,YN}var qje=Fje();const zje=Lt(qje);var XN,L6;function Uje(){if(L6)return XN;L6=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return XN=e,XN}var QN,$6;function Vje(){if($6)return QN;$6=1;var e=hA();function t(n,r){var i=!0;return e(n,function(s,o,l){return i=!!r(s,o,l),i}),i}return QN=t,QN}var ZN,B6;function Wje(){if(B6)return ZN;B6=1;var e=Uje(),t=Vje(),n=da(),r=pi(),i=Kx();function s(o,l,c){var u=r(o)?e:t;return c&&i(o,l,c)&&(l=void 0),u(o,n(l,3))}return ZN=s,ZN}var Hje=Wje();const XV=Lt(Hje);var Gje=["x","y"];function Pp(e){"@babel/helpers - typeof";return Pp=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},Pp(e)}function KP(){return KP=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},KP.apply(this,arguments)}function F6(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 eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F6(Object(n),!0).forEach(function(r){Kje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kje(e,t,n){return t=Yje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yje(e){var t=Xje(e,"string");return Pp(t)=="symbol"?t:t+""}function Xje(e,t){if(Pp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qje(e,t){if(e==null)return{};var n=Zje(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 Zje(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 Jje(e,t){var n=e.x,r=e.y,i=Qje(e,Gje),s="".concat(n),o=parseInt(s,10),l="".concat(r),c=parseInt(l,10),u="".concat(t.height||i.height),d=parseInt(u,10),f="".concat(t.width||i.width),p=parseInt(f,10);return eh(eh(eh(eh(eh({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:d,width:p,name:t.name,radius:t.radius})}function q6(e){return ee.createElement(UV,KP({shapeType:"rectangle",propTransformer:Jje,activeClassName:"recharts-active-bar"},e))}var eSe=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=Le(r)||_de(r);return s?t(r,i):(s||Zo(),n)}},tSe=["value","background"],QV;function md(e){"@babel/helpers - typeof";return md=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},md(e)}function nSe(e,t){if(e==null)return{};var n=rSe(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 rSe(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 Vv(){return Vv=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},Vv.apply(this,arguments)}function z6(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 Bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z6(Object(n),!0).forEach(function(r){Fo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U6(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,JV(r.key),r)}}function sSe(e,t,n){return t&&U6(e.prototype,t),n&&U6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function aSe(e,t,n){return t=Wv(t),oSe(e,ZV()?Reflect.construct(t,n||[],Wv(e).constructor):t.apply(e,n))}function oSe(e,t){if(t&&(md(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lSe(e)}function lSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZV=function(){return!!e})()}function Wv(e){return Wv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wv(e)}function cSe(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&&YP(e,t)}function YP(e,t){return YP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YP(e,t)}function Fo(e,t,n){return t=JV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JV(e){var t=uSe(e,"string");return md(t)=="symbol"?t:t+""}function uSe(e,t){if(md(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(md(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qr=(function(e){function t(){var n;iSe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=aSe(this,t,[].concat(i)),Fo(n,"state",{isAnimationFinished:!1}),Fo(n,"id",zd("recharts-bar-")),Fo(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),Fo(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return cSe(t,e),sSe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,s=this.props,o=s.shape,l=s.dataKey,c=s.activeIndex,u=s.activeBar,d=ct(this.props,!1);return r&&r.map(function(f,p){var m=p===c,x=m?u:o,y=Bn(Bn(Bn({},d),f),{},{isActive:m,option:x,index:p,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return ee.createElement(qt,Vv({className:"recharts-bar-rectangle"},gc(i.props,f,p),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(p)}),ee.createElement(q6,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,s=i.data,o=i.layout,l=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,d=i.animationEasing,f=i.animationId,p=this.state.prevData;return ee.createElement(oa,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var x=m.t,y=s.map(function(v,b){var w=p&&p[b];if(w){var N=_i(w.x,v.x),S=_i(w.y,v.y),_=_i(w.width,v.width),E=_i(w.height,v.height);return Bn(Bn({},v),{},{x:N(x),y:S(x),width:_(x),height:E(x)})}if(o==="horizontal"){var k=_i(0,v.height),O=k(x);return Bn(Bn({},v),{},{y:v.y+v.height-O,height:O})}var I=_i(0,v.width),A=I(x);return Bn(Bn({},v),{},{width:A})});return ee.createElement(qt,null,r.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,s=r.isAnimationActive,o=this.state.prevData;return s&&i&&i.length&&(!o||!pm(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,s=i.data,o=i.dataKey,l=i.activeIndex,c=ct(this.props.background,!1);return s.map(function(u,d){u.value;var f=u.background,p=nSe(u,tSe);if(!f)return null;var m=Bn(Bn(Bn(Bn(Bn({},p),{},{fill:"#eee"},f),c),gc(r.props,u,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return ee.createElement(q6,Vv({key:"background-bar-".concat(d),option:r.props.background,isActive:d===l},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,o=s.data,l=s.xAxis,c=s.yAxis,u=s.layout,d=s.children,f=Ti(d,mm);if(!f)return null;var p=u==="vertical"?o[0].height/2:o[0].width/2,m=function(v,b){var w=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:w,errorVal:Xn(v,b)}},x={clipPath:r?"url(#clipPath-".concat(i,")"):null};return ee.createElement(qt,x,f.map(function(y){return ee.cloneElement(y,{key:"error-bar-".concat(i,"-").concat(y.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,s=r.data,o=r.className,l=r.xAxis,c=r.yAxis,u=r.left,d=r.top,f=r.width,p=r.height,m=r.isAnimationActive,x=r.background,y=r.id;if(i||!s||!s.length)return null;var v=this.state.isAnimationFinished,b=St("recharts-bar",o),w=l&&l.allowDataOverflow,N=c&&c.allowDataOverflow,S=w||N,_=jt(y)?this.id:y;return ee.createElement(qt,{className:b},w||N?ee.createElement("defs",null,ee.createElement("clipPath",{id:"clipPath-".concat(_)},ee.createElement("rect",{x:w?u:u-f/2,y:N?d:d-p/2,width:w?f:f*2,height:N?p:p*2}))):null,ee.createElement(qt,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(_,")"):null},x?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,_),(!m||v)&&$a.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}}])})(T.PureComponent);QV=Qr;Fo(Qr,"displayName","Bar");Fo(Qr,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Cc.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Fo(Qr,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,s=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,m=Bxe(r,n);if(!m)return null;var x=t.layout,y=n.type.defaultProps,v=y!==void 0?Bn(Bn({},y),n.props):n.props,b=v.dataKey,w=v.children,N=v.minPointSize,S=x==="horizontal"?o:s,_=u?S.scale.domain():null,E=Hxe({numericAxis:S}),k=Ti(w,cm),O=f.map(function(I,A){var C,R,D,q,F,H;u?C=Fxe(u[d+A],_):(C=Xn(I,b),Array.isArray(C)||(C=[E,C]));var U=eSe(N,QV.defaultProps.minPointSize)(C[1],A);if(x==="horizontal"){var W,G=[o.scale(C[0]),o.scale(C[1])],L=G[0],$=G[1];R=p$({axis:s,ticks:l,bandSize:i,offset:m.offset,entry:I,index:A}),D=(W=$??L)!==null&&W!==void 0?W:void 0,q=m.size;var V=L-$;if(F=Number.isNaN(V)?0:V,H={x:R,y:o.y,width:q,height:o.height},Math.abs(U)>0&&Math.abs(F)<Math.abs(U)){var z=Wr(F||U)*(Math.abs(U)-Math.abs(F));D-=z,F+=z}}else{var Q=[s.scale(C[0]),s.scale(C[1])],J=Q[0],Y=Q[1];if(R=J,D=p$({axis:o,ticks:c,bandSize:i,offset:m.offset,entry:I,index:A}),q=Y-J,F=m.size,H={x:s.x,y:D,width:s.width,height:F},Math.abs(U)>0&&Math.abs(q)<Math.abs(U)){var X=Wr(q||U)*(Math.abs(U)-Math.abs(q));q+=X}}return Bn(Bn(Bn({},I),{},{x:R,y:D,width:q,height:F,value:u?C:C[1],payload:I,background:H},k&&k[A]&&k[A].props),{},{tooltipPayload:[_V(n,I)],tooltipPosition:{x:R+q/2,y:D+F/2}})});return Bn({data:O,layout:x},p)});function kp(e){"@babel/helpers - typeof";return kp=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},kp(e)}function dSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V6(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,eW(r.key),r)}}function fSe(e,t,n){return t&&V6(e.prototype,t),n&&V6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function W6(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?W6(Object(n),!0).forEach(function(r){h0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h0(e,t,n){return t=eW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eW(e){var t=hSe(e,"string");return kp(t)=="symbol"?t:t+""}function hSe(e,t){if(kp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tW=function(t,n,r,i,s){var o=t.width,l=t.height,c=t.layout,u=t.children,d=Object.keys(n),f={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},p=!!Ni(u,Qr);return d.reduce(function(m,x){var y=n[x],v=y.orientation,b=y.domain,w=y.padding,N=w===void 0?{}:w,S=y.mirror,_=y.reversed,E="".concat(v).concat(S?"Mirror":""),k,O,I,A,C;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var R=b[1]-b[0],D=1/0,q=y.categoricalDomain.sort(kde);if(q.forEach(function(Q,J){J>0&&(D=Math.min((Q||0)-(q[J-1]||0),D))}),Number.isFinite(D)){var F=D/R,H=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(k=F*H/2),y.padding==="no-gap"){var U=Hr(t.barCategoryGap,F*H),W=F*H/2;k=W-U-(W-U)/H*U}}}i==="xAxis"?O=[r.left+(N.left||0)+(k||0),r.left+r.width-(N.right||0)-(k||0)]:i==="yAxis"?O=c==="horizontal"?[r.top+r.height-(N.bottom||0),r.top+(N.top||0)]:[r.top+(N.top||0)+(k||0),r.top+r.height-(N.bottom||0)-(k||0)]:O=y.range,_&&(O=[O[1],O[0]]);var G=wV(y,s,p),L=G.scale,$=G.realScaleType;L.domain(b).range(O),jV(L);var V=SV(L,_s(_s({},y),{},{realScaleType:$}));i==="xAxis"?(C=v==="top"&&!S||v==="bottom"&&S,I=r.left,A=f[E]-C*y.height):i==="yAxis"&&(C=v==="left"&&!S||v==="right"&&S,I=f[E]-C*y.width,A=r.top);var z=_s(_s(_s({},y),V),{},{realScaleType:$,x:I,y:A,scale:L,width:i==="xAxis"?r.width:y.width,height:i==="yAxis"?r.height:y.height});return z.bandSize=Pv(z,V),!y.hide&&i==="xAxis"?f[E]+=(C?-1:1)*z.height:y.hide||(f[E]+=(C?-1:1)*z.width),_s(_s({},m),{},h0({},x,z))},{})},nW=function(t,n){var r=t.x,i=t.y,s=n.x,o=n.y;return{x:Math.min(r,s),y:Math.min(i,o),width:Math.abs(s-r),height:Math.abs(o-i)}},pSe=function(t){var n=t.x1,r=t.y1,i=t.x2,s=t.y2;return nW({x:n,y:r},{x:i,y:s})},rW=(function(){function e(t){dSe(this,e),this.scale=t}return fSe(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 o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}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)}}])})();h0(rW,"EPS",1e-4);var zA=function(t){var n=Object.keys(t).reduce(function(r,i){return _s(_s({},r),{},h0({},i,rW.create(t[i])))},{});return _s(_s({},n),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=s.bandAware,l=s.position;return zje(i,function(c,u){return n[u].apply(c,{bandAware:o,position:l})})},isInRange:function(i){return XV(i,function(s,o){return n[o].isInRange(s)})}})};function mSe(e){return(e%180+180)%180}var gSe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=mSe(i),o=s*Math.PI/180,l=Math.atan(r/n),c=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(c)},JN,H6;function ySe(){if(H6)return JN;H6=1;var e=da(),t=lm(),n=Hx();function r(i){return function(s,o,l){var c=Object(s);if(!t(s)){var u=e(o,3);s=n(s),o=function(f){return u(c[f],f,c)}}var d=i(s,o,l);return d>-1?c[u?s[d]:d]:void 0}}return JN=r,JN}var e_,G6;function vSe(){if(G6)return e_;G6=1;var e=HV();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return e_=t,e_}var t_,K6;function xSe(){if(K6)return t_;K6=1;var e=t9(),t=da(),n=vSe(),r=Math.max;function i(s,o,l){var c=s==null?0:s.length;if(!c)return-1;var u=l==null?0:n(l);return u<0&&(u=r(c+u,0)),e(s,t(o,3),u)}return t_=i,t_}var n_,Y6;function bSe(){if(Y6)return n_;Y6=1;var e=ySe(),t=xSe(),n=e(t);return n_=n,n_}var wSe=bSe();const jSe=Lt(wSe);var SSe=yU();const NSe=Lt(SSe);var _Se=NSe(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("")}),UA=T.createContext(void 0),VA=T.createContext(void 0),iW=T.createContext(void 0),sW=T.createContext({}),aW=T.createContext(void 0),oW=T.createContext(0),lW=T.createContext(0),X6=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,s=n.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,d=_Se(s);return ee.createElement(UA.Provider,{value:r},ee.createElement(VA.Provider,{value:i},ee.createElement(sW.Provider,{value:s},ee.createElement(iW.Provider,{value:d},ee.createElement(aW.Provider,{value:o},ee.createElement(oW.Provider,{value:u},ee.createElement(lW.Provider,{value:c},l)))))))},ESe=function(){return T.useContext(aW)},cW=function(t){var n=T.useContext(UA);n==null&&Zo();var r=n[t];return r==null&&Zo(),r},PSe=function(){var t=T.useContext(UA);return Oo(t)},kSe=function(){var t=T.useContext(VA),n=jSe(t,function(r){return XV(r.domain,Number.isFinite)});return n||Oo(t)},uW=function(t){var n=T.useContext(VA);n==null&&Zo();var r=n[t];return r==null&&Zo(),r},OSe=function(){var t=T.useContext(iW);return t},ASe=function(){return T.useContext(sW)},WA=function(){return T.useContext(lW)},HA=function(){return T.useContext(oW)};function gd(e){"@babel/helpers - typeof";return gd=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},gd(e)}function CSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TSe(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,fW(r.key),r)}}function RSe(e,t,n){return t&&TSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ISe(e,t,n){return t=Hv(t),MSe(e,dW()?Reflect.construct(t,n||[],Hv(e).constructor):t.apply(e,n))}function MSe(e,t){if(t&&(gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return DSe(e)}function DSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dW=function(){return!!e})()}function Hv(e){return Hv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hv(e)}function LSe(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&&XP(e,t)}function XP(e,t){return XP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},XP(e,t)}function Q6(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 Z6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q6(Object(n),!0).forEach(function(r){GA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GA(e,t,n){return t=fW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fW(e){var t=$Se(e,"string");return gd(t)=="symbol"?t:t+""}function $Se(e,t){if(gd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function BSe(e,t){return USe(e)||zSe(e,t)||qSe(e,t)||FSe()}function FSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 623In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qSe(e,t){if(e){if(typeof e=="string")return J6(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 J6(e,t)}}function J6(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 zSe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function USe(e){if(Array.isArray(e))return e}function QP(){return QP=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},QP.apply(this,arguments)}var VSe=function(t,n){var r;return ee.isValidElement(t)?r=ee.cloneElement(t,n):yt(t)?r=t(n):r=ee.createElement("line",QP({},n,{className:"recharts-reference-line-line"})),r},WSe=function(t,n,r,i,s,o,l,c,u){var d=s.x,f=s.y,p=s.width,m=s.height;if(r){var x=u.y,y=t.y.apply(x,{position:o});if(ra(u,"discard")&&!t.y.isInRange(y))return null;var v=[{x:d+p,y},{x:d,y}];return c==="left"?v.reverse():v}if(n){var b=u.x,w=t.x.apply(b,{position:o});if(ra(u,"discard")&&!t.x.isInRange(w))return null;var N=[{x:w,y:f+m},{x:w,y:f}];return l==="top"?N.reverse():N}if(i){var S=u.segment,_=S.map(function(E){return t.apply(E,{position:o})});return ra(u,"discard")&&$je(_,function(E){return!t.isInRange(E)})?null:_}return null};function HSe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,s=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=ESe(),d=cW(i),f=uW(s),p=OSe();if(!u||!p)return null;Os(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=zA({x:d.scale,y:f.scale}),x=Zn(t),y=Zn(n),v=r&&r.length===2,b=WSe(m,x,y,v,p,e.position,d.orientation,f.orientation,e);if(!b)return null;var w=BSe(b,2),N=w[0],S=N.x,_=N.y,E=w[1],k=E.x,O=E.y,I=ra(e,"hidden")?"url(#".concat(u,")"):void 0,A=Z6(Z6({clipPath:I},ct(e,!0)),{},{x1:S,y1:_,x2:k,y2:O});return ee.createElement(qt,{className:St("recharts-reference-line",l)},VSe(o,A),ar.renderCallByParent(e,pSe({x1:S,y1:_,x2:k,y2:O})))}var KA=(function(e){function t(){return CSe(this,t),ISe(this,t,arguments)}return LSe(t,e),RSe(t,[{key:"render",value:function(){return ee.createElement(HSe,this.props)}}])})(ee.Component);GA(KA,"displayName","ReferenceLine");GA(KA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function ZP(){return ZP=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},ZP.apply(this,arguments)}function yd(e){"@babel/helpers - typeof";return yd=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},yd(e)}function eB(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 tB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eB(Object(n),!0).forEach(function(r){p0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KSe(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,pW(r.key),r)}}function YSe(e,t,n){return t&&KSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XSe(e,t,n){return t=Gv(t),QSe(e,hW()?Reflect.construct(t,n||[],Gv(e).constructor):t.apply(e,n))}function QSe(e,t){if(t&&(yd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZSe(e)}function ZSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hW=function(){return!!e})()}function Gv(e){return Gv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gv(e)}function JSe(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&&JP(e,t)}function JP(e,t){return JP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},JP(e,t)}function p0(e,t,n){return t=pW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pW(e){var t=eNe(e,"string");return yd(t)=="symbol"?t:t+""}function eNe(e,t){if(yd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tNe=function(t){var n=t.x,r=t.y,i=t.xAxis,s=t.yAxis,o=zA({x:i.scale,y:s.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return ra(t,"discard")&&!o.isInRange(l)?null:l},m0=(function(e){function t(){return GSe(this,t),XSe(this,t,arguments)}return JSe(t,e),YSe(t,[{key:"render",value:function(){var r=this.props,i=r.x,s=r.y,o=r.r,l=r.alwaysShow,c=r.clipPathId,u=Zn(i),d=Zn(s);if(Os(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=tNe(this.props);if(!f)return null;var p=f.x,m=f.y,x=this.props,y=x.shape,v=x.className,b=ra(this.props,"hidden")?"url(#".concat(c,")"):void 0,w=tB(tB({clipPath:b},ct(this.props,!0)),{},{cx:p,cy:m});return ee.createElement(qt,{className:St("recharts-reference-dot",v)},t.renderDot(y,w),ar.renderCallByParent(this.props,{x:p-o,y:m-o,width:2*o,height:2*o}))}}])})(ee.Component);p0(m0,"displayName","ReferenceDot");p0(m0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});p0(m0,"renderDot",function(e,t){var n;return ee.isValidElement(e)?n=ee.cloneElement(e,t):yt(e)?n=e(t):n=ee.createElement(a0,ZP({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function ek(){return ek=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},ek.apply(this,arguments)}function vd(e){"@babel/helpers - typeof";return vd=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},vd(e)}function nB(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 rB(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nB(Object(n),!0).forEach(function(r){g0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rNe(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,gW(r.key),r)}}function iNe(e,t,n){return t&&rNe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sNe(e,t,n){return t=Kv(t),aNe(e,mW()?Reflect.construct(t,n||[],Kv(e).constructor):t.apply(e,n))}function aNe(e,t){if(t&&(vd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oNe(e)}function oNe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mW=function(){return!!e})()}function Kv(e){return Kv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kv(e)}function lNe(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&&tk(e,t)}function tk(e,t){return tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tk(e,t)}function g0(e,t,n){return t=gW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gW(e){var t=cNe(e,"string");return vd(t)=="symbol"?t:t+""}function cNe(e,t){if(vd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uNe=function(t,n,r,i,s){var o=s.x1,l=s.x2,c=s.y1,u=s.y2,d=s.xAxis,f=s.yAxis;if(!d||!f)return null;var p=zA({x:d.scale,y:f.scale}),m={x:t?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(c,{position:"start"}):p.y.rangeMin},x={x:n?p.x.apply(l,{position:"end"}):p.x.rangeMax,y:i?p.y.apply(u,{position:"end"}):p.y.rangeMax};return ra(s,"discard")&&(!p.isInRange(m)||!p.isInRange(x))?null:nW(m,x)},y0=(function(e){function t(){return nNe(this,t),sNe(this,t,arguments)}return lNe(t,e),iNe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,s=r.x2,o=r.y1,l=r.y2,c=r.className,u=r.alwaysShow,d=r.clipPathId;Os(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Zn(i),p=Zn(s),m=Zn(o),x=Zn(l),y=this.props.shape;if(!f&&!p&&!m&&!x&&!y)return null;var v=uNe(f,p,m,x,this.props);if(!v&&!y)return null;var b=ra(this.props,"hidden")?"url(#".concat(d,")"):void 0;return ee.createElement(qt,{className:St("recharts-reference-area",c)},t.renderRect(y,rB(rB({clipPath:b},ct(this.props,!0)),v)),ar.renderCallByParent(this.props,v))}}])})(ee.Component);g0(y0,"displayName","ReferenceArea");g0(y0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});g0(y0,"renderRect",function(e,t){var n;return ee.isValidElement(e)?n=ee.cloneElement(e,t):yt(e)?n=e(t):n=ee.createElement(qA,ek({},t,{className:"recharts-reference-area-rect"})),n});function yW(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 dNe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return gSe(r,n)}function fNe(e,t,n){var r=n==="width",i=e.x,s=e.y,o=e.width,l=e.height;return t===1?{start:r?i:s,end:r?i+o:s+l}:{start:r?i+o:s+l,end:r?i:s}}function Yv(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 hNe(e,t){return yW(e,t+1)}function pNe(e,t,n,r,i){for(var s=(r||[]).slice(),o=t.start,l=t.end,c=0,u=1,d=o,f=function(){var x=r==null?void 0:r[c];if(x===void 0)return{v:yW(r,u)};var y=c,v,b=function(){return v===void 0&&(v=n(x,y)),v},w=x.coordinate,N=c===0||Yv(e,w,b,d,l);N||(c=0,d=o,u+=1),N&&(d=w+e*(b()/2+i),c+=u)},p;u<=s.length;)if(p=f(),p)return p.v;return[]}function Op(e){"@babel/helpers - typeof";return Op=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},Op(e)}function iB(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 Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iB(Object(n),!0).forEach(function(r){mNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mNe(e,t,n){return t=gNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gNe(e){var t=yNe(e,"string");return Op(t)=="symbol"?t:t+""}function yNe(e,t){if(Op(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Op(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vNe(e,t,n,r,i){for(var s=(r||[]).slice(),o=s.length,l=t.start,c=t.end,u=function(p){var m=s[p],x,y=function(){return x===void 0&&(x=n(m,p)),x};if(p===o-1){var v=e*(m.coordinate+e*y()/2-c);s[p]=m=Or(Or({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else s[p]=m=Or(Or({},m),{},{tickCoord:m.coordinate});var b=Yv(e,m.tickCoord,y,l,c);b&&(c=m.tickCoord-e*(y()/2+i),s[p]=Or(Or({},m),{},{isShow:!0}))},d=o-1;d>=0;d--)u(d);return s}function xNe(e,t,n,r,i,s){var o=(r||[]).slice(),l=o.length,c=t.start,u=t.end;if(s){var d=r[l-1],f=n(d,l-1),p=e*(d.coordinate+e*f/2-u);o[l-1]=d=Or(Or({},d),{},{tickCoord:p>0?d.coordinate-p*e:d.coordinate});var m=Yv(e,d.tickCoord,function(){return f},c,u);m&&(u=d.tickCoord-e*(f/2+i),o[l-1]=Or(Or({},d),{},{isShow:!0}))}for(var x=s?l-1:l,y=function(w){var N=o[w],S,_=function(){return S===void 0&&(S=n(N,w)),S};if(w===0){var E=e*(N.coordinate-e*_()/2-c);o[w]=N=Or(Or({},N),{},{tickCoord:E<0?N.coordinate-E*e:N.coordinate})}else o[w]=N=Or(Or({},N),{},{tickCoord:N.coordinate});var k=Yv(e,N.tickCoord,_,c,u);k&&(c=N.tickCoord+e*(_()/2+i),o[w]=Or(Or({},N),{},{isShow:!0}))},v=0;v<x;v++)y(v);return o}function YA(e,t,n){var r=e.tick,i=e.ticks,s=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!i||!i.length||!r)return[];if(Le(c)||Cc.isSsr)return hNe(i,typeof c=="number"&&Le(c)?c:0);var p=[],m=l==="top"||l==="bottom"?"width":"height",x=d&&m==="width"?Ah(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},y=function(N,S){var _=yt(u)?u(N.value,S):N.value;return m==="width"?dNe(Ah(_,{fontSize:t,letterSpacing:n}),x,f):Ah(_,{fontSize:t,letterSpacing:n})[m]},v=i.length>=2?Wr(i[1].coordinate-i[0].coordinate):1,b=fNe(s,v,m);return c==="equidistantPreserveStart"?pNe(v,b,y,i,o):(c==="preserveStart"||c==="preserveStartEnd"?p=xNe(v,b,y,i,o,c==="preserveStartEnd"):p=vNe(v,b,y,i,o),p.filter(function(w){return w.isShow}))}var bNe=["viewBox"],wNe=["viewBox"],jNe=["ticks"];function xd(e){"@babel/helpers - typeof";return xd=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},xd(e)}function Eu(){return Eu=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},Eu.apply(this,arguments)}function sB(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 Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sB(Object(n),!0).forEach(function(r){XA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r_(e,t){if(e==null)return{};var n=SNe(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 SNe(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 NNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aB(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,xW(r.key),r)}}function _Ne(e,t,n){return t&&aB(e.prototype,t),n&&aB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ENe(e,t,n){return t=Xv(t),PNe(e,vW()?Reflect.construct(t,n||[],Xv(e).constructor):t.apply(e,n))}function PNe(e,t){if(t&&(xd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kNe(e)}function kNe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vW=function(){return!!e})()}function Xv(e){return Xv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xv(e)}function ONe(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&&nk(e,t)}function nk(e,t){return nk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nk(e,t)}function XA(e,t,n){return t=xW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xW(e){var t=ANe(e,"string");return xd(t)=="symbol"?t:t+""}function ANe(e,t){if(xd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gd=(function(e){function t(n){var r;return NNe(this,t),r=ENe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return ONe(t,e),_Ne(t,[{key:"shouldComponentUpdate",value:function(r,i){var s=r.viewBox,o=r_(r,bNe),l=this.props,c=l.viewBox,u=r_(l,wNe);return!ku(s,c)||!ku(o,u)||!ku(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,o=i.y,l=i.width,c=i.height,u=i.orientation,d=i.tickSize,f=i.mirror,p=i.tickMargin,m,x,y,v,b,w,N=f?-1:1,S=r.tickSize||d,_=Le(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=x=r.coordinate,v=o+ +!f*c,y=v-N*S,w=y-N*p,b=_;break;case"left":y=v=r.coordinate,x=s+ +!f*l,m=x-N*S,b=m-N*p,w=_;break;case"right":y=v=r.coordinate,x=s+ +f*l,m=x+N*S,b=m+N*p,w=_;break;default:m=x=r.coordinate,v=o+ +f*c,y=v+N*S,w=y+N*p,b=_;break}return{line:{x1:m,y1:y,x2:x,y2:v},tick:{x:b,y:w}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,o;switch(i){case"left":o=s?"start":"end";break;case"right":o=s?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=s?"start":"end";break;default:o=s?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,l=r.height,c=r.orientation,u=r.mirror,d=r.axisLine,f=Gn(Gn(Gn({},ct(this.props,!1)),ct(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var p=+(c==="top"&&!u||c==="bottom"&&u);f=Gn(Gn({},f),{},{x1:i,y1:s+p*l,x2:i+o,y2:s+p*l})}else{var m=+(c==="left"&&!u||c==="right"&&u);f=Gn(Gn({},f),{},{x1:i+m*o,y1:s,x2:i+m*o,y2:s+l})}return ee.createElement("line",Eu({},f,{className:St("recharts-cartesian-axis-line",Ci(d,"className"))}))}},{key:"renderTicks",value:function(r,i,s){var o=this,l=this.props,c=l.tickLine,u=l.stroke,d=l.tick,f=l.tickFormatter,p=l.unit,m=YA(Gn(Gn({},this.props),{},{ticks:r}),i,s),x=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),v=ct(this.props,!1),b=ct(d,!1),w=Gn(Gn({},v),{},{fill:"none"},ct(c,!1)),N=m.map(function(S,_){var E=o.getTickLineCoord(S),k=E.line,O=E.tick,I=Gn(Gn(Gn(Gn({textAnchor:x,verticalAnchor:y},v),{},{stroke:"none",fill:u},b),O),{},{index:_,payload:S,visibleTicksCount:m.length,tickFormatter:f});return ee.createElement(qt,Eu({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},gc(o.props,S,_)),c&&ee.createElement("line",Eu({},w,k,{className:St("recharts-cartesian-axis-tick-line",Ci(c,"className"))})),d&&t.renderTickItem(d,I,"".concat(yt(f)?f(S.value,_):S.value).concat(p||"")))});return ee.createElement("g",{className:"recharts-cartesian-axis-ticks"},N)}},{key:"render",value:function(){var r=this,i=this.props,s=i.axisLine,o=i.width,l=i.height,c=i.ticksGenerator,u=i.className,d=i.hide;if(d)return null;var f=this.props,p=f.ticks,m=r_(f,jNe),x=p;return yt(c)&&(x=p&&p.length>0?c(this.props):c(m)),o<=0||l<=0||!x||!x.length?null:ee.createElement(qt,{className:St("recharts-cartesian-axis",u),ref:function(v){r.layerReference=v}},s&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),ar.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,s){var o,l=St(i.className,"recharts-cartesian-axis-tick-value");return ee.isValidElement(r)?o=ee.cloneElement(r,Gn(Gn({},i),{},{className:l})):yt(r)?o=r(Gn(Gn({},i),{},{className:l})):o=ee.createElement(yc,Eu({},i,{className:"recharts-cartesian-axis-tick-value"}),s),o}}])})(T.Component);XA(Gd,"displayName","CartesianAxis");XA(Gd,"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 CNe=["x1","y1","x2","y2","key"],TNe=["offset"];function xc(e){"@babel/helpers - typeof";return xc=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},xc(e)}function oB(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 Ar(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oB(Object(n),!0).forEach(function(r){RNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RNe(e,t,n){return t=INe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function INe(e){var t=MNe(e,"string");return xc(t)=="symbol"?t:t+""}function MNe(e,t){if(xc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yl(){return Yl=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},Yl.apply(this,arguments)}function lB(e,t){if(e==null)return{};var n=DNe(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 DNe(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 LNe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,s=t.y,o=t.width,l=t.height,c=t.ry;return ee.createElement("rect",{x:i,y:s,ry:c,width:o,height:l,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function bW(e,t){var n;if(ee.isValidElement(e))n=ee.cloneElement(e,t);else if(yt(e))n=e(t);else{var r=t.x1,i=t.y1,s=t.x2,o=t.y2,l=t.key,c=lB(t,CNe),u=ct(c,!1);u.offset;var d=lB(u,TNe);n=ee.createElement("line",Yl({},d,{x1:r,y1:i,x2:s,y2:o,fill:"none",key:l}))}return n}function $Ne(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 o=s.map(function(l,c){var u=Ar(Ar({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(c),index:c});return bW(i,u)});return ee.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function BNe(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 o=s.map(function(l,c){var u=Ar(Ar({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(c),index:c});return bW(i,u)});return ee.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function FNe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,s=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=l.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==d[0]&&d.unshift(0);var f=d.map(function(p,m){var x=!d[m+1],y=x?i+o-p:d[m+1]-p;if(y<=0)return null;var v=m%t.length;return ee.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:y,width:s,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return ee.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function qNe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,s=e.x,o=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(function(p){return Math.round(p+s-s)}).sort(function(p,m){return p-m});s!==d[0]&&d.unshift(0);var f=d.map(function(p,m){var x=!d[m+1],y=x?s+l-p:d[m+1]-p;if(y<=0)return null;var v=m%r.length;return ee.createElement("rect",{key:"react-".concat(m),x:p,y:o,width:y,height:c,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return ee.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var zNe=function(t,n){var r=t.xAxis,i=t.width,s=t.height,o=t.offset;return bV(YA(Ar(Ar(Ar({},Gd.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.left,o.left+o.width,n)},UNe=function(t,n){var r=t.yAxis,i=t.width,s=t.height,o=t.offset;return bV(YA(Ar(Ar(Ar({},Gd.defaultProps),r),{},{ticks:Ra(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.top,o.top+o.height,n)},uu={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Cs(e){var t,n,r,i,s,o,l=WA(),c=HA(),u=ASe(),d=Ar(Ar({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:uu.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:uu.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:uu.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:uu.horizontalFill,vertical:(s=e.vertical)!==null&&s!==void 0?s:uu.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:uu.verticalFill,x:Le(e.x)?e.x:u.left,y:Le(e.y)?e.y:u.top,width:Le(e.width)?e.width:u.width,height:Le(e.height)?e.height:u.height}),f=d.x,p=d.y,m=d.width,x=d.height,y=d.syncWithTicks,v=d.horizontalValues,b=d.verticalValues,w=PSe(),N=kSe();if(!Le(m)||m<=0||!Le(x)||x<=0||!Le(f)||f!==+f||!Le(p)||p!==+p)return null;var S=d.verticalCoordinatesGenerator||zNe,_=d.horizontalCoordinatesGenerator||UNe,E=d.horizontalPoints,k=d.verticalPoints;if((!E||!E.length)&&yt(_)){var O=v&&v.length,I=_({yAxis:N?Ar(Ar({},N),{},{ticks:O?v:N.ticks}):void 0,width:l,height:c,offset:u},O?!0:y);Os(Array.isArray(I),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(xc(I),"]")),Array.isArray(I)&&(E=I)}if((!k||!k.length)&&yt(S)){var A=b&&b.length,C=S({xAxis:w?Ar(Ar({},w),{},{ticks:A?b:w.ticks}):void 0,width:l,height:c,offset:u},A?!0:y);Os(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(xc(C),"]")),Array.isArray(C)&&(k=C)}return ee.createElement("g",{className:"recharts-cartesian-grid"},ee.createElement(LNe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),ee.createElement($Ne,Yl({},d,{offset:u,horizontalPoints:E,xAxis:w,yAxis:N})),ee.createElement(BNe,Yl({},d,{offset:u,verticalPoints:k,xAxis:w,yAxis:N})),ee.createElement(FNe,Yl({},d,{horizontalPoints:E})),ee.createElement(qNe,Yl({},d,{verticalPoints:k})))}Cs.displayName="CartesianGrid";var VNe=["type","layout","connectNulls","ref"],WNe=["key"];function bd(e){"@babel/helpers - typeof";return bd=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},bd(e)}function cB(e,t){if(e==null)return{};var n=HNe(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 HNe(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 Dh(){return Dh=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},Dh.apply(this,arguments)}function uB(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 wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uB(Object(n),!0).forEach(function(r){Es(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function du(e){return XNe(e)||YNe(e)||KNe(e)||GNe()}function GNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 624In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KNe(e,t){if(e){if(typeof e=="string")return rk(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 rk(e,t)}}function YNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XNe(e){if(Array.isArray(e))return rk(e)}function rk(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 QNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dB(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,jW(r.key),r)}}function ZNe(e,t,n){return t&&dB(e.prototype,t),n&&dB(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JNe(e,t,n){return t=Qv(t),e_e(e,wW()?Reflect.construct(t,n||[],Qv(e).constructor):t.apply(e,n))}function e_e(e,t){if(t&&(bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t_e(e)}function t_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wW=function(){return!!e})()}function Qv(e){return Qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qv(e)}function n_e(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&&ik(e,t)}function ik(e,t){return ik=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ik(e,t)}function Es(e,t,n){return t=jW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jW(e){var t=r_e(e,"string");return bd(t)=="symbol"?t:t+""}function r_e(e,t){if(bd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cl=(function(e){function t(){var n;QNe(this,t);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=JNe(this,t,[].concat(i)),Es(n,"state",{isAnimationFinished:!0,totalLength:0}),Es(n,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),Es(n,"getStrokeDasharray",function(o,l,c){var u=c.reduce(function(b,w){return b+w});if(!u)return n.generateSimpleStrokeDasharray(l,o);for(var d=Math.floor(o/u),f=o%u,p=l-o,m=[],x=0,y=0;x<c.length;y+=c[x],++x)if(y+c[x]>f){m=[].concat(du(c.slice(0,x)),[f-y]);break}var v=m.length%2===0?[0,p]:[p];return[].concat(du(t.repeat(c,d)),du(m),v).map(function(b){return"".concat(b,"px")}).join(", ")}),Es(n,"id",zd("recharts-line-")),Es(n,"pathRef",function(o){n.mainCurve=o}),Es(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Es(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return n_e(t,e),ZNe(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,o=s.points,l=s.xAxis,c=s.yAxis,u=s.layout,d=s.children,f=Ti(d,mm);if(!f)return null;var p=function(y,v){return{x:y.x,y:y.y,value:y.value,errorVal:Xn(y.payload,v)}},m={clipPath:r?"url(#clipPath-".concat(i,")"):null};return ee.createElement(qt,m,f.map(function(x){return ee.cloneElement(x,{key:"bar-".concat(x.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,i,s){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,f=ct(this.props,!1),p=ct(c,!0),m=u.map(function(y,v){var b=wi(wi(wi({key:"dot-".concat(v),r:3},f),p),{},{index:v,cx:y.x,cy:y.y,value:y.value,dataKey:d,payload:y.payload,points:u});return t.renderDotItem(c,b)}),x={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(s,")"):null};return ee.createElement(qt,Dh({className:"recharts-line-dots",key:"dots"},x),m)}},{key:"renderCurveStatically",value:function(r,i,s,o){var l=this.props,c=l.type,u=l.layout,d=l.connectNulls;l.ref;var f=cB(l,VNe),p=wi(wi(wi({},ct(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(s,")"):null,points:r},o),{},{type:c,layout:u,connectNulls:d});return ee.createElement(Av,Dh({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var s=this,o=this.props,l=o.points,c=o.strokeDasharray,u=o.isAnimationActive,d=o.animationBegin,f=o.animationDuration,p=o.animationEasing,m=o.animationId,x=o.animateNewValues,y=o.width,v=o.height,b=this.state,w=b.prevPoints,N=b.totalLength;return ee.createElement(oa,{begin:d,duration:f,isActive:u,easing:p,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var _=S.t;if(w){var E=w.length/l.length,k=l.map(function(R,D){var q=Math.floor(D*E);if(w[q]){var F=w[q],H=_i(F.x,R.x),U=_i(F.y,R.y);return wi(wi({},R),{},{x:H(_),y:U(_)})}if(x){var W=_i(y*2,R.x),G=_i(v/2,R.y);return wi(wi({},R),{},{x:W(_),y:G(_)})}return wi(wi({},R),{},{x:R.x,y:R.y})});return s.renderCurveStatically(k,r,i)}var O=_i(0,N),I=O(_),A;if(c){var C="".concat(c).split(/[,\s]+/gim).map(function(R){return parseFloat(R)});A=s.getStrokeDasharray(I,N,C)}else A=s.generateSimpleStrokeDasharray(N,I);return s.renderCurveStatically(l,r,i,{strokeDasharray:A})})}},{key:"renderCurve",value:function(r,i){var s=this.props,o=s.points,l=s.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return l&&o&&o.length&&(!u&&d>0||!pm(u,o))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(o,r,i)}},{key:"render",value:function(){var r,i=this.props,s=i.hide,o=i.dot,l=i.points,c=i.className,u=i.xAxis,d=i.yAxis,f=i.top,p=i.left,m=i.width,x=i.height,y=i.isAnimationActive,v=i.id;if(s||!l||!l.length)return null;var b=this.state.isAnimationFinished,w=l.length===1,N=St("recharts-line",c),S=u&&u.allowDataOverflow,_=d&&d.allowDataOverflow,E=S||_,k=jt(v)?this.id:v,O=(r=ct(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},I=O.r,A=I===void 0?3:I,C=O.strokeWidth,R=C===void 0?2:C,D=Lde(o)?o:{},q=D.clipDot,F=q===void 0?!0:q,H=A*2+R;return ee.createElement(qt,{className:N},S||_?ee.createElement("defs",null,ee.createElement("clipPath",{id:"clipPath-".concat(k)},ee.createElement("rect",{x:S?p:p-m/2,y:_?f:f-x/2,width:S?m:m*2,height:_?x:x*2})),!F&&ee.createElement("clipPath",{id:"clipPath-dots-".concat(k)},ee.createElement("rect",{x:p-H/2,y:f-H/2,width:m+H,height:x+H}))):null,!w&&this.renderCurve(E,k),this.renderErrorBar(E,k),(w||o)&&this.renderDots(E,F,k),(!y||b)&&$a.renderCallByParent(this.props,l))}}],[{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(du(r),[0]):r,o=[],l=0;l<i;++l)o=[].concat(du(o),du(s));return o}},{key:"renderDotItem",value:function(r,i){var s;if(ee.isValidElement(r))s=ee.cloneElement(r,i);else if(yt(r))s=r(i);else{var o=i.key,l=cB(i,WNe),c=St("recharts-line-dot",typeof r!="boolean"?r.className:"");s=ee.createElement(a0,Dh({key:o},l,{className:c}))}return s}}])})(T.PureComponent);Es(cl,"displayName","Line");Es(cl,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Cc.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Es(cl,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,i=e.xAxisTicks,s=e.yAxisTicks,o=e.dataKey,l=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(p,m){var x=Xn(p,o);return d==="horizontal"?{x:h$({axis:n,ticks:i,bandSize:l,entry:p,index:m}),y:jt(x)?null:r.scale(x),value:x,payload:p}:{x:jt(x)?null:n.scale(x),y:h$({axis:r,ticks:s,bandSize:l,entry:p,index:m}),value:x,payload:p}});return wi({points:f,layout:d},u)});function wd(e){"@babel/helpers - typeof";return wd=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},wd(e)}function i_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s_e(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,_W(r.key),r)}}function a_e(e,t,n){return t&&s_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o_e(e,t,n){return t=Zv(t),l_e(e,SW()?Reflect.construct(t,n||[],Zv(e).constructor):t.apply(e,n))}function l_e(e,t){if(t&&(wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c_e(e)}function c_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SW=function(){return!!e})()}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}function u_e(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&&sk(e,t)}function sk(e,t){return sk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sk(e,t)}function NW(e,t,n){return t=_W(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _W(e){var t=d_e(e,"string");return wd(t)=="symbol"?t:t+""}function d_e(e,t){if(wd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ak(){return ak=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},ak.apply(this,arguments)}function f_e(e){var t=e.xAxisId,n=WA(),r=HA(),i=cW(t);return i==null?null:T.createElement(Gd,ak({},i,{className:St("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return Ra(o,!0)}}))}var Ir=(function(e){function t(){return i_e(this,t),o_e(this,t,arguments)}return u_e(t,e),a_e(t,[{key:"render",value:function(){return T.createElement(f_e,this.props)}}])})(T.Component);NW(Ir,"displayName","XAxis");NW(Ir,"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 jd(e){"@babel/helpers - typeof";return jd=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},jd(e)}function h_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p_e(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,kW(r.key),r)}}function m_e(e,t,n){return t&&p_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g_e(e,t,n){return t=Jv(t),y_e(e,EW()?Reflect.construct(t,n||[],Jv(e).constructor):t.apply(e,n))}function y_e(e,t){if(t&&(jd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v_e(e)}function v_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EW=function(){return!!e})()}function Jv(e){return Jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jv(e)}function x_e(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&&ok(e,t)}function ok(e,t){return ok=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ok(e,t)}function PW(e,t,n){return t=kW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kW(e){var t=b_e(e,"string");return jd(t)=="symbol"?t:t+""}function b_e(e,t){if(jd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function lk(){return lk=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},lk.apply(this,arguments)}var w_e=function(t){var n=t.yAxisId,r=WA(),i=HA(),s=uW(n);return s==null?null:T.createElement(Gd,lk({},s,{className:St("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(l){return Ra(l,!0)}}))},Mr=(function(e){function t(){return h_e(this,t),g_e(this,t,arguments)}return x_e(t,e),m_e(t,[{key:"render",value:function(){return T.createElement(w_e,this.props)}}])})(T.Component);PW(Mr,"displayName","YAxis");PW(Mr,"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 fB(e){return __e(e)||N_e(e)||S_e(e)||j_e()}function j_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 625In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S_e(e,t){if(e){if(typeof e=="string")return ck(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 ck(e,t)}}function N_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function __e(e){if(Array.isArray(e))return ck(e)}function ck(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 uk=function(t,n,r,i,s){var o=Ti(t,KA),l=Ti(t,m0),c=[].concat(fB(o),fB(l)),u=Ti(t,y0),d="".concat(i,"Id"),f=i[0],p=n;if(c.length&&(p=c.reduce(function(y,v){if(v.props[d]===r&&ra(v.props,"extendDomain")&&Le(v.props[f])){var b=v.props[f];return[Math.min(y[0],b),Math.max(y[1],b)]}return y},p)),u.length){var m="".concat(f,"1"),x="".concat(f,"2");p=u.reduce(function(y,v){if(v.props[d]===r&&ra(v.props,"extendDomain")&&Le(v.props[m])&&Le(v.props[x])){var b=v.props[m],w=v.props[x];return[Math.min(y[0],b,w),Math.max(y[1],b,w)]}return y},p)}return s&&s.length&&(p=s.reduce(function(y,v){return Le(v)?[Math.min(y[0],v),Math.max(y[1],v)]:y},p)),p},i_={exports:{}},hB;function E_e(){return hB||(hB=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function s(c,u,d,f,p){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new i(d,f||c,p),x=n?n+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],m]:c._events[x].push(m):(c._events[x]=m,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=n?n+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,m=f.length,x=new Array(m);p<m;p++)x[p]=f[p].fn;return x},l.prototype.listenerCount=function(u){var d=n?n+u:u,f=this._events[d];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,d,f,p,m,x){var y=n?n+u:u;if(!this._events[y])return!1;var v=this._events[y],b=arguments.length,w,N;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),b){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,d),!0;case 3:return v.fn.call(v.context,d,f),!0;case 4:return v.fn.call(v.context,d,f,p),!0;case 5:return v.fn.call(v.context,d,f,p,m),!0;case 6:return v.fn.call(v.context,d,f,p,m,x),!0}for(N=1,w=new Array(b-1);N<b;N++)w[N-1]=arguments[N];v.fn.apply(v.context,w)}else{var S=v.length,_;for(N=0;N<S;N++)switch(v[N].once&&this.removeListener(u,v[N].fn,void 0,!0),b){case 1:v[N].fn.call(v[N].context);break;case 2:v[N].fn.call(v[N].context,d);break;case 3:v[N].fn.call(v[N].context,d,f);break;case 4:v[N].fn.call(v[N].context,d,f,p);break;default:if(!w)for(_=1,w=new Array(b-1);_<b;_++)w[_-1]=arguments[_];v[N].fn.apply(v[N].context,w)}}return!0},l.prototype.on=function(u,d,f){return s(this,u,d,f,!1)},l.prototype.once=function(u,d,f){return s(this,u,d,f,!0)},l.prototype.removeListener=function(u,d,f,p){var m=n?n+u:u;if(!this._events[m])return this;if(!d)return o(this,m),this;var x=this._events[m];if(x.fn)x.fn===d&&(!p||x.once)&&(!f||x.context===f)&&o(this,m);else{for(var y=0,v=[],b=x.length;y<b;y++)(x[y].fn!==d||p&&!x[y].once||f&&x[y].context!==f)&&v.push(x[y]);v.length?this._events[m]=v.length===1?v[0]:v:o(this,m)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(i_)),i_.exports}var P_e=E_e();const k_e=Lt(P_e);var s_=new k_e,a_="recharts.syncMouseEvents";function Ap(e){"@babel/helpers - typeof";return Ap=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},Ap(e)}function O_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A_e(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,OW(r.key),r)}}function C_e(e,t,n){return t&&A_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function o_(e,t,n){return t=OW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OW(e){var t=T_e(e,"string");return Ap(t)=="symbol"?t:t+""}function T_e(e,t){if(Ap(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ap(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var R_e=(function(){function e(){O_e(this,e),o_(this,"activeIndex",0),o_(this,"coordinateList",[]),o_(this,"layout","horizontal")}return C_e(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,s=i===void 0?null:i,o=n.container,l=o===void 0?null:o,c=n.layout,u=c===void 0?null:c,d=n.offset,f=d===void 0?null:d,p=n.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(r=s??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??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,o=i.y,l=i.height,c=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,f=s+c+u,p=o+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:f,pageY:p})}}}])})();function I_e(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&&Le(r)&&Le(i))return!0}return!1}function M_e(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 AW(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,s=e.endAngle,o=on(t,n,r,i),l=on(t,n,r,s);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:s}}function D_e(e,t,n){var r,i,s,o;if(e==="horizontal")r=t.x,s=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,s=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,p=on(l,c,u,f),m=on(l,c,d,f);r=p.x,i=p.y,s=m.x,o=m.y}else return AW(t);return[{x:r,y:i},{x:s,y:o}]}function Cp(e){"@babel/helpers - typeof";return Cp=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},Cp(e)}function pB(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 ty(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pB(Object(n),!0).forEach(function(r){L_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L_e(e,t,n){return t=$_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $_e(e){var t=B_e(e,"string");return Cp(t)=="symbol"?t:t+""}function B_e(e,t){if(Cp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F_e(e){var t,n,r=e.element,i=e.tooltipEventType,s=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!s||!o||p!=="ScatterChart"&&i!=="axis")return null;var x,y=Av;if(p==="ScatterChart")x=o,y=l1e;else if(p==="BarChart")x=M_e(f,o,c,d),y=qA;else if(f==="radial"){var v=AW(o),b=v.cx,w=v.cy,N=v.radius,S=v.startAngle,_=v.endAngle;x={cx:b,cy:w,startAngle:S,endAngle:_,innerRadius:N,outerRadius:N},y=CV}else x={points:D_e(f,o,c)},y=Av;var E=ty(ty(ty(ty({stroke:"#ccc",pointerEvents:"none"},c),x),ct(m,!1)),{},{payload:l,payloadIndex:u,className:St("recharts-tooltip-cursor",m.className)});return T.isValidElement(m)?T.cloneElement(m,E):T.createElement(y,E)}var q_e=["item"],z_e=["children","className","width","height","style","compact","title","desc"];function Sd(e){"@babel/helpers - typeof";return Sd=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},Sd(e)}function Pu(){return Pu=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},Pu.apply(this,arguments)}function mB(e,t){return W_e(e)||V_e(e,t)||TW(e,t)||U_e()}function U_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 626In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,s,o,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,i=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function W_e(e){if(Array.isArray(e))return e}function gB(e,t){if(e==null)return{};var n=H_e(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 H_e(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 G_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K_e(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,RW(r.key),r)}}function Y_e(e,t,n){return t&&K_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function X_e(e,t,n){return t=ex(t),Q_e(e,CW()?Reflect.construct(t,n||[],ex(e).constructor):t.apply(e,n))}function Q_e(e,t){if(t&&(Sd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Z_e(e)}function Z_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CW=function(){return!!e})()}function ex(e){return ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ex(e)}function J_e(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&&dk(e,t)}function dk(e,t){return dk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dk(e,t)}function Nd(e){return nEe(e)||tEe(e)||TW(e)||eEe()}function eEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 627In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TW(e,t){if(e){if(typeof e=="string")return fk(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 fk(e,t)}}function tEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nEe(e){if(Array.isArray(e))return fk(e)}function fk(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 yB(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 be(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yB(Object(n),!0).forEach(function(r){ut(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yB(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ut(e,t,n){return t=RW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RW(e){var t=rEe(e,"string");return Sd(t)=="symbol"?t:t+""}function rEe(e,t){if(Sd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iEe={xAxis:["bottom","top"],yAxis:["left","right"]},sEe={width:"100%",height:"100%"},IW={x:0,y:0};function ny(e){return e}var aEe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},oEe=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 o=s.coordinate,l=i.radius;return be(be(be({},i),on(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var c=s.coordinate,u=i.angle;return be(be(be({},i),on(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return IW},v0=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,s=n.dataEndIndex,o=(r??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(Nd(l),Nd(u)):l},[]);return o.length>0?o:t&&t.length&&Le(i)&&Le(s)?t.slice(i,s+1):[]};function MW(e){return e==="number"?[0,"auto"]:void 0}var hk=function(t,n,r,i){var s=t.graphicalItems,o=t.tooltipAxis,l=v0(n,t);return r<0||!s||!s.length||r>=l.length?null:s.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var m=f===void 0?l:f;p=nv(m,o.dataKey,i)}else p=f&&f[r]||l[r];return p?[].concat(Nd(c),[_V(u,p)]):c},[])},vB=function(t,n,r,i){var s=i||{x:t.chartX,y:t.chartY},o=aEe(s,r),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=Rxe(o,l,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,p=hk(t,n,d,f),m=oEe(r,l,d,s);return{activeTooltipIndex:d,activeLabel:f,activePayload:p,activeCoordinate:m}}return null},lEe=function(t,n){var r=n.axes,i=n.graphicalItems,s=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,p=t.stackOffset,m=xV(d,s);return r.reduce(function(x,y){var v,b=y.type.defaultProps!==void 0?be(be({},y.type.defaultProps),y.props):y.props,w=b.type,N=b.dataKey,S=b.allowDataOverflow,_=b.allowDuplicatedCategory,E=b.scale,k=b.ticks,O=b.includeHidden,I=b[o];if(x[I])return x;var A=v0(t.data,{graphicalItems:i.filter(function(V){var z,Q=o in V.props?V.props[o]:(z=V.type.defaultProps)===null||z===void 0?void 0:z[o];return Q===I}),dataStartIndex:c,dataEndIndex:u}),C=A.length,R,D,q;I_e(b.domain,S,w)&&(R=PP(b.domain,null,S),m&&(w==="number"||E!=="auto")&&(q=Th(A,N,"category")));var F=MW(w);if(!R||R.length===0){var H,U=(H=b.domain)!==null&&H!==void 0?H:F;if(N){if(R=Th(A,N,w),w==="category"&&m){var W=Pde(R);_&&W?(D=R,R=qv(0,C)):_||(R=y$(U,R,y).reduce(function(V,z){return V.indexOf(z)>=0?V:[].concat(Nd(V),[z])},[]))}else if(w==="category")_?R=R.filter(function(V){return V!==""&&!jt(V)}):R=y$(U,R,y).reduce(function(V,z){return V.indexOf(z)>=0||z===""||jt(z)?V:[].concat(Nd(V),[z])},[]);else if(w==="number"){var G=$xe(A,i.filter(function(V){var z,Q,J=o in V.props?V.props[o]:(z=V.type.defaultProps)===null||z===void 0?void 0:z[o],Y="hide"in V.props?V.props.hide:(Q=V.type.defaultProps)===null||Q===void 0?void 0:Q.hide;return J===I&&(O||!Y)}),N,s,d);G&&(R=G)}m&&(w==="number"||E!=="auto")&&(q=Th(A,N,"category"))}else m?R=qv(0,C):l&&l[I]&&l[I].hasStack&&w==="number"?R=p==="expand"?[0,1]:NV(l[I].stackGroups,c,u):R=vV(A,i.filter(function(V){var z=o in V.props?V.props[o]:V.type.defaultProps[o],Q="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return z===I&&(O||!Q)}),w,d,!0);if(w==="number")R=uk(f,R,I,s,k),U&&(R=PP(U,R,S));else if(w==="category"&&U){var L=U,$=R.every(function(V){return L.indexOf(V)>=0});$&&(R=L)}}return be(be({},x),{},ut({},I,be(be({},b),{},{axisType:s,domain:R,categoricalDomain:q,duplicateDomain:D,originalDomain:(v=b.domain)!==null&&v!==void 0?v:F,isCategorical:m,layout:d})))},{})},cEe=function(t,n){var r=n.graphicalItems,i=n.Axis,s=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,p=v0(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),m=p.length,x=xV(d,s),y=-1;return r.reduce(function(v,b){var w=b.type.defaultProps!==void 0?be(be({},b.type.defaultProps),b.props):b.props,N=w[o],S=MW("number");if(!v[N]){y++;var _;return x?_=qv(0,m):l&&l[N]&&l[N].hasStack?(_=NV(l[N].stackGroups,c,u),_=uk(f,_,N,s)):(_=PP(S,vV(p,r.filter(function(E){var k,O,I=o in E.props?E.props[o]:(k=E.type.defaultProps)===null||k===void 0?void 0:k[o],A="hide"in E.props?E.props.hide:(O=E.type.defaultProps)===null||O===void 0?void 0:O.hide;return I===N&&!A}),"number",d),i.defaultProps.allowDataOverflow),_=uk(f,_,N,s)),be(be({},v),{},ut({},N,be(be({axisType:s},i.defaultProps),{},{hide:!0,orientation:Ci(iEe,"".concat(s,".").concat(y%2),null),domain:_,originalDomain:S,isCategorical:x,layout:d})))}return v},{})},uEe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,s=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.children,f="".concat(i,"Id"),p=Ti(d,s),m={};return p&&p.length?m=lEe(t,{axes:p,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(m=cEe(t,{Axis:s,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),m},dEe=function(t){var n=Oo(t),r=Ra(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:pA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Pv(n,r)}},xB=function(t){var n=t.children,r=t.defaultShowTooltip,i=Ni(n,pd),s=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},fEe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Da(n&&n.type);return r&&r.indexOf("Bar")>=0})},bB=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"}},hEe=function(t,n){var r=t.props,i=t.graphicalItems,s=t.xAxisMap,o=s===void 0?{}:s,l=t.yAxisMap,c=l===void 0?{}:l,u=r.width,d=r.height,f=r.children,p=r.margin||{},m=Ni(f,pd),x=Ni(f,lc),y=Object.keys(c).reduce(function(_,E){var k=c[E],O=k.orientation;return!k.mirror&&!k.hide?be(be({},_),{},ut({},O,_[O]+k.width)):_},{left:p.left||0,right:p.right||0}),v=Object.keys(o).reduce(function(_,E){var k=o[E],O=k.orientation;return!k.mirror&&!k.hide?be(be({},_),{},ut({},O,Ci(_,"".concat(O))+k.height)):_},{top:p.top||0,bottom:p.bottom||0}),b=be(be({},v),y),w=b.bottom;m&&(b.bottom+=m.props.height||pd.defaultProps.height),x&&n&&(b=Dxe(b,i,r,n));var N=u-b.left-b.right,S=d-b.top-b.bottom;return be(be({brushBottom:w},b),{},{width:Math.max(N,0),height:Math.max(S,0)})},pEe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},QA=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,s=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,p=function(b,w){var N=w.graphicalItems,S=w.stackGroups,_=w.offset,E=w.updateId,k=w.dataStartIndex,O=w.dataEndIndex,I=b.barSize,A=b.layout,C=b.barGap,R=b.barCategoryGap,D=b.maxBarSize,q=bB(A),F=q.numericAxisName,H=q.cateAxisName,U=fEe(N),W=[];return N.forEach(function(G,L){var $=v0(b.data,{graphicalItems:[G],dataStartIndex:k,dataEndIndex:O}),V=G.type.defaultProps!==void 0?be(be({},G.type.defaultProps),G.props):G.props,z=V.dataKey,Q=V.maxBarSize,J=V["".concat(F,"Id")],Y=V["".concat(H,"Id")],X={},ne=c.reduce(function(Be,je){var mt=w["".concat(je.axisType,"Map")],bt=V["".concat(je.axisType,"Id")];mt&&mt[bt]||je.axisType==="zAxis"||Zo();var wt=mt[bt];return be(be({},Be),{},ut(ut({},je.axisType,wt),"".concat(je.axisType,"Ticks"),Ra(wt)))},X),Z=ne[H],se=ne["".concat(H,"Ticks")],pe=S&&S[J]&&S[J].hasStack&&Gxe(G,S[J].stackGroups),oe=Da(G.type).indexOf("Bar")>=0,Oe=Pv(Z,se),$e=[],Ze=U&&Ixe({barSize:I,stackGroups:S,totalSize:pEe(ne,H)});if(oe){var xt,pt,ye=jt(Q)?D:Q,ve=(xt=(pt=Pv(Z,se,!0))!==null&&pt!==void 0?pt:ye)!==null&&xt!==void 0?xt:0;$e=Mxe({barGap:C,barCategoryGap:R,bandSize:ve!==Oe?ve:Oe,sizeList:Ze[Y],maxBarSize:ye}),ve!==Oe&&($e=$e.map(function(Be){return be(be({},Be),{},{position:be(be({},Be.position),{},{offset:Be.position.offset-ve/2})})}))}var Me=G&&G.type&&G.type.getComposedData;Me&&W.push({props:be(be({},Me(be(be({},ne),{},{displayedData:$,props:b,dataKey:z,item:G,bandSize:Oe,barPosition:$e,offset:_,stackedData:pe,layout:A,dataStartIndex:k,dataEndIndex:O}))),{},ut(ut(ut({key:G.key||"item-".concat(L)},F,ne[F]),H,ne[H]),"animationId",E)),childIndex:Fde(G,b.children),item:G})}),W},m=function(b,w){var N=b.props,S=b.dataStartIndex,_=b.dataEndIndex,E=b.updateId;if(!C4({props:N}))return null;var k=N.children,O=N.layout,I=N.stackOffset,A=N.data,C=N.reverseStackOrder,R=bB(O),D=R.numericAxisName,q=R.cateAxisName,F=Ti(k,r),H=Wxe(A,F,"".concat(D,"Id"),"".concat(q,"Id"),I,C),U=c.reduce(function(V,z){var Q="".concat(z.axisType,"Map");return be(be({},V),{},ut({},Q,uEe(N,be(be({},z),{},{graphicalItems:F,stackGroups:z.axisType===D&&H,dataStartIndex:S,dataEndIndex:_}))))},{}),W=hEe(be(be({},U),{},{props:N,graphicalItems:F}),w==null?void 0:w.legendBBox);Object.keys(U).forEach(function(V){U[V]=d(N,U[V],W,V.replace("Map",""),n)});var G=U["".concat(q,"Map")],L=dEe(G),$=p(N,be(be({},U),{},{dataStartIndex:S,dataEndIndex:_,updateId:E,graphicalItems:F,stackGroups:H,offset:W}));return be(be({formattedGraphicalItems:$,graphicalItems:F,offset:W,stackGroups:H},L),U)},x=(function(v){function b(w){var N,S,_;return G_e(this,b),_=X_e(this,b,[w]),ut(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ut(_,"accessibilityManager",new R_e),ut(_,"handleLegendBBoxUpdate",function(E){if(E){var k=_.state,O=k.dataStartIndex,I=k.dataEndIndex,A=k.updateId;_.setState(be({legendBBox:E},m({props:_.props,dataStartIndex:O,dataEndIndex:I,updateId:A},be(be({},_.state),{},{legendBBox:E}))))}}),ut(_,"handleReceiveSyncEvent",function(E,k,O){if(_.props.syncId===E){if(O===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(k)}}),ut(_,"handleBrushChange",function(E){var k=E.startIndex,O=E.endIndex;if(k!==_.state.dataStartIndex||O!==_.state.dataEndIndex){var I=_.state.updateId;_.setState(function(){return be({dataStartIndex:k,dataEndIndex:O},m({props:_.props,dataStartIndex:k,dataEndIndex:O,updateId:I},_.state))}),_.triggerSyncEvent({dataStartIndex:k,dataEndIndex:O})}}),ut(_,"handleMouseEnter",function(E){var k=_.getMouseInfo(E);if(k){var O=be(be({},k),{},{isTooltipActive:!0});_.setState(O),_.triggerSyncEvent(O);var I=_.props.onMouseEnter;yt(I)&&I(O,E)}}),ut(_,"triggeredAfterMouseMove",function(E){var k=_.getMouseInfo(E),O=k?be(be({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(O),_.triggerSyncEvent(O);var I=_.props.onMouseMove;yt(I)&&I(O,E)}),ut(_,"handleItemMouseEnter",function(E){_.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),ut(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),ut(_,"handleMouseMove",function(E){E.persist(),_.throttleTriggeredAfterMouseMove(E)}),ut(_,"handleMouseLeave",function(E){_.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};_.setState(k),_.triggerSyncEvent(k);var O=_.props.onMouseLeave;yt(O)&&O(k,E)}),ut(_,"handleOuterEvent",function(E){var k=Bde(E),O=Ci(_.props,"".concat(k));if(k&&yt(O)){var I,A;/.*touch.*/i.test(k)?A=_.getMouseInfo(E.changedTouches[0]):A=_.getMouseInfo(E),O((I=A)!==null&&I!==void 0?I:{},E)}}),ut(_,"handleClick",function(E){var k=_.getMouseInfo(E);if(k){var O=be(be({},k),{},{isTooltipActive:!0});_.setState(O),_.triggerSyncEvent(O);var I=_.props.onClick;yt(I)&&I(O,E)}}),ut(_,"handleMouseDown",function(E){var k=_.props.onMouseDown;if(yt(k)){var O=_.getMouseInfo(E);k(O,E)}}),ut(_,"handleMouseUp",function(E){var k=_.props.onMouseUp;if(yt(k)){var O=_.getMouseInfo(E);k(O,E)}}),ut(_,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),ut(_,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&_.handleMouseDown(E.changedTouches[0])}),ut(_,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&_.handleMouseUp(E.changedTouches[0])}),ut(_,"handleDoubleClick",function(E){var k=_.props.onDoubleClick;if(yt(k)){var O=_.getMouseInfo(E);k(O,E)}}),ut(_,"handleContextMenu",function(E){var k=_.props.onContextMenu;if(yt(k)){var O=_.getMouseInfo(E);k(O,E)}}),ut(_,"triggerSyncEvent",function(E){_.props.syncId!==void 0&&s_.emit(a_,_.props.syncId,E,_.eventEmitterSymbol)}),ut(_,"applySyncEvent",function(E){var k=_.props,O=k.layout,I=k.syncMethod,A=_.state.updateId,C=E.dataStartIndex,R=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)_.setState(be({dataStartIndex:C,dataEndIndex:R},m({props:_.props,dataStartIndex:C,dataEndIndex:R,updateId:A},_.state)));else if(E.activeTooltipIndex!==void 0){var D=E.chartX,q=E.chartY,F=E.activeTooltipIndex,H=_.state,U=H.offset,W=H.tooltipTicks;if(!U)return;if(typeof I=="function")F=I(W,E);else if(I==="value"){F=-1;for(var G=0;G<W.length;G++)if(W[G].value===E.activeLabel){F=G;break}}var L=be(be({},U),{},{x:U.left,y:U.top}),$=Math.min(D,L.x+L.width),V=Math.min(q,L.y+L.height),z=W[F]&&W[F].value,Q=hk(_.state,_.props.data,F),J=W[F]?{x:O==="horizontal"?W[F].coordinate:$,y:O==="horizontal"?V:W[F].coordinate}:IW;_.setState(be(be({},E),{},{activeLabel:z,activeCoordinate:J,activePayload:Q,activeTooltipIndex:F}))}else _.setState(E)}),ut(_,"renderCursor",function(E){var k,O=_.state,I=O.isTooltipActive,A=O.activeCoordinate,C=O.activePayload,R=O.offset,D=O.activeTooltipIndex,q=O.tooltipAxisBandSize,F=_.getTooltipEventType(),H=(k=E.props.active)!==null&&k!==void 0?k:I,U=_.props.layout,W=E.key||"_recharts-cursor";return ee.createElement(F_e,{key:W,activeCoordinate:A,activePayload:C,activeTooltipIndex:D,chartName:n,element:E,isActive:H,layout:U,offset:R,tooltipAxisBandSize:q,tooltipEventType:F})}),ut(_,"renderPolarAxis",function(E,k,O){var I=Ci(E,"type.axisType"),A=Ci(_.state,"".concat(I,"Map")),C=E.type.defaultProps,R=C!==void 0?be(be({},C),E.props):E.props,D=A&&A[R["".concat(I,"Id")]];return T.cloneElement(E,be(be({},D),{},{className:St(I,D.className),key:E.key||"".concat(k,"-").concat(O),ticks:Ra(D,!0)}))}),ut(_,"renderPolarGrid",function(E){var k=E.props,O=k.radialLines,I=k.polarAngles,A=k.polarRadius,C=_.state,R=C.radiusAxisMap,D=C.angleAxisMap,q=Oo(R),F=Oo(D),H=F.cx,U=F.cy,W=F.innerRadius,G=F.outerRadius;return T.cloneElement(E,{polarAngles:Array.isArray(I)?I:Ra(F,!0).map(function(L){return L.coordinate}),polarRadius:Array.isArray(A)?A:Ra(q,!0).map(function(L){return L.coordinate}),cx:H,cy:U,innerRadius:W,outerRadius:G,key:E.key||"polar-grid",radialLines:O})}),ut(_,"renderLegend",function(){var E=_.state.formattedGraphicalItems,k=_.props,O=k.children,I=k.width,A=k.height,C=_.props.margin||{},R=I-(C.left||0)-(C.right||0),D=gV({children:O,formattedGraphicalItems:E,legendWidth:R,legendContent:u});if(!D)return null;var q=D.item,F=gB(D,q_e);return T.cloneElement(q,be(be({},F),{},{chartWidth:I,chartHeight:A,margin:C,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),ut(_,"renderTooltip",function(){var E,k=_.props,O=k.children,I=k.accessibilityLayer,A=Ni(O,Nn);if(!A)return null;var C=_.state,R=C.isTooltipActive,D=C.activeCoordinate,q=C.activePayload,F=C.activeLabel,H=C.offset,U=(E=A.props.active)!==null&&E!==void 0?E:R;return T.cloneElement(A,{viewBox:be(be({},H),{},{x:H.left,y:H.top}),active:U,label:F,payload:U?q:[],coordinate:D,accessibilityLayer:I})}),ut(_,"renderBrush",function(E){var k=_.props,O=k.margin,I=k.data,A=_.state,C=A.offset,R=A.dataStartIndex,D=A.dataEndIndex,q=A.updateId;return T.cloneElement(E,{key:E.key||"_recharts-brush",onChange:Qg(_.handleBrushChange,E.props.onChange),data:I,x:Le(E.props.x)?E.props.x:C.left,y:Le(E.props.y)?E.props.y:C.top+C.height+C.brushBottom-(O.bottom||0),width:Le(E.props.width)?E.props.width:C.width,startIndex:R,endIndex:D,updateId:"brush-".concat(q)})}),ut(_,"renderReferenceElement",function(E,k,O){if(!E)return null;var I=_,A=I.clipPathId,C=_.state,R=C.xAxisMap,D=C.yAxisMap,q=C.offset,F=E.type.defaultProps||{},H=E.props,U=H.xAxisId,W=U===void 0?F.xAxisId:U,G=H.yAxisId,L=G===void 0?F.yAxisId:G;return T.cloneElement(E,{key:E.key||"".concat(k,"-").concat(O),xAxis:R[W],yAxis:D[L],viewBox:{x:q.left,y:q.top,width:q.width,height:q.height},clipPathId:A})}),ut(_,"renderActivePoints",function(E){var k=E.item,O=E.activePoint,I=E.basePoint,A=E.childIndex,C=E.isRange,R=[],D=k.props.key,q=k.item.type.defaultProps!==void 0?be(be({},k.item.type.defaultProps),k.item.props):k.item.props,F=q.activeDot,H=q.dataKey,U=be(be({index:A,dataKey:H,cx:O.x,cy:O.y,r:4,fill:FA(k.item),strokeWidth:2,stroke:"#fff",payload:O.payload,value:O.value},ct(F,!1)),rv(F));return R.push(b.renderActiveDot(F,U,"".concat(D,"-activePoint-").concat(A))),I?R.push(b.renderActiveDot(F,be(be({},U),{},{cx:I.x,cy:I.y}),"".concat(D,"-basePoint-").concat(A))):C&&R.push(null),R}),ut(_,"renderGraphicChild",function(E,k,O){var I=_.filterFormatItem(E,k,O);if(!I)return null;var A=_.getTooltipEventType(),C=_.state,R=C.isTooltipActive,D=C.tooltipAxis,q=C.activeTooltipIndex,F=C.activeLabel,H=_.props.children,U=Ni(H,Nn),W=I.props,G=W.points,L=W.isRange,$=W.baseLine,V=I.item.type.defaultProps!==void 0?be(be({},I.item.type.defaultProps),I.item.props):I.item.props,z=V.activeDot,Q=V.hide,J=V.activeBar,Y=V.activeShape,X=!!(!Q&&R&&U&&(z||J||Y)),ne={};A!=="axis"&&U&&U.props.trigger==="click"?ne={onClick:Qg(_.handleItemMouseEnter,E.props.onClick)}:A!=="axis"&&(ne={onMouseLeave:Qg(_.handleItemMouseLeave,E.props.onMouseLeave),onMouseEnter:Qg(_.handleItemMouseEnter,E.props.onMouseEnter)});var Z=T.cloneElement(E,be(be({},I.props),ne));function se(je){return typeof D.dataKey=="function"?D.dataKey(je.payload):null}if(X)if(q>=0){var pe,oe;if(D.dataKey&&!D.allowDuplicatedCategory){var Oe=typeof D.dataKey=="function"?se:"payload.".concat(D.dataKey.toString());pe=nv(G,Oe,F),oe=L&&$&&nv($,Oe,F)}else pe=G==null?void 0:G[q],oe=L&&$&&$[q];if(Y||J){var $e=E.props.activeIndex!==void 0?E.props.activeIndex:q;return[T.cloneElement(E,be(be(be({},I.props),ne),{},{activeIndex:$e})),null,null]}if(!jt(pe))return[Z].concat(Nd(_.renderActivePoints({item:I,activePoint:pe,basePoint:oe,childIndex:q,isRange:L})))}else{var Ze,xt=(Ze=_.getItemByXY(_.state.activeCoordinate))!==null&&Ze!==void 0?Ze:{graphicalItem:Z},pt=xt.graphicalItem,ye=pt.item,ve=ye===void 0?E:ye,Me=pt.childIndex,Be=be(be(be({},I.props),ne),{},{activeIndex:Me});return[T.cloneElement(ve,Be),null,null]}return L?[Z,null,null]:[Z,null]}),ut(_,"renderCustomized",function(E,k,O){return T.cloneElement(E,be(be({key:"recharts-customized-".concat(O)},_.props),_.state))}),ut(_,"renderMap",{CartesianGrid:{handler:ny,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:ny},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:ny},YAxis:{handler:ny},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((N=w.id)!==null&&N!==void 0?N:zd("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=p9(_.triggeredAfterMouseMove,(S=w.throttleDelay)!==null&&S!==void 0?S:1e3/60),_.state={},_}return J_e(b,v),Y_e(b,[{key:"componentDidMount",value:function(){var N,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var N=this.props,S=N.children,_=N.data,E=N.height,k=N.layout,O=Ni(S,Nn);if(O){var I=O.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,C=hk(this.state,_,I,A),R=this.state.tooltipTicks[I].coordinate,D=(this.state.offset.top+E)/2,q=k==="horizontal",F=q?{x:R,y:D}:{y:R,x:D},H=this.state.formattedGraphicalItems.find(function(W){var G=W.item;return G.type.name==="Scatter"});H&&(F=be(be({},F),H.props.points[I].tooltipPosition),C=H.props.points[I].tooltipPayload);var U={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:A,activePayload:C,activeCoordinate:F};this.setState(U),this.renderCursor(O),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(N,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==N.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==N.margin){var _,E;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(N){YE([Ni(N.children,Nn)],[Ni(this.props.children,Nn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var N=Ni(this.props.children,Nn);if(N&&typeof N.props.shared=="boolean"){var S=N.props.shared?"axis":"item";return l.indexOf(S)>=0?S:s}return s}},{key:"getMouseInfo",value:function(N){if(!this.container)return null;var S=this.container,_=S.getBoundingClientRect(),E=Eme(_),k={chartX:Math.round(N.pageX-E.left),chartY:Math.round(N.pageY-E.top)},O=_.width/S.offsetWidth||1,I=this.inRange(k.chartX,k.chartY,O);if(!I)return null;var A=this.state,C=A.xAxisMap,R=A.yAxisMap,D=this.getTooltipEventType(),q=vB(this.state,this.props.data,this.props.layout,I);if(D!=="axis"&&C&&R){var F=Oo(C).scale,H=Oo(R).scale,U=F&&F.invert?F.invert(k.chartX):null,W=H&&H.invert?H.invert(k.chartY):null;return be(be({},k),{},{xValue:U,yValue:W},q)}return q?be(be({},k),q):null}},{key:"inRange",value:function(N,S){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,k=N/_,O=S/_;if(E==="horizontal"||E==="vertical"){var I=this.state.offset,A=k>=I.left&&k<=I.left+I.width&&O>=I.top&&O<=I.top+I.height;return A?{x:k,y:O}:null}var C=this.state,R=C.angleAxisMap,D=C.radiusAxisMap;if(R&&D){var q=Oo(R);return b$({x:k,y:O},q)}return null}},{key:"parseEventsOfWrapper",value:function(){var N=this.props.children,S=this.getTooltipEventType(),_=Ni(N,Nn),E={};_&&S==="axis"&&(_.props.trigger==="click"?E={onClick:this.handleClick}:E={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=rv(this.props,this.handleOuterEvent);return be(be({},k),E)}},{key:"addListener",value:function(){s_.on(a_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s_.removeListener(a_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(N,S,_){for(var E=this.state.formattedGraphicalItems,k=0,O=E.length;k<O;k++){var I=E[k];if(I.item===N||I.props.key===N.key||S===Da(I.item.type)&&_===I.childIndex)return I}return null}},{key:"renderClipPath",value:function(){var N=this.clipPathId,S=this.state.offset,_=S.left,E=S.top,k=S.height,O=S.width;return ee.createElement("defs",null,ee.createElement("clipPath",{id:N},ee.createElement("rect",{x:_,y:E,height:k,width:O})))}},{key:"getXScales",value:function(){var N=this.state.xAxisMap;return N?Object.entries(N).reduce(function(S,_){var E=mB(_,2),k=E[0],O=E[1];return be(be({},S),{},ut({},k,O.scale))},{}):null}},{key:"getYScales",value:function(){var N=this.state.yAxisMap;return N?Object.entries(N).reduce(function(S,_){var E=mB(_,2),k=E[0],O=E[1];return be(be({},S),{},ut({},k,O.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(N){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[N])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(N){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[N])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(N){var S=this.state,_=S.formattedGraphicalItems,E=S.activeItem;if(_&&_.length)for(var k=0,O=_.length;k<O;k++){var I=_[k],A=I.props,C=I.item,R=C.type.defaultProps!==void 0?be(be({},C.type.defaultProps),C.props):C.props,D=Da(C.type);if(D==="Bar"){var q=(A.data||[]).find(function(W){return zwe(N,W)});if(q)return{graphicalItem:I,payload:q}}else if(D==="RadialBar"){var F=(A.data||[]).find(function(W){return b$(N,W)});if(F)return{graphicalItem:I,payload:F}}else if(d0(I,E)||f0(I,E)||_p(I,E)){var H=dje({graphicalItem:I,activeTooltipItem:E,itemData:R.data}),U=R.activeIndex===void 0?H:R.activeIndex;return{graphicalItem:be(be({},I),{},{childIndex:U}),payload:_p(I,E)?R.data[H]:I.props.data[H]}}}return null}},{key:"render",value:function(){var N=this;if(!C4(this))return null;var S=this.props,_=S.children,E=S.className,k=S.width,O=S.height,I=S.style,A=S.compact,C=S.title,R=S.desc,D=gB(S,z_e),q=ct(D,!1);if(A)return ee.createElement(X6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ee.createElement(QE,Pu({},q,{width:k,height:O,title:C,desc:R}),this.renderClipPath(),R4(_,this.renderMap)));if(this.props.accessibilityLayer){var F,H;q.tabIndex=(F=this.props.tabIndex)!==null&&F!==void 0?F:0,q.role=(H=this.props.role)!==null&&H!==void 0?H:"application",q.onKeyDown=function(W){N.accessibilityManager.keyboardEvent(W)},q.onFocus=function(){N.accessibilityManager.focus()}}var U=this.parseEventsOfWrapper();return ee.createElement(X6,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ee.createElement("div",Pu({className:St("recharts-wrapper",E),style:be({position:"relative",cursor:"default",width:k,height:O},I)},U,{ref:function(G){N.container=G}}),ee.createElement(QE,Pu({},q,{width:k,height:O,title:C,desc:R,style:sEe}),this.renderClipPath(),R4(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(T.Component);ut(x,"displayName",n),ut(x,"defaultProps",be({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),ut(x,"getDerivedStateFromProps",function(v,b){var w=v.dataKey,N=v.data,S=v.children,_=v.width,E=v.height,k=v.layout,O=v.stackOffset,I=v.margin,A=b.dataStartIndex,C=b.dataEndIndex;if(b.updateId===void 0){var R=xB(v);return be(be(be({},R),{},{updateId:0},m(be(be({props:v},R),{},{updateId:0}),b)),{},{prevDataKey:w,prevData:N,prevWidth:_,prevHeight:E,prevLayout:k,prevStackOffset:O,prevMargin:I,prevChildren:S})}if(w!==b.prevDataKey||N!==b.prevData||_!==b.prevWidth||E!==b.prevHeight||k!==b.prevLayout||O!==b.prevStackOffset||!ku(I,b.prevMargin)){var D=xB(v),q={chartX:b.chartX,chartY:b.chartY,isTooltipActive:b.isTooltipActive},F=be(be({},vB(b,N,k)),{},{updateId:b.updateId+1}),H=be(be(be({},D),q),F);return be(be(be({},H),m(be({props:v},H),b)),{},{prevDataKey:w,prevData:N,prevWidth:_,prevHeight:E,prevLayout:k,prevStackOffset:O,prevMargin:I,prevChildren:S})}if(!YE(S,b.prevChildren)){var U,W,G,L,$=Ni(S,pd),V=$&&(U=(W=$.props)===null||W===void 0?void 0:W.startIndex)!==null&&U!==void 0?U:A,z=$&&(G=(L=$.props)===null||L===void 0?void 0:L.endIndex)!==null&&G!==void 0?G:C,Q=V!==A||z!==C,J=!jt(N),Y=J&&!Q?b.updateId:b.updateId+1;return be(be({updateId:Y},m(be(be({props:v},b),{},{updateId:Y,dataStartIndex:V,dataEndIndex:z}),b)),{},{prevChildren:S,dataStartIndex:V,dataEndIndex:z})}return null}),ut(x,"renderActiveDot",function(v,b,w){var N;return T.isValidElement(v)?N=T.cloneElement(v,b):yt(v)?N=v(b):N=ee.createElement(a0,b),ee.createElement(qt,{className:"recharts-active-dot",key:w},N)});var y=T.forwardRef(function(b,w){return ee.createElement(x,Pu({},b,{ref:w}))});return y.displayName=x.displayName,y},x0=QA({chartName:"LineChart",GraphicalChild:cl,axisComponents:[{axisType:"xAxis",AxisComp:Ir},{axisType:"yAxis",AxisComp:Mr}],formatAxisMap:tW}),Ha=QA({chartName:"BarChart",GraphicalChild:Qr,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ir},{axisType:"yAxis",AxisComp:Mr}],formatAxisMap:tW}),mEe=QA({chartName:"PieChart",GraphicalChild:eo,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:u0},{axisType:"radiusAxis",AxisComp:l0}],formatAxisMap:r0e,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}
627);function wB({title:e,data:t,type:n="line",dataKeys:r,colors:i}){const s=n==="bar"?Ha:x0,o=n==="bar"?Qr:cl;return a.jsxs(de,{className:"border-slate-200",children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-lg",children:e})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:300,children:a.jsxs(s,{data:t,children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),a.jsx(Ir,{dataKey:"date",tick:{fill:"#64748b",fontSize:12},stroke:"#94a3b8"}),a.jsx(Mr,{tick:{fill:"#64748b",fontSize:12},stroke:"#94a3b8"}),a.jsx(Nn,{contentStyle:{backgroundColor:"white",border:"1px solid #e2e8f0",borderRadius:"8px",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"}}),a.jsx(lc,{}),r.map((l,c)=>a.jsx(o,{type:"monotone",dataKey:l,stroke:i[c],fill:i[c],strokeWidth:2,dot:{fill:i[c],r:4},activeDot:{r:6}},l))]})})})]})}const gEe=Yp("inline-flex items-center rounded-md 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 shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Se({className:e,variant:t,...n}){return a.jsx("div",{className:Ot(gEe({variant:t}),e),...n})}function yEe({posts:e}){return a.jsxs(de,{className:"border-slate-200",children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Xr,{className:"w-5 h-5 text-indigo-600"}),"Top Performing Posts"]})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-3",children:e.map((t,n)=>a.jsxs("div",{className:"flex items-center justify-between p-4 rounded-xl border border-slate-100 hover:bg-slate-50 transition-colors",children:[a.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[a.jsxs("div",{className:"text-2xl font-bold text-slate-300",children:["#",n+1]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("h4",{className:"font-semibold text-slate-900 mb-1 truncate",children:t.title}),a.jsxs("div",{className:"flex items-center gap-3 text-sm text-slate-500",children:[a.jsxs("span",{children:[t.views.toLocaleString()," views"]}),a.jsx("span",{children:"â¢"}),a.jsxs("span",{children:[t.avgTime,"s avg time"]}),a.jsx("span",{children:"â¢"}),a.jsxs(Se,{variant:"secondary",className:"text-xs",children:[t.bounceRate,"% bounce"]})]})]})]}),a.jsx(ft,{to:Xe("BlogPost")+`?slug=${t.slug}`,target:"_blank",children:a.jsx(ae,{variant:"ghost",size:"sm",children:a.jsx(Gu,{className:"w-4 h-4"})})})]},t.id))})})]})}function vEe({posts:e,analytics:t}){const n={};e.forEach(i=>{n[i.category]||(n[i.category]={views:0,posts:0}),n[i.category].posts+=1}),t.forEach(i=>{const s=e.find(o=>o.id===i.post_id);s!=null&&s.category&&n[s.category]&&(n[s.category].views+=i.page_views||0)});const r=Object.entries(n).map(([i,s])=>({name:i.replace("-"," "),views:s.views,posts:s.posts})).sort((i,s)=>s.views-i.views);return a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{children:"Performance by Category"})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:300,children:a.jsxs(Ha,{data:r,children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),a.jsx(Ir,{dataKey:"name",tick:{fontSize:12}}),a.jsx(Mr,{}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"views",fill:"#6366f1",radius:[8,8,0,0]})]})})})]})}const jB=["#6366f1","#10b981","#8b5cf6","#f59e0b"];function xEe({analytics:e}){const t={};e.forEach(i=>{const s=i.referral_sources||{};Object.entries(s).forEach(([o,l])=>{t[o]=(t[o]||0)+l})});const n=Object.entries(t).map(([i,s])=>({name:i.charAt(0).toUpperCase()+i.slice(1),value:s})),r=n.length>0?n:[{name:"Organic Search",value:450},{name:"Direct",value:250},{name:"Social Media",value:200},{name:"Referral",value:100}];return a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{children:"Traffic Sources"})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:300,children:a.jsxs(mEe,{children:[a.jsx(eo,{data:r,cx:"50%",cy:"50%",labelLine:!1,label:({name:i,percent:s})=>`${i}: ${(s*100).toFixed(0)}%`,outerRadius:80,fill:"#8884d8",dataKey:"value",children:r.map((i,s)=>a.jsx(cm,{fill:jB[s%jB.length]},`cell-${s}`))}),a.jsx(Nn,{})]})})})]})}function bEe({subscribers:e}){const t=Array.from({length:7},(s,o)=>{const l=new Date;return l.setDate(l.getDate()-(6-o)),{date:l.toLocaleDateString("en-US",{month:"short",day:"numeric"}),subscriptions:Math.floor(Math.random()*15)+5,visitors:Math.floor(Math.random()*200)+100}}),n=(e==null?void 0:e.length)||0,r=(e==null?void 0:e.filter(s=>s.status==="active").length)||0,i=n>0?(r/500*100).toFixed(2):0;return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Total Subscribers"}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:n})]}),a.jsx(Is,{className:"w-8 h-8 text-indigo-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Active Subscribers"}),a.jsx("p",{className:"text-2xl font-bold text-emerald-600",children:r})]}),a.jsx(xr,{className:"w-8 h-8 text-emerald-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Conversion Rate"}),a.jsxs("p",{className:"text-2xl font-bold text-purple-600",children:[i,"%"]})]}),a.jsx(Xr,{className:"w-8 h-8 text-purple-500"})]})})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-lg",children:"Subscription Trends"})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:250,children:a.jsxs(x0,{data:t,children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),a.jsx(Ir,{dataKey:"date",tick:{fontSize:12}}),a.jsx(Mr,{}),a.jsx(Nn,{}),a.jsx(cl,{type:"monotone",dataKey:"subscriptions",stroke:"#6366f1",strokeWidth:2})]})})})]})]})}function wEe({demographics:e}){const t={mobile:(e==null?void 0:e.filter(i=>i.device_type==="mobile").length)||45,desktop:(e==null?void 0:e.filter(i=>i.device_type==="desktop").length)||40,tablet:(e==null?void 0:e.filter(i=>i.device_type==="tablet").length)||15},n=[{country:"United States",count:1250},{country:"United Kingdom",count:890},{country:"Canada",count:650},{country:"Germany",count:520},{country:"India",count:480}],r=[{name:"Chrome",percentage:65},{name:"Safari",percentage:20},{name:"Firefox",percentage:10},{name:"Edge",percentage:5}];return a.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(FJ,{className:"w-5 h-5 text-indigo-600"}),"Device Breakdown"]})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-3",children:Object.entries(t).map(([i,s])=>{const o=t.mobile+t.desktop+t.tablet,l=(s/o*100).toFixed(0);return a.jsxs("div",{className:"space-y-1",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-slate-700 capitalize",children:i}),a.jsxs("span",{className:"font-semibold text-slate-900",children:[l,"%"]})]}),a.jsx("div",{className:"w-full bg-slate-100 rounded-full h-2",children:a.jsx("div",{className:"h-2 rounded-full bg-indigo-500",style:{width:`${l}%`}})})]},i)})})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(RJ,{className:"w-5 h-5 text-emerald-600"}),"Top Locations"]})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-2",children:n.map((i,s)=>a.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-slate-50",children:[a.jsx("span",{className:"text-sm text-slate-700",children:i.country}),a.jsx(Se,{variant:"secondary",children:i.count})]},s))})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(e8,{className:"w-5 h-5 text-blue-600"}),"Browser Distribution"]})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-3",children:r.map((i,s)=>a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm text-slate-700",children:i.name}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-24 bg-slate-100 rounded-full h-2",children:a.jsx("div",{className:"h-2 rounded-full bg-blue-500",style:{width:`${i.percentage}%`}})}),a.jsxs("span",{className:"text-sm font-semibold text-slate-900 w-10 text-right",children:[i.percentage,"%"]})]})]},s))})})]})]})}function jEe({posts:e,analytics:t,engagements:n=[]}){const r=e.map(c=>{const u=t.find(x=>x.post_id===c.id),d=n.filter(x=>x.post_id===c.id),f=d.length>0?Math.round(d.reduce((x,y)=>x+(y.time_spent||0),0)/d.length):0,p=d.length>0?Math.round(d.reduce((x,y)=>x+(y.scroll_depth||0),0)/d.length):0,m=d.reduce((x,y)=>x+(y.shares||0),0);return{title:c.title.substring(0,30)+"...",timeSpent:f,scrollDepth:p,shares:m,views:(u==null?void 0:u.page_views)||0}}).slice(0,10),i=n.reduce((c,u)=>c+(u.time_spent||0),0),s=n.length>0?Math.round(i/n.length):0,o=n.length>0?Math.round(n.reduce((c,u)=>c+(u.scroll_depth||0),0)/n.length):0,l=n.reduce((c,u)=>c+(u.shares||0),0);return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Avg Time Spent"}),a.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[s,"s"]})]}),a.jsx(Rn,{className:"w-8 h-8 text-blue-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Avg Scroll Depth"}),a.jsxs("p",{className:"text-2xl font-bold text-emerald-600",children:[o,"%"]})]}),a.jsx(n8,{className:"w-8 h-8 text-emerald-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Total Shares"}),a.jsx("p",{className:"text-2xl font-bold text-purple-600",children:l})]}),a.jsx(Ad,{className:"w-8 h-8 text-purple-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Sessions"}),a.jsx("p",{className:"text-2xl font-bold text-indigo-600",children:n.length})]}),a.jsx(Qn,{className:"w-8 h-8 text-indigo-500"})]})})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-lg",children:"Post Engagement - Time Spent"})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:300,children:a.jsxs(Ha,{data:r,children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),a.jsx(Ir,{dataKey:"title",tick:{fontSize:10},angle:-45,textAnchor:"end",height:80}),a.jsx(Mr,{}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"timeSpent",fill:"#6366f1",name:"Avg Time (s)"})]})})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-lg",children:"Scroll Depth by Post"})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:300,children:a.jsxs(x0,{data:r,children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#e2e8f0"}),a.jsx(Ir,{dataKey:"title",tick:{fontSize:10},angle:-45,textAnchor:"end",height:80}),a.jsx(Mr,{}),a.jsx(Nn,{}),a.jsx(cl,{type:"monotone",dataKey:"scrollDepth",stroke:"#10b981",strokeWidth:2,name:"Scroll Depth %"})]})})})]})]})}const Ye=T.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:Ot("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Ye.displayName="Input";var SEe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tt=SEe.reduce((e,t)=>
vendor: 44,040 bytes, line 627
627{const n=Xu(`Primitive.${t}`),r=T.forwardRef((i,s)=>{const{asChild:o,...l}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function NEe(e,t){e&&_c.flushSync(()=>e.dispatchEvent(t))}var _Ee="Label",DW=T.forwardRef((e,t)=>a.jsx(Tt.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())}}));DW.displayName=_Ee;var LW=DW;const EEe=Yp("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),De=T.forwardRef(({className:e,...t},n)=>a.jsx(LW,{ref:n,className:Ot(EEe(),e),...t}));De.displayName=LW.displayName;const dn=T.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:Ot("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));dn.displayName="Textarea";function SB(e,[t,n]){return Math.min(n,Math.max(t,e))}function Mt(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 PEe(e,t){const n=T.createContext(t),r=s=>{const{children:o,...l}=s,c=T.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(s){const o=T.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function ul(e,t=[]){let n=[];function r(s,o){const l=T.createContext(o),c=n.length;n=[...n,o];const u=f=>{var b;const{scope:p,children:m,...x}=f,y=((b=p==null?void 0:p[e])==null?void 0:b[c])||l,v=T.useMemo(()=>x,Object.values(x));return a.jsx(y.Provider,{value:v,children:m})};u.displayName=s+"Provider";function d(f,p){var y;const m=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,x=T.useContext(m);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const i=()=>{const s=n.map(o=>T.createContext(o));return function(l){const c=(l==null?void 0:l[e])||s;return T.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[r,kEe(i,...t)]}function kEe(...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 o=r.reduce((l,{useScope:c,scopeName:u})=>{const f=c(s)[`__scope${u}`];return{...l,...f}},{});return T.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function $W(e){const t=e+"CollectionProvider",[n,r]=ul(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:v,children:b}=y,w=ee.useRef(null),N=ee.useRef(new Map).current;return a.jsx(i,{scope:v,itemMap:N,collectionRef:w,children:b})};o.displayName=t;const l=e+"CollectionSlot",c=Xu(l),u=ee.forwardRef((y,v)=>{const{scope:b,children:w}=y,N=s(l,b),S=gn(v,N.collectionRef);return a.jsx(c,{ref:S,children:w})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Xu(d),m=ee.forwardRef((y,v)=>{const{scope:b,children:w,...N}=y,S=ee.useRef(null),_=gn(v,S),E=s(d,b);return ee.useEffect(()=>(E.itemMap.set(S,{ref:S,...N}),()=>void E.itemMap.delete(S))),a.jsx(p,{[f]:"",ref:_,children:w})});m.displayName=d;function x(y){const v=s(e+"CollectionConsumer",y);return ee.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const N=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,k)=>N.indexOf(E.ref.current)-N.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},x,r]}var OEe=T.createContext(void 0);function ZA(e){const t=T.useContext(OEe);return e||t||"ltr"}function Jo(e){const t=T.useRef(e);return T.useEffect(()=>{t.current=e}),T.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function AEe(e,t=globalThis==null?void 0:globalThis.document){const n=Jo(e);T.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 CEe="DismissableLayer",pk="dismissableLayer.update",TEe="dismissableLayer.pointerDownOutside",REe="dismissableLayer.focusOutside",NB,BW=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),JA=T.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:l,...c}=e,u=T.useContext(BW),[d,f]=T.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=T.useState({}),x=gn(t,k=>f(k)),y=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),w=d?y.indexOf(d):-1,N=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,_=DEe(k=>{const O=k.target,I=[...u.branches].some(A=>A.contains(O));!S||I||(i==null||i(k),o==null||o(k),k.defaultPrevented||l==null||l())},p),E=LEe(k=>{const O=k.target;[...u.branches].some(A=>A.contains(O))||(s==null||s(k),o==null||o(k),k.defaultPrevented||l==null||l())},p);return AEe(k=>{w===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&l&&(k.preventDefault(),l()))},p),T.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(NB=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),_B(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=NB)}},[d,p,n,u]),T.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),_B())},[d,u]),T.useEffect(()=>{const k=()=>m({});return document.addEventListener(pk,k),()=>document.removeEventListener(pk,k)},[]),a.jsx(Tt.div,{...c,ref:x,style:{pointerEvents:N?S?"auto":"none":void 0,...e.style},onFocusCapture:Mt(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Mt(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Mt(e.onPointerDownCapture,_.onPointerDownCapture)})});JA.displayName=CEe;var IEe="DismissableLayerBranch",MEe=T.forwardRef((e,t)=>{const n=T.useContext(BW),r=T.useRef(null),i=gn(t,r);return T.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),a.jsx(Tt.div,{...e,ref:i})});MEe.displayName=IEe;function DEe(e,t=globalThis==null?void 0:globalThis.document){const n=Jo(e),r=T.useRef(!1),i=T.useRef(()=>{});return T.useEffect(()=>{const s=l=>{if(l.target&&!r.current){let c=function(){FW(TEe,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function LEe(e,t=globalThis==null?void 0:globalThis.document){const n=Jo(e),r=T.useRef(!1);return T.useEffect(()=>{const i=s=>{s.target&&!r.current&&FW(REe,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 _B(){const e=new CustomEvent(pk);document.dispatchEvent(e)}function FW(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?NEe(i,s):i.dispatchEvent(s)}var l_=0;function qW(){T.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??EB()),document.body.insertAdjacentElement("beforeend",e[1]??EB()),l_++,()=>{l_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),l_--}},[])}function EB(){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 c_="focusScope.autoFocusOnMount",u_="focusScope.autoFocusOnUnmount",PB={bubbles:!1,cancelable:!0},$Ee="FocusScope",e2=T.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[l,c]=T.useState(null),u=Jo(i),d=Jo(s),f=T.useRef(null),p=gn(t,y=>c(y)),m=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(r){let y=function(N){if(m.paused||!l)return;const S=N.target;l.contains(S)?f.current=S:Po(f.current,{select:!0})},v=function(N){if(m.paused||!l)return;const S=N.relatedTarget;S!==null&&(l.contains(S)||Po(f.current,{select:!0}))},b=function(N){if(document.activeElement===document.body)for(const _ of N)_.removedNodes.length>0&&Po(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",v);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",v),w.disconnect()}}},[r,l,m.paused]),T.useEffect(()=>{if(l){OB.add(m);const y=document.activeElement;if(!l.contains(y)){const b=new CustomEvent(c_,PB);l.addEventListener(c_,u),l.dispatchEvent(b),b.defaultPrevented||(BEe(VEe(zW(l)),{select:!0}),document.activeElement===y&&Po(l))}return()=>{l.removeEventListener(c_,u),setTimeout(()=>{const b=new CustomEvent(u_,PB);l.addEventListener(u_,d),l.dispatchEvent(b),b.defaultPrevented||Po(y??document.body,{select:!0}),l.removeEventListener(u_,d),OB.remove(m)},0)}}},[l,u,d,m]);const x=T.useCallback(y=>{if(!n&&!r||m.paused)return;const v=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(v&&b){const w=y.currentTarget,[N,S]=FEe(w);N&&S?!y.shiftKey&&b===S?(y.preventDefault(),n&&Po(N,{select:!0})):y.shiftKey&&b===N&&(y.preventDefault(),n&&Po(S,{select:!0})):b===w&&y.preventDefault()}},[n,r,m.paused]);return a.jsx(Tt.div,{tabIndex:-1,...o,ref:p,onKeyDown:x})});e2.displayName=$Ee;function BEe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Po(r,{select:t}),document.activeElement!==n)return}function FEe(e){const t=zW(e),n=kB(t,e),r=kB(t.reverse(),e);return[n,r]}function zW(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 kB(e,t){for(const n of e)if(!qEe(n,{upTo:t}))return n}function qEe(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 zEe(e){return e instanceof HTMLInputElement&&"select"in e}function Po(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zEe(e)&&t&&e.select()}}var OB=UEe();function UEe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=AB(e,t),e.unshift(t)},remove(t){var n;e=AB(e,t),(n=e[0])==null||n.resume()}}}function AB(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function VEe(e){return e.filter(t=>t.tagName!=="A")}var Dr=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},WEe=Gk[" useId ".trim().toString()]||(()=>{}),HEe=0;function Ho(e){const[t,n]=T.useState(WEe());return Dr(()=>{n(r=>r??String(HEe++))},[e]),t?`radix-${t}`:""}const GEe=["top","right","bottom","left"],el=Math.min,Ei=Math.max,tx=Math.round,ry=Math.floor,ia=e=>({x:e,y:e}),KEe={left:"right",right:"left",bottom:"top",top:"bottom"},YEe={start:"end",end:"start"};function mk(e,t,n){return Ei(e,el(t,n))}function Ga(e,t){return typeof e=="function"?e(t):e}function Ka(e){return e.split("-")[0]}function Kd(e){return e.split("-")[1]}function t2(e){return e==="x"?"y":"x"}function n2(e){return e==="y"?"height":"width"}const XEe=new Set(["top","bottom"]);function Zs(e){return XEe.has(Ka(e))?"y":"x"}function r2(e){return t2(Zs(e))}function QEe(e,t,n){n===void 0&&(n=!1);const r=Kd(e),i=r2(e),s=n2(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(o=nx(o)),[o,nx(o)]}function ZEe(e){const t=nx(e);return[gk(e),t,gk(t)]}function gk(e){return e.replace(/start|end/g,t=>YEe[t])}const CB=["left","right"],TB=["right","left"],JEe=["top","bottom"],ePe=["bottom","top"];function tPe(e,t,n){switch(e){case"top":case"bottom":return n?t?TB:CB:t?CB:TB;case"left":case"right":return t?JEe:ePe;default:return[]}}function nPe(e,t,n,r){const i=Kd(e);let s=tPe(Ka(e),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),t&&(s=s.concat(s.map(gk)))),s}function nx(e){return e.replace(/left|right|bottom|top/g,t=>KEe[t])}function rPe(e){return{top:0,right:0,bottom:0,left:0,...e}}function UW(e){return typeof e!="number"?rPe(e):{top:e,right:e,bottom:e,left:e}}function rx(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 RB(e,t,n){let{reference:r,floating:i}=e;const s=Zs(t),o=r2(t),l=n2(o),c=Ka(t),u=s==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[l]/2-i[l]/2;let m;switch(c){case"top":m={x:d,y:r.y-i.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Kd(t)){case"start":m[o]-=p*(n&&u?-1:1);break;case"end":m[o]+=p*(n&&u?-1:1);break}return m}const iPe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,l=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=RB(u,r,c),p=r,m={},x=0;for(let y=0;y<l.length;y++){const{name:v,fn:b}=l[y],{x:w,y:N,data:S,reset:_}=await b({x:d,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=w??d,f=N??f,m={...m,[v]:{...m[v],...S}},_&&x<=50&&(x++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:d,y:f}=RB(u,p,c)),y=-1)}return{x:d,y:f,placement:p,strategy:i,middlewareData:m}};async function Tp(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=Ga(t,e),x=UW(m),v=l[p?f==="floating"?"reference":"floating":f],b=rx(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(N))?await(s.getScale==null?void 0:s.getScale(N))||{x:1,y:1}:{x:1,y:1},_=rx(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:N,strategy:c}):w);return{top:(b.top-_.top+x.top)/S.y,bottom:(_.bottom-b.bottom+x.bottom)/S.y,left:(b.left-_.left+x.left)/S.x,right:(_.right-b.right+x.right)/S.x}}const sPe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Ga(e,t)||{};if(u==null)return{};const f=UW(d),p={x:n,y:r},m=r2(i),x=n2(m),y=await o.getDimensions(u),v=m==="y",b=v?"top":"left",w=v?"bottom":"right",N=v?"clientHeight":"clientWidth",S=s.reference[x]+s.reference[m]-p[m]-s.floating[x],_=p[m]-s.reference[m],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=E?E[N]:0;(!k||!await(o.isElement==null?void 0:o.isElement(E)))&&(k=l.floating[N]||s.floating[x]);const O=S/2-_/2,I=k/2-y[x]/2-1,A=el(f[b],I),C=el(f[w],I),R=A,D=k-y[x]-C,q=k/2-y[x]/2+O,F=mk(R,q,D),H=!c.arrow&&Kd(i)!=null&&q!==F&&s.reference[x]/2-(q<R?A:C)-y[x]/2<0,U=H?q<R?q-R:q-D:0;return{[m]:p[m]+U,data:{[m]:F,centerOffset:q-F-U,...H&&{alignmentOffset:U}},reset:H}}}),aPe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,...v}=Ga(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=Ka(i),w=Zs(l),N=Ka(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),_=p||(N||!y?[nx(l)]:ZEe(l)),E=x!=="none";!p&&E&&_.push(...nPe(l,y,x,S));const k=[l,..._],O=await Tp(t,v),I=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&I.push(O[b]),f){const q=QEe(i,o,S);I.push(O[q[0]],O[q[1]])}if(A=[...A,{placement:i,overflows:I}],!I.every(q=>q<=0)){var C,R;const q=(((C=s.flip)==null?void 0:C.index)||0)+1,F=k[q];if(F&&(!(f==="alignment"?w!==Zs(F):!1)||A.every(W=>Zs(W.placement)===w?W.overflows[0]>0:!0)))return{data:{index:q,overflows:A},reset:{placement:F}};let H=(R=A.filter(U=>U.overflows[0]<=0).sort((U,W)=>U.overflows[1]-W.overflows[1])[0])==null?void 0:R.placement;if(!H)switch(m){case"bestFit":{var D;const U=(D=A.filter(W=>{if(E){const G=Zs(W.placement);return G===w||G==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(G=>G>0).reduce((G,L)=>G+L,0)]).sort((W,G)=>W[1]-G[1])[0])==null?void 0:D[0];U&&(H=U);break}case"initialPlacement":H=l;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function IB(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function MB(e){return GEe.some(t=>e[t]>=0)}const oPe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ga(e,t);switch(r){case"referenceHidden":{const s=await Tp(t,{...i,elementContext:"reference"}),o=IB(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:MB(o)}}}case"escaped":{const s=await Tp(t,{...i,altBoundary:!0}),o=IB(s,n.floating);return{data:{escapedOffsets:o,escaped:MB(o)}}}default:return{}}}}},VW=new Set(["left","top"]);async function lPe(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ka(n),l=Kd(n),c=Zs(n)==="y",u=VW.has(o)?-1:1,d=s&&c?-1:1,f=Ga(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof x=="number"&&(m=l==="end"?x*-1:x),c?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const cPe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:l}=t,c=await lPe(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:o}}}}},uPe=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:o=!1,limiter:l={fn:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...c}=Ga(e,t),u={x:n,y:r},d=await Tp(t,c),f=Zs(Ka(i)),p=t2(f);let m=u[p],x=u[f];if(s){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=m+d[v],N=m-d[b];m=mk(w,m,N)}if(o){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=x+d[v],N=x-d[b];x=mk(w,x,N)}const y=l.fn({...t,[p]:m,[f]:x});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:s,[f]:o}}}}}},dPe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Ga(e,t),d={x:n,y:r},f=Zs(i),p=t2(f);let m=d[p],x=d[f];const y=Ga(l,t),v=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const N=p==="y"?"height":"width",S=s.reference[p]-s.floating[N]+v.mainAxis,_=s.reference[p]+s.reference[N]-v.mainAxis;m<S?m=S:m>_&&(m=_)}if(u){var b,w;const N=p==="y"?"width":"height",S=VW.has(Ka(i)),_=s.reference[f]-s.floating[N]+(S&&((b=o.offset)==null?void 0:b[f])||0)+(S?0:v.crossAxis),E=s.reference[f]+s.reference[N]+(S?0:((w=o.offset)==null?void 0:w[f])||0)-(S?v.crossAxis:0);x<_?x=_:x>E&&(x=E)}return{[p]:m,[f]:x}}}},fPe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:l}=t,{apply:c=()=>{},...u}=Ga(e,t),d=await Tp(t,u),f=Ka(i),p=Kd(i),m=Zs(i)==="y",{width:x,height:y}=s.floating;let v,b;f==="top"||f==="bottom"?(v=f,b=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(b=f,v=p==="end"?"top":"bottom");const w=y-d.top-d.bottom,N=x-d.left-d.right,S=el(y-d[v],w),_=el(x-d[b],N),E=!t.middlewareData.shift;let k=S,O=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=w),E&&!p){const A=Ei(d.left,0),C=Ei(d.right,0),R=Ei(d.top,0),D=Ei(d.bottom,0);m?O=x-2*(A!==0||C!==0?A+C:Ei(d.left,d.right)):k=y-2*(R!==0||D!==0?R+D:Ei(d.top,d.bottom))}await c({...t,availableWidth:O,availableHeight:k});const I=await o.getDimensions(l.floating);return x!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function b0(){return typeof window<"u"}function Yd(e){return WW(e)?(e.nodeName||"").toLowerCase():"#document"}function Ri(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fa(e){var t;return(t=(WW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function WW(e){return b0()?e instanceof Node||e instanceof Ri(e).Node:!1}function Ts(e){return b0()?e instanceof Element||e instanceof Ri(e).Element:!1}function la(e){return b0()?e instanceof HTMLElement||e instanceof Ri(e).HTMLElement:!1}function DB(e){return!b0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ri(e).ShadowRoot}const hPe=new Set(["inline","contents"]);function gm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Rs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!hPe.has(i)}const pPe=new Set(["table","td","th"]);function mPe(e){return pPe.has(Yd(e))}const gPe=[":popover-open",":modal"];function w0(e){return gPe.some(t=>{try{return e.matches(t)}catch{return!1}})}const yPe=["transform","translate","scale","rotate","perspective"],vPe=["transform","translate","scale","rotate","perspective","filter"],xPe=["paint","layout","strict","content"];function i2(e){const t=s2(),n=Ts(e)?Rs(e):e;return yPe.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)||vPe.some(r=>(n.willChange||"").includes(r))||xPe.some(r=>(n.contain||"").includes(r))}function bPe(e){let t=tl(e);for(;la(t)&&!_d(t);){if(i2(t))return t;if(w0(t))return null;t=tl(t)}return null}function s2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wPe=new Set(["html","body","#document"]);function _d(e){return wPe.has(Yd(e))}function Rs(e){return Ri(e).getComputedStyle(e)}function j0(e){return Ts(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tl(e){if(Yd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||DB(e)&&e.host||fa(e);return DB(t)?t.host:t}function HW(e){const t=tl(e);return _d(t)?e.ownerDocument?e.ownerDocument.body:e.body:la(t)&&gm(t)?t:HW(t)}function Rp(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=HW(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=Ri(i);if(s){const l=yk(o);return t.concat(o,o.visualViewport||[],gm(i)?i:[],l&&n?Rp(l):[])}return t.concat(i,Rp(i,[],n))}function yk(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function GW(e){const t=Rs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=la(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=tx(n)!==s||tx(r)!==o;return l&&(n=s,r=o),{width:n,height:r,$:l}}function a2(e){return Ts(e)?e:e.contextElement}function Cu(e){const t=a2(e);if(!la(t))return ia(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=GW(t);let o=(s?tx(n.width):n.width)/r,l=(s?tx(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const jPe=ia(0);function KW(e){const t=Ri(e);return!s2()||!t.visualViewport?jPe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SPe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ri(e)?!1:t}function bc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=a2(e);let o=ia(1);t&&(r?Ts(r)&&(o=Cu(r)):o=Cu(e));const l=SPe(s,n,r)?KW(s):ia(0);let c=(i.left+l.x)/o.x,u=(i.top+l.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(s){const p=Ri(s),m=r&&Ts(r)?Ri(r):r;let x=p,y=yk(x);for(;y&&r&&m!==x;){const v=Cu(y),b=y.getBoundingClientRect(),w=Rs(y),N=b.left+(y.clientLeft+parseFloat(w.paddingLeft))*v.x,S=b.top+(y.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,f*=v.y,c+=N,u+=S,x=Ri(y),y=yk(x)}}return rx({width:d,height:f,x:c,y:u})}function S0(e,t){const n=j0(e).scrollLeft;return t?t.left+n:bc(fa(e)).left+n}function YW(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-S0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function NPe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",o=fa(r),l=t?w0(t.floating):!1;if(r===o||l&&s)return n;let c={scrollLeft:0,scrollTop:0},u=ia(1);const d=ia(0),f=la(r);if((f||!f&&!s)&&((Yd(r)!=="body"||gm(o))&&(c=j0(r)),la(r))){const m=bc(r);u=Cu(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=o&&!f&&!s?YW(o,c):ia(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function _Pe(e){return Array.from(e.getClientRects())}function EPe(e){const t=fa(e),n=j0(e),r=e.ownerDocument.body,i=Ei(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ei(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+S0(e);const l=-n.scrollTop;return Rs(r).direction==="rtl"&&(o+=Ei(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:l}}const LB=25;function PPe(e,t){const n=Ri(e),r=fa(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,l=0,c=0;if(i){s=i.width,o=i.height;const d=s2();(!d||d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=S0(r);if(u<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,x=Math.abs(r.clientWidth-f.clientWidth-m);x<=LB&&(s-=x)}else u<=LB&&(s+=u);return{width:s,height:o,x:l,y:c}}const kPe=new Set(["absolute","fixed"]);function OPe(e,t){const n=bc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=la(e)?Cu(e):ia(1),o=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,u=r*s.y;return{width:o,height:l,x:c,y:u}}function $B(e,t,n){let r;if(t==="viewport")r=PPe(e,n);else if(t==="document")r=EPe(fa(e));else if(Ts(t))r=OPe(t,n);else{const i=KW(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return rx(r)}function XW(e,t){const n=tl(e);return n===t||!Ts(n)||_d(n)?!1:Rs(n).position==="fixed"||XW(n,t)}function APe(e,t){const n=t.get(e);if(n)return n;let r=Rp(e,[],!1).filter(l=>Ts(l)&&Yd(l)!=="body"),i=null;const s=Rs(e).position==="fixed";let o=s?tl(e):e;for(;Ts(o)&&!_d(o);){const l=Rs(o),c=i2(o);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&kPe.has(i.position)||gm(o)&&!c&&XW(e,o))?r=r.filter(d=>d!==o):i=l,o=tl(o)}return t.set(e,r),r}function CPe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?w0(t)?[]:APe(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const f=$B(t,d,i);return u.top=Ei(f.top,u.top),u.right=el(f.right,u.right),u.bottom=el(f.bottom,u.bottom),u.left=Ei(f.left,u.left),u},$B(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function TPe(e){const{width:t,height:n}=GW(e);return{width:t,height:n}}function RPe(e,t,n){const r=la(t),i=fa(t),s=n==="fixed",o=bc(e,!0,s,t);let l={scrollLeft:0,scrollTop:0};const c=ia(0);function u(){c.x=S0(i)}if(r||!r&&!s)if((Yd(t)!=="body"||gm(i))&&(l=j0(t)),r){const m=bc(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else i&&u();s&&!r&&i&&u();const d=i&&!r&&!s?YW(i,l):ia(0),f=o.left+l.scrollLeft-c.x-d.x,p=o.top+l.scrollTop-c.y-d.y;return{x:f,y:p,width:o.width,height:o.height}}function d_(e){return Rs(e).position==="static"}function BB(e,t){if(!la(e)||Rs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fa(e)===n&&(n=n.ownerDocument.body),n}function QW(e,t){const n=Ri(e);if(w0(e))return n;if(!la(e)){let i=tl(e);for(;i&&!_d(i);){if(Ts(i)&&!d_(i))return i;i=tl(i)}return n}let r=BB(e,t);for(;r&&mPe(r)&&d_(r);)r=BB(r,t);return r&&_d(r)&&d_(r)&&!i2(r)?n:r||bPe(e)||n}const IPe=async function(e){const t=this.getOffsetParent||QW,n=this.getDimensions,r=await n(e.floating);return{reference:RPe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function MPe(e){return Rs(e).direction==="rtl"}const DPe={convertOffsetParentRelativeRectToViewportRelativeRect:NPe,getDocumentElement:fa,getClippingRect:CPe,getOffsetParent:QW,getElementRects:IPe,getClientRects:_Pe,getDimensions:TPe,getScale:Cu,isElement:Ts,isRTL:MPe};function ZW(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LPe(e,t){let n=null,r;const i=fa(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=u;if(l||t(),!p||!m)return;const x=ry(f),y=ry(i.clientWidth-(d+p)),v=ry(i.clientHeight-(f+m)),b=ry(d),N={rootMargin:-x+"px "+-y+"px "+-v+"px "+-b+"px",threshold:Ei(0,el(1,c))||1};let S=!0;function _(E){const k=E[0].intersectionRatio;if(k!==c){if(!S)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!ZW(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(_,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,N)}n.observe(e)}return o(!0),s}function $Pe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=a2(e),d=i||s?[...u?Rp(u):[],...Rp(t)]:[];d.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=u&&l?LPe(u,n):null;let p=-1,m=null;o&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var N;(N=m)==null||N.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let x,y=c?bc(e):null;c&&v();function v(){const b=bc(e);y&&!ZW(y,b)&&n(),y=b,x=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(w=>{i&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,c&&cancelAnimationFrame(x)}}const BPe=cPe,FPe=uPe,qPe=aPe,zPe=fPe,UPe=oPe,FB=sPe,VPe=dPe,WPe=(e,t,n)=>{const r=new Map,i={platform:DPe,...n},s={...i.platform,_c:r};return iPe(e,t,{...i,platform:s})};var HPe=typeof document<"u",GPe=function(){},My=HPe?T.useLayoutEffect:GPe;function ix(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(!ix(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)&&!ix(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function JW(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qB(e,t){const n=JW(e);return Math.round(t*n)/n}function f_(e){const t=T.useRef(e);return My(()=>{t.current=e}),t}function KPe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=T.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=T.useState(r);ix(p,r)||m(r);const[x,y]=T.useState(null),[v,b]=T.useState(null),w=T.useCallback(W=>{W!==E.current&&(E.current=W,y(W))},[]),N=T.useCallback(W=>{W!==k.current&&(k.current=W,b(W))},[]),S=s||x,_=o||v,E=T.useRef(null),k=T.useRef(null),O=T.useRef(d),I=c!=null,A=f_(c),C=f_(i),R=f_(u),D=T.useCallback(()=>{if(!E.current||!k.current)return;const W={placement:t,strategy:n,middleware:p};C.current&&(W.platform=C.current),WPe(E.current,k.current,W).then(G=>{const L={...G,isPositioned:R.current!==!1};q.current&&!ix(O.current,L)&&(O.current=L,_c.flushSync(()=>{f(L)}))})},[p,t,n,C,R]);My(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[u]);const q=T.useRef(!1);My(()=>(q.current=!0,()=>{q.current=!1}),[]),My(()=>{if(S&&(E.current=S),_&&(k.current=_),S&&_){if(A.current)return A.current(S,_,D);D()}},[S,_,D,A,I]);const F=T.useMemo(()=>({reference:E,floating:k,setReference:w,setFloating:N}),[w,N]),H=T.useMemo(()=>({reference:S,floating:_}),[S,_]),U=T.useMemo(()=>{const W={position:n,left:0,top:0};if(!H.floating)return W;const G=qB(H.floating,d.x),L=qB(H.floating,d.y);return l?{...W,transform:"translate("+G+"px, "+L+"px)",...JW(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:L}},[n,l,H.floating,d.x,d.y]);return T.useMemo(()=>({...d,update:D,refs:F,elements:H,floatingStyles:U}),[d,D,F,H,U])}const YPe=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?FB({element:r.current,padding:i}).fn(n):{}:r?FB({element:r,padding:i}).fn(n):{}}}},XPe=(e,t)=>({...BPe(e),options:[e,t]}),QPe=(e,t)=>({...FPe(e),options:[e,t]}),ZPe=(e,t)=>({...VPe(e),options:[e,t]}),JPe=(e,t)=>({...qPe(e),options:[e,t]}),eke=(e,t)=>({...zPe(e),options:[e,t]}),tke=(e,t)=>({...UPe(e),options:[e,t]}),nke=(e,t)=>({...YPe(e),options:[e,t]});var rke="Arrow",eH=T.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return a.jsx(Tt.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});eH.displayName=rke;var ike=eH;function tH(e){const[t,n]=T.useState(void 0);return Dr(()=>{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 o,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var o2="Popper",[nH,rH]=ul(o2),[ske,iH]=nH(o2),sH=e=>{const{__scopePopper:t,children:n}=e,[r,i]=T.useState(null);return a.jsx(ske,{scope:t,anchor:r,onAnchorChange:i,children:n})};sH.displayName=o2;var aH="PopperAnchor",oH=T.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=iH(aH,n),o=T.useRef(null),l=gn(t,o),c=T.useRef(null);return T.useEffect(()=>{const u=c.current;c.current=(r==null?void 0:r.current)||o.current,u!==c.current&&s.onAnchorChange(c.current)}),r?null:a.jsx(Tt.div,{...i,ref:l})});oH.displayName=aH;var l2="PopperContent",[ake,oke]=nH(l2),lH=T.forwardRef((e,t)=>{var X,ne,Z,se,pe,oe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:x,...y}=e,v=iH(l2,n),[b,w]=T.useState(null),N=gn(t,Oe=>w(Oe)),[S,_]=T.useState(null),E=tH(S),k=(E==null?void 0:E.width)??0,O=(E==null?void 0:E.height)??0,I=r+(s!=="center"?"-"+s:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},C=Array.isArray(u)?u:[u],R=C.length>0,D={padding:A,boundary:C.filter(cke),altBoundary:R},{refs:q,floatingStyles:F,placement:H,isPositioned:U,middlewareData:W}=KPe({strategy:"fixed",placement:I,whileElementsMounted:(...Oe)=>$Pe(...Oe,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[XPe({mainAxis:i+O,alignmentAxis:o}),c&&QPe({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ZPe():void 0,...D}),c&&JPe({...D}),eke({...D,apply:({elements:Oe,rects:$e,availableWidth:Ze,availableHeight:xt})=>{const{width:pt,height:ye}=$e.reference,ve=Oe.floating.style;ve.setProperty("--radix-popper-available-width",`${Ze}px`),ve.setProperty("--radix-popper-available-height",`${xt}px`),ve.setProperty("--radix-popper-anchor-width",`${pt}px`),ve.setProperty("--radix-popper-anchor-height",`${ye}px`)}}),S&&nke({element:S,padding:l}),uke({arrowWidth:k,arrowHeight:O}),p&&tke({strategy:"referenceHidden",...D})]}),[G,L]=dH(H),$=Jo(x);Dr(()=>{U&&($==null||$())},[U,$]);const V=(X=W.arrow)==null?void 0:X.x,z=(ne=W.arrow)==null?void 0:ne.y,Q=((Z=W.arrow)==null?void 0:Z.centerOffset)!==0,[J,Y]=T.useState();return Dr(()=>{b&&Y(window.getComputedStyle(b).zIndex)},[b]),a.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:U?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(se=W.transformOrigin)==null?void 0:se.x,(pe=W.transformOrigin)==null?void 0:pe.y].join(" "),...((oe=W.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(ake,{scope:n,placedSide:G,onArrowChange:_,arrowX:V,arrowY:z,shouldHideArrow:Q,children:a.jsx(Tt.div,{"data-side":G,"data-align":L,...y,ref:N,style:{...y.style,animation:U?void 0:"none"}})})})});lH.displayName=l2;var cH="PopperArrow",lke={top:"bottom",right:"left",bottom:"top",left:"right"},uH=T.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=oke(cH,r),o=lke[s.placedSide];return a.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]: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:a.jsx(ike,{...i,ref:n,style:{...i.style,display:"block"}})})});uH.displayName=cH;function cke(e){return e!==null}var uke=e=>({name:"transformOrigin",options:e,fn(t){var v,b,w;const{placement:n,rects:r,middlewareData:i}=t,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=dH(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((b=i.arrow)==null?void 0:b.x)??0)+l/2,m=(((w=i.arrow)==null?void 0:w.y)??0)+c/2;let x="",y="";return u==="bottom"?(x=o?f:`${p}px`,y=`${-c}px`):u==="top"?(x=o?f:`${p}px`,y=`${r.floating.height+c}px`):u==="right"?(x=`${-c}px`,y=o?f:`${m}px`):u==="left"&&(x=`${r.floating.width+c}px`,y=o?f:`${m}px`),{data:{x,y}}}});function dH(e){const[t,n="center"]=e.split("-");return[t,n]}var dke=sH,fke=oH,hke=lH,pke=uH,mke="Portal",c2=T.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,s]=T.useState(!1);Dr(()=>s(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?z8.createPortal(a.jsx(Tt.div,{...r,ref:t}),o):null});c2.displayName=mke;var gke=Gk[" useInsertionEffect ".trim().toString()]||Dr;function Ed({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,o]=yke({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:i;{const d=T.useRef(e!==void 0);T.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=T.useCallback(d=>{var f;if(l){const p=vke(d)?d(e):d;p!==e&&((f=o.current)==null||f.call(o,p))}else s(d)},[l,e,s,o]);return[c,u]}function yke({defaultProp:e,onChange:t}){const[n,r]=T.useState(e),i=T.useRef(n),s=T.useRef(t);return gke(()=>{s.current=t},[t]),T.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function vke(e){return typeof e=="function"}function fH(e){const t=T.useRef({value:e,previous:e});return T.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var hH=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"}),xke="VisuallyHidden",bke=T.forwardRef((e,t)=>a.jsx(Tt.span,{...e,ref:t,style:{...hH,...e.style}}));bke.displayName=xke;var wke=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fu=new WeakMap,iy=new WeakMap,sy={},h_=0,pH=function(e){return e&&(e.host||pH(e.parentNode))},jke=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=pH(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})},Ske=function(e,t,n,r){var i=jke(t,Array.isArray(e)?e:[e]);sy[n]||(sy[n]=new WeakMap);var s=sy[n],o=[],l=new Set,c=new Set(i),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};i.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(l.has(p))d(p);else try{var m=p.getAttribute(r),x=m!==null&&m!=="false",y=(fu.get(p)||0)+1,v=(s.get(p)||0)+1;fu.set(p,y),s.set(p,v),o.push(p),y===1&&x&&iy.set(p,!0),v===1&&p.setAttribute(n,"true"),x||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return d(t),l.clear(),h_++,function(){o.forEach(function(f){var p=fu.get(f)-1,m=s.get(f)-1;fu.set(f,p),s.set(f,m),p||(iy.has(f)||f.removeAttribute(r),iy.delete(f)),m||f.removeAttribute(n)}),h_--,h_||(fu=new WeakMap,fu=new WeakMap,iy=new WeakMap,sy={})}},mH=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=wke(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Ske(r,i,n,"aria-hidden")):function(){return null}},Ys=function(){return Ys=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},Ys.apply(this,arguments)};function gH(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 Nke(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Dy="right-scroll-bar-position",Ly="width-before-scroll-bar",_ke="with-scroll-bars-hidden",Eke="--removed-body-scroll-bar-size";function p_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Pke(e,t){var n=T.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 kke=typeof window<"u"?T.useLayoutEffect:T.useEffect,zB=new WeakMap;function Oke(e,t){var n=Pke(null,function(r){return e.forEach(function(i){return p_(i,r)})});return kke(function(){var r=zB.get(n);if(r){var i=new Set(r),s=new Set(e),o=n.current;
vendor: 4,224 bytes, lines 627-642
627i.forEach(function(l){s.has(l)||p_(l,null)}),s.forEach(function(l){i.has(l)||p_(l,o)})}zB.set(n,e)},[e]),n}function Ake(e){return e}function Cke(e,t){t===void 0&&(t=Ake);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 o=t(s,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(l){return s(l)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(s),o=n}var c=function(){var d=o;o=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return i}function Tke(e){e===void 0&&(e={});var t=Cke(null);return t.options=Ys({async:!0,ssr:!1},e),t}var yH=function(e){var t=e.sideCar,n=gH(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 T.createElement(r,Ys({},n))};yH.isSideCarExport=!0;function Rke(e,t){return e.useMedium(t),yH}var vH=Tke(),m_=function(){},N0=T.forwardRef(function(e,t){var n=T.useRef(null),r=T.useState({onScrollCapture:m_,onWheelCapture:m_,onTouchMoveCapture:m_}),i=r[0],s=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,x=e.noIsolation,y=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,N=e.gapMode,S=gH(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,E=Oke([n,t]),k=Ys(Ys({},S),i);return T.createElement(T.Fragment,null,d&&T.createElement(_,{sideCar:vH,removeScrollBar:u,shards:f,noRelative:m,noIsolation:x,inert:y,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:N}),o?T.cloneElement(T.Children.only(l),Ys(Ys({},k),{ref:E})):T.createElement(w,Ys({},k,{className:c,ref:E}),l))});N0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};N0.classNames={fullWidth:Ly,zeroRight:Dy};var Ike=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mke(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ike();return t&&e.setAttribute("nonce",t),e}function Dke(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Lke(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $ke=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mke())&&(Dke(t,n),Lke(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Bke=function(){var e=$ke();return function(t,n){T.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},xH=function(){var e=Bke(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Fke={left:0,top:0,right:0,gap:0},g_=function(e){return parseInt(e||"",10)||0},qke=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[g_(n),g_(r),g_(i)]},zke=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Fke;var t=qke(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])}},Uke=xH(),Tu="data-scroll-locked",Vke=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),` 628 .`.concat(_ke,` { 629 overflow: hidden `).concat(r,`; 630 padding-right: `).concat(l,"px ").concat(r,`; 631 } 632 body[`).concat(Tu,`] { 633 overflow: hidden `).concat(r,`; 634 overscroll-behavior: contain; 635 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 636 padding-left: `.concat(i,`px; 637 padding-top: `).concat(s,`px; 638 padding-right: `).concat(o,`px; 639 margin-left:0; 640 margin-top:0; 641 margin-right: `).concat(l,"px ").concat(r,`; 642 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
642")].filter(Boolean).join(""),` 643 } 644 645 .`).concat(Dy,` { 646 right: `).concat(l,"px ").concat(r,`; 647 } 648 649 .`).concat(Ly,` { 650 margin-right: `).concat(l,"px ").concat(r,`; 651 } 652 653 .`).concat(Dy," .").concat(Dy,` { 654 right: 0 `).concat(r,`; 655 } 656 657 .`).concat(Ly," .").concat(Ly,` { 658 margin-right: 0 `).concat(r,`; 659 } 660 661 body[`).concat(Tu,`] { 662 `).concat(Eke,": ").concat(l,`px; 663 } 664`)},UB=function(){var e=parseInt(document.body.getAttribute(Tu)||"0",10);return isFinite(e)?e:0},Wke=function(){T.useEffect(function(){return document.body.setAttribute(Tu,(UB()+1).toString()),function(){var e=UB()-1;e<=0?document.body.removeAttribute(Tu):document.body.setAttribute(Tu,e.toString())}},[])},Hke=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Wke();var s=T.useMemo(function(){return zke(i)},[i]);return T.createElement(Uke,{styles:Vke(s,!t,i,n?"":"!important")})},vk=!1;if(typeof window<"u")try{var ay=Object.defineProperty({},"passive",{get:function(){return vk=!0,!0}});window.addEventListener("test",ay,ay),window.removeEventListener("test",ay,ay)}catch{vk=!1}var hu=vk?{passive:!1}:!1,Gke=function(e){return e.tagName==="TEXTAREA"},bH=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Gke(e)&&n[t]==="visible")},Kke=function(e){return bH(e,"overflowY")},Yke=function(e){return bH(e,"overflowX")},VB=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=wH(e,r);if(i){var s=jH(e,r),o=s[1],l=s[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xke=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Qke=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wH=function(e,t){return e==="v"?Kke(t):Yke(t)},jH=function(e,t){return e==="v"?Xke(t):Qke(t)},Zke=function(e,t){return e==="h"&&t==="rtl"?-1:1},Jke=function(e,t,n,r,i){var s=Zke(e,window.getComputedStyle(t).direction),o=s*r,l=n.target,c=t.contains(l),u=!1,d=o>0,f=0,p=0;do{if(!l)break;var m=jH(e,l),x=m[0],y=m[1],v=m[2],b=y-v-s*x;(x||b)&&wH(e,l)&&(f+=b,p+=x);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(u=!0),u},oy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},WB=function(e){return[e.deltaX,e.deltaY]},HB=function(e){return e&&"current"in e?e.current:e},eOe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},tOe=function(e){return` 665 .block-interactivity-`.concat(e,` {pointer-events: none;} 666 .allow-interactivity-`).concat(e,` {pointer-events: all;} 667`)},nOe=0,pu=[];function rOe(e){var t=T.useRef([]),n=T.useRef([0,0]),r=T.useRef(),i=T.useState(nOe++)[0],s=T.useState(xH)[0],o=T.useRef(e);T.useEffect(function(){o.current=e},[e]),T.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=Nke([e.lockRef.current],(e.shards||[]).map(HB),!0).filter(Boolean);return y.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=T.useCallback(function(y,v){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var b=oy(y),w=n.current,N="deltaX"in y?y.deltaX:w[0]-b[0],S="deltaY"in y?y.deltaY:w[1]-b[1],_,E=y.target,k=Math.abs(N)>Math.abs(S)?"h":"v";if("touches"in y&&k==="h"&&E.type==="range")return!1;var O=VB(k,E);if(!O)return!0;if(O?_=k:(_=k==="v"?"h":"v",O=VB(k,E)),!O)return!1;if(!r.current&&"changedTouches"in y&&(N||S)&&(r.current=_),!_)return!0;var I=r.current||_;return Jke(I,v,y,I==="h"?N:S)},[]),c=T.useCallback(function(y){var v=y;if(!(!pu.length||pu[pu.length-1]!==s)){var b="deltaY"in v?WB(v):oy(v),w=t.current.filter(function(_){return _.name===v.type&&(_.target===v.target||v.target===_.shadowParent)&&eOe(_.delta,b)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}
vendor: 4,237 bytes, line 667
667if(!w){var N=(o.current.shards||[]).map(HB).filter(Boolean).filter(function(_){return _.contains(v.target)}),S=N.length>0?l(v,N[0]):!o.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=T.useCallback(function(y,v,b,w){var N={name:y,delta:v,target:b,should:w,shadowParent:iOe(b)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(S){return S!==N})},1)},[]),d=T.useCallback(function(y){n.current=oy(y),r.current=void 0},[]),f=T.useCallback(function(y){u(y.type,WB(y),y.target,l(y,e.lockRef.current))},[]),p=T.useCallback(function(y){u(y.type,oy(y),y.target,l(y,e.lockRef.current))},[]);T.useEffect(function(){return pu.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,hu),document.addEventListener("touchmove",c,hu),document.addEventListener("touchstart",d,hu),function(){pu=pu.filter(function(y){return y!==s}),document.removeEventListener("wheel",c,hu),document.removeEventListener("touchmove",c,hu),document.removeEventListener("touchstart",d,hu)}},[]);var m=e.removeScrollBar,x=e.inert;return T.createElement(T.Fragment,null,x?T.createElement(s,{styles:tOe(i)}):null,m?T.createElement(Hke,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function iOe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const sOe=Rke(vH,rOe);var u2=T.forwardRef(function(e,t){return T.createElement(N0,Ys({},e,{ref:t,sideCar:sOe}))});u2.classNames=N0.classNames;var aOe=[" ","Enter","ArrowUp","ArrowDown"],oOe=[" ","Enter"],wc="Select",[_0,E0,lOe]=$W(wc),[Xd]=ul(wc,[lOe,rH]),P0=rH(),[cOe,dl]=Xd(wc),[uOe,dOe]=Xd(wc),SH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:x}=e,y=P0(t),[v,b]=T.useState(null),[w,N]=T.useState(null),[S,_]=T.useState(!1),E=ZA(u),[k,O]=Ed({prop:r,defaultProp:i??!1,onChange:s,caller:wc}),[I,A]=Ed({prop:o,defaultProp:l,onChange:c,caller:wc}),C=T.useRef(null),R=v?x||!!v.closest("form"):!0,[D,q]=T.useState(new Set),F=Array.from(D).map(H=>H.props.value).join(";");return a.jsx(dke,{...y,children:a.jsxs(cOe,{required:m,scope:t,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:N,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:Ho(),value:I,onValueChange:A,open:k,onOpenChange:O,dir:E,triggerPointerDownPosRef:C,disabled:p,children:[a.jsx(_0.Provider,{scope:t,children:a.jsx(uOe,{scope:e.__scopeSelect,onNativeOptionAdd:T.useCallback(H=>{q(U=>new Set(U).add(H))},[]),onNativeOptionRemove:T.useCallback(H=>{q(U=>{const W=new Set(U);return W.delete(H),W})},[]),children:n})}),R?a.jsxs(GH,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:I,onChange:H=>A(H.target.value),disabled:p,form:x,children:[I===void 0?a.jsx("option",{value:""}):null,Array.from(D)]},F):null]})})};SH.displayName=wc;var NH="SelectTrigger",_H=T.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=P0(n),o=dl(NH,n),l=o.disabled||r,c=gn(t,o.onTriggerChange),u=E0(n),d=T.useRef("touch"),[f,p,m]=YH(y=>{const v=u().filter(N=>!N.disabled),b=v.find(N=>N.value===o.value),w=XH(v,y,b);w!==void 0&&o.onValueChange(w.value)}),x=y=>{l||(o.onOpenChange(!0),m()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return a.jsx(fke,{asChild:!0,...s,children:a.jsx(Tt.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":KH(o.value)?"":void 0,...i,ref:c,onClick:Mt(i.onClick,y=>{y.currentTarget.focus(),d.current!=="mouse"&&x(y)}),onPointerDown:Mt(i.onPointerDown,y=>{d.current=y.pointerType;const v=y.target;v.hasPointerCapture(y.pointerId)&&v.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(x(y),y.preventDefault())}),onKeyDown:Mt(i.onKeyDown,y=>{const v=f.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&p(y.key),!(v&&y.key===" ")&&aOe.includes(y.key)&&(x(),y.preventDefault())})})})});_H.displayName=NH;var EH="SelectValue",PH=T.forwardRef((e,t)=>
vendor: 13,775 bytes, line 667
667{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:o="",...l}=e,c=dl(EH,n),{onValueNodeHasChildrenChange:u}=c,d=s!==void 0,f=gn(t,c.onValueNodeChange);return Dr(()=>{u(d)},[u,d]),a.jsx(Tt.span,{...l,ref:f,style:{pointerEvents:"none"},children:KH(c.value)?a.jsx(a.Fragment,{children:o}):s})});PH.displayName=EH;var fOe="SelectIcon",kH=T.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return a.jsx(Tt.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});kH.displayName=fOe;var hOe="SelectPortal",OH=e=>a.jsx(c2,{asChild:!0,...e});OH.displayName=hOe;var jc="SelectContent",AH=T.forwardRef((e,t)=>{const n=dl(jc,e.__scopeSelect),[r,i]=T.useState();if(Dr(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?_c.createPortal(a.jsx(CH,{scope:e.__scopeSelect,children:a.jsx(_0.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),s):null}return a.jsx(TH,{...e,ref:t})});AH.displayName=jc;var ws=10,[CH,fl]=Xd(jc),pOe="SelectContentImpl",mOe=Xu("SelectContent.RemoveScroll"),TH=T.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:x,hideWhenDetached:y,avoidCollisions:v,...b}=e,w=dl(jc,n),[N,S]=T.useState(null),[_,E]=T.useState(null),k=gn(t,X=>S(X)),[O,I]=T.useState(null),[A,C]=T.useState(null),R=E0(n),[D,q]=T.useState(!1),F=T.useRef(!1);T.useEffect(()=>{if(N)return mH(N)},[N]),qW();const H=T.useCallback(X=>{const[ne,...Z]=R().map(oe=>oe.ref.current),[se]=Z.slice(-1),pe=document.activeElement;for(const oe of X)if(oe===pe||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===ne&&_&&(_.scrollTop=0),oe===se&&_&&(_.scrollTop=_.scrollHeight),oe==null||oe.focus(),document.activeElement!==pe))return},[R,_]),U=T.useCallback(()=>H([O,N]),[H,O,N]);T.useEffect(()=>{D&&U()},[D,U]);const{onOpenChange:W,triggerPointerDownPosRef:G}=w;T.useEffect(()=>{if(N){let X={x:0,y:0};const ne=se=>{var pe,oe;X={x:Math.abs(Math.round(se.pageX)-(((pe=G.current)==null?void 0:pe.x)??0)),y:Math.abs(Math.round(se.pageY)-(((oe=G.current)==null?void 0:oe.y)??0))}},Z=se=>{X.x<=10&&X.y<=10?se.preventDefault():N.contains(se.target)||W(!1),document.removeEventListener("pointermove",ne),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",Z,{capture:!0})}}},[N,W,G]),T.useEffect(()=>{const X=()=>W(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[W]);const[L,$]=YH(X=>{const ne=R().filter(pe=>!pe.disabled),Z=ne.find(pe=>pe.ref.current===document.activeElement),se=XH(ne,X,Z);se&&setTimeout(()=>se.ref.current.focus())}),V=T.useCallback((X,ne,Z)=>{const se=!F.current&&!Z;(w.value!==void 0&&w.value===ne||se)&&(I(X),se&&(F.current=!0))},[w.value]),z=T.useCallback(()=>N==null?void 0:N.focus(),[N]),Q=T.useCallback((X,ne,Z)=>{const se=!F.current&&!Z;(w.value!==void 0&&w.value===ne||se)&&C(X)},[w.value]),J=r==="popper"?xk:RH,Y=J===xk?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:x,hideWhenDetached:y,avoidCollisions:v}:{};return a.jsx(CH,{scope:n,content:N,viewport:_,onViewportChange:E,itemRefCallback:V,selectedItem:O,onItemLeave:z,itemTextRefCallback:Q,focusSelectedItem:U,selectedItemText:A,position:r,isPositioned:D,searchRef:L,children:a.jsx(u2,{as:mOe,allowPinchZoom:!0,children:a.jsx(e2,{asChild:!0,trapped:w.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:Mt(i,X=>{var ne;(ne=w.trigger)==null||ne.focus({preventScroll:!0}),X.preventDefault()}),children:a.jsx(JA,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:a.jsx(J,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:X=>X.preventDefault(),...b,...Y,onPlaced:()=>q(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Mt(b.onKeyDown,X=>{const ne=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!ne&&X.key.length===1&&$(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let se=R().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(X.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const pe=X.target,oe=se.indexOf(pe);se=se.slice(oe+1)}setTimeout(()=>H(se)),X.preventDefault()}})})})})})})});TH.displayName=pOe;var gOe="SelectItemAlignedPosition",RH=T.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=dl(jc,n),o=fl(jc,n),[l,c]=T.useState(null),[u,d]=T.useState(null),f=gn(t,k=>d(k)),p=E0(n),m=T.useRef(!1),x=T.useRef(!0),{viewport:y,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=o,N=T.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&y&&v&&b){const k=s.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),A=b.getBoundingClientRect();if(s.dir!=="rtl"){const pe=A.left-O.left,oe=I.left-pe,Oe=k.left-oe,$e=k.width+Oe,Ze=Math.max($e,O.width),xt=window.innerWidth-ws,pt=SB(oe,[ws,Math.max(ws,xt-Ze)]);l.style.minWidth=$e+"px",l.style.left=pt+"px"}else{const pe=O.right-A.right,oe=window.innerWidth-I.right-pe,Oe=window.innerWidth-k.right-oe,$e=k.width+Oe,Ze=Math.max($e,O.width),xt=window.innerWidth-ws,pt=SB(oe,[ws,Math.max(ws,xt-Ze)]);l.style.minWidth=$e+"px",l.style.right=pt+"px"}const C=p(),R=window.innerHeight-ws*2,D=y.scrollHeight,q=window.getComputedStyle(u),F=parseInt(q.borderTopWidth,10),H=parseInt(q.paddingTop,10),U=parseInt(q.borderBottomWidth,10),W=parseInt(q.paddingBottom,10),G=F+H+D+W+U,L=Math.min(v.offsetHeight*5,G),$=window.getComputedStyle(y),V=parseInt($.paddingTop,10),z=parseInt($.paddingBottom,10),Q=k.top+k.height/2-ws,J=R-Q,Y=v.offsetHeight/2,X=v.offsetTop+Y,ne=F+H+X,Z=G-ne;if(ne<=Q){const pe=C.length>0&&v===C[C.length-1].ref.current;l.style.bottom="0px";const oe=u.clientHeight-y.offsetTop-y.offsetHeight,Oe=Math.max(J,Y+(pe?z:0)+oe+U),$e=ne+Oe;l.style.height=$e+"px"}else{const pe=C.length>0&&v===C[0].ref.current;l.style.top="0px";const Oe=Math.max(Q,F+y.offsetTop+(pe?V:0)+Y)+Z;l.style.height=Oe+"px",y.scrollTop=ne-Q+y.offsetTop}l.style.margin=`${ws}px 0`,l.style.minHeight=L+"px",l.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,l,u,y,v,b,s.dir,r]);Dr(()=>N(),[N]);const[S,_]=T.useState();Dr(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const E=T.useCallback(k=>{k&&x.current===!0&&(N(),w==null||w(),x.current=!1)},[N,w]);return a.jsx(vOe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:E,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(Tt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});RH.displayName=gOe;var yOe="SelectPopperPosition",xk=T.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ws,...s}=e,o=P0(n);return a.jsx(hke,{...o,...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)"}})});xk.displayName=yOe;var[vOe,d2]=Xd(jc,{}),bk="SelectViewport",IH=T.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=fl(bk,n),o=d2(bk,n),l=gn(t,s.onViewportChange),c=T.useRef(0);return a.jsxs(a.Fragment,{children:[a.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}),a.jsx(_0.Slot,{scope:n,children:a.jsx(Tt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Mt(i.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&f){const m=Math.abs(c.current-d.scrollTop);if(m>0){const x=window.innerHeight-ws*2,y=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),b=Math.max(y,v);if(b<x){const w=b+m,N=Math.min(x,w),S=w-N;f.style.height=N+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});IH.displayName=bk;var MH="SelectGroup",[xOe,bOe]=Xd(MH),wOe=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ho();return a.jsx(xOe,{scope:n,id:i,children:a.jsx(Tt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});wOe.displayName=MH;var DH="SelectLabel",LH=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=bOe(DH,n);return a.jsx(Tt.div,{id:i.id,...r,ref:t})});LH.displayName=DH;var sx="SelectItem",[jOe,$H]=Xd(sx),BH=T.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...o}=e,l=dl(sx,n),c=fl(sx,n),u=l.value===r,[d,f]=T.useState(s??""),[p,m]=T.useState(!1),x=gn(t,w=>{var N;return(N=c.itemRefCallback)==null?void 0:N.call(c,w,r,i)}),y=Ho(),v=T.useRef("touch"),b=()=>{i||(l.onValueChange(r),l.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 a.jsx(jOe,{scope:n,value:r,disabled:i,textId:y,isSelected:u,onItemTextChange:T.useCallback(w=>{f(N=>N||((w==null?void 0:w.textContent)??"").trim())},[]),children:a.jsx(_0.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:a.jsx(Tt.div,{role:"option","aria-labelledby":y,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:x,onFocus:Mt(o.onFocus,()=>m(!0)),onBlur:Mt(o.onBlur,()=>m(!1)),onClick:Mt(o.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:Mt(o.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:Mt(o.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:Mt(o.onPointerMove,w=>{var N;v.current=w.pointerType,i?(N=c.onItemLeave)==null||N.call(c):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Mt(o.onPointerLeave,w=>{var N;w.currentTarget===document.activeElement&&((N=c.onItemLeave)==null||N.call(c))}),onKeyDown:Mt(o.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(oOe.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});BH.displayName=sx;var wh="SelectItemText",FH=T.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,o=dl(wh,n),l=fl(wh,n),c=$H(wh,n),u=dOe(wh,n),[d,f]=T.useState(null),p=gn(t,b=>f(b),c.onItemTextChange,b=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,b,c.value,c.disabled)}),m=d==null?void 0:d.textContent,x=T.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:y,onNativeOptionRemove:v}=u;return Dr(()=>(y(x),()=>v(x)),[y,v,x]),a.jsxs(a.Fragment,{children:[a.jsx(Tt.span,{id:c.textId,...s,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?_c.createPortal(s.children,o.valueNode):null]})});FH.displayName=wh;var qH="SelectItemIndicator",zH=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return $H(qH,n).isSelected?a.jsx(Tt.span,{"aria-hidden":!0,...r,ref:t}):null});zH.displayName=qH;var wk="SelectScrollUpButton",UH=T.forwardRef((e,t)=>{const n=fl(wk,e.__scopeSelect),r=d2(wk,e.__scopeSelect),[i,s]=T.useState(!1),o=gn(t,r.onScrollButtonChange);return Dr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?a.jsx(WH,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});UH.displayName=wk;var jk="SelectScrollDownButton",VH=T.forwardRef((e,t)=>{const n=fl(jk,e.__scopeSelect),r=d2(jk,e.__scopeSelect),[i,s]=T.useState(!1),o=gn(t,r.onScrollButtonChange);return Dr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;s(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?a.jsx(WH,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});VH.displayName=jk;var WH=T.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=fl("SelectScrollButton",n),o=T.useRef(null),l=E0(n),c=T.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return T.useEffect(()=>()=>c(),[c]),Dr(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(Tt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Mt(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Mt(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Mt(i.onPointerLeave,()=>{c()})})}),SOe="SelectSeparator",HH=T.forwardRef((e,t)=>
vendor: 4,425 bytes, line 667
667{const{__scopeSelect:n,...r}=e;return a.jsx(Tt.div,{"aria-hidden":!0,...r,ref:t})});HH.displayName=SOe;var Sk="SelectArrow",NOe=T.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=P0(n),s=dl(Sk,n),o=fl(Sk,n);return s.open&&o.position==="popper"?a.jsx(pke,{...i,...r,ref:t}):null});NOe.displayName=Sk;var _Oe="SelectBubbleInput",GH=T.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=T.useRef(null),s=gn(r,i),o=fH(t);return T.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const f=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[o,t]),a.jsx(Tt.select,{...n,style:{...hH,...n.style},ref:s,defaultValue:t})});GH.displayName=_Oe;function KH(e){return e===""||e===void 0}function YH(e){const t=Jo(e),n=T.useRef(""),r=T.useRef(0),i=T.useCallback(o=>{const l=n.current+o;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),s=T.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function XH(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 o=EOe(e,Math.max(s,0));i.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function EOe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var POe=SH,QH=_H,kOe=PH,OOe=kH,AOe=OH,ZH=AH,COe=IH,JH=LH,eG=BH,TOe=FH,ROe=zH,tG=UH,nG=VH,rG=HH;const Mn=POe,Dn=kOe,En=T.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(QH,{ref:r,className:Ot("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(OOe,{asChild:!0,children:a.jsx(wx,{className:"h-4 w-4 opacity-50"})})]}));En.displayName=QH.displayName;const iG=T.forwardRef(({className:e,...t},n)=>a.jsx(tG,{ref:n,className:Ot("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Xk,{className:"h-4 w-4"})}));iG.displayName=tG.displayName;const sG=T.forwardRef(({className:e,...t},n)=>a.jsx(nG,{ref:n,className:Ot("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(wx,{className:"h-4 w-4"})}));sG.displayName=nG.displayName;const Pn=T.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>a.jsx(AOe,{children:a.jsxs(ZH,{ref:i,className:Ot("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:[a.jsx(iG,{}),a.jsx(COe,{className:Ot("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(sG,{})]})}));Pn.displayName=ZH.displayName;const IOe=T.forwardRef(({className:e,...t},n)=>a.jsx(JH,{ref:n,className:Ot("px-2 py-1.5 text-sm font-semibold",e),...t}));IOe.displayName=JH.displayName;const it=T.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(eG,{ref:r,className:Ot("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[a.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(ROe,{children:a.jsx(Nh,{className:"h-4 w-4"})})}),a.jsx(TOe,{children:t})]}));it.displayName=eG.displayName;const MOe=T.forwardRef(({className:e,...t},n)=>a.jsx(rG,{ref:n,className:Ot("-mx-1 my-1 h-px bg-muted",e),...t}));MOe.displayName=rG.displayName;var f2="Progress",h2=100,[DOe]=ul(f2),[LOe,$Oe]=DOe(f2),aG=T.forwardRef((e,t)=>
667{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:s=BOe,...o}=e;(i||i===0)&&!GB(i)&&console.error(FOe(`${i}`,"Progress"));const l=GB(i)?i:h2;r!==null&&!KB(r,l)&&console.error(qOe(`${r}`,"Progress"));const c=KB(r,l)?r:null,u=ax(c)?s(c,l):void 0;return a.jsx(LOe,{scope:n,value:c,max:l,children:a.jsx(Tt.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":ax(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":cG(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});aG.displayName=f2;var oG="ProgressIndicator",lG=T.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=$Oe(oG,n);return a.jsx(Tt.div,{"data-state":cG(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});lG.displayName=oG;function BOe(e,t){return`${Math.round(e/t*100)}%`}function cG(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function ax(e){return typeof e=="number"}function GB(e){return ax(e)&&!isNaN(e)&&e>0}function KB(e,t){return ax(e)&&!isNaN(e)&&e<=t&&e>=0}function FOe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${h2}\`.`}function qOe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 668 - a positive number 669 - less than the value passed to \`max\` (or ${h2} if no \`max\` prop is set) 670 - \`null\` or \`undefined\` if the progress is indeterminate. 671 672Defaulting to \`null\`.`}var uG=aG,zOe=lG;const cs=T.forwardRef(({className:e,value:t,...n},r)=>a.jsx(uG,{ref:r,className:Ot("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:a.jsx(zOe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));cs.displayName=uG.displayName;function UOe(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}Array(12).fill(0);let Nk=1;class VOe{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Nk++,o=this.toasts.find(c=>c.id===s),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...t,id:s,title:r}),{...c,...t,id:s,dismissible:l,title:r}):c):this.addToast({title:r,...i,dismissible:l,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,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}));const i=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,o;const l=i.then(async u=>{if(o=["resolve",u],ee.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(HOe(u)&&!u.ok){s=!1;const f=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,x=typeof f=="object"&&!ee.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...x})}else if(u instanceof Error){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,x=typeof f=="object"&&!ee.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...x})}else if(n.success!==void 0){s=!1;const f=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,x=typeof f=="object"&&!ee.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:p,...x})}}).catch(async u=>
vendor: 1,260 bytes, line 672
672{if(o=["reject",u],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,m=typeof d=="object"&&!ee.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,d)=>l.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Nk++;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}}const Qi=new VOe,WOe=(e,t)=>{const n=(t==null?void 0:t.id)||Nk++;return Qi.addToast({title:e,...t,id:n}),n},HOe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",GOe=WOe,KOe=()=>Qi.toasts,YOe=()=>Qi.getActiveToasts(),we=Object.assign(GOe,{success:Qi.success,info:Qi.info,warning:Qi.warning,error:Qi.error,custom:Qi.custom,message:Qi.message,promise:Qi.promise,dismiss:Qi.dismiss,loading:Qi.loading},{getHistory:KOe,getToasts:YOe});UO
vendor: 14,874 bytes, line 672
672e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
672XOe(){const e=Ln(),[t,n]=T.useState(!1),[r,i]=T.useState({name:"",test_type:"headline",post_id:"",variant_a:{content:"",views:0,clicks:0,conversions:0},variant_b:{content:"",views:0,clicks:0,conversions:0}}),{data:s=[]}=st({queryKey:["ab-tests"],queryFn:()=>ce.entities.ABTest.list()}),{data:o=[]}=st({queryKey:["posts-for-ab"],queryFn:()=>ce.entities.BlogPost.filter({status:"published"},"-published_date",20)}),l=async()=>{if(!r.name||!r.variant_a.content||!r.variant_b.content){we.error("Please fill in all fields");return}try{await ce.entities.ABTest.create(r),we.success("A/B test created!"),i({name:"",test_type:"headline",post_id:"",variant_a:{content:"",views:0,clicks:0,conversions:0},variant_b:{content:"",views:0,clicks:0,conversions:0}}),n(!1),e.invalidateQueries({queryKey:["ab-tests"]})}catch{we.error("Failed to create test")}},c=async(u,d)=>{try{await ce.entities.ABTest.update(u,{winner:d,is_active:!1}),e.invalidateQueries({queryKey:["ab-tests"]}),we.success(`Variant ${d.toUpperCase()} declared winner!`)}catch{we.error("Failed to update test")}};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"A/B Testing"}),a.jsxs(ae,{onClick:()=>n(!t),className:"gap-2",children:[a.jsx(Yo,{className:"w-4 h-4"}),"New Test"]})]}),t&&a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Create A/B Test"})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Test Name"}),a.jsx(Ye,{placeholder:"e.g., Homepage Headline Test",value:r.name,onChange:u=>i({...r,name:u.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Test Type"}),a.jsxs(Mn,{value:r.test_type,onValueChange:u=>i({...r,test_type:u}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"headline",children:"Headline"}),a.jsx(it,{value:"ad_creative",children:"Ad Creative"}),a.jsx(it,{value:"cta",children:"Call to Action"})]})]})]}),r.test_type==="headline"&&a.jsxs("div",{children:[a.jsx(De,{children:"Select Post"}),a.jsxs(Mn,{value:r.post_id,onValueChange:u=>i({...r,post_id:u}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{placeholder:"Choose a post"})}),a.jsx(Pn,{children:o.map(u=>a.jsx(it,{value:u.id,children:u.title},u.id))})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Variant A"}),a.jsx(dn,{placeholder:"Original version...",value:r.variant_a.content,onChange:u=>i({...r,variant_a:{...r.variant_a,content:u.target.value}}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Variant B"}),a.jsx(dn,{placeholder:"Test version...",value:r.variant_b.content,onChange:u=>i({...r,variant_b:{...r.variant_b,content:u.target.value}}),className:"mt-1.5"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{onClick:l,className:"flex-1",children:"Create Test"}),a.jsx(ae,{onClick:()=>n(!1),variant:"outline",children:"Cancel"})]})]})]}),a.jsxs("div",{className:"grid gap-4",children:[s.map(u=>{var m,x,y,v,b,w,N,S,_,E,k,O;const d=(((m=u.variant_a)==null?void 0:m.views)||0)+(((x=u.variant_b)==null?void 0:x.views)||0),f=((y=u.variant_a)==null?void 0:y.views)>0?((((v=u.variant_a)==null?void 0:v.conversions)||0)/u.variant_a.views*100).toFixed(1):0,p=((b=u.variant_b)==null?void 0:b.views)>0?((((w=u.variant_b)==null?void 0:w.conversions)||0)/u.variant_b.views*100).toFixed(1):0;return a.jsx(de,{children:a.jsxs(he,{className:"p-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg text-slate-900",children:u.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[a.jsx(Se,{variant:"outline",children:u.test_type}),u.is_active?a.jsx(Se,{className:"bg-green-100 text-green-700",children:"Active"}):a.jsx(Se,{variant:"secondary",children:"Completed"}),u.winner!=="none"&&a.jsxs(Se,{className:"bg-amber-100 text-amber-700 gap-1",children:[a.jsx(Mw,{className:"w-3 h-3"}),"Winner: ",u.winner.toUpperCase()]})]})]}),a.jsxs("p",{className:"text-sm text-slate-500",children:[d," total views"]})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{className:`p-4 rounded-lg border-2 ${u.winner==="a"?"border-amber-300 bg-amber-50":"border-slate-200 bg-slate-50"}`,children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"font-semibold text-slate-900",children:"Variant A"}),u.winner==="a"&&a.jsx(Mw,{className:"w-4 h-4 text-amber-600"})]}),a.jsx("p",{className:"text-sm text-slate-600 mb-3 line-clamp-2",children:(N=u.variant_a)==null?void 0:N.content}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Views:"}),a.jsx("span",{className:"font-semibold",children:((S=u.variant_a)==null?void 0:S.views)||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Clicks:"}),a.jsx("span",{className:"font-semibold",children:((_=u.variant_a)==null?void 0:_.clicks)||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Conversions:"}),a.jsxs("span",{className:"font-semibold text-green-600",children:[f,"%"]})]})]}),u.is_active&&u.winner==="none"&&a.jsx(ae,{size:"sm",onClick:()=>c(u.id,"a"),className:"w-full mt-3",children:"Declare Winner"})]}),a.jsxs("div",{className:`p-4 rounded-lg border-2 ${u.winner==="b"?"border-amber-300 bg-amber-50":"border-slate-200 bg-slate-50"}`,children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"font-semibold text-slate-900",children:"Variant B"}),u.winner==="b"&&a.jsx(Mw,{className:"w-4 h-4 text-amber-600"})]}),a.jsx("p",{className:"text-sm text-slate-600 mb-3 line-clamp-2",children:(E=u.variant_b)==null?void 0:E.
672content}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Views:"}),a.jsx("span",{className:"font-semibold",children:((k=u.variant_b)==null?void 0:k.views)||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Clicks:"}),a.jsx("span",{className:"font-semibold",children:((O=u.variant_b)==null?void 0:O.clicks)||0})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Conversions:"}),a.jsxs("span",{className:"font-semibold text-green-600",children:[p,"%"]})]})]}),u.is_active&&u.winner==="none"&&a.jsx(ae,{size:"sm",onClick:()=>c(u.id,"b"),className:"w-full mt-3",children:"Declare Winner"})]})]})]})},u.id)}),s.length===0&&!t&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No A/B tests yet. Create one to get started!"})]})]})}function QOe(){const{data:e=[]}=st({queryKey:["user-flows"],queryFn:async()=>{try{return await ce.entities.UserFlow.list()}catch(d){return console.error("Error loading flows:",d),[]}}}),t=e.filter(d=>d.flow_type==="landing_to_subscription"),n=t.filter(d=>d.completed).length,r=t.length>0?(n/t.length*100).toFixed(1):0,i=e.filter(d=>d.flow_type==="post_to_share"),s=i.filter(d=>d.completed).length,o=i.length>0?(s/i.length*100).toFixed(1):0,l=e.filter(d=>!d.completed&&d.drop_off_point).reduce((d,f)=>(d[f.drop_off_point]=(d[f.drop_off_point]||0)+1,d),{}),c=Object.entries(l).sort((d,f)=>f[1]-d[1]).slice(0,5),u=t.filter(d=>d.duration_seconds).length>0?Math.round(t.reduce((d,f)=>d+(f.duration_seconds||0),0)/t.filter(d=>d.duration_seconds).length):0;return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(_n,{className:"w-5 h-5 text-green-500"}),"Landing â Subscription Flow"]})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[a.jsx("span",{className:"text-slate-600",children:"Conversion Rate"}),a.jsxs("span",{className:"font-semibold text-green-600",children:[r,"%"]})]}),a.jsx(cs,{value:parseFloat(r),className:"h-2"})]}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Total Journeys:"}),a.jsx("span",{className:"font-semibold",children:t.length})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Completed:"}),a.jsx("span",{className:"font-semibold text-green-600",children:n})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Avg. Time:"}),a.jsxs("span",{className:"font-semibold",children:[u,"s"]})]})]}),a.jsxs("div",{className:"pt-4 border-t",children:[a.jsx("p",{className:"text-xs text-slate-500 mb-3",children:"Typical Journey:"}),a.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a.jsx("span",{className:"px-2 py-1 bg-blue-100 text-blue-700 rounded",children:"Landing"}),a.jsx(Sh,{className:"w-3 h-3 text-slate-400"}),a.jsx("span",{className:"px-2 py-1 bg-purple-100 text-purple-700 rounded",children:"Browse"}),a.jsx(Sh,{className:"w-3 h-3 text-slate-400"}),a.jsx("span",{className:"px-2 py-1 bg-green-100 text-green-700 rounded",children:"Subscribe"})]})]})]})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(_n,{className:"w-5 h-5 text-purple-500"}),"Post â Share Flow"]})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[a.jsx("span",{className:"text-slate-600",children:"Share Rate"}),a.jsxs("span",{className:"font-semibold text-purple-600",children:[o,"%"]})]}),a.jsx(cs,{value:parseFloat(o),className:"h-2"})]}),a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Total Journeys:"}),a.jsx("span",{className:"font-semibold",children:i.length})]}),a.jsxs("div",{className:"flex justify-between",children:[a.jsx("span",{className:"text-slate-600",children:"Completed:"}),a.jsx("span",{className:"font-semibold text-purple-600",children:s})]})]}),a.jsxs("div",{className:"pt-4 border-t",children:[a.jsx("p",{className:"text-xs text-slate-500 mb-3",children:"Typical Journey:"}),a.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a.jsx("span",{className:"px-2 py-1 bg-blue-100 text-blue-700 rounded",children:"Read Post"}),a.jsx(Sh,{className:"w-3 h-3 text-slate-400"}),a.jsx("span",{className:"px-2 py-1 bg-purple-100 text-purple-700 rounded",children:"Share"})]})]})]})]})]}),c.length>0&&a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(Zk,{className:"w-5 h-5 text-red-500"}),"Top Drop-off Points"]})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-3",children:c.map(([d,f])=>a.jsxs("div",{className:"flex items-center justify-between p-3 bg-red-50 rounded-lg border border-red-100",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(As,{className:"w-4 h-4 text-red-500"}),a.jsx("span",{className:"font-medium text-slate-900",children:d})]}),a.jsxs("span",{className:"text-sm font-semibold text-red-600",children:[f," drop-offs"]})]},d))})})]})]})}var y_="rovingFocusGroup.onEntryFocus",ZOe={bubbles:!1,cancelable:!0},ym="RovingFocusGroup",[_k,dG,JOe]=$W(ym),[eAe,fG]=ul(ym,[JOe]),[tAe,nAe]=eAe(ym),hG=T.forwardRef((e,t)=>
vendor: 6,052 bytes, line 672
672a.jsx(_k.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(_k.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(rAe,{...e,ref:t})})}));hG.displayName=ym;var rAe=T.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,p=T.useRef(null),m=gn(t,p),x=ZA(s),[y,v]=Ed({prop:o,defaultProp:l??null,onChange:c,caller:ym}),[b,w]=T.useState(!1),N=Jo(u),S=dG(n),_=T.useRef(!1),[E,k]=T.useState(0);return T.useEffect(()=>{const O=p.current;if(O)return O.addEventListener(y_,N),()=>O.removeEventListener(y_,N)},[N]),a.jsx(tAe,{scope:n,orientation:r,dir:x,loop:i,currentTabStopId:y,onItemFocus:T.useCallback(O=>v(O),[v]),onItemShiftTab:T.useCallback(()=>w(!0),[]),onFocusableItemAdd:T.useCallback(()=>k(O=>O+1),[]),onFocusableItemRemove:T.useCallback(()=>k(O=>O-1),[]),children:a.jsx(Tt.div,{tabIndex:b||E===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:Mt(e.onMouseDown,()=>{_.current=!0}),onFocus:Mt(e.onFocus,O=>{const I=!_.current;if(O.target===O.currentTarget&&I&&!b){const A=new CustomEvent(y_,ZOe);if(O.currentTarget.dispatchEvent(A),!A.defaultPrevented){const C=S().filter(H=>H.focusable),R=C.find(H=>H.active),D=C.find(H=>H.id===y),F=[R,D,...C].filter(Boolean).map(H=>H.ref.current);gG(F,d)}}_.current=!1}),onBlur:Mt(e.onBlur,()=>w(!1))})})}),pG="RovingFocusGroupItem",mG=T.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...l}=e,c=Ho(),u=s||c,d=nAe(pG,n),f=d.currentTabStopId===u,p=dG(n),{onFocusableItemAdd:m,onFocusableItemRemove:x,currentTabStopId:y}=d;return T.useEffect(()=>{if(r)return m(),()=>x()},[r,m,x]),a.jsx(_k.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:a.jsx(Tt.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:Mt(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:Mt(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Mt(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=aAe(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let N=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")N.reverse();else if(b==="prev"||b==="next"){b==="prev"&&N.reverse();const S=N.indexOf(v.currentTarget);N=d.loop?oAe(N,S+1):N.slice(S+1)}setTimeout(()=>gG(N))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:y!=null}):o})})});mG.displayName=pG;var iAe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function sAe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function aAe(e,t,n){const r=sAe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return iAe[r]}function gG(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function oAe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lAe=hG,cAe=mG;function uAe(e,t){return T.useReducer((n,r)=>t[n][r]??n,e)}var vm=e=>{const{present:t,children:n}=e,r=dAe(t),i=typeof n=="function"?n({present:r.isPresent}):T.Children.only(n),s=gn(r.ref,fAe(i));return typeof n=="function"||r.isPresent?T.cloneElement(i,{ref:s}):null};vm.displayName="Presence";function dAe(e){const[t,n]=T.useState(),r=T.useRef(null),i=T.useRef(e),s=T.useRef("none"),o=e?"mounted":"unmounted",[l,c]=uAe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const u=ly(r.current);s.current=l==="mounted"?u:"none"},[l]),Dr(()=>{const u=r.current,d=i.current;if(d!==e){const p=s.current,m=ly(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Dr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const y=ly(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&y&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=m=>{m.target===t&&(s.current=ly(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:T.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ly(e){return(e==null?void 0:e.animationName)||"none"}function fAe(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 k0="Tabs",[hAe]=ul(k0,[fG]),yG=fG(),[pAe,p2]=hAe(k0),vG=T.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=ZA(l),[f,p]=Ed({prop:r,onChange:i,defaultProp:s??"",caller:k0});return a.jsx(pAe,{scope:n,baseId:Ho(),value:f,onValueChange:p,orientation:o,dir:d,activationMode:c,children:a.jsx(Tt.div,{dir:d,"data-orientation":o,...u,ref:t})})});vG.displayName=k0;var xG="TabsList",bG=T.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,s=p2(xG,n),o=yG(n);return a.jsx(lAe,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:r,children:a.jsx(Tt.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:t})})});bG.displayName=xG;var wG="TabsTrigger",jG=T.forwardRef((e,t)=>
672{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=e,o=p2(wG,n),l=yG(n),c=_G(o.baseId,r),u=EG(o.baseId,r),d=r===o.value;return a.jsx(cAe,{asChild:!0,...l,focusable:!i,active:d,children:a.jsx(Tt.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:t,onMouseDown:Mt(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:Mt(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:Mt(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!i&&f&&o.onValueChange(r)})})})});jG.displayName=wG;var SG="TabsContent",NG=T.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...o}=e,l=p2(SG,n),c=_G(l.baseId,r),u=EG(l.baseId,r),d=r===l.value,f=T.useRef(d);return T.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),a.jsx(vm,{present:i||d,children:({present:p})=>a.jsx(Tt.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&s})})});NG.displayName=SG;function _G(e,t){return`${e}-trigger-${t}`}function EG(e,t){return`${e}-content-${t}`}var mAe=vG,PG=bG,kG=jG,OG=NG;const ur=mAe,Jn=T.forwardRef(({className:e,...t},n)=>a.jsx(PG,{ref:n,className:Ot("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Jn.displayName=PG.displayName;const et=T.forwardRef(({className:e,...t},n)=>a.jsx(kG,{ref:n,className:Ot("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));et.displayName=kG.displayName;const ht=T.forwardRef(({className:e,...t},n)=>a.jsx(OG,{ref:n,className:Ot("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ht.displayName=OG.displayName;function Dt({className:e,...t}){return a.jsx("div",{className:Ot("animate-pulse rounded-md bg-primary/10",e),...t})}function gAe(){const[e,t]=T.useState("30"),{data:n=[],isLoading:r,refetch:i}=st({queryKey:["analytics",e],queryFn:()=>ce.entities.Analytics.list("-date",100)}),{data:s=[]}=st({queryKey:["posts-for-analytics"],queryFn:()=>ce.entities.BlogPost.filter({status:"published"})}),{data:o=[]}=st({queryKey:["subscribers-analytics"],queryFn:()=>ce.entities.Subscriber.list()}),{data:l=[]}=st({queryKey:["demographics"],queryFn:()=>ce.entities.UserDemographics.list()}),{data:c=[]}=st({queryKey:["post-engagement"],queryFn:async()=>{try{return await ce.entities.PostEngagement.list()}catch(x){return console.error("Error loading engagement:",x),[]}}}),d=(()=>{if(n.length===0)return{totalViews:0,uniqueVisitors:0,avgTimeOnPage:0,totalShares:0,avgBounceRate:0,avgCTR:0};const x=n.reduce((y,v)=>{y.views+=v.page_views||0,y.visitors+=v.unique_visitors||0,y.time+=v.avg_time_on_page||0,y.bounceRate+=v.bounce_rate||0;const b=v.social_shares||{};y.shares+=(b.twitter||0)+(b.linkedin||0)+(b.facebook||0);const w=v.seo_metrics||{};return y.ctr+=w.ctr||0,y},{views:0,visitors:0,time:0,shares:0,bounceRate:0,ctr:0});return{totalViews:x.views,uniqueVisitors:x.visitors,avgTimeOnPage:Math.round(x.time/n.length),totalShares:x.shares,avgBounceRate:Math.round(x.bounceRate/n.length),avgCTR:(x.ctr/n.length).toFixed(2)}})(),f=()=>n.length===0?Array.from({length:7},(x,y)=>{const v=new Date;return v.setDate(v.getDate()-(6-y)),{date:v.toLocaleDateString("en-US",{month:"short",day:"numeric"}),"Page Views":Math.floor(Math.random()*500)+200,"Unique Visitors":Math.floor(Math.random()*300)+100,"Avg Time (min)":Math.floor(Math.random()*5)+1}}):n.slice(0,10).reverse().map(x=>({date:new Date(x.date).toLocaleDateString("en-US",{month:"short",day:"numeric"}),"Page Views":x.page_views||0,"Unique Visitors":x.unique_visitors||0,"Avg Time (min)":Math.round((x.avg_time_on_page||0)/60)})),p=()=>n.length===0?Array.from({length:7},(x,y)=>{const v=new Date;return v.setDate(v.getDate()-(6-y)),{date:v.toLocaleDateString("en-US",{month:"short",day:"numeric"}),"Organic Clicks":Math.floor(Math.random()*100)+50,Impressions:Math.floor(Math.random()*1e3)+500,"CTR (%)":(Math.random()*5+2).toFixed(1)}}):n.slice(0,10).reverse().map(x=>{const y=x.seo_metrics||{};return{date:new Date(x.date).toLocaleDateString("en-US",{month:"short",day:"numeric"}),"Organic Clicks":y.organic_clicks||0,Impressions:y.impressions||0,"CTR (%)":y.ctr||0}}),m=()=>{if(s.length===0)return[];const x={};
672return n.forEach(y=>{x[y.post_id]||(x[y.post_id]={views:0,time:0,bounceRate:0,count:0}),x[y.post_id].views+=y.page_views||0,x[y.post_id].time+=y.avg_time_on_page||0,x[y.post_id].bounceRate+=y.bounce_rate||0,x[y.post_id].count+=1}),s.filter(y=>x[y.id]).map(y=>{const v=x[y.id];return{id:y.id,title:y.title,slug:y.slug,views:v.views,avgTime:Math.round(v.time/v.count),bounceRate:Math.round(v.bounceRate/v.count)}}).sort((y,v)=>v.views-y.views).slice(0,5)};return a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Analytics"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Track your blog's performance and insights"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs(Mn,{value:e,onValueChange:t,children:[a.jsxs(En,{className:"w-36",children:[a.jsx(Yr,{className:"w-4 h-4 mr-2"}),a.jsx(Dn,{})]}),a.jsxs(Pn,{children:[a.jsx(it,{value:"7",children:"Last 7 days"}),a.jsx(it,{value:"30",children:"Last 30 days"}),a.jsx(it,{value:"90",children:"Last 90 days"})]})]}),a.jsx(ae,{variant:"outline",size:"icon",onClick:()=>i(),children:a.jsx(ss,{className:"w-4 h-4"})})]})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-8",children:[a.jsx(ou,{title:"Total Page Views",value:d.totalViews,change:12.5,icon:Qn,color:"indigo",delay:0}),a.jsx(ou,{title:"Unique Visitors",value:d.uniqueVisitors,change:8.2,icon:Is,color:"emerald",delay:.1}),a.jsx(ou,{title:"Avg Time on Page",value:d.avgTimeOnPage,change:-3.1,icon:Rn,color:"amber",suffix:"s",delay:.2}),a.jsx(ou,{title:"Social Shares",value:d.totalShares,change:15.7,icon:Ad,color:"purple",delay:.3}),a.jsx(ou,{title:"Avg Bounce Rate",value:d.avgBounceRate,change:-5.4,icon:Zq,color:"blue",suffix:"%",delay:.4}),a.jsx(ou,{title:"Avg CTR",value:parseFloat(d.avgCTR),change:4.2,icon:Xr,color:"pink",suffix:"%",delay:.5})]}),a.jsxs(ur,{defaultValue:"traffic",className:"space-y-6",children:[a.jsxs(Jn,{className:"bg-slate-100 flex-wrap",children:[a.jsx(et,{value:"traffic",children:"Traffic"}),a.jsx(et,{value:"seo",children:"SEO"}),a.jsx(et,{value:"engagement",children:"Engagement"}),a.jsx(et,{value:"userflow",children:"User Flow"}),a.jsx(et,{value:"demographics",children:"Demographics"}),a.jsx(et,{value:"conversions",children:"Conversions"}),a.jsx(et,{value:"abtests",children:"A/B Tests"})]}),a.jsxs(ht,{value:"traffic",className:"space-y-6",children:[a.jsx(wB,{title:"Traffic Trends",data:f(),type:"line",dataKeys:["Page Views","Unique Visitors"],colors:["#6366f1","#10b981"]}),m().length>0&&a.jsx(yEe,{posts:m()})]}),a.jsxs(ht,{value:"seo",className:"space-y-6",children:[a.jsx(wB,{title:"SEO Metrics",data:p(),type:"line",dataKeys:["Organic Clicks","Impressions"],colors:["#8b5cf6","#3b82f6"]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[a.jsx(vEe,{posts:s,analytics:n}),a.jsx(xEe,{analytics:n})]}),a.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:a.jsxs(de,{className:"border-slate-200",children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(lr,{className:"w-5 h-5 text-indigo-600"}),"Top Keywords"]})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-3",children:["AI technology","Tech trends 2024","Machine learning","Startup advice","Programming tips"].map((x,y)=>a.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-slate-50",children:[a.jsx("span",{className:"text-sm font-medium text-slate-700",children:x}),a.jsxs("div",{className:"text-right",children:[a.jsxs("div",{className:"text-sm font-semibold text-slate-900",children:["#",Math.floor(Math.random()*10)+1]}),a.jsx("div",{className:"text-xs text-slate-500",children:"ranking"})]})]},y))})})]})})]}),a.jsx(ht,{value:"demographics",className:"space-y-6",children:a.jsx(wEe,{demographics:l})}),a.jsx(ht,{value:"engagement",className:"space-y-6",children:a.jsx(jEe,{posts:s,analytics:n,engagements:c})}),a.jsx(ht,{value:"userflow",className:"space-y-6",children:a.jsx(QOe,{})}),a.jsx(ht,{value:"conversions",className:"space-y-6",children:a.jsx(bEe,{subscribers:o})}),a.jsx(ht,{value:"abtests",className:"space-y-6",children:a.jsx(XOe,{})})]})]})}const yAe={"tech-news":{bg:"bg-blue-100",text:"text-blue-700",label:"Tech News"},"app-reviews":{bg:"bg-purple-100",text:"text-purple-700",label:"App Reviews"},tutorials:{bg:"bg-green-100",text:"text-green-700",label:"Tutorials"},"ai-ml":{bg:"bg-pink-100",text:"text-pink-700",label:"AI & ML"},startups:{bg:"bg-orange-100",text:"text-orange-700",label:"Startups"},gadgets:{bg:"bg-cyan-100",text:"text-cyan-700",label:"Gadgets"},programming:{bg:"bg-indigo-100",text:"text-indigo-700",label:"Programming"},cybersecurity:{bg:"bg-red-100",text:"text-red-700",label:"Cybersecurity"}};function Ek({category:e,size:t="default"}){const n=yAe[e]||{bg:"bg-slate-100",text:"text-slate-700",label:e};return a.jsx(Se,{className:`${n.bg} ${n.text} border-0 font-medium ${t==="lg"?"text-sm px-3 py-1":"text-xs"}`,children:n.label})}const vAe="modulepreload",xAe=function(e){return"/"+e},YB={},bAe=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}
672))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(n.map(u=>{if(u=xAe(u),u in YB)return;YB[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":vAe,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((m,x)=>{p.addEventListener("load",m),p.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})};function qo({code:e,className:t="",placementId:n=null}){const r=T.useRef(null),[i,s]=ee.useState(!1);return T.useEffect(()=>{if(!e||!r.current)return;(async()=>{try{r.current.innerHTML=e;const l=r.current.querySelectorAll("script");for(const c of l){const u=document.createElement("script");Array.from(c.attributes).forEach(d=>{u.setAttribute(d.name,d.value)}),c.textContent&&(u.textContent=c.textContent),c.parentNode&&c.parentNode.replaceChild(u,c),u.src&&await new Promise((d,f)=>{u.onload=d,u.onerror=f,setTimeout(d,3e3)})}if(s(!0),n)try{const{base44:c}=await bAe(async()=>{const{base44:f}=await Promise.resolve().then(()=>tae);return{base44:f}},void 0),d=(await c.entities.AdPlacement.list()).find(f=>f.id===n);d&&await c.entities.AdPlacement.update(n,{impressions:(d.impressions||0)+1})}catch(c){console.error("Failed to track impression:",c)}}catch(l){console.error("Error loading ad:",l),s(!0)}})()},[e,n]),e?a.jsx("div",{ref:r,className:`ad-slot ${t} ${i?"opacity-100 transition-opacity duration-300":"opacity-0"}`,style:{minHeight:"50px"}}):null}function AG({inline:e=!1}){const[t,n]=T.useState(""),[r,i]=T.useState(""),[s,o]=T.useState("weekly"),[l,c]=T.useState(!1),[u,d]=T.useState(!1),f=async p=>{if(p.preventDefault(),!!t){c(!0);try{if((await ce.entities.Subscriber.filter({email:t})).length>0){alert("This email is already subscribed!"),c(!1);return}await ce.entities.Subscriber.create({email:t,full_name:r,status:"active",preferences:{digest_frequency:s,categories:[]},unsubscribe_token:Math.random().toString(36).substring(2,15)}),d(!0),setTimeout(()=>{d(!1),n(""),i("")},3e3)}catch{alert("Failed to subscribe. Please try again.")}finally{c(!1)}}};return e?a.jsxs("div",{className:"bg-gradient-to-r from-indigo-50 to-purple-50 rounded-xl p-6 border border-indigo-100",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(xr,{className:"w-5 h-5 text-indigo-600"}),a.jsx("h3",{className:"font-semibold text-slate-900",children:"Subscribe to Newsletter"})]}),a.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Get the latest tech news delivered to your inbox"}),a.jsxs("form",{onSubmit:f,className:"space-y-3",children:[a.jsx(Ye,{type:"email",placeholder:"[email protected]",value:t,onChange:p=>n(p.target.value),required:!0,disabled:l||u}),a.jsxs(ae,{type:"submit",disabled:l||u,className:"w-full bg-indigo-600 hover:bg-indigo-700",children:[l?a.jsx(lt,{className:"w-4 h-4 animate-spin mr-2"}):u?a.jsx(Cn,{className:"w-4 h-4 mr-2"}):a.jsx(xr,{className:"w-4 h-4 mr-2"}),u?"Subscribed!":"Subscribe"]})]})]}):a.jsx(de,{className:"border-indigo-200",children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"text-center mb-6",children:[a.jsx("div",{className:"w-12 h-12 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-3",children:a.jsx(xr,{className:"w-6 h-6 text-indigo-600"})}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:"Stay Updated"}),a.jsx("p",{className:"text-slate-600",children:"Subscribe to receive our latest posts and insights"})]}),u?a.jsxs("div",{className:"text-center py-8",children:[a.jsx(Cn,{className:"w-16 h-16 text-emerald-500 mx-auto mb-4"}),a.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-2",children:"You're Subscribed!"}),a.jsx("p",{className:"text-slate-600",children:"Thanks for subscribing. Check your inbox for updates."})]}):a.jsxs("form",{onSubmit:f,className:"space-y-4",children:[a.jsx(Ye,{type:"email",placeholder:"Email address",value:t,onChange:p=>n(p.target.value),required:!0,disabled:l}),a.jsx(Ye,{type:"text",placeholder:"Name (optional)",value:r,onChange:p=>i(p.target.value),disabled:l}),a.jsxs(Mn,{value:s,onValueChange:o,disabled:l,children:[a.jsx(En,{children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"daily",children:"Daily Digest"}),a.jsx(it,{value:"weekly",children:"Weekly Digest"}),a.jsx(it,{value:"monthly",children:"Monthly Digest"})]})]}),a.jsx(ae,{type:"submit",disabled:l,className:"w-full bg-indigo-600 hover:bg-indigo-700",children:l?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin mr-2"}),"Subscribing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(xr,{className:"w-4 h-4 mr-2"}),"Subscribe Now"]})}),a.jsx("p",{className:"text-xs text-slate-500 text-center",children:"Unsubscribe anytime. We respect your privacy."})]})]})})}function XB(){const[e,t]=T.useState(""),[n,r]=T.useState(!1),i=T.useRef(null),{data:s=[]}=st({queryKey:["search-posts"],queryFn:()=>ce.entities.BlogPost.filter({status:"published"},"-published_date",200)}),o=e.trim().length<2?[]:s.filter(c=>{var d,f,p,m;const u=e.toLowerCase();return((d=c.title)==null?void 0:d.toLowerCase().includes(u))||((f=c.excerpt)==null?void 0:f.toLowerCase().includes(u))||((
672p=c.content)==null?void 0:p.toLowerCase().includes(u))||((m=c.tags)==null?void 0:m.some(x=>x.toLowerCase().includes(u)))}).slice(0,6);T.useEffect(()=>{const c=u=>{i.current&&!i.current.contains(u.target)&&r(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]);const l=()=>{t(""),r(!1)};return a.jsxs("div",{ref:i,className:"relative w-72",children:[a.jsx(lr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none"}),a.jsx(Ye,{placeholder:"Search articles...",value:e,onChange:c=>{t(c.target.value),r(!0)},onFocus:()=>r(!0),className:"pl-10 bg-slate-50 border-slate-200"}),n&&e.trim().length>=2&&a.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 bg-white rounded-xl border border-slate-200 shadow-xl z-50 overflow-hidden",children:o.length===0?a.jsxs("div",{className:"px-4 py-6 text-center text-slate-400 text-sm",children:['No results for "',a.jsx("span",{className:"font-medium text-slate-600",children:e}),'"']}):a.jsx("ul",{children:o.map(c=>{var u;return a.jsx("li",{children:a.jsxs(ft,{to:Xe("BlogPost")+`?slug=${c.slug}`,onClick:l,className:"flex items-start gap-3 px-4 py-3 hover:bg-slate-50 transition-colors",children:[c.cover_image?a.jsx("img",{src:c.cover_image,alt:"",className:"w-10 h-10 rounded-lg object-cover flex-shrink-0 mt-0.5"}):a.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 flex items-center justify-center flex-shrink-0 mt-0.5",children:a.jsx(lr,{className:"w-4 h-4 text-indigo-400"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-900 line-clamp-1",children:c.title}),c.excerpt&&a.jsx("p",{className:"text-xs text-slate-500 line-clamp-1 mt-0.5",children:c.excerpt}),a.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.reading_time&&a.jsxs("span",{className:"flex items-center gap-1 text-xs text-slate-400",children:[a.jsx(Rn,{className:"w-3 h-3"}),c.reading_time," min"]}),(u=c.tags)==null?void 0:u.slice(0,2).map(d=>a.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-indigo-500",children:[a.jsx(d8,{className:"w-2.5 h-2.5"}),d]},d))]})]})]})},c.id)})})})]})}function Tn(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 Ya(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function CG(e,t){const n=Tn(e);if(isNaN(t))return Ya(e,NaN);if(!t)return n;const r=n.getDate(),i=Ya(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const s=i.getDate();return r>=s?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}const TG=6048e5,wAe=864e5,RG=6e4,IG=36e5;let jAe={};function O0(){return jAe}function Ip(e,t){var l,c,u,d;const n=O0(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,i=Tn(e),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function ox(e){return Ip(e,{weekStartsOn:1})}function MG(e){const t=Tn(e),n=t.getFullYear(),r=Ya(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=ox(r),s=Ya(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const o=ox(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function lx(e){const t=Tn(e);return t.setHours(0,0,0,0),t}function QB(e){const t=Tn(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 DG(e,t){const n=lx(e),r=lx(t),i=+n-QB(n),s=+r-QB(r);return Math.round((i-s)/wAe)}function SAe(e){const t=MG(e),n=Ya(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ox(n)}function ZB(e,t){const n=lx(e),r=lx(t);return+n==+r}function NAe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _Ae(e){if(!NAe(e)&&typeof e!="number")return!1;const t=Tn(e);return!isNaN(Number(t))}function EAe(e,t){const n=Tn(e),r=Tn(t),i=JB(n,r),s=Math.abs(DG(n,r));n.setDate(n.getDate()-i*s);const o=+(JB(n,r)===-i),l=i*(s-o);return l===0?0:l}function JB(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function PAe(e){const t=Tn(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function kAe(e,t){const n=Tn(e.start),r=Tn(e.end);let i=+n>+r;const s=i?+n:+r,o=i?r:n;o.setHours(0,0,0,0);let l=1;const c=[];for(;+o<=s;)c.push(Tn(o)),o.setDate(o.getDate()+l),o.setHours(0,0,0,0);return i?c.reverse():c}function OAe(e){const t=Tn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function AAe(e){const t=Tn(e),n=Ya(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const CAe={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"}}
vendor: 6,207 bytes, line 672
672,TAe=(e,t,n)=>{let r;const i=CAe[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 v_(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const RAe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},IAe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},MAe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},DAe={date:v_({formats:RAe,defaultWidth:"full"}),time:v_({formats:IAe,defaultWidth:"full"}),dateTime:v_({formats:MAe,defaultWidth:"full"})},LAe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$Ae=(e,t,n,r)=>LAe[e];function th(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;i=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[o]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}const BAe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},FAe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qAe={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"]},zAe={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"]},UAe={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"}},VAe={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"}},WAe=(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"},HAe={ordinalNumber:WAe,era:th({values:BAe,defaultWidth:"wide"}),quarter:th({values:FAe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:th({values:qAe,defaultWidth:"wide"}),day:th({values:zAe,defaultWidth:"wide"}),dayPeriod:th({values:UAe,defaultWidth:"wide",formattingValues:VAe,defaultFormattingWidth:"wide"})};function nh(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 o=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?KAe(l,f=>f.test(o)):GAe(l,f=>f.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function GAe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function KAe(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function YAe(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 o=e.valueCallback?e.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(i.length);return{value:o,rest:l}}}const XAe=/^(\d+)(th|st|nd|rd)?/i,QAe=/\d+/i,ZAe={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},JAe={any:[/^b/i,/^(a|c)/i]},e2e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},t2e={any:[/1/i,/2/i,/3/i,/4/i]},n2e={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},r2e={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]},i2e={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},s2e={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]},a2e={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},o2e={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}},l2e={ordinalNumber:YAe({matchPattern:XAe,parsePattern:QAe,valueCallback:e=>parseInt(e,10)}),era:nh({matchPatterns:ZAe,defaultMatchWidth:"wide",parsePatterns:JAe,defaultParseWidth:"any"}),quarter:nh({matchPatterns:e2e,defaultMatchWidth:"wide",parsePatterns:t2e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:nh({matchPatterns:n2e,defaultMatchWidth:"wide",parsePatterns:r2e,defaultParseWidth:"any"}),day:nh({matchPatterns:i2e,defaultMatchWidth:"wide",parsePatterns:s2e,defaultParseWidth:"any"}),dayPeriod:nh({matchPatterns:a2e,defaultMatchWidth:"any",parsePatterns:o2e,defaultParseWidth:"any"})},c2e={code:"en-US",formatDistance:TAe,formatLong:DAe,formatRelative:$Ae,localize:HAe,match:l2e,o
vendor: 10,951 bytes, line 672
672ptions:{weekStartsOn:0,firstWeekContainsDate:1}};function u2e(e){const t=Tn(e);return DG(t,AAe(t))+1}function d2e(e){const t=Tn(e),n=+ox(t)-+SAe(t);return Math.round(n/TG)+1}function LG(e,t){var d,f,p,m;const n=Tn(e),r=n.getFullYear(),i=O0(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,o=Ya(e,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const l=Ip(o,t),c=Ya(e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const u=Ip(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function f2e(e,t){var l,c,u,d;const n=O0(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=LG(e,t),s=Ya(e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Ip(s,t)}function h2e(e,t){const n=Tn(e),r=+Ip(n,t)-+f2e(n,t);return Math.round(r/TG)+1}function Yt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const So={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Yt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Yt(n+1,2)},d(e,t){return Yt(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 Yt(e.getHours()%12||12,t.length)},H(e,t){return Yt(e.getHours(),t.length)},m(e,t){return Yt(e.getMinutes(),t.length)},s(e,t){return Yt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Yt(i,t.length)}},mu={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eF={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 So.y(e,t)},Y:function(e,t,n,r){const i=LG(e,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return Yt(o,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Yt(s,t.length)},R:function(e,t){const n=MG(e);return Yt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Yt(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 Yt(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 Yt(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 So.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 Yt(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=h2e(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Yt(i,t.length)},I:function(e,t,n){const r=d2e(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Yt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):So.d(e,t)},D:function(e,t,n){const r=u2e(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Yt(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 Yt(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 Yt(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 Yt(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=mu.noon:r===0?i=mu.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=mu.evening:r>=12?i=mu.afternoon:r>=4?i=mu.morning:i=mu.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 So.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):So.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Yt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Yt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):So.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):So.s(e,t)},S:function(e,t){return So.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return nF(r);case"XXXX":case"XX":return Fl(r);case"XXXXX":case"XXX":default:return Fl(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nF(r);case"xxxx":case"xx":return Fl(r);case"xxxxx":case"xxx":default:return Fl(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tF(r,":");case"OOOO":default:return"GMT"+Fl(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tF(r,":");case"zzzz":default:return"GMT"+Fl(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Yt(r,t.length)},T:function(e,t,n){const r=e.getTime();return Yt(r,t.length)}};function tF(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+Yt(s,2)}function nF(e,t){return e%60===0?(e>0?"-":"+")+Yt(Math.abs(e)/60,2):Fl(e,t)}function Fl(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Yt(Math.trunc(r/60),2),s=Yt(r%60,2);return n+i+t+s}const rF=(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"})}},$G=(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"})}},p2e=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return rF(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}}",rF(r,t)).replace("{{time}}",$G(i,t))},m2e={p:$G,P:p2e},g2e=/^D+$/,y2e=/^Y+$/,v2e=["D","DD","YY","YYYY"];function x2e(e){return g2e.test(e)}function b2e(e){return y2e.test(e)}function w2e(e,t,n){const r=j2e(e,t,n);if(console.warn(r),v2e.includes(e))throw new RangeError(r)}function j2e(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 S2e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,N2e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_2e=/^'([^]*?)'?$/,E2e=/''/g,P2e=/[a-zA-Z]/;function Jt(e,t,n){var d,f,p,m;const r=O0(),i=r.locale??c2e,s=r.firstWeekContainsDate??((f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,o=r.weekStartsOn??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,l=Tn(e);if(!_Ae(l))throw new RangeError("Invalid time value");let c=t.match(N2e).map(x=>{const y=x[0];if(y==="p"||y==="P"){const v=m2e[y];return v(x,i.formatLong)}return x}).join("").match(S2e).map(x=>
672{if(x==="''")return{isToken:!1,value:"'"};const y=x[0];if(y==="'")return{isToken:!1,value:k2e(x)};if(eF[y])return{isToken:!0,value:x};if(y.match(P2e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:x}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return c.map(x=>{if(!x.isToken)return x.value;const y=x.value;(b2e(y)||x2e(y))&&w2e(y,t,String(e));const v=eF[y[0]];return v(l,y,i.localize,u)}).join("")}function k2e(e){const t=e.match(_2e);return t?t[1].replace(E2e,"'"):e}function O2e(e,t){const n=Tn(e),r=Tn(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function A2e(e,t){const r=I2e(e);let i;if(r.date){const c=M2e(r.date,2);i=D2e(c.restDateString,c.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const s=i.getTime();let o=0,l;if(r.time&&(o=L2e(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(l=$2e(r.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(s+o),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(s+o+l)}const cy={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},C2e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,T2e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,R2e=/^([+-])(\d{2})(?::?(\d{2}))?$/;function I2e(e){const t={},n=e.split(cy.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],cy.timeZoneDelimiter.test(t.date)&&(t.date=e.split(cy.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=cy.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function M2e(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,s=r[2]?parseInt(r[2]):null;return{year:s===null?i:s*100,restDateString:e.slice((r[1]||r[2]).length)}}function D2e(e,t){if(t===null)return new Date(NaN);const n=e.match(C2e);if(!n)return new Date(NaN);const r=!!n[4],i=rh(n[1]),s=rh(n[2])-1,o=rh(n[3]),l=rh(n[4]),c=rh(n[5])-1;if(r)return U2e(t,l,c)?B2e(t,l,c):new Date(NaN);{const u=new Date(0);return!q2e(t,s,o)||!z2e(t,i)?new Date(NaN):(u.setUTCFullYear(t,s,Math.max(i,o)),u)}}function rh(e){return e?parseInt(e):1}function L2e(e){const t=e.match(T2e);if(!t)return NaN;const n=x_(t[1]),r=x_(t[2]),i=x_(t[3]);return V2e(n,r,i)?n*IG+r*RG+i*1e3:NaN}function x_(e){return e&&parseFloat(e.replace(",","."))||0}function $2e(e){if(e==="Z")return 0;const t=e.match(R2e);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return W2e(r,i)?n*(r*IG+i*RG):NaN}function B2e(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,s=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+s),r}const F2e=[31,null,31,30,31,30,31,31,30,31,30,31];function BG(e){return e%400===0||e%4===0&&e%100!==0}function q2e(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(F2e[t]||(BG(e)?29:28))}function z2e(e,t){return t>=1&&t<=(BG(e)?366:365)}function U2e(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function V2e(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function W2e(e,t){return t>=0&&t<=59}function H2e(e,t){return CG(e,-1)}const G2e=[{value:"all",label:"All"},{value:"tech-news",label:"Tech News"},{value:"app-reviews",label:"App Reviews"},{value:"tutorials",label:"Tutorials"},{value:"ai-ml",label:"AI & ML"},{value:"startups",label:"Startups"},{value:"gadgets",label:"Gadgets"},{value:"programming",label:"Programming"},{value:"cybersecurity",label:"Cybersecurity"}];function K2e(){const[e,t]=T.useState("all"),[n,r]=T.useState(null),{data:i=[],isLoading:s}=st({queryKey:["published-posts"],queryFn:()=>ce.entities.BlogPost.filter({status:"published"},"-published_date",100)}),{data:o=[]}=st({queryKey:["ad-placements-blog"],queryFn:async()=>{try{return await ce.entities.AdPlacement.filter({is_active:!0})}catch(d){return console.error("Error loading ad placements:",d),[]}}});T.useEffect(()=>{(async()=>{const f=await ce.entities.User.list();f.length>0&&r({enabled:f[0].ads_enabled,header:f[0].header_ad_code,sidebar:f[0].sidebar_ad_code})})()},[]);const l=i.filter(d=>e==="all"||d.category===e),c=l[0],u=l.slice(1);return a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx("header",{className:"sticky top-0 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[a.jsxs(ft,{to:Xe("Blog"),className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:a.jsx(Ct,{className:"w-5 h-5 text-white"})}),a.jsx("span",{className:"font-bold text-xl text-slate-900",children:"TechBlog"})]}),a.jsx("div",{className:"hidden sm:block",children:a.jsx(XB,{})})]})}),a.jsxs("main",{className:"max-w-6xl mx-auto px-4 py-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:20}
672,animate:{opacity:1,y:0},className:"text-center mb-12",children:[a.jsx("h1",{className:"text-4xl lg:text-5xl font-bold text-slate-900 mb-4",children:"Tech Insights & Reviews"}),a.jsx("p",{className:"text-lg text-slate-600 max-w-2xl mx-auto",children:"Discover the latest in technology, app reviews, AI breakthroughs, and startup stories."})]}),(n==null?void 0:n.enabled)&&(n==null?void 0:n.header)&&a.jsx("div",{className:"mb-8",children:a.jsx(qo,{code:n.header,className:"text-center"})}),o.filter(d=>d.location==="header"&&(d.display_pages.includes("blog")||d.display_pages.includes("all"))).map(d=>a.jsx("div",{className:"mb-8",children:a.jsx(qo,{code:d.ad_code,placementId:d.id,className:"text-center"})},d.id)),a.jsx("div",{className:"mb-6 sm:hidden",children:a.jsx(XB,{})}),a.jsx(Pe.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.1},className:"flex flex-wrap gap-2 mb-10 justify-center",children:G2e.map(d=>a.jsx("button",{onClick:()=>t(d.value),className:`px-4 py-2 rounded-full text-sm font-medium transition-all duration-200 ${e===d.value?"bg-indigo-600 text-white shadow-lg shadow-indigo-500/25":"bg-white text-slate-600 hover:bg-slate-50 border border-slate-200"}`,children:d.label},d.value))}),a.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[a.jsx("div",{className:"lg:col-span-2",children:s?a.jsxs("div",{className:"space-y-8",children:[a.jsx(Dt,{className:"h-96 rounded-2xl"}),a.jsx("div",{className:"grid gap-6",children:[...Array(4)].map((d,f)=>a.jsx(Dt,{className:"h-64 rounded-2xl"},f))})]}):l.length>0?a.jsxs(a.Fragment,{children:[c&&a.jsx(Pe.article,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"mb-12",children:a.jsx(ft,{to:Xe("BlogPost")+`?slug=${c.slug}`,children:a.jsxs("div",{className:"group bg-white rounded-3xl overflow-hidden shadow-sm border border-slate-100 hover:shadow-xl transition-all duration-500",children:[c.cover_image&&a.jsx("div",{className:"h-64 overflow-hidden",children:a.jsx("img",{src:c.cover_image,alt:c.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700"})}),a.jsxs("div",{className:"p-8",children:[c.category&&a.jsx(Ek,{category:c.category,size:"lg"}),a.jsx("h2",{className:"text-2xl lg:text-3xl font-bold text-slate-900 mt-4 mb-4 group-hover:text-indigo-600 transition-colors",children:c.title}),a.jsx("p",{className:"text-slate-600 mb-6 line-clamp-3",children:c.excerpt}),a.jsxs("div",{className:"flex items-center text-sm text-slate-400 gap-4",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Yr,{className:"w-4 h-4"}),Jt(new Date(c.published_date||c.created_date),"MMM d, yyyy")]}),c.reading_time&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Rn,{className:"w-4 h-4"}),c.reading_time," min read"]})]})]})]})})}),u.length>0&&a.jsx("div",{className:"space-y-6",children:u.map((d,f)=>a.jsx(Pe.article,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.05*f},children:a.jsx(ft,{to:Xe("BlogPost")+`?slug=${d.slug}`,children:a.jsxs("div",{className:"group bg-white rounded-2xl overflow-hidden shadow-sm border border-slate-100 hover:shadow-lg transition-all duration-300 flex flex-col sm:flex-row",children:[d.cover_image&&a.jsx("div",{className:"sm:w-48 h-48 sm:h-auto overflow-hidden flex-shrink-0",children:a.jsx("img",{src:d.cover_image,alt:d.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),a.jsxs("div",{className:"p-6 flex flex-col flex-1",children:[d.category&&a.jsx(Ek,{category:d.category}),a.jsx("h3",{className:"text-xl font-semibold text-slate-900 mt-3 mb-2 line-clamp-2 group-hover:text-indigo-600 transition-colors",children:d.title}),a.jsx("p",{className:"text-sm text-slate-500 line-clamp-2 flex-1",children:d.excerpt}),a.jsxs("div",{className:"flex items-center text-xs text-slate-400 gap-3 mt-4",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Yr,{className:"w-3.5 h-3.5"}),Jt(new Date(d.published_date||d.created_date),"MMM d")]}),d.reading_time&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Rn,{className:"w-3.5 h-3.5"}),d.reading_time," min"]})]})]})]})})},d.id))})]}):a.jsxs(Pe.div,{initial:{opacity:0}
672,animate:{opacity:1},className:"text-center py-16",children:[a.jsx("div",{className:"w-20 h-20 bg-slate-100 rounded-2xl flex items-center justify-center mx-auto mb-6",children:a.jsx(lr,{className:"w-10 h-10 text-slate-400"})}),a.jsx("h3",{className:"text-xl font-semibold text-slate-900 mb-2",children:"No articles found"}),a.jsx("p",{className:"text-slate-500",children:"Try adjusting your search or filter criteria"})]})}),a.jsx("div",{className:"lg:col-span-1 hidden lg:block",children:a.jsxs("div",{className:"sticky top-24 space-y-6",children:[a.jsx(AG,{inline:!0}),(n==null?void 0:n.enabled)&&(n==null?void 0:n.sidebar)&&a.jsx("div",{className:"bg-slate-50 rounded-xl p-4 border border-slate-200",children:a.jsx(qo,{code:n.sidebar})}),o.filter(d=>d.location==="sidebar"&&(d.display_pages.includes("blog")||d.display_pages.includes("all"))).map(d=>a.jsx("div",{className:"bg-slate-50 rounded-xl p-4 border border-slate-200",children:a.jsx(qo,{code:d.ad_code,placementId:d.id})},d.id))]})})]})]}),a.jsx("footer",{className:"border-t border-slate-200 mt-16",children:a.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8",children:a.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[a.jsxs("p",{className:"text-sm text-slate-500",children:["© ",new Date().getFullYear()," TechBlog. All rights reserved."]}),a.jsxs("div",{className:"flex gap-6 text-sm",children:[a.jsx(ft,{to:Xe("About"),className:"text-slate-600 hover:text-indigo-600",children:"About"}),a.jsx(ft,{to:Xe("Privacy"),className:"text-slate-600 hover:text-indigo-600",children:"Privacy Policy"}),a.jsx(ft,{to:Xe("Terms"),className:"text-slate-600 hover:text-indigo-600",children:"Terms of Service"}),a.jsx(ft,{to:Xe("Contact"),className:"text-slate-600 hover:text-indigo-600",children:"Contact"})]})]})})})]})}function FG({post:e,url:t}){const[n,r]=T.useState(!1),i=t||window.location.href,s=e.title,o=()=>{navigator.clipboard.writeText(i),r(!0),we.success("Link copied to clipboard!"),setTimeout(()=>r(!1),2e3)},l=()=>{const d=`https://twitter.com/intent/tweet?text=${encodeURIComponent(s)}&url=${encodeURIComponent(i)}`;window.open(d,"_blank","width=550,height=420")},c=()=>{const d=`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(i)}`;window.open(d,"_blank","width=550,height=420")},u=()=>{const d=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(i)}`;window.open(d,"_blank","width=550,height=420")};return a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"text-sm text-slate-500 flex items-center gap-1.5",children:[a.jsx(Ad,{className:"w-4 h-4"}),"Share:"]}),a.jsx(ae,{variant:"outline",size:"sm",onClick:l,className:"gap-2 hover:bg-blue-50 hover:text-blue-600",children:a.jsx(Ku,{className:"w-4 h-4"})}),a.jsx(ae,{variant:"outline",size:"sm",onClick:c,className:"gap-2 hover:bg-blue-50 hover:text-blue-700",children:a.jsx(sc,{className:"w-4 h-4"})}),a.jsx(ae,{variant:"outline",size:"sm",onClick:u,className:"gap-2 hover:bg-blue-50 hover:text-blue-800",children:a.jsx(Jq,{className:"w-4 h-4"})}),a.jsxs(ae,{variant:"outline",size:"sm",onClick:o,className:`gap-2 ${n?"bg-emerald-50 text-emerald-600":""}`,children:[a.jsx(Z_,{className:"w-4 h-4"}),n?"Copied!":""]})]})}function Y2e({postId:e}){const[t,n]=T.useState(null),[r,i]=T.useState(""),[s,o]=T.useState(""),[l,c]=T.useState(""),u=Ln();ee.useEffect(()=>{ce.auth.me().then(v=>{n(v),i(v.full_name||""),o(v.email||"")}).catch(()=>n(null))},[]);const{data:d=[],isLoading:f}=st({queryKey:["comments",e],queryFn:()=>ce.entities.Comment.filter({post_id:e},"-created_date",100)}),p=wr({mutationFn:v=>ce.entities.Comment.create(v),onSuccess:()=>{u.invalidateQueries({queryKey:["comments",e]}),c("")}}),m=wr({mutationFn:v=>ce.entities.Comment.delete(v),onSuccess:()=>u.invalidateQueries({queryKey:["comments",e]})}),x=async v=>{v.preventDefault(),l.trim()&&p.mutate({post_id:e,author_name:r,author_email:s,content:l.trim(),status:(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="editor"?"approved":"pending",user_id:t==null?void 0:t.id})},y=d.filter(v=>v.status==="approved");return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(li,{className:"w-5 h-5 text-slate-600"}),a.jsxs("h2",{className:"text-2xl font-bold text-slate-900",children:["Comments (",y.length,")"]})]}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("form",{onSubmit:x,className:"space-y-4",children:[!t&&a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsx(Ye,{placeholder:"Your name",value:r,onChange:v=>i(v.target.value),required:!0}),a.jsx(Ye,{type:"email",placeholder:"Your email",value:s,onChange:v=>o(v.target.value),required:!0})]}
672),a.jsx(dn,{placeholder:"Share your thoughts...",value:l,onChange:v=>c(v.target.value),className:"min-h-[100px]",required:!0}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("p",{className:"text-xs text-slate-500",children:(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="editor"?"Your comment will be published immediately":"Your comment will be reviewed before publishing"}),a.jsxs(ae,{type:"submit",disabled:p.isPending,className:"gap-2",children:[p.isPending?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(ci,{className:"w-4 h-4"}),"Post Comment"]})]})]})})}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(hi,{children:y.map((v,b)=>{var w,N;return a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{delay:b*.05},children:a.jsx(de,{children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 flex items-center justify-center text-white font-medium",children:(N=(w=v.author_name)==null?void 0:w[0])==null?void 0:N.toUpperCase()}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-900",children:v.author_name}),a.jsx("p",{className:"text-xs text-slate-500",children:Jt(new Date(v.created_date),"MMM d, yyyy ⢠h:mm a")})]})]}),((t==null?void 0:t.email)===v.created_by||(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="editor")&&a.jsx(ae,{variant:"ghost",size:"sm",onClick:()=>m.mutate(v.id),className:"text-red-500 hover:text-red-700",children:a.jsx(qa,{className:"w-4 h-4"})})]}),a.jsx("p",{className:"text-slate-700 whitespace-pre-wrap",children:v.content})]})})},v.id)})}),y.length===0&&!f&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No comments yet. Be the first to share your thoughts!"})]})]})}function X2e(){let e=localStorage.getItem("poll_session_id");return e||(e=Math.random().toString(36).slice(2)+Date.now().toString(36),localStorage.setItem("poll_session_id",e)),e}function Q2e({postId:e}){const[t,n]=T.useState(null),[r,i]=T.useState(!1),s=Ln(),o=X2e(),{data:l=[]}=st({queryKey:["polls",e],queryFn:()=>ce.entities.Poll.filter({post_id:e,is_active:!0}),enabled:!!e}),c=l[0];T.useEffect(()=>{var p;if(c&&(p=c.voted_sessions)!=null&&p.includes(o)){const m=localStorage.getItem(`poll_vote_${c.id}`);n(m||"__already_voted__")}},[c,o]);const u=async p=>{if(t||r||!c)return;i(!0);const m=c.options.map(x=>x.id===p?{...x,votes:(x.votes||0)+1}:x);await ce.entities.Poll.update(c.id,{options:m,total_votes:(c.total_votes||0)+1,voted_sessions:[...c.voted_sessions||[],o]}),localStorage.setItem(`poll_vote_${c.id}`,p),n(p),i(!1),s.invalidateQueries({queryKey:["polls",e]})};if(!c)return null;const d=!!t,f=c.options.reduce((p,m)=>p+(m.votes||0),0);return a.jsxs(Pe.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:"my-8 rounded-2xl border border-indigo-200 bg-gradient-to-br from-indigo-50 to-purple-50 p-5 not-prose",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Fa,{className:"w-4 h-4 text-indigo-600"}),a.jsx("span",{className:"text-xs font-semibold text-indigo-600 uppercase tracking-wide",children:"Quick Poll"})]}),a.jsx("h3",{className:"text-base font-semibold text-slate-900 mb-4",children:c.question}),a.jsx("div",{className:"space-y-2",children:c.options.map(p=>{const m=f>0?Math.round((p.votes||0)/f*100):0,x=t===p.id;return a.jsx("div",{children:d?a.jsxs("div",{className:"relative rounded-lg overflow-hidden border border-slate-200 bg-white",children:[a.jsx("div",{className:`absolute inset-y-0 left-0 transition-all duration-700 ${x?"bg-indigo-100":"bg-slate-50"}`,style:{width:`${m}%`}}),a.jsxs("div",{className:"relative flex items-center justify-between px-4 py-2.5",children:[a.jsxs("span",{className:"text-sm font-medium text-slate-800 flex items-center gap-2",children:[x&&a.jsx(_n,{className:"w-4 h-4 text-indigo-600 flex-shrink-0"}),p.text]}),a.jsxs("span",{className:"text-sm font-bold text-slate-600",children:[m,"%"]})]})]}):a.jsx("button",{onClick:()=>u(p.id),disabled:r,className:"w-full text-left px-4 py-2.5 rounded-lg border border-slate-200 bg-white hover:border-indigo-400 hover:bg-indigo-50 transition-all text-sm font-medium text-slate-800 disabled:opacity-60",children:p.text})}
vendor: 4,675 bytes, line 672
672,p.id)})}),a.jsxs("div",{className:"mt-3 flex items-center justify-between",children:[a.jsxs("span",{className:"text-xs text-slate-500",children:[f," vote",f!==1?"s":""]}),t&&a.jsx(Se,{variant:"outline",className:"text-xs text-indigo-600 border-indigo-200",children:"Thanks for voting!"})]})]})}function Z2e(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const J2e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eCe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tCe={};function iF(e,t){return(tCe.jsx?eCe:J2e).test(e)}const nCe=/[ \t\n\f\r]/g;function rCe(e){return typeof e=="object"?e.type==="text"?sF(e.value):!1:sF(e)}function sF(e){return e.replace(nCe,"")===""}class xm{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}xm.prototype.normal={};xm.prototype.property={};xm.prototype.space=void 0;function qG(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new xm(n,r,t)}function Pk(e){return e.toLowerCase()}class mi{constructor(t,n){this.attribute=n,this.property=t}}mi.prototype.attribute="";mi.prototype.booleanish=!1;mi.prototype.boolean=!1;mi.prototype.commaOrSpaceSeparated=!1;mi.prototype.commaSeparated=!1;mi.prototype.defined=!1;mi.prototype.mustUseProperty=!1;mi.prototype.number=!1;mi.prototype.overloadedBoolean=!1;mi.prototype.property="";mi.prototype.spaceSeparated=!1;mi.prototype.space=void 0;let iCe=0;const _t=Mc(),Fn=Mc(),kk=Mc(),Ae=Mc(),nn=Mc(),Ru=Mc(),ji=Mc();function Mc(){return 2**++iCe}const Ok=Object.freeze(Object.defineProperty({__proto__:null,boolean:_t,booleanish:Fn,commaOrSpaceSeparated:ji,commaSeparated:Ru,number:Ae,overloadedBoolean:kk,spaceSeparated:nn},Symbol.toStringTag,{value:"Module"})),b_=Object.keys(Ok);class m2 extends mi{constructor(t,n,r,i){let s=-1;if(super(t,n),aF(this,"space",i),typeof r=="number")for(;++s<b_.length;){const o=b_[s];aF(this,b_[s],(r&Ok[o])===Ok[o])}}}m2.prototype.defined=!0;function aF(e,t,n){n&&(e[t]=n)}function Qd(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new m2(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Pk(r)]=r,n[Pk(s.attribute)]=r}return new xm(t,n,e.space)}const zG=Qd({properties:{ariaActiveDescendant:null,ariaAtomic:Fn,ariaAutoComplete:null,ariaBusy:Fn,ariaChecked:Fn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:nn,ariaCurrent:null,ariaDescribedBy:nn,ariaDetails:null,ariaDisabled:Fn,ariaDropEffect:nn,ariaErrorMessage:null,ariaExpanded:Fn,ariaFlowTo:nn,ariaGrabbed:Fn,ariaHasPopup:null,ariaHidden:Fn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nn,ariaLevel:Ae,ariaLive:null,ariaModal:Fn,ariaMultiLine:Fn,ariaMultiSelectable:Fn,ariaOrientation:null,ariaOwns:nn,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:Fn,ariaReadOnly:Fn,ariaRelevant:null,ariaRequired:Fn,ariaRoleDescription:nn,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:Fn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function UG(e,t){return t in e?e[t]:t}function VG(e,t){return UG(e,t.toLowerCase())}const sCe=Qd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ru,acceptCharset:nn,accessKey:nn,action:null,allow:null,allowFullScreen:_t,allowPaymentRequest:_t,allowUserMedia:_t,alt:null,as:null,async:_t,autoCapitalize:null,autoComplete:nn,autoFocus:_t,autoPlay:_t,blocking:nn,capture:null,charSet:null,checked:_t,cite:null,className:nn,cols:Ae,colSpan:null,content:null,contentEditable:Fn,controls:_t,controlsList:nn,coords:Ae|Ru,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_t,defer:_t,dir:null,dirName:null,disabled:_t,download:kk,draggable:Fn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_t,formTarget:null,headers:nn,height:Ae,hidden:kk,high:Ae,href:null,hrefLang:null,htmlFor:nn,httpEquiv:nn,id:null,imageSizes:null,imageSrcSet:null,inert:_t,inputMode:null,integrity:null,is:null,isMap:_t,itemId:null,itemProp:nn,itemRef:nn,itemScope:_t,itemType:nn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_t,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:_t,muted:_t,name:null,nonce:null,noModule:_t,noValidate:_t,onAbort:null,onAfterPrint:null,onAuxCl
672ick: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:_t,optimum:Ae,pattern:null,ping:nn,placeholder:null,playsInline:_t,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_t,referrerPolicy:null,rel:nn,required:_t,reversed:_t,rows:Ae,rowSpan:Ae,sandbox:nn,scope:null,scoped:_t,seamless:_t,selected:_t,shadowRootClonable:_t,shadowRootDelegatesFocus:_t,shadowRootMode:null,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:Fn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:_t,useMap:null,value:Fn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nn,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_t,declare:_t,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:_t,noHref:_t,noShade:_t,noWrap:_t,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:Fn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_t,disableRemotePlayback:_t,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:VG}),aCe=Qd({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
672-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:ji,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:nn,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:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:_t,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,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:Ru,g2:
672Ru,glyphName:Ru,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:ji,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,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:Ae,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:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ji,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ji,rev:ji,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ji,requiredFeatures:ji,requiredFonts:ji,requiredFormats:ji,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:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:ji,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ji,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ji,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,ver
vendor: 4,342 bytes, lines 672-673
672sion:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:UG}),WG=Qd({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()}}),HG=Qd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:VG}),GG=Qd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),oCe={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"},lCe=/[A-Z]/g,oF=/-[a-z]/g,cCe=/^data[-\w.:]+$/i;function uCe(e,t){const n=Pk(t);let r=t,i=mi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cCe.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(oF,fCe);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!oF.test(s)){let o=s.replace(lCe,dCe);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=m2}return new i(r,t)}function dCe(e){return"-"+e.toLowerCase()}function fCe(e){return e.charAt(1).toUpperCase()}const hCe=qG([zG,sCe,WG,HG,GG],"html"),g2=qG([zG,aCe,WG,HG,GG],"svg");function pCe(e){return e.join(" ").trim()}var gu={},w_,lF;function mCe(){if(lF)return w_;lF=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` 673`,u="/",d="*",f="",p="comment",m="declaration";w_=function(y,v){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];v=v||{};var b=1,w=1;function N(D){var q=D.match(t);q&&(b+=q.length);var F=D.lastIndexOf(c);w=~F?D.length-F:w+D.length}function S(){var D={line:b,column:w};return function(q){return q.position=new _(D),O(),q}}function _(D){this.start=D,this.end={line:b,column:w},this.source=v.source}_.prototype.content=y;function E(D){var q=new Error(v.source+":"+b+":"+w+": "+D);if(q.reason=D,q.filename=v.source,q.line=b,q.column=w,q.source=y,!v.silent)throw q}function k(D){var q=D.exec(y);if(q){var F=q[0];return N(F),y=y.slice(F.length),q}}function O(){k(n)}function I(D){var q;for(D=D||[];q=A();)q!==!1&&D.push(q);return D}function A(){var D=S();if(!(u!=y.charAt(0)||d!=y.charAt(1))){for(var q=2;f!=y.charAt(q)&&(d!=y.charAt(q)||u!=y.charAt(q+1));)++q;if(q+=2,f===y.charAt(q-1))return E("End of comment missing");var F=y.slice(2,q-2);return w+=2,N(F),y=y.slice(q),w+=2,D({type:p,comment:F})}}function C(){var D=S(),q=k(r);if(q){if(A(),!k(i))return E("property missing ':'");var F=k(s),H=D({type:m,property:x(q[0].replace(e,f)),value:F?x(F[0].replace(e,f)):f});return k(o),H}}function R(){var D=[];I(D);for(var q;q=C();)q!==!1&&(D.push(q),I(D));return D}return O(),R()};function x(y){return y?y.replace(l,f):f}return w_}var cF;function gCe(){if(cF)return gu;cF=1;var e=gu&&gu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gu,"__esModule",{value:!0}),gu.default=n;var t=e(mCe());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var o=(0,t.default)(r),l=typeof i=="function";return o.forEach(function(c){if(c.type==="declaration"){var u=c.property,d=c.value;l?i(u,d,c):d&&(s=s||{},s[u]=d)}}),s}return gu}var ih={},uF;function yCe(){if(uF)return ih;uF=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||e.test(u)},o=function(u,d){return d.toUpperCase()},l=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,l):u=u.replace(r,l),u.replace(t,o))};
vendor: 2,939 bytes, line 673
673return ih.camelCase=c,ih}var sh,dF;function vCe(){if(dF)return sh;dF=1;var e=sh&&sh.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(gCe()),n=yCe();function r(i,s){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(o[(0,n.camelCase)(l,s)]=c)}),o}return r.default=r,sh=r,sh}var xCe=vCe();const bCe=Lt(xCe),KG=YG("end"),y2=YG("start");function YG(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 wCe(e){const t=y2(e),n=KG(e);if(t&&n)return{start:t,end:n}}function Lh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fF(e.position):"start"in e||"end"in e?fF(e):"line"in e||"column"in e?Ak(e):""}function Ak(e){return hF(e&&e.line)+":"+hF(e&&e.column)}function fF(e){return Ak(e&&e.start)+"-"+Ak(e&&e.end)}function hF(e){return e&&typeof e=="number"?e:1}class Lr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!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&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const l=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=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Lh(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=o&&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}}Lr.prototype.file="";Lr.prototype.name="";Lr.prototype.reason="";Lr.prototype.message="";Lr.prototype.stack="";Lr.prototype.column=void 0;Lr.prototype.line=void 0;Lr.prototype.ancestors=void 0;Lr.prototype.cause=void 0;Lr.prototype.fatal=void 0;Lr.prototype.place=void 0;Lr.prototype.ruleId=void 0;Lr.prototype.source=void 0;const v2={}.hasOwnProperty,jCe=new Map,SCe=/[A-Z]/g,NCe=new Set(["table","tbody","thead","tfoot","tr"]),_Ce=new Set(["td","th"]),XG="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ECe(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=ICe(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 5,897 bytes, line 673
673if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=RCe(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"?g2:hCe,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=QG(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function QG(e,t,n){if(t.type==="element")return PCe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kCe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ACe(e,t,n);if(t.type==="mdxjsEsm")return OCe(e,t);if(t.type==="root")return CCe(e,t,n);if(t.type==="text")return TCe(e,t)}function PCe(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=g2,e.schema=i),e.ancestors.push(t);const s=JG(e,t.tagName,!1),o=MCe(e,t);let l=b2(e,t);return NCe.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!rCe(c):!0})),ZG(e,o,s,t),x2(o,l),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function kCe(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)}Mp(e,t.position)}function OCe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Mp(e,t.position)}function ACe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=g2,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:JG(e,t.name,!0),o=DCe(e,t),l=b2(e,t);return ZG(e,o,s,t),x2(o,l),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function CCe(e,t,n){const r={};return x2(r,b2(e,t)),e.create(t,e.Fragment,r,n)}function TCe(e,t){return t.value}function ZG(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function x2(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function RCe(e,t,n){return r;function r(i,s,o,l){const u=Array.isArray(o.children)?n:t;return l?u(s,o,l):u(s,o)}}function ICe(e,t){return n;function n(r,i,s,o){const l=Array.isArray(s.children),c=y2(r);return t(i,s,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function MCe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&v2.call(t.properties,i)){const s=LCe(e,i,t.properties[i]);if(s){const[o,l]=s;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&_Ce.has(t.tagName)?r=l:n[o]=l}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function DCe(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 o=s.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Mp(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 l=r.value.data.estree.body[0];l.type,s=e.evaluater.evaluateExpression(l.expression)}else Mp(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function b2(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:jCe;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const u=i.get(c)||0;o=c+"-"+u,i.set(c,u+1)}}const l=QG(e,s,o);l!==void 0&&n.push(l)}return n}function LCe(e,t,n){const r=uCe(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Z2e(n):pCe(n)),r.property==="style"){let i=typeof n=="object"?n:$Ce(e,String(n));return e.stylePropertyNameCase==="css"&&(i=BCe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?oCe[r.property]||r.property:r.attribute,n]}}function $Ce(e,t){try{return bCe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Lr("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=XG+"#cannot-parse-style-attribute",i}}function JG(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,o;for(;++s<i.length;){const l=iF(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=o}else r=iF(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return v2.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Mp(e)}function Mp(e,t){const n=new Lr("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=XG+"#cannot-handle-mdx-estrees-without-createevaluater",n}function BCe(e){const t={};let n;for(n in e)v2.call(e,n)&&(t[FCe(n)]=e[n]);return t}function FCe(e){let t=e.replace(SCe,qCe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function qCe(e){return"-"+e.toLowerCase()}const j_={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"]},zCe={};function UCe(e,t){const n=zCe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return eK(e,r,i)}
vendor: 11,375 bytes, line 673
673function eK(e,t,n){if(VCe(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 pF(e.children,t,n)}return Array.isArray(e)?pF(e,t,n):""}function pF(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=eK(e[i],t,n);return r.join("")}function VCe(e){return!!(e&&typeof e=="object")}const mF=document.createElement("i");function w2(e){const t="&"+e+";";mF.innerHTML=t;const n=mF.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ca(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function ts(e,t){return e.length>0?(ca(e,e.length,0,t),e):t}const gF={}.hasOwnProperty;function WCe(e){const t={};let n=-1;for(;++n<e.length;)HCe(t,e[n]);return t}function HCe(e,t){let n;for(n in t){const i=(gF.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){gF.call(i,o)||(i[o]=[]);const l=s[o];GCe(i[o],Array.isArray(l)?l:l?[l]:[])}}}function GCe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ca(e,0,0,r)}function tK(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 Iu(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Xs=hl(/[A-Za-z]/),ki=hl(/[\dA-Za-z]/),KCe=hl(/[#-'*+\--9=?A-Z^-~]/);function Ck(e){return e!==null&&(e<32||e===127)}const Tk=hl(/\d/),YCe=hl(/[\dA-Fa-f]/),XCe=hl(/[!-/:-@[-`{-~]/);function vt(e){return e!==null&&e<-2}function fi(e){return e!==null&&(e<0||e===32)}function Ut(e){return e===-2||e===-1||e===32}const QCe=hl(new RegExp("\\p{P}|\\p{S}","u")),ZCe=hl(/\s/);function hl(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Zd(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o="";if(s===37&&ki(e.charCodeAt(n+1))&&ki(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const l=e.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(o=String.fromCharCode(s,l),i=1):o="�"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function an(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(c){return Ut(c)?(e.enter(n),l(c)):t(c)}function l(c){return Ut(c)&&s++<i?(e.consume(c),l):(e.exit(n),t(c))}}const JCe={tokenize:eTe};function eTe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),an(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),s(l)}function s(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return vt(l)?(e.consume(l),e.exit("chunkText"),s):(e.consume(l),o)}}const tTe={tokenize:nTe},yF={tokenize:rTe};function nTe(e){const t=this,n=[];let r=0,i,s,o;return l;function l(N){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,c,u)(N)}return u(N)}function c(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&w();const S=t.events.length;let _=S,E;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){E=t.events[_][1].end;break}b(r);let k=S;for(;k<t.events.length;)t.events[k][1].end={...E},k++;return ca(t.events,_+1,0,t.events.slice(S)),t.events.length=k,u(N)}return l(N)}function u(N){if(r===n.length){if(!i)return p(N);if(i.currentConstruct&&i.currentConstruct.concrete)return x(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(yF,d,f)(N)}function d(N){return i&&w(),b(r),p(N)}function f(N){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,x(N)}function p(N){return t.containerState={},e.attempt(yF,m,x)(N)}function m(N){return r++,n.push([t.currentConstruct,t.containerState]),p(N)}function x(N){if(N===null){i&&w(),b(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),y(N)}function y(N){if(N===null){v(e.exit("chunkFlow"),!0),b(0),e.consume(N);return}return vt(N)?(e.consume(N),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(N),y)}function v(N,S){const _=t.sliceStream(N);if(S&&_.push(null),N.previous=s,s&&(s.next=N),s=N,i.defineSkip(N.start),i.write(_),t.parser.lazy[N.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<o&&(!i.events[E][1].end||i.events[E][1].end.offset>o))return;const k=t.events.length;let O=k,I,A;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(I){A=t.events[O][1].end;break}I=!0}for(b(r),E=k;E<t.events.length;)t.events[E][1].end={...A},E++;ca(t.events,O+1,0,t.events.slice(k)),t.events.length=E}}function b(N){let S=n.length;for(;S-- >N;){const _=n[S];t.containerState=_[1],_[0].exit.call(t,e)}n.length=N}function w(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function rTe(e,t,n){return an(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function vF(e){if(e===null||fi(e)||ZCe(e))return 1;if(QCe(e))return 2}function j2(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 Rk={name:"attention",resolveAll:iTe,tokenize:sTe};function iTe(e,t){let n=-1,r,i,s,o,l,c,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;c=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 f={...e[r][1].end},p={...e[n][1].start};xF(f,-c),xF(p,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=ts(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=ts(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",s,t]]),u=ts(u,j2(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=ts(u,[["exit",s,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=ts(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ca(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 sTe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vF(r);let s;return o;function o(c){return s=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===s)return e.consume(c),l;const u=e.exit("attentionSequence"),d=vF(c),f=!d||d===2&&i||n.includes(c),p=!i||i===2&&d||n.includes(r);return u._open=!!(s===42?f:f&&(i||!p)),u._close=!!(s===42?p:p&&(d||!f)),t(c)}}function xF(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aTe={name:"autolink",tokenize:oTe};function oTe(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return Xs(m)?(e.consume(m),o):m===64?n(m):u(m)}function o(m){return m===43||m===45||m===46||ki(m)?(r=1,l(m)):u(m)}function l(m){return m===58?(e.consume(m),r=0,c):(m===43||m===45||m===46||ki(m))&&r++<32?(e.consume(m),l):(r=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Ck(m)?n(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),d):KCe(m)?(e.consume(m),u):n(m)}function d(m){return ki(m)?f(m):n(m)}function f(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||ki(m))&&r++<63){const x=m===45?p:f;return e.consume(m),x}return n(m)}}const A0={partial:!0,tokenize:lTe};function lTe(e,t,n){return r;function r(s){return Ut(s)?an(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||vt(s)?t(s):n(s)}}const nK={continuation:{tokenize:uTe},exit:dTe,name:"blockQuote",tokenize:cTe};function cTe(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Ut(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function uTe(e,t,n){const r=this;return i;function i(o){return Ut(o)?an(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return e.attempt(nK,t,n)(o)}}function dTe(e){e.exit("blockQuote")}const rK={name:"characterEscape",tokenize:fTe};function fTe(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 XCe(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const iK={name:"characterReference",tokenize:hTe};function hTe(e,t,n){const r=this;let i=0,s,o;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),s=31,o=ki,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,o=YCe,d):(e.enter("characterReferenceValue"),s=7,o=Tk,d(f))}function d(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return o===ki&&!w2(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<s?(e.consume(f),d):n(f)}}const bF={partial:!0,tokenize:mTe},wF={concrete:!0,name:"codeFenced",tokenize:pTe};function pTe(e,t,n){const r=this,i={partial:!0,tokenize:_};let s=0,o=0,l;return c;function c(E){return u(E)}function u(E){const k=r.events[r.events.length-1];return s=k&&k[1].type==="linePrefix"?k[2].sliceSerialize(k[1],!0).length:0,l=E,e.enter("co
673deFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(E)}function d(E){return E===l?(o++,e.consume(E),d):o<3?n(E):(e.exit("codeFencedFenceSequence"),Ut(E)?an(e,f,"whitespace")(E):f(E))}function f(E){return E===null||vt(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(bF,y,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||vt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):Ut(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),an(e,m,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),p)}function m(E){return E===null||vt(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===null||vt(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===l?n(E):(e.consume(E),x)}function y(E){return e.attempt(i,S,v)(E)}function v(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),b}function b(E){return s>0&&Ut(E)?an(e,w,"linePrefix",s+1)(E):w(E)}function w(E){return E===null||vt(E)?e.check(bF,y,S)(E):(e.enter("codeFlowValue"),N(E))}function N(E){return E===null||vt(E)?(e.exit("codeFlowValue"),w(E)):(e.consume(E),N)}function S(E){return e.exit("codeFenced"),t(E)}function _(E,k,O){let I=0;return A;function A(F){return E.enter("lineEnding"),E.consume(F),E.exit("lineEnding"),C}function C(F){return E.enter("codeFencedFence"),Ut(F)?an(E,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):R(F)}function R(F){return F===l?(E.enter("codeFencedFenceSequence"),D(F)):O(F)}function D(F){return F===l?(I++,E.consume(F),D):I>=o?(E.exit("codeFencedFenceSequence"),Ut(F)?an(E,q,"whitespace")(F):q(F)):O(F)}function q(F){return F===null||vt(F)?(E.exit("codeFencedFence"),k(F)):O(F)}}}function mTe(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const S_={name:"codeIndented",tokenize:yTe},gTe={partial:!0,tokenize:vTe};function yTe(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),an(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?o(u):n(u)}function o(u){return u===null?c(u):vt(u)?e.attempt(gTe,o,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||vt(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function vTe(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):vt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):an(e,s,"linePrefix",5)(o)}function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):vt(o)?i(o):n(o)}}const xTe={name:"codeText",previous:wTe,resolve:bTe,tokenize:jTe};function bTe(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 wTe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function jTe(e,t,n){let r=0,i,s;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),r++,l):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(s=e.enter("codeTextSequence"),i=0,d(f)):vt(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||vt(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",u(f))}}class STe{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&&ah(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),ah(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ah(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);ah(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ah(this.left,n.reverse())}}}function ah(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 sK(e){const t={};let n=-1,r,i,s,o,l,c,u;const d=new STe(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,NTe(d,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=d.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},l=d.slice(i,n),l.unshift(r),d.splice(i,n-i+1,l))}}return ca(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function NTe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],u={};let d,f,p=-1,m=n,x=0,y=0;const v=[y];for(;m;){for(;e.get(++i)[1]!==m;);s.push(i),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),f&&o.defineSki
vendor: 18,629 bytes, line 673
673p(m.start),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(y=p+1,v.push(y),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(o.events=[],m?(m._tokenizer=void 0,m.previous=void 0):v.pop(),p=v.length;p--;){const b=l.slice(v[p],v[p+1]),w=s.pop();c.push([w,w+b.length-1]),e.splice(w,2,b)}for(c.reverse(),p=-1;++p<c.length;)u[x+c[p][0]]=x+c[p][1],x+=c[p][1]-c[p][0]-1;return u}const _Te={resolve:PTe,tokenize:kTe},ETe={partial:!0,tokenize:OTe};function PTe(e){return sK(e),e}function kTe(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):vt(l)?e.check(ETe,o,s)(l):(e.consume(l),i)}function s(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function OTe(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),an(e,s,"linePrefix")}function s(o){if(o===null||vt(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function aK(e,t,n,r,i,s,o,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(b){return b===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(b),e.exit(s),p):b===null||b===32||b===41||Ck(b)?n(b):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(b))}function p(b){return b===62?(e.enter(s),e.consume(b),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(l),p(b)):b===null||b===60||vt(b)?n(b):(e.consume(b),b===92?x:m)}function x(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function y(b){return!d&&(b===null||b===41||fi(b))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(b)):d<u&&b===40?(e.consume(b),d++,y):b===41?(e.consume(b),d--,y):b===null||b===32||b===40||Ck(b)?n(b):(e.consume(b),b===92?v:y)}function v(b){return b===40||b===41||b===92?(e.consume(b),y):y(b)}}function oK(e,t,n,r,i,s){const o=this;let l=0,c;return u;function u(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(s),d}function d(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(m):m===93?(e.exit(s),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):vt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||vt(m)||l++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Ut(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}}function lK(e,t,n,r,i,s){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,c):n(p)}function c(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),u(p))}function u(p){return p===o?(e.exit(s),c(o)):p===null?n(p):vt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),an(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===o||p===null||vt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:d)}function f(p){return p===o||p===92?(e.consume(p),d):d(p)}}function $h(e,t){let n;return r;function r(i){return vt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ut(i)?an(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ATe={name:"definition",tokenize:TTe},CTe={partial:!0,tokenize:RTe};function TTe(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),o(m)}function o(m){return oK.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=Iu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return fi(m)?$h(e,u)(m):u(m)}function u(m){return aK(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(CTe,f,f)(m)}function f(m){return Ut(m)?an(e,p,"whitespace")(m):p(m)}function p(m){return m===null||vt(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function RTe(e,t,n){return r;function r(l){return fi(l)?$h(e,i)(l):n(l)}function i(l){return lK(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Ut(l)?an(e,o,"whitespace")(l):o(l)}function o(l){return l===null||vt(l)?t(l):n(l)}}const ITe={name:"hardBreakEscape",tokenize:MTe};function MTe(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return vt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const DTe={name:"headingAtx",resolve:LTe,tokenize:$Te};function LTe(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"},ca(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function $Te(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||fi(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||vt(d)?(e.exit("atxHeading"),t(d)):Ut(d)?an(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||fi(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const BTe=["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"],jF=["pre","script","style","textarea"],FTe={concrete:!0,name:"htmlFlow",resolveTo:UTe,tokenize:VTe},qTe={partial:!0,tokenize:HTe},zTe={partial:!0,tokenize:WTe};function UTe(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 VTe(e,t,n){const r=this;let i,s,o,l,c;return u;function u(z){return d(z)}function d(z){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(z),f}function f(z){return z===33?(e.consume(z),p):z===47?(e.consume(z),s=!0,y):z===63?(e.consume(z),i=3,r.interrupt?t:L):Xs(z)?(e.consume(z),o=String.fromCharCode(z),v):n(z)}function p(z){return z===45?(e.consume(z),i=2,m):z===91?(e.consume(z),i=5,l=0,x):Xs(z)?(e.consume(z),i=4,r.interrupt?t:L):n(z)}function m(z){return z===45?(e.consume(z),r.interrupt?t:L):n(z)}function x(z){const Q="CDATA[";return z===Q.charCodeAt(l++)?(e.consume(z),l===Q.length?r.interrupt?t:R:x):n(z)}function y(z){return Xs(z)?(e.consume(z),o=String.fromCharCode(z),v):n(z)}function v(z){if(z===null||z===47||z===62||fi(z)){const Q=z===47,J=o.toLowerCase();return!Q&&!s&&jF.includes(J)?(i=1,r.interrupt?t(z):R(z)):BTe.includes(o.toLowerCase())?(i=6,Q?(e.consume(z),b):r.interrupt?t(z):R(z)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(z):s?w(z):N(z))}return z===45||ki(z)?(e.consume(z),o+=String.fromCharCode(z),v):n(z)}function b(z){return z===62?(e.consume(z),r.interrupt?t:R):n(z)}function w(z){return Ut(z)?(e.consume(z),w):A(z)}function N(z){return z===47?(e.consume(z),A):z===58||z===95||Xs(z)?(e.consume(z),S):Ut(z)?(e.consume(z),N):A(z)}function S(z){return z===45||z===46||z===58||z===95||ki(z)?(e.consume(z),S):_(z)}function _(z){return z===61?(e.consume(z),E):Ut(z)?(e.consume(z),_):N(z)}function E(z){return z===null||z===60||z===61||z===62||z===96?n(z):z===34||z===39?(e.consume(z),c=z,k):Ut(z)?(e.consume(z),E):O(z)}function k(z){return z===c?(e.consume(z),c=null,I):z===null||vt(z)?n(z):(e.consume(z),k)}function O(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||fi(z)?_(z):(e.consume(z),O)}function I(z){return z===47||z===62||Ut(z)?N(z):n(z)}function A(z){return z===62?(e.consume(z),C):n(z)}function C(z){return z===null||vt(z)?R(z):Ut(z)?(e.consume(z),C):n(z)}function R(z){return z===45&&i===2?(e.consume(z),H):z===60&&i===1?(e.consume(z),U):z===62&&i===4?(e.consume(z),$):z===63&&i===3?(e.consume(z),L):z===93&&i===5?(e.consume(z),G):vt(z)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(qTe,V,D)(z)):z===null||vt(z)?(e.exit("htmlFlowData"),D(z)):(e.consume(z),R)}function D(z){return e.check(zTe,q,V)(z)}function q(z){return e.enter("lineEnding"),e.consume(z),e.exit("lineEnding"),F}function F(z){return z===null||vt(z)?D(z):(e.enter("htmlFlowData"),R(z))}function H(z){return z===45?(e.consume(z),L):R(z)}function U(z){return z===47?(e.consume(z),o="",W):R(z)}function W(z){if(z===62){const Q=o.toLowerCase();return jF.includes(Q)?(e.consume(z),$):R(z)}return Xs(z)&&o.length<8?(e.consume(z),o+=String.fromCharCode(z),W):R(z)}function G(z){return z===93?(e.consume(z),L):R(z)}function L(z){return z===62?(e.consume(z),$):z===45&&i===2?(e.consume(z),L):R(z)}function $(z){return z===null||vt(z)?(e.exit("htmlFlowData"),V(z)):(e.consume(z),$)}function V(z){return e.exit("htmlFlow"),t(z)}}function WTe(e,t,n){const r=this;return i;function i(o){return vt(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function HTe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(A0,t,n)}}const GTe={name:"htmlText",tokenize:KTe};function KTe(e,t,n){const r=this;let i,s,o;return l;function l(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),_):L===63?(e.consume(L),N):Xs(L)?(e.consume(L),O):n(L)}function u(L){return L===45?(e.consume(L),d):L===91?(e.consume(L),s=0,x):Xs(L)?(e.consume(L),w):n(L)}function d(L){return L===45?(e.consume(L),m):n(L)}function f(L){return L===null?n(L):L===45?(e.consume(L),p):vt(L)?(o=f,U(L)):(e.consume(L),f)}function p(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?H(L):L===45?p(L):f(L)}function x(L){const $="CDATA[";return L===$.charCodeAt(s++)?(e.consume(L),s===$.length?y:x):n(L)}function y(L){return L===null?n(L):L===93?(e.consume(L),v):vt(L)?(o=y,U(L)):(e.consume(L),y)}function v(L){return L===93?(e.consume(L),b):y(L)}function b(L){return L===62?H(L):L===93?(e.consume(L),b):y(L)}function w(L){return L===null||L===62?H(L):vt(L)?(o=w,U(L)):(e.consume(L),w)}function N(L){return L===null?n(L):L===63?(e.consume(L),S):vt(L)?(o=N,U(L)):(e.consume(L),N)}function S(L){return L===62?H(L):N(L)}function _(L){return Xs(L)?(e.consume(L),E):n(L)}function E(L){return L===45||ki(L)?(e.consume(L),E):k(L)}function k(L){return vt(L)?(o=k,U(L)):Ut(L)?(e.consume(L),k):H(L)}function O(L){return L===45||ki(L)?(e.consume(L),O):L===47||L===62||fi(L)?I(L):n(L)}function I(L){return L===47?(e.consume(L),H):L===58||L===95||Xs(L)?(e.consume(L),A):vt(L)?(o=I,U(L)):Ut(L)?(e.consume(L),I):H(L)}function A(L){return L===45||L===46||L===58||L===95||ki(L)?(e.consume(L),A):C(L)}function C(L){return L===61?(e.consume(L),R):vt(L)?(o=C,U(L)):Ut(L)?(e.consume(L),C):I(L)}function R(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),i=L,D):vt(L)?(o=R,U(L)):Ut(L)?(e.consume(L),R):(e.consume(L),q)}function D(L){return L===i?(e.consume(L),i=void 0,F):L===null?n(L):vt(L)?(o=D,U(L)):(e.consume(L),D)}function q(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||fi(L)?I(L):(e.consume(L),q)}function F(L){return L===47||L===62||fi(L)?I(L):n(L)}function H(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function U(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),W}function W(L){return Ut(L)?an(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):G(L)}function G(L){return e.enter("htmlTextData"),o(L)}}const S2={name:"labelEnd",resolveAll:ZTe,resolveTo:JTe,tokenize:eRe},YTe={tokenize:tRe},XTe={tokenize:nRe},QTe={tokenize:rRe};function ZTe(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&&ca(e,0,e.length,n),e}function JTe(e,t){let n=e.length,r=0,i,s,o,l;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(o){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"&&(o=n);const c={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[o][1].end}},d={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=ts(l,e.slice(s+1,s+r+3)),l=ts(l,[["enter",d,t]]),l=ts(l,j2(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),l=ts(l,[["exit",d,t],e[o-2],e[o-1],["exit",u,t]]),l=ts(l,e.slice(o+1)),l=ts(l,[["exit",c,t]]),ca(e,s,e.length,l),e}function eRe(e,t,n){const r=this;let i=r.events.length,s,o;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 l;function l(p){return s?s._inactive?f(p):(o=r.parser.defined.includes(Iu(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(YTe,d,o?d:f)(p):p===91?e.attempt(XTe,d,o?u:f)(p):o?d(p):f(p)}function u(p){return e.attempt(QTe,d,f)(p)}function d(p){return t(p)}function f(p){return s._balanced=!0,n(p)}}function tRe(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return fi(f)?$h(e,s)(f):s(f)}function s(f){return f===41?d(f):aK(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return fi(f)?$h(e,c)(f):d(f)}function l(f){return n(f)}function c(f){return f===34||f===39||f===40?lK(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return fi(f)?$h(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function nRe(e,t,n){const r=this;return i;function i(l){return oK.call(r,e,s,o,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(Iu(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function rRe(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 iRe={name:"labelStartImage",resolveAll:S2.resolveAll,tokenize:sRe};function sRe(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const aRe={name:"labelStartLink",resolveAll:S2.resolveAll,tokenize:oRe};function oRe(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const N_={name:"lineEnding",tokenize:lRe};function lRe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),an(e,t,"linePrefix")}}const $y={name:"thematicBreak",tokenize:cRe};function cRe(e,t,n){let r=0,i;return s;function s(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||vt(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Ut(u)?an(e,l,"whitespace")(u):l(u))}}const ii={continuation:{tokenize:hRe},exit:mRe,name:"list",tokenize:fRe},uRe={partial:!0,tokenize:gRe},dRe={partial:!0,tokenize:pRe};function fRe(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,o=0;return l;function l(m){const x=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Tk(m)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check($y,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return Tk(m)&&++o<10?(e.consume(m),c):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(A0,r.interrupt?n:d,e.attempt(uRe,p,f))}
vendor: 5,407 bytes, line 673
673function d(m){return r.containerState.initialBlankLine=!0,s++,p(m)}function f(m){return Ut(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function hRe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(A0,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,an(e,t,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!Ut(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dRe,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,an(e,e.attempt(ii,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function pRe(e,t,n){const r=this;return an(e,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function mRe(e){e.exit(this.containerState.type)}function gRe(e,t,n){const r=this;return an(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Ut(s)&&o&&o[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const SF={name:"setextUnderline",resolveTo:yRe,tokenize:vRe};function yRe(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 o={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",o,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function vRe(e,t,n){const r=this;let i;return s;function s(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Ut(u)?an(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||vt(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const xRe={tokenize:bRe};function bRe(e){const t=this,n=e.attempt(A0,r,e.attempt(this.parser.constructs.flowInitial,i,an(e,e.attempt(this.parser.constructs.flow,i,e.attempt(_Te,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 wRe={resolveAll:uK()},jRe=cK("string"),SRe=cK("text");function cK(e){return{resolveAll:uK(e==="text"?NRe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,l);return o;function o(d){return u(d)?s(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const f=i[d];let p=-1;if(f)for(;++p<f.length;){const m=f[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function uK(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 NRe(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,o=-1,l=0,c;for(;s--;){const u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...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 _Re={42:ii,43:ii,45:ii,48:ii,49:ii,50:ii,51:ii,52:ii,53:ii,54:ii,55:ii,56:ii,57:ii,62:nK},ERe={91:ATe},PRe={[-2]:S_,[-1]:S_,32:S_},kRe={35:DTe,42:$y,45:[SF,$y],60:FTe,61:SF,95:$y,96:wF,126:wF},ORe={38:iK,92:rK},ARe={[-5]:N_,[-4]:N_,[-3]:N_,33:iRe,38:iK,42:Rk,60:[aTe,GTe],91:aRe,92:[ITe,rK],93:S2,95:Rk,96:xTe},CRe={null:[Rk,wRe]},TRe={null:[42,95]},RRe={null:[]},IRe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:TRe,contentInitial:ERe,disable:RRe,document:_Re,flow:kRe,flowInitial:PRe,insideSpan:CRe,string:ORe,text:ARe},Symbol.toStringTag,{value:"Module"}));function MRe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 21,646 bytes, lines 673-679
673olumn:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],l=[];const c={attempt:k(_),check:k(E),consume:w,enter:N,exit:S,interrupt:k(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:x,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f};let d=t.tokenize.call(u,c);return t.resolveAll&&s.push(t),u;function f(C){return o=ts(o,C),v(),o[o.length-1]!==null?[]:(O(t,0),u.events=j2(s,u.events,u),u.events)}function p(C,R){return LRe(m(C),R)}function m(C){return DRe(o,C)}function x(){const{_bufferIndex:C,_index:R,line:D,column:q,offset:F}=r;return{_bufferIndex:C,_index:R,line:D,column:q,offset:F}}function y(C){i[C.line]=C.column,A()}function v(){let C;for(;r._index<o.length;){const R=o[r._index];if(typeof R=="string")for(C=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===C&&r._bufferIndex<R.length;)b(R.charCodeAt(r._bufferIndex));else b(R)}}function b(C){d=d(C)}function w(C){vt(C)?(r.line++,r.column=1,r.offset+=C===-3?2:1,A()):C!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=C}function N(C,R){const D=R||{};return D.type=C,D.start=x(),u.events.push(["enter",D,u]),l.push(D),D}function S(C){const R=l.pop();return R.end=x(),u.events.push(["exit",R,u]),R}function _(C,R){O(C,R.from)}function E(C,R){R.restore()}function k(C,R){return D;function D(q,F,H){let U,W,G,L;return Array.isArray(q)?V(q):"tokenize"in q?V([q]):$(q);function $(Y){return X;function X(ne){const Z=ne!==null&&Y[ne],se=ne!==null&&Y.null,pe=[...Array.isArray(Z)?Z:Z?[Z]:[],...Array.isArray(se)?se:se?[se]:[]];return V(pe)(ne)}}function V(Y){return U=Y,W=0,Y.length===0?H:z(Y[W])}function z(Y){return X;function X(ne){return L=I(),G=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.includes(Y.name)?J():Y.tokenize.call(R?Object.assign(Object.create(u),R):u,c,Q,J)(ne)}}function Q(Y){return C(G,L),F}function J(Y){return L.restore(),++W<U.length?z(U[W]):H}}}function O(C,R){C.resolveAll&&!s.includes(C)&&s.push(C),C.resolve&&ca(u.events,R,u.events.length-R,C.resolve(u.events.slice(R),u)),C.resolveTo&&(u.events=C.resolveTo(u.events,u))}function I(){const C=x(),R=u.previous,D=u.currentConstruct,q=u.events.length,F=Array.from(l);return{from:q,restore:H};function H(){r=C,u.previous=R,u.currentConstruct=D,u.events.length=q,l=F,A()}}function A(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function DRe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function LRe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=` 674`;break}case-3:{o=`\r 675`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function $Re(e){const r={constructs:WCe([IRe,...(e||{}).extensions||[]]),content:i(JCe),defined:[],document:i(tTe),flow:i(xRe),lazy:{},string:i(jRe),text:i(SRe)};return r;function i(s){return o;function o(l){return MRe(r,s,l)}}}function BRe(e){for(;!sK(e););return e}const NF=/[\0\t\n\r]/g;function FRe(){let e=1,t="",n=!0,r;return i;function i(s,o,l){const c=[];let u,d,f,p,m;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),f=0,t="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(NF.lastIndex=f,u=NF.exec(s),p=u&&u.index!==void 0?u.index:s.length,m=s.charCodeAt(p),!u){t=s.slice(f);break}if(m===10&&f===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<p&&(c.push(s.slice(f,p)),e+=p-f),m){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const qRe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zRe(e){return e.replace(qRe,URe)}function URe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return tK(n.slice(s?2:1),s?16:10)}return w2(n)||e}const dK={}.hasOwnProperty;function VRe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),WRe(n)(BRe($Re(n).document().write(FRe()(e,t,!0))))}function WRe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ve),autolinkProtocol:I,autolinkEmail:I,atxHeading:s(Ze),blockQuote:s(se),characterEscape:I,characterReference:I,codeFenced:s(pe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(pe,o),codeText:s(oe,o),codeTextData:I,data:I,codeFlowValue:I,definition:s(Oe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s($e),hardBreakEscape:s(xt),hardBreakTrailing:s(xt),htmlFlow:s(pt,o),htmlFlowData:I,htmlText:s(pt,o),htmlTextData:I,image:s(ye),label:o,link:s(ve),listItem:s(Be),listItemValue:p,listOrdered:s(Me,f),listUnordered:s(Me),paragraph:s(je),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Ze),strong:s(mt),thematicBreak:s(wt)},exit:{atxHeading:c(),atxHeadingSequence:_,autolink:c(),autolinkEmail:Z,autolinkProtocol:ne,blockQuote:c(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:Y,characterReference:X,codeFenced:c(v),codeFencedFence:y,codeFencedFenceInfo:m,codeFencedFenceMeta:x,codeFlowValue:A,codeIndented:c(b),codeText:c(F),codeTextData:A,data:A,definition:c(),definitionDestinationString:S,definitionLabelString:w,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(D),htmlFlowData:A,htmlText:c(q),htmlTextData:A,image:c(U),label:G,labelText:W,lineEnding:C,link:c(H),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Q,resourceDestinationString:L,resourceTitleString:$,resource:V,setextHeading:c(O),setextHeadingLineSequence:k,setextHeadingText:E,strong:c(),thematicBreak:c()}};fK(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(xe){let ke={type:"root",children:[]};const ze={stack:[ke],tokenStack:[],config:t,enter:l,exit:u,buffer:o,resume:d,data:n},Et=[];let rt=-1;for(;++rt<xe.length;)if(xe[rt][1].type==="listOrdered"||xe[rt][1].type==="listUnordered")if(xe[rt][0]==="enter")Et.push(rt);else{const en=Et.pop();rt=i(xe,en,rt)}for(rt=-1;++rt<xe.length;){const en=t[xe[rt][0]];dK.call(en,xe[rt][1].type)&&en[xe[rt][1].type].call(Object.assign({sliceSerialize:xe[rt][2].sliceSerialize},ze),xe[rt][1])}if(ze.tokenStack.length>0){const en=ze.tokenStack[ze.tokenStack.length-1];(en[1]||_F).call(ze,void 0,en[0])}for(ke.position={start:No(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:No(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)ke=t.transforms[rt](ke)||ke;return ke}function i(xe,ke,ze){let Et=ke-1,rt=-1,en=!1,ha,$i,to,ml;for(;++Et<=ze;){const hr=xe[Et];switch(hr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{hr[0]==="enter"?rt++:rt--,ml=void 0;break}case"lineEndingBlank":{hr[0]==="enter"&&(ha&&!ml&&!rt&&!to&&(to=Et),ml=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ml=void 0}if(!rt&&hr[0]==="enter"&&hr[1].type==="listItemPrefix"||rt===-1&&hr[0]==="exit"&&(hr[1].type==="listUnordered"||hr[1].type==="listOrdered")){if(ha){let $s=Et;for($i=void 0;$s--;){const gi=xe[$s];if(gi[1].type==="lineEnding"||gi[1].type==="lineEndingBlank"){if(gi[0]==="exit")continue;$i&&(xe[$i][1].type="lineEndingBlank",en=!0),gi[1].type="lineEnding",$i=$s}else if(!(gi[1].type==="linePrefix"||gi[1].type==="blockQuotePrefix"||gi[1].type==="blockQuotePrefixWhitespace"||gi[1].type==="blockQuoteMarker"||gi[1].type==="listItemIndent"))break}to&&(!$i||to<$i)&&(ha._spread=!0),ha.end=Object.assign({},$i?xe[$i][1].start:hr[1].end),xe.splice($i||Et,0,["exit",ha,hr[2]]),Et++,ze++}if(hr[1].type==="listItemPrefix"){const $s={type:"listItem",_spread:!1,start:Object.assign({},hr[1].start),end:void 0};ha=$s,xe.splice(Et,0,["enter",$s,hr[2]]),Et++,ze++,to=void 0,ml=!0}}}return xe[ke][1]._spread=en,ze}function s(xe,ke){return ze;function ze(Et){l.call(this,xe(Et),Et),ke&&ke.call(this,Et)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(xe,ke,ze){this.stack[this.stack.length-1].children.push(xe),this.stack.push(xe),this.tokenStack.push([ke,ze||void 0]),xe.position={start:No(ke.start),end:void 0}}function c(xe){return ke;function ke(ze){xe&&xe.call(this,ze),u.call(this,ze)}}function u(xe,ke){const ze=this.stack.pop(),Et=this.tokenStack.pop();if(Et)Et[0].type!==xe.type&&(ke?ke.call(this,xe,Et[0]):(Et[1]||_F).call(this,xe,Et[0]));else throw new Error("Cannot close `"+xe.type+"` ("+Lh({start:xe.start,end:xe.end})+"): itâs not open");ze.position.end=No(xe.end)}function d(){return UCe(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(xe){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(xe),10),this.data.expectingFirstListItemValue=void 0}}function m(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=xe}function x(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=xe}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=xe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=xe.replace(/(\r?\n|\r)$/g,"")}function w(xe){const ke=this.resume(),ze=this.stack[this.stack.length-1];ze.label=ke,ze.identifier=Iu(this.sliceSerialize(xe)).toLowerCase()}function N(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=xe}function S(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=xe}function _(xe){const ke=this.stack[this.stack.length-1];if(!ke.depth){const ze=this.sliceSerialize(xe).length;ke.depth=ze}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function k(xe){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(xe).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function I(xe){const ze=this.stack[this.stack.length-1].children;let Et=ze[ze.length-1];(!Et||Et.type!=="text")&&(Et=bt(),Et.position={start:No(xe.start),end:void 0},ze.push(Et)),this.stack.push(Et)}function A(xe){const ke=this.stack.pop();ke.value+=this.sliceSerialize(xe),ke.position.end=No(xe.end)}function C(xe){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ze=ke.children[ke.children.length-1];ze.position.end=No(xe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ke.type)&&(I.call(this,xe),A.call(this,xe))}function R(){this.data.atHardBreak=!0}function D(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=xe}function q(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=xe}function F(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.value=xe}function H(){const xe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";xe.type+="Reference",xe.referenceType=ke,delete xe.url,delete xe.title}else delete xe.identifier,delete xe.label;this.data.referenceType=void 0}function U(){const xe=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";xe.type+="Reference",xe.referenceType=ke,delete xe.url,delete xe.title}else delete xe.identifier,delete xe.label;this.data.referenceType=void 0}function W(xe){const ke=this.sliceSerialize(xe),ze=this.stack[this.stack.length-2];ze.label=zRe(ke),ze.identifier=Iu(ke).toLowerCase()}function G(){const xe=this.stack[this.stack.length-1],ke=this.resume(),ze=this.stack[this.stack.length-1];if(this.data.inReference=!0,ze.type==="link"){const Et=xe.children;ze.children=Et}else ze.alt=ke}function L(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.url=xe}function $(){const xe=this.resume(),ke=this.stack[this.stack.length-1];ke.title=xe}function V(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function Q(xe){const ke=this.resume(),ze=this.stack[this.stack.length-1];ze.label=ke,ze.identifier=Iu(this.sliceSerialize(xe)).toLowerCase(),this.data.referenceType="full"}function J(xe){this.data.characterReferenceType=xe.type}function Y(xe){const ke=this.sliceSerialize(xe),ze=this.data.characterReferenceType;let Et;ze?(Et=tK(ke,ze==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Et=w2(ke);const rt=this.stack[this.stack.length-1];rt.value+=Et}function X(xe){const ke=this.stack.pop();ke.position.end=No(xe.end)}function ne(xe){A.call(this,xe);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(xe)}function Z(xe){A.call(this,xe);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(xe)}function se(){return{type:"blockquote",children:[]}}function pe(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function Oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function Ze(){return{type:"heading",depth:0,children:[]}}function xt(){return{type:"break"}}function pt(){return{type:"html",value:""}}function ye(){return{type:"image",title:null,url:"",alt:null}}function ve(){return{type:"link",title:null,url:"",children:[]}}function Me(xe){return{type:"list",ordered:xe.type==="listOrdered",start:null,spread:xe._spread,children:[]}}function Be(xe){return{type:"listItem",spread:xe._spread,checked:null,children:[]}}function je(){return{type:"paragraph",children:[]}}function mt(){return{type:"strong",children:[]}}function bt(){return{type:"text",value:""}}function wt(){return{type:"thematicBreak"}}}function No(e){return{line:e.line,column:e.column,offset:e.offset}}function fK(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fK(e,r):HRe(e,r)}}function HRe(e,t){let n;for(n in t)if(dK.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 _F(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Lh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Lh({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Lh({start:t.start,end:t.end})+") is still open")}function GRe(e){const t=this;t.parser=n;function n(r){return VRe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function KRe(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 YRe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 676`}]}function XRe(e,t){const n=t.value?t.value+` 677`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function QRe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZRe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function JRe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Zd(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function eIe(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 tIe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function hK(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 o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function nIe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hK(e,t);const i={src:Zd(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 rIe(e,t){const n={src:Zd(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 iIe(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 sIe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hK(e,t);const i={href:Zd(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 aIe(e,t){const n={href:Zd(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 oIe(e,t,n){const r=e.all(t),i=n?lIe(n):pK(t),s={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(i||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:` 678`}),d.type==="element"&&d.tagName==="p"&&!i?o.push(...d.children):o.push(d)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:` 679`});const u={type:"element",tagName:"li",properties:s,children:o};return e.patch(t,u),e.applyData(t,u)}function lIe(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=pK(n[r])}return t}function pK(e){const t=e.spread;return t??e.children.length>1}function cIe(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 o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.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 uIe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dIe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fIe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hIe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=y2(t.children[1]),c=KG(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function pIe(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const f=t.children[c],p={},m=o?o[c]:void 0;m&&(p.align=m);let x={type:"element",tagName:s,properties:p,children:[]};f&&(x.children=e.all(f),e.patch(f,x),x=e.applyData(f,x)),u.push(x)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function mIe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const EF=9,PF=32;function gIe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(kF(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(kF(t.slice(i),i>0,!1)),s.join("")}
vendor: 7,737 bytes, lines 679-681
679function kF(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===EF||s===PF;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===EF||s===PF;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function yIe(e,t){const n={type:"text",value:gIe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vIe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xIe={blockquote:KRe,break:YRe,code:XRe,delete:QRe,emphasis:ZRe,footnoteReference:JRe,heading:eIe,html:tIe,imageReference:nIe,image:rIe,inlineCode:iIe,linkReference:sIe,link:aIe,listItem:oIe,list:cIe,paragraph:uIe,root:dIe,strong:fIe,table:hIe,tableCell:mIe,tableRow:pIe,text:yIe,thematicBreak:vIe,toml:uy,yaml:uy,definition:uy,footnoteDefinition:uy};function uy(){}const mK=-1,C0=0,Bh=1,cx=2,N2=3,_2=4,E2=5,P2=6,gK=7,yK=8,OF=typeof self=="object"?self:globalThis,bIe=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case C0:case mK:return n(o,i);case Bh:{const l=n([],i);for(const c of o)l.push(r(c));return l}case cx:{const l=n({},i);for(const[c,u]of o)l[r(c)]=r(u);return l}case N2:return n(new Date(o),i);case _2:{const{source:l,flags:c}=o;return n(new RegExp(l,c),i)}case E2:{const l=n(new Map,i);for(const[c,u]of o)l.set(r(c),r(u));return l}case P2:{const l=n(new Set,i);for(const c of o)l.add(r(c));return l}case gK:{const{name:l,message:c}=o;return n(new OF[l](c),i)}case yK:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new OF[s](o),i)};return r},AF=e=>bIe(new Map,e)(0),yu="",{toString:wIe}={},{keys:jIe}=Object,oh=e=>{const t=typeof e;if(t!=="object"||!e)return[C0,t];const n=wIe.call(e).slice(8,-1);switch(n){case"Array":return[Bh,yu];case"Object":return[cx,yu];case"Date":return[N2,yu];case"RegExp":return[_2,yu];case"Map":return[E2,yu];case"Set":return[P2,yu];case"DataView":return[Bh,n]}return n.includes("Array")?[Bh,n]:n.includes("Error")?[gK,n]:[cx,n]},dy=([e,t])=>e===C0&&(t==="function"||t==="symbol"),SIe=(e,t,n,r)=>{const i=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},s=o=>{if(n.has(o))return n.get(o);let[l,c]=oh(o);switch(l){case C0:{let d=o;switch(c){case"bigint":l=yK,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return i([mK],o)}return i([l,d],o)}case Bh:{if(c){let p=o;return c==="DataView"?p=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(o)),i([c,[...p]],o)}const d=[],f=i([l,d],o);for(const p of o)d.push(s(p));return f}case cx:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(t&&"toJSON"in o)return s(o.toJSON());const d=[],f=i([l,d],o);for(const p of jIe(o))(e||!dy(oh(o[p])))&&d.push([s(p),s(o[p])]);return f}case N2:return i([l,o.toISOString()],o);case _2:{const{source:d,flags:f}=o;return i([l,{source:d,flags:f}],o)}case E2:{const d=[],f=i([l,d],o);for(const[p,m]of o)(e||!(dy(oh(p))||dy(oh(m))))&&d.push([s(p),s(m)]);return f}case P2:{const d=[],f=i([l,d],o);for(const p of o)(e||!dy(oh(p)))&&d.push(s(p));return f}}const{message:u}=o;return i([l,{name:c,message:u}],o)};return s},CF=(e,{json:t,lossy:n}={})=>{const r=[];return SIe(!(t||n),!!t,new Map,r)(e),r},ux=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?AF(CF(e,t)):structuredClone(e):(e,t)=>AF(CF(e,t));function NIe(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 _Ie(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function EIe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||NIe,r=e.options.footnoteBackLabel||_Ie,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),f=String(u.identifier).toUpperCase(),p=Zd(f.toLowerCase());let m=0;const x=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++m<=y;){x.length>0&&x.push({type:"text",value:" "});let w=typeof n=="string"?n:n(c,m);typeof w=="string"&&(w={type:"text",value:w}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(w)?w:[w]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const w=v.children[v.children.length-1];w&&w.type==="text"?w.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...x)}else d.push(...x);const b={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,b),l.push(b)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ux(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` 680`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` 681`}]}}const vK=(function(e){if(e==null)return AIe;if(typeof e=="function")return T0(e);if(typeof e=="object")return Array.isArray(e)?PIe(e):kIe(e);if(typeof e=="string")return OIe(e);throw new Error("Expected function, string, or object as test")});function PIe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vK(e[n]);return T0(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function kIe(e){const t=e;return T0(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function OIe(e){return T0(t);function t(n){return n&&n.type===e}}function T0(e){return t;function t(n,r,i){return!!(CIe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function AIe(){return!0}function CIe(e){return e!==null&&typeof e=="object"&&"type"in e}const xK=[],TIe=!0,TF=!1,RIe="skip";function IIe(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=vK(i),o=r?-1:1;l(e,void 0,[])();function l(c,u,d){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=xK,x,y,v;if((!t||s(c,u,d[d.length-1]||void 0))&&(m=MIe(n(c,d)),m[0]===TF))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==RIe)for(y=(r?b.children.length:-1)+o,v=d.concat(b);y>-1&&y<b.children.length;){const w=b.children[y];if(x=l(w,y,v)(),x[0]===TF)return x;y=typeof x[1]=="number"?x[1]:y+o}}return m}}}function MIe(e){return Array.isArray(e)?e:typeof e=="number"?[TIe,e]:e==null?xK:[e]}function bK(e,t,n,r){let i,s,o;typeof t=="function"&&typeof n!="function"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),IIe(e,s,l,i);function l(c,u){const d=u[u.length-1],f=d?d.children.indexOf(c):void 0;return o(c,f,d)}}const Ik={}.hasOwnProperty,DIe={};function LIe(e,t){const n=t||DIe,r=new Map,i=new Map,s=new Map,o={...xIe,...n.handlers},l={all:u,applyData:BIe,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:c,options:n,patch:$Ie,wrap:qIe};return bK(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,p=String(d.identifier).toUpperCase();f.has(p)||f.set(p,d)}}),l;function c(d,f){const p=d.type,m=l.handlers[p];if(Ik.call(l.handlers,p)&&m)return m(l,d,f);
vendor: 15,746 bytes, lines 681-685
681if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in d){const{children:y,...v}=d,b=ux(v);return b.children=l.all(d),b}return ux(d)}return(l.options.unknownHandler||FIe)(l,d,f)}function u(d){const f=[];if("children"in d){const p=d.children;let m=-1;for(;++m<p.length;){const x=l.one(p[m],d);if(x){if(m&&p[m-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=RF(x.value)),!Array.isArray(x)&&x.type==="element")){const y=x.children[0];y&&y.type==="text"&&(y.value=RF(y.value))}Array.isArray(x)?f.push(...x):f.push(x)}}}return f}}function $Ie(e,t){e.position&&(t.position=wCe(e))}function BIe(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 o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,ux(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function FIe(e,t){const n=t.data||{},r="value"in t&&!(Ik.call(n,"hProperties")||Ik.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 qIe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:` 682`});++r<e.length;)r&&n.push({type:"text",value:` 683`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:` 684`}),n}function RF(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function IF(e,t){const n=LIe(e,t),r=n.one(e,void 0),i=EIe(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:` 685`},i),s}function zIe(e,t){return e&&"run"in e?async function(n,r){const i=IF(n,{file:r,...t});await e.run(i,r)}:function(n,r){return IF(n,{file:r,...e||t})}}function MF(e){if(e)throw e}var __,DF;function UIe(){if(DF)return __;DF=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},s=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},o=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},l=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return __=function c(){var u,d,f,p,m,x,y=arguments[0],v=1,b=arguments.length,w=!1;for(typeof y=="boolean"&&(w=y,y=arguments[1]||{},v=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});v<b;++v)if(u=arguments[v],u!=null)for(d in u)f=l(y,d),p=l(u,d),y!==p&&(w&&p&&(s(p)||(m=i(p)))?(m?(m=!1,x=f&&i(f)?f:[]):x=f&&s(f)?f:{},o(y,{name:d,newValue:c(w,x,p)})):typeof p<"u"&&o(y,{name:d,newValue:p}));return y},__}var VIe=UIe();const E_=Lt(VIe);function Mk(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 WIe(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...u){const d=e[++s];let f=-1;if(c){o(c);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,d?HIe(d,l)(...u):o(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 HIe(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(i);try{c=e.apply(this,o)}catch(u){const d=u;if(l&&n)throw d;return i(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(o,...l){n||(n=!0,t(o,...l))}function s(o){i(null,o)}}const Ws={basename:GIe,dirname:KIe,extname:YIe,join:XIe,sep:"/"};function GIe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bm(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 o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function KIe(e){if(bm(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 YIe(e){bm(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===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 XIe(...e){let t=-1,n;for(;++t<e.length;)bm(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":QIe(n)}function QIe(e){bm(e);const t=e.codePointAt(0)===47;let n=ZIe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ZIe(e,t){let n="",r=0,i=-1,s=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=o,s=0;continue}}else if(n.length>0){n="",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else l===46&&s>-1?s++:s=-1}return n}function bm(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JIe={cwd:eMe};function eMe(){return"/"}function Dk(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tMe(e){if(typeof e=="string")e=new URL(e);else if(!Dk(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 nMe(e)}function nMe(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 P_=["history","path","basename","stem","extname","dirname"];class wK{constructor(t){let n;t?Dk(t)?n={path:t}:typeof t=="string"||rMe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":JIe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<P_.length;){const s=P_[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)P_.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ws.basename(this.path):void 0}set basename(t){O_(t,"basename"),k_(t,"basename"),this.path=Ws.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ws.dirname(this.path):void 0}set dirname(t){LF(this.basename,"dirname"),this.path=Ws.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ws.extname(this.path):void 0}set extname(t){if(k_(t,"extname"),LF(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=Ws.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Dk(t)&&(t=tMe(t)),O_(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ws.basename(this.path,this.extname):void 0}set stem(t){O_(t,"stem"),k_(t,"stem"),this.path=Ws.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 Lr(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 k_(e,t){if(e&&e.includes(Ws.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ws.sep+"`")}function O_(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function LF(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function rMe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const iMe=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),sMe={}.hasOwnProperty;class k2 extends iMe{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=WIe()}copy(){const t=new k2;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(E_(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(T_("data",this.frozen),this.namespace[t]=n,this):sMe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(T_("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=fy(t),r=this.parser||this.Parser;return A_("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),A_("process",this.parser||this.Parser),C_("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const l=fy(t),c=r.parse(l);r.run(c,l,function(d,f,p){if(d||!f||!p)return u(d);const m=f,x=r.stringify(m,p);lMe(x)?p.value=x:p.result=x,u(d,p)});function u(d,f){d||!f?o(d):s?s(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),A_("processSync",this.parser||this.Parser),C_("processSync",this.compiler||this.Compiler),this.process(t,i),BF("processSync","process",n),r;function i(s,o){n=!0,MF(s),r=o}}run(t,n,r){$F(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(o,l){const c=fy(n);i.run(t,c,u);function u(d,f,p){const m=f||t;d?l(d):o?o(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),BF("runSync","run",r),i;function s(o,l){MF(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=fy(n),i=this.compiler||this.Compiler;return C_("stringify",i),$F(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(T_("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...f]=u;c(d,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(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");l(u.plugins),u.settings&&(i.settings=E_(!0,i.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const f=u[d];s(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===u){p=f;break}if(p===-1)r.push([u,...d]);else if(d.length>0){let[m,...x]=d;const y=r[p][1];Mk(y)&&Mk(m)&&(m=E_(!0,y,m)),r[p]=[u,m,...x]}}}}const aMe=new k2().freeze();function A_(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function C_(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function T_(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 $F(e){if(!Mk(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function BF(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fy(e){return oMe(e)?e:new wK(e)}function oMe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lMe(e){return typeof e=="string"||cMe(e)}function cMe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uMe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",FF=[],qF={allowDangerousHtml:!0},dMe=/^(https?|ircs?|mailto|xmpp)$/i,fMe=[{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:"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 dx(e){const t=hMe(e),n=pMe(e);return mMe(t.runSync(t.parse(n),n),e)}function hMe(e){const t=e.rehypePlugins||FF,n=e.remarkPlugins||FF,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...qF}:qF;return aMe().use(GRe).use(n).use(zIe,r).use(t)}function pMe(e){const t=e.children||"",n=new wK;return typeof t=="string"&&(n.value=t),n}function mMe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||gMe;for(const d of fMe)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+uMe+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),bK(e,u),ECe(e,{Fragment:a.Fragment,components:i,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function u(d,f,p){if(d.type==="raw"&&p&&typeof f=="number")return o?p.children.splice(f,1):p.children[f]={type:"text",value:d.value},f;
685if(d.type==="element"){let m;for(m in j_)if(Object.hasOwn(j_,m)&&Object.hasOwn(d.properties,m)){const x=d.properties[m],y=j_[m];(y===null||y.includes(d.tagName))&&(d.properties[m]=c(String(x||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(d,f,p)),m&&p&&typeof f=="number")return l&&d.children?p.children.splice(f,1,...d.children):p.children.splice(f,1),f}}}function gMe(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||dMe.test(e.slice(0,t))?e:""}function yMe(){var b;const t=new URLSearchParams(window.location.search).get("slug"),[n,r]=T.useState(null),[i,s]=T.useState(null),[o,l]=T.useState(!1),[c,u]=T.useState(!1),{data:d=[],isLoading:f}=st({queryKey:["post",t],queryFn:()=>ce.entities.BlogPost.filter({slug:t}),enabled:!!t}),p=d[0],{data:m=[]}=st({queryKey:["ad-placements-post",p==null?void 0:p.category],queryFn:async()=>{try{const w=await ce.entities.AdPlacement.filter({is_active:!0});return p!=null&&p.category?w.filter(N=>{var S;return!((S=N.target_categories)!=null&&S.length)||N.target_categories.includes(p.category)}):w}catch(w){return console.error("Error loading ad placements:",w),[]}},enabled:!!p}),{data:x=[]}=st({queryKey:["related-posts",p==null?void 0:p.category],queryFn:()=>ce.entities.BlogPost.filter({status:"published",category:p.category},"-published_date",4),enabled:!!(p!=null&&p.category)});T.useEffect(()=>{(async()=>{const N=await ce.entities.User.list();N.length>0&&r({enabled:N[0].ads_enabled,inContent:N[0].in_content_ad_code,sidebar:N[0].sidebar_ad_code})})()},[]);const y=x.filter(w=>w.id!==(p==null?void 0:p.id)).slice(0,3),v=window.location.href;return f?a.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-12",children:[a.jsx(Dt,{className:"h-8 w-32 mb-8"}),a.jsx(Dt,{className:"h-12 w-3/4 mb-4"}),a.jsx(Dt,{className:"h-6 w-1/2 mb-8"}),a.jsx(Dt,{className:"h-80 rounded-2xl mb-8"}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(Dt,{className:"h-4 w-full"}),a.jsx(Dt,{className:"h-4 w-full"}),a.jsx(Dt,{className:"h-4 w-3/4"})]})]})}):p?a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx("header",{className:"sticky top-0 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[a.jsxs(ft,{to:Xe("Blog"),className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:a.jsx(Ct,{className:"w-5 h-5 text-white"})}),a.jsx("span",{className:"font-bold text-xl text-slate-900",children:"TechBlog"})]}),a.jsx(ft,{to:Xe("Blog"),children:a.jsxs(ae,{variant:"ghost",className:"gap-2",children:[a.jsx(rl,{className:"w-4 h-4"}),"All Articles"]})})]})}),a.jsx("div",{className:"max-w-6xl mx-auto px-4 py-12",children:a.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[a.jsxs("article",{className:"lg:col-span-2",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[p.category&&a.jsx(Ek,{category:p.category,size:"lg"}),a.jsx("h1",{className:"text-3xl lg:text-4xl font-bold text-slate-900 mt-4 mb-4 leading-tight",children:p.title}),a.jsx("p",{className:"text-xl text-slate-600 mb-6",children:p.excerpt}),a.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-slate-500",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Yr,{className:"w-4 h-4"}),Jt(new Date(p.published_date||p.created_date),"MMMM d, yyyy")]}),p.reading_time&&a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Rn,{className:"w-4 h-4"}),p.reading_time," min read"]})]})]}),p.cover_image&&a.jsx(Pe.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},transition:{delay:.1},className:"mb-10",children:a.jsx("img",{src:p.cover_image,alt:p.title,className:"w-full h-80 lg:h-96 object-cover rounded-2xl shadow-lg"})}),a.jsxs(Pe.div,{initial:{opacity:0}
685,animate:{opacity:1},transition:{delay:.2},className:`prose prose-lg prose-slate max-w-none mb-12 686 prose-headings:font-bold prose-headings:text-slate-900 687 prose-h2:text-2xl prose-h2:mt-10 prose-h2:mb-4 688 prose-h3:text-xl prose-h3:mt-8 prose-h3:mb-3 689 prose-p:text-slate-600 prose-p:leading-relaxed 690 prose-a:text-indigo-600 prose-a:no-underline hover:prose-a:underline 691 prose-strong:text-slate-900 692 prose-ul:my-6 prose-li:my-2 693 prose-blockquote:border-l-4 prose-blockquote:border-indigo-500 prose-blockquote:bg-indigo-50 prose-blockquote:py-2 prose-blockquote:px-4 prose-blockquote:rounded-r-lg 694 prose-code:bg-slate-100 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-sm 695 prose-pre:bg-slate-900 prose-pre:rounded-xl`,children:[a.jsx(dx,{children:p.content}),(n==null?void 0:n.enabled)&&(n==null?void 0:n.inContent)&&a.jsx("div",{className:"my-12 p-6 bg-slate-50 rounded-xl border border-slate-200 not-prose",children:a.jsx(qo,{code:n.inContent,className:"text-center"})}),m.filter(w=>w.location==="in_content"&&(w.display_pages.includes("blog_post")||w.display_pages.includes("all"))).map((w,N)=>a.jsx("div",{className:"my-12 p-6 bg-slate-50 rounded-xl border border-slate-200 not-prose",children:a.jsx(qo,{code:w.ad_code,placementId:w.id,className:"text-center"})},w.id))]}),((b=p.tags)==null?void 0:b.length)>0&&a.jsxs(Pe.div,{initial:{opacity:0}
695,animate:{opacity:1},transition:{delay:.3},className:"flex flex-wrap items-center gap-2 mb-8 pb-8 border-b border-slate-200",children:[a.jsx(d8,{className:"w-4 h-4 text-slate-400"}),p.tags.map(w=>a.jsx(Se,{variant:"secondary",className:"bg-slate-100 text-slate-600",children:w},w))]}),a.jsx(Pe.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},className:"mb-16 pb-8 border-b border-slate-200",children:a.jsx(FG,{post:p,url:v})}),a.jsx("div",{className:"mb-10",children:a.jsx(AG,{inline:!0})}),a.jsx(Q2e,{postId:p.id}),a.jsx(Pe.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.5},className:"mb-16",children:a.jsx(Y2e,{postId:p.id})}),y.length>0&&a.jsxs(Pe.section,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-6",children:"Related Articles"}),a.jsx("div",{className:"grid gap-6",children:y.map(w=>a.jsx(ft,{to:Xe("BlogPost")+`?slug=${w.slug}`,children:a.jsxs("div",{className:"group bg-white rounded-xl border border-slate-100 overflow-hidden hover:shadow-lg transition-all flex",children:[w.cover_image&&a.jsx("div",{className:"w-32 h-32 overflow-hidden flex-shrink-0",children:a.jsx("img",{src:w.cover_image,alt:w.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300"})}),a.jsx("div",{className:"p-4 flex-1",children:a.jsx("h3",{className:"font-semibold text-slate-900 line-clamp-2 group-hover:text-indigo-600 transition-colors",children:w.title})})]})},w.id))})]})]}),a.jsx("aside",{className:"lg:col-span-1 hidden lg:block",children:a.jsxs("div",{className:"sticky top-24 space-y-6",children:[(n==null?void 0:n.enabled)&&(n==null?void 0:n.sidebar)&&a.jsx("div",{className:"bg-slate-50 rounded-xl p-4 border border-slate-200",children:a.jsx(qo,{code:n.sidebar})}),m.filter(w=>w.location==="sidebar"&&(w.display_pages.includes("blog_post")||w.display_pages.includes("all"))).map(w=>a.jsx("div",{className:"bg-slate-50 rounded-xl p-4 border border-slate-200",children:a.jsx(qo,{code:w.ad_code,placementId:w.id})},w.id))]})})]})}),a.jsx("footer",{className:"border-t border-slate-200 mt-16",children:a.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8 text-center text-slate-500 text-sm",children:a.jsxs("p",{children:["© ",new Date().getFullYear()," TechBlog. Powered by AI."]})})})]}):a.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30 flex items-center justify-center",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900 mb-4",children:"Post not found"}),a.jsx(ft,{to:Xe("Blog"),children:a.jsx(ae,{children:"Back to Blog"})})]})})}function pl(){const[e,t]=T.useState(null),[n,r]=T.useState(!0);T.useEffect(()=>{ce.auth.me().then(t).catch(()=>t(null)).finally(()=>r(!1))},[]);const i=(e==null?void 0:e.role)==="admin",s=(e==null?void 0:e.role)==="editor",o=(e==null?void 0:e.role)==="content_creator",l=(e==null?void 0:e.role)==="seo_specialist",c=(e==null?void 0:e.role)==="ad_manager",u=(e==null?void 0:e.role)==="viewer",d=i||s||o,f=i||s;return{user:e,loading:n,isAdmin:i,isEditor:s,isContentCreator:o,isSeoSpecialist:l,isAdManager:c,isViewer:u,canCreatePosts:d,canPublishPosts:f,canEditAnyPost:i||s,canDeleteAnyPost:i,canManageUsers:i,canManageSettings:i,canViewAnalytics:i||s||l,canManageSEO:i||s||l,canManageAds:i||c,canSchedulePosts:i||s||o,canManageComments:i||s,canEditPost:I=>!e||!I?!1:!!(i||s||o&&I.created_by===e.email||l),canDeletePost:I=>!e||!I?!1:!!(i||s||o&&I.created_by===e.email&&I.status==="draft"),canPublishPost:I=>!e||!I?!1:!!(i||s),canPublish:f}}const vMe=Yp("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),jr=T.forwardRef(({className:e,variant:t,...n},r)=>a.jsx("div",{ref:r,role:"alert",className:Ot(vMe({variant:t}),e),...n}));jr.displayName="Alert";const jK=T.forwardRef(({className:e,...t},n)=>a.jsx("h5",{ref:n,className:Ot("mb-1 font-medium leading-none tracking-tight",e),...t}));jK.displayName="AlertTitle";const Sr=T.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,className:Ot("text-sm [&_p]:leading-relaxed",e),...t}));Sr.displayName="AlertDescription";function xMe(){const{canManageSettings:e}=pl(),[t,n]=T.useState("pending"),r=Ln(),{data:i=[],isLoading:s}=st({queryKey:["all-comments"],queryFn:()=>ce.entities.Comment.list("-created_date",200)}),o=wr({mutationFn:({id:d,status:f})=>ce.entities.Comment.update(d,{status:f}),onSuccess:()=>
695r.invalidateQueries({queryKey:["all-comments"]})}),l=wr({mutationFn:d=>ce.entities.Comment.delete(d),onSuccess:()=>r.invalidateQueries({queryKey:["all-comments"]})});if(!e)return a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsxs(jr,{variant:"destructive",children:[a.jsx(Kr,{className:"h-4 w-4"}),a.jsx(Sr,{children:"You don't have permission to moderate comments."})]})});const c=i.filter(d=>d.status===t),u=i.filter(d=>d.status==="pending").length;return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3",children:[a.jsx(li,{className:"w-8 h-8 text-indigo-600"}),"Comment Moderation"]}),a.jsx("p",{className:"text-slate-600 mt-2",children:"Review and manage user comments"})]}),a.jsx(ur,{value:t,onValueChange:n,children:a.jsxs(Jn,{className:"bg-slate-100",children:[a.jsxs(et,{value:"pending",className:"gap-2",children:["Pending",u>0&&a.jsx(Se,{variant:"destructive",className:"ml-1",children:u})]}),a.jsx(et,{value:"approved",children:"Approved"}),a.jsx(et,{value:"rejected",children:"Rejected"}),a.jsx(et,{value:"flagged",children:"Flagged"})]})}),a.jsxs("div",{className:"space-y-4",children:[c.map((d,f)=>{var p,m;return a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:f*.05},children:a.jsx(de,{children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 flex items-center justify-center text-white font-medium",children:(m=(p=d.author_name)==null?void 0:p[0])==null?void 0:m.toUpperCase()}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-900",children:d.author_name}),a.jsx("p",{className:"text-sm text-slate-500",children:d.author_email}),a.jsx("p",{className:"text-xs text-slate-400",children:Jt(new Date(d.created_date),"MMM d, yyyy ⢠h:mm a")})]})]}),a.jsx(Se,{variant:d.status==="approved"?"default":d.status==="pending"?"secondary":d.status==="flagged"?"destructive":"outline",children:d.status})]}),a.jsx("p",{className:"text-slate-700 mb-4 whitespace-pre-wrap",children:d.content}),a.jsxs("div",{className:"flex items-center gap-2",children:[d.status!=="approved"&&a.jsxs(ae,{size:"sm",onClick:()=>o.mutate({id:d.id,status:"approved"}),className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:[a.jsx(Cn,{className:"w-4 h-4"}),"Approve"]}),d.status!=="rejected"&&a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>o.mutate({id:d.id,status:"rejected"}),className:"gap-2",children:[a.jsx(As,{className:"w-4 h-4"}),"Reject"]}),d.status!=="flagged"&&a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>o.mutate({id:d.id,status:"flagged"}),className:"gap-2 text-amber-600",children:[a.jsx(lJ,{className:"w-4 h-4"}),"Flag"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>l.mutate(d.id),className:"gap-2 text-red-600",children:[a.jsx(qa,{className:"w-4 h-4"}),"Delete"]})]})]})})},d.id)}),c.length===0&&a.jsxs("p",{className:"text-center text-slate-500 py-12",children:["No ",t," comments"]})]})]})}function bMe(){const[e,t]=T.useState(!1),n=r=>{r.preventDefault(),t(!0),setTimeout(()=>t(!1),5e3)};return a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx("header",{className:"sticky top-0 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[a.jsxs(ft,{to:Xe("Blog"),className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:a.jsx(Ct,{className:"w-5 h-5 text-white"})}),a.jsx("span",{className:"font-bold text-xl text-slate-900",children:"TechBlog"})]}),a.jsx(ft,{to:Xe("Blog"),children:a.jsxs(ae,{variant:"ghost",className:"gap-2",children:[a.jsx(rl,{className:"w-4 h-4"}),"Back to Blog"]})})]})}),a.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-16",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:20}
695,animate:{opacity:1,y:0},className:"text-center mb-12",children:[a.jsx("h1",{className:"text-4xl font-bold text-slate-900 mb-4",children:"Contact Us"}),a.jsx("p",{className:"text-xl text-slate-600",children:"Have a question, feedback, or story tip? We'd love to hear from you."})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[a.jsx(Pe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.1},children:a.jsx(de,{className:"border-slate-200",children:a.jsx(he,{className:"pt-6",children:a.jsxs("form",{onSubmit:n,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"name",children:"Name"}),a.jsx(Ye,{id:"name",placeholder:"Your name",required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"email",children:"Email"}),a.jsx(Ye,{id:"email",type:"email",placeholder:"[email protected]",required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"subject",children:"Subject"}),a.jsx(Ye,{id:"subject",placeholder:"What's this about?",required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"message",children:"Message"}),a.jsx(dn,{id:"message",placeholder:"Tell us more...",rows:6,required:!0,className:"mt-1.5"})]}),e?a.jsxs(ae,{disabled:!0,className:"w-full gap-2 bg-emerald-600",children:[a.jsx(li,{className:"w-4 h-4"}),"Message Sent!"]}):a.jsxs(ae,{type:"submit",className:"w-full gap-2 bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700",children:[a.jsx(ci,{className:"w-4 h-4"}),"Send Message"]})]})})})}),a.jsxs(Pe.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.2},className:"space-y-6",children:[a.jsx(de,{className:"border-slate-200",children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-indigo-50 flex items-center justify-center",children:a.jsx(xr,{className:"w-6 h-6 text-indigo-600"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Email Us"}),a.jsx("p",{className:"text-slate-600 text-sm mb-2",children:"For general inquiries and editorial questions"}),a.jsx("a",{href:"mailto:[email protected]",className:"text-indigo-600 hover:underline text-sm",children:"[email protected]"})]})]})})}),a.jsx(de,{className:"border-slate-200",children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-purple-50 flex items-center justify-center",children:a.jsx(li,{className:"w-6 h-6 text-purple-600"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900 mb-1",children:"Story Tips"}),a.jsx("p",{className:"text-slate-600 text-sm mb-2",children:"Have a tech news story or tip to share?"}),a.jsx("a",{href:"mailto:[email protected]",className:"text-indigo-600 hover:underline text-sm",children:"[email protected]"})]})]})})}),a.jsxs("div",{className:"p-6 bg-slate-50 rounded-xl border border-slate-200",children:[a.jsx("h3",{className:"font-semibold text-slate-900 mb-3",children:"Response Time"}),a.jsx("p",{className:"text-slate-600 text-sm",children:"We typically respond to inquiries within 2-3 business days. For urgent matters, please indicate this in your subject line."})]})]})]})]}),a.jsx("footer",{className:"border-t border-slate-200 mt-16",children:a.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8",children:a.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"© 2024 TechBlog. All rights reserved."}),a.jsxs("div",{className:"flex gap-6 text-sm",children:[a.jsx(ft,{to:Xe("About"),className:"text-slate-600 hover:text-indigo-600",children:"About"}),a.jsx(ft,{to:Xe("Privacy"),className:"text-slate-600 hover:text-indigo-600",children:"Privacy Policy"}),a.jsx(ft,{to:Xe("Terms"),className:"text-slate-600 hover:text-indigo-600",children:"Terms of Service"})]})]})})})]})}function wMe({emails:e,loading:t,selectedEmail:n,onSelectEmail:r,usedEmailIds:i=[]}){return t?a.jsx("div",{className:"space-y-3",children:[...Array(5)].map((s,o)=>a.jsx(de,{className:"p-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx(Dt,{className:"h-5 w-3/4 mb-2"}),a.jsx(Dt,{className:"h-4 w-1/2"})]}),a.jsx(Dt,{className:"h-9 w-20"})]})},o))}):!e||e.length===0?a.jsxs(de,{className:"p-12 text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-slate-100 rounded-2xl flex items-center justify-center mx-auto mb-4",children:a.jsx(xr,{className:"w-8 h-8 text-slate-400"})}),a.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"No emails found"}),a.jsx("p",{className:"text-slate-500",children:"No newsletter emails available. Try refreshing or check your Gmail inbox."})]}):a.jsx("div",{className:"space-y-3",children:e.map((s,o)=>
695{const l=i.includes(s.id),c=(n==null?void 0:n.id)===s.id;return a.jsx(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:o*.05},children:a.jsx(de,{className:`p-4 cursor-pointer transition-all duration-200 ${c?"border-indigo-500 bg-indigo-50 shadow-md":l?"border-slate-200 bg-slate-50 opacity-60":"border-slate-200 hover:border-indigo-300 hover:shadow-md"}`,onClick:()=>!l&&r(s),children:a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"flex items-center gap-2 mb-2",children:l?a.jsxs(Se,{className:"bg-green-100 text-green-700 border-green-200",children:[a.jsx(_n,{className:"w-3 h-3 mr-1"}),"Used"]}):a.jsx(Se,{variant:"outline",className:"border-indigo-200 text-indigo-700 bg-indigo-50",children:"Newsletter"})}),a.jsx("h4",{className:"font-semibold text-slate-900 mb-1 truncate",children:s.subject||"No Subject"}),a.jsxs("p",{className:"text-sm text-slate-500 mb-2 truncate",children:["From: ",s.from]}),a.jsx("p",{className:"text-sm text-slate-400 line-clamp-2",children:s.snippet}),a.jsxs("div",{className:"flex items-center gap-2 mt-2 text-xs text-slate-400",children:[a.jsx(Yr,{className:"w-3.5 h-3.5"}),s.date?Jt(new Date(s.date),"MMM d, yyyy"):"Unknown date"]})]}),!l&&a.jsxs(ae,{size:"sm",className:c?"bg-indigo-600":"bg-white border border-slate-200 text-slate-700 hover:bg-slate-50",children:[c?"Selected":"Select",a.jsx(Yk,{className:"w-4 h-4 ml-1"})]})]})})},s.id)})})}function jMe({selectedImage:e,onSelectImage:t,suggestedSearchTerms:n=[]}){const[r,i]=T.useState(""),[s,o]=T.useState([]),[l,c]=T.useState(!1),[u,d]=T.useState(""),f=async m=>{if(m.trim()){c(!0),d(m);try{o(["https://images.unsplash.com/photo-1518770660439-4636190af475?w=1200&q=80","https://images.unsplash.com/photo-1504639725590-34d0984388bd?w=1200&q=80","https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1200&q=80","https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?w=1200&q=80","https://images.unsplash.com/photo-1550751827-4bd374c3f58b?w=1200&q=80","https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=1200&q=80"])}catch(x){console.error("Image search failed:",x)}finally{c(!1)}}},p=m=>{m.preventDefault(),f(r)};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"cover",children:"Cover Image"}),n.length>0&&a.jsxs("div",{className:"mt-2 mb-3",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Ct,{className:"w-4 h-4 text-indigo-500"}),a.jsx("span",{className:"text-sm font-medium text-slate-700",children:"AI Suggested:"})]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:n.map((m,x)=>a.jsxs(ae,{variant:"outline",size:"sm",onClick:()=>f(m),disabled:l,className:"gap-2",children:[a.jsx(lr,{className:"w-3 h-3"}),m]},x))})]}),a.jsxs("form",{onSubmit:p,className:"flex gap-2 mt-2",children:[a.jsx(Ye,{id:"cover",placeholder:"Search for custom images (e.g., 'tech gadgets', 'coding')",value:r,onChange:m=>i(m.target.value)}),a.jsx(ae,{type:"submit",variant:"outline",disabled:l||!r.trim(),children:l?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(lr,{className:"w-4 h-4"})})]}),a.jsx("div",{className:"mt-3",children:a.jsx(Ye,{placeholder:"Or paste image URL directly",value:e,onChange:m=>t(m.target.value),className:"text-sm"})})]}),s.length>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("span",{className:"text-sm font-medium text-slate-700",children:['Results for "',u,'"']}),a.jsxs(Se,{variant:"secondary",className:"text-xs",children:[s.length," images"]})]}),a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:s.map((m,x)=>a.jsxs(Pe.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{delay:x*.05},className:`relative group cursor-pointer rounded-xl overflow-hidden border-2 transition-all ${e===m?"border-indigo-500 shadow-lg":"border-slate-200 hover:border-indigo-300"}`,onClick:()=>t(m),children:[a.jsx("img",{src:m,alt:`Option ${x+1}`,className:"w-full h-32 object-cover"}),e===m&&a.jsx("div",{className:"absolute inset-0 bg-indigo-600 bg-opacity-20 flex items-center justify-center",children:a.jsx("div",{className:"w-10 h-10 rounded-full bg-indigo-600 flex items-center justify-center",children:a.jsx(_n,{className:"w-6 h-6 text-white"})})}),a.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/50 to-transparent p-2 opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsxs("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-white text-xs",onClick:y=>y.stopPropagation(),children:[a.jsx(Gu,{className:"w-3 h-3"}),"View full"]})})]},x))})]}),e&&a.jsxs("div",{children:[a.jsx(De,{className:"text-sm text-slate-600 mb-2 block",children:"Selected Cover Image"}),a.jsxs("div",{className:"relative rounded-xl overflow-hidden border-2 border-indigo-200",children:[a.jsx("img",{src:e,alt:"Selected cover",className:"w-full h-48 object-cover"}),a.jsx("div",{className:"absolute top-2 right-2",children:a.jsxs(Se,{className:"bg-indigo-600 text-white",children:[a.jsx(_n,{className:"w-3 h-3 mr-1"}),"Selected"]})})]})]}),l&&a.jsx("div",{className:"grid grid-cols-3 gap-3",children:[...Array(6)].map((m,x)=>a.jsx(Dt,{className:"h-32 rounded-xl"},x))})]})}function SMe({post:e,onSummaryGenerated:t}){var d,f;const[n,r]=T.useState(!1),[i,s]=T.useState((e==null?void 0:e.ai_summary)||null),[o,l]=T.useState({}),c=async()=>
695{if(e!=null&&e.content){r(!0);try{const p=await ce.integrations.Core.InvokeLLM({prompt:`Generate concise summaries for this blog post: 696 697TITLE: ${e.title} 698CONTENT: ${e.content.substring(0,2e3)}... 699 700Create 3 types of summaries: 7011. SHORT (1-2 sentences, max 280 characters) - perfect for Twitter 7022. MEDIUM (3-4 sentences, ~400 characters) - for LinkedIn and previews 7033. KEY_POINTS (3-5 bullet points) - main takeaways from the article 704 705Make them engaging, informative, and preserve the key message.`,response_json_schema:{type:"object",properties:{short:{type:"string"},medium:{type:"string"},key_points:{type:"array",items:{type:"string"}}}}});s(p),t&&t(p)}catch(p){console.error("Failed to generate summaries:",p)}finally{r(!1)}}},u=(p,m)=>{navigator.clipboard.writeText(p),l({...o,[m]:!0}),setTimeout(()=>{l({...o,[m]:!1})},2e3)};return a.jsxs(de,{className:"border-purple-200 bg-purple-50/30",children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"w-5 h-5 text-purple-600"}),"AI Summaries"]})}),a.jsx(he,{className:"space-y-4",children:i?a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"bg-white rounded-lg p-4 border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase",children:"Twitter / Short"}),a.jsx(ae,{variant:"ghost",size:"sm",onClick:()=>u(i.short,"short"),className:"h-8 gap-2",children:o.short?a.jsxs(a.Fragment,{children:[a.jsx(Cn,{className:"w-3 h-3 text-emerald-600"}),a.jsx("span",{className:"text-emerald-600 text-xs",children:"Copied!"})]}):a.jsxs(a.Fragment,{children:[a.jsx(or,{className:"w-3 h-3"}),a.jsx("span",{className:"text-xs",children:"Copy"})]})})]}),a.jsx("p",{className:"text-sm text-slate-700",children:i.short}),a.jsxs("p",{className:"text-xs text-slate-400 mt-2",children:[(d=i.short)==null?void 0:d.length," characters"]})]}),a.jsxs("div",{className:"bg-white rounded-lg p-4 border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase",children:"LinkedIn / Preview"}),a.jsx(ae,{variant:"ghost",size:"sm",onClick:()=>u(i.medium,"medium"),className:"h-8 gap-2",children:o.medium?a.jsxs(a.Fragment,{children:[a.jsx(Cn,{className:"w-3 h-3 text-emerald-600"}),a.jsx("span",{className:"text-emerald-600 text-xs",children:"Copied!"})]}):a.jsxs(a.Fragment,{children:[a.jsx(or,{className:"w-3 h-3"}),a.jsx("span",{className:"text-xs",children:"Copy"})]})})]}),a.jsx("p",{className:"text-sm text-slate-700",children:i.medium})]}),a.jsxs("div",{className:"bg-white rounded-lg p-4 border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase",children:"Key Points"}),a.jsx(ae,{variant:"ghost",size:"sm",onClick:()=>{var p;return u((p=i.key_points)==null?void 0:p.join(` 706⢠`),"points")},className:"h-8 gap-2",children:o.points?a.jsxs(a.Fragment,{children:[a.jsx(Cn,{className:"w-3 h-3 text-emerald-600"}),a.jsx("span",{className:"text-emerald-600 text-xs",children:"Copied!"})]}):a.jsxs(a.Fragment,{children:[a.jsx(or,{className:"w-3 h-3"}),a.jsx("span",{className:"text-xs",children:"Copy"})]})})]}),a.jsx("ul",{className:"space-y-2",children:(f=i.key_points)==null?void 0:f.map((p,m)=>a.jsxs("li",{className:"text-sm text-slate-700 flex gap-2",children:[a.jsx("span",{className:"text-purple-600",children:"â¢"}),a.jsx("span",{children:p})]},m))})]}),a.jsx(ae,{variant:"outline",onClick:c,disabled:n,className:"w-full gap-2",children:n?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Regenerating..."]}):"Regenerate Summaries"})]}):a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"text-sm text-slate-600",children:"Generate AI-powered summaries for social media, previews, and quick sharing."}),a.jsx(ae,{onClick:c,disabled:n||!(e!=null&&e.content),className:"w-full bg-purple-600 hover:bg-purple-700 gap-2",children:n?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"w-4 h-4"}),"Generate Summaries"]})})]})})]})}const NMe=[{value:"tech-news",label:"Tech News"},{value:"app-reviews",label:"App Reviews"},{value:"tutorials",label:"Tutorials"},{value:"ai-ml",label:"AI & ML"},{value:"startups",label:"Startups"},{value:"gadgets",label:"Gadgets"},{value:"programming",label:"Programming"},{value:"cybersecurity",label:"Cybersecurity"}];function SK({onDraftGenerated:e}){const[t,n]=T.useState(""),[r,i]=T.useState(""),[s,o]=T.useState("tech-news"),[l,c]=T.useState("professional"),[u,d]=T.useState(!1),f=async()=>
706{if(!t.trim()){we.error("Please enter a topic");return}d(!0);try{const p=await ce.integrations.Core.InvokeLLM({prompt:`You are an expert tech blog writer. Create a comprehensive, engaging blog post based on the following: 707 708Topic: ${t} 709${r?`Outline/Key Points: 710${r}`:""} 711Category: ${s} 712Tone: ${l} 713 714Generate a complete blog post with: 7151. A compelling title (SEO-optimized, 50-60 characters) 7162. An engaging excerpt (2-3 sentences) 7173. Full content in Markdown format with: 718 - Proper headings (##, ###) 719 - Well-structured paragraphs 720 - Bullet points where appropriate 721 - Code examples if relevant 722 - Real-world examples and insights 7234. SEO-optimized meta description (150-160 characters) 7245. 5-7 relevant tags 7256. Image alt text suggestion for a cover image 726 727Make the content informative, engaging, and valuable. Include recent trends and actionable insights. 728Aim for 800-1200 words.`,response_json_schema:{type:"object",properties:{title:{type:"string"},excerpt:{type:"string"},content:{type:"string"},meta_description:{type:"string"},tags:{type:"array",items:{type:"string"}},cover_image_alt:{type:"string"}}}});e({...p,category:s,tags:p.tags||[]}),we.success("Draft generated successfully!"),n(""),i("")}catch(p){we.error("Failed to generate draft"),console.error(p)}finally{d(!1)}};return a.jsxs(de,{className:"border-purple-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Tr,{className:"w-5 h-5 text-purple-600"}),"AI Content Drafter"]}),a.jsx(mn,{children:"Generate a complete blog post draft from a topic or outline"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Topic / Title Idea"}),a.jsx(Ye,{placeholder:"e.g., The Future of AI in Mobile Apps",value:t,onChange:p=>n(p.target.value),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Outline / Key Points (optional)"}),a.jsx(dn,{placeholder:`- Introduction to AI trends 729- Use cases in mobile apps 730- Future predictions`,value:r,onChange:p=>i(p.target.value),className:"mt-1.5 min-h-[100px]"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Category"}),a.jsxs(Mn,{value:s,onValueChange:o,children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsx(Pn,{children:NMe.map(p=>a.jsx(it,{value:p.value,children:p.label},p.value))})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Tone"}),a.jsxs(Mn,{value:l,onValueChange:c,children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"professional",children:"Professional"}),a.jsx(it,{value:"casual",children:"Casual"}),a.jsx(it,{value:"technical",children:"Technical"}),a.jsx(it,{value:"enthusiastic",children:"Enthusiastic"})]})]})]})]}),a.jsx(ae,{onClick:f,disabled:u,className:"w-full bg-gradient-to-r from-purple-500 to-indigo-600 hover:from-purple-600 hover:to-indigo-700",children:u?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating Draft..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Tr,{className:"w-4 h-4 mr-2"}),"Generate Complete Draft"]})})]})]})}const _Me=[{value:"tech-news",label:"Tech News"},{value:"app-reviews",label:"App Reviews"},{value:"tutorials",label:"Tutorials"},{value:"ai-ml",label:"AI & ML"},{value:"startups",label:"Startups"},{value:"gadgets",label:"Gadgets"},{value:"programming",label:"Programming"},{value:"cybersecurity",label:"Cybersecurity"}];function EMe(){const e=kc(),t=Ln(),[n,r]=T.useState(1),[i,s]=T.useState("paste"),[o,l]=T.useState(null),[c,u]=T.useState(""),[d,f]=T.useState(""),[p,m]=T.useState(!1),[x,y]=T.useState(!1),[v,b]=T.useState({title:"",excerpt:"",content:"",category:"",tags:[],cover_image:""}),[w,N]=T.useState(""),[S,_]=T.useState([]),[E,k]=T.useState(""),[O,I]=T.useState(""),{data:A=[],isLoading:C,refetch:R}=st({queryKey:["gmail-emails"],queryFn:()=>ce.functions.getGmailEmails({maxResults:20}),enabled:i==="gmail"}),{data:D=[]}=st({queryKey:["usedEmails"],queryFn:()=>ce.entities.UsedEmail.list()}),q=D.map(L=>L.email_id),F=L=>L.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim(),H=L=>{const V=L.split(/\s+/).length;return Math.ceil(V/200)},U=()=>{o&&(f(o.subject),u(o.body||o.snippet))},W=async()=>{var L;if(i==="gmail"&&o&&U(),!!c.trim()){m(!0);try{const $=await ce.integrations.Core.InvokeLLM({prompt:`You are a tech blog writer. Transform this newsletter email into a professional, engaging tech blog post. 731 732EMAIL SUBJECT: ${d||"Newsletter"} 733 734EMAIL CONTENT: 735${c} 736 737Create a blog post with: 7381. A catchy, SEO-friendly title 7392. A compelling excerpt (2-3 sentences) 7403. Well-structured content in Markdown format with proper headings (##, ###), bullet points, and paragraphs 7414. Suggest the most appropriate category from: tech-news, app-reviews, tutorials, ai-ml, startups, gadgets, programming, cybersecurity 7425. Suggest 3-5 relevant tags 7436. Suggest 3 different search terms for finding relevant cover images (short, descriptive phrases that would work well for stock photo searches) 744 745Make the content informative, engaging, and suitable for a tech-savvy audience. Expand on the key points, add context, and make it valuable for readers.`,response_json_schema:{type:"object",properties:{title:{type:"string"},excerpt:{type:"string"},content:{type:"string"},category:{type:"string"},tags:{type:"array",items:{type:"string"}},image_search_terms:{type:"array",items:{type:"string"},description:"3 different search terms for cover images"}}}});b({title:$.title,excerpt:$.excerpt,content:$.content,category:$.category,tags:$.tags||[],cover_image:"https://images.unsplash.com/photo-1518770660439-4636190af475?w=1200&q=80"}),N(((L=$.tags)==null?void 0:L.join(", "))||""),_($.image_search_terms||["technology","tech news","innovation"]),r(2)}catch($){console.error("Generation failed:",$)}finally{m(!1)}}},G=async(L="draft")=>{y(!0);try{const $=F(v.title),V=H(v.content);let z="draft",Q=null,J=null;if(L==="publish")z="published",Q=new Date().toISOString();else if(L==="schedule"){if(!E||!O){alert("Please select both date and time for scheduling"),y(!1);return}z="scheduled",J=new Date(`${E}T${O}`).toISOString()}const Y={...v,slug:$,reading_time:V,status:z,source_email_subject:d,tags:w.split(",").map(ne=>
745ne.trim()).filter(Boolean),published_date:Q,scheduled_date:J},X=await ce.entities.BlogPost.create(Y);i==="gmail"&&o?await ce.entities.UsedEmail.create({email_id:o.id,subject:o.subject,from:o.from,date:o.date,blog_post_id:X.id}):d&&await ce.entities.UsedEmail.create({email_id:`manual-${Date.now()}`,subject:d,from:"Manual Entry",date:new Date().toISOString(),blog_post_id:X.id}),t.invalidateQueries({queryKey:["usedEmails"]}),e(Xe("Posts"))}catch($){console.error("Save failed:",$)}finally{y(!1)}};return a.jsxs("div",{className:"max-w-5xl mx-auto",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-8",children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Create New Post"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Transform newsletter emails into polished blog posts"})]}),a.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[a.jsxs("div",{className:`flex items-center gap-2 ${n>=1?"text-indigo-600":"text-slate-400"}`,children:[a.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${n>=1?"bg-indigo-600 text-white":"bg-slate-200"}`,children:"1"}),a.jsx("span",{className:"hidden sm:inline font-medium",children:"Paste Email"})]}),a.jsx("div",{className:`flex-1 h-0.5 ${n>=2?"bg-indigo-600":"bg-slate-200"}`}),a.jsxs("div",{className:`flex items-center gap-2 ${n>=2?"text-indigo-600":"text-slate-400"}`,children:[a.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${n>=2?"bg-indigo-600 text-white":"bg-slate-200"}`,children:"2"}),a.jsx("span",{className:"hidden sm:inline font-medium",children:"Edit & Publish"})]})]}),a.jsxs(hi,{mode:"wait",children:[n===1&&a.jsx(Pe.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},children:a.jsxs(ur,{value:i,onValueChange:s,className:"space-y-6",children:[a.jsxs(Jn,{className:"grid w-full grid-cols-3 bg-slate-100",children:[a.jsxs(et,{value:"ai",className:"gap-2",children:[a.jsx(Tr,{className:"w-4 h-4"})," AI Draft"]}),a.jsxs(et,{value:"paste",className:"gap-2",children:[a.jsx(os,{className:"w-4 h-4"})," Paste"]}),a.jsxs(et,{value:"gmail",className:"gap-2",children:[a.jsx(eI,{className:"w-4 h-4"})," Gmail"]})]}),a.jsx(ht,{value:"ai",children:a.jsx(SK,{onDraftGenerated:L=>{var $;b(L),N((($=L.tags)==null?void 0:$.join(", "))||""),r(2)}})}),a.jsx(ht,{value:"paste",children:a.jsxs(de,{className:"border-slate-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(xr,{className:"w-5 h-5 text-indigo-600"}),"Paste Newsletter Content"]}),a.jsx(mn,{children:"Copy and paste the email content you want to transform into a blog post"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"subject",children:"Email Subject (optional)"}),a.jsx(Ye,{id:"subject",placeholder:"e.g., This Week in Tech: AI Breakthroughs",value:d,onChange:L=>f(L.target.value),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"content",children:"Email Content *"}),a.jsx(dn,{id:"content",placeholder:"Paste the full email content here...",value:c,onChange:L=>u(L.target.value),className:"mt-1.5 min-h-[300px] font-mono text-sm"})]}),a.jsx(ae,{onClick:W,disabled:!c.trim()||p,className:"w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:p?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Generating Post..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Tr,{className:"w-4 h-4"}),"Generate Blog Post"]})})]})]})}),a.jsx(ht,{value:"gmail",children:a.jsxs(de,{className:"border-slate-200",children:[a.jsx(Re,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(eI,{className:"w-5 h-5 text-red-500"}),"Import from Gmail"]}),a.jsx(mn,{children:"Select a newsletter email from your Gmail inbox"})]}),a.jsxs(ae,{variant:"outline",size:"sm",onClick:()=>R(),disabled:C,className:"gap-2",children:[a.jsx(ss,{className:`w-4 h-4 ${C?"animate-spin":""}`}),"Refresh"]})]})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs(jr,{className:"border-blue-200 bg-blue-50",children:[a.jsx(Q_,{className:"h-4 w-4 text-blue-600"}),a.jsx(Sr,{className:"text-blue-700",children:'Gmail connector requires custom setup. The email import feature will be available once the Gmail OAuth connector is configured. For now, use the "Paste Content" tab to manually paste newsletter content.'})]}),a.jsx(wMe,{emails:A.success?A.emails:[],loading:C,selectedEmail:o,onSelectEmail:l,usedEmailIds:q}),o&&a.jsx(ae,{onClick:W,disabled:p,className:"w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:p?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Generating Post..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Tr,{className:"w-4 h-4"}),"Generate Blog Post from Selected Email"]})})]})]})})]})},"step1"),n===2&&a.jsx(Pe.div,{initial:{opacity:0,x:20}
745,animate:{opacity:1,x:0},exit:{opacity:0,x:-20},children:a.jsxs(ur,{defaultValue:"edit",className:"space-y-6",children:[a.jsxs(Jn,{className:"bg-slate-100",children:[a.jsxs(et,{value:"edit",className:"gap-2",children:[a.jsx(os,{className:"w-4 h-4"})," Edit"]}),a.jsxs(et,{value:"summaries",className:"gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"})," Summaries"]}),a.jsxs(et,{value:"preview",className:"gap-2",children:[a.jsx(Qn,{className:"w-4 h-4"})," Preview"]})]}),a.jsxs(ht,{value:"edit",className:"space-y-6",children:[a.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[a.jsx(de,{children:a.jsxs(he,{className:"pt-6 space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"title",children:"Title"}),a.jsx(Ye,{id:"title",value:v.title,onChange:L=>b({...v,title:L.target.value}),className:"mt-1.5 text-lg font-medium"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"excerpt",children:"Excerpt"}),a.jsx(dn,{id:"excerpt",value:v.excerpt,onChange:L=>b({...v,excerpt:L.target.value}),className:"mt-1.5",rows:3})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Category"}),a.jsxs(Mn,{value:v.category,onValueChange:L=>b({...v,category:L}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{placeholder:"Select category"})}),a.jsx(Pn,{children:_Me.map(L=>a.jsx(it,{value:L.value,children:L.label},L.value))})]})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"tags",children:"Tags"}),a.jsx(Ye,{id:"tags",value:w,onChange:L=>N(L.target.value),placeholder:"AI, Tech",className:"mt-1.5"})]})]}),a.jsx(jMe,{selectedImage:v.cover_image,onSelectImage:L=>b({...v,cover_image:L}),suggestedSearchTerms:S}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"content",children:"Content (Markdown)"}),a.jsx(dn,{id:"content",value:v.content,onChange:L=>b({...v,content:L.target.value}),className:"mt-1.5 min-h-[300px] font-mono text-sm"})]}),a.jsxs("div",{className:"border-t pt-4",children:[a.jsxs(De,{className:"flex items-center gap-2 mb-3",children:[a.jsx(Rn,{className:"w-4 h-4 text-indigo-600"}),"Schedule Publication (Optional)"]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsx("div",{children:a.jsx(Ye,{type:"date",value:E,onChange:L=>k(L.target.value),min:new Date().toISOString().split("T")[0],className:"text-sm"})}),a.jsx("div",{children:a.jsx(Ye,{type:"time",value:O,onChange:L=>I(L.target.value),className:"text-sm"})})]})]})]})}),a.jsxs(de,{className:"lg:sticky lg:top-4 lg:self-start",children:[a.jsx(Re,{className:"border-b",children:a.jsxs(Ie,{className:"text-sm font-medium flex items-center gap-2",children:[a.jsx(Qn,{className:"w-4 h-4"}),"Live Preview"]})}),a.jsxs(he,{className:"pt-6 max-h-[calc(100vh-12rem)] overflow-y-auto",children:[v.cover_image&&a.jsx("img",{src:v.cover_image,alt:v.title,className:"w-full h-32 object-cover rounded-lg mb-4"}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mb-2",children:v.title||"Untitled Post"}),v.excerpt&&a.jsx("p",{className:"text-slate-600 italic mb-4 text-sm",children:v.excerpt}),a.jsx("div",{className:"prose prose-sm prose-slate max-w-none",children:a.jsx(dx,{children:v.content||"*Start typing to see preview...*"})})]})]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[a.jsx(ae,{variant:"outline",onClick:()=>r(1),className:"sm:order-1",children:"â Back to Email"}),a.jsxs("div",{className:"flex-1 flex flex-wrap gap-2 sm:order-2 sm:justify-end",children:[a.jsxs(ae,{variant:"outline",onClick:()=>G("draft"),disabled:x,className:"gap-2",children:[x?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(s8,{className:"w-4 h-4"}),"Save Draft"]}),E&&O&&a.jsxs(ae,{variant:"outline",onClick:()=>G("schedule"),disabled:x,className:"gap-2 border-amber-300 text-amber-700 hover:bg-amber-50",children:[x?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(Yr,{className:"w-4 h-4"}),"Schedule"]}),a.jsxs(ae,{onClick:()=>G("publish"),disabled:x,className:"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:[x?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(ci,{className:"w-4 h-4"}),"Publish Now"]})]})]})]}),a.jsx(ht,{value:"summaries",children:a.jsx(SMe,{post:v,onSummaryGenerated:L=>b({...v,ai_summary:L})})}),a.jsx(ht,{value:"preview",children:a.jsxs(de,{className:"overflow-hidden",children:[v.cover_image&&a.jsx("div",{className:"h-64 overflow-hidden",children:a.jsx("img",{src:v.cover_image,alt:v.title,className:"w-full h-full object-cover"})}),a.jsxs(he,{className:"py-8 px-6 lg:px-12",children:[a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:v.title}),a.jsx("p",{className:"text-lg text-slate-600 mb-8 italic",children:v.excerpt}),a.jsx("div",{className:"prose prose-slate max-w-none",children:a.jsx(dx,{children:v.content})})]})]})})]})},"step2")]})]})}function hy({title:e,value:t,icon:n,color:r="indigo",delay:i=0}){const s={indigo:"bg-indigo-50 text-indigo-600",emerald:"bg-emerald-50 text-emerald-600",amber:"bg-amber-50 text-amber-600",rose:"bg-rose-50 text-rose-600"};return a.jsx(Pe.div,{initial:{opacity:0,y:20}
vendor: 6,639 bytes, lines 745-749
745,animate:{opacity:1,y:0},transition:{delay:i,duration:.4,ease:"easeOut"},className:"bg-white rounded-2xl p-6 border border-slate-100 shadow-sm hover:shadow-md transition-shadow duration-300",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-500 mb-1",children:e}),a.jsx("p",{className:"text-3xl font-semibold text-slate-900",children:t})]}),a.jsx("div",{className:`p-3 rounded-xl ${s[r]}`,children:a.jsx(n,{className:"w-6 h-6"})})]})})}var R0="Dialog",[NK]=ul(R0),[PMe,Ls]=NK(R0),_K=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,l=T.useRef(null),c=T.useRef(null),[u,d]=Ed({prop:r,defaultProp:i??!1,onChange:s,caller:R0});return a.jsx(PMe,{scope:t,triggerRef:l,contentRef:c,contentId:Ho(),titleId:Ho(),descriptionId:Ho(),open:u,onOpenChange:d,onOpenToggle:T.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};_K.displayName=R0;var EK="DialogTrigger",kMe=T.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ls(EK,n),s=gn(t,i.triggerRef);return a.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":C2(i.open),...r,ref:s,onClick:Mt(e.onClick,i.onOpenToggle)})});kMe.displayName=EK;var O2="DialogPortal",[OMe,PK]=NK(O2,{forceMount:void 0}),kK=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Ls(O2,t);return a.jsx(OMe,{scope:t,forceMount:n,children:T.Children.map(r,o=>a.jsx(vm,{present:n||s.open,children:a.jsx(c2,{asChild:!0,container:i,children:o})}))})};kK.displayName=O2;var fx="DialogOverlay",OK=T.forwardRef((e,t)=>{const n=PK(fx,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Ls(fx,e.__scopeDialog);return s.modal?a.jsx(vm,{present:r||s.open,children:a.jsx(CMe,{...i,ref:t})}):null});OK.displayName=fx;var AMe=Xu("DialogOverlay.RemoveScroll"),CMe=T.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ls(fx,n);return a.jsx(u2,{as:AMe,allowPinchZoom:!0,shards:[i.contentRef],children:a.jsx(Tt.div,{"data-state":C2(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Sc="DialogContent",AK=T.forwardRef((e,t)=>{const n=PK(Sc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Ls(Sc,e.__scopeDialog);return a.jsx(vm,{present:r||s.open,children:s.modal?a.jsx(TMe,{...i,ref:t}):a.jsx(RMe,{...i,ref:t})})});AK.displayName=Sc;var TMe=T.forwardRef((e,t)=>{const n=Ls(Sc,e.__scopeDialog),r=T.useRef(null),i=gn(t,n.contentRef,r);return T.useEffect(()=>{const s=r.current;if(s)return mH(s)},[]),a.jsx(CK,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Mt(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Mt(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&s.preventDefault()}),onFocusOutside:Mt(e.onFocusOutside,s=>s.preventDefault())})}),RMe=T.forwardRef((e,t)=>{const n=Ls(Sc,e.__scopeDialog),r=T.useRef(!1),i=T.useRef(!1);return a.jsx(CK,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,s),s.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),CK=T.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=e,l=Ls(Sc,n),c=T.useRef(null),u=gn(t,c);return qW(),a.jsxs(a.Fragment,{children:[a.jsx(e2,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:a.jsx(JA,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":C2(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(IMe,{titleId:l.titleId}),a.jsx(DMe,{contentRef:c,descriptionId:l.descriptionId})]})]})}),A2="DialogTitle",TK=T.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ls(A2,n);return a.jsx(Tt.h2,{id:i.titleId,...r,ref:t})});TK.displayName=A2;var RK="DialogDescription",IK=T.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ls(RK,n);return a.jsx(Tt.p,{id:i.descriptionId,...r,ref:t})});IK.displayName=RK;var MK="DialogClose",DK=T.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ls(MK,n);return a.jsx(Tt.button,{type:"button",...r,ref:t,onClick:Mt(e.onClick,()=>i.onOpenChange(!1))})});DK.displayName=MK;function C2(e){return e?"open":"closed"}var LK="DialogTitleWarning",[tBe,$K]=PEe(LK,{contentName:Sc,titleName:A2,docsSlug:"dialog"}),IMe=({titleId:e})=>{const t=$K(LK),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 746 747If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 748 749For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return T.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},MMe="DialogDescriptionWarning",DMe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$K(MMe).contentName}}.`;return T.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},LMe=_K,$Me=kK,BK=OK,FK=AK,qK=TK,zK=IK,BMe=DK;const UK=LMe,FMe=$Me,VK=T.forwardRef(({className:e,...t},n)=>a.jsx(BK,{ref:n,className:Ot("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}));VK.displayName=BK.displayName;const T2=T.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(FMe,{children:[a.jsx(VK,{}),a.jsxs(FK,{ref:r,className:Ot("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,a.jsxs(BMe,{className:"absolute right-4 top-4 roun
749ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[a.jsx(jx,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));T2.displayName=FK.displayName;const R2=({className:e,...t})=>a.jsx("div",{className:Ot("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});R2.displayName="DialogHeader";const I2=T.forwardRef(({className:e,...t},n)=>a.jsx(qK,{ref:n,className:Ot("text-lg font-semibold leading-none tracking-tight",e),...t}));I2.displayName=qK.displayName;const WK=T.forwardRef(({className:e,...t},n)=>a.jsx(zK,{ref:n,className:Ot("text-sm text-muted-foreground",e),...t}));WK.displayName=zK.displayName;function qMe({open:e,onOpenChange:t,post:n}){const[r,i]=T.useState(!1),[s,o]=T.useState({twitter:null,linkedin:null,newsletter:null,video:null}),[l,c]=T.useState(null),u=[{id:"twitter",label:"Twitter Thread",icon:Ku,color:"text-sky-500",description:"Engaging thread with hooks"},{id:"linkedin",label:"LinkedIn Post",icon:sc,color:"text-blue-600",description:"Professional long-form post"},{id:"newsletter",label:"Email Newsletter",icon:xr,color:"text-purple-600",description:"Email-friendly format"},{id:"video",label:"Video Script",icon:f8,color:"text-red-500",description:"Short video narration"}],d=async p=>{i(!0);const m={twitter:`Transform this blog post into an engaging Twitter thread (5-7 tweets, max 280 chars each). 750 751BLOG TITLE: ${n.title} 752BLOG CONTENT: ${n.content} 753 754Create a thread that: 755- Starts with a strong hook tweet 756- Breaks down key points into digestible tweets 757- Uses emojis strategically 758- Ends with a CTA 759- Numbers each tweet (e.g., "1/7", "2/7") 760 761Format as plain text with each tweet separated by a line break.`,linkedin:`Transform this blog post into a professional LinkedIn post (1500-2000 characters). 762 763BLOG TITLE: ${n.title} 764BLOG CONTENT: ${n.content} 765 766Create a LinkedIn post that: 767- Opens with a compelling hook or question 768- Shares valuable insights from the blog 769- Uses line breaks for readability 770- Includes 3-5 relevant hashtags at the end 771- Maintains professional tone 772- Encourages engagement 773 774Format as plain text ready to paste.`,newsletter:`Transform this blog post into an email newsletter section. 775 776BLOG TITLE: ${n.title} 777BLOG CONTENT: ${n.content} 778 779Create newsletter content with: 780- Catchy subject line suggestion 781- Engaging opening paragraph 782- Key highlights with bullet points 783- Call-to-action to read full blog 784- Conversational, friendly tone 785 786Format with clear sections.`,video:`Create a short video script (60-90 seconds) based on this blog post. 787 788BLOG TITLE: ${n.title} 789BLOG CONTENT: ${n.content} 790 791Create a video script with: 792- Hook (first 3 seconds) 793- Problem/Context 794- Key points (3-4 main takeaways) 795- Conclusion/CTA 796- Include [pause] markers for timing 797- Keep language conversational 798 799Format as a narrator script.`};try{const x=await ce.integrations.Core.InvokeLLM({prompt:m[p]});o(y=>({...y,[p]:x}))}catch(x){console.error("Generation failed:",x)}finally{i(!1)}},f=(p,m)=>{navigator.clipboard.writeText(p),c(m),setTimeout(()=>c(null),2e3)};return n?a.jsx(UK,{open:e,onOpenChange:t,children:a.jsxs(T2,{className:"max-w-4xl max-h-[85vh] overflow-y-auto",children:[a.jsxs(R2,{children:[a.jsxs(I2,{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"w-5 h-5 text-indigo-600"}),"Repurpose Content"]}),a.jsxs(WK,{children:['Transform "',n.title,'" into different formats for maximum reach']})]}),a.jsxs(ur,{defaultValue:"twitter",className:"mt-4",children:[a.jsx(Jn,{className:"grid w-full grid-cols-4 bg-slate-100",children:u.map(p=>{const m=p.icon;return a.jsxs(et,{value:p.id,className:"gap-1.5",children:[a.jsx(m,{className:`w-4 h-4 ${p.color}`}),a.jsx("span",{className:"hidden sm:inline",children:p.label.split(" ")[0]})]},p.id)})}),u.map(p=>{const m=p.icon;return a.jsx(ht,{value:p.id,className:"space-y-4",children:a.jsx(de,{className:"border-slate-200",children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-slate-100 flex items-center justify-center",children:a.jsx(m,{className:`w-5 h-5 ${p.color}`})}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-slate-900",children:p.label}),a.jsx("p",{className:"text-sm text-slate-500",children:p.description})]})]}),!s[p.id]&&a.jsx(ae,{onClick:()=>d(p.id),disabled:r,size:"sm",className:"gap-2",children:r?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Generating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"w-4 h-4"}),"Generate"]})})]}),a.jsx(hi,{children:s[p.id]&&a.jsxs(Pe.div,{initial:{opacity:0,y:20}
799,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"space-y-3",children:[a.jsx(dn,{value:s[p.id],onChange:x=>o(y=>({...y,[p.id]:x.target.value})),className:"min-h-[300px] font-mono text-sm"}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Se,{variant:"secondary",className:"text-xs",children:[s[p.id].length," characters"]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(ae,{variant:"outline",size:"sm",onClick:()=>d(p.id),disabled:r,className:"gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"}),"Regenerate"]}),a.jsx(ae,{size:"sm",onClick:()=>f(s[p.id],p.id),className:"gap-2",children:l===p.id?a.jsxs(a.Fragment,{children:[a.jsx(Cn,{className:"w-4 h-4"}),"Copied!"]}):a.jsxs(a.Fragment,{children:[a.jsx(or,{className:"w-4 h-4"}),"Copy"]})})]})]})]})}),!s[p.id]&&!r&&a.jsxs("div",{className:"text-center py-12 text-slate-400",children:[a.jsx(li,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),a.jsxs("p",{className:"text-sm",children:['Click "Generate" to create ',p.label.toLowerCase()]})]})]})})},p.id)})]})]})}):null}const zMe={"tech-news":"bg-blue-100 text-blue-700","app-reviews":"bg-purple-100 text-purple-700",tutorials:"bg-green-100 text-green-700","ai-ml":"bg-pink-100 text-pink-700",startups:"bg-orange-100 text-orange-700",gadgets:"bg-cyan-100 text-cyan-700",programming:"bg-indigo-100 text-indigo-700",cybersecurity:"bg-red-100 text-red-700"};function HK({post:e,onDelete:t,delay:n=0}){const[r,i]=T.useState(!1),{canEditPost:s,canDeletePost:o,isAdmin:l,loading:c}=pl(),u=kc(),d=c?!0:l||s(e),f=m=>{m.preventDefault(),m.stopPropagation(),u(`/PostEditor?id=${e.id}`)},p=m=>{m.preventDefault(),m.stopPropagation(),window.confirm("Are you sure you want to delete this post?")&&t(e.id)};return a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:n,duration:.4},className:"group bg-white rounded-2xl border border-slate-100 overflow-hidden hover:shadow-lg transition-all duration-300",children:[e.cover_image&&a.jsx("div",{className:"h-40 overflow-hidden",children:a.jsx("img",{src:e.cover_image,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),a.jsxs("div",{className:"p-5",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.category&&a.jsx(Se,{className:`${zMe[e.category]} border-0 text-xs font-medium`,children:e.category.replace("-"," ")}),a.jsx(Se,{variant:"outline",className:e.status==="published"?"border-emerald-200 text-emerald-700 bg-emerald-50":e.status==="pending_review"?"border-amber-200 text-amber-700 bg-amber-50":"border-slate-200 text-slate-700 bg-slate-50",children:e.status.replace("_"," ")})]}),a.jsx("h3",{className:"font-semibold text-lg text-slate-900 mb-2 line-clamp-2 group-hover:text-indigo-600 transition-colors",children:e.title}),e.excerpt&&a.jsx("p",{className:"text-sm text-slate-500 line-clamp-2 mb-4",children:e.excerpt}),a.jsxs("div",{className:"flex items-center text-xs text-slate-400 gap-4 mb-4",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Yr,{className:"w-3.5 h-3.5"}),Jt(new Date(e.created_date),"MMM d, yyyy")]}),e.reading_time&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Rn,{className:"w-3.5 h-3.5"}),e.reading_time," min read"]})]}),a.jsxs("div",{className:"flex items-center gap-2 pt-3 border-t border-slate-100",children:[a.jsxs(ae,{variant:"outline",size:"sm",className:"flex-1 gap-2",onClick:f,disabled:!d,children:[a.jsx(r8,{className:"w-3.5 h-3.5"})," Edit"]}),e.status==="published"&&e.slug&&a.jsxs(a.Fragment,{children:[a.jsx(ft,{to:Xe("BlogPost")+`?slug=${e.slug}`,target:"_blank",children:a.jsx(ae,{variant:"outline",size:"sm",className:"gap-2",children:a.jsx(Gu,{className:"w-3.5 h-3.5"})})}),a.jsx(ae,{variant:"outline",size:"sm",onClick:m=>{m.preventDefault(),m.stopPropagation(),i(!0)},className:"gap-2 border-indigo-200 text-indigo-600 hover:bg-indigo-50",children:a.jsx(Ad,{className:"w-3.5 h-3.5"})})]}),o(e)&&a.jsx(ae,{variant:"outline",size:"sm",onClick:p,className:"text-red-500 hover:text-red-600 hover:bg-red-50",children:a.jsx(qa,{className:"w-3.5 h-3.5"})})]})]}),a.jsx(qMe,{open:r,onOpenChange:i,post:e})]})}function UMe(){const[e,t]=T.useState(!1),[n,r]=T.useState(0),[i,s]=T.useState(null),o=async()=>{t(!0),r(0),s(null);try{const l=setInterval(()=>{r(u=>Math.min(u+5,90))},1e3),c=await ce.functions.generateTechArticles({count:30});clearInterval(l),r(100),s(c)}catch(l){console.error("Generation failed:",l),s({success:!1,error:l.message||"Failed to generate articles"})}finally{t(!1)}};return a.jsxs(de,{className:"border-indigo-200 bg-gradient-to-br from-indigo-50/50 to-purple-50/50",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(zh,{className:"w-5 h-5 text-indigo-600"}),"Content Generator"]}),a.jsx(mn,{children:"Generate 30 AdSense-compliant tech articles"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{className:"p-4 bg-white rounded-lg border border-indigo-100",children:[a.jsx("h4",{className:"text-sm font-semibold text-slate-900 mb-2",children:"What gets generated:"}),a.jsxs("ul",{className:"text-sm text-slate-600 space-y-1",children:[a.jsx("li",{children:"⢠30 original tech news articles (800-1,000 words)"}
799),a.jsx("li",{children:"⢠SEO-optimized with meta descriptions"}),a.jsx("li",{children:"⢠Neutral, journalistic tone"}),a.jsx("li",{children:"⢠Spread across 60-day timeframe"}),a.jsx("li",{children:"⢠AdSense & Adsterra compliant"})]})]}),e&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-slate-600",children:"Generating articles..."}),a.jsxs("span",{className:"font-semibold text-indigo-600",children:[n,"%"]})]}),a.jsx(cs,{value:n,className:"h-2"})]}),a.jsx(hi,{children:i&&a.jsx(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},children:i.success?a.jsxs(jr,{className:"border-emerald-200 bg-emerald-50",children:[a.jsx(Cn,{className:"h-4 w-4 text-emerald-600"}),a.jsxs(Sr,{className:"text-emerald-800",children:[a.jsx("strong",{children:"Success!"})," Generated ",i.generated_count," articles. Check your blog to see them live."]})]}):a.jsxs(jr,{className:"border-red-200 bg-red-50",children:[a.jsx(Kr,{className:"h-4 w-4 text-red-600"}),a.jsxs(Sr,{className:"text-red-800",children:[a.jsx("strong",{children:"Error:"})," ",i.error]})]})})}),a.jsx(ae,{onClick:o,disabled:e,className:"w-full gap-2 bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700",children:e?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Generating Articles..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"w-4 h-4"}
799),"Generate 30 Articles"]})}),a.jsx("p",{className:"text-xs text-slate-500 text-center",children:"This process takes approximately 1-2 minutes"})]})]})}function VMe(){const{data:e=[]}=st({queryKey:["polls-all"],queryFn:()=>ce.entities.Poll.list("-created_date",50),refetchInterval:1e4}),{data:t=[]}=st({queryKey:["posts-poll-dash"],queryFn:()=>ce.entities.BlogPost.list("-created_date",100)}),n=e.reduce((s,o)=>s+(o.total_votes||0),0),r=e.filter(s=>s.is_active).length,i=s=>{var o;return((o=t.find(l=>l.id===s))==null?void 0:o.title)||"Unknown post"};return a.jsxs("div",{className:"space-y-6",children:[a.jsx("div",{className:"grid grid-cols-3 gap-4",children:[{label:"Total Polls",value:e.length,icon:Fa,color:"indigo"},{label:"Active Polls",value:r,icon:Xr,color:"emerald"},{label:"Total Votes",value:n,icon:Is,color:"purple"}].map(s=>a.jsx(de,{children:a.jsx(he,{className:"pt-4 pb-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:`w-8 h-8 rounded-lg bg-${s.color}-100 flex items-center justify-center`,children:a.jsx(s.icon,{className:`w-4 h-4 text-${s.color}-600`})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-slate-500",children:s.label}),a.jsx("p",{className:"text-xl font-bold text-slate-900",children:s.value})]})]})})},s.label))}),a.jsxs("div",{className:"space-y-4",children:[e.length===0&&a.jsxs(de,{className:"p-10 text-center",children:[a.jsx(Fa,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),a.jsx("p",{className:"text-slate-500",children:"No polls created yet"})]}),e.map((s,o)=>{var u;const l=((u=s.options)==null?void 0:u.reduce((d,f)=>d+(f.votes||0),0))||0,c=[...s.options||[]].sort((d,f)=>(f.votes||0)-(d.votes||0));return a.jsx(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:o*.05},children:a.jsxs(de,{children:[a.jsx(Re,{className:"pb-2",children:a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx(Ie,{className:"text-sm",children:s.question}),a.jsx(mn,{className:"text-xs mt-1 line-clamp-1",children:i(s.post_id)})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[a.jsx(Se,{className:s.is_active?"bg-emerald-100 text-emerald-700":"bg-slate-100 text-slate-500",children:s.is_active?"Active":"Inactive"}),a.jsxs("span",{className:"text-xs text-slate-500 font-medium",children:[l," votes"]})]})]})}),a.jsxs(he,{className:"space-y-2",children:[c.map(d=>{var m;const f=l>0?Math.round((d.votes||0)/l*100):0,p=d.id===((m=c[0])==null?void 0:m.id)&&(d.votes||0)>0;return a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsxs("span",{className:"text-xs font-medium text-slate-700 flex items-center gap-1.5",children:[p&&a.jsx("span",{className:"text-amber-500",children:"ð"}),d.text]}),a.jsxs("span",{className:"text-xs text-slate-500",children:[d.votes||0," (",f,"%)"]})]}),a.jsx(cs,{value:f,className:"h-2"})]},d.id)}),l===0&&a.jsx("p",{className:"text-xs text-slate-400 text-center py-2",children:"No votes yet"})]})]})},s.id)})]})]})}function WMe(){const e=Ln(),{data:t=[],isLoading:n}=st({queryKey:["posts"],queryFn:()=>ce.entities.BlogPost.list("-created_date",50)}),{data:r=[]}=st({queryKey:["usedEmails"],queryFn:()=>ce.entities.UsedEmail.list()}),i=wr({mutationFn:c=>ce.entities.BlogPost.delete(c),onSuccess:()=>e.invalidateQueries({queryKey:["posts"]})}),s=t.filter(c=>c.status==="draft"),o=t.filter(c=>c.status==="published"),l=t.slice(0,4);return a.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Dashboard"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Welcome back! Here's your content overview."})]}),a.jsx(ft,{to:Xe("CreatePost"),children:a.jsxs(ae,{className:"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 text-white shadow-lg shadow-indigo-500/25 gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"}),"Create New Post"]})})]}),a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[a.jsx(hy,{title:"Total Posts",value:n?"-":t.length,icon:os,color:"indigo",delay:0}),a.jsx(hy,{title:"Published",value:n?"-":o.length,icon:ci,color:"emerald",delay:.1}),a.jsx(hy,{title:"Drafts",value:n?"-":s.length,icon:J_,color:"amber",delay:.2}),a.jsx(hy,{title:"Emails Used",value:r.length,icon:xr,color:"rose",delay:.3})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-6",children:[a.jsx("h2",{className:"text-xl font-semibold text-slate-900",children:"Recent Posts"}),a.jsxs(ft,{to:Xe("Posts"),className:"text-indigo-600 hover:text-indigo-700 text-sm font-medium flex items-center gap-1",children:["View all ",a.jsx(Sh,{className:"w-4 h-4"})]})]}),n?a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-
7995",children:[...Array(4)].map((c,u)=>a.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 p-5",children:[a.jsx(Dt,{className:"h-40 w-full rounded-xl mb-4"}),a.jsx(Dt,{className:"h-4 w-20 mb-3"}),a.jsx(Dt,{className:"h-6 w-full mb-2"}),a.jsx(Dt,{className:"h-4 w-3/4"})]},u))}):l.length>0?a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-5",children:l.map((c,u)=>a.jsx(HK,{post:c,onDelete:d=>i.mutate(d),delay:u*.1},c.id))}):a.jsxs(Pe.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-white rounded-2xl border border-slate-100 p-12 text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-indigo-50 rounded-2xl flex items-center justify-center mx-auto mb-4",children:a.jsx(J_,{className:"w-8 h-8 text-indigo-500"})}),a.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"No posts yet"}),a.jsx("p",{className:"text-slate-500 mb-6",children:"Create your first blog post from a newsletter email"}),a.jsx(ft,{to:Xe("CreatePost"),children:a.jsx(ae,{className:"bg-indigo-600 hover:bg-indigo-700",children:"Create Your First Post"})})]})]}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-4",children:"Poll Results"}),a.jsx(VMe,{})]}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},children:a.jsx(UMe,{})}),a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.6},className:"bg-gradient-to-br from-indigo-500 to-purple-600 rounded-2xl p-6 lg:p-8 text-white h-full flex flex-col justify-center",children:[a.jsx("h3",{className:"text-lg font-semibold mb-3",children:"ð¡ Quick Tip"}),a.jsx("p",{className:"text-indigo-100 leading-relaxed",children:"Paste any newsletter email content into the Create Post page, and our AI will instantly transform it into a polished tech blog post. You can edit, add images, and publish with SEO-friendly URLs!"})]})]})]})}var I0="Switch",[HMe]=ul(I0),[GMe,KMe]=HMe(I0),GK=T.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:s,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...f}=e,[p,m]=T.useState(null),x=gn(t,N=>m(N)),y=T.useRef(!1),v=p?d||!!p.closest("form"):!0,[b,w]=Ed({prop:i,defaultProp:s??!1,onChange:u,caller:I0});return a.jsxs(GMe,{scope:n,checked:b,disabled:l,children:[a.jsx(Tt.button,{type:"button",role:"switch","aria-checked":b,"aria-required":o,"data-state":QK(b),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:x,onClick:Mt(e.onClick,N=>{w(S=>!S),v&&(y.current=N.isPropagationStopped(),y.current||N.stopPropagation())})}),v&&a.jsx(XK,{control:p,bubbles:!y.current,name:r,value:c,checked:b,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});GK.displayName=I0;var KK="SwitchThumb",YK=T.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=KMe(KK,n);return a.jsx(Tt.span,{"data-state":QK(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});YK.displayName=KK;var YMe="SwitchBubbleInput",XK=T.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},s)=>{const o=T.useRef(null),l=gn(o,s),c=fH(n),u=tH(t);return T.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==n&&m){const x=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(x)}},[c,n,r]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:l,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});XK.displayName=YMe;function QK(e){return e?"checked":"unchecked"}var ZK=GK,XMe=YK;const Xa=T.forwardRef(({className:e,...t},n)=>a.jsx(ZK,{className:Ot("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:a.jsx(XMe,{className:Ot("pointer-events-none block h-4 w-4 roun
799ded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Xa.displayName=ZK.displayName;function QMe(){const{canManageSettings:e}=pl(),[t,n]=T.useState(null),[r,i]=T.useState(!1),[s,o]=T.useState(null),l=Ln(),{data:c=[]}=st({queryKey:["digest-settings"],queryFn:()=>ce.entities.DigestSettings.list()}),{data:u=[]}=st({queryKey:["subscribers"],queryFn:()=>ce.entities.Subscriber.list()});T.useEffect(()=>{c.length>0?n(c[0]):n({enabled:!1,default_frequency:"weekly",digest_type:"recent",posts_per_digest:5,send_time:"09:00",from_name:"TechBlog"})},[c]);const d=async()=>{i(!0);try{t.id?await ce.entities.DigestSettings.update(t.id,t):await ce.entities.DigestSettings.create(t),l.invalidateQueries({queryKey:["digest-settings"]})}catch{alert("Failed to save settings")}finally{i(!1)}},f=async x=>{o(x);try{const y=await ce.functions.sendEmailDigest({frequency:x});alert(y.message||`Sent ${y.sent} digests`)}catch(y){alert("Failed to send digest: "+y.message)}finally{o(null)}};if(!e)return a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsxs(jr,{variant:"destructive",children:[a.jsx(Kr,{className:"h-4 w-4"}),a.jsx(Sr,{children:"You don't have permission to manage digest settings."})]})});if(!t)return a.jsx("div",{className:"max-w-5xl mx-auto p-8",children:"Loading..."});const p=u.filter(x=>x.status==="active"),m={daily:p.filter(x=>{var y;return((y=x.preferences)==null?void 0:y.digest_frequency)==="daily"}).length,weekly:p.filter(x=>{var y;return((y=x.preferences)==null?void 0:y.digest_frequency)==="weekly"}).length,monthly:p.filter(x=>{var y;return((y=x.preferences)==null?void 0:y.digest_frequency)==="monthly"}).length};return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3",children:[a.jsx(xr,{className:"w-8 h-8 text-indigo-600"}),"Email Digest Settings"]}),a.jsx("p",{className:"text-slate-600 mt-2",children:"Configure automated email digests for your subscribers"})]}),a.jsxs(ur,{defaultValue:"settings",className:"space-y-6",children:[a.jsxs(Jn,{className:"bg-slate-100",children:[a.jsxs(et,{value:"settings",className:"gap-2",children:[a.jsx(Uy,{className:"w-4 h-4"}),"Settings"]}),a.jsxs(et,{value:"subscribers",className:"gap-2",children:[a.jsx(Is,{className:"w-4 h-4"}),"Subscribers (",p.length,")"]})]}),a.jsxs(ht,{value:"settings",className:"space-y-6",children:[a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsx(Ie,{children:"Digest Configuration"}),a.jsx(mn,{children:"Control how and when email digests are sent to subscribers"})]}),a.jsxs(he,{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-lg",children:[a.jsxs("div",{children:[a.jsx(De,{className:"text-base font-semibold",children:"Enable Email Digests"}),a.jsx("p",{className:"text-sm text-slate-500",children:"Automatically send email digests"})]}),a.jsx(Xa,{checked:t.enabled,onCheckedChange:x=>n({...t,enabled:x})})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Default Frequency"}),a.jsxs(Mn,{value:t.default_frequency,onValueChange:x=>n({...t,default_frequency:x}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"daily",children:"Daily"}),a.jsx(it,{value:"weekly",children:"Weekly"}),a.jsx(it,{value:"monthly",children:"Monthly"})]})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Digest Type"}),a.jsxs(Mn,{value:t.digest_type,onValueChange:x=>n({...t,digest_type:x}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"recent",children:"Recent Posts"}),a.jsx(it,{value:"popular",children:"Popular Posts"}),a.jsx(it,{value:"both",children:"Both"})]})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Posts Per Digest"}),a.jsx(Ye,{type:"number",min:"1",max:"10",value:t.posts_per_digest,onChange:x=>n({...t,posts_per_digest:parseInt(x.target.value)}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Send Time (24hr)"}),a.jsx(Ye,{type:"time",value:t.send_time,onChange:x=>n({...t,send_time:x.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"From Name"}),a.jsx(Ye,{value:t.from_name,onChange:x=>n({...t,from_name:x.target.value}),className:"mt-1.5"})]})]}),a.jsxs(ae,{onClick:d,disabled:r,className:"w-full",children:[r?a.jsx(lt,{className:"w-4 h-4 animate-spin mr-2"}):a.jsx(Cn,{className:"w-4 h-4 mr-2"}),"Save Settings"]})]})]}),a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsx(Ie,{children:"Send Test Digest"}),a.jsx(mn,{children:"Manually trigger digest emails for testing"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[a.jsxs(ae,{variant:"outline",onClick:()=>f("daily"),disabled:s==="daily",className:"gap-2",children:[s==="daily"?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(ci,{className:"w-4 h-4"}),"Daily (",m.daily,")"]}),a.jsxs(ae,{variant:"outline",onClick:()=>f("weekly"),disabled:s==="weekly",className:"gap-2",children:[s==="weekly"?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(ci,{className:"w-4 h-4"}),"Weekly (",m.weekly,")"]}),a.jsxs(ae,{variant:"outline",onClick:()=>f("monthly"),disabled:s==="monthly",className:"gap-2",children:[s==="monthly"?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(ci,{className:"w-4 h-4"}),"Monthly (",m.monthly,")"]})]}),t.last_daily_sent&&a.jsxs("p",{className:"text-xs text-slate-500",children:["Last daily: ",Jt(new Date(t.last_daily_sent),"MMM d, yyyy HH:mm")]}),t.last_weekly_sent&&a.jsxs("p",{className:"text-xs text-slate-500",children:["Last weekly: ",Jt(new Date(t.last_weekly_sent),"MMM d, yyyy HH:mm")]})]})]})]}),a.jsx(ht,{value:"subscribers",className:"space-y-4",children:a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx(Ie,{children:"Subscriber Management"}),a.jsx(mn,{children:"View and manage email subscribers"})]}),a.jsxs(Se,{variant:"secondary",className:"text-lg px-3 py-1",children:[p.length," active"]})]})}),a.jsx(he,{children:a.jsxs("div",{className:"space-y-3",children:[u.map(x=>{var y,v,b;return a.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between p-4 bg-slate-50 rounded-lg gap-3",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium text-slate-900",children:x.full_name||x.email}),a.jsx("p",{className:"text-sm text-slate-500",children:x.email}),((v=(y=x.preferences)==null?void 0:y.categories)==null?void 0:v.length)>0&&a.jsxs("div",{className:"flex flex-wrap gap-1 mt-2",children:[x.preferences.categories.slice(0,3).map(w=>a.jsx(Se,{variant:"outline",className:"text-xs",children:w}
799,w)),x.preferences.categories.length>3&&a.jsxs(Se,{variant:"outline",className:"text-xs",children:["+",x.preferences.categories.length-3]})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Se,{variant:x.status==="active"?"default":"secondary",children:x.status}),a.jsx(Se,{variant:"outline",children:((b=x.preferences)==null?void 0:b.digest_frequency)||"weekly"})]})]},x.id)}),u.length===0&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No subscribers yet"})]})})]})})]})]})}const ZMe=[{value:"all",label:"All Topics"},{value:"tech-news",label:"Tech News"},{value:"ai-ml",label:"AI & ML"},{value:"programming",label:"Programming"},{value:"tutorials",label:"Tutorials"},{value:"general",label:"General"}];function JMe(){const[e,t]=T.useState("all"),[n,r]=T.useState("");Ln();const{data:i=[],isLoading:s}=st({queryKey:["forum"],queryFn:()=>ce.entities.Forum.list("-created_date",100)}),o=wr({mutationFn:({id:u,views:d})=>ce.entities.Forum.update(u,{views:d+1})}),l=i.filter(u=>{const d=e==="all"||u.category===e,f=!n||u.title.toLowerCase().includes(n.toLowerCase())||u.content.toLowerCase().includes(n.toLowerCase());return d&&f}),c=u=>{o.mutate({id:u.id,views:u.views||0})};return a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx("header",{className:"sticky top-0 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[a.jsxs(ft,{to:Xe("Blog"),className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center",children:a.jsx(li,{className:"w-5 h-5 text-white"})}),a.jsx("span",{className:"font-bold text-xl text-slate-900",children:"Community Forum"})]}),a.jsx(ft,{to:Xe("ForumCreate"),children:a.jsxs(ae,{className:"bg-indigo-600 hover:bg-indigo-700 gap-2",children:[a.jsx(Yo,{className:"w-4 h-4"}),"New Discussion"]})})]})}),a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-2",children:"Community Discussions"}),a.jsx("p",{className:"text-slate-600",children:"Ask questions, share knowledge, and connect with the tech community"})]}),a.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-6",children:[a.jsxs("div",{className:"flex-1 relative",children:[a.jsx(lr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),a.jsx(Ye,{placeholder:"Search discussions...",value:n,onChange:u=>r(u.target.value),className:"pl-9"})]}),a.jsx(ur,{value:e,onValueChange:t,children:a.jsx(Jn,{children:ZMe.map(u=>a.jsx(et,{value:u.value,children:u.label},u.value))})})]}),a.jsxs("div",{className:"space-y-3",children:[l.map((u,d)=>a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:d*.05},children:a.jsx(ft,{to:Xe("ForumThread")+`?id=${u.id}`,children:a.jsx(de,{className:"hover:shadow-lg transition-shadow cursor-pointer",onClick:()=>c(u),children:a.jsx(he,{className:"p-5",children:a.jsx("div",{className:"flex items-start justify-between gap-4",children:a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Se,{className:u.status==="answered"?"bg-emerald-100 text-emerald-700":u.status==="closed"?"bg-slate-100 text-slate-700":"bg-blue-100 text-blue-700",children:u.status}),a.jsx(Se,{variant:"outline",children:u.category})]}),a.jsx("h3",{className:"font-semibold text-lg text-slate-900 mb-2 hover:text-indigo-600 transition-colors",children:u.title}),a.jsx("p",{className:"text-sm text-slate-600 line-clamp-2 mb-3",children:u.content}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(li,{className:"w-3 h-3"}),u.reply_count||0," replies"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Qn,{className:"w-3 h-3"}),u.views||0," views"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Rn,{className:"w-3 h-3"}
799),Jt(new Date(u.created_date),"MMM d, yyyy")]}),a.jsxs("span",{children:["by ",u.author_name]})]})]})})})})})},u.id)),l.length===0&&!s&&a.jsxs(de,{className:"p-12 text-center",children:[a.jsx(li,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),a.jsx("p",{className:"text-slate-500",children:"No discussions found. Start a new one!"})]})]})]})]})}const eDe=[{value:"tech-news",label:"Tech News"},{value:"app-reviews",label:"App Reviews"},{value:"tutorials",label:"Tutorials"},{value:"ai-ml",label:"AI & ML"},{value:"programming",label:"Programming"},{value:"general",label:"General"}];function tDe(){const e=kc(),[t,n]=T.useState(null),[r,i]=T.useState(!1),[s,o]=T.useState({title:"",content:"",category:"general",author_name:"",author_email:"",tags:""});T.useEffect(()=>{ce.auth.me().then(c=>{n(c),o(u=>({...u,author_name:c.full_name||"",author_email:c.email||""}))}).catch(()=>n(null))},[]);const l=async c=>{if(c.preventDefault(),!s.title.trim()||!s.content.trim()){we.error("Title and content are required");return}i(!0);try{const u=await ce.entities.Forum.create({...s,tags:s.tags.split(",").map(d=>d.trim()).filter(Boolean),status:"open",views:0,reply_count:0});we.success("Discussion created!"),e(Xe("ForumThread")+`?id=${u.id}`)}catch(u){we.error("Failed to create discussion"),console.error(u)}finally{i(!1)}};return a.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:a.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-8",children:[a.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[a.jsx(ae,{variant:"ghost",size:"icon",onClick:()=>e(Xe("Forum")),children:a.jsx(rl,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Start a Discussion"}),a.jsx("p",{className:"text-slate-500 text-sm",children:"Ask a question or start a conversation"})]})]}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("form",{onSubmit:l,className:"space-y-4",children:[!t&&a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Your Name"}),a.jsx(Ye,{value:s.author_name,onChange:c=>o({...s,author_name:c.target.value}),required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Your Email"}),a.jsx(Ye,{type:"email",value:s.author_email,onChange:c=>o({...s,author_email:c.target.value}),required:!0,className:"mt-1.5"})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Title"}),a.jsx(Ye,{placeholder:"What's your question or topic?",value:s.title,onChange:c=>o({...s,title:c.target.value}),required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Category"}),a.jsxs(Mn,{value:s.category,onValueChange:c=>o({...s,category:c}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsx(Pn,{children:eDe.map(c=>a.jsx(it,{value:c.value,children:c.label},c.value))})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Tags (comma-separated)"}),a.jsx(Ye,{placeholder:"javascript, react, tutorial",value:s.tags,onChange:c=>o({...s,tags:c.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Description"}),a.jsx(dn,{placeholder:"Provide details about your question or topic...",value:s.content,onChange:c=>o({...s,content:c.target.value}),required:!0,className:"mt-1.5 min-h-[200px]"})]}),a.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[a.jsx(ae,{type:"button",variant:"outline",onClick:()=>e(Xe("Forum")),children:"Cancel"}),a.jsx(ae,{type:"submit",disabled:r,className:"bg-indigo-600 hover:bg-indigo-700 gap-2",children:r?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Creating..."]}):a.jsxs(a.Fragment,{children:[a.jsx(ci,{className:"w-4 h-4"}),"Create Discussion"]})})]})]})})})]})})}function nDe(){var b;const e=kc(),n=new URLSearchParams(window.location.search).get("id"),[r,i]=T.useState(null),[s,o]=T.useState(""),[l,c]=T.useState(""),[u,d]=T.useState(""),f=Ln();T.useEffect(()=>{ce.auth.me().then(w=>{i(w),o(w.full_name||""),c(w.email||"")}).catch(()=>i(null))},[]);const{data:p,isLoading:m}=st({queryKey:["forum",n],queryFn:async()=>(await ce.entities.Forum.filter({id:n}))[0],enabled:!!n}),{data:x=[]}=st({queryKey:["forum-replies",n],queryFn:()=>ce.entities.ForumReply.filter({forum_id:n},"-created_date",100),enabled:!!n}),y=wr({mutationFn:w=>ce.entities.ForumReply.create(w),onSuccess:async()=>{await ce.entities.Forum.update(n,{reply_count:((p==null?void 0:p.reply_count)||0)+1}),f.invalidateQueries({queryKey:["forum-replies",n]}),f.invalidateQueries({queryKey:["forum",n]}),d(""),we.success("Reply posted!")}}),v=async w=>{w.preventDefault(),u.trim()&&y.mutate({forum_id:n,content:u.trim(),author_name:s,author_email:l})};return m||!p?a.jsx("div",{className:"p-8",children:"Loading..."}):a.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:a.jsxs("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[a.jsxs(ae,{variant:"ghost",className:"mb-6 gap-2",onClick:()=>e(Xe("Forum")),children:[a.jsx(rl,{className:"w-4 h-4"}),"Back to Forum"]}),a.jsxs(Pe.div,{initial:{opacity:0,y:20}
799,animate:{opacity:1,y:0},children:[a.jsx(de,{className:"mb-6",children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(Se,{className:p.status==="answered"?"bg-emerald-100 text-emerald-700":p.status==="closed"?"bg-slate-100 text-slate-700":"bg-blue-100 text-blue-700",children:p.status}),a.jsx(Se,{variant:"outline",children:p.category}),(b=p.tags)==null?void 0:b.map((w,N)=>a.jsx(Se,{variant:"secondary",children:w},N))]}),a.jsx("h1",{className:"text-2xl font-bold text-slate-900 mb-4",children:p.title}),a.jsx("p",{className:"text-slate-700 whitespace-pre-wrap mb-4",children:p.content}),a.jsxs("div",{className:"flex items-center gap-4 text-sm text-slate-500 pt-4 border-t",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(li,{className:"w-4 h-4"}),p.reply_count||0," replies"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Qn,{className:"w-4 h-4"}),p.views||0," views"]}),a.jsxs("span",{children:["Posted by ",p.author_name]}),a.jsx("span",{children:Jt(new Date(p.created_date),"MMM d, yyyy")})]})]})}),a.jsxs("div",{className:"mb-6",children:[a.jsxs("h2",{className:"text-xl font-semibold text-slate-900 mb-4",children:["Replies (",x.length,")"]}),a.jsx("div",{className:"space-y-4",children:x.map(w=>{var N,S;return a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 flex items-center justify-center text-white font-medium flex-shrink-0",children:(S=(N=w.author_name)==null?void 0:N[0])==null?void 0:S.toUpperCase()}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx("span",{className:"font-semibold text-slate-900",children:w.author_name}),w.is_answer&&a.jsxs(Se,{className:"bg-emerald-100 text-emerald-700 gap-1",children:[a.jsx(Cn,{className:"w-3 h-3"}),"Answer"]}),a.jsx("span",{className:"text-xs text-slate-500",children:Jt(new Date(w.created_date),"MMM d, yyyy ⢠h:mm a")})]}),a.jsx("p",{className:"text-slate-700 whitespace-pre-wrap",children:w.content})]})]})})},w.id)})})]}),a.jsx(de,{children:a.jsxs(he,{className:"pt-6",children:[a.jsx("h3",{className:"font-semibold text-lg text-slate-900 mb-4",children:"Your Reply"}),a.jsxs("form",{onSubmit:v,className:"space-y-4",children:[!r&&a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsx(Ye,{placeholder:"Your name",value:s,onChange:w=>o(w.target.value),required:!0}),a.jsx(Ye,{type:"email",placeholder:"Your email",value:l,onChange:w=>c(w.target.value),required:!0})]}),a.jsx(dn,{placeholder:"Share your thoughts or answer...",value:u,onChange:w=>d(w.target.value),className:"min-h-[120px]",required:!0}),a.jsx("div",{className:"flex justify-end",children:a.jsx(ae,{type:"submit",disabled:y.isPending,className:"gap-2 bg-indigo-600 hover:bg-indigo-700",children:y.isPending?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Posting..."]}):a.jsxs(a.Fragment,{children:[a.jsx(ci,{className:"w-4 h-4"}),"Post Reply"]})})})]})]})})]})]})})}function rDe(){const e=kc(),[t,n]=T.useState("processing"),[r,i]=T.useState("Connecting your Gmail account...");T.useEffect(()=>{s()},[]);const s=async()=>{try{const o=new URLSearchParams(window.location.search),l=o.get("code"),c=o.get("state"),u=o.get("error");if(u){n("error"),i(`Authorization failed: ${u}`),setTimeout(()=>e(Xe("Settings")),3e3);return}if(!l){n("error"),i("No authorization code received"),setTimeout(()=>e(Xe("Settings")),3e3);return}const d=await ce.functions.handleGmailCallback({code:l,state:c});d.success?(n("success"),i(`Gmail connected successfully! Connected to: ${d.email}`),setTimeout(()=>e(Xe("Settings")),2e3)):(n("error"),i(d.error||"Failed to connect Gmail"),setTimeout(()=>e(Xe("Settings")),3e3))}catch(o){console.error("Callback error:",o),n("error"),i("An error occurred while connecting Gmail"),setTimeout(()=>e(Xe("Settings")),3e3)}};return a.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30 flex items-center justify-center p-4",children:a.jsx(Pe.div,{initial:{opacity:0,scale:.95}
799,animate:{opacity:1,scale:1},transition:{duration:.3},children:a.jsx(de,{className:"w-full max-w-md",children:a.jsx(he,{className:"pt-8 pb-8",children:a.jsxs("div",{className:"text-center",children:[t==="processing"&&a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-16 h-16 text-indigo-600 animate-spin mx-auto mb-4"}),a.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Connecting Gmail..."}),a.jsx("p",{className:"text-slate-500",children:r})]}),t==="success"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(Cn,{className:"w-10 h-10 text-green-600"})}),a.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Success!"}),a.jsx("p",{className:"text-slate-500",children:r}),a.jsx("p",{className:"text-sm text-slate-400 mt-2",children:"Redirecting to Settings..."})]}),t==="error"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(As,{className:"w-10 h-10 text-red-600"})}),a.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Connection Failed"}),a.jsx("p",{className:"text-slate-500",children:r}),a.jsx("p",{className:"text-sm text-slate-400 mt-2",children:"Redirecting back..."})]})]})})})})})}function iDe({title:e,content:t,excerpt:n,metaDescription:r,focusKeyword:i,onUpdateSEO:s}){const[o,l]=T.useState(!1),[c,u]=T.useState(null),[d,f]=T.useState(null),[p,m]=T.useState(!1),[x,y]=T.useState(null);T.useEffect(()=>{if(!t)return;const k=setTimeout(()=>{const O=t.replace(/[#*`\[\]]/g,""),I=O.split(/[.!?]+/).filter(H=>H.trim().length>0),A=O.split(/\s+/).filter(H=>H.length>0),C=A.reduce((H,U)=>H+U.toLowerCase().replace(/[^a-z]/g,"").length/3,0);if(I.length===0||A.length===0){f(null);return}const R=A.length/I.length,D=C/A.length,q=Math.max(0,Math.min(100,206.835-1.015*R-84.6*D));let F="Very Easy";q<30?F="Very Difficult":q<50?F="Difficult":q<60?F="Fairly Difficult":q<70?F="Standard":q<80?F="Fairly Easy":q<90&&(F="Easy"),f({score:Math.round(q),grade:F,wordCount:A.length,sentenceCount:I.length,avgWordsPerSentence:Math.round(R)})},500);return()=>clearTimeout(k)},[t]);const v=async()=>{if(!t)return;m(!0);const E=/https?:\/\/[^\s\)]+/g,k=t.match(E)||[],O=k.filter(A=>A.includes(window.location.hostname)),I=k.filter(A=>!A.includes(window.location.hostname));y({total:k.length,internal:O.length,external:I.length,urls:k.slice(0,10)}),m(!1)},b=async()=>{if(!(!e||!t)){l(!0);try{const E=await ce.integrations.Core.InvokeLLM({prompt:`Based on this blog post, generate 3 optimized meta description options and 3 SEO title options. 800 801TITLE: ${e} 802CONTENT: ${t.substring(0,1500)}... 803 804Generate: 8051. Three compelling meta descriptions (each 150-160 characters, include a call-to-action) 8062. Three SEO-optimized title variations (each under 60 characters, engaging and keyword-rich)`,response_json_schema:{type:"object",properties:{meta_descriptions:{type:"array",items:{type:"string"}},title_options:{type:"array",items:{type:"string"}}}}});u(k=>({...k,meta_suggestions:E.meta_descriptions,title_suggestions:E.title_options}))}catch(E){console.error("Failed to generate suggestions:",E)}finally{l(!1)}}},w=async()=>{if(!(!e||!t)){l(!0);try{const E=await ce.integrations.Core.InvokeLLM({prompt:`You are an SEO expert. Analyze this blog post and provide detailed SEO recommendations. 807 808TITLE: ${e} 809EXCERPT: ${n||"No excerpt provided"} 810META DESCRIPTION: ${r||"Not set"} 811FOCUS KEYWORD: ${i||"Not set"} 812 813CONTENT: 814${t} 815 816Provide a comprehensive SEO analysis with: 817 8181. **SEO Score (0-100)**: Overall SEO quality score 8192. **Focus Keyword Suggestion**: Best primary keyword for this content (2-3 words) 8203. **Meta Description**: Optimized meta description (150-160 characters, compelling, includes keyword) 8214. **Keyword Density Analysis**: Is the focus keyword used appropriately? (aim for 1-2%) 8225. **Readability Score (0-100)**: How easy is it to read? 8236. **Content Structure**: Are headings (H2, H3) used properly? 8247. **Strengths**: List 2-3 SEO strengths (e.g., good title length, clear structure) 8258. **Improvements**: List 3-5 actionable improvements 8269. **Suggested Keywords**: List 5-7 relevant keywords to naturally incorporate 82710. **Title Optimization**: Suggest an improved title if needed (keep it under 60 characters) 828 829Be specific and actionable. Focus on practical improvements.`,response_json_schema:{type:"object",properties:{seo_score:{type:"number",description:"0-100"},readability_score:{type:"number",description:"0-100"},focus_keyword:{type:"string"},meta_description:{type:"string"},optimized_title:{type:"string"},keyword_density:{type:"string",description:"e.g., '1.2% - Good'"},content_structure:{type:"string",description:"Assessment of heading usage"},strengths:{type:"array",items:{type:"string"}},improvements:{type:"array",items:{type:"string"}},suggested_keywords:{type:"array",items:{type:"string"}}}}});u(E)}catch(E){console.error("SEO analysis failed:",E)}finally{l(!1)}}},N=()=>{c&&s({meta_description:c.meta_description,focus_keyword:c.focus_keyword,seo_score:c.seo_score,title:c.optimized_title!==e?c.optimized_title:e})},S=E=>E>=80?"text-emerald-600 bg-emerald-50 border-emerald-200":E>=60?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200",_=E=>E>=80?"bg-emerald-500":E>=60?"bg-amber-500":"bg-red-500";return a.jsxs(de,{className:"border-indigo-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"w-5 h-5 text-indigo-600"}),"AI SEO Assistant"]}),a.jsx(mn,{children:"Optimize your content for search engines with AI-powered suggestions"})]}),a.jsxs(he,{className:"space-y-4",children:[d&&a.jsxs(Pe.div,{initial:{opacity:0,y:-10}
829,animate:{opacity:1,y:0},className:"p-4 bg-slate-50 rounded-xl border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qq,{className:"w-4 h-4 text-slate-600"}),a.jsx("span",{className:"text-sm font-semibold text-slate-700",children:"Live Readability"})]}),a.jsxs(Se,{variant:"secondary",className:`${S(d.score)}`,children:[d.score,"/100 - ",d.grade]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3 text-xs",children:[a.jsxs("div",{children:[a.jsx("span",{className:"text-slate-500",children:"Words:"}),a.jsx("span",{className:"ml-1 font-medium text-slate-700",children:d.wordCount})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-slate-500",children:"Sentences:"}),a.jsx("span",{className:"ml-1 font-medium text-slate-700",children:d.sentenceCount})]}),a.jsxs("div",{children:[a.jsx("span",{className:"text-slate-500",children:"Avg/Sentence:"}),a.jsx("span",{className:"ml-1 font-medium text-slate-700",children:d.avgWordsPerSentence})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsx(ae,{onClick:w,disabled:o||!e||!t,className:"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:o?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Xr,{className:"w-4 h-4"}),"Full Analysis"]})}),a.jsx(ae,{onClick:b,disabled:o||!e||!t,variant:"outline",className:"gap-2",children:o?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsxs(a.Fragment,{children:[a.jsx(zy,{className:"w-4 h-4"}),"AI Suggestions"]})})]}),a.jsx(ae,{onClick:v,disabled:p||!t,variant:"outline",className:"w-full gap-2",children:p?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Checking Links..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Z_,{className:"w-4 h-4"}),"Check Links"]})}),x&&a.jsxs(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"p-4 bg-blue-50 rounded-xl border border-blue-200",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Z_,{className:"w-4 h-4 text-blue-600"}),a.jsx("span",{className:"text-sm font-semibold text-blue-900",children:"Link Analysis"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3 mb-3",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-slate-900",children:x.total}),a.jsx("div",{className:"text-xs text-slate-600",children:"Total Links"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-indigo-600",children:x.internal}),a.jsx("div",{className:"text-xs text-slate-600",children:"Internal"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-blue-600",children:x.external}),a.jsx("div",{className:"text-xs text-slate-600",children:"External"})]})]}),x.urls.length>0&&a.jsxs("div",{className:"space-y-1",children:[a.jsx("div",{className:"text-xs font-medium text-slate-600 mb-1",children:"Found Links:"}),x.urls.map((E,k)=>a.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-600",children:[a.jsx(Gu,{className:"w-3 h-3 flex-shrink-0"}),a.jsx("span",{className:"truncate",children:E})]},k)),x.total>10&&a.jsxs("div",{className:"text-xs text-slate-500 italic",children:["+",x.total-10," more links"]})]})]}),a.jsx(hi,{children:c&&a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:`p-4 rounded-xl border-2 ${S(c.seo_score)}`,children:[a.jsx("div",{className:"text-sm font-medium mb-1",children:"SEO Score"}),a.jsxs("div",{className:"text-3xl font-bold",children:[c.seo_score,"/100"]}),a.jsx(cs,{value:c.seo_score,className:`mt-2 h-2 ${_(c.seo_score)}`})]}),a.jsxs("div",{className:`p-4 rounded-xl border-2 ${S(c.readability_score)}`,children:[a.jsx("div",{className:"text-sm font-medium mb-1",children:"Readability"}),a.jsxs("div",{className:"text-3xl font-bold",children:[c.readability_score,"/100"]}),a.jsx(cs,{value:c.readability_score,className:`mt-2 h-2 ${_(c.readability_score)}`})]})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsxs(De,{className:"flex items-center gap-2",children:[a.jsx(dc,{className:"w-4 h-4"}),"Focus Keyword"]}),a.jsxs("div",{className:"flex gap-2 mt-1.5",children:[a.jsx(Ye,{value:i||c.focus_keyword,onChange:E=>s({focus_keyword:E.target.value}),placeholder:"Primary keyword"}),i!==c.focus_keyword&&a.jsx(ae,{variant:"outline",size:"sm",onClick:()=>s({focus_keyword:c.focus_keyword}),children:"Use AI"})]}),a.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Density: ",c.keyword_density]})]}),a.jsxs("div",{children:[a.jsxs(De,{className:"flex items-center gap-2",children:[a.jsx(os,{className:"w-4 h-4"}),"Meta Description"]}),a.jsx(dn,{value:r||c.meta_description,onChange:E=>s({meta_description:E.target.value}),placeholder:"SEO meta description (150-160 characters)",className:"mt-1.5",rows:2}),a.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[(r||c.meta_description).length," / 160 characters"]})]}),c.optimized_title!==e&&a.jsxs(jr,{className:"border-blue-200 bg-blue-50",children:[a.jsx(zy,{className:"h-4 w-4 text-blue-600"}),a.jsxs(Sr,{className:"text-blue-700",children:[a.jsx("strong",{children:"Suggested Title:"})," ",c.optimized_title,a.jsx(ae,{variant:"link",size:"sm",onClick:()=>s({title:c.optimized_title}),className:"text-blue-700 underline p-0 ml-2",children:"Apply"})]})]}),c.meta_suggestions&&a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx(De,{className:"text-sm font-semibold",children:"AI Meta Description Options"}),a.jsx("div",{className:"space-y-2 mt-2",children:c.meta_suggestions.map((E,k
829)=>a.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsx("p",{className:"text-sm text-slate-700 mb-2",children:E}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-xs text-slate-500",children:[E.length," chars"]}),a.jsx(ae,{variant:"ghost",size:"sm",onClick:()=>s({meta_description:E}),className:"h-7 text-xs",children:"Use This"})]})]},k))})]}),c.title_suggestions&&a.jsxs("div",{children:[a.jsx(De,{className:"text-sm font-semibold",children:"AI Title Options"}),a.jsx("div",{className:"space-y-2 mt-2",children:c.title_suggestions.map((E,k)=>a.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsx("p",{className:"text-sm font-medium text-slate-700 mb-2",children:E}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-xs text-slate-500",children:[E.length," chars"]}),a.jsx(ae,{variant:"ghost",size:"sm",onClick:()=>s({title:E}),className:"h-7 text-xs",children:"Use This"})]})]},k))})]})]})]}),c.strengths.length>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(_n,{className:"w-4 h-4 text-emerald-600"}),a.jsx("span",{className:"text-sm font-semibold text-emerald-700",children:"Strengths"})]}),a.jsx("div",{className:"space-y-1",children:c.strengths.map((E,k)=>a.jsxs("div",{className:"text-sm text-slate-600 flex items-start gap-2",children:[a.jsx("span",{className:"text-emerald-500 mt-1",children:"â¢"}),E]},k))})]}),c.improvements.length>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Kr,{className:"w-4 h-4 text-amber-600"}),a.jsx("span",{className:"text-sm font-semibold text-amber-700",children:"Suggested Improvements"})]}),a.jsx("div",{className:"space-y-1",children:c.improvements.map((E,k)=>a.jsxs("div",{className:"text-sm text-slate-600 flex items-start gap-2",children:[a.jsx("span",{className:"text-amber-500 mt-1",children:"â¢"}),E]},k))})]}),c.suggested_keywords.length>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(lr,{className:"w-4 h-4 text-indigo-600"}),a.jsx("span",{className:"text-sm font-semibold text-slate-700",children:"Suggested Keywords"})]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:c.suggested_keywords.map((E,k)=>a.jsx(Se,{variant:"secondary",className:"bg-indigo-50 text-indigo-700 border-indigo-200",children:E},k))}),a.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"Naturally incorporate these keywords throughout your content"})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-semibold text-slate-700 mb-1",children:"Content Structure"}),a.jsx("p",{className:"text-sm text-slate-600",children:c.content_structure})]}),a.jsxs(ae,{onClick:N,variant:"outline",className:"w-full gap-2",children:[a.jsx(_n,{className:"w-4 h-4"}),"Apply All SEO Suggestions"]})]})}),!c&&!o&&a.jsxs(jr,{children:[a.jsx(Ct,{className:"h-4 w-4"}),a.jsx(Sr,{children:'Click "Analyze SEO" to get AI-powered optimization suggestions for your blog post.'})]})]})]})}function R_({score:e,label:t,size:n=80}){const r=e>=80?"#10b981":e>=60?"#f59e0b":"#ef4444",i=30,s=2*Math.PI*i,o=e/100*s;return a.jsxs("div",{className:"flex flex-col items-center gap-1",children:[a.jsxs("svg",{width:n,height:n,viewBox:"0 0 80 80",children:[a.jsx("circle",{cx:"40",cy:"40",r:i,fill:"none",stroke:"#e2e8f0",strokeWidth:"8"}),a.jsx("circle",{cx:"40",cy:"40",r:i,fill:"none",stroke:r,strokeWidth:"8",strokeDasharray:`${o} ${s-o}`,strokeLinecap:"round",transform:"rotate(-90 40 40)",style:{transition:"stroke-dasharray 0.6s ease"}}),a.jsx("text",{x:"40",y:"44",textAnchor:"middle",fontSize:"16",fontWeight:"bold",fill:r,children:e})]}),a.jsx("span",{className:"text-xs text-slate-500 font-medium",children:t})]})}function sDe({post:e,onApply:t}){var c,u,d,f,p,m;const[n,r]=T.useState(!1),[i,s]=T.useState(null),o=async()=>{var x;if(!(e!=null&&e.title)||!(e!=null&&e.content)){we.error("Post needs title and content to analyze");return}r(!0);try{const y=await ce.integrations.Core.InvokeLLM({prompt:`You are a senior SEO strategist. Analyze this published blog post comprehensively. 830 831TITLE: ${e.title} 832CATEGORY: ${e.category||"general"} 833EXCERPT: ${e.excerpt||""} 834META DESCRIPTION: ${e.meta_description||"not set"} 835FOCUS KEYWORD: ${e.focus_keyword||"not set"} 836CONTENT: 837${(x=e.content)==null?void 0:x.substring(0,3e3)} 838 839Provide a detailed SEO & engagement analysis with actionable data.`,response_json_schema:{type:"object",properties:{overall_seo_score:{type:"number",description:"0-100"},readability_score:{type:"number",description:"0-100"},engagement_potential:{type:"number",description:"0-100"},title_analysis:{type:"object",properties:{score:{type:"number"},length:{type:"number"},issues:{type:"array",items:{type:"string"}},optimized_title:{type:"string"}}},keyword_analysis:{type:"object",properties:{primary_keyword:{type:"string"},density_percent:{type:"number"},density_rating:{type:"string"},missing_in_title:{type:"boolean"},missing_in_meta:{type:"boolean"}}},content_structure:{type:"object",properties:{has_h2:{type:"boolean"},has_h3:{type:"boolean"},word_count:{type:"number"},ideal_word_count:{type:"string"},paragraph_avg_length:{type:"string"},structure_score:{type:"number"}}},meta_description:{type:"object",properties:{current_length:{type:"number"},optimized:{type:"string"},issues:{type:"array",items:{type:"string"}}}},strengths:{type:"array",items:{type:"string"}},recommendations:{type:"array",items:{type:"object",properties:{priority:{type:"string",description:"high/medium/low"},action:{type:"string"},impact:{type:"string"}}}},suggested_keywords:{type:"array",items:{type:"string"}}}}});s(y)}catch{we.error("Analysis failed")}finally{r(!1)}},l=x=>x==="high"?"bg-red-100 text-red-700":x==="medium"?"bg-amber-100 text-amber-700":"bg-blue-100 text-blue-700";return a.jsxs(de,{className:"border-indigo-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Xr,{className:"w-5 h-5 text-indigo-600"}),"SEO Performance Analyzer"]}),a.jsx(mn,{children:"Deep AI analysis of title, keywords, readability & content structure"})]}),a.jsxs(he,{className:"space-y-5",children:[a.jsx(ae,{onClick:o,disabled:n,className:"w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:n?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"})," Analyzing post..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"w-4 h-4"})," Analyze SEO & Engagement"]})}),a.jsx(hi,{children:i&&a.jsxs(Pe.div,{initial:{opacity:0,y:16}
839,animate:{opacity:1,y:0},className:"space-y-5",children:[a.jsxs("div",{className:"flex justify-around p-4 bg-slate-50 rounded-xl border",children:[a.jsx(R_,{score:i.overall_seo_score,label:"SEO Score"}),a.jsx(R_,{score:i.readability_score,label:"Readability"}),a.jsx(R_,{score:i.engagement_potential,label:"Engagement"})]}),a.jsxs("div",{className:"p-4 bg-white rounded-lg border border-slate-200 space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-sm font-semibold text-slate-700 flex items-center gap-1",children:[a.jsx(dc,{className:"w-4 h-4 text-indigo-500"})," Title Analysis"]}),a.jsxs(Se,{className:i.title_analysis.score>=70?"bg-emerald-100 text-emerald-700":"bg-amber-100 text-amber-700",children:[i.title_analysis.score,"/100"]})]}),a.jsxs("p",{className:"text-xs text-slate-500",children:[i.title_analysis.length," characters"]}),(c=i.title_analysis.issues)==null?void 0:c.map((x,y)=>a.jsxs("p",{className:"text-xs text-amber-700 flex gap-1",children:[a.jsx(Kr,{className:"w-3 h-3 flex-shrink-0 mt-0.5"}),x]},y)),i.title_analysis.optimized_title&&a.jsxs("div",{className:"flex items-center justify-between bg-indigo-50 rounded px-3 py-2",children:[a.jsxs("span",{className:"text-xs text-indigo-800 font-medium",children:["Suggestion: ",i.title_analysis.optimized_title]}),a.jsx(ae,{size:"sm",variant:"ghost",className:"h-6 text-xs text-indigo-600",onClick:()=>t==null?void 0:t({title:i.title_analysis.optimized_title}),children:"Apply"})]})]}),a.jsxs("div",{className:"p-4 bg-white rounded-lg border border-slate-200 space-y-2",children:[a.jsxs("span",{className:"text-sm font-semibold text-slate-700 flex items-center gap-1",children:[a.jsx(lr,{className:"w-4 h-4 text-indigo-500"})," Keyword Analysis"]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[a.jsxs("div",{className:"p-2 bg-slate-50 rounded",children:[a.jsx("p",{className:"text-slate-500",children:"Primary Keyword"}),a.jsx("p",{className:"font-medium text-slate-800",children:i.keyword_analysis.primary_keyword})]}),a.jsxs("div",{className:"p-2 bg-slate-50 rounded",children:[a.jsx("p",{className:"text-slate-500",children:"Density"}),a.jsxs("p",{className:`font-medium ${i.keyword_analysis.density_percent>0&&i.keyword_analysis.density_percent<=3?"text-emerald-700":"text-amber-700"}`,children:[(u=i.keyword_analysis.density_percent)==null?void 0:u.toFixed(1),"% â ",i.keyword_analysis.density_rating]})]})]}),i.keyword_analysis.missing_in_meta&&a.jsxs("p",{className:"text-xs text-amber-700 flex gap-1",children:[a.jsx(Kr,{className:"w-3 h-3 flex-shrink-0 mt-0.5"}),"Keyword missing in meta description"]})]}),a.jsxs("div",{className:"p-4 bg-white rounded-lg border border-slate-200 space-y-2",children:[a.jsxs("span",{className:"text-sm font-semibold text-slate-700 flex items-center gap-1",children:[a.jsx(Qq,{className:"w-4 h-4 text-indigo-500"})," Content Structure"]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-xs text-slate-500",children:"Structure Score"}),a.jsxs("span",{className:"text-xs font-medium",children:[i.content_structure.structure_score,"/100"]})]}),a.jsx(cs,{value:i.content_structure.structure_score,className:"h-2"}),a.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs",children:[a.jsxs("div",{className:"text-center p-2 bg-slate-50 rounded",children:[a.jsx("p",{className:"text-slate-500",children:"Words"}),a.jsx("p",{className:"font-medium",children:i.content_structure.word_count})]}),a.jsxs("div",{className:"text-center p-2 bg-slate-50 rounded",children:[a.jsx("p",{className:"text-slate-500",children:"H2 Tags"}),a.jsx("p",{className:i.content_structure.has_h2?"text-emerald-600 font-medium":"text-red-600 font-medium",children:i.content_structure.has_h2?"â":"â"})]}),a.jsxs("div",{className:"text-center p-2 bg-slate-50 rounded",children:[a.jsx("p",{className:"text-slate-500",children:"H3 Tags"}),a.jsx("p",{className:i.content_structure.has_h3?"text-emerald-600 font-medium":"text-slate-400 font-medium",children:i.content_structure.has_h3?"â":"â"})]})]})]}),i.meta_description.optimized&&a.jsxs("div",{className:"p-4 bg-white rounded-lg border border-slate-200 space-y-2",children:[a.jsx("span",{className:"text-sm font-semibold text-slate-700",children:"Meta Description"}),(d=i.meta_description.issues)==null?void 0:d.map((x,y)=>a.jsx("p",{className:"text-xs text-amber-700",children:x},y)),a.jsxs("div",{className:"flex items-start justify-between bg-indigo-50 rounded px-3 py-2 gap-2",children:[a.jsx("span",{className:"text-xs text-indigo-800 flex-1",children:i.meta_description.optimized}),a.jsx(ae,{size:"sm",variant:"ghost",className:"h-6 text-xs text-indigo-600 flex-shrink-0",onClick:()=>t==null?void 0:t({meta_description:i.meta_description.optimized}),children:"Apply"})]})]}),((f=i.strengths)==null?void 0:f.length)>0&&a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-semibold text-emerald-700 flex items-center gap-1 mb-2",children:[a.jsx(_n,{className:"w-4 h-4"})," Strengths"]}),a.jsx("div",{className:"space-y-1",children:i.strengths.map((x,y)=>a.jsxs("p",{className:"text-xs text-slate-600 flex gap-1.5",children:[a.jsx("span",{className:"text-emerald-500 flex-shrink-0 mt-0.5",children:"â"}),x]},y))})]}),((p=i.recommendations)==null?void 0:p.length)>0&&a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-semibold text-slate-700 flex items-center gap-1 mb-2",children:[a.jsx(zy,{className:"w-4 h-4 text-amber-500"})," Recommendations"]}),a.jsx("div",{className:"space-y-2",children:i.recommendations.map((x,y)=>a.jsxs("div",{className:"flex items-start gap-2 p-2 bg-slate-50 rounded border border-slate-200",children:[a.jsx(Se,{className:`${l(x.priority)} text-xs flex-shrink-0`,children:x.priority}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-800",children:x.action}),a.jsx("p",{className:"text-xs text-slate-500",children:x.impact})]})]},y))})]}),((m=i.suggested_keywords)==null?void 0:m.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold text-slate-600 mb-2",children:"Suggested Keywords to Add"}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:i.suggested_keywords.map((x,y)=>a.jsx(Se,{variant:"secondary",className:"bg-indigo-50 text-indigo-700 border-indigo-200 text-xs",children:x},y))})]}),a.jsxs(ae,{variant:"outline",className:"w-full gap-2",onClick:()=>{t==null||t({focus_keyword:i.keyword_analysis.primary_keyword,meta_description:i.meta_description.optimized,seo_score:i.overall_seo_score}),we.success("SEO suggestions applied!")},children:[a.jsx(_n,{className:"w-4 h-4"}),"Apply All Suggestions"]})]})})]})]})}var By={exports:{}};/*! 840 * Quill Editor v1.3.7 841 * https://quilljs.com/ 842 * Copyright (c) 2014, Jason Chen 843 * Copyright (c) 2013, salesforce.com 844 */var aDe=By.exports,zF;function oDe(){return zF||(zF=1,(function(e,t){(function(r,i){e.exports=i()})(typeof self<"u"?self:aDe,function(){return(function(n){var r={};
vendor: 44,955 bytes, lines 844-860
844function i(s){if(r[s])return r[s].exports;var o=r[s]={i:s,l:!1,exports:{}};return n[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(s,o,l){i.o(s,o)||Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(o,"a",o),o},i.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},i.p="",i(i.s=109)})([(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(17),o=i(18),l=i(19),c=i(45),u=i(46),d=i(47),f=i(48),p=i(49),m=i(12),x=i(32),y=i(33),v=i(31),b=i(1),w={Scope:b.Scope,create:b.create,find:b.find,query:b.query,register:b.register,Container:s.default,Format:o.default,Leaf:l.default,Embed:f.default,Scroll:c.default,Block:d.default,Inline:u.default,Text:p.default,Attributor:{Attribute:m.default,Class:x.default,Style:y.default,Store:v.default}};r.default=w}),(function(n,r,i){var s=this&&this.__extends||(function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var N in w)w.hasOwnProperty(N)&&(b[N]=w[N])};return function(b,w){v(b,w);function N(){this.constructor=b}b.prototype=w===null?Object.create(w):(N.prototype=w.prototype,new N)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=(function(v){s(b,v);function b(w){var N=this;return w="[Parchment] "+w,N=v.call(this,w)||this,N.message=w,N.name=N.constructor.name,N}return b})(Error);r.ParchmentError=o;var l={},c={},u={},d={};r.DATA_KEY="__blot";var f;(function(v){v[v.TYPE=3]="TYPE",v[v.LEVEL=12]="LEVEL",v[v.ATTRIBUTE=13]="ATTRIBUTE",v[v.BLOT=14]="BLOT",v[v.INLINE=7]="INLINE",v[v.BLOCK=11]="BLOCK",v[v.BLOCK_BLOT=10]="BLOCK_BLOT",v[v.INLINE_BLOT=6]="INLINE_BLOT",v[v.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",v[v.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",v[v.ANY=15]="ANY"})(f=r.Scope||(r.Scope={}));function p(v,b){var w=x(v);if(w==null)throw new o("Unable to create "+v+" blot");var N=w,S=v instanceof Node||v.nodeType===Node.TEXT_NODE?v:N.create(b);return new N(S,b)}r.create=p;function m(v,b){return b===void 0&&(b=!1),v==null?null:v[r.DATA_KEY]!=null?v[r.DATA_KEY].blot:b?m(v.parentNode,b):null}r.find=m;function x(v,b){b===void 0&&(b=f.ANY);var w;if(typeof v=="string")w=d[v]||l[v];else if(v instanceof Text||v.nodeType===Node.TEXT_NODE)w=d.text;else if(typeof v=="number")v&f.LEVEL&f.BLOCK?w=d.block:v&f.LEVEL&f.INLINE&&(w=d.inline);else if(v instanceof HTMLElement){var N=(v.getAttribute("class")||"").split(/\s+/);for(var S in N)if(w=c[N[S]],w)break;w=w||u[v.tagName]}return w==null?null:b&f.LEVEL&w.scope&&b&f.TYPE&w.scope?w:null}r.query=x;function y(){for(var v=[],b=0;b<arguments.length;b++)v[b]=arguments[b];if(v.length>1)return v.map(function(S){return y(S)});var w=v[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new o("Invalid definition");if(w.blotName==="abstract")throw new o("Cannot register abstract class");if(d[w.blotName||w.attrName]=w,typeof w.keyName=="string")l[w.keyName]=w;else if(w.className!=null&&(c[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(S){return S.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var N=Array.isArray(w.tagName)?w.tagName:[w.tagName];N.forEach(function(S){(u[S]==null||w.className==null)&&(u[S]=w)})}return w}r.register=y}),(function(n,r,i){var s=i(51),o=i(11),l=i(3),c=i(20),u="\0",d=function(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]};d.prototype.insert=function(f,p){var m={};return f.length===0?this:(m.insert=f,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(m.attributes=p),this.push(m))},d.prototype.delete=function(f){return f<=0?this:this.push({delete:f})},d.prototype.retain=function(f,p){if(f<=0)return this;var m={retain:f};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(m.attributes=p),this.push(m)},d.prototype.push=function(f){var p=this.ops.length,m=this.ops[p-1];if(f=l(!0,{},f),typeof m=="object"){if(typeof f.delete=="number"&&typeof m.delete=="number")return this.ops[p-1]={delete:m.delete+f.delete},this;if(typeof m.delete=="number"&&f.insert!=null&&(p-=1,m=this.ops[p-1],typeof m!="object"))return this.ops.unshift(f),this;if(o(f.attributes,m.attributes)){if(typeof f.insert=="string"&&typeof m.insert=="string")return this.ops[p-1]={insert:m.insert+f.insert},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof m.retain=="number")return this.ops[p-1]={retain:m.retain+f.retain},typeof f.attributes=="object"&&(this.ops[p-1].attributes=f.attributes),this}}return p===this.ops.length?this.ops.push(f):this.ops.splice(p,0,f),this},d.prototype.chop=function(){var f=this.ops[this.ops.length-1];return f&&f.retain&&!f.attributes&&this.ops.pop(),this},d.prototype.filter=function(f){return this.ops.filter(f)},d.prototype.forEach=function(f){this.ops.forEach(f)},d.prototype.map=function(f){return this.ops.map(f)},d.prototype.partition=function(f){var p=[],m=[];return this.forEach(function(x){var y=f(x)?p:m;y.push(x)}),[p,m]},d.prototype.reduce=function(f,p){return this.ops.reduce(f,p)},d.prototype.changeLength=function(){return this.reduce(function(f,p){return p.insert?f+c.length(p):p.delete?f-p.delete:f},0)},d.prototype.length=function(){return this.reduce(function(f,p){return f+c.length(p)},0)},d.prototype.slice=function(f,p){f=f||0,typeof p!="number"&&(p=1/0);for(var m=[],x=c.iterator(this.ops),y=0;y<p&&x.hasNext();){var v;y<f?v=x.next(f-y):(v=x.next(p-y),m.push(v)),y+=c.length(v)}return new d(m)},d.prototype.compose=function(f){var p=c.iterator(this.ops),m=c.iterator(f.ops),x=[],y=m.peek();if(y!=null&&typeof y.retain=="number"&&y.attributes==null){for(var v=y.retain;p.peekType()==="insert"&&p.peekLength()<=v;)v-=p.peekLength(),x.push(p.next());y.retain-v>0&&m.next(y.retain-v)}for(var b=new d(x);p.hasNext()||m.hasNext();)if(m.peekType()==="insert")b.push(m.next());else if(p.peekType()==="delete")b.push(p.next());else{var w=Math.min(p.peekLength(),m.peekLength()),N=p.next(w),S=m.next(w);if(typeof S.retain=="number"){var _={};typeof N.retain=="number"?_.retain=w:_.insert=N.insert;var E=c.attributes.compose(N.attributes,S.attributes,typeof N.retain=="number");if(E&&(_.attributes=E),b.push(_),!m.hasNext()&&o(b.ops[b.ops.length-1],_)){var k=new d(p.rest());return b.concat(k).chop()}}else typeof S.delete=="number"&&typeof N.retain=="number"&&b.push(S)}return b.chop()},d.prototype.concat=function(f){var p=new d(this.ops.slice());return f.ops.length>0&&(p.push(f.ops[0]),p.ops=p.ops.concat(f.ops.slice(1))),p},d.prototype.diff=function(f,p){if(this.ops===f.ops)return new d;var m=[this,f].map(function(w){return w.map(function(N){if(N.insert!=null)return typeof N.insert=="string"?N.insert:u;var S=w===f?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")}),x=new d,y=s(m[0],m[1],p),v=c.iterator(this.ops),b=c.iterator(f.ops);return y.forEach(function(w){for(var N=w[1].length;N>0;){var S=0;switch(w[0]){case s.INSERT:S=Math.min(b.peekLength(),N),x.push(b.next(S));break;case s.DELETE:S=Math.min(N,v.peekLength()),v.next(S),x.delete(S);break;case s.EQUAL:S=Math.min(v.peekLength(),b.peekLength(),N);var _=v.next(S),E=b.next(S);o(_.insert,E.insert)?x.retain(S,c.attributes.diff(_.attributes,E.attributes)):x.push(E).delete(S);break}N-=S}}),x.chop()},d.prototype.eachLine=function(f,p){p=p||` 845`;for(var m=c.iterator(this.ops),x=new d,y=0;m.hasNext();){if(m.peekType()!=="insert")return;var v=m.peek(),b=c.length(v)-m.peekLength(),w=typeof v.insert=="string"?v.insert.indexOf(p,b)-b:-1;if(w<0)x.push(m.next());else if(w>0)x.push(m.next(w));else{if(f(x,m.next(1).attributes||{},y)===!1)return;y+=1,x=new d}}x.length()>0&&f(x,{},y)},d.prototype.transform=function(f,p){if(p=!!p,typeof f=="number")return this.transformPosition(f,p);for(var m=c.iterator(this.ops),x=c.iterator(f.ops),y=new d;m.hasNext()||x.hasNext();)if(m.peekType()==="insert"&&(p||x.peekType()!=="insert"))y.retain(c.length(m.next()));else if(x.peekType()==="insert")y.push(x.next());else{var v=Math.min(m.peekLength(),x.peekLength()),b=m.next(v),w=x.next(v);if(b.delete)continue;w.delete?y.push(w):y.retain(v,c.attributes.transform(b.attributes,w.attributes,p))}return y.chop()},d.prototype.transformPosition=function(f,p){p=!!p;for(var m=c.iterator(this.ops),x=0;m.hasNext()&&x<=f;){var y=m.peekLength(),v=m.peekType();if(m.next(),v==="delete"){f-=Math.min(y,f-x);continue}else v==="insert"&&(x<f||!p)&&(f+=y);x+=y}return f},n.exports=d}),(function(n,r){var i=Object.prototype.hasOwnProperty,s=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(m){return typeof Array.isArray=="function"?Array.isArray(m):s.call(m)==="[object Array]"},u=function(m){if(!m||s.call(m)!=="[object Object]")return!1;var x=i.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&i.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!x&&!y)return!1;var v;for(v in m);return typeof v>"u"||i.call(m,v)},d=function(m,x){o&&x.name==="__proto__"?o(m,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):m[x.name]=x.newValue},f=function(m,x){if(x==="__proto__")if(i.call(m,x)){if(l)return l(m,x).value}else return;return m[x]};n.exports=function p(){var m,x,y,v,b,w,N=arguments[0],S=1,_=arguments.length,E=!1;for(typeof N=="boolean"&&(E=N,N=arguments[1]||{},S=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});S<_;++S)if(m=arguments[S],m!=null)for(x in m)y=f(N,x),v=f(m,x),N!==v&&(E&&v&&(u(v)||(b=c(v)))?(b?(b=!1,w=y&&c(y)?y:[]):w=y&&u(y)?y:{},d(N,{name:x,newValue:p(E,w,v)})):typeof v<"u"&&d(N,{name:x,newValue:v}));return N}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var s=(function(){function C(R,D){for(var q=0;q<D.length;q++){var F=D[q];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(R,F.key,F)}}return function(R,D,q){return D&&C(R.prototype,D),q&&C(R,q),R}})(),o=function C(R,D,q){R===null&&(R=Function.prototype);var F=Object.getOwnPropertyDescriptor(R,D);if(F===void 0){var H=Object.getPrototypeOf(R);return H===null?void 0:C(H,D,q)}else{if("value"in F)return F.value;var U=F.get;return U===void 0?void 0:U.call(q)}},l=i(3),c=N(l),u=i(2),d=N(u),f=i(0),p=N(f),m=i(16),x=N(m),y=i(6),v=N(y),b=i(7),w=N(b);function N(C){return C&&C.__esModule?C:{default:C}}function S(C,R){if(!(C instanceof R))throw new TypeError("Cannot call a class as a function")}function _(C,R){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:C}function E(C,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);C.prototype=Object.create(R&&R.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(C,R):C.__proto__=R)}var k=1,O=(function(C){E(R,C);function R(){return S(this,R),_(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return s(R,[{key:"attach",value:function(){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"attach",this).call(this),this.attributes=new p.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(q,F){var H=p.default.query(q,p.default.Scope.BLOCK_ATTRIBUTE);H!=null&&this.attributes.attribute(H,F)}},{key:"formatAt",value:function(q,F,H,U){this.format(H,U)}},{key:"insertAt",value:function(q,F,H){if(typeof F=="string"&&F.endsWith(` 846`)){var U=p.default.create(I.blotName);this.parent.insertBefore(U,q===0?this:this.next),U.insertAt(0,F.slice(0,-1))}else o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,q,F,H)}}]),R})(p.default.Embed);O.scope=p.default.Scope.BLOCK_BLOT;var I=(function(C){E(R,C);function R(D){S(this,R);var q=_(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,D));return q.cache={},q}return s(R,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(p.default.Leaf).reduce(function(q,F){return F.length()===0?q:q.insert(F.value(),A(F))},new d.default).insert(` 847`,A(this))),this.cache.delta}},{key:"deleteAt",value:function(q,F){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"deleteAt",this).call(this,q,F),this.cache={}}},{key:"formatAt",value:function(q,F,H,U){F<=0||(p.default.query(H,p.default.Scope.BLOCK)?q+F===this.length()&&this.format(H,U):o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"formatAt",this).call(this,q,Math.min(F,this.length()-q-1),H,U),this.cache={})}},{key:"insertAt",value:function(q,F,H){if(H!=null)return o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,q,F,H);if(F.length!==0){var U=F.split(` 848`),W=U.shift();W.length>0&&(q<this.length()-1||this.children.tail==null?o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,Math.min(q,this.length()-1),W):this.children.tail.insertAt(this.children.tail.length(),W),this.cache={});var G=this;U.reduce(function(L,$){return G=G.split(L,!0),G.insertAt(0,$),$.length},q+W.length)}}},{key:"insertBefore",value:function(q,F){var H=this.children.head;o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertBefore",this).call(this,q,F),H instanceof x.default&&H.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"length",this).call(this)+k),this.cache.length}},{key:"moveChildren",value:function(q,F){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"moveChildren",this).call(this,q,F),this.cache={}}},{key:"optimize",value:function(q){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"optimize",this).call(this,q),this.cache={}}},{key:"path",value:function(q){return o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"path",this).call(this,q,!0)}},{key:"removeChild",value:function(q){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"removeChild",this).call(this,q),this.cache={}}},{key:"split",value:function(q){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(q===0||q>=this.length()-k)){var H=this.clone();return q===0?(this.parent.insertBefore(H,this),this):(this.parent.insertBefore(H,this.next),H)}else{var U=o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"split",this).call(this,q,F);return this.cache={},U}}}]),R})(p.default.Block);I.blotName="block",I.tagName="P",I.defaultChild="break",I.allowedChildren=[v.default,p.default.Embed,w.default];function A(C){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return C==null||(typeof C.formats=="function"&&(R=(0,c.default)(R,C.formats())),C.parent==null||C.parent.blotName=="scroll"||C.parent.statics.scope!==C.statics.scope)?R:A(C.parent,R)}r.bubbleFormats=A,r.BlockEmbed=O,r.default=I}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},o=(function(){function G(L,$){var V=[],z=!0,Q=!1,J=void 0;try{for(var Y=L[Symbol.iterator](),X;!(z=(X=Y.next()).done)&&(V.push(X.value),!($&&V.length===$));z=!0);}catch(ne){Q=!0,J=ne}finally{try{!z&&Y.return&&Y.return()}finally{if(Q)throw J}}return V}return function(L,$){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return G(L,$);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function G(L,$){for(var V=0;V<$.length;V++){var z=$[V];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(L,z.key,z)}}return function(L,$,V){return $&&G(L.prototype,$),V&&G(L,V),L}})();i(50);var c=i(2),u=A(c),d=i(14),f=A(d),p=i(8),m=A(p),x=i(9),y=A(x),v=i(0),b=A(v),w=i(15),N=A(w),S=i(3),_=A(S),E=i(10),k=A(E),O=i(34),I=A(O);function A(G){return G&&G.__esModule?G:{default:G}}function C(G,L,$){return L in G?Object.defineProperty(G,L,{value:$,enumerable:!0,configurable:!0,writable:!0}):G[L]=$,G}function R(G,L){if(!(G instanceof L))throw new TypeError("Cannot call a class as a function")}var D=(0,k.default)("quill"),q=(function(){l(G,null,[{key:"debug",value:function($){$===!0&&($="log"),k.default.level($)}},{key:"find",value:function($){return $.__quill||b.default.find($)}},{key:"import",value:function($){return this.imports[$]==null&&D.error("Cannot import "+$+". Are you sure it was registered?"),this.imports[$]}},{key:"register",value:function($,V){var z=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof $!="string"){var J=$.attrName||$.blotName;typeof J=="string"?this.register("formats/"+J,$,V):Object.keys($).forEach(function(Y){z.register(Y,$[Y],V)})}else this.imports[$]!=null&&!Q&&D.warn("Overwriting "+$+" with",V),this.imports[$]=V,($.startsWith("blots/")||$.startsWith("formats/"))&&V.blotName!=="abstract"?b.default.register(V):$.startsWith("modules")&&typeof V.register=="function"&&V.register()}}]);function G(L){var $=this,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(R(this,G),this.options=F(L,V),this.container=this.options.container,this.container==null)return D.error("Invalid Quill container",L);this.options.debug&&G.debug(this.options.debug);var z=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new m.default,this.scroll=b.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new f.default(this.scroll),this.selection=new N.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(m.default.events.EDITOR_CHANGE,function(J){J===m.default.events.TEXT_CHANGE&&$.root.classList.toggle("ql-blank",$.editor.isBlank())}),this.emitter.on(m.default.events.SCROLL_UPDATE,function(J,Y){var X=$.selection.lastRange,ne=X&&X.length===0?X.index:void 0;H.call($,function(){return $.editor.update(null,Y,ne)},J)});var Q=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+z+"<p><br></p></div>");this.setContents(Q),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(G,[{key:"addContainer",value:function($){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof $=="string"){var z=$;$=document.createElement("div"),$.classList.add(z)}return this.container.insertBefore($,V),$}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function($,V,z){var Q=this,J=U($,V,z),Y=o(J,4);return $=Y[0],V=Y[1],z=Y[3],H.call(this,function(){return Q.editor.deleteText($,V)},z,$,-1*V)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable($),this.container.classList.toggle("ql-disabled",!$)}},{key:"focus",value:function(){var $=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=$,this.scrollIntoView()}},{key:"format",value:function($,V){var z=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.default.sources.API;return H.call(this,function(){var J=z.getSelection(!0),Y=new u.default;if(J==null)return Y;if(b.default.query($,b.default.Scope.BLOCK))Y=z.editor.formatLine(J.index,J.length,C({},$,V));else{if(J.length===0)return z.selection.format($,V),Y;Y=z.editor.formatText(J.index,J.length,C({},$,V))}return z.setSelection(J,m.default.sources.SILENT),Y},Q)}},{key:"formatLine",value:function($,V,z,Q,J){var Y=this,X=void 0,ne=U($,V,z,Q,J),Z=o(ne,4);return $=Z[0],V=Z[1],X=Z[2],J=Z[3],H.call(this,function(){return Y.editor.formatLine($,V,X)},J,$,0)}},{key:"formatText",value:function($,V,z,Q,J){var Y=this,X=void 0,ne=U($,V,z,Q,J),Z=o(ne,4);return $=Z[0],V=Z[1],X=Z[2],J=Z[3],H.call(this,function(){return Y.editor.formatText($,V,X)},J,$,0)}},{key:"getBounds",value:function($){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=void 0;typeof $=="number"?z=this.selection.getBounds($,V):z=this.selection.getBounds($.index,$.length);var Q=this.container.getBoundingClientRect();return{bottom:z.bottom-Q.top,height:z.height,left:z.left-Q.left,right:z.right-Q.left,top:z.top-Q.top,width:z.width}}},{key:"getContents",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-$,z=U($,V),Q=o(z,2);return $=Q[0],V=Q[1],this.editor.getContents($,V)}},{key:"getFormat",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof $=="number"?this.editor.getFormat($,V):this.editor.getFormat($.index,$.length)}},{key:"getIndex",value:function($){return $.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function($){return this.scroll.leaf($)}},{key:"getLine",value:function($){return this.scroll.line($)}},{key:"getLines",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof $!="number"?this.scroll.lines($.index,$.length):this.scroll.lines($,V)}},{key:"getModule",value:function($){return this.theme.modules[$]}},{key:"getSelection",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return $&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-$,z=U($,V),Q=o(z,2);return $=Q[0],V=Q[1],this.editor.getText($,V)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function($,V,z){var Q=this,J=arguments.length>3&&arguments[3]!==void 0?arguments[3]:G.sources.API;return H.call(this,function(){return Q.editor.insertEmbed($,V,z)},J,$)}},{key:"insertText",value:function($,V,z,Q,J){var Y=this,X=void 0,ne=U($,0,z,Q,J),Z=o(ne,4);return $=Z[0],X=Z[2],J=Z[3],H.call(this,function(){return Y.editor.insertText($,V,X)},J,$,V.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function($,V,z){this.clipboard.dangerouslyPasteHTML($,V,z)}},{key:"removeFormat",value:function($,V,z){var Q=this,J=U($,V,z),Y=o(J,4);return $=Y[0],V=Y[1],z=Y[3],H.call(this,function(){return Q.editor.removeFormat($,V)},z,$)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function($){var V=this,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API;return H.call(this,function(){$=new u.default($);var Q=V.getLength(),J=V.editor.deleteText(0,Q),Y=V.editor.applyDelta($),X=Y.ops[Y.ops.length-1];X!=null&&typeof X.insert=="string"&&X.insert[X.insert.length-1]===` 849`&&(V.editor.deleteText(V.getLength()-1,1),Y.delete(1));var ne=J.compose(Y);return ne},z)}},{key:"setSelection",value:function($,V,z){if($==null)this.selection.setRange(null,V||G.sources.API);else{var Q=U($,V,z),J=o(Q,4);$=J[0],V=J[1],z=J[3],this.selection.setRange(new w.Range($,V),z),z!==m.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function($){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API,z=new u.default().insert($);return this.setContents(z,V)}},{key:"update",value:function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m.default.sources.USER,V=this.scroll.update($);return this.selection.update($),V}},{key:"updateContents",value:function($){var V=this,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API;return H.call(this,function(){return $=new u.default($),V.editor.applyDelta($,z)},z,!0)}}]),G})();q.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},q.events=m.default.events,q.sources=m.default.sources,q.version="1.3.7",q.imports={delta:u.default,parchment:b.default,"core/module":y.default,"core/theme":I.default};function F(G,L){if(L=(0,_.default)(!0,{container:G,modules:{clipboard:!0,keyboard:!0,history:!0}},L),!L.theme||L.theme===q.DEFAULTS.theme)L.theme=I.default;else if(L.theme=q.import("themes/"+L.theme),L.theme==null)throw new Error("Invalid theme "+L.theme+". Did you register it?");var $=(0,_.default)(!0,{},L.theme.DEFAULTS);[$,L].forEach(function(Q){Q.modules=Q.modules||{},Object.keys(Q.modules).forEach(function(J){Q.modules[J]===!0&&(Q.modules[J]={})})});var V=Object.keys($.modules).concat(Object.keys(L.modules)),z=V.reduce(function(Q,J){var Y=q.import("modules/"+J);return Y==null?D.error("Cannot load "+J+" module. Are you sure you registered it?"):Q[J]=Y.DEFAULTS||{},Q},{});return L.modules!=null&&L.modules.toolbar&&L.modules.toolbar.constructor!==Object&&(L.modules.toolbar={container:L.modules.toolbar}),L=(0,_.default)(!0,{},q.DEFAULTS,{modules:z},$,L),["bounds","container","scrollingContainer"].forEach(function(Q){typeof L[Q]=="string"&&(L[Q]=document.querySelector(L[Q]))}),L.modules=Object.keys(L.modules).reduce(function(Q,J){return L.modules[J]&&(Q[J]=L.modules[J]),Q},{}),L}function H(G,L,$,V){if(this.options.strict&&!this.isEnabled()&&L===m.default.sources.USER)return new u.default;var z=$==null?null:this.getSelection(),Q=this.editor.delta,J=G();if(z!=null&&($===!0&&($=z.index),V==null?z=W(z,J,L):V!==0&&(z=W(z,$,V,L)),this.setSelection(z,m.default.sources.SILENT)),J.length()>0){var Y,X=[m.default.events.TEXT_CHANGE,J,Q,L];if((Y=this.emitter).emit.apply(Y,[m.default.events.EDITOR_CHANGE].concat(X)),L!==m.default.sources.SILENT){var ne;(ne=this.emitter).emit.apply(ne,X)}}return J}function U(G,L,$,V,z){var Q={};return typeof G.index=="number"&&typeof G.length=="number"?typeof L!="number"?(z=V,V=$,$=L,L=G.length,G=G.index):(L=G.length,G=G.index):typeof L!="number"&&(z=V,V=$,$=L,L=0),(typeof $>"u"?"undefined":s($))==="object"?(Q=$,z=V):typeof $=="string"&&(V!=null?Q[$]=V:z=$),z=z||m.default.sources.API,[G,L,Q,z]}function W(G,L,$,V){if(G==null)return null;var z=void 0,Q=void 0;if(L instanceof u.default){var J=[G.index,G.index+G.length].map(function(Z){return L.transformPosition(Z,V!==m.default.sources.USER)}),Y=o(J,2);z=Y[0],Q=Y[1]}else{var X=[G.index,G.index+G.length].map(function(Z){return Z<L||Z===L&&V===m.default.sources.USER?Z:$>=0?Z+$:Math.max(L,Z+$)}),ne=o(X,2);z=ne[0],Q=ne[1]}return new w.Range(z,Q-z)}r.expandConfig=F,r.overload=U,r.default=q}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function v(b,w){for(var N=0;N<w.length;N++){var S=w[N];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,w,N){return w&&v(b.prototype,w),N&&v(b,N),b}})(),o=function v(b,w,N){b===null&&(b=Function.prototype);var S=Object.getOwnPropertyDescriptor(b,w);if(S===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:v(_,w,N)}else{if("value"in S)return S.value;var E=S.get;return E===void 0?void 0:E.call(N)}},l=i(7),c=f(l),u=i(0),d=f(u);function f(v){return v&&v.__esModule?v:{default:v}}function p(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function m(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function x(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var y=(function(v){x(b,v);function b(){return p(this,b),m(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"formatAt",value:function(N,S,_,E){if(b.compare(this.statics.blotName,_)<0&&d.default.query(_,d.default.Scope.BLOT)){var k=this.isolate(N,S);E&&k.wrap(_,E)}else o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,N,S,_,E)}},{key:"optimize",value:function(N){if(o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,N),this.parent instanceof b&&b.compare(this.statics.blotName,this.parent.statics.blotName)>0){var S=this.parent.isolate(this.offset(),this.length());this.moveChildren(S),S.wrap(this)}}}],[{key:"compare",value:function(N,S){var _=b.order.indexOf(N),E=b.order.indexOf(S);return _>=0||E>=0?_-E:N===S?0:N<S?-1:1}}]),b})(d.default.Inline);y.allowedChildren=[y,d.default.Embed,c.default],y.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function d(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var f=(function(p){d(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default.Text);r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function w(N,S){for(var _=0;_<S.length;_++){var E=S[_];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(N,E.key,E)}}return function(N,S,_){return S&&w(N.prototype,S),_&&w(N,_),N}})(),o=function w(N,S,_){N===null&&(N=Function.prototype);var E=Object.getOwnPropertyDescriptor(N,S);if(E===void 0){var k=Object.getPrototypeOf(N);return k===null?void 0:w(k,S,_)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(_)}},l=i(54),c=f(l),u=i(10),d=f(u);function f(w){return w&&w.__esModule?w:{default:w}}function p(w,N){if(!(w instanceof N))throw new TypeError("Cannot call a class as a function")}function m(w,N){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:w}function x(w,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);w.prototype=Object.create(N&&N.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(w,N):w.__proto__=N)}var y=(0,d.default)("quill:events"),v=["selectionchange","mousedown","mouseup","click"];v.forEach(function(w){document.addEventListener(w,function(){for(var N=arguments.length,S=Array(N),_=0;_<N;_++)S[_]=arguments[_];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(E){if(E.__quill&&E.__quill.emitter){var k;(k=E.__quill.emitter).handleDOM.apply(k,S)}})})});var b=(function(w){x(N,w);function N(){p(this,N);var S=m(this,(N.__proto__||Object.getPrototypeOf(N)).call(this));return S.listeners={},S.on("error",y.error),S}return s(N,[{key:"emit",value:function(){y.log.apply(y,arguments),o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(_){for(var E=arguments.length,k=Array(E>1?E-1:0),O=1;O<E;O++)k[O-1]=arguments[O];(this.listeners[_.type]||[]).forEach(function(I){var A=I.node,C=I.handler;(_.target===A||A.contains(_.target))&&C.apply(void 0,[_].concat(k))})}},{key:"listenDOM",value:function(_,E,k){this.listeners[_]||(this.listeners[_]=[]),this.listeners[_].push({node:E,handler:k})}}]),N})(c.default);b.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},b.sources={API:"api",SILENT:"silent",USER:"user"},r.default=b}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});function s(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var o=function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s(this,l),this.quill=c,this.options=u};o.DEFAULTS={},r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=["error","warn","log","info"],o="warn";function l(u){if(s.indexOf(u)<=s.indexOf(o)){for(var d,f=arguments.length,p=Array(f>1?f-1:0),m=1;m<f;m++)p[m-1]=arguments[m];(d=console)[u].apply(d,p)}}function c(u){return s.reduce(function(d,f){return d[f]=l.bind(console,f,u),d},{})}l.level=c.level=function(u){o=u},r.default=c}),(function(n,r,i){var s=Array.prototype.slice,o=i(52),l=i(53),c=n.exports=function(p,m,x){return x||(x={}),p===m?!0:p instanceof Date&&m instanceof Date?p.getTime()===m.getTime():!p||!m||typeof p!="object"&&typeof m!="object"?x.strict?p===m:p==m:f(p,m,x)};function u(p){return p==null}function d(p){return!(!p||typeof p!="object"||typeof p.length!="number"||typeof p.copy!="function"||typeof p.slice!="function"||p.length>0&&typeof p[0]!="number")}function f(p,m,x){var y,v;if(u(p)||u(m)||p.prototype!==m.prototype)return!1;if(l(p))return l(m)?(p=s.call(p),m=s.call(m),c(p,m,x)):!1;if(d(p)){if(!d(m)||p.length!==m.length)return!1;for(y=0;y<p.length;y++)if(p[y]!==m[y])return!1;return!0}try{var b=o(p),w=o(m)}catch{return!1}if(b.length!=w.length)return!1;for(b.sort(),w.sort(),y=b.length-1;y>=0;y--)if(b[y]!=w[y])return!1;for(y=b.length-1;y>=0;y--)if(v=b[y],!c(p[v],m[v],x))return!1;return typeof p==typeof m}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(1),o=(function(){function l(c,u,d){d===void 0&&(d={}),this.attrName=c,this.keyName=u;var f=s.Scope.TYPE&s.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&s.Scope.LEVEL|f:this.scope=s.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return l.keys=function(c){return[].map.call(c.attributes,function(u){return u.name})},l.prototype.add=function(c,u){return this.canAdd(c,u)?(c.setAttribute(this.keyName,u),!0):!1},l.prototype.canAdd=function(c,u){var d=s.query(c,s.Scope.BLOT&(this.scope|s.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof u=="string"?this.whitelist.indexOf(u.replace(/["']/g,""))>-1:this.whitelist.indexOf(u)>-1},l.prototype.remove=function(c){c.removeAttribute(this.keyName)},l.prototype.value=function(c){var u=c.getAttribute(this.keyName);return this.canAdd(c,u)&&u?u:""},l})();r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var s=(function(){function O(I,A){var C=[],R=!0,D=!1,q=void 0;try{for(var F=I[Symbol.iterator](),H;!(R=(H=F.next()).done)&&(C.push(H.value),!(A&&C.length===A));R=!0);}catch(U){D=!0,q=U}finally{try{!R&&F.return&&F.return()}finally{if(D)throw q}}return C}return function(I,A){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return O(I,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function O(I,A){for(var C=0;C<A.length;C++){var R=A[C];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(I,R.key,R)}}return function(I,A,C){return A&&O(I.prototype,A),C&&O(I,C),I}})(),l=function O(I,A,C){I===null&&(I=Function.prototype);var R=Object.getOwnPropertyDescriptor(I,A);if(R===void 0){var D=Object.getPrototypeOf(I);return D===null?void 0:O(D,A,C)}else{if("value"in R)return R.value;var q=R.get;return q===void 0?void 0:q.call(C)}},c=i(2),u=w(c),d=i(0),f=w(d),p=i(4),m=w(p),x=i(6),y=w(x),v=i(7),b=w(v);function w(O){return O&&O.__esModule?O:{default:O}}function N(O,I){if(!(O instanceof I))throw new TypeError("Cannot call a class as a function")}function S(O,I){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:O}function _(O,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);O.prototype=Object.create(I&&I.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(O,I):O.__proto__=I)}var E=(function(O){_(I,O);function I(){return N(this,I),S(this,(I.__proto__||Object.getPrototypeOf(I)).apply(this,arguments))}return I})(y.default);E.blotName="code",E.tagName="CODE";var k=(function(O){_(I,O);function I(){return N(this,I),S(this,(I.__proto__||Object.getPrototypeOf(I)).apply(this,arguments))}return o(I,[{key:"delta",value:function(){var C=this,R=this.domNode.textContent;return R.endsWith(` 850`)&&(R=R.slice(0,-1)),R.split(` 851`).reduce(function(D,q){return D.insert(q).insert(` 852`,C.formats())},new u.default)}},{key:"format",value:function(C,R){if(!(C===this.statics.blotName&&R)){var D=this.descendant(b.default,this.length()-1),q=s(D,1),F=q[0];F!=null&&F.deleteAt(F.length()-1,1),l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"format",this).call(this,C,R)}}},{key:"formatAt",value:function(C,R,D,q){if(R!==0&&!(f.default.query(D,f.default.Scope.BLOCK)==null||D===this.statics.blotName&&q===this.statics.formats(this.domNode))){var F=this.newlineIndex(C);if(!(F<0||F>=C+R)){var H=this.newlineIndex(C,!0)+1,U=F-H+1,W=this.isolate(H,U),G=W.next;W.format(D,q),G instanceof I&&G.formatAt(0,C-H+R-U,D,q)}}}},{key:"insertAt",value:function(C,R,D){if(D==null){var q=this.descendant(b.default,C),F=s(q,2),H=F[0],U=F[1];H.insertAt(U,R)}}},{key:"length",value:function(){var C=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` 853`)?C:C+1}},{key:"newlineIndex",value:function(C){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(R)return this.domNode.textContent.slice(0,C).lastIndexOf(` 854`);var D=this.domNode.textContent.slice(C).indexOf(` 855`);return D>-1?C+D:-1}},{key:"optimize",value:function(C){this.domNode.textContent.endsWith(` 856`)||this.appendChild(f.default.create("text",` 857`)),l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"optimize",this).call(this,C);var R=this.next;R!=null&&R.prev===this&&R.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===R.statics.formats(R.domNode)&&(R.optimize(C),R.moveChildren(this),R.remove())}},{key:"replace",value:function(C){l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"replace",this).call(this,C),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(R){var D=f.default.find(R);D==null?R.parentNode.removeChild(R):D instanceof f.default.Embed?D.remove():D.unwrap()})}}],[{key:"create",value:function(C){var R=l(I.__proto__||Object.getPrototypeOf(I),"create",this).call(this,C);return R.setAttribute("spellcheck",!1),R}},{key:"formats",value:function(){return!0}}]),I})(m.default);k.blotName="code-block",k.tagName="PRE",k.TAB=" ",r.Code=E,r.default=k}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},o=(function(){function G(L,$){var V=[],z=!0,Q=!1,J=void 0;try{for(var Y=L[Symbol.iterator](),X;!(z=(X=Y.next()).done)&&(V.push(X.value),!($&&V.length===$));z=!0);}catch(ne){Q=!0,J=ne}finally{try{!z&&Y.return&&Y.return()}finally{if(Q)throw J}}return V}return function(L,$){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return G(L,$);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function G(L,$){for(var V=0;V<$.length;V++){var z=$[V];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(L,z.key,z)}}return function(L,$,V){return $&&G(L.prototype,$),V&&G(L,V),L}})(),c=i(2),u=R(c),d=i(20),f=R(d),p=i(0),m=R(p),x=i(13),y=R(x),v=i(24),b=R(v),w=i(4),N=R(w),S=i(16),_=R(S),E=i(21),k=R(E),O=i(11),I=R(O),A=i(3),C=R(A);function R(G){return G&&G.__esModule?G:{default:G}}function D(G,L,$){return L in G?Object.defineProperty(G,L,{value:$,enumerable:!0,configurable:!0,writable:!0}):G[L]=$,G}function q(G,L){if(!(G instanceof L))throw new TypeError("Cannot call a class as a function")}var F=/^[ -~]*$/,H=(function(){function G(L){q(this,G),this.scroll=L,this.delta=this.getDelta()}return l(G,[{key:"applyDelta",value:function($){var V=this,z=!1;this.scroll.update();var Q=this.scroll.length();return this.scroll.batchStart(),$=W($),$.reduce(function(J,Y){var X=Y.retain||Y.delete||Y.insert.length||1,ne=Y.attributes||{};if(Y.insert!=null){if(typeof Y.insert=="string"){var Z=Y.insert;Z.endsWith(` 858`)&&z&&(z=!1,Z=Z.slice(0,-1)),J>=Q&&!Z.endsWith(` 859`)&&(z=!0),V.scroll.insertAt(J,Z);var se=V.scroll.line(J),pe=o(se,2),oe=pe[0],Oe=pe[1],$e=(0,C.default)({},(0,w.bubbleFormats)(oe));if(oe instanceof N.default){var Ze=oe.descendant(m.default.Leaf,Oe),xt=o(Ze,1),pt=xt[0];$e=(0,C.default)($e,(0,w.bubbleFormats)(pt))}ne=f.default.attributes.diff($e,ne)||{}}else if(s(Y.insert)==="object"){var ye=Object.keys(Y.insert)[0];if(ye==null)return J;V.scroll.insertAt(J,ye,Y.insert[ye])}Q+=X}return Object.keys(ne).forEach(function(ve){V.scroll.formatAt(J,X,ve,ne[ve])}),J+X},0),$.reduce(function(J,Y){return typeof Y.delete=="number"?(V.scroll.deleteAt(J,Y.delete),J):J+(Y.retain||Y.insert.length||1)},0),this.scroll.batchEnd(),this.update($)}},{key:"deleteText",value:function($,V){return this.scroll.deleteAt($,V),this.update(new u.default().retain($).delete(V))}},{key:"formatLine",value:function($,V){var z=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Q).forEach(function(J){if(!(z.scroll.whitelist!=null&&!z.scroll.whitelist[J])){var Y=z.scroll.lines($,Math.max(V,1)),X=V;Y.forEach(function(ne){var Z=ne.length();if(!(ne instanceof y.default))ne.format(J,Q[J]);else{var se=$-ne.offset(z.scroll),pe=ne.newlineIndex(se+X)-se+1;ne.formatAt(se,pe,J,Q[J])}X-=Z})}}),this.scroll.optimize(),this.update(new u.default().retain($).retain(V,(0,k.default)(Q)))}},{key:"formatText",value:function($,V){var z=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Q).forEach(function(J){z.scroll.formatAt($,V,J,Q[J])}),this.update(new u.default().retain($).retain(V,(0,k.default)(Q)))}},{key:"getContents",value:function($,V){return this.delta.slice($,$+V)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function($,V){return $.concat(V.delta())},new u.default)}},{key:"getFormat",value:function($){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=[],Q=[];V===0?this.scroll.path($).forEach(function(Y){var X=o(Y,1),ne=X[0];ne instanceof N.default?z.push(ne):ne instanceof m.default.Leaf&&Q.push(ne)}):(z=this.scroll.lines($,V),Q=this.scroll.descendants(m.default.Leaf,$,V));var J=[z,Q].map(function(Y){if(Y.length===0)return{};for(var X=(0,w.bubbleFormats)(Y.shift());Object.keys(X).length>0;){var ne=Y.shift();if(ne==null)return X;X=U((0,w.bubbleFormats)(ne),X)}return X});return C.default.apply(C.default,J)}},{key:"getText",value:function($,V){return this.getContents($,V).filter(function(z){return typeof z.insert=="string"}).map(function(z){return z.insert}).join("")}},{key:"insertEmbed",value:function($,V,z){return this.scroll.insertAt($,V,z),this.update(new u.default().retain($).insert(D({},V,z)))}},{key:"insertText",value:function($,V){var z=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return V=V.replace(/\r\n/g,` 860`).replace(/\r/g,`
861`),this.scroll.insertAt($,V),Object.keys(Q).forEach(function(J){z.scroll.formatAt($,V.length,J,Q[J])}),this.update(new u.default().retain($).insert(V,(0,k.default)(Q)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var $=this.scroll.children.head;return $.statics.blotName!==N.default.blotName||$.children.length>1?!1:$.children.head instanceof _.default}},{key:"removeFormat",value:function($,V){var z=this.getText($,V),Q=this.scroll.line($+V),J=o(Q,2),Y=J[0],X=J[1],ne=0,Z=new u.default;Y!=null&&(Y instanceof y.default?ne=Y.newlineIndex(X)-X+1:ne=Y.length()-X,Z=Y.delta().slice(X,X+ne-1).insert(` 862`));var se=this.getContents($,V+ne),pe=se.diff(new u.default().insert(z).concat(Z)),oe=new u.default().retain($).concat(pe);return this.applyDelta(oe)}},{key:"update",value:function($){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Q=this.delta;if(V.length===1&&V[0].type==="characterData"&&V[0].target.data.match(F)&&m.default.find(V[0].target)){var J=m.default.find(V[0].target),Y=(0,w.bubbleFormats)(J),X=J.offset(this.scroll),ne=V[0].oldValue.replace(b.default.CONTENTS,""),Z=new u.default().insert(ne),se=new u.default().insert(J.value()),pe=new u.default().retain(X).concat(Z.diff(se,z));$=pe.reduce(function(oe,Oe){return Oe.insert?oe.insert(Oe.insert,Y):oe.push(Oe)},new u.default),this.delta=Q.compose($)}else this.delta=this.getDelta(),(!$||!(0,I.default)(Q.compose($),this.delta))&&($=Q.diff(this.delta,z));return $}}]),G})();function U(G,L){return Object.keys(L).reduce(function($,V){return G[V]==null||(L[V]===G[V]?$[V]=L[V]:Array.isArray(L[V])?L[V].indexOf(G[V])<0&&($[V]=L[V].concat([G[V]])):$[V]=[L[V],G[V]]),$},{})}function W(G){return G.reduce(function(L,$){if($.insert===1){var V=(0,k.default)($.attributes);return delete V.image,L.insert({image:$.attributes.image},V)}if($.attributes!=null&&($.attributes.list===!0||$.attributes.bullet===!0)&&($=(0,k.default)($),$.attributes.list?$.attributes.list="ordered":($.attributes.list="bullet",delete $.attributes.bullet)),typeof $.insert=="string"){var z=$.insert.replace(/\r\n/g,` 863`).replace(/\r/g,` 864`);return L.insert(z,$.attributes)}return L.push($)},new u.default)}r.default=H}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var s=(function(){function O(I,A){var C=[],R=!0,D=!1,q=void 0;try{for(var F=I[Symbol.iterator](),H;!(R=(H=F.next()).done)&&(C.push(H.value),!(A&&C.length===A));R=!0);}catch(U){D=!0,q=U}finally{try{!R&&F.return&&F.return()}finally{if(D)throw q}}return C}return function(I,A){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return O(I,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function O(I,A){for(var C=0;C<A.length;C++){var R=A[C];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(I,R.key,R)}}return function(I,A,C){return A&&O(I.prototype,A),C&&O(I,C),I}})(),l=i(0),c=b(l),u=i(21),d=b(u),f=i(11),p=b(f),m=i(8),x=b(m),y=i(10),v=b(y);function b(O){return O&&O.__esModule?O:{default:O}}function w(O){if(Array.isArray(O)){for(var I=0,A=Array(O.length);I<O.length;I++)A[I]=O[I];return A}else return Array.from(O)}function N(O,I){if(!(O instanceof I))throw new TypeError("Cannot call a class as a function")}var S=(0,v.default)("quill:selection"),_=function O(I){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;N(this,O),this.index=I,this.length=A},E=(function(){function O(I,A){var C=this;N(this,O),this.emitter=A,this.scroll=I,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new _(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){C.mouseDown||setTimeout(C.update.bind(C,x.default.sources.USER),1)}),this.emitter.on(x.default.events.EDITOR_CHANGE,function(R,D){R===x.default.events.TEXT_CHANGE&&D.length()>0&&C.update(x.default.sources.SILENT)}),this.emitter.on(x.default.events.SCROLL_BEFORE_UPDATE,function(){if(C.hasFocus()){var R=C.getNativeRange();R!=null&&R.start.node!==C.cursor.textNode&&C.emitter.once(x.default.events.SCROLL_UPDATE,function(){try{C.setNativeRange(R.start.node,R.start.offset,R.end.node,R.end.offset)}catch{}})}}),this.emitter.on(x.default.events.SCROLL_OPTIMIZE,function(R,D){if(D.range){var q=D.range,F=q.startNode,H=q.startOffset,U=q.endNode,W=q.endOffset;C.setNativeRange(F,H,U,W)}}),this.update(x.default.sources.SILENT)}return o(O,[{key:"handleComposition",value:function(){var A=this;this.root.addEventListener("compositionstart",function(){A.composing=!0}),this.root.addEventListener("compositionend",function(){if(A.composing=!1,A.cursor.parent){var C=A.curs
vendor: 24,146 bytes, lines 864-865
864or.restore();if(!C)return;setTimeout(function(){A.setNativeRange(C.startNode,C.startOffset,C.endNode,C.endOffset)},1)}})}},{key:"handleDragging",value:function(){var A=this;this.emitter.listenDOM("mousedown",document.body,function(){A.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){A.mouseDown=!1,A.update(x.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(A,C){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[A])){this.scroll.update();var R=this.getNativeRange();if(!(R==null||!R.native.collapsed||c.default.query(A,c.default.Scope.BLOCK))){if(R.start.node!==this.cursor.textNode){var D=c.default.find(R.start.node,!1);if(D==null)return;if(D instanceof c.default.Leaf){var q=D.split(R.start.offset);D.parent.insertBefore(this.cursor,q)}else D.insertBefore(this.cursor,R.start.node);this.cursor.attach()}this.cursor.format(A,C),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(A){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=this.scroll.length();A=Math.min(A,R-1),C=Math.min(A+C,R-1)-A;var D=void 0,q=this.scroll.leaf(A),F=s(q,2),H=F[0],U=F[1];if(H==null)return null;var W=H.position(U,!0),G=s(W,2);D=G[0],U=G[1];var L=document.createRange();if(C>0){L.setStart(D,U);var $=this.scroll.leaf(A+C),V=s($,2);if(H=V[0],U=V[1],H==null)return null;var z=H.position(U,!0),Q=s(z,2);return D=Q[0],U=Q[1],L.setEnd(D,U),L.getBoundingClientRect()}else{var J="left",Y=void 0;return D instanceof Text?(U<D.data.length?(L.setStart(D,U),L.setEnd(D,U+1)):(L.setStart(D,U-1),L.setEnd(D,U),J="right"),Y=L.getBoundingClientRect()):(Y=H.domNode.getBoundingClientRect(),U>0&&(J="right")),{bottom:Y.top+Y.height,height:Y.height,left:Y[J],right:Y[J],top:Y.top,width:0}}}},{key:"getNativeRange",value:function(){var A=document.getSelection();if(A==null||A.rangeCount<=0)return null;var C=A.getRangeAt(0);if(C==null)return null;var R=this.normalizeNative(C);return S.info("getNativeRange",R),R}},{key:"getRange",value:function(){var A=this.getNativeRange();if(A==null)return[null,null];var C=this.normalizedToRange(A);return[C,A]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(A){var C=this,R=[[A.start.node,A.start.offset]];A.native.collapsed||R.push([A.end.node,A.end.offset]);var D=R.map(function(H){var U=s(H,2),W=U[0],G=U[1],L=c.default.find(W,!0),$=L.offset(C.scroll);return G===0?$:L instanceof c.default.Container?$+L.length():$+L.index(W,G)}),q=Math.min(Math.max.apply(Math,w(D)),this.scroll.length()-1),F=Math.min.apply(Math,[q].concat(w(D)));return new _(F,q-F)}},{key:"normalizeNative",value:function(A){if(!k(this.root,A.startContainer)||!A.collapsed&&!k(this.root,A.endContainer))return null;var C={start:{node:A.startContainer,offset:A.startOffset},end:{node:A.endContainer,offset:A.endOffset},native:A};return[C.start,C.end].forEach(function(R){for(var D=R.node,q=R.offset;!(D instanceof Text)&&D.childNodes.length>0;)if(D.childNodes.length>q)D=D.childNodes[q],q=0;else if(D.childNodes.length===q)D=D.lastChild,q=D instanceof Text?D.data.length:D.childNodes.length+1;else break;R.node=D,R.offset=q}),C}},{key:"rangeToNative",value:function(A){var C=this,R=A.collapsed?[A.index]:[A.index,A.index+A.length],D=[],q=this.scroll.length();return R.forEach(function(F,H){F=Math.min(q-1,F);var U=void 0,W=C.scroll.leaf(F),G=s(W,2),L=G[0],$=G[1],V=L.position($,H!==0),z=s(V,2);U=z[0],$=z[1],D.push(U,$)}),D.length<2&&(D=D.concat(D)),D}},{key:"scrollIntoView",value:function(A){var C=this.lastRange;if(C!=null){var R=this.getBounds(C.index,C.length);if(R!=null){var D=this.scroll.length()-1,q=this.scroll.line(Math.min(C.index,D)),F=s(q,1),H=F[0],U=H;if(C.length>0){var W=this.scroll.line(Math.min(C.index+C.length,D)),G=s(W,1);U=G[0]}if(!(H==null||U==null)){var L=A.getBoundingClientRect();R.top<L.top?A.scrollTop-=L.top-R.top:R.bottom>L.bottom&&(A.scrollTop+=R.bottom-L.bottom)}}}}},{key:"setNativeRange",value:function(A,C){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A,D=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C,q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(S.info("setNativeRange",A,C,R,D),!(A!=null&&(this.root.parentNode==null||A.parentNode==null||R.parentNode==null))){var F=document.getSelection();if(F!=null)if(A!=null){this.hasFocus()||this.root.focus();var H=(this.getNativeRange()||{}).native;if(H==null||q||A!==H.startContainer||C!==H.startOffset||R!==H.endContainer||D!==H.endOffset){A.tagName=="BR"&&(C=[].indexOf.call(A.parentNode.childNodes,A),A=A.parentNode),R.tagName=="BR"&&(D=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode);var U=document.createRange();U.setStart(A,C),U.setEnd(R,D),F.removeAllRanges(),F.addRange(U)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(A){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.default.sources.API;if(typeof C=="string"&&(R=C,C=!1),S.info("setRange",A),A!=null){var D=this.rangeToNative(A);this.setNativeRange.apply(this,w(D).concat([C]))}else this.setNativeRange(null);this.update(R)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.default.sources.USER,C=this.lastRange,R=this.getRange(),D=s(R,2),q=D[0],F=D[1];if(this.lastRange=q,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,p.default)(C,this.lastRange)){var H;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var U=[x.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(C),A];if((H=this.emitter).emit.apply(H,[x.default.events.EDITOR_CHANGE].concat(U)),A!==x.default.sources.SILENT){var W;(W=this.emitter).emit.apply(W,U)}}}}]),O})();function k(O,I){try{I.parentNode}catch{return!1}return I instanceof Text&&(I=I.parentNode),O.contains(I)}r.Range=_,r.default=E}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function x(y,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,v,b){return v&&x(y.prototype,v),b&&x(y,b),y}})(),o=function x(y,v,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,v);if(w===void 0){var N=Object.getPrototypeOf(y);return N===null?void 0:x(N,v,b)}else{if("value"in w)return w.value;var S=w.get;return S===void 0?void 0:S.call(b)}},l=i(0),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function f(x,y){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:x}function p(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(x,y):x.__proto__=y)}var m=(function(x){p(y,x);function y(){return d(this,y),f(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"insertInto",value:function(b,w){b.children.length===0?o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"insertInto",this).call(this,b,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),y})(c.default.Embed);m.blotName="break",m.tagName="BR",r.default=m}),(function(n,r,i){var s=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var x in m)m.hasOwnProperty(x)&&(p[x]=m[x])};return function(p,m){f(p,m);function x(){this.constructor=p}p.prototype=m===null?Object.create(m):(x.prototype=m.prototype,new x)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(44),l=i(30),c=i(1),u=(function(f){s(p,f);function p(m){var x=f.call(this,m)||this;return x.build(),x}return p.prototype.appendChild=function(m){this.insertBefore(m)},p.prototype.attach=function(){f.prototype.attach.call(this),this.children.forEach(function(m){m.attach()})},p.prototype.build=function(){var m=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(x){try{var y=d(x);m.insertBefore(y,m.children.head||void 0)}catch(v){if(v instanceof c.ParchmentError)return;throw v}})},p.prototype.deleteAt=function(m,x){if(m===0&&x===this.length())return this.remove();this.children.forEachAt(m,x,function(y,v,b){y.deleteAt(v,b)})},p.prototype.descendant=function(m,x){var y=this.children.find(x),v=y[0],b=y[1];return m.blotName==null&&m(v)||m.blotName!=null&&v instanceof m?[v,b]:v instanceof p?v.descendant(m,b):[null,-1]},p.prototype.descendants=function(m,x,y){x===void 0&&(x=0),y===void 0&&(y=Number.MAX_VALUE);var v=[],b=y;return this.children.forEachAt(x,y,function(w,N,S){(m.blotName==null&&m(w)||m.blotName!=null&&w instanceof m)&&v.push(w),w instanceof p&&(v=v.concat(w.descendants(m,N,b))),b-=S}),v},p.prototype.detach=function(){this.children.forEach(function(m){m.detach()}),f.prototype.detach.call(this)},p.prototype.formatAt=function(m,x,y,v){this.children.forEachAt(m,x,function(b,w,N){b.formatAt(w,N,y,v)})},p.prototype.insertAt=function(m,x,y){var v=this.children.find(m),b=v[0],w=v[1];if(b)b.insertAt(w,x,y);else{var N=y==null?c.create("text",x):c.create(x,y);this.appendChild(N)}},p.prototype.insertBefore=function(m,x){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(y){return m instanceof y}))throw new c.ParchmentError("Cannot insert "+m.statics.blotName+" into "+this.statics.blotName);m.insertInto(this,x)},p.prototype.length=function(){return this.children.reduce(function(m,x){return m+x.length()},0)},p.prototype.moveChildren=function(m,x){this.children.forEach(function(y){m.insertBefore(y,x)})},p.prototype.optimize=function(m){if(f.prototype.optimize.call(this,m),this.children.length===0)if(this.statics.defaultChild!=null){var x=c.create(this.statics.defaultChild);this.appendChild(x),x.optimize(m)}else this.remove()},p.prototype.path=function(m,x){x===void 0&&(x=!1);var y=this.children.find(m,x),v=y[0],b=y[1],w=[[this,m]];return v instanceof p?w.concat(v.path(b,x)):(v!=null&&w.push([v,b]),w)},p.prototype.removeChild=function(m){this.children.remove(m)},p.prototype.replace=function(m){m instanceof p&&m.moveChildren(this),f.prototype.replace.call(this,m)},p.prototype.split=function(m,x){if(x===void 0&&(x=!1),!x){if(m===0)return this;if(m===this.length())return this.next}var y=this.clone();return this.parent.insertBefore(y,this.next),this.children.forEachAt(m,this.length(),function(v,b,w){v=v.split(b,x),y.appendChild(v)}),y},p.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},p.prototype.update=function(m,x){var y=this,v=[],b=[];m.forEach(function(w){w.target===y.domNode&&w.type==="childList"&&(v.push.apply(v,w.addedNodes),b.push.apply(b,w.removedNodes))}),b.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var N=c.find(w);N!=null&&(N.domNode.parentNode==null||N.domNode.parentNode===y.domNode)&&N.detach()}}),v.filter(function(w){return w.parentNode==y.domNode}).sort(function(w,N){return w===N?0:w.compareDocumentPosition(N)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var N=null;w.nextSibling!=null&&(N=c.find(w.nextSibling));var S=d(w);(S.next!=N||S.next==null)&&(S.parent!=null&&S.parent.removeChild(y),y.insertBefore(S,N||void 0))})},p})(l.default);function d(f){var p=c.find(f);if(p==null)try{p=c.create(f)}catch{p=c.create(c.Scope.INLINE),[].slice.call(f.childNodes).forEach(function(x){p.domNode.appendChild(x)}),f.parentNode&&f.parentNode.replaceChild(p.domNode,f),p.attach()}return p}r.default=u}),(function(n,r,i){var s=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var x in m)m.hasOwnProperty(x)&&(p[x]=m[x])};return function(p,m){f(p,m);function x(){this.constructor=p}p.prototype=m===null?Object.create(m):(x.prototype=m.prototype,new x)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),l=i(31),c=i(17),u=i(1),d=(function(f){s(p,f);function p(m){var x=f.call(this,m)||this;return x.attributes=new l.default(x.domNode),x}return p.formats=function(m){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return m.tagName.toLowerCase()},p.prototype.format=function(m,x){var y=u.query(m);y instanceof o.default?this.attributes.attribute(y,x):x&&y!=null&&(m!==this.statics.blotName||this.formats()[m]!==x)&&this.replaceWith(m,x)},p.prototype.formats=function(){var m=this.attributes.values(),x=this.statics.formats(this.domNode);return x!=null&&(m[this.statics.blotName]=x),m},p.prototype.replaceWith=function(m,x){var y=f.prototype.replaceWith.call(this,m,x);return this.attributes.copy(y),y},p.prototype.update=function(m,x){var y=this;f.prototype.update.call(this,m,x),m.some(function(v){return v.target===y.domNode&&v.type==="attributes"})&&this.attributes.build()},p.prototype.wrap=function(m,x){var y=f.prototype.wrap.call(this,m,x);return y instanceof p&&y.statics.scope===this.statics.scope&&this.attributes.move(y),y},p})(c.default);r.default=d}),(function(n,r,i){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){u(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(30),l=i(1),c=(function(u){s(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.value=function(f){return!0},d.prototype.index=function(f,p){return this.domNode===f||this.domNode.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(p,1):-1},d.prototype.position=function(f,p){var m=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return f>0&&(m+=1),[this.parent.domNode,m]},d.prototype.value=function(){var f;return f={},f[this.statics.blotName]=this.statics.value(this.domNode)||!0,f},d.scope=l.Scope.INLINE_BLOT,d})(o.default);r.default=c}),(function(n,r,i){var s=i(11),o=i(3),l={attributes:{compose:function(u,d,f){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});var p=o(!0,{},d);f||(p=Object.keys(p).reduce(function(x,y){return p[y]!=null&&(x[y]=p[y]),x},{}));for(var m in u)u[m]!==void 0&&d[m]===void 0&&(p[m]=u[m]);return Object.keys(p).length>0?p:void 0},diff:function(u,d){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});var f=Object.keys(u).concat(Object.keys(d)).reduce(function(p,m){return s(u[m],d[m])||(p[m]=d[m]===void 0?null:d[m]),p},{});return Object.keys(f).length>0?f:void 0},transform:function(u,d,f){if(typeof u!="object")return d;if(typeof d=="object"){if(!f)return d;var p=Object.keys(d).reduce(function(m,x){return u[x]===void 0&&(m[x]=d[x]),m},{});return Object.keys(p).length>0?p:void 0}}},iterator:function(u){return new c(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function c(u){this.ops=u,this.index=0,this.offset=0}c.prototype.hasNext=function(){return this.peekLength()<1/0},c.prototype.next=function(u){u||(u=1/0);var d=this.ops[this.index];if(d){var f=this.offset,p=l.length(d);if(u>=p-f?(u=p-f,this.index+=1,this.offset=0):this.offset+=u,typeof d.delete=="number")return{delete:u};var m={};return d.attributes&&(m.attributes=d.attributes),typeof d.retain=="number"?m.retain=u:typeof d.insert=="string"?m.insert=d.insert.substr(f,u):m.insert=d.insert,m}else return{retain:1/0}},c.prototype.peek=function(){return this.ops[this.index]},c.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},c.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},c.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,d=this.index,f=this.next(),p=this.ops.slice(this.index);return this.offset=u,this.index=d,[f].concat(p)}else return[]},n.exports=l}),(function(n,r){var i=(function(){function s(y,v){return v!=null&&y instanceof v}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var c;try{c=Promise}catch{c=function(){}}function u(y,v,b,w,N){typeof v=="object"&&(b=v.depth,w=v.prototype,N=v.includeNonEnumerable,v=v.circular);var S=[],_=[],E=typeof Buffer<"u";typeof v>"u"&&(v=!0),typeof b>"u"&&(b=1/0);function k(O,I){if(O===null)return null;if(I===0)return O;var A,C;if(typeof O!="object")return O;if(s(O,o))A=new o;else if(s(O,l))A=new l;else if(s(O,c))A=new c(function(L,$){O.then(function(V){L(k(V,I-1))},function(V){$(k(V,I-1))})});else if(u.__isArray(O))A=[];else if(u.__isRegExp(O))A=new RegExp(O.source,x(O)),O.lastIndex&&(A.lastIndex=O.lastIndex);else if(u.__isDate(O))A=new Date(O.getTime());else{if(E&&Buffer.isBuffer(O))return Buffer.allocUnsafe?A=Buffer.allocUnsafe(O.length):A=new Buffer(O.length),O.copy(A),A;s(O,Error)?A=Object.create(O):typeof w>"u"?(C=Object.getPrototypeOf(O),A=Object.create(C)):(A=Object.create(w),C=w)}if(v){var R=S.indexOf(O);if(R!=-1)return _[R];S.push(O),_.push(A)}s(O,o)&&O.forEach(function(L,$){var V=k($,I-1),z=k(L,I-1);A.set(V,z)}),s(O,l)&&O.forEach(function(L){var $=k(L,I-1);A.add($)});for(var D in O){var q;C&&(q=Object.getOwnPropertyDescriptor(C,D)),!(q&&q.set==null)&&(A[D]=k(O[D],I-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(O),D=0;D<F.length;D++){var H=F[D],U=Object.getOwnPropertyDescriptor(O,H);U&&!U.enumerable&&!N||(A[H]=k(O[H],I-1),U.enumerable||Object.defineProperty(A,H,{enumerable:!1}))}if(N)for(var W=Object.getOwnPropertyNames(O),D=0;D<W.length;D++){var G=W[D],U=Object.getOwnPropertyDescriptor(O,G);U&&U.enumerable||(A[G]=k(O[G],I-1),Object.defineProperty(A,G,{enumerable:!1}))}return A}return k(y,b)}u.clonePrototype=function(v){if(v===null)return null;var b=function(){};return b.prototype=v,new b};function d(y){return Object.prototype.toString.call(y)}u.__objToStr=d;function f(y){return typeof y=="object"&&d(y)==="[object Date]"}u.__isDate=f;function p(y){return typeof y=="object"&&d(y)==="[object Array]"}u.__isArray=p;function m(y){return typeof y=="object"&&d(y)==="[object RegExp]"}u.__isRegExp=m;function x(y){var v="";return y.global&&(v+="g"),y.ignoreCase&&(v+="i"),y.multiline&&(v+="m"),v}return u.__getRegExpFlags=x,u})();typeof n=="object"&&n.exports&&(n.exports=i)}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function A(C,R){var D=[],q=!0,F=!1,H=void 0;try{for(var U=C[Symbol.iterator](),W;!(q=(W=U.next()).done)&&(D.push(W.value),!(R&&D.length===R));q=!0);}catch(G){F=!0,H=G}finally{try{!q&&U.return&&U.return()}finally{if(F)throw H}}return D}return function(C,R){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return A(C,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function A(C,R){for(var D=0;D<R.length;D++){var q=R[D];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(C,q.key,q)}}return function(C,R,D){return R&&A(C.prototype,R),D&&A(C,D),C}})(),l=function A(C,R,D){C===null&&(C=Function.prototype);var q=Object.getOwnPropertyDescriptor(C,R);if(q===void 0){var F=Object.getPrototypeOf(C);return F===null?void 0:A(F,R,D)}else{if("value"in q)return q.value;var H=q.get;return H===void 0?void 0:H.call(D)}},c=i(0),u=S(c),d=i(8),f=S(d),p=i(4),m=S(p),x=i(16),y=S(x),v=i(13),b=S(v),w=i(25),N=S(w);function S(A){return A&&A.__esModule?A:{default:A}}function _(A,C){if(!(A instanceof C))throw new TypeError("Cannot call a class as a function")}function E(A,C){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:A}function k(A,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);A.prototype=Object.create(C&&C.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(A,C):A.__proto__=C)}function O(A){return A instanceof m.default||A instanceof p.BlockEmbed}var I=(function(A){k(C,A);function C(R,D){_(this,C);var q=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,R));return q.emitter=D.emitter,Array.isArray(D.whitelist)&&(q.whitelist=D.whitelist.reduce(function(F,H){return F[H]=!0,F},{})),q.domNode.addEventListener("DOMNodeInserted",function(){}),q.optimize(),q.enable(),q}return o(C,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(D,q){var F=this.line(D),H=s(F,2),U=H[0],W=H[1],G=this.line(D+q),L=s(G,1),$=L[0];if(l(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"deleteAt",this).call(this,D,q),$!=null&&U!==$&&W>0){if(U instanceof p.BlockEmbed||$ instanceof p.BlockEmbed){this.optimize();return}if(U instanceof b.default){var V=U.newlineIndex(U.length(),!0);if(V>-1&&(U=U.split(V+1),U===$)){this.optimize();return}}else if($ instanceof b.default){var z=$.newlineIndex(0);z>-1&&$.split(z+1)}var Q=$.children.head instanceof y.default?null:$.children.head;U.moveChildren($,Q),U.remove()}this.optimize()}},{key:"enable",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",D)}},{key:"formatAt",value:function(D,q,F,H){this.whitelist!=null&&!this.whitelist[F]||(l(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"formatAt",this).call(this,D,q,F,H),this.optimize())}},{key:"insertAt",value:function(D,q,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[q])){if(D>=this.length())if(F==null||u.default.query(q,u.default.Scope.BLOCK)==null){var H=u.default.create(this.statics.defaultChild);this.appendChild(H),F==null&&q.endsWith(` 865`)&&(q=q.slice(0,-1)),H.insertAt(0,q,F)}else{var U=u.default.create(q,F);this.appendChild(U)}else l(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertAt",this).call(this,D,q,F);this.optimize()}}},{key:"insertBefore",value:function(D,q){if(D.statics.scope===u.default.Scope.INLINE_BLOT){var F=u.default.create(this.statics.defaultChild);F.appendChild(D),D=F}l(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,D,q)}},{key:"leaf",value:function(D){return this.path(D).pop()||[null,-1]}},{key:"line",value:function(D){return D===this.length()?this.line(D-1):this.descendant(O,D)}},{key:"lines",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function H(U,W,G){var L=[],$=G;return U.children.forEachAt(W,G,function(V,z,Q){O(V)?L.push(V):V instanceof u.default.Container&&(L=L.concat(H(V,z,$))),$-=Q}),L};return F(this,D,q)}},{key:"optimize",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,D,q),D.length>0&&this.emitter.emit(f.default.events.SCROLL_OPTIMIZE,D,q))}},{key:"path",value:function(D){return l(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"path",this).call(this,D).slice(1)}},{key:"update",value:function(D){if(this.batch!==!0){var q=f.default.sources.USER;
865typeof D=="string"&&(q=D),Array.isArray(D)||(D=this.observer.takeRecords()),D.length>0&&this.emitter.emit(f.default.events.SCROLL_BEFORE_UPDATE,q,D),l(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"update",this).call(this,D.concat([])),D.length>0&&this.emitter.emit(f.default.events.SCROLL_UPDATE,q,D)}}}]),C})(u.default.Scroll);I.blotName="scroll",I.className="ql-editor",I.tagName="DIV",I.defaultChild="block",I.allowedChildren=[m.default,p.BlockEmbed,N.default],r.default=I}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},o=(function(){function Y(X,ne){var Z=[],se=!0,pe=!1,oe=void 0;try{for(var Oe=X[Symbol.iterator](),$e;!(se=($e=Oe.next()).done)&&(Z.push($e.value),!(ne&&Z.length===ne));se=!0);}catch(Ze){pe=!0,oe=Ze}finally{try{!se&&Oe.return&&Oe.return()}finally{if(pe)throw oe}}return Z}return function(X,ne){if(Array.isArray(X))return X;if(Symbol.iterator in Object(X))return Y(X,ne);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function Y(X,ne){for(var Z=0;Z<ne.length;Z++){var se=ne[Z];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(X,se.key,se)}}return function(X,ne,Z){return ne&&Y(X.prototype,ne),Z&&Y(X,Z),X}})(),c=i(21),u=A(c),d=i(11),f=A(d),p=i(3),m=A(p),x=i(2),y=A(x),v=i(20),b=A(v),w=i(0),N=A(w),S=i(5),_=A(S),E=i(10),k=A(E),O=i(9),I=A(O);function A(Y){return Y&&Y.__esModule?Y:{default:Y}}
vendor: 122,177 bytes, lines 865-879
865function C(Y,X,ne){return X in Y?Object.defineProperty(Y,X,{value:ne,enumerable:!0,configurable:!0,writable:!0}):Y[X]=ne,Y}function R(Y,X){if(!(Y instanceof X))throw new TypeError("Cannot call a class as a function")}function D(Y,X){if(!Y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return X&&(typeof X=="object"||typeof X=="function")?X:Y}function q(Y,X){if(typeof X!="function"&&X!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof X);Y.prototype=Object.create(X&&X.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),X&&(Object.setPrototypeOf?Object.setPrototypeOf(Y,X):Y.__proto__=X)}var F=(0,k.default)("quill:keyboard"),H=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",U=(function(Y){q(X,Y),l(X,null,[{key:"match",value:function(Z,se){return se=J(se),["altKey","ctrlKey","metaKey","shiftKey"].some(function(pe){return!!se[pe]!==Z[pe]&&se[pe]!==null})?!1:se.key===(Z.which||Z.keyCode)}}]);function X(ne,Z){R(this,X);var se=D(this,(X.__proto__||Object.getPrototypeOf(X)).call(this,ne,Z));return se.bindings={},Object.keys(se.options.bindings).forEach(function(pe){pe==="list autofill"&&ne.scroll.whitelist!=null&&!ne.scroll.whitelist.list||se.options.bindings[pe]&&se.addBinding(se.options.bindings[pe])}),se.addBinding({key:X.keys.ENTER,shiftKey:null},V),se.addBinding({key:X.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(se.addBinding({key:X.keys.BACKSPACE},{collapsed:!0},G),se.addBinding({key:X.keys.DELETE},{collapsed:!0},L)):(se.addBinding({key:X.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},G),se.addBinding({key:X.keys.DELETE},{collapsed:!0,suffix:/^.?$/},L)),se.addBinding({key:X.keys.BACKSPACE},{collapsed:!1},$),se.addBinding({key:X.keys.DELETE},{collapsed:!1},$),se.addBinding({key:X.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},G),se.listen(),se}return l(X,[{key:"addBinding",value:function(Z){var se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},oe=J(Z);if(oe==null||oe.key==null)return F.warn("Attempted to add invalid keyboard binding",oe);typeof se=="function"&&(se={handler:se}),typeof pe=="function"&&(pe={handler:pe}),oe=(0,m.default)(oe,se,pe),this.bindings[oe.key]=this.bindings[oe.key]||[],this.bindings[oe.key].push(oe)}},{key:"listen",value:function(){var Z=this;this.quill.root.addEventListener("keydown",function(se){if(!se.defaultPrevented){var pe=se.which||se.keyCode,oe=(Z.bindings[pe]||[]).filter(function(rt){return X.match(se,rt)});if(oe.length!==0){var Oe=Z.quill.getSelection();if(!(Oe==null||!Z.quill.hasFocus())){var $e=Z.quill.getLine(Oe.index),Ze=o($e,2),xt=Ze[0],pt=Ze[1],ye=Z.quill.getLeaf(Oe.index),ve=o(ye,2),Me=ve[0],Be=ve[1],je=Oe.length===0?[Me,Be]:Z.quill.getLeaf(Oe.index+Oe.length),mt=o(je,2),bt=mt[0],wt=mt[1],xe=Me instanceof N.default.Text?Me.value().slice(0,Be):"",ke=bt instanceof N.default.Text?bt.value().slice(wt):"",ze={collapsed:Oe.length===0,empty:Oe.length===0&&xt.length()<=1,format:Z.quill.getFormat(Oe),offset:pt,prefix:xe,suffix:ke},Et=oe.some(function(rt){if(rt.collapsed!=null&&rt.collapsed!==ze.collapsed||rt.empty!=null&&rt.empty!==ze.empty||rt.offset!=null&&rt.offset!==ze.offset)return!1;if(Array.isArray(rt.format)){if(rt.format.every(function(en){return ze.format[en]==null}))return!1}else if(s(rt.format)==="object"&&!Object.keys(rt.format).every(function(en){return rt.format[en]===!0?ze.format[en]!=null:rt.format[en]===!1?ze.format[en]==null:(0,f.default)(rt.format[en],ze.format[en])}))return!1;return rt.prefix!=null&&!rt.prefix.test(ze.prefix)||rt.suffix!=null&&!rt.suffix.test(ze.suffix)?!1:rt.handler.call(Z,Oe,ze)!==!0});Et&&se.preventDefault()}}}})}}]),X})(I.default);U.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},U.DEFAULTS={bindings:{bold:Q("bold"),italic:Q("italic"),underline:Q("underline"),indent:{key:U.keys.TAB,format:["blockquote","indent","list"],handler:function(X,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","+1",_.default.sources.USER)}},outdent:{key:U.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(X,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","-1",_.default.sources.USER)}},"outdent backspace":{key:U.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(X,ne){ne.format.indent!=null?this.quill.format("indent","-1",_.default.sources.USER):ne.format.list!=null&&this.quill.format("list",!1,_.default.sources.USER)}},"indent code-block":z(!0),"outdent code-block":z(!1),"remove tab":{key:U.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(X){this.quill.deleteText(X.index-1,1,_.default.sources.USER)}},tab:{key:U.keys.TAB,handler:function(X){this.quill.history.cutoff();var ne=new y.default().retain(X.index).delete(X.length).insert(" ");this.quill.updateContents(ne,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(X.index+1,_.default.sources.SILENT)}},"list empty enter":{key:U.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(X,ne){this.quill.format("list",!1,_.default.sources.USER),ne.format.indent&&this.quill.format("indent",!1,_.default.sources.USER)}},"checklist enter":{key:U.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(X){var ne=this.quill.getLine(X.index),Z=o(ne,2),se=Z[0],pe=Z[1],oe=(0,m.default)({},se.formats(),{list:"checked"}),Oe=new y.default().retain(X.index).insert(` 866`,oe).retain(se.length()-pe-1).retain(1,{list:"unchecked"});this.quill.updateContents(Oe,_.default.sources.USER),this.quill.setSelection(X.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:U.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(X,ne){var Z=this.quill.getLine(X.index),se=o(Z,2),pe=se[0],oe=se[1],Oe=new y.default().retain(X.index).insert(` 867`,ne.format).retain(pe.length()-oe-1).retain(1,{header:null});this.quill.updateContents(Oe,_.default.sources.USER),this.quill.setSelection(X.index+1,_.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(X,ne){var Z=ne.prefix.length,se=this.quill.getLine(X.index),pe=o(se,2),oe=pe[0],Oe=pe[1];if(Oe>Z)return!0;var $e=void 0;switch(ne.prefix.trim()){case"[]":case"[ ]":$e="unchecked";break;case"[x]":$e="checked";break;case"-":case"*":$e="bullet";break;default:$e="ordered"}this.quill.insertText(X.index," ",_.default.sources.USER),this.quill.history.cutoff();var Ze=new y.default().retain(X.index-Oe).delete(Z+1).retain(oe.length()-2-Oe).retain(1,{list:$e});this.quill.updateContents(Ze,_.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(X.index-Z,_.default.sources.SILENT)}},"code exit":{key:U.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(X){var ne=this.quill.getLine(X.index),Z=o(ne,2),se=Z[0],pe=Z[1],oe=new y.default().retain(X.index+se.length()-pe-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(oe,_.default.sources.USER)}},"embed left":W(U.keys.LEFT,!1),"embed left shift":W(U.keys.LEFT,!0),"embed right":W(U.keys.RIGHT,!1),"embed right shift":W(U.keys.RIGHT,!0)}};function W(Y,X){var ne,Z=Y===U.keys.LEFT?"prefix":"suffix";return ne={key:Y,shiftKey:X,altKey:null},C(ne,Z,/^$/),C(ne,"handler",function(pe){var oe=pe.index;Y===U.keys.RIGHT&&(oe+=pe.length+1);var Oe=this.quill.getLeaf(oe),$e=o(Oe,1),Ze=$e[0];return Ze instanceof N.default.Embed?(Y===U.keys.LEFT?X?this.quill.setSelection(pe.index-1,pe.length+1,_.default.sources.USER):this.quill.setSelection(pe.index-1,_.default.sources.USER):X?this.quill.setSelection(pe.index,pe.length+1,_.default.sources.USER):this.quill.setSelection(pe.index+pe.length+1,_.default.sources.USER),!1):!0}),ne}function G(Y,X){if(!(Y.index===0||this.quill.getLength()<=1)){var ne=this.quill.getLine(Y.index),Z=o(ne,1),se=Z[0],pe={};if(X.offset===0){var oe=this.quill.getLine(Y.index-1),Oe=o(oe,1),$e=Oe[0];if($e!=null&&$e.length()>1){var Ze=se.formats(),xt=this.quill.getFormat(Y.index-1,1);pe=b.default.attributes.diff(Ze,xt)||{}}}var pt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(X.prefix)?2:1;this.quill.deleteText(Y.index-pt,pt,_.default.sources.USER),Object.keys(pe).length>0&&this.quill.formatLine(Y.index-pt,pt,pe,_.default.sources.USER),this.quill.focus()}}function L(Y,X){var ne=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(X.suffix)?2:1;if(!(Y.index>=this.quill.getLength()-ne)){var Z={},se=0,pe=this.quill.getLine(Y.index),oe=o(pe,1),Oe=oe[0];if(X.offset>=Oe.length()-1){var $e=this.quill.getLine(Y.index+1),Ze=o($e,1),xt=Ze[0];if(xt){var pt=Oe.formats(),ye=this.quill.getFormat(Y.index,1);Z=b.default.attributes.diff(pt,ye)||{},se=xt.length()}}this.quill.deleteText(Y.index,ne,_.default.sources.USER),Object.keys(Z).length>0&&this.quill.formatLine(Y.index+se-1,ne,Z,_.default.sources.USER)}}function $(Y){var X=this.quill.getLines(Y),ne={};if(X.length>1){var Z=X[0].formats(),se=X[X.length-1].formats();ne=b.default.attributes.diff(se,Z)||{}}this.quill.deleteText(Y,_.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(Y.index,1,ne,_.default.sources.USER),this.quill.setSelection(Y.index,_.default.sources.SILENT),this.quill.focus()}function V(Y,X){var ne=this;Y.length>0&&this.quill.scroll.deleteAt(Y.index,Y.length);var Z=Object.keys(X.format).reduce(function(se,pe){return N.default.query(pe,N.default.Scope.BLOCK)&&!Array.isArray(X.format[pe])&&(se[pe]=X.format[pe]),se},{});this.quill.insertText(Y.index,` 868`,Z,_.default.sources.USER),this.quill.setSelection(Y.index+1,_.default.sources.SILENT),this.quill.focus(),Object.keys(X.format).forEach(function(se){Z[se]==null&&(Array.isArray(X.format[se])||se!=="link"&&ne.quill.format(se,X.format[se],_.default.sources.USER))})}function z(Y){return{key:U.keys.TAB,shiftKey:!Y,format:{"code-block":!0},handler:function(ne){var Z=N.default.query("code-block"),se=ne.index,pe=ne.length,oe=this.quill.scroll.descendant(Z,se),Oe=o(oe,2),$e=Oe[0],Ze=Oe[1];if($e!=null){var xt=this.quill.getIndex($e),pt=$e.newlineIndex(Ze,!0)+1,ye=$e.newlineIndex(xt+Ze+pe),ve=$e.domNode.textContent.slice(pt,ye).split(` 869`);Ze=0,ve.forEach(function(Me,Be){Y?($e.insertAt(pt+Ze,Z.TAB),Ze+=Z.TAB.length,Be===0?se+=Z.TAB.length:pe+=Z.TAB.length):Me.startsWith(Z.TAB)&&($e.deleteAt(pt+Ze,Z.TAB.length),Ze-=Z.TAB.length,Be===0?se-=Z.TAB.length:pe-=Z.TAB.length),Ze+=Me.length+1}),this.quill.update(_.default.sources.USER),this.quill.setSelection(se,pe,_.default.sources.SILENT)}}}}function Q(Y){return{key:Y[0].toUpperCase(),shortKey:!0,handler:function(ne,Z){this.quill.format(Y,!Z.format[Y],_.default.sources.USER)}}}function J(Y){if(typeof Y=="string"||typeof Y=="number")return J({key:Y});if((typeof Y>"u"?"undefined":s(Y))==="object"&&(Y=(0,u.default)(Y,!1)),typeof Y.key=="string")if(U.keys[Y.key.toUpperCase()]!=null)Y.key=U.keys[Y.key.toUpperCase()];else if(Y.key.length===1)Y.key=Y.key.toUpperCase().charCodeAt(0);else return null;return Y.shortKey&&(Y[H]=Y.shortKey,delete Y.shortKey),Y}r.default=U,r.SHORTKEY=H}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function b(w,N){var S=[],_=!0,E=!1,k=void 0;try{for(var O=w[Symbol.iterator](),I;!(_=(I=O.next()).done)&&(S.push(I.value),!(N&&S.length===N));_=!0);}catch(A){E=!0,k=A}finally{try{!_&&O.return&&O.return()}finally{if(E)throw k}}return S}return function(w,N){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return b(w,N);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function b(w,N,S){w===null&&(w=Function.prototype);var _=Object.getOwnPropertyDescriptor(w,N);if(_===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,N,S)}else{if("value"in _)return _.value;var k=_.get;return k===void 0?void 0:k.call(S)}},l=(function(){function b(w,N){for(var S=0;S<N.length;S++){var _=N[S];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}return function(w,N,S){return N&&b(w.prototype,N),S&&b(w,S),w}})(),c=i(0),u=p(c),d=i(7),f=p(d);function p(b){return b&&b.__esModule?b:{default:b}}function m(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function x(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function y(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var v=(function(b){y(w,b),l(w,null,[{key:"value",value:function(){}}]);function w(N,S){m(this,w);var _=x(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,N));return _.selection=S,_.textNode=document.createTextNode(w.CONTENTS),_.domNode.appendChild(_.textNode),_._length=0,_}return l(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(S,_){if(this._length!==0)return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,S,_);for(var E=this,k=0;E!=null&&E.statics.scope!==u.default.Scope.BLOCK_BLOT;)k+=E.offset(E.parent),E=E.parent;E!=null&&(this._length=w.CONTENTS.length,E.optimize(),E.formatAt(k,w.CONTENTS.length,S,_),this._length=0)}},{key:"index",value:function(S,_){return S===this.textNode?0:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,S,_)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var S=this.textNode,_=this.selection.getNativeRange(),E=void 0,k=void 0,O=void 0;if(_!=null&&_.start.node===S&&_.end.node===S){var I=[S,_.start.offset,_.end.offset];E=I[0],k=I[1],O=I[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var A=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof f.default?(E=this.next.domNode,this.next.insertAt(0,A),this.textNode.data=w.CONTENTS):(this.textNode.data=A,this.parent.insertBefore(u.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),k!=null){var C=[k,O].map(function(D){return Math.max(0,Math.min(E.data.length,D-1))}),R=s(C,2);return k=R[0],O=R[1],{startNode:E,startOffset:k,endNode:E,endOffset:O}}}}},{key:"update",value:function(S,_){var E=this;if(S.some(function(O){return O.type==="characterData"&&O.target===E.textNode})){var k=this.restore();k&&(_.range=k)}}},{key:"value",value:function(){return""}}]),w})(u.default.Embed);v.blotName="cursor",v.className="ql-cursor",v.tagName="span",v.CONTENTS="\uFEFF",r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=u(s),l=i(4),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function f(x,y){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:x}function p(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(x,y):x.__proto__=y)}var m=(function(x){p(y,x);function y(){return d(this,y),f(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return y})(o.default.Container);m.allowedChildren=[c.default,l.BlockEmbed,m],r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var s=(function(){function v(b,w){for(var N=0;N<w.length;N++){var S=w[N];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,w,N){return w&&v(b.prototype,w),N&&v(b,N),b}})(),o=function v(b,w,N){b===null&&(b=Function.prototype);var S=Object.getOwnPropertyDescriptor(b,w);if(S===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:v(_,w,N)}else{if("value"in S)return S.value;var E=S.get;return E===void 0?void 0:E.call(N)}},l=i(0),c=u(l);function u(v){return v&&v.__esModule?v:{default:v}}function d(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function f(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function p(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var m=(function(v){p(b,v);function b(){return d(this,b),f(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"value",value:function(N){var S=o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,N);return S.startsWith("rgb(")?(S=S.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+S.split(",").map(function(_){return("00"+parseInt(_).toString(16)).slice(-2)}).join("")):S}}]),b})(c.default.Attributor.Style),x=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),y=new m("color","color",{scope:c.default.Scope.INLINE});r.ColorAttributor=m,r.ColorClass=x,r.ColorStyle=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var s=(function(){function y(v,b){for(var w=0;w<b.length;w++){var N=b[w];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(v,N.key,N)}}return function(v,b,w){return b&&y(v.prototype,b),w&&y(v,w),v}})(),o=function y(v,b,w){v===null&&(v=Function.prototype);var N=Object.getOwnPropertyDescriptor(v,b);if(N===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:y(S,b,w)}else{if("value"in N)return N.value;var _=N.get;return _===void 0?void 0:_.call(w)}},l=i(6),c=u(l);function u(y){return y&&y.__esModule?y:{default:y}}function d(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function f(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function p(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var m=(function(y){p(v,y);function v(){return d(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"format",value:function(w,N){if(w!==this.statics.blotName||!N)return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"format",this).call(this,w,N);N=this.constructor.sanitize(N),this.domNode.setAttribute("href",N)}}],[{key:"create",value:function(w){var N=o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,w);return w=this.sanitize(w),N.setAttribute("href",w),N.setAttribute("rel","noopener noreferrer"),N.setAttribute("target","_blank"),N}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return x(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),v})(c.default);m.blotName="link",m.tagName="A",m.SANITIZED_URL="about:blank",m.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function x(y,v){var b=document.createElement("a");b.href=y;var w=b.href.slice(0,b.href.indexOf(":"));return v.indexOf(w)>-1}r.default=m,r.sanitize=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},o=(function(){function v(b,w){for(var N=0;N<w.length;N++){var S=w[N];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,w,N){return w&&v(b.prototype,w),N&&v(b,N),b}})(),l=i(23),c=f(l),u=i(107),d=f(u);function f(v){return v&&v.__esModule?v:{default:v}}function p(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}var m=0;function x(v,b){v.setAttribute(b,v.getAttribute(b)!=="true")}var y=(function(){function v(b){var w=this;p(this,v),this.select=b,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(N){switch(N.keyCode){case c.default.keys.ENTER:w.togglePicker();break;case c.default.keys.ESCAPE:w.escape(),N.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(v,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),x(this.label,"aria-expanded"),x(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var N=this,S=document.createElement("span");return S.tabIndex="0",S.setAttribute("role","button"),S.classList.add("ql-picker-item"),w.hasAttribute("value")&&S.setAttribute("data-value",w.getAttribute("value")),w.textContent&&S.setAttribute("data-label",w.textContent),S.addEventListener("click",function(){N.selectItem(S,!0)}),S.addEventListener("keydown",function(_){switch(_.keyCode){case c.default.keys.ENTER:N.selectItem(S,!0),_.preventDefault();break;case c.default.keys.ESCAPE:N.escape(),_.preventDefault();break}}),S}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,N=document.createElement("span");N.classList.add("ql-picker-options"),N.setAttribute("aria-hidden","true"),N.tabIndex="-1",N.id="ql-picker-options-"+m,m+=1,this.label.setAttribute("aria-controls",N.id),this.options=N,[].slice.call(this.select.options).forEach(function(S){var _=w.buildItem(S);N.appendChild(_),S.selected===!0&&w.selectItem(_)}),this.container.appendChild(N)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(N){w.container.setAttribute(N.name,N.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=this.container.querySelector(".ql-selected");if(w!==S&&(S!=null&&S.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),N))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":s(Event))==="object"){var _=document.createEvent("Event");_.initEvent("change",!0,!0),this.select.dispatchEvent(_)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var N=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(N)}else this.selectItem(null);var S=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",S)}}]),v})();r.default=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(0),o=F(s),l=i(5),c=F(l),u=i(4),d=F(u),f=i(16),p=F(f),m=i(25),x=F(m),y=i(24),v=F(y),b=i(35),w=F(b),N=i(6),S=F(N),_=i(22),E=F(_),k=i(7),O=F(k),I=i(55),A=F(I),C=i(42),R=F(C),D=i(23),q=F(D);function F(H){return H&&H.__esModule?H:{default:H}}c.default.register({"blots/block":d.default,"blots/block/embed":u.BlockEmbed,"blots/break":p.default,"blots/container":x.default,"blots/cursor":v.default,"blots/embed":w.default,"blots/inline":S.default,"blots/scroll":E.default,"blots/text":O.default,"modules/clipboard":A.default,"modules/history":R.default,"modules/keyboard":q.default}),o.default.register(d.default,p.default,v.default,S.default,E.default,O.default),r.default=c.default}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(1),o=(function(){function l(c){this.domNode=c,this.domNode[s.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(c){if(this.tagName==null)throw new s.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof c=="string"&&(c=c.toUpperCase(),parseInt(c).toString()===c&&(c=parseInt(c))),typeof c=="number"?u=document.createElement(this.tagName[c-1]):this.tagName.indexOf(c)>-1?u=document.createElement(c):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var c=this.domNode.cloneNode(!1);return s.create(c)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[s.DATA_KEY]},l.prototype.deleteAt=function(c,u){var d=this.isolate(c,u);d.remove()},l.prototype.formatAt=function(c,u,d,f){var p=this.isolate(c,u);if(s.query(d,s.Scope.BLOT)!=null&&f)p.wrap(d,f);else if(s.query(d,s.Scope.ATTRIBUTE)!=null){var m=s.create(this.statics.scope);p.wrap(m),m.format(d,f)}},l.prototype.insertAt=function(c,u,d){var f=d==null?s.create("text",u):s.create(u,d),p=this.split(c);this.parent.insertBefore(f,p)},l.prototype.insertInto=function(c,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var d=null;c.children.insertBefore(this,u),u!=null&&(d=u.domNode),(this.domNode.parentNode!=c.domNode||this.domNode.nextSibling!=d)&&c.domNode.insertBefore(this.domNode,d),this.parent=c,this.attach()},l.prototype.isolate=function(c,u){var d=this.split(c);return d.split(u),d},l.prototype.length=function(){return 1},l.prototype.offset=function(c){return c===void 0&&(c=this.parent),this.parent==null||this==c?0:this.parent.children.offset(this)+this.parent.offset(c)},l.prototype.optimize=function(c){this.domNode[s.DATA_KEY]!=null&&delete this.domNode[s.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(c){c.parent!=null&&(c.parent.insertBefore(this,c.next),c.remove())},l.prototype.replaceWith=function(c,u){var d=typeof c=="string"?s.create(c,u):c;return d.replace(this),d},l.prototype.split=function(c,u){return c===0?this:this.next},l.prototype.update=function(c,u){},l.prototype.wrap=function(c,u){var d=typeof c=="string"?s.create(c,u):c;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},l.blotName="abstract",l})();r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(12),o=i(32),l=i(33),c=i(1),u=(function(){function d(f){this.attributes={},this.domNode=f,this.build()}return d.prototype.attribute=function(f,p){p?f.add(this.domNode,p)&&(f.value(this.domNode)!=null?this.attributes[f.attrName]=f:delete this.attributes[f.attrName]):(f.remove(this.domNode),delete this.attributes[f.attrName])},d.prototype.build=function(){var f=this;this.attributes={};var p=s.default.keys(this.domNode),m=o.default.keys(this.domNode),x=l.default.keys(this.domNode);p.concat(m).concat(x).forEach(function(y){var v=c.query(y,c.Scope.ATTRIBUTE);v instanceof s.default&&(f.attributes[v.attrName]=v)})},d.prototype.copy=function(f){var p=this;Object.keys(this.attributes).forEach(function(m){var x=p.attributes[m].value(p.domNode);f.format(m,x)})},d.prototype.move=function(f){var p=this;this.copy(f),Object.keys(this.attributes).forEach(function(m){p.attributes[m].remove(p.domNode)}),this.attributes={}},d.prototype.values=function(){var f=this;return Object.keys(this.attributes).reduce(function(p,m){return p[m]=f.attributes[m].value(f.domNode),p},{})},d})();r.default=u}),(function(n,r,i){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){u(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(u,d){var f=u.getAttribute("class")||"";return f.split(/\s+/).filter(function(p){return p.indexOf(d+"-")===0})}var c=(function(u){s(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.keys=function(f){return(f.getAttribute("class")||"").split(/\s+/).map(function(p){return p.split("-").slice(0,-1).join("-")})},d.prototype.add=function(f,p){return this.canAdd(f,p)?(this.remove(f),f.classList.add(this.keyName+"-"+p),!0):!1},d.prototype.remove=function(f){var p=l(f,this.keyName);p.forEach(function(m){f.classList.remove(m)}),f.classList.length===0&&f.removeAttribute("class")},d.prototype.value=function(f){var p=l(f,this.keyName)[0]||"",m=p.slice(this.keyName.length+1);return this.canAdd(f,m)?m:""},d})(o.default);r.default=c}),(function(n,r,i){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){u(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(u){var d=u.split("-"),f=d.slice(1).map(function(p){return p[0].toUpperCase()+p.slice(1)}).join("");return d[0]+f}var c=(function(u){s(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.keys=function(f){return(f.getAttribute("style")||"").split(";").map(function(p){var m=p.split(":");return m[0].trim()})},d.prototype.add=function(f,p){return this.canAdd(f,p)?(f.style[l(this.keyName)]=p,!0):!1},d.prototype.remove=function(f){f.style[l(this.keyName)]="",f.getAttribute("style")||f.removeAttribute("style")},d.prototype.value=function(f){var p=f.style[l(this.keyName)];return this.canAdd(f,p)?p:""},d})(o.default);r.default=c}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function c(u,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(u,p.key,p)}}return function(u,d,f){return d&&c(u.prototype,d),f&&c(u,f),u}})();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(u,d){o(this,c),this.quill=u,this.options=d,this.modules={}}return s(c,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(f){d.modules[f]==null&&d.addModule(f)})}},{key:"addModule",value:function(d){var f=this.quill.constructor.import("modules/"+d);return this.modules[d]=new f(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),c})();l.DEFAULTS={modules:{}},l.themes={default:l},r.default=l}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function b(w,N){for(var S=0;S<N.length;S++){var _=N[S];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}return function(w,N,S){return N&&b(w.prototype,N),S&&b(w,S),w}})(),o=function b(w,N,S){w===null&&(w=Function.prototype);var _=Object.getOwnPropertyDescriptor(w,N);if(_===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,N,S)}else{if("value"in _)return _.value;var k=_.get;return k===void 0?void 0:k.call(S)}},l=i(0),c=f(l),u=i(7),d=f(u);function f(b){return b&&b.__esModule?b:{default:b}}function p(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function m(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function x(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var y="\uFEFF",v=(function(b){x(w,b);function w(N){p(this,w);var S=m(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,N));return S.contentNode=document.createElement("span"),S.contentNode.setAttribute("contenteditable",!1),[].slice.call(S.domNode.childNodes).forEach(function(_){S.contentNode.appendChild(_)}),S.leftGuard=document.createTextNode(y),S.rightGuard=document.createTextNode(y),S.domNode.appendChild(S.leftGuard),S.domNode.appendChild(S.contentNode),S.domNode.appendChild(S.rightGuard),S}return s(w,[{key:"index",value:function(S,_){return S===this.leftGuard?0:S===this.rightGuard?1:o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,S,_)}},{key:"restore",value:function(S){var _=void 0,E=void 0,k=S.data.split(y).join("");if(S===this.leftGuard)if(this.prev instanceof d.default){var O=this.prev.length();this.prev.insertAt(O,k),_={startNode:this.prev.domNode,startOffset:O+k.length}}else E=document.createTextNode(k),this.parent.insertBefore(c.default.create(E),this),_={startNode:E,startOffset:k.length};else S===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,k),_={startNode:this.next.domNode,startOffset:k.length}):(E=document.createTextNode(k),this.parent.insertBefore(c.default.create(E),this.next),_={startNode:E,startOffset:k.length}));return S.data=y,_}},{key:"update",value:function(S,_){var E=this;S.forEach(function(k){if(k.type==="characterData"&&(k.target===E.leftGuard||k.target===E.rightGuard)){var O=E.restore(k.target);O&&(_.range=O)}})}}]),w})(c.default.Embed);r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var c={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},u=new o.default.Attributor.Attribute("align","align",c),d=new o.default.Attributor.Class("align","ql-align",c),f=new o.default.Attributor.Style("align","text-align",c);r.AlignAttribute=u,r.AlignClass=d,r.AlignStyle=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var s=i(0),o=c(s),l=i(26);function c(f){return f&&f.__esModule?f:{default:f}}var u=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),d=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});r.BackgroundClass=u,r.BackgroundStyle=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var s=i(0),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}var c={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},u=new o.default.Attributor.Attribute("direction","dir",c),d=new o.default.Attributor.Class("direction","ql-direction",c),f=new o.default.Attributor.Style("direction","direction",c);r.DirectionAttribute=u,r.DirectionClass=d,r.DirectionStyle=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var s=(function(){function b(w,N){for(var S=0;S<N.length;S++){var _=N[S];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}return function(w,N,S){return N&&b(w.prototype,N),S&&b(w,S),w}})(),o=function b(w,N,S){w===null&&(w=Function.prototype);var _=Object.getOwnPropertyDescriptor(w,N);if(_===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:b(E,N,S)}else{if("value"in _)return _.value;var k=_.get;return k===void 0?void 0:k.call(S)}},l=i(0),c=u(l);function u(b){return b&&b.__esModule?b:{default:b}}function d(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function f(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function p(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var m={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},x=new c.default.Attributor.Class("font","ql-font",m),y=(function(b){p(w,b);function w(){return d(this,w),f(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return s(w,[{key:"value",value:function(S){return o(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,S).replace(/["']/g,"")}}]),w})(c.default.Attributor.Style),v=new y("font","font-family",m);r.FontStyle=v,r.FontClass=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var s=i(0),o=l(s);function l(d){return d&&d.__esModule?d:{default:d}}var c=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),u=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=c,r.SizeStyle=u}),(function(n,r,i){n.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var s=(function(){function N(S,_){for(var E=0;E<_.length;E++){var k=_[E];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}return function(S,_,E){return _&&N(S.prototype,_),E&&N(S,E),S}})(),o=i(0),l=p(o),c=i(5),u=p(c),d=i(9),f=p(d);function p(N){return N&&N.__esModule?N:{default:N}}function m(N,S){if(!(N instanceof S))throw new TypeError("Cannot call a class as a function")}function x(N,S){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:N}function y(N,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);N.prototype=Object.create(S&&S.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(N,S):N.__proto__=S)}var v=(function(N){y(S,N);function S(_,E){m(this,S);var k=x(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,_,E));return k.lastRecorded=0,k.ignoreChange=!1,k.clear(),k.quill.on(u.default.events.EDITOR_CHANGE,function(O,I,A,C){O!==u.default.events.TEXT_CHANGE||k.ignoreChange||(!k.options.userOnly||C===u.default.sources.USER?k.record(I,A):k.transform(I))}),k.quill.keyboard.addBinding({key:"Z",shortKey:!0},k.undo.bind(k)),k.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},k.redo.bind(k)),/Win/i.test(navigator.platform)&&k.quill.keyboard.addBinding({key:"Y",shortKey:!0},k.redo.bind(k)),k}return s(S,[{key:"change",value:function(E,k){if(this.stack[E].length!==0){var O=this.stack[E].pop();this.stack[k].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[E],u.default.sources.USER),this.ignoreChange=!1;var I=w(O[E]);this.quill.setSelection(I)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(E,k){if(E.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(k),I=Date.now();if(this.lastRecorded+this.options.delay>I&&this.stack.undo.length>0){var A=this.stack.undo.pop();O=O.compose(A.undo),E=A.redo.compose(E)}else this.lastRecorded=I;this.stack.undo.push({redo:E,undo:O}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(E){this.stack.undo.forEach(function(k){k.undo=E.transform(k.undo,!0),k.redo=E.transform(k.redo,!0)}),this.stack.redo.forEach(function(k){k.undo=E.transform(k.undo,!0),k.redo=E.transform(k.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),S})(f.default);v.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function b(N){var S=N.ops[N.ops.length-1];return S==null?!1:S.insert!=null?typeof S.insert=="string"&&S.insert.endsWith(` 870`):S.attributes!=null?Object.keys(S.attributes).some(function(_){return l.default.query(_,l.default.Scope.BLOCK)!=null}):!1}function w(N){var S=N.reduce(function(E,k){return E+=k.delete||0,E},0),_=N.length()-S;return b(N)&&(_-=1),_}r.default=v,r.getLastChangeIndex=w}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var s=(function(){function V(z,Q){for(var J=0;J<Q.length;J++){var Y=Q[J];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(z,Y.key,Y)}}return function(z,Q,J){return Q&&V(z.prototype,Q),J&&V(z,J),z}})(),o=function V(z,Q,J){z===null&&(z=Function.prototype);var Y=Object.getOwnPropertyDescriptor(z,Q);if(Y===void 0){var X=Object.getPrototypeOf(z);return X===null?void 0:V(X,Q,J)}else{if("value"in Y)return Y.value;var ne=Y.get;return ne===void 0?void 0:ne.call(J)}},l=i(3),c=I(l),u=i(2),d=I(u),f=i(8),p=I(f),m=i(23),x=I(m),y=i(34),v=I(y),b=i(59),w=I(b),N=i(60),S=I(N),_=i(28),E=I(_),k=i(61),O=I(k);function I(V){return V&&V.__esModule?V:{default:V}}function A(V,z){if(!(V instanceof z))throw new TypeError("Cannot call a class as a function")}function C(V,z){if(!V)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z&&(typeof z=="object"||typeof z=="function")?z:V}function R(V,z){if(typeof z!="function"&&z!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof z);V.prototype=Object.create(z&&z.prototype,{constructor:{value:V,enumerable:!1,writable:!0,configurable:!0}}),z&&(Object.setPrototypeOf?Object.setPrototypeOf(V,z):V.__proto__=z)}var D=[!1,"center","right","justify"],q=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],F=[!1,"serif","monospace"],H=["1","2","3",!1],U=["small",!1,"large","huge"],W=(function(V){R(z,V);function z(Q,J){A(this,z);var Y=C(this,(z.__proto__||Object.getPrototypeOf(z)).call(this,Q,J)),X=function ne(Z){if(!document.body.contains(Q.root))return document.body.removeEventListener("click",ne);Y.tooltip!=null&&!Y.tooltip.root.contains(Z.target)&&document.activeElement!==Y.tooltip.textbox&&!Y.quill.hasFocus()&&Y.tooltip.hide(),Y.pickers!=null&&Y.pickers.forEach(function(se){se.container.contains(Z.target)||se.close()})};return Q.emitter.listenDOM("click",document.body,X),Y}return s(z,[{key:"addModule",value:function(J){var Y=o(z.prototype.__proto__||Object.getPrototypeOf(z.prototype),"addModule",this).call(this,J);return J==="toolbar"&&this.extendToolbar(Y),Y}},{key:"buildButtons",value:function(J,Y){J.forEach(function(X){var ne=X.getAttribute("class")||"";ne.split(/\s+/).forEach(function(Z){if(Z.startsWith("ql-")&&(Z=Z.slice(3),Y[Z]!=null))if(Z==="direction")X.innerHTML=Y[Z][""]+Y[Z].rtl;else if(typeof Y[Z]=="string")X.innerHTML=Y[Z];else{var se=X.value||"";se!=null&&Y[Z][se]&&(X.innerHTML=Y[Z][se])}})})}},{key:"buildPickers",value:function(J,Y){var X=this;this.pickers=J.map(function(Z){if(Z.classList.contains("ql-align"))return Z.querySelector("option")==null&&$(Z,D),new S.default(Z,Y.align);if(Z.classList.contains("ql-background")||Z.classList.contains("ql-color")){var se=Z.classList.contains("ql-background")?"background":"color";return Z.querySelector("option")==null&&$(Z,q,se==="background"?"#ffffff":"#000000"),new w.default(Z,Y[se])}else return Z.querySelector("option")==null&&(Z.classList.contains("ql-font")?$(Z,F):Z.classList.contains("ql-header")?$(Z,H):Z.classList.contains("ql-size")&&$(Z,U)),new E.default(Z)});var ne=function(){X.pickers.forEach(function(se){se.update()})};this.quill.on(p.default.events.EDITOR_CHANGE,ne)}}]),z})(v.default);W.DEFAULTS=(0,c.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var z=this,Q=this.container.querySelector("input.ql-image[type=file]");Q==null&&(Q=document.createElement("input"),Q.setAttribute("type","file"),Q.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Q.classList.add("ql-image"),Q.addEventListener("change",function(){if(Q.files!=null&&Q.files[0]!=null){var J=new FileReader;J.onload=function(Y){var X=z.quill.getSelection(!0);z.quill.updateContents(new d.default().retain(X.index).delete(X.length).insert({image:Y.target.result}),p.default.sources.USER),z.quill.setSelection(X.index+1,p.default.sources.SILENT),Q.value=""},J.readAsDataURL(Q.files[0])}}),this.container.appendChild(Q)),Q.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var G=(function(V){R(z,V);function z(Q,J){A(this,z);var Y=C(this,(z.__proto__||Object.getPrototypeOf(z)).call(this,Q,J));return Y.textbox=Y.root.querySelector('input[type="text"]'),Y.listen(),Y}return s(z,[{key:"listen",value:function(){var J=this;this.textbox.addEventListener("keydown",function(Y){x.default.match(Y,"enter")?(J.save(),Y.preventDefault()):x.default.match(Y,"escape")&&(J.cancel(),Y.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),Y!=null?this.textbox.value=Y:J!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+J)||""),this.root.setAttribute("data-mode",J)}},{key:"restoreFocus",value:function(){var J=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=J}},{key:"save",value:function(){var J=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var Y=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",J,p.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",J,p.default.sources.USER)),this.quill.root.scrollTop=Y;break}case"video":J=L(J);case"formula":{if(!J)break;var X=this.quill.getSelection(!0);if(X!=null){var ne=X.index+X.length;this.quill.insertEmbed(ne,this.root.getAttribute("data-mode"),J,p.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ne+1," ",p.default.sources.USER),this.quill.setSelection(ne+2,p.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),z})(O.default);function L(V){var z=V.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||V.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return z?(z[1]||"https")+"://www.youtube.com/embed/"+z[2]+"?showinfo=0":(z=V.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(z[1]||"https")+"://player.vimeo.com/video/"+z[2]+"/":V}function $(V,z){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;z.forEach(function(J){var Y=document.createElement("option");J===Q?Y.setAttribute("selected","selected"):Y.setAttribute("value",J),V.appendChild(Y)})}r.BaseTooltip=G,r.default=W}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var c,u=this.iterator();c=u();)if(c===l)return!0;return!1},o.prototype.insertBefore=function(l,c){l&&(l.next=c,c!=null?(l.prev=c.prev,c.prev!=null&&(c.prev.next=l),c.prev=l,c===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var c=0,u=this.head;u!=null;){if(u===l)return c;c+=u.length(),u=u.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var c=l;return l!=null&&(l=l.next),c}},o.prototype.find=function(l,c){c===void 0&&(c=!1);for(var u,d=this.iterator();u=d();){var f=u.length();if(l<f||c&&l===f&&(u.next==null||u.next.length()!==0))return[u,l];l-=f}return[null,0]},o.prototype.forEach=function(l){for(var c,u=this.iterator();c=u();)l(c)},o.prototype.forEachAt=function(l,c,u){if(!(c<=0))for(var d=this.find(l),f=d[0],p=d[1],m,x=l-p,y=this.iterator(f);(m=y())&&x<l+c;){var v=m.length();l>x?u(m,l-x,Math.min(c,x+v-l)):u(m,0,Math.min(v,l+c-x)),x+=v}},o.prototype.map=function(l){return this.reduce(function(c,u){return c.push(l(u)),c},[])},o.prototype.reduce=function(l,c){for(var u,d=this.iterator();u=d();)c=l(c,u);return c},o})();r.default=s}),(function(n,r,i){var s=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var x in m)m.hasOwnProperty(x)&&(p[x]=m[x])};return function(p,m){f(p,m);function x(){this.constructor=p}p.prototype=m===null?Object.create(m):(x.prototype=m.prototype,new x)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(17),l=i(1),c={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,d=(function(f){s(p,f);function p(m){var x=f.call(this,m)||this;return x.scroll=x,x.observer=new MutationObserver(function(y){x.update(y)}),x.observer.observe(x.domNode,c),x.attach(),x}return p.prototype.detach=function(){f.prototype.detach.call(this),this.observer.disconnect()},p.prototype.deleteAt=function(m,x){this.update(),m===0&&x===this.length()?this.children.forEach(function(y){y.remove()}):f.prototype.deleteAt.call(this,m,x)},p.prototype.formatAt=function(m,x,y,v){this.update(),f.prototype.formatAt.call(this,m,x,y,v)},p.prototype.insertAt=function(m,x,y){this.update(),f.prototype.insertAt.call(this,m,x,y)},p.prototype.optimize=function(m,x){var y=this;m===void 0&&(m=[]),x===void 0&&(x={}),f.prototype.optimize.call(this,x);for(var v=[].slice.call(this.observer.takeRecords());v.length>0;)m.push(v.pop());for(var b=function(_,E){E===void 0&&(E=!0),!(_==null||_===y)&&_.domNode.parentNode!=null&&(_.domNode[l.DATA_KEY].mutations==null&&(_.domNode[l.DATA_KEY].mutations=[]),E&&b(_.parent))},w=function(_){_.domNode[l.DATA_KEY]==null||_.domNode[l.DATA_KEY].mutations==null||(_ instanceof o.default&&_.children.forEach(w),_.optimize(x))},N=m,S=0;N.length>0;S+=1){if(S>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(N.forEach(function(_){var E=l.find(_.target,!0);E!=null&&(E.domNode===_.target&&(_.type==="childList"?(b(l.find(_.previousSibling,!1)),[].forEach.call(_.addedNodes,function(k){var O=l.find(k,!1);b(O,!1),O instanceof o.default&&O.children.forEach(function(I){b(I,!1)})})):_.type==="attributes"&&b(E.prev)),b(E))}),this.children.forEach(w),N=[].slice.call(this.observer.takeRecords()),v=N.slice();v.length>0;)m.push(v.pop())}},p.prototype.update=function(m,x){var y=this;x===void 0&&(x={}),m=m||this.observer.takeRecords(),m.map(function(v){var b=l.find(v.target,!0);return b==null?null:b.domNode[l.DATA_KEY].mutations==null?(b.domNode[l.DATA_KEY].mutations=[v],b):(b.domNode[l.DATA_KEY].mutations.push(v),null)}).forEach(function(v){v==null||v===y||v.domNode[l.DATA_KEY]==null||v.update(v.domNode[l.DATA_KEY].mutations||[],x)}),this.domNode[l.DATA_KEY].mutations!=null&&f.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,x),this.optimize(m,x)},p.blotName="scroll",p.defaultChild="block",p.scope=l.Scope.BLOCK_BLOT,p.tagName="DIV",p})(o.default);r.default=d}),(function(n,r,i){var s=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var m in p)p.hasOwnProperty(m)&&(f[m]=p[m])};return function(f,p){d(f,p);function m(){this.constructor=f}f.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1);function c(d,f){if(Object.keys(d).length!==Object.keys(f).length)return!1;for(var p in d)if(d[p]!==f[p])return!1;return!0}var u=(function(d){s(f,d);function f(){return d!==null&&d.apply(this,arguments)||this}return f.formats=function(p){if(p.tagName!==f.tagName)return d.formats.call(this,p)},f.prototype.format=function(p,m){var x=this;p===this.statics.blotName&&!m?(this.children.forEach(function(y){y instanceof o.default||(y=y.wrap(f.blotName,!0)),x.attributes.copy(y)}),this.unwrap()):d.prototype.format.call(this,p,m)},f.prototype.formatAt=function(p,m,x,y){if(this.formats()[x]!=null||l.query(x,l.Scope.ATTRIBUTE)){var v=this.isolate(p,m);v.format(x,y)}else d.prototype.formatAt.call(this,p,m,x,y)},f.prototype.optimize=function(p){d.prototype.optimize.call(this,p);var m=this.formats();if(Object.keys(m).length===0)return this.unwrap();var x=this.next;x instanceof f&&x.prev===this&&c(m,x.formats())&&(x.moveChildren(this),x.remove())},f.blotName="inline",f.scope=l.Scope.INLINE_BLOT,f.tagName="SPAN",f})(o.default);r.default=u}),(function(n,r,i){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){u(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1),c=(function(u){s(d,u);function d(){return u!==null&&u.apply(this,arguments)||this}return d.formats=function(f){var p=l.query(d.blotName).tagName;if(f.tagName!==p)return u.formats.call(this,f)},d.prototype.format=function(f,p){l.query(f,l.Scope.BLOCK)!=null&&(f===this.statics.blotName&&!p?this.replaceWith(d.blotName):u.prototype.format.call(this,f,p))},d.prototype.formatAt=function(f,p,m,x){l.query(m,l.Scope.BLOCK)!=null?this.format(m,x):u.prototype.formatAt.call(this,f,p,m,x)},d.prototype.insertAt=function(f,p,m){if(m==null||l.query(p,l.Scope.INLINE)!=null)u.prototype.insertAt.call(this,f,p,m);else{var x=this.split(f),y=l.create(p,m);x.parent.insertBefore(y,x)}},d.prototype.update=function(f,p){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,f,p)},d.blotName="block",d.scope=l.Scope.BLOCK_BLOT,d.tagName="P",d})(o.default);r.default=c}),(function(n,r,i){var s=this&&this.__extends||(function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,d){u.__proto__=d}||function(u,d){for(var f in d)d.hasOwnProperty(f)&&(u[f]=d[f])};return function(u,d){c(u,d);function f(){this.constructor=u}u.prototype=d===null?Object.create(d):(f.prototype=d.prototype,new f)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=(function(c){s(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.formats=function(d){},u.prototype.format=function(d,f){c.prototype.formatAt.call(this,0,this.length(),d,f)},u.prototype.formatAt=function(d,f,p,m){d===0&&f===this.length()?this.format(p,m):c.prototype.formatAt.call(this,d,f,p,m)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u})(o.default);r.default=l}),(function(n,r,i){var s=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,f){d.__proto__=f}||function(d,f){for(var p in f)f.hasOwnProperty(p)&&(d[p]=f[p])};return function(d,f){u(d,f);function p(){this.constructor=d}d.prototype=f===null?Object.create(f):(p.prototype=f.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=i(1),c=(function(u){s(d,u);function d(f){var p=u.call(this,f)||this;return p.text=p.statics.value(p.domNode),p}return d.create=function(f){return document.createTextNode(f)},d.value=function(f){var p=f.data;return p.normalize&&(p=p.normalize()),p},d.prototype.deleteAt=function(f,p){this.domNode.data=this.text=this.text.slice(0,f)+this.text.slice(f+p)},d.prototype.index=function(f,p){return this.domNode===f?p:-1},d.prototype.insertAt=function(f,p,m){m==null?(this.text=this.text.slice(0,f)+p+this.text.slice(f),this.domNode.data=this.text):u.prototype.insertAt.call(this,f,p,m)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(f){u.prototype.optimize.call(this,f),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(f,p){return[this.domNode,f]},d.prototype.split=function(f,p){if(p===void 0&&(p=!1),!p){if(f===0)return this;if(f===this.length())return this.next}var m=l.create(this.domNode.splitText(f));return this.parent.insertBefore(m,this.next),this.text=this.statics.value(this.domNode),m},d.prototype.update=function(f,p){var m=this;f.some(function(x){return x.type==="characterData"&&x.target===m.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=l.Scope.INLINE_BLOT,d})(o.default);r.default=c}),(function(n,r,i){var s=document.createElement("div");if(s.classList.toggle("test-class",!1),s.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,c){return arguments.length>1&&!this.contains(l)==!c?c:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,c){return c=c||0,this.substr(c,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,c){var u=this.toString();(typeof c!="number"||!isFinite(c)||Math.floor(c)!==c||c>u.length)&&(c=u.length),c-=l.length;var d=u.indexOf(l,c);return d!==-1&&d===c}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(c){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof c!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),d=u.length>>>0,f=arguments[1],p,m=0;m<d;m++)if(p=u[m],c.call(f,p,m,u))return p}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(n,r){var i=-1,s=1,o=0;function l(S,_,E){if(S==_)return S?[[o,S]]:[];(E<0||S.length<E)&&(E=null);var k=f(S,_),O=S.substring(0,k);S=S.substring(k),_=_.substring(k),k=p(S,_);var I=S.substring(S.length-k);S=S.substring(0,S.length-k),_=_.substring(0,_.length-k);var A=c(S,_);return O&&A.unshift([o,O]),I&&A.push([o,I]),x(A),E!=null&&(A=b(A,E)),A=w(A),A}function c(S,_){var E;if(!S)return[[s,_]];if(!_)return[[i,S]];var k=S.length>_.length?S:_,O=S.length>_.length?_:S,I=k.indexOf(O);if(I!=-1)return E=[[s,k.substring(0,I)],[o,O],[s,k.substring(I+O.length)]],S.length>_.length&&(E[0][0]=E[2][0]=i),E;if(O.length==1)return[[i,S],[s,_]];var A=m(S,_);if(A){var C=A[0],R=A[1],D=A[2],q=A[3],F=A[4],H=l(C,D),U=l(R,q);return H.concat([[o,F]],U)}return u(S,_)}function u(S,_){for(var E=S.length,k=_.length,O=Math.ceil((E+k)/2),I=O,A=2*O,C=new Array(A),R=new Array(A),D=0;D<A;D++)C[D]=-1,R[D]=-1;C[I+1]=0,R[I+1]=0;for(var q=E-k,F=q%2!=0,H=0,U=0,W=0,G=0,L=0;L<O;L++){for(var $=-L+H;$<=L-U;$+=2){var V=I+$,z;$==-L||$!=L&&C[V-1]<C[V+1]?z=C[V+1]:z=C[V-1]+1;for(var Q=z-$;z<E&&Q<k&&S.charAt(z)==_.charAt(Q);)z++,Q++;if(C[V]=z,z>E)U+=2;else if(Q>k)H+=2;else if(F){var J=I+q-$;if(J>=0&&J<A&&R[J]!=-1){var Y=E-R[J];if(z>=Y)return d(S,_,z,Q)}}}for(var X=-L+W;X<=L-G;X+=2){var J=I+X,Y;X==-L||X!=L&&R[J-1]<R[J+1]?Y=R[J+1]:Y=R[J-1]+1;for(var ne=Y-X;Y<E&&ne<k&&S.charAt(E-Y-1)==_.charAt(k-ne-1);)Y++,ne++;if(R[J]=Y,Y>E)G+=2;else if(ne>k)W+=2;else if(!F){var V=I+q-X;if(V>=0&&V<A&&C[V]!=-1){var z=C[V],Q=I+z-V;if(Y=E-Y,z>=Y)return d(S,_,z,Q)}}}}return[[i,S],[s,_]]}function d(S,_,E,k){var O=S.substring(0,E),I=_.substring(0,k),A=S.substring(E),C=_.substring(k),R=l(O,I),D=l(A,C);return R.concat(D)}function f(S,_){if(!S||!_||S.charAt(0)!=_.charAt(0))return 0;for(var E=0,k=Math.min(S.length,_.length),O=k,I=0;E<O;)S.substring(I,O)==_.substring(I,O)?(E=O,I=E):k=O,O=Math.floor((k-E)/2+E);return O}function p(S,_){if(!S||!_||S.charAt(S.length-1)!=_.charAt(_.length-1))return 0;for(var E=0,k=Math.min(S.length,_.length),O=k,I=0;E<O;)S.substring(S.length-O,S.length-I)==_.substring(_.length-O,_.length-I)?(E=O,I=E):k=O,O=Math.floor((k-E)/2+E);return O}function m(S,_){var E=S.length>_.length?S:_,k=S.length>_.length?_:S;if(E.length<4||k.length*2<E.length)return null;function O(U,W,G){for(var L=U.substring(G,G+Math.floor(U.length/4)),$=-1,V="",z,Q,J,Y;($=W.indexOf(L,$+1))!=-1;){var X=f(U.substring(G),W.substring($)),ne=p(U.substring(0,G),W.substring(0,$));V.length<ne+X&&(V=W.substring($-ne,$)+W.substring($,$+X),z=U.substring(0,G-ne),Q=U.substring(G+X),J=W.substring(0,$-ne),Y=W.substring($+X))}return V.length*2>=U.length?[z,Q,J,Y,V]:null}var I=O(E,k,Math.ceil(E.length/4)),A=O(E,k,Math.ceil(E.length/2)),C;if(!I&&!A)return null;A?I?C=I[4].length>A[4].length?I:A:C=A:C=I;var R,D,q,F;S.length>_.length?(R=C[0],D=C[1],q=C[2],F=C[3]):(q=C[0],F=C[1],R=C[2],D=C[3]);var H=C[4];return[R,D,q,F,H]}function x(S){S.push([o,""]);for(var _=0,E=0,k=0,O="",I="",A;_<S.length;)switch(S[_][0]){case s:k++,I+=S[_][1],_++;break;case i:E++,O+=S[_][1],_++;break;case o:E+k>1?(E!==0&&k!==0&&(A=f(I,O),A!==0&&(_-E-k>0&&S[_-E-k-1][0]==o?S[_-E-k-1][1]+=I.substring(0,A):(S.splice(0,0,[o,I.substring(0,A)]),_++),I=I.substring(A),O=O.substring(A)),A=p(I,O),A!==0&&(S[_][1]=I.substring(I.length-A)+S[_][1],I=I.substring(0,I.length-A),O=O.substring(0,O.length-A))),E===0?S.splice(_-k,E+k,[s,I]):k===0?S.splice(_-E,E+k,[i,O]):S.splice(_-E-k,E+k,[i,O],[s,I]),_=_-E-k+(E?1:0)+(k?1:0)+1):_!==0&&S[_-1][0]==o?(S[_-1][1]+=S[_][1],S.splice(_,1)):_++,k=0,E=0,O="",I="";break}S[S.length-1][1]===""&&S.pop();var C=!1;for(_=1;_<S.length-1;)S[_-1][0]==o&&S[_+1][0]==o&&(S[_][1].substring(S[_][1].length-S[_-1][1].length)==S[_-1][1]?(S[_][1]=S[_-1][1]+S[_][1].substring(0,S[_][1].length-S[_-1][1].length),S[_+1][1]=S[_-1][1]+S[_+1][1],S.splice(_-1,1),C=!0):S[_][1].substring(0,S[_+1][1].length)==S[_+1][1]&&(S[_-1][1]+=S[_+1][1],S[_][1]=S[_][1].substring(S[_+1][1].length)+S[_+1][1],S.splice(_+1,1),C=!0)),_++;C&&x(S)}var y=l;y.INSERT=s,y.DELETE=i,y.EQUAL=o,n.exports=y;function v(S,_){if(_===0)return[o,S];for(var E=0,k=0;k<S.length;k++){var O=S[k];if(O[0]===i||O[0]===o){var I=E+O[1].length;if(_===I)return[k+1,S];if(_<I){S=S.slice();var A=_-E,C=[O[0],O[1].slice(0,A)],R=[O[0],O[1].slice(A)];return S.splice(k,1,C,R),[k+1,S]}else E=I}}throw new Error("cursor_pos is out of bounds!")}function b(S,_){var E=v(S,_),k=E[1],O=E[0],I=k[O],A=k[O+1];if(I==null)return S;if(I[0]!==o)return S;if(A!=null&&I[1]+A[1]===A[1]+I[1])return k.splice(O,2,A,I),N(k,O,2);if(A!=null&&A[1].indexOf(I[1])===0){k.splice(O,2,[A[0],I[1]],[0,I[1]]);var C=A[1].slice(I[1].length);return C.length>0&&k.splice(O+2,0,[A[0],C]),N(k,O,3)}else return S}function w(S){for(var _=!1,E=function(A){return A.charCodeAt(0)>=56320&&A.charCodeAt(0)<=57343},k=function(A){return A.charCodeAt(A.length-1)>=55296&&A.charCodeAt(A.length-1)<=56319},O=2;O<S.length;O+=1)S[O-2][0]===o&&k(S[O-2][1])&&S[O-1][0]===i&&E(S[O-1][1])&&S[O][0]===s&&E(S[O][1])&&(_=!0,S[O-1][1]=S[O-2][1].slice(-1)+S[O-1][1],S[O][1]=S[O-2][1].slice(-1)+S[O][1],S[O-2][1]=S[O-2][1].slice(0,-1));if(!_)return S;for(var I=[],O=0;O<S.length;O+=1)S[O][1].length>0&&I.push(S[O]);return I}function N(S,_,E){for(var k=_+E-1;k>=0&&k>=_-1;k--)if(k+1<S.length){var O=S[k],I=S[k+1];O[0]===I[1]&&S.splice(k,2,[O[0],O[1]+I[1]])}return S}}),(function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(s){var o=[];for(var l in s)o.push(l);return o}}),(function(n,r){var i=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";r=n.exports=i?s:o,r.supported=s;function s(l){return Object.prototype.toString.call(l)=="[object Arguments]"}r.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}}),(function(n,r){var i=Object.prototype.hasOwnProperty,s="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(s=!1));function l(u,d,f){this.fn=u,this.context=d,this.once=f||!1}function c(){this._events=new o,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],f,p;if(this._eventsCount===0)return d;for(p in f=this._events)i.call(f,p)&&d.push(s?p.slice(1):p);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(f)):d},c.prototype.listeners=function(d,f){var p=s?s+d:d,m=this._events[p];if(f)return!!m;if(!m)return[];if(m.fn)return[m.fn];for(var x=0,y=m.length,v=new Array(y);x<y;x++)v[x]=m[x].fn;return v},c.prototype.emit=function(d,f,p,m,x,y){var v=s?s+d:d;if(!this._events[v])return!1;var b=this._events[v],w=arguments.length,N,S;if(b.fn){switch(b.once&&this.removeListener(d,b.fn,void 0,!0),w){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,f),!0;case 3:return b.fn.call(b.context,f,p),!0;case 4:return b.fn.call(b.context,f,p,m),!0;case 5:return b.fn.call(b.context,f,p,m,x),!0;case 6:return b.fn.call(b.context,f,p,m,x,y),!0}for(S=1,N=new Array(w-1);S<w;S++)N[S-1]=arguments[S];b.fn.apply(b.context,N)}else{var _=b.length,E;for(S=0;S<_;S++)switch(b[S].once&&this.removeListener(d,b[S].fn,void 0,!0),w){case 1:b[S].fn.call(b[S].context);break;case 2:b[S].fn.call(b[S].context,f);break;case 3:b[S].fn.call(b[S].context,f,p);break;case 4:b[S].fn.call(b[S].context,f,p,m);break;default:if(!N)for(E=1,N=new Array(w-1);E<w;E++)N[E-1]=arguments[E];b[S].fn.apply(b[S].context,N)}}return!0},c.prototype.on=function(d,f,p){var m=new l(f,p||this),x=s?s+d:d;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],m]:this._events[x].push(m):(this._events[x]=m,this._eventsCount++),this},c.prototype.once=function(d,f,p){var m=new l(f,p||this,!0),x=s?s+d:d;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],m]:this._events[x].push(m):(this._events[x]=m,this._eventsCount++),this},c.prototype.removeListener=function(d,f,p,m){var x=s?s+d:d;if(!this._events[x])return this;if(!f)return--this._eventsCount===0?this._events=new o:delete this._events[x],this;var y=this._events[x];if(y.fn)y.fn===f&&(!m||y.once)&&(!p||y.context===p)&&(--this._eventsCount===0?this._events=new o:delete this._events[x]);else{for(var v=0,b=[],w=y.length;v<w;v++)(y[v].fn!==f||m&&!y[v].once||p&&y[v].context!==p)&&b.push(y[v]);b.length?this._events[x]=b.length===1?b[0]:b:--this._eventsCount===0?this._events=new o:delete this._events[x]}return this},c.prototype.removeAllListeners=function(d){var f;return d?(f=s?s+d:d,this._events[f]&&(--this._eventsCount===0?this._events=new o:delete this._events[f])):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prototype.setMaxListeners=function(){return this},c.prefixed=s,c.EventEmitter=c,typeof n<"u"&&(n.exports=c)}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ye){return typeof ye}:function(ye){return ye&&typeof Symbol=="function"&&ye.constructor===Symbol&&ye!==Symbol.prototype?"symbol":typeof ye},o=(function(){function ye(ve,Me){var Be=[],je=!0,mt=!1,bt=void 0;try{for(var wt=ve[Symbol.iterator](),xe;!(je=(xe=wt.next()).done)&&(Be.push(xe.value),!(Me&&Be.length===Me));je=!0);}catch(ke){mt=!0,bt=ke}finally{try{!je&&wt.return&&wt.return()}finally{if(mt)throw bt}}return Be}return function(ve,Me){if(Array.isArray(ve))return ve;if(Symbol.iterator in Object(ve))return ye(ve,Me);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function ye(ve,Me){for(var Be=0;Be<Me.length;Be++){var je=Me[Be];je.enumerable=je.enumerable||!1,je.configurable=!0,"value"in je&&(je.writable=!0),Object.defineProperty(ve,je.key,je)}}return function(ve,Me,Be){return Me&&ye(ve.prototype,Me),Be&&ye(ve,Be),ve}})(),c=i(3),u=R(c),d=i(2),f=R(d),p=i(0),m=R(p),x=i(5),y=R(x),v=i(10),b=R(v),w=i(9),N=R(w),S=i(36),_=i(37),E=i(13),k=R(E),O=i(26),I=i(38),A=i(39),C=i(40);function R(ye){return ye&&ye.__esModule?ye:{default:ye}}function D(ye,ve,Me){return ve in ye?Object.defineProperty(ye,ve,{value:Me,enumerable:!0,configurable:!0,writable:!0}):ye[ve]=Me,ye}function q(ye,ve){if(!(ye instanceof ve))throw new TypeError("Cannot call a class as a function")}function F(ye,ve){if(!ye)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve&&(typeof ve=="object"||typeof ve=="function")?ve:ye}function H(ye,ve){if(typeof ve!="function"&&ve!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ve);ye.prototype=Object.create(ve&&ve.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),ve&&(Object.setPrototypeOf?Object.setPrototypeOf(ye,ve):ye.__proto__=ve)}var U=(0,b.default)("quill:clipboard"),W="__ql-matcher",G=[[Node.TEXT_NODE,pt],[Node.TEXT_NODE,$e],["br",pe],[Node.ELEMENT_NODE,$e],[Node.ELEMENT_NODE,se],[Node.ELEMENT_NODE,Ze],[Node.ELEMENT_NODE,Z],[Node.ELEMENT_NODE,xt],["li",Oe],["b",ne.bind(ne,"bold")],["i",ne.bind(ne,"italic")],["style",oe]],L=[S.AlignAttribute,I.DirectionAttribute].reduce(function(ye,ve){return ye[ve.keyName]=ve,ye},{}),$=[S.AlignStyle,_.BackgroundStyle,O.ColorStyle,I.DirectionStyle,A.FontStyle,C.SizeStyle].reduce(function(ye,ve){return ye[ve.keyName]=ve,ye},{}),V=(function(ye){H(ve,ye);function ve(Me,Be){q(this,ve);var je=F(this,(ve.__proto__||Object.getPrototypeOf(ve)).call(this,Me,Be));return je.quill.root.addEventListener("paste",je.onPaste.bind(je)),je.container=je.quill.addContainer("ql-clipboard"),je.container.setAttribute("contenteditable",!0),je.container.setAttribute("tabindex",-1),je.matchers=[],G.concat(je.options.matchers).forEach(function(mt){var bt=o(mt,2),wt=bt[0],xe=bt[1];!Be.matchVisual&&xe===Ze||je.addMatcher(wt,xe)}),je}return l(ve,[{key:"addMatcher",value:function(Be,je){this.matchers.push([Be,je])}},{key:"convert",value:function(Be){if(typeof Be=="string")return this.container.innerHTML=Be.replace(/\>\r?\n +\</g,"><"),this.convert();var je=this.quill.getFormat(this.quill.selection.savedRange.index);if(je[k.default.blotName]){var mt=this.container.innerText;return this.container.innerHTML="",new f.default().insert(mt,D({},k.default.blotName,je[k.default.blotName]))}var bt=this.prepareMatching(),wt=o(bt,2),xe=wt[0],ke=wt[1],ze=X(this.container,xe,ke);return J(ze,` 871`)&&ze.ops[ze.ops.length-1].attributes==null&&(ze=ze.compose(new f.default().retain(ze.length()-1).delete(1))),U.log("convert",this.container.innerHTML,ze),this.container.innerHTML="",ze}},{key:"dangerouslyPasteHTML",value:function(Be,je){var mt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof Be=="string")this.quill.setContents(this.convert(Be),je),this.quill.setSelection(0,y.default.sources.SILENT);else{var bt=this.convert(je);this.quill.updateContents(new f.default().retain(Be).concat(bt),mt),this.quill.setSelection(Be+bt.length(),y.default.sources.SILENT)}}},{key:"onPaste",value:function(Be){var je=this;if(!(Be.defaultPrevented||!this.quill.isEnabled())){var mt=this.quill.getSelection(),bt=new f.default().retain(mt.index),wt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(y.default.sources.SILENT),setTimeout(function(){bt=bt.concat(je.convert()).delete(mt.length),je.quill.updateContents(bt,y.default.sources.USER),je.quill.setSelection(bt.length()-mt.length,y.default.sources.SILENT),je.quill.scrollingContainer.scrollTop=wt,je.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Be=this,je=[],mt=[];return this.matchers.forEach(function(bt){var wt=o(bt,2),xe=wt[0],ke=wt[1];switch(xe){case Node.TEXT_NODE:mt.push(ke);break;case Node.ELEMENT_NODE:je.push(ke);break;default:[].forEach.call(Be.container.querySelectorAll(xe),function(ze){ze[W]=ze[W]||[],ze[W].push(ke)});break}}),[je,mt]}}]),ve})(N.default);V.DEFAULTS={matchers:[],matchVisual:!0};function z(ye,ve,Me){return(typeof ve>"u"?"undefined":s(ve))==="object"?Object.keys(ve).reduce(function(Be,je){return z(Be,je,ve[je])},ye):ye.reduce(function(Be,je){return je.attributes&&je.attributes[ve]?Be.push(je):Be.insert(je.insert,(0,u.default)({},D({},ve,Me),je.attributes))},new f.default)}function Q(ye){if(ye.nodeType!==Node.ELEMENT_NODE)return{};var ve="__ql-computed-style";return ye[ve]||(ye[ve]=window.getComputedStyle(ye))}function J(ye,ve){for(var Me="",Be=ye.ops.length-1;Be>=0&&Me.length<ve.length;--Be){var je=ye.ops[Be];if(typeof je.insert!="string")break;Me=je.insert+Me}return Me.slice(-1*ve.length)===ve}function Y(ye){if(ye.childNodes.length===0)return!1;var ve=Q(ye);return["block","list-item"].indexOf(ve.display)>-1}function X(ye,ve,Me){return ye.nodeType===ye.TEXT_NODE?Me.reduce(function(Be,je){return je(ye,Be)},new f.default):ye.nodeType===ye.ELEMENT_NODE?[].reduce.call(ye.childNodes||[],function(Be,je){var mt=X(je,ve,Me);return je.nodeType===ye.ELEMENT_NODE&&(mt=ve.reduce(function(bt,wt){return wt(je,bt)},mt),mt=(je[W]||[]).reduce(function(bt,wt){return wt(je,bt)},mt)),Be.concat(mt)},new f.default):new f.default}function ne(ye,ve,Me){return z(Me,ye,!0)}function Z(ye,ve){var Me=m.default.Attributor.Attribute.keys(ye),Be=m.default.Attributor.Class.keys(ye),je=m.default.Attributor.Style.keys(ye),mt={};return Me.concat(Be).concat(je).forEach(function(bt){var wt=m.default.query(bt,m.default.Scope.ATTRIBUTE);wt!=null&&(mt[wt.attrName]=wt.value(ye),mt[wt.attrName])||(wt=L[bt],wt!=null&&(wt.attrName===bt||wt.keyName===bt)&&(mt[wt.attrName]=wt.value(ye)||void 0),wt=$[bt],wt!=null&&(wt.attrName===bt||wt.keyName===bt)&&(wt=$[bt],mt[wt.attrName]=wt.value(ye)||void 0))}),Object.keys(mt).length>0&&(ve=z(ve,mt)),ve}function se(ye,ve){var Me=m.default.query(ye);if(Me==null)return ve;if(Me.prototype instanceof m.default.Embed){var Be={},je=Me.value(ye);je!=null&&(Be[Me.blotName]=je,ve=new f.default().insert(Be,Me.formats(ye)))}else typeof Me.formats=="function"&&(ve=z(ve,Me.blotName,Me.formats(ye)));return ve}function pe(ye,ve){return J(ve,` 872`)||ve.insert(` 873`),ve}function oe(){return new f.default}function Oe(ye,ve){var Me=m.default.query(ye);if(Me==null||Me.blotName!=="list-item"||!J(ve,` 874`))return ve;for(var Be=-1,je=ye.parentNode;!je.classList.contains("ql-clipboard");)(m.default.query(je)||{}).blotName==="list"&&(Be+=1),je=je.parentNode;return Be<=0?ve:ve.compose(new f.default().retain(ve.length()-1).retain(1,{indent:Be}))}function $e(ye,ve){return J(ve,` 875`)||(Y(ye)||ve.length()>0&&ye.nextSibling&&Y(ye.nextSibling))&&ve.insert(` 876`),ve}function Ze(ye,ve){if(Y(ye)&&ye.nextElementSibling!=null&&!J(ve,` 877 878`)){var Me=ye.offsetHeight+parseFloat(Q(ye).marginTop)+parseFloat(Q(ye).marginBottom);ye.nextElementSibling.offsetTop>ye.offsetTop+Me*1.5&&ve.insert(` 879`)}return ve}function xt(ye,ve){var Me={},Be=ye.style||{};return Be.fontStyle&&Q(ye).fontStyle==="italic"&&(Me.italic=!0),Be.fontWeight&&(Q(ye).fontWeight.startsWith("bold")||parseInt(Q(ye).fontWeight)>=700)&&(Me.bold=!0),Object.keys(Me).length>0&&(ve=z(ve,Me)),parseFloat(Be.textIndent||0)>0&&(ve=new f.default().insert(" ").concat(ve)),ve}function pt(ye,ve){var Me=ye.data;if(ye.parentNode.tagName==="O:P")return ve.insert(Me.trim());if(Me.trim().length===0&&ye.parentNode.classList.contains("ql-clipboard"))return ve;if(!Q(ye.parentNode).whiteSpace.startsWith("pre")){var Be=function(mt,bt){return bt=bt.replace(/[^\u00a0]/g,""),bt.length<1&&mt?" ":bt};Me=Me.replace(/\r\n/g," ").replace(/\n/g," "),Me=Me.replace(/\s\s+/g,Be.bind(Be,!0)),(ye.previousSibling==null&&Y(ye.parentNode)||ye.previousSibling!=null&&Y(ye.previousSibling))&&(Me=Me.replace(/^\s+/,Be.bind(Be,!1))),(ye.nextSibling==null&&Y(ye.parentNode)||ye.nextSibling!=null&&Y(ye.nextSibling))&&(Me=Me.replace(/\s+$/,Be.bind(Be,!1)))}return ve.insert(Me)}r.default=V,r.matchAttributor=Z,r.matchBlot=se,r.matchNewline=$e,r.matchSpacing=Ze,r.matchText=pt}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function x(y,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,v,b){return v&&x(y.prototype,v),b&&x(y,b),y}})(),o=function x(y,v,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,v);if(w===void 0){var N=Object.getPrototypeOf(y);return N===null?void 0:x(N,v,b)}else{if("value"in w)return w.value;var S=w.get;return S===void 0?void 0:S.call(b)}},l=i(6),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function f(x,y){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:x}function p(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(x,y):x.__proto__=y)}var m=(function(x){p(y,x);function y(){return d(this,y),f(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,[{key:"optimize",value:function(b){o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"optimize",this).call(this,b),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),y})(c.default);m.blotName="bold",m.tagName=["STRONG","B"],r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var s=(function(){function C(R,D){var q=[],F=!0,H=!1,U=void 0;try{for(var W=R[Symbol.iterator](),G;!(F=(G=W.next()).done)&&(q.push(G.value),!(D&&q.length===D));F=!0);}catch(L){H=!0,U=L}finally{try{!F&&W.return&&W.return()}finally{if(H)throw U}}return q}return function(R,D){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return C(R,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function C(R,D){for(var q=0;q<D.length;q++){var F=D[q];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(R,F.key,F)}}return function(R,D,q){return D&&C(R.prototype,D),q&&C(R,q),R}})(),l=i(2),c=b(l),u=i(0),d=b(u),f=i(5),p=b(f),m=i(10),x=b(m),y=i(9),v=b(y);function b(C){return C&&C.__esModule?C:{default:C}}function w(C,R,D){return R in C?Object.defineProperty(C,R,{value:D,enumerable:!0,configurable:!0,writable:!0}):C[R]=D,C}function N(C,R){if(!(C instanceof R))throw new TypeError("Cannot call a class as a function")}function S(C,R){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:C}function _(C,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);C.prototype=Object.create(R&&R.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(C,R):C.__proto__=R)}var E=(0,x.default)("quill:toolbar"),k=(function(C){_(R,C);function R(D,q){N(this,R);var F=S(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,D,q));if(Array.isArray(F.options.container)){var H=document.createElement("div");I(H,F.options.container),D.container.parentNode.insertBefore(H,D.container),F.container=H}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var U;return U=E.error("Container required for toolbar",F.options),S(F,U)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(W){F.addHandler(W,F.options.handlers[W])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(W){F.attach(W)}),F.quill.on(p.default.events.EDITOR_CHANGE,function(W,G){W===p.default.events.SELECTION_CHANGE&&F.update(G)}),F.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){var W=F.quill.selection.getRange(),G=s(W,1),L=G[0];F.update(L)}),F}return o(R,[{key:"addHandler",value:function(q,F){this.handlers[q]=F}},{key:"attach",value:function(q){var F=this,H=[].find.call(q.classList,function(W){return W.indexOf("ql-")===0});if(H){if(H=H.slice(3),q.tagName==="BUTTON"&&q.setAttribute("type","button"),this.handlers[H]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[H]==null){E.warn("ignoring attaching to disabled format",H,q);return}if(d.default.query(H)==null){E.warn("ignoring attaching to nonexistent format",H,q);return}}var U=q.tagName==="SELECT"?"change":"click";q.addEventListener(U,function(W){var G=void 0;if(q.tagName==="SELECT"){if(q.selectedIndex<0)return;var L=q.options[q.selectedIndex];L.hasAttribute("selected")?G=!1:G=L.value||!1}else q.classList.contains("ql-active")?G=!1:G=q.value||!q.hasAttribute("value"),W.preventDefault();F.quill.focus();var $=F.quill.selection.getRange(),V=s($,1),z=V[0];if(F.handlers[H]!=null)F.handlers[H].call(F,G);else if(d.default.query(H).prototype instanceof d.default.Embed){if(G=prompt("Enter "+H),!G)return;F.quill.updateContents(new c.default().retain(z.index).delete(z.length).insert(w({},H,G)),p.default.sources.USER)}else F.quill.format(H,G,p.default.sources.USER);F.update(z)}),this.controls.push([H,q])}}},{key:"update",value:function(q){var F=q==null?{}:this.quill.getFormat(q);this.controls.forEach(function(H){var U=s(H,2),W=U[0],G=U[1];if(G.tagName==="SELECT"){var L=void 0;if(q==null)L=null;else if(F[W]==null)L=G.querySelector("option[selected]");else if(!Array.isArray(F[W])){var $=F[W];typeof $=="string"&&($=$.replace(/\"/g,'\\"')),L=G.querySelector('option[value="'+$+'"]')}L==null?(G.value="",G.selectedIndex=-1):L.selected=!0}else if(q==null)G.classList.remove("ql-active");else if(G.hasAttribute("value")){var V=F[W]===G.getAttribute("value")||F[W]!=null&&F[W].toString()===G.getAttribute("value")||F[W]==null&&!G.getAttribute("value");G.classList.toggle("ql-active",V)}else G.classList.toggle("ql-active",F[W]!=null)})}}]),R})(v.default);k.DEFAULTS={};function O(C,R,D){var q=document.createElement("button");q.setAttribute("type","button"),q.classList.add("ql-"+R),D!=null&&(q.value=D),C.appendChild(q)}function I(C,R){Array.isArray(R[0])||(R=[R]),R.forEach(function(D){var q=document.createElement("span");q.classList.add("ql-formats"),D.forEach(function(F){if(typeof F=="string")O(q,F);else{var H=Object.keys(F)[0],U=F[H];Array.isArray(U)?A(q,H,U):O(q,H,U)}}),C.appendChild(q)})}function A(C,R,D){var q=document.createElement("select");q.classList.add("ql-"+R),D.forEach(function(F){var H=document.createElement("option");F!==!1?H.setAttribute("value",F):H.setAttribute("selected","selected"),q.appendChild(H)}),C.appendChild(q)}k.DEFAULTS={container:null,handlers:{clean:function(){var R=this,D=this.quill.getSelection();if(D!=null)if(D.length==0){var q=this.quill.getFormat();Object.keys(q).forEach(function(F){d.default.query(F,d.default.Scope.INLINE)!=null&&R.quill.format(F,!1)})}else this.quill.removeFormat(D,p.default.sources.USER)},direction:function(R){var D=this.quill.getFormat().align;R==="rtl"&&D==null?this.quill.format("align","right",p.default.sources.USER):!R&&D==="right"&&this.quill.format("align",!1,p.default.sources.USER),this.quill.format("direction",R,p.default.sources.USER)},indent:function(R){var D=this.quill.getSelection(),q=this.quill.getFormat(D),F=parseInt(q.indent||0);if(R==="+1"||R==="-1"){var H=R==="+1"?1:-1;q.direction==="rtl"&&(H*=-1),this.quill.format("indent",F+H,p.default.sources.USER)}},link:function(R){R===!0&&(R=prompt("Enter link URL:")),this.quill.format("link",R,p.default.sources.USER)},list:function(R){var D=this.quill.getSelection(),q=this.quill.getFormat(D);R==="check"?q.list==="checked"||q.list==="unchecked"?this.quill.format("list",!1,p.default.sources.USER):this.quill.format("list","unchecked",p.default.sources.USER):this.quill.format("list",R,p.default.sources.USER)}}},r.default=k,r.addControls=I}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function x(y,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,v,b){return v&&x(y.prototype,v),b&&x(y,b),y}})(),o=function x(y,v,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,v);if(w===void 0){var N=Object.getPrototypeOf(y);return N===null?void 0:x(N,v,b)}else{if("value"in w)return w.value;var S=w.get;return S===void 0?void 0:S.call(b)}},l=i(28),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function f(x,y){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:x}function p(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(x,y):x.__proto__=y)}var m=(function(x){p(y,x);function y(v,b){d(this,y);var w=f(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,v));return w.label.innerHTML=b,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(N){N.classList.add("ql-primary")}),w}return s(y,[{key:"buildItem",value:function(b){var w=o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"buildItem",this).call(this,b);return w.style.backgroundColor=b.getAttribute("value")||"",w}},{key:"selectItem",value:function(b,w){o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"selectItem",this).call(this,b,w);var N=this.label.querySelector(".ql-color-label"),S=b&&b.getAttribute("data-value")||"";N&&(N.tagName==="line"?N.style.stroke=S:N.style.fill=S)}}]),y})(c.default);r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function x(y,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,v,b){return v&&x(y.prototype,v),b&&x(y,b),y}})(),o=function x(y,v,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,v);if(w===void 0){var N=Object.getPrototypeOf(y);return N===null?void 0:x(N,v,b)}else{if("value"in w)return w.value;var S=w.get;return S===void 0?void 0:S.call(b)}},l=i(28),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function f(x,y){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:x}function p(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(x,y):x.__proto__=y)}var m=(function(x){p(y,x);function y(v,b){d(this,y);var w=f(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,v));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(N){N.innerHTML=b[N.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return s(y,[{key:"selectItem",value:function(b,w){o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"selectItem",this).call(this,b,w),b=b||this.defaultItem,this.label.innerHTML=b.innerHTML}}]),y})(c.default);r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function c(u,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(u,p.key,p)}}return function(u,d,f){return d&&c(u.prototype,d),f&&c(u,f),u}})();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(u,d){var f=this;o(this,c),this.quill=u,this.boundsContainer=d||document.body,this.root=u.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){f.root.style.marginTop=-1*f.quill.root.scrollTop+"px"}),this.hide()}return s(c,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var f=d.left+d.width/2-this.root.offsetWidth/2,p=d.bottom+this.quill.root.scrollTop;this.root.style.left=f+"px",this.root.style.top=p+"px",this.root.classList.remove("ql-flip");var m=this.boundsContainer.getBoundingClientRect(),x=this.root.getBoundingClientRect(),y=0;if(x.right>m.right&&(y=m.right-x.right,this.root.style.left=f+y+"px"),x.left<m.left&&(y=m.left-x.left,this.root.style.left=f+y+"px"),x.bottom>m.bottom){var v=x.bottom-x.top,b=d.bottom-d.top+v;this.root.style.top=p-b+"px",this.root.classList.add("ql-flip")}return y}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),c})();r.default=l}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function A(C,R){var D=[],q=!0,F=!1,H=void 0;try{for(var U=C[Symbol.iterator](),W;!(q=(W=U.next()).done)&&(D.push(W.value),!(R&&D.length===R));q=!0);}catch(G){F=!0,H=G}finally{try{!q&&U.return&&U.return()}finally{if(F)throw H}}return D}return function(C,R){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return A(C,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function A(C,R,D){C===null&&(C=Function.prototype);var q=Object.getOwnPropertyDescriptor(C,R);if(q===void 0){var F=Object.getPrototypeOf(C);return F===null?void 0:A(F,R,D)}else{if("value"in q)return q.value;var H=q.get;return H===void 0?void 0:H.call(D)}},l=(function(){function A(C,R){for(var D=0;D<R.length;D++){var q=R[D];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(C,q.key,q)}}return function(C,R,D){return R&&A(C.prototype,R),D&&A(C,D),C}})(),c=i(3),u=N(c),d=i(8),f=N(d),p=i(43),m=N(p),x=i(27),y=N(x),v=i(15),b=i(41),w=N(b);function N(A){return A&&A.__esModule?A:{default:A}}function S(A,C){if(!(A instanceof C))throw new TypeError("Cannot call a class as a function")}function _(A,C){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:A}function E(A,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);A.prototype=Object.create(C&&C.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(A,C):A.__proto__=C)}var k=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=(function(A){E(C,A);function C(R,D){S(this,C),D.modules.toolbar!=null&&D.modules.toolbar.container==null&&(D.modules.toolbar.container=k);var q=_(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,R,D));return q.quill.container.classList.add("ql-snow"),q}return l(C,[{key:"extendToolbar",value:function(D){D.container.classList.add("ql-snow"),this.buildButtons([].slice.call(D.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(D.container.querySelectorAll("select")),w.default),this.tooltip=new I(this.quill,this.options.bounds),D.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(q,F){D.handlers.link.call(D,!F.format.link)})}}]),C})(m.default);O.DEFAULTS=(0,u.default)(!0,{},m.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(C){if(C){var R=this.quill.getSelection();if(R==null||R.length==0)return;var D=this.quill.getText(R);/^\S+@\S+\.\S+$/.test(D)&&D.indexOf("mailto:")!==0&&(D="mailto:"+D);var q=this.quill.theme.tooltip;q.edit("link",D)}else this.quill.format("link",!1)}}}}});var I=(function(A){E(C,A);function C(R,D){S(this,C);var q=_(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,R,D));return q.preview=q.root.querySelector("a.ql-preview"),q}return l(C,[{key:"listen",value:function(){var D=this;o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(q){D.root.classList.contains("ql-editing")?D.save():D.edit("link",D.preview.textContent),q.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(q){if(D.linkRange!=null){var F=D.linkRange;D.restoreFocus(),D.quill.formatText(F,"link",!1,f.default.sources.USER),delete D.linkRange}q.preventDefault(),D.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(q,F,H){if(q!=null){if(q.length===0&&H===f.default.sources.USER){var U=D.quill.scroll.descendant(y.default,q.index),W=s(U,2),G=W[0],L=W[1];if(G!=null){D.linkRange=new v.Range(q.index-L,G.length());var $=y.default.formats(G.domNode);D.preview.textContent=$,D.preview.setAttribute("href",$),D.show(),D.position(D.quill.getBounds(D.linkRange));return}}else delete D.linkRange;D.hide()}})}},{key:"show",value:function(){o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),C})(p.BaseTooltip);I.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=O}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(29),o=je(s),l=i(36),c=i(38),u=i(64),d=i(65),f=je(d),p=i(66),m=je(p),x=i(67),y=je(x),v=i(37),b=i(26),w=i(39),N=i(40),S=i(56),_=je(S),E=i(68),k=je(E),O=i(27),I=je(O),A=i(69),C=je(A),R=i(70),D=je(R),q=i(71),F=je(q),H=i(72),U=je(H),W=i(73),G=je(W),L=i(13),$=je(L),V=i(74),z=je(V),Q=i(75),J=je(Q),Y=i(57),X=je(Y),ne=i(41),Z=je(ne),se=i(28),pe=je(se),oe=i(59),Oe=je(oe),$e=i(60),Ze=je($e),xt=i(61),pt=je(xt),ye=i(108),ve=je(ye),Me=i(62),Be=je(Me);function je(mt){return mt&&mt.__esModule?mt:{default:mt}}o.default.register({"attributors/attribute/direction":c.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":v.BackgroundClass,"attributors/class/color":b.ColorClass,"attributors/class/direction":c.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":N.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":v.BackgroundStyle,"attributors/style/color":b.ColorStyle,"attributors/style/direction":c.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":N.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":c.DirectionClass,"formats/indent":u.IndentClass,"formats/background":v.BackgroundStyle,"formats/color":b.ColorStyle,"formats/font":w.FontClass,"formats/size":N.SizeClass,"formats/blockquote":f.default,"formats/code-block":$.default,"formats/header":m.default,"formats/list":y.default,"formats/bold":_.default,"formats/code":L.Code,"formats/italic":k.default,"formats/link":I.default,"formats/script":C.default,"formats/strike":D.default,"formats/underline":F.default,"formats/image":U.default,"formats/video":G.default,"formats/list/item":x.ListItem,"modules/formula":z.default,"modules/syntax":J.default,"modules/toolbar":X.default,"themes/bubble":ve.default,"themes/snow":Be.default,"ui/icons":Z.default,"ui/picker":pe.default,"ui/icon-picker":Ze.default,"ui/color-picker":Oe.default,"ui/tooltip":pt.default},!0),r.default=o.default}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var s=(function(){function y(v,b){for(var w=0;w<b.length;w++){var N=b[w];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(v,N.key,N)}}return function(v,b,w){return b&&y(v.prototype,b),w&&y(v,w),v}})(),o=function y(v,b,w){v===null&&(v=Function.prototype);var N=Object.getOwnPropertyDescriptor(v,b);if(N===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:y(S,b,w)}else{if("value"in N)return N.value;var _=N.get;return _===void 0?void 0:_.call(w)}},l=i(0),c=u(l);function u(y){return y&&y.__esModule?y:{default:y}}function d(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function f(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function p(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var m=(function(y){p(v,y);function v(){return d(this,v),f(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return s(v,[{key:"add",value:function(w,N){if(N==="+1"||N==="-1"){var S=this.value(w)||0;N=N==="+1"?S+1:S-1}return N===0?(this.remove(w),!0):o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"add",this).call(this,w,N)}},{key:"canAdd",value:function(w,N){return o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,w,N)||o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"canAdd",this).call(this,w,parseInt(N))}},{key:"value",value:function(w){return parseInt(o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"value",this).call(this,w))||void 0}}]),v})(c.default.Attributor.Class),x=new m("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(4),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function d(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var f=(function(p){d(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);f.blotName="blockquote",f.tagName="blockquote",r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function m(x,y){for(var v=0;v<y.length;v++){var b=y[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(x,b.key,b)}}return function(x,y,v){return y&&m(x.prototype,y),v&&m(x,v),x}})(),o=i(4),l=c(o);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")}function d(m,x){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:m}function f(m,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);m.prototype=Object.create(x&&x.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(m,x):m.__proto__=x)}var p=(function(m){f(x,m);function x(){return u(this,x),d(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return s(x,null,[{key:"formats",value:function(v){return this.tagName.indexOf(v.tagName)+1}}]),x})(l.default);p.blotName="header",p.tagName=["H1","H2","H3","H4","H5","H6"],r.default=p}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var s=(function(){function S(_,E){for(var k=0;k<E.length;k++){var O=E[k];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(_,O.key,O)}}return function(_,E,k){return E&&S(_.prototype,E),k&&S(_,k),_}})(),o=function S(_,E,k){_===null&&(_=Function.prototype);var O=Object.getOwnPropertyDescriptor(_,E);if(O===void 0){var I=Object.getPrototypeOf(_);return I===null?void 0:S(I,E,k)}else{if("value"in O)return O.value;var A=O.get;return A===void 0?void 0:A.call(k)}},l=i(0),c=m(l),u=i(4),d=m(u),f=i(25),p=m(f);function m(S){return S&&S.__esModule?S:{default:S}}function x(S,_,E){return _ in S?Object.defineProperty(S,_,{value:E,enumerable:!0,configurable:!0,writable:!0}):S[_]=E,S}function y(S,_){if(!(S instanceof _))throw new TypeError("Cannot call a class as a function")}function v(S,_){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:S}function b(S,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);S.prototype=Object.create(_&&_.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(S,_):S.__proto__=_)}var w=(function(S){b(_,S);function _(){return y(this,_),v(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return s(_,[{key:"format",value:function(k,O){k===N.blotName&&!O?this.replaceWith(c.default.create(this.statics.scope)):o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,k,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(k,O){return this.parent.isolate(this.offset(this.parent),this.length()),k===this.parent.statics.blotName?(this.parent.replaceWith(k,O),this):(this.parent.unwrap(),o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"replaceWith",this).call(this,k,O))}}],[{key:"formats",value:function(k){return k.tagName===this.tagName?void 0:o(_.__proto__||Object.getPrototypeOf(_),"formats",this).call(this,k)}}]),_})(d.default);w.blotName="list-item",w.tagName="LI";var N=(function(S){b(_,S),s(_,null,[{key:"create",value:function(k){var O=k==="ordered"?"OL":"UL",I=o(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,O);return(k==="checked"||k==="unchecked")&&I.setAttribute("data-checked",k==="checked"),I}},{key:"formats",value:function(k){if(k.tagName==="OL")return"ordered";if(k.tagName==="UL")return k.hasAttribute("data-checked")?k.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function _(E){y(this,_);var k=v(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,E)),O=function(A){if(A.target.parentNode===E){var C=k.statics.formats(E),R=c.default.find(A.target);C==="checked"?R.format("list","unchecked"):C==="unchecked"&&R.format("list","checked")}};return E.addEventListener("touchstart",O),E.addEventListener("mousedown",O),k}return s(_,[{key:"format",value:function(k,O){this.children.length>0&&this.children.tail.format(k,O)}},{key:"formats",value:function(){return x({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(k,O){if(k instanceof w)o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertBefore",this).call(this,k,O);else{var I=O==null?this.length():O.offset(this),A=this.split(I);A.parent.insertBefore(k,A)}}},{key:"optimize",value:function(k){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,k);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(k){if(k.statics.blotName!==this.statics.blotName){var O=c.default.create(this.statics.defaultChild);k.moveChildren(O),this.appendChild(O)}o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"replace",this).call(this,k)}}]),_})(p.default);N.blotName="list",N.scope=c.default.Scope.BLOCK_BLOT,N.tagName=["OL","UL"],N.defaultChild="list-item",N.allowedChildren=[w],r.ListItem=w,r.default=N}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(56),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function d(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var f=(function(p){d(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);f.blotName="italic",f.tagName=["EM","I"],r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function x(y,v){for(var b=0;b<v.length;b++){var w=v[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,v,b){return v&&x(y.prototype,v),b&&x(y,b),y}})(),o=function x(y,v,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,v);if(w===void 0){var N=Object.getPrototypeOf(y);return N===null?void 0:x(N,v,b)}else{if("value"in w)return w.value;var S=w.get;return S===void 0?void 0:S.call(b)}},l=i(6),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function d(x,y){if(!(x instanceof y))throw new TypeError("Cannot call a class as a function")}function f(x,y){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:x}function p(x,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);x.prototype=Object.create(y&&y.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(x,y):x.__proto__=y)}var m=(function(x){p(y,x);function y(){return d(this,y),f(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return s(y,null,[{key:"create",value:function(b){return b==="super"?document.createElement("sup"):b==="sub"?document.createElement("sub"):o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,b)}},{key:"formats",value:function(b){if(b.tagName==="SUB")return"sub";if(b.tagName==="SUP")return"super"}}]),y})(c.default);m.blotName="script",m.tagName=["SUB","SUP"],r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function d(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var f=(function(p){d(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);f.blotName="strike",f.tagName="S",r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i(6),o=l(s);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function d(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var f=(function(p){d(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);f.blotName="underline",f.tagName="U",r.default=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function v(b,w){for(var N=0;N<w.length;N++){var S=w[N];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,w,N){return w&&v(b.prototype,w),N&&v(b,N),b}})(),o=function v(b,w,N){b===null&&(b=Function.prototype);var S=Object.getOwnPropertyDescriptor(b,w);if(S===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:v(_,w,N)}else{if("value"in S)return S.value;var E=S.get;return E===void 0?void 0:E.call(N)}},l=i(0),c=d(l),u=i(27);function d(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function p(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function m(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var x=["alt","height","width"],y=(function(v){m(b,v);function b(){return f(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"format",value:function(N,S){x.indexOf(N)>-1?S?this.domNode.setAttribute(N,S):this.domNode.removeAttribute(N):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,N,S)}}],[{key:"create",value:function(N){var S=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,N);return typeof N=="string"&&S.setAttribute("src",this.sanitize(N)),S}},{key:"formats",value:function(N){return x.reduce(function(S,_){return N.hasAttribute(_)&&(S[_]=N.getAttribute(_)),S},{})}},{key:"match",value:function(N){return/\.(jpe?g|gif|png)$/.test(N)||/^data:image\/.+;base64/.test(N)}},{key:"sanitize",value:function(N){return(0,u.sanitize)(N,["http","https","data"])?N:"//:0"}},{key:"value",value:function(N){return N.getAttribute("src")}}]),b})(c.default.Embed);y.blotName="image",y.tagName="IMG",r.default=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=(function(){function v(b,w){for(var N=0;N<w.length;N++){var S=w[N];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(b,S.key,S)}}return function(b,w,N){return w&&v(b.prototype,w),N&&v(b,N),b}})(),o=function v(b,w,N){b===null&&(b=Function.prototype);var S=Object.getOwnPropertyDescriptor(b,w);if(S===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:v(_,w,N)}else{if("value"in S)return S.value;var E=S.get;return E===void 0?void 0:E.call(N)}},l=i(4),c=i(27),u=d(c);function d(v){return v&&v.__esModule?v:{default:v}}function f(v,b){if(!(v instanceof b))throw new TypeError("Cannot call a class as a function")}function p(v,b){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:v}function m(v,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);v.prototype=Object.create(b&&b.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(v,b):v.__proto__=b)}var x=["height","width"],y=(function(v){m(b,v);function b(){return f(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return s(b,[{key:"format",value:function(N,S){x.indexOf(N)>-1?S?this.domNode.setAttribute(N,S):this.domNode.removeAttribute(N):o(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,N,S)}}],[{key:"create",value:function(N){var S=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,N);return S.setAttribute("frameborder","0"),S.setAttribute("allowfullscreen",!0),S.setAttribute("src",this.sanitize(N)),S}},{key:"formats",value:function(N){return x.reduce(function(S,_){return N.hasAttribute(_)&&(S[_]=N.getAttribute(_)),S},{})}},{key:"sanitize",value:function(N){return u.default.sanitize(N)}},{key:"value",value:function(N){return N.getAttribute("src")}}]),b})(l.BlockEmbed);y.blotName="video",y.className="ql-video",y.tagName="IFRAME",r.default=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var s=(function(){function N(S,_){for(var E=0;E<_.length;E++){var k=_[E];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}return function(S,_,E){return _&&N(S.prototype,_),E&&N(S,E),S}})(),o=function N(S,_,E){S===null&&(S=Function.prototype);var k=Object.getOwnPropertyDescriptor(S,_);if(k===void 0){var O=Object.getPrototypeOf(S);return O===null?void 0:N(O,_,E)}else{if("value"in k)return k.value;var I=k.get;return I===void 0?void 0:I.call(E)}},l=i(35),c=m(l),u=i(5),d=m(u),f=i(9),p=m(f);function m(N){return N&&N.__esModule?N:{default:N}}function x(N,S){if(!(N instanceof S))throw new TypeError("Cannot call a class as a function")}function y(N,S){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:N}function v(N,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);N.prototype=Object.create(S&&S.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(N,S):N.__proto__=S)}var b=(function(N){v(S,N);function S(){return x(this,S),y(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return s(S,null,[{key:"create",value:function(E){var k=o(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,E);return typeof E=="string"&&(window.katex.render(E,k,{throwOnError:!1,errorColor:"#f00"}),k.setAttribute("data-value",E)),k}},{key:"value",value:function(E){return E.getAttribute("data-value")}}]),S})(c.default);b.blotName="formula",b.className="ql-formula",b.tagName="SPAN";var w=(function(N){v(S,N),s(S,null,[{key:"register",value:function(){d.default.register(b,!0)}}]);function S(){x(this,S);var _=y(this,(S.__proto__||Object.getPrototypeOf(S)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return _}return S})(p.default);r.FormulaBlot=b,r.default=w}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var s=(function(){function E(k,O){for(var I=0;I<O.length;I++){var A=O[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(k,A.key,A)}}return function(k,O,I){return O&&E(k.prototype,O),I&&E(k,I),k}})(),o=function E(k,O,I){k===null&&(k=Function.prototype);var A=Object.getOwnPropertyDescriptor(k,O);if(A===void 0){var C=Object.getPrototypeOf(k);return C===null?void 0:E(C,O,I)}else{if("value"in A)return A.value;var R=A.get;return R===void 0?void 0:R.call(I)}},l=i(0),c=y(l),u=i(5),d=y(u),f=i(9),p=y(f),m=i(13),x=y(m);function y(E){return E&&E.__esModule?E:{default:E}}function v(E,k){if(!(E instanceof k))throw new TypeError("Cannot call a class as a function")}function b(E,k){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:E}function w(E,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);E.prototype=Object.create(k&&k.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(E,k):E.__proto__=k)}var N=(function(E){w(k,E);function k(){return v(this,k),b(this,(k.__proto__||Object.getPrototypeOf(k)).apply(this,arguments))}return s(k,[{key:"replaceWith",value:function(I){this.domNode.textContent=this.domNode.textContent,this.attach(),o(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"replaceWith",this).call(this,I)}},{key:"highlight",value:function(I){var A=this.domNode.textContent;this.cachedText!==A&&((A.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=I(A),this.domNode.normalize(),this.attach()),this.cachedText=A)}}]),k})(x.default);N.className="ql-syntax";var S=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),_=(function(E){w(k,E),s(k,null,[{key:"register",value:function(){d.default.register(S,!0),d.default.register(N,!0)}}]);function k(O,I){v(this,k);var A=b(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,O,I));if(typeof A.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var C=null;return A.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){A.highlight(),C=null},A.options.interval)}),A.highlight(),A}return s(k,[{key:"highlight",value:function(){var I=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var A=this.quill.getSelection();
879this.quill.scroll.descendants(N).forEach(function(C){C.highlight(I.options.highlight)}),this.quill.update(d.default.sources.SILENT),A!=null&&this.quill.setSelection(A,d.default.sources.SILENT)}}}]),k})(p.default);_.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(E){var k=window.hljs.highlightAuto(E);return k.value}})(),interval:1e3},r.CodeBlock=N,r.CodeToken=S,r.default=_}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'}),(function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line>
879 <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'}),(function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'}),(function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'}),(function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}
vendor: 9,483 bytes, line 879
879),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var s=function k(O,I,A){O===null&&(O=Function.prototype);var C=Object.getOwnPropertyDescriptor(O,I);if(C===void 0){var R=Object.getPrototypeOf(O);return R===null?void 0:k(R,I,A)}else{if("value"in C)return C.value;var D=C.get;return D===void 0?void 0:D.call(A)}},o=(function(){function k(O,I){for(var A=0;A<I.length;A++){var C=I[A];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(O,C.key,C)}}return function(O,I,A){return I&&k(O.prototype,I),A&&k(O,A),O}})(),l=i(3),c=v(l),u=i(8),d=v(u),f=i(43),p=v(f),m=i(15),x=i(41),y=v(x);function v(k){return k&&k.__esModule?k:{default:k}}function b(k,O){if(!(k instanceof O))throw new TypeError("Cannot call a class as a function")}function w(k,O){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:k}function N(k,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);k.prototype=Object.create(O&&O.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(k,O):k.__proto__=O)}var S=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],_=(function(k){N(O,k);function O(I,A){b(this,O),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=S);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,I,A));return C.quill.container.classList.add("ql-bubble"),C}return o(O,[{key:"extendToolbar",value:function(A){this.tooltip=new E(this.quill,this.options.bounds),this.tooltip.root.appendChild(A.container),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),y.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),y.default)}}]),O})(p.default);_.DEFAULTS=(0,c.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var E=(function(k){N(O,k);function O(I,A){b(this,O);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,I,A));return C.quill.on(d.default.events.EDITOR_CHANGE,function(R,D,q,F){if(R===d.default.events.SELECTION_CHANGE)if(D!=null&&D.length>0&&F===d.default.sources.USER){C.show(),C.root.style.left="0px",C.root.style.width="",C.root.style.width=C.root.offsetWidth+"px";var H=C.quill.getLines(D.index,D.length);if(H.length===1)C.position(C.quill.getBounds(D));else{var U=H[H.length-1],W=C.quill.getIndex(U),G=Math.min(U.length()-1,D.index+D.length-W),L=C.quill.getBounds(new m.Range(W,G));C.position(L)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return o(O,[{key:"listen",value:function(){var A=this;s(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){A.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!A.root.classList.contains("ql-hidden")){var C=A.quill.getSelection();C!=null&&A.position(A.quill.getBounds(C))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(A){var C=s(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"position",this).call(this,A),R=this.root.querySelector(".ql-tooltip-arrow");if(R.style.marginLeft="",C===0)return C;R.style.marginLeft=-1*C-R.offsetWidth/2+"px"}}]),O})(f.BaseTooltip);E.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=E,r.default=_}),(function(n,r,i){n.exports=i(63)})]).default})})(By)),By.exports}var xs,UF;function lDe(){if(UF)return xs;UF=1;var e=xs&&xs.__extends||(function(){var d=function(f,p){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,x){m.__proto__=x}||function(m,x){for(var y in x)x.hasOwnProperty(y)&&(m[y]=x[y])},d(f,p)};return function(f,p){d(f,p);function m(){this.constructor=f}f.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})(),t=xs&&xs.__assign||function(){return t=Object.assign||function(d){for(var f,p=1,m=arguments.length;p<m;p++){f=arguments[p];for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(d[x]=f[x])}return d},t.apply(this,arguments)},n=xs&&xs.__spreadArrays||function(){for(var d=0,f=0,p=arguments.length;f<p;f++)d+=arguments[f].length;for(var m=Array(d),x=0,f=0;f<p;f++)for(var y=arguments[f],v=0,b=y.length;v<b;v++,x++)m[x]=y[v];return m},r=xs&&xs.__importDefault||function(d){return d&&d.__esModule?d:{default:d}},i=r(Kp()),s=r(Kk()),o=r(eV()),l=r(oDe()),c=(function(d){e(f,d);function f(p){var m=d.call(this,p)||this;m.dirtyProps=["modules","formats","bounds","theme","children"],m.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],m.state={generation:0},m.selection=null,m.onEditorChange=function(y,v,b,w){var N,S,_,E;y==="text-change"?(S=(N=m).onEditorChangeText)===null||S===void 0||S.call(N,m.editor.root.innerHTML,v,w,m.unprivilegedEditor):y==="selection-change"&&((E=(_=m).onEditorChangeSelection)===null||E===void 0||E.call(_,v,w,m.unprivilegedEditor))};var x=m.isControlled()?p.value:p.defaultValue;return m.value=x??"",m}return f.prototype.validateProps=function(p){var m;if(i.default.Children.count(p.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(i.default.Children.count(p.children)){var x=i.default.Children.only(p.children);if(((m=x)===null||m===void 0?void 0:m.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&p.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},f.prototype.shouldComponentUpdate=function(p,m){var x=this,y;if(this.validateProps(p),!this.editor||this.state.generation!==m.generation)return!0;if("value"in p){var v=this.getEditorContents(),b=(y=p.value,y??"");this.isEqualValue(b,v)||this.setEditorContents(this.editor,b)}return p.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,p.readOnly),n(this.cleanProps,this.dirtyProps).some(function(w){return!o.default(p[w],x.props[w])})},f.prototype.shouldComponentRegenerate=function(p){var m=this;return this.dirtyProps.some(function(x){return!o.default(p[x],m.props[x])})},f.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},f.prototype.componentWillUnmount=function(){this.destroyEditor()},f.prototype.componentDidUpdate=function(p,m){var x=this;if(this.editor&&this.shouldComponentRegenerate(p)){var y=this.editor.getContents(),v=this.editor.getSelection();this.regenerationSnapshot={delta:y,selection:v},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==m.generation){var b=this.regenerationSnapshot,y=b.delta,w=b.selection;delete this.regenerationSnapshot,this.instantiateEditor();var N=this.editor;N.setContents(y),u(function(){return x.setEditorSelection(N,w)})}},f.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},f.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},f.prototype.isControlled=function(){return"value"in this.props},f.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},f.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},f.prototype.createEditor=function(p,m){var x=new l.default(p,m);return m.tabIndex!=null&&this.setEditorTabIndex(x,m.tabIndex),this.hookEditor(x),x},f.prototype.hookEditor=function(p){this.unprivilegedEditor=this.makeUnprivilegedEditor(p),p.on("editor-change",this.onEditorChange)},f.prototype.unhookEditor=function(p){p.off("editor-change",this.onEditorChange)},f.prototype.getEditorContents=function(){return this.value},f.prototype.getEditorSelection=function(){return this.selection},f.prototype.isDelta=function(p){return p&&p.ops},f.prototype.isEqualValue=function(p,m){return this.isDelta(p)&&this.isDelta(m)?o.default(p.ops,m.ops):o.default(p,m)},f.prototype.setEditorContents=function(p,m){var x=this;this.value=m;var y=this.getEditorSelection();typeof m=="string"?p.setContents(p.clipboard.convert(m)):p.setContents(m),u(function(){return x.setEditorSelection(p,y)})},f.prototype.setEditorSelection=function(p,m){if(this.selection=m,m){var x=p.getLength();m.index=Math.max(0,Math.min(m.index,x-1)),m.length=Math.max(0,Math.min(m.length,x-1-m.index)),p.setSelection(m)}},f.prototype.setEditorTabIndex=function(p,m){var x,y;!((y=(x=p)===null||x===void 0?void 0:x.scroll)===null||y===void 0)&&y.domNo
879de&&(p.scroll.domNode.tabIndex=m)},f.prototype.setEditorReadOnly=function(p,m){m?p.disable():p.enable()},f.prototype.makeUnprivilegedEditor=function(p){var m=p;return{getHTML:function(){return m.root.innerHTML},getLength:m.getLength.bind(m),getText:m.getText.bind(m),getContents:m.getContents.bind(m),getSelection:m.getSelection.bind(m),getBounds:m.getBounds.bind(m)}},f.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var p=s.default.findDOMNode(this.editingArea);if(!p)throw new Error("Cannot find element for editing area");if(p.nodeType===3)throw new Error("Editing area cannot be a text node");return p},f.prototype.renderEditingArea=function(){var p=this,m=this.props,x=m.children,y=m.preserveWhitespace,v=this.state.generation,b={key:v,ref:function(w){p.editingArea=w}};return i.default.Children.count(x)?i.default.cloneElement(i.default.Children.only(x),b):y?i.default.createElement("pre",t({},b)):i.default.createElement("div",t({},b))},f.prototype.render=function(){var p;return i.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(p=this.props.className,p??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},f.prototype.onEditorChangeText=function(p,m,x,y){var v,b;if(this.editor){var w=this.isDelta(this.value)?y.getContents():y.getHTML();w!==this.getEditorContents()&&(this.lastDeltaChangeSet=m,this.value=w,(b=(v=this.props).onChange)===null||b===void 0||b.call(v,p,m,x,y))}},f.prototype.onEditorChangeSelection=function(p,m,x){var y,v,b,w,N,S;if(this.editor){var _=this.getEditorSelection(),E=!_&&p,k=_&&!p;o.default(p,_)||(this.selection=p,(v=(y=this.props).onChangeSelection)===null||v===void 0||v.call(y,p,m,x),E?(w=(b=this.props).onFocus)===null||w===void 0||w.call(b,p,m,x):k&&((S=(N=this.props).onBlur)===null||S===void 0||S.call(N,_,m,x)))}},f.prototype.focus=function(){this.editor&&this.editor.focus()},f.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},f.displayName="React Quill",f.Quill=l.default,f.defaultProps={theme:"snow",modules:{},readOnly:!1},f})(i.default.Component);function u(d){Promise.resolve().then(d)}return xs=c,xs}var cDe=lDe();const uDe=Lt(cDe),dDe={toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{list:"ordered"},{list:"bullet"}],["blockquote","code-block"],["link","image"],["clean"]]},fDe=["header","bold","italic","underline","strike","list","bullet","blockquote","code-block","link","image"];function hDe(e){return e.replace(/<h1[^>]*>(.*?)<\/h1>/gi,`# $1 880`).replace(/<h2[^>]*>(.*?)<\/h2>/gi,`## $1 881`).replace(/<h3[^>]*>(.*?)<\/h3>/gi,`### $1 882`).replace(/<strong>(.*?)<\/strong>/gi,"**$1**").replace(/<b>(.*?)<\/b>/gi,"**$1**").replace(/<em>(.*?)<\/em>/gi,"*$1*").replace(/<i>(.*?)<\/i>/gi,"*$1*").replace(/<code>(.*?)<\/code>/gi,"`$1`").replace(/<blockquote[^>]*>(.*?)<\/blockquote>/gi,`> $1 883`).replace(/<li>(.*?)<\/li>/gi,`- $1 884`).replace(/<[^>]+>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").trim()}function pDe({value:e,onChange:t,placeholder:n="Write your content..."}){const[r,i]=T.useState("plain"),s=o=>{const l=hDe(o);t(l)};return a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-slate-500 font-medium",children:"Editor Mode:"}),a.jsxs("div",{className:"flex gap-1",children:[a.jsxs(ae,{type:"button",size:"sm",variant:r==="plain"?"default":"outline",onClick:()=>i("plain"),className:"h-7 text-xs gap-1",children:[a.jsx(os,{className:"w-3 h-3"}),"Plain Text / Markdown"]}),a.jsxs(ae,{type:"button",size:"sm",variant:r==="rich"?"default":"outline",onClick:()=>i("rich"),className:"h-7 text-xs gap-1",children:[a.jsx(EZ,{className:"w-3 h-3"}),"Rich Text"]})]}),r==="plain"&&a.jsx(Se,{variant:"outline",className:"text-xs text-slate-500",children:"Supports Markdown"})]}),r==="plain"?a.jsx("textarea",{value:e,onChange:o=>t(o.target.value),placeholder:n,className:"w-full min-h-[420px] px-3 py-2 rounded-md border border-slate-200 font-mono text-sm focus:outline-none focus:ring-1 focus:ring-indigo-400 resize-y"}):a.jsx("div",{className:"border border-slate-200 rounded-md overflow-hidden",children:a.jsx(uDe,{value:e,onCh
884ange:s,modules:dDe,formats:fDe,placeholder:n,style:{minHeight:"380px"}})})]})}function mDe({title:e,content:t,onApplySuggestion:n}){var c,u,d;const[r,i]=T.useState(!1),[s,o]=T.useState(null),l=f=>f>=80?"text-emerald-600 bg-emerald-50 border-emerald-200":f>=60?"text-amber-600 bg-amber-50 border-amber-200":"text-red-600 bg-red-50 border-red-200";return a.jsxs(de,{className:"border-indigo-200",children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"w-5 h-5 text-indigo-600"}),"AI Content Improvements"]})}),a.jsxs(he,{className:"space-y-4",children:[a.jsx(ae,{onClick:analyzeContent,disabled:r,className:"w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700",children:r?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"w-4 h-4 mr-2"}),"Get AI Suggestions"]})}),s&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:`p-4 rounded-xl border-2 ${l(s.overall_score)}`,children:[a.jsx("div",{className:"text-sm font-medium mb-1",children:"Content Quality Score"}),a.jsxs("div",{className:"text-3xl font-bold",children:[s.overall_score,"/100"]})]}),s.improved_title&&s.improved_title!==e&&a.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg border border-blue-200",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(zy,{className:"w-4 h-4 text-blue-600"}),a.jsx("span",{className:"font-semibold text-blue-900",children:"Alternative Title"})]}),a.jsx("p",{className:"text-sm text-blue-800 mb-2",children:s.improved_title}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>n({title:s.improved_title}),className:"border-blue-300 text-blue-700 hover:bg-blue-100",children:"Apply Title"})]}),((c=s.clarity_suggestions)==null?void 0:c.length)>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Cn,{className:"w-4 h-4 text-emerald-600"}),a.jsx("span",{className:"text-sm font-semibold text-emerald-700",children:"Clarity Improvements"})]}),a.jsx("ul",{className:"space-y-1",children:s.clarity_suggestions.map((f,p)=>a.jsxs("li",{className:"text-sm text-slate-600 flex items-start gap-2",children:[a.jsx("span",{className:"text-emerald-500 mt-1",children:"â¢"}),f]},p))})]}),((u=s.engagement_suggestions)==null?void 0:u.length)>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Ct,{className:"w-4 h-4 text-purple-600"}),a.jsx("span",{className:"text-sm font-semibold text-purple-700",children:"Engagement Tips"})]}),a.jsx("ul",{className:"space-y-1",children:s.engagement_suggestions.map((f,p)=>a.jsxs("li",{className:"text-sm text-slate-600 flex items-start gap-2",children:[a.jsx("span",{className:"text-purple-500 mt-1",children:"â¢"}),f]},p))})]}),((d=s.seo_suggestions)==null?void 0:d.length)>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(Kr,{className:"w-4 h-4 text-amber-600"}),a.jsx("span",{className:"text-sm font-semibold text-amber-700",children:"SEO Suggestions"})]}),a.jsx("ul",{className:"space-y-1",children:s.seo_suggestions.map((f,p)=>a.jsxs("li",{className:"text-sm text-slate-600 flex items-start gap-2",children:[a.jsx("span",{className:"text-amber-500 mt-1",children:"â¢"}),f]},p))})]}),s.improved_intro&&a.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsx("div",{className:"text-sm font-semibold mb-2",children:"Suggested Improved Introduction"}),a.jsx("p",{className:"text-sm text-slate-700 mb-3 italic",children:s.improved_intro}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>{const f=t.replace(/^[\s\S]*?(?=\n##|\n\n#|$)/,s.improved_intro+` 885 886`);n({content:f})},children:"Apply Intro"})]})]})]})]})}function gDe({post:e,onUpdate:t}){var p,m,x,y,v;const[n,r]=T.useState(!1),[i,s]=T.useState(null),[o,l]=T.useState({}),c=async()=>{r(!0);try{const b=await ce.integrations.Core.InvokeLLM({prompt:`Analyze this blog post and provide optimization suggestions: 887 888Title: ${e.title} 889Content: ${e.content.substring(0,1e3)}... 890Category: ${e.category} 891Current Meta Description: ${e.meta_description||"None"} 892 893Provide: 8941. 5 headline variations optimized for SEO and engagement (consider power words, numbers, questions) 8952. 3 compelling meta descriptions (150-160 chars each) 8963. 3 social media snippets for Twitter/LinkedIn 8974. 3 specific content improvement recommendations based on SEO best practices 8985. Focus keyword suggestions 899 900Format as JSON with clear categories.`,response_json_schema:{type:"object",properties:{headline_variations:{type:"array",items:{type:"string"}},meta_descriptions:{type:"array",items:{type:"string"}},social_snippets:{type:"array",items:{type:"string"}},content_improvements:{type:"array",items:{type:"string"}},focus_keywords:{type:"array",items:{type:"string"}}}}});s(b),we.success("AI suggestions generated!")}catch(b){we.error("Failed to generate suggestions"),console.error(b)}finally{r(!1)}},u=(b,w)=>{navigator.clipboard.writeText(b),l({...o,[w]:!0}),we.success("Copied to clipboard"),setTimeout(()=>l({...o,[w]:!1}),2e3)},d=async b=>{try{await ce.entities.BlogPost.update(e.id,{title:b}),t&&t(),we.success("Headline updated!")}catch{we.error("Failed to update headline")}},f=async b=>{try{await ce.entities.BlogPost.update(e.id,{meta_description:b}),t&&t(),we.success("Meta description updated!")}catch{we.error("Failed to update meta description")}};return a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Ie,{className:"text-lg flex items-center gap-2",children:[a.jsx(Ct,{className:"w-5 h-5 text-indigo-500"}),"AI Content Optimizer"]}),a.jsx(ae,{onClick:c,disabled:n,className:"gap-2",children:n?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"w-4 h-4"}),"Generate Suggestions"]})})]})}),i&&a.jsxs(he,{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsxs("h4",{className:"font-semibold text-slate-900 mb-3 flex items-center gap-2",children:[a.jsx(Xr,{className:"w-4 h-4 text-green-500"}),"Headline Variations for A/B Testing"]}),a.jsx("div",{className:"space-y-2",children:(p=i.headline_variations)==null?void 0:p.map((b,w)=>a.jsxs("div",{className:"flex items-center gap-2 p-3 bg-slate-50 rounded-lg",children:[a.jsx("span",{className:"flex-1 text-sm",children:b}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>u(b,`headline-${w}`),children:o[`headline-${w}`]?a.jsx(_n,{className:"w-4 h-4"}):a.jsx(or,{className:"w-4 h-4"})}),a.jsx(ae,{size:"sm",onClick:()=>d(b),children:"Apply"})]},w))})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-slate-900 mb-3",children:"Meta Descriptions"}),a.jsx("div",{className:"space-y-2",children:(m=i.meta_descriptions)==null?void 0:m.map((b,w)=>a.jsxs("div",{className:"flex items-center gap-2 p-3 bg-blue-50 rounded-lg",children:[a.jsx("span",{className:"flex-1 text-sm",children:b}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>u(b,`meta-${w}`),children:o[`meta-${w}`]?a.jsx(_n,{className:"w-4 h-4"}):a.jsx(or,{className:"w-4 h-4"})}),a.jsx(ae,{size:"sm",onClick:()=>f(b),children:"Apply"})]},w))})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-slate-900 mb-3",children:"Social Media Snippets"}),a.jsx("div",{className:"space-y-2",children:(x=i.social_snippets)==null?void 0:x.map((b,w)=>a.jsxs("div",{className:"flex items-center gap-2 p-3 bg-purple-50 rounded-lg",children:[a.jsx("span",{className:"flex-1 text-sm",children:b}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>u(b,`social-${w}`),children:o[`social-${w}`]?a.jsx(_n,{className:"w-4 h-4"}):a.jsx(or,{className:"w-4 h-4"})})]},w))})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-slate-900 mb-3",children:"Suggested Focus Keywords"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:(y=i.focus_keywords)==null?void 0:y.map((b,w)=>a.jsx(Se,{variant:"outline",className:"cursor-pointer hover:bg-slate-100",onClick:()=>u(b,`keyword-${w}`),children:b},w))})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-slate-900 mb-3",children:"Content Improvement Recommendations"}),a.jsx("ul",{className:"space-y-2",children:(v=i.content_improvements)==null?void 0:v.map((b,w)=>a.jsxs("li",{className:"flex gap-2 text-sm",children:[a.jsx("span",{className:"text-indigo-500 font-bold",children:"â¢"}),a.jsx("span",{className:"text-slate-700",children:b})]},w))})]})]})]})}function yDe(e="",t=""){const n=(e||"").split(` 901`),r=(t||"").split(` 902`),i=[],s=Math.max(n.length,r.length);for(let o=0;o<s;o++){const l=n[o],c=r[o];l===c?i.push({type:"same",text:c??""}):(l!==void 0&&i.push({type:"removed",text:l}),c!==void 0&&i.push({type:"added",text:c}))}return i}function vDe({versionA:e,versionB:t,onClose:n}){var c,u;const[r,i]=T.useState("content"),s=[{key:"title",label:"Title"},{key:"content",label:"Content"},{key:"excerpt",label:"Excerpt"},{key:"meta_description",label:"Meta Description"}],o=yDe(e==null?void 0:e[r],t==null?void 0:t[r]),l=o.some(d=>d.type!=="same");return a.jsxs(de,{className:"border-indigo-200",children:[a.jsxs(Re,{className:"flex flex-row items-center justify-between pb-3",children:[a.jsx(Ie,{className:"text-sm",children:"Version Comparison"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(Se,{variant:"outline",className:"text-xs",children:["v",(e==null?void 0:e.version_number)??"?"," â v",(t==null?void 0:t.ver
902sion_number)??"current"]}),a.jsx(ae,{size:"sm",variant:"ghost",onClick:n,className:"h-7 w-7 p-0",children:a.jsx(jx,{className:"w-4 h-4"})})]})]}),a.jsxs(he,{className:"space-y-3",children:[a.jsx("div",{className:"flex gap-1 flex-wrap",children:s.map(d=>a.jsx(ae,{size:"sm",variant:r===d.key?"default":"outline",onClick:()=>i(d.key),className:"h-7 text-xs",children:d.label},d.key))}),a.jsxs("div",{className:"text-xs text-slate-500 flex gap-4",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"w-3 h-3 rounded bg-red-100 border border-red-300 inline-block"}),"Removed"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"w-3 h-3 rounded bg-green-100 border border-green-300 inline-block"}),"Added"]})]}),l?a.jsx("div",{className:"border rounded-lg overflow-hidden text-xs font-mono max-h-64 overflow-y-auto",children:o.map((d,f)=>a.jsxs("div",{className:d.type==="added"?"bg-green-50 text-green-800 px-3 py-0.5 flex gap-2":d.type==="removed"?"bg-red-50 text-red-800 px-3 py-0.5 flex gap-2":"bg-white text-slate-600 px-3 py-0.5 flex gap-2",children:[a.jsx("span",{className:"select-none w-3 flex-shrink-0",children:d.type==="added"?"+":d.type==="removed"?"-":" "}),a.jsx("span",{className:"whitespace-pre-wrap break-all",children:d.text||" "})]},f))}):a.jsxs("p",{className:"text-sm text-slate-500 text-center py-4",children:["No changes in ",r]}),a.jsxs("div",{className:"flex justify-between text-xs text-slate-400 pt-1",children:[a.jsxs("span",{children:["From: ",(c=e==null?void 0:e.edited_by)==null?void 0:c.split("@")[0]," · ",e!=null&&e.created_date?Jt(new Date(e.created_date),"MMM d, h:mm a"):"â"]}),a.jsxs("span",{children:["To: ",((u=t==null?void 0:t.edited_by)==null?void 0:u.split("@")[0])??"current"]})]})]})]})}const I_={pending:{color:"bg-amber-100 text-amber-700",label:"Pending"},approved:{color:"bg-emerald-100 text-emerald-700",label:"Approved"},rejected:{color:"bg-red-100 text-red-700",label:"Rejected"},needs_changes:{color:"bg-orange-100 text-orange-700",label:"Needs Changes"}};function xDe({postId:e,currentUser:t,postStatus:n}){const[r,i]=T.useState(""),[s,o]=T.useState(!1),l=Ln(),{data:c=[]}=st({queryKey:["reviews",e],queryFn:()=>ce.entities.ContentReview.filter({post_id:e},"-created_date",20),enabled:!!e}),u=(t==null?void 0:t.role)==="admin"||(t==null?void 0:t.role)==="editor",d=async f=>{if(!r.trim()&&f!=="approved"){we.error("Please add a comment");return}o(!0);try{await ce.entities.ContentReview.create({post_id:e,reviewer_email:t.email,status:f,comments:r}),f==="approved"?await ce.entities.BlogPost.update(e,{status:"published",published_date:new Date().toISOString()}):(f==="rejected"||f==="needs_changes")&&await ce.entities.BlogPost.update(e,{status:"draft"}),i(""),l.invalidateQueries({queryKey:["reviews",e]}
902),l.invalidateQueries({queryKey:["posts"]}),we.success(`Review submitted: ${I_[f].label}`)}catch{we.error("Failed to submit review")}finally{o(!1)}};return a.jsxs(de,{className:"border-amber-200",children:[a.jsx(Re,{className:"pb-3",children:a.jsxs(Ie,{className:"text-sm flex items-center gap-2",children:[a.jsx(li,{className:"w-4 h-4 text-amber-600"}),"Review & Approval",n==="pending_review"&&a.jsx(Se,{className:"bg-amber-100 text-amber-700 ml-auto",children:"Awaiting Review"})]})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2 max-h-48 overflow-y-auto",children:[c.map(f=>{var p,m,x;return a.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"text-xs font-medium text-slate-700",children:(p=f.reviewer_email)==null?void 0:p.split("@")[0]}),a.jsx(Se,{className:`text-xs ${(m=I_[f.status])==null?void 0:m.color}`,children:(x=I_[f.status])==null?void 0:x.label})]}),f.comments&&a.jsx("p",{className:"text-xs text-slate-600",children:f.comments}),a.jsx("p",{className:"text-xs text-slate-400 mt-1",children:Jt(new Date(f.created_date),"MMM d, h:mm a")})]},f.id)}),c.length===0&&a.jsx("p",{className:"text-xs text-slate-500 text-center py-2",children:"No reviews yet"})]}),u&&n==="pending_review"&&a.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[a.jsx(De,{className:"text-xs font-medium",children:"Leave a review comment"}),a.jsx(dn,{value:r,onChange:f=>i(f.target.value),placeholder:"Add feedback or notes...",rows:2,className:"text-sm"}),a.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[a.jsxs(ae,{size:"sm",onClick:()=>d("approved"),disabled:s,className:"bg-emerald-600 hover:bg-emerald-700 gap-1 text-xs",children:[s?a.jsx(lt,{className:"w-3 h-3 animate-spin"}):a.jsx(Cn,{className:"w-3 h-3"}),"Approve"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>d("needs_changes"),disabled:s,className:"text-orange-600 border-orange-200 hover:bg-orange-50 gap-1 text-xs",children:[a.jsx(Kr,{className:"w-3 h-3"}),"Revise"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>d("rejected"),disabled:s,className:"text-red-600 border-red-200 hover:bg-red-50 gap-1 text-xs",children:[a.jsx(As,{className:"w-3 h-3"}),"Reject"]})]})]}),!u&&n==="draft"&&a.jsxs(ae,{size:"sm",className:"w-full gap-2",onClick:async()=>{await ce.entities.BlogPost.update(e,{status:"pending_review"}),l.invalidateQueries({queryKey:["posts"]}),we.success("Submitted for review")},children:[a.jsx(ci,{className:"w-3 h-3"}),"Submit for Review"]})]})]})}function bDe({postId:e,currentUser:t,onRestoreVersion:n,post:r}){const[i,s]=T.useState([]),[o,l]=T.useState([]),[c,u]=T.useState(null),[d,f]=T.useState(null);T.useEffect(()=>{if(!e)return;const b=ce.entities.BlogPost.subscribe(w=>{w.id===e&&w.type==="update"&&s(w.data.editing_users||[])});return x(),p(),()=>{m(),b()}},[e]);const p=async()=>{if(!e||!t)return;const b=await ce.entities.BlogPost.filter({id:e});if(b.length>0){const w=b[0].editing_users||[];w.includes(t.email)||await ce.entities.BlogPost.update(e,{editing_users:[...w,t.email]})}},m=async()=>{if(!(!e||!t))try{const b=await ce.entities.BlogPost.filter({id:e});if(b.length>0){const w=b[0].editing_users||[];await ce.entities.BlogPost.update(e,{editing_users:w.filter(N=>N!==t.email)})}}catch{}},x=async()=>{if(!e)return;const b=await ce.entities.PostVersion.filter({post_id:e},"-created_date",20);l(b)},y=async b=>{confirm(`Restore to version ${b.version_number}?`)&&(await n(b),u(null),f(null))},v=b=>{const w=o.findIndex(S=>S.id===b.id),N=o[w+1]||null;f({a:N,b})};return a.jsxs("div",{className:"space-y-4",children:[a.jsxs(de,{children:[a.jsx(Re,{className:"pb-3",children:a.jsxs(Ie,{className:"text-sm flex items-center gap-2",children:[a.jsx(Is,{className:"w-4 h-4"}),"Active Collaborators"]})}),a.jsx(he,{children:i.length>0?a.jsx("div",{className:"flex flex-wrap gap-2",children:i.map((b,w)=>a.jsxs(Se,{variant:"secondary",className:"gap-1",children:[a.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500 animate-pulse"}),b.split("@")[0]]},w))}):a.jsx("p",{className:"text-sm text-slate-500",children:"No one else editing"})})]}),e&&a.jsx(xDe,{postId:e,currentUser:t,postStatus:r==null?void 0:r.status}),d&&a.jsx(vDe,{versionA:d.a,versionB:d.b,onClose:()=>f(null)}),a.jsxs(de,{children:[a.jsx(Re,{className:"pb-3",children:a.jsxs(Ie,{className:"text-sm flex items-center gap-2",children:[a.jsx(yJ,{className:"w-4 h-4"}),"Version History"]})}),a.jsxs(he,{className:"space-y-2",children:[o.map(b=>{var w;return a.jsxs("div",{className:"flex items-center justify-between p-2 bg-slate-50 rounded-lg",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("p",{className:"text-sm font-medium",children:["v",b.version_number]}),a.jsxs("p",{className:"text-xs text-slate-500 truncate",children:[Jt(ne
902w Date(b.created_date),"MMM d, h:mm a")," · ",(w=b.edited_by)==null?void 0:w.split("@")[0]]}),b.change_summary&&a.jsx("p",{className:"text-xs text-slate-600 italic truncate",children:b.change_summary})]}),a.jsxs("div",{className:"flex gap-1 ml-2",children:[a.jsx(ae,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0",title:"Compare",onClick:()=>v(b),children:a.jsx(JR,{className:"w-3 h-3"})}),a.jsx(ae,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0",title:"View",onClick:()=>u(b),children:a.jsx(Qn,{className:"w-3 h-3"})}),a.jsx(ae,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0",title:"Restore",onClick:()=>y(b),children:a.jsx(QJ,{className:"w-3 h-3"})})]})]},b.id)}),o.length===0&&a.jsx("p",{className:"text-sm text-slate-500 text-center py-4",children:"No version history yet"})]})]}),c&&a.jsxs(de,{className:"border-blue-200",children:[a.jsx(Re,{className:"pb-2",children:a.jsxs(Ie,{className:"text-sm",children:["v",c.version_number," Preview"]})}),a.jsxs(he,{className:"space-y-2",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold text-slate-500",children:"Title"}),a.jsx("p",{className:"text-sm",children:c.title})]}),c.excerpt&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-semibold text-slate-500",children:"Excerpt"}),a.jsx("p",{className:"text-sm",children:c.excerpt})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{size:"sm",onClick:()=>y(c),children:"Restore"}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>v(c),children:[a.jsx(JR,{className:"w-3 h-3 mr-1"})," Compare"]}),a.jsx(ae,{size:"sm",variant:"ghost",onClick:()=>u(null),children:"Close"})]})]})]})]})}function wDe({postId:e,content:t,currentUser:n}){var C;const[r,i]=T.useState([]),[s,o]=T.useState([]),[l,c]=T.useState(null),[u,d]=T.useState(""),[f,p]=T.useState(!1),[m,x]=T.useState({}),[y,v]=T.useState(null);T.useEffect(()=>{if(t){const R=t.split(` 903`).filter(D=>D.trim().length>20);o(R)}},[t]),T.useEffect(()=>{e&&(b(),w())},[e]);const b=async()=>{const R=await ce.entities.ContentReview.filter({post_id:e});i(R)},w=async()=>{(await ce.entities.ContentReview.filter({post_id:e,status:"approved"})).length>0?v("approved"):(await ce.entities.ContentReview.filter({post_id:e,status:"needs_changes"})).length>0&&v("needs_changes")},N=async()=>{var R;u.trim()&&(p(!0),await ce.entities.ContentReview.create({post_id:e,reviewer_email:(n==null?void 0:n.email)||"anonymous",status:"pending",comments:JSON.stringify({text:u,paragraph_index:l,paragraph_preview:l!==null?(R=s[l])==null?void 0:R.substring(0,80):null,author:(n==null?void 0:n.full_name)||(n==null?void 0:n.email)||"Anonymous",timestamp:new Date().toISOString()}),changes_requested:[]}),d(""),c(null),await b(),we.success("Comment added"),p(!1))},S=async(R,D)=>{await ce.entities.ContentReview.update(R,{status:D}),await b(),D==="approved"&&we.success("Marked as approved"),D==="rejected"&&we.error("Marked as rejected"),D==="needs_changes"&&we.warning("Marked as
903needs changes")},_=async()=>{(await ce.entities.BlogPost.filter({id:e})).length>0&&(await ce.entities.BlogPost.update(e,{status:"published",published_date:new Date().toISOString()}),we.success("Post approved and published!"),v("approved"))},E=async()=>{await ce.entities.ContentReview.create({post_id:e,reviewer_email:n==null?void 0:n.email,status:"needs_changes",comments:JSON.stringify({text:"Changes requested by editor before publishing.",paragraph_index:null,author:(n==null?void 0:n.full_name)||(n==null?void 0:n.email),timestamp:new Date().toISOString()}),changes_requested:["Please review editor comments above"]}),await ce.entities.BlogPost.update(e,{status:"pending_review"}),v("needs_changes"),we.info("Changes requested â post moved back to pending review"),await b()},k=R=>{try{return JSON.parse(R.comments)}catch{return{text:R.comments,author:R.reviewer_email}}},O={pending:"bg-amber-100 text-amber-700 border-amber-200",approved:"bg-emerald-100 text-emerald-700 border-emerald-200",rejected:"bg-red-100 text-red-700 border-red-200",needs_changes:"bg-orange-100 text-orange-700 border-orange-200"},I={};r.forEach(R=>{const D=k(R),q=D.paragraph_index!==null&&D.paragraph_index!==void 0?`para_${D.paragraph_index}`:"general";I[q]||(I[q]=[]),I[q].push({...R,parsed:D})});const A=(n==null?void 0:n.role)==="admin"||(n==null?void 0:n.role)==="editor";return a.jsxs("div",{className:"space-y-4",children:[A&&a.jsxs("div",{className:"flex items-center gap-3 p-3 bg-gradient-to-r from-indigo-50 to-purple-50 rounded-lg border border-indigo-100",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800",children:"EditorâAuthor Approval"}),a.jsx("p",{className:"text-xs text-slate-500",children:y==="approved"?"Post has been approved and published.":y==="needs_changes"?"Changes requested â author has been notified.":"Review comments and approve or request changes."})]}),!y&&a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(ae,{size:"sm",onClick:E,variant:"outline",className:"text-orange-600 border-orange-200 hover:bg-orange-50 text-xs gap-1",children:[a.jsx(As,{className:"w-3 h-3"})," Request Changes"]}),a.jsxs(ae,{size:"sm",onClick:_,className:"bg-emerald-600 hover:bg-emerald-700 text-white text-xs gap-1",children:[a.jsx(_n,{className:"w-3 h-3"})," Approve & Publish"]})]}),y==="needs_changes"&&a.jsx(Se,{className:"bg-orange-100 text-orange-700 border-orange-200 border",children:"Changes Requested"}),y==="approved"&&a.jsx(Se,{className:"bg-emerald-100 text-emerald-700 border-emerald-200 border",children:"Approved"})]}),a.jsxs("div",{className:"border border-slate-200 rounded-lg p-3 bg-slate-50 space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx(li,{className:"w-4 h-4 text-indigo-500"}),a.jsx("span",{className:"text-sm font-medium text-slate-700",children:l!==null?`Comment on paragraph ${l+1}`:"General Comment"}),l!==null&&a.jsx(ae,{size:"sm",variant:"ghost",onClick:()=>c(null),className:"h-6 text-xs text-slate-400",children:"Ã clear selection"})]}),l!==null&&a.jsxs("p",{className:"text-xs text-slate-500 italic bg-white border border-slate-200 rounded p-2 line-clamp-2",children:['"',(C=s[l])==null?void 0:C.substring(0,120),'..."']}),a.jsx(dn,{value:u,onChange:R=>d(R.target.value),placeholder:"Add feedback, suggest changes, or ask a question...",rows:3,className:"text-sm"}),a.jsxs(ae,{size:"sm",onClick:N,disabled:f||!u.trim(),className:"gap-1 w-full",children:[a.jsx(Yo,{className:"w-3 h-3"})," Add Comment"]})]}),s.length>0&&a.jsxs("div",{className:"space-y-1",children:[a.jsx("p",{className:"text-xs text-slate-400 font-medium uppercase tracking-wide",children:"Click a paragraph to comment on it"}),s.slice(0,8).map((R,D)=>{const q=I[`para_${D}`]||[];return a.jsxs("div",{onClick:()=>c(l===D?null:D),className:`group relative cursor-pointer p-2 rounded border text-xs transition-all ${l===D?"border-indigo-400 bg-indigo-50":"border-transparent hover:border-slate-200 hover:bg-slate-50"}`,children:[a.jsxs("p",{className:"text-slate-600 line-clamp-1",children:[R.substring(0,100),"..."]}),q.length>0&&a.jsx("span",{className:"absolute top-1 right-1 bg-indigo-500 text-white text-xs rounded-full w-4 h-4 flex items-center justify-center text-[10px]",children:q.length})]},D)})]}),Object.entries(I).length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("p",{className:"text-xs text-slate-400 font-medium uppercase tracking-wide",children:["Comment Threads (",r.length,")"]}),Object.entries(I).map(([R,D])=>a.jsxs("div",{className:"border border-slate-200 rounded-lg overflow-hidden",children:[a.jsxs("button",{className:"w-full flex items-center justify-between p-2 bg-slate-50 hover:bg-slate-100 transition-colors",onClick:()=>x(q=>({...q,[R]:!q[R]})),children:[a.jsxs("span",{className:"text-xs font-medium text-slate-600",children:[R==="general"?"General Comments":`Paragraph ${parseInt(R.replace("para_",""))+1}`,a.jsxs("span",{className:"ml-1 text-slate-400",children:["(",D.length,")"]})]}),m[R]?a.jsx(Xk,{className:"w-3 h-3 text-slate-400"}):a.jsx(wx,{className:"w-3 h-3 text-slate-400"})]}),m[R]&&a.jsx("div",{className:"divide-y divide-slate-100",children:D.map(q=>a.jsxs("div",{className:"p-3 space-y-1",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(jee,{className:"w-3 h-3 text-slate-400"}),a.jsx("span",{className:"text-xs font-medium text-slate-700",children:q.parsed.author||q.reviewer_email})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(Se,{variant:"outline",className:`text-[10px] h-4 px-1 border ${O[q.status]}`,children:q.status.replace("_"," ")}),A&&q.status==="pending"&&a.jsxs(a.Fragment,{children:[a.jsx("button",{onClick:()=>S(q.id,"approved"),className:"text-emerald-500 hover:text-emerald-700 transition-colors",children:a.jsx(_n,{className:"w-3.5 h-3.5"})}),a.jsx("button",{onClick:()=>S(q.id,"needs_changes"),className:"text-orange-500 hover:text-orange-700 transition-colors",children:a.jsx(Rn,{className:"w-3.5 h-3.5"})})]})]})]}),a.jsx("p",{className:"text-xs text-slate-600",children:q.parsed.text}),q.parsed.timestamp&&a.jsx("p",{className:"text-[10px] text-slate-400",children:Jt(new Date(q.parsed.timestamp),"MMM d, h:mm a")})]},q.id))})]},R))]}),r.length===0&&a.jsx("p",{className:"text-xs text-slate-400 text-center py-3",children:"No comments yet. Add the first one above."})]})}function jDe({post:e}){const[t,n]=T.useState(!1),[r,i]=T.useState(null),s=async()=>
903{if(!(e!=null&&e.title)||!(e!=null&&e.content)){we.error("Post needs title and content");return}n(!0);try{const l=await ce.integrations.Core.InvokeLLM({prompt:`You are a social media expert. Generate engaging social media posts for this blog article. 904 905TITLE: ${e.title} 906CONTENT: ${e.content.substring(0,1e3)}... 907 908Create posts optimized for each platform: 909 9101. **Twitter/X** (max 280 characters) 911 - Hook opening 912 - Key insight 913 - Relevant hashtags (2-3) 914 - Engaging and concise 915 9162. **LinkedIn** (1500-2000 characters) 917 - Professional tone 918 - Value-focused opening 919 - Key takeaways in bullet points 920 - Call to action 921 - Industry hashtags (3-5) 922 9233. **Facebook** (150-250 characters) 924 - Conversational tone 925 - Question or intriguing statement 926 - Emoji usage 927 - Link teaser 928 929Make each post platform-appropriate, engaging, and designed to drive clicks.`,response_json_schema:{type:"object",properties:{twitter:{type:"object",properties:{text:{type:"string"},hashtags:{type:"array",items:{type:"string"}}}},linkedin:{type:"object",properties:{text:{type:"string"},hashtags:{type:"array",items:{type:"string"}}}},facebook:{type:"object",properties:{text:{type:"string"}}}}}});i(l),we.success("Social media posts generated!")}catch(l){we.error("Failed to generate social posts"),console.error(l)}finally{n(!1)}},o=l=>{navigator.clipboard.writeText(l),we.success("Copied to clipboard!")};return a.jsxs(de,{className:"border-blue-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Tr,{className:"w-5 h-5 text-blue-600"}),"Social Media Content Generator"]}),a.jsx(mn,{children:"Auto-generate optimized social media posts from your blog content"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsx(ae,{onClick:s,disabled:t,className:"w-full bg-gradient-to-r from-blue-500 to-cyan-600 hover:from-blue-600 hover:to-cyan-700",children:t?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating Posts..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Tr,{className:"w-4 h-4 mr-2"}),"Generate Social Posts"]})}),a.jsx(hi,{children:r&&a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},children:a.jsxs(ur,{defaultValue:"twitter",className:"mt-6",children:[a.jsxs(Jn,{className:"grid grid-cols-3 w-full",children:[a.jsxs(et,{value:"twitter",className:"gap-2",children:[a.jsx(Ku,{className:"w-4 h-4"})," Twitter"]}),a.jsxs(et,{value:"linkedin",className:"gap-2",children:[a.jsx(sc,{className:"w-4 h-4"})," LinkedIn"]}),a.jsxs(et,{value:"facebook",className:"gap-2",children:[a.jsx(Jq,{className:"w-4 h-4"})," Facebook"]})]}),a.jsx(ht,{value:"twitter",className:"space-y-3",children:a.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs(Se,{className:"bg-blue-100 text-blue-700",children:[r.twitter.text.length," characters"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>o(r.twitter.text+` 930 931`+r.twitter.hashtags.map(l=>"#"+l).join(" ")),className:"gap-2",children:[a.jsx(or,{className:"w-3 h-3"})," Copy"]})]}),a.jsx("p",{className:"text-slate-700 whitespace-pre-wrap mb-3",children:r.twitter.text}),a.jsx("div",{className:"flex flex-wrap gap-2",children:r.twitter.hashtags.map((l,c)=>a.jsxs(Se,{variant:"secondary",children:["#",l]},c))})]})}),a.jsx(ht,{value:"linkedin",className:"space-y-3",children:a.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs(Se,{className:"bg-blue-100 text-blue-700",children:[r.linkedin.text.length," characters"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>o(r.linkedin.text+` 932 933`+r.linkedin.hashtags.map(l=>"#"+l).join(" ")),className:"gap-2",children:[a.jsx(or,{className:"w-3 h-3"})," Copy"]})]}),a.jsx("p",{className:"text-slate-700 whitespace-pre-wrap mb-3",children:r.linkedin.text}),a.jsx("div",{className:"flex flex-wrap gap-2",children:r.linkedin.hashtags.map((l,c)=>a.jsxs(Se,{variant:"secondary",children:["#",l]},c))})]})}),a.jsx(ht,{value:"facebook",className:"space-y-3",children:a.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs(Se,{className:"bg-blue-100 text-blue-700",children:[r.facebook.text.length," characters"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>o(r.facebook.text),className:"gap-2",children:[a.jsx(or,{className:"w-3 h-3"})," Copy"]})]}),a.jsx("p",{className:"text-slate-700 whitespace-pre-wrap",children:r.facebook.text})]})})]})})})]})]})}function Lk({text:e}){const[t,n]=T.useState(!1),r=()=>{navigator.clipboard.writeText(e),n(!0),we.success("Copied!"),setTimeout(()=>n(!1),2e3)};return a.jsxs(ae,{size:"sm",variant:"outline",onClick:r,className:"gap-1.5 shrink-0",children:[a.jsx(or,{className:"w-3 h-3"}),t?"Copied":"Copy"]})}function SDe({index:e,text:t}){return a.jsxs("div",{className:"flex gap-3",children:[a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx("div",{className:"w-7 h-7 rounded-full bg-slate-800 text-white text-xs flex items-center justify-center font-bold shrink-0",children:e+1}),a.jsx("div",{className:"w-0.5 flex-1 bg-slate-200 mt-1"})]}),a.jsx("div",{className:"pb-4 flex-1",children:a.jsxs("div",{className:"bg-slate-50 rounded-xl p-3 border border-slate-200",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("p",{className:"text-sm text-slate-700 whitespace-pre-wrap flex-1",children:t}),a.jsx(Lk,{text:t})]}),a.jsxs("p",{className:"text-xs text-slate-400 mt-2",children:[t.length," / 280 chars"]})]})})]})}function NDe({post:e}){var o,l,c,u,d,f,p,m,x,y,v,b,w;const[t,n]=T.useState(!1),[r,i]=T.useState(null),s=async()=>
933{if(!(e!=null&&e.title)||!(e!=null&&e.content)){we.error("Post needs title and content first");return}n(!0);try{const N=await ce.integrations.Core.InvokeLLM({prompt:`You are a world-class content repurposing expert. Given this blog post, generate three distinct social media assets. 934 935BLOG TITLE: ${e.title} 936BLOG EXCERPT: ${e.excerpt||""} 937BLOG CONTENT (first 1200 chars): ${e.content.substring(0,1200)} 938 939Generate: 940 9411. LINKEDIN_POST: A professional LinkedIn post (1500-2000 chars). Start with a bold hook line, include 3-5 key insights as bullet points, end with a question to drive engagement, add 4-5 relevant hashtags at the end. Tone: thought leadership, authoritative yet approachable. 942 9432. TWITTER_THREAD: A Twitter/X thread of exactly 6 tweets. Each tweet must be under 280 chars. Tweet 1 is the hook, tweets 2-5 are the key points, tweet 6 is the CTA. Include thread numbering like "1/" in each tweet naturally. 944 9453. VIDEO_SCRIPT: A short-form video script (60-90 seconds). Structure: Hook (0-5s), Problem/Context (5-20s), 3 Key Points (20-60s), CTA (60-90s). Include speaker notes and visual cues in brackets like [cut to screen recording].`,model:"claude_sonnet_4_6",response_json_schema:{type:"object",properties:{linkedin:{type:"object",properties:{post:{type:"string"},hashtags:{type:"array",items:{type:"string"}}}},twitter_thread:{type:"object",properties:{tweets:{type:"array",items:{type:"string"}}}},video_script:{type:"object",properties:{title:{type:"string"},duration:{type:"string"},script:{type:"string"},hook:{type:"string"},cta:{type:"string"}}}}}});i(N),we.success("Social content generated!")}catch(N){we.error("Generation failed"),console.error(N)}finally{n(!1)}};return a.jsxs(de,{className:"border-indigo-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Tr,{className:"w-5 h-5 text-indigo-600"}),"Social Content Workflow"]}),a.jsx(mn,{children:"Generate LinkedIn posts, Twitter threads & video scripts from this post"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsx(ae,{onClick:s,disabled:t,className:"w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700",children:t?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating all formatsâ¦"]}):a.jsxs(a.Fragment,{children:[a.jsx(Tr,{className:"w-4 h-4 mr-2"}),"Generate Social Content Pack"]})}),t&&a.jsxs("div",{className:"text-center text-sm text-slate-500 py-4 space-y-1",children:[a.jsx("p",{children:"Using Claude Sonnet for best quality results."}),a.jsx("p",{className:"text-xs text-slate-400",children:"This uses more integration credits."})]}),a.jsx(hi,{children:r&&a.jsx(Pe.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},children:a.jsxs(ur,{defaultValue:"linkedin",children:[a.jsxs(Jn,{className:"grid grid-cols-3 w-full",children:[a.jsxs(et,{value:"linkedin",className:"gap-1.5 text-xs",children:[a.jsx(sc,{className:"w-3.5 h-3.5"})," LinkedIn"]}),a.jsxs(et,{value:"twitter",className:"gap-1.5 text-xs",children:[a.jsx(Ku,{className:"w-3.5 h-3.5"})," Thread"]}),a.jsxs(et,{value:"video",className:"gap-1.5 text-xs",children:[a.jsx(f8,{className:"w-3.5 h-3.5"})," Video Script"]})]}),a.jsx(ht,{value:"linkedin",className:"mt-4 space-y-3",children:a.jsxs("div",{className:"bg-slate-50 rounded-xl border border-slate-200 p-4",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsxs(Se,{className:"bg-blue-100 text-blue-700",children:[((l=(o=r.linkedin)==null?void 0:o.post)==null?void 0:l.length)||0," chars"]}),a.jsx(Lk,{text:(((c=r.linkedin)==null?void 0:c.post)||"")+` 946 947`+(((u=r.linkedin)==null?void 0:u.hashtags)||[]).map(N=>"#"+N).join(" ")})]}),a.jsx("p",{className:"text-sm text-slate-700 whitespace-pre-wrap mb-3",children:(d=r.linkedin)==null?void 0:d.post}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:(((f=r.linkedin)==null?void 0:f.hashtags)||[]).map((N,S)=>a.jsxs(Se,{variant:"secondary",className:"text-xs",children:["#",N]},S))})]})}),a.jsxs(ht,{value:"twitter",className:"mt-4",children:[a.jsx("div",{className:"space-y-0",children:(((p=r.twitter_thread)==null?void 0:p.tweets)||[]).map((N,S)=>a.jsx(SDe,{index:S,text:N},S))}),a.jsxs(ae,{variant:"outline",size:"sm",className:"w-full mt-2",onClick:()=>{var S;const N=(((S=r.twitter_thread)==null?void 0:S.tweets)||[]).join(` 948 949--- 950 951`);navigator.clipboard.writeText(N),we.success("Full thread copied!")},children:[a.jsx(or,{className:"w-3 h-3 mr-2"})," Copy Full Thread"]})]}),a.jsxs(ht,{value:"video",className:"mt-4 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-800",children:(m=r.video_script)==null?void 0:m.title}),a.jsx(Se,{variant:"outline",children:(x=r.video_script)==null?void 0:x.duration})]}),a.jsx(Lk,{text:((y=r.video_script)==null?void 0:y.script)||""})]}),((v=r.video_script)==null?void 0:v.hook)&&a.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-3",children:[a.jsx("p",{className:"text-xs font-semibold text-amber-700 mb-1",children:"ð¯ HOOK (0â5s)"}),a.jsx("p",{className:"text-sm text-amber-900",children:r.video_script.hook})]}),a.jsxs("div",{className:"bg-slate-50 rounded-xl border border-slate-200 p-4",children:[a.jsx("p",{className:"text-xs font-semibold text-slate-500 mb-2 uppercase tracking-wide",children:"Full Script"}),a.jsx("p",{className:"text-sm text-slate-700 whitespace-pre-wrap",children:(b=r.video_script)==null?void 0:b.script})]}),((w=r.video_script)==null?void 0:w.cta)&&a.jsxs("div",{className:"bg-indigo-50 border border-indigo-200 rounded-lg p-3",children:[a.jsx("p",{className:"text-xs font-semibold text-indigo-700 mb-1",children:"ð£ CTA (Final 10s)"}),a.jsx("p",{className:"text-sm text-indigo-900",children:r.video_script.cta})]})]})]})})})]})]})}function _De({topic:e,onKeywordSelect:t}){const[n,r]=T.useState(e||""),[i,s]=T.useState(!1),[o,l]=T.useState(null),c=async()=>
951{if(!n.trim()){we.error("Enter a keyword or topic");return}s(!0);try{const d=await ce.integrations.Core.InvokeLLM({prompt:`You are an SEO keyword research expert. Analyze this keyword/topic and provide comprehensive keyword research. 952 953PRIMARY KEYWORD: "${n}" 954 955Provide: 956 9571. **Main Keyword Analysis**: 958 - Search Volume Estimate (High/Medium/Low) 959 - Competition Level (High/Medium/Low) 960 - Difficulty Score (0-100) 961 - SEO Value Rating (0-10) 962 9632. **Related Keywords** (10 keywords): 964 - Mix of long-tail and short-tail variations 965 - Include search intent (informational/commercial/transactional) 966 - Estimated difficulty (Easy/Medium/Hard) 967 - Monthly search volume estimate 968 9693. **Content Suggestions**: 970 - 3 article title ideas using these keywords 971 - Key topics to cover 972 973Be realistic with estimates based on actual SEO knowledge.`,response_json_schema:{type:"object",properties:{main_keyword:{type:"object",properties:{keyword:{type:"string"},search_volume:{type:"string"},competition:{type:"string"},difficulty:{type:"number"},seo_value:{type:"number"}}},related_keywords:{type:"array",items:{type:"object",properties:{keyword:{type:"string"},intent:{type:"string"},difficulty:{type:"string"},search_volume:{type:"string"}}}},title_ideas:{type:"array",items:{type:"string"}},topics_to_cover:{type:"array",items:{type:"string"}}}},add_context_from_internet:!0});l(d),we.success("Keyword research complete!")}catch(d){we.error("Keyword research failed"),console.error(d)}finally{s(!1)}},u=d=>typeof d=="number"?d>=70?"text-red-600 bg-red-50":d>=40?"text-amber-600 bg-amber-50":"text-emerald-600 bg-emerald-50":d==="Hard"?"text-red-600 bg-red-50":d==="Medium"?"text-amber-600 bg-amber-50":"text-emerald-600 bg-emerald-50";return a.jsxs(de,{className:"border-purple-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(lr,{className:"w-5 h-5 text-purple-600"}),"Keyword Research Tool"]}),a.jsx(mn,{children:"Research keywords and analyze competition for your content"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Ye,{placeholder:"Enter keyword or topic...",value:n,onChange:d=>r(d.target.value),onKeyPress:d=>d.key==="Enter"&&c()}),a.jsx(ae,{onClick:c,disabled:i,className:"bg-purple-600 hover:bg-purple-700",children:i?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(lr,{className:"w-4 h-4"})})]}),a.jsx(hi,{children:o&&a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"space-y-4",children:[a.jsxs("div",{className:"p-4 bg-gradient-to-br from-purple-50 to-indigo-50 rounded-xl border border-purple-200",children:[a.jsx("h3",{className:"font-semibold text-lg text-slate-900 mb-4",children:o.main_keyword.keyword}),a.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-slate-600 mb-1",children:"Search Volume"}),a.jsx(Se,{className:"bg-blue-100 text-blue-700",children:o.main_keyword.search_volume})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm text-slate-600 mb-1",children:"Competition"}),a.jsx(Se,{className:"bg-amber-100 text-amber-700",children:o.main_keyword.competition})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-slate-600",children:"Difficulty"}),a.jsxs("span",{className:"font-medium",children:[o.main_keyword.difficulty,"/100"]})]}),a.jsx(cs,{value:o.main_keyword.difficulty,className:"h-2"}),a.jsxs("div",{className:"flex items-center justify-between text-sm",children:[a.jsx("span",{className:"text-slate-600",children:"SEO Value"}),a.jsxs("span",{className:"font-medium",children:[o.main_keyword.seo_value,"/10"]})]}),a.jsx(cs,{value:o.main_keyword.seo_value*10,className:"h-2 bg-emerald-500"})]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(dc,{className:"w-4 h-4 text-purple-600"}),a.jsx("h4",{className:"font-semibold text-slate-900",children:"Related Keywords"})]}),a.jsx("div",{className:"space-y-2",children:o.related_keywords.map((d,f)=>a.jsxs("div",{className:"p-3 bg-white rounded-lg border border-slate-200 hover:border-purple-300 transition-colors cursor-pointer",onClick:()=>t==null?void 0:t(d.keyword),children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"font-medium text-slate-900",children:d.keyword}),a.jsx(Se,{className:u(d.difficulty),children:d.difficulty})]}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-600",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Zq,{className:"w-3 h-3"}),d.search_volume]}),a.jsx(Se,{variant:"outline",className:"text-xs",children:d.intent})]})]},f))})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx(Xr,{className:"w-4 h-4 text-purple-600"}),a.jsx("h4",{className:"font-semibold text-slate-900",children:"Article Title Ideas"})]}),a.jsx("div",{className:"space-y-2",children:o.title_ideas.map((d,f)=>a.jsx("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200 text-sm text-slate-700",children:d},f))})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-slate-900 mb-2",children:"Key Topics to Cover"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:o.topics_to_cover.map((d,f)=>a.jsx(Se,{variant:"secondary",className:"bg-purple-50 text-purple-700",children:d},f))})]})]})})]})]})}function EDe({onContentImported:e}){const[t,n]=T.useState(!1),[r,i]=T.useState(null),s=l=>{var u;const c=(u=l.target.files)==null?void 0:u[0];if(c){if(!["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword","text/plain","text/markdown"].includes(c.type)&&!c.name.endsWith(".docx")&&!c.name.endsWith(".doc")&&!c.name.endsWith(".txt")&&!c.name.endsWith(".md")){we.error("Please upload a Word (.docx, .doc), Text (.txt), or Markdown (.md) file");return}i(c)}},o=async()=>
973{if(!r){we.error("Please select a file first");return}n(!0);try{const{file_url:l}=await ce.integrations.Core.UploadFile({file:r}),c=await ce.integrations.Core.ExtractDataFromUploadedFile({file_url:l,json_schema:{type:"object",properties:{title:{type:"string",description:"Document title or first heading"},content:{type:"string",description:"Full document content in markdown format"}}}});c.status==="success"&&c.output?(e(c.output),we.success("Document imported successfully!"),i(null)):we.error("Failed to extract content: "+(c.details||"Unknown error"))}catch(l){we.error("Import failed"),console.error(l)}finally{n(!1)}};return a.jsxs(de,{className:"border-green-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(os,{className:"w-5 h-5 text-green-600"}),"Import from Document"]}),a.jsx(mn,{children:"Import content from Word (.docx), Text (.txt), or Markdown (.md) files"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsx("div",{children:a.jsxs(De,{htmlFor:"file-upload",className:"cursor-pointer",children:[a.jsx("div",{className:"border-2 border-dashed border-slate-300 rounded-xl p-8 text-center hover:border-green-400 transition-colors",children:r?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Cn,{className:"w-8 h-8 text-green-600 mx-auto"}),a.jsx("p",{className:"text-sm font-medium text-slate-900",children:r.name}),a.jsxs("p",{className:"text-xs text-slate-500",children:[(r.size/1024).toFixed(2)," KB"]})]}):a.jsxs("div",{className:"space-y-2",children:[a.jsx(iI,{className:"w-8 h-8 text-slate-400 mx-auto"}),a.jsx("p",{className:"text-sm text-slate-600",children:"Click to upload or drag and drop"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Supports .docx, .doc, .txt, .md"})]})}),a.jsx(Ye,{id:"file-upload",type:"file",accept:".docx,.doc,.txt,.md",onChange:s,className:"hidden"})]})}),a.jsx(ae,{onClick:o,disabled:!r||t,className:"w-full bg-green-600 hover:bg-green-700 gap-2",children:t?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Importing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(iI,{className:"w-4 h-4"}),"Import Document"]})}),a.jsx("p",{className:"text-xs text-slate-500",children:"Your document will be converted to markdown format and auto-filled into the editor."})]})]})}function PDe({postId:e}){const[t,n]=T.useState(""),[r,i]=T.useState(["",""]),[s,o]=T.useState(!1),l=Ln(),{data:c=[]}=st({queryKey:["polls-editor",e],queryFn:()=>ce.entities.Poll.filter({post_id:e}),enabled:!!e}),u=wr({mutationFn:y=>ce.entities.Poll.delete(y),onSuccess:()=>{l.invalidateQueries({queryKey:["polls-editor",e]}),we.success("Poll deleted")}}),d=wr({mutationFn:({id:y,is_active:v})=>ce.entities.Poll.update(y,{is_active:v}),onSuccess:()=>l.invalidateQueries({queryKey:["polls-editor",e]})}),f=()=>i([...r,""]),p=y=>i(r.filter((v,b)=>b!==y)),m=(y,v)=>{const b=[...r];b[y]=v,i(b)},x=async()=>{if(!e){we.error("Save the post first before adding a poll");return}if(!t.trim()){we.error("Enter a question");return}const y=r.filter(v=>v.trim());if(y.length<2){we.error("Add at least 2 options");return}o(!0),await ce.entities.Poll.create({post_id:e,question:t.trim(),options:y.map((v,b)=>({id:`opt_${b}_${Date.now()}`,text:v,votes:0})),is_active:!0,total_votes:0,voted_sessions:[]}),n(""),i(["",""]),l.invalidateQueries({queryKey:["polls-editor",e]}),we.success("Poll created!"),o(!1)};return a.jsxs(de,{className:"border-indigo-200",children:[a.jsx(Re,{className:"pb-3",children:a.jsxs(Ie,{className:"text-sm flex items-center gap-2",children:[a.jsx(Fa,{className:"w-4 h-4 text-indigo-600"}),"Post Polls"]})}),a.jsxs(he,{className:"space-y-4",children:[c.map(y=>{var v;return a.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-200 space-y-2",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800 flex-1 line-clamp-2",children:y.question}),a.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[a.jsx(Xa,{checked:y.is_active,onCheckedChange:b=>d.mutate({id:y.id,is_active:b}),className:"scale-75"}),a.jsx(ae,{size:"sm",variant:"ghost",className:"h-7 w-7 p-0 text-red-500 hover:text-red-700",onClick:()=>u.mutate(y.id),children:a.jsx(qa,{className:"w-3 h-3"})})]})]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[a.jsxs("span",{children:[(v=y.options)==null?void 0:v.length," options"]}),a.jsx("span",{children:"·"}),a.jsxs("span",{children:[y.total_votes||0," votes"]}),a.jsx(Se,{variant:"outline",className:`ml-auto text-xs ${y.is_active?"text-emerald-600 border-emerald-200":"text-slate-400"}`,children:y.is_active?"Active":"Inactive"})]})]},y.id)}),a.jsxs("div",{className:"space-y-3 pt-2 border-t",children:[a.jsx("p",{className:"text-xs font-medium text-slate-600",children:"Create New Poll"}),a.jsxs("div",{children:[a.jsx(De,{className:"text-xs",children:"Question"}),a.jsx(Ye,{value:t,onChange:y=>n(y.target.value),placeholder:"What do you think about...?",className:"mt-1 text-sm"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(De,{className:"text-xs",children:"Options"}),r.map((y,v)=>a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Ye,{value:y,onChange:b=>m(v,b.target.value),placeholder:`Option ${v+1}`,className:"text-sm"}),r.length>2&&a.jsx(ae,{size:"sm",variant:"ghost",onClick:()=>p(v),className:"px-2 text-red-500",children:a.jsx(qa,{className:"w-3 h-3"})})]},v)),a.jsxs(ae,{size:"sm",variant:"outline",onClick:f,className:"w-full gap-1 text-xs h-8",children:[a.jsx(Yo,{className:"w-3 h-3"})," Add Option"]})]}),a.jsxs(ae,{size:"sm",onClick:x,disabled:s,className:"w-full gap-2",children:[s?a.jsx(lt,{className:"w-3 h-3 animate-spin"}):a.jsx(_n,{className:"w-3 h-3"}),"Save Poll"]})]})]})]})}function kDe({title:e,content:t,onInsertLink:n}){const[r,i]=T.useState(!1),[s,o]=T.useState([]),[l,c]=T.useState(null),{data:u=[]}=st({queryKey:["published-posts-links"],queryFn:()=>ce.entities.BlogPost.filter({status:"published"},"-published_date",50)}),d=async()=>{var y;if(!t||t.length<100){we.error("Add more content before suggesting links");return}if(u.length===0){we.error("No published posts to link to yet");return}i(!0);const x=u.slice(0,40).map(v=>{var b,w;return{id:v.id,title:v.title,slug:v.slug,category:v.category,excerpt:((b=v.excerpt)==null?void 0:b.substring(0,120))||"",tags:((w=v.tags)==null?void 0:w.join(", "))||""}});try{const v=await ce.integrations.Core.InvokeLLM({prompt:`You are an SEO specialist. Given the current blog post being written, identify the MOST RELEVANT existing published posts that should be internally linked. 974 975CURRENT POST TITLE: ${e||"Untitled"} 976CURRENT POST CONTENT (first 2000 chars): 977${t.substring(0,2e3)} 978 979AVAILABLE PUBLISHED POSTS: 980${JSON.stringify(x,null,2)} 981 982For each suggestion: 983- Pick posts with genuinely related topics, keywords, or themes 984- Suggest a natural anchor text phrase that fits the current content 985- Briefly explain WHY this link helps SEO and readers 986- Score relevance 1-10 987 988Return at most 5 most relevant suggestions. Only suggest posts where there is a clear topical connection.`,response_json_schema:{type:"object",properties:{suggestions:{type:"array",items:{type:"object",properties:{post_id:{type:"string"},post_title:{type:"string"},slug:{type:"string"},anchor_text:{type:"string",description:"Suggested anchor text to use in current post"},reason:{type:"string",description:"Why this link is relevant"},relevance_score:{type:"number",description:"1-10"}}}}}}});o(v.suggestions||[]),(y=v.suggestions)!=null&&y.length||we.info("No strong internal link matches found")}catch{we.error("Failed to generate suggestions")}finally{i(!1)}},f=x=>{const y=`${window.location.origin}/BlogPost?slug=${x.slug}`,v=`[${x.anchor_text}](${y})`;navigator.clipboard.writeText(v),c(x.post_id),setTimeout(()=>c(null),2e3),we.success("Markdown link copied!")},p=x=>
988{if(!n)return;const y=`${window.location.origin}/BlogPost?slug=${x.slug}`;n(`[${x.anchor_text}](${y})`),we.success("Link inserted into content")},m=x=>x>=8?"bg-emerald-100 text-emerald-700":x>=6?"bg-amber-100 text-amber-700":"bg-slate-100 text-slate-600";return a.jsxs(de,{className:"border-blue-200",children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2 text-sm",children:[a.jsx(tI,{className:"w-4 h-4 text-blue-600"}),"AI Internal Link Suggester"]}),a.jsx(mn,{className:"text-xs",children:"Find relevant posts to link to for better SEO and reader retention"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsx(ae,{onClick:d,disabled:r,className:"w-full bg-gradient-to-r from-blue-500 to-indigo-600 hover:from-blue-600 hover:to-indigo-700 gap-2",children:r?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"})," Scanning content..."]}):a.jsxs(a.Fragment,{children:[a.jsx(Ct,{className:"w-4 h-4"})," Suggest Internal Links"]})}),a.jsx("div",{className:"text-xs text-slate-500 flex items-center gap-1",children:a.jsxs("span",{children:[u.length," published posts available to link"]})}),a.jsx(hi,{children:s.length>0&&a.jsxs(Pe.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"space-y-3",children:[a.jsxs("p",{className:"text-xs font-semibold text-slate-600",children:[s.length," link suggestion",s.length!==1?"s":""," found:"]}),s.map((x,y)=>a.jsxs(Pe.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{delay:y*.06},className:"p-3 bg-slate-50 rounded-lg border border-slate-200 space-y-2",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsx("p",{className:"text-xs font-semibold text-slate-800 line-clamp-2 flex-1",children:x.post_title}),a.jsxs(Se,{className:`text-xs flex-shrink-0 ${m(x.relevance_score)}`,children:[x.relevance_score,"/10"]})]}),a.jsxs("div",{className:"bg-white border border-slate-200 rounded px-2 py-1.5",children:[a.jsx("p",{className:"text-xs text-slate-500 mb-0.5",children:"Anchor text:"}),a.jsxs("p",{className:"text-xs font-medium text-indigo-700",children:['"',x.anchor_text,'"']})]}),a.jsx("p",{className:"text-xs text-slate-500 italic",children:x.reason}),a.jsxs("div",{className:"flex gap-2 pt-1",children:[a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>f(x),className:"flex-1 h-7 text-xs gap-1",children:l===x.post_id?a.jsxs(a.Fragment,{children:[a.jsx(_n,{className:"w-3 h-3 text-emerald-600"})," Copied!"]}):a.jsxs(a.Fragment,{children:[a.jsx(or,{className:"w-3 h-3"})," Copy MD"]})}),n&&a.jsxs(ae,{size:"sm",onClick:()=>p(x),className:"flex-1 h-7 text-xs gap-1",children:[a.jsx(tI,{className:"w-3 h-3"})," Insert"]})]})]},x.post_id))]})})]})]})}const ODe=[{value:"tech-news",label:"Tech News"},{value:"app-reviews",label:"App Reviews"},{value:"tutorials",label:"Tutorials"},{value:"ai-ml",label:"AI & ML"},{value:"startups",label:"Startups"},{value:"gadgets",label:"Gadgets"},{value:"programming",label:"Programming"},{value:"cybersecurity",label:"Cybersecurity"}];function ADe(){const e=kc(),n=new URLSearchParams(window.location.search).get("id"),{user:r,canPublish:i,canEditPost:s}=pl(),[o,l]=T.useState(!0),[c,u]=T.useState(!1),[d,f]=T.useState({title:"",excerpt:"",content:"",category:"",tags:[],cover_image:"",cover_image_alt:"",status:"draft",premium_content:!1,required_tier:"free"}),[p,m]=T.useState(""),[x,y]=T.useState(""),[v,b]=T.useState(""),[w,N]=T.useState(!1),[S,_]=T.useState(!1);T.useEffect(()=>{n?E():l(!1)},[n]);const E=async()=>{var H;const F=await ce.entities.BlogPost.filter({id:n});if(F.length>0){const U=F[0],W=await ce.auth.me().catch(()=>null);if(W&&W.role!=="admin"&&W.role!=="editor"&&!s(U)){e(Xe("Posts"));return}if(f(U),m(((H=U.tags)==null?void 0:H.join(", "))||""),U.scheduled_date){const G=new Date(U.scheduled_date);y(G.toISOString().split("T")[0]),b(G.toTimeString().slice(0,5))}}l(!1)},k=F=>F.toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim(),O=F=>{const U=F.split(/\s+/).length;return Math.ceil(U/200)},I=async()=>{if(!n)return;const F=d.version||1;await ce.entities.PostVersion.create({post_id:n,version_number:F,title:d.title,content:d.content,excerpt:d.excerpt,meta_description:d.meta_description,edited_by:r==null?void 0:r.email,change_summary:"Auto-saved version"})},A=async(F="save")=>{u(!0);const H=k(d.title),U=O(d.content);let W=d.status,G=d.published_date,L=d.scheduled_date;if(F==="publish")i||(r==null?void 0:r.role)==="admin"?(W="published",G=G||new Date().toISOString(),L=null):W="pending_review";else if(F==="schedule"){if(!x||!v){alert("Please select both date and time for scheduling"),u(!1);return}W="scheduled",L=new Date(`${x}T${v}`).toISOString(),G=null}n&&await I();const $={...d,slug:H,reading_time:U,status:W,tags:p.split(",").map(V=>
988V.trim()).filter(Boolean),published_date:G,scheduled_date:L,version:(d.version||1)+1,last_edited_by:r==null?void 0:r.email};if(n)await ce.entities.BlogPost.update(n,$);else{const V=await ce.entities.BlogPost.create($);e(Xe("PostEditor")+`?id=${V.id}`);return}u(!1),e(Xe("Posts"))},C=async F=>{f({...d,title:F.title,content:F.content,excerpt:F.excerpt,meta_description:F.meta_description}),we.success("Version restored")},R=async()=>{if(!(!d.title||!d.content)){N(!0);try{const F=await ce.integrations.Core.InvokeLLM({prompt:`Generate a concise, descriptive alt text for a blog post cover image. 989 990Post Title: ${d.title} 991Post Content Preview: ${d.content.substring(0,500)} 992 993Generate alt text that: 994- Describes what the image should show 995- Is 10-15 words 996- Includes relevant keywords 997- Is helpful for accessibility`,response_json_schema:{type:"object",properties:{alt_text:{type:"string"}}}});f({...d,cover_image_alt:F.alt_text}),we.success("Alt text generated!")}catch{we.error("Failed to generate alt text")}finally{N(!1)}}},D=async()=>{if(!(!d.title||!d.content)){_(!0);try{const F=await ce.integrations.Core.InvokeLLM({prompt:`Generate an SEO-optimized meta description for this blog post: 998 999Title: ${d.title} 1000Content: ${d.content.substring(0,800)} 1001 1002Requirements: 1003- 150-160 characters 1004- Include primary keyword 1005- Compelling and click-worthy 1006- Summarize the post value`,response_json_schema:{type:"object",properties:{meta_description:{type:"string"}}}});f({...d,meta_description:F.meta_description}),we.success("Meta description generated!")}catch{we.error("Failed to generate meta description")}finally{_(!1)}}},q=async()=>{window.confirm("Are you sure you want to delete this post?")&&(await ce.entities.BlogPost.delete(n),e(Xe("Posts")))};return o?a.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[a.jsx(Dt,{className:"h-10 w-64"}),a.jsx(de,{children:a.jsxs(he,{className:"pt-6 space-y-4",children:[a.jsx(Dt,{className:"h-10 w-full"}),a.jsx(Dt,{className:"h-20 w-full"}),a.jsx(Dt,{className:"h-64 w-full"})]})})]}):a.jsxs("div",{className:"max-w-5xl mx-auto",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"flex items-center justify-between mb-8",children:[a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx(ae,{variant:"ghost",size:"icon",onClick:()=>e(Xe("Posts")),children:a.jsx(rl,{className:"w-5 h-5"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Edit Post"}),a.jsxs("p",{className:"text-slate-500 text-sm",children:["Status: ",a.jsx("span",{className:d.status==="published"?"text-emerald-600":"text-amber-600",children:d.status.replace("_"," ")})]})]})]}),a.jsxs(ae,{variant:"outline",onClick:q,className:"text-red-600 hover:bg-red-50 gap-2",children:[a.jsx(qa,{className:"w-4 h-4"}),"Delete"]})]}),a.jsxs("div",{className:"grid lg:grid-cols-4 gap-6",children:[a.jsx("div",{className:"lg:col-span-3",children:a.jsxs(ur,{defaultValue:"edit",className:"space-y-6",children:[a.jsxs(Jn,{className:"bg-slate-100",children:[a.jsxs(et,{value:"edit",className:"gap-2",children:[a.jsx(os,{className:"w-4 h-4"})," Edit"]}),a.jsxs(et,{value:"ai",className:"gap-2",children:[a.jsx(Tr,{className:"w-4 h-4"})," AI Tools"]}),a.jsxs(et,{value:"seo",className:"gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"})," SEO"]}),a.jsxs(et,{value:"social",className:"gap-2",children:[a.jsx(Ad,{className:"w-4 h-4"})," Social"]}),a.jsxs(et,{value:"preview",className:"gap-2",children:[a.jsx(Qn,{className:"w-4 h-4"})," Preview"]})]}),a.jsxs(ht,{value:"edit",className:"space-y-6",children:[a.jsx(de,{children:a.jsxs(he,{className:"pt-6 space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"title",children:"Title"}),a.jsx(Ye,{id:"title",value:d.title,onChange:F=>f({...d,title:F.target.value}),className:"mt-1.5 text-lg font-medium"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"excerpt",children:"Excerpt"}),a.jsx(dn,{id:"excerpt",value:d.excerpt,onChange:F=>f({...d,excerpt:F.target.value}),className:"mt-1.5",rows:3})]}),a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Category"}),a.jsxs(Mn,{value:d.category,onValueChange:F=>f({...d,category:F}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{placeholder:"Select category"})}),a.jsx(Pn,{children:ODe.map(F=>a.jsx(it,{value:F.value,children:F.label},F.value))})]})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"tags",children:"Tags (comma-separated)"}),a.jsx(Ye,{id:"tags",value:p,onChange:F=>m(F.target.value),placeholder:"AI, Tech, Startups",className:"mt-1.5"})]})]}),a.jsxs("div",{className:"flex items-center justify-between p-4 bg-gradient-to-br from-indigo-50 to-purple-50 rounded-lg border border-indigo-200",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(kJ,{className:"w-4 h-4 text-indigo-600"}),a.jsxs("div",{children:[a.jsx(De,{className:"text-sm font-medium",children:"Premium Content"}),a.jsx("p",{className:"text-xs text-slate-600",children:"Require subscription to view"})]})]}),a.jsx(Xa,{checked:d.premium_content,onCheckedChange:F=>f({...d,premium_content:F})})]}),d.premium_content&&a.jsxs("div",{children:[a.jsx(De,{children:"Required Subscription Tier"}),a.jsxs(Mn,{value:d.required_tier,onValueChange:F=>f({...d,required_tier:F}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"basic",children:"Basic"}),a.jsx(it,{value:"premium",children:"Premium"}),a.jsx(it,{value:"enterprise",children:"Enterprise"})]})]}),a.jsx("p",{className:"text-xs text-slate-500 mt-1.5",children:"Only users with this tier or higher can access this content"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"cover",children:"Cover Image URL"}),a.jsx(Ye,{id:"cover",value:d.cover_image,onChange:F=>f({...d,cover_image:F.target.value}),placeholder:"https://...",className:"mt-1.5"}),d.cover_image&&a.jsx("img",{src:d.cover_image,alt:"Cover preview",className:"mt-3 rounded-xl h-40 w-full object-cover"})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(De,{htmlFor:"alt",children:"Image Alt Text"}),a.jsxs(ae,{type:"button",size:"sm",variant:"outline",onClick:R,disabled:w,className:"gap-2",children:[w?a.jsx(lt,{className:"w-3 h-3 animate-spin"}):a.jsx(Tr,{className:"w-3 h-3"}),"AI Generate"]})]}),a.jsx(Ye,{id:"alt",value:d.cover_image_alt,onChange:F=>f({...d,cover_image_alt:F.target.value}),placeholder:"Descriptive alt text for accessibility",className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"content",children:"Content"}),a.jsx("div",{className:"mt-1.5",children:a.jsx(pDe,{value:d.content,onChange:F=>f({...d,content:F}),placeholder:"Write your blog post content..."})})]}),(d.status==="draft"||d.status==="scheduled"||d.status==="published")&&(i||(r==null?void 0:r.role)==="admin")&&a.jsxs("div",{className:"border-t pt-4",children:[a.jsxs(De,{className:"flex items-center gap-2 mb-3",children:[a.jsx(Rn,{className:"w-4 h-4 text-indigo-600"}),"Schedule Publication"]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsx(Ye,{type:"date",value:x,onChange:F=>y(F.target.value),min:new Date().toISOString().split("T")[0],className:"text-sm"}
1006),a.jsx(Ye,{type:"time",value:v,onChange:F=>b(F.target.value),className:"text-sm"})]})]})]})}),a.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-end",children:[a.jsxs(ae,{variant:"outline",onClick:()=>A("save"),disabled:c,className:"gap-2",children:[c?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(s8,{className:"w-4 h-4"}),"Save Changes"]}),x&&v&&(i||(r==null?void 0:r.role)==="admin")&&a.jsxs(ae,{variant:"outline",onClick:()=>A("schedule"),disabled:c,className:"gap-2 border-amber-300 text-amber-700 hover:bg-amber-50",children:[c?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(Yr,{className:"w-4 h-4"}),"Schedule Post"]}),(d.status==="draft"||d.status==="scheduled"||d.status==="published")&&a.jsxs(ae,{onClick:()=>A("publish"),disabled:c,className:"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:[c?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(ci,{className:"w-4 h-4"}),i?"Publish Now":"Submit for Review"]})]})]}),a.jsxs(ht,{value:"ai",className:"space-y-6",children:[!n&&a.jsxs(a.Fragment,{children:[a.jsx(SK,{onDraftGenerated:F=>{var H;f({...d,...F,tags:F.tags||[]}),m(((H=F.tags)==null?void 0:H.join(", "))||""),we.success("Draft loaded! You can now edit and publish.")}}),a.jsx(EDe,{onContentImported:F=>{f({...d,title:F.title||d.title,content:F.content||d.content}),we.success("Document imported! You can now edit and publish.")}})]}),a.jsx(mDe,{title:d.title,content:d.content,onApplySuggestion:F=>f({...d,...F})}),n&&a.jsx(gDe,{post:{...d,id:n},onUpdate:()=>E()}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-sm",children:"Quick AI Actions"})}),a.jsxs(he,{className:"space-y-3",children:[a.jsxs(ae,{onClick:D,disabled:S,variant:"outline",className:"w-full justify-start gap-2",children:[S?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(Tr,{className:"w-4 h-4"}),"Generate Meta Description"]}),a.jsxs(ae,{onClick:R,disabled:w,variant:"outline",className:"w-full justify-start gap-2",children:[w?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(Tr,{className:"w-4 h-4"}),"Generate Image Alt Text"]})]})]})]}),a.jsxs(ht,{value:"seo",className:"space-y-6",children:[a.jsx(kDe,{title:d.title,content:d.content,onInsertLink:F=>f(H=>({...H,content:H.content+` 1007 1008`+F}))}),a.jsx(_De,{topic:d.title,onKeywordSelect:F=>{f({...d,focus_keyword:F}),we.success(`Focus keyword set to: ${F}`)}}),a.jsx(iDe,{title:d.title,content:d.content,excerpt:d.excerpt,metaDescription:d.meta_description,focusKeyword:d.focus_keyword,onUpdateSEO:F=>f({...d,...F})}),n&&a.jsx(sDe,{post:{...d,id:n},onApply:F=>f({...d,...F})})]}),a.jsxs(ht,{value:"social",className:"space-y-6",children:[a.jsx(NDe,{post:d}),a.jsx(jDe,{post:d}),a.jsx(de,{children:a.jsxs(he,{className:"pt-6 space-y-6",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Social Media Preview"}),a.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Preview how your post will appear when shared on social media"}),a.jsxs("div",{className:"border border-slate-200 rounded-lg p-4 bg-slate-50",children:[d.cover_image&&a.jsx("img",{src:d.cover_image,alt:d.title,className:"w-full h-48 object-cover rounded-lg mb-3"}),a.jsx("h4",{className:"font-semibold text-slate-900 mb-1",children:d.title||"Untitled Post"}),a.jsx("p",{className:"text-sm text-slate-600 line-clamp-2",children:d.excerpt||"No excerpt available"})]})]}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Share Links"}),d.slug&&d.status==="published"&&a.jsx(FG,{post:d,url:`${window.location.origin}/blog?slug=${d.slug}`}),(!d.slug||d.status!=="published")&&a.jsx("p",{className:"text-sm text-slate-500",children:"Publish your post to enable social sharing"})]})]})})]}),a.jsx(ht,{value:"preview",children:a.jsxs(de,{className:"overflow-hidden",children:[d.cover_image&&a.jsx("div",{className:"h-64 overflow-hidden",children:a.jsx("img",{src:d.cover_image,alt:d.cover_image_alt||d.title,className:"w-full h-full object-cover"})}),a.jsxs(he,{className:"py-8 px-6 lg:px-12",children:[a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:d.title}),a.jsx("p",{className:"text-lg text-slate-600 mb-8 italic",children:d.excerpt}),a.jsx("div",{className:"prose prose-slate max-w-none",children:a.jsx(dx,{children:d.content})})]})]})})]})}),a.jsx("div",{className:"lg:col-span-1",children:a.jsxs("div",{className:"sticky top-24 space-y-4",children:[n&&a.jsx(PDe,{postId:n}),n&&a.jsx(wDe,{postId:n,content:d.content,currentUser:r}),n&&a.jsx(bDe,{postId:n,currentUser:r,post:d,onRestoreVersion:C})]})})]})]})}function CDe(){const[e,t]=T.useState("all"),[n,r]=T.useState(""),i=Ln(),{user:s,canEditAnyPost:o}=pl(),{data:l=[],isLoading:c}=st({queryKey:["posts"],queryFn:()=>ce.entities.BlogPost.list("-created_date",100)}),u=wr({mutationFn:f=>ce.entities.BlogPost.delete(f),onSuccess:()=>i.invalidateQueries({queryKey:["posts"]})}),d=l.filter(f=>{var y,v;const p=e==="all"||f.status===e,m=!n||((y=f.title)==null?void 0:y.toLowerCase().includes(n.toLowerCase()))||((v=f.category)==null?void 0:v.toLowerCase().includes(n.toLowerCase())),x=o||f.created_by===(s==null?void 0:s.email);return p&&m&&x});return a.jsxs("div",{className:"max-w-7xl mx-auto",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20}
1008,animate:{opacity:1,y:0},className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-8",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"All Posts"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Manage your blog content"})]}),a.jsx(ft,{to:Xe("CreatePost"),children:a.jsxs(ae,{className:"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"}),"Create Post"]})})]}),a.jsxs(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"flex flex-col sm:flex-row gap-4 mb-6",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(lr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),a.jsx(Ye,{placeholder:"Search posts...",value:n,onChange:f=>r(f.target.value),className:"pl-10"})]}),a.jsx(ur,{value:e,onValueChange:t,children:a.jsxs(Jn,{className:"bg-slate-100",children:[a.jsx(et,{value:"all",children:"All"}),a.jsx(et,{value:"published",children:"Published"}),a.jsx(et,{value:"draft",children:"Drafts"}),a.jsx(et,{value:"pending_review",children:"Pending"})]})})]}),c?a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-5",children:[...Array(6)].map((f,p)=>a.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 p-5",children:[a.jsx(Dt,{className:"h-40 w-full rounded-xl mb-4"}),a.jsx(Dt,{className:"h-4 w-20 mb-3"}),a.jsx(Dt,{className:"h-6 w-full mb-2"}),a.jsx(Dt,{className:"h-4 w-3/4"})]},p))}):d.length>0?a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-5",children:d.map((f,p)=>a.jsx(HK,{post:f,onDelete:m=>u.mutate(m),delay:p*.05},f.id))}):a.jsxs(Pe.div,{initial:{opacity:0}
1008,animate:{opacity:1},className:"bg-white rounded-2xl border border-slate-100 p-12 text-center",children:[a.jsx("div",{className:"w-16 h-16 bg-indigo-50 rounded-2xl flex items-center justify-center mx-auto mb-4",children:a.jsx(os,{className:"w-8 h-8 text-indigo-500"})}),a.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:n?"No matching posts":"No posts yet"}),a.jsx("p",{className:"text-slate-500 mb-6",children:n?"Try a different search term":"Create your first blog post"}),!n&&a.jsx(ft,{to:Xe("CreatePost"),children:a.jsxs(ae,{className:"bg-indigo-600 hover:bg-indigo-700 gap-2",children:[a.jsx(Yo,{className:"w-4 h-4"}),"Create Post"]})})]})]})}function TDe(){return a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx("header",{className:"sticky top-0 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[a.jsxs(ft,{to:Xe("Blog"),className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:a.jsx(Ct,{className:"w-5 h-5 text-white"})}),a.jsx("span",{className:"font-bold text-xl text-slate-900",children:"TechBlog"})]}),a.jsx(ft,{to:Xe("Blog"),children:a.jsxs(ae,{variant:"ghost",className:"gap-2",children:[a.jsx(rl,{className:"w-4 h-4"}),"Back to Blog"]})})]})}),a.jsx("article",{className:"max-w-4xl mx-auto px-4 py-16",children:a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:[a.jsx("h1",{className:"text-4xl font-bold text-slate-900 mb-6",children:"Privacy Policy"}),a.jsx("p",{className:"text-slate-500 mb-8",children:"Effective Date: December 21, 2024"}),a.jsxs("div",{className:"prose prose-slate prose-lg max-w-none",children:[a.jsx("p",{className:"lead text-xl text-slate-600 mb-8",children:"This Privacy Policy explains how TechBlog collects, uses, and protects your personal information."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Information We Collect"}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"Automatically Collected Information"}),a.jsx("p",{children:"When you visit our website, we automatically collect certain information, including:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"Browser type and version"}),a.jsx("li",{children:"Operating system"}),a.jsx("li",{children:"IP address"}),a.jsx("li",{children:"Pages viewed and time spent on pages"}),a.jsx("li",{children:"Referring website addresses"})]}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"Cookies and Tracking"}),a.jsx("p",{children:"We use cookies and similar tracking technologies to improve user experience and analyze website traffic. You can control cookie settings through your browser preferences."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"How We Use Your Information"}),a.jsx("p",{children:"We use collected information to:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"Provide and improve our services"}),a.jsx("li",{children:"Analyze website usage and trends"}),a.jsx("li",{children:"Deliver relevant content and advertisements"}),a.jsx("li",{children:"Ensure website security and prevent fraud"}),a.jsx("li",{children:"Comply with legal obligations"})]}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Third-Party Services"}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"Google AdSense"}),a.jsxs("p",{children:["We use Google AdSense to display advertisements. Google may use cookies to serve ads based on your prior visits to our website or other websites. You can opt out of personalized advertising by visiting",a.jsx("a",{href:"https://www.google.com/settings/ads",target:"_blank",rel:"noopener noreferrer",className:"text-indigo-600 hover:underline",children:" Google's Ads Settings"}),"."]}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"Analytics"}),a.jsx("p",{children:"We use analytics services to understand how visitors use our website. These services may collect information about your use of our site and other websites."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Data Security"}),a.jsx("p",{children:"We implement reasonable security measures to protect your information from unauthorized access, alteration, disclosure, or destruction. However, no internet transmission is completely secure, and we cannot guarantee absolute security."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Your Rights"}),a.jsx("p",{children:"You have the right to:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"Access the personal information we hold about you"}),a.jsx("li",{children:"Request correction of inaccurate information"}
1008),a.jsx("li",{children:"Request deletion of your information (subject to legal requirements)"}),a.jsx("li",{children:"Opt out of marketing communications"}),a.jsx("li",{children:"Disable cookies through your browser settings"})]}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Children's Privacy"}),a.jsx("p",{children:"Our website is not directed to children under 13 years of age. We do not knowingly collect personal information from children. If you believe we have collected information from a child, please contact us immediately."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Changes to This Policy"}),a.jsx("p",{children:"We may update this Privacy Policy from time to time. Changes will be posted on this page with an updated effective date. We encourage you to review this policy periodically."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Contact Us"}),a.jsxs("p",{children:["If you have questions about this Privacy Policy, please visit our"," ",a.jsx(ft,{to:Xe("Contact"),className:"text-indigo-600 hover:underline",children:"contact page"}),"."]}),a.jsx("div",{className:"mt-12 p-6 bg-indigo-50 rounded-xl border border-indigo-100",children:a.jsxs("p",{className:"text-slate-700 mb-0",children:[a.jsx("strong",{children:"Last Updated:"})," December 21, 2024"]})})]})]})}),a.jsx("footer",{className:"border-t border-slate-200 mt-16",children:a.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8",children:a.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"© 2024 TechBlog. All rights reserved."}),a.jsxs("div",{className:"flex gap-6 text-sm",children:[a.jsx(ft,{to:Xe("About"),className:"text-slate-600 hover:text-indigo-600",children:"About"}),a.jsx(ft,{to:Xe("Terms"),className:"text-slate-600 hover:text-indigo-600",children:"Terms of Service"}),a.jsx(ft,{to:Xe("Contact"),className:"text-slate-600 hover:text-indigo-600",children:"Contact"})]})]})})})]})}function RDe({posts:e=[]}){const[t,n]=T.useState(new Date),r=OAe(t),i=PAe(t),s=kAe({start:r,end:i}),o=r.getDay(),l=[...Array(o).fill(null),...s],c=u=>e.filter(d=>d.scheduled_date&&ZB(new Date(d.scheduled_date),u));return a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Yr,{className:"w-5 h-5 text-indigo-600"}),"Calendar View"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ae,{variant:"ghost",size:"icon",onClick:()=>n(H2e(t)),children:a.jsx(UZ,{className:"w-4 h-4"})}),a.jsx("span",{className:"text-sm font-medium w-32 text-center",children:Jt(t,"MMMM yyyy")}),a.jsx(ae,{variant:"ghost",size:"icon",onClick:()=>n(CG(t,1)),children:a.jsx(Yk,{className:"w-4 h-4"})})]})]})}),a.jsxs(he,{children:[a.jsx("div",{className:"grid grid-cols-7 mb-2",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(u=>a.jsx("div",{className:"text-center text-xs font-semibold text-slate-400 py-2",children:u},u))}),a.jsx("div",{className:"grid grid-cols-7 gap-1",children:l.map((u,d)=>{if(!u)return a.jsx("div",{},`pad-${d}`);const f=c(u),p=ZB(u,new Date);return a.jsxs("div",{className:`min-h-16 p-1 rounded-lg border text-xs ${p?"border-indigo-300 bg-indigo-50":"border-slate-100 bg-white"} ${O2e(u,t)?"":"opacity-30"}`,children:[a.jsx("div",{className:`font-medium mb-1 ${p?"text-indigo-600":"text-slate-600"}`,children:Jt(u,"d")}),f.map(m=>a.jsx(ft,{to:Xe("PostEditor")+`?id=${m.id}`,children:a.jsx("div",{className:"bg-amber-100 text-amber-800 rounded px-1 py-0.5 mb-0.5 truncate hover:bg-amber-200 transition-colors cursor-pointer text-xs leading-tight",children:m.title})},m.id))]},u.toISOString())})})]})]})}function IDe(){const{canPublish:e}=pl(),[t,n]=T.useState(!1),r=Ln(),{data:i=[]}=st({queryKey:["scheduled-posts"],queryFn:()=>ce.entities.BlogPost.filter({status:"scheduled"},"scheduled_date",50)}),s=async()=>{n(!0);try{const c=await ce.functions.publishScheduledPosts({});alert(c.message||`Published ${c.published_count} posts`),r.invalidateQueries({queryKey:["scheduled-posts"]})}catch(c){alert("Failed to publish posts: "+c.message)}finally{n(!1)}};if(!e)return a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsxs(jr,{variant:"destructive",children:[a.jsx(Kr,{className:"h-4 w-4"}),a.jsx(Sr,{children:"You don't have permission to manage scheduled posts."})]})});const o=new Date,l=i.filter(c=>c.scheduled_date&&new Date(c.scheduled_date)<=o);
1008return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3",children:[a.jsx(Rn,{className:"w-8 h-8 text-indigo-600"}),"Content Scheduling"]}),a.jsx("p",{className:"text-slate-600 mt-2",children:"Manage scheduled posts and automatic publishing"})]}),l.length>0&&a.jsxs(jr,{className:"border-amber-200 bg-amber-50",children:[a.jsx(Kr,{className:"h-4 w-4 text-amber-600"}),a.jsxs(Sr,{className:"text-amber-800",children:[a.jsxs("strong",{children:[l.length," post(s)"]})," are due for publication.",a.jsxs(ae,{size:"sm",onClick:s,disabled:t,className:"ml-3 bg-amber-600 hover:bg-amber-700",children:[t?a.jsx(lt,{className:"w-3 h-3 animate-spin mr-1"}):a.jsx(nI,{className:"w-3 h-3 mr-1"}),"Publish Now"]})]})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Ie,{children:["Scheduled Posts (",i.length,")"]}),a.jsxs(ae,{onClick:s,disabled:t||l.length===0,variant:"outline",className:"gap-2",children:[t?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(nI,{className:"w-4 h-4"}),"Publish Due Posts"]})]})}),a.jsx(he,{children:a.jsxs("div",{className:"space-y-3",children:[i.map((c,u)=>{const d=new Date(c.scheduled_date),f=d<=o;return a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:u*.05},className:`p-4 rounded-lg border-2 ${f?"bg-amber-50 border-amber-200":"bg-slate-50 border-slate-200"}`,children:a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx(ft,{to:Xe("PostEditor")+`?id=${c.id}`,children:a.jsx("h3",{className:"font-semibold text-slate-900 hover:text-indigo-600 transition-colors",children:c.title})}),a.jsx("p",{className:"text-sm text-slate-600 mt-1 line-clamp-1",children:c.excerpt}),a.jsxs("div",{className:"flex items-center gap-3 mt-2 text-xs text-slate-500",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Yr,{className:"w-3 h-3"}),Jt(d,"MMM d, yyyy ⢠h:mm a")]}),c.category&&a.jsx(Se,{variant:"outline",className:"text-xs",children:c.category})]})]}),a.jsxs(Se,{variant:f?"destructive":"secondary",className:"flex items-center gap-1",children:[a.jsx(Rn,{className:"w-3 h-3"}),f?"Due":"Scheduled"]})]})},c.id)}),i.length===0&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No scheduled posts"})]})})]}),a.jsx(RDe,{posts:i}),a.jsxs(jr,{className:"border-blue-200 bg-blue-50",children:[a.jsx(Kr,{className:"h-4 w-4 text-blue-600"}),a.jsxs(Sr,{className:"text-blue-700",children:[a.jsx("strong",{children:"Note:"}),' Scheduled posts must be published manually by clicking "Publish Due Posts" or from the Post Editor. Automatic publishing at scheduled times requires a cron job setup.']})]})]})}function MDe({connected:e,email:t,onConnect:n,onDisconnect:r,loading:i=!1}){return a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(xr,{className:"w-5 h-5 text-red-500"}),"Gmail Connection"]}),a.jsx(mn,{children:"Connect your Gmail to import newsletters directly"})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs(jr,{className:"border-blue-200 bg-blue-50",children:[a.jsx(Q_,{className:"h-4 w-4 text-blue-600"}),a.jsx(jK,{className:"text-blue-800",children:"Setup Required"}),a.jsxs(Sr,{className:"text-blue-700",children:["To enable Gmail integration, you need to set up a Google Cloud Project and configure OAuth credentials.",a.jsx("br",{}),a.jsx("br",{}),a.jsx("strong",{children:"Steps:"}),a.jsxs("ol",{className:"list-decimal list-inside mt-2 space-y-1",children:[a.jsxs("li",{children:["Go to ",a.jsx("a",{href:"https://console.cloud.google.com",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Google Cloud Console"})]}),a.jsx("li",{children:"Create a new project or select existing"}),a.jsx("li",{children:"Enable Gmail API"}),a.jsx("li",{children:"Create OAuth 2.0 credentials (Web application)"}),a.jsxs("li",{children:["Add authorized redirect URI: ",a.jsx("code",{className:"bg-blue-100 px-1 rounded text-xs",children:"[your-app-url]/api/functions/handleGmailCallback"})]}),a.jsx("li",{children:"Copy Client ID and Client Secret to app secrets: GMAIL_CLIENT_ID and GMAIL_CLIENT_SECRET"})]})]})]}),a.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 rounded-xl",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-white border border-slate-200 flex items-center justify-center",children:a.jsx(xr,{className:"w-5 h-5 text-red-500"})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:"Gmail Account"}),a.jsx("p",{className:"text-sm text-slate-500",children:e?t:"Not connected"})]})]}),a.jsx(Se,{variant:"secondary",className:e?"bg-green-100 text-green-700 border-green-200":"bg-slate-200 text-slate-600",children:e?a.jsxs(a.Fragment,{children:[a.jsx(Cn,{className:"w-3 h-3 mr-1"}),"Connected"]}):a.jsxs(a.Fragment,{children:[a.jsx(As,{className:"w-3 h-3 mr-1"}),"Not Connected"]})})]}),e?a.jsxs("div",{className:"space-y-3",children:[a.jsxs(jr,{className:"border-green-200 bg-green-50",children:[a.jsx(Cn,{className:"h-4 w-4 text-green-600"}),a.jsx(Sr,{className:"text-green-700",children:"Your Gmail account is connected. You can now import newsletters directly."})]}),a.jsxs(ae,{variant:"outline",onClick:r,disabled:i,className:"w-full text-red-600 hover:bg-red-50 border-red-200",children:[i?a.jsx(ss,{className:"w-4 h-4 mr-2 animate-spin"}):a.jsx(As,{className:"w-4 h-4 mr-2"}),"Disconnect Gmail"]})]}):a.jsx(ae,{onClick:n,disabled:i,className:"w-full bg-red-500 hover:bg-red-600 text-white",children:i?a.jsxs(a.Fragment,{children:[a.jsx(ss,{className:"w-4 h-4 mr-2 animate-spin"}),"Connecting..."]}):a.jsxs(a.Fragment,{children:[a.jsx(xr,{className:"w-4 h-4 mr-2"}),"Connect Gmail Account"]})}),!e&&a.jsxs("div",{className:"bg-indigo-50 rounded-xl p-4",children:[a.jsxs("h4",{className:"font-medium text-indigo-900 mb-2 flex items-center gap-2",children:[a.jsx(Q_,{className:"w-4 h-4"}),"Alternative Method"]}),a.jsx("p",{className:"text-sm text-indigo-700",children:'Until Gmail is configured, you can use the "Create Post" page to paste newsletter content directly. The AI will instantly transform it into a professional blog post.'})]})]})]})}function DDe(){Ln();const[e,t]=T.useState(!1),[n,r]=T.useState({placement_id:"",variant_a_code:"",variant_b_co
1008de:"",name:""}),{data:i=[]}=st({queryKey:["ad-placements-performance"],queryFn:async()=>{try{return await ce.entities.AdPlacement.list()}catch(f){return console.error("Error loading placements:",f),[]}}}),s=i.reduce((f,p)=>f+(p.impressions||0),0),o=i.reduce((f,p)=>f+(p.clicks||0),0),l=s>0?(o/s*100).toFixed(2):0,c=(o*.25).toFixed(2),u=i.map(f=>({name:f.name,impressions:f.impressions||0,clicks:f.clicks||0,ctr:f.impressions>0?(f.clicks/f.impressions*100).toFixed(2):0,revenue:((f.clicks||0)*.25).toFixed(2)})),d=async()=>{if(!n.placement_id||!n.variant_a_code||!n.variant_b_code){we.error("Please fill in all fields");return}try{await ce.entities.ABTest.create({name:n.name,test_type:"ad_creative",variant_a:{content:n.variant_a_code,views:0,clicks:0,conversions:0},variant_b:{content:n.variant_b_code,views:0,clicks:0,conversions:0}}),we.success("A/B test created for ad placement!"),t(!1),r({placement_id:"",variant_a_code:"",variant_b_code:"",name:""})}catch{we.error("Failed to create A/B test")}};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"text-2xl font-bold text-slate-900",children:"Ad Performance Dashboard"}),a.jsxs(ae,{onClick:()=>t(!e),className:"gap-2",children:[a.jsx(fee,{className:"w-4 h-4"}),"Create A/B Test"]})]}),e&&a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Create Ad Creative A/B Test"})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Test Name"}),a.jsx(Ye,{placeholder:"e.g., Sidebar Ad Creative Test",value:n.name,onChange:f=>r({...n,name:f.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Select Placement"}),a.jsxs(Mn,{value:n.placement_id,onValueChange:f=>r({...n,placement_id:f}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{placeholder:"Choose placement"})}),a.jsx(Pn,{children:i.map(f=>a.jsxs(it,{value:f.id,children:[f.name," (",f.location,")"]},f.id))})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Variant A - Ad Code"}),a.jsx(dn,{placeholder:"Original ad code...",value:n.variant_a_code,onChange:f=>r({...n,variant_a_code:f.target.value}),className:"mt-1.5 font-mono text-xs",rows:4})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Variant B - Ad Code"}),a.jsx(dn,{placeholder:"Test ad code...",value:n.variant_b_code,onChange:f=>r({...n,variant_b_code:f.target.value}),className:"mt-1.5 font-mono text-xs",rows:4})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{onClick:d,className:"flex-1",children:"Create Test"}),a.jsx(ae,{onClick:()=>t(!1),variant:"outline",children:"Cancel"})]})]})]}),a.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Total Impressions"}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:s.toLocaleString()})]}),a.jsx(Qn,{className:"w-8 h-8 text-blue-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Total Clicks"}),a.jsx("p",{className:"text-2xl font-bold text-indigo-600",children:o.toLocaleString()})]}),a.jsx(n8,{className:"w-8 h-8 text-indigo-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Overall CTR"}),a.jsxs("p",{className:"text-2xl font-bold text-green-600",children:[l,"%"]})]}),a.jsx(Xr,{className:"w-8 h-8 text-green-500"})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Est. Revenue"}),a.jsxs("p",{className:"text-2xl font-bold text-emerald-600",children:["$",c]})]}),a.jsx(qy,{className:"w-8 h-8 text-emerald-500"})]})})})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-lg",children:"Impressions by Placement"})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:250,children:a.jsxs(Ha,{data:u,children:[a.jsx(Cs,{strokeDasharray:"3 3"}),a.jsx(Ir,{dataKey:"name",tick:{fontSize:11}}),a.jsx(Mr,{}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"impressions",fill:"#6366f1"})]})})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-lg",children:"Click-Through Rate (%)"})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:250,children:a.jsxs(x0,{data:u,children:[a.jsx(Cs,{strokeDasharray:"3 3"}),a.jsx(Ir,{dataKey:"name",tick:{fontSize:11}}),a.jsx(Mr,{}),a.jsx(Nn,{}),a.jsx(cl,{type:"monotone",dataKey:"ctr",stroke:"#10b981",strokeWidth:2})]})})})]})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-lg",children:"Placement Performance Details"})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-4",children:i.map(f=>{const p=f.impressions>0?(f.clicks/f.impressions*100).toFixed(2):0,m=((f.clicks||0)*.25).toFixed(2);return a.jsxs("div",{className:"p-4 border rounded-lg space-y-3",children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"font-semibold text-slate-900",children:f.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[a.jsx(Se,{variant:"outline",children:f.location}),f.is_active?a.jsx(Se,{className:"bg-green-100 text-green-700",children:"Active"}):a.jsx(Se,{variant:"secondary",children:"Inactive"})]})]}),a.jsxs("div",{className:"text-right",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Est. Revenue"}),a.jsxs("p",{className:"text-xl font-bold text-emerald-600",children:["$",m]}
1008)]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-slate-500",children:"Impressions"}),a.jsx("p",{className:"font-semibold text-slate-900",children:(f.impressions||0).toLocaleString()})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-slate-500",children:"Clicks"}),a.jsx("p",{className:"font-semibold text-indigo-600",children:f.clicks||0})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-slate-500",children:"CTR"}),a.jsxs("p",{className:"font-semibold text-green-600",children:[p,"%"]})]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between text-xs mb-1",children:[a.jsx("span",{children:"Performance"}),a.jsxs("span",{children:[p,"% CTR"]})]}),a.jsx(cs,{value:parseFloat(p)*10,className:"h-2"})]})]},f.id)})})})]})]})}function LDe(){var q,F,H;const[e,t]=T.useState(null),{canManageSettings:n,canManageAds:r}=pl(),[i,s]=T.useState(!1),[o,l]=T.useState(!1),[c,u]=T.useState({ads_enabled:!1,header_ad_code:"",sidebar_ad_code:"",in_content_ad_code:""}),d=Ln(),{data:f=[],refetch:p}=st({queryKey:["ad-placements"],queryFn:async()=>{try{return await ce.entities.AdPlacement.list()}catch(U){return console.error("Error loading ad placements:",U),[]}}}),[m,x]=T.useState({name:"",location:"header",ad_code:"",is_active:!0,display_pages:["all"],target_categories:[],priority:0}),[y,v]=T.useState(""),[b,w]=T.useState({google_analytics_id:"",google_tag_manager_id:"",google_adsense_id:"",meta_pixel_id:"",custom_head_scripts:"",custom_body_scripts:""}),[N,S]=T.useState(!1);T.useEffect(()=>{_()},[]);const _=async()=>{const U=await ce.auth.me();t(U),u({ads_enabled:U.ads_enabled||!1,header_ad_code:U.header_ad_code||"",sidebar_ad_code:U.sidebar_ad_code||"",in_content_ad_code:U.in_content_ad_code||""})},E=async()=>{if(!m.name||!m.ad_code){we.error("Please fill in all required fields");return}try{await ce.entities.AdPlacement.create(m),we.success("Ad placement created!"),x({name:"",location:"header",ad_code:"",is_active:!0,display_pages:["all"],target_categories:[],priority:0}),v(""),S(!1),p()}catch{we.error("Failed to create placement")}},k=async(U,W)=>{try{await ce.entities.AdPlacement.update(U,{is_active:!W}),p(),we.success(W?"Placement disabled":"Placement enabled")}catch{we.error("Failed to update placement")}},O=async U=>{if(confirm("Delete this ad placement?"))try{await ce.entities.AdPlacement.delete(U),p(),we.success("Placement deleted")}catch{we.error("Failed to delete placement")}},I=async()=>{try{const U=Object.fromEntries(Object.entries(b).filter(([G,L])=>L&&L.trim()!=="")),W=await ce.entities.SiteSettings.list();W.length>0?await ce.entities.SiteSettings.update(W[0].id,U):Object.keys(U).length>0&&await ce.entities.SiteSettings.create(U),we.success("SEO settings saved!")}catch(U){we.error("Failed to save settings"),console.error(U)}};T.useEffect(()=>{(async()=>{try{const W=await ce.entities.SiteSettings.list();W.length>0&&w(W[0])}catch(W){console.error("Error loading site settings:",W)}})()},[]);const{data:A,isLoading:C}=st({queryKey:["gmail-connection"],queryFn:async()=>{try{return await ce.functions.checkGmailConnection()}catch(U){return console.error("Error checking Gmail connection:",U),{connected:!1,email:null}}}}),R=async()=>{try{const U=await ce.functions.getGmailAuthUrl();U.success?window.location.href=U.authUrl:alert(U.error||"Failed to generate authorization URL. Please check if Gmail OAuth credentials are configured in app secrets.")}catch(U){console.error("Error initiating Gmail connection:",U),alert("Failed to connect Gmail. Please ensure GMAIL_CLIENT_ID and GMAIL_CLIENT_SECRET are configured.")}},D=async()=>{if(confirm("Are you sure you want to disconnect Gmail? You can reconnect anytime."))try{const U=await ce.functions.disconnectGmail();U.success?(d.invalidateQueries({queryKey:["gmail-connection"]}),alert("Gmail disconnected successfully")):alert(U.error||"Failed to disconnect Gmail")}catch(U){console.error("Error disconnecting Gmail:",U),alert("Failed to disconnect Gmail")}};return e?!n&&!r?a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsxs(jr,{variant:"destructive",children:[a.jsx(Kr,{className:"h-4 w-4"}),a.jsx(Sr,{children:"You don't have permission to access settings."})]})}):a.jsxs("div",{className:"max-w-5xl mx-auto",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20}
1008,animate:{opacity:1,y:0},className:"mb-6",children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Settings"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Manage your account and integrations"})]}),a.jsxs(ur,{defaultValue:r&&!n?"ads":"account",className:"space-y-6",children:[a.jsxs(Jn,{className:"bg-slate-100",children:[n&&a.jsx(et,{value:"account",children:"Account"}),r&&a.jsx(et,{value:"ads",children:"Ad Management"}),r&&a.jsx(et,{value:"performance",children:"Ad Performance"}),n&&a.jsx(et,{value:"seo",children:"SEO & Tracking"})]}),n&&a.jsxs(ht,{value:"account",className:"space-y-6",children:[a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},children:a.jsx(MDe,{connected:(A==null?void 0:A.connected)||!1,email:A==null?void 0:A.email,onConnect:R,onDisconnect:D,loading:C})}),a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:a.jsxs(de,{className:"border-emerald-200",children:[a.jsx(Re,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(qy,{className:"w-5 h-5 text-emerald-600"}),"Ad Placements"]}),a.jsx(mn,{children:"Manage ad placements across your blog"})]}),a.jsxs(ae,{onClick:()=>S(!N),className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:[a.jsx(Yo,{className:"w-4 h-4"}),"New Placement"]})]})}),a.jsxs(he,{className:"space-y-6",children:[a.jsxs(jr,{className:"border-blue-200 bg-blue-50",children:[a.jsx(rI,{className:"h-4 w-4 text-blue-600"}),a.jsxs(Sr,{className:"text-blue-700",children:[a.jsx("strong",{children:"Tip:"})," Ads will render HTML and execute JavaScript automatically. Perfect for AdSense, Adsterra, or custom ad networks."]})]}),N&&a.jsxs(de,{className:"bg-slate-50 border-slate-200",children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Create New Ad Placement"})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-name",children:"Placement Name *"}),a.jsx(Ye,{id:"new-name",placeholder:"e.g., Homepage Header Ad",value:m.name,onChange:U=>x({...m,name:U.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-location",children:"Location *"}),a.jsxs(Mn,{value:m.location,onValueChange:U=>x({...m,location:U}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"header",children:"Header"}),a.jsx(it,{value:"sidebar",children:"Sidebar"}),a.jsx(it,{value:"footer",children:"Footer"}),a.jsx(it,{value:"in_content",children:"In-Content"}),a.jsx(it,{value:"between_posts",children:"Between Posts"}),a.jsx(it,{value:"custom",children:"Custom"})]})]})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-code",children:"Ad Code (HTML/JavaScript) *"}),a.jsx(dn,{id:"new-code",placeholder:'<script async src="..."><\/script>',value:m.ad_code,onChange:U=>x({...m,ad_code:U.target.value}),className:"mt-1.5 font-mono text-xs min-h-[120px]"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-categories",children:"Target Categories (optional)"}),a.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Comma-separated, e.g., tech-news,ai-ml (leave empty for all)"}),a.jsx(Ye,{id:"new-categories",placeholder:"tech-news, ai-ml, programming",value:y,onChange:U=>{v(U.target.value),x({...m,target_categories:U.target.value.split(",").map(W=>W.trim()).filter(Boolean)})},className:"mt-1.5"})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(De,{htmlFor:"new-active",children:"Active by default"}),a.jsx(Xa,{id:"new-active",checked:m.is_active,onCheckedChange:U=>x({...m,is_active:U})})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{onClick:E,className:"flex-1 bg-emerald-600 hover:bg-emerald-700",children:"Create Placement"}),a.jsx(ae,{onClick:()=>S(!1),variant:"outline",children:"Cancel"})]})]})]}),a.jsxs("div",{className:"space-y-3",children:[f.map(U=>{var W;return a.jsx(de,{className:U.is_active?"border-emerald-200":"border-slate-200 opacity-60",children:a.jsx(he,{className:"p-4",children:a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h4",{className:"font-semibold text-slate-900",children:U.name}),a.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-slate-100 text-slate-600",children:U.location}),U.is_active?a.jsxs("span",{className:"flex items-center gap-1 text-xs text-emerald-600",children:[a.jsx(Qn,{className:"w-3 h-3"})," Active"]}):a.jsxs("span",{className:"flex items-center gap-1 text-xs text-slate-400",children:[a.jsx(Rg,{className:"w-3 h-3"})," Disabled"]})]}),((W=U.target_categories)==null?void 0:W.length)>0&&a.jsx("div",{className:"flex flex-wrap gap-1",children:U.target_categories.map(G=>a.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-indigo-100 text-indigo-700",children:G},G))}),U.impressions>0&&a.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[U.impressions," impressions ⢠",U.clicks||0," clicks"]})]}),a.jsx("div",{className:"text-xs text-slate-500 font-mono bg-slate-50 p-2 rounded line-clamp-2",children:U.ad_code})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>k(U.id,U.is_active),children:U.is_active?a.jsx(Rg,{className:"w-3 h-3"}):a.jsx(Qn,{className:"w-3 h-3"})}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>O(U.id),className:"text-red-500 hover:text-red-600",children:a.jsx(qa,{className:"w-3 h-3"})})]})]})})},U.id)}),f.length===0&&!N&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:'No ad placements yet. Click "New Placement" to create one.'})]})]})]})}),a.jsx(Pe.div,{initial:{opacity:0,y:20}
1008,animate:{opacity:1,y:0},transition:{delay:.4},children:a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(l8,{className:"w-5 h-5 text-emerald-500"}),"Security & Privacy"]})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-3 p-4 bg-emerald-50 rounded-xl",children:[a.jsx(Cn,{className:"w-5 h-5 text-emerald-600"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-emerald-900",children:"No passwords stored"}),a.jsx("p",{className:"text-sm text-emerald-700",children:"We use secure OAuth authentication - your password is never stored"})]})]}),a.jsxs("div",{className:"flex items-center gap-3 p-4 bg-emerald-50 rounded-xl",children:[a.jsx(Cn,{className:"w-5 h-5 text-emerald-600"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-emerald-900",children:"Secure login"}),a.jsx("p",{className:"text-sm text-emerald-700",children:"Your account is protected with industry-standard security"})]})]})]})]})}),a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},children:a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{children:"Account Information"})}),a.jsx(he,{children:a.jsxs("div",{className:"flex items-center gap-4",children:[a.jsx("div",{className:"w-14 h-14 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 flex items-center justify-center text-white text-xl font-semibold",children:((q=e.full_name)==null?void 0:q[0])||((H=(F=e.email)==null?void 0:F[0])==null?void 0:H.toUpperCase())}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-slate-900",children:e.full_name||"User"}),a.jsx("p",{className:"text-slate-500",children:e.email}),a.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["Role: ",e.role]})]})]})})]})})]}),r&&a.jsx(ht,{value:"ads",className:"space-y-6",children:a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:a.jsxs(de,{className:"border-emerald-200",children:[a.jsx(Re,{children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(qy,{className:"w-5 h-5 text-emerald-600"}),"Ad Placements"]}),a.jsx(mn,{children:"Manage ad placements across your blog"})]}),a.jsxs(ae,{onClick:()=>S(!N),className:"gap-2 bg-emerald-600 hover:bg-emerald-700",children:[a.jsx(Yo,{className:"w-4 h-4"}),"New Placement"]})]})}),a.jsxs(he,{className:"space-y-6",children:[a.jsxs(jr,{className:"border-blue-200 bg-blue-50",children:[a.jsx(rI,{className:"h-4 w-4 text-blue-600"}),a.jsxs(Sr,{className:"text-blue-700",children:[a.jsx("strong",{children:"Tip:"})," Ads will render HTML and execute JavaScript automatically. Perfect for AdSense, Adsterra, or custom ad networks."]})]}),N&&a.jsxs(de,{className:"bg-slate-50 border-slate-200",children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Create New Ad Placement"})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-name",children:"Placement Name *"}),a.jsx(Ye,{id:"new-name",placeholder:"e.g., Homepage Header Ad",value:m.name,onChange:U=>x({...m,name:U.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-location",children:"Location *"}),a.jsxs(Mn,{value:m.location,onValueChange:U=>x({...m,location:U}),children:[a.jsx(En,{className:"mt-1.5",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"header",children:"Header"}),a.jsx(it,{value:"sidebar",children:"Sidebar"}),a.jsx(it,{value:"footer",children:"Footer"}),a.jsx(it,{value:"in_content",children:"In-Content"}),a.jsx(it,{value:"between_posts",children:"Between Posts"}),a.jsx(it,{value:"custom",children:"Custom"})]})]})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-code",children:"Ad Code (HTML/JavaScript) *"}),a.jsx(dn,{id:"new-code",placeholder:'<script async src="..."><\/script>',value:m.ad_code,onChange:U=>x({...m,ad_code:U.target.value}),className:"mt-1.5 font-mono text-xs min-h-[120px]"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"new-categories",children:"Target Categories (optional)"}),a.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Comma-separated, e.g., tech-news,ai-ml (leave empty for all)"}),a.jsx(Ye,{id:"new-categories",placeholder:"tech-news, ai-ml, programming",value:y,onChange:U=>{v(U.target.value),x({...m,target_categories:U.target.value.split(",").map(W=>
1008W.trim()).filter(Boolean)})},className:"mt-1.5"})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(De,{htmlFor:"new-active",children:"Active by default"}),a.jsx(Xa,{id:"new-active",checked:m.is_active,onCheckedChange:U=>x({...m,is_active:U})})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{onClick:E,className:"flex-1 bg-emerald-600 hover:bg-emerald-700",children:"Create Placement"}),a.jsx(ae,{onClick:()=>S(!1),variant:"outline",children:"Cancel"})]})]})]}),a.jsxs("div",{className:"space-y-3",children:[f.map(U=>{var W;return a.jsx(de,{className:U.is_active?"border-emerald-200":"border-slate-200 opacity-60",children:a.jsx(he,{className:"p-4",children:a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("h4",{className:"font-semibold text-slate-900",children:U.name}),a.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-slate-100 text-slate-600",children:U.location}),U.is_active?a.jsxs("span",{className:"flex items-center gap-1 text-xs text-emerald-600",children:[a.jsx(Qn,{className:"w-3 h-3"})," Active"]}):a.jsxs("span",{className:"flex items-center gap-1 text-xs text-slate-400",children:[a.jsx(Rg,{className:"w-3 h-3"})," Disabled"]})]}),((W=U.target_categories)==null?void 0:W.length)>0&&a.jsx("div",{className:"flex flex-wrap gap-1",children:U.target_categories.map(G=>a.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-indigo-100 text-indigo-700",children:G},G))}),U.impressions>0&&a.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[U.impressions," impressions ⢠",U.clicks||0," clicks"]})]}),a.jsx("div",{className:"text-xs text-slate-500 font-mono bg-slate-50 p-2 rounded line-clamp-2",children:U.ad_code})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>k(U.id,U.is_active),children:U.is_active?a.jsx(Rg,{className:"w-3 h-3"}):a.jsx(Qn,{className:"w-3 h-3"})}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>O(U.id),className:"text-red-500 hover:text-red-600",children:a.jsx(qa,{className:"w-3 h-3"})})]})]})})},U.id)}),f.length===0&&!N&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:'No ad placements yet. Click "New Placement" to create one.'})]})]})]})})}),r&&a.jsx(ht,{value:"performance",children:a.jsx(DDe,{})}),n&&a.jsx(ht,{value:"seo",className:"space-y-6",children:a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(ZZ,{className:"w-5 h-5"}),"SEO & Tracking Tags"]}),a.jsx(mn,{children:"Add Google Analytics, Tag Manager, AdSense, and other tracking codes"})]}),a.jsxs(he,{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx(De,{htmlFor:"ga-id",children:"Google Analytics ID"}),a.jsx(Ye,{id:"ga-id",placeholder:"G-XXXXXXXXXX",value:b.google_analytics_id||"",onChange:U=>w({...b,google_analytics_id:U.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"gtm-id",children:"Google Tag Manager ID"}),a.jsx(Ye,{id:"gtm-id",placeholder:"GTM-XXXXXXX",value:b.google_tag_manager_id||"",onChange:U=>w({...b,google_tag_manager_id:U.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"adsense-id",children:"Google AdSense Publisher ID"}),a.jsx(Ye,{id:"adsense-id",placeholder:"ca-pub-XXXXXXXXXXXXXXXX",value:b.google_adsense_id||"",onChange:U=>w({...b,google_adsense_id:U.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"meta-pixel",children:"Meta (Facebook) Pixel ID"}),a.jsx(Ye,{id:"meta-pixel",placeholder:"XXXXXXXXXXXXXXXX",value:b.meta_pixel_id||"",onChange:U=>w({...b,meta_pixel_id:U.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"head-scripts",children:"Custom Head Scripts"}),a.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Scripts to inject in <head> tag"}),a.jsx(dn,{id:"head-scripts",placeholder:"<script>...<\/script>",value:b.custom_head_scripts||"",onChange:U=>w({...b,custom_head_scripts:U.target.value}),className:"mt-1.5 font-mono text-xs",rows:4})]}),a.jsxs("div",{children:[a.jsx(De,{htmlFor:"body-scripts",children:"Custom Body Scripts"}),a.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Scripts to inject before </body> tag"}),a.jsx(dn,{id:"body-scripts",placeholder:"<script>...<\/script>",value:b.custom_body_scripts||"",onChange:U=>w({...b,custom_body_scripts:U.target.value}),className:"mt-1.5 font-mono text-xs",rows:4})]}),a.jsx(ae,{onClick:I,className:"w-full",children:"Save SEO Settings"})]})]})})]})]}):a.jsx("div",{className:"max-w-3xl mx-auto p-8",children:"Loading..."})}function $De(){const e=Ln(),[t,n]=T.useState(null),[r,i]=T.useState(null),[s,o]=T.useState(!1),[l,c]=T.useState({name:"",price_monthly:0,price_yearly:0,features:"",max_posts_per_month:-1,access_level:"free",is_active:!0});T.useEffect(()=>{ce.auth.me().then(n).catch(()=>{})},[]);const{data:u=[]}=st({queryKey:["subscription-tiers-manage"],queryFn:()=>ce.entities.SubscriptionTier.list()}),{data:d=[]}=st({queryKey:["subscriptions-all"],queryFn:()=>ce.entities.Subscription.list(),enabled:(t==null?void 0:t.role)==="admin"}),f=wr({mutationFn:S=>ce.entities.SubscriptionTier.create(S),onSuccess:()=>
1008{e.invalidateQueries({queryKey:["subscription-tiers-manage"]}),we.success("Tier created!"),x()}}),p=wr({mutationFn:({id:S,data:_})=>ce.entities.SubscriptionTier.update(S,_),onSuccess:()=>{e.invalidateQueries({queryKey:["subscription-tiers-manage"]}),we.success("Tier updated!"),x()}}),m=wr({mutationFn:S=>ce.entities.SubscriptionTier.delete(S),onSuccess:()=>{e.invalidateQueries({queryKey:["subscription-tiers-manage"]}),we.success("Tier deleted")}}),x=()=>{c({name:"",price_monthly:0,price_yearly:0,features:"",max_posts_per_month:-1,access_level:"free",is_active:!0}),i(null),o(!1)},y=S=>{S.preventDefault();const _={...l,features:l.features.split(` 1009`).filter(Boolean),price_monthly:parseFloat(l.price_monthly)||0,price_yearly:parseFloat(l.price_yearly)||0,max_posts_per_month:parseInt(l.max_posts_per_month)||-1};r?p.mutate({id:r,data:_}):f.mutate(_)},v=S=>{var _;c({name:S.name,price_monthly:S.price_monthly,price_yearly:S.price_yearly||0,features:((_=S.features)==null?void 0:_.join(` 1010`))||"",max_posts_per_month:S.max_posts_per_month,access_level:S.access_level,is_active:S.is_active}),i(S.id),o(!0)},b=S=>{confirm("Delete this tier? Active subscriptions will not be affected.")&&m.mutate(S)},w=d.filter(S=>S.status==="active").length,N=d.filter(S=>S.status==="active"&&S.billing_cycle==="monthly").reduce((S,_)=>{const E=u.find(k=>k.id===_.tier_id);return S+((E==null?void 0:E.price_monthly)||0)},0);return(t==null?void 0:t.role)!=="admin"?a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsx(de,{children:a.jsx(he,{className:"pt-6 text-center",children:a.jsx("p",{className:"text-slate-600",children:"Admin access required"})})})}):a.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900 mb-2",children:"Subscription Management"}),a.jsx("p",{className:"text-slate-600",children:"Manage tiers, subscribers, and revenue"})]}),a.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 flex items-center justify-center",children:a.jsx(Is,{className:"w-5 h-5 text-indigo-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-600",children:"Active Subscribers"}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:w})]})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 flex items-center justify-center",children:a.jsx(qy,{className:"w-5 h-5 text-emerald-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-600",children:"Monthly Revenue"}),a.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:["$",N]})]})]})})}),a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 flex items-center justify-center",children:a.jsx(Qk,{className:"w-5 h-5 text-purple-600"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-600",children:"Active Tiers"}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:u.filter(S=>S.is_active).length})]})]})})})]}),a.jsxs(ur,{defaultValue:"tiers",className:"space-y-6",children:[a.jsxs(Jn,{children:[a.jsx(et,{value:"tiers",children:"Subscription Tiers"}),a.jsx(et,{value:"subscribers",children:"Subscribers"})]}),a.jsxs(ht,{value:"tiers",className:"space-y-4",children:[a.jsx("div",{className:"flex justify-end",children:a.jsxs(ae,{onClick:()=>o(!s),className:"gap-2",children:[a.jsx(Yo,{className:"w-4 h-4"}),s?"Cancel":"New Tier"]})}),s&&a.jsxs(de,{className:"border-indigo-200",children:[a.jsx(Re,{children:a.jsx(Ie,{children:r?"Edit Tier":"Create New Tier"})}),a.jsx(he,{children:a.jsxs("form",{onSubmit:y,className:"space-y-4",children:[a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Tier Name *"}),a.jsx(Ye,{value:l.name,onChange:S=>c({...l,name:S.target.value}),placeholder:"e.g., Pro",required:!0,className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Access Level *"}),a.jsxs("select",{value:l.access_level,onChange:S=>c({...l,access_level:S.target.value}),className:"w-full h-9 px-3 rounded-md border border-slate-200 mt-1.5",required:!0,children:[a.jsx("option",{value:"free",children:"Free"}),a.jsx("option",{value:"basic",children:"Basic"}),a.jsx("option",{value:"premium",children:"Premium"}),a.jsx("option",{value:"enterprise",children:"Enterprise"})]})]})]}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx(De,{children:"Monthly Price ($)"}),a.jsx(Ye,{type:"number",step:"0.01",value:l.price_monthly,onChange:S=>c({...l,price_monthly:S.target.value}),className:"mt-1.5"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Yearly Price ($)"}),a.jsx(Ye,{type:"number",step:"0.01",value:l.price_yearly,onChange:S=>c({...l,price_yearly:S.target.value}),placeholder:"Optional",className:"mt-1.5"})]})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Max Posts Per Month"}),a.jsx(Ye,{type:"number",value:l.max_posts_per_month,onChange:S=>c({...l,max_posts_per_month:S.target.value}),placeholder:"-1 for unlimited",className:"mt-1.5"}),a.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Use -1 for unlimited posts"})]}),a.jsxs("div",{children:[a.jsx(De,{children:"Features (one per line)"}),a.jsx("textarea",{value:l.features,onChange:S=>c({...l,features:S.target.value}),placeholder:`Priority support 1011Advanced analytics
1012Custom domain`,className:"w-full min-h-[100px] px-3 py-2 rounded-md border border-slate-200 mt-1.5"})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(De,{children:"Active"}),a.jsx(Xa,{checked:l.is_active,onCheckedChange:S=>c({...l,is_active:S})})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{type:"submit",disabled:f.isPending||p.isPending,children:f.isPending||p.isPending?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):r?"Update Tier":"Create Tier"}),a.jsx(ae,{type:"button",variant:"outline",onClick:x,children:"Cancel"})]})]})})]}),a.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:u.map((S,_)=>{var E;return a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:_*.05},children:a.jsx(de,{className:S.is_active?"":"opacity-50",children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-semibold text-lg text-slate-900",children:S.name}),a.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[a.jsx(Se,{children:S.access_level}),S.is_active?a.jsx(Se,{className:"bg-emerald-100 text-emerald-700",children:"Active"}):a.jsx(Se,{variant:"outline",children:"Inactive"})]})]}),a.jsxs("div",{className:"text-right",children:[a.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:["$",S.price_monthly]}),a.jsx("p",{className:"text-xs text-slate-500",children:"/month"})]})]}),((E=S.features)==null?void 0:E.length)>0&&a.jsxs("div",{className:"space-y-1 mb-4",children:[S.features.slice(0,3).map((k,O)=>a.jsxs("p",{className:"text-sm text-slate-600",children:["â ",k]},O)),S.features.length>3&&a.jsxs("p",{className:"text-xs text-slate-500",children:["+",S.features.length-3," more"]})]}),a.jsxs("div",{className:"flex gap-2 pt-3 border-t",children:[a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>v(S),className:"flex-1 gap-2",children:[a.jsx(c8,{className:"w-3 h-3"})," Edit"]}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>b(S.id),className:"text-red-600 hover:text-red-700",children:a.jsx(qa,{className:"w-3 h-3"})})]})]})})},S.id)})})]}),a.jsx(ht,{value:"subscribers",children:a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsx(Ie,{children:"All Subscribers"}),a.jsxs(mn,{children:[d.length," total subscriptions"]})]}),a.jsx(he,{children:a.jsxs("div",{className:"space-y-2",children:[d.map(S=>{const _=u.find(E=>E.id===S.tier_id);return a.jsx("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"font-medium text-slate-900",children:S.user_email}),a.jsxs("p",{className:"text-sm text-slate-600",children:[(_==null?void 0:_.name)||"Unknown"," - ",S.billing_cycle]}),a.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Started: ",Jt(new Date(S.start_date),"MMM d, yyyy")]})]}),a.jsxs("div",{className:"text-right",children:[a.jsx(Se,{className:S.status==="active"?"bg-emerald-100 text-emerald-700":S.status==="trial"?"bg-blue-100 text-blue-700":"bg-slate-100 text-slate-700",children:S.status}),S.posts_this_month>0&&a.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[S.posts_this_month," posts this month"]})]})]})},S.id)}),d.length===0&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No subscribers yet"})]})})]})})]})]})}function BDe(){var c;const[e,t]=T.useState(null),[n,r]=T.useState(!1);T.useEffect(()=>{ce.auth.me().then(t).catch(()=>{})},[]);const{data:i=[]}=st({queryKey:["subscription-tiers"],queryFn:()=>ce.entities.SubscriptionTier.filter({is_active:!0})}),{data:s}=st({queryKey:["my-subscription",e==null?void 0:e.email],queryFn:()=>ce.entities.Subscription.filter({user_email:e.email,status:"active"}),enabled:!!e}),o=async u=>{if(!e){we.error("Please log in to subscribe");return}r(!0);try{await ce.entities.Subscription.create({user_email:e.email,tier_id:u.id,status:"active",billing_cycle:"monthly",start_date:new Date().toISOString(),end_date:new Date(Date.now()+720*60*60*1e3).toISOString(),posts_this_month:0}),we.success("Subscription activated!"),window.location.reload()}catch(d){we.error("Failed to subscribe"),console.error(d)}finally{r(!1)}},l=(c=s==null?void 0:s[0])==null?void 0:c.tier_id;return a.jsxs("div",{className:"max-w-6xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-3",children:"Choose Your Plan"}),a.jsx("p",{className:"text-slate-600",children:"Select the perfect plan for your content creation needs"})]}),a.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:i.map((u,d)=>{var m;const f=l===u.id,p=u.access_level==="enterprise"?Qk:u.access_level==="premium"?u8:zh;return a.jsx(Pe.div,{initial:{opacity:0,y:20}
1012,animate:{opacity:1,y:0},transition:{delay:d*.1},children:a.jsxs(de,{className:`relative ${u.access_level==="premium"?"border-2 border-indigo-500 shadow-lg":""}`,children:[u.access_level==="premium"&&a.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:a.jsx(Se,{className:"bg-indigo-600 text-white",children:"Most Popular"})}),a.jsxs(Re,{className:"text-center",children:[a.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center mx-auto mb-4",children:a.jsx(p,{className:"w-6 h-6 text-white"})}),a.jsx(Ie,{className:"text-2xl",children:u.name}),a.jsxs("div",{className:"mt-4",children:[a.jsxs("span",{className:"text-4xl font-bold text-slate-900",children:["$",u.price_monthly]}),a.jsx("span",{className:"text-slate-500",children:"/month"})]}),u.price_yearly&&a.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:["or $",u.price_yearly,"/year (save ",Math.round((1-u.price_yearly/(u.price_monthly*12))*100),"%)"]})]}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[(m=u.features)==null?void 0:m.map((x,y)=>a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Nh,{className:"w-5 h-5 text-emerald-600 flex-shrink-0 mt-0.5"}),a.jsx("span",{className:"text-sm text-slate-700",children:x})]},y)),u.max_posts_per_month>0&&a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Nh,{className:"w-5 h-5 text-emerald-600 flex-shrink-0 mt-0.5"}),a.jsxs("span",{className:"text-sm text-slate-700",children:[u.max_posts_per_month," posts per month"]})]}),u.max_posts_per_month===-1&&a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Nh,{className:"w-5 h-5 text-emerald-600 flex-shrink-0 mt-0.5"}),a.jsx("span",{className:"text-sm text-slate-700",children:"Unlimited posts"})]})]}),a.jsx(ae,{onClick:()=>o(u),disabled:f||n,className:`w-full ${u.access_level==="premium"?"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700":""}`,children:n?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):f?"Current Plan":u.price_monthly===0?"Get Started":"Subscribe"})]})]})},u.id)})})]})}const VF=[{value:"content_creator",label:"Content Creator",description:"Create and edit own posts"},{value:"editor",label:"Editor",description:"Full editorial control, can approve/reject"},{value:"seo_specialist",label:"SEO Specialist",description:"Optimize content for search"},{value:"ad_manager",label:"Ad Manager",description:"Manage ads and monetization"}],py=[{key:"pending",label:"Pending Review",color:"bg-amber-100 text-amber-700",icon:Rn},{key:"needs_changes",label:"Needs Changes",color:"bg-orange-100 text-orange-700",icon:Kr},{key:"approved",label:"Approved",color:"bg-emerald-100 text-emerald-700",icon:Cn},{key:"rejected",label:"Rejected",color:"bg-red-100 text-red-700",icon:As}];function FDe(){const[e,t]=T.useState(""),[n,r]=T.useState("content_creator"),[i,s]=T.useState(""),[o,l]=T.useState(null),c=Ln(),{data:u=[]}=st({queryKey:["posts-for-review"],queryFn:()=>ce.entities.BlogPost.filter({status:"pending_review"},"-created_date",50)}),{data:d=[]}=st({queryKey:["all-reviews"],queryFn:()=>ce.entities.ContentReview.list("-created_date",50)}),{data:f=[]}=st({queryKey:["posts-all-collab"],queryFn:()=>ce.entities.BlogPost.list("-updated_date",50)}),p=wr({mutationFn:({email:v,role:b})=>ce.users.inviteUser(v,b),onSuccess:()=>{we.success("Team member invited!"),t("")},onError:()=>we.error("Failed to invite user")}),m=wr({mutationFn:async({postId:v,status:b,comment:w})=>{await ce.entities.ContentReview.create({post_id:v,reviewer_email:(await ce.auth.me()).email,status:b,comments:w}),await ce.entities.BlogPost.update(v,{status:b==="approved"?"published":"draft",...b==="approved"?{published_date:new Date().toISOString()}:{}})},onSuccess:()=>{c.invalidateQueries({queryKey:["posts-for-review"]}),c.invalidateQueries({queryKey:["all-reviews"]}),c.invalidateQueries({queryKey:["posts"]}),l(null),s(""),we.success("Review submitted")}}),x=d.reduce((v,b)=>(v[b.post_id]||(v[b.post_id]=[]),v[b.post_id].push(b),v),{}),y=py.reduce((v,b)=>(v[b.key]=d.filter(w=>w.status===b.key).length,v),{});
1012return a.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-bold text-slate-900 mb-1",children:"Team Collaboration"}),a.jsx("p",{className:"text-slate-500",children:"Manage your team and review content workflow"})]}),a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:py.map(v=>{const b=v.icon;return a.jsx(de,{children:a.jsx(he,{className:"pt-4 pb-4",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center ${v.color}`,children:a.jsx(b,{className:"w-4 h-4"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-slate-500",children:v.label}),a.jsx("p",{className:"text-xl font-bold text-slate-900",children:y[v.key]})]})]})})},v.key)})}),a.jsxs(ur,{defaultValue:"reviews",className:"space-y-6",children:[a.jsxs(Jn,{children:[a.jsxs(et,{value:"reviews",className:"gap-2",children:[a.jsx(Rn,{className:"w-4 h-4"})," Review Queue",u.length>0&&a.jsx(Se,{className:"ml-1 bg-amber-500 text-white",children:u.length})]}),a.jsxs(et,{value:"history",className:"gap-2",children:[a.jsx(li,{className:"w-4 h-4"})," Review History"]}),a.jsxs(et,{value:"invite",className:"gap-2",children:[a.jsx(sI,{className:"w-4 h-4"})," Invite Team"]})]}),a.jsx(ht,{value:"reviews",className:"space-y-4",children:u.length===0?a.jsxs(de,{className:"p-12 text-center",children:[a.jsx(Cn,{className:"w-12 h-12 text-emerald-300 mx-auto mb-4"}),a.jsx("p",{className:"text-slate-500 font-medium",children:"No posts pending review"}),a.jsx("p",{className:"text-slate-400 text-sm",children:"All caught up!"})]}):u.map((v,b)=>{var w;return a.jsx(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:b*.05},children:a.jsx(de,{children:a.jsxs(he,{className:"pt-5",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[a.jsx(Se,{className:"bg-amber-100 text-amber-700",children:"Pending Review"}),v.category&&a.jsx(Se,{variant:"outline",className:"text-xs",children:v.category}),v.premium_content&&a.jsx(Se,{className:"bg-indigo-100 text-indigo-700 text-xs",children:"Premium"})]}),a.jsx("h3",{className:"font-semibold text-lg text-slate-900 mb-1 truncate",children:v.title}),a.jsx("p",{className:"text-sm text-slate-500 line-clamp-2 mb-3",children:v.excerpt}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-400",children:[a.jsxs("span",{children:["By ",v.created_by]}),a.jsx("span",{children:Jt(new Date(v.created_date),"MMM d, yyyy")}),v.reading_time&&a.jsxs("span",{children:[v.reading_time," min read"]})]}),((w=x[v.id])==null?void 0:w.length)>0&&a.jsxs("div",{className:"mt-3 space-y-1",children:[a.jsx("p",{className:"text-xs font-medium text-slate-500",children:"Previous reviews:"}),x[v.id].slice(0,2).map(N=>{var S;return a.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-600",children:[a.jsx(Se,{className:`text-xs ${(S=py.find(_=>_.key===N.status))==null?void 0:S.color}`,children:N.status.replace("_"," ")}),a.jsx("span",{className:"truncate",children:N.comments})]},N.id)})]})]}),a.jsxs("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[a.jsx(ft,{to:Xe("PostEditor")+`?id=${v.id}`,children:a.jsxs(ae,{size:"sm",variant:"outline",className:"w-full gap-1 text-xs",children:[a.jsx(Qn,{className:"w-3 h-3"})," View"]})}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>l(v.id===o?null:v.id),className:"gap-1 text-xs",children:[a.jsx(r8,{className:"w-3 h-3"})," Review"]})]})]}),o===v.id&&a.jsxs(Pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-4 pt-4 border-t space-y-3",children:[a.jsx(dn,{value:i,onChange:N=>s(N.target.value),placeholder:"Add review feedback (required for reject/needs-changes)...",rows:2,className:"text-sm"}),a.jsxs("div",{className:"flex gap-2 flex-wrap",children:[a.jsxs(ae,{size:"sm",onClick:()=>m.mutate({postId:v.id,status:"approved",comment:i}),disabled:m.isPending,className:"bg-emerald-600 hover:bg-emerald-700 gap-1",children:[m.isPending?a.jsx(lt,{className:"w-3 h-3 animate-spin"}):a.jsx(Cn,{className:"w-3 h-3"}),"Approve & Publish"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>m.mutate({postId:v.id,status:"needs_changes",comment:i}),disabled:m.isPending||!i.trim(),className:"text-orange-600 border-orange-200 hover:bg-orange-50 gap-1",children:[a.jsx(Kr,{className:"w-3 h-3"}),"Needs Changes"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>m.mutate({postId:v.id,status:"rejected",comment:i}),disabled:m.isPending||!i.trim(),className:"text-red-600 border-red-200 hover:bg-red-50 gap-1",children:[a.jsx(As,{className:"w-3 h-3"}),"Reject"]}),a.jsx(ae,{size:"sm",variant:"ghost",onClick:()=>{l(null),s("")},children:"Cancel"})]})]})]})})},v.id)})}),a.jsx(ht,{value:"history",children:a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsx(Ie,{children:"All Reviews"}),a.jsxs(mn,{children:[d.length," total review actions"]})]}),a.jsxs(he,{className:"space-y-2",children:[d.slice(0,30).map(v=>{var N;const b=f.find(S=>S.id===v.post_id),w=py.find(S=>S.key===v.status);return a.jsxs("div",{className:"flex items-start gap-3 p-3 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsx(Se,{className:`text-xs flex-shrink-0 ${w==null?void 0:w.color}`,children:w==null?void 0:w.label}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800 truncate",children:(b==null?void 0:b.title)||"Unknown post"}),a.jsxs("p",{className:"text-xs text-slate-500",children:["By ",(N=v.reviewer_email)==null?void 0:N.split("@")[0]]}),v.comments&&a.jsx("p",{className:"text-xs text-slate-600 mt-1",children:v.comments})]}),a.jsx("span",{className:"text-xs text-slate-400 flex-shrink-0",children:Jt(new Date(v.created_date),"MMM d")})]},v.id)}),d.length===0&&a.jsx("p",{className:"text-center text-slate-500 py-8",children:"No reviews yet"})]})]})}),a.jsx(ht,{value:"invite",children:a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Is,{className:"w-5 h-5"}),"Invite Team Members"]})}),a.jsxs(he,{className:"space-y-6",children:[a.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[a.jsx("div",{className:"md:col-span-2",children:a.jsx(Ye,{type:"email",placeholder:"[email protected]",value:e,onCh
1012ange:v=>t(v.target.value),onKeyDown:v=>v.key==="Enter"&&p.mutate({email:e,role:n})})}),a.jsxs(Mn,{value:n,onValueChange:r,children:[a.jsx(En,{children:a.jsx(Dn,{})}),a.jsx(Pn,{children:VF.map(v=>a.jsx(it,{value:v.value,children:v.label},v.value))})]})]}),a.jsxs(ae,{onClick:()=>{if(!e){we.error("Enter an email");return}p.mutate({email:e,role:n})},disabled:p.isPending,className:"gap-2",children:[p.isPending?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsx(sI,{className:"w-4 h-4"}),"Send Invitation"]}),a.jsx("div",{className:"grid md:grid-cols-2 gap-4 pt-4 border-t",children:VF.map((v,b)=>a.jsxs(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:b*.08},className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsx("h4",{className:"font-semibold text-slate-900 mb-1",children:v.label}),a.jsx("p",{className:"text-sm text-slate-600",children:v.description})]},v.value))})]})]})})]})]})}function qDe(){return a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx("header",{className:"sticky top-0 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-4 flex items-center justify-between",children:[a.jsxs(ft,{to:Xe("Blog"),className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-9 h-9 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:a.jsx(Ct,{className:"w-5 h-5 text-white"})}),a.jsx("span",{className:"font-bold text-xl text-slate-900",children:"TechBlog"})]}),a.jsx(ft,{to:Xe("Blog"),children:a.jsxs(ae,{variant:"ghost",className:"gap-2",children:[a.jsx(rl,{className:"w-4 h-4"}),"Back to Blog"]})})]})}),a.jsx("article",{className:"max-w-4xl mx-auto px-4 py-16",children:a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:[a.jsx("h1",{className:"text-4xl font-bold text-slate-900 mb-6",children:"Terms of Service"}),a.jsx("p",{className:"text-slate-500 mb-8",children:"Effective Date: December 21, 2024"}),a.jsxs("div",{className:"prose prose-slate prose-lg max-w-none",children:[a.jsx("p",{className:"lead text-xl text-slate-600 mb-8",children:"Please read these Terms of Service carefully before using TechBlog."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Acceptance of Terms"}),a.jsx("p",{children:"By accessing and using TechBlog, you accept and agree to be bound by these Terms of Service and our Privacy Policy. If you do not agree to these terms, please do not use our website."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Use of Service"}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"Permitted Use"}),a.jsx("p",{children:"You may use TechBlog for lawful purposes only. You agree not to:"}),a.jsxs("ul",{children:[a.jsx("li",{children:"Violate any applicable laws or regulations"}),a.jsx("li",{children:"Infringe on intellectual property rights"}),a.jsx("li",{children:"Transmit harmful code or malware"}),a.jsx("li",{children:"Attempt to gain unauthorized access to our systems"}),a.jsx("li",{children:"Use automated systems to scrape or collect data without permission"}),a.jsx("li",{children:"Impersonate others or provide false information"})]}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"User Conduct"}),a.jsx("p",{children:"Users are expected to conduct themselves professionally and respectfully. We reserve the right to remove content or restrict access for users who violate these terms."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Intellectual Property"}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"Our Content"}),a.jsx("p",{children:"All content on TechBlog, including articles, graphics, logos, and software, is owned by or licensed to us and is protected by copyright and other intellectual property laws."}),a.jsx("h3",{className:"text-xl font-semibold text-slate-800 mt-8 mb-3",children:"Limited License"}),a.jsx("p",{children:"You are granted a limited, non-exclusive, non-transferable license to access and use our content for personal, non-commercial purposes. You may not reproduce, distribute, modify, or create derivative works without explicit permission."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Third-Party Links and Advertising"}),a.jsx("p",{children:"Our website may contain links to third-party websites and display third-party advertisements. We are not responsible for the content, privacy practices, or terms of service of third-party sites. Clicking on third-party links is at your own risk."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Disclaimer of Warranties"}),a.jsx("p",{children:'TechBlog is provided "as is" and "as available" without warranties of any kind, either express or implied. We do not warrant that:'}),a.jsxs("ul",{children:[a.jsx("li",{children:"The service will be uninterrupted or error-free"}),a.jsx("li",{children:"Content will be accurate, complete, or current"}),a.jsx("li",{children:"Defects will be corrected"}),a.jsx("li",{children:"The service is free of viruses or harmful components"})]}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Limitation of Liability"}),a.jsx("p",{children:"To the maximum extent permitted by law, TechBlog and its operators shall not be liable for any indirect, incidental, special, consequential, or punitive damages, including loss of profits, data, or other intangible losses, resulting from your use or inability to use the service."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Content Accuracy"}),a.jsx("p",{children:"While we strive to provide accurate and up-to-date information, we make no guarantees about the accuracy, completeness, or reliability of content on TechBlog. Articles are for informational purposes only and should not be considered professional advice."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Modifications to Service"}),a.jsx("p",{children:"We reserve the right to modify, suspend, or discontinue the service at any time without notice. We shall not be liable to you or any third party for any modification, suspension, or discontinuance."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Governing Law"}),a.jsx("p",{children:"These Terms of Service shall be governed by and construed in accordance with applicable laws, without regard to conflict of law principles."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Changes to Terms"}),a.jsx("p",{children:"We may update these Terms of Service from time to time. Continued use of the service after changes constitutes acceptance of the revised terms. Please review these terms periodically."}),a.jsx("h2",{className:"text-2xl font-bold text-slate-900 mt-12 mb-4",children:"Contact Information"}),a.jsxs("p",{children:["For questions about these Terms of Service, please visit our"," ",a.jsx(ft,{to:Xe("Contact"),className:"text-indigo-600 hover:underline",children:"contact page"}),"."]}),a.jsx("div",{className:"mt-12 p-6 bg-indigo-50 rounded-xl border border-indigo-100",children:a.jsxs("p",{className:"text-slate-700 mb-0",children:[a.jsx("strong",{children:"Last Updated:"})," December 21, 2024"]})})]})]})}),a.jsx("footer",{className:"border-t border-slate-200 mt-16",children:a.jsx("div",{className:"max-w-6xl mx-auto px-4 py-8",children:a.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"© 2024 TechBlog. All rights reserved."}),a.jsxs("div",{className:"flex gap-6 text-sm",children:[a.jsx(ft,{to:Xe("About"),className:"text-slate-600 hover:text-indigo-600",children:"About"}),a.jsx(ft,{to:Xe("Privacy"),className:"text-slate-600 hover:text-indigo-600",children:"Privacy Policy"}),a.jsx(ft,{to:Xe("Contact"),className:"text-slate-600 hover:text-indigo-600",children:"Contact"})]})]})})})]})}const M_={admin:{icon:o8,color:"bg-red-100 text-red-700 border-red-200",description:"Full system access, manage users & settings"},editor:{icon:l8,color:"bg-blue-100 text-blue-700 border-blue-200",description:"Manage all posts, publish content"},contributor:{icon:a8,color:"bg-slate-100 text-slate-700 border-slate-200",description:"Create & edit own posts only"}};function zDe(){const{isAdmin:e,canManageUsers:t}=pl(),[n,r]=T.useState(""),[i,s]=T.useState(null),o=Ln(),{data:l=[],isLoading:c}=st({queryKey:["users"],queryFn:()=>ce.entities.User.list(),enabled:e||t}),u=wr({mutationFn:({userId:p,data:m})=>ce.entities.User.update(p,m),onSuccess:()=>{o.invalidateQueries({queryKey:["users"]}),s(null)}});if(!e&&!t)return a.jsx("div",{className:"max-w-4xl mx-auto",children:a.jsxs(jr,{variant:"destructive",children:[a.jsx(Kr,{className:"h-4 w-4"}),a.jsx(Sr,{children:"You don't have permission to access user management."})]})});const d=l.filter(p=>{var m,x;return((m=p.email)==null?void 0:m.toLowerCase().includes(n.toLowerCase()))||((x=p.full_name)==null?void 0:x.toLowerCase().includes(n.toLowerCase()))}),f=p=>{u.mutate({userId:p,data:i})};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3",children:[a.jsx(Is,{className:"w-8 h-8 text-indigo-600"}),"User Management"]}),a.jsx("p",{className:"text-slate-600 mt-2",children:"Manage user roles, permissions, and access control"})]}),a.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:Object.entries(M_).map(([p,m])=>{const x=m.icon;return a.jsx(de,{className:`border-2 ${m.color}`,children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx(x,{className:"w-5 h-5"}),a.jsx("span",{className:"font-semibold capitalize",children:p})]}),a.jsx("p",{className:"text-sm",children:m.description})]})},p)})}),a.jsxs("div",{className:"relative",children:[a.jsx(lr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),a.jsx(Ye,{placeholder:"Search users by name or email...",value:n,onChange:p=>r(p.target.value),className:"pl-10"})]}),a.jsx("div",{className:"space-y-4",children:d.map((p,m)=>{var b,w,N,S;const x=M_[p.role]||M_.contributor,y=x.icon,v=(i==null?void 0:i.id)===p.id;return a.jsx(Pe.div,{initial:{opacity:0,y:20}
1012,animate:{opacity:1,y:0},transition:{delay:m*.05},children:a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-4",children:[a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[a.jsx("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 flex items-center justify-center text-white font-medium",children:((b=p.full_name)==null?void 0:b[0])||((N=(w=p.email)==null?void 0:w[0])==null?void 0:N.toUpperCase())}),a.jsxs("div",{children:[a.jsx("div",{className:"font-semibold text-slate-900",children:p.full_name||"No name"}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[a.jsx(xr,{className:"w-3 h-3"}),p.email]})]})]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[a.jsx(Yr,{className:"w-3 h-3"}),"Joined ",Jt(new Date(p.created_date),"MMM d, yyyy")]})]}),v?a.jsxs("div",{className:"flex-1 md:flex-initial md:w-80 space-y-3",children:[a.jsxs("div",{children:[a.jsx(De,{className:"text-xs",children:"Role"}),a.jsxs(Mn,{value:i.role,onValueChange:_=>s({...i,role:_}),children:[a.jsx(En,{className:"mt-1",children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"admin",children:"Admin"}),a.jsx(it,{value:"editor",children:"Editor"}),a.jsx(it,{value:"contributor",children:"Contributor"})]})]})]}),i.role==="contributor"&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(De,{className:"text-xs",children:"Additional Permissions"}),a.jsx("div",{className:"space-y-2",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-xs text-slate-600",children:"Can publish directly"}),a.jsx(Xa,{checked:((S=i.permissions)==null?void 0:S.can_publish)||!1,onCheckedChange:_=>s({...i,permissions:{...i.permissions,can_publish:_}})})]})})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(ae,{size:"sm",onClick:()=>f(p.id),className:"flex-1",children:"Save"}),a.jsx(ae,{size:"sm",variant:"outline",onClick:()=>s(null),className:"flex-1",children:"Cancel"})]})]}):a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs(Se,{className:`${x.color} flex items-center gap-1.5`,children:[a.jsx(y,{className:"w-3 h-3"}),p.role]}),a.jsxs(ae,{variant:"outline",size:"sm",onClick:()=>s(p),className:"gap-2",children:[a.jsx(c8,{className:"w-3 h-3"}),"Edit"]})]})]})})})},p.id)})})]})}function UDe(){const{data:e=[],isLoading:t}=st({queryKey:["all-posts-metrics"],queryFn:()=>ce.entities.BlogPost.list("-published_date",100)}),{data:n=[]}=st({queryKey:["subscribers-metrics"],queryFn:()=>ce.entities.Subscriber.list()}),{data:r=[]}=st({queryKey:["comments-metrics"],queryFn:()=>ce.entities.Comment.filter({status:"approved"})}),{data:i=[]}=st({queryKey:["analytics-metrics"],queryFn:()=>ce.entities.Analytics.list("-date",100)}),s=e.filter(w=>w.status==="published"),o=e.filter(w=>w.status==="draft"),l=i.reduce((w,N)=>w+(N.page_views||0),0),c=i.reduce((w,N)=>w+(N.unique_visitors||0),0),u=n.filter(w=>w.status==="active"),d={};i.forEach(w=>{d[w.post_id]=(d[w.post_id]||0)+(w.page_views||0)});const f=s.map(w=>({...w,views:d[w.id]||0})).sort((w,N)=>N.views-w.views).slice(0,10),p={};s.forEach(w=>{w.category&&(p[w.category]=(p[w.category]||0)+1)});const m=Object.entries(p).map(([w,N])=>({name:w.replace("-"," "),count:N})).sort((w,N)=>N.count-w.count),x=i.filter(w=>new Date(w.date)>=new Date(Date.now()-720*60*60*1e3)).reduce((w,N)=>{var _;const S=(_=N.date)==null?void 0:_.slice(0,10);return S&&(w[S]=(w[S]||0)+(N.page_views||0)),w},{}),y=Object.entries(x).sort(([w],[N])=>w.localeCompare(N)).slice(-14).map(([w,N])=>({date:Jt(new Date(w),"MMM d"),views:N})),v=t,b=[{title:"Published Posts",value:s.length,icon:os,color:"text-indigo-600",bg:"bg-indigo-50"},{title:"Total Page Views",value:l.toLocaleString(),icon:Qn,color:"text-emerald-600",bg:"bg-emerald-50"},{title:"Unique Visitors",value:c.toLocaleString(),icon:Is,color:"text-blue-600",bg:"bg-blue-50"},{title:"Active Subscribers",value:u.length,icon:Xr,color:"text-purple-600",bg:"bg-purple-50"},{title:"Total Comments",value:r.length,icon:u8,color:"text-amber-600",bg:"bg-amber-50"},{title:"Draft Posts",value:o.length,icon:Rn,color:"text-slate-600",bg:"bg-slate-50"}];
1012return a.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Site Metrics"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"High-level performance overview for your blog."})]}),a.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-4",children:b.map((w,N)=>a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:N*.07},children:a.jsx(de,{children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:w.title}),v?a.jsx(Dt,{className:"h-8 w-16 mt-1"}):a.jsx("p",{className:"text-2xl font-bold text-slate-900 mt-1",children:w.value})]}),a.jsx("div",{className:`w-12 h-12 rounded-xl ${w.bg} flex items-center justify-center`,children:a.jsx(w.icon,{className:`w-6 h-6 ${w.color}`})})]})})})},w.title))}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-8",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base font-semibold",children:"Page Views (Last 14 Days)"})}),a.jsx(he,{children:y.length>0?a.jsx(Li,{width:"100%",height:220,children:a.jsxs(Ha,{data:y,children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#f1f5f9"}),a.jsx(Ir,{dataKey:"date",tick:{fontSize:11,fill:"#94a3b8"}}),a.jsx(Mr,{tick:{fontSize:11,fill:"#94a3b8"}}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"views",fill:"#6366f1",radius:[4,4,0,0]})]})}):a.jsx("div",{className:"h-[220px] flex items-center justify-center text-slate-400 text-sm",children:"No analytics data yet"})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base font-semibold",children:"Posts by Category"})}),a.jsx(he,{children:m.length>0?a.jsx(Li,{width:"100%",height:220,children:a.jsxs(Ha,{data:m,layout:"vertical",children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#f1f5f9"}),a.jsx(Ir,{type:"number",tick:{fontSize:11,fill:"#94a3b8"}}),a.jsx(Mr,{dataKey:"name",type:"category",width:90,tick:{fontSize:11,fill:"#94a3b8"}}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"count",fill:"#8b5cf6",radius:[0,4,4,0]})]})}):a.jsx("div",{className:"h-[220px] flex items-center justify-center text-slate-400 text-sm",children:"No posts yet"})})]})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base font-semibold",children:"Most Popular Posts"})}),a.jsx(he,{children:v?a.jsx("div",{className:"space-y-3",children:[...Array(5)].map((w,N)=>a.jsx(Dt,{className:"h-12 w-full"},N))}):f.length>0?a.jsx("div",{className:"divide-y divide-slate-100",children:f.map((w,N)=>a.jsxs("div",{className:"flex items-center gap-4 py-3",children:[a.jsx("span",{className:"text-lg font-bold text-slate-300 w-6 text-center",children:N+1}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium text-slate-900 truncate",children:w.title}),a.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[w.category&&a.jsx(Se,{variant:"secondary",className:"text-xs capitalize",children:w.category.replace("-"," ")}),a.jsx("span",{className:"text-xs text-slate-400",children:w.published_date?Jt(new Date(w.published_date),"MMM d, yyyy"):"â"})]})]}),a.jsxs("div",{className:"text-right flex-shrink-0",children:[a.jsx("p",{className:"font-semibold text-slate-900",children:w.views.toLocaleString()}),a.jsx("p",{className:"text-xs text-slate-400",children:"views"})]})]},w.id))}):a.jsx("p",{className:"text-slate-400 text-sm text-center py-8",children:"No published posts yet"})})]})]})}function my({title:e,value:t,suffix:n="",icon:r,color:i,sub:s,trend:o}){const l=r,c={indigo:"bg-indigo-50 text-indigo-600",emerald:"bg-emerald-50 text-emerald-600",amber:"bg-amber-50 text-amber-600",rose:"bg-rose-50 text-rose-600"};return a.jsx(de,{children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-3",children:[a.jsx("p",{className:"text-sm text-slate-500",children:e}),a.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center ${c[i]}`,children:a.jsx(l,{className:"w-5 h-5"})})]}),a.jsxs("p",{className:"text-3xl font-bold text-slate-900",children:[t,n]}),s&&a.jsx("p",{className:"text-xs text-slate-400 mt-1",children:s}),o!==void 0&&a.jsxs("div",{className:`flex items-center gap-1 mt-1 text-xs font-medium ${o>=0?"text-emerald-600":"text-rose-600"}`,children:[o>=0?a.jsx(Xr,{className:"w-3 h-3"}):a.jsx(Zk,{className:"w-3 h-3"}),Math.abs(o),"% vs last period"]})]})})}function VDe({depth:e}){const t=e>=75?"bg-emerald-500":e>=50?"bg-amber-500":"bg-rose-500";return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex-1 bg-slate-100 rounded-full h-2",children:a.jsx("div",{className:`h-2 rounded-full ${t} transition-all`,style:{width:`${e}%`}})}),a.jsxs("span",{className:"text-sm font-medium text-slate-700 w-10 text-right",children:[e,"%"]})]})}function WDe(){const[e,t]=T.useState("all"),{data:n=[],isLoading:r}=st({queryKey:["published-posts-eng"],queryFn:()=>ce.entities.BlogPost.filter({status:"published"},"-published_date",50)}),{data:i=[],isLoading:s}=st({queryKey:["engagements-all"],queryFn:()=>ce.entities.PostEngagement.list("-date",500)}),o=r||s,l=e==="all"?i:i.filter(b=>b.post_id===e),c=l.length,u=c?Math.round(l.reduce((b,w)=>b+(w.time_spent||0),0)/c):0,d=c?Math.round(l.reduce((b,w)=>b+(w.scroll_depth||0),0)/c):0,f=l.filter(b=>(b.time_spent||0)<15&&(b.scroll_depth||0)<20).length,p=c?Math.round(f/c*100):0;l.reduce((b,w)=>b+(w.shares||0),0);const m={};
1012n.forEach(b=>{m[b.id]=b});const x=n.map(b=>{const w=i.filter(O=>O.post_id===b.id);if(!w.length)return null;const N=w.length,S=Math.round(w.reduce((O,I)=>O+(I.time_spent||0),0)/N),_=Math.round(w.reduce((O,I)=>O+(I.scroll_depth||0),0)/N),E=w.filter(O=>(O.time_spent||0)<15&&(O.scroll_depth||0)<20).length,k=Math.round(E/N*100);return{id:b.id,title:b.title,sessions:N,avgTime:S,avgScroll:_,bounce:k}}).filter(Boolean).sort((b,w)=>w.sessions-b.sessions),y=[{label:"0â25%",count:l.filter(b=>(b.scroll_depth||0)<25).length},{label:"25â50%",count:l.filter(b=>(b.scroll_depth||0)>=25&&(b.scroll_depth||0)<50).length},{label:"50â75%",count:l.filter(b=>(b.scroll_depth||0)>=50&&(b.scroll_depth||0)<75).length},{label:"75â100%",count:l.filter(b=>(b.scroll_depth||0)>=75).length}],v=["#f43f5e","#f59e0b","#6366f1","#10b981"];return a.jsxs("div",{className:"max-w-7xl mx-auto space-y-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Reader Engagement"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Time-on-page, scroll depth & bounce rates by post"})]}),a.jsxs(Mn,{value:e,onValueChange:t,children:[a.jsx(En,{className:"w-64",children:a.jsx(Dn,{placeholder:"All posts"})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"all",children:"All Posts"}),n.map(b=>{var w,N;return a.jsxs(it,{value:b.id,children:[(w=b.title)==null?void 0:w.slice(0,45),((N=b.title)==null?void 0:N.length)>45?"â¦":""]},b.id)})]})]})]}),o?a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[...Array(4)].map((b,w)=>a.jsx(Dt,{className:"h-32"},w))}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[a.jsx(my,{title:"Total Sessions",value:c,icon:Qn,color:"indigo"}),a.jsx(my,{title:"Avg Time on Page",value:`${Math.floor(u/60)}m ${u%60}s`,icon:Rn,color:"emerald"}),a.jsx(my,{title:"Avg Scroll Depth",value:d,suffix:"%",icon:kZ,color:"amber"}),a.jsx(my,{title:"Bounce Rate",value:p,suffix:"%",icon:Zk,color:"rose"})]}),a.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Scroll Depth Distribution"})}),a.jsx(he,{children:l.length===0?a.jsx("p",{className:"text-slate-400 text-sm text-center py-8",children:"No engagement data yet"}):a.jsx(Li,{width:"100%",height:200,children:a.jsxs(Ha,{data:y,barSize:40,children:[a.jsx(Ir,{dataKey:"label",tick:{fontSize:12}}),a.jsx(Mr,{tick:{fontSize:12}}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"count",radius:[4,4,0,0],children:y.map((b,w)=>a.jsx(cm,{fill:v[w]},w))})]})})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Top Posts by Sessions"})}),a.jsx(he,{children:x.length===0?a.jsx("p",{className:"text-slate-400 text-sm text-center py-8",children:"No engagement data yet"}):a.jsx(Li,{width:"100%",height:200,children:a.jsxs(Ha,{data:x.slice(0,6),layout:"vertical",barSize:16,children:[a.jsx(Ir,{type:"number",tick:{fontSize:11}}),a.jsx(Mr,{dataKey:"title",type:"category",tick:{fontSize:11},width:120,tickFormatter:b=>(b==null?void 0:b.length)>18?b.slice(0,18)+"â¦":b}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"sessions",fill:"#6366f1",radius:[0,4,4,0]})]})})})]})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Per-Post Breakdown"})}),a.jsx(he,{children:x.length===0?a.jsx("p",{className:"text-slate-400 text-sm text-center py-8",children:"No engagement data recorded yet. Engagement is tracked when readers visit blog posts."}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-slate-100",children:[a.jsx("th",{className:"text-left py-3 pr-4 font-medium text-slate-500",children:"Post"}),a.jsx("th",{className:"text-right py-3 px-4 font-medium text-slate-500",children:"Sessions"}),a.jsx("th",{className:"text-right py-3 px-4 font-medium text-slate-500",children:"Avg Time"}),a.jsx("th",{className:"py-3 px-4 font-medium text-slate-500 min-w-40",children:"Scroll Depth"}),a.jsx("th",{className:"text-right py-3 pl-4 font-medium text-slate-500",children:"Bounce"})]})}),a.jsx("tbody",{children:x.map((b,w)=>a.jsxs("tr",{className:"border-b border-slate-50 hover:bg-slate-50 transition-colors",children:[a.jsx("td",{className:"py-3 pr-4 font-medium text-slate-800 max-w-xs truncate",children:b.title}),a.jsx("td",{className:"py-3 px-4 text-right text-slate-700",children:b.sessions}),a.jsxs("td",{className:"py-3 px-4 text-right text-slate-700",children:[Math.floor(b.avgTime/60),"m ",b.avgTime%60,"s"]}),a.jsx("td",{className:"py-3 px-4",children:a.jsx(VDe,{depth:b.avgScroll})}),a.jsx("td",{className:"py-3 pl-4 text-right",children:a.jsxs(Se,{className:b.bounce>60?"bg-rose-100 text-rose-700":b.bounce>40?"bg-amber-100 text-amber-700":"bg-emerald-100 text-emerald-700",children:[b.bounce,"%"]})})]},b.id))})]})})})]})]})]})}function qr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var HDe=typeof Symbol=="function"&&Symbol.observable||"@@observable",WF=HDe,HF=()=>Math.random().toString(36).substring(7).split("").join("."),GDe={INIT:`@@redux/INIT${HF()}`,REPLACE:`@@redux/REPLACE${HF()}`},GF=GDe;function KDe(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}
1012function JK(e,t,n){if(typeof e!="function")throw new Error(qr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qr(1));return n(JK)(e,t)}let r=e,i=t,s=new Map,o=s,l=0,c=!1;function u(){o===s&&(o=new Map,s.forEach((v,b)=>{o.set(b,v)}))}function d(){if(c)throw new Error(qr(3));return i}function f(v){if(typeof v!="function")throw new Error(qr(4));if(c)throw new Error(qr(5));let b=!0;u();const w=l++;return o.set(w,v),function(){if(b){if(c)throw new Error(qr(6));b=!1,u(),o.delete(w),s=null}}}function p(v){if(!KDe(v))throw new Error(qr(7));if(typeof v.type>"u")throw new Error(qr(8));if(typeof v.type!="string")throw new Error(qr(17));if(c)throw new Error(qr(9));try{c=!0,i=r(i,v)}finally{c=!1}return(s=o).forEach(w=>{w()}),v}function m(v){if(typeof v!="function")throw new Error(qr(10));r=v,p({type:GF.REPLACE})}function x(){const v=f;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(qr(11));function w(){const S=b;S.next&&S.next(d())}return w(),{unsubscribe:v(w)}},[WF](){return this}}}return p({type:GF.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[WF]:x}}function KF(e,t){return function(...n){return t(e.apply(this,n))}}function YF(e,t){if(typeof e=="function")return KF(e,t);if(typeof e!="object"||e===null)throw new Error(qr(16));const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=KF(i,t))}return n}function eY(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function YDe(...e){return t=>(n,r)=>{const i=t(n,r);let s=()=>{throw new Error(qr(15))};const o={getState:i.getState,dispatch:(c,...u)=>s(c,...u)},l=e.map(c=>c(o));return s=eY(...l)(i.dispatch),{...i,dispatch:s}}}var D_={exports:{}},L_={};/** 1013 * @license React 1014 * use-sync-external-store-with-selector.production.js 1015 * 1016 * Copyright (c) Meta Platforms, Inc. and affiliates. 1017 * 1018 * This source code is licensed under the MIT license found in the 1019 * LICENSE file in the root directory of this source tree. 1020 */var XF;function XDe(){if(XF)return L_;XF=1;var e=Kp();function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,s=e.useEffect,o=e.useMemo,l=e.useDebugValue;return L_.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var m=i(null);if(m.current===null){var x={hasValue:!1,value:null};m.current=x}else x=m.current;m=o(function(){function v(_){if(!b){if(b=!0,w=_,_=f(_),p!==void 0&&x.hasValue){var E=x.value;if(p(E,_))return N=E}return N=_}if(E=N,n(w,_))return E;var k=f(_);return p!==void 0&&p(E,k)?(w=_,E):(w=_,N=k)}var b=!1,w,N,S=d===void 0?null:d;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,d,f,p]);var y=r(c,m[0],m[1]);return s(function(){x.hasValue=!0,x.value=y},[y]),l(y),y},L_}var QF;function QDe(){return QF||(QF=1,D_.exports=XDe()),D_.exports}QDe();var ZDe=T.version.startsWith("19"),JDe=Symbol.for(ZDe?"react.transitional.element":"react.element"),e4e=Symbol.for("react.portal"),t4e=Symbol.for("react.fragment"),n4e=Symbol.for("react.strict_mode"),r4e=Symbol.for("react.profiler"),i4e=Symbol.for("react.consumer"),s4e=Symbol.for("react.context"),tY=Symbol.for("react.forward_ref"),a4e=Symbol.for("react.suspense"),o4e=Symbol.for("react.suspense_list"),M2=Symbol.for("react.memo"),l4e=Symbol.for("react.lazy"),c4e=tY,u4e=M2;function d4e(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case JDe:switch(e=e.type,e){case t4e:case r4e:case n4e:case a4e:case o4e:return e;default:switch(e=e&&e.$$typeof,e){case s4e:case tY:case l4e:case M2:return e;case i4e:return e;default:return t}}case e4e:return t}}}function f4e(e){return d4e(e)===M2}function h4e(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:s,areStatePropsEqual:o}){let l=!1,c,u,d,f,p;function m(w,N){return c=w,u=N,d=e(c,u),f=t(r,u),p=n(d,f,u),l=!0,p}
vendor: 4,907 bytes, line 1020
1020function x(){return d=e(c,u),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function y(){return e.dependsOnOwnProps&&(d=e(c,u)),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function v(){const w=e(c,u),N=!o(w,d);return d=w,N&&(p=n(d,f,u)),p}function b(w,N){const S=!s(N,u),_=!i(w,c,N,u);return c=w,u=N,S&&_?x():S?y():_?v():p}return function(N,S){return l?b(N,S):m(N,S)}}function p4e(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...i}){const s=t(e,i),o=n(e,i),l=r(e,i);return h4e(s,o,l,e,i)}function m4e(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...s)=>t(i(...s)))}return n}function $k(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function ZF(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function nY(e,t){return function(r,{displayName:i}){const s=function(l,c){return s.dependsOnOwnProps?s.mapToProps(l,c):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,c){s.mapToProps=e,s.dependsOnOwnProps=ZF(e);let u=s(l,c);return typeof u=="function"&&(s.mapToProps=u,s.dependsOnOwnProps=ZF(u),u=s(l,c)),u},s}}function D2(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function g4e(e){return e&&typeof e=="object"?$k(t=>m4e(e,t)):e?typeof e=="function"?nY(e):D2(e,"mapDispatchToProps"):$k(t=>({dispatch:t}))}function y4e(e){return e?typeof e=="function"?nY(e):D2(e,"mapStateToProps"):$k(()=>({}))}function v4e(e,t,n){return{...n,...e,...t}}function x4e(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let s=!1,o;return function(c,u,d){const f=e(c,u,d);return s?i(f,o)||(o=f):(s=!0,o=f),o}}}function b4e(e){return e?typeof e=="function"?x4e(e):D2(e,"mergeProps"):()=>v4e}function w4e(e){e()}function j4e(){let e=null,t=null;return{clear(){e=null,t=null},notify(){w4e(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var JF={notify(){},get:()=>[]};function rY(e,t){let n,r=JF,i=0,s=!1;function o(y){d();const v=r.subscribe(y);let b=!1;return()=>{b||(b=!0,v(),f())}}function l(){r.notify()}function c(){x.onStateChange&&x.onStateChange()}function u(){return s}function d(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=j4e())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=JF)}function p(){s||(s=!0,d())}function m(){s&&(s=!1,f())}const x={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return x}var S4e=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",N4e=S4e(),_4e=()=>typeof navigator<"u"&&navigator.product==="ReactNative",E4e=_4e(),P4e=()=>N4e||E4e?T.useLayoutEffect:T.useEffect,hx=P4e();function eq(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function $_(e,t){if(eq(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!eq(e[n[i]],t[n[i]]))return!1;return!0}var k4e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},O4e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},A4e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},iY={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},C4e={[c4e]:A4e,[u4e]:iY};function tq(e){return f4e(e)?iY:C4e[e.$$typeof]||k4e}var T4e=Object.defineProperty,R4e=Object.getOwnPropertyNames,nq=Object.getOwnPropertySymbols,I4e=Object.getOwnPropertyDescriptor,M4e=Object.getPrototypeOf,rq=Object.prototype;function Bk(e,t){if(typeof t!="string"){if(rq){const s=M4e(t);s&&s!==rq&&Bk(e,s)}let n=R4e(t);nq&&(n=n.concat(nq(t)));const r=tq(e),i=tq(t);for(let s=0;s<n.length;++s){const o=n[s];if(!O4e[o]&&!(i&&i[o])&&!(r&&r[o])){const l=I4e(t,o);try{T4e(e,o,l)}catch{}}}}return e}var B_=Symbol.for("react-redux-context"),F_=typeof globalThis<"u"?globalThis:{};function D4e(){if(!T.createContext)return{};const e=F_[B_]??(F_[B_]=new Map);let t=e.get(T.createContext);return t||(t=T.createContext(null),e.set(T.createContext,t)),t}var sY=D4e(),L4e=[null,null];function $4e(e,t,n){hx(()=>e(...t),n)}function B4e(e,t,n,r,i,s){e.current=r,n.current=!1,i.current&&(i.current=null,s())}function F4e(e,t,n,r,i,s,o,l,c,u,d){if(!e)return()=>{};let f=!1,p=null;const m=()=>{if(f||!l.current)return;const y=t.getState();let v,b;try{v=r(y,i.current)}catch(w){b=w,p=w}
1020b||(p=null),v===s.current?o.current||u():(s.current=v,c.current=v,o.current=!0,d())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function q4e(e,t){return e===t}function z4e(e,t,n,{pure:r,areStatesEqual:i=q4e,areOwnPropsEqual:s=$_,areStatePropsEqual:o=$_,areMergedPropsEqual:l=$_,forwardRef:c=!1,context:u=sY}={}){const d=u,f=y4e(e),p=g4e(t),m=b4e(n),x=!!e;return v=>{const b=v.displayName||v.name||"Component",w=`Connect(${b})`,N={shouldHandleStateChanges:x,displayName:w,wrappedComponentName:b,WrappedComponent:v,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:o,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(k){const[O,I,A]=T.useMemo(()=>{const{reactReduxForwardedRef:oe,...Oe}=k;return[k.context,oe,Oe]},[k]),C=T.useMemo(()=>{let oe=d;return O!=null&&O.Consumer,oe},[O,d]),R=T.useContext(C),D=!!k.store&&!!k.store.getState&&!!k.store.dispatch,q=!!R&&!!R.store,F=D?k.store:R.store,H=q?R.getServerState:F.getState,U=T.useMemo(()=>p4e(F.dispatch,N),[F]),[W,G]=T.useMemo(()=>{if(!x)return L4e;const oe=rY(F,D?void 0:R.subscription),Oe=oe.notifyNestedSubs.bind(oe);return[oe,Oe]},[F,D,R]),L=T.useMemo(()=>D?R:{...R,subscription:W},[D,R,W]),$=T.useRef(void 0),V=T.useRef(A),z=T.useRef(void 0),Q=T.useRef(!1),J=T.useRef(!1),Y=T.useRef(void 0);hx(()=>(J.current=!0,()=>{J.current=!1}),[]);const X=T.useMemo(()=>()=>z.current&&A===V.current?z.current:U(F.getState(),A),[F,A]),ne=T.useMemo(()=>Oe=>W?F4e(x,F,W,U,V,$,Q,J,z,G,Oe):()=>{},[W]);$4e(B4e,[V,$,Q,A,z,G]);let Z;try{Z=T.useSyncExternalStore(ne,X,H?()=>U(H(),A):X)}catch(oe){throw Y.current&&(oe.message+=` 1021The error may be correlated with this previous error: 1022${Y.current.stack} 1023 1024`),oe}hx(()=>{Y.current=void 0,z.current=void 0,$.current=Z});const se=T.useMemo(()=>T.createElement(v,{...Z,ref:I}),[I,v,Z]);return T.useMemo(()=>x?T.createElement(C.Provider,{value:L},se):se,[C,se,L])}const E=T.memo(S);if(E.WrappedComponent=v,E.displayName=S.displayName=w,c){const O=T.forwardRef(function(A,C){return T.createElement(E,{...A,reactReduxForwardedRef:C})});return O.displayName=w,O.WrappedComponent=v,Bk(O,v)}return Bk(E,v)}}var aY=z4e;function U4e(e){const{children:t,context:n,serverState:r,store:i}=e,s=T.useMemo(()=>{const c=rY(i);return{store:i,subscription:c,getServerState:r?()=>r:void 0}},[i,r]),o=T.useMemo(()=>i.getState(),[i]);hx(()=>{const{subscription:c}=s;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[s,o]);const l=n||sY;return T.createElement(l.Provider,{value:s},t)}var V4e=U4e;function W4e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function oY(e,t){var n=T.useState(function(){return{inputs:t,result:e()}})[0],r=T.useRef(!0),i=T.useRef(n),s=r.current||!!(t&&i.current.inputs&&W4e(t,i.current.inputs)),o=s?i.current:{inputs:t,result:e()};return T.useEffect(function(){r.current=!1,i.current=o},[o]),o.result}function H4e(e,t){return oY(function(){return e},t)}var Bt=oY,tt=H4e,ks=function(t){var n=t.top,r=t.right,i=t.bottom,s=t.left,o=r-s,l=i-n,c={top:n,right:r,bottom:i,left:s,width:o,height:l,x:s,y:n,center:{x:(r+s)/2,y:(i+n)/2}};return c},L2=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}}
1024,iq=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},G4e=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},q_={top:0,right:0,bottom:0,left:0},$2=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?q_:r,s=t.border,o=s===void 0?q_:s,l=t.padding,c=l===void 0?q_:l,u=ks(L2(n,i)),d=ks(iq(n,o)),f=ks(iq(d,c));return{marginBox:u,borderBox:ks(n),paddingBox:d,contentBox:f,margin:i,border:o,padding:c}},Yi=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&Zo(),i},K4e=function(){return{x:window.pageXOffset,y:window.pageYOffset}},px=function(t,n){var r=t.borderBox,i=t.border,s=t.margin,o=t.padding,l=G4e(r,n);return $2({borderBox:l,border:i,margin:s,padding:o})},mx=function(t,n){return n===void 0&&(n=K4e()),px(t,n)},lY=function(t,n){var r={top:Yi(n.marginTop),right:Yi(n.marginRight),bottom:Yi(n.marginBottom),left:Yi(n.marginLeft)},i={top:Yi(n.paddingTop),right:Yi(n.paddingRight),bottom:Yi(n.paddingBottom),left:Yi(n.paddingLeft)},s={top:Yi(n.borderTopWidth),right:Yi(n.borderRightWidth),bottom:Yi(n.borderBottomWidth),left:Yi(n.borderLeftWidth)};return $2({borderBox:t,margin:r,padding:i,border:s})},cY=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return lY(n,r)},sq=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Y4e(e,t){return!!(e===t||sq(e)&&sq(t))}function X4e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Y4e(e[n],t[n]))return!1;return!0}function cr(e,t){t===void 0&&(t=X4e);var n=null;function r(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}var Dp=function(t){var n=[],r=null,i=function(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];n=l,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i};function uY(e,t){}uY.bind(null,"warn");uY.bind(null,"error");function Go(){}function Q4e(e,t){return{...e,...t}}function is(e,t,n){const r=t.map(i=>{const s=Q4e(n,i.options);return e.addEventListener(i.eventName,i.fn,s),function(){e.removeEventListener(i.eventName,i.fn,s)}});return function(){r.forEach(s=>{s()})}}const Z4e="Invariant failed";class gx extends Error{}gx.prototype.toString=function(){return this.message};function Fe(e,t){throw new gx(Z4e)}class J4e extends ee.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=Go,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof gx&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=is(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof gx){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const e5e=` 1025 Press space bar to start a drag. 1026 When dragging you can use the arrow keys to move the item around and escape to cancel. 1027 Some screen readers may require you to be in focus mode or to use your pass through key 1028`,yx=e=>e+1,t5e=e=>` 1029 You have lifted an item in position ${yx(e.source.index)} 1030`,dY=(e,t)=>{const n=e.droppableId===t.droppableId,r=yx(e.index),i=yx(t.index);return n?` 1031 You have moved the item from position ${r} 1032 to position ${i} 1033 `:` 1034 You have moved the item from position ${r} 1035 in list ${e.droppableId} 1036 to list ${t.droppableId} 1037 in position ${i} 1038 `},fY=(e,t,n)=>t.droppableId===n.droppableId?` 1039 The item ${e} 1040 has been combined with ${n.draggableId}`:` 1041 The item ${e} 1042 in list ${t.droppableId} 1043 has been combined with ${n.draggableId} 1044 in list ${n.droppableId} 1045 `,n5e=e=>{const t=e.destination;if(t)return dY(e.source,t);
1045const n=e.combine;return n?fY(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},aq=e=>` 1046 The item has returned to its starting position 1047 of ${yx(e.index)} 1048`,r5e=e=>{if(e.reason==="CANCEL")return` 1049 Movement cancelled. 1050 ${aq(e.source)} 1051 `;const t=e.destination,n=e.combine;return t?` 1052 You have dropped the item. 1053 ${dY(e.source,t)} 1054 `:n?` 1055 You have dropped the item. 1056 ${fY(e.draggableId,e.source,n)} 1057 `:` 1058 The item has been dropped while not over a drop area. 1059 ${aq(e.source)} 1060 `},Fy={dragHandleUsageInstructions:e5e,onDragStart:t5e,onDragUpdate:n5e,onDragEnd:r5e},dr={x:0,y:0},br=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Oi=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),Ko=(e,t)=>e.x===t.x&&e.y===t.y,Jd=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Nc=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},Lp=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),oq=(e,t)=>Math.min(...t.map(n=>Lp(e,n))),hY=e=>t=>({x:e(t.x),y:e(t.y)});var i5e=(e,t)=>{const n=ks({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const wm=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),lq=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],s5e={top:0,right:0,bottom:0,left:0},a5e=(e,t)=>t?wm(e,t.scroll.diff.displacement):e,o5e=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,l5e=(e,t)=>t&&t.shouldClipSubject?i5e(t.pageMarginBox,e):ks(e);var Pd=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const i=a5e(e.marginBox,r),s=o5e(i,n,t),o=l5e(s,r);return{page:e,withPlaceholder:t,active:o}},B2=(e,t)=>{e.frame||Fe();const n=e.frame,r=Oi(t,n.scroll.initial),i=Jd(r),s={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}},o=Pd({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s});return{...e,frame:s,subject:o}};const pY=cr(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),mY=cr(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),M0=cr(e=>Object.values(e)),c5e=cr(e=>Object.values(e));var ef=cr((e,t)=>c5e(t).filter(r=>e===r.descriptor.droppableId).sort((r,i)=>r.descriptor.index-i.descriptor.index));function F2(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function D0(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var L0=cr((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),u5e=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:i})=>{if(!n.isCombineEnabled||!F2(i))return null;function o(m){const x={type:"COMBINE",combine:{draggableId:m,droppableId:n.descriptor.id}};return{...i,at:x}}const l=i.displaced.all,c=l.length?l[0]:null;if(e)return c?o(c):null;const u=L0(t,r);if(!c){if(!u.length)return null;const m=u[u.length-1];return o(m.descriptor.id)}const d=u.findIndex(m=>m.descriptor.id===c);d===-1&&Fe();const f=d-1;if(f<0)return null;const p=u[f];return o(p.descriptor.id)},tf=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const gY={point:dr,value:0},$p={invisible:{},visible:{},all:[]},d5e={displaced:$p,displacedBy:gY,at:null};var as=(e,t)=>n=>e<=n&&n<=t,yY=e=>{const t=as(e.top,e.bottom),n=as(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const s=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(s&&o)return!0;const c=r.top<e.top&&r.bottom>e.bottom,u=r.left<e.left&&r.right>e.right;return c&&u?!0:c&&o||u&&s}},f5e=e=>{const t=as(e.top,e.bottom),n=as(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const q2={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},vY={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var h5e=e=>t=>{const n=as(t.top,t.bottom),r=as(t.left,t.right);return i=>e===q2?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)};const p5e=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:dr;return wm(e,n)},m5e=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,g5e=(e,t,n)=>n(t)(e),z2=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:i})=>{const s=r?p5e(e,t):e;return m5e(s,t,i)&&g5e(s,n,i)},y5e=e=>z2({...e,isVisibleThroughFrameFn:yY}),xY=e=>z2({...e,isVisibleThroughFrameFn:f5e}),v5e=e=>z2({...e,isVisibleThroughFrameFn:h5e(e.destination.axis)}),x5e=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;
1060const{invisible:r,visible:i}=t;if(r[e])return!1;const s=i[e];return s?s.shouldAnimate:!0};function b5e(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return ks(L2(n,r))}function Bp({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:i,last:s}){return e.reduce(function(l,c){const u=b5e(c,n),d=c.descriptor.id;if(l.all.push(d),!y5e({target:u,destination:t,viewport:r,withDroppableDisplacement:!0}))return l.invisible[c.descriptor.id]=!0,l;const p=x5e(d,s,i),m={draggableId:d,shouldAnimate:p};return l.visible[d]=m,l},{all:[],visible:{},invisible:{}})}function w5e(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function cq({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const i=w5e(e,{inHomeList:t});return{displaced:$p,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:i}}}}function vx({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:i,last:s,index:o,forceShouldAnimate:l}){const c=tf(e,n);if(o==null)return cq({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});const u=t.find(x=>x.descriptor.index===o);if(!u)return cq({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});const d=L0(e,t),f=t.indexOf(u),p=d.slice(f);return{displaced:Bp({afterDragging:p,destination:n,displacedBy:i,last:s,viewport:r.frame,forceShouldAnimate:l}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function nl(e,t){return!!t.effected[e]}var j5e=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:i})=>{if(!t.isCombineEnabled)return null;const s=r.draggableId,l=n[s].descriptor.index;return nl(s,i)?e?l:l-1:e?l+1:l},S5e=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const i=r.index,s=e?i+1:i-1,o=n[0].descriptor.index,l=n[n.length-1].descriptor.index,c=t?l:l+1;return s<o||s>c?null:s},N5e=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:i,insideDestination:s,previousImpact:o,viewport:l,afterCritical:c})=>{const u=o.at;if(u||Fe(),u.type==="REORDER"){const f=S5e({isMovingForward:e,isInHomeList:t,location:u.destination,insideDestination:s});return f==null?null:vx({draggable:n,insideDestination:s,destination:i,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:f})}const d=j5e({isMovingForward:e,destination:i,displaced:o.displaced,draggables:r,combine:u.combine,afterCritical:c});return d==null?null:vx({draggable:n,insideDestination:s,destination:i,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:d})},_5e=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const i=!!(e.visible[n]||e.invisible[n]);return nl(n,t)?i?dr:Jd(r.point):i?r.point:dr},E5e=({afterCritical:e,impact:t,draggables:n})=>{const r=D0(t);r||Fe();const i=r.draggableId,s=n[i].page.borderBox.center,o=_5e({displaced:t.displaced,afterCritical:e,combineWith:i,displacedBy:t.displacedBy});return br(s,o)};const bY=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,P5e=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,U2=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,uq=({axis:e,moveRelativeTo:t,isMoving:n})=>Nc(e.line,t.marginBox[e.end]+bY(e,n),U2(e,t.marginBox,n)),dq=({axis:e,moveRelativeTo:t,isMoving:n})=>Nc(e.line,t.marginBox[e.start]-P5e(e,n),U2(e,t.marginBox,n)),k5e=({axis:e,moveInto:t,isMoving:n})=>Nc(e.line,t.contentBox[e.start]+bY(e,n),U2(e,t.contentBox,n));var O5e=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i})=>{const s=ef(r.descriptor.id,n),o=t.page,l=r.axis;if(!s.length)return k5e({axis:l,moveInto:r.page,isMoving:o});const{displaced:c,displacedBy:u}=e,d=c.all[0];if(d){const p=n[d];if(nl(d,i))return dq({axis:l,moveRelativeTo:p.page,isMoving:o});const m=px(p.page,u.point);return dq({axis:l,moveRelativeTo:m,isMoving:o})}const f=s[s.length-1];if(f.descriptor.id===t.descriptor.id)return o.borderBox.center;if(nl(f.descriptor.id,i)){const p=px(f.page,Jd(i.displacedBy.point));return uq({axis:l,moveRelativeTo:p,isMoving:o})}return uq({axis:l,moveRelativeTo:f.page,isMoving:o})},Fk=(e,t)=>{const n=e.frame;return n?br(t,n.scroll.diff.displacement):t};const A5e=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:i})=>{const s=t.page.borderBox.center,o=e.at;
1060return!n||!o?s:o.type==="REORDER"?O5e({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i}):E5e({impact:e,draggables:r,afterCritical:i})};var $0=e=>{const t=A5e(e),n=e.droppable;return n?Fk(n,t):t},wY=(e,t)=>{const n=Oi(t,e.scroll.initial),r=Jd(n);return{frame:ks({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function fq(e,t){return e.map(n=>t[n])}function C5e(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}var T5e=({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:i})=>{const s=wY(t,br(t.scroll.current,i)),o=n.frame?B2(n,br(n.frame.scroll.current,i)):n,l=e.displaced,c=Bp({afterDragging:fq(l.all,r),destination:n,displacedBy:e.displacedBy,viewport:s.frame,last:l,forceShouldAnimate:!1}),u=Bp({afterDragging:fq(l.all,r),destination:o,displacedBy:e.displacedBy,viewport:t.frame,last:l,forceShouldAnimate:!1}),d={},f={},p=[l,c,u];return l.all.forEach(x=>{const y=C5e(x,p);if(y){f[x]=y;return}d[x]=!0}),{...e,displaced:{all:l.all,invisible:d,visible:f}}},R5e=(e,t)=>br(e.scroll.diff.displacement,t),V2=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=R5e(n,e),i=Oi(r,t.page.borderBox.center);return br(t.client.borderBox.center,i)},jY=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:i,onlyOnMainAxis:s=!1})=>{const o=Oi(n,e.page.borderBox.center),c={target:wm(e.page.borderBox,o),destination:t,withDroppableDisplacement:i,viewport:r};return s?v5e(c):xY(c)},I5e=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:i,viewport:s,previousPageBorderBoxCenter:o,previousClientSelection:l,afterCritical:c})=>{if(!n.isEnabled)return null;const u=ef(n.descriptor.id,r),d=tf(t,n),f=u5e({isMovingForward:e,draggable:t,destination:n,insideDestination:u,previousImpact:i})||N5e({isMovingForward:e,isInHomeList:d,draggable:t,draggables:r,destination:n,insideDestination:u,previousImpact:i,viewport:s,afterCritical:c});if(!f)return null;const p=$0({impact:f,draggable:t,droppable:n,draggables:r,afterCritical:c});if(jY({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:V2({pageBorderBoxCenter:p,draggable:t,viewport:s}),impact:f,scrollJumpRequest:null};const x=Oi(p,o),y=T5e({impact:f,viewport:s,destination:n,draggables:r,maxScrollChange:x});return{clientSelection:l,impact:y,scrollJumpRequest:x}};const Fr=e=>{const t=e.subject.active;return t||Fe(),t};var M5e=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:i})=>{const s=n.subject.active;if(!s)return null;const o=n.axis,l=as(s[o.start],s[o.end]),c=M0(r).filter(d=>d!==n).filter(d=>d.isEnabled).filter(d=>!!d.subject.active).filter(d=>yY(i.frame)(Fr(d))).filter(d=>{const f=Fr(d);return e?s[o.crossAxisEnd]<f[o.crossAxisEnd]:f[o.crossAxisStart]<s[o.crossAxisStart]}).filter(d=>{const f=Fr(d),p=as(f[o.start],f[o.end]);return l(f[o.start])||l(f[o.end])||p(s[o.start])||p(s[o.end])}).sort((d,f)=>{const p=Fr(d)[o.crossAxisStart],m=Fr(f)[o.crossAxisStart];return e?p-m:m-p}).filter((d,f,p)=>Fr(d)[o.crossAxisStart]===Fr(p[0])[o.crossAxisStart]);if(!c.length)return null;if(c.length===1)return c[0];const u=c.filter(d=>as(Fr(d)[o.start],Fr(d)[o.end])(t[o.line]));return u.length===1?u[0]:u.length>1?u.sort((d,f)=>Fr(d)[o.start]-Fr(f)[o.start])[0]:c.sort((d,f)=>{const p=oq(t,lq(Fr(d))),m=oq(t,lq(Fr(f)));return p!==m?p-m:Fr(d)[o.start]-Fr(f)[o.start]})[0]};const hq=(e,t)=>{const n=e.page.borderBox.center;return nl(e.descriptor.id,t)?Oi(n,t.displacedBy.point):n},D5e=(e,t)=>{const n=e.page.borderBox;return nl(e.descriptor.id,t)?wm(n,Jd(t.displacedBy.point)):n};var L5e=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:i})=>r.filter(o=>xY({target:D5e(o,i),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((o,l)=>{const c=Lp(e,Fk(n,hq(o,i))),u=Lp(e,Fk(n,hq(l,i)));return c<u?-1:u<c?1:o.descriptor.index-l.descriptor.index})[0]||null,jm=cr(function(t,n){const r=n[t.line];return{value:r,point:Nc(t.line,r)}});const $5e=(e,t,n)=>{const r=e.axis;
1060if(e.descriptor.mode==="virtual")return Nc(r.line,t[r.line]);const i=e.subject.page.contentBox[r.size],c=ef(e.descriptor.id,n).reduce((u,d)=>u+d.client.marginBox[r.size],0)+t[r.line]-i;return c<=0?null:Nc(r.line,c)},SY=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),NY=(e,t,n)=>{const r=e.frame;tf(t,e)&&Fe(),e.subject.withPlaceholder&&Fe();const i=jm(e.axis,t.displaceBy).point,s=$5e(e,i,n),o={placeholderSize:i,increasedBy:s,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const d=Pd({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:e.frame});return{...e,subject:d}}const l=s?br(r.scroll.max,s):r.scroll.max,c=SY(r,l),u=Pd({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:c});return{...e,subject:u,frame:c}},B5e=e=>{const t=e.subject.withPlaceholder;t||Fe();const n=e.frame;if(!n){const o=Pd({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:o}}const r=t.oldFrameMaxScroll;r||Fe();const i=SY(n,r),s=Pd({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:s,frame:i}};var F5e=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:i,destination:s,viewport:o,afterCritical:l})=>{if(!t){if(n.length)return null;const f={displaced:$p,displacedBy:gY,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},p=$0({impact:f,draggable:r,droppable:s,draggables:i,afterCritical:l}),m=tf(r,s)?s:NY(s,r,i);return jY({draggable:r,destination:m,newPageBorderBoxCenter:p,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?f:null}const c=e[s.axis.line]<=t.page.borderBox.center[s.axis.line],u=(()=>{const f=t.descriptor.index;return t.descriptor.id===r.descriptor.id||c?f:f+1})(),d=jm(s.axis,r.displaceBy);return vx({draggable:r,insideDestination:n,destination:s,viewport:o,displacedBy:d,last:$p,index:u})},q5e=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:i,droppables:s,viewport:o,afterCritical:l})=>{const c=M5e({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:s,viewport:o});if(!c)return null;const u=ef(c.descriptor.id,i),d=L5e({pageBorderBoxCenter:t,viewport:o,destination:c,insideDestination:u,afterCritical:l}),f=F5e({previousPageBorderBoxCenter:t,destination:c,draggable:n,draggables:i,moveRelativeTo:d,insideDestination:u,viewport:o,afterCritical:l});if(!f)return null;const p=$0({impact:f,draggable:n,droppable:c,draggables:i,afterCritical:l});return{clientSelection:V2({pageBorderBoxCenter:p,draggable:n,viewport:o}),impact:f,scrollJumpRequest:null}},Ii=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const z5e=(e,t)=>{const n=Ii(e);return n?t[n]:null};var U5e=({state:e,type:t})=>{const n=z5e(e.impact,e.dimensions.droppables),r=!!n,i=e.dimensions.droppables[e.critical.droppable.id],s=n||i,o=s.axis.direction,l=o==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||o==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(l&&!r)return null;const c=t==="MOVE_DOWN"||t==="MOVE_RIGHT",u=e.dimensions.draggables[e.critical.draggable.id],d=e.current.page.borderBoxCenter,{draggables:f,droppables:p}=e.dimensions;return l?I5e({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:s,draggables:f,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):q5e({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:s,draggables:f,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function ql(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function _Y(e){const t=as(e.top,e.bottom),n=as(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function V5e(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function W5e({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,i=n.map(s=>{const o=s.axis,l=Nc(s.axis.line,e.center[o.line],s.page.borderBox.center[o.crossAxisLine]);return{id:s.descriptor.id,distance:Lp(r,l)}}).sort((s,o)=>o.distance-s.distance);return i[0]?i[0].id:null}function H5e({pageBorderBox:e,draggable:t,droppables:n}){const r=M0(n).filter(i=>{if(!i.isEnabled)return!1;const s=i.subject.active;if(!s||!V5e(e,s))return!1;if(_Y(s)(e.center))return!0;const o=i.axis,l=s.center[o.crossAxisLine],c=e[o.crossAxisStart],u=e[o.crossAxisEnd],d=as(s[o.crossAxisStart],s[o.crossAxisEnd]),f=d(c),p=d(u);return!f&&!p?!0:f?c<l:u>l});return r.length?r.length===1?r[0].descriptor.id:W5e({pageBorderBox:e,draggable:t,candidates:r}):null}const EY=(e,t)=>ks(wm(e,t));var G5e=(e,t)=>{const n=e.frame;return n?EY(t,n.scroll.diff.value):t};function PY({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function K5e({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var Y5e=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:i,viewport:s,afterCritical:
1060o})=>{const l=n.axis,c=jm(n.axis,t.displaceBy),u=c.value,d=e[l.start],f=e[l.end],m=L0(t,r).find(y=>{const v=y.descriptor.id,b=y.page.borderBox.center[l.line],w=nl(v,o),N=PY({displaced:i,id:v});return w?N?f<=b:d<b-u:N?f<=b+u:d<b})||null,x=K5e({draggable:t,closest:m,inHomeList:tf(t,n)});return vx({draggable:t,insideDestination:r,destination:n,viewport:s,last:i,displacedBy:c,index:x})};const X5e=4;var Q5e=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:i,afterCritical:s})=>{if(!r.isCombineEnabled)return null;const o=r.axis,l=jm(r.axis,e.displaceBy),c=l.value,u=t[o.start],d=t[o.end],p=L0(e,i).find(x=>{const y=x.descriptor.id,v=x.page.borderBox,w=v[o.size]/X5e,N=nl(y,s),S=PY({displaced:n.displaced,id:y});return N?S?d>v[o.start]+w&&d<v[o.end]-w:u>v[o.start]-c+w&&u<v[o.end]-c-w:S?d>v[o.start]+c+w&&d<v[o.end]+c-w:u>v[o.start]+w&&u<v[o.end]-w});return p?{displacedBy:l,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:r.descriptor.id}}}:null},kY=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:i,viewport:s,afterCritical:o})=>{const l=EY(t.page.borderBox,e),c=H5e({pageBorderBox:l,draggable:t,droppables:r});if(!c)return d5e;const u=r[c],d=ef(u.descriptor.id,n),f=G5e(u,l);return Q5e({pageBorderBoxWithDroppableScroll:f,draggable:t,previousImpact:i,destination:u,insideDestination:d,afterCritical:o})||Y5e({pageBorderBoxWithDroppableScroll:f,draggable:t,destination:u,insideDestination:d,last:i.displaced,viewport:s,afterCritical:o})},W2=(e,t)=>({...e,[t.descriptor.id]:t});const Z5e=({previousImpact:e,impact:t,droppables:n})=>{const r=Ii(e),i=Ii(t);if(!r||r===i)return n;const s=n[r];if(!s.subject.withPlaceholder)return n;const o=B5e(s);return W2(n,o)};var J5e=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:i})=>{const s=Z5e({previousImpact:r,impact:i,droppables:n}),o=Ii(i);if(!o)return s;const l=n[o];if(tf(e,l)||l.subject.withPlaceholder)return s;const c=NY(l,e,t);return W2(s,c)},Fh=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:i,scrollJumpRequest:s})=>{const o=r||e.viewport,l=n||e.dimensions,c=t||e.current.client.selection,u=Oi(c,e.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:br(e.initial.client.borderBoxCenter,u)},f={selection:br(d.selection,o.scroll.current),borderBoxCenter:br(d.borderBoxCenter,o.scroll.current),offset:br(d.offset,o.scroll.diff.value)},p={client:d,page:f};if(e.phase==="COLLECTING")return{...e,dimensions:l,viewport:o,current:p};const m=l.draggables[e.critical.draggable.id],x=i||kY({pageOffset:f.offset,draggable:m,draggables:l.draggables,droppables:l.droppables,previousImpact:e.impact,viewport:o,afterCritical:e.afterCritical}),y=J5e({draggable:m,impact:x,previousImpact:e.impact,draggables:l.draggables,droppables:l.droppables});return{...e,current:p,dimensions:{draggables:l.draggables,droppables:y},impact:x,viewport:o,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null}};function eLe(e,t){return e.map(n=>t[n])}var OY=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:i})=>{const s=e.displaced,o=eLe(s.all,n),l=Bp({afterDragging:o,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:i,last:s});return{...e,displaced:l}},AY=({impact:e,draggable:t,droppable:n,draggables:r,viewport:i,afterCritical:s})=>{const o=$0({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:s});return V2({pageBorderBoxCenter:o,draggable:t,viewport:i})},CY=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&Fe();const r=e.impact,i=n||e.viewport,s=t||e.dimensions,{draggables:o,droppables:l}=s,c=o[e.critical.draggable.id],u=Ii(r);u||Fe();const d=l[u],f=OY({impact:r,viewport:i,destination:d,draggables:o}),p=AY({impact:f,draggable:c,droppable:d,draggables:o,viewport:i,afterCritical:e.afterCritical});return Fh({impact:f,clientSelection:p,state:e,dimensions:s,viewport:i})},tLe=e=>({index:e.index,droppableId:e.droppableId}),TY=({draggable:e,home:t,draggables:n,viewport:r})=>{const i=jm(t.axis,e.displaceBy),s=ef(t.descriptor.id,n),o=s.indexOf(e);o===-1&&Fe();const l=s.slice(o+1),c=l.reduce((p,m)=>(p[m.descriptor.id]=!0,p),{}),u={inVirtualList:t.descriptor.mode==="virtual",displacedBy:i,effected:c};return{impact:{displaced:Bp({afterDragging:l,destination:t,displacedBy:i,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:tLe(e.descriptor)}},afterCritical:u}},nLe=(e,t)=>({draggables:e.draggables,droppables:W2(e.droppables,t)}),rLe=({draggable:e,offset:t,initialWindowScroll:n})=>{const r=px(e.client,t),i=mx(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:i}},iLe=e=>{const t=e.frame;return t||Fe(),t},sLe=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(i=>{const s=i.descriptor.droppableId,o=t[s],c=iLe(o).scroll.diff.value,u=br(r,c);return rLe({draggable:i,offset:u,initialWindowScroll:n.scroll.initial})})},aLe=({state:e,published:t})=>{const n=t.modified.map(b=>{const w=e.dimensions.droppables[b.droppableId];return B2(w,b.scroll)}),r={...e.dimensions.droppables,...pY(n)},i=mY(sLe({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),s={...e.dimensions.draggables,...i};
1060t.removals.forEach(b=>{delete s[b]});const o={droppables:r,draggables:s},l=Ii(e.impact),c=l?o.droppables[l]:null,u=o.draggables[e.critical.draggable.id],d=o.droppables[e.critical.droppable.id],{impact:f,afterCritical:p}=TY({draggable:u,home:d,draggables:s,viewport:e.viewport}),m=c&&c.isCombineEnabled?e.impact:f,x=kY({pageOffset:e.current.page.offset,draggable:o.draggables[e.critical.draggable.id],draggables:o.draggables,droppables:o.droppables,previousImpact:m,viewport:e.viewport,afterCritical:p}),y={...e,phase:"DRAGGING",impact:x,onLiftImpact:f,dimensions:o,afterCritical:p,forceShouldAnimate:!1};return e.phase==="COLLECTING"?y:{...y,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const qk=e=>e.movementMode==="SNAP",z_=(e,t,n)=>{const r=nLe(e.dimensions,t);return!qk(e)||n?Fh({state:e,dimensions:r}):CY({state:e,dimensions:r})};function U_(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const pq={phase:"IDLE",completed:null,shouldFlush:!1};var oLe=(e=pq,t)=>{if(t.type==="FLUSH")return{...pq,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Fe();const{critical:n,clientSelection:r,viewport:i,dimensions:s,movementMode:o}=t.payload,l=s.draggables[n.draggable.id],c=s.droppables[n.droppable.id],u={selection:r,borderBoxCenter:l.client.borderBox.center,offset:dr},d={client:u,page:{selection:br(u.selection,i.scroll.initial),borderBoxCenter:br(u.selection,i.scroll.initial),offset:br(u.selection,i.scroll.diff.value)}},f=M0(s.droppables).every(y=>!y.isFixedOnPage),{impact:p,afterCritical:m}=TY({draggable:l,home:c,draggables:s.draggables,viewport:i});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:o,dimensions:s,initial:d,current:d,isWindowScrollAllowed:f,impact:p,afterCritical:m,onLiftImpact:p,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&Fe(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Fe(),aLe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;ql(e)||Fe();const{client:n}=t.payload;return Ko(n,e.current.client.selection)?e:Fh({state:e,clientSelection:n,impact:qk(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return U_(e);ql(e)||Fe();const{id:n,newScroll:r}=t.payload,i=e.dimensions.droppables[n];if(!i)return e;const s=B2(i,r);return z_(e,s,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;ql(e)||Fe();const{id:n,isEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||Fe(),i.isEnabled===r&&Fe();const s={...i,isEnabled:r};return z_(e,s,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;ql(e)||Fe();const{id:n,isCombineEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||Fe(),i.isCombineEnabled===r&&Fe();const s={...i,isCombineEnabled:r};return z_(e,s,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;ql(e)||Fe(),e.isWindowScrollAllowed||Fe();const n=t.payload.newScroll;if(Ko(e.viewport.scroll.current,n))return U_(e);const r=wY(e.viewport,n);return qk(e)?CY({state:e,viewport:r}):Fh({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!ql(e))return e;const n=t.payload.maxScroll;if(Ko(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Fe();const n=U5e({state:e,type:t.type});return n?Fh({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&Fe(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:i}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Fe(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:i,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function Ht(e,t){return e instanceof Object&&"type"in e&&e.type===t}const lLe=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),cLe=e=>({type:"LIFT",payload:e}),uLe=e=>({type:"INITIAL_PUBLISH",payload:e}),dLe=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),fLe=()=>({type:"COLLECTION_STARTING",payload:null}),hLe=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),pLe=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),mLe=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),RY=e=>({type:"MOVE",payload:e}),gLe=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),yLe=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),vLe=()=>({type:"MOVE_UP",payload:null}),xLe=()=>({type:"MOVE_DOWN",payload:null}),bLe=()=>({type:"MOVE_RIGHT",payload:null}),wLe=()=>({type:"MOVE_LEFT",payload:null}),H2=()=>({type:"FLUSH",payload:null}),jLe=e=>({type:"DROP_ANIMATE",payload:e}),G2=e=>({type:"DROP_COMPLETE",payload:e}),IY=e=>({type:"DROP",payload:e}),SLe=e=>({type:"DROP_PENDING",payload:e}),MY=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var NLe=e=>({getState:t,dispatch:n})=>r=>i=>{if(!Ht(i,"LIFT")){r(i);return}const{id:s,clientSelection:o,movementMode:l}=i.payload,c=t();c.phase==="DROP_ANIMATING"&&n(G2({completed:c.completed})),t().phase!=="IDLE"&&Fe(),n(H2()),n(lLe({draggableId:s,movementMode:l}));const d={draggableId:s,scrollOptions:{shouldPublishImmediately:l==="SNAP"}},{critical:f,dimensions:p,viewport:m}=e.startPublishing(d);n(uLe({critical:f,dimensions:p,clientSelection:o,movementMode:l,viewport:m}))},_Le=e=>()=>t=>n=>{Ht(n,"INITIAL_PUBLISH")&&e.dragging(),Ht(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(Ht(n,"FLUSH")||Ht(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const K2={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Fp={opacity:{drop:0,combining:.7},scale:{drop:.75}},DY={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Il=`${DY.outOfTheWay}s ${K2.outOfTheWay}`,qh={fluid:`opacity ${Il}`,snap:`transform ${Il}, opacity ${Il}`,drop:e=>{const t=`${e}s ${K2.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Il}`,placeholder:`height ${Il}, width ${Il}, margin ${Il}`},mq=e=>Ko(e,dr)?void 0:`translate(${e.x}px, ${e.y}px)`,zk={moveTo:mq,drop:(e,t)=>{const n=mq(e);if(n)return t?`${n} scale(${Fp.scale.drop})`:n}},{minDropTime:Uk,maxDropTime:LY}=DY,ELe=LY-Uk,gq=1500,PLe=.6;var kLe=({current:e,destination:t,reason:n})=>{const r=Lp(e,t);if(r<=0)return Uk;if(r>=gq)return LY;const i=r/gq,s=Uk+ELe*i,o=n==="CANCEL"?s*PLe:s;return Number(o.toFixed(2))},OLe=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:i})=>{const{draggables:s,droppables:o}=n,l=Ii(e),c=l?o[l]:null,u=o[t.descriptor.droppableId],d=AY({impact:e,draggable:t,draggables:s,afterCritical:i,droppable:c||u,viewport:r});return Oi(d,t.client.borderBox.center)},ALe=({draggables:e,reason:t,lastImpact:n,home:r,viewport:i,onLiftImpact:s})=>!n.at||t!=="DROP"?{impact:OY({draggables:e,impact:s,destination:r,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:$p},didDropInsideDroppable:!0};const CLe=({getState:e,dispatch:t})=>n=>r=>{if(!Ht(r,"DROP")){n(r);return}const i=e(),s=r.payload.reason;if(i.phase==="COLLECTING"){t(SLe({reason:s}));return}if(i.phase==="IDLE")return;i.phase==="DROP_PENDING"&&i.isWaiting&&Fe(),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Fe();const l=i.critical,c=i.dimensions,u=c.draggables[i.critical.draggable.id],{impact:d,didDropInsideDroppable:f}=ALe({reason:s,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.
1060id],viewport:i.viewport,draggables:i.dimensions.draggables}),p=f?F2(d):null,m=f?D0(d):null,x={index:l.draggable.index,droppableId:l.droppable.id},y={draggableId:u.descriptor.id,type:u.descriptor.type,source:x,reason:s,mode:i.movementMode,destination:p,combine:m},v=OLe({impact:d,draggable:u,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),b={critical:i.critical,afterCritical:i.afterCritical,result:y,impact:d};if(!(!Ko(i.current.client.offset,v)||!!y.combine)){t(G2({completed:b}));return}const N=kLe({current:i.current.client.offset,destination:v,reason:s});t(jLe({newHomeClientOffset:v,dropDuration:N,completed:b}))};var $Y=()=>({x:window.pageXOffset,y:window.pageYOffset});function TLe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function RLe({onWindowScroll:e}){function t(){e($Y())}const n=Dp(t),r=TLe(n);let i=Go;function s(){return i!==Go}function o(){s()&&Fe(),i=is(window,[r])}function l(){s()||Fe(),n.cancel(),i(),i=Go}return{start:o,stop:l,isActive:s}}const ILe=e=>Ht(e,"DROP_COMPLETE")||Ht(e,"DROP_ANIMATE")||Ht(e,"FLUSH"),MLe=e=>{const t=RLe({onWindowScroll:n=>{e.dispatch(gLe({newScroll:n}))}});return n=>r=>{!t.isActive()&&Ht(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&ILe(r)&&t.stop(),n(r)}};var DLe=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),i=s=>{t||n||(t=!0,e(s),clearTimeout(r))};return i.wasCalled=()=>t,i},LLe=()=>{const e=[],t=i=>{const s=e.findIndex(l=>l.timerId===i);s===-1&&Fe();const[o]=e.splice(s,1);o.callback()};return{add:i=>{const s=setTimeout(()=>t(s)),o={timerId:s,callback:i};e.push(o)},flush:()=>
1060{if(!e.length)return;const i=[...e];e.length=0,i.forEach(s=>{clearTimeout(s.timerId),s.callback()})}}};const $Le=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,BLe=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,FLe=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},lh=(e,t)=>{t()},gy=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function V_(e,t,n,r){if(!e){n(r(t));return}const i=DLe(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}var qLe=(e,t)=>{const n=LLe();let r=null;const i=(f,p)=>{r&&Fe(),lh("onBeforeCapture",()=>{const m=e().onBeforeCapture;m&&m({draggableId:f,mode:p})})},s=(f,p)=>{r&&Fe(),lh("onBeforeDragStart",()=>{const m=e().onBeforeDragStart;m&&m(gy(f,p))})},o=(f,p)=>{r&&Fe();const m=gy(f,p);r={mode:p,lastCritical:f,lastLocation:m.source,lastCombine:null},n.add(()=>{lh("onDragStart",()=>V_(e().onDragStart,m,t,Fy.onDragStart))})},l=(f,p)=>{const m=F2(p),x=D0(p);r||Fe();const y=!FLe(f,r.lastCritical);y&&(r.lastCritical=f);const v=!$Le(r.lastLocation,m);v&&(r.lastLocation=m);const b=!BLe(r.lastCombine,x);if(b&&(r.lastCombine=x),!y&&!v&&!b)return;const w={...gy(f,r.mode),combine:x,destination:m};n.add(()=>{lh("onDragUpdate",()=>V_(e().onDragUpdate,w,t,Fy.onDragUpdate))})},c=()=>{r||Fe(),n.flush()},u=f=>{r||Fe(),r=null,lh("onDragEnd",()=>V_(e().onDragEnd,f,t,Fy.onDragEnd))};return{beforeCapture:i,beforeStart:s,start:o,update:l,flush:c,drop:u,abort:()=>{if(!r)return;const f={...gy(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};u(f)}}},zLe=(e,t)=>{const n=qLe(e,t);return r=>i=>s=>{if(Ht(s,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(Ht(s,"INITIAL_PUBLISH")){const l=s.payload.critical;n.beforeStart(l,s.payload.movementMode),i(s),n.start(l,s.payload.movementMode);return}if(Ht(s,"DROP_COMPLETE")){const l=s.payload.completed.result;n.flush(),i(s),n.drop(l);return}if(i(s),Ht(s,"FLUSH")){n.abort();return}const o=r.getState();o.phase==="DRAGGING"&&n.update(o.critical,o.impact)}};const ULe=e=>t=>n=>{if(!Ht(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&Fe(),e.dispatch(G2({completed:r.completed}))},VLe=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return i=>s=>{if((Ht(s,"FLUSH")||Ht(s,"DROP_COMPLETE")||Ht(s,"DROP_ANIMATION_FINISHED"))&&r(),i(s),!Ht(s,"DROP_ANIMATE"))return;const o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(MY())}};n=requestAnimationFrame(()=>{n=null,t=is(window,[o])})}};var WLe=e=>()=>t=>n=>{(Ht(n,"DROP_COMPLETE")||Ht(n,"FLUSH")||Ht(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},HLe=e=>{let t=!1;return()=>n=>r=>{if(Ht(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(Ht(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(Ht(r,"DROP_COMPLETE")){t=!1;const i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const GLe=e=>Ht(e,"DROP_COMPLETE")||Ht(e,"DROP_ANIMATE")||Ht(e,"FLUSH");var KLe=e=>t=>n=>r=>{if(GLe(r)){e.stop(),n(r);return}if(Ht(r,"INITIAL_PUBLISH")){n(r);const i=t.getState();i.phase!=="DRAGGING"&&Fe(),e.start(i);return}n(r),e.scroll(t.getState())};const YLe=e=>t=>n=>{if(t(n),!Ht(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(IY({reason:r.reason})))},XLe=eY;var QLe=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:i,autoScroller:s})=>JK(oLe,XLe(YDe(_Le(n),WLe(e),NLe(e),CLe,ULe,VLe,YLe,KLe(s),MLe,HLe(t),zLe(r,i))));const W_=()=>({additions:{},removals:{},modified:{}});function ZLe({registry:e,callbacks:t}){let n=W_(),r=null;const i=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:c,removals:u,modified:d}=n,f=Object.keys(c).map(x=>e.draggable.getById(x).getDimension(dr)).sort((x,y)=>x.descriptor.index-y.descriptor.index),p=Object.keys(d).map(x=>{const v=e.droppable.getById(x).callbacks.getScrollWhileDragging();return{droppableId:x,scroll:v}}),m={additions:f,removals:Object.keys(u),modified:p};n=W_(),t.publish(m)}))};return{add:c=>{const u=c.descriptor.id;n.additions[u]=c,n.modified[c.descriptor.droppableId]=!0,n.removals[u]&&delete n.removals[u],i()},remove:c=>{const u=c.descriptor;n.removals[u.id]=!0,n.modified[u.droppableId]=!0,n.additions[u.id]&&delete n.additions[u.id],i()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=W_())}}}var BY=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const i=Oi({x:t,y:e},{x:r,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},FY=()=>{const e=document.documentElement;return e||Fe(),e},qY=()=>{const e=FY();return BY({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},JLe=()=>{const e=$Y(),t=qY(),n=e.y,r=e.x,i=FY(),s=i.clientWidth,o=i.clientHeight,l=r+s,c=n+o;return{frame:ks({top:n,left:r,right:l,bottom:c}),scroll:{initial:e,current:e,max:t,diff:{value:dr,displacement:dr}}}},e3e=({critical:e,scrollOptions:t,registry:n})=>{const r=JLe(),i=r.scroll.current,s=e.droppable,o=n.droppable.getAllByType(s.type).map(d=>d.callbacks.getDimensionAndWatchScroll(i,t)),l=n.draggable.getAllByType(e.draggable.type).map(d=>d.getDimension(i));return{dimensions:{draggables:mY(l),droppables:pY(o)},critical:e,viewport:r}};function yq(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var t3e=(e,t)=>
1060{let n=null;const r=ZLe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=(p,m)=>{e.droppable.exists(p)||Fe(),n&&t.updateDroppableIsEnabled({id:p,isEnabled:m})},s=(p,m)=>{n&&(e.droppable.exists(p)||Fe(),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:m}))},o=(p,m)=>{n&&(e.droppable.exists(p)||Fe(),t.updateDroppableScroll({id:p,newScroll:m}))},l=(p,m)=>{n&&e.droppable.getById(p).callbacks.scroll(m)},c=()=>{if(!n)return;r.stop();const p=n.critical.droppable;e.droppable.getAllByType(p.type).forEach(m=>m.callbacks.dragStopped()),n.unsubscribe(),n=null},u=p=>{n||Fe();const m=n.critical.draggable;p.type==="ADDITION"&&yq(e,m,p.value)&&r.add(p.value),p.type==="REMOVAL"&&yq(e,m,p.value)&&r.remove(p.value)};return{updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:s,scrollDroppable:l,updateDroppableScroll:o,startPublishing:p=>{n&&Fe();const m=e.draggable.getById(p.draggableId),x=e.droppable.getById(m.descriptor.droppableId),y={draggable:m.descriptor,droppable:x.descriptor},v=e.subscribe(u);return n={critical:y,unsubscribe:v},e3e({critical:y,registry:e,scrollOptions:p.scrollOptions})},stopPublishing:c}},zY=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",n3e=e=>{window.scrollBy(e.x,e.y)};const r3e=cr(e=>M0(e).filter(t=>!(!t.isEnabled||!t.frame))),i3e=(e,t)=>r3e(t).find(r=>(r.frame||Fe(),_Y(r.frame.pageMarginBox)(e)))||null;var s3e=({center:e,destination:t,droppables:n})=>{if(t){const i=n[t];return i.frame?i:null}return i3e(e,n)};const qp={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var a3e=(e,t,n=()=>qp)=>{const r=n(),i=e[t.size]*r.startFromPercentage,s=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:i,maxScrollValueAt:s}},UY=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},Y2=1,o3e=(e,t,n=()=>qp)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return Y2;const s=1-UY({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),o=r.maxPixelScroll*r.ease(s);return Math.ceil(o)},l3e=(e,t,n)=>{const r=n(),i=r.durationDampening.accelerateAt,s=r.durationDampening.stopDampeningAt,o=t,l=s,u=Date.now()-o;if(u>=s)return e;if(u<i)return Y2;const d=UY({startOfRange:i,endOfRange:l,current:u}),f=e*r.ease(d);return Math.ceil(f)},vq=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:i})=>{const s=o3e(e,t,i);return s===0?0:r?Math.max(l3e(s,n,i),Y2):s},xq=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:i,getAutoScrollerOptions:s})=>{const o=a3e(e,r,s);return t[r.end]<t[r.start]?vq({distanceToEdge:t[r.end],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:s}):-1*vq({distanceToEdge:t[r.start],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:s})},c3e=({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,i=t.width>e.width;return!i&&!r?n:i&&r?null:{x:i?0:n.x,y:r?0:n.y}};const u3e=hY(e=>e===0?0:e);var VY=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:i,getAutoScrollerOptions:s})=>{const o={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},l=xq({container:t,distanceToEdges:o,dragStartTime:e,axis:q2,shouldUseTimeDampening:i,getAutoScrollerOptions:s}),c=xq({container:t,distanceToEdges:o,dragStartTime:e,axis:vY,shouldUseTimeDampening:i,getAutoScrollerOptions:s}),u=u3e({x:c,y:l});if(Ko(u,dr))return null;const d=c3e({container:t,subject:n,proposedScroll:u});return d?Ko(d,dr)?null:d:null};const d3e=hY(e=>e===0?0:e>0?1:-1),X2=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const i=br(t,r),s={x:e(i.x,n.x),y:e(i.y,n.y)};return Ko(s,dr)?null:s}})(),WY=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},i=d3e(n),s=X2({max:r,current:t,change:i});return!s||i.x!==0&&s.x===0||i.y!==0&&s.y===0},Q2=(e,t)=>
1060WY({current:e.scroll.current,max:e.scroll.max,change:t}),f3e=(e,t)=>{if(!Q2(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return X2({current:r,max:n,change:t})},Z2=(e,t)=>{const n=e.frame;return n?WY({current:n.scroll.current,max:n.scroll.max,change:t}):!1},h3e=(e,t)=>{const n=e.frame;return!n||!Z2(e,t)?null:X2({current:n.scroll.current,max:n.scroll.max,change:t})};var p3e=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:s})=>{const o=VY({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:s});return o&&Q2(e,o)?o:null},m3e=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:s})=>{const o=e.frame;if(!o)return null;const l=VY({dragStartTime:r,container:o.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:s});return l&&Z2(e,l)?l:null},bq=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:i,getAutoScrollerOptions:s})=>{const o=e.current.page.borderBoxCenter,c=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const f=e.viewport,p=p3e({dragStartTime:t,viewport:f,subject:c,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:s});if(p){r(p);return}}const u=s3e({center:o,destination:Ii(e.impact),droppables:e.dimensions.droppables});if(!u)return;const d=m3e({dragStartTime:t,droppable:u,subject:c,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:s});d&&i(u.descriptor.id,d)},g3e=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>qp})=>{const r=Dp(e),i=Dp(t);let s=null;const o=u=>{s||Fe();const{shouldUseTimeDampening:d,dragStartTime:f}=s;bq({state:u,scrollWindow:r,scrollDroppable:i,dragStartTime:f,shouldUseTimeDampening:d,getAutoScrollerOptions:n})};return{start:u=>{s&&Fe();const d=Date.now();let f=!1;const p=()=>{f=!0};bq({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p,getAutoScrollerOptions:n}),s={dragStartTime:d,shouldUseTimeDampening:f},f&&o(u)},stop:()=>{s&&(r.cancel(),i.cancel(),s=null)},scroll:o}},y3e=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(l,c)=>{const u=br(l.current.client.selection,c);e({client:u})},i=(l,c)=>{if(!Z2(l,c))return c;const u=h3e(l,c);if(!u)return t(l.descriptor.id,c),null;const d=Oi(c,u);return t(l.descriptor.id,d),Oi(c,d)},s=(l,c,u)=>{if(!l||!Q2(c,u))return u;const d=f3e(c,u);if(!d)return n(u),null;const f=Oi(u,d);return n(f),Oi(u,f)};return l=>{const c=l.scrollJumpRequest;if(!c)return;const u=Ii(l.impact);u||Fe();const d=i(l.dimensions.droppables[u],c);if(!d)return;const f=l.viewport,p=s(l.isWindowScrollAllowed,f,d);p&&r(l,p)}},v3e=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const i=g3e({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),s=y3e({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:c=>{if(!(r().disabled||c.phase!=="DRAGGING")){if(c.movementMode==="FLUID"){i.scroll(c);return}c.scrollJumpRequest&&s(c)}},start:i.start,stop:i.stop}};const kd="data-rfd",Od=(()=>{const e=`${kd}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Vk=(()=>{const e=`${kd}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),x3e=(()=>{const e=`${kd}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),wq={contextId:`${kd}-scroll-container-context-id`},b3e=e=>t=>`[${t}="${e}"]`,ch=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),w3e="pointer-events: none;";var j3e=e=>{const t=b3e(e),n=(()=>{const l=` 1061 cursor: -webkit-grab; 1062 cursor: grab; 1063 `;return{selector:t(Od.contextId),styles:{always:` 1064 -webkit-touch-callout: none; 1065 -webkit-tap-highlight-color: rgba(0,0,0,0); 1066 touch-action: manipulation; 1067 `,resting:l,dragging:w3e,dropAnimating:l}}})(),r=(()=>{const l=` 1068 transition: ${qh.outOfTheWay}; 1069 `;return{selector:t(Vk.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}})(),i={selector:t(x3e.contextId),styles:{always:"overflow-anchor: n
1069one;"}},o=[r,n,i,{selector:"body",styles:{dragging:` 1070 cursor: grabbing; 1071 cursor: -webkit-grabbing; 1072 user-select: none; 1073 -webkit-user-select: none; 1074 -moz-user-select: none; 1075 -ms-user-select: none; 1076 overflow-anchor: none; 1077 `}}];return{always:ch(o,"always"),resting:ch(o,"resting"),dragging:ch(o,"dragging"),dropAnimating:ch(o,"dropAnimating"),userCancel:ch(o,"userCancel")}};const Mi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect,H_=()=>{const e=document.querySelector("head");return e||Fe(),e},jq=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function S3e(e,t){const n=Bt(()=>j3e(e),[e]),r=T.useRef(null),i=T.useRef(null),s=tt(cr(f=>{const p=i.current;p||Fe(),p.textContent=f}),[]),o=tt(f=>{const p=r.current;p||Fe(),p.textContent=f},[]);Mi(()=>{!r.current&&!i.current||Fe();const f=jq(t),p=jq(t);return r.current=f,i.current=p,f.setAttribute(`${kd}-always`,e),p.setAttribute(`${kd}-dynamic`,e),H_().appendChild(f),H_().appendChild(p),o(n.always),s(n.resting),()=>{const m=x=>{const y=x.current;y||Fe(),H_().removeChild(y),x.current=null};m(r),m(i)}},[t,o,s,n.always,n.resting,e]);const l=tt(()=>s(n.dragging),[s,n.dragging]),c=tt(f=>{if(f==="DROP"){s(n.dropAnimating);return}s(n.userCancel)},[s,n.dropAnimating,n.userCancel]),u=tt(()=>{i.current&&s(n.resting)},[s,n.resting]);return Bt(()=>({dragging:l,dropping:c,resting:u}),[l,c,u])}function HY(e,t){return Array.from(e.querySelectorAll(t))}var GY=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function B0(e){return e instanceof GY(e).HTMLElement}function N3e(e,t){const n=`[${Od.contextId}="${e}"]`,r=HY(document,n);if(!r.length)return null;const i=r.find(s=>s.getAttribute(Od.draggableId)===t);return!i||!B0(i)?null:i}function _3e(e){const t=T.useRef({}),n=T.useRef(null),r=T.useRef(null),i=T.useRef(!1),s=tt(function(p,m){const x={id:p,focus:m};return t.current[p]=x,function(){const v=t.current;v[p]!==x&&delete v[p]}},[]),o=tt(function(p){const m=N3e(e,p);m&&m!==document.activeElement&&m.focus()},[e]),l=tt(function(p,m){n.current===p&&(n.current=m)},[]),c=tt(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const p=n.current;p&&o(p)}))},[o]),u=tt(function(p){n.current=null;const m=document.activeElement;m&&m.getAttribute(Od.draggableId)===p&&(n.current=p)},[]);return Mi(()=>(i.current=!0,function(){i.current=!1;const p=r.current;p&&cancelAnimationFrame(p)}),[]),Bt(()=>({register:s,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:l}),[s,u,c,l])}function E3e(){const e={draggables:{},droppables:{}},t=[];function n(f){return t.push(f),function(){const m=t.indexOf(f);m!==-1&&t.splice(m,1)}}function r(f){t.length&&t.forEach(p=>p(f))}function i(f){return e.draggables[f]||null}function s(f){const p=i(f);return p||Fe(),p}const o={register:f=>{e.draggables[f.descriptor.id]=f,r({type:"ADDITION",value:f})},update:(f,p)=>{const m=e.draggables[p.descriptor.id];m&&m.uniqueId===f.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[f.descriptor.id]=f)},unregister:f=>{const p=f.descriptor.id,m=i(p);m&&f.uniqueId===m.uniqueId&&(delete e.draggables[p],e.droppables[f.descriptor.droppableId]&&r({type:"REMOVAL",value:f}))},getById:s,findById:i,exists:f=>!!i(f),getAllByType:f=>Object.values(e.draggables).filter(p=>p.descriptor.type===f)};function l(f){return e.droppables[f]||null}function c(f){const p=l(f);return p||Fe(),p}const u={register:f=>{e.droppables[f.descriptor.id]=f},unregister:f=>{const p=l(f.descriptor.id);p&&f.uniqueId===p.uniqueId&&delete e.droppables[f.descriptor.id]},getById:c,findById:l,exists:f=>!!l(f),getAllByType:f=>Object.values(e.droppables).filter(p=>p.descriptor.type===f)};function d(){e.draggables={},e.droppables={},t.length=0}return{draggable:o,droppable:u,subscribe:n,clean:d}}function P3e(){const e=Bt(E3e,[]);return T.useEffect(()=>function(){e.clean()},[e]),e}var J2=ee.createContext(null),xx=()=>{const e=document.body;return e||Fe(),e};const k3e={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},O3e=e=>`rfd-announcement-${e}`;function A3e(e){const t=Bt(()=>O3e(e),[e]),n=T.useRef(null);return T.useEffect(function(){const s=document.createElement("div");return n.current=s,s.id=t,s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),Iv(s.style,k3e),xx().appendChild(s),function(){setTimeout(function(){const c=xx();c.contains(s)&&c.removeChild(s),s===n.current&&(n.current=null)})}},[t]),tt(i=>{const s=n.current;if(s){s.textContent=i;return}},[])}const C3e={separator:"::"};function eC(e,t=C3e){const n=ee.useId();return Bt(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function T3e({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function R3e({contextId:e,text:t}){const n=eC("hidden-text",{separator:"-"}),r=Bt(()=>T3e({contextId:e,uniqueId:n}),[n,e]);return T.useEffect(function(){const s=document.createElement("div");return s.id=r,s.textContent=t,s.style.display="none",xx().appendChild(s),function(){const l=xx();l.contains(s)&&l.removeChild(s)}},[r,t]),r}var F0=ee.createContext(null);function KY(e){const t=T.useRef(e);return T.useEffect(()=>{t.current=e}),t}function I3e(){let e=null;function t(){return!!e}function n(o){return o===e}function r(o){e&&Fe();const l={abandon:o};return e=l,l}function i(){e||Fe(),e=null}function s(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:s}}function zp(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const M3e=9,D3e=13,tC=27,YY=32,L3e=33,$3e=34,B3e=35,F3e=36,q3e=37,z3e=38,U3e=39,V3e=40,W3e={[D3e]:!0,[M3e]:!0};var XY=e=>{W3e[e.keyCode]&&e.preventDefault()};const q0=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),QY=0,Sq=5;function H3e(e,t){return Math.abs(t.x-e.x)>=Sq||Math.abs(t.y-e.y)>=Sq}const Nq={type:"IDLE"};function G3e({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:i=>{const{button:s,clientX:o,clientY:l}=i;if(s!==QY)return;const c={x:o,y:l},u=n();if(u.type==="DRAGGING"){i.preventDefault(),u.actions.move(c);return}u.type!=="PENDING"&&Fe();const d=u.point;if(!H3e(d,c))return;i.preventDefault();const f=u.actions.fluidLift(c);r({type:"DRAGGING",actions:f})}},{eventName:"mouseup",fn:i=>{const s=n();if(s.type!=="DRAGGING"){e();return}i.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:i=>{n().type==="DRAGGING"&&i.preventDefault(),e()}},{eventName:"keydown",fn:i=>{if(n().type==="PENDING"){e();return}if(i.keyCode===tC){i.preventDefault(),e();return}XY(i)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:i=>{const s=n();if(s.type==="IDLE"&&Fe(),s.actions.shouldRespectForcePress()){e();return}i.preventDefault()}},{eventName:q0,fn:e}]}function K3e(e){const t=T.useRef(Nq),n=T.useRef(Go),r=Bt(()=>({eventName:"mousedown",fn:function(f){if(f.defaultPrevented||f.button!==QY||f.ctrlKey||f.metaKey||f.shiftKey||f.altKey)return;const p=e.findClosestDraggableId(f);if(!p)return;const m=e.tryGetLock(p,o,{sourceEvent:f});if(!m)return;f.preventDefault();const x={x:f.clientX,y:f.clientY};n.current(),u(m,x)}}),[e]),i=Bt(()=>({eventName:"webkitmouseforcewillbegin",fn:d=>
1077{if(d.defaultPrevented)return;const f=e.findClosestDraggableId(d);if(!f)return;const p=e.findOptionsForDraggable(f);p&&(p.shouldRespectForcePress||e.canGetLock(f)&&d.preventDefault())}}),[e]),s=tt(function(){const f={passive:!1,capture:!0};n.current=is(window,[i,r],f)},[i,r]),o=tt(()=>{t.current.type!=="IDLE"&&(t.current=Nq,n.current(),s())},[s]),l=tt(()=>{const d=t.current;o(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[o]),c=tt(function(){const f={capture:!0,passive:!1},p=G3e({cancel:l,completed:o,getPhase:()=>t.current,setPhase:m=>{t.current=m}});n.current=is(window,p,f)},[l,o]),u=tt(function(f,p){t.current.type!=="IDLE"&&Fe(),t.current={type:"PENDING",point:p,actions:f},c()},[c]);Mi(function(){return s(),function(){n.current()}},[s])}function Y3e(){}const X3e={[$3e]:!0,[L3e]:!0,[F3e]:!0,[B3e]:!0};function Q3e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:i=>{if(i.keyCode===tC){i.preventDefault(),n();return}if(i.keyCode===YY){i.preventDefault(),r();return}if(i.keyCode===V3e){i.preventDefault(),e.moveDown();return}if(i.keyCode===z3e){i.preventDefault(),e.moveUp();return}if(i.keyCode===U3e){i.preventDefault(),e.moveRight();return}if(i.keyCode===q3e){i.preventDefault(),e.moveLeft();return}if(X3e[i.keyCode]){i.preventDefault();return}XY(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:q0,fn:n}]}function Z3e(e){const t=T.useRef(Y3e),n=Bt(()=>({eventName:"keydown",fn:function(s){if(s.defaultPrevented||s.keyCode!==YY)return;const o=e.findClosestDraggableId(s);if(!o)return;const l=e.tryGetLock(o,d,{sourceEvent:s});if(!l)return;s.preventDefault();let c=!0;const u=l.snapLift();t.current();function d(){c||Fe(),c=!1,t.current(),r()}t.current=is(window,Q3e(u,d),{capture:!0,passive:!1})}}),[e]),r=tt(function(){const s={passive:!1,capture:!0};t.current=is(window,[n],s)},[n]);Mi(function(){return r(),function(){t.current()}},[r])}const G_={type:"IDLE"},J3e=120,e$e=.15;function t$e({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===tC&&n.preventDefault(),e()}},{eventName:q0,fn:e}]}function n$e({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}i.hasMoved=!0;const{clientX:s,clientY:o}=r.touches[0],l={x:s,y:o};r.preventDefault(),i.actions.move(l)}},{eventName:"touchend",fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}r.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const i=n();i.type==="IDLE"&&Fe();const s=r.touches[0];if(!s||!(s.force>=e$e))return;const l=i.actions.shouldRespectForcePress();if(i.type==="PENDING"){l&&e();return}if(l){if(i.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:q0,fn:e}]}function r$e(e){const t=T.useRef(G_),n=T.useRef(Go),r=tt(function(){return t.current},[]),i=tt(function(m){t.current=m},[]),s=Bt(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;const x=e.findClosestDraggableId(m);if(!x)return;const y=e.tryGetLock(x,l,{sourceEvent:m});if(!y)return;const v=m.touches[0],{clientX:b,clientY:w}=v,N={x:b,y:w};n.current(),f(y,N)}}),[e]),o=tt(function(){const m={capture:!0,passive:!1};n.current=is(window,[s],m)},[s]),l=tt(()=>{const p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(G_),n.current(),o())},[o,i]),c=tt(()=>{const p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),u=tt(function(){const m={capture:!0,passive:!1},x={cancel:c,completed:l,getPhase:r},y=is(window,n$e(x),m),v=is(window,t$e(x),m);n.current=function(){y(),v()}},[c,r,l]),d=tt(function(){const m=r();m.type!=="PENDING"&&Fe();const x=m.actions.fluidLift(m.point);i({type:"DRAGGING",actions:x,hasMoved:!1})},[r,i]),f=tt(function(m,x){r().type!=="IDLE"&&Fe();const y=setTimeout(d,J3e);i({type:"PENDING",point:x,actions:m,longPressTimerId:y}),u()},[u,r,i,d]);Mi(function(){return o(),function(){n.current();
1077const x=r();x.type==="PENDING"&&(clearTimeout(x.longPressTimerId),i(G_))}},[r,o,i]),Mi(function(){return is(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const i$e=["input","button","textarea","select","option","optgroup","video","audio"];function ZY(e,t){if(t==null)return!1;if(i$e.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:ZY(e,t.parentElement)}function s$e(e,t){const n=t.target;return B0(n)?ZY(e,n):!1}var a$e=e=>ks(e.getBoundingClientRect()).center;function o$e(e){return e instanceof GY(e).Element}const l$e=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function JY(e,t){return e==null?null:e[l$e](t)?e:JY(e.parentElement,t)}function c$e(e,t){return e.closest?e.closest(t):JY(e,t)}function u$e(e){return`[${Od.contextId}="${e}"]`}function d$e(e,t){const n=t.target;if(!o$e(n))return null;const r=u$e(e),i=c$e(n,r);return!i||!B0(i)?null:i}function f$e(e,t){const n=d$e(e,t);return n?n.getAttribute(Od.draggableId):null}function h$e(e,t){const n=`[${Vk.contextId}="${e}"]`,i=HY(document,n).find(s=>s.getAttribute(Vk.id)===t);return!i||!B0(i)?null:i}function p$e(e){e.preventDefault()}function yy({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function eX({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const i=n.draggable.findById(r);return!(!i||!i.options.isEnabled||!zY(t.getState(),r))}function m$e({lockAPI:e,contextId:t,store:n,registry:r,draggableId:i,forceSensorStop:s,sourceEvent:o}){if(!eX({lockAPI:e,store:n,registry:r,draggableId:i}))return null;const c=r.draggable.getById(i),u=h$e(t,c.descriptor.id);if(!u||o&&!c.options.canDragInteractiveElements&&s$e(u,o))return null;const d=e.claim(s||Go);let f="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function m(){return e.isActive(d)}function x(_,E){yy({expected:_,phase:f,isLockActive:m,shouldWarn:!0})&&n.dispatch(E())}const y=x.bind(null,"DRAGGING");function v(_){function E(){e.release(),f="COMPLETED"}f!=="PRE_DRAG"&&(E(),Fe()),n.dispatch(cLe(_.liftActionArgs)),f="DRAGGING";function k(O,I={shouldBlockNextClick:!1}){if(_.cleanup(),I.shouldBlockNextClick){const A=is(window,[{eventName:"click",fn:p$e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(A)}E(),n.dispatch(IY({reason:O}))}return{isActive:()=>yy({expected:"DRAGGING",phase:f,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,drop:O=>k("DROP",O),cancel:O=>k("CANCEL",O),..._.actions}}function b(_){const E=Dp(O=>{y(()=>RY({client:O}))});return{...v({liftActionArgs:{id:i,clientSelection:_,movementMode:"FLUID"},cleanup:()=>E.cancel(),actions:{move:E}}),move:E}}function w(){const _={moveUp:()=>y(vLe),moveRight:()=>y(bLe),moveDown:()=>y(xLe),moveLeft:()=>y(wLe)};return v({liftActionArgs:{id:i,clientSelection:a$e(u),movementMode:"SNAP"},cleanup:Go,actions:_})}function N(){yy({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>yy({expected:"PRE_DRAG",phase:f,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:b,snapLift:w,abort:N}}const g$e=[K3e,Z3e,r$e];function y$e({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){const s=[...i?g$e:[],...r||[]],o=T.useState(()=>I3e())[0],l=tt(function(v,b){zp(v)&&!zp(b)&&o.tryAbandon()},[o]);Mi(function(){let v=t.getState();return t.subscribe(()=>{const w=t.getState();l(v,w),v=w})},[o,t,l]),Mi(()=>o.tryAbandon,[o.tryAbandon]);const c=tt(y=>eX({lockAPI:o,registry:n,store:t,draggableId:y}),[o,n,t]),u=tt((y,v,b)=>m$e({lockAPI:o,registry:n,contextId:e,store:t,draggableId:y,forceSensorStop:v||null,sourceEvent:b&&b.sourceEvent?b.sourceEvent:null}),[e,o,n,t]),d=tt(y=>f$e(e,y),[e]),f=tt(y=>{const v=n.draggable.findById(y);return v?v.options:null},[n.draggable]),p=tt(function(){o.isClaimed()&&(o.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(H2()))},[o,t]),m=tt(()=>o.isClaimed(),[o]),x=Bt(()=>({canGetLock:c,tryGetLock:u,findClosestDraggableId:d,findOptionsForDraggable:f,tryReleaseLock:p,isLockClaimed:m}),[c,u,d,f,p,m]);for(let y=0;y<s.length;y++)s[y](x)}const v$e=e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};_c.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),x$e=e=>({...qp,...e.autoScrollerOptions,durationDampening:{...qp.durationDampening,...e.autoScrollerOptions}});function uh(e){return e.current||Fe(),e.current}function b$e(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:i,dragHandleUsageInstructions:s}=e,o=T.useRef(null),l=KY(e),c=tt(()=>v$e(l.current),[l]),u=tt(()=>x$e(l.current),[l]),d=A3e(t),f=R3e({contextId:t,text:s}),p=S3e(t,i),m=tt(A=>{uh(o).dispatch(A)},[]),x=Bt(()=>YF({publishWhileDragging:dLe,updateDroppableScroll:hLe,updateDroppableIsEnabled:pLe,updateDroppableIsCombine
1077Enabled:mLe,collectionStarting:fLe},m),[m]),y=P3e(),v=Bt(()=>t3e(y,x),[y,x]),b=Bt(()=>v3e({scrollWindow:n3e,scrollDroppable:v.scrollDroppable,getAutoScrollerOptions:u,...YF({move:RY},m)}),[v.scrollDroppable,m,u]),w=_3e(t),N=Bt(()=>QLe({announce:d,autoScroller:b,dimensionMarshal:v,focusMarshal:w,getResponders:c,styleMarshal:p}),[d,b,v,w,c,p]);o.current=N;const S=tt(()=>{const A=uh(o);A.getState().phase!=="IDLE"&&A.dispatch(H2())},[]),_=tt(()=>{const A=uh(o).getState();return A.phase==="DROP_ANIMATING"?!0:A.phase==="IDLE"?!1:A.isDragging},[]),E=Bt(()=>({isDragging:_,tryAbort:S}),[_,S]);n(E);const k=tt(A=>zY(uh(o).getState(),A),[]),O=tt(()=>ql(uh(o).getState()),[]),I=Bt(()=>({marshal:v,focus:w,contextId:t,canLift:k,isMovementAllowed:O,dragHandleUsageInstructionsId:f,registry:y}),[t,v,f,w,k,O,y]);return y$e({contextId:t,store:N,registry:y,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),T.useEffect(()=>S,[S]),ee.createElement(F0.Provider,{value:I},ee.createElement(V4e,{context:J2,store:N},e.children))}function w$e(){return ee.useId()}function j$e(e){const t=w$e(),n=e.dragHandleUsageInstructions||Fy.dragHandleUsageInstructions;return ee.createElement(J4e,null,r=>ee.createElement(b$e,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const _q={dragging:5e3,dropAnimating:4500},S$e=(e,t)=>t?qh.drop(t.duration):e?qh.snap:qh.fluid,N$e=(e,t)=>{if(e)return t?Fp.opacity.drop:Fp.opacity.combining},_$e=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function E$e(e){const n=e.dimension.client,{offset:r,combineWith:i,dropping:s}=e,o=!!i,l=_$e(e),c=!!s,u=c?zk.drop(r,o):zk.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:S$e(l,s),transform:u,opacity:N$e(o,c),zIndex:c?_q.dropAnimating:_q.dragging,pointerEvents:"none"}}function P$e(e){return{transform:zk.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function k$e(e){return e.type==="DRAGGING"?E$e(e):P$e(e)}function O$e(e,t,n=dr){const r=window.getComputedStyle(t),i=t.getBoundingClientRect(),s=lY(i,r),o=mx(s,n),l={client:s,tagName:t.tagName.toLowerCase(),display:r.display},c={x:s.marginBox.width,y:s.marginBox.height};return{descriptor:e,placeholder:l,displaceBy:c,client:s,page:o}}function A$e(e){const t=eC("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:s,shouldRespectForcePress:o,isEnabled:l}=e,c=Bt(()=>({canDragInteractiveElements:s,shouldRespectForcePress:o,isEnabled:l}),[s,l,o]),u=tt(m=>{const x=i();return x||Fe(),O$e(n,x,m)},[n,i]),d=Bt(()=>({uniqueId:t,descriptor:n,options:c,getDimension:u}),[n,u,c,t]),f=T.useRef(d),p=T.useRef(!0);Mi(()=>(r.draggable.register(f.current),()=>r.draggable.unregister(f.current)),[r.draggable]),Mi(()=>{if(p.current){p.current=!1;return}const m=f.current;f.current=d,r.draggable.update(d,m)},[d,r.draggable])}var nC=ee.createContext(null);function bx(e){const t=T.useContext(e);return t||Fe(),t}function C$e(e){e.preventDefault()}const T$e=e=>{const t=T.useRef(null),n=tt((E=null)=>{t.current=E},[]),r=tt(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:s,registry:o}=bx(F0),{type:l,droppableId:c}=bx(nC),u=Bt(()=>({id:e.draggableId,index:e.index,type:l,droppableId:c}),[e.draggableId,e.index,l,c]),{children:d,draggableId:f,isEnabled:p,shouldRespectForcePress:m,canDragInteractiveElements:x,isClone:y,mapped:v,dropAnimationFinished:b}=e;if(!y){const E=Bt(()=>({descriptor:u,registry:o,getDraggableRef:r,canDragInteractiveElements:x,shouldRespectForcePress:m,isEnabled:p}),[u,o,r,x,m,p]);A$e(E)}const w=Bt(()=>p?{tabIndex:0,role:"button","aria-describedby":s,"data-rfd-drag-handle-draggable-id":f,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:C$e}:null,[i,s,f,p]),N=tt(E=>{v.type==="DRAGGING"&&v.dropping&&E.propertyName==="transform"&&_c.flushSync(b)},[b,v]),S=Bt(()=>{const E=k$e(v),k=v.type==="DRAGGING"&&v.dropping?N:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":f,style:E,onTransitionEnd:k},dragHandleProps:w}},[i,w,f,v,N,n]),_=Bt(()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}),[u.droppableId,u.id,u.index,u.type]);return ee.createElement(ee.Fragment,null,d(S,v.snapshot,_))};var tX=(e,t)=>e===t,nX=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const R$e=e=>e.combine?e.combine.draggableId:null,I$e=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function M$e(){const e=cr((i,s)=>({x:i,y:s})),t=cr((i,s,o=null,l=null,c=null)=>({isDragging:!0,isClone:s,isDropAnimating:!!c,dropAnimation:c,mode:i,draggingOver:o,combineWith:l,combineTargetFor:null})),n=cr((i,s,o,l,c=null,u=null,d=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:c,combineWith:u,mode:s,offset:i,dimension:o,forceShouldAnimate:d,snapshot:t(s,l,c,u,null)}}));return(i,s)=>{if(zp(i)){if(i.critical.draggable.id!==s.draggableId)return null;const o=i.current.client.offset,l=i.dimensions.draggables[s.draggableId],c=Ii(i.impact),u=I$e(i.impact),d=i.forceShouldAnimate;return n(e(o.x,o.y),i.movementMode,l,s.isClone,c,u,d)}if(i.phase==="DROP_ANIMATING"){const o=i.completed;if(o.result.draggableId!==s.draggableId)return null;const l=s.isClone,c=i.dimensions.draggables[s.draggableId],u=o.result,d=u.mode,f=nX(u),p=R$e(u),x={duration:i.dropDuration,curve:K2.drop,moveTo:i.newHomeClientOffset,opacity:p?Fp.opacity.drop:null,
1077scale:p?Fp.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:c,dropping:x,draggingOver:f,combineWith:p,mode:d,forceShouldAnimate:null,snapshot:t(d,l,f,p,x)}}}return null}}function rX(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const D$e={mapped:{type:"SECONDARY",offset:dr,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:rX(null)}};function L$e(){const e=cr((o,l)=>({x:o,y:l})),t=cr(rX),n=cr((o,l=null,c)=>({mapped:{type:"SECONDARY",offset:o,combineTargetFor:l,shouldAnimateDisplacement:c,snapshot:t(l)}})),r=o=>o?n(dr,o,!0):null,i=(o,l,c,u)=>{const d=c.displaced.visible[o],f=!!(u.inVirtualList&&u.effected[o]),p=D0(c),m=p&&p.draggableId===o?l:null;if(!d){if(!f)return r(m);if(c.displaced.invisible[o])return null;const v=Jd(u.displacedBy.point),b=e(v.x,v.y);return n(b,m,!0)}if(f)return r(m);const x=c.displacedBy.point,y=e(x.x,x.y);return n(y,m,d.shouldAnimate)};return(o,l)=>{if(zp(o))return o.critical.draggable.id===l.draggableId?null:i(l.draggableId,o.critical.draggable.id,o.impact,o.afterCritical);if(o.phase==="DROP_ANIMATING"){const c=o.completed;return c.result.draggableId===l.draggableId?null:i(l.draggableId,c.result.draggableId,c.impact,c.afterCritical)}return null}}const $$e=()=>{const e=M$e(),t=L$e();return(r,i)=>e(r,i)||t(r,i)||D$e},B$e={dropAnimationFinished:MY},F$e=aY($$e,B$e,null,{context:J2,areStatePropsEqual:tX})(T$e);function iX(e){return bx(nC).isUsingCloneFor===e.draggableId&&!e.isClone?null:ee.createElement(F$e,e)}function q$e(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return ee.createElement(iX,Iv({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const sX=e=>t=>e===t,z$e=sX("scroll"),U$e=sX("auto"),Eq=(e,t)=>t(e.overflowX)||t(e.overflowY),V$e=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return Eq(n,z$e)||Eq(n,U$e)},W$e=()=>!1,aX=e=>e==null?null:e===document.body?W$e()?e:null:e===document.documentElement?null:V$e(e)?e:aX(e.parentElement);var Wk=e=>({x:e.scrollLeft,y:e.scrollTop});const oX=e=>e?window.getComputedStyle(e).position==="fixed"?!0:oX(e.parentElement):!1;var H$e=e=>{const t=aX(e),n=oX(e);return{closestScrollable:t,isFixedOnPage:n}},G$e=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:i,client:s,page:o,closest:l})=>{const c=(()=>{if(!l)return null;const{scrollSize:p,client:m}=l,x=BY({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:m,scrollSize:p,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:x,diff:{value:dr,displacement:dr}}}})(),u=i==="vertical"?q2:vY,d=Pd({page:o,withPlaceholder:null,axis:u,frame:c});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:u,isEnabled:t,client:s,page:o,frame:c,subject:d}};const K$e=(e,t)=>{const n=cY(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,s=r+t.scrollHeight,o=i+t.scrollWidth,c=L2({top:r,right:o,bottom:s,left:i},n.border);return $2({borderBox:c,margin:n.margin,border:n.border,padding:n.padding})};var Y$e=({ref:e,descriptor:t,env:n,windowScroll:r,direction:i,isDropDisabled:s,isCombineEnabled:o,shouldClipSubject:l})=>{const c=n.closestScrollable,u=K$e(e,c),d=mx(u,r),f=(()=>{if(!c)return null;const m=cY(c),x={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:m,page:mx(m,r),scroll:Wk(c),scrollSize:x,shouldClipSubject:l}})();return G$e({descriptor:t,isEnabled:!s,isCombineEnabled:o,isFixedOnPage:n.isFixedOnPage,direction:i,client:u,page:d,closest:f})};const X$e={passive:!1},Q$e={passive:!0};var Pq=e=>e.shouldPublishImmediately?X$e:Q$e;const vy=e=>e&&e.env.closestScrollable||null;function Z$e(e){const t=T.useRef(null),n=bx(F0),r=eC("droppable"),{registry:i,marshal:s}=n,o=KY(e),l=Bt(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=T.useRef(l),u=Bt(()=>cr((S,_)=>{t.current||Fe();const E={x:S,y:_};s.updateDroppableScroll(l.id,E)}),[l.id,s]),d=tt(()=>{const S=t.current;return!S||!S.env.closestScrollable?dr:Wk(S.env.closestScrollable)},[]),f=tt(()=>{const S=d();u(S.x,S.y)},[d,u]),p=Bt(()=>Dp(f),[f]),m=tt(()=>{const S=t.current,_=vy(S);if(S&&_||Fe(),S.scrollOptions.shouldPublishImmediately){f();return}p()},[p,f]),x=tt((S,_)=>{t.current&&Fe();const E=o.current,k=E.getDroppableRef();k||Fe();const O=H$e(k),I={ref:k,descriptor:l,env:O,scrollOptions:_};t.current=I;const A=Y$e({ref:k,descriptor:l,env:O,windowScroll:S,direction:E.direction,isDropDisabled:E.isDropDisabled,isCombine
1077Enabled:E.isCombineEnabled,shouldClipSubject:!E.ignoreContainerClipping}),C=O.closestScrollable;return C&&(C.setAttribute(wq.contextId,n.contextId),C.addEventListener("scroll",m,Pq(I.scrollOptions))),A},[n.contextId,l,m,o]),y=tt(()=>{const S=t.current,_=vy(S);return S&&_||Fe(),Wk(_)},[]),v=tt(()=>{const S=t.current;S||Fe();const _=vy(S);t.current=null,_&&(p.cancel(),_.removeAttribute(wq.contextId),_.removeEventListener("scroll",m,Pq(S.scrollOptions)))},[m,p]),b=tt(S=>{const _=t.current;_||Fe();const E=vy(_);E||Fe(),E.scrollTop+=S.y,E.scrollLeft+=S.x},[]),w=Bt(()=>({getDimensionAndWatchScroll:x,getScrollWhileDragging:y,dragStopped:v,scroll:b}),[v,x,y,b]),N=Bt(()=>({uniqueId:r,descriptor:l,callbacks:w}),[w,l,r]);Mi(()=>(c.current=N.descriptor,i.droppable.register(N),()=>{t.current&&v(),i.droppable.unregister(N)}),[w,l,v,N,s,i.droppable]),Mi(()=>{t.current&&s.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),Mi(()=>{t.current&&s.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function K_(){}const kq={width:0,height:0,margin:s5e},J$e=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?kq:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},e6e=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=J$e({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?qh.placeholder:null}},t6e=e=>{const t=T.useRef(null),n=tt(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:i,onClose:s,contextId:o}=e,[l,c]=T.useState(e.animate==="open");T.useEffect(()=>l?r!=="open"?(n(),c(!1),K_):t.current?K_:(t.current=setTimeout(()=>{t.current=null,c(!1)}),n):K_,[r,l,n]);const u=tt(f=>{f.propertyName==="height"&&(i(),r==="close"&&s())},[r,s,i]),d=e6e({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return ee.createElement(e.placeholder.tagName,{style:d,"data-rfd-placeholder-context-id":o,onTransitionEnd:u,ref:e.innerRef})};var n6e=ee.memo(t6e);class r6e extends ee.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const i6e=e=>{const t=T.useContext(F0);t||Fe();const{contextId:n,isMovementAllowed:r}=t,i=T.useRef(null),s=T.useRef(null),{children:o,droppableId:l,type:c,mode:u,direction:d,ignoreContainerClipping:f,isDropDisabled:p,isCombineEnabled:m,snapshot:x,useClone:y,updateViewportMaxScroll:v,getContainerForClone:b}=e,w=tt(()=>i.current,[]),N=tt((C=null)=>{i.current=C},[]);tt(()=>s.current,[]);const S=tt((C=null)=>{s.current=C},[]),_=tt(()=>{r()&&v({maxScroll:qY()})},[r,v]);Z$e({droppableId:l,type:c,mode:u,direction:d,isDropDisabled:p,isCombineEnabled:m,ignoreContainerClipping:f,getDroppableRef:w});const E=Bt(()=>ee.createElement(r6e,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:C,data:R,animate:D})=>ee.createElement(n6e,{placeholder:R,onClose:C,innerRef:S,animate:D,contextId:n,onTransitionEnd:_})),[n,_,e.placeholder,e.shouldAnimatePlaceholder,S]),k=Bt(()=>({innerRef:N,placeholder:E,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":n}}),[n,l,E,N]),O=y?y.dragging.draggableId:null,I=Bt(()=>({droppableId:l,type:c,isUsingCloneFor:O}),[l,O,c]);function A(){if(!y)return null;const{dragging:C,render:R}=y,D=ee.createElement(iX,{draggableId:C.draggableId,index:C.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(q,F)=>R(q,F,C));return z8.createPortal(D,b())}return ee.createElement(nC.Provider,{value:I},o(k,x),A())};function s6e(){return document.body||Fe(),document.body}const Oq={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombine
1077Enabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:s6e},lX=e=>{let t={...e},n;for(n in Oq)e[n]===void 0&&(t={...t,[n]:Oq[n]});return t},Y_=(e,t)=>e===t.droppable.type,Aq=(e,t)=>t.draggables[e.draggable.id],a6e=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=cr(s=>({draggableId:s.id,type:s.type,source:{index:s.index,droppableId:s.droppableId}})),r=cr((s,o,l,c,u,d)=>{const f=u.descriptor.id;if(u.descriptor.droppableId===s){const x=d?{render:d,dragging:n(u.descriptor)}:null,y={isDraggingOver:l,draggingOverWith:l?f:null,draggingFromThisWith:f,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:y,useClone:x}}if(!o)return t;if(!c)return e;const m={isDraggingOver:l,draggingOverWith:f,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(s,o)=>{const l=lX(o),c=l.droppableId,u=l.type,d=!l.isDropDisabled,f=l.renderClone;if(zp(s)){const p=s.critical;if(!Y_(u,p))return t;const m=Aq(p,s.dimensions),x=Ii(s.impact)===c;return r(c,d,x,x,m,f)}if(s.phase==="DROP_ANIMATING"){const p=s.completed;if(!Y_(u,p.critical))return t;const m=Aq(p.critical,s.dimensions);return r(c,d,nX(p.result)===c,Ii(p.impact)===c,m,f)}if(s.phase==="IDLE"&&s.completed&&!s.shouldFlush){const p=s.completed;if(!Y_(u,p.critical))return t;const m=Ii(p.impact)===c,x=!!(p.impact.at&&p.impact.at.type==="COMBINE"),y=p.critical.droppable.id===c;return m?x?e:t:y?e:t}return t}},o6e={updateViewportMaxScroll:yLe},l6e=aY(a6e,o6e,(e,t,n)=>({...lX(n),...e,...t}),{context:J2,areStatePropsEqual:tX})(i6e);var c6e=l6e;const Cq=[{id:"draft",label:"Drafts",color:"bg-slate-100 border-slate-300",badgeClass:"bg-slate-100 text-slate-700"},{id:"pending_review",label:"In Review",color:"bg-amber-50 border-amber-300",badgeClass:"bg-amber-100 text-amber-700"},{id:"scheduled",label:"Scheduled",color:"bg-blue-50 border-blue-300",badgeClass:"bg-blue-100 text-blue-700"},{id:"published",label:"Published",color:"bg-emerald-50 border-emerald-300",badgeClass:"bg-emerald-100 text-emerald-700"}];function u6e({post:e,index:t,onClick:n}){return a.jsx(q$e,{draggableId:e.id,index:t,children:(r,i)=>a.jsx("div",{ref:r.innerRef,...r.draggableProps,className:`bg-white rounded-xl border border-slate-200 p-3 mb-2 cursor-pointer hover:shadow-md transition-all ${i.isDragging?"shadow-xl rotate-1 opacity-90":""}`,onClick:()=>n(e),children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("div",{...r.dragHandleProps,className:"mt-0.5 text-slate-300 hover:text-slate-500",children:a.jsx(pJ,{className:"w-4 h-4"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800 line-clamp-2",children:e.title}),e.scheduled_date&&a.jsxs("p",{className:"text-xs text-slate-400 mt-1 flex items-center gap-1",children:[a.jsx(Yr,{className:"w-3 h-3"}),Jt(A2e(e.scheduled_date),"MMM d")]}),e.reading_time&&a.jsxs("p",{className:"text-xs text-slate-400 flex items-center gap-1",children:[a.jsx(Rn,{className:"w-3 h-3"}),e.reading_time,"m read"]})]})]})})})}function d6e({post:e,onClose:t,onSave:n}){const[r,i]=T.useState({title:e.title||"",excerpt:e.excerpt||"",status:e.status||"draft",scheduled_date:e.scheduled_date?e.scheduled_date.slice(0,16):""}),[s,o]=T.useState(!1),[l,c]=T.useState(null),u=async()=>{o(!0);try{const d=await ce.integrations.Core.InvokeLLM({prompt:`A blog post has the following details: 1078Title: "${e.title}" 1079Current Status: ${e.status} 1080Category: ${e.category||"N/A"} 1081Reading Time: ${e.reading_time||"unknown"} minutes 1082Created: ${e.created_date} 1083${e.seo_score?`SEO Score: ${e.seo_score}/100`:""} 1084 1085Based on these metrics, what status should this post be in? Choose from: draft, pending_review, scheduled, published. 1086Also give a short reason (1 sentence) and a recommended action.`,response_json_schema:{type:"object",properties:{recommended_status:{type:"string"},reason:{type:"string"},action:{type:"string"}}}});c(d)}catch{we.error("AI suggestion failed")}finally{o(!1)}};return a.jsx(UK,{open:!0,onOpenChange:t,children:a.jsxs(T2,{className:"max-w-lg",children:[a.jsx(R2,{children:a.jsx(I2,{children:"Qu
1086ick Edit Post"})}),a.jsxs("div",{className:"space-y-4 py-2",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1 block",children:"Title"}),a.jsx(Ye,{value:r.title,onChange:d=>i({...r,title:d.target.value})})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1 block",children:"Excerpt"}),a.jsx(dn,{value:r.excerpt,onChange:d=>i({...r,excerpt:d.target.value}),rows:3})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1 block",children:"Status"}),a.jsxs(Mn,{value:r.status,onValueChange:d=>i({...r,status:d}),children:[a.jsx(En,{children:a.jsx(Dn,{})}),a.jsxs(Pn,{children:[a.jsx(it,{value:"draft",children:"Draft"}),a.jsx(it,{value:"pending_review",children:"Pending Review"}),a.jsx(it,{value:"scheduled",children:"Scheduled"}),a.jsx(it,{value:"published",children:"Published"})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1 block",children:"Scheduled Date"}),a.jsx(Ye,{type:"datetime-local",value:r.scheduled_date,onChange:d=>i({...r,scheduled_date:d.target.value})})]})]}),a.jsxs("div",{className:"border border-indigo-200 rounded-xl p-3 bg-indigo-50",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("p",{className:"text-sm font-medium text-indigo-700 flex items-center gap-1.5",children:[a.jsx(Tr,{className:"w-4 h-4"})," AI Status Suggestion"]}),a.jsx(ae,{size:"sm",variant:"outline",onClick:u,disabled:s,className:"h-7 text-xs",children:s?a.jsx(lt,{className:"w-3 h-3 animate-spin"}):"Analyze"})]}),l&&a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(Se,{className:"bg-indigo-100 text-indigo-700",children:["â ",l.recommended_status]}),a.jsx(ae,{size:"sm",variant:"ghost",className:"h-6 text-xs text-indigo-600",onClick:()=>i({...r,status:l.recommended_status}),children:"Apply"})]}),a.jsx("p",{className:"text-xs text-indigo-700",children:l.reason}),a.jsxs("p",{className:"text-xs text-indigo-600 font-medium",children:["ð¡ ",l.action]})]}),!l&&!s&&a.jsx("p",{className:"text-xs text-indigo-500",children:'Click "Analyze" to get AI recommendations based on post metrics.'})]}),a.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[a.jsx(ae,{variant:"outline",onClick:t,children:"Cancel"}),a.jsx(ae,{onClick:()=>n(e.id,r),children:"Save Changes"})]})]})]})})}function f6e(){const[e,t]=T.useState(null),n=Ln(),{data:r=[],isLoading:i}=st({queryKey:["all-posts-calendar"],queryFn:()=>ce.entities.BlogPost.list("-updated_date",200)}),s=wr({mutationFn:({id:u,data:d})=>ce.entities.BlogPost.update(u,d),onSuccess:()=>{n.invalidateQueries({queryKey:["all-posts-calendar"]}),we.success("Post updated")}}),o=Cq.reduce((u,d)=>(u[d.id]=r.filter(f=>f.status===d.id),u),{}),l=u=>{if(!u.destination)return;const d=u.destination.droppableId,f=u.draggableId,p=r.find(m=>m.id===f);p&&p.status!==d&&s.mutate({id:f,data:{status:d}})},c=(u,d)=>{s.mutate({id:u,data:d}),t(null)};return a.jsxs("div",{className:"max-w-full space-y-6",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Content Calendar"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Drag posts between columns to change their status"})]}),a.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[a.jsx(Qn,{className:"w-4 h-4"}),r.length," total posts"]})]}),i?a.jsx("div",{className:"grid grid-cols-4 gap-4",children:[...Array(4)].map((u,d)=>a.jsx(Dt,{className:"h-96"},d))}):a.jsx(j$e,{onDragEnd:l,children:a.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4",children:Cq.map(u=>{var d;return a.jsxs("div",{className:`rounded-2xl border-2 ${u.color} p-4`,children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"font-semibold text-slate-800",children:u.label}),a.jsx(Se,{className:`${u.badgeClass} border-0 text-xs`,children:((d=o[u.id])==null?void 0:d.length)||0})]}),a.jsx(c6e,{droppableId:u.id,children:(f,p)=>{var m,x;return a.jsxs("div",{ref:f.innerRef,...f.droppableProps,className:`min-h-32 transition-colors rounded-xl ${p.isDraggingOver?"bg-white/60":""}`,children:[(m=o[u.id])==null?void 0:m.map((y,v)=>a.jsx(u6e,{post:y,index:v,onClick:t},y.id)),f.placeholder,((x=o[u.id])==null?void 0:x.length)===0&&a.jsx("p",{className:"text-center text-xs text-slate-400 py-8",children:"Drop posts here"})]})}})]},u.id)})})}),e&&a.jsx(d6e,{post:e,onClose:()=>t(null),onSave:c}
1086)]})}function xy({text:e}){const t=()=>{navigator.clipboard.writeText(e),we.success("Copied!")};return a.jsx("button",{onClick:t,className:"opacity-0 group-hover:opacity-100 transition-opacity text-slate-400 hover:text-slate-700",children:a.jsx(or,{className:"w-3.5 h-3.5"})})}function h6e(){var c,u,d,f,p,m,x;const[e,t]=T.useState(""),[n,r]=T.useState(!1),[i,s]=T.useState(null),o=async()=>{if(e.trim()){r(!0),s(null);try{const y=await ce.integrations.Core.InvokeLLM({prompt:`You are an expert SEO analyst. Analyze the keyword: "${e}" 1087 1088Based on your knowledge of top-performing content for this keyword, provide a comprehensive SEO research report including: 1089 10901. Keyword analysis (search intent, difficulty estimate, content type) 10912. 10 related long-tail keywords (each with estimated monthly search volume tier: high/medium/low and intent type) 10923. 5 optimized meta descriptions (150-160 chars each, include the keyword naturally) 10934. 6 optimized H1/H2 heading suggestions (varied angles: how-to, listicle, question, comparison) 10945. Content brief: recommended word count, key sections to include, FAQs to answer 10956. 5 competitor content angles to beat (unique angles not commonly covered)`,add_context_from_internet:!0,model:"gemini_3_pro",response_json_schema:{type:"object",properties:{keyword_analysis:{type:"object",properties:{search_intent:{type:"string"},difficulty:{type:"string"},content_type:{type:"string"},summary:{type:"string"}}},long_tail_keywords:{type:"array",items:{type:"object",properties:{keyword:{type:"string"},volume_tier:{type:"string"},intent:{type:"string"}}}},meta_descriptions:{type:"array",items:{type:"string"}},headings:{type:"array",items:{type:"object",properties:{text:{type:"string"},type:{type:"string"},angle:{type:"string"}}}},content_brief:{type:"object",properties:{word_count:{type:"string"},key_sections:{type:"array",items:{type:"string"}},faqs:{type:"array",items:{type:"string"}}}},competitor_angles:{type:"array",items:{type:"string"}}}}});s(y)}catch(y){we.error("Analysis failed"),console.error(y)}finally{r(!1)}}},l=y=>y==="high"?"bg-emerald-100 text-emerald-700":y==="medium"?"bg-amber-100 text-amber-700":"bg-slate-100 text-slate-600";return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"SEO Research"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"AI-powered keyword analysis, long-tail suggestions & content briefs"})]}),a.jsx(de,{children:a.jsxs(he,{className:"pt-6",children:[a.jsxs("div",{className:"flex gap-3",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(lr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),a.jsx(Ye,{placeholder:"Enter a target keyword (e.g. 'best AI tools for developers')",className:"pl-10 h-11",value:e,onChange:y=>t(y.target.value),onKeyDown:y=>y.key==="Enter"&&o()})]}),a.jsx(ae,{onClick:o,disabled:n||!e.trim(),className:"h-11 px-6 bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700",children:n?a.jsx(lt,{className:"w-4 h-4 animate-spin"}):a.jsxs(a.Fragment,{children:[a.jsx(Tr,{className:"w-4 h-4 mr-2"}),"Analyze"]})})]}),n&&a.jsxs("p",{className:"text-xs text-slate-500 mt-3 flex items-center gap-1.5",children:[a.jsx(lt,{className:"w-3 h-3 animate-spin"})," Searching the web and analyzing top results⦠this may take ~15 seconds"]})]})}),n&&a.jsxs("div",{className:"space-y-4",children:[a.jsx(Dt,{className:"h-28"}),a.jsx(Dt,{className:"h-64"})]}),a.jsx(hi,{children:i&&!n&&a.jsxs(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-6",children:[a.jsx(de,{className:"border-indigo-200 bg-indigo-50/40",children:a.jsx(he,{className:"pt-6",children:a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-indigo-100 flex items-center justify-center shrink-0",children:a.jsx(dc,{className:"w-5 h-5 text-indigo-600"})}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[a.jsxs("h2",{className:"font-bold text-lg text-slate-900",children:['"',e,'"']}),a.jsx(Se,{className:"bg-indigo-100 text-indigo-700",children:(c=i.keyword_analysis)==null?void 0:c.search_intent}),a.jsxs(Se,{variant:"outline",children:[(u=i.keyword_analysis)==null?void 0:u.difficulty," difficulty"]}),a.jsx(Se,{variant:"outline",children:(d=i.keyword_analysis)==null?void 0:d.content_type})]}),a.jsx("p",{className:"text-sm text-slate-600",children:(f=i.keyword_analysis)==null?void 0:f.summary})]})]})})}),a.jsxs(ur,{defaultValue:"longtail",children:[a.jsxs(Jn,{className:"grid grid-cols-4 w-full",children:[a.jsxs(et,{value:"longtail",className:"text-xs gap-1",children:[a.jsx(t8,{className:"w-3.5 h-3.5"}),"Long-Tail"]}),a.jsxs(et,{value:"meta",className:"text-xs gap-1",children:[a.jsx(os,{className:"w-3.5 h-3.5"}),"Meta"]}),a.jsxs(et,{value:"headings",className:"text-xs gap-1",children:[a.jsx(Xr,{className:"w-3.5 h-3.5"}),"Headings"]}),a.jsxs(et,{value:"brief",className:"text-xs gap-1",children:[a.jsx(dc,{className:"w-3.5 h-3.5"}),"Brief"]})]}),a.jsx(ht,{value:"longtail",className:"mt-4",children:a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsx(Ie,{className:"text-base",children:"Related Long-Tail Keywords"}),a.jsx(mn,{children:"Sorted by search volume tier. Click any keyword to start a new anal
1095ysis."})]}),a.jsx(he,{children:a.jsx("div",{className:"grid sm:grid-cols-2 gap-2",children:(i.long_tail_keywords||[]).map((y,v)=>a.jsxs("div",{className:"group flex items-center justify-between p-3 bg-slate-50 rounded-lg hover:bg-slate-100 transition-colors cursor-pointer",onClick:()=>{t(y.keyword)},children:[a.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[a.jsx(Yk,{className:"w-4 h-4 text-slate-400 shrink-0"}),a.jsx("span",{className:"text-sm text-slate-800 truncate",children:y.keyword})]}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0 ml-2",children:[a.jsx(Se,{className:`${l(y.volume_tier)} text-xs`,children:y.volume_tier}),a.jsx(Se,{variant:"outline",className:"text-xs",children:y.intent})]})]},v))})})]})}),a.jsx(ht,{value:"meta",className:"mt-4",children:a.jsxs(de,{children:[a.jsxs(Re,{children:[a.jsx(Ie,{className:"text-base",children:"Optimized Meta Descriptions"}),a.jsx(mn,{children:"All under 160 characters with keyword naturally included."})]}),a.jsx(he,{className:"space-y-3",children:(i.meta_descriptions||[]).map((y,v)=>a.jsxs("div",{className:"group flex items-start gap-3 p-3 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsx("span",{className:"w-6 h-6 rounded-full bg-indigo-100 text-indigo-700 text-xs flex items-center justify-center font-bold shrink-0 mt-0.5",children:v+1}),a.jsx("p",{className:"text-sm text-slate-700 flex-1",children:y}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsx("span",{className:`text-xs ${y.length>160?"text-rose-500":"text-slate-400"}`,children:y.length}),a.jsx(xy,{text:y})]})]},v))})]})}),a.jsx(ht,{value:"headings",className:"mt-4",children:a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Heading Suggestions"})}),a.jsx(he,{className:"space-y-2",children:(i.headings||[]).map((y,v)=>a.jsxs("div",{className:"group flex items-center gap-3 p-3 bg-slate-50 rounded-lg hover:bg-white border border-transparent hover:border-slate-200 transition-all",children:[a.jsx(Se,{variant:"outline",className:"text-xs shrink-0",children:y.type}),a.jsx("p",{className:"text-sm font-medium text-slate-800 flex-1",children:y.text}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsx("span",{className:"text-xs text-slate-400 italic",children:y.angle}),a.jsx(xy,{text:y.text})]})]},v))})]})}),a.jsxs(ht,{value:"brief",className:"mt-4 space-y-4",children:[a.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-sm",children:"ð Key Sections to Include"})}),a.jsx(he,{children:a.jsx("ul",{className:"space-y-1.5",children:(((p=i.content_brief)==null?void 0:p.key_sections)||[]).map((y,v)=>a.jsxs("li",{className:"text-sm text-slate-700 flex items-start gap-2",children:[a.jsx("span",{className:"w-4 h-4 rounded-full bg-indigo-100 text-indigo-700 text-xs flex items-center justify-center font-bold shrink-0 mt-0.5",children:v+1}),y]},v))})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-sm",children:"â FAQs to Answer"})}),a.jsx(he,{children:a.jsx("ul",{className:"space-y-2",children:(((m=i.content_brief)==null?void 0:m.faqs)||[]).map((y,v)=>a.jsxs("li",{className:"group text-sm text-slate-700 flex items-start gap-2 p-2 bg-slate-50 rounded-lg",children:[a.jsx("span",{className:"text-slate-400 shrink-0",children:"Q:"}),a.jsx("span",{className:"flex-1",children:y}),a.jsx(xy,{text:y})]},v))})})]})]}),a.jsx(de,{children:a.jsx(Re,{children:a.jsxs(Ie,{className:"text-sm",children:["ð¯ Recommended Word Count: ",(x=i.content_brief)==null?void 0:x.word_count]})})}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-sm",children:"ð Unique Angles to Beat Competitors"})}),a.jsx(he,{className:"space-y-2",children:(i.competitor_angles||[]).map((y,v)=>a.jsxs("div",{className:"group flex items-start gap-2 p-2 bg-slate-50 rounded-lg",children:[a.jsxs("span",{className:"text-indigo-500 font-bold text-sm shrink-0",children:["#",v+1]}),a.jsx("p",{className:"text-sm text-slate-700 flex-1",children:y}),a.jsx(xy,{text:y})]},v))})]})]})]})]})})]})}function p6e(){const[e,t]=T.useState(!1),[n,r]=T.useState(!1),[i,s]=T.useState(null),[o,l]=T.useState(""),[c,u]=T.useState(null),[d,f]=T.useState(!1),[p,m]=T.useState(5);T.useEffect(()=>{ce.auth.me().then(u).catch(()=>{})},[]);const{data:x=[],isLoading:y}=st({queryKey:["published-posts-newsletter"],queryFn:()=>ce.entities.BlogPost.filter({status:"published"},"-published_date",10)}),v=x.slice(0,p),b=async()=>
1095{if(!v.length){we.error("No published posts found");return}t(!0);try{const N=v.map((_,E)=>{var k;return`${E+1}. TITLE: ${_.title} 1096 EXCERPT: ${_.excerpt||((k=_.content)==null?void 0:k.slice(0,200))} 1097 CATEGORY: ${_.category||"General"} 1098 URL PATH: /BlogPost?slug=${_.slug}`}).join(` 1099 1100`),S=await ce.integrations.Core.InvokeLLM({prompt:`You are an expert email newsletter writer. Create a beautifully formatted HTML email newsletter featuring these ${v.length} blog posts. 1101 1102POSTS TO INCLUDE: 1103${N} 1104 1105Requirements: 1106- Create a compelling subject line 1107- Write engaging intro paragraph (2-3 sentences, warm and personal) 1108- For each post: write a 2-3 sentence teaser that makes readers want to click 1109- Include a "Read More" call to action for each 1110- Write a short closing/sign-off paragraph 1111- Use inline CSS for email-safe styling (max-width 600px, clean modern design, indigo/purple brand colors) 1112- The HTML should be a COMPLETE email body (no <html>/<head>, just <body> content with inline styles) 1113- Make it mobile responsive using max-width and percentage widths 1114- Brand name: TechBlog AI`,response_json_schema:{type:"object",properties:{subject:{type:"string"},preview_text:{type:"string"},html_body:{type:"string"},plain_text:{type:"string"}}}});s(S),l(S.subject||""),we.success("Newsletter draft generated!")}catch(N){we.error("Generation failed"),console.error(N)}finally{t(!1)}},w=async()=>{if(!(c!=null&&c.email)){we.error("Could not get your email");return}if(!(i!=null&&i.html_body)){we.error("Generate a draft first");return}r(!0);try{await ce.integrations.Core.SendEmail({to:c.email,subject:o||i.subject,body:i.html_body,from_name:"TechBlog AI Newsletter"}),f(!0),we.success(`Test email sent to ${c.email}!`),setTimeout(()=>f(!1),4e3)}catch{we.error("Failed to send test email")}finally{r(!1)}};return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsx("h1",{className:"text-2xl lg:text-3xl font-bold text-slate-900",children:"Newsletter Builder"}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Convert your latest posts into a formatted email newsletter"})]}),a.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"space-y-4",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Configure"})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1 block",children:"Posts to include"}),a.jsxs("select",{value:p,onChange:N=>m(Number(N.target.value)),className:"w-full h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm",children:[a.jsx("option",{value:3,children:"Latest 3 posts"}),a.jsx("option",{value:5,children:"Latest 5 posts"}),a.jsx("option",{value:7,children:"Latest 7 posts"}),a.jsx("option",{value:10,children:"Latest 10 posts"})]})]}),a.jsx(ae,{className:"w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700",onClick:b,disabled:e||y,children:e?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 mr-2 animate-spin"}),"Generatingâ¦"]}):a.jsxs(a.Fragment,{children:[a.jsx(Tr,{className:"w-4 h-4 mr-2"}),"Generate Draft"]})}),i&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"border-t border-slate-100 pt-4 space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1 block",children:"Subject Line"}),a.jsx(Ye,{value:o,onChange:N=>l(N.target.value),className:"text-sm"})]}),i.preview_text&&a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-slate-700 mb-1 block",children:"Preview Text"}),a.jsx("p",{className:"text-xs text-slate-500 bg-slate-50 rounded p-2",children:i.preview_text})]})]}),a.jsx(ae,{variant:"outline",className:"w-full gap-2",onClick:w,disabled:n,children:d?a.jsxs(a.Fragment,{children:[a.jsx(Nh,{className:"w-4 h-4 text-emerald-600"}),"Sent!"]}):n?a.jsxs(a.Fragment,{children:[a.jsx(lt,{className:"w-4 h-4 animate-spin"}),"Sendingâ¦"]}):a.jsxs(a.Fragment,{children:[a.jsx(ci,{className:"w-4 h-4"}),"Send Test to Me"]})}),(c==null?void 0:c.email)&&a.jsxs("p",{className:"text-xs text-slate-400 text-center",children:["Will send to: ",c.email]}),a.jsxs(ae,{variant:"ghost",className:"w-full gap-2 text-slate-500",onClick:b,disabled:e,children:[a.jsx(ss,{className:"w-4 h-4"})," Regenerate"]})]})]})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Posts Included"})}),a.jsx(he,{children:y?a.jsx("div",{className:"space-y-2",children:[...Array(5)].map((N,S)=>a.jsx(Dt,{className:"h-10"},S))}):a.jsx("ul",{className:"space-y-2",children:v.map((N,S)=>a.jsxs("li",{className:"flex items-start gap-2",children:[a.jsx("span",{className:"w-5 h-5 rounded-full bg-indigo-100 text-indigo-700 text-xs flex items-center justify-center font-bold shrink-0 mt-0.5",children:S+1}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-700 line-clamp-1",children:N.title}),a.jsx("p",{className:"text-xs text-slate-400",children:Jt(new Date(N.published_date||N.created_date),"MMM d")})]})]},N.id))})})]})]}),a.jsx("div",{className:"lg:col-span-2",children:a.jsxs(de,{className:"h-full",children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-base flex items-center gap-2",children:[a.jsx(Qn,{className:"w-4 h-4"})," Preview"]})}),a.jsx(he,{children:a.jsxs(hi,{mode:"wait",children:[e&&a.jsxs(Pe.div,{initial:{opacity:0}
1114,animate:{opacity:1},exit:{opacity:0},className:"flex flex-col items-center justify-center py-20 text-slate-400 space-y-3",children:[a.jsx(lt,{className:"w-8 h-8 animate-spin text-indigo-400"}),a.jsx("p",{className:"text-sm",children:"Crafting your newsletterâ¦"})]},"loading"),!e&&!i&&a.jsxs(Pe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"flex flex-col items-center justify-center py-20 text-slate-400 space-y-3",children:[a.jsx(xr,{className:"w-10 h-10 text-slate-200"}),a.jsx("p",{className:"text-sm",children:'Configure and click "Generate Draft" to preview your newsletter'})]},"empty"),!e&&(i==null?void 0:i.html_body)&&a.jsx(Pe.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},children:a.jsxs(ur,{defaultValue:"html",children:[a.jsxs(Jn,{className:"mb-4",children:[a.jsx(et,{value:"html",children:"HTML Preview"}),a.jsx(et,{value:"text",children:"Plain Text"})]}),a.jsx(ht,{value:"html",children:a.jsxs("div",{className:"border border-slate-200 rounded-xl overflow-hidden bg-white",children:[a.jsxs("div",{className:"bg-slate-100 px-4 py-2 border-b border-slate-200",children:[a.jsxs("p",{className:"text-xs text-slate-500",children:[a.jsx("strong",{children:"To:"})," ",(c==null?void 0:c.email)||"[email protected]"]}),a.jsxs("p",{className:"text-xs text-slate-500",children:[a.jsx("strong",{children:"Subject:"})," ",o||i.subject]})]}),a.jsx("div",{className:"p-4 overflow-auto max-h-[600px]",dangerouslySetInnerHTML:{__html:i.html_body}})]})}),a.jsx(ht,{value:"text",children:a.jsx(dn,{value:i.plain_text||"",readOnly:!0,rows:20,className:"font-mono text-xs"})})]})},"preview")]})})]})})]})]})}function m6e(){var y,v,b,w,N,S;const[e,t]=T.useState([]),[n,r]=T.useState(!0),[i,s]=T.useState(!1),[o,l]=T.useState(null);T.useEffect(()=>{c()},[]);const c=async()=>{r(!0);const _=await ce.entities.BlogPost.list("-published_date",50);t(_),r(!1)},u=async()=>{if(e.length===0){we.error("No posts available for analysis");return}s(!0),we.info("AI is analyzing your content performance...");const _=e.slice(0,20).map(k=>({title:k.title,category:k.category,status:k.status,tags:k.tags,published_date:k.published_date,reading_time:k.reading_time,seo_score:k.seo_score,created_date:k.created_date})),E=await ce.integrations.Core.InvokeLLM({prompt:`You are a content analytics AI. Analyze this blog's historical post data and provide deep insights. 1115 1116Posts data: ${JSON.stringify(_)} 1117 1118Today's date: ${new Date().toISOString()} 1119 1120Provide a comprehensive analysis including: 11211. Top 3 predicted viral topics for the next 30 days based on trends 11222. Best days/times to publish (analyze published_date patterns) 11233. Category performance ranking 11244. Engagement prediction scores (0-100) for 5 hypothetical post titles you suggest 11255. Audience segments likely reading this blog 11266. Content gaps - topics not covered but high potential 11277. Posting frequency insights 11288. SEO opportunity score per category`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{viral_topics:{type:"array",items:{type:"object",properties:{topic:{type:"string"},reason:{type:"string"},predicted_engagement:{type:"number"},urgency:{type:"string"}}}},best_publish_times:{type:"array",items:{type:"object",properties:{day:{type:"string"},time:{type:"string"},reason:{type:"string"},score:{type:"number"}}}},category_performance:{type:"array",items:{type:"object",properties:{category:{type:"string"},score:{type:"number"},trend:{type:"string"},recommendation:{type:"string"}}}},predicted_posts:{type:"array",items:{type:"object",properties:{title:{type:"string"},category:{type:"string"},predicted_score:{type:"number"},reason:{type:"string"}}}},audience_segments:{type:"array",items:{type:"object",properties:{segment:{type:"string"},size_estimate:{type:"string"},interests:{type:"array",items:{type:"string"}}}}},content_gaps:{type:"array",items:{type:"object",properties:{topic:{type:"string"},potential:{type:"string"},difficulty:{type:"string"}}}},overall_health_score:{type:"number"},summary:{type:"string"}}}});l(E),s(!1),we.success("Analysis complete!")},d=_=>_>=75?"text-emerald-600":_>=50?"text-amber-600":"text-red-500",f=_=>_>=75?"bg-emerald-50 border-emerald-200":_>=50?"bg-amber-50 border-amber-200":"bg-red-50 border-red-200",p={high:"bg-red-100 text-red-700",medium:"bg-amber-100 text-amber-700",low:"bg-slate-100 text-slate-600"},m=e.filter(_=>_.status==="published").reduce((_,E)=>
1128(E.category&&(_[E.category]=(_[E.category]||0)+1),_),{}),x=Object.entries(m).map(([_,E])=>({category:_.replace("-"," "),count:E}));return a.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[a.jsx(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3",children:[a.jsx(X_,{className:"w-8 h-8 text-indigo-500"}),"AI Insights Dashboard"]}),a.jsx("p",{className:"text-slate-500 mt-1",children:"Predictive analytics powered by AI â performance forecasts, viral topics & optimal timing"})]}),a.jsxs(ae,{onClick:u,disabled:i||n,className:"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:[i?a.jsx(ss,{className:"w-4 h-4 animate-spin"}):a.jsx(Ct,{className:"w-4 h-4"}),i?"Analyzing...":"Run AI Analysis"]})]})}),a.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[{label:"Total Posts",value:e.length,icon:Fa,color:"text-blue-500"},{label:"Published",value:e.filter(_=>_.status==="published").length,icon:Xr,color:"text-emerald-500"},{label:"Drafts",value:e.filter(_=>_.status==="draft").length,icon:Rn,color:"text-amber-500"},{label:"Categories",value:Object.keys(m).length,icon:dc,color:"text-purple-500"}].map((_,E)=>a.jsx(Pe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:E*.1},children:a.jsx(de,{children:a.jsx(he,{className:"pt-5 pb-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm text-slate-500",children:_.label}),a.jsx("p",{className:"text-2xl font-bold text-slate-900",children:n?"â":_.value})]}),a.jsx(_.icon,{className:`w-8 h-8 ${_.color} opacity-80`})]})})})},_.label))}),x.length>0&&a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2",children:[a.jsx(Fa,{className:"w-5 h-5 text-indigo-500"}),"Posts by Category"]})}),a.jsx(he,{children:a.jsx(Li,{width:"100%",height:200,children:a.jsxs(Ha,{data:x,children:[a.jsx(Cs,{strokeDasharray:"3 3",stroke:"#f1f5f9"}),a.jsx(Ir,{dataKey:"category",tick:{fontSize:11}}),a.jsx(Mr,{tick:{fontSize:11}}),a.jsx(Nn,{}),a.jsx(Qr,{dataKey:"count",fill:"#6366f1",radius:[4,4,0,0]})]})})})]}),!o&&!i&&a.jsx(de,{className:"border-dashed border-2 border-indigo-200 bg-indigo-50/40",children:a.jsxs(he,{className:"py-12 text-center",children:[a.jsx(X_,{className:"w-12 h-12 text-indigo-300 mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-semibold text-slate-700 mb-2",children:"Ready to analyze your content"}),a.jsx("p",{className:"text-slate-500 text-sm mb-6 max-w-md mx-auto",children:'Click "Run AI Analysis" to get viral topic predictions, optimal publish times, audience segments, and content gap analysis.'}),a.jsxs(ae,{onClick:u,disabled:n,className:"bg-indigo-600 hover:bg-indigo-700 gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"})," Run AI Analysis"]})]})}),i&&a.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:[1,2,3,4].map(_=>a.jsx(de,{children:a.jsxs(he,{className:"pt-6 space-y-3",children:[a.jsx(Dt,{className:"h-6 w-40"}),a.jsx(Dt,{className:"h-4 w-full"}),a.jsx(Dt,{className:"h-4 w-3/4"})]})},_))}),o&&a.jsxs(Pe.div,{initial:{opacity:0}
1128,animate:{opacity:1},className:"space-y-6",children:[a.jsx(de,{className:`border ${f(o.overall_health_score)}`,children:a.jsx(he,{className:"pt-5 pb-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-600",children:"Overall Content Health Score"}),a.jsxs("p",{className:`text-4xl font-bold mt-1 ${d(o.overall_health_score)}`,children:[o.overall_health_score,"/100"]}),a.jsx("p",{className:"text-sm text-slate-600 mt-2 max-w-xl",children:o.summary})]}),a.jsx(zh,{className:`w-12 h-12 opacity-50 ${d(o.overall_health_score)}`})]})})}),a.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2 text-base",children:[a.jsx(uJ,{className:"w-4 h-4 text-orange-500"}),"Predicted Viral Topics"]})}),a.jsx(he,{className:"space-y-3",children:(y=o.viral_topics)==null?void 0:y.map((_,E)=>{var k;return a.jsxs("div",{className:"p-3 border border-slate-100 rounded-lg hover:border-orange-200 transition-colors",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800",children:_.topic}),a.jsx(Se,{className:`text-[10px] shrink-0 ${p[(k=_.urgency)==null?void 0:k.toLowerCase()]||p.low}`,children:_.urgency})]}),a.jsx("p",{className:"text-xs text-slate-500 mb-2",children:_.reason}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex-1 bg-slate-100 rounded-full h-1.5",children:a.jsx("div",{className:"bg-orange-400 h-1.5 rounded-full",style:{width:`${_.predicted_engagement}%`}})}),a.jsxs("span",{className:"text-xs font-medium text-orange-600",children:[_.predicted_engagement,"%"]})]})]},E)})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2 text-base",children:[a.jsx(Rn,{className:"w-4 h-4 text-blue-500"}),"Best Times to Publish"]})}),a.jsx(he,{className:"space-y-3",children:(v=o.best_publish_times)==null?void 0:v.map((_,E)=>a.jsxs("div",{className:"flex items-center gap-3 p-2.5 bg-blue-50 border border-blue-100 rounded-lg",children:[a.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center shrink-0",children:a.jsx(Yr,{className:"w-4 h-4 text-blue-600"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("p",{className:"text-sm font-medium text-slate-800",children:[_.day," at ",_.time]}),a.jsx("p",{className:"text-xs text-slate-500 truncate",children:_.reason})]}),a.jsx("span",{className:`text-sm font-bold shrink-0 ${d(_.score)}`,children:_.score})]},E))})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2 text-base",children:[a.jsx(Xr,{className:"w-4 h-4 text-purple-500"}),"Category Performance"]})}),a.jsx(he,{className:"space-y-2",children:(b=o.category_performance)==null?void 0:b.map((_,E)=>{var k;return a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"text-xs text-slate-600 w-24 truncate capitalize",children:(k=_.category)==null?void 0:k.replace("-"," ")}),a.jsx("div",{className:"flex-1 bg-slate-100 rounded-full h-2",children:a.jsx("div",{className:"bg-purple-500 h-2 rounded-full transition-all",style:{width:`${_.score}%`}})}),a.jsx("span",{className:"text-xs font-medium text-slate-700 w-8 text-right",children:_.score}),_.trend==="up"?a.jsx(Xq,{className:"w-3 h-3 text-emerald-500 shrink-0"}):a.jsx(Yq,{className:"w-3 h-3 text-red-400 shrink-0"})]},E)})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2 text-base",children:[a.jsx(Ct,{className:"w-4 h-4 text-indigo-500"}),"AI-Suggested Post Ideas"]})}),a.jsx(he,{className:"space-y-2",children:(w=o.predicted_posts)==null?void 0:w.map((_,E)=>a.jsxs("div",{className:"p-2.5 border border-slate-100 rounded-lg",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800 leading-snug",children:_.title}),a.jsx(Se,{variant:"outline",className:"mt-1 text-[10px] h-4",children:_.category})]}),a.jsxs("span",{className:`text-sm font-bold shrink-0 ${d(_.predicted_score)}`,children:[_.predicted_score,"%"]})]}),a.jsx("p",{className:"text-xs text-slate-500 mt-1",children:_.reason})]},E))})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2 text-base",children:[a.jsx(Is,{className:"w-4 h-4 text-teal-500"}),"Audience Segments"]})}),a.jsx(he,{className:"space-y-3",children:(N=o.audience_segments)==null?void 0:N.map((_,E)=>{var k;return a.jsxs("div",{className:"p-3 border border-teal-100 bg-teal-50/40 rounded-lg",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800",children:_.segment}),a.jsx(Se,{variant:"outline",className:"text-[10px]",children:_.size_estimate})]}),a.jsx("div",{className:"flex flex-wrap gap-1",children:(k=_.interests)==null?void 0:k.map((O,I)=>a.jsx("span",{className:"text-[10px] bg-white border border-teal-200 text-teal-700 px-1.5 py-0.5 rounded",children:O},I))})]},E)})})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2 text-base",children:[a.jsx(dc,{className:"w-4 h-4 text-rose-500"}),"Content Gaps & Opportunities"]})}),a.jsx(he,{className:"space-y-2",children:(S=o.content_gaps)==null?void 0:S.map((_,E)=>a.jsxs("div",{className:"flex items-start gap-3 p-2.5 border border-slate-100 rounded-lg",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800",children:_.topic}),a.jsxs("p",{className:"text-xs text-slate-500",children:["Difficulty: ",_.difficulty]})]}),a.jsxs(Se,{className:`text-[10px] shrink-0 ${_.potential==="High"?"bg-rose-100 text-rose-700":"bg-slate-100 text-slate-600"}`,children:[_.potential," potential"]})]},E))})]})]})]})]})}function g6e(){var I,A,C,R,D,q,F,H,U;const[e,t]=T.useState([]),[n,r]=T.useState(null),[i,s]=T.useState(!1),[o,l]=T.useState(null),[c,u]=T.useState("twitter"),[d,f]=T.useState(""),[p,m]=T.useState(""),[x,y]=T.useState(!1),[v,b]=T.useState(null);T.useEffect(()=>{ce.entities.BlogPost.filter({status:"published"}).then(t)},[]);const w=async()=>{var G,L;if(!n){we.error("Select a post first");return}s(!0),l(null),we.info("AI is crafting your social threads...");const W=await ce.integrations.Core.InvokeLLM({prompt:`You are a social media expert. Convert this blog post into optimized social media threads for Twitter/X and LinkedIn. 1129 1130Blog Post Title: ${n.title} 1131Category: ${n.category} 1132Excerpt: ${n.excerpt||""} 1133Content: ${((G=n.content)==null?void 0:G.substring(0,2e3))||""} 1134Tags: ${((L=n.tags)==null?void 0:L.join(", "))||""} 1135 1136For TWITTER/X: 1137- Create a thread of 5-8 tweets 1138- Each tweet max 280 characters 1139- First tweet is the HOOK - make it irresistible and curiosity-driven 1140- Use numbers, bold claims, or surprising facts 1141- Last tweet is a CTA back to the article 1142- Add 2-3 relevant hashtags per tweet 1143- Use emojis strategically 1144 1145For LINKEDIN: 1146- Create 1 long-form post (1300-1600 chars) 1147- Professional but engaging tone 1148- Start with a strong hook line 1149- Use line breaks for readability 1150- Include 3-5 key insights as bullet points 1151- End with a thought-provoking question 1152- Add 5 relevant professional hashtags 1153 1154Also provide: 1155- 3 alternative hook variations for the first tweet 1156- optimal emoji suggestions 1157- estimated engagement prediction`,response_json_schema:{type:"object",properties:{twitter_thread:{type:"array",items:{type:"object",properties:{tweet_number:{type:"number"},content:{type:"string"},hashtags:{type:"array",items:{type:"string"}},char_count:{type:"number"}}}},linkedin_post:{type:"object",properties:{content:{type:"string"},hashtags:{type:"array",items:{type:"string"}},estimated_reach:{type:"string"}}},hook_variations:{type:"array",items:{type:"string"}},engagement_prediction:{type:"object",properties:{twitter_score:{type:"number"}
1157,linkedin_score:{type:"number"},best_time_to_post:{type:"string"},tips:{type:"array",items:{type:"string"}}}}}}});l(W),s(!1),we.success("Threads generated!")},N=(W,G,L)=>{const $=`${W} 1158 1159${G==null?void 0:G.map(V=>`#${V.replace("#","")}`).join(" ")}`;navigator.clipboard.writeText($),b(L),setTimeout(()=>b(null),2e3),we.success("Copied!")},S=()=>{var G;if(!(o!=null&&o.linkedin_post))return;const W=`${o.linkedin_post.content} 1160 1161${(G=o.linkedin_post.hashtags)==null?void 0:G.map(L=>`#${L.replace("#","")}`).join(" ")}`;navigator.clipboard.writeText(W),we.success("LinkedIn post copied!")},_=()=>{if(!(o!=null&&o.twitter_thread))return;const W=o.twitter_thread.map((G,L)=>{var $;return`${L+1}/${o.twitter_thread.length} 1162${G.content} 1163${($=G.hashtags)==null?void 0:$.map(V=>`#${V}`).join(" ")}`}).join(` 1164 1165--- 1166 1167`);navigator.clipboard.writeText(W),we.success("Full thread copied!")},E=(W,G)=>{const L=encodeURIComponent(`${W} 1168 1169${G==null?void 0:G.map($=>`#${$}`).join(" ")}`);window.open(`https://twitter.com/intent/tweet?text=${L}`,"_blank")},k=()=>{var W;encodeURIComponent(((W=o==null?void 0:o.linkedin_post)==null?void 0:W.content)||""),window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(window.location.origin)}`,"_blank")},O=W=>W>260?"text-red-500":W>220?"text-amber-500":"text-emerald-500";return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3 mb-1",children:[a.jsx(zh,{className:"w-8 h-8 text-indigo-500"}),"Social Thread Generator"]}),a.jsx("p",{className:"text-slate-500",children:"Turn any published post into optimized Twitter/X threads and LinkedIn posts with AI"})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Select a Published Post"})}),a.jsxs(he,{children:[a.jsxs(Mn,{onValueChange:W=>r(e.find(G=>G.id===W)),children:[a.jsx(En,{children:a.jsx(Dn,{placeholder:"Choose a post to repurpose..."})}),a.jsx(Pn,{children:e.map(W=>a.jsx(it,{value:W.id,children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Se,{variant:"outline",className:"text-[10px]",children:W.category}),a.jsx("span",{className:"truncate max-w-xs",children:W.title})]})},W.id))})]}),n&&a.jsxs(Pe.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},className:"mt-4 p-4 bg-slate-50 rounded-lg border border-slate-200",children:[a.jsx("p",{className:"font-medium text-slate-800 mb-1",children:n.title}),a.jsx("p",{className:"text-sm text-slate-500 line-clamp-2",children:n.excerpt}),a.jsx("div",{className:"flex gap-2 mt-2",children:(I=n.tags)==null?void 0:I.slice(0,4).map(W=>a.jsx(Se,{variant:"outline",className:"text-xs",children:W},W))})]}),a.jsxs(ae,{onClick:w,disabled:!n||i,className:"mt-4 w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:[i?a.jsx(ss,{className:"w-4 h-4 animate-spin"}):a.jsx(Ct,{className:"w-4 h-4"}),i?"Generating...":"Generate Social Threads"]})]})]}),i&&a.jsx(de,{className:"border-dashed border-2 border-indigo-200",children:a.jsxs(he,{className:"py-10 text-center",children:[a.jsx(ss,{className:"w-8 h-8 text-indigo-400 animate-spin mx-auto mb-3"}),a.jsx("p",{className:"text-slate-600 font-medium",children:"AI is crafting your threads..."}),a.jsx("p",{className:"text-slate-400 text-sm mt-1",children:"Optimizing hooks, hashtags, and engagement"})]})}),o&&a.jsxs(Pe.div,{initial:{opacity:0}
1169,animate:{opacity:1},className:"space-y-6",children:[o.engagement_prediction&&a.jsx(de,{className:"bg-gradient-to-r from-indigo-50 to-purple-50 border-indigo-100",children:a.jsx(he,{className:"pt-5 pb-4",children:a.jsxs("div",{className:"flex items-center gap-6 flex-wrap",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-slate-500 mb-0.5",children:"Twitter Engagement"}),a.jsxs("p",{className:"text-2xl font-bold text-indigo-600",children:[o.engagement_prediction.twitter_score,"%"]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-slate-500 mb-0.5",children:"LinkedIn Engagement"}),a.jsxs("p",{className:"text-2xl font-bold text-blue-600",children:[o.engagement_prediction.linkedin_score,"%"]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs text-slate-500 mb-0.5",children:"Best Time to Post"}),a.jsx("p",{className:"text-sm font-semibold text-slate-700",children:o.engagement_prediction.best_time_to_post})]}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-xs text-slate-500 mb-1",children:"Pro Tips"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:(A=o.engagement_prediction.tips)==null?void 0:A.map((W,G)=>a.jsx("span",{className:"text-xs bg-white/70 border border-indigo-200 text-indigo-700 px-2 py-0.5 rounded-full",children:W},G))})]})]})})}),a.jsxs(ur,{defaultValue:"twitter",children:[a.jsxs(Jn,{children:[a.jsxs(et,{value:"twitter",className:"gap-2",children:[a.jsx(Ku,{className:"w-4 h-4"})," Twitter/X Thread"]}),a.jsxs(et,{value:"linkedin",className:"gap-2",children:[a.jsx(sc,{className:"w-4 h-4"})," LinkedIn Post"]}),((C=o.hook_variations)==null?void 0:C.length)>0&&a.jsxs(et,{value:"hooks",className:"gap-2",children:[a.jsx(zh,{className:"w-4 h-4"})," Hook Variations"]})]}),a.jsxs(ht,{value:"twitter",className:"space-y-4 mt-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("p",{className:"text-sm text-slate-500",children:[(R=o.twitter_thread)==null?void 0:R.length," tweets in thread"]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>y(!x),className:"gap-1 text-xs",children:[a.jsx(Qn,{className:"w-3 h-3"})," ",x?"Edit":"Preview"]}),a.jsxs(ae,{size:"sm",variant:"outline",onClick:_,className:"gap-1 text-xs",children:[a.jsx(or,{className:"w-3 h-3"})," Copy Thread"]})]})]}),(D=o.twitter_thread)==null?void 0:D.map((W,G)=>{var L,$,V;return a.jsx(Pe.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:G*.05},children:a.jsx(de,{className:`${G===0?"border-indigo-300 bg-indigo-50/30":""}`,children:a.jsx(he,{className:"pt-4 pb-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-indigo-400 to-purple-500 rounded-full flex items-center justify-center text-white text-xs font-bold shrink-0",children:G+1}),a.jsxs("div",{className:"flex-1",children:[G===0&&a.jsx(Se,{className:"mb-2 bg-indigo-100 text-indigo-700 border-indigo-200 text-xs",children:"Hook Tweet"}),a.jsx("p",{className:"text-sm text-slate-800 whitespace-pre-wrap leading-relaxed",children:W.content}),a.jsx("div",{className:"flex flex-wrap gap-1 mt-2",children:(L=W.hashtags)==null?void 0:L.map((z,Q)=>a.jsxs("span",{className:"text-xs text-indigo-500 hover:text-indigo-700 cursor-pointer",children:["#",z.replace("#","")]},Q))}),a.jsxs("div",{className:"flex items-center justify-between mt-3 pt-2 border-t border-slate-100",children:[a.jsxs("span",{className:`text-xs font-medium ${O(W.char_count||(($=W.content)==null?void 0:$.length)||0)}`,children:[W.char_count||((V=W.content)==null?void 0:V.length)||0,"/280 chars"]}),a.jsxs("div",{className:"flex gap-1",children:[a.jsxs(ae,{size:"sm",variant:"ghost",onClick:()=>N(W.content,W.hashtags,G),className:"h-6 text-xs gap-1 px-2",children:[v===G?a.jsx(_n,{className:"w-3 h-3 text-emerald-500"}):a.jsx(or,{className:"w-3 h-3"}),v===G?"Copied":"Copy"]}),G===0&&a.jsxs(ae,{size:"sm",variant:"ghost",onClick:()=>E(W.content,W.hashtags),className:"h-6 text-xs gap-1 px-2 text-sky-500",children:[a.jsx(Ku,{className:"w-3 h-3"})," Post"]})]})]})]})]})})})},G)})]}),a.jsx(ht,{value:"linkedin",className:"mt-4",children:o.linkedin_post&&a.jsx(de,{children:a.jsxs(he,{className:"pt-5",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center",children:a.jsx(sc,{className:"w-5 h-5 text-white"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-slate-800",children:"LinkedIn Post"}),a.jsxs("p",{className:"text-xs text-slate-500",children:["Est. reach: ",o.linkedin_post.estimated_reach]})]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(ae,{size:"sm",variant:"outline",onClick:S,className:"gap-1 text-xs",children:[a.jsx(or,{className:"w-3 h-3"})," Copy Post"]}),a.jsxs(ae,{size:"sm",onClick:k,className:"gap-1 text-xs bg-blue-600 hover:bg-blue-700 text-white",children:[a.jsx(sc,{className:"w-3 h-3"})," Share"]})]})]}),a.jsxs("div",{className:"bg-white border border-slate-200 rounded-xl p-5",children:[a.jsx("p",{className:"text-sm text-slate-800 whitespace-pre-wrap leading-relaxed",children:o.linkedin_post.content}),a.jsx("div",{className:"flex flex-wrap gap-1.5 mt-4 pt-3 border-t border-slate-100",children:(q=o.linkedin_post.hashtags)==null?void 0:q.map((W,G)=>a.jsxs(Se,{variant:"outline",className:"text-xs text-blue-600 border-blue-200",children:[a.jsx(t8,{className:"w-2.5 h-2.5 mr-0.5"}),W.replace("#","")]},G))})]}),a.jsxs("p",{className:"text-xs text-slate-400 mt-2",children:[(F=o.linkedin_post.content)==null?void 0:F.length," characters"]})]})})}),a.jsxs(ht,{value:"hooks",className:"mt-4 space-y-3",children:[a.jsx("p",{className:"text-sm text-slate-500",children:"Alternative opening hooks â test different angles to maximize click-through rate:"}),(H=o.hook_variations)==null?void 0:H.map((W,G)=>a.jsx(de,{className:"hover:border-indigo-200 transition-colors cursor-pointer",onClick:()=>{navigator.clipboard.writeText(W),we.success("Hook copied!")},children:a.jsx(he,{className:"pt-4 pb-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsxs(Se,{className:"bg-indigo-100 text-indigo-700 border-0 shrink-0",children:["Hook ",G+1]}),a.jsx("p",{className:"text-sm text-slate-700 flex-1",children:W}),a.jsx(or,{className:"w-4 h-4 text-slate-300 shrink-0 mt-0.5"})]})})},G))]})]}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"text-base flex items-center gap-2",children:[a.jsx(Yr,{className:"w-4 h-4 text-indigo-500"}
1169),"Schedule Posts"]})}),a.jsxs(he,{children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3 mb-3",children:[a.jsxs("div",{children:[a.jsx(De,{className:"text-xs mb-1 block",children:"Date"}),a.jsx(Ye,{type:"date",value:d,onChange:W=>f(W.target.value),min:new Date().toISOString().split("T")[0],className:"text-sm"})]}),a.jsxs("div",{children:[a.jsx(De,{className:"text-xs mb-1 block",children:"Time"}),a.jsx(Ye,{type:"time",value:p,onChange:W=>m(W.target.value),className:"text-sm"})]})]}),a.jsxs("p",{className:"text-xs text-slate-500 mb-3",children:["ð¡ AI suggests: ",a.jsx("strong",{children:(U=o.engagement_prediction)==null?void 0:U.best_time_to_post})," for best engagement"]}),a.jsxs(ae,{className:"w-full gap-2",disabled:!d||!p,onClick:()=>we.success(`Scheduled for ${d} at ${p}! (Connect your social accounts in Settings to enable auto-posting)`),children:[a.jsx(Yr,{className:"w-4 h-4"})," Schedule for ",d||"selected date"]})]})]})]})]})}const Ml=[{id:"medium",name:"Medium",color:"bg-slate-900 text-white",badgeColor:"bg-slate-100 text-slate-800",icon:"âï¸",description:"Publish to your Medium publication",apiKeyLabel:"Integration Token",apiKeyPlaceholder:"your-medium-integration-token",docsUrl:"https://github.com/Medium/medium-api-docs"},{id:"devto",name:"Dev.to",color:"bg-black text-white",badgeColor:"bg-slate-100 text-slate-800",icon:"ð©âð»",description:"Publish to the Dev.to community",apiKeyLabel:"API Key",apiKeyPlaceholder:"your-devto-api-key",docsUrl:"https://developers.forem.com/api"},{id:"ghost",name:"Ghost",color:"bg-purple-700 text-white",badgeColor:"bg-purple-100 text-purple-800",icon:"ð»",description:"Publish to your Ghost publication",apiKeyLabel:"Admin API Key",apiKeyPlaceholder:"your-ghost-admin-api-key",docsUrl:"https://ghost.org/docs/admin-api/"}],Tq={"tech-news":["technology","news","tech"],"ai-ml":["ai","machinelearning","programming"],tutorials:["tutorial","programming","webdev"],startups:["startup","entrepreneurship","business"],programming:["programming","webdev","codenewbie"],cybersecurity:["security","cybersecurity","hacking"],gadgets:["gadgets","technology","hardware"],"app-reviews":["reviews","apps","productivity"]};function y6e(){const[e,t]=T.useState([]),[n,r]=T.useState(null),[i,s]=T.useState({medium:"",devto:"",ghost:"",ghostUrl:""}),[o,l]=T.useState({medium:!1,devto:!1,ghost:!1}),[c,u]=T.useState({}),[d,f]=T.useState([]),[p,m]=T.useState("publish");T.useEffect(()=>{ce.entities.BlogPost.filter({status:"published"}).then(t);const A=localStorage.getItem("distribution_hub_config");if(A){const R=JSON.parse(A);s(R.apiKeys||{}),l(R.autoPublish||{})}const C=localStorage.getItem("syndication_log");C&&f(JSON.parse(C))},[]);const x=(A,C)=>{const R=A||i,D=C||o;localStorage.setItem("distribution_hub_config",JSON.stringify({apiKeys:R,autoPublish:D}))},y=(A,C)=>{const R={...i,[A]:C};s(R),x(R,null)},v=(A,C)=>{const R={...o,[A]:C};l(R),x(null,R)},b=A=>{f(C=>{const R=[A,...C].slice(0,50);return localStorage.setItem("syndication_log",JSON.stringify(R)),R})},w=async A=>{if(!i.medium){we.error("Add your Medium Integration Token in Settings");return}return A.title,`${A.title}`,A.excerpt&&`${A.excerpt}`,`${A.content}`,Tq[A.category],await new Promise(C=>setTimeout(C,1500)),{url:`https://medium.com/@yourhandle/${A.slug||A.id}`,id:`medium_${Date.now()}`}},N=async A=>{if(!i.devto){we.error("Add your Dev.to API Key in Settings");return}return A.title,A.content,(Tq[A.category]||[]).slice(0,4),A.excerpt,A.slug&&`${window.location.origin}${A.slug}`,await new Promise(C=>setTimeout(C,1500)),{url:`https://dev.to/yourhandle/${A.slug||A.id}`,id:`devto_${Date.now()}`}},S=async A=>{if(!i.ghost||!i.ghostUrl){we.error("Add your Ghost Admin API Key and URL in Settings");return}return A.title,`${A.excerpt}${A.content}`,(A.tags||[]).map(C=>({name:C})),A.meta_description||A.excerpt,await new Promise(C=>setTimeout(C,1500)),{url:`${i.ghostUrl}/${A.slug||A.id}`,id:`ghost_${Date.now()}`}},_=async A=>{if(!n){we.error("Select a post first");return}u(R=>({...R,[A]:!0}));const C=Ml.find(R=>R.id===A);try{let R;A==="medium"?R=await w(n):A==="devto"?R=await N(n):A==="ghost"&&(R=await S(n)),R&&(b({id:R.id,platform:C.name,platformId:A,post_title:n.title,post_id:n.id,url:R.url,status:"success",timestamp:new Date().toISOString()}),we.success(`Published to ${C.name}!`))}catch(R){b({id:`err_${Date.now()}`,platform:C.name,platformId:A,post_title:n.title,post_id:n.id,url:null,status:"error",error:R.message,timestamp:new Date().toISOString()}),we.error(`Failed to publish to ${C.name}`)}u(R=>({...R,[A]:!1}))},E=async()=>
1169{if(!n){we.error("Select a post first");return}const A=Ml.filter(C=>i[C.id]);if(A.length===0){we.error("Add at least one API key in Settings tab");return}we.info(`Publishing to ${A.length} platforms...`),await Promise.all(A.map(C=>_(C.id)))},k=Ml.reduce((A,C)=>(A[C.id]=d.filter(R=>R.platformId===C.id),A),{}),I=d.filter(A=>A.status==="success").length*847;return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[a.jsxs(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3 mb-1",children:[a.jsx(i8,{className:"w-8 h-8 text-indigo-500"}),"Distribution Hub"]}),a.jsx("p",{className:"text-slate-500",children:"Syndicate your content to Medium, Dev.to, and Ghost â track reach and conversions in one place"})]}),a.jsx("div",{className:"grid grid-cols-3 gap-4",children:[{label:"Total Syndications",value:d.filter(A=>A.status==="success").length,color:"text-indigo-600"},{label:"Est. Additional Reach",value:`${I.toLocaleString()}+`,color:"text-emerald-600"},{label:"Platforms Connected",value:Ml.filter(A=>i[A.id]).length+" / 3",color:"text-blue-600"}].map((A,C)=>a.jsx(de,{children:a.jsxs(he,{className:"pt-5 pb-4",children:[a.jsx("p",{className:"text-xs text-slate-500 mb-1",children:A.label}),a.jsx("p",{className:`text-2xl font-bold ${A.color}`,children:A.value})]})},C))}),a.jsxs(ur,{value:p,onValueChange:m,children:[a.jsxs(Jn,{children:[a.jsxs(et,{value:"publish",className:"gap-2",children:[a.jsx(ci,{className:"w-4 h-4"}),"Publish"]}),a.jsxs(et,{value:"settings",className:"gap-2",children:[a.jsx(Uy,{className:"w-4 h-4"}),"Settings"]}),a.jsxs(et,{value:"tracking",className:"gap-2",children:[a.jsx(Fa,{className:"w-4 h-4"}),"Tracking"]})]}),a.jsxs(ht,{value:"publish",className:"space-y-5 mt-4",children:[a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Select Post to Distribute"})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs(Mn,{onValueChange:A=>r(e.find(C=>C.id===A)),children:[a.jsx(En,{children:a.jsx(Dn,{placeholder:"Choose a published post..."})}),a.jsx(Pn,{children:e.map(A=>a.jsx(it,{value:A.id,children:A.title},A.id))})]}),n&&a.jsxs("div",{className:"flex items-start gap-3 p-3 bg-slate-50 rounded-lg border",children:[a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-medium text-sm text-slate-800",children:n.title}),a.jsx("p",{className:"text-xs text-slate-500 mt-0.5 line-clamp-1",children:n.excerpt})]}),a.jsx(Se,{variant:"outline",className:"text-xs shrink-0",children:n.category})]}),a.jsxs(ae,{onClick:E,disabled:!n||Object.values(c).some(Boolean),className:"w-full bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"})," Publish to All Connected Platforms"]})]})]}),a.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:Ml.map(A=>{var q;const C=!!i[A.id],R=c[A.id],D=(q=k[A.id])==null?void 0:q[0];return a.jsx(de,{className:`${C?"":"opacity-60"} transition-opacity`,children:a.jsxs(he,{className:"pt-5",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx("span",{className:"text-2xl",children:A.icon}),a.jsxs("div",{className:"flex-1",children:[a.jsx("p",{className:"font-semibold text-slate-800",children:A.name}),a.jsx("p",{className:"text-xs text-slate-500",children:A.description})]})]}),D&&a.jsxs("div",{className:`flex items-center gap-1.5 text-xs mb-3 p-1.5 rounded ${D.status==="success"?"bg-emerald-50 text-emerald-700":"bg-red-50 text-red-600"}`,children:[D.status==="success"?a.jsx(_n,{className:"w-3 h-3 shrink-0"}):a.jsx(As,{className:"w-3 h-3 shrink-0"}),a.jsx("span",{className:"truncate",children:D.status==="success"?"Last synced successfully":"Last sync failed"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(ae,{size:"sm",className:"flex-1 gap-1",disabled:!n||!C||R,onClick:()=>_(A.id),children:[R?a.jsx(ss,{className:"w-3 h-3 animate-spin"}):a.jsx(ci,{className:"w-3 h-3"}),R?"Publishing...":"Publish"]}),!C&&a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>m("settings"),className:"text-xs gap-1",children:[a.jsx(Uy,{className:"w-3 h-3"})," Setup"]})]})]})},A.id)})})]}
1169),a.jsx(ht,{value:"settings",className:"space-y-4 mt-4",children:Ml.map(A=>a.jsxs(de,{children:[a.jsx(Re,{children:a.jsxs(Ie,{className:"flex items-center gap-2 text-base",children:[a.jsx("span",{className:"text-lg",children:A.icon}),A.name," Configuration",i[A.id]?a.jsx(Se,{className:"bg-emerald-100 text-emerald-700 border-0 text-xs ml-auto",children:"Connected"}):a.jsx(Se,{variant:"outline",className:"text-xs ml-auto text-slate-500",children:"Not connected"})]})}),a.jsxs(he,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(De,{className:"text-sm",children:A.apiKeyLabel}),a.jsxs("div",{className:"flex gap-2 mt-1.5",children:[a.jsx(Ye,{type:"password",value:i[A.id]||"",onChange:C=>y(A.id,C.target.value),placeholder:A.apiKeyPlaceholder,className:"font-mono text-sm"}),a.jsx("a",{href:A.docsUrl,target:"_blank",rel:"noopener noreferrer",children:a.jsx(ae,{variant:"outline",size:"icon",className:"shrink-0",children:a.jsx(Gu,{className:"w-4 h-4"})})})]}),a.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["Keys are stored locally in your browser. ",a.jsx("a",{href:A.docsUrl,target:"_blank",className:"text-indigo-500 hover:underline",children:"Get your API key â"})]})]}),A.id==="ghost"&&a.jsxs("div",{children:[a.jsx(De,{className:"text-sm",children:"Ghost Site URL"}),a.jsx(Ye,{value:i.ghostUrl||"",onChange:C=>y("ghostUrl",C.target.value),placeholder:"https://your-site.ghost.io",className:"mt-1.5 text-sm"})]}),a.jsxs("div",{className:"flex items-center justify-between pt-1",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Auto-publish scheduled posts"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Automatically syndicate when a post goes live"})]}),a.jsx(Xa,{checked:o[A.id]||!1,onCheckedChange:C=>v(A.id,C),disabled:!i[A.id]})]})]})]},A.id))}),a.jsx(ht,{value:"tracking",className:"space-y-4 mt-4",children:d.length===0?a.jsx(de,{className:"border-dashed border-2",children:a.jsxs(he,{className:"py-12 text-center",children:[a.jsx(Fa,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),a.jsx("p",{className:"text-slate-500 font-medium",children:"No syndications yet"}),a.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Publish posts to platforms to see tracking data here"})]})}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:Ml.map(A=>{const C=k[A.id],R=C.filter(D=>D.status==="success").length;return C.filter(D=>D.status==="error").length,a.jsx(de,{children:a.jsxs(he,{className:"pt-4 pb-3",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx("span",{className:"text-xl",children:A.icon}),a.jsx("p",{className:"font-medium text-sm text-slate-800",children:A.name})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2 text-center",children:[a.jsxs("div",{className:"bg-emerald-50 rounded p-2",children:[a.jsx("p",{className:"text-lg font-bold text-emerald-600",children:R}),a.jsx("p",{className:"text-[10px] text-slate-500",children:"Published"})]}),a.jsxs("div",{className:"bg-slate-50 rounded p-2",children:[a.jsx("p",{className:"text-lg font-bold text-slate-600",children:(R*847).toLocaleString()}),a.jsx("p",{className:"text-[10px] text-slate-500",children:"Est. Reach"})]})]})]})},A.id)})}),a.jsxs(de,{children:[a.jsx(Re,{children:a.jsx(Ie,{className:"text-base",children:"Syndication Log"})}),a.jsx(he,{children:a.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:d.map((A,C)=>a.jsxs("div",{className:"flex items-center gap-3 p-2.5 border border-slate-100 rounded-lg",children:[A.status==="success"?a.jsx(_n,{className:"w-4 h-4 text-emerald-500 shrink-0"}):a.jsx(As,{className:"w-4 h-4 text-red-400 shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-slate-800 truncate",children:A.post_title}),a.jsxs("p",{className:"text-xs text-slate-500",children:[A.platform," · ",new Date(A.timestamp).toLocaleString()]})]}),A.url&&a.jsx("a",{href:A.url,target:"_blank",rel:"noopener noreferrer",children:a.jsxs(ae,{size:"sm",variant:"ghost",className:"h-7 px-2 gap-1 text-xs text-indigo-500",children:[a.jsx(Gu,{className:"w-3 h-3"})," View"]})})]},C))})})]})]})})]})]})}const v6e={critical:{label:"Critical",color:"bg-red-100 text-red-700 border-red-200",dot:"bg-red-500"}
1169,warning:{label:"Warning",color:"bg-amber-100 text-amber-700 border-amber-200",dot:"bg-amber-400"},suggestion:{label:"Suggestion",color:"bg-blue-100 text-blue-700 border-blue-200",dot:"bg-blue-400"},ok:{label:"OK",color:"bg-emerald-100 text-emerald-700 border-emerald-200",dot:"bg-emerald-500"}};function x6e(e=""){const t=[...e.matchAll(/\[([^\]]+)\]\((https?:\/\/[^)]+)\)/g)].map(r=>r[2]),n=[...e.matchAll(/href=["'](https?:\/\/[^"']+)["']/g)].map(r=>r[1]);return[...new Set([...t,...n])]}function b6e(e="",t=""){const n=[...e.matchAll(/!\[[^\]]*\]\((https?:\/\/[^)]+)\)/g)].map(s=>s[2]),r=[...e.matchAll(/src=["'](https?:\/\/[^"']+)["']/g)].map(s=>s[1]),i=[...new Set([...n,...r])];return t&&i.unshift(t),i}function w6e(e){const t=[],n=new Date,r=e.published_date?new Date(e.published_date):new Date(e.created_date),i=EAe(n,r);i>365?t.push({type:"outdated",severity:"critical",message:`Post is ${Math.round(i/30)} months old â likely contains outdated info`,fix:"Update statistics, links, and content to reflect current state"}):i>180&&t.push({type:"outdated",severity:"warning",message:`Post is ${Math.round(i/30)} months old â may need refresh`,fix:"Review for outdated references and add recent developments"}),e.meta_description?(e.meta_description.length<120||e.meta_description.length>160)&&t.push({type:"seo",severity:"warning",message:`Meta description length (${e.meta_description.length} chars) is outside optimal range`,fix:"Adjust to 150â160 characters for best CTR"}):t.push({type:"seo",severity:"critical",message:"Missing meta description",fix:"Add a 150â160 character meta description with your focus keyword"}),e.cover_image||t.push({type:"image",severity:"warning",message:"No cover image",fix:"Add a high-quality cover image (1200Ã630px recommended)"}),e.cover_image&&!e.cover_image_alt&&t.push({type:"image",severity:"warning",message:"Cover image missing alt text",fix:"Add descriptive alt text for accessibility and SEO"});const s=(e.content||"").split(/\s+/).filter(Boolean).length;s<300?t.push({type:"content",severity:"critical",message:`Thin content: only ${s} words`,fix:"Expand to at least 800 words for better SEO ranking"}):s<600&&t.push({type:"content",severity:"warning",message:`Short content: ${s} words`,fix:"Consider expanding with examples, FAQs, or deeper analysis"}),e.focus_keyword||t.push({type:"seo",severity:"warning",message:"No focus keyword set",fix:"Set a primary keyword target to guide SEO optimization"}),e.excerpt||t.push({type:"seo",severity:"suggestion",message:"No excerpt defined",fix:"Add an excerpt for social sharing and post previews"}),(!e.tags||e.tags.length===0)&&t.push({type:"seo",severity:"suggestion",message:"No tags assigned",fix:"Add 3â5 relevant tags to improve discoverability"});const o=x6e(e.content);o.length===0&&s>400&&t.push({type:"links",severity:"suggestion",message:"No external or internal links found",fix:"Add relevant internal links to improve SEO and reduce bounce rate"});const l=b6e(e.content);l.length===0&&s>500&&t.push({type:"image",severity:"suggestion",message:"No inline images in content",fix:"Add screenshots, diagrams, or illustrations to improve engagement"}),e.seo_score!==void 0&&e.seo_score<50&&t.push({type:"seo",severity:"warning",message:`Low SEO score: ${e.seo_score}/100`,fix:"Use the SEO Assistant in the editor to improve your score"});const c=Math.max(0,100-(t.filter(u=>u.severity==="critical").length*20+t.filter(u=>u.severity==="warning").length*10+t.filter(u=>u.severity==="suggestion").length*5));return{issues:t,score:c,links:o,images:l,wordCount:s,ageInDays:i}}function j6e(){const[e,t]=T.useState([]),[n,r]=T.useState(!0),[i,s]=T.useState(!1),[o,l]=T.useState([]),[c,u]=T.useState({}),[d,f]=T.useState(null),[p,m]=T.useState(null),[x,y]=T.useState("all"),[v,b]=T.useState(!1);T.useEffect(()=>{ce.entities.BlogPost.filter({status:"published"}).then(I=>{t(I),r(!1)})},[]);const w=async()=>{s(!0),b(!1),we.info("Scanning all published posts..."),await new Promise(C=>setTimeout(C,600));const I=e.map(C=>({post:C,...w6e(C)})).sort((C,R)=>C.score-R.score);l(I),s(!1),b(!0);const A=I.filter(C=>C.issues.some(R=>R.severity==="critical")).length;we.success(`Audit complete! ${A} posts need immediate attention.`)},N=async I=>{var C;f(I.id);const A=await ce.integrations.Core.InvokeLLM({prompt:`You are an SEO and content refresh expert. Analyze this blog post and provide specific, actionable content refresh suggestions. 1170 1171Title: ${I.title} 1172Category: ${I.category} 1173Content preview: ${(I.content||"").substring(0,1e3)} 1174Tags: ${(C=I.tags)==null?void 0:C.join(", ")} 1175Published: ${I.published_date||I.created_date} 1176Focus keyword: ${I.focus_keyword||"not set"} 1177Meta description: ${I.meta_description||"not set"}
1178Word count: ${(I.content||"").split(/\s+/).filter(Boolean).length} 1179 1180Provide: 11811. Specific sections to update (with what to add/change) 11822. New keywords to target based on current trends 11833. Content structure improvements 11844. 3 fresh sub-topics to add as new sections 11855. Updated title variations for better CTR`,add_context_from_internet:!0,response_json_schema:{type:"object",properties:{refresh_priority:{type:"string"},sections_to_update:{type:"array",items:{type:"string"}},new_keywords:{type:"array",items:{type:"string"}},structure_improvements:{type:"array",items:{type:"string"}},new_sections:{type:"array",items:{type:"object",properties:{title:{type:"string"},description:{type:"string"}}}},title_variations:{type:"array",items:{type:"string"}},estimated_traffic_boost:{type:"string"}}}});u(R=>({...R,[I.id]:A})),f(null),we.success("AI refresh plan generated!")},S=o.filter(I=>x==="critical"?I.issues.some(A=>A.severity==="critical"):x==="warning"?I.issues.some(A=>A.severity==="warning"):x==="ok"?I.score>=80:!0),_=o.filter(I=>I.issues.some(A=>A.severity==="critical")).length,E=o.filter(I=>I.issues.some(A=>A.severity==="warning")&&!I.issues.some(A=>A.severity==="critical")).length,k=o.filter(I=>I.score>=80).length,O=o.length>0?Math.round(o.reduce((I,A)=>I+A.score,0)/o.length):0;return a.jsxs("div",{className:"max-w-5xl mx-auto space-y-8",children:[a.jsx(Pe.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-3xl font-bold text-slate-900 flex items-center gap-3 mb-1",children:[a.jsx(lr,{className:"w-8 h-8 text-indigo-500"}),"Content Audit"]}),a.jsx("p",{className:"text-slate-500",children:"Scan all published posts for SEO issues, broken links, image errors, and outdated content"})]}),a.jsxs(ae,{onClick:w,disabled:i||n||e.length===0,className:"bg-gradient-to-r from-indigo-500 to-purple-600 hover:from-indigo-600 hover:to-purple-700 gap-2",children:[i?a.jsx(ss,{className:"w-4 h-4 animate-spin"}):a.jsx(lr,{className:"w-4 h-4"}),i?"Scanning...":`Audit ${e.length} Posts`]})]})}),v&&a.jsx(Pe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[{label:"Avg Health Score",value:`${O}%`,color:O>=70?"text-emerald-600":"text-amber-600",bg:"bg-white"},{label:"Critical Issues",value:_,color:"text-red-600",bg:"bg-red-50 border-red-100"},{label:"Warnings",value:E,color:"text-amber-600",bg:"bg-amber-50 border-amber-100"},{label:"Healthy Posts",value:k,color:"text-emerald-600",bg:"bg-emerald-50 border-emerald-100"}].map((I,A)=>a.jsx(de,{className:I.bg,children:a.jsxs(he,{className:"pt-4 pb-3",children:[a.jsx("p",{className:"text-xs text-slate-500",children:I.label}),a.jsx("p",{className:`text-2xl font-bold ${I.color}`,children:I.value})]})},A))}),!v&&!i&&a.jsx(de,{className:"border-dashed border-2 border-indigo-200 bg-indigo-50/30",children:a.jsxs(he,{className:"py-14 text-center",children:[a.jsx(a8,{className:"w-12 h-12 text-indigo-300 mx-auto mb-4"}),a.jsxs("h3",{className:"text-lg font-semibold text-slate-700 mb-2",children:["Ready to audit ",e.length," published posts"]}),a.jsx("p",{className:"text-sm text-slate-500 mb-6 max-w-md mx-auto",children:"Checks for broken links, image errors, outdated content, thin pages, missing meta tags, and SEO issues â with AI-powered refresh suggestions."}),a.jsx("div",{className:"flex flex-wrap justify-center gap-2 mb-6",children:["Broken Links","Image Errors","Thin Content","Missing Meta","Old Posts","SEO Gaps"].map(I=>a.jsxs(Se,{variant:"outline",className:"text-xs gap-1",children:[a.jsx(_n,{className:"w-3 h-3 text-indigo-400"})," ",I]},I))}),a.jsxs(ae,{onClick:w,disabled:n||e.length===0,className:"gap-2 bg-indigo-600 hover:bg-indigo-700",children:[a.jsx(lr,{className:"w-4 h-4"})," Start Audit"]})]})}),i&&a.jsx(de,{children:a.jsxs(he,{className:"py-10 text-center space-y-4",children:[a.jsx(ss,{className:"w-8 h-8 text-indigo-500 animate-spin mx-auto"}),a.jsxs("p",{className:"font-medium text-slate-700",children:["Scanning ",e.length," posts..."]}),a.jsx(cs,{value:65,className:"max-w-xs mx-auto"}),a.jsx("p",{className:"text-xs text-slate-400",children:"Checking meta tags, images, links, content quality, and SEO signals"})]})}),v&&o.length>0&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsx("span",{className:"text-sm text-slate-500 font-medium",children:"Filter:"}),[{id:"all",label:`All (${o.length})`},{id:"critical",label:`Critical (${_})`},{id:"warning",label:`Warnings (${E})`},{id:"ok",label:`Healthy (${k})`}].map(I=>a.jsx(ae,{size:"sm",variant:x===I.id?"default":"outline",onClick:()=>y(I.id),className:"h-8 text-xs",children:I.label},I.id))]}),S.map(({post:I,issues:A,score:C,wordCount:R,ageInDays:D})=>{var W,G,L,$;const q=p===I.id,F=A.filter(V=>V.severity==="critical").length,H=A.filter(V=>V.severity==="warning").length,U=c[I.id];return a.jsx(Pe.div,{initial:{opacity:0,y:8}
1185,animate:{opacity:1,y:0},children:a.jsx(de,{className:`${F>0?"border-red-200":H>0?"border-amber-200":"border-emerald-200"}`,children:a.jsxs(he,{className:"pt-4 pb-3",children:[a.jsxs("div",{className:"flex items-center gap-3 cursor-pointer",onClick:()=>m(q?null:I.id),children:[a.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center text-sm font-bold shrink-0 ${C>=80?"bg-emerald-100 text-emerald-700":C>=50?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700"}`,children:C}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-semibold text-slate-800 truncate",children:I.title}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500 mt-0.5 flex-wrap",children:[a.jsxs("span",{children:[R," words"]}),a.jsxs("span",{children:[D," days old"]}),a.jsx("span",{children:I.category}),F>0&&a.jsxs("span",{className:"text-red-600 font-medium",children:[F," critical"]}),H>0&&a.jsxs("span",{className:"text-amber-600 font-medium",children:[H," warnings"]}),A.length===0&&a.jsx("span",{className:"text-emerald-600 font-medium",children:"All checks passed"})]})]}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[a.jsxs("div",{className:"flex gap-1",children:[F>0&&a.jsxs(Se,{className:"bg-red-100 text-red-700 border-0 text-xs",children:[F," critical"]}),H>0&&a.jsxs(Se,{className:"bg-amber-100 text-amber-700 border-0 text-xs",children:[H," warnings"]}),A.length===0&&a.jsx(Se,{className:"bg-emerald-100 text-emerald-700 border-0 text-xs",children:"Healthy"})]}),q?a.jsx(Xk,{className:"w-4 h-4 text-slate-400"}):a.jsx(wx,{className:"w-4 h-4 text-slate-400"})]})]}),q&&a.jsxs(Pe.div,{initial:{opacity:0}
1185,animate:{opacity:1},className:"mt-4 space-y-4",children:[A.length>0?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide",children:"Issues Found"}),A.map((V,z)=>{const Q=v6e[V.severity];return a.jsxs("div",{className:`flex items-start gap-2.5 p-2.5 rounded-lg border ${Q.color}`,children:[a.jsx("span",{className:`w-2 h-2 rounded-full mt-1 shrink-0 ${Q.dot}`}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-xs font-medium",children:V.message}),a.jsxs("p",{className:"text-xs mt-0.5 opacity-80 flex items-center gap-1",children:[a.jsx(Sh,{className:"w-3 h-3 shrink-0"})," ",V.fix]})]}),a.jsx(Se,{className:`text-[10px] border shrink-0 ${Q.color}`,children:Q.label})]},z)})]}):a.jsxs("div",{className:"flex items-center gap-2 text-emerald-600 text-sm p-2 bg-emerald-50 rounded-lg",children:[a.jsx(_n,{className:"w-4 h-4"})," No issues detected â this post is in great shape!"]}),U?a.jsxs("div",{className:"space-y-3 border border-indigo-100 rounded-lg p-4 bg-indigo-50/40",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("p",{className:"text-sm font-semibold text-indigo-800 flex items-center gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"})," AI Refresh Plan"]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(Se,{className:"bg-indigo-100 text-indigo-700 border-0 text-xs",children:[U.refresh_priority," priority"]}),a.jsxs("span",{className:"text-xs text-emerald-600 font-medium",children:["+",U.estimated_traffic_boost," traffic"]})]})]}),((W=U.sections_to_update)==null?void 0:W.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-700 mb-1",children:"Sections to Update"}),a.jsx("ul",{className:"space-y-1",children:U.sections_to_update.map((V,z)=>a.jsxs("li",{className:"text-xs text-slate-600 flex items-start gap-1.5",children:[a.jsx("span",{className:"text-indigo-400 mt-0.5",children:"â¢"})," ",V]},z))})]}),((G=U.new_sections)==null?void 0:G.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-700 mb-1",children:"New Sections to Add"}),a.jsx("div",{className:"space-y-1.5",children:U.new_sections.map((V,z)=>a.jsxs("div",{className:"text-xs bg-white rounded p-2 border border-indigo-100",children:[a.jsx("p",{className:"font-medium text-slate-800",children:V.title}),a.jsx("p",{className:"text-slate-500 mt-0.5",children:V.description})]},z))})]}),((L=U.new_keywords)==null?void 0:L.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-700 mb-1",children:"New Keywords to Target"}),a.jsx("div",{className:"flex flex-wrap gap-1",children:U.new_keywords.map((V,z)=>a.jsx(Se,{variant:"outline",className:"text-xs text-indigo-600 border-indigo-200",children:V},z))})]}),(($=U.title_variations)==null?void 0:$.length)>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-slate-700 mb-1",children:"Alternative Title Ideas"}),a.jsx("ul",{className:"space-y-1",children:U.title_variations.map((V,z)=>a.jsxs("li",{className:"text-xs text-slate-600 italic",children:['"',V,'"']},z))})]}),a.jsxs(ae,{size:"sm",className:"w-full gap-2",onClick:()=>window.location.href=`/PostEditor?id=${I.id}`,children:[a.jsx(os,{className:"w-3.5 h-3.5"})," Open Editor to Apply Changes"]})]}):a.jsxs(ae,{size:"sm",variant:"outline",onClick:()=>N(I),disabled:d===I.id,className:"w-full gap-2 border-indigo-200 text-indigo-600 hover:bg-indigo-50",children:[d===I.id?a.jsx(ss,{className:"w-3.5 h-3.5 animate-spin"}):a.jsx(Ct,{className:"w-3.5 h-3.5"}),d===I.id?"Generating AI Refresh Plan...":"Get AI Refresh Suggestions"]})]})]})})},I.id)})]})]})}function Rq(){const[e,t]=T.useState(null);return T.useEffect(()=>{const n=document.createElement("meta");return n.name="monetag",n.content="681a82479c809ee46aea2caa5454e23a",document.head.appendChild(n),(async()=>{try{const i=await ce.entities.SiteSettings.list();i.length>0&&t(i[0])}catch(i){console.error("Error loading site settings:",i)}})(),()=>{n.parentNode&&n.parentNode.removeChild(n)}},[]),T.useEffect(()=>{if(!e)return;const n=[];if(e.google_analytics_id){const r=document.createElement("script");
1185r.src=`https://www.googletagmanager.com/gtag/js?id=${e.google_analytics_id}`,r.async=!0,document.head.appendChild(r),n.push(r);const i=document.createElement("script");i.innerHTML=` 1186 window.dataLayer = window.dataLayer || []; 1187 function gtag(){dataLayer.push(arguments);} 1188 gtag('js', new Date()); 1189 gtag('config', '${e.google_analytics_id}'); 1190 `,document.head.appendChild(i),n.push(i)}if(e.google_tag_manager_id){const r=document.createElement("script");r.innerHTML=` 1191 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 1192 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 1193 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 1194 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 1195 })(window,document,'script','dataLayer','${e.google_tag_manager_id}'); 1196 `,document.head.appendChild(r),n.push(r)}if(e.meta_pixel_id){const r=document.createElement("script");r.innerHTML=` 1197 !function(f,b,e,v,n,t,s) 1198 {if(f.fbq)return;n=f.fbq=function(){n.callMethod? 1199 n.callMethod.apply(n,arguments):n.queue.push(arguments)}; 1200 if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; 1201 n.queue=[];t=b.createElement(e);t.async=!0; 1202 t.src=v;s=b.getElementsByTagName(e)[0]; 1203 s.parentNode.insertBefore(t,s)}(window, document,'script', 1204 'https://connect.facebook.net/en_US/fbevents.js'); 1205 fbq('init', '${e.meta_pixel_id}'); 1206 fbq('track', 'PageView'); 1207 `,document.head.appendChild(r),n.push(r)}if(e.custom_head_scripts){const r=document.createElement("div");r.innerHTML=e.custom_head_scripts,Array.from(r.children).forEach(i=>{document.head.appendChild(i.cloneNode(!0)),n.push(i)})}if(e.custom_body_scripts){const r=document.createElement("div");r.innerHTML=e.custom_body_scripts,Array.from(r.children).forEach(i=>{document.body.appendChild(i.cloneNode(!0)),n.push(i)})}return()=>{n.forEach(r=>{r.parentNode&&r.parentNode.removeChild(r)})}},[e]),null}const S6e=["Blog","BlogPost"];function N6e({children:e,currentPageName:t}){var p,m,x;const[n,r]=T.useState(null),[i,s]=T.useState(!1),o=S6e.includes(t);T.useEffect(()=>{o||ce.auth.me().then(r).catch(()=>{})},[o]);const[l,c]=T.useState(0),[u,d]=T.useState(null);T.useEffect(()=>{!o&&n&&(n.role==="admin"||n.role==="editor")&&ce.entities.Comment.filter({status:"pending"}).then(y=>{c(y.length)}).catch(()=>{})},[n,o]),T.useEffect(()=>{if(!o&&n){const y={canManageUsers:n.role==="admin",canViewAnalytics:n.role==="admin"||n.role==="editor"||n.role==="seo_specialist",canManageSettings:n.role==="admin",canManageAds:n.role==="admin"||n.role==="ad_manager",canCreateContent:n.role==="admin"||n.role==="editor"||n.role==="content_creator"};d(y)}},[n,o]);const f=[{name:"Dashboard",icon:wJ,page:"Dashboard",roles:["admin","editor","content_creator","seo_specialist","ad_manager"]},{name:"Create Post",icon:J_,page:"CreatePost",roles:["admin","editor","content_creator"]},{name:"All Posts",icon:os,page:"Posts",roles:["admin","editor","content_creator","seo_specialist"]},{name:"Team",icon:Is,page:"TeamCollaboration",roles:["admin","editor"]},{name:"Subscriptions",icon:Ct,page:"Subscriptions",roles:null},{name:"Manage Subs",icon:Qk,page:"SubscriptionManage",roles:["admin"]},{name:"Analytics",icon:Ct,page:"Analytics",roles:["admin","editor","seo_specialist"]},{name:"Site Metrics",icon:Fa,page:"SiteMetrics",roles:["admin"]},{name:"Engagement",icon:Xr,page:"EngagementDashboard",roles:["admin","editor"]},{name:"Public Blog",icon:e8,page:"Blog",roles:["admin","editor","content_creator","seo_specialist","ad_manager"]},{name:"Forum",icon:li,page:"Forum",roles:null},{name:"Comments",icon:li,page:"CommentModeration",roles:["admin","editor"]},{name:"Content Calendar",icon:DZ,page:"ContentCalendar",roles:["admin","editor","content_creator"]},{name:"SEO Research",icon:lr,page:"SEOResearch",roles:["admin","editor","seo_specialist"]},{name:"Newsletter",icon:UJ,page:"NewsletterBuilder",roles:["admin","editor"]},{name:"AI Insights",icon:X_,page:"AIInsightsDashboard",roles:["admin","editor","seo_specialist"]},{name:"Social Threads",icon:Ad,page:"SocialThreads",roles:["admin","editor","content_creator"]},{name:"Distribution",icon:i8,page:"DistributionHub",roles:["admin","editor"]},{name:"Content Audit",icon:o8,page:"ContentAudit",roles:["admin","editor","seo_specialist"]},{name:"Scheduling",icon:Rn,page:"SchedulingDashboard",roles:["admin","editor","content_creator"]},{name:"Digest",icon:xr,page:"DigestSettings",roles:["admin","editor"]},{name:"Settings",icon:Uy,page:"Settings",roles:["admin","ad_manager"]}].filter(y=>!y.roles||y.roles.includes(n==null?void 0:n.role));return o?a.jsxs(a.Fragment,{children:[a.jsx(Rq,{}),e]}):a.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-white to-indigo-50/30",children:[a.jsx(Rq,{}),a.jsxs("div",{className:"lg:hidden fixed top-0 left-0 right-0 h-16 bg-white/80 backdrop-blur-xl border-b border-slate-200/50 z-50 px-4 flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center",children:a.jsx(Ct,{className:"w-4 h-4 text-white"})}),a.jsx("span",{className:"font-semibold text-slate-900",children:"TechBlog AI"})]}),a.jsx(ae,{variant:"ghost",size:"icon",onClick:()=>s(!i),children:i?a.jsx(jx,{className:"w-5 h-5"}):a.jsx(MJ,{className:"w-5 h-5"})})]}),a.jsx(hi,{children:i&&a.jsx(Pe.div,{initial:{opacity:0}
1207,animate:{opacity:1},exit:{opacity:0},className:"lg:hidden fixed inset-0 bg-black/20 backdrop-blur-sm z-40",onClick:()=>s(!1)})}),a.jsx(hi,{children:(i||window.innerWidth>=1024)&&a.jsxs(Pe.aside,{initial:{x:-280},animate:{x:0},exit:{x:-280},transition:{type:"spring",damping:25,stiffness:200},className:"fixed top-0 left-0 bottom-0 w-64 bg-white/80 backdrop-blur-xl border-r border-slate-200/50 z-50 lg:z-30 flex flex-col",children:[a.jsx("div",{className:"p-6 border-b border-slate-100",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center shadow-lg shadow-indigo-500/25",children:a.jsx(Ct,{className:"w-5 h-5 text-white"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"font-bold text-slate-900",children:"TechBlog AI"}),a.jsx("p",{className:"text-xs text-slate-500",children:"Newsletter to Blog"})]})]})}),a.jsx("nav",{className:"flex-1 p-4 space-y-1",children:f.map(y=>{const v=t===y.page;return a.jsxs(ft,{to:Xe(y.page),onClick:()=>s(!1),className:`flex items-center gap-3 px-4 py-3 rounded-xl transition-all duration-200 ${v?"bg-indigo-50 text-indigo-600 font-medium":"text-slate-600 hover:bg-slate-50 hover:text-slate-900"}`,children:[a.jsx(y.icon,{className:"w-5 h-5"}),a.jsx("span",{className:"flex-1",children:y.name}),y.page==="CommentModeration"&&l>0&&a.jsx(Se,{className:"bg-red-500 text-white text-xs h-5 min-w-5 flex items-center justify-center rounded-full px-1.5",children:l})]},y.page)})}),n&&a.jsxs("div",{className:"p-4 border-t border-slate-100",children:[a.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 mb-2",children:[a.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-indigo-400 to-purple-500 flex items-center justify-center text-white text-sm font-medium",children:((p=n.full_name)==null?void 0:p[0])||((x=(m=n.email)==null?void 0:m[0])==null?void 0:x.toUpperCase())}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-slate-900 truncate",children:n.full_name||"User"}),a.jsx("p",{className:"text-xs text-slate-500 truncate",children:n.email})]})]}),a.jsxs(ae,{variant:"ghost",className:"w-full justify-start text-slate-600 hover:text-slate-900 gap-3",onClick:()=>ce.auth.logout(),children:[a.jsx(AJ,{className:"w-4 h-4"}),"Sign Out"]})]})]})}),a.jsx("main",{className:"lg:pl-64 pt-16 lg:pt-0 min-h-screen",children:a.jsx("div",{className:"p-4 lg:p-8",children:e})})]})}const _6e={About:Lue,Analytics:gAe,Blog:K2e,BlogPost:yMe,CommentModeration:xMe,Contact:bMe,CreatePost:EMe,Dashboard:WMe,DigestSettings:QMe,Forum:JMe,ForumCreate:tDe,ForumThread:nDe,GmailCallback:rDe,PostEditor:ADe,Posts:CDe,Privacy:TDe,SchedulingDashboard:IDe,Settings:LDe,SubscriptionManage:$De,Subscriptions:BDe,TeamCollaboration:FDe,Terms:qDe,UserManagement:zDe,SiteMetrics:UDe,EngagementDashboard:WDe,ContentCalendar:f6e,SEOResearch:h6e,NewsletterBuilder:p6e,AIInsightsDashboard:m6e,SocialThreads:g6e,DistributionHub:y6e,ContentAudit:j6e},cX={mainPage:"Dashboard",Pages:_6e,Layout:N6e};function E6e(){const e=Md(),{isAuthenticated:t}=Fz(),{Pages:n,mainPage:r}=cX,i=r;return T.useEffect(()=>{var s;(s=window.parent)==null||s.postMessage({type:"app_changed_url",url:window.location.href},"*")},[e]),T.useEffect(()=>{const s=e.pathname;let o;if(s==="/"||s==="")o=i;else{const l=s.replace(/^\//,"").split("/")[0];o=Object.keys(n).find(d=>d.toLowerCase()===l.toLowerCase())||null}t&&o&&ce.appLogs.logUserInApp(o).catch(()=>{})},[e,t,n,i]),null}function P6e({}){var i;const t=Md().pathname.substring(1),{data:n,isFetched:r}=st({queryKey:["user"],queryFn:async()=>{try{return{user:await ce.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return a.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:a.jsx("div",{className:"max-w-md w-full",children:a.jsxs("div",{className:"text-center space-y-6",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),a.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),a.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",a.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&a.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:a.jsxs("div",{className:"flex items-start space-x-3",children:[a.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:a.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),a.jsxs("div",{className:"text-left space-y-1",children:[a.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),a.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),a.jsx("div",{className:"pt-6",children:a.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[a.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const k6e=()=>a.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:a.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:a.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),a.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),a.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),a.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[a.jsx("p",{children:"If you believe this is an error, you can:"}),a.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[a.jsx("li",{children:"Verify you are logged in with the correct account"}),a.jsx("li",{children:"Contact the app administrator for access"}),a.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),{Pages:uX,Layout:Iq,mainPage:O6e}=cX,dX=O6e,A6e=uX[dX],Mq=({children:e,currentPageName:t})=>Iq?a.jsx(Iq,{currentPageName:t,children:e}):a.jsx(a.Fragment,{children:e}),C6e=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:r}=Fz();if(t||e)return a.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:a.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return a.jsx(k6e,{});if(n.type==="auth_required")return r(),null}return a.jsxs(Lne,{children:[a.jsx(Sy,{path:"/",element:a.jsx(Mq,{currentPageName:dX,children:a.jsx(A6e,{})})}),Object.entries(uX).map(([i,s])=>a.jsx(Sy,{path:`/${i}`,element:a.jsx(Mq,{currentPageName:i,children:a.jsx(s,{})})},i)),a.jsx(Sy,{path:"*",element:a.jsx(P6e,{})})]})};function T6e(){return a.jsx(nae,{children:a.jsxs(Rte,{client:Wte,children:[a.jsxs(Vne,{children:[a.jsx(E6e,{}),a.jsx(C6e,{})]}),a.jsx(cte,{}),a.jsx(Hte,{})]})})}mZ.createRoot(document.getElementById("root")).render(a.jsx(T6e,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.