Файловый менеджер - Редактировать - /home/easybachat/pdfpro.pdfpanel.com/assets/index-BfIVsc0K.js
Ðазад
var eh=e=>{throw TypeError(e)};var iu=(e,t,n)=>t.has(e)||eh("Cannot "+n);var ee=(e,t,n)=>(iu(e,t,"read from private field"),n?n.call(e):t.get(e)),Pe=(e,t,n)=>t.has(e)?eh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),be=(e,t,n,r)=>(iu(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),lt=(e,t,n)=>(iu(e,t,"access private method"),n);var Ia=(e,t,n,r)=>({set _(o){be(e,t,o,n)},get _(){return ee(e,t,r)}});function Zw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Mt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qm={exports:{}},ds={},Um={exports:{}},_e={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var _a=Symbol.for("react.element"),Jw=Symbol.for("react.portal"),ex=Symbol.for("react.fragment"),tx=Symbol.for("react.strict_mode"),nx=Symbol.for("react.profiler"),rx=Symbol.for("react.provider"),ox=Symbol.for("react.context"),ix=Symbol.for("react.forward_ref"),ax=Symbol.for("react.suspense"),lx=Symbol.for("react.memo"),sx=Symbol.for("react.lazy"),th=Symbol.iterator;function ux(e){return e===null||typeof e!="object"?null:(e=th&&e[th]||e["@@iterator"],typeof e=="function"?e:null)}var Hm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vm=Object.assign,Wm={};function ai(e,t,n){this.props=e,this.context=t,this.refs=Wm,this.updater=n||Hm}ai.prototype.isReactComponent={};ai.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ai.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Km(){}Km.prototype=ai.prototype;function xf(e,t,n){this.props=e,this.context=t,this.refs=Wm,this.updater=n||Hm}var bf=xf.prototype=new Km;bf.constructor=xf;Vm(bf,ai.prototype);bf.isPureReactComponent=!0;var nh=Array.isArray,Gm=Object.prototype.hasOwnProperty,Ef={current:null},Ym={key:!0,ref:!0,__self:!0,__source:!0};function Qm(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)Gm.call(t,r)&&!Ym.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var s=Array(l),m=0;m<l;m++)s[m]=arguments[m+2];o.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:_a,type:e,key:i,ref:a,props:o,_owner:Ef.current}}function cx(e,t){return{$$typeof:_a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Sf(e){return typeof e=="object"&&e!==null&&e.$$typeof===_a}function fx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var rh=/\/+/g;function au(e,t){return typeof e=="object"&&e!==null&&e.key!=null?fx(""+e.key):t.toString(36)}function fl(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case _a:case Jw:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+au(a,0):r,nh(o)?(n="",e!=null&&(n=e.replace(rh,"$&/")+"/"),fl(o,t,n,"",function(m){return m})):o!=null&&(Sf(o)&&(o=cx(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(rh,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",nh(e))for(var l=0;l<e.length;l++){i=e[l];var s=r+au(i,l);a+=fl(i,t,n,s,o)}else if(s=ux(e),typeof s=="function")for(e=s.call(e),l=0;!(i=e.next()).done;)i=i.value,s=r+au(i,l++),a+=fl(i,t,n,s,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Fa(e,t,n){if(e==null)return e;var r=[],o=0;return fl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function dx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var wt={current:null},dl={transition:null},hx={ReactCurrentDispatcher:wt,ReactCurrentBatchConfig:dl,ReactCurrentOwner:Ef};function Xm(){throw Error("act(...) is not supported in production builds of React.")}_e.Children={map:Fa,forEach:function(e,t,n){Fa(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fa(e,function(){t++}),t},toArray:function(e){return Fa(e,function(t){return t})||[]},only:function(e){if(!Sf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_e.Component=ai;_e.Fragment=ex;_e.Profiler=nx;_e.PureComponent=xf;_e.StrictMode=tx;_e.Suspense=ax;_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hx;_e.act=Xm;_e.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Vm({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Ef.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in t)Gm.call(t,s)&&!Ym.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&l!==void 0?l[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){l=Array(s);for(var m=0;m<s;m++)l[m]=arguments[m+2];r.children=l}return{$$typeof:_a,type:e.type,key:o,ref:i,props:r,_owner:a}};_e.createContext=function(e){return e={$$typeof:ox,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:rx,_context:e},e.Consumer=e};_e.createElement=Qm;_e.createFactory=function(e){var t=Qm.bind(null,e);return t.type=e,t};_e.createRef=function(){return{current:null}};_e.forwardRef=function(e){return{$$typeof:ix,render:e}};_e.isValidElement=Sf;_e.lazy=function(e){return{$$typeof:sx,_payload:{_status:-1,_result:e},_init:dx}};_e.memo=function(e,t){return{$$typeof:lx,type:e,compare:t===void 0?null:t}};_e.startTransition=function(e){var t=dl.transition;dl.transition={};try{e()}finally{dl.transition=t}};_e.unstable_act=Xm;_e.useCallback=function(e,t){return wt.current.useCallback(e,t)};_e.useContext=function(e){return wt.current.useContext(e)};_e.useDebugValue=function(){};_e.useDeferredValue=function(e){return wt.current.useDeferredValue(e)};_e.useEffect=function(e,t){return wt.current.useEffect(e,t)};_e.useId=function(){return wt.current.useId()};_e.useImperativeHandle=function(e,t,n){return wt.current.useImperativeHandle(e,t,n)};_e.useInsertionEffect=function(e,t){return wt.current.useInsertionEffect(e,t)};_e.useLayoutEffect=function(e,t){return wt.current.useLayoutEffect(e,t)};_e.useMemo=function(e,t){return wt.current.useMemo(e,t)};_e.useReducer=function(e,t,n){return wt.current.useReducer(e,t,n)};_e.useRef=function(e){return wt.current.useRef(e)};_e.useState=function(e){return wt.current.useState(e)};_e.useSyncExternalStore=function(e,t,n){return wt.current.useSyncExternalStore(e,t,n)};_e.useTransition=function(){return wt.current.useTransition()};_e.version="18.3.1";Um.exports=_e;var N=Um.exports;const ae=wf(N),_f=Zw({__proto__:null,default:ae},[N]);/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var px=N,mx=Symbol.for("react.element"),vx=Symbol.for("react.fragment"),gx=Object.prototype.hasOwnProperty,yx=px.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,wx={key:!0,ref:!0,__self:!0,__source:!0};function Zm(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)gx.call(t,r)&&!wx.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:mx,type:e,key:i,ref:a,props:o,_owner:yx.current}}ds.Fragment=vx;ds.jsx=Zm;ds.jsxs=Zm;qm.exports=ds;var E=qm.exports,Jm={exports:{}},Bt={},ev={exports:{}},tv={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){function t(H,I){var M=H.length;H.push(I);e:for(;0<M;){var A=M-1>>>1,L=H[A];if(0<o(L,I))H[A]=I,H[M]=L,M=A;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var I=H[0],M=H.pop();if(M!==I){H[0]=M;e:for(var A=0,L=H.length,$=L>>>1;A<$;){var W=2*(A+1)-1,K=H[W],D=W+1,B=H[D];if(0>o(K,M))D<L&&0>o(B,K)?(H[A]=B,H[D]=M,A=D):(H[A]=K,H[W]=M,A=W);else if(D<L&&0>o(B,M))H[A]=B,H[D]=M,A=D;else break e}}return I}function o(H,I){var M=H.sortIndex-I.sortIndex;return M!==0?M:H.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],m=[],v=1,f=null,c=3,u=!1,x=!1,h=!1,g=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(H){for(var I=n(m);I!==null;){if(I.callback===null)r(m);else if(I.startTime<=H)r(m),I.sortIndex=I.expirationTime,t(s,I);else break;I=n(m)}}function y(H){if(h=!1,w(H),!x)if(n(s)!==null)x=!0,q(b);else{var I=n(m);I!==null&&V(y,I.startTime-H)}}function b(H,I){x=!1,h&&(h=!1,p(C),C=-1),u=!0;var M=c;try{for(w(I),f=n(s);f!==null&&(!(f.expirationTime>I)||H&&!_());){var A=f.callback;if(typeof A=="function"){f.callback=null,c=f.priorityLevel;var L=A(f.expirationTime<=I);I=e.unstable_now(),typeof L=="function"?f.callback=L:f===n(s)&&r(s),w(I)}else r(s);f=n(s)}if(f!==null)var $=!0;else{var W=n(m);W!==null&&V(y,W.startTime-I),$=!1}return $}finally{f=null,c=M,u=!1}}var T=!1,S=null,C=-1,P=5,k=-1;function _(){return!(e.unstable_now()-k<P)}function O(){if(S!==null){var H=e.unstable_now();k=H;var I=!0;try{I=S(!0,H)}finally{I?j():(T=!1,S=null)}}else T=!1}var j;if(typeof d=="function")j=function(){d(O)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,F=R.port2;R.port1.onmessage=O,j=function(){F.postMessage(null)}}else j=function(){g(O,0)};function q(H){S=H,T||(T=!0,j())}function V(H,I){C=g(function(){H(e.unstable_now())},I)}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(H){H.callback=null},e.unstable_continueExecution=function(){x||u||(x=!0,q(b))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return c},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(H){switch(c){case 1:case 2:case 3:var I=3;break;default:I=c}var M=c;c=I;try{return H()}finally{c=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,I){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var M=c;c=H;try{return I()}finally{c=M}},e.unstable_scheduleCallback=function(H,I,M){var A=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?A+M:A):M=A,H){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=M+L,H={id:v++,callback:I,priorityLevel:H,startTime:M,expirationTime:L,sortIndex:-1},M>A?(H.sortIndex=M,t(m,H),n(s)===null&&H===n(m)&&(h?(p(C),C=-1):h=!0,V(y,M-A))):(H.sortIndex=L,t(s,H),x||u||(x=!0,q(b))),H},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(H){var I=c;return function(){var M=c;c=I;try{return H.apply(this,arguments)}finally{c=M}}}})(tv);ev.exports=tv;var xx=ev.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var bx=N,$t=xx;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nv=new Set,Ji={};function uo(e,t){Qo(e,t),Qo(e+"Capture",t)}function Qo(e,t){for(Ji[e]=t,e=0;e<t.length;e++)nv.add(t[e])}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yu=Object.prototype.hasOwnProperty,Ex=/^[: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]*$/,oh={},ih={};function Sx(e){return Yu.call(ih,e)?!0:Yu.call(oh,e)?!1:Ex.test(e)?ih[e]=!0:(oh[e]=!0,!1)}function _x(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function kx(e,t,n,r){if(t===null||typeof t>"u"||_x(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function xt(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var it={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){it[e]=new xt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];it[t]=new xt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){it[e]=new xt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){it[e]=new xt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){it[e]=new xt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){it[e]=new xt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){it[e]=new xt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){it[e]=new xt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){it[e]=new xt(e,5,!1,e.toLowerCase(),null,!1,!1)});var kf=/[\-:]([a-z])/g;function Nf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(kf,Nf);it[t]=new xt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(kf,Nf);it[t]=new xt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(kf,Nf);it[t]=new xt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){it[e]=new xt(e,1,!1,e.toLowerCase(),null,!1,!1)});it.xlinkHref=new xt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){it[e]=new xt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Of(e,t,n,r){var o=it.hasOwnProperty(t)?it[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(kx(t,n,o,r)&&(n=null),r||o===null?Sx(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var tr=bx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$a=Symbol.for("react.element"),wo=Symbol.for("react.portal"),xo=Symbol.for("react.fragment"),Tf=Symbol.for("react.strict_mode"),Qu=Symbol.for("react.profiler"),rv=Symbol.for("react.provider"),ov=Symbol.for("react.context"),Cf=Symbol.for("react.forward_ref"),Xu=Symbol.for("react.suspense"),Zu=Symbol.for("react.suspense_list"),Pf=Symbol.for("react.memo"),cr=Symbol.for("react.lazy"),iv=Symbol.for("react.offscreen"),ah=Symbol.iterator;function Ni(e){return e===null||typeof e!="object"?null:(e=ah&&e[ah]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Object.assign,lu;function Fi(e){if(lu===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);lu=t&&t[1]||""}return` `+lu+e}var su=!1;function uu(e,t){if(!e||su)return"";su=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(m){var r=m}Reflect.construct(e,[],t)}else{try{t.call()}catch(m){r=m}e.call(t.prototype)}else{try{throw Error()}catch(m){r=m}e()}}catch(m){if(m&&r&&typeof m.stack=="string"){for(var o=m.stack.split(` `),i=r.stack.split(` `),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||o[a]!==i[l]){var s=` `+o[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{su=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fi(e):""}function Nx(e){switch(e.tag){case 5:return Fi(e.type);case 16:return Fi("Lazy");case 13:return Fi("Suspense");case 19:return Fi("SuspenseList");case 0:case 2:case 15:return e=uu(e.type,!1),e;case 11:return e=uu(e.type.render,!1),e;case 1:return e=uu(e.type,!0),e;default:return""}}function Ju(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xo:return"Fragment";case wo:return"Portal";case Qu:return"Profiler";case Tf:return"StrictMode";case Xu:return"Suspense";case Zu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ov:return(e.displayName||"Context")+".Consumer";case rv:return(e._context.displayName||"Context")+".Provider";case Cf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pf:return t=e.displayName||null,t!==null?t:Ju(e.type)||"Memo";case cr:t=e._payload,e=e._init;try{return Ju(e(t))}catch{}}return null}function Ox(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ju(t);case 8:return t===Tf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function av(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tx(e){var t=av(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ba(e){e._valueTracker||(e._valueTracker=Tx(e))}function lv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=av(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Tl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ec(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function lh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sv(e,t){t=t.checked,t!=null&&Of(e,"checked",t,!1)}function tc(e,t){sv(e,t);var n=Pr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nc(e,t.type,n):t.hasOwnProperty("defaultValue")&&nc(e,t.type,Pr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function nc(e,t,n){(t!=="number"||Tl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $i=Array.isArray;function Ao(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Pr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function rc(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ne(91));return Ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function uh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(ne(92));if($i(n)){if(1<n.length)throw Error(ne(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pr(n)}}function uv(e,t){var n=Pr(t.value),r=Pr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function ch(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function cv(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oc(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?cv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var za,fv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(za=za||document.createElement("div"),za.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=za.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ea(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ui={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},Cx=["Webkit","ms","Moz","O"];Object.keys(Ui).forEach(function(e){Cx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ui[t]=Ui[e]})});function dv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ui.hasOwnProperty(e)&&Ui[e]?(""+t).trim():t+"px"}function hv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=dv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Px=Ke({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 ic(e,t){if(t){if(Px[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function ac(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lc=null;function Af(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sc=null,jo=null,Ro=null;function fh(e){if(e=Oa(e)){if(typeof sc!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=gs(t),sc(e.stateNode,e.type,t))}}function pv(e){jo?Ro?Ro.push(e):Ro=[e]:jo=e}function mv(){if(jo){var e=jo,t=Ro;if(Ro=jo=null,fh(e),t)for(e=0;e<t.length;e++)fh(t[e])}}function vv(e,t){return e(t)}function gv(){}var cu=!1;function yv(e,t,n){if(cu)return e(t,n);cu=!0;try{return vv(e,t,n)}finally{cu=!1,(jo!==null||Ro!==null)&&(gv(),mv())}}function ta(e,t){var n=e.stateNode;if(n===null)return null;var r=gs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ne(231,t,typeof n));return n}var uc=!1;if(Yn)try{var Oi={};Object.defineProperty(Oi,"passive",{get:function(){uc=!0}}),window.addEventListener("test",Oi,Oi),window.removeEventListener("test",Oi,Oi)}catch{uc=!1}function Ax(e,t,n,r,o,i,a,l,s){var m=Array.prototype.slice.call(arguments,3);try{t.apply(n,m)}catch(v){this.onError(v)}}var Hi=!1,Cl=null,Pl=!1,cc=null,jx={onError:function(e){Hi=!0,Cl=e}};function Rx(e,t,n,r,o,i,a,l,s){Hi=!1,Cl=null,Ax.apply(jx,arguments)}function Lx(e,t,n,r,o,i,a,l,s){if(Rx.apply(this,arguments),Hi){if(Hi){var m=Cl;Hi=!1,Cl=null}else throw Error(ne(198));Pl||(Pl=!0,cc=m)}}function co(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function wv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function dh(e){if(co(e)!==e)throw Error(ne(188))}function Mx(e){var t=e.alternate;if(!t){if(t=co(e),t===null)throw Error(ne(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return dh(o),e;if(i===r)return dh(o),t;i=i.sibling}throw Error(ne(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a)throw Error(ne(189))}}if(n.alternate!==r)throw Error(ne(190))}if(n.tag!==3)throw Error(ne(188));return n.stateNode.current===n?e:t}function xv(e){return e=Mx(e),e!==null?bv(e):null}function bv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=bv(e);if(t!==null)return t;e=e.sibling}return null}var Ev=$t.unstable_scheduleCallback,hh=$t.unstable_cancelCallback,Dx=$t.unstable_shouldYield,Ix=$t.unstable_requestPaint,Qe=$t.unstable_now,Fx=$t.unstable_getCurrentPriorityLevel,jf=$t.unstable_ImmediatePriority,Sv=$t.unstable_UserBlockingPriority,Al=$t.unstable_NormalPriority,$x=$t.unstable_LowPriority,_v=$t.unstable_IdlePriority,hs=null,Cn=null;function Bx(e){if(Cn&&typeof Cn.onCommitFiberRoot=="function")try{Cn.onCommitFiberRoot(hs,e,void 0,(e.current.flags&128)===128)}catch{}}var sn=Math.clz32?Math.clz32:Ux,zx=Math.log,qx=Math.LN2;function Ux(e){return e>>>=0,e===0?32:31-(zx(e)/qx|0)|0}var qa=64,Ua=4194304;function Bi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function jl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~o;l!==0?r=Bi(l):(i&=a,i!==0&&(r=Bi(i)))}else a=n&~o,a!==0?r=Bi(a):i!==0&&(r=Bi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-sn(t),o=1<<n,r|=e[n],t&=~o;return r}function Hx(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vx(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-sn(i),l=1<<a,s=o[a];s===-1?(!(l&n)||l&r)&&(o[a]=Hx(l,t)):s<=t&&(e.expiredLanes|=l),i&=~l}}function fc(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function kv(){var e=qa;return qa<<=1,!(qa&4194240)&&(qa=64),e}function fu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ka(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-sn(t),e[t]=n}function Wx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-sn(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Rf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-sn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var De=0;function Nv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Ov,Lf,Tv,Cv,Pv,dc=!1,Ha=[],Er=null,Sr=null,_r=null,na=new Map,ra=new Map,dr=[],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 ph(e,t){switch(e){case"focusin":case"focusout":Er=null;break;case"dragenter":case"dragleave":Sr=null;break;case"mouseover":case"mouseout":_r=null;break;case"pointerover":case"pointerout":na.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ra.delete(t.pointerId)}}function Ti(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Oa(t),t!==null&&Lf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Gx(e,t,n,r,o){switch(t){case"focusin":return Er=Ti(Er,e,t,n,r,o),!0;case"dragenter":return Sr=Ti(Sr,e,t,n,r,o),!0;case"mouseover":return _r=Ti(_r,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return na.set(i,Ti(na.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ra.set(i,Ti(ra.get(i)||null,e,t,n,r,o)),!0}return!1}function Av(e){var t=Ur(e.target);if(t!==null){var n=co(t);if(n!==null){if(t=n.tag,t===13){if(t=wv(n),t!==null){e.blockedOn=t,Pv(e.priority,function(){Tv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hc(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);lc=r,n.target.dispatchEvent(r),lc=null}else return t=Oa(n),t!==null&&Lf(t),e.blockedOn=n,!1;t.shift()}return!0}function mh(e,t,n){hl(e)&&n.delete(t)}function Yx(){dc=!1,Er!==null&&hl(Er)&&(Er=null),Sr!==null&&hl(Sr)&&(Sr=null),_r!==null&&hl(_r)&&(_r=null),na.forEach(mh),ra.forEach(mh)}function Ci(e,t){e.blockedOn===t&&(e.blockedOn=null,dc||(dc=!0,$t.unstable_scheduleCallback($t.unstable_NormalPriority,Yx)))}function oa(e){function t(o){return Ci(o,e)}if(0<Ha.length){Ci(Ha[0],e);for(var n=1;n<Ha.length;n++){var r=Ha[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Er!==null&&Ci(Er,e),Sr!==null&&Ci(Sr,e),_r!==null&&Ci(_r,e),na.forEach(t),ra.forEach(t),n=0;n<dr.length;n++)r=dr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<dr.length&&(n=dr[0],n.blockedOn===null);)Av(n),n.blockedOn===null&&dr.shift()}var Lo=tr.ReactCurrentBatchConfig,Rl=!0;function Qx(e,t,n,r){var o=De,i=Lo.transition;Lo.transition=null;try{De=1,Mf(e,t,n,r)}finally{De=o,Lo.transition=i}}function Xx(e,t,n,r){var o=De,i=Lo.transition;Lo.transition=null;try{De=4,Mf(e,t,n,r)}finally{De=o,Lo.transition=i}}function Mf(e,t,n,r){if(Rl){var o=hc(e,t,n,r);if(o===null)bu(e,t,r,Ll,n),ph(e,r);else if(Gx(o,e,t,n,r))r.stopPropagation();else if(ph(e,r),t&4&&-1<Kx.indexOf(e)){for(;o!==null;){var i=Oa(o);if(i!==null&&Ov(i),i=hc(e,t,n,r),i===null&&bu(e,t,r,Ll,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else bu(e,t,r,null,n)}}var Ll=null;function hc(e,t,n,r){if(Ll=null,e=Af(r),e=Ur(e),e!==null)if(t=co(e),t===null)e=null;else if(n=t.tag,n===13){if(e=wv(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ll=e,null}function jv(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Fx()){case jf:return 1;case Sv:return 4;case Al:case $x:return 16;case _v:return 536870912;default:return 16}default:return 16}}var wr=null,Df=null,pl=null;function Rv(){if(pl)return pl;var e,t=Df,n=t.length,r,o="value"in wr?wr.value:wr.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return pl=o.slice(e,1<r?1-r:void 0)}function ml(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Va(){return!0}function vh(){return!1}function zt(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Va:vh,this.isPropagationStopped=vh,this}return Ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Va)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Va)},persist:function(){},isPersistent:Va}),t}var li={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},If=zt(li),Na=Ke({},li,{view:0,detail:0}),Zx=zt(Na),du,hu,Pi,ps=Ke({},Na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ff,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Pi&&(Pi&&e.type==="mousemove"?(du=e.screenX-Pi.screenX,hu=e.screenY-Pi.screenY):hu=du=0,Pi=e),du)},movementY:function(e){return"movementY"in e?e.movementY:hu}}),gh=zt(ps),Jx=Ke({},ps,{dataTransfer:0}),eb=zt(Jx),tb=Ke({},Na,{relatedTarget:0}),pu=zt(tb),nb=Ke({},li,{animationName:0,elapsedTime:0,pseudoElement:0}),rb=zt(nb),ob=Ke({},li,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ib=zt(ob),ab=Ke({},li,{data:0}),yh=zt(ab),lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sb={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"},ub={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ub[e])?!!t[e]:!1}function Ff(){return cb}var fb=Ke({},Na,{key:function(e){if(e.key){var t=lb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ml(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ff,charCode:function(e){return e.type==="keypress"?ml(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ml(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),db=zt(fb),hb=Ke({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wh=zt(hb),pb=Ke({},Na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ff}),mb=zt(pb),vb=Ke({},li,{propertyName:0,elapsedTime:0,pseudoElement:0}),gb=zt(vb),yb=Ke({},ps,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wb=zt(yb),xb=[9,13,27,32],$f=Yn&&"CompositionEvent"in window,Vi=null;Yn&&"documentMode"in document&&(Vi=document.documentMode);var bb=Yn&&"TextEvent"in window&&!Vi,Lv=Yn&&(!$f||Vi&&8<Vi&&11>=Vi),xh=" ",bh=!1;function Mv(e,t){switch(e){case"keyup":return xb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bo=!1;function Eb(e,t){switch(e){case"compositionend":return Dv(t);case"keypress":return t.which!==32?null:(bh=!0,xh);case"textInput":return e=t.data,e===xh&&bh?null:e;default:return null}}function Sb(e,t){if(bo)return e==="compositionend"||!$f&&Mv(e,t)?(e=Rv(),pl=Df=wr=null,bo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Lv&&t.locale!=="ko"?null:t.data;default:return null}}var _b={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 Eh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_b[e.type]:t==="textarea"}function Iv(e,t,n,r){pv(r),t=Ml(t,"onChange"),0<t.length&&(n=new If("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Wi=null,ia=null;function kb(e){Gv(e,0)}function ms(e){var t=_o(e);if(lv(t))return e}function Nb(e,t){if(e==="change")return t}var Fv=!1;if(Yn){var mu;if(Yn){var vu="oninput"in document;if(!vu){var Sh=document.createElement("div");Sh.setAttribute("oninput","return;"),vu=typeof Sh.oninput=="function"}mu=vu}else mu=!1;Fv=mu&&(!document.documentMode||9<document.documentMode)}function _h(){Wi&&(Wi.detachEvent("onpropertychange",$v),ia=Wi=null)}function $v(e){if(e.propertyName==="value"&&ms(ia)){var t=[];Iv(t,ia,e,Af(e)),yv(kb,t)}}function Ob(e,t,n){e==="focusin"?(_h(),Wi=t,ia=n,Wi.attachEvent("onpropertychange",$v)):e==="focusout"&&_h()}function Tb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ms(ia)}function Cb(e,t){if(e==="click")return ms(t)}function Pb(e,t){if(e==="input"||e==="change")return ms(t)}function Ab(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:Ab;function aa(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Yu.call(t,o)||!cn(e[o],t[o]))return!1}return!0}function kh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nh(e,t){var n=kh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kh(n)}}function Bv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zv(){for(var e=window,t=Tl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Tl(e.document)}return t}function Bf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jb(e){var t=zv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bv(n.ownerDocument.documentElement,n)){if(r!==null&&Bf(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Nh(n,i);var a=Nh(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Rb=Yn&&"documentMode"in document&&11>=document.documentMode,Eo=null,pc=null,Ki=null,mc=!1;function Oh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mc||Eo==null||Eo!==Tl(r)||(r=Eo,"selectionStart"in r&&Bf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ki&&aa(Ki,r)||(Ki=r,r=Ml(pc,"onSelect"),0<r.length&&(t=new If("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Eo)))}function Wa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var So={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionend:Wa("Transition","TransitionEnd")},gu={},qv={};Yn&&(qv=document.createElement("div").style,"AnimationEvent"in window||(delete So.animationend.animation,delete So.animationiteration.animation,delete So.animationstart.animation),"TransitionEvent"in window||delete So.transitionend.transition);function vs(e){if(gu[e])return gu[e];if(!So[e])return e;var t=So[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qv)return gu[e]=t[n];return e}var Uv=vs("animationend"),Hv=vs("animationiteration"),Vv=vs("animationstart"),Wv=vs("transitionend"),Kv=new Map,Th="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 Lr(e,t){Kv.set(e,t),uo(t,[e])}for(var yu=0;yu<Th.length;yu++){var wu=Th[yu],Lb=wu.toLowerCase(),Mb=wu[0].toUpperCase()+wu.slice(1);Lr(Lb,"on"+Mb)}Lr(Uv,"onAnimationEnd");Lr(Hv,"onAnimationIteration");Lr(Vv,"onAnimationStart");Lr("dblclick","onDoubleClick");Lr("focusin","onFocus");Lr("focusout","onBlur");Lr(Wv,"onTransitionEnd");Qo("onMouseEnter",["mouseout","mouseover"]);Qo("onMouseLeave",["mouseout","mouseover"]);Qo("onPointerEnter",["pointerout","pointerover"]);Qo("onPointerLeave",["pointerout","pointerover"]);uo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));uo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));uo("onBeforeInput",["compositionend","keypress","textInput","paste"]);uo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));uo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));uo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zi="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(" "),Db=new Set("cancel close invalid load scroll toggle".split(" ").concat(zi));function Ch(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Lx(r,t,void 0,e),e.currentTarget=null}function Gv(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,m=l.currentTarget;if(l=l.listener,s!==i&&o.isPropagationStopped())break e;Ch(o,l,m),i=s}else for(a=0;a<r.length;a++){if(l=r[a],s=l.instance,m=l.currentTarget,l=l.listener,s!==i&&o.isPropagationStopped())break e;Ch(o,l,m),i=s}}}if(Pl)throw e=cc,Pl=!1,cc=null,e}function ze(e,t){var n=t[xc];n===void 0&&(n=t[xc]=new Set);var r=e+"__bubble";n.has(r)||(Yv(t,e,2,!1),n.add(r))}function xu(e,t,n){var r=0;t&&(r|=4),Yv(n,e,r,t)}var Ka="_reactListening"+Math.random().toString(36).slice(2);function la(e){if(!e[Ka]){e[Ka]=!0,nv.forEach(function(n){n!=="selectionchange"&&(Db.has(n)||xu(n,!1,e),xu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ka]||(t[Ka]=!0,xu("selectionchange",!1,t))}}function Yv(e,t,n,r){switch(jv(t)){case 1:var o=Qx;break;case 4:o=Xx;break;default:o=Mf}n=o.bind(null,t,n,e),o=void 0,!uc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function bu(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&(s=a.stateNode.containerInfo,s===o||s.nodeType===8&&s.parentNode===o))return;a=a.return}for(;l!==null;){if(a=Ur(l),a===null)return;if(s=a.tag,s===5||s===6){r=i=a;continue e}l=l.parentNode}}r=r.return}yv(function(){var m=i,v=Af(n),f=[];e:{var c=Kv.get(e);if(c!==void 0){var u=If,x=e;switch(e){case"keypress":if(ml(n)===0)break e;case"keydown":case"keyup":u=db;break;case"focusin":x="focus",u=pu;break;case"focusout":x="blur",u=pu;break;case"beforeblur":case"afterblur":u=pu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=eb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=mb;break;case Uv:case Hv:case Vv:u=rb;break;case Wv:u=gb;break;case"scroll":u=Zx;break;case"wheel":u=wb;break;case"copy":case"cut":case"paste":u=ib;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=wh}var h=(t&4)!==0,g=!h&&e==="scroll",p=h?c!==null?c+"Capture":null:c;h=[];for(var d=m,w;d!==null;){w=d;var y=w.stateNode;if(w.tag===5&&y!==null&&(w=y,p!==null&&(y=ta(d,p),y!=null&&h.push(sa(d,y,w)))),g)break;d=d.return}0<h.length&&(c=new u(c,x,null,n,v),f.push({event:c,listeners:h}))}}if(!(t&7)){e:{if(c=e==="mouseover"||e==="pointerover",u=e==="mouseout"||e==="pointerout",c&&n!==lc&&(x=n.relatedTarget||n.fromElement)&&(Ur(x)||x[Qn]))break e;if((u||c)&&(c=v.window===v?v:(c=v.ownerDocument)?c.defaultView||c.parentWindow:window,u?(x=n.relatedTarget||n.toElement,u=m,x=x?Ur(x):null,x!==null&&(g=co(x),x!==g||x.tag!==5&&x.tag!==6)&&(x=null)):(u=null,x=m),u!==x)){if(h=gh,y="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(h=wh,y="onPointerLeave",p="onPointerEnter",d="pointer"),g=u==null?c:_o(u),w=x==null?c:_o(x),c=new h(y,d+"leave",u,n,v),c.target=g,c.relatedTarget=w,y=null,Ur(v)===m&&(h=new h(p,d+"enter",x,n,v),h.target=w,h.relatedTarget=g,y=h),g=y,u&&x)t:{for(h=u,p=x,d=0,w=h;w;w=mo(w))d++;for(w=0,y=p;y;y=mo(y))w++;for(;0<d-w;)h=mo(h),d--;for(;0<w-d;)p=mo(p),w--;for(;d--;){if(h===p||p!==null&&h===p.alternate)break t;h=mo(h),p=mo(p)}h=null}else h=null;u!==null&&Ph(f,c,u,h,!1),x!==null&&g!==null&&Ph(f,g,x,h,!0)}}e:{if(c=m?_o(m):window,u=c.nodeName&&c.nodeName.toLowerCase(),u==="select"||u==="input"&&c.type==="file")var b=Nb;else if(Eh(c))if(Fv)b=Pb;else{b=Tb;var T=Ob}else(u=c.nodeName)&&u.toLowerCase()==="input"&&(c.type==="checkbox"||c.type==="radio")&&(b=Cb);if(b&&(b=b(e,m))){Iv(f,b,n,v);break e}T&&T(e,c,m),e==="focusout"&&(T=c._wrapperState)&&T.controlled&&c.type==="number"&&nc(c,"number",c.value)}switch(T=m?_o(m):window,e){case"focusin":(Eh(T)||T.contentEditable==="true")&&(Eo=T,pc=m,Ki=null);break;case"focusout":Ki=pc=Eo=null;break;case"mousedown":mc=!0;break;case"contextmenu":case"mouseup":case"dragend":mc=!1,Oh(f,n,v);break;case"selectionchange":if(Rb)break;case"keydown":case"keyup":Oh(f,n,v)}var S;if($f)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else bo?Mv(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Lv&&n.locale!=="ko"&&(bo||C!=="onCompositionStart"?C==="onCompositionEnd"&&bo&&(S=Rv()):(wr=v,Df="value"in wr?wr.value:wr.textContent,bo=!0)),T=Ml(m,C),0<T.length&&(C=new yh(C,e,null,n,v),f.push({event:C,listeners:T}),S?C.data=S:(S=Dv(n),S!==null&&(C.data=S)))),(S=bb?Eb(e,n):Sb(e,n))&&(m=Ml(m,"onBeforeInput"),0<m.length&&(v=new yh("onBeforeInput","beforeinput",null,n,v),f.push({event:v,listeners:m}),v.data=S))}Gv(f,t)})}function sa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ml(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ta(e,n),i!=null&&r.unshift(sa(e,i,o)),i=ta(e,t),i!=null&&r.push(sa(e,i,o))),e=e.return}return r}function mo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ph(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,s=l.alternate,m=l.stateNode;if(s!==null&&s===r)break;l.tag===5&&m!==null&&(l=m,o?(s=ta(n,i),s!=null&&a.unshift(sa(n,s,l))):o||(s=ta(n,i),s!=null&&a.push(sa(n,s,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Ib=/\r\n?/g,Fb=/\u0000|\uFFFD/g;function Ah(e){return(typeof e=="string"?e:""+e).replace(Ib,` `).replace(Fb,"")}function Ga(e,t,n){if(t=Ah(t),Ah(e)!==t&&n)throw Error(ne(425))}function Dl(){}var vc=null,gc=null;function yc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wc=typeof setTimeout=="function"?setTimeout:void 0,$b=typeof clearTimeout=="function"?clearTimeout:void 0,jh=typeof Promise=="function"?Promise:void 0,Bb=typeof queueMicrotask=="function"?queueMicrotask:typeof jh<"u"?function(e){return jh.resolve(null).then(e).catch(zb)}:wc;function zb(e){setTimeout(function(){throw e})}function Eu(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),oa(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);oa(t)}function kr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Rh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var si=Math.random().toString(36).slice(2),Nn="__reactFiber$"+si,ua="__reactProps$"+si,Qn="__reactContainer$"+si,xc="__reactEvents$"+si,qb="__reactListeners$"+si,Ub="__reactHandles$"+si;function Ur(e){var t=e[Nn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qn]||n[Nn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Rh(e);e!==null;){if(n=e[Nn])return n;e=Rh(e)}return t}e=n,n=e.parentNode}return null}function Oa(e){return e=e[Nn]||e[Qn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function _o(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ne(33))}function gs(e){return e[ua]||null}var bc=[],ko=-1;function Mr(e){return{current:e}}function Ue(e){0>ko||(e.current=bc[ko],bc[ko]=null,ko--)}function Fe(e,t){ko++,bc[ko]=e.current,e.current=t}var Ar={},dt=Mr(Ar),_t=Mr(!1),eo=Ar;function Xo(e,t){var n=e.type.contextTypes;if(!n)return Ar;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function kt(e){return e=e.childContextTypes,e!=null}function Il(){Ue(_t),Ue(dt)}function Lh(e,t,n){if(dt.current!==Ar)throw Error(ne(168));Fe(dt,t),Fe(_t,n)}function Qv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(ne(108,Ox(e)||"Unknown",o));return Ke({},n,r)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ar,eo=dt.current,Fe(dt,e),Fe(_t,_t.current),!0}function Mh(e,t,n){var r=e.stateNode;if(!r)throw Error(ne(169));n?(e=Qv(e,t,eo),r.__reactInternalMemoizedMergedChildContext=e,Ue(_t),Ue(dt),Fe(dt,e)):Ue(_t),Fe(_t,n)}var qn=null,ys=!1,Su=!1;function Xv(e){qn===null?qn=[e]:qn.push(e)}function Hb(e){ys=!0,Xv(e)}function Dr(){if(!Su&&qn!==null){Su=!0;var e=0,t=De;try{var n=qn;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}qn=null,ys=!1}catch(o){throw qn!==null&&(qn=qn.slice(e+1)),Ev(jf,Dr),o}finally{De=t,Su=!1}}return null}var No=[],Oo=0,$l=null,Bl=0,Ut=[],Ht=0,to=null,Hn=1,Vn="";function Br(e,t){No[Oo++]=Bl,No[Oo++]=$l,$l=e,Bl=t}function Zv(e,t,n){Ut[Ht++]=Hn,Ut[Ht++]=Vn,Ut[Ht++]=to,to=e;var r=Hn;e=Vn;var o=32-sn(r)-1;r&=~(1<<o),n+=1;var i=32-sn(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Hn=1<<32-sn(t)+o|n<<o|r,Vn=i+e}else Hn=1<<i|n<<o|r,Vn=e}function zf(e){e.return!==null&&(Br(e,1),Zv(e,1,0))}function qf(e){for(;e===$l;)$l=No[--Oo],No[Oo]=null,Bl=No[--Oo],No[Oo]=null;for(;e===to;)to=Ut[--Ht],Ut[Ht]=null,Vn=Ut[--Ht],Ut[Ht]=null,Hn=Ut[--Ht],Ut[Ht]=null}var It=null,Dt=null,He=!1,ln=null;function Jv(e,t){var n=Vt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Dh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,It=e,Dt=kr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,It=e,Dt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=to!==null?{id:Hn,overflow:Vn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Vt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,It=e,Dt=null,!0):!1;default:return!1}}function Ec(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Sc(e){if(He){var t=Dt;if(t){var n=t;if(!Dh(e,t)){if(Ec(e))throw Error(ne(418));t=kr(n.nextSibling);var r=It;t&&Dh(e,t)?Jv(r,n):(e.flags=e.flags&-4097|2,He=!1,It=e)}}else{if(Ec(e))throw Error(ne(418));e.flags=e.flags&-4097|2,He=!1,It=e}}}function Ih(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;It=e}function Ya(e){if(e!==It)return!1;if(!He)return Ih(e),He=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yc(e.type,e.memoizedProps)),t&&(t=Dt)){if(Ec(e))throw eg(),Error(ne(418));for(;t;)Jv(e,t),t=kr(t.nextSibling)}if(Ih(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ne(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Dt=kr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Dt=null}}else Dt=It?kr(e.stateNode.nextSibling):null;return!0}function eg(){for(var e=Dt;e;)e=kr(e.nextSibling)}function Zo(){Dt=It=null,He=!1}function Uf(e){ln===null?ln=[e]:ln.push(e)}var Vb=tr.ReactCurrentBatchConfig;function Ai(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(ne(309));var r=n.stateNode}if(!r)throw Error(ne(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var l=o.refs;a===null?delete l[i]:l[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(ne(284));if(!n._owner)throw Error(ne(290,e))}return e}function Qa(e,t){throw e=Object.prototype.toString.call(t),Error(ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Fh(e){var t=e._init;return t(e._payload)}function tg(e){function t(p,d){if(e){var w=p.deletions;w===null?(p.deletions=[d],p.flags|=16):w.push(d)}}function n(p,d){if(!e)return null;for(;d!==null;)t(p,d),d=d.sibling;return null}function r(p,d){for(p=new Map;d!==null;)d.key!==null?p.set(d.key,d):p.set(d.index,d),d=d.sibling;return p}function o(p,d){return p=Cr(p,d),p.index=0,p.sibling=null,p}function i(p,d,w){return p.index=w,e?(w=p.alternate,w!==null?(w=w.index,w<d?(p.flags|=2,d):w):(p.flags|=2,d)):(p.flags|=1048576,d)}function a(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,d,w,y){return d===null||d.tag!==6?(d=Pu(w,p.mode,y),d.return=p,d):(d=o(d,w),d.return=p,d)}function s(p,d,w,y){var b=w.type;return b===xo?v(p,d,w.props.children,y,w.key):d!==null&&(d.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===cr&&Fh(b)===d.type)?(y=o(d,w.props),y.ref=Ai(p,d,w),y.return=p,y):(y=El(w.type,w.key,w.props,null,p.mode,y),y.ref=Ai(p,d,w),y.return=p,y)}function m(p,d,w,y){return d===null||d.tag!==4||d.stateNode.containerInfo!==w.containerInfo||d.stateNode.implementation!==w.implementation?(d=Au(w,p.mode,y),d.return=p,d):(d=o(d,w.children||[]),d.return=p,d)}function v(p,d,w,y,b){return d===null||d.tag!==7?(d=Jr(w,p.mode,y,b),d.return=p,d):(d=o(d,w),d.return=p,d)}function f(p,d,w){if(typeof d=="string"&&d!==""||typeof d=="number")return d=Pu(""+d,p.mode,w),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case $a:return w=El(d.type,d.key,d.props,null,p.mode,w),w.ref=Ai(p,null,d),w.return=p,w;case wo:return d=Au(d,p.mode,w),d.return=p,d;case cr:var y=d._init;return f(p,y(d._payload),w)}if($i(d)||Ni(d))return d=Jr(d,p.mode,w,null),d.return=p,d;Qa(p,d)}return null}function c(p,d,w,y){var b=d!==null?d.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return b!==null?null:l(p,d,""+w,y);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case $a:return w.key===b?s(p,d,w,y):null;case wo:return w.key===b?m(p,d,w,y):null;case cr:return b=w._init,c(p,d,b(w._payload),y)}if($i(w)||Ni(w))return b!==null?null:v(p,d,w,y,null);Qa(p,w)}return null}function u(p,d,w,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return p=p.get(w)||null,l(d,p,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case $a:return p=p.get(y.key===null?w:y.key)||null,s(d,p,y,b);case wo:return p=p.get(y.key===null?w:y.key)||null,m(d,p,y,b);case cr:var T=y._init;return u(p,d,w,T(y._payload),b)}if($i(y)||Ni(y))return p=p.get(w)||null,v(d,p,y,b,null);Qa(d,y)}return null}function x(p,d,w,y){for(var b=null,T=null,S=d,C=d=0,P=null;S!==null&&C<w.length;C++){S.index>C?(P=S,S=null):P=S.sibling;var k=c(p,S,w[C],y);if(k===null){S===null&&(S=P);break}e&&S&&k.alternate===null&&t(p,S),d=i(k,d,C),T===null?b=k:T.sibling=k,T=k,S=P}if(C===w.length)return n(p,S),He&&Br(p,C),b;if(S===null){for(;C<w.length;C++)S=f(p,w[C],y),S!==null&&(d=i(S,d,C),T===null?b=S:T.sibling=S,T=S);return He&&Br(p,C),b}for(S=r(p,S);C<w.length;C++)P=u(S,p,C,w[C],y),P!==null&&(e&&P.alternate!==null&&S.delete(P.key===null?C:P.key),d=i(P,d,C),T===null?b=P:T.sibling=P,T=P);return e&&S.forEach(function(_){return t(p,_)}),He&&Br(p,C),b}function h(p,d,w,y){var b=Ni(w);if(typeof b!="function")throw Error(ne(150));if(w=b.call(w),w==null)throw Error(ne(151));for(var T=b=null,S=d,C=d=0,P=null,k=w.next();S!==null&&!k.done;C++,k=w.next()){S.index>C?(P=S,S=null):P=S.sibling;var _=c(p,S,k.value,y);if(_===null){S===null&&(S=P);break}e&&S&&_.alternate===null&&t(p,S),d=i(_,d,C),T===null?b=_:T.sibling=_,T=_,S=P}if(k.done)return n(p,S),He&&Br(p,C),b;if(S===null){for(;!k.done;C++,k=w.next())k=f(p,k.value,y),k!==null&&(d=i(k,d,C),T===null?b=k:T.sibling=k,T=k);return He&&Br(p,C),b}for(S=r(p,S);!k.done;C++,k=w.next())k=u(S,p,C,k.value,y),k!==null&&(e&&k.alternate!==null&&S.delete(k.key===null?C:k.key),d=i(k,d,C),T===null?b=k:T.sibling=k,T=k);return e&&S.forEach(function(O){return t(p,O)}),He&&Br(p,C),b}function g(p,d,w,y){if(typeof w=="object"&&w!==null&&w.type===xo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case $a:e:{for(var b=w.key,T=d;T!==null;){if(T.key===b){if(b=w.type,b===xo){if(T.tag===7){n(p,T.sibling),d=o(T,w.props.children),d.return=p,p=d;break e}}else if(T.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===cr&&Fh(b)===T.type){n(p,T.sibling),d=o(T,w.props),d.ref=Ai(p,T,w),d.return=p,p=d;break e}n(p,T);break}else t(p,T);T=T.sibling}w.type===xo?(d=Jr(w.props.children,p.mode,y,w.key),d.return=p,p=d):(y=El(w.type,w.key,w.props,null,p.mode,y),y.ref=Ai(p,d,w),y.return=p,p=y)}return a(p);case wo:e:{for(T=w.key;d!==null;){if(d.key===T)if(d.tag===4&&d.stateNode.containerInfo===w.containerInfo&&d.stateNode.implementation===w.implementation){n(p,d.sibling),d=o(d,w.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=Au(w,p.mode,y),d.return=p,p=d}return a(p);case cr:return T=w._init,g(p,d,T(w._payload),y)}if($i(w))return x(p,d,w,y);if(Ni(w))return h(p,d,w,y);Qa(p,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,d!==null&&d.tag===6?(n(p,d.sibling),d=o(d,w),d.return=p,p=d):(n(p,d),d=Pu(w,p.mode,y),d.return=p,p=d),a(p)):n(p,d)}return g}var Jo=tg(!0),ng=tg(!1),zl=Mr(null),ql=null,To=null,Hf=null;function Vf(){Hf=To=ql=null}function Wf(e){var t=zl.current;Ue(zl),e._currentValue=t}function _c(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Mo(e,t){ql=e,Hf=To=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(St=!0),e.firstContext=null)}function Kt(e){var t=e._currentValue;if(Hf!==e)if(e={context:e,memoizedValue:t,next:null},To===null){if(ql===null)throw Error(ne(308));To=e,ql.dependencies={lanes:0,firstContext:e}}else To=To.next=e;return t}var Hr=null;function Kf(e){Hr===null?Hr=[e]:Hr.push(e)}function rg(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Kf(t)):(n.next=o.next,o.next=n),t.interleaved=n,Xn(e,r)}function Xn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var fr=!1;function Gf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function og(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Wn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Nr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ce&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Xn(e,n)}return o=r.interleaved,o===null?(t.next=t,Kf(r)):(t.next=o.next,o.next=t),r.interleaved=t,Xn(e,n)}function vl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rf(e,n)}}function $h(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ul(e,t,n,r){var o=e.updateQueue;fr=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var s=l,m=s.next;s.next=null,a===null?i=m:a.next=m,a=s;var v=e.alternate;v!==null&&(v=v.updateQueue,l=v.lastBaseUpdate,l!==a&&(l===null?v.firstBaseUpdate=m:l.next=m,v.lastBaseUpdate=s))}if(i!==null){var f=o.baseState;a=0,v=m=s=null,l=i;do{var c=l.lane,u=l.eventTime;if((r&c)===c){v!==null&&(v=v.next={eventTime:u,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,h=l;switch(c=t,u=n,h.tag){case 1:if(x=h.payload,typeof x=="function"){f=x.call(u,f,c);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=h.payload,c=typeof x=="function"?x.call(u,f,c):x,c==null)break e;f=Ke({},f,c);break e;case 2:fr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,c=o.effects,c===null?o.effects=[l]:c.push(l))}else u={eventTime:u,lane:c,tag:l.tag,payload:l.payload,callback:l.callback,next:null},v===null?(m=v=u,s=f):v=v.next=u,a|=c;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;c=l,l=c.next,c.next=null,o.lastBaseUpdate=c,o.shared.pending=null}}while(!0);if(v===null&&(s=f),o.baseState=s,o.firstBaseUpdate=m,o.lastBaseUpdate=v,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);ro|=a,e.lanes=a,e.memoizedState=f}}function Bh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(ne(191,o));o.call(r)}}}var Ta={},Pn=Mr(Ta),ca=Mr(Ta),fa=Mr(Ta);function Vr(e){if(e===Ta)throw Error(ne(174));return e}function Yf(e,t){switch(Fe(fa,t),Fe(ca,e),Fe(Pn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:oc(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=oc(t,e)}Ue(Pn),Fe(Pn,t)}function ei(){Ue(Pn),Ue(ca),Ue(fa)}function ig(e){Vr(fa.current);var t=Vr(Pn.current),n=oc(t,e.type);t!==n&&(Fe(ca,e),Fe(Pn,n))}function Qf(e){ca.current===e&&(Ue(Pn),Ue(ca))}var Ve=Mr(0);function Hl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var _u=[];function Xf(){for(var e=0;e<_u.length;e++)_u[e]._workInProgressVersionPrimary=null;_u.length=0}var gl=tr.ReactCurrentDispatcher,ku=tr.ReactCurrentBatchConfig,no=0,We=null,Ze=null,et=null,Vl=!1,Gi=!1,da=0,Wb=0;function st(){throw Error(ne(321))}function Zf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cn(e[n],t[n]))return!1;return!0}function Jf(e,t,n,r,o,i){if(no=i,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,gl.current=e===null||e.memoizedState===null?Qb:Xb,e=n(r,o),Gi){i=0;do{if(Gi=!1,da=0,25<=i)throw Error(ne(301));i+=1,et=Ze=null,t.updateQueue=null,gl.current=Zb,e=n(r,o)}while(Gi)}if(gl.current=Wl,t=Ze!==null&&Ze.next!==null,no=0,et=Ze=We=null,Vl=!1,t)throw Error(ne(300));return e}function ed(){var e=da!==0;return da=0,e}function bn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?We.memoizedState=et=e:et=et.next=e,et}function Gt(){if(Ze===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=et===null?We.memoizedState:et.next;if(t!==null)et=t,Ze=e;else{if(e===null)throw Error(ne(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},et===null?We.memoizedState=et=e:et=et.next=e}return et}function ha(e,t){return typeof t=="function"?t(e):t}function Nu(e){var t=Gt(),n=t.queue;if(n===null)throw Error(ne(311));n.lastRenderedReducer=e;var r=Ze,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=a=null,s=null,m=i;do{var v=m.lane;if((no&v)===v)s!==null&&(s=s.next={lane:0,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null}),r=m.hasEagerState?m.eagerState:e(r,m.action);else{var f={lane:v,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null};s===null?(l=s=f,a=r):s=s.next=f,We.lanes|=v,ro|=v}m=m.next}while(m!==null&&m!==i);s===null?a=r:s.next=l,cn(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,We.lanes|=i,ro|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ou(e){var t=Gt(),n=t.queue;if(n===null)throw Error(ne(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);cn(i,t.memoizedState)||(St=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ag(){}function lg(e,t){var n=We,r=Gt(),o=t(),i=!cn(r.memoizedState,o);if(i&&(r.memoizedState=o,St=!0),r=r.queue,td(cg.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||et!==null&&et.memoizedState.tag&1){if(n.flags|=2048,pa(9,ug.bind(null,n,r,o,t),void 0,null),nt===null)throw Error(ne(349));no&30||sg(n,t,o)}return o}function sg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ug(e,t,n,r){t.value=n,t.getSnapshot=r,fg(t)&&dg(e)}function cg(e,t,n){return n(function(){fg(t)&&dg(e)})}function fg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cn(e,n)}catch{return!0}}function dg(e){var t=Xn(e,1);t!==null&&un(t,e,1,-1)}function zh(e){var t=bn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:e},t.queue=e,e=e.dispatch=Yb.bind(null,We,e),[t.memoizedState,e]}function pa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function hg(){return Gt().memoizedState}function yl(e,t,n,r){var o=bn();We.flags|=e,o.memoizedState=pa(1|t,n,void 0,r===void 0?null:r)}function ws(e,t,n,r){var o=Gt();r=r===void 0?null:r;var i=void 0;if(Ze!==null){var a=Ze.memoizedState;if(i=a.destroy,r!==null&&Zf(r,a.deps)){o.memoizedState=pa(t,n,i,r);return}}We.flags|=e,o.memoizedState=pa(1|t,n,i,r)}function qh(e,t){return yl(8390656,8,e,t)}function td(e,t){return ws(2048,8,e,t)}function pg(e,t){return ws(4,2,e,t)}function mg(e,t){return ws(4,4,e,t)}function vg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gg(e,t,n){return n=n!=null?n.concat([e]):null,ws(4,4,vg.bind(null,t,e),n)}function nd(){}function yg(e,t){var n=Gt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wg(e,t){var n=Gt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xg(e,t,n){return no&21?(cn(n,t)||(n=kv(),We.lanes|=n,ro|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,St=!0),e.memoizedState=n)}function Kb(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=ku.transition;ku.transition={};try{e(!1),t()}finally{De=n,ku.transition=r}}function bg(){return Gt().memoizedState}function Gb(e,t,n){var r=Tr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Eg(e))Sg(t,n);else if(n=rg(e,t,n,r),n!==null){var o=yt();un(n,e,r,o),_g(n,t,r)}}function Yb(e,t,n){var r=Tr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eg(e))Sg(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(o.hasEagerState=!0,o.eagerState=l,cn(l,a)){var s=t.interleaved;s===null?(o.next=o,Kf(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=rg(e,t,o,r),n!==null&&(o=yt(),un(n,e,r,o),_g(n,t,r))}}function Eg(e){var t=e.alternate;return e===We||t!==null&&t===We}function Sg(e,t){Gi=Vl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function _g(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Rf(e,n)}}var Wl={readContext:Kt,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useInsertionEffect:st,useLayoutEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useMutableSource:st,useSyncExternalStore:st,useId:st,unstable_isNewReconciler:!1},Qb={readContext:Kt,useCallback:function(e,t){return bn().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:qh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,yl(4194308,4,vg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yl(4194308,4,e,t)},useInsertionEffect:function(e,t){return yl(4,2,e,t)},useMemo:function(e,t){var n=bn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Gb.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=bn();return e={current:e},t.memoizedState=e},useState:zh,useDebugValue:nd,useDeferredValue:function(e){return bn().memoizedState=e},useTransition:function(){var e=zh(!1),t=e[0];return e=Kb.bind(null,e[1]),bn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,o=bn();if(He){if(n===void 0)throw Error(ne(407));n=n()}else{if(n=t(),nt===null)throw Error(ne(349));no&30||sg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,qh(cg.bind(null,r,i,e),[e]),r.flags|=2048,pa(9,ug.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=bn(),t=nt.identifierPrefix;if(He){var n=Vn,r=Hn;n=(r&~(1<<32-sn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=da++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Wb++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Xb={readContext:Kt,useCallback:yg,useContext:Kt,useEffect:td,useImperativeHandle:gg,useInsertionEffect:pg,useLayoutEffect:mg,useMemo:wg,useReducer:Nu,useRef:hg,useState:function(){return Nu(ha)},useDebugValue:nd,useDeferredValue:function(e){var t=Gt();return xg(t,Ze.memoizedState,e)},useTransition:function(){var e=Nu(ha)[0],t=Gt().memoizedState;return[e,t]},useMutableSource:ag,useSyncExternalStore:lg,useId:bg,unstable_isNewReconciler:!1},Zb={readContext:Kt,useCallback:yg,useContext:Kt,useEffect:td,useImperativeHandle:gg,useInsertionEffect:pg,useLayoutEffect:mg,useMemo:wg,useReducer:Ou,useRef:hg,useState:function(){return Ou(ha)},useDebugValue:nd,useDeferredValue:function(e){var t=Gt();return Ze===null?t.memoizedState=e:xg(t,Ze.memoizedState,e)},useTransition:function(){var e=Ou(ha)[0],t=Gt().memoizedState;return[e,t]},useMutableSource:ag,useSyncExternalStore:lg,useId:bg,unstable_isNewReconciler:!1};function tn(e,t){if(e&&e.defaultProps){t=Ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function kc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xs={isMounted:function(e){return(e=e._reactInternals)?co(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=yt(),o=Tr(e),i=Wn(r,o);i.payload=t,n!=null&&(i.callback=n),t=Nr(e,i,o),t!==null&&(un(t,e,o,r),vl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=yt(),o=Tr(e),i=Wn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Nr(e,i,o),t!==null&&(un(t,e,o,r),vl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yt(),r=Tr(e),o=Wn(n,r);o.tag=2,t!=null&&(o.callback=t),t=Nr(e,o,r),t!==null&&(un(t,e,r,n),vl(t,e,r))}};function Uh(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!aa(n,r)||!aa(o,i):!0}function kg(e,t,n){var r=!1,o=Ar,i=t.contextType;return typeof i=="object"&&i!==null?i=Kt(i):(o=kt(t)?eo:dt.current,r=t.contextTypes,i=(r=r!=null)?Xo(e,o):Ar),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Hh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xs.enqueueReplaceState(t,t.state,null)}function Nc(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Gf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Kt(i):(i=kt(t)?eo:dt.current,o.context=Xo(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(kc(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&xs.enqueueReplaceState(o,o.state,null),Ul(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function ti(e,t){try{var n="",r=t;do n+=Nx(r),r=r.return;while(r);var o=n}catch(i){o=` Error generating stack: `+i.message+` `+i.stack}return{value:e,source:t,stack:o,digest:null}}function Tu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Oc(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Jb=typeof WeakMap=="function"?WeakMap:Map;function Ng(e,t,n){n=Wn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gl||(Gl=!0,Ic=r),Oc(e,t)},n}function Og(e,t,n){n=Wn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Oc(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Oc(e,t),typeof r!="function"&&(Or===null?Or=new Set([this]):Or.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Vh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Jb;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=hE.bind(null,e,t,n),t.then(e,e))}function Wh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Kh(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Wn(-1,1),t.tag=2,Nr(n,t,1))),n.lanes|=1),e)}var eE=tr.ReactCurrentOwner,St=!1;function mt(e,t,n,r){t.child=e===null?ng(t,null,n,r):Jo(t,e.child,n,r)}function Gh(e,t,n,r,o){n=n.render;var i=t.ref;return Mo(t,o),r=Jf(e,t,n,r,i,o),n=ed(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zn(e,t,o)):(He&&n&&zf(t),t.flags|=1,mt(e,t,r,o),t.child)}function Yh(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!cd(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Tg(e,t,i,r,o)):(e=El(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:aa,n(a,r)&&e.ref===t.ref)return Zn(e,t,o)}return t.flags|=1,e=Cr(i,r),e.ref=t.ref,e.return=t,t.child=e}function Tg(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(aa(i,r)&&e.ref===t.ref)if(St=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(St=!0);else return t.lanes=e.lanes,Zn(e,t,o)}return Tc(e,t,n,r,o)}function Cg(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(Po,Rt),Rt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fe(Po,Rt),Rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Fe(Po,Rt),Rt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Fe(Po,Rt),Rt|=r;return mt(e,t,o,n),t.child}function Pg(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tc(e,t,n,r,o){var i=kt(n)?eo:dt.current;return i=Xo(t,i),Mo(t,o),n=Jf(e,t,n,r,i,o),r=ed(),e!==null&&!St?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zn(e,t,o)):(He&&r&&zf(t),t.flags|=1,mt(e,t,n,o),t.child)}function Qh(e,t,n,r,o){if(kt(n)){var i=!0;Fl(t)}else i=!1;if(Mo(t,o),t.stateNode===null)wl(e,t),kg(t,n,r),Nc(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,m=n.contextType;typeof m=="object"&&m!==null?m=Kt(m):(m=kt(n)?eo:dt.current,m=Xo(t,m));var v=n.getDerivedStateFromProps,f=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||s!==m)&&Hh(t,a,r,m),fr=!1;var c=t.memoizedState;a.state=c,Ul(t,r,a,o),s=t.memoizedState,l!==r||c!==s||_t.current||fr?(typeof v=="function"&&(kc(t,n,v,r),s=t.memoizedState),(l=fr||Uh(t,n,l,r,c,s,m))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=m,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,og(e,t),l=t.memoizedProps,m=t.type===t.elementType?l:tn(t.type,l),a.props=m,f=t.pendingProps,c=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=Kt(s):(s=kt(n)?eo:dt.current,s=Xo(t,s));var u=n.getDerivedStateFromProps;(v=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||c!==s)&&Hh(t,a,r,s),fr=!1,c=t.memoizedState,a.state=c,Ul(t,r,a,o);var x=t.memoizedState;l!==f||c!==x||_t.current||fr?(typeof u=="function"&&(kc(t,n,u,r),x=t.memoizedState),(m=fr||Uh(t,n,m,r,c,x,s)||!1)?(v||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,x,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,x,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),a.props=r,a.state=x,a.context=s,r=m):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&c===e.memoizedState||(t.flags|=1024),r=!1)}return Cc(e,t,n,r,i,o)}function Cc(e,t,n,r,o,i){Pg(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&Mh(t,n,!1),Zn(e,t,i);r=t.stateNode,eE.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Jo(t,e.child,null,i),t.child=Jo(t,null,l,i)):mt(e,t,l,i),t.memoizedState=r.state,o&&Mh(t,n,!0),t.child}function Ag(e){var t=e.stateNode;t.pendingContext?Lh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lh(e,t.context,!1),Yf(e,t.containerInfo)}function Xh(e,t,n,r,o){return Zo(),Uf(o),t.flags|=256,mt(e,t,n,r),t.child}var Pc={dehydrated:null,treeContext:null,retryLane:0};function Ac(e){return{baseLanes:e,cachePool:null,transitions:null}}function jg(e,t,n){var r=t.pendingProps,o=Ve.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Fe(Ve,o&1),e===null)return Sc(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Ss(a,r,0,null),e=Jr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ac(n),t.memoizedState=Pc,e):rd(t,a));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return tE(e,t,a,r,l,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,l=o.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Cr(o,s),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=Cr(l,i):(i=Jr(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Ac(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=Pc,r}return i=e.child,e=i.sibling,r=Cr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function rd(e,t){return t=Ss({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Xa(e,t,n,r){return r!==null&&Uf(r),Jo(t,e.child,null,n),e=rd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tE(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=Tu(Error(ne(422))),Xa(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Ss({mode:"visible",children:r.children},o,0,null),i=Jr(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Jo(t,e.child,null,a),t.child.memoizedState=Ac(a),t.memoizedState=Pc,i);if(!(t.mode&1))return Xa(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(ne(419)),r=Tu(i,r,void 0),Xa(e,t,a,r)}if(l=(a&e.childLanes)!==0,St||l){if(r=nt,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Xn(e,o),un(r,e,o,-1))}return ud(),r=Tu(Error(ne(421))),Xa(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=pE.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Dt=kr(o.nextSibling),It=t,He=!0,ln=null,e!==null&&(Ut[Ht++]=Hn,Ut[Ht++]=Vn,Ut[Ht++]=to,Hn=e.id,Vn=e.overflow,to=t),t=rd(t,r.children),t.flags|=4096,t)}function Zh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_c(e.return,t,n)}function Cu(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Rg(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(mt(e,t,r.children,n),r=Ve.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zh(e,n,t);else if(e.tag===19)Zh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Fe(Ve,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Hl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Cu(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Hl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Cu(t,!0,n,null,i);break;case"together":Cu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function wl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ro|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ne(153));if(t.child!==null){for(e=t.child,n=Cr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Cr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function nE(e,t,n){switch(t.tag){case 3:Ag(t),Zo();break;case 5:ig(t);break;case 1:kt(t.type)&&Fl(t);break;case 4:Yf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Fe(zl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Fe(Ve,Ve.current&1),t.flags|=128,null):n&t.child.childLanes?jg(e,t,n):(Fe(Ve,Ve.current&1),e=Zn(e,t,n),e!==null?e.sibling:null);Fe(Ve,Ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Fe(Ve,Ve.current),r)break;return null;case 22:case 23:return t.lanes=0,Cg(e,t,n)}return Zn(e,t,n)}var Lg,jc,Mg,Dg;Lg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};jc=function(){};Mg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Vr(Pn.current);var i=null;switch(n){case"input":o=ec(e,o),r=ec(e,r),i=[];break;case"select":o=Ke({},o,{value:void 0}),r=Ke({},r,{value:void 0}),i=[];break;case"textarea":o=rc(e,o),r=rc(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Dl)}ic(n,r);var a;n=null;for(m in o)if(!r.hasOwnProperty(m)&&o.hasOwnProperty(m)&&o[m]!=null)if(m==="style"){var l=o[m];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else m!=="dangerouslySetInnerHTML"&&m!=="children"&&m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(Ji.hasOwnProperty(m)?i||(i=[]):(i=i||[]).push(m,null));for(m in r){var s=r[m];if(l=o!=null?o[m]:void 0,r.hasOwnProperty(m)&&s!==l&&(s!=null||l!=null))if(m==="style")if(l){for(a in l)!l.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&l[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(m,n)),n=s;else m==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(i=i||[]).push(m,s)):m==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(m,""+s):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&(Ji.hasOwnProperty(m)?(s!=null&&m==="onScroll"&&ze("scroll",e),i||l===s||(i=[])):(i=i||[]).push(m,s))}n&&(i=i||[]).push("style",n);var m=i;(t.updateQueue=m)&&(t.flags|=4)}};Dg=function(e,t,n,r){n!==r&&(t.flags|=4)};function ji(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function rE(e,t,n){var r=t.pendingProps;switch(qf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return kt(t.type)&&Il(),ut(t),null;case 3:return r=t.stateNode,ei(),Ue(_t),Ue(dt),Xf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ya(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ln!==null&&(Bc(ln),ln=null))),jc(e,t),ut(t),null;case 5:Qf(t);var o=Vr(fa.current);if(n=t.type,e!==null&&t.stateNode!=null)Mg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(ne(166));return ut(t),null}if(e=Vr(Pn.current),Ya(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Nn]=t,r[ua]=i,e=(t.mode&1)!==0,n){case"dialog":ze("cancel",r),ze("close",r);break;case"iframe":case"object":case"embed":ze("load",r);break;case"video":case"audio":for(o=0;o<zi.length;o++)ze(zi[o],r);break;case"source":ze("error",r);break;case"img":case"image":case"link":ze("error",r),ze("load",r);break;case"details":ze("toggle",r);break;case"input":lh(r,i),ze("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ze("invalid",r);break;case"textarea":uh(r,i),ze("invalid",r)}ic(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Ga(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Ga(r.textContent,l,e),o=["children",""+l]):Ji.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&ze("scroll",r)}switch(n){case"input":Ba(r),sh(r,i,!0);break;case"textarea":Ba(r),ch(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Dl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=cv(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Nn]=t,e[ua]=r,Lg(e,t,!1,!1),t.stateNode=e;e:{switch(a=ac(n,r),n){case"dialog":ze("cancel",e),ze("close",e),o=r;break;case"iframe":case"object":case"embed":ze("load",e),o=r;break;case"video":case"audio":for(o=0;o<zi.length;o++)ze(zi[o],e);o=r;break;case"source":ze("error",e),o=r;break;case"img":case"image":case"link":ze("error",e),ze("load",e),o=r;break;case"details":ze("toggle",e),o=r;break;case"input":lh(e,r),o=ec(e,r),ze("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ke({},r,{value:void 0}),ze("invalid",e);break;case"textarea":uh(e,r),o=rc(e,r),ze("invalid",e);break;default:o=r}ic(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var s=l[i];i==="style"?hv(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&fv(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&ea(e,s):typeof s=="number"&&ea(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ji.hasOwnProperty(i)?s!=null&&i==="onScroll"&&ze("scroll",e):s!=null&&Of(e,i,s,a))}switch(n){case"input":Ba(e),sh(e,r,!1);break;case"textarea":Ba(e),ch(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Ao(e,!!r.multiple,i,!1):r.defaultValue!=null&&Ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Dl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ut(t),null;case 6:if(e&&t.stateNode!=null)Dg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(ne(166));if(n=Vr(fa.current),Vr(Pn.current),Ya(t)){if(r=t.stateNode,n=t.memoizedProps,r[Nn]=t,(i=r.nodeValue!==n)&&(e=It,e!==null))switch(e.tag){case 3:Ga(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ga(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Nn]=t,t.stateNode=r}return ut(t),null;case 13:if(Ue(Ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(He&&Dt!==null&&t.mode&1&&!(t.flags&128))eg(),Zo(),t.flags|=98560,i=!1;else if(i=Ya(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(ne(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ne(317));i[Nn]=t}else Zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ut(t),i=!1}else ln!==null&&(Bc(ln),ln=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ve.current&1?Je===0&&(Je=3):ud())),t.updateQueue!==null&&(t.flags|=4),ut(t),null);case 4:return ei(),jc(e,t),e===null&&la(t.stateNode.containerInfo),ut(t),null;case 10:return Wf(t.type._context),ut(t),null;case 17:return kt(t.type)&&Il(),ut(t),null;case 19:if(Ue(Ve),i=t.memoizedState,i===null)return ut(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)ji(i,!1);else{if(Je!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Hl(e),a!==null){for(t.flags|=128,ji(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fe(Ve,Ve.current&1|2),t.child}e=e.sibling}i.tail!==null&&Qe()>ni&&(t.flags|=128,r=!0,ji(i,!1),t.lanes=4194304)}else{if(!r)if(e=Hl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ji(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!He)return ut(t),null}else 2*Qe()-i.renderingStartTime>ni&&n!==1073741824&&(t.flags|=128,r=!0,ji(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Qe(),t.sibling=null,n=Ve.current,Fe(Ve,r?n&1|2:n&1),t):(ut(t),null);case 22:case 23:return sd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rt&1073741824&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function oE(e,t){switch(qf(t),t.tag){case 1:return kt(t.type)&&Il(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ei(),Ue(_t),Ue(dt),Xf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Qf(t),null;case 13:if(Ue(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ue(Ve),null;case 4:return ei(),null;case 10:return Wf(t.type._context),null;case 22:case 23:return sd(),null;case 24:return null;default:return null}}var Za=!1,ft=!1,iE=typeof WeakSet=="function"?WeakSet:Set,de=null;function Co(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function Rc(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var Jh=!1;function aE(e,t){if(vc=Rl,e=zv(),Bf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,s=-1,m=0,v=0,f=e,c=null;t:for(;;){for(var u;f!==n||o!==0&&f.nodeType!==3||(l=a+o),f!==i||r!==0&&f.nodeType!==3||(s=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(u=f.firstChild)!==null;)c=f,f=u;for(;;){if(f===e)break t;if(c===n&&++m===o&&(l=a),c===i&&++v===r&&(s=a),(u=f.nextSibling)!==null)break;f=c,c=f.parentNode}f=u}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(gc={focusedElem:e,selectionRange:n},Rl=!1,de=t;de!==null;)if(t=de,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,de=e;else for(;de!==null;){t=de;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var h=x.memoizedProps,g=x.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?h:tn(t.type,h),g);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(y){Ye(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,de=e;break}de=t.return}return x=Jh,Jh=!1,x}function Yi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Rc(t,n,i)}o=o.next}while(o!==r)}}function bs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Lc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ig(e){var t=e.alternate;t!==null&&(e.alternate=null,Ig(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nn],delete t[ua],delete t[xc],delete t[qb],delete t[Ub])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fg(e){return e.tag===5||e.tag===3||e.tag===4}function ep(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Mc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Dl));else if(r!==4&&(e=e.child,e!==null))for(Mc(e,t,n),e=e.sibling;e!==null;)Mc(e,t,n),e=e.sibling}function Dc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Dc(e,t,n),e=e.sibling;e!==null;)Dc(e,t,n),e=e.sibling}var rt=null,an=!1;function ir(e,t,n){for(n=n.child;n!==null;)$g(e,t,n),n=n.sibling}function $g(e,t,n){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(hs,n)}catch{}switch(n.tag){case 5:ft||Co(n,t);case 6:var r=rt,o=an;rt=null,ir(e,t,n),rt=r,an=o,rt!==null&&(an?(e=rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rt.removeChild(n.stateNode));break;case 18:rt!==null&&(an?(e=rt,n=n.stateNode,e.nodeType===8?Eu(e.parentNode,n):e.nodeType===1&&Eu(e,n),oa(e)):Eu(rt,n.stateNode));break;case 4:r=rt,o=an,rt=n.stateNode.containerInfo,an=!0,ir(e,t,n),rt=r,an=o;break;case 0:case 11:case 14:case 15:if(!ft&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Rc(n,t,a),o=o.next}while(o!==r)}ir(e,t,n);break;case 1:if(!ft&&(Co(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ye(n,t,l)}ir(e,t,n);break;case 21:ir(e,t,n);break;case 22:n.mode&1?(ft=(r=ft)||n.memoizedState!==null,ir(e,t,n),ft=r):ir(e,t,n);break;default:ir(e,t,n)}}function tp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new iE),t.forEach(function(r){var o=mE.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Zt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:rt=l.stateNode,an=!1;break e;case 3:rt=l.stateNode.containerInfo,an=!0;break e;case 4:rt=l.stateNode.containerInfo,an=!0;break e}l=l.return}if(rt===null)throw Error(ne(160));$g(i,a,o),rt=null,an=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(m){Ye(o,t,m)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bg(t,e),t=t.sibling}function Bg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Zt(t,e),wn(e),r&4){try{Yi(3,e,e.return),bs(3,e)}catch(h){Ye(e,e.return,h)}try{Yi(5,e,e.return)}catch(h){Ye(e,e.return,h)}}break;case 1:Zt(t,e),wn(e),r&512&&n!==null&&Co(n,n.return);break;case 5:if(Zt(t,e),wn(e),r&512&&n!==null&&Co(n,n.return),e.flags&32){var o=e.stateNode;try{ea(o,"")}catch(h){Ye(e,e.return,h)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,l=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&sv(o,i),ac(l,a);var m=ac(l,i);for(a=0;a<s.length;a+=2){var v=s[a],f=s[a+1];v==="style"?hv(o,f):v==="dangerouslySetInnerHTML"?fv(o,f):v==="children"?ea(o,f):Of(o,v,f,m)}switch(l){case"input":tc(o,i);break;case"textarea":uv(o,i);break;case"select":var c=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var u=i.value;u!=null?Ao(o,!!i.multiple,u,!1):c!==!!i.multiple&&(i.defaultValue!=null?Ao(o,!!i.multiple,i.defaultValue,!0):Ao(o,!!i.multiple,i.multiple?[]:"",!1))}o[ua]=i}catch(h){Ye(e,e.return,h)}}break;case 6:if(Zt(t,e),wn(e),r&4){if(e.stateNode===null)throw Error(ne(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(h){Ye(e,e.return,h)}}break;case 3:if(Zt(t,e),wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{oa(t.containerInfo)}catch(h){Ye(e,e.return,h)}break;case 4:Zt(t,e),wn(e);break;case 13:Zt(t,e),wn(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(ad=Qe())),r&4&&tp(e);break;case 22:if(v=n!==null&&n.memoizedState!==null,e.mode&1?(ft=(m=ft)||v,Zt(t,e),ft=m):Zt(t,e),wn(e),r&8192){if(m=e.memoizedState!==null,(e.stateNode.isHidden=m)&&!v&&e.mode&1)for(de=e,v=e.child;v!==null;){for(f=de=v;de!==null;){switch(c=de,u=c.child,c.tag){case 0:case 11:case 14:case 15:Yi(4,c,c.return);break;case 1:Co(c,c.return);var x=c.stateNode;if(typeof x.componentWillUnmount=="function"){r=c,n=c.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(h){Ye(r,n,h)}}break;case 5:Co(c,c.return);break;case 22:if(c.memoizedState!==null){rp(f);continue}}u!==null?(u.return=c,de=u):rp(f)}v=v.sibling}e:for(v=null,f=e;;){if(f.tag===5){if(v===null){v=f;try{o=f.stateNode,m?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,s=f.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,l.style.display=dv("display",a))}catch(h){Ye(e,e.return,h)}}}else if(f.tag===6){if(v===null)try{f.stateNode.nodeValue=m?"":f.memoizedProps}catch(h){Ye(e,e.return,h)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;v===f&&(v=null),f=f.return}v===f&&(v=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Zt(t,e),wn(e),r&4&&tp(e);break;case 21:break;default:Zt(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Fg(n)){var r=n;break e}n=n.return}throw Error(ne(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(ea(o,""),r.flags&=-33);var i=ep(e);Dc(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,l=ep(e);Mc(e,l,a);break;default:throw Error(ne(161))}}catch(s){Ye(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function lE(e,t,n){de=e,zg(e)}function zg(e,t,n){for(var r=(e.mode&1)!==0;de!==null;){var o=de,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Za;if(!a){var l=o.alternate,s=l!==null&&l.memoizedState!==null||ft;l=Za;var m=ft;if(Za=a,(ft=s)&&!m)for(de=o;de!==null;)a=de,s=a.child,a.tag===22&&a.memoizedState!==null?op(o):s!==null?(s.return=a,de=s):op(o);for(;i!==null;)de=i,zg(i),i=i.sibling;de=o,Za=l,ft=m}np(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,de=i):np(e)}}function np(e){for(;de!==null;){var t=de;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ft||bs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ft)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:tn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Bh(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Bh(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var m=t.alternate;if(m!==null){var v=m.memoizedState;if(v!==null){var f=v.dehydrated;f!==null&&oa(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ne(163))}ft||t.flags&512&&Lc(t)}catch(c){Ye(t,t.return,c)}}if(t===e){de=null;break}if(n=t.sibling,n!==null){n.return=t.return,de=n;break}de=t.return}}function rp(e){for(;de!==null;){var t=de;if(t===e){de=null;break}var n=t.sibling;if(n!==null){n.return=t.return,de=n;break}de=t.return}}function op(e){for(;de!==null;){var t=de;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bs(4,t)}catch(s){Ye(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){Ye(t,o,s)}}var i=t.return;try{Lc(t)}catch(s){Ye(t,i,s)}break;case 5:var a=t.return;try{Lc(t)}catch(s){Ye(t,a,s)}}}catch(s){Ye(t,t.return,s)}if(t===e){de=null;break}var l=t.sibling;if(l!==null){l.return=t.return,de=l;break}de=t.return}}var sE=Math.ceil,Kl=tr.ReactCurrentDispatcher,od=tr.ReactCurrentOwner,Wt=tr.ReactCurrentBatchConfig,Ce=0,nt=null,Xe=null,ot=0,Rt=0,Po=Mr(0),Je=0,ma=null,ro=0,Es=0,id=0,Qi=null,Et=null,ad=0,ni=1/0,zn=null,Gl=!1,Ic=null,Or=null,Ja=!1,xr=null,Yl=0,Xi=0,Fc=null,xl=-1,bl=0;function yt(){return Ce&6?Qe():xl!==-1?xl:xl=Qe()}function Tr(e){return e.mode&1?Ce&2&&ot!==0?ot&-ot:Vb.transition!==null?(bl===0&&(bl=kv()),bl):(e=De,e!==0||(e=window.event,e=e===void 0?16:jv(e.type)),e):1}function un(e,t,n,r){if(50<Xi)throw Xi=0,Fc=null,Error(ne(185));ka(e,n,r),(!(Ce&2)||e!==nt)&&(e===nt&&(!(Ce&2)&&(Es|=n),Je===4&&hr(e,ot)),Nt(e,r),n===1&&Ce===0&&!(t.mode&1)&&(ni=Qe()+500,ys&&Dr()))}function Nt(e,t){var n=e.callbackNode;Vx(e,t);var r=jl(e,e===nt?ot:0);if(r===0)n!==null&&hh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&hh(n),t===1)e.tag===0?Hb(ip.bind(null,e)):Xv(ip.bind(null,e)),Bb(function(){!(Ce&6)&&Dr()}),n=null;else{switch(Nv(r)){case 1:n=jf;break;case 4:n=Sv;break;case 16:n=Al;break;case 536870912:n=_v;break;default:n=Al}n=Yg(n,qg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qg(e,t){if(xl=-1,bl=0,Ce&6)throw Error(ne(327));var n=e.callbackNode;if(Do()&&e.callbackNode!==n)return null;var r=jl(e,e===nt?ot:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ql(e,r);else{t=r;var o=Ce;Ce|=2;var i=Hg();(nt!==e||ot!==t)&&(zn=null,ni=Qe()+500,Zr(e,t));do try{fE();break}catch(l){Ug(e,l)}while(!0);Vf(),Kl.current=i,Ce=o,Xe!==null?t=0:(nt=null,ot=0,t=Je)}if(t!==0){if(t===2&&(o=fc(e),o!==0&&(r=o,t=$c(e,o))),t===1)throw n=ma,Zr(e,0),hr(e,r),Nt(e,Qe()),n;if(t===6)hr(e,r);else{if(o=e.current.alternate,!(r&30)&&!uE(o)&&(t=Ql(e,r),t===2&&(i=fc(e),i!==0&&(r=i,t=$c(e,i))),t===1))throw n=ma,Zr(e,0),hr(e,r),Nt(e,Qe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(ne(345));case 2:zr(e,Et,zn);break;case 3:if(hr(e,r),(r&130023424)===r&&(t=ad+500-Qe(),10<t)){if(jl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){yt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=wc(zr.bind(null,e,Et,zn),t);break}zr(e,Et,zn);break;case 4:if(hr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-sn(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*sE(r/1960))-r,10<r){e.timeoutHandle=wc(zr.bind(null,e,Et,zn),r);break}zr(e,Et,zn);break;case 5:zr(e,Et,zn);break;default:throw Error(ne(329))}}}return Nt(e,Qe()),e.callbackNode===n?qg.bind(null,e):null}function $c(e,t){var n=Qi;return e.current.memoizedState.isDehydrated&&(Zr(e,t).flags|=256),e=Ql(e,t),e!==2&&(t=Et,Et=n,t!==null&&Bc(t)),e}function Bc(e){Et===null?Et=e:Et.push.apply(Et,e)}function uE(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!cn(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function hr(e,t){for(t&=~id,t&=~Es,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-sn(t),r=1<<n;e[n]=-1,t&=~r}}function ip(e){if(Ce&6)throw Error(ne(327));Do();var t=jl(e,0);if(!(t&1))return Nt(e,Qe()),null;var n=Ql(e,t);if(e.tag!==0&&n===2){var r=fc(e);r!==0&&(t=r,n=$c(e,r))}if(n===1)throw n=ma,Zr(e,0),hr(e,t),Nt(e,Qe()),n;if(n===6)throw Error(ne(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zr(e,Et,zn),Nt(e,Qe()),null}function ld(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(ni=Qe()+500,ys&&Dr())}}function oo(e){xr!==null&&xr.tag===0&&!(Ce&6)&&Do();var t=Ce;Ce|=1;var n=Wt.transition,r=De;try{if(Wt.transition=null,De=1,e)return e()}finally{De=r,Wt.transition=n,Ce=t,!(Ce&6)&&Dr()}}function sd(){Rt=Po.current,Ue(Po)}function Zr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,$b(n)),Xe!==null)for(n=Xe.return;n!==null;){var r=n;switch(qf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Il();break;case 3:ei(),Ue(_t),Ue(dt),Xf();break;case 5:Qf(r);break;case 4:ei();break;case 13:Ue(Ve);break;case 19:Ue(Ve);break;case 10:Wf(r.type._context);break;case 22:case 23:sd()}n=n.return}if(nt=e,Xe=e=Cr(e.current,null),ot=Rt=t,Je=0,ma=null,id=Es=ro=0,Et=Qi=null,Hr!==null){for(t=0;t<Hr.length;t++)if(n=Hr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}Hr=null}return e}function Ug(e,t){do{var n=Xe;try{if(Vf(),gl.current=Wl,Vl){for(var r=We.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Vl=!1}if(no=0,et=Ze=We=null,Gi=!1,da=0,od.current=null,n===null||n.return===null){Je=1,ma=t,Xe=null;break}e:{var i=e,a=n.return,l=n,s=t;if(t=ot,l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var m=s,v=l,f=v.tag;if(!(v.mode&1)&&(f===0||f===11||f===15)){var c=v.alternate;c?(v.updateQueue=c.updateQueue,v.memoizedState=c.memoizedState,v.lanes=c.lanes):(v.updateQueue=null,v.memoizedState=null)}var u=Wh(a);if(u!==null){u.flags&=-257,Kh(u,a,l,i,t),u.mode&1&&Vh(i,m,t),t=u,s=m;var x=t.updateQueue;if(x===null){var h=new Set;h.add(s),t.updateQueue=h}else x.add(s);break e}else{if(!(t&1)){Vh(i,m,t),ud();break e}s=Error(ne(426))}}else if(He&&l.mode&1){var g=Wh(a);if(g!==null){!(g.flags&65536)&&(g.flags|=256),Kh(g,a,l,i,t),Uf(ti(s,l));break e}}i=s=ti(s,l),Je!==4&&(Je=2),Qi===null?Qi=[i]:Qi.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=Ng(i,s,t);$h(i,p);break e;case 1:l=s;var d=i.type,w=i.stateNode;if(!(i.flags&128)&&(typeof d.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Or===null||!Or.has(w)))){i.flags|=65536,t&=-t,i.lanes|=t;var y=Og(i,l,t);$h(i,y);break e}}i=i.return}while(i!==null)}Wg(n)}catch(b){t=b,Xe===n&&n!==null&&(Xe=n=n.return);continue}break}while(!0)}function Hg(){var e=Kl.current;return Kl.current=Wl,e===null?Wl:e}function ud(){(Je===0||Je===3||Je===2)&&(Je=4),nt===null||!(ro&268435455)&&!(Es&268435455)||hr(nt,ot)}function Ql(e,t){var n=Ce;Ce|=2;var r=Hg();(nt!==e||ot!==t)&&(zn=null,Zr(e,t));do try{cE();break}catch(o){Ug(e,o)}while(!0);if(Vf(),Ce=n,Kl.current=r,Xe!==null)throw Error(ne(261));return nt=null,ot=0,Je}function cE(){for(;Xe!==null;)Vg(Xe)}function fE(){for(;Xe!==null&&!Dx();)Vg(Xe)}function Vg(e){var t=Gg(e.alternate,e,Rt);e.memoizedProps=e.pendingProps,t===null?Wg(e):Xe=t,od.current=null}function Wg(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=oE(n,t),n!==null){n.flags&=32767,Xe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Je=6,Xe=null;return}}else if(n=rE(n,t,Rt),n!==null){Xe=n;return}if(t=t.sibling,t!==null){Xe=t;return}Xe=t=e}while(t!==null);Je===0&&(Je=5)}function zr(e,t,n){var r=De,o=Wt.transition;try{Wt.transition=null,De=1,dE(e,t,n,r)}finally{Wt.transition=o,De=r}return null}function dE(e,t,n,r){do Do();while(xr!==null);if(Ce&6)throw Error(ne(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ne(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Wx(e,i),e===nt&&(Xe=nt=null,ot=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ja||(Ja=!0,Yg(Al,function(){return Do(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Wt.transition,Wt.transition=null;var a=De;De=1;var l=Ce;Ce|=4,od.current=null,aE(e,n),Bg(n,e),jb(gc),Rl=!!vc,gc=vc=null,e.current=n,lE(n),Ix(),Ce=l,De=a,Wt.transition=i}else e.current=n;if(Ja&&(Ja=!1,xr=e,Yl=o),i=e.pendingLanes,i===0&&(Or=null),Bx(n.stateNode),Nt(e,Qe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Gl)throw Gl=!1,e=Ic,Ic=null,e;return Yl&1&&e.tag!==0&&Do(),i=e.pendingLanes,i&1?e===Fc?Xi++:(Xi=0,Fc=e):Xi=0,Dr(),null}function Do(){if(xr!==null){var e=Nv(Yl),t=Wt.transition,n=De;try{if(Wt.transition=null,De=16>e?16:e,xr===null)var r=!1;else{if(e=xr,xr=null,Yl=0,Ce&6)throw Error(ne(331));var o=Ce;for(Ce|=4,de=e.current;de!==null;){var i=de,a=i.child;if(de.flags&16){var l=i.deletions;if(l!==null){for(var s=0;s<l.length;s++){var m=l[s];for(de=m;de!==null;){var v=de;switch(v.tag){case 0:case 11:case 15:Yi(8,v,i)}var f=v.child;if(f!==null)f.return=v,de=f;else for(;de!==null;){v=de;var c=v.sibling,u=v.return;if(Ig(v),v===m){de=null;break}if(c!==null){c.return=u,de=c;break}de=u}}}var x=i.alternate;if(x!==null){var h=x.child;if(h!==null){x.child=null;do{var g=h.sibling;h.sibling=null,h=g}while(h!==null)}}de=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,de=a;else e:for(;de!==null;){if(i=de,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Yi(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,de=p;break e}de=i.return}}var d=e.current;for(de=d;de!==null;){a=de;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,de=w;else e:for(a=d;de!==null;){if(l=de,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:bs(9,l)}}catch(b){Ye(l,l.return,b)}if(l===a){de=null;break e}var y=l.sibling;if(y!==null){y.return=l.return,de=y;break e}de=l.return}}if(Ce=o,Dr(),Cn&&typeof Cn.onPostCommitFiberRoot=="function")try{Cn.onPostCommitFiberRoot(hs,e)}catch{}r=!0}return r}finally{De=n,Wt.transition=t}}return!1}function ap(e,t,n){t=ti(n,t),t=Ng(e,t,1),e=Nr(e,t,1),t=yt(),e!==null&&(ka(e,1,t),Nt(e,t))}function Ye(e,t,n){if(e.tag===3)ap(e,e,n);else for(;t!==null;){if(t.tag===3){ap(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Or===null||!Or.has(r))){e=ti(n,e),e=Og(t,e,1),t=Nr(t,e,1),e=yt(),t!==null&&(ka(t,1,e),Nt(t,e));break}}t=t.return}}function hE(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=yt(),e.pingedLanes|=e.suspendedLanes&n,nt===e&&(ot&n)===n&&(Je===4||Je===3&&(ot&130023424)===ot&&500>Qe()-ad?Zr(e,0):id|=n),Nt(e,t)}function Kg(e,t){t===0&&(e.mode&1?(t=Ua,Ua<<=1,!(Ua&130023424)&&(Ua=4194304)):t=1);var n=yt();e=Xn(e,t),e!==null&&(ka(e,t,n),Nt(e,n))}function pE(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kg(e,n)}function mE(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ne(314))}r!==null&&r.delete(t),Kg(e,n)}var Gg;Gg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_t.current)St=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return St=!1,nE(e,t,n);St=!!(e.flags&131072)}else St=!1,He&&t.flags&1048576&&Zv(t,Bl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wl(e,t),e=t.pendingProps;var o=Xo(t,dt.current);Mo(t,n),o=Jf(null,t,r,e,o,n);var i=ed();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kt(r)?(i=!0,Fl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Gf(t),o.updater=xs,t.stateNode=o,o._reactInternals=t,Nc(t,r,e,n),t=Cc(null,t,r,!0,i,n)):(t.tag=0,He&&i&&zf(t),mt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=gE(r),e=tn(r,e),o){case 0:t=Tc(null,t,r,e,n);break e;case 1:t=Qh(null,t,r,e,n);break e;case 11:t=Gh(null,t,r,e,n);break e;case 14:t=Yh(null,t,r,tn(r.type,e),n);break e}throw Error(ne(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tn(r,o),Tc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tn(r,o),Qh(e,t,r,o,n);case 3:e:{if(Ag(t),e===null)throw Error(ne(387));r=t.pendingProps,i=t.memoizedState,o=i.element,og(e,t),Ul(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ti(Error(ne(423)),t),t=Xh(e,t,r,n,o);break e}else if(r!==o){o=ti(Error(ne(424)),t),t=Xh(e,t,r,n,o);break e}else for(Dt=kr(t.stateNode.containerInfo.firstChild),It=t,He=!0,ln=null,n=ng(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zo(),r===o){t=Zn(e,t,n);break e}mt(e,t,r,n)}t=t.child}return t;case 5:return ig(t),e===null&&Sc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,yc(r,o)?a=null:i!==null&&yc(r,i)&&(t.flags|=32),Pg(e,t),mt(e,t,a,n),t.child;case 6:return e===null&&Sc(t),null;case 13:return jg(e,t,n);case 4:return Yf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Jo(t,null,r,n):mt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tn(r,o),Gh(e,t,r,o,n);case 7:return mt(e,t,t.pendingProps,n),t.child;case 8:return mt(e,t,t.pendingProps.children,n),t.child;case 12:return mt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Fe(zl,r._currentValue),r._currentValue=a,i!==null)if(cn(i.value,a)){if(i.children===o.children&&!_t.current){t=Zn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Wn(-1,n&-n),s.tag=2;var m=i.updateQueue;if(m!==null){m=m.shared;var v=m.pending;v===null?s.next=s:(s.next=v.next,v.next=s),m.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),_c(i.return,n,t),l.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ne(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),_c(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}mt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Mo(t,n),o=Kt(o),r=r(o),t.flags|=1,mt(e,t,r,n),t.child;case 14:return r=t.type,o=tn(r,t.pendingProps),o=tn(r.type,o),Yh(e,t,r,o,n);case 15:return Tg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:tn(r,o),wl(e,t),t.tag=1,kt(r)?(e=!0,Fl(t)):e=!1,Mo(t,n),kg(t,r,o),Nc(t,r,o,n),Cc(null,t,r,!0,e,n);case 19:return Rg(e,t,n);case 22:return Cg(e,t,n)}throw Error(ne(156,t.tag))};function Yg(e,t){return Ev(e,t)}function vE(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,n,r){return new vE(e,t,n,r)}function cd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gE(e){if(typeof e=="function")return cd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cf)return 11;if(e===Pf)return 14}return 2}function Cr(e,t){var n=e.alternate;return n===null?(n=Vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function El(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")cd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case xo:return Jr(n.children,o,i,t);case Tf:a=8,o|=8;break;case Qu:return e=Vt(12,n,t,o|2),e.elementType=Qu,e.lanes=i,e;case Xu:return e=Vt(13,n,t,o),e.elementType=Xu,e.lanes=i,e;case Zu:return e=Vt(19,n,t,o),e.elementType=Zu,e.lanes=i,e;case iv:return Ss(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rv:a=10;break e;case ov:a=9;break e;case Cf:a=11;break e;case Pf:a=14;break e;case cr:a=16,r=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Vt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Jr(e,t,n,r){return e=Vt(7,e,r,t),e.lanes=n,e}function Ss(e,t,n,r){return e=Vt(22,e,r,t),e.elementType=iv,e.lanes=n,e.stateNode={isHidden:!1},e}function Pu(e,t,n){return e=Vt(6,e,null,t),e.lanes=n,e}function Au(e,t,n){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function yE(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fu(0),this.expirationTimes=fu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fu(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function fd(e,t,n,r,o,i,a,l,s){return e=new yE(e,t,n,l,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Vt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gf(i),e}function wE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:wo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Qg(e){if(!e)return Ar;e=e._reactInternals;e:{if(co(e)!==e||e.tag!==1)throw Error(ne(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(kt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ne(171))}if(e.tag===1){var n=e.type;if(kt(n))return Qv(e,n,t)}return t}function Xg(e,t,n,r,o,i,a,l,s){return e=fd(n,r,!0,e,o,i,a,l,s),e.context=Qg(null),n=e.current,r=yt(),o=Tr(n),i=Wn(r,o),i.callback=t??null,Nr(n,i,o),e.current.lanes=o,ka(e,o,r),Nt(e,r),e}function _s(e,t,n,r){var o=t.current,i=yt(),a=Tr(o);return n=Qg(n),t.context===null?t.context=n:t.pendingContext=n,t=Wn(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Nr(o,t,a),e!==null&&(un(e,o,a,i),vl(e,o,a)),a}function Xl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function lp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function dd(e,t){lp(e,t),(e=e.alternate)&&lp(e,t)}function xE(){return null}var Zg=typeof reportError=="function"?reportError:function(e){console.error(e)};function hd(e){this._internalRoot=e}ks.prototype.render=hd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ne(409));_s(e,t,null,null)};ks.prototype.unmount=hd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;oo(function(){_s(null,e,null,null)}),t[Qn]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var t=Cv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dr.length&&t!==0&&t<dr[n].priority;n++);dr.splice(n,0,e),n===0&&Av(e)}};function pd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ns(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sp(){}function bE(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var m=Xl(a);i.call(m)}}var a=Xg(t,r,e,0,null,!1,!1,"",sp);return e._reactRootContainer=a,e[Qn]=a.current,la(e.nodeType===8?e.parentNode:e),oo(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var m=Xl(s);l.call(m)}}var s=fd(e,0,!1,null,null,!1,!1,"",sp);return e._reactRootContainer=s,e[Qn]=s.current,la(e.nodeType===8?e.parentNode:e),oo(function(){_s(t,s,n,r)}),s}function Os(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var l=o;o=function(){var s=Xl(a);l.call(s)}}_s(t,a,e,o)}else a=bE(n,t,e,o,r);return Xl(a)}Ov=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Bi(t.pendingLanes);n!==0&&(Rf(t,n|1),Nt(t,Qe()),!(Ce&6)&&(ni=Qe()+500,Dr()))}break;case 13:oo(function(){var r=Xn(e,1);if(r!==null){var o=yt();un(r,e,1,o)}}),dd(e,1)}};Lf=function(e){if(e.tag===13){var t=Xn(e,134217728);if(t!==null){var n=yt();un(t,e,134217728,n)}dd(e,134217728)}};Tv=function(e){if(e.tag===13){var t=Tr(e),n=Xn(e,t);if(n!==null){var r=yt();un(n,e,t,r)}dd(e,t)}};Cv=function(){return De};Pv=function(e,t){var n=De;try{return De=e,t()}finally{De=n}};sc=function(e,t,n){switch(t){case"input":if(tc(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=gs(r);if(!o)throw Error(ne(90));lv(r),tc(r,o)}}}break;case"textarea":uv(e,n);break;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}};vv=ld;gv=oo;var EE={usingClientEntryPoint:!1,Events:[Oa,_o,gs,pv,mv,ld]},Ri={findFiberByHostInstance:Ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},SE={bundleType:Ri.bundleType,version:Ri.version,rendererPackageName:Ri.rendererPackageName,rendererConfig:Ri.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:tr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=xv(e),e===null?null:e.stateNode},findFiberByHostInstance:Ri.findFiberByHostInstance||xE,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 el=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!el.isDisabled&&el.supportsFiber)try{hs=el.inject(SE),Cn=el}catch{}}Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=EE;Bt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!pd(t))throw Error(ne(200));return wE(e,t,null,n)};Bt.createRoot=function(e,t){if(!pd(e))throw Error(ne(299));var n=!1,r="",o=Zg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=fd(e,1,!1,null,null,n,!1,r,o),e[Qn]=t.current,la(e.nodeType===8?e.parentNode:e),new hd(t)};Bt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ne(188)):(e=Object.keys(e).join(","),Error(ne(268,e)));return e=xv(t),e=e===null?null:e.stateNode,e};Bt.flushSync=function(e){return oo(e)};Bt.hydrate=function(e,t,n){if(!Ns(t))throw Error(ne(200));return Os(null,e,t,!0,n)};Bt.hydrateRoot=function(e,t,n){if(!pd(e))throw Error(ne(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=Zg;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Xg(t,null,e,1,n??null,o,!1,i,a),e[Qn]=t.current,la(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new ks(t)};Bt.render=function(e,t,n){if(!Ns(t))throw Error(ne(200));return Os(null,e,t,!1,n)};Bt.unmountComponentAtNode=function(e){if(!Ns(e))throw Error(ne(40));return e._reactRootContainer?(oo(function(){Os(null,null,e,!1,function(){e._reactRootContainer=null,e[Qn]=null})}),!0):!1};Bt.unstable_batchedUpdates=ld;Bt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ns(n))throw Error(ne(200));if(e==null||e._reactInternals===void 0)throw Error(ne(38));return Os(e,t,n,!1,r)};Bt.version="18.3.1-next-f1338f8080-20240426";function Jg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jg)}catch(e){console.error(e)}}Jg(),Jm.exports=Bt;var Ir=Jm.exports;const ey=wf(Ir);var ty,up=Ir;ty=up.createRoot,up.hydrateRoot;const _E=1,kE=1e6;let ju=0;function NE(){return ju=(ju+1)%Number.MAX_SAFE_INTEGER,ju.toString()}const Ru=new Map,cp=e=>{if(Ru.has(e))return;const t=setTimeout(()=>{Ru.delete(e),Zi({type:"REMOVE_TOAST",toastId:e})},kE);Ru.set(e,t)},OE=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,_E)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?cp(n):e.toasts.forEach(r=>{cp(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Sl=[];let _l={toasts:[]};function Zi(e){_l=OE(_l,e),Sl.forEach(t=>{t(_l)})}function TE({...e}){const t=NE(),n=o=>Zi({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Zi({type:"DISMISS_TOAST",toastId:t});return Zi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function md(){const[e,t]=N.useState(_l);return N.useEffect(()=>(Sl.push(t),()=>{const n=Sl.indexOf(t);n>-1&&Sl.splice(n,1)}),[e]),{...e,toast:TE,dismiss:n=>Zi({type:"DISMISS_TOAST",toastId:n})}}function ve(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function fp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ny(...e){return t=>{let n=!1;const r=e.map(o=>{const i=fp(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():fp(e[o],null)}}}}function Re(...e){return N.useCallback(ny(...e),e)}function CE(e,t){const n=N.createContext(t),r=i=>{const{children:a,...l}=i,s=N.useMemo(()=>l,Object.values(l));return E.jsx(n.Provider,{value:s,children:a})};r.displayName=e+"Provider";function o(i){const a=N.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function fo(e,t=[]){let n=[];function r(i,a){const l=N.createContext(a),s=n.length;n=[...n,a];const m=f=>{var p;const{scope:c,children:u,...x}=f,h=((p=c==null?void 0:c[e])==null?void 0:p[s])||l,g=N.useMemo(()=>x,Object.values(x));return E.jsx(h.Provider,{value:g,children:u})};m.displayName=i+"Provider";function v(f,c){var h;const u=((h=c==null?void 0:c[e])==null?void 0:h[s])||l,x=N.useContext(u);if(x)return x;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[m,v]}const o=()=>{const i=n.map(a=>N.createContext(a));return function(l){const s=(l==null?void 0:l[e])||i;return N.useMemo(()=>({[`__scope${e}`]:{...l,[e]:s}}),[l,s])}};return o.scopeName=e,[r,PE(o,...t)]}function PE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((l,{useScope:s,scopeName:m})=>{const f=s(i)[`__scope${m}`];return{...l,...f}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ri(e){const t=jE(e),n=N.forwardRef((r,o)=>{const{children:i,...a}=r,l=N.Children.toArray(i),s=l.find(LE);if(s){const m=s.props.children,v=l.map(f=>f===s?N.Children.count(m)>1?N.Children.only(null):N.isValidElement(m)?m.props.children:null:f);return E.jsx(t,{...a,ref:o,children:N.isValidElement(m)?N.cloneElement(m,void 0,v):null})}return E.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var AE=ri("Slot");function jE(e){const t=N.forwardRef((n,r)=>{const{children:o,...i}=n;if(N.isValidElement(o)){const a=DE(o),l=ME(i,o.props);return o.type!==N.Fragment&&(l.ref=r?ny(r,a):a),N.cloneElement(o,l)}return N.Children.count(o)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ry=Symbol("radix.slottable");function RE(e){const t=({children:n})=>E.jsx(E.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ry,t}function LE(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ry}function ME(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const s=i(...l);return o(...l),s}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function DE(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vd(e){const t=e+"CollectionProvider",[n,r]=fo(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:p}=h,d=ae.useRef(null),w=ae.useRef(new Map).current;return E.jsx(o,{scope:g,itemMap:w,collectionRef:d,children:p})};a.displayName=t;const l=e+"CollectionSlot",s=ri(l),m=ae.forwardRef((h,g)=>{const{scope:p,children:d}=h,w=i(l,p),y=Re(g,w.collectionRef);return E.jsx(s,{ref:y,children:d})});m.displayName=l;const v=e+"CollectionItemSlot",f="data-radix-collection-item",c=ri(v),u=ae.forwardRef((h,g)=>{const{scope:p,children:d,...w}=h,y=ae.useRef(null),b=Re(g,y),T=i(v,p);return ae.useEffect(()=>(T.itemMap.set(y,{ref:y,...w}),()=>void T.itemMap.delete(y))),E.jsx(c,{[f]:"",ref:b,children:d})});u.displayName=v;function x(h){const g=i(e+"CollectionConsumer",h);return ae.useCallback(()=>{const d=g.collectionRef.current;if(!d)return[];const w=Array.from(d.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((T,S)=>w.indexOf(T.ref.current)-w.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:m,ItemSlot:u},x,r]}var IE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=IE.reduce((e,t)=>{const n=ri(`Primitive.${t}`),r=N.forwardRef((o,i)=>{const{asChild:a,...l}=o,s=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function oy(e,t){e&&Ir.flushSync(()=>e.dispatchEvent(t))}function fn(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function FE(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e);N.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var $E="DismissableLayer",zc="dismissableLayer.update",BE="dismissableLayer.pointerDownOutside",zE="dismissableLayer.focusOutside",dp,iy=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ca=N.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:l,...s}=e,m=N.useContext(iy),[v,f]=N.useState(null),c=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,u]=N.useState({}),x=Re(t,S=>f(S)),h=Array.from(m.layers),[g]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),p=h.indexOf(g),d=v?h.indexOf(v):-1,w=m.layersWithOutsidePointerEventsDisabled.size>0,y=d>=p,b=UE(S=>{const C=S.target,P=[...m.branches].some(k=>k.contains(C));!y||P||(o==null||o(S),a==null||a(S),S.defaultPrevented||l==null||l())},c),T=HE(S=>{const C=S.target;[...m.branches].some(k=>k.contains(C))||(i==null||i(S),a==null||a(S),S.defaultPrevented||l==null||l())},c);return FE(S=>{d===m.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},c),N.useEffect(()=>{if(v)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(dp=c.body.style.pointerEvents,c.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),hp(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(c.body.style.pointerEvents=dp)}},[v,c,n,m]),N.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),hp())},[v,m]),N.useEffect(()=>{const S=()=>u({});return document.addEventListener(zc,S),()=>document.removeEventListener(zc,S)},[]),E.jsx(Se.div,{...s,ref:x,style:{pointerEvents:w?y?"auto":"none":void 0,...e.style},onFocusCapture:ve(e.onFocusCapture,T.onFocusCapture),onBlurCapture:ve(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:ve(e.onPointerDownCapture,b.onPointerDownCapture)})});Ca.displayName=$E;var qE="DismissableLayerBranch",ay=N.forwardRef((e,t)=>{const n=N.useContext(iy),r=N.useRef(null),o=Re(t,r);return N.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(Se.div,{...e,ref:o})});ay.displayName=qE;function UE(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e),r=N.useRef(!1),o=N.useRef(()=>{});return N.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let s=function(){ly(BE,n,m,{discrete:!0})};const m={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=s,t.addEventListener("click",o.current,{once:!0})):s()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function HE(e,t=globalThis==null?void 0:globalThis.document){const n=fn(e),r=N.useRef(!1);return N.useEffect(()=>{const o=i=>{i.target&&!r.current&&ly(zE,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function hp(){const e=new CustomEvent(zc);document.dispatchEvent(e)}function ly(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?oy(o,i):o.dispatchEvent(i)}var VE=Ca,WE=ay,at=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},KE="Portal",Ts=N.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[o,i]=N.useState(!1);at(()=>i(!0),[]);const a=n||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?ey.createPortal(E.jsx(Se.div,{...r,ref:t}),a):null});Ts.displayName=KE;function GE(e,t){return N.useReducer((n,r)=>t[n][r]??n,e)}var ui=e=>{const{present:t,children:n}=e,r=YE(t),o=typeof n=="function"?n({present:r.isPresent}):N.Children.only(n),i=Re(r.ref,QE(o));return typeof n=="function"||r.isPresent?N.cloneElement(o,{ref:i}):null};ui.displayName="Presence";function YE(e){const[t,n]=N.useState(),r=N.useRef(null),o=N.useRef(e),i=N.useRef("none"),a=e?"mounted":"unmounted",[l,s]=GE(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const m=tl(r.current);i.current=l==="mounted"?m:"none"},[l]),at(()=>{const m=r.current,v=o.current;if(v!==e){const c=i.current,u=tl(m);e?s("MOUNT"):u==="none"||(m==null?void 0:m.display)==="none"?s("UNMOUNT"):s(v&&c!==u?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,s]),at(()=>{if(t){let m;const v=t.ownerDocument.defaultView??window,f=u=>{const h=tl(r.current).includes(u.animationName);if(u.target===t&&h&&(s("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",m=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},c=u=>{u.target===t&&(i.current=tl(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{v.clearTimeout(m),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:N.useCallback(m=>{r.current=m?getComputedStyle(m):null,n(m)},[])}}function tl(e){return(e==null?void 0:e.animationName)||"none"}function QE(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var XE=_f[" useInsertionEffect ".trim().toString()]||at;function va({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,a]=ZE({defaultProp:t,onChange:n}),l=e!==void 0,s=l?e:o;{const v=N.useRef(e!==void 0);N.useEffect(()=>{const f=v.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.`),v.current=l},[l,r])}const m=N.useCallback(v=>{var f;if(l){const c=JE(v)?v(e):v;c!==e&&((f=a.current)==null||f.call(a,c))}else i(v)},[l,e,i,a]);return[s,m]}function ZE({defaultProp:e,onChange:t}){const[n,r]=N.useState(e),o=N.useRef(n),i=N.useRef(t);return XE(()=>{i.current=t},[t]),N.useEffect(()=>{var a;o.current!==n&&((a=i.current)==null||a.call(i,n),o.current=n)},[n,o]),[n,r,i]}function JE(e){return typeof e=="function"}var sy=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"}),eS="VisuallyHidden",Cs=N.forwardRef((e,t)=>E.jsx(Se.span,{...e,ref:t,style:{...sy,...e.style}}));Cs.displayName=eS;var tS=Cs,gd="ToastProvider",[yd,nS,rS]=vd("Toast"),[uy,y5]=fo("Toast",[rS]),[oS,Ps]=uy(gd),cy=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:a}=e,[l,s]=N.useState(null),[m,v]=N.useState(0),f=N.useRef(!1),c=N.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${gd}\`. Expected non-empty \`string\`.`),E.jsx(yd.Provider,{scope:t,children:E.jsx(oS,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:i,toastCount:m,viewport:l,onViewportChange:s,onToastAdd:N.useCallback(()=>v(u=>u+1),[]),onToastRemove:N.useCallback(()=>v(u=>u-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:c,children:a})})};cy.displayName=gd;var fy="ToastViewport",iS=["F8"],qc="toast.viewportPause",Uc="toast.viewportResume",dy=N.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=iS,label:o="Notifications ({hotkey})",...i}=e,a=Ps(fy,n),l=nS(n),s=N.useRef(null),m=N.useRef(null),v=N.useRef(null),f=N.useRef(null),c=Re(t,f,a.onViewportChange),u=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=a.toastCount>0;N.useEffect(()=>{const g=p=>{var w;r.length!==0&&r.every(y=>p[y]||p.code===y)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[r]),N.useEffect(()=>{const g=s.current,p=f.current;if(x&&g&&p){const d=()=>{if(!a.isClosePausedRef.current){const T=new CustomEvent(qc);p.dispatchEvent(T),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const T=new CustomEvent(Uc);p.dispatchEvent(T),a.isClosePausedRef.current=!1}},y=T=>{!g.contains(T.relatedTarget)&&w()},b=()=>{g.contains(document.activeElement)||w()};return g.addEventListener("focusin",d),g.addEventListener("focusout",y),g.addEventListener("pointermove",d),g.addEventListener("pointerleave",b),window.addEventListener("blur",d),window.addEventListener("focus",w),()=>{g.removeEventListener("focusin",d),g.removeEventListener("focusout",y),g.removeEventListener("pointermove",d),g.removeEventListener("pointerleave",b),window.removeEventListener("blur",d),window.removeEventListener("focus",w)}}},[x,a.isClosePausedRef]);const h=N.useCallback(({tabbingDirection:g})=>{const d=l().map(w=>{const y=w.ref.current,b=[y,...yS(y)];return g==="forwards"?b:b.reverse()});return(g==="forwards"?d.reverse():d).flat()},[l]);return N.useEffect(()=>{const g=f.current;if(g){const p=d=>{var b,T,S;const w=d.altKey||d.ctrlKey||d.metaKey;if(d.key==="Tab"&&!w){const C=document.activeElement,P=d.shiftKey;if(d.target===g&&P){(b=m.current)==null||b.focus();return}const O=h({tabbingDirection:P?"backwards":"forwards"}),j=O.findIndex(R=>R===C);Lu(O.slice(j+1))?d.preventDefault():P?(T=m.current)==null||T.focus():(S=v.current)==null||S.focus()}};return g.addEventListener("keydown",p),()=>g.removeEventListener("keydown",p)}},[l,h]),E.jsxs(WE,{ref:s,role:"region","aria-label":o.replace("{hotkey}",u),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&E.jsx(Hc,{ref:m,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"forwards"});Lu(g)}}),E.jsx(yd.Slot,{scope:n,children:E.jsx(Se.ol,{tabIndex:-1,...i,ref:c})}),x&&E.jsx(Hc,{ref:v,onFocusFromOutsideViewport:()=>{const g=h({tabbingDirection:"backwards"});Lu(g)}})]})});dy.displayName=fy;var hy="ToastFocusProxy",Hc=N.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,i=Ps(hy,n);return E.jsx(Cs,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:a=>{var m;const l=a.relatedTarget;!((m=i.viewport)!=null&&m.contains(l))&&r()}})});Hc.displayName=hy;var Pa="Toast",aS="toast.swipeStart",lS="toast.swipeMove",sS="toast.swipeCancel",uS="toast.swipeEnd",py=N.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:i,...a}=e,[l,s]=va({prop:r,defaultProp:o??!0,onChange:i,caller:Pa});return E.jsx(ui,{present:n||l,children:E.jsx(dS,{open:l,...a,ref:t,onClose:()=>s(!1),onPause:fn(e.onPause),onResume:fn(e.onResume),onSwipeStart:ve(e.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ve(e.onSwipeMove,m=>{const{x:v,y:f}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:ve(e.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ve(e.onSwipeEnd,m=>{const{x:v,y:f}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),s(!1)})})})});py.displayName=Pa;var[cS,fS]=uy(Pa,{onClose(){}}),dS=N.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:i,onClose:a,onEscapeKeyDown:l,onPause:s,onResume:m,onSwipeStart:v,onSwipeMove:f,onSwipeCancel:c,onSwipeEnd:u,...x}=e,h=Ps(Pa,n),[g,p]=N.useState(null),d=Re(t,R=>p(R)),w=N.useRef(null),y=N.useRef(null),b=o||h.duration,T=N.useRef(0),S=N.useRef(b),C=N.useRef(0),{onToastAdd:P,onToastRemove:k}=h,_=fn(()=>{var F;(g==null?void 0:g.contains(document.activeElement))&&((F=h.viewport)==null||F.focus()),a()}),O=N.useCallback(R=>{!R||R===1/0||(window.clearTimeout(C.current),T.current=new Date().getTime(),C.current=window.setTimeout(_,R))},[_]);N.useEffect(()=>{const R=h.viewport;if(R){const F=()=>{O(S.current),m==null||m()},q=()=>{const V=new Date().getTime()-T.current;S.current=S.current-V,window.clearTimeout(C.current),s==null||s()};return R.addEventListener(qc,q),R.addEventListener(Uc,F),()=>{R.removeEventListener(qc,q),R.removeEventListener(Uc,F)}}},[h.viewport,b,s,m,O]),N.useEffect(()=>{i&&!h.isClosePausedRef.current&&O(b)},[i,b,h.isClosePausedRef,O]),N.useEffect(()=>(P(),()=>k()),[P,k]);const j=N.useMemo(()=>g?by(g):null,[g]);return h.viewport?E.jsxs(E.Fragment,{children:[j&&E.jsx(hS,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:j}),E.jsx(cS,{scope:n,onClose:_,children:Ir.createPortal(E.jsx(yd.ItemSlot,{scope:n,children:E.jsx(VE,{asChild:!0,onEscapeKeyDown:ve(l,()=>{h.isFocusedToastEscapeKeyDownRef.current||_(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:E.jsx(Se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...x,ref:d,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ve(e.onKeyDown,R=>{R.key==="Escape"&&(l==null||l(R.nativeEvent),R.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,_()))}),onPointerDown:ve(e.onPointerDown,R=>{R.button===0&&(w.current={x:R.clientX,y:R.clientY})}),onPointerMove:ve(e.onPointerMove,R=>{if(!w.current)return;const F=R.clientX-w.current.x,q=R.clientY-w.current.y,V=!!y.current,H=["left","right"].includes(h.swipeDirection),I=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,M=H?I(0,F):0,A=H?0:I(0,q),L=R.pointerType==="touch"?10:2,$={x:M,y:A},W={originalEvent:R,delta:$};V?(y.current=$,nl(lS,f,W,{discrete:!1})):pp($,h.swipeDirection,L)?(y.current=$,nl(aS,v,W,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(F)>L||Math.abs(q)>L)&&(w.current=null)}),onPointerUp:ve(e.onPointerUp,R=>{const F=y.current,q=R.target;if(q.hasPointerCapture(R.pointerId)&&q.releasePointerCapture(R.pointerId),y.current=null,w.current=null,F){const V=R.currentTarget,H={originalEvent:R,delta:F};pp(F,h.swipeDirection,h.swipeThreshold)?nl(uS,u,H,{discrete:!0}):nl(sS,c,H,{discrete:!0}),V.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),hS=e=>{const{__scopeToast:t,children:n,...r}=e,o=Ps(Pa,t),[i,a]=N.useState(!1),[l,s]=N.useState(!1);return vS(()=>a(!0)),N.useEffect(()=>{const m=window.setTimeout(()=>s(!0),1e3);return()=>window.clearTimeout(m)},[]),l?null:E.jsx(Ts,{asChild:!0,children:E.jsx(Cs,{...r,children:i&&E.jsxs(E.Fragment,{children:[o.label," ",n]})})})},pS="ToastTitle",my=N.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return E.jsx(Se.div,{...r,ref:t})});my.displayName=pS;var mS="ToastDescription",vy=N.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return E.jsx(Se.div,{...r,ref:t})});vy.displayName=mS;var gy="ToastAction",yy=N.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?E.jsx(xy,{altText:n,asChild:!0,children:E.jsx(wd,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${gy}\`. Expected non-empty \`string\`.`),null)});yy.displayName=gy;var wy="ToastClose",wd=N.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=fS(wy,n);return E.jsx(xy,{asChild:!0,children:E.jsx(Se.button,{type:"button",...r,ref:t,onClick:ve(e.onClick,o.onClose)})})});wd.displayName=wy;var xy=N.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return E.jsx(Se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function by(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),gS(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!o)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&t.push(a)}else t.push(...by(r))}}),t}function nl(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?oy(o,i):o.dispatchEvent(i)}var pp=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n};function vS(e=()=>{}){const t=fn(e);at(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function gS(e){return e.nodeType===e.ELEMENT_NODE}function yS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Lu(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var wS=cy,Ey=dy,Sy=py,_y=my,ky=vy,Ny=yy,Oy=wd;function Ty(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ty(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Cy(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ty(e))&&(r&&(r+=" "),r+=t);return r}const mp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vp=Cy,xd=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return vp(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(m=>{const v=n==null?void 0:n[m],f=i==null?void 0:i[m];if(v===null)return null;const c=mp(v)||mp(f);return o[m][c]}),l=n&&Object.entries(n).reduce((m,v)=>{let[f,c]=v;return c===void 0||(m[f]=c),m},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((m,v)=>{let{class:f,className:c,...u}=v;return Object.entries(u).every(x=>{let[h,g]=x;return Array.isArray(g)?g.includes({...i,...l}[h]):{...i,...l}[h]===g})?[...m,f,c]:m},[]);return vp(e,a,s,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Py=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var bS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ES=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},s)=>N.createElement("svg",{ref:s,...bS,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Py("lucide",o),...l},[...a.map(([m,v])=>N.createElement(m,v)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xe=(e,t)=>{const n=N.forwardRef(({className:r,...o},i)=>N.createElement(ES,{ref:i,iconNode:t,className:Py(`lucide-${xS(e)}`,r),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bd=xe("AlignCenter",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ed=xe("AlignLeft",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Sd=xe("AlignRight",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SS=xe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _d=xe("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kd=xe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ay=xe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _S=xe("ChevronFirst",[["path",{d:"m17 18-6-6 6-6",key:"1yerx2"}],["path",{d:"M7 6v12",key:"1p53r6"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kS=xe("ChevronLast",[["path",{d:"m7 18 6-6-6-6",key:"lwmzdw"}],["path",{d:"M17 6v12",key:"1o0aio"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jy=xe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ry=xe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const NS=xe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const OS=xe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TS=xe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nd=xe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CS=xe("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PS=xe("FilePenLine",[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Od=xe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ly=xe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AS=xe("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jS=xe("Highlighter",[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RS=xe("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Td=xe("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const LS=xe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const MS=xe("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const DS=xe("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const IS=xe("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const FS=xe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $S=xe("MousePointer",[["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"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const BS=xe("Move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zS=xe("PenLine",[["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"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const qS=xe("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const US=xe("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HS=xe("Redo",[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const As=xe("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const My=xe("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const js=xe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const VS=xe("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dy=xe("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const WS=xe("Undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const KS=xe("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Aa=xe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Iy=xe("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const GS=xe("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),Cd="-",YS=e=>{const t=XS(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(Cd);return l[0]===""&&l.length!==1&&l.shift(),Fy(l,t)||QS(a)},getConflictingClassGroupIds:(a,l)=>{const s=n[a]||[];return l&&r[a]?[...s,...r[a]]:s}}},Fy=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Fy(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Cd);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId},gp=/^\[(.+)\]$/,QS=e=>{if(gp.test(e)){const t=gp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},XS=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return JS(Object.entries(e.classGroups),n).forEach(([i,a])=>{Vc(a,r,i,t)}),r},Vc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:yp(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(ZS(o)){Vc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,a])=>{Vc(a,yp(t,i),n,r)})})},yp=(e,t)=>{let n=e;return t.split(Cd).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},ZS=e=>e.isThemeGetter,JS=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[n,o]}):e,e2=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return o(i,a),a},set(i,a){n.has(i)?n.set(i,a):o(i,a)}}},$y="!",t2=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,a=l=>{const s=[];let m=0,v=0,f;for(let g=0;g<l.length;g++){let p=l[g];if(m===0){if(p===o&&(r||l.slice(g,g+i)===t)){s.push(l.slice(v,g)),v=g+i;continue}if(p==="/"){f=g;continue}}p==="["?m++:p==="]"&&m--}const c=s.length===0?l:l.substring(v),u=c.startsWith($y),x=u?c.substring(1):c,h=f&&f>v?f-v:void 0;return{modifiers:s,hasImportantModifier:u,baseClassName:x,maybePostfixModifierPosition:h}};return n?l=>n({className:l,parseClassName:a}):a},n2=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},r2=e=>({cache:e2(e.cacheSize),parseClassName:t2(e),...YS(e)}),o2=/\s+/,i2=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(o2);let l="";for(let s=a.length-1;s>=0;s-=1){const m=a[s],{modifiers:v,hasImportantModifier:f,baseClassName:c,maybePostfixModifierPosition:u}=n(m);let x=!!u,h=r(x?c.substring(0,u):c);if(!h){if(!x){l=m+(l.length>0?" "+l:l);continue}if(h=r(c),!h){l=m+(l.length>0?" "+l:l);continue}x=!1}const g=n2(v).join(":"),p=f?g+$y:g,d=p+h;if(i.includes(d))continue;i.push(d);const w=o(h,x);for(let y=0;y<w.length;++y){const b=w[y];i.push(p+b)}l=m+(l.length>0?" "+l:l)}return l};function a2(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=By(t))&&(r&&(r+=" "),r+=n);return r}const By=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=By(e[r]))&&(n&&(n+=" "),n+=t);return n};function l2(e,...t){let n,r,o,i=a;function a(s){const m=t.reduce((v,f)=>f(v),e());return n=r2(m),r=n.cache.get,o=n.cache.set,i=l,l(s)}function l(s){const m=r(s);if(m)return m;const v=i2(s,n);return o(s,v),v}return function(){return i(a2.apply(null,arguments))}}const Be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},zy=/^\[(?:([a-z-]+):)?(.+)\]$/i,s2=/^\d+\/\d+$/,u2=new Set(["px","full","screen"]),c2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,f2=/\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$/,d2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,h2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,p2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$n=e=>Io(e)||u2.has(e)||s2.test(e),ar=e=>ci(e,"length",E2),Io=e=>!!e&&!Number.isNaN(Number(e)),Mu=e=>ci(e,"number",Io),Li=e=>!!e&&Number.isInteger(Number(e)),m2=e=>e.endsWith("%")&&Io(e.slice(0,-1)),Ee=e=>zy.test(e),lr=e=>c2.test(e),v2=new Set(["length","size","percentage"]),g2=e=>ci(e,v2,qy),y2=e=>ci(e,"position",qy),w2=new Set(["image","url"]),x2=e=>ci(e,w2,_2),b2=e=>ci(e,"",S2),Mi=()=>!0,ci=(e,t,n)=>{const r=zy.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},E2=e=>f2.test(e)&&!d2.test(e),qy=()=>!1,S2=e=>h2.test(e),_2=e=>p2.test(e),k2=()=>{const e=Be("colors"),t=Be("spacing"),n=Be("blur"),r=Be("brightness"),o=Be("borderColor"),i=Be("borderRadius"),a=Be("borderSpacing"),l=Be("borderWidth"),s=Be("contrast"),m=Be("grayscale"),v=Be("hueRotate"),f=Be("invert"),c=Be("gap"),u=Be("gradientColorStops"),x=Be("gradientColorStopPositions"),h=Be("inset"),g=Be("margin"),p=Be("opacity"),d=Be("padding"),w=Be("saturate"),y=Be("scale"),b=Be("sepia"),T=Be("skew"),S=Be("space"),C=Be("translate"),P=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto",Ee,t],O=()=>[Ee,t],j=()=>["",$n,ar],R=()=>["auto",Io,Ee],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Ee],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>[Io,Ee];return{cacheSize:500,separator:":",theme:{colors:[Mi],spacing:[$n,ar],blur:["none","",lr,Ee],brightness:A(),borderColor:[e],borderRadius:["none","","full",lr,Ee],borderSpacing:O(),borderWidth:j(),contrast:A(),grayscale:I(),hueRotate:A(),invert:I(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[m2,ar],inset:_(),margin:_(),opacity:A(),padding:O(),saturate:A(),scale:A(),sepia:I(),skew:A(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Ee]}],container:["container"],columns:[{columns:[lr]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F(),Ee]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Li,Ee]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ee]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Li,Ee]}],"grid-cols":[{"grid-cols":[Mi]}],"col-start-end":[{col:["auto",{span:["full",Li,Ee]},Ee]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Mi]}],"row-start-end":[{row:["auto",{span:[Li,Ee]},Ee]}],"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":["auto","min","max","fr",Ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ee]}],gap:[{gap:[c]}],"gap-x":[{"gap-x":[c]}],"gap-y":[{"gap-y":[c]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[d]}],px:[{px:[d]}],py:[{py:[d]}],ps:[{ps:[d]}],pe:[{pe:[d]}],pt:[{pt:[d]}],pr:[{pr:[d]}],pb:[{pb:[d]}],pl:[{pl:[d]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ee,t]}],"min-w":[{"min-w":[Ee,t,"min","max","fit"]}],"max-w":[{"max-w":[Ee,t,"none","full","min","max","fit","prose",{screen:[lr]},lr]}],h:[{h:[Ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",lr,ar]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mu]}],"font-family":[{font:[Mi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ee]}],"line-clamp":[{"line-clamp":["none",Io,Mu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$n,Ee]}],"list-image":[{"list-image":["none",Ee]}],"list-style-type":[{list:["none","disc","decimal",Ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$n,ar]}],"underline-offset":[{"underline-offset":["auto",$n,Ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),y2]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",g2]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},x2]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[u]}],"gradient-via":[{via:[u]}],"gradient-to":[{to:[u]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:q()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[$n,Ee]}],"outline-w":[{outline:[$n,ar]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[$n,ar]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",lr,b2]}],"shadow-color":[{shadow:[Mi]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",lr,Ee]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ee]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",Ee]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[Li,Ee]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],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",Ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$n,ar,Mu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},N2=l2(k2);function ke(...e){return N2(Cy(e))}const O2=wS,Uy=N.forwardRef(({className:e,...t},n)=>E.jsx(Ey,{ref:n,className:ke("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Uy.displayName=Ey.displayName;const T2=xd("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"}}),Hy=N.forwardRef(({className:e,variant:t,...n},r)=>E.jsx(Sy,{ref:r,className:ke(T2({variant:t}),e),...n}));Hy.displayName=Sy.displayName;const C2=N.forwardRef(({className:e,...t},n)=>E.jsx(Ny,{ref:n,className:ke("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}));C2.displayName=Ny.displayName;const Vy=N.forwardRef(({className:e,...t},n)=>E.jsx(Oy,{ref:n,className:ke("absolute right-2 top-2 rounded-md p-1 text-foreground/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:E.jsx(Aa,{className:"h-4 w-4"})}));Vy.displayName=Oy.displayName;const Wy=N.forwardRef(({className:e,...t},n)=>E.jsx(_y,{ref:n,className:ke("text-sm font-semibold",e),...t}));Wy.displayName=_y.displayName;const Ky=N.forwardRef(({className:e,...t},n)=>E.jsx(ky,{ref:n,className:ke("text-sm opacity-90",e),...t}));Ky.displayName=ky.displayName;function P2(){const{toasts:e}=md();return E.jsxs(O2,{children:[e.map(function({id:t,title:n,description:r,action:o,...i}){return E.jsxs(Hy,{...i,children:[E.jsxs("div",{className:"grid gap-1",children:[n&&E.jsx(Wy,{children:n}),r&&E.jsx(Ky,{children:r})]}),o,E.jsx(Vy,{})]},t)}),E.jsx(Uy,{})]})}var wp=["light","dark"],A2="(prefers-color-scheme: dark)",j2=N.createContext(void 0),R2={setTheme:e=>{},themes:[]},L2=()=>{var e;return(e=N.useContext(j2))!=null?e:R2};N.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:i,value:a,attrs:l,nonce:s})=>{let m=i==="system",v=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(x=>`'${x}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=o?wp.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",c=(x,h=!1,g=!0)=>{let p=a?a[x]:x,d=h?x+"|| ''":`'${p}'`,w="";return o&&g&&!h&&wp.includes(x)&&(w+=`d.style.colorScheme = '${x}';`),n==="class"?h||p?w+=`c.add(${d})`:w+="null":p&&(w+=`d[s](n,${d})`),w},u=e?`!function(){${v}${c(e)}}()`:r?`!function(){try{${v}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${m})){var t='${A2}',m=window.matchMedia(t);if(m.media!==t||m.matches){${c("dark")}}else{${c("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${c(a?"x[e]":"e",!0)}}${m?"":"else{"+c(i,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${v}var e=localStorage.getItem('${t}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${c(a?"x[e]":"e",!0)}}else{${c(i,!1,!1)};}${f}}catch(t){}}();`;return N.createElement("script",{nonce:s,dangerouslySetInnerHTML:{__html:u}})});var M2=e=>{switch(e){case"success":return F2;case"info":return B2;case"warning":return $2;case"error":return z2;default:return null}},D2=Array(12).fill(0),I2=({visible:e,className:t})=>ae.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ae.createElement("div",{className:"sonner-spinner"},D2.map((n,r)=>ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),F2=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),$2=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ae.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),B2=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),z2=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ae.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),q2=ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),U2=()=>{let[e,t]=ae.useState(document.hidden);return ae.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Wc=1,H2=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,o=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Wc++,i=this.toasts.find(l=>l.id===o),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...e,id:o,title:n}),{...l,...e,id:o,dismissible:a,title:n}):l):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,i,a=r.then(async s=>{if(i=["resolve",s],ae.isValidElement(s))o=!1,this.create({id:n,type:"default",message:s});else if(W2(s)&&!s.ok){o=!1;let m=typeof t.error=="function"?await t.error(`HTTP error! status: ${s.status}`):t.error,v=typeof t.description=="function"?await t.description(`HTTP error! status: ${s.status}`):t.description;this.create({id:n,type:"error",message:m,description:v})}else if(t.success!==void 0){o=!1;let m=typeof t.success=="function"?await t.success(s):t.success,v=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"success",message:m,description:v})}}).catch(async s=>{if(i=["reject",s],t.error!==void 0){o=!1;let m=typeof t.error=="function"?await t.error(s):t.error,v=typeof t.description=="function"?await t.description(s):t.description;this.create({id:n,type:"error",message:m,description:v})}}).finally(()=>{var s;o&&(this.dismiss(n),n=void 0),(s=t.finally)==null||s.call(t)}),l=()=>new Promise((s,m)=>a.then(()=>i[0]==="reject"?m(i[1]):s(i[1])).catch(m));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Wc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},bt=new H2,V2=(e,t)=>{let n=(t==null?void 0:t.id)||Wc++;return bt.addToast({title:e,...t,id:n}),n},W2=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",K2=V2,G2=()=>bt.toasts,Y2=()=>bt.getActiveToasts();Object.assign(K2,{success:bt.success,info:bt.info,warning:bt.warning,error:bt.error,custom:bt.custom,message:bt.message,promise:bt.promise,dismiss:bt.dismiss,loading:bt.loading},{getHistory:G2,getToasts:Y2});function Q2(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Q2(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} `);function rl(e){return e.label!==void 0}var X2=3,Z2="32px",J2="16px",xp=4e3,e_=356,t_=14,n_=20,r_=200;function Jt(...e){return e.filter(Boolean).join(" ")}function o_(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var i_=e=>{var t,n,r,o,i,a,l,s,m,v,f;let{invert:c,toast:u,unstyled:x,interacting:h,setHeights:g,visibleToasts:p,heights:d,index:w,toasts:y,expanded:b,removeToast:T,defaultRichColors:S,closeButton:C,style:P,cancelButtonStyle:k,actionButtonStyle:_,className:O="",descriptionClassName:j="",duration:R,position:F,gap:q,loadingIcon:V,expandByDefault:H,classNames:I,icons:M,closeButtonAriaLabel:A="Close toast",pauseWhenPageIsHidden:L}=e,[$,W]=ae.useState(null),[K,D]=ae.useState(null),[B,G]=ae.useState(!1),[Y,Q]=ae.useState(!1),[te,le]=ae.useState(!1),[ce,pe]=ae.useState(!1),[ge,Ae]=ae.useState(!1),[Oe,Z]=ae.useState(0),[J,re]=ae.useState(0),se=ae.useRef(u.duration||R||xp),z=ae.useRef(null),U=ae.useRef(null),X=w===0,ie=w+1<=p,ye=u.type,Le=u.dismissible!==!1,Ne=u.className||"",mn=u.descriptionClassName||"",Te=ae.useMemo(()=>d.findIndex(we=>we.toastId===u.id)||0,[d,u.id]),ht=ae.useMemo(()=>{var we;return(we=u.closeButton)!=null?we:C},[u.closeButton,C]),Ra=ae.useMemo(()=>u.duration||R||xp,[u.duration,R]),Yt=ae.useRef(0),rr=ae.useRef(0),La=ae.useRef(0),Qt=ae.useRef(null),[Ma,bi]=F.split("-"),Ei=ae.useMemo(()=>d.reduce((we,Me,Ie)=>Ie>=Te?we:we+Me.height,0),[d,Te]),Da=U2(),ou=u.invert||c,Si=ye==="loading";rr.current=ae.useMemo(()=>Te*q+Ei,[Te,Ei]),ae.useEffect(()=>{se.current=Ra},[Ra]),ae.useEffect(()=>{G(!0)},[]),ae.useEffect(()=>{let we=U.current;if(we){let Me=we.getBoundingClientRect().height;return re(Me),g(Ie=>[{toastId:u.id,height:Me,position:u.position},...Ie]),()=>g(Ie=>Ie.filter(Tt=>Tt.toastId!==u.id))}},[g,u.id]),ae.useLayoutEffect(()=>{if(!B)return;let we=U.current,Me=we.style.height;we.style.height="auto";let Ie=we.getBoundingClientRect().height;we.style.height=Me,re(Ie),g(Tt=>Tt.find(Ct=>Ct.toastId===u.id)?Tt.map(Ct=>Ct.toastId===u.id?{...Ct,height:Ie}:Ct):[{toastId:u.id,height:Ie,position:u.position},...Tt])},[B,u.title,u.description,g,u.id]);let vn=ae.useCallback(()=>{Q(!0),Z(rr.current),g(we=>we.filter(Me=>Me.toastId!==u.id)),setTimeout(()=>{T(u)},r_)},[u,T,g,rr]);ae.useEffect(()=>{if(u.promise&&ye==="loading"||u.duration===1/0||u.type==="loading")return;let we;return b||h||L&&Da?(()=>{if(La.current<Yt.current){let Me=new Date().getTime()-Yt.current;se.current=se.current-Me}La.current=new Date().getTime()})():se.current!==1/0&&(Yt.current=new Date().getTime(),we=setTimeout(()=>{var Me;(Me=u.onAutoClose)==null||Me.call(u,u),vn()},se.current)),()=>clearTimeout(we)},[b,h,u,ye,L,Da,vn]),ae.useEffect(()=>{u.delete&&vn()},[vn,u.delete]);function or(){var we,Me,Ie;return M!=null&&M.loading?ae.createElement("div",{className:Jt(I==null?void 0:I.loader,(we=u==null?void 0:u.classNames)==null?void 0:we.loader,"sonner-loader"),"data-visible":ye==="loading"},M.loading):V?ae.createElement("div",{className:Jt(I==null?void 0:I.loader,(Me=u==null?void 0:u.classNames)==null?void 0:Me.loader,"sonner-loader"),"data-visible":ye==="loading"},V):ae.createElement(I2,{className:Jt(I==null?void 0:I.loader,(Ie=u==null?void 0:u.classNames)==null?void 0:Ie.loader),visible:ye==="loading"})}return ae.createElement("li",{tabIndex:0,ref:U,className:Jt(O,Ne,I==null?void 0:I.toast,(t=u==null?void 0:u.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[ye],(n=u==null?void 0:u.classNames)==null?void 0:n[ye]),"data-sonner-toast":"","data-rich-colors":(r=u.richColors)!=null?r:S,"data-styled":!(u.jsx||u.unstyled||x),"data-mounted":B,"data-promise":!!u.promise,"data-swiped":ge,"data-removed":Y,"data-visible":ie,"data-y-position":Ma,"data-x-position":bi,"data-index":w,"data-front":X,"data-swiping":te,"data-dismissible":Le,"data-type":ye,"data-invert":ou,"data-swipe-out":ce,"data-swipe-direction":K,"data-expanded":!!(b||H&&B),style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${Y?Oe:rr.current}px`,"--initial-height":H?"auto":`${J}px`,...P,...u.style},onDragEnd:()=>{le(!1),W(null),Qt.current=null},onPointerDown:we=>{Si||!Le||(z.current=new Date,Z(rr.current),we.target.setPointerCapture(we.pointerId),we.target.tagName!=="BUTTON"&&(le(!0),Qt.current={x:we.clientX,y:we.clientY}))},onPointerUp:()=>{var we,Me,Ie,Tt;if(ce||!Le)return;Qt.current=null;let Ct=Number(((we=U.current)==null?void 0:we.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),gn=Number(((Me=U.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Dn=new Date().getTime()-((Ie=z.current)==null?void 0:Ie.getTime()),Pt=$==="x"?Ct:gn,Xt=Math.abs(Pt)/Dn;if(Math.abs(Pt)>=n_||Xt>.11){Z(rr.current),(Tt=u.onDismiss)==null||Tt.call(u,u),D($==="x"?Ct>0?"right":"left":gn>0?"down":"up"),vn(),pe(!0),Ae(!1);return}le(!1),W(null)},onPointerMove:we=>{var Me,Ie,Tt,Ct;if(!Qt.current||!Le||((Me=window.getSelection())==null?void 0:Me.toString().length)>0)return;let gn=we.clientY-Qt.current.y,Dn=we.clientX-Qt.current.x,Pt=(Ie=e.swipeDirections)!=null?Ie:o_(F);!$&&(Math.abs(Dn)>1||Math.abs(gn)>1)&&W(Math.abs(Dn)>Math.abs(gn)?"x":"y");let Xt={x:0,y:0};$==="y"?(Pt.includes("top")||Pt.includes("bottom"))&&(Pt.includes("top")&&gn<0||Pt.includes("bottom")&&gn>0)&&(Xt.y=gn):$==="x"&&(Pt.includes("left")||Pt.includes("right"))&&(Pt.includes("left")&&Dn<0||Pt.includes("right")&&Dn>0)&&(Xt.x=Dn),(Math.abs(Xt.x)>0||Math.abs(Xt.y)>0)&&Ae(!0),(Tt=U.current)==null||Tt.style.setProperty("--swipe-amount-x",`${Xt.x}px`),(Ct=U.current)==null||Ct.style.setProperty("--swipe-amount-y",`${Xt.y}px`)}},ht&&!u.jsx?ae.createElement("button",{"aria-label":A,"data-disabled":Si,"data-close-button":!0,onClick:Si||!Le?()=>{}:()=>{var we;vn(),(we=u.onDismiss)==null||we.call(u,u)},className:Jt(I==null?void 0:I.closeButton,(o=u==null?void 0:u.classNames)==null?void 0:o.closeButton)},(i=M==null?void 0:M.close)!=null?i:q2):null,u.jsx||N.isValidElement(u.title)?u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title:ae.createElement(ae.Fragment,null,ye||u.icon||u.promise?ae.createElement("div",{"data-icon":"",className:Jt(I==null?void 0:I.icon,(a=u==null?void 0:u.classNames)==null?void 0:a.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||or():null,u.type!=="loading"?u.icon||(M==null?void 0:M[ye])||M2(ye):null):null,ae.createElement("div",{"data-content":"",className:Jt(I==null?void 0:I.content,(l=u==null?void 0:u.classNames)==null?void 0:l.content)},ae.createElement("div",{"data-title":"",className:Jt(I==null?void 0:I.title,(s=u==null?void 0:u.classNames)==null?void 0:s.title)},typeof u.title=="function"?u.title():u.title),u.description?ae.createElement("div",{"data-description":"",className:Jt(j,mn,I==null?void 0:I.description,(m=u==null?void 0:u.classNames)==null?void 0:m.description)},typeof u.description=="function"?u.description():u.description):null),N.isValidElement(u.cancel)?u.cancel:u.cancel&&rl(u.cancel)?ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||k,onClick:we=>{var Me,Ie;rl(u.cancel)&&Le&&((Ie=(Me=u.cancel).onClick)==null||Ie.call(Me,we),vn())},className:Jt(I==null?void 0:I.cancelButton,(v=u==null?void 0:u.classNames)==null?void 0:v.cancelButton)},u.cancel.label):null,N.isValidElement(u.action)?u.action:u.action&&rl(u.action)?ae.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||_,onClick:we=>{var Me,Ie;rl(u.action)&&((Ie=(Me=u.action).onClick)==null||Ie.call(Me,we),!we.defaultPrevented&&vn())},className:Jt(I==null?void 0:I.actionButton,(f=u==null?void 0:u.classNames)==null?void 0:f.actionButton)},u.action.label):null))};function bp(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function a_(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,a=i?"--mobile-offset":"--offset",l=i?J2:Z2;function s(m){["top","right","bottom","left"].forEach(v=>{n[`${a}-${v}`]=typeof m=="number"?`${m}px`:m})}typeof r=="number"||typeof r=="string"?s(r):typeof r=="object"?["top","right","bottom","left"].forEach(m=>{r[m]===void 0?n[`${a}-${m}`]=l:n[`${a}-${m}`]=typeof r[m]=="number"?`${r[m]}px`:r[m]}):s(l)}),n}var l_=N.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:s,mobileOffset:m,theme:v="light",richColors:f,duration:c,style:u,visibleToasts:x=X2,toastOptions:h,dir:g=bp(),gap:p=t_,loadingIcon:d,icons:w,containerAriaLabel:y="Notifications",pauseWhenPageIsHidden:b}=e,[T,S]=ae.useState([]),C=ae.useMemo(()=>Array.from(new Set([r].concat(T.filter(L=>L.position).map(L=>L.position)))),[T,r]),[P,k]=ae.useState([]),[_,O]=ae.useState(!1),[j,R]=ae.useState(!1),[F,q]=ae.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),V=ae.useRef(null),H=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=ae.useRef(null),M=ae.useRef(!1),A=ae.useCallback(L=>{S($=>{var W;return(W=$.find(K=>K.id===L.id))!=null&&W.delete||bt.dismiss(L.id),$.filter(({id:K})=>K!==L.id)})},[]);return ae.useEffect(()=>bt.subscribe(L=>{if(L.dismiss){S($=>$.map(W=>W.id===L.id?{...W,delete:!0}:W));return}setTimeout(()=>{ey.flushSync(()=>{S($=>{let W=$.findIndex(K=>K.id===L.id);return W!==-1?[...$.slice(0,W),{...$[W],...L},...$.slice(W+1)]:[L,...$]})})})}),[]),ae.useEffect(()=>{if(v!=="system"){q(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let L=window.matchMedia("(prefers-color-scheme: dark)");try{L.addEventListener("change",({matches:$})=>{q($?"dark":"light")})}catch{L.addListener(({matches:W})=>{try{q(W?"dark":"light")}catch(K){console.error(K)}})}},[v]),ae.useEffect(()=>{T.length<=1&&O(!1)},[T]),ae.useEffect(()=>{let L=$=>{var W,K;o.every(D=>$[D]||$.code===D)&&(O(!0),(W=V.current)==null||W.focus()),$.code==="Escape"&&(document.activeElement===V.current||(K=V.current)!=null&&K.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",L),()=>document.removeEventListener("keydown",L)},[o]),ae.useEffect(()=>{if(V.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,M.current=!1)}},[V.current]),ae.createElement("section",{ref:t,"aria-label":`${y} ${H}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((L,$)=>{var W;let[K,D]=L.split("-");return T.length?ae.createElement("ol",{key:L,dir:g==="auto"?bp():g,tabIndex:-1,ref:V,className:l,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":K,"data-lifted":_&&T.length>1&&!i,"data-x-position":D,style:{"--front-toast-height":`${((W=P[0])==null?void 0:W.height)||0}px`,"--width":`${e_}px`,"--gap":`${p}px`,...u,...a_(s,m)},onBlur:B=>{M.current&&!B.currentTarget.contains(B.relatedTarget)&&(M.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||M.current||(M.current=!0,I.current=B.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{j||O(!1)},onDragEnd:()=>O(!1),onPointerDown:B=>{B.target instanceof HTMLElement&&B.target.dataset.dismissible==="false"||R(!0)},onPointerUp:()=>R(!1)},T.filter(B=>!B.position&&$===0||B.position===L).map((B,G)=>{var Y,Q;return ae.createElement(i_,{key:B.id,icons:w,index:G,toast:B,defaultRichColors:f,duration:(Y=h==null?void 0:h.duration)!=null?Y:c,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:n,visibleToasts:x,closeButton:(Q=h==null?void 0:h.closeButton)!=null?Q:a,interacting:j,position:L,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:A,toasts:T.filter(te=>te.position==B.position),heights:P.filter(te=>te.position==B.position),setHeights:k,expandByDefault:i,gap:p,loadingIcon:d,expanded:_,pauseWhenPageIsHidden:b,swipeDirections:e.swipeDirections})})):null}))});const s_=({...e})=>{const{theme:t="system"}=L2();return E.jsx(l_,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var u_=_f[" useId ".trim().toString()]||(()=>{}),c_=0;function Fo(e){const[t,n]=N.useState(u_());return at(()=>{n(r=>r??String(c_++))},[e]),t?`radix-${t}`:""}const f_=["top","right","bottom","left"],jr=Math.min,Lt=Math.max,Zl=Math.round,ol=Math.floor,An=e=>({x:e,y:e}),d_={left:"right",right:"left",bottom:"top",top:"bottom"},h_={start:"end",end:"start"};function Kc(e,t,n){return Lt(e,jr(t,n))}function Jn(e,t){return typeof e=="function"?e(t):e}function er(e){return e.split("-")[0]}function fi(e){return e.split("-")[1]}function Pd(e){return e==="x"?"y":"x"}function Ad(e){return e==="y"?"height":"width"}const p_=new Set(["top","bottom"]);function Tn(e){return p_.has(er(e))?"y":"x"}function jd(e){return Pd(Tn(e))}function m_(e,t,n){n===void 0&&(n=!1);const r=fi(e),o=jd(e),i=Ad(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Jl(a)),[a,Jl(a)]}function v_(e){const t=Jl(e);return[Gc(e),t,Gc(t)]}function Gc(e){return e.replace(/start|end/g,t=>h_[t])}const Ep=["left","right"],Sp=["right","left"],g_=["top","bottom"],y_=["bottom","top"];function w_(e,t,n){switch(e){case"top":case"bottom":return n?t?Sp:Ep:t?Ep:Sp;case"left":case"right":return t?g_:y_;default:return[]}}function x_(e,t,n,r){const o=fi(e);let i=w_(er(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(Gc)))),i}function Jl(e){return e.replace(/left|right|bottom|top/g,t=>d_[t])}function b_(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gy(e){return typeof e!="number"?b_(e):{top:e,right:e,bottom:e,left:e}}function es(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function _p(e,t,n){let{reference:r,floating:o}=e;const i=Tn(t),a=jd(t),l=Ad(a),s=er(t),m=i==="y",v=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,c=r[l]/2-o[l]/2;let u;switch(s){case"top":u={x:v,y:r.y-o.height};break;case"bottom":u={x:v,y:r.y+r.height};break;case"right":u={x:r.x+r.width,y:f};break;case"left":u={x:r.x-o.width,y:f};break;default:u={x:r.x,y:r.y}}switch(fi(t)){case"start":u[a]-=c*(n&&m?-1:1);break;case"end":u[a]+=c*(n&&m?-1:1);break}return u}const E_=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=i.filter(Boolean),s=await(a.isRTL==null?void 0:a.isRTL(t));let m=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:v,y:f}=_p(m,r,s),c=r,u={},x=0;for(let h=0;h<l.length;h++){const{name:g,fn:p}=l[h],{x:d,y:w,data:y,reset:b}=await p({x:v,y:f,initialPlacement:r,placement:c,strategy:o,middlewareData:u,rects:m,platform:a,elements:{reference:e,floating:t}});v=d??v,f=w??f,u={...u,[g]:{...u[g],...y}},b&&x<=50&&(x++,typeof b=="object"&&(b.placement&&(c=b.placement),b.rects&&(m=b.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:v,y:f}=_p(m,c,s)),h=-1)}return{x:v,y:f,placement:c,strategy:o,middlewareData:u}};async function ga(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:m="clippingAncestors",rootBoundary:v="viewport",elementContext:f="floating",altBoundary:c=!1,padding:u=0}=Jn(t,e),x=Gy(u),g=l[c?f==="floating"?"reference":"floating":f],p=es(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:m,rootBoundary:v,strategy:s})),d=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),y=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},b=es(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:d,offsetParent:w,strategy:s}):d);return{top:(p.top-b.top+x.top)/y.y,bottom:(b.bottom-p.bottom+x.bottom)/y.y,left:(p.left-b.left+x.left)/y.x,right:(b.right-p.right+x.right)/y.x}}const S_=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:m,padding:v=0}=Jn(e,t)||{};if(m==null)return{};const f=Gy(v),c={x:n,y:r},u=jd(o),x=Ad(u),h=await a.getDimensions(m),g=u==="y",p=g?"top":"left",d=g?"bottom":"right",w=g?"clientHeight":"clientWidth",y=i.reference[x]+i.reference[u]-c[u]-i.floating[x],b=c[u]-i.reference[u],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(m));let S=T?T[w]:0;(!S||!await(a.isElement==null?void 0:a.isElement(T)))&&(S=l.floating[w]||i.floating[x]);const C=y/2-b/2,P=S/2-h[x]/2-1,k=jr(f[p],P),_=jr(f[d],P),O=k,j=S-h[x]-_,R=S/2-h[x]/2+C,F=Kc(O,R,j),q=!s.arrow&&fi(o)!=null&&R!==F&&i.reference[x]/2-(R<O?k:_)-h[x]/2<0,V=q?R<O?R-O:R-j:0;return{[u]:c[u]+V,data:{[u]:F,centerOffset:R-F-V,...q&&{alignmentOffset:V}},reset:q}}}),__=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:m}=t,{mainAxis:v=!0,crossAxis:f=!0,fallbackPlacements:c,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=Jn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const p=er(o),d=Tn(l),w=er(l)===l,y=await(s.isRTL==null?void 0:s.isRTL(m.floating)),b=c||(w||!h?[Jl(l)]:v_(l)),T=x!=="none";!c&&T&&b.push(...x_(l,h,x,y));const S=[l,...b],C=await ga(t,g),P=[];let k=((r=i.flip)==null?void 0:r.overflows)||[];if(v&&P.push(C[p]),f){const R=m_(o,a,y);P.push(C[R[0]],C[R[1]])}if(k=[...k,{placement:o,overflows:P}],!P.every(R=>R<=0)){var _,O;const R=(((_=i.flip)==null?void 0:_.index)||0)+1,F=S[R];if(F&&(!(f==="alignment"?d!==Tn(F):!1)||k.every(H=>H.overflows[0]>0&&Tn(H.placement)===d)))return{data:{index:R,overflows:k},reset:{placement:F}};let q=(O=k.filter(V=>V.overflows[0]<=0).sort((V,H)=>V.overflows[1]-H.overflows[1])[0])==null?void 0:O.placement;if(!q)switch(u){case"bestFit":{var j;const V=(j=k.filter(H=>{if(T){const I=Tn(H.placement);return I===d||I==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(I=>I>0).reduce((I,M)=>I+M,0)]).sort((H,I)=>H[1]-I[1])[0])==null?void 0:j[0];V&&(q=V);break}case"initialPlacement":q=l;break}if(o!==q)return{reset:{placement:q}}}return{}}}};function kp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Np(e){return f_.some(t=>e[t]>=0)}const k_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Jn(e,t);switch(r){case"referenceHidden":{const i=await ga(t,{...o,elementContext:"reference"}),a=kp(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Np(a)}}}case"escaped":{const i=await ga(t,{...o,altBoundary:!0}),a=kp(i,n.floating);return{data:{escapedOffsets:a,escaped:Np(a)}}}default:return{}}}}},Yy=new Set(["left","top"]);async function N_(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=er(n),l=fi(n),s=Tn(n)==="y",m=Yy.has(a)?-1:1,v=i&&s?-1:1,f=Jn(t,e);let{mainAxis:c,crossAxis:u,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"&&(u=l==="end"?x*-1:x),s?{x:u*v,y:c*m}:{x:c*m,y:u*v}}const O_=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await N_(t,e);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},T_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:p,y:d}=g;return{x:p,y:d}}},...s}=Jn(e,t),m={x:n,y:r},v=await ga(t,s),f=Tn(er(o)),c=Pd(f);let u=m[c],x=m[f];if(i){const g=c==="y"?"top":"left",p=c==="y"?"bottom":"right",d=u+v[g],w=u-v[p];u=Kc(d,u,w)}if(a){const g=f==="y"?"top":"left",p=f==="y"?"bottom":"right",d=x+v[g],w=x-v[p];x=Kc(d,x,w)}const h=l.fn({...t,[c]:u,[f]:x});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[c]:i,[f]:a}}}}}},C_=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:m=!0}=Jn(e,t),v={x:n,y:r},f=Tn(o),c=Pd(f);let u=v[c],x=v[f];const h=Jn(l,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const w=c==="y"?"height":"width",y=i.reference[c]-i.floating[w]+g.mainAxis,b=i.reference[c]+i.reference[w]-g.mainAxis;u<y?u=y:u>b&&(u=b)}if(m){var p,d;const w=c==="y"?"width":"height",y=Yy.has(er(o)),b=i.reference[f]-i.floating[w]+(y&&((p=a.offset)==null?void 0:p[f])||0)+(y?0:g.crossAxis),T=i.reference[f]+i.reference[w]+(y?0:((d=a.offset)==null?void 0:d[f])||0)-(y?g.crossAxis:0);x<b?x=b:x>T&&(x=T)}return{[c]:u,[f]:x}}}},P_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...m}=Jn(e,t),v=await ga(t,m),f=er(o),c=fi(o),u=Tn(o)==="y",{width:x,height:h}=i.floating;let g,p;f==="top"||f==="bottom"?(g=f,p=c===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(p=f,g=c==="end"?"top":"bottom");const d=h-v.top-v.bottom,w=x-v.left-v.right,y=jr(h-v[g],d),b=jr(x-v[p],w),T=!t.middlewareData.shift;let S=y,C=b;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=d),T&&!c){const k=Lt(v.left,0),_=Lt(v.right,0),O=Lt(v.top,0),j=Lt(v.bottom,0);u?C=x-2*(k!==0||_!==0?k+_:Lt(v.left,v.right)):S=h-2*(O!==0||j!==0?O+j:Lt(v.top,v.bottom))}await s({...t,availableWidth:C,availableHeight:S});const P=await a.getDimensions(l.floating);return x!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function Rs(){return typeof window<"u"}function di(e){return Qy(e)?(e.nodeName||"").toLowerCase():"#document"}function Ft(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Mn(e){var t;return(t=(Qy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qy(e){return Rs()?e instanceof Node||e instanceof Ft(e).Node:!1}function dn(e){return Rs()?e instanceof Element||e instanceof Ft(e).Element:!1}function Ln(e){return Rs()?e instanceof HTMLElement||e instanceof Ft(e).HTMLElement:!1}function Op(e){return!Rs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ft(e).ShadowRoot}const A_=new Set(["inline","contents"]);function ja(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!A_.has(o)}const j_=new Set(["table","td","th"]);function R_(e){return j_.has(di(e))}const L_=[":popover-open",":modal"];function Ls(e){return L_.some(t=>{try{return e.matches(t)}catch{return!1}})}const M_=["transform","translate","scale","rotate","perspective"],D_=["transform","translate","scale","rotate","perspective","filter"],I_=["paint","layout","strict","content"];function Rd(e){const t=Ld(),n=dn(e)?hn(e):e;return M_.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)||D_.some(r=>(n.willChange||"").includes(r))||I_.some(r=>(n.contain||"").includes(r))}function F_(e){let t=Rr(e);for(;Ln(t)&&!oi(t);){if(Rd(t))return t;if(Ls(t))return null;t=Rr(t)}return null}function Ld(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const $_=new Set(["html","body","#document"]);function oi(e){return $_.has(di(e))}function hn(e){return Ft(e).getComputedStyle(e)}function Ms(e){return dn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rr(e){if(di(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Op(e)&&e.host||Mn(e);return Op(t)?t.host:t}function Xy(e){const t=Rr(e);return oi(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ln(t)&&ja(t)?t:Xy(t)}function ya(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Xy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ft(o);if(i){const l=Yc(a);return t.concat(a,a.visualViewport||[],ja(o)?o:[],l&&n?ya(l):[])}return t.concat(o,ya(o,[],n))}function Yc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zy(e){const t=hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ln(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=Zl(n)!==i||Zl(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function Md(e){return dn(e)?e:e.contextElement}function $o(e){const t=Md(e);if(!Ln(t))return An(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Zy(t);let a=(i?Zl(n.width):n.width)/r,l=(i?Zl(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const B_=An(0);function Jy(e){const t=Ft(e);return!Ld()||!t.visualViewport?B_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function z_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ft(e)?!1:t}function io(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Md(e);let a=An(1);t&&(r?dn(r)&&(a=$o(r)):a=$o(e));const l=z_(i,n,r)?Jy(i):An(0);let s=(o.left+l.x)/a.x,m=(o.top+l.y)/a.y,v=o.width/a.x,f=o.height/a.y;if(i){const c=Ft(i),u=r&&dn(r)?Ft(r):r;let x=c,h=Yc(x);for(;h&&r&&u!==x;){const g=$o(h),p=h.getBoundingClientRect(),d=hn(h),w=p.left+(h.clientLeft+parseFloat(d.paddingLeft))*g.x,y=p.top+(h.clientTop+parseFloat(d.paddingTop))*g.y;s*=g.x,m*=g.y,v*=g.x,f*=g.y,s+=w,m+=y,x=Ft(h),h=Yc(x)}}return es({width:v,height:f,x:s,y:m})}function Dd(e,t){const n=Ms(e).scrollLeft;return t?t.left+n:io(Mn(e)).left+n}function e0(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Dd(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function q_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Mn(r),l=t?Ls(t.floating):!1;if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},m=An(1);const v=An(0),f=Ln(r);if((f||!f&&!i)&&((di(r)!=="body"||ja(a))&&(s=Ms(r)),Ln(r))){const u=io(r);m=$o(r),v.x=u.x+r.clientLeft,v.y=u.y+r.clientTop}const c=a&&!f&&!i?e0(a,s,!0):An(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-s.scrollLeft*m.x+v.x+c.x,y:n.y*m.y-s.scrollTop*m.y+v.y+c.y}}function U_(e){return Array.from(e.getClientRects())}function H_(e){const t=Mn(e),n=Ms(e),r=e.ownerDocument.body,o=Lt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Lt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Dd(e);const l=-n.scrollTop;return hn(r).direction==="rtl"&&(a+=Lt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}function V_(e,t){const n=Ft(e),r=Mn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const m=Ld();(!m||m&&t==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l,y:s}}const W_=new Set(["absolute","fixed"]);function K_(e,t){const n=io(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ln(e)?$o(e):An(1),a=e.clientWidth*i.x,l=e.clientHeight*i.y,s=o*i.x,m=r*i.y;return{width:a,height:l,x:s,y:m}}function Tp(e,t,n){let r;if(t==="viewport")r=V_(e,n);else if(t==="document")r=H_(Mn(e));else if(dn(t))r=K_(t,n);else{const o=Jy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return es(r)}function t0(e,t){const n=Rr(e);return n===t||!dn(n)||oi(n)?!1:hn(n).position==="fixed"||t0(n,t)}function G_(e,t){const n=t.get(e);if(n)return n;let r=ya(e,[],!1).filter(l=>dn(l)&&di(l)!=="body"),o=null;const i=hn(e).position==="fixed";let a=i?Rr(e):e;for(;dn(a)&&!oi(a);){const l=hn(a),s=Rd(a);!s&&l.position==="fixed"&&(o=null),(i?!s&&!o:!s&&l.position==="static"&&!!o&&W_.has(o.position)||ja(a)&&!s&&t0(e,a))?r=r.filter(v=>v!==a):o=l,a=Rr(a)}return t.set(e,r),r}function Y_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Ls(t)?[]:G_(t,this._c):[].concat(n),r],l=a[0],s=a.reduce((m,v)=>{const f=Tp(t,v,o);return m.top=Lt(f.top,m.top),m.right=jr(f.right,m.right),m.bottom=jr(f.bottom,m.bottom),m.left=Lt(f.left,m.left),m},Tp(t,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Q_(e){const{width:t,height:n}=Zy(e);return{width:t,height:n}}function X_(e,t,n){const r=Ln(t),o=Mn(t),i=n==="fixed",a=io(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=An(0);function m(){s.x=Dd(o)}if(r||!r&&!i)if((di(t)!=="body"||ja(o))&&(l=Ms(t)),r){const u=io(t,!0,i,t);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else o&&m();i&&!r&&o&&m();const v=o&&!r&&!i?e0(o,l):An(0),f=a.left+l.scrollLeft-s.x-v.x,c=a.top+l.scrollTop-s.y-v.y;return{x:f,y:c,width:a.width,height:a.height}}function Du(e){return hn(e).position==="static"}function Cp(e,t){if(!Ln(e)||hn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Mn(e)===n&&(n=n.ownerDocument.body),n}function n0(e,t){const n=Ft(e);if(Ls(e))return n;if(!Ln(e)){let o=Rr(e);for(;o&&!oi(o);){if(dn(o)&&!Du(o))return o;o=Rr(o)}return n}let r=Cp(e,t);for(;r&&R_(r)&&Du(r);)r=Cp(r,t);return r&&oi(r)&&Du(r)&&!Rd(r)?n:r||F_(e)||n}const Z_=async function(e){const t=this.getOffsetParent||n0,n=this.getDimensions,r=await n(e.floating);return{reference:X_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function J_(e){return hn(e).direction==="rtl"}const ek={convertOffsetParentRelativeRectToViewportRelativeRect:q_,getDocumentElement:Mn,getClippingRect:Y_,getOffsetParent:n0,getElementRects:Z_,getClientRects:U_,getDimensions:Q_,getScale:$o,isElement:dn,isRTL:J_};function r0(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function tk(e,t){let n=null,r;const o=Mn(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),i();const m=e.getBoundingClientRect(),{left:v,top:f,width:c,height:u}=m;if(l||t(),!c||!u)return;const x=ol(f),h=ol(o.clientWidth-(v+c)),g=ol(o.clientHeight-(f+u)),p=ol(v),w={rootMargin:-x+"px "+-h+"px "+-g+"px "+-p+"px",threshold:Lt(0,jr(1,s))||1};let y=!0;function b(T){const S=T[0].intersectionRatio;if(S!==s){if(!y)return a();S?a(!1,S):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S===1&&!r0(m,e.getBoundingClientRect())&&a(),y=!1}try{n=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return a(!0),i}function nk(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=r,m=Md(e),v=o||i?[...m?ya(m):[],...ya(t)]:[];v.forEach(p=>{o&&p.addEventListener("scroll",n,{passive:!0}),i&&p.addEventListener("resize",n)});const f=m&&l?tk(m,n):null;let c=-1,u=null;a&&(u=new ResizeObserver(p=>{let[d]=p;d&&d.target===m&&u&&(u.unobserve(t),cancelAnimationFrame(c),c=requestAnimationFrame(()=>{var w;(w=u)==null||w.observe(t)})),n()}),m&&!s&&u.observe(m),u.observe(t));let x,h=s?io(e):null;s&&g();function g(){const p=io(e);h&&!r0(h,p)&&n(),h=p,x=requestAnimationFrame(g)}return n(),()=>{var p;v.forEach(d=>{o&&d.removeEventListener("scroll",n),i&&d.removeEventListener("resize",n)}),f==null||f(),(p=u)==null||p.disconnect(),u=null,s&&cancelAnimationFrame(x)}}const rk=O_,ok=T_,ik=__,ak=P_,lk=k_,Pp=S_,sk=C_,uk=(e,t,n)=>{const r=new Map,o={platform:ek,...n},i={...o.platform,_c:r};return E_(e,t,{...o,platform:i})};var ck=typeof document<"u",fk=function(){},kl=ck?N.useLayoutEffect:fk;function ts(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,o;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(!ts(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ts(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function o0(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ap(e,t){const n=o0(e);return Math.round(t*n)/n}function Iu(e){const t=N.useRef(e);return kl(()=>{t.current=e}),t}function dk(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:s,open:m}=e,[v,f]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[c,u]=N.useState(r);ts(c,r)||u(r);const[x,h]=N.useState(null),[g,p]=N.useState(null),d=N.useCallback(H=>{H!==T.current&&(T.current=H,h(H))},[]),w=N.useCallback(H=>{H!==S.current&&(S.current=H,p(H))},[]),y=i||x,b=a||g,T=N.useRef(null),S=N.useRef(null),C=N.useRef(v),P=s!=null,k=Iu(s),_=Iu(o),O=Iu(m),j=N.useCallback(()=>{if(!T.current||!S.current)return;const H={placement:t,strategy:n,middleware:c};_.current&&(H.platform=_.current),uk(T.current,S.current,H).then(I=>{const M={...I,isPositioned:O.current!==!1};R.current&&!ts(C.current,M)&&(C.current=M,Ir.flushSync(()=>{f(M)}))})},[c,t,n,_,O]);kl(()=>{m===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(H=>({...H,isPositioned:!1})))},[m]);const R=N.useRef(!1);kl(()=>(R.current=!0,()=>{R.current=!1}),[]),kl(()=>{if(y&&(T.current=y),b&&(S.current=b),y&&b){if(k.current)return k.current(y,b,j);j()}},[y,b,j,k,P]);const F=N.useMemo(()=>({reference:T,floating:S,setReference:d,setFloating:w}),[d,w]),q=N.useMemo(()=>({reference:y,floating:b}),[y,b]),V=N.useMemo(()=>{const H={position:n,left:0,top:0};if(!q.floating)return H;const I=Ap(q.floating,v.x),M=Ap(q.floating,v.y);return l?{...H,transform:"translate("+I+"px, "+M+"px)",...o0(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:M}},[n,l,q.floating,v.x,v.y]);return N.useMemo(()=>({...v,update:j,refs:F,elements:q,floatingStyles:V}),[v,j,F,q,V])}const hk=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Pp({element:r.current,padding:o}).fn(n):{}:r?Pp({element:r,padding:o}).fn(n):{}}}},pk=(e,t)=>({...rk(e),options:[e,t]}),mk=(e,t)=>({...ok(e),options:[e,t]}),vk=(e,t)=>({...sk(e),options:[e,t]}),gk=(e,t)=>({...ik(e),options:[e,t]}),yk=(e,t)=>({...ak(e),options:[e,t]}),wk=(e,t)=>({...lk(e),options:[e,t]}),xk=(e,t)=>({...hk(e),options:[e,t]});var bk="Arrow",i0=N.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return E.jsx(Se.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});i0.displayName=bk;var Ek=i0;function a0(e){const[t,n]=N.useState(void 0);return at(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,l;if("borderBoxSize"in i){const s=i.borderBoxSize,m=Array.isArray(s)?s[0]:s;a=m.inlineSize,l=m.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Id="Popper",[l0,Ds]=fo(Id),[Sk,s0]=l0(Id),u0=e=>{const{__scopePopper:t,children:n}=e,[r,o]=N.useState(null);return E.jsx(Sk,{scope:t,anchor:r,onAnchorChange:o,children:n})};u0.displayName=Id;var c0="PopperAnchor",f0=N.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=s0(c0,n),a=N.useRef(null),l=Re(t,a);return N.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:E.jsx(Se.div,{...o,ref:l})});f0.displayName=c0;var Fd="PopperContent",[_k,kk]=l0(Fd),d0=N.forwardRef((e,t)=>{var B,G,Y,Q,te,le;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:s=!0,collisionBoundary:m=[],collisionPadding:v=0,sticky:f="partial",hideWhenDetached:c=!1,updatePositionStrategy:u="optimized",onPlaced:x,...h}=e,g=s0(Fd,n),[p,d]=N.useState(null),w=Re(t,ce=>d(ce)),[y,b]=N.useState(null),T=a0(y),S=(T==null?void 0:T.width)??0,C=(T==null?void 0:T.height)??0,P=r+(i!=="center"?"-"+i:""),k=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},_=Array.isArray(m)?m:[m],O=_.length>0,j={padding:k,boundary:_.filter(Ok),altBoundary:O},{refs:R,floatingStyles:F,placement:q,isPositioned:V,middlewareData:H}=dk({strategy:"fixed",placement:P,whileElementsMounted:(...ce)=>nk(...ce,{animationFrame:u==="always"}),elements:{reference:g.anchor},middleware:[pk({mainAxis:o+C,alignmentAxis:a}),s&&mk({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?vk():void 0,...j}),s&&gk({...j}),yk({...j,apply:({elements:ce,rects:pe,availableWidth:ge,availableHeight:Ae})=>{const{width:Oe,height:Z}=pe.reference,J=ce.floating.style;J.setProperty("--radix-popper-available-width",`${ge}px`),J.setProperty("--radix-popper-available-height",`${Ae}px`),J.setProperty("--radix-popper-anchor-width",`${Oe}px`),J.setProperty("--radix-popper-anchor-height",`${Z}px`)}}),y&&xk({element:y,padding:l}),Tk({arrowWidth:S,arrowHeight:C}),c&&wk({strategy:"referenceHidden",...j})]}),[I,M]=m0(q),A=fn(x);at(()=>{V&&(A==null||A())},[V,A]);const L=(B=H.arrow)==null?void 0:B.x,$=(G=H.arrow)==null?void 0:G.y,W=((Y=H.arrow)==null?void 0:Y.centerOffset)!==0,[K,D]=N.useState();return at(()=>{p&&D(window.getComputedStyle(p).zIndex)},[p]),E.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:V?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(Q=H.transformOrigin)==null?void 0:Q.x,(te=H.transformOrigin)==null?void 0:te.y].join(" "),...((le=H.hide)==null?void 0:le.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(_k,{scope:n,placedSide:I,onArrowChange:b,arrowX:L,arrowY:$,shouldHideArrow:W,children:E.jsx(Se.div,{"data-side":I,"data-align":M,...h,ref:w,style:{...h.style,animation:V?void 0:"none"}})})})});d0.displayName=Fd;var h0="PopperArrow",Nk={top:"bottom",right:"left",bottom:"top",left:"right"},p0=N.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=kk(h0,r),a=Nk[i.placedSide];return E.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:E.jsx(Ek,{...o,ref:n,style:{...o.style,display:"block"}})})});p0.displayName=h0;function Ok(e){return e!==null}var Tk=e=>({name:"transformOrigin",options:e,fn(t){var g,p,d;const{placement:n,rects:r,middlewareData:o}=t,a=((g=o.arrow)==null?void 0:g.centerOffset)!==0,l=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[m,v]=m0(n),f={start:"0%",center:"50%",end:"100%"}[v],c=(((p=o.arrow)==null?void 0:p.x)??0)+l/2,u=(((d=o.arrow)==null?void 0:d.y)??0)+s/2;let x="",h="";return m==="bottom"?(x=a?f:`${c}px`,h=`${-s}px`):m==="top"?(x=a?f:`${c}px`,h=`${r.floating.height+s}px`):m==="right"?(x=`${-s}px`,h=a?f:`${u}px`):m==="left"&&(x=`${r.floating.width+s}px`,h=a?f:`${u}px`),{data:{x,y:h}}}});function m0(e){const[t,n="center"]=e.split("-");return[t,n]}var Ck=u0,v0=f0,g0=d0,y0=p0,[Is,w5]=fo("Tooltip",[Ds]),$d=Ds(),w0="TooltipProvider",Pk=700,jp="tooltip.open",[Ak,x0]=Is(w0),b0=e=>{const{__scopeTooltip:t,delayDuration:n=Pk,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,a=N.useRef(!0),l=N.useRef(!1),s=N.useRef(0);return N.useEffect(()=>{const m=s.current;return()=>window.clearTimeout(m)},[]),E.jsx(Ak,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:N.useCallback(()=>{window.clearTimeout(s.current),a.current=!1},[]),onClose:N.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:N.useCallback(m=>{l.current=m},[]),disableHoverableContent:o,children:i})};b0.displayName=w0;var E0="Tooltip",[x5,Fs]=Is(E0),Qc="TooltipTrigger",jk=N.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Fs(Qc,n),i=x0(Qc,n),a=$d(n),l=N.useRef(null),s=Re(t,l,o.onTriggerChange),m=N.useRef(!1),v=N.useRef(!1),f=N.useCallback(()=>m.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),E.jsx(v0,{asChild:!0,...a,children:E.jsx(Se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:s,onPointerMove:ve(e.onPointerMove,c=>{c.pointerType!=="touch"&&!v.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),v.current=!0)}),onPointerLeave:ve(e.onPointerLeave,()=>{o.onTriggerLeave(),v.current=!1}),onPointerDown:ve(e.onPointerDown,()=>{o.open&&o.onClose(),m.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:ve(e.onFocus,()=>{m.current||o.onOpen()}),onBlur:ve(e.onBlur,o.onClose),onClick:ve(e.onClick,o.onClose)})})});jk.displayName=Qc;var Rk="TooltipPortal",[b5,Lk]=Is(Rk,{forceMount:void 0}),ii="TooltipContent",S0=N.forwardRef((e,t)=>{const n=Lk(ii,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=Fs(ii,e.__scopeTooltip);return E.jsx(ui,{present:r||a.open,children:a.disableHoverableContent?E.jsx(_0,{side:o,...i,ref:t}):E.jsx(Mk,{side:o,...i,ref:t})})}),Mk=N.forwardRef((e,t)=>{const n=Fs(ii,e.__scopeTooltip),r=x0(ii,e.__scopeTooltip),o=N.useRef(null),i=Re(t,o),[a,l]=N.useState(null),{trigger:s,onClose:m}=n,v=o.current,{onPointerInTransitChange:f}=r,c=N.useCallback(()=>{l(null),f(!1)},[f]),u=N.useCallback((x,h)=>{const g=x.currentTarget,p={x:x.clientX,y:x.clientY},d=Bk(p,g.getBoundingClientRect()),w=zk(p,d),y=qk(h.getBoundingClientRect()),b=Hk([...w,...y]);l(b),f(!0)},[f]);return N.useEffect(()=>()=>c(),[c]),N.useEffect(()=>{if(s&&v){const x=g=>u(g,v),h=g=>u(g,s);return s.addEventListener("pointerleave",x),v.addEventListener("pointerleave",h),()=>{s.removeEventListener("pointerleave",x),v.removeEventListener("pointerleave",h)}}},[s,v,u,c]),N.useEffect(()=>{if(a){const x=h=>{const g=h.target,p={x:h.clientX,y:h.clientY},d=(s==null?void 0:s.contains(g))||(v==null?void 0:v.contains(g)),w=!Uk(p,a);d?c():w&&(c(),m())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[s,v,a,m,c]),E.jsx(_0,{...e,ref:i})}),[Dk,Ik]=Is(E0,{isInside:!1}),Fk=RE("TooltipContent"),_0=N.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...l}=e,s=Fs(ii,n),m=$d(n),{onClose:v}=s;return N.useEffect(()=>(document.addEventListener(jp,v),()=>document.removeEventListener(jp,v)),[v]),N.useEffect(()=>{if(s.trigger){const f=c=>{const u=c.target;u!=null&&u.contains(s.trigger)&&v()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[s.trigger,v]),E.jsx(Ca,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:v,children:E.jsxs(g0,{"data-state":s.stateAttribute,...m,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(Fk,{children:r}),E.jsx(Dk,{scope:n,isInside:!0,children:E.jsx(tS,{id:s.contentId,role:"tooltip",children:o||r})})]})})});S0.displayName=ii;var k0="TooltipArrow",$k=N.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=$d(n);return Ik(k0,n).isInside?null:E.jsx(y0,{...o,...r,ref:t})});$k.displayName=k0;function Bk(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zk(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qk(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Uk(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const l=t[i],s=t[a],m=l.x,v=l.y,f=s.x,c=s.y;v>r!=c>r&&n<(f-m)*(r-v)/(c-v)+m&&(o=!o)}return o}function Hk(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),Vk(t)}function Vk(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Wk=b0,N0=S0;const Kk=Wk,Gk=N.forwardRef(({className:e,sideOffset:t=4,...n},r)=>E.jsx(N0,{ref:r,sideOffset:t,className:ke("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Gk.displayName=N0.displayName;var $s=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(){}},Bs=typeof window>"u"||"Deno"in globalThis;function nn(){}function Yk(e,t){return typeof e=="function"?e(t):e}function Qk(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Xc(e,t){return typeof e=="function"?e(t):e}function Zk(e,t){return typeof e=="function"?e(t):e}function Rp(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==Bd(a,t.options))return!1}else if(!xa(t.queryKey,a))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||o&&o!==t.state.fetchStatus||i&&!i(t))}function Lp(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(wa(t.options.mutationKey)!==wa(i))return!1}else if(!xa(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Bd(e,t){return((t==null?void 0:t.queryKeyHashFn)||wa)(e)}function wa(e){return JSON.stringify(e,(t,n)=>Zc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function xa(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>xa(e[n],t[n])):!1}function O0(e,t){if(e===t)return e;const n=Mp(e)&&Mp(t);if(n||Zc(e)&&Zc(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,l=n?[]:{},s=new Set(r);let m=0;for(let v=0;v<a;v++){const f=n?v:i[v];(!n&&s.has(f)||n)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,m++):(l[f]=O0(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&m++)}return o===a&&m===o?e:l}return t}function Mp(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zc(e){if(!Dp(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Dp(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Dp(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jk(e){return new Promise(t=>{setTimeout(t,e)})}function eN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?O0(e,t):t}function tN(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function nN(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zd=Symbol();function T0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===zd?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Wr,pr,qo,Lm,rN=(Lm=class extends $s{constructor(){super();Pe(this,Wr);Pe(this,pr);Pe(this,qo);be(this,qo,t=>{if(!Bs&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ee(this,pr)||this.setEventListener(ee(this,qo))}onUnsubscribe(){var t;this.hasListeners()||((t=ee(this,pr))==null||t.call(this),be(this,pr,void 0))}setEventListener(t){var n;be(this,qo,t),(n=ee(this,pr))==null||n.call(this),be(this,pr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ee(this,Wr)!==t&&(be(this,Wr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ee(this,Wr)=="boolean"?ee(this,Wr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Wr=new WeakMap,pr=new WeakMap,qo=new WeakMap,Lm),C0=new rN,Uo,mr,Ho,Mm,oN=(Mm=class extends $s{constructor(){super();Pe(this,Uo,!0);Pe(this,mr);Pe(this,Ho);be(this,Ho,t=>{if(!Bs&&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(){ee(this,mr)||this.setEventListener(ee(this,Ho))}onUnsubscribe(){var t;this.hasListeners()||((t=ee(this,mr))==null||t.call(this),be(this,mr,void 0))}setEventListener(t){var n;be(this,Ho,t),(n=ee(this,mr))==null||n.call(this),be(this,mr,t(this.setOnline.bind(this)))}setOnline(t){ee(this,Uo)!==t&&(be(this,Uo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ee(this,Uo)}},Uo=new WeakMap,mr=new WeakMap,Ho=new WeakMap,Mm),ns=new oN;function iN(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function aN(e){return Math.min(1e3*2**e,3e4)}function P0(e){return(e??"online")==="online"?ns.isOnline():!0}var A0=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Fu(e){return e instanceof A0}function j0(e){let t=!1,n=0,r=!1,o;const i=iN(),a=h=>{var g;r||(c(new A0(h)),(g=e.abort)==null||g.call(e))},l=()=>{t=!0},s=()=>{t=!1},m=()=>C0.isFocused()&&(e.networkMode==="always"||ns.isOnline())&&e.canRun(),v=()=>P0(e.networkMode)&&e.canRun(),f=h=>{var g;r||(r=!0,(g=e.onSuccess)==null||g.call(e,h),o==null||o(),i.resolve(h))},c=h=>{var g;r||(r=!0,(g=e.onError)==null||g.call(e,h),o==null||o(),i.reject(h))},u=()=>new Promise(h=>{var g;o=p=>{(r||m())&&h(p)},(g=e.onPause)==null||g.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),x=()=>{if(r)return;let h;const g=n===0?e.initialPromise:void 0;try{h=g??e.fn()}catch(p){h=Promise.reject(p)}Promise.resolve(h).then(f).catch(p=>{var T;if(r)return;const d=e.retry??(Bs?0:3),w=e.retryDelay??aN,y=typeof w=="function"?w(n,p):w,b=d===!0||typeof d=="number"&&n<d||typeof d=="function"&&d(n,p);if(t||!b){c(p);return}n++,(T=e.onFail)==null||T.call(e,n,p),Jk(y).then(()=>m()?void 0:u()).then(()=>{t?c(p):x()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:l,continueRetry:s,canStart:v,start:()=>(v()?x():u().then(x),i)}}var lN=e=>setTimeout(e,0);function sN(){let e=[],t=0,n=l=>{l()},r=l=>{l()},o=lN;const i=l=>{t?e.push(l):o(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&o(()=>{r(()=>{l.forEach(s=>{n(s)})})})};return{batch:l=>{let s;t++;try{s=l()}finally{t--,t||a()}return s},batchCalls:l=>(...s)=>{i(()=>{l(...s)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{o=l}}}var vt=sN(),Kr,Dm,R0=(Dm=class{constructor(){Pe(this,Kr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qk(this.gcTime)&&be(this,Kr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bs?1/0:5*60*1e3))}clearGcTimeout(){ee(this,Kr)&&(clearTimeout(ee(this,Kr)),be(this,Kr,void 0))}},Kr=new WeakMap,Dm),Vo,Gr,qt,Yr,ct,Ea,Qr,rn,Bn,Im,uN=(Im=class extends R0{constructor(t){super();Pe(this,rn);Pe(this,Vo);Pe(this,Gr);Pe(this,qt);Pe(this,Yr);Pe(this,ct);Pe(this,Ea);Pe(this,Qr);be(this,Qr,!1),be(this,Ea,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,Yr,t.client),be(this,qt,ee(this,Yr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,Vo,fN(this.options)),this.state=t.state??ee(this,Vo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ee(this,ct))==null?void 0:t.promise}setOptions(t){this.options={...ee(this,Ea),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ee(this,qt).remove(this)}setData(t,n){const r=eN(this.state.data,t,this.options);return lt(this,rn,Bn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){lt(this,rn,Bn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=ee(this,ct))==null?void 0:r.promise;return(o=ee(this,ct))==null||o.cancel(t),n?n.then(nn).catch(nn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ee(this,Vo))}isActive(){return this.observers.some(t=>Zk(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Xc(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:!Xk(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ee(this,ct))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ee(this,ct))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ee(this,qt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ee(this,ct)&&(ee(this,Qr)?ee(this,ct).cancel({revert:!0}):ee(this,ct).cancelRetry()),this.scheduleGc()),ee(this,qt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lt(this,rn,Bn).call(this,{type:"invalidate"})}fetch(t,n){var m,v,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ee(this,ct))return ee(this,ct).continueRetry(),ee(this,ct).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(u=>u.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,o=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(be(this,Qr,!0),r.signal)})},i=()=>{const c=T0(this.options,n),x=(()=>{const h={client:ee(this,Yr),queryKey:this.queryKey,meta:this.meta};return o(h),h})();return be(this,Qr,!1),this.options.persister?this.options.persister(c,x,this):c(x)},l=(()=>{const c={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:ee(this,Yr),state:this.state,fetchFn:i};return o(c),c})();(m=this.options.behavior)==null||m.onFetch(l,this),be(this,Gr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=l.fetchOptions)==null?void 0:v.meta))&<(this,rn,Bn).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta});const s=c=>{var u,x,h,g;Fu(c)&&c.silent||lt(this,rn,Bn).call(this,{type:"error",error:c}),Fu(c)||((x=(u=ee(this,qt).config).onError)==null||x.call(u,c,this),(g=(h=ee(this,qt).config).onSettled)==null||g.call(h,this.state.data,c,this)),this.scheduleGc()};return be(this,ct,j0({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var u,x,h,g;if(c===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(p){s(p);return}(x=(u=ee(this,qt).config).onSuccess)==null||x.call(u,c,this),(g=(h=ee(this,qt).config).onSettled)==null||g.call(h,c,this.state.error,this),this.scheduleGc()},onError:s,onFail:(c,u)=>{lt(this,rn,Bn).call(this,{type:"failed",failureCount:c,error:u})},onPause:()=>{lt(this,rn,Bn).call(this,{type:"pause"})},onContinue:()=>{lt(this,rn,Bn).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),ee(this,ct).start()}},Vo=new WeakMap,Gr=new WeakMap,qt=new WeakMap,Yr=new WeakMap,ct=new WeakMap,Ea=new WeakMap,Qr=new WeakMap,rn=new WeakSet,Bn=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,...cN(r.data,this.options),fetchMeta:t.meta??null};case"success":return be(this,Gr,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Fu(o)&&o.revert&&ee(this,Gr)?{...ee(this,Gr),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),vt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ee(this,qt).notify({query:this,type:"updated",action:t})})},Im);function cN(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:P0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fN(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 Sn,Fm,dN=(Fm=class extends $s{constructor(t={}){super();Pe(this,Sn);this.config=t,be(this,Sn,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??Bd(o,n);let a=this.get(i);return a||(a=new uN({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){ee(this,Sn).has(t.queryHash)||(ee(this,Sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ee(this,Sn).get(t.queryHash);n&&(t.destroy(),n===t&&ee(this,Sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){vt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ee(this,Sn).get(t)}getAll(){return[...ee(this,Sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rp(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rp(t,r)):n}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){vt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){vt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Sn=new WeakMap,Fm),_n,pt,Xr,kn,sr,$m,hN=($m=class extends R0{constructor(t){super();Pe(this,kn);Pe(this,_n);Pe(this,pt);Pe(this,Xr);this.mutationId=t.mutationId,be(this,pt,t.mutationCache),be(this,_n,[]),this.state=t.state||pN(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ee(this,_n).includes(t)||(ee(this,_n).push(t),this.clearGcTimeout(),ee(this,pt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,_n,ee(this,_n).filter(n=>n!==t)),this.scheduleGc(),ee(this,pt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ee(this,_n).length||(this.state.status==="pending"?this.scheduleGc():ee(this,pt).remove(this))}continue(){var t;return((t=ee(this,Xr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,l,s,m,v,f,c,u,x,h,g,p,d,w,y,b,T,S,C;const n=()=>{lt(this,kn,sr).call(this,{type:"continue"})};be(this,Xr,j0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,k)=>{lt(this,kn,sr).call(this,{type:"failed",failureCount:P,error:k})},onPause:()=>{lt(this,kn,sr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ee(this,pt).canRun(this)}));const r=this.state.status==="pending",o=!ee(this,Xr).canStart();try{if(r)n();else{lt(this,kn,sr).call(this,{type:"pending",variables:t,isPaused:o}),await((a=(i=ee(this,pt).config).onMutate)==null?void 0:a.call(i,t,this));const k=await((s=(l=this.options).onMutate)==null?void 0:s.call(l,t));k!==this.state.context&<(this,kn,sr).call(this,{type:"pending",context:k,variables:t,isPaused:o})}const P=await ee(this,Xr).start();return await((v=(m=ee(this,pt).config).onSuccess)==null?void 0:v.call(m,P,t,this.state.context,this)),await((c=(f=this.options).onSuccess)==null?void 0:c.call(f,P,t,this.state.context)),await((x=(u=ee(this,pt).config).onSettled)==null?void 0:x.call(u,P,null,this.state.variables,this.state.context,this)),await((g=(h=this.options).onSettled)==null?void 0:g.call(h,P,null,t,this.state.context)),lt(this,kn,sr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((d=(p=ee(this,pt).config).onError)==null?void 0:d.call(p,P,t,this.state.context,this)),await((y=(w=this.options).onError)==null?void 0:y.call(w,P,t,this.state.context)),await((T=(b=ee(this,pt).config).onSettled)==null?void 0:T.call(b,void 0,P,this.state.variables,this.state.context,this)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,void 0,P,t,this.state.context)),P}finally{lt(this,kn,sr).call(this,{type:"error",error:P})}}finally{ee(this,pt).runNext(this)}}},_n=new WeakMap,pt=new WeakMap,Xr=new WeakMap,kn=new WeakSet,sr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),vt.batch(()=>{ee(this,_n).forEach(r=>{r.onMutationUpdate(t)}),ee(this,pt).notify({mutation:this,type:"updated",action:t})})},$m);function pN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Un,on,Sa,Bm,mN=(Bm=class extends $s{constructor(t={}){super();Pe(this,Un);Pe(this,on);Pe(this,Sa);this.config=t,be(this,Un,new Set),be(this,on,new Map),be(this,Sa,0)}build(t,n,r){const o=new hN({mutationCache:this,mutationId:++Ia(this,Sa)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){ee(this,Un).add(t);const n=il(t);if(typeof n=="string"){const r=ee(this,on).get(n);r?r.push(t):ee(this,on).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ee(this,Un).delete(t)){const n=il(t);if(typeof n=="string"){const r=ee(this,on).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&ee(this,on).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=il(t);if(typeof n=="string"){const r=ee(this,on).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=il(t);if(typeof n=="string"){const o=(r=ee(this,on).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vt.batch(()=>{ee(this,Un).forEach(t=>{this.notify({type:"removed",mutation:t})}),ee(this,Un).clear(),ee(this,on).clear()})}getAll(){return Array.from(ee(this,Un))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Lp(n,r))}findAll(t={}){return this.getAll().filter(n=>Lp(t,n))}notify(t){vt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return vt.batch(()=>Promise.all(t.map(n=>n.continue().catch(nn))))}},Un=new WeakMap,on=new WeakMap,Sa=new WeakMap,Bm);function il(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ip(e){return{onFetch:(t,n)=>{var v,f,c,u,x;const r=t.options,o=(c=(f=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:f.fetchMore)==null?void 0:c.direction,i=((u=t.state.data)==null?void 0:u.pages)||[],a=((x=t.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},s=0;const m=async()=>{let h=!1;const g=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},p=T0(t.options,t.fetchOptions),d=async(w,y,b)=>{if(h)return Promise.reject();if(y==null&&w.pages.length)return Promise.resolve(w);const S=(()=>{const _={client:t.client,queryKey:t.queryKey,pageParam:y,direction:b?"backward":"forward",meta:t.options.meta};return g(_),_})(),C=await p(S),{maxPages:P}=t.options,k=b?nN:tN;return{pages:k(w.pages,C,P),pageParams:k(w.pageParams,y,P)}};if(o&&i.length){const w=o==="backward",y=w?vN:Fp,b={pages:i,pageParams:a},T=y(r,b);l=await d(b,T,w)}else{const w=e??i.length;do{const y=s===0?a[0]??r.initialPageParam:Fp(r,l);if(s>0&&y==null)break;l=await d(l,y),s++}while(s<w)}return l};t.options.persister?t.fetchFn=()=>{var h,g;return(g=(h=t.options).persister)==null?void 0:g.call(h,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function Fp(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 vN(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 Ge,vr,gr,Wo,Ko,yr,Go,Yo,zm,gN=(zm=class{constructor(e={}){Pe(this,Ge);Pe(this,vr);Pe(this,gr);Pe(this,Wo);Pe(this,Ko);Pe(this,yr);Pe(this,Go);Pe(this,Yo);be(this,Ge,e.queryCache||new dN),be(this,vr,e.mutationCache||new mN),be(this,gr,e.defaultOptions||{}),be(this,Wo,new Map),be(this,Ko,new Map),be(this,yr,0)}mount(){Ia(this,yr)._++,ee(this,yr)===1&&(be(this,Go,C0.subscribe(async e=>{e&&(await this.resumePausedMutations(),ee(this,Ge).onFocus())})),be(this,Yo,ns.subscribe(async e=>{e&&(await this.resumePausedMutations(),ee(this,Ge).onOnline())})))}unmount(){var e,t;Ia(this,yr)._--,ee(this,yr)===0&&((e=ee(this,Go))==null||e.call(this),be(this,Go,void 0),(t=ee(this,Yo))==null||t.call(this),be(this,Yo,void 0))}isFetching(e){return ee(this,Ge).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ee(this,vr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ee(this,Ge).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=ee(this,Ge).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Xc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return ee(this,Ge).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=ee(this,Ge).get(r.queryHash),i=o==null?void 0:o.state.data,a=Yk(t,i);if(a!==void 0)return ee(this,Ge).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return vt.batch(()=>ee(this,Ge).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ee(this,Ge).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ee(this,Ge);vt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ee(this,Ge);return vt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=vt.batch(()=>ee(this,Ge).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(nn).catch(nn)}invalidateQueries(e,t={}){return vt.batch(()=>(ee(this,Ge).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=vt.batch(()=>ee(this,Ge).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(nn)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(nn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ee(this,Ge).build(this,t);return n.isStaleByTime(Xc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(nn).catch(nn)}fetchInfiniteQuery(e){return e.behavior=Ip(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(nn).catch(nn)}ensureInfiniteQueryData(e){return e.behavior=Ip(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ns.isOnline()?ee(this,vr).resumePausedMutations():Promise.resolve()}getQueryCache(){return ee(this,Ge)}getMutationCache(){return ee(this,vr)}getDefaultOptions(){return ee(this,gr)}setDefaultOptions(e){be(this,gr,e)}setQueryDefaults(e,t){ee(this,Wo).set(wa(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ee(this,Wo).values()],n={};return t.forEach(r=>{xa(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){ee(this,Ko).set(wa(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ee(this,Ko).values()],n={};return t.forEach(r=>{xa(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ee(this,gr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bd(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===zd&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ee(this,gr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ee(this,Ge).clear(),ee(this,vr).clear()}},Ge=new WeakMap,vr=new WeakMap,gr=new WeakMap,Wo=new WeakMap,Ko=new WeakMap,yr=new WeakMap,Go=new WeakMap,Yo=new WeakMap,zm),yN=N.createContext(void 0),wN=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(yN.Provider,{value:e,children:t}));/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function rs(){return rs=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},rs.apply(this,arguments)}var br;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(br||(br={}));const $p="popstate";function xN(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:a,hash:l}=r.location;return Jc("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:M0(o)}return EN(t,n,null,e)}function Ot(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function L0(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bN(){return Math.random().toString(36).substr(2,8)}function Bp(e,t){return{usr:e.state,key:e.key,idx:t}}function Jc(e,t,n,r){return n===void 0&&(n=null),rs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?zs(t):t,{state:n,key:t&&t.key||r||bN()})}function M0(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 zs(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 EN(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=br.Pop,s=null,m=v();m==null&&(m=0,a.replaceState(rs({},a.state,{idx:m}),""));function v(){return(a.state||{idx:null}).idx}function f(){l=br.Pop;let g=v(),p=g==null?null:g-m;m=g,s&&s({action:l,location:h.location,delta:p})}function c(g,p){l=br.Push;let d=Jc(h.location,g,p);m=v()+1;let w=Bp(d,m),y=h.createHref(d);try{a.pushState(w,"",y)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;o.location.assign(y)}i&&s&&s({action:l,location:h.location,delta:1})}function u(g,p){l=br.Replace;let d=Jc(h.location,g,p);m=v();let w=Bp(d,m),y=h.createHref(d);a.replaceState(w,"",y),i&&s&&s({action:l,location:h.location,delta:0})}function x(g){let p=o.location.origin!=="null"?o.location.origin:o.location.href,d=typeof g=="string"?g:M0(g);return d=d.replace(/ $/,"%20"),Ot(p,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,p)}let h={get action(){return l},get location(){return e(o,a)},listen(g){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener($p,f),s=g,()=>{o.removeEventListener($p,f),s=null}},createHref(g){return t(o,g)},createURL:x,encodeLocation(g){let p=x(g);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:c,replace:u,go(g){return a.go(g)}};return h}var zp;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zp||(zp={}));function SN(e,t,n){return n===void 0&&(n="/"),_N(e,t,n,!1)}function _N(e,t,n,r){let o=typeof t=="string"?zs(t):t,i=F0(o.pathname||"/",n);if(i==null)return null;let a=D0(e);kN(a);let l=null;for(let s=0;l==null&&s<a.length;++s){let m=DN(i);l=LN(a[s],m,r)}return l}function D0(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,a,l)=>{let s={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};s.relativePath.startsWith("/")&&(Ot(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let m=Bo([r,s.relativePath]),v=n.concat(s);i.children&&i.children.length>0&&(Ot(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),D0(i.children,t,v,m)),!(i.path==null&&!i.index)&&t.push({path:m,score:jN(m,i.index),routesMeta:v})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let s of I0(i.path))o(i,a,s)}),t}function I0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=I0(r.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function kN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:RN(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const NN=/^:[\w-]+$/,ON=3,TN=2,CN=1,PN=10,AN=-2,qp=e=>e==="*";function jN(e,t){let n=e.split("/"),r=n.length;return n.some(qp)&&(r+=AN),t&&(r+=TN),n.filter(o=>!qp(o)).reduce((o,i)=>o+(NN.test(i)?ON:i===""?CN:PN),r)}function RN(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function LN(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let l=0;l<r.length;++l){let s=r[l],m=l===r.length-1,v=i==="/"?t:t.slice(i.length)||"/",f=Up({path:s.relativePath,caseSensitive:s.caseSensitive,end:m},v),c=s.route;if(!f&&m&&n&&!r[r.length-1].route.index&&(f=Up({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},v)),!f)return null;Object.assign(o,f.params),a.push({params:o,pathname:Bo([i,f.pathname]),pathnameBase:IN(Bo([i,f.pathnameBase])),route:c}),f.pathnameBase!=="/"&&(i=Bo([i,f.pathnameBase]))}return a}function Up(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=MN(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((m,v,f)=>{let{paramName:c,isOptional:u}=v;if(c==="*"){let h=l[f]||"";a=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}const x=l[f];return u&&!x?m[c]=void 0:m[c]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:i,pathnameBase:a,pattern:e}}function MN(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),L0(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s)=>(r.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function DN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return L0(!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 F0(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)||"/"}const Bo=e=>e.join("/").replace(/\/\/+/g,"/"),IN=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function FN(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $0=["post","put","patch","delete"];new Set($0);const $N=["get",...$0];new Set($N);/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function os(){return os=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},os.apply(this,arguments)}const BN=N.createContext(null),zN=N.createContext(null),B0=N.createContext(null),qs=N.createContext(null),Us=N.createContext({outlet:null,matches:[],isDataRoute:!1}),z0=N.createContext(null);function qd(){return N.useContext(qs)!=null}function q0(){return qd()||Ot(!1),N.useContext(qs).location}function qN(e,t){return UN(e,t)}function UN(e,t,n,r){qd()||Ot(!1);let{navigator:o}=N.useContext(B0),{matches:i}=N.useContext(Us),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let m=q0(),v;if(t){var f;let g=typeof t=="string"?zs(t):t;s==="/"||(f=g.pathname)!=null&&f.startsWith(s)||Ot(!1),v=g}else v=m;let c=v.pathname||"/",u=c;if(s!=="/"){let g=s.replace(/^\//,"").split("/");u="/"+c.replace(/^\//,"").split("/").slice(g.length).join("/")}let x=SN(e,{pathname:u}),h=GN(x&&x.map(g=>Object.assign({},g,{params:Object.assign({},l,g.params),pathname:Bo([s,o.encodeLocation?o.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?s:Bo([s,o.encodeLocation?o.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,n,r);return t&&h?N.createElement(qs.Provider,{value:{location:os({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:br.Pop}},h):h}function HN(){let e=ZN(),t=FN(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:o},n):null,null)}const VN=N.createElement(HN,null);class WN extends N.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?N.createElement(Us.Provider,{value:this.props.routeContext},N.createElement(z0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function KN(e){let{routeContext:t,match:n,children:r}=e,o=N.useContext(BN);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(Us.Provider,{value:t},r)}function GN(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let v=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);v>=0||Ot(!1),a=a.slice(0,Math.min(a.length,v+1))}let s=!1,m=-1;if(n&&r&&r.v7_partialHydration)for(let v=0;v<a.length;v++){let f=a[v];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(m=v),f.route.id){let{loaderData:c,errors:u}=n,x=f.route.loader&&c[f.route.id]===void 0&&(!u||u[f.route.id]===void 0);if(f.route.lazy||x){s=!0,m>=0?a=a.slice(0,m+1):a=[a[0]];break}}}return a.reduceRight((v,f,c)=>{let u,x=!1,h=null,g=null;n&&(u=l&&f.route.id?l[f.route.id]:void 0,h=f.route.errorElement||VN,s&&(m<0&&c===0?(x=!0,g=null):m===c&&(x=!0,g=f.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,c+1)),d=()=>{let w;return u?w=h:x?w=g:f.route.Component?w=N.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=v,N.createElement(KN,{match:f,routeContext:{outlet:v,matches:p,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||c===0)?N.createElement(WN,{location:n.location,revalidation:n.revalidation,component:h,error:u,children:d(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):d()},null)}var ef=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}(ef||{});function YN(e){let t=N.useContext(zN);return t||Ot(!1),t}function QN(e){let t=N.useContext(Us);return t||Ot(!1),t}function XN(e){let t=QN(),n=t.matches[t.matches.length-1];return n.route.id||Ot(!1),n.route.id}function ZN(){var e;let t=N.useContext(z0),n=YN(ef.UseRouteError),r=XN(ef.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function JN(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function tf(e){Ot(!1)}function eO(e){let{basename:t="/",children:n=null,location:r,navigationType:o=br.Pop,navigator:i,static:a=!1,future:l}=e;qd()&&Ot(!1);let s=t.replace(/^\/*/,"/"),m=N.useMemo(()=>({basename:s,navigator:i,static:a,future:os({v7_relativeSplatPath:!1},l)}),[s,l,i,a]);typeof r=="string"&&(r=zs(r));let{pathname:v="/",search:f="",hash:c="",state:u=null,key:x="default"}=r,h=N.useMemo(()=>{let g=F0(v,s);return g==null?null:{location:{pathname:g,search:f,hash:c,state:u,key:x},navigationType:o}},[s,v,f,c,u,x,o]);return h==null?null:N.createElement(B0.Provider,{value:m},N.createElement(qs.Provider,{children:n,value:h}))}function tO(e){let{children:t,location:n}=e;return qN(nf(t),n)}new Promise(()=>{});function nf(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,o)=>{if(!N.isValidElement(r))return;let i=[...t,o];if(r.type===N.Fragment){n.push.apply(n,nf(r.props.children,i));return}r.type!==tf&&Ot(!1),!r.props.index||!r.props.children||Ot(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=nf(r.props.children,i)),n.push(a)}),n}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const nO="6";try{window.__reactRouterVersion=nO}catch{}const rO="startTransition",Hp=_f[rO];function oO(e){let{basename:t,children:n,future:r,window:o}=e,i=N.useRef();i.current==null&&(i.current=xN({window:o,v5Compat:!0}));let a=i.current,[l,s]=N.useState({action:a.action,location:a.location}),{v7_startTransition:m}=r||{},v=N.useCallback(f=>{m&&Hp?Hp(()=>s(f)):s(f)},[s,m]);return N.useLayoutEffect(()=>a.listen(v),[a,v]),N.useEffect(()=>JN(r),[r]),N.createElement(eO,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}var Vp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Vp||(Vp={}));var Wp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Wp||(Wp={}));const iO="modulepreload",aO=function(e){return"/"+e},Kp={},Gp=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(n.map(s=>{if(s=aO(s),s in Kp)return;Kp[s]=!0;const m=s.endsWith(".css"),v=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${v}`))return;const f=document.createElement("link");if(f.rel=m?"stylesheet":iO,m||(f.as="script"),f.crossOrigin="",f.href=s,l&&f.setAttribute("nonce",l),document.head.appendChild(f),m)return new Promise((c,u)=>{f.addEventListener("load",c),f.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return o.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},lO=xd("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),he=N.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const a=r?AE:"button";return E.jsx(a,{className:ke(lO({variant:t,size:n,className:e})),ref:i,...o})});he.displayName="Button";const ba=N.forwardRef(({className:e,type:t,...n},r)=>E.jsx("input",{type:t,className:ke("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));ba.displayName="Input";var sO="Separator",Yp="horizontal",uO=["horizontal","vertical"],U0=N.forwardRef((e,t)=>{const{decorative:n,orientation:r=Yp,...o}=e,i=cO(r)?r:Yp,l=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return E.jsx(Se.div,{"data-orientation":i,...l,...o,ref:t})});U0.displayName=sO;function cO(e){return uO.includes(e)}var H0=U0;const tt=N.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>E.jsx(H0,{ref:o,decorative:n,orientation:t,className:ke("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));tt.displayName=H0.displayName;function is(e,[t,n]){return Math.min(n,Math.max(t,e))}var fO=N.createContext(void 0);function V0(e){const t=N.useContext(fO);return e||t||"ltr"}var $u=0;function W0(){N.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qp()),document.body.insertAdjacentElement("beforeend",e[1]??Qp()),$u++,()=>{$u===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$u--}},[])}function Qp(){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 Bu="focusScope.autoFocusOnMount",zu="focusScope.autoFocusOnUnmount",Xp={bubbles:!1,cancelable:!0},dO="FocusScope",Ud=N.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[l,s]=N.useState(null),m=fn(o),v=fn(i),f=N.useRef(null),c=Re(t,h=>s(h)),u=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let h=function(w){if(u.paused||!l)return;const y=w.target;l.contains(y)?f.current=y:ur(f.current,{select:!0})},g=function(w){if(u.paused||!l)return;const y=w.relatedTarget;y!==null&&(l.contains(y)||ur(f.current,{select:!0}))},p=function(w){if(document.activeElement===document.body)for(const b of w)b.removedNodes.length>0&&ur(l)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const d=new MutationObserver(p);return l&&d.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),d.disconnect()}}},[r,l,u.paused]),N.useEffect(()=>{if(l){Jp.add(u);const h=document.activeElement;if(!l.contains(h)){const p=new CustomEvent(Bu,Xp);l.addEventListener(Bu,m),l.dispatchEvent(p),p.defaultPrevented||(hO(yO(K0(l)),{select:!0}),document.activeElement===h&&ur(l))}return()=>{l.removeEventListener(Bu,m),setTimeout(()=>{const p=new CustomEvent(zu,Xp);l.addEventListener(zu,v),l.dispatchEvent(p),p.defaultPrevented||ur(h??document.body,{select:!0}),l.removeEventListener(zu,v),Jp.remove(u)},0)}}},[l,m,v,u]);const x=N.useCallback(h=>{if(!n&&!r||u.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,p=document.activeElement;if(g&&p){const d=h.currentTarget,[w,y]=pO(d);w&&y?!h.shiftKey&&p===y?(h.preventDefault(),n&&ur(w,{select:!0})):h.shiftKey&&p===w&&(h.preventDefault(),n&&ur(y,{select:!0})):p===d&&h.preventDefault()}},[n,r,u.paused]);return E.jsx(Se.div,{tabIndex:-1,...a,ref:c,onKeyDown:x})});Ud.displayName=dO;function hO(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ur(r,{select:t}),document.activeElement!==n)return}function pO(e){const t=K0(e),n=Zp(t,e),r=Zp(t.reverse(),e);return[n,r]}function K0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zp(e,t){for(const n of e)if(!mO(n,{upTo:t}))return n}function mO(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 vO(e){return e instanceof HTMLInputElement&&"select"in e}function ur(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&vO(e)&&t&&e.select()}}var Jp=gO();function gO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=em(e,t),e.unshift(t)},remove(t){var n;e=em(e,t),(n=e[0])==null||n.resume()}}}function em(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yO(e){return e.filter(t=>t.tagName!=="A")}function G0(e){const t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wO=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vo=new WeakMap,al=new WeakMap,ll={},qu=0,Y0=function(e){return e&&(e.host||Y0(e.parentNode))},xO=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Y0(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})},bO=function(e,t,n,r){var o=xO(t,Array.isArray(e)?e:[e]);ll[n]||(ll[n]=new WeakMap);var i=ll[n],a=[],l=new Set,s=new Set(o),m=function(f){!f||l.has(f)||(l.add(f),m(f.parentNode))};o.forEach(m);var v=function(f){!f||s.has(f)||Array.prototype.forEach.call(f.children,function(c){if(l.has(c))v(c);else try{var u=c.getAttribute(r),x=u!==null&&u!=="false",h=(vo.get(c)||0)+1,g=(i.get(c)||0)+1;vo.set(c,h),i.set(c,g),a.push(c),h===1&&x&&al.set(c,!0),g===1&&c.setAttribute(n,"true"),x||c.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",c,p)}})};return v(t),l.clear(),qu++,function(){a.forEach(function(f){var c=vo.get(f)-1,u=i.get(f)-1;vo.set(f,c),i.set(f,u),c||(al.has(f)||f.removeAttribute(r),al.delete(f)),u||f.removeAttribute(n)}),qu--,qu||(vo=new WeakMap,vo=new WeakMap,al=new WeakMap,ll={})}},Q0=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=wO(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),bO(r,o,n,"aria-hidden")):function(){return null}},On=function(){return On=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},On.apply(this,arguments)};function X0(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 o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function EO(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Nl="right-scroll-bar-position",Ol="width-before-scroll-bar",SO="with-scroll-bars-hidden",_O="--removed-body-scroll-bar-size";function Uu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kO(e,t){var n=N.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var NO=typeof window<"u"?N.useLayoutEffect:N.useEffect,tm=new WeakMap;function OO(e,t){var n=kO(null,function(r){return e.forEach(function(o){return Uu(o,r)})});return NO(function(){var r=tm.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(l){i.has(l)||Uu(l,null)}),i.forEach(function(l){o.has(l)||Uu(l,a)})}tm.set(n,e)},[e]),n}function TO(e){return e}function CO(e,t){t===void 0&&(t=TO);var n=[],r=!1,o={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(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(l){return l!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var l=n;n=[],l.forEach(i),a=n}var s=function(){var v=a;a=[],v.forEach(i)},m=function(){return Promise.resolve().then(s)};m(),n={push:function(v){a.push(v),m()},filter:function(v){return a=a.filter(v),n}}}};return o}function PO(e){e===void 0&&(e={});var t=CO(null);return t.options=On({async:!0,ssr:!1},e),t}var Z0=function(e){var t=e.sideCar,n=X0(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 N.createElement(r,On({},n))};Z0.isSideCarExport=!0;function AO(e,t){return e.useMedium(t),Z0}var J0=PO(),Hu=function(){},Hs=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:Hu,onWheelCapture:Hu,onTouchMoveCapture:Hu}),o=r[0],i=r[1],a=e.forwardProps,l=e.children,s=e.className,m=e.removeScrollBar,v=e.enabled,f=e.shards,c=e.sideCar,u=e.noRelative,x=e.noIsolation,h=e.inert,g=e.allowPinchZoom,p=e.as,d=p===void 0?"div":p,w=e.gapMode,y=X0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),b=c,T=OO([n,t]),S=On(On({},y),o);return N.createElement(N.Fragment,null,v&&N.createElement(b,{sideCar:J0,removeScrollBar:m,shards:f,noRelative:u,noIsolation:x,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?N.cloneElement(N.Children.only(l),On(On({},S),{ref:T})):N.createElement(d,On({},S,{className:s,ref:T}),l))});Hs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hs.classNames={fullWidth:Ol,zeroRight:Nl};var jO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function RO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=jO();return t&&e.setAttribute("nonce",t),e}function LO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function MO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var DO=function(){var e=0,t=null;return{add:function(n){e==0&&(t=RO())&&(LO(t,n),MO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},IO=function(){var e=DO();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},e1=function(){var e=IO(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},FO={left:0,top:0,right:0,gap:0},Vu=function(e){return parseInt(e||"",10)||0},$O=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Vu(n),Vu(r),Vu(o)]},BO=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return FO;var t=$O(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])}},zO=e1(),zo="data-scroll-locked",qO=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,l=e.gap;return n===void 0&&(n="margin"),` .`.concat(SO,` { overflow: hidden `).concat(r,`; padding-right: `).concat(l,"px ").concat(r,`; } body[`).concat(zo,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(o,`px; padding-top: `).concat(i,`px; padding-right: `).concat(a,`px; margin-left:0; margin-top:0; margin-right: `).concat(l,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(Nl,` { right: `).concat(l,"px ").concat(r,`; } .`).concat(Ol,` { margin-right: `).concat(l,"px ").concat(r,`; } .`).concat(Nl," .").concat(Nl,` { right: 0 `).concat(r,`; } .`).concat(Ol," .").concat(Ol,` { margin-right: 0 `).concat(r,`; } body[`).concat(zo,`] { `).concat(_O,": ").concat(l,`px; } `)},nm=function(){var e=parseInt(document.body.getAttribute(zo)||"0",10);return isFinite(e)?e:0},UO=function(){N.useEffect(function(){return document.body.setAttribute(zo,(nm()+1).toString()),function(){var e=nm()-1;e<=0?document.body.removeAttribute(zo):document.body.setAttribute(zo,e.toString())}},[])},HO=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;UO();var i=N.useMemo(function(){return BO(o)},[o]);return N.createElement(zO,{styles:qO(i,!t,o,n?"":"!important")})},rf=!1;if(typeof window<"u")try{var sl=Object.defineProperty({},"passive",{get:function(){return rf=!0,!0}});window.addEventListener("test",sl,sl),window.removeEventListener("test",sl,sl)}catch{rf=!1}var go=rf?{passive:!1}:!1,VO=function(e){return e.tagName==="TEXTAREA"},t1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!VO(e)&&n[t]==="visible")},WO=function(e){return t1(e,"overflowY")},KO=function(e){return t1(e,"overflowX")},rm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=n1(e,r);if(o){var i=r1(e,r),a=i[1],l=i[2];if(a>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},GO=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},YO=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},n1=function(e,t){return e==="v"?WO(t):KO(t)},r1=function(e,t){return e==="v"?GO(t):YO(t)},QO=function(e,t){return e==="h"&&t==="rtl"?-1:1},XO=function(e,t,n,r,o){var i=QO(e,window.getComputedStyle(t).direction),a=i*r,l=n.target,s=t.contains(l),m=!1,v=a>0,f=0,c=0;do{if(!l)break;var u=r1(e,l),x=u[0],h=u[1],g=u[2],p=h-g-i*x;(x||p)&&n1(e,l)&&(f+=p,c+=x);var d=l.parentNode;l=d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE?d.host:d}while(!s&&l!==document.body||s&&(t.contains(l)||t===l));return(v&&(Math.abs(f)<1||!o)||!v&&(Math.abs(c)<1||!o))&&(m=!0),m},ul=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},om=function(e){return[e.deltaX,e.deltaY]},im=function(e){return e&&"current"in e?e.current:e},ZO=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JO=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},eT=0,yo=[];function tT(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),o=N.useState(eT++)[0],i=N.useState(e1)[0],a=N.useRef(e);N.useEffect(function(){a.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=EO([e.lockRef.current],(e.shards||[]).map(im),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=N.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var p=ul(h),d=n.current,w="deltaX"in h?h.deltaX:d[0]-p[0],y="deltaY"in h?h.deltaY:d[1]-p[1],b,T=h.target,S=Math.abs(w)>Math.abs(y)?"h":"v";if("touches"in h&&S==="h"&&T.type==="range")return!1;var C=rm(S,T);if(!C)return!0;if(C?b=S:(b=S==="v"?"h":"v",C=rm(S,T)),!C)return!1;if(!r.current&&"changedTouches"in h&&(w||y)&&(r.current=b),!b)return!0;var P=r.current||b;return XO(P,g,h,P==="h"?w:y,!0)},[]),s=N.useCallback(function(h){var g=h;if(!(!yo.length||yo[yo.length-1]!==i)){var p="deltaY"in g?om(g):ul(g),d=t.current.filter(function(b){return b.name===g.type&&(b.target===g.target||g.target===b.shadowParent)&&ZO(b.delta,p)})[0];if(d&&d.should){g.cancelable&&g.preventDefault();return}if(!d){var w=(a.current.shards||[]).map(im).filter(Boolean).filter(function(b){return b.contains(g.target)}),y=w.length>0?l(g,w[0]):!a.current.noIsolation;y&&g.cancelable&&g.preventDefault()}}},[]),m=N.useCallback(function(h,g,p,d){var w={name:h,delta:g,target:p,should:d,shadowParent:nT(p)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(y){return y!==w})},1)},[]),v=N.useCallback(function(h){n.current=ul(h),r.current=void 0},[]),f=N.useCallback(function(h){m(h.type,om(h),h.target,l(h,e.lockRef.current))},[]),c=N.useCallback(function(h){m(h.type,ul(h),h.target,l(h,e.lockRef.current))},[]);N.useEffect(function(){return yo.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:c}),document.addEventListener("wheel",s,go),document.addEventListener("touchmove",s,go),document.addEventListener("touchstart",v,go),function(){yo=yo.filter(function(h){return h!==i}),document.removeEventListener("wheel",s,go),document.removeEventListener("touchmove",s,go),document.removeEventListener("touchstart",v,go)}},[]);var u=e.removeScrollBar,x=e.inert;return N.createElement(N.Fragment,null,x?N.createElement(i,{styles:JO(o)}):null,u?N.createElement(HO,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function nT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rT=AO(J0,tT);var Hd=N.forwardRef(function(e,t){return N.createElement(Hs,On({},e,{ref:t,sideCar:rT}))});Hd.classNames=Hs.classNames;var oT=[" ","Enter","ArrowUp","ArrowDown"],iT=[" ","Enter"],ao="Select",[Vs,Ws,aT]=vd(ao),[hi,E5]=fo(ao,[aT,Ds]),Ks=Ds(),[lT,Fr]=hi(ao),[sT,uT]=hi(ao),o1=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:l,onValueChange:s,dir:m,name:v,autoComplete:f,disabled:c,required:u,form:x}=e,h=Ks(t),[g,p]=N.useState(null),[d,w]=N.useState(null),[y,b]=N.useState(!1),T=V0(m),[S,C]=va({prop:r,defaultProp:o??!1,onChange:i,caller:ao}),[P,k]=va({prop:a,defaultProp:l,onChange:s,caller:ao}),_=N.useRef(null),O=g?x||!!g.closest("form"):!0,[j,R]=N.useState(new Set),F=Array.from(j).map(q=>q.props.value).join(";");return E.jsx(Ck,{...h,children:E.jsxs(lT,{required:u,scope:t,trigger:g,onTriggerChange:p,valueNode:d,onValueNodeChange:w,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:Fo(),value:P,onValueChange:k,open:S,onOpenChange:C,dir:T,triggerPointerDownPosRef:_,disabled:c,children:[E.jsx(Vs.Provider,{scope:t,children:E.jsx(sT,{scope:e.__scopeSelect,onNativeOptionAdd:N.useCallback(q=>{R(V=>new Set(V).add(q))},[]),onNativeOptionRemove:N.useCallback(q=>{R(V=>{const H=new Set(V);return H.delete(q),H})},[]),children:n})}),O?E.jsxs(T1,{"aria-hidden":!0,required:u,tabIndex:-1,name:v,autoComplete:f,value:P,onChange:q=>k(q.target.value),disabled:c,form:x,children:[P===void 0?E.jsx("option",{value:""}):null,Array.from(j)]},F):null]})})};o1.displayName=ao;var i1="SelectTrigger",a1=N.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ks(n),a=Fr(i1,n),l=a.disabled||r,s=Re(t,a.onTriggerChange),m=Ws(n),v=N.useRef("touch"),[f,c,u]=P1(h=>{const g=m().filter(w=>!w.disabled),p=g.find(w=>w.value===a.value),d=A1(g,h,p);d!==void 0&&a.onValueChange(d.value)}),x=h=>{l||(a.onOpenChange(!0),u()),h&&(a.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return E.jsx(v0,{asChild:!0,...i,children:E.jsx(Se.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":C1(a.value)?"":void 0,...o,ref:s,onClick:ve(o.onClick,h=>{h.currentTarget.focus(),v.current!=="mouse"&&x(h)}),onPointerDown:ve(o.onPointerDown,h=>{v.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:ve(o.onKeyDown,h=>{const g=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&c(h.key),!(g&&h.key===" ")&&oT.includes(h.key)&&(x(),h.preventDefault())})})})});a1.displayName=i1;var l1="SelectValue",s1=N.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...l}=e,s=Fr(l1,n),{onValueNodeHasChildrenChange:m}=s,v=i!==void 0,f=Re(t,s.onValueNodeChange);return at(()=>{m(v)},[m,v]),E.jsx(Se.span,{...l,ref:f,style:{pointerEvents:"none"},children:C1(s.value)?E.jsx(E.Fragment,{children:a}):i})});s1.displayName=l1;var cT="SelectIcon",u1=N.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return E.jsx(Se.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});u1.displayName=cT;var fT="SelectPortal",c1=e=>E.jsx(Ts,{asChild:!0,...e});c1.displayName=fT;var lo="SelectContent",f1=N.forwardRef((e,t)=>{const n=Fr(lo,e.__scopeSelect),[r,o]=N.useState();if(at(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Ir.createPortal(E.jsx(d1,{scope:e.__scopeSelect,children:E.jsx(Vs.Slot,{scope:e.__scopeSelect,children:E.jsx("div",{children:e.children})})}),i):null}return E.jsx(h1,{...e,ref:t})});f1.displayName=lo;var en=10,[d1,$r]=hi(lo),dT="SelectContentImpl",hT=ri("SelectContent.RemoveScroll"),h1=N.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:l,sideOffset:s,align:m,alignOffset:v,arrowPadding:f,collisionBoundary:c,collisionPadding:u,sticky:x,hideWhenDetached:h,avoidCollisions:g,...p}=e,d=Fr(lo,n),[w,y]=N.useState(null),[b,T]=N.useState(null),S=Re(t,B=>y(B)),[C,P]=N.useState(null),[k,_]=N.useState(null),O=Ws(n),[j,R]=N.useState(!1),F=N.useRef(!1);N.useEffect(()=>{if(w)return Q0(w)},[w]),W0();const q=N.useCallback(B=>{const[G,...Y]=O().map(le=>le.ref.current),[Q]=Y.slice(-1),te=document.activeElement;for(const le of B)if(le===te||(le==null||le.scrollIntoView({block:"nearest"}),le===G&&b&&(b.scrollTop=0),le===Q&&b&&(b.scrollTop=b.scrollHeight),le==null||le.focus(),document.activeElement!==te))return},[O,b]),V=N.useCallback(()=>q([C,w]),[q,C,w]);N.useEffect(()=>{j&&V()},[j,V]);const{onOpenChange:H,triggerPointerDownPosRef:I}=d;N.useEffect(()=>{if(w){let B={x:0,y:0};const G=Q=>{var te,le;B={x:Math.abs(Math.round(Q.pageX)-(((te=I.current)==null?void 0:te.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((le=I.current)==null?void 0:le.y)??0))}},Y=Q=>{B.x<=10&&B.y<=10?Q.preventDefault():w.contains(Q.target)||H(!1),document.removeEventListener("pointermove",G),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",Y,{capture:!0})}}},[w,H,I]),N.useEffect(()=>{const B=()=>H(!1);return window.addEventListener("blur",B),window.addEventListener("resize",B),()=>{window.removeEventListener("blur",B),window.removeEventListener("resize",B)}},[H]);const[M,A]=P1(B=>{const G=O().filter(te=>!te.disabled),Y=G.find(te=>te.ref.current===document.activeElement),Q=A1(G,B,Y);Q&&setTimeout(()=>Q.ref.current.focus())}),L=N.useCallback((B,G,Y)=>{const Q=!F.current&&!Y;(d.value!==void 0&&d.value===G||Q)&&(P(B),Q&&(F.current=!0))},[d.value]),$=N.useCallback(()=>w==null?void 0:w.focus(),[w]),W=N.useCallback((B,G,Y)=>{const Q=!F.current&&!Y;(d.value!==void 0&&d.value===G||Q)&&_(B)},[d.value]),K=r==="popper"?of:p1,D=K===of?{side:l,sideOffset:s,align:m,alignOffset:v,arrowPadding:f,collisionBoundary:c,collisionPadding:u,sticky:x,hideWhenDetached:h,avoidCollisions:g}:{};return E.jsx(d1,{scope:n,content:w,viewport:b,onViewportChange:T,itemRefCallback:L,selectedItem:C,onItemLeave:$,itemTextRefCallback:W,focusSelectedItem:V,selectedItemText:k,position:r,isPositioned:j,searchRef:M,children:E.jsx(Hd,{as:hT,allowPinchZoom:!0,children:E.jsx(Ud,{asChild:!0,trapped:d.open,onMountAutoFocus:B=>{B.preventDefault()},onUnmountAutoFocus:ve(o,B=>{var G;(G=d.trigger)==null||G.focus({preventScroll:!0}),B.preventDefault()}),children:E.jsx(Ca,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:B=>B.preventDefault(),onDismiss:()=>d.onOpenChange(!1),children:E.jsx(K,{role:"listbox",id:d.contentId,"data-state":d.open?"open":"closed",dir:d.dir,onContextMenu:B=>B.preventDefault(),...p,...D,onPlaced:()=>R(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...p.style},onKeyDown:ve(p.onKeyDown,B=>{const G=B.ctrlKey||B.altKey||B.metaKey;if(B.key==="Tab"&&B.preventDefault(),!G&&B.key.length===1&&A(B.key),["ArrowUp","ArrowDown","Home","End"].includes(B.key)){let Q=O().filter(te=>!te.disabled).map(te=>te.ref.current);if(["ArrowUp","End"].includes(B.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(B.key)){const te=B.target,le=Q.indexOf(te);Q=Q.slice(le+1)}setTimeout(()=>q(Q)),B.preventDefault()}})})})})})})});h1.displayName=dT;var pT="SelectItemAlignedPosition",p1=N.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Fr(lo,n),a=$r(lo,n),[l,s]=N.useState(null),[m,v]=N.useState(null),f=Re(t,S=>v(S)),c=Ws(n),u=N.useRef(!1),x=N.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:p,focusSelectedItem:d}=a,w=N.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&m&&h&&g&&p){const S=i.trigger.getBoundingClientRect(),C=m.getBoundingClientRect(),P=i.valueNode.getBoundingClientRect(),k=p.getBoundingClientRect();if(i.dir!=="rtl"){const te=k.left-C.left,le=P.left-te,ce=S.left-le,pe=S.width+ce,ge=Math.max(pe,C.width),Ae=window.innerWidth-en,Oe=is(le,[en,Math.max(en,Ae-ge)]);l.style.minWidth=pe+"px",l.style.left=Oe+"px"}else{const te=C.right-k.right,le=window.innerWidth-P.right-te,ce=window.innerWidth-S.right-le,pe=S.width+ce,ge=Math.max(pe,C.width),Ae=window.innerWidth-en,Oe=is(le,[en,Math.max(en,Ae-ge)]);l.style.minWidth=pe+"px",l.style.right=Oe+"px"}const _=c(),O=window.innerHeight-en*2,j=h.scrollHeight,R=window.getComputedStyle(m),F=parseInt(R.borderTopWidth,10),q=parseInt(R.paddingTop,10),V=parseInt(R.borderBottomWidth,10),H=parseInt(R.paddingBottom,10),I=F+q+j+H+V,M=Math.min(g.offsetHeight*5,I),A=window.getComputedStyle(h),L=parseInt(A.paddingTop,10),$=parseInt(A.paddingBottom,10),W=S.top+S.height/2-en,K=O-W,D=g.offsetHeight/2,B=g.offsetTop+D,G=F+q+B,Y=I-G;if(G<=W){const te=_.length>0&&g===_[_.length-1].ref.current;l.style.bottom="0px";const le=m.clientHeight-h.offsetTop-h.offsetHeight,ce=Math.max(K,D+(te?$:0)+le+V),pe=G+ce;l.style.height=pe+"px"}else{const te=_.length>0&&g===_[0].ref.current;l.style.top="0px";const ce=Math.max(W,F+h.offsetTop+(te?L:0)+D)+Y;l.style.height=ce+"px",h.scrollTop=G-W+h.offsetTop}l.style.margin=`${en}px 0`,l.style.minHeight=M+"px",l.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>u.current=!0)}},[c,i.trigger,i.valueNode,l,m,h,g,p,i.dir,r]);at(()=>w(),[w]);const[y,b]=N.useState();at(()=>{m&&b(window.getComputedStyle(m).zIndex)},[m]);const T=N.useCallback(S=>{S&&x.current===!0&&(w(),d==null||d(),x.current=!1)},[w,d]);return E.jsx(vT,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:u,onScrollButtonChange:T,children:E.jsx("div",{ref:s,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:y},children:E.jsx(Se.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});p1.displayName=pT;var mT="SelectPopperPosition",of=N.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=en,...i}=e,a=Ks(n);return E.jsx(g0,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});of.displayName=mT;var[vT,Vd]=hi(lo,{}),af="SelectViewport",m1=N.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=$r(af,n),a=Vd(af,n),l=Re(t,i.onViewportChange),s=N.useRef(0);return E.jsxs(E.Fragment,{children:[E.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}),E.jsx(Vs.Slot,{scope:n,children:E.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ve(o.onScroll,m=>{const v=m.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:c}=a;if(c!=null&&c.current&&f){const u=Math.abs(s.current-v.scrollTop);if(u>0){const x=window.innerHeight-en*2,h=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),p=Math.max(h,g);if(p<x){const d=p+u,w=Math.min(x,d),y=d-w;f.style.height=w+"px",f.style.bottom==="0px"&&(v.scrollTop=y>0?y:0,f.style.justifyContent="flex-end")}}}s.current=v.scrollTop})})})]})});m1.displayName=af;var v1="SelectGroup",[gT,yT]=hi(v1),wT=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Fo();return E.jsx(gT,{scope:n,id:o,children:E.jsx(Se.div,{role:"group","aria-labelledby":o,...r,ref:t})})});wT.displayName=v1;var g1="SelectLabel",y1=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=yT(g1,n);return E.jsx(Se.div,{id:o.id,...r,ref:t})});y1.displayName=g1;var as="SelectItem",[xT,w1]=hi(as),x1=N.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,l=Fr(as,n),s=$r(as,n),m=l.value===r,[v,f]=N.useState(i??""),[c,u]=N.useState(!1),x=Re(t,d=>{var w;return(w=s.itemRefCallback)==null?void 0:w.call(s,d,r,o)}),h=Fo(),g=N.useRef("touch"),p=()=>{o||(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 E.jsx(xT,{scope:n,value:r,disabled:o,textId:h,isSelected:m,onItemTextChange:N.useCallback(d=>{f(w=>w||((d==null?void 0:d.textContent)??"").trim())},[]),children:E.jsx(Vs.ItemSlot,{scope:n,value:r,disabled:o,textValue:v,children:E.jsx(Se.div,{role:"option","aria-labelledby":h,"data-highlighted":c?"":void 0,"aria-selected":m&&c,"data-state":m?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:x,onFocus:ve(a.onFocus,()=>u(!0)),onBlur:ve(a.onBlur,()=>u(!1)),onClick:ve(a.onClick,()=>{g.current!=="mouse"&&p()}),onPointerUp:ve(a.onPointerUp,()=>{g.current==="mouse"&&p()}),onPointerDown:ve(a.onPointerDown,d=>{g.current=d.pointerType}),onPointerMove:ve(a.onPointerMove,d=>{var w;g.current=d.pointerType,o?(w=s.onItemLeave)==null||w.call(s):g.current==="mouse"&&d.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ve(a.onPointerLeave,d=>{var w;d.currentTarget===document.activeElement&&((w=s.onItemLeave)==null||w.call(s))}),onKeyDown:ve(a.onKeyDown,d=>{var y;((y=s.searchRef)==null?void 0:y.current)!==""&&d.key===" "||(iT.includes(d.key)&&p(),d.key===" "&&d.preventDefault())})})})})});x1.displayName=as;var qi="SelectItemText",b1=N.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=Fr(qi,n),l=$r(qi,n),s=w1(qi,n),m=uT(qi,n),[v,f]=N.useState(null),c=Re(t,p=>f(p),s.onItemTextChange,p=>{var d;return(d=l.itemTextRefCallback)==null?void 0:d.call(l,p,s.value,s.disabled)}),u=v==null?void 0:v.textContent,x=N.useMemo(()=>E.jsx("option",{value:s.value,disabled:s.disabled,children:u},s.value),[s.disabled,s.value,u]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=m;return at(()=>(h(x),()=>g(x)),[h,g,x]),E.jsxs(E.Fragment,{children:[E.jsx(Se.span,{id:s.textId,...i,ref:c}),s.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ir.createPortal(i.children,a.valueNode):null]})});b1.displayName=qi;var E1="SelectItemIndicator",S1=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return w1(E1,n).isSelected?E.jsx(Se.span,{"aria-hidden":!0,...r,ref:t}):null});S1.displayName=E1;var lf="SelectScrollUpButton",_1=N.forwardRef((e,t)=>{const n=$r(lf,e.__scopeSelect),r=Vd(lf,e.__scopeSelect),[o,i]=N.useState(!1),a=Re(t,r.onScrollButtonChange);return at(()=>{if(n.viewport&&n.isPositioned){let l=function(){const m=s.scrollTop>0;i(m)};const s=n.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?E.jsx(N1,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:s}=n;l&&s&&(l.scrollTop=l.scrollTop-s.offsetHeight)}}):null});_1.displayName=lf;var sf="SelectScrollDownButton",k1=N.forwardRef((e,t)=>{const n=$r(sf,e.__scopeSelect),r=Vd(sf,e.__scopeSelect),[o,i]=N.useState(!1),a=Re(t,r.onScrollButtonChange);return at(()=>{if(n.viewport&&n.isPositioned){let l=function(){const m=s.scrollHeight-s.clientHeight,v=Math.ceil(s.scrollTop)<m;i(v)};const s=n.viewport;return l(),s.addEventListener("scroll",l),()=>s.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?E.jsx(N1,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:s}=n;l&&s&&(l.scrollTop=l.scrollTop+s.offsetHeight)}}):null});k1.displayName=sf;var N1=N.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=$r("SelectScrollButton",n),a=N.useRef(null),l=Ws(n),s=N.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return N.useEffect(()=>()=>s(),[s]),at(()=>{var v;const m=l().find(f=>f.ref.current===document.activeElement);(v=m==null?void 0:m.ref.current)==null||v.scrollIntoView({block:"nearest"})},[l]),E.jsx(Se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ve(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:ve(o.onPointerMove,()=>{var m;(m=i.onItemLeave)==null||m.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:ve(o.onPointerLeave,()=>{s()})})}),bT="SelectSeparator",O1=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return E.jsx(Se.div,{"aria-hidden":!0,...r,ref:t})});O1.displayName=bT;var uf="SelectArrow",ET=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ks(n),i=Fr(uf,n),a=$r(uf,n);return i.open&&a.position==="popper"?E.jsx(y0,{...o,...r,ref:t}):null});ET.displayName=uf;var ST="SelectBubbleInput",T1=N.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=N.useRef(null),i=Re(r,o),a=G0(t);return N.useEffect(()=>{const l=o.current;if(!l)return;const s=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(s,"value").set;if(a!==t&&v){const f=new Event("change",{bubbles:!0});v.call(l,t),l.dispatchEvent(f)}},[a,t]),E.jsx(Se.select,{...n,style:{...sy,...n.style},ref:i,defaultValue:t})});T1.displayName=ST;function C1(e){return e===""||e===void 0}function P1(e){const t=fn(e),n=N.useRef(""),r=N.useRef(0),o=N.useCallback(a=>{const l=n.current+a;t(l),function s(m){n.current=m,window.clearTimeout(r.current),m!==""&&(r.current=window.setTimeout(()=>s(""),1e3))}(l)},[t]),i=N.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function A1(e,t,n){const o=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=_T(e,Math.max(i,0));o.length===1&&(a=a.filter(m=>m!==n));const s=a.find(m=>m.textValue.toLowerCase().startsWith(o.toLowerCase()));return s!==n?s:void 0}function _T(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kT=o1,j1=a1,NT=s1,OT=u1,TT=c1,R1=f1,CT=m1,L1=y1,M1=x1,PT=b1,AT=S1,D1=_1,I1=k1,F1=O1;const Kn=kT,Gn=NT,jn=N.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(j1,{ref:r,className:ke("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,E.jsx(OT,{asChild:!0,children:E.jsx(Ay,{className:"h-4 w-4 opacity-50"})})]}));jn.displayName=j1.displayName;const $1=N.forwardRef(({className:e,...t},n)=>E.jsx(D1,{ref:n,className:ke("flex cursor-default items-center justify-center py-1",e),...t,children:E.jsx(NS,{className:"h-4 w-4"})}));$1.displayName=D1.displayName;const B1=N.forwardRef(({className:e,...t},n)=>E.jsx(I1,{ref:n,className:ke("flex cursor-default items-center justify-center py-1",e),...t,children:E.jsx(Ay,{className:"h-4 w-4"})}));B1.displayName=I1.displayName;const Rn=N.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>E.jsx(TT,{children:E.jsxs(R1,{ref:o,className:ke("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:[E.jsx($1,{}),E.jsx(CT,{className:ke("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),E.jsx(B1,{})]})}));Rn.displayName=R1.displayName;const jT=N.forwardRef(({className:e,...t},n)=>E.jsx(L1,{ref:n,className:ke("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));jT.displayName=L1.displayName;const gt=N.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(M1,{ref:r,className:ke("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[E.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:E.jsx(AT,{children:E.jsx(kd,{className:"h-4 w-4"})})}),E.jsx(PT,{children:t})]}));gt.displayName=M1.displayName;const RT=N.forwardRef(({className:e,...t},n)=>E.jsx(F1,{ref:n,className:ke("-mx-1 my-1 h-px bg-muted",e),...t}));RT.displayName=F1.displayName;const LT=({onNew:e,onOpen:t,onSave:n,onExport:r,onPrint:o,onUndo:i,onRedo:a,canUndo:l,canRedo:s,zoom:m,onZoomIn:v,onZoomOut:f,onFitToPage:c,currentPage:u,totalPages:x,onPageChange:h,onFirstPage:g,onPrevPage:p,onNextPage:d,onLastPage:w,viewMode:y,onViewModeChange:b,onDelete:T,hasSelection:S,onToggleMobileMenu:C})=>{const P=k=>{const _=parseInt(k.target.value);isNaN(_)||h(_)};return E.jsxs("div",{className:"bg-editor-toolbar border-b border-border px-4 py-2 flex items-center gap-2 flex-wrap",children:[E.jsx("div",{className:"flex items-center mr-4",children:E.jsx("img",{src:"/lovable-uploads/824cc5a1-ae78-4382-b172-d74e5e80414f.png",alt:"PDF Panel",className:"h-6 md:h-8 w-auto"})}),C&&E.jsx(he,{variant:"ghost",size:"sm",onClick:C,className:"lg:hidden hover:bg-editor-toolbar-foreground/10",title:"Toggle Tools",children:E.jsx(DS,{className:"h-4 w-4"})}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsxs(he,{variant:"ghost",size:"sm",onClick:e,className:"hover:bg-secondary",title:"New (Ctrl+N)",children:[E.jsx(Od,{className:"h-4 w-4"}),E.jsx("span",{className:"hidden sm:inline ml-1",children:"New"})]}),E.jsxs(he,{variant:"ghost",size:"sm",onClick:t,className:"hover:bg-secondary",title:"Open (Ctrl+O)",children:[E.jsx(Ly,{className:"h-4 w-4"}),E.jsx("span",{className:"hidden sm:inline ml-1",children:"Open"})]}),E.jsxs(he,{variant:"ghost",size:"sm",onClick:n,className:"hover:bg-secondary",title:"Save (Ctrl+S)",children:[E.jsx(As,{className:"h-4 w-4"}),E.jsx("span",{className:"hidden sm:inline ml-1",children:"Save"})]})]}),E.jsx(tt,{orientation:"vertical",className:"h-6"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsxs(he,{variant:"ghost",size:"sm",onClick:r,className:"hover:bg-secondary",title:"Export",children:[E.jsx(Nd,{className:"h-4 w-4"}),E.jsx("span",{className:"hidden sm:inline ml-1",children:"Export"})]}),E.jsxs(he,{variant:"ghost",size:"sm",onClick:o,className:"hover:bg-secondary",title:"Print (Ctrl+P)",children:[E.jsx(US,{className:"h-4 w-4"}),E.jsx("span",{className:"hidden sm:inline ml-1",children:"Print"})]})]}),E.jsx(tt,{orientation:"vertical",className:"h-6"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(he,{variant:"ghost",size:"sm",onClick:i,disabled:!l,className:"hover:bg-secondary disabled:opacity-50",title:"Undo (Ctrl+Z)",children:E.jsx(WS,{className:"h-4 w-4"})}),E.jsx(he,{variant:"ghost",size:"sm",onClick:a,disabled:!s,className:"hover:bg-secondary disabled:opacity-50",title:"Redo (Ctrl+Shift+Z)",children:E.jsx(HS,{className:"h-4 w-4"})}),E.jsx(he,{variant:"ghost",size:"sm",onClick:T,disabled:!S,className:"hover:bg-secondary disabled:opacity-50",title:"Delete Selected (Delete)",children:E.jsx(js,{className:"h-4 w-4"})})]}),E.jsx(tt,{orientation:"vertical",className:"h-6"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(he,{variant:"ghost",size:"sm",onClick:g,disabled:u===1,className:"hover:bg-secondary disabled:opacity-50",title:"First Page",children:E.jsx(_S,{className:"h-4 w-4"})}),E.jsx(he,{variant:"ghost",size:"sm",onClick:p,disabled:u===1,className:"hover:bg-secondary disabled:opacity-50",title:"Previous Page",children:E.jsx(jy,{className:"h-4 w-4"})}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(ba,{type:"number",value:u,onChange:P,min:1,max:x,className:"w-16 h-8 text-center"}),E.jsxs("span",{className:"text-sm text-muted-foreground",children:["of ",x]})]}),E.jsx(he,{variant:"ghost",size:"sm",onClick:d,disabled:u===x,className:"hover:bg-secondary disabled:opacity-50",title:"Next Page",children:E.jsx(Ry,{className:"h-4 w-4"})}),E.jsx(he,{variant:"ghost",size:"sm",onClick:w,disabled:u===x,className:"hover:bg-secondary disabled:opacity-50",title:"Last Page",children:E.jsx(kS,{className:"h-4 w-4"})})]}),E.jsx(tt,{orientation:"vertical",className:"h-6"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(he,{variant:"ghost",size:"sm",onClick:f,disabled:m<=25,className:"hover:bg-secondary disabled:opacity-50",title:"Zoom Out",children:E.jsx(GS,{className:"h-4 w-4"})}),E.jsxs("span",{className:"text-sm text-muted-foreground min-w-[50px] text-center",children:[m,"%"]}),E.jsx(he,{variant:"ghost",size:"sm",onClick:v,disabled:m>=300,className:"hover:bg-secondary disabled:opacity-50",title:"Zoom In",children:E.jsx(Iy,{className:"h-4 w-4"})}),E.jsx(he,{variant:"ghost",size:"sm",onClick:c,className:"hover:bg-secondary",title:"Fit to Page",children:E.jsx(MS,{className:"h-4 w-4"})})]}),E.jsx(tt,{orientation:"vertical",className:"h-6"}),E.jsxs(Kn,{value:y,onValueChange:k=>b(k),children:[E.jsx(jn,{className:"w-32 h-8",children:E.jsx(Gn,{})}),E.jsxs(Rn,{children:[E.jsx(gt,{value:"single",children:E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(My,{className:"h-4 w-4"}),"Single"]})}),E.jsx(gt,{value:"spread",children:E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs("div",{className:"flex gap-0.5",children:[E.jsx("div",{className:"w-2 h-3 bg-current"}),E.jsx("div",{className:"w-2 h-3 bg-current"})]}),"Spread"]})}),E.jsx(gt,{value:"thumbnails",children:E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(AS,{className:"h-4 w-4"}),"Thumbnails"]})})]})]})]})},MT=[{id:"select",icon:$S,label:"Select",description:"Select and move objects"},{id:"text",icon:VS,label:"Text",description:"Add text annotations"},{id:"text_edit",icon:zS,label:"Edit Text",description:"Edit existing PDF text"},{id:"image",icon:RS,label:"Image",description:"Insert images from device"},{id:"signature",icon:PS,label:"Signature",description:"Add signatures"},{id:"eraser",icon:CS,label:"Eraser",description:"Remove annotations"},{id:"pen",icon:qS,label:"Pen",description:"Draw freehand"},{id:"highlighter",icon:jS,label:"Highlighter",description:"Highlight text"},{id:"rectangle",icon:My,label:"Rectangle",description:"Draw rectangles"},{id:"circle",icon:OS,label:"Circle",description:"Draw circles"},{id:"line",icon:FS,label:"Line",description:"Draw lines"},{id:"arrow",icon:SS,label:"Arrow",description:"Draw arrows"},{id:"note",icon:IS,label:"Note",description:"Add sticky notes (double-click to edit)"}],DT=({isCollapsed:e,onToggleCollapse:t,activeTool:n,onToolChange:r,onImageUpload:o,onSignatureUpload:i})=>E.jsxs("div",{className:ke("bg-editor-sidebar text-editor-sidebar-foreground border-r border-border transition-all duration-300 flex flex-col",e?"w-12":"w-64"),children:[E.jsxs("div",{className:"p-3 border-b border-border/20 flex items-center justify-between",children:[!e&&E.jsx("h2",{className:"text-sm font-semibold",children:"Tools"}),E.jsx(he,{variant:"ghost",size:"sm",onClick:t,className:"hover:bg-editor-sidebar-foreground/10 text-editor-sidebar-foreground",children:e?E.jsx(Ry,{className:"h-4 w-4"}):E.jsx(jy,{className:"h-4 w-4"})})]}),E.jsx("div",{className:"flex-1 p-2 space-y-1",children:MT.map(a=>{const l=a.icon,s=n===a.id;return E.jsxs(he,{variant:"ghost",size:e?"sm":"default",onClick:()=>{a.id==="image"&&o?o():a.id==="signature"&&i?i():r(a.id)},className:ke("w-full justify-start hover:bg-editor-sidebar-foreground/10 text-editor-sidebar-foreground transition-colors",s&&"bg-primary text-primary-foreground hover:bg-primary/90",e&&"justify-center px-2"),title:e?`${a.label} - ${a.description}`:void 0,children:[E.jsx(l,{className:ke("h-4 w-4",!e&&"mr-3")}),!e&&E.jsxs("div",{className:"flex flex-col items-start",children:[E.jsx("span",{className:"text-sm font-medium",children:a.label}),E.jsx("span",{className:"text-xs opacity-70",children:a.description})]})]},a.id)})}),!e&&E.jsx("div",{className:"p-3 border-t border-border/20",children:E.jsxs("div",{className:"text-xs text-editor-sidebar-foreground/70",children:["Use keyboard shortcuts:",E.jsxs("div",{className:"mt-1 space-y-0.5",children:[E.jsx("div",{children:"V - Select"}),E.jsx("div",{children:"T - Text"}),E.jsx("div",{children:"P - Pen"}),E.jsx("div",{children:"H - Highlighter"})]})]})})]}),Gs=N.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:ke("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Gs.displayName="Card";const z1=N.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:ke("flex flex-col space-y-1.5 p-6",e),...t}));z1.displayName="CardHeader";const q1=N.forwardRef(({className:e,...t},n)=>E.jsx("h3",{ref:n,className:ke("text-2xl font-semibold leading-none tracking-tight",e),...t}));q1.displayName="CardTitle";const IT=N.forwardRef(({className:e,...t},n)=>E.jsx("p",{ref:n,className:ke("text-sm text-muted-foreground",e),...t}));IT.displayName="CardDescription";const U1=N.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:ke("p-6 pt-0",e),...t}));U1.displayName="CardContent";const FT=N.forwardRef(({className:e,...t},n)=>E.jsx("div",{ref:n,className:ke("flex items-center p-6 pt-0",e),...t}));FT.displayName="CardFooter";const H1=({onSave:e,onCancel:t,strokeColor:n="#000000",strokeWidth:r=2})=>{const o=N.useRef(null),[i,a]=N.useState(!1),[l,s]=N.useState(!0);N.useEffect(()=>{const h=o.current;if(!h)return;const g=h.getContext("2d");g&&(h.width=400,h.height=200,g.strokeStyle=n,g.lineWidth=r,g.lineCap="round",g.lineJoin="round",g.clearRect(0,0,h.width,h.height))},[n,r]);const m=h=>{const g=o.current;if(!g)return{x:0,y:0};const p=g.getBoundingClientRect();return{x:h.clientX-p.left,y:h.clientY-p.top}},v=h=>{const g=o.current,p=g==null?void 0:g.getContext("2d");if(!g||!p)return;const d=m(h);a(!0),s(!1),p.beginPath(),p.moveTo(d.x,d.y)},f=h=>{if(!i)return;const g=o.current,p=g==null?void 0:g.getContext("2d");if(!g||!p)return;const d=m(h);p.lineTo(d.x,d.y),p.stroke()},c=()=>{a(!1)},u=()=>{const h=o.current,g=h==null?void 0:h.getContext("2d");!h||!g||(g.clearRect(0,0,h.width,h.height),s(!0))},x=()=>{const h=o.current;if(!h||l)return;const g=h.toDataURL("image/png");e(g)};return E.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:E.jsxs(Gs,{className:"p-6 bg-background",children:[E.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Create Signature"}),E.jsx("div",{className:"border border-border rounded-lg mb-4 bg-white",children:E.jsx("canvas",{ref:o,onMouseDown:v,onMouseMove:f,onMouseUp:c,onMouseLeave:c,className:"cursor-crosshair bg-white",style:{display:"block"}})}),E.jsx("div",{className:"text-sm text-muted-foreground mb-4 text-center",children:"Draw your signature above"}),E.jsxs("div",{className:"flex justify-between gap-2",children:[E.jsxs(he,{variant:"outline",onClick:u,disabled:l,className:"flex items-center gap-2",children:[E.jsx(js,{className:"h-4 w-4"}),"Clear"]}),E.jsxs("div",{className:"flex gap-2",children:[E.jsxs(he,{variant:"outline",onClick:t,className:"flex items-center gap-2",children:[E.jsx(Aa,{className:"h-4 w-4"}),"Cancel"]}),E.jsxs(he,{onClick:x,disabled:l,className:"flex items-center gap-2",children:[E.jsx(kd,{className:"h-4 w-4"}),"Save"]})]})]})]})})},V1=N.forwardRef(({className:e,...t},n)=>E.jsx("textarea",{className:ke("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));V1.displayName="Textarea";const $T=["Arial","Helvetica","Times New Roman","Georgia","Verdana"],BT=[12,14,16,18,20,24,28,32],zT=["#000000","#FF0000","#0066FF","#00AA00","#FF6600","#AA00AA"],qT=({id:e,x:t,y:n,text:r,fontSize:o,fontFamily:i,color:a,isEditing:l,zoom:s,onUpdate:m,onSave:v,onDelete:f,onStartEdit:c})=>{const[u,x]=N.useState(r),[h,g]=N.useState(!1),[p,d]=N.useState({x:0,y:0}),w=N.useRef(null);N.useEffect(()=>{l&&w.current&&(w.current.focus(),w.current.select())},[l]);const y=k=>{l||(g(!0),d({x:k.clientX-t*(s/100),y:k.clientY-n*(s/100)}))},b=k=>{if(!h)return;const _=(k.clientX-p.x)/(s/100),O=(k.clientY-p.y)/(s/100);m({x:Math.max(0,_),y:Math.max(0,O)})},T=()=>{g(!1)};N.useEffect(()=>{if(h)return document.addEventListener("mousemove",b),document.addEventListener("mouseup",T),()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",T)}},[h,p,s]);const S=k=>{x(k),m({text:k})},C=()=>{u.trim()&&v()},P=s/100;return l?E.jsx("div",{className:"absolute z-50",style:{left:t*P,top:n*P,transform:`scale(${P})`,transformOrigin:"top left"},children:E.jsx(Gs,{className:"p-4 min-w-[300px] shadow-lg border-primary",children:E.jsxs("div",{className:"space-y-3",children:[E.jsxs("div",{className:"flex gap-2 items-center",children:[E.jsxs(Kn,{value:i,onValueChange:k=>m({fontFamily:k}),children:[E.jsx(jn,{className:"w-32",children:E.jsx(Gn,{})}),E.jsx(Rn,{children:$T.map(k=>E.jsx(gt,{value:k,children:k},k))})]}),E.jsxs(Kn,{value:o.toString(),onValueChange:k=>m({fontSize:parseInt(k)}),children:[E.jsx(jn,{className:"w-20",children:E.jsx(Gn,{})}),E.jsx(Rn,{children:BT.map(k=>E.jsx(gt,{value:k.toString(),children:k},k))})]}),E.jsxs(Kn,{value:a,onValueChange:k=>m({color:k}),children:[E.jsx(jn,{className:"w-20",children:E.jsx(Gn,{})}),E.jsx(Rn,{children:zT.map(k=>E.jsx(gt,{value:k,children:E.jsx("div",{className:"flex items-center gap-2",children:E.jsx("div",{className:"w-4 h-4 rounded",style:{backgroundColor:k}})})},k))})]})]}),E.jsx(V1,{ref:w,value:u,onChange:k=>S(k.target.value),placeholder:"Enter your text here...",className:"min-h-[100px] resize-none",style:{fontFamily:i,fontSize:o,color:a}}),E.jsxs("div",{className:"flex gap-2 justify-end",children:[E.jsx(he,{variant:"outline",size:"sm",onClick:f,children:E.jsx(js,{className:"h-4 w-4"})}),E.jsx(he,{variant:"outline",size:"sm",onClick:()=>m({isEditing:!1}),children:E.jsx(Aa,{className:"h-4 w-4"})}),E.jsxs(he,{size:"sm",onClick:C,children:[E.jsx(kd,{className:"h-4 w-4 mr-1"}),"Save"]})]})]})})}):E.jsx("div",{className:"absolute cursor-move group",style:{left:t*P,top:n*P,transform:`scale(${P})`,transformOrigin:"top left"},onMouseDown:y,onDoubleClick:c,children:E.jsxs("div",{className:"relative p-2 border border-transparent group-hover:border-primary/50 rounded min-w-[100px]",style:{fontFamily:i,fontSize:o,color:a,backgroundColor:"rgba(255, 255, 255, 0.9)"},children:[r||"Double-click to edit",E.jsx("div",{className:"absolute -top-1 -right-1 opacity-0 group-hover:opacity-100 transition-opacity",children:E.jsx("div",{className:"bg-primary text-white p-1 rounded text-xs flex items-center gap-1",children:E.jsx(BS,{className:"h-3 w-3"})})})]})})},UT=({text:e,x:t,y:n,fontSize:r,fontFamily:o,fontWeight:i,fontStyle:a,textAlign:l,color:s,onSave:m,onCancel:v})=>{const[f,c]=N.useState(e),[u,x]=N.useState(r),[h,g]=N.useState(o),[p,d]=N.useState(i),[w,y]=N.useState(a),[b,T]=N.useState(l),[S,C]=N.useState(s),P=N.useRef(null);N.useEffect(()=>{P.current&&(P.current.focus(),P.current.select())},[]);const k=()=>{m(f,{fontSize:u,fontFamily:h,fontWeight:p,fontStyle:w,textAlign:b,color:S})},_=O=>{O.key==="Enter"&&!O.shiftKey?(O.preventDefault(),k()):O.key==="Escape"&&v()};return E.jsxs("div",{className:"absolute bg-white border border-border rounded-lg shadow-lg p-2 z-50 min-w-[300px]",style:{left:t-150,top:n-100,maxWidth:"400px"},children:[E.jsxs("div",{className:"flex items-center gap-1 mb-2 flex-wrap",children:[E.jsx(ba,{type:"number",value:u,onChange:O=>x(Number(O.target.value)),className:"w-16 h-7 text-xs",min:"8",max:"72"}),E.jsx(tt,{orientation:"vertical",className:"h-4"}),E.jsx(he,{variant:p==="bold"?"default":"ghost",size:"sm",onClick:()=>d(p==="bold"?"normal":"bold"),className:"h-7 w-7 p-0",children:E.jsx(_d,{className:"h-3 w-3"})}),E.jsx(he,{variant:w==="italic"?"default":"ghost",size:"sm",onClick:()=>y(w==="italic"?"normal":"italic"),className:"h-7 w-7 p-0",children:E.jsx(Td,{className:"h-3 w-3"})}),E.jsx(tt,{orientation:"vertical",className:"h-4"}),E.jsx(he,{variant:b==="left"?"default":"ghost",size:"sm",onClick:()=>T("left"),className:"h-7 w-7 p-0",children:E.jsx(Ed,{className:"h-3 w-3"})}),E.jsx(he,{variant:b==="center"?"default":"ghost",size:"sm",onClick:()=>T("center"),className:"h-7 w-7 p-0",children:E.jsx(bd,{className:"h-3 w-3"})}),E.jsx(he,{variant:b==="right"?"default":"ghost",size:"sm",onClick:()=>T("right"),className:"h-7 w-7 p-0",children:E.jsx(Sd,{className:"h-3 w-3"})}),E.jsx(tt,{orientation:"vertical",className:"h-4"}),E.jsx("div",{className:"flex items-center gap-1",children:E.jsx("input",{type:"color",value:S,onChange:O=>C(O.target.value),className:"w-7 h-7 rounded border border-border cursor-pointer"})})]}),E.jsx(ba,{ref:P,value:f,onChange:O=>c(O.target.value),onKeyDown:_,placeholder:"Enter text...",className:"mb-2",style:{fontSize:`${u}px`,fontFamily:h,fontWeight:p,fontStyle:w,textAlign:b,color:S}}),E.jsxs("div",{className:"flex justify-end gap-1",children:[E.jsxs(he,{variant:"ghost",size:"sm",onClick:v,className:"h-7",children:[E.jsx(Aa,{className:"h-3 w-3 mr-1"}),"Cancel"]}),E.jsxs(he,{size:"sm",onClick:k,className:"h-7",children:[E.jsx(As,{className:"h-3 w-3 mr-1"}),"Save"]})]})]})},HT=({x:e,y:t,width:n,height:r,onResize:o,zoom:i,canvasOffset:a})=>{const[l,s]=N.useState(!1),[m,v]=N.useState(""),[f,c]=N.useState({x:0,y:0}),[u,x]=N.useState({x:0,y:0,width:0,height:0}),h=8,g=i/100,p=N.useCallback((P,k)=>{P.stopPropagation(),P.preventDefault(),s(!0),v(k),c({x:P.clientX,y:P.clientY}),x({x:e,y:t,width:n,height:r})},[e,t,n,r]),d=N.useCallback(P=>{if(!l)return;const k=(P.clientX-f.x)/g,_=(P.clientY-f.y)/g;let O={...u};switch(m){case"nw":O.x=u.x+k,O.y=u.y+_,O.width=u.width-k,O.height=u.height-_;break;case"ne":O.y=u.y+_,O.width=u.width+k,O.height=u.height-_;break;case"sw":O.x=u.x+k,O.width=u.width-k,O.height=u.height+_;break;case"se":O.width=u.width+k,O.height=u.height+_;break}O.width<20&&(O.width=20),O.height<20&&(O.height=20),o(O)},[l,m,f,u,g,o]),w=N.useCallback(()=>{s(!1),v("")},[]);N.useEffect(()=>{if(l)return document.addEventListener("mousemove",d),document.addEventListener("mouseup",w),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",w)}},[l,d,w]);const y=e*g,b=t*g,T=n*g,S=r*g,C=[{type:"nw",x:y-h/2,y:b-h/2,cursor:"nw-resize"},{type:"ne",x:y+T-h/2,y:b-h/2,cursor:"ne-resize"},{type:"sw",x:y-h/2,y:b+S-h/2,cursor:"sw-resize"},{type:"se",x:y+T-h/2,y:b+S-h/2,cursor:"se-resize"}];return E.jsx(E.Fragment,{children:C.map(P=>E.jsx("div",{className:"absolute bg-primary border-2 border-white pointer-events-auto hover:bg-primary/80 transition-colors",style:{left:a.x+P.x,top:a.y+P.y,width:h,height:h,cursor:P.cursor,borderRadius:"2px",boxShadow:"0 2px 4px rgba(0,0,0,0.2)",zIndex:1e3},onMouseDown:k=>p(k,P.type)},P.type))})},W1=N.forwardRef(({currentPage:e,zoom:t,viewMode:n,activeTool:r,annotations:o,onAddAnnotation:i,onRemoveAnnotation:a,onUpdateAnnotation:l,pdfDocument:s,isLoading:m,toolProperties:v,selectedAnnotation:f,onSelectAnnotation:c,textAnnotations:u,onAddTextAnnotation:x,onUpdateTextAnnotation:h,onDeleteTextAnnotation:g},p)=>{const d=N.useRef(null),[w,y]=N.useState(!1),[b,T]=N.useState([]),[S,C]=N.useState(null),[P,k]=N.useState(!1),[_,O]=N.useState(!1),[j,R]=N.useState({x:0,y:0}),[F,q]=N.useState(null),[V,H]=N.useState(new Map),[I,M]=N.useState([]),[A,L]=N.useState(null),$=()=>{const X=t/100;switch(n){case"spread":return{width:595*2*X,height:842*X};case"thumbnails":return{width:595*.3*X,height:842*.3*X};default:return{width:595*X,height:842*X}}},{width:W,height:K}=$(),D=N.useRef(null),B=N.useCallback(async()=>{if(!(!s||!d.current))try{D.current&&(D.current.cancel(),D.current=null);const z=await s.getPage(e);q(z)}catch(z){console.error("Error loading PDF page:",z)}},[s,e]),G=N.useCallback(async z=>{if(z.fillStyle="#ffffff",z.fillRect(0,0,W,K),console.log("🎨 Drawing PDF page:",{pdfPage:!!F,pdfDocument:!!s}),F){const U=t/100,X=F.getViewport({scale:U});try{D.current&&D.current.cancel(),D.current=F.render({canvasContext:z,viewport:X}),await D.current.promise,D.current=null,console.log("✅ PDF page rendered successfully"),I.forEach(ie=>{z.fillStyle="#ffffff",z.fillRect(ie.x,ie.y,ie.width,ie.height)})}catch(ie){ie.name!=="RenderingCancelledException"&&console.error("❌ Error rendering PDF page:",ie)}}else{console.log("📄 No PDF page, showing placeholder"),z.fillStyle="#f8fafc",z.fillRect(0,0,W,K),z.strokeStyle="#e2e8f0",z.lineWidth=1;for(let U=0;U<W;U+=50)z.beginPath(),z.moveTo(U,0),z.lineTo(U,K),z.stroke();for(let U=0;U<K;U+=50)z.beginPath(),z.moveTo(0,U),z.lineTo(W,U),z.stroke();z.fillStyle="#64748b",z.font=`${18*(t/100)}px -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif`,z.textAlign="center",z.fillText("PDF Editor - Tools Active",W/2,K/2-30),z.font=`${14*(t/100)}px -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif`,z.fillText("All tools are working - try drawing!",W/2,K/2+10),z.textAlign="left"}},[F,s,W,K,t,I]),Y=(z,U,X)=>{var ie;if(X.type==="pen"||X.type==="highlighter")return((ie=X.points)==null?void 0:ie.some(ye=>Math.abs(ye.x-z)<10&&Math.abs(ye.y-U)<10))||!1;if(X.type==="text"||X.type==="note"){const ye=X.type==="note"?{width:100,height:80}:{width:200,height:30};return z>=X.x&&z<=X.x+ye.width&&U>=X.y&&U<=X.y+ye.height}else return X.width&&X.height&&z>=X.x&&z<=X.x+X.width&&U>=X.y&&U<=X.y+X.height},Q=(z,U)=>{if(z.save(),z.strokeStyle="#3b82f6",z.lineWidth=2,z.setLineDash([5,5]),U.type==="pen"||U.type==="highlighter"){if(U.points&&U.points.length>0){const X=U.points.map(Te=>Te.x),ie=U.points.map(Te=>Te.y),ye=Math.min(...X)-5,Le=Math.min(...ie)-5,Ne=Math.max(...X)+5,mn=Math.max(...ie)+5;z.strokeRect(ye,Le,Ne-ye,mn-Le)}}else U.type==="note"?z.strokeRect(U.x-2,U.y-2,104,84):U.type==="text"?z.strokeRect(U.x-2,U.y-20,204,34):U.width&&U.height&&z.strokeRect(U.x-2,U.y-2,U.width+4,U.height+4);z.restore()},te=N.useCallback(z=>{console.log("🎯 Drawing annotations:",o.length),o.forEach(U=>{switch(z.save(),z.globalAlpha=U.opacity,z.strokeStyle=U.color,z.fillStyle=U.color,z.lineWidth=U.strokeWidth,U.type){case"pen":U.points&&U.points.length>1&&(z.beginPath(),z.moveTo(U.points[0].x,U.points[0].y),U.points.forEach(X=>{z.lineTo(X.x,X.y)}),z.stroke());break;case"highlighter":U.points&&U.points.length>1&&(z.globalAlpha=.3,z.lineWidth=U.strokeWidth*3,z.lineCap="round",z.beginPath(),z.moveTo(U.points[0].x,U.points[0].y),U.points.forEach(X=>{z.lineTo(X.x,X.y)}),z.stroke());break;case"rectangle":U.width&&U.height&&z.strokeRect(U.x,U.y,U.width,U.height);break;case"circle":if(U.width&&U.height){const X=Math.min(Math.abs(U.width),Math.abs(U.height))/2;z.beginPath(),z.arc(U.x+U.width/2,U.y+U.height/2,X,0,2*Math.PI),z.stroke()}break;case"line":U.width&&U.height&&(z.beginPath(),z.moveTo(U.x,U.y),z.lineTo(U.x+U.width,U.y+U.height),z.stroke());break;case"arrow":if(U.width&&U.height){z.beginPath(),z.moveTo(U.x,U.y),z.lineTo(U.x+U.width,U.y+U.height),z.stroke();const ie=Math.atan2(U.height,U.width);z.beginPath(),z.moveTo(U.x+U.width,U.y+U.height),z.lineTo(U.x+U.width-10*Math.cos(ie-Math.PI/6),U.y+U.height-10*Math.sin(ie-Math.PI/6)),z.moveTo(U.x+U.width,U.y+U.height),z.lineTo(U.x+U.width-10*Math.cos(ie+Math.PI/6),U.y+U.height-10*Math.sin(ie+Math.PI/6)),z.stroke()}break;case"note":if(z.fillStyle="#ffeb3b",z.fillRect(U.x,U.y,100,80),z.strokeStyle="#fbc02d",z.strokeRect(U.x,U.y,100,80),U.text){z.fillStyle="#333",z.font="12px Arial";const X=U.text.split(" ");let ie="",ye=U.y+20;for(let Le=0;Le<X.length;Le++){const Ne=ie+X[Le]+" ";z.measureText(Ne).width>90&&Le>0?(z.fillText(ie,U.x+5,ye),ie=X[Le]+" ",ye+=15):ie=Ne}z.fillText(ie,U.x+5,ye)}break;case"signature":case"image":if(U.imageData){let X=V.get(U.id);X?z.drawImage(X,U.x,U.y,U.width||X.width,U.height||X.height):(z.fillStyle="#fff8dc",z.fillRect(U.x,U.y,U.width||150,U.height||75),z.strokeStyle="#ddd",z.lineWidth=2,z.setLineDash([3,3]),z.strokeRect(U.x,U.y,U.width||150,U.height||75),z.setLineDash([]),X=new Image,X.onload=()=>{H(ie=>new Map(ie.set(U.id,X)))},X.src=U.imageData)}break}f===U.id&&Q(z,U),z.restore()})},[o,f,V]),le=N.useCallback(async()=>{const z=d.current;if(!z)return;const U=z.getContext("2d");U&&(U.clearRect(0,0,W,K),await G(U),te(U),b.length>0&&(r==="pen"||r==="highlighter")&&(U.strokeStyle=v.color,U.lineWidth=r==="highlighter"?v.strokeWidth*3:v.strokeWidth,U.globalAlpha=r==="highlighter"?.3:1,U.lineCap="round",U.beginPath(),b.forEach((X,ie)=>{ie===0?U.moveTo(X.x,X.y):U.lineTo(X.x,X.y)}),U.stroke(),U.globalAlpha=1))},[W,K,G,te,b,r,v]),ce=z=>{const U=d.current;if(!U)return{x:0,y:0};const X=U.getBoundingClientRect();return{x:(z.clientX-X.left)*(U.width/X.width),y:(z.clientY-X.top)*(U.height/X.height)}},pe=z=>{if(console.log("🔧 Tool activated:",r),r==="text"||r==="text_edit"){const X=ce(z);x(X.x,X.y);return}const U=ce(z);if(console.log("📍 Click coordinates:",U),r==="select"){const X=o.find(ie=>Y(U.x,U.y,ie));X?(c(X.id),O(!0),R({x:U.x-X.x,y:U.y-X.y})):c(null)}else if(r==="pen"||r==="highlighter")y(!0),T([U]);else if(r==="image"){const X=document.createElement("input");X.type="file",X.accept="image/*",X.onchange=ie=>{var Le;const ye=(Le=ie.target.files)==null?void 0:Le[0];if(ye){const Ne=new FileReader;Ne.onload=mn=>{var ht;const Te=(ht=mn.target)==null?void 0:ht.result;i({type:"image",x:U.x,y:U.y,width:150,height:100,imageData:Te,color:v.color,strokeWidth:v.strokeWidth,opacity:v.opacity,page:e})},Ne.readAsDataURL(ye)}},X.click()}else r==="rectangle"||r==="circle"||r==="arrow"||r==="line"?i({type:r,x:U.x,y:U.y,width:100,height:100,color:v.color,strokeWidth:v.strokeWidth,opacity:v.opacity,page:e}):r==="eraser"?M(X=>[...X,{x:U.x-10,y:U.y-10,width:20,height:20}]):r==="signature"?k(!0):r==="note"&&i({type:"note",x:U.x,y:U.y,width:100,height:80,text:"Click to edit note",color:v.color,strokeWidth:v.strokeWidth,opacity:v.opacity,page:e})},ge=N.useCallback(z=>{const U=ce(z);if(_&&f){if(o.find(ie=>ie.id===f)){const ie=U.x-j.x,ye=U.y-j.y;l(f,{x:ie,y:ye})}}else w&&(r==="pen"||r==="highlighter"?T(X=>[...X,U]):r==="eraser"&&M(X=>[...X,{x:U.x-10,y:U.y-10,width:20,height:20}]))},[_,f,o,j,l,w,r]),Ae=N.useCallback(z=>{const U=ce(z);w&&(r==="pen"||r==="highlighter")&&(b.length>1&&i({type:r,x:U.x,y:U.y,points:b,color:v.color,strokeWidth:v.strokeWidth,opacity:v.opacity,page:e}),T([])),y(!1),O(!1)},[w,r,b,S,v,i]),Oe=z=>{const U=d.current;if(!U)return;U.getBoundingClientRect();const X=(U.width-150)/2,ie=(U.height-75)/2;i({type:"signature",x:X,y:ie,width:150,height:75,imageData:z,color:v.color,strokeWidth:v.strokeWidth,opacity:v.opacity,page:e}),k(!1)},Z=()=>{k(!1)},J=z=>{const U=ce(z),X=o.find(ie=>ie.type==="note"&&Y(U.x,U.y,ie));X&&L({id:X.id,x:X.x,y:X.y,text:X.text||""})},re=z=>{A&&(l(A.id,{text:z.text}),L(null))},se=()=>{L(null)};return N.useEffect(()=>{B()},[B]),N.useEffect(()=>{le()},[le]),N.useEffect(()=>{const z=d.current;if(z)return z.addEventListener("mousemove",ge),z.addEventListener("mouseup",Ae),()=>{z.removeEventListener("mousemove",ge),z.removeEventListener("mouseup",Ae)}},[ge,Ae]),E.jsx("div",{className:"relative flex-1 overflow-auto bg-gray-100 p-4",children:E.jsxs("div",{className:"relative mx-auto bg-white shadow-lg",style:{width:W,height:K},children:[m&&E.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/80 z-10",children:E.jsx(LS,{className:"h-8 w-8 animate-spin text-primary"})}),E.jsx("canvas",{ref:z=>{d.current=z,typeof p=="function"?p(z):p&&(p.current=z)},width:W,height:K,className:"block cursor-crosshair",onMouseDown:pe,onDoubleClick:J,style:{cursor:r==="text"?"text":"crosshair"}}),u.map(z=>E.jsx(qT,{...z,zoom:t,onUpdate:U=>h(z.id,U),onSave:()=>h(z.id,{isEditing:!1}),onDelete:()=>g(z.id),onStartEdit:()=>h(z.id,{isEditing:!0})},z.id)),f&&(()=>{const z=o.find(U=>U.id===f);return z&&(z.width||z.height)&&z.type!=="pen"&&z.type!=="highlighter"?E.jsx(HT,{x:z.x,y:z.y,width:z.width||100,height:z.height||100,onResize:U=>l(f,U),zoom:t,canvasOffset:{x:0,y:0}}):null})(),P&&E.jsx(H1,{onSave:Oe,onCancel:Z,strokeColor:v.color,strokeWidth:v.strokeWidth}),A&&E.jsx("div",{style:{position:"absolute",left:A.x,top:A.y,zIndex:1e3},children:E.jsx(UT,{text:A.text,x:A.x,y:A.y,fontSize:12,fontFamily:"Arial",fontWeight:"normal",fontStyle:"normal",textAlign:"left",color:"#333",onSave:(z,U)=>re({text:z}),onCancel:se})})]})})});W1.displayName="PDFCanvas";const VT=({documentName:e,currentPage:t,totalPages:n,zoom:r,annotationCount:o})=>E.jsxs("div",{className:"bg-editor-status border-t border-border px-4 py-2 flex items-center justify-between text-sm text-muted-foreground",children:[E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(Od,{className:"h-4 w-4"}),E.jsx("span",{className:"font-medium text-foreground",children:e})]}),E.jsx("div",{className:"flex items-center gap-1",children:E.jsxs("span",{children:["Page ",t," of ",n]})})]}),E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(KS,{className:"h-4 w-4"}),E.jsxs("span",{children:[o," annotation",o!==1?"s":""]})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(Iy,{className:"h-4 w-4"}),E.jsxs("span",{children:[r,"%"]})]}),E.jsx("div",{className:"text-xs",children:"Ready"})]})]});var WT="Label",K1=N.forwardRef((e,t)=>E.jsx(Se.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));K1.displayName=WT;var G1=K1;const KT=xd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),En=N.forwardRef(({className:e,...t},n)=>E.jsx(G1,{ref:n,className:ke(KT(),e),...t}));En.displayName=G1.displayName;var Y1=["PageUp","PageDown"],Q1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],X1={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},pi="Slider",[cf,GT,YT]=vd(pi),[Z1,S5]=fo(pi,[YT]),[QT,Ys]=Z1(pi),J1=N.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:l=!1,minStepsBetweenThumbs:s=0,defaultValue:m=[r],value:v,onValueChange:f=()=>{},onValueCommit:c=()=>{},inverted:u=!1,form:x,...h}=e,g=N.useRef(new Set),p=N.useRef(0),w=a==="horizontal"?XT:ZT,[y=[],b]=va({prop:v,defaultProp:m,onChange:_=>{var j;(j=[...g.current][p.current])==null||j.focus(),f(_)}}),T=N.useRef(y);function S(_){const O=rC(y,_);k(_,O)}function C(_){k(_,p.current)}function P(){const _=T.current[p.current];y[p.current]!==_&&c(y)}function k(_,O,{commit:j}={commit:!1}){const R=lC(i),F=sC(Math.round((_-r)/i)*i+r,R),q=is(F,[r,o]);b((V=[])=>{const H=tC(V,q,O);if(aC(H,s*i)){p.current=H.indexOf(q);const I=String(H)!==String(V);return I&&j&&c(H),I?H:V}else return V})}return E.jsx(QT,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:o,valueIndexToChangeRef:p,thumbs:g.current,values:y,orientation:a,form:x,children:E.jsx(cf.Provider,{scope:e.__scopeSlider,children:E.jsx(cf.Slot,{scope:e.__scopeSlider,children:E.jsx(w,{"aria-disabled":l,"data-disabled":l?"":void 0,...h,ref:t,onPointerDown:ve(h.onPointerDown,()=>{l||(T.current=y)}),min:r,max:o,inverted:u,onSlideStart:l?void 0:S,onSlideMove:l?void 0:C,onSlideEnd:l?void 0:P,onHomeKeyDown:()=>!l&&k(r,0,{commit:!0}),onEndKeyDown:()=>!l&&k(o,y.length-1,{commit:!0}),onStepKeyDown:({event:_,direction:O})=>{if(!l){const F=Y1.includes(_.key)||_.shiftKey&&Q1.includes(_.key)?10:1,q=p.current,V=y[q],H=i*F*O;k(V+H,q,{commit:!0})}}})})})})});J1.displayName=pi;var[ew,tw]=Z1(pi,{startEdge:"left",endEdge:"right",size:"width",direction:1}),XT=N.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:l,onSlideEnd:s,onStepKeyDown:m,...v}=e,[f,c]=N.useState(null),u=Re(t,w=>c(w)),x=N.useRef(void 0),h=V0(o),g=h==="ltr",p=g&&!i||!g&&i;function d(w){const y=x.current||f.getBoundingClientRect(),b=[0,y.width],S=Wd(b,p?[n,r]:[r,n]);return x.current=y,S(w-y.left)}return E.jsx(ew,{scope:e.__scopeSlider,startEdge:p?"left":"right",endEdge:p?"right":"left",direction:p?1:-1,size:"width",children:E.jsx(nw,{dir:h,"data-orientation":"horizontal",...v,ref:u,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const y=d(w.clientX);a==null||a(y)},onSlideMove:w=>{const y=d(w.clientX);l==null||l(y)},onSlideEnd:()=>{x.current=void 0,s==null||s()},onStepKeyDown:w=>{const b=X1[p?"from-left":"from-right"].includes(w.key);m==null||m({event:w,direction:b?-1:1})}})})}),ZT=N.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:s,...m}=e,v=N.useRef(null),f=Re(t,v),c=N.useRef(void 0),u=!o;function x(h){const g=c.current||v.current.getBoundingClientRect(),p=[0,g.height],w=Wd(p,u?[r,n]:[n,r]);return c.current=g,w(h-g.top)}return E.jsx(ew,{scope:e.__scopeSlider,startEdge:u?"bottom":"top",endEdge:u?"top":"bottom",size:"height",direction:u?1:-1,children:E.jsx(nw,{"data-orientation":"vertical",...m,ref:f,style:{...m.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const g=x(h.clientY);i==null||i(g)},onSlideMove:h=>{const g=x(h.clientY);a==null||a(g)},onSlideEnd:()=>{c.current=void 0,l==null||l()},onStepKeyDown:h=>{const p=X1[u?"from-bottom":"from-top"].includes(h.key);s==null||s({event:h,direction:p?-1:1})}})})}),nw=N.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:l,onStepKeyDown:s,...m}=e,v=Ys(pi,n);return E.jsx(Se.span,{...m,ref:t,onKeyDown:ve(e.onKeyDown,f=>{f.key==="Home"?(a(f),f.preventDefault()):f.key==="End"?(l(f),f.preventDefault()):Y1.concat(Q1).includes(f.key)&&(s(f),f.preventDefault())}),onPointerDown:ve(e.onPointerDown,f=>{const c=f.target;c.setPointerCapture(f.pointerId),f.preventDefault(),v.thumbs.has(c)?c.focus():r(f)}),onPointerMove:ve(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:ve(e.onPointerUp,f=>{const c=f.target;c.hasPointerCapture(f.pointerId)&&(c.releasePointerCapture(f.pointerId),i(f))})})}),rw="SliderTrack",ow=N.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ys(rw,n);return E.jsx(Se.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});ow.displayName=rw;var ff="SliderRange",iw=N.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Ys(ff,n),i=tw(ff,n),a=N.useRef(null),l=Re(t,a),s=o.values.length,m=o.values.map(c=>sw(c,o.min,o.max)),v=s>1?Math.min(...m):0,f=100-Math.max(...m);return E.jsx(Se.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:l,style:{...e.style,[i.startEdge]:v+"%",[i.endEdge]:f+"%"}})});iw.displayName=ff;var df="SliderThumb",aw=N.forwardRef((e,t)=>{const n=GT(e.__scopeSlider),[r,o]=N.useState(null),i=Re(t,l=>o(l)),a=N.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return E.jsx(JT,{...e,ref:i,index:a})}),JT=N.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...i}=e,a=Ys(df,n),l=tw(df,n),[s,m]=N.useState(null),v=Re(t,d=>m(d)),f=s?a.form||!!s.closest("form"):!0,c=a0(s),u=a.values[r],x=u===void 0?0:sw(u,a.min,a.max),h=nC(r,a.values.length),g=c==null?void 0:c[l.size],p=g?oC(g,x,l.direction):0;return N.useEffect(()=>{if(s)return a.thumbs.add(s),()=>{a.thumbs.delete(s)}},[s,a.thumbs]),E.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${x}% + ${p}px)`},children:[E.jsx(cf.ItemSlot,{scope:e.__scopeSlider,children:E.jsx(Se.span,{role:"slider","aria-label":e["aria-label"]||h,"aria-valuemin":a.min,"aria-valuenow":u,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:v,style:u===void 0?{display:"none"}:e.style,onFocus:ve(e.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),f&&E.jsx(lw,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:u},r)]})});aw.displayName=df;var eC="RadioBubbleInput",lw=N.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=N.useRef(null),i=Re(o,r),a=G0(t);return N.useEffect(()=>{const l=o.current;if(!l)return;const s=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(s,"value").set;if(a!==t&&v){const f=new Event("input",{bubbles:!0});v.call(l,t),l.dispatchEvent(f)}},[a,t]),E.jsx(Se.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});lw.displayName=eC;function tC(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,i)=>o-i)}function sw(e,t,n){const i=100/(n-t)*(e-t);return is(i,[0,100])}function nC(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function rC(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function oC(e,t,n){const r=e/2,i=Wd([0,50],[0,r]);return(r-i(t)*n)*n}function iC(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function aC(e,t){if(t>0){const n=iC(e);return Math.min(...n)>=t}return!0}function Wd(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function lC(e){return(String(e).split(".")[1]||"").length}function sC(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var uw=J1,uC=ow,cC=iw,fC=aw;const hf=N.forwardRef(({className:e,...t},n)=>E.jsxs(uw,{ref:n,className:ke("relative flex w-full touch-none select-none items-center",e),...t,children:[E.jsx(uC,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:E.jsx(cC,{className:"absolute h-full bg-primary"})}),E.jsx(fC,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));hf.displayName=uw.displayName;const dC=["#000000","#ffffff","#3b82f6","#ef4444","#22c55e","#f59e0b","#8b5cf6","#ec4899","#06b6d4","#f97316"],hC=({selectedColor:e,onColorChange:t,strokeWidth:n,onStrokeWidthChange:r,fontSize:o,onFontSizeChange:i,opacity:a,onOpacityChange:l,activeTool:s,selectedAnnotation:m,annotations:v,onUpdateAnnotation:f,fontFamily:c="Arial",onFontFamilyChange:u,fontWeight:x="normal",onFontWeightChange:h,fontStyle:g="normal",onFontStyleChange:p,textDecoration:d="none",onTextDecorationChange:w,textAlign:y="left",onTextAlignChange:b,isEditingText:T=!1})=>{const S=["pen","highlighter","rectangle","circle","line"].includes(s),C=s==="text"||s==="text_edit"||T,P=[8,10,12,14,16,18,20,24,28,32,36,48,72],k=["Arial","Times New Roman","Helvetica","Georgia","Verdana","Courier New"];return E.jsx("div",{className:"w-64 bg-card border-l border-border p-4 overflow-y-auto",children:E.jsxs("div",{className:"space-y-6",children:[E.jsxs("div",{children:[E.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Properties"}),E.jsxs("p",{className:"text-xs text-muted-foreground mb-4",children:["Tool: ",E.jsx("span",{className:"capitalize font-medium",children:s})]})]}),E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"space-y-3",children:[E.jsx(En,{className:"text-sm font-medium",children:"Color"}),E.jsx("div",{className:"grid grid-cols-5 gap-2",children:dC.map(_=>E.jsx(he,{className:"w-8 h-8 p-0 rounded-md border-2 hover:scale-110 transition-transform",style:{backgroundColor:_,borderColor:e===_?"hsl(var(--primary))":"hsl(var(--border))"},onClick:()=>t(_),title:_},_))}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("input",{type:"color",value:e,onChange:_=>t(_.target.value),className:"w-8 h-8 rounded border border-border cursor-pointer"}),E.jsx("input",{type:"text",value:e,onChange:_=>t(_.target.value),className:"flex-1 px-2 py-1 text-xs border border-border rounded bg-background",placeholder:"#000000"})]})]}),E.jsx(tt,{})]}),S&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"space-y-3",children:[E.jsx(En,{className:"text-sm font-medium",children:s==="highlighter"?"Thickness":"Stroke Width"}),E.jsxs("div",{className:"space-y-2",children:[E.jsx(hf,{value:[n],onValueChange:_=>r(_[0]),min:1,max:20,step:1,className:"w-full"}),E.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[E.jsx("span",{children:"1px"}),E.jsxs("span",{className:"font-medium",children:[n,"px"]}),E.jsx("span",{children:"20px"})]})]}),E.jsx("div",{className:"flex items-center justify-center py-2",children:E.jsx("div",{className:"rounded",style:{width:"60px",height:`${Math.max(n,2)}px`,backgroundColor:e,opacity:s==="highlighter"?.3:1}})})]}),E.jsx(tt,{})]}),C&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"space-y-3",children:[E.jsx(En,{className:"text-sm font-medium",children:"Font Family"}),E.jsxs(Kn,{value:c,onValueChange:u,children:[E.jsx(jn,{className:"w-full h-9",children:E.jsx(Gn,{})}),E.jsx(Rn,{children:k.map(_=>E.jsx(gt,{value:_,style:{fontFamily:_},children:_},_))})]})]}),E.jsx(tt,{}),E.jsxs("div",{className:"space-y-3",children:[E.jsx(En,{className:"text-sm font-medium",children:"Font Size"}),E.jsx("div",{className:"flex gap-2",children:E.jsxs(Kn,{value:o.toString(),onValueChange:_=>i(parseInt(_)),children:[E.jsx(jn,{className:"flex-1 h-9",children:E.jsx(Gn,{})}),E.jsx(Rn,{children:P.map(_=>E.jsxs(gt,{value:_.toString(),children:[_,"pt"]},_))})]})}),E.jsx("div",{className:"flex items-center justify-center py-2 border border-border rounded bg-background",children:E.jsx("span",{style:{fontSize:`${Math.min(o,24)}px`,fontFamily:c,color:e},children:"Aa"})})]}),E.jsx(tt,{}),E.jsxs("div",{className:"space-y-3",children:[E.jsx(En,{className:"text-sm font-medium",children:"Text Style"}),E.jsxs("div",{className:"flex gap-1",children:[E.jsx(he,{variant:x==="bold"?"default":"ghost",size:"sm",onClick:()=>h==null?void 0:h(x==="bold"?"normal":"bold"),className:"hover:bg-secondary flex-1",title:"Bold",children:E.jsx(_d,{className:"h-4 w-4"})}),E.jsx(he,{variant:g==="italic"?"default":"ghost",size:"sm",onClick:()=>p==null?void 0:p(g==="italic"?"normal":"italic"),className:"hover:bg-secondary flex-1",title:"Italic",children:E.jsx(Td,{className:"h-4 w-4"})}),E.jsx(he,{variant:d==="underline"?"default":"ghost",size:"sm",onClick:()=>w==null?void 0:w(d==="underline"?"none":"underline"),className:"hover:bg-secondary flex-1",title:"Underline",children:E.jsx(Dy,{className:"h-4 w-4"})})]})]}),E.jsx(tt,{}),E.jsxs("div",{className:"space-y-3",children:[E.jsx(En,{className:"text-sm font-medium",children:"Text Alignment"}),E.jsxs("div",{className:"flex gap-1",children:[E.jsx(he,{variant:y==="left"?"default":"ghost",size:"sm",onClick:()=>b==null?void 0:b("left"),className:"hover:bg-secondary flex-1",title:"Align Left",children:E.jsx(Ed,{className:"h-4 w-4"})}),E.jsx(he,{variant:y==="center"?"default":"ghost",size:"sm",onClick:()=>b==null?void 0:b("center"),className:"hover:bg-secondary flex-1",title:"Align Center",children:E.jsx(bd,{className:"h-4 w-4"})}),E.jsx(he,{variant:y==="right"?"default":"ghost",size:"sm",onClick:()=>b==null?void 0:b("right"),className:"hover:bg-secondary flex-1",title:"Align Right",children:E.jsx(Sd,{className:"h-4 w-4"})})]})]}),E.jsx(tt,{})]}),E.jsxs("div",{className:"space-y-3",children:[E.jsx(En,{className:"text-sm font-medium",children:"Opacity"}),E.jsxs("div",{className:"space-y-2",children:[E.jsx(hf,{value:[a*100],onValueChange:_=>l(_[0]/100),min:10,max:100,step:5,className:"w-full"}),E.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[E.jsx("span",{children:"10%"}),E.jsxs("span",{className:"font-medium",children:[Math.round(a*100),"%"]}),E.jsx("span",{children:"100%"})]})]}),E.jsx("div",{className:"flex items-center justify-center py-2",children:E.jsxs("div",{className:"relative",children:[E.jsx("div",{className:"w-12 h-12 bg-white border border-border rounded",style:{backgroundImage:` linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%) `,backgroundSize:"8px 8px",backgroundPosition:"0 0, 0 4px, 4px -4px, -4px 0px"}}),E.jsx("div",{className:"absolute inset-0 rounded",style:{backgroundColor:e,opacity:a}})]})})]}),E.jsxs("div",{className:"bg-muted/50 p-3 rounded-lg",children:[E.jsx("h4",{className:"text-xs font-medium mb-2",children:"Tips"}),E.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[s==="select"&&E.jsx("p",{children:"Click and drag to select annotations. Use Delete key to remove selected annotations."}),s==="text"&&E.jsx("p",{children:"Click anywhere on the document to add text. You can customize font size and color."}),s==="text_edit"&&E.jsx("p",{children:"Click on existing text to edit it in place. Use the formatting tools above to style your text."}),s==="pen"&&E.jsx("p",{children:"Click and drag to draw freehand. Adjust stroke width for thicker or thinner lines."}),s==="highlighter"&&E.jsx("p",{children:"Drag across text to highlight. The opacity is automatically set for highlighting effect."}),(s==="rectangle"||s==="circle"||s==="line")&&E.jsx("p",{children:"Click and drag to draw the shape. Hold Shift for perfect squares/circles."}),s==="note"&&E.jsx("p",{children:"Click to add a sticky note. You can type your note text when placing it."}),s==="image"&&E.jsx("p",{children:"Click to insert an image. You'll be prompted to select an image file."}),s==="signature"&&E.jsx("p",{children:"Click to add a signature. A signature pad will open for you to draw your signature."}),s==="eraser"&&E.jsx("p",{children:"Click on annotations to remove them. Be careful - this action cannot be undone easily!"})]})]})]})})};var Qs="Dialog",[cw,_5]=fo(Qs),[pC,pn]=cw(Qs),fw=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,l=N.useRef(null),s=N.useRef(null),[m,v]=va({prop:r,defaultProp:o??!1,onChange:i,caller:Qs});return E.jsx(pC,{scope:t,triggerRef:l,contentRef:s,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),open:m,onOpenChange:v,onOpenToggle:N.useCallback(()=>v(f=>!f),[v]),modal:a,children:n})};fw.displayName=Qs;var dw="DialogTrigger",mC=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pn(dw,n),i=Re(t,o.triggerRef);return E.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yd(o.open),...r,ref:i,onClick:ve(e.onClick,o.onOpenToggle)})});mC.displayName=dw;var Kd="DialogPortal",[vC,hw]=cw(Kd,{forceMount:void 0}),pw=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=pn(Kd,t);return E.jsx(vC,{scope:t,forceMount:n,children:N.Children.map(r,a=>E.jsx(ui,{present:n||i.open,children:E.jsx(Ts,{asChild:!0,container:o,children:a})}))})};pw.displayName=Kd;var ls="DialogOverlay",mw=N.forwardRef((e,t)=>{const n=hw(ls,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=pn(ls,e.__scopeDialog);return i.modal?E.jsx(ui,{present:r||i.open,children:E.jsx(yC,{...o,ref:t})}):null});mw.displayName=ls;var gC=ri("DialogOverlay.RemoveScroll"),yC=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pn(ls,n);return E.jsx(Hd,{as:gC,allowPinchZoom:!0,shards:[o.contentRef],children:E.jsx(Se.div,{"data-state":Yd(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),so="DialogContent",vw=N.forwardRef((e,t)=>{const n=hw(so,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=pn(so,e.__scopeDialog);return E.jsx(ui,{present:r||i.open,children:i.modal?E.jsx(wC,{...o,ref:t}):E.jsx(xC,{...o,ref:t})})});vw.displayName=so;var wC=N.forwardRef((e,t)=>{const n=pn(so,e.__scopeDialog),r=N.useRef(null),o=Re(t,n.contentRef,r);return N.useEffect(()=>{const i=r.current;if(i)return Q0(i)},[]),E.jsx(gw,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ve(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:ve(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&i.preventDefault()}),onFocusOutside:ve(e.onFocusOutside,i=>i.preventDefault())})}),xC=N.forwardRef((e,t)=>{const n=pn(so,e.__scopeDialog),r=N.useRef(!1),o=N.useRef(!1);return E.jsx(gw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var s,m;(s=e.onInteractOutside)==null||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((m=n.triggerRef.current)==null?void 0:m.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),gw=N.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,l=pn(so,n),s=N.useRef(null),m=Re(t,s);return W0(),E.jsxs(E.Fragment,{children:[E.jsx(Ud,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:E.jsx(Ca,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Yd(l.open),...a,ref:m,onDismiss:()=>l.onOpenChange(!1)})}),E.jsxs(E.Fragment,{children:[E.jsx(bC,{titleId:l.titleId}),E.jsx(SC,{contentRef:s,descriptionId:l.descriptionId})]})]})}),Gd="DialogTitle",yw=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pn(Gd,n);return E.jsx(Se.h2,{id:o.titleId,...r,ref:t})});yw.displayName=Gd;var ww="DialogDescription",xw=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pn(ww,n);return E.jsx(Se.p,{id:o.descriptionId,...r,ref:t})});xw.displayName=ww;var bw="DialogClose",Ew=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=pn(bw,n);return E.jsx(Se.button,{type:"button",...r,ref:t,onClick:ve(e.onClick,()=>o.onOpenChange(!1))})});Ew.displayName=bw;function Yd(e){return e?"open":"closed"}var Sw="DialogTitleWarning",[k5,_w]=CE(Sw,{contentName:so,titleName:Gd,docsSlug:"dialog"}),bC=({titleId:e})=>{const t=_w(Sw),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return N.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},EC="DialogDescriptionWarning",SC=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_w(EC).contentName}}.`;return N.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},_C=fw,kC=pw,kw=mw,Nw=vw,Ow=yw,Tw=xw,NC=Ew;const OC=_C,TC=kC,Cw=N.forwardRef(({className:e,...t},n)=>E.jsx(kw,{ref:n,className:ke("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}));Cw.displayName=kw.displayName;const Pw=N.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(TC,{children:[E.jsx(Cw,{}),E.jsxs(Nw,{ref:r,className:ke("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,E.jsxs(NC,{className:"absolute right-4 top-4 rounded-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:[E.jsx(Aa,{className:"h-4 w-4"}),E.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Pw.displayName=Nw.displayName;const Aw=({className:e,...t})=>E.jsx("div",{className:ke("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Aw.displayName="DialogHeader";const jw=({className:e,...t})=>E.jsx("div",{className:ke("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});jw.displayName="DialogFooter";const Rw=N.forwardRef(({className:e,...t},n)=>E.jsx(Ow,{ref:n,className:ke("text-lg font-semibold leading-none tracking-tight",e),...t}));Rw.displayName=Ow.displayName;const Lw=N.forwardRef(({className:e,...t},n)=>E.jsx(Tw,{ref:n,className:ke("text-sm text-muted-foreground",e),...t}));Lw.displayName=Tw.displayName;const CC=({type:e,onConfirm:t,onCancel:n})=>{const[r,o]=N.useState(""),[i,a]=N.useState("pdf"),[l,s]=N.useState(null),v=(()=>{switch(e){case"new":return{title:"Create New PDF",description:"Create a new PDF document",icon:Od,showFileName:!1,showFormat:!1,confirmText:"Create"};case"open":return{title:"Open PDF",description:"Select a PDF file to open",icon:Ly,showFileName:!0,showFormat:!1,confirmText:"Open",placeholder:"Enter file name or browse..."};case"save":return{title:"Save PDF",description:"Save your PDF document",icon:As,showFileName:!0,showFormat:!1,confirmText:"Save",placeholder:"Enter file name..."};case"export":return{title:"Export Document",description:"Export your document in different formats",icon:Nd,showFileName:!0,showFormat:!0,confirmText:"Export",placeholder:"Enter file name..."}}})(),f=v.icon,c=()=>{e==="open"&&l?t(r||l.name,i,l):v.showFormat?t(r||"document",i):t(r||void 0)},u=()=>{const x=document.createElement("input");x.type="file",x.accept=".pdf,application/pdf",x.multiple=!1,x.onchange=h=>{var p;const g=(p=h.target.files)==null?void 0:p[0];if(console.log("File selected:",g==null?void 0:g.name,"Size:",g==null?void 0:g.size,"Type:",g==null?void 0:g.type),g){if(g.size===0){alert("The selected file is empty. Please choose a valid PDF file.");return}if(g.type!=="application/pdf"&&!g.name.toLowerCase().endsWith(".pdf")){alert("Please select a valid PDF file.");return}s(g),o(g.name.replace(/\.pdf$/i,""))}},x.click()};return E.jsx(OC,{open:!0,onOpenChange:n,children:E.jsxs(Pw,{className:"sm:max-w-md",children:[E.jsxs(Aw,{children:[E.jsxs(Rw,{className:"flex items-center gap-2",children:[E.jsx(f,{className:"h-5 w-5"}),v.title]}),E.jsx(Lw,{children:v.description})]}),E.jsxs("div",{className:"space-y-4",children:[v.showFileName&&E.jsxs("div",{className:"space-y-2",children:[E.jsx(En,{htmlFor:"fileName",children:"File Name"}),E.jsxs("div",{className:"flex gap-2",children:[E.jsx(ba,{id:"fileName",value:r,onChange:x=>o(x.target.value),placeholder:v.placeholder,className:"flex-1"}),e==="open"&&E.jsx(he,{type:"button",variant:"outline",onClick:u,children:"Browse"})]})]}),v.showFormat&&E.jsxs("div",{className:"space-y-2",children:[E.jsx(En,{htmlFor:"format",children:"Export Format"}),E.jsxs(Kn,{value:i,onValueChange:a,children:[E.jsx(jn,{children:E.jsx(Gn,{})}),E.jsxs(Rn,{children:[E.jsx(gt,{value:"pdf",children:"PDF (.pdf)"}),E.jsx(gt,{value:"docx",children:"Word Document (.docx)"}),E.jsx(gt,{value:"png",children:"PNG Image (.png)"}),E.jsx(gt,{value:"jpg",children:"JPEG Image (.jpg)"})]})]})]}),e==="new"&&E.jsx("div",{className:"bg-muted/50 p-3 rounded-lg text-sm text-muted-foreground",children:E.jsx("p",{children:"This will create a blank PDF document that you can annotate and edit."})}),e==="open"&&E.jsx("div",{className:"bg-muted/50 p-3 rounded-lg text-sm text-muted-foreground",children:E.jsx("p",{children:"Select a PDF file from your computer to open in the editor. All existing annotations will be preserved."})}),e==="export"&&E.jsx("div",{className:"bg-muted/50 p-3 rounded-lg text-sm text-muted-foreground",children:E.jsx("p",{children:"Export your annotated PDF in various formats. Annotations will be flattened into the document."})})]}),E.jsxs(jw,{className:"flex-col-reverse sm:flex-row",children:[E.jsx(he,{type:"button",variant:"outline",onClick:n,className:"w-full sm:w-auto",children:"Cancel"}),E.jsx(he,{type:"button",onClick:c,className:"w-full sm:w-auto",disabled:v.showFileName&&!r.trim()||e==="open"&&!l,children:v.confirmText})]})]})})},PC=({fontFamily:e,onFontFamilyChange:t,fontWeight:n,onFontWeightChange:r,fontStyle:o,onFontStyleChange:i,textDecoration:a,onTextDecorationChange:l,textAlign:s,onTextAlignChange:m,fontSize:v,onFontSizeChange:f})=>{const c=[8,10,12,14,16,18,20,24,28,32,36,48,72],u=["Arial","Times New Roman","Helvetica","Georgia","Verdana","Courier New"];return E.jsxs("div",{className:"bg-editor-toolbar border-b border-border px-4 py-2 flex items-center gap-2 flex-wrap",children:[E.jsxs(Kn,{value:e,onValueChange:t,children:[E.jsx(jn,{className:"w-32 h-8",children:E.jsx(Gn,{})}),E.jsx(Rn,{children:u.map(x=>E.jsx(gt,{value:x,style:{fontFamily:x},children:x},x))})]}),E.jsxs(Kn,{value:v.toString(),onValueChange:x=>f(parseInt(x)),children:[E.jsx(jn,{className:"w-20 h-8",children:E.jsx(Gn,{})}),E.jsx(Rn,{children:c.map(x=>E.jsx(gt,{value:x.toString(),children:x},x))})]}),E.jsx(tt,{orientation:"vertical",className:"h-6"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(he,{variant:n==="bold"?"default":"ghost",size:"sm",onClick:()=>r(n==="bold"?"normal":"bold"),className:"hover:bg-secondary",title:"Bold",children:E.jsx(_d,{className:"h-4 w-4"})}),E.jsx(he,{variant:o==="italic"?"default":"ghost",size:"sm",onClick:()=>i(o==="italic"?"normal":"italic"),className:"hover:bg-secondary",title:"Italic",children:E.jsx(Td,{className:"h-4 w-4"})}),E.jsx(he,{variant:a==="underline"?"default":"ghost",size:"sm",onClick:()=>l(a==="underline"?"none":"underline"),className:"hover:bg-secondary",title:"Underline",children:E.jsx(Dy,{className:"h-4 w-4"})})]}),E.jsx(tt,{orientation:"vertical",className:"h-6"}),E.jsxs("div",{className:"flex items-center gap-1",children:[E.jsx(he,{variant:s==="left"?"default":"ghost",size:"sm",onClick:()=>m("left"),className:"hover:bg-secondary",title:"Align Left",children:E.jsx(Ed,{className:"h-4 w-4"})}),E.jsx(he,{variant:s==="center"?"default":"ghost",size:"sm",onClick:()=>m("center"),className:"hover:bg-secondary",title:"Align Center",children:E.jsx(bd,{className:"h-4 w-4"})}),E.jsx(he,{variant:s==="right"?"default":"ghost",size:"sm",onClick:()=>m("right"),className:"hover:bg-secondary",title:"Align Right",children:E.jsx(Sd,{className:"h-4 w-4"})})]})]})};function AC(){this.__data__=[],this.size=0}var jC=AC;function RC(e,t){return e===t||e!==e&&t!==t}var Mw=RC,LC=Mw;function MC(e,t){for(var n=e.length;n--;)if(LC(e[n][0],t))return n;return-1}var Xs=MC,DC=Xs,IC=Array.prototype,FC=IC.splice;function $C(e){var t=this.__data__,n=DC(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():FC.call(t,n,1),--this.size,!0}var BC=$C,zC=Xs;function qC(e){var t=this.__data__,n=zC(t,e);return n<0?void 0:t[n][1]}var UC=qC,HC=Xs;function VC(e){return HC(this.__data__,e)>-1}var WC=VC,KC=Xs;function GC(e,t){var n=this.__data__,r=KC(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var YC=GC,QC=jC,XC=BC,ZC=UC,JC=WC,eP=YC;function mi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mi.prototype.clear=QC;mi.prototype.delete=XC;mi.prototype.get=ZC;mi.prototype.has=JC;mi.prototype.set=eP;var Zs=mi,tP=Zs;function nP(){this.__data__=new tP,this.size=0}var rP=nP;function oP(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var iP=oP;function aP(e){return this.__data__.get(e)}var lP=aP;function sP(e){return this.__data__.has(e)}var uP=sP,cP=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,Dw=cP,fP=Dw,dP=typeof self=="object"&&self&&self.Object===Object&&self,hP=fP||dP||Function("return this")(),nr=hP,pP=nr,mP=pP.Symbol,Qd=mP,am=Qd,Iw=Object.prototype,vP=Iw.hasOwnProperty,gP=Iw.toString,Di=am?am.toStringTag:void 0;function yP(e){var t=vP.call(e,Di),n=e[Di];try{e[Di]=void 0;var r=!0}catch{}var o=gP.call(e);return r&&(t?e[Di]=n:delete e[Di]),o}var wP=yP,xP=Object.prototype,bP=xP.toString;function EP(e){return bP.call(e)}var SP=EP,lm=Qd,_P=wP,kP=SP,NP="[object Null]",OP="[object Undefined]",sm=lm?lm.toStringTag:void 0;function TP(e){return e==null?e===void 0?OP:NP:sm&&sm in Object(e)?_P(e):kP(e)}var Js=TP;function CP(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Fw=CP,PP=Js,AP=Fw,jP="[object AsyncFunction]",RP="[object Function]",LP="[object GeneratorFunction]",MP="[object Proxy]";function DP(e){if(!AP(e))return!1;var t=PP(e);return t==RP||t==LP||t==jP||t==MP}var $w=DP,IP=nr,FP=IP["__core-js_shared__"],$P=FP,Wu=$P,um=function(){var e=/[^.]+$/.exec(Wu&&Wu.keys&&Wu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function BP(e){return!!um&&um in e}var zP=BP,qP=Function.prototype,UP=qP.toString;function HP(e){if(e!=null){try{return UP.call(e)}catch{}try{return e+""}catch{}}return""}var Bw=HP,VP=$w,WP=zP,KP=Fw,GP=Bw,YP=/[\\^$.*+?()[\]{}|]/g,QP=/^\[object .+?Constructor\]$/,XP=Function.prototype,ZP=Object.prototype,JP=XP.toString,eA=ZP.hasOwnProperty,tA=RegExp("^"+JP.call(eA).replace(YP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nA(e){if(!KP(e)||WP(e))return!1;var t=VP(e)?tA:QP;return t.test(GP(e))}var rA=nA;function oA(e,t){return e==null?void 0:e[t]}var iA=oA,aA=rA,lA=iA;function sA(e,t){var n=lA(e,t);return aA(n)?n:void 0}var vi=sA,uA=vi,cA=nr,fA=uA(cA,"Map"),Xd=fA,dA=vi,hA=dA(Object,"create"),eu=hA,cm=eu;function pA(){this.__data__=cm?cm(null):{},this.size=0}var mA=pA;function vA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gA=vA,yA=eu,wA="__lodash_hash_undefined__",xA=Object.prototype,bA=xA.hasOwnProperty;function EA(e){var t=this.__data__;if(yA){var n=t[e];return n===wA?void 0:n}return bA.call(t,e)?t[e]:void 0}var SA=EA,_A=eu,kA=Object.prototype,NA=kA.hasOwnProperty;function OA(e){var t=this.__data__;return _A?t[e]!==void 0:NA.call(t,e)}var TA=OA,CA=eu,PA="__lodash_hash_undefined__";function AA(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=CA&&t===void 0?PA:t,this}var jA=AA,RA=mA,LA=gA,MA=SA,DA=TA,IA=jA;function gi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}gi.prototype.clear=RA;gi.prototype.delete=LA;gi.prototype.get=MA;gi.prototype.has=DA;gi.prototype.set=IA;var FA=gi,fm=FA,$A=Zs,BA=Xd;function zA(){this.size=0,this.__data__={hash:new fm,map:new(BA||$A),string:new fm}}var qA=zA;function UA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var HA=UA,VA=HA;function WA(e,t){var n=e.__data__;return VA(t)?n[typeof t=="string"?"string":"hash"]:n.map}var tu=WA,KA=tu;function GA(e){var t=KA(this,e).delete(e);return this.size-=t?1:0,t}var YA=GA,QA=tu;function XA(e){return QA(this,e).get(e)}var ZA=XA,JA=tu;function ej(e){return JA(this,e).has(e)}var tj=ej,nj=tu;function rj(e,t){var n=nj(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var oj=rj,ij=qA,aj=YA,lj=ZA,sj=tj,uj=oj;function yi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}yi.prototype.clear=ij;yi.prototype.delete=aj;yi.prototype.get=lj;yi.prototype.has=sj;yi.prototype.set=uj;var zw=yi,cj=Zs,fj=Xd,dj=zw,hj=200;function pj(e,t){var n=this.__data__;if(n instanceof cj){var r=n.__data__;if(!fj||r.length<hj-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new dj(r)}return n.set(e,t),this.size=n.size,this}var mj=pj,vj=Zs,gj=rP,yj=iP,wj=lP,xj=uP,bj=mj;function wi(e){var t=this.__data__=new vj(e);this.size=t.size}wi.prototype.clear=gj;wi.prototype.delete=yj;wi.prototype.get=wj;wi.prototype.has=xj;wi.prototype.set=bj;var Ej=wi,Sj="__lodash_hash_undefined__";function _j(e){return this.__data__.set(e,Sj),this}var kj=_j;function Nj(e){return this.__data__.has(e)}var Oj=Nj,Tj=zw,Cj=kj,Pj=Oj;function ss(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Tj;++t<n;)this.add(e[t])}ss.prototype.add=ss.prototype.push=Cj;ss.prototype.has=Pj;var Aj=ss;function jj(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rj=jj;function Lj(e,t){return e.has(t)}var Mj=Lj,Dj=Aj,Ij=Rj,Fj=Mj,$j=1,Bj=2;function zj(e,t,n,r,o,i){var a=n&$j,l=e.length,s=t.length;if(l!=s&&!(a&&s>l))return!1;var m=i.get(e),v=i.get(t);if(m&&v)return m==t&&v==e;var f=-1,c=!0,u=n&Bj?new Dj:void 0;for(i.set(e,t),i.set(t,e);++f<l;){var x=e[f],h=t[f];if(r)var g=a?r(h,x,f,t,e,i):r(x,h,f,e,t,i);if(g!==void 0){if(g)continue;c=!1;break}if(u){if(!Ij(t,function(p,d){if(!Fj(u,d)&&(x===p||o(x,p,n,r,i)))return u.push(d)})){c=!1;break}}else if(!(x===h||o(x,h,n,r,i))){c=!1;break}}return i.delete(e),i.delete(t),c}var qw=zj,qj=nr,Uj=qj.Uint8Array,Hj=Uj;function Vj(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}var Wj=Vj;function Kj(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Gj=Kj,dm=Qd,hm=Hj,Yj=Mw,Qj=qw,Xj=Wj,Zj=Gj,Jj=1,eR=2,tR="[object Boolean]",nR="[object Date]",rR="[object Error]",oR="[object Map]",iR="[object Number]",aR="[object RegExp]",lR="[object Set]",sR="[object String]",uR="[object Symbol]",cR="[object ArrayBuffer]",fR="[object DataView]",pm=dm?dm.prototype:void 0,Ku=pm?pm.valueOf:void 0;function dR(e,t,n,r,o,i,a){switch(n){case fR:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case cR:return!(e.byteLength!=t.byteLength||!i(new hm(e),new hm(t)));case tR:case nR:case iR:return Yj(+e,+t);case rR:return e.name==t.name&&e.message==t.message;case aR:case sR:return e==t+"";case oR:var l=Xj;case lR:var s=r&Jj;if(l||(l=Zj),e.size!=t.size&&!s)return!1;var m=a.get(e);if(m)return m==t;r|=eR,a.set(e,t);var v=Qj(l(e),l(t),r,o,i,a);return a.delete(e),v;case uR:if(Ku)return Ku.call(e)==Ku.call(t)}return!1}var hR=dR;function pR(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var mR=pR,vR=Array.isArray,Zd=vR,gR=mR,yR=Zd;function wR(e,t,n){var r=t(e);return yR(e)?r:gR(r,n(e))}var xR=wR;function bR(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}var ER=bR;function SR(){return[]}var _R=SR,kR=ER,NR=_R,OR=Object.prototype,TR=OR.propertyIsEnumerable,mm=Object.getOwnPropertySymbols,CR=mm?function(e){return e==null?[]:(e=Object(e),kR(mm(e),function(t){return TR.call(e,t)}))}:NR,PR=CR;function AR(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var jR=AR;function RR(e){return e!=null&&typeof e=="object"}var nu=RR,LR=Js,MR=nu,DR="[object Arguments]";function IR(e){return MR(e)&&LR(e)==DR}var FR=IR,vm=FR,$R=nu,Uw=Object.prototype,BR=Uw.hasOwnProperty,zR=Uw.propertyIsEnumerable,qR=vm(function(){return arguments}())?vm:function(e){return $R(e)&&BR.call(e,"callee")&&!zR.call(e,"callee")},UR=qR,us={exports:{}};function HR(){return!1}var VR=HR;us.exports;(function(e,t){var n=nr,r=VR,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,l=a?n.Buffer:void 0,s=l?l.isBuffer:void 0,m=s||r;e.exports=m})(us,us.exports);var Hw=us.exports,WR=9007199254740991,KR=/^(?:0|[1-9]\d*)$/;function GR(e,t){var n=typeof e;return t=t??WR,!!t&&(n=="number"||n!="symbol"&&KR.test(e))&&e>-1&&e%1==0&&e<t}var YR=GR,QR=9007199254740991;function XR(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=QR}var Vw=XR,ZR=Js,JR=Vw,e4=nu,t4="[object Arguments]",n4="[object Array]",r4="[object Boolean]",o4="[object Date]",i4="[object Error]",a4="[object Function]",l4="[object Map]",s4="[object Number]",u4="[object Object]",c4="[object RegExp]",f4="[object Set]",d4="[object String]",h4="[object WeakMap]",p4="[object ArrayBuffer]",m4="[object DataView]",v4="[object Float32Array]",g4="[object Float64Array]",y4="[object Int8Array]",w4="[object Int16Array]",x4="[object Int32Array]",b4="[object Uint8Array]",E4="[object Uint8ClampedArray]",S4="[object Uint16Array]",_4="[object Uint32Array]",qe={};qe[v4]=qe[g4]=qe[y4]=qe[w4]=qe[x4]=qe[b4]=qe[E4]=qe[S4]=qe[_4]=!0;qe[t4]=qe[n4]=qe[p4]=qe[r4]=qe[m4]=qe[o4]=qe[i4]=qe[a4]=qe[l4]=qe[s4]=qe[u4]=qe[c4]=qe[f4]=qe[d4]=qe[h4]=!1;function k4(e){return e4(e)&&JR(e.length)&&!!qe[ZR(e)]}var N4=k4;function O4(e){return function(t){return e(t)}}var T4=O4,cs={exports:{}};cs.exports;(function(e,t){var n=Dw,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,l=function(){try{var s=o&&o.require&&o.require("util").types;return s||a&&a.binding&&a.binding("util")}catch{}}();e.exports=l})(cs,cs.exports);var C4=cs.exports,P4=N4,A4=T4,gm=C4,ym=gm&&gm.isTypedArray,j4=ym?A4(ym):P4,Ww=j4,R4=jR,L4=UR,M4=Zd,D4=Hw,I4=YR,F4=Ww,$4=Object.prototype,B4=$4.hasOwnProperty;function z4(e,t){var n=M4(e),r=!n&&L4(e),o=!n&&!r&&D4(e),i=!n&&!r&&!o&&F4(e),a=n||r||o||i,l=a?R4(e.length,String):[],s=l.length;for(var m in e)(t||B4.call(e,m))&&!(a&&(m=="length"||o&&(m=="offset"||m=="parent")||i&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||I4(m,s)))&&l.push(m);return l}var q4=z4,U4=Object.prototype;function H4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||U4;return e===n}var V4=H4;function W4(e,t){return function(n){return e(t(n))}}var K4=W4,G4=K4,Y4=G4(Object.keys,Object),Q4=Y4,X4=V4,Z4=Q4,J4=Object.prototype,e3=J4.hasOwnProperty;function t3(e){if(!X4(e))return Z4(e);var t=[];for(var n in Object(e))e3.call(e,n)&&n!="constructor"&&t.push(n);return t}var n3=t3,r3=$w,o3=Vw;function i3(e){return e!=null&&o3(e.length)&&!r3(e)}var a3=i3,l3=q4,s3=n3,u3=a3;function c3(e){return u3(e)?l3(e):s3(e)}var f3=c3,d3=xR,h3=PR,p3=f3;function m3(e){return d3(e,p3,h3)}var v3=m3,wm=v3,g3=1,y3=Object.prototype,w3=y3.hasOwnProperty;function x3(e,t,n,r,o,i){var a=n&g3,l=wm(e),s=l.length,m=wm(t),v=m.length;if(s!=v&&!a)return!1;for(var f=s;f--;){var c=l[f];if(!(a?c in t:w3.call(t,c)))return!1}var u=i.get(e),x=i.get(t);if(u&&x)return u==t&&x==e;var h=!0;i.set(e,t),i.set(t,e);for(var g=a;++f<s;){c=l[f];var p=e[c],d=t[c];if(r)var w=a?r(d,p,c,t,e,i):r(p,d,c,e,t,i);if(!(w===void 0?p===d||o(p,d,n,r,i):w)){h=!1;break}g||(g=c=="constructor")}if(h&&!g){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!(typeof y=="function"&&y instanceof y&&typeof b=="function"&&b instanceof b)&&(h=!1)}return i.delete(e),i.delete(t),h}var b3=x3,E3=vi,S3=nr,_3=E3(S3,"DataView"),k3=_3,N3=vi,O3=nr,T3=N3(O3,"Promise"),C3=T3,P3=vi,A3=nr,j3=P3(A3,"Set"),R3=j3,L3=vi,M3=nr,D3=L3(M3,"WeakMap"),I3=D3,pf=k3,mf=Xd,vf=C3,gf=R3,yf=I3,Kw=Js,xi=Bw,xm="[object Map]",F3="[object Object]",bm="[object Promise]",Em="[object Set]",Sm="[object WeakMap]",_m="[object DataView]",$3=xi(pf),B3=xi(mf),z3=xi(vf),q3=xi(gf),U3=xi(yf),qr=Kw;(pf&&qr(new pf(new ArrayBuffer(1)))!=_m||mf&&qr(new mf)!=xm||vf&&qr(vf.resolve())!=bm||gf&&qr(new gf)!=Em||yf&&qr(new yf)!=Sm)&&(qr=function(e){var t=Kw(e),n=t==F3?e.constructor:void 0,r=n?xi(n):"";if(r)switch(r){case $3:return _m;case B3:return xm;case z3:return bm;case q3:return Em;case U3:return Sm}return t});var H3=qr,Gu=Ej,V3=qw,W3=hR,K3=b3,km=H3,Nm=Zd,Om=Hw,G3=Ww,Y3=1,Tm="[object Arguments]",Cm="[object Array]",cl="[object Object]",Q3=Object.prototype,Pm=Q3.hasOwnProperty;function X3(e,t,n,r,o,i){var a=Nm(e),l=Nm(t),s=a?Cm:km(e),m=l?Cm:km(t);s=s==Tm?cl:s,m=m==Tm?cl:m;var v=s==cl,f=m==cl,c=s==m;if(c&&Om(e)){if(!Om(t))return!1;a=!0,v=!1}if(c&&!v)return i||(i=new Gu),a||G3(e)?V3(e,t,n,r,o,i):W3(e,t,s,n,r,o,i);if(!(n&Y3)){var u=v&&Pm.call(e,"__wrapped__"),x=f&&Pm.call(t,"__wrapped__");if(u||x){var h=u?e.value():e,g=x?t.value():t;return i||(i=new Gu),o(h,g,n,r,i)}}return c?(i||(i=new Gu),K3(e,t,n,r,o,i)):!1}var Z3=X3,J3=Z3,Am=nu;function Gw(e,t,n,r,o){return e===t?!0:e==null||t==null||!Am(e)&&!Am(t)?e!==e&&t!==t:J3(e,t,n,r,Gw,o)}var e5=Gw,t5=e5;function n5(e,t){return t5(e,t)}var r5=n5,Yw={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen * Copyright (c) 2013, salesforce.com */(function(e,t){(function(r,o){e.exports=o()})(typeof self<"u"?self:Mt,function(){return function(n){var r={};function o(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,o),a.l=!0,a.exports}return o.m=n,o.c=r,o.d=function(i,a,l){o.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:l})},o.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(a,"a",a),a},o.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},o.p="",o(o.s=109)}([function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(17),a=o(18),l=o(19),s=o(45),m=o(46),v=o(47),f=o(48),c=o(49),u=o(12),x=o(32),h=o(33),g=o(31),p=o(1),d={Scope:p.Scope,create:p.create,find:p.find,query:p.query,register:p.register,Container:i.default,Format:a.default,Leaf:l.default,Embed:f.default,Scroll:s.default,Block:v.default,Inline:m.default,Text:c.default,Attributor:{Attribute:u.default,Class:x.default,Style:h.default,Store:g.default}};r.default=d},function(n,r,o){var i=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var w in d)d.hasOwnProperty(w)&&(p[w]=d[w])};return function(p,d){g(p,d);function w(){this.constructor=p}p.prototype=d===null?Object.create(d):(w.prototype=d.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=function(g){i(p,g);function p(d){var w=this;return d="[Parchment] "+d,w=g.call(this,d)||this,w.message=d,w.name=w.constructor.name,w}return p}(Error);r.ParchmentError=a;var l={},s={},m={},v={};r.DATA_KEY="__blot";var f;(function(g){g[g.TYPE=3]="TYPE",g[g.LEVEL=12]="LEVEL",g[g.ATTRIBUTE=13]="ATTRIBUTE",g[g.BLOT=14]="BLOT",g[g.INLINE=7]="INLINE",g[g.BLOCK=11]="BLOCK",g[g.BLOCK_BLOT=10]="BLOCK_BLOT",g[g.INLINE_BLOT=6]="INLINE_BLOT",g[g.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",g[g.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",g[g.ANY=15]="ANY"})(f=r.Scope||(r.Scope={}));function c(g,p){var d=x(g);if(d==null)throw new a("Unable to create "+g+" blot");var w=d,y=g instanceof Node||g.nodeType===Node.TEXT_NODE?g:w.create(p);return new w(y,p)}r.create=c;function u(g,p){return p===void 0&&(p=!1),g==null?null:g[r.DATA_KEY]!=null?g[r.DATA_KEY].blot:p?u(g.parentNode,p):null}r.find=u;function x(g,p){p===void 0&&(p=f.ANY);var d;if(typeof g=="string")d=v[g]||l[g];else if(g instanceof Text||g.nodeType===Node.TEXT_NODE)d=v.text;else if(typeof g=="number")g&f.LEVEL&f.BLOCK?d=v.block:g&f.LEVEL&f.INLINE&&(d=v.inline);else if(g instanceof HTMLElement){var w=(g.getAttribute("class")||"").split(/\s+/);for(var y in w)if(d=s[w[y]],d)break;d=d||m[g.tagName]}return d==null?null:p&f.LEVEL&d.scope&&p&f.TYPE&d.scope?d:null}r.query=x;function h(){for(var g=[],p=0;p<arguments.length;p++)g[p]=arguments[p];if(g.length>1)return g.map(function(y){return h(y)});var d=g[0];if(typeof d.blotName!="string"&&typeof d.attrName!="string")throw new a("Invalid definition");if(d.blotName==="abstract")throw new a("Cannot register abstract class");if(v[d.blotName||d.attrName]=d,typeof d.keyName=="string")l[d.keyName]=d;else if(d.className!=null&&(s[d.className]=d),d.tagName!=null){Array.isArray(d.tagName)?d.tagName=d.tagName.map(function(y){return y.toUpperCase()}):d.tagName=d.tagName.toUpperCase();var w=Array.isArray(d.tagName)?d.tagName:[d.tagName];w.forEach(function(y){(m[y]==null||d.className==null)&&(m[y]=d)})}return d}r.register=h},function(n,r,o){var i=o(51),a=o(11),l=o(3),s=o(20),m="\0",v=function(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]};v.prototype.insert=function(f,c){var u={};return f.length===0?this:(u.insert=f,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(u.attributes=c),this.push(u))},v.prototype.delete=function(f){return f<=0?this:this.push({delete:f})},v.prototype.retain=function(f,c){if(f<=0)return this;var u={retain:f};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(u.attributes=c),this.push(u)},v.prototype.push=function(f){var c=this.ops.length,u=this.ops[c-1];if(f=l(!0,{},f),typeof u=="object"){if(typeof f.delete=="number"&&typeof u.delete=="number")return this.ops[c-1]={delete:u.delete+f.delete},this;if(typeof u.delete=="number"&&f.insert!=null&&(c-=1,u=this.ops[c-1],typeof u!="object"))return this.ops.unshift(f),this;if(a(f.attributes,u.attributes)){if(typeof f.insert=="string"&&typeof u.insert=="string")return this.ops[c-1]={insert:u.insert+f.insert},typeof f.attributes=="object"&&(this.ops[c-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof u.retain=="number")return this.ops[c-1]={retain:u.retain+f.retain},typeof f.attributes=="object"&&(this.ops[c-1].attributes=f.attributes),this}}return c===this.ops.length?this.ops.push(f):this.ops.splice(c,0,f),this},v.prototype.chop=function(){var f=this.ops[this.ops.length-1];return f&&f.retain&&!f.attributes&&this.ops.pop(),this},v.prototype.filter=function(f){return this.ops.filter(f)},v.prototype.forEach=function(f){this.ops.forEach(f)},v.prototype.map=function(f){return this.ops.map(f)},v.prototype.partition=function(f){var c=[],u=[];return this.forEach(function(x){var h=f(x)?c:u;h.push(x)}),[c,u]},v.prototype.reduce=function(f,c){return this.ops.reduce(f,c)},v.prototype.changeLength=function(){return this.reduce(function(f,c){return c.insert?f+s.length(c):c.delete?f-c.delete:f},0)},v.prototype.length=function(){return this.reduce(function(f,c){return f+s.length(c)},0)},v.prototype.slice=function(f,c){f=f||0,typeof c!="number"&&(c=1/0);for(var u=[],x=s.iterator(this.ops),h=0;h<c&&x.hasNext();){var g;h<f?g=x.next(f-h):(g=x.next(c-h),u.push(g)),h+=s.length(g)}return new v(u)},v.prototype.compose=function(f){var c=s.iterator(this.ops),u=s.iterator(f.ops),x=[],h=u.peek();if(h!=null&&typeof h.retain=="number"&&h.attributes==null){for(var g=h.retain;c.peekType()==="insert"&&c.peekLength()<=g;)g-=c.peekLength(),x.push(c.next());h.retain-g>0&&u.next(h.retain-g)}for(var p=new v(x);c.hasNext()||u.hasNext();)if(u.peekType()==="insert")p.push(u.next());else if(c.peekType()==="delete")p.push(c.next());else{var d=Math.min(c.peekLength(),u.peekLength()),w=c.next(d),y=u.next(d);if(typeof y.retain=="number"){var b={};typeof w.retain=="number"?b.retain=d:b.insert=w.insert;var T=s.attributes.compose(w.attributes,y.attributes,typeof w.retain=="number");if(T&&(b.attributes=T),p.push(b),!u.hasNext()&&a(p.ops[p.ops.length-1],b)){var S=new v(c.rest());return p.concat(S).chop()}}else typeof y.delete=="number"&&typeof w.retain=="number"&&p.push(y)}return p.chop()},v.prototype.concat=function(f){var c=new v(this.ops.slice());return f.ops.length>0&&(c.push(f.ops[0]),c.ops=c.ops.concat(f.ops.slice(1))),c},v.prototype.diff=function(f,c){if(this.ops===f.ops)return new v;var u=[this,f].map(function(d){return d.map(function(w){if(w.insert!=null)return typeof w.insert=="string"?w.insert:m;var y=d===f?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),x=new v,h=i(u[0],u[1],c),g=s.iterator(this.ops),p=s.iterator(f.ops);return h.forEach(function(d){for(var w=d[1].length;w>0;){var y=0;switch(d[0]){case i.INSERT:y=Math.min(p.peekLength(),w),x.push(p.next(y));break;case i.DELETE:y=Math.min(w,g.peekLength()),g.next(y),x.delete(y);break;case i.EQUAL:y=Math.min(g.peekLength(),p.peekLength(),w);var b=g.next(y),T=p.next(y);a(b.insert,T.insert)?x.retain(y,s.attributes.diff(b.attributes,T.attributes)):x.push(T).delete(y);break}w-=y}}),x.chop()},v.prototype.eachLine=function(f,c){c=c||` `;for(var u=s.iterator(this.ops),x=new v,h=0;u.hasNext();){if(u.peekType()!=="insert")return;var g=u.peek(),p=s.length(g)-u.peekLength(),d=typeof g.insert=="string"?g.insert.indexOf(c,p)-p:-1;if(d<0)x.push(u.next());else if(d>0)x.push(u.next(d));else{if(f(x,u.next(1).attributes||{},h)===!1)return;h+=1,x=new v}}x.length()>0&&f(x,{},h)},v.prototype.transform=function(f,c){if(c=!!c,typeof f=="number")return this.transformPosition(f,c);for(var u=s.iterator(this.ops),x=s.iterator(f.ops),h=new v;u.hasNext()||x.hasNext();)if(u.peekType()==="insert"&&(c||x.peekType()!=="insert"))h.retain(s.length(u.next()));else if(x.peekType()==="insert")h.push(x.next());else{var g=Math.min(u.peekLength(),x.peekLength()),p=u.next(g),d=x.next(g);if(p.delete)continue;d.delete?h.push(d):h.retain(g,s.attributes.transform(p.attributes,d.attributes,c))}return h.chop()},v.prototype.transformPosition=function(f,c){c=!!c;for(var u=s.iterator(this.ops),x=0;u.hasNext()&&x<=f;){var h=u.peekLength(),g=u.peekType();if(u.next(),g==="delete"){f-=Math.min(h,f-x);continue}else g==="insert"&&(x<f||!c)&&(f+=h);x+=h}return f},n.exports=v},function(n,r){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):i.call(u)==="[object Array]"},m=function(u){if(!u||i.call(u)!=="[object Object]")return!1;var x=o.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&o.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!x&&!h)return!1;var g;for(g in u);return typeof g>"u"||o.call(u,g)},v=function(u,x){a&&x.name==="__proto__"?a(u,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):u[x.name]=x.newValue},f=function(u,x){if(x==="__proto__")if(o.call(u,x)){if(l)return l(u,x).value}else return;return u[x]};n.exports=function c(){var u,x,h,g,p,d,w=arguments[0],y=1,b=arguments.length,T=!1;for(typeof w=="boolean"&&(T=w,w=arguments[1]||{},y=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});y<b;++y)if(u=arguments[y],u!=null)for(x in u)h=f(w,x),g=f(u,x),w!==g&&(T&&g&&(m(g)||(p=s(g)))?(p?(p=!1,d=h&&s(h)?h:[]):d=h&&m(h)?h:{},v(w,{name:x,newValue:c(T,d,g)})):typeof g<"u"&&v(w,{name:x,newValue:g}));return w}},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var i=function(){function _(O,j){for(var R=0;R<j.length;R++){var F=j[R];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(O,F.key,F)}}return function(O,j,R){return j&&_(O.prototype,j),R&&_(O,R),O}}(),a=function _(O,j,R){O===null&&(O=Function.prototype);var F=Object.getOwnPropertyDescriptor(O,j);if(F===void 0){var q=Object.getPrototypeOf(O);return q===null?void 0:_(q,j,R)}else{if("value"in F)return F.value;var V=F.get;return V===void 0?void 0:V.call(R)}},l=o(3),s=w(l),m=o(2),v=w(m),f=o(0),c=w(f),u=o(16),x=w(u),h=o(6),g=w(h),p=o(7),d=w(p);function w(_){return _&&_.__esModule?_:{default:_}}function y(_,O){if(!(_ instanceof O))throw new TypeError("Cannot call a class as a function")}function b(_,O){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:_}function T(_,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);_.prototype=Object.create(O&&O.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(_,O):_.__proto__=O)}var S=1,C=function(_){T(O,_);function O(){return y(this,O),b(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return i(O,[{key:"attach",value:function(){a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"attach",this).call(this),this.attributes=new c.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new v.default().insert(this.value(),(0,s.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(R,F){var q=c.default.query(R,c.default.Scope.BLOCK_ATTRIBUTE);q!=null&&this.attributes.attribute(q,F)}},{key:"formatAt",value:function(R,F,q,V){this.format(q,V)}},{key:"insertAt",value:function(R,F,q){if(typeof F=="string"&&F.endsWith(` `)){var V=c.default.create(P.blotName);this.parent.insertBefore(V,R===0?this:this.next),V.insertAt(0,F.slice(0,-1))}else a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertAt",this).call(this,R,F,q)}}]),O}(c.default.Embed);C.scope=c.default.Scope.BLOCK_BLOT;var P=function(_){T(O,_);function O(j){y(this,O);var R=b(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,j));return R.cache={},R}return i(O,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(c.default.Leaf).reduce(function(R,F){return F.length()===0?R:R.insert(F.value(),k(F))},new v.default).insert(` `,k(this))),this.cache.delta}},{key:"deleteAt",value:function(R,F){a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"deleteAt",this).call(this,R,F),this.cache={}}},{key:"formatAt",value:function(R,F,q,V){F<=0||(c.default.query(q,c.default.Scope.BLOCK)?R+F===this.length()&&this.format(q,V):a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"formatAt",this).call(this,R,Math.min(F,this.length()-R-1),q,V),this.cache={})}},{key:"insertAt",value:function(R,F,q){if(q!=null)return a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertAt",this).call(this,R,F,q);if(F.length!==0){var V=F.split(` `),H=V.shift();H.length>0&&(R<this.length()-1||this.children.tail==null?a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertAt",this).call(this,Math.min(R,this.length()-1),H):this.children.tail.insertAt(this.children.tail.length(),H),this.cache={});var I=this;V.reduce(function(M,A){return I=I.split(M,!0),I.insertAt(0,A),A.length},R+H.length)}}},{key:"insertBefore",value:function(R,F){var q=this.children.head;a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertBefore",this).call(this,R,F),q instanceof x.default&&q.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"length",this).call(this)+S),this.cache.length}},{key:"moveChildren",value:function(R,F){a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"moveChildren",this).call(this,R,F),this.cache={}}},{key:"optimize",value:function(R){a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,R),this.cache={}}},{key:"path",value:function(R){return a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"path",this).call(this,R,!0)}},{key:"removeChild",value:function(R){a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"removeChild",this).call(this,R),this.cache={}}},{key:"split",value:function(R){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(F&&(R===0||R>=this.length()-S)){var q=this.clone();return R===0?(this.parent.insertBefore(q,this),this):(this.parent.insertBefore(q,this.next),q)}else{var V=a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"split",this).call(this,R,F);return this.cache={},V}}}]),O}(c.default.Block);P.blotName="block",P.tagName="P",P.defaultChild="break",P.allowedChildren=[g.default,c.default.Embed,d.default];function k(_){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return _==null||(typeof _.formats=="function"&&(O=(0,s.default)(O,_.formats())),_.parent==null||_.parent.blotName=="scroll"||_.parent.statics.scope!==_.statics.scope)?O:k(_.parent,O)}r.bubbleFormats=k,r.BlockEmbed=C,r.default=P},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},a=function(){function I(M,A){var L=[],$=!0,W=!1,K=void 0;try{for(var D=M[Symbol.iterator](),B;!($=(B=D.next()).done)&&(L.push(B.value),!(A&&L.length===A));$=!0);}catch(G){W=!0,K=G}finally{try{!$&&D.return&&D.return()}finally{if(W)throw K}}return L}return function(M,A){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return I(M,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function I(M,A){for(var L=0;L<A.length;L++){var $=A[L];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(M,$.key,$)}}return function(M,A,L){return A&&I(M.prototype,A),L&&I(M,L),M}}();o(50);var s=o(2),m=k(s),v=o(14),f=k(v),c=o(8),u=k(c),x=o(9),h=k(x),g=o(0),p=k(g),d=o(15),w=k(d),y=o(3),b=k(y),T=o(10),S=k(T),C=o(34),P=k(C);function k(I){return I&&I.__esModule?I:{default:I}}function _(I,M,A){return M in I?Object.defineProperty(I,M,{value:A,enumerable:!0,configurable:!0,writable:!0}):I[M]=A,I}function O(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}var j=(0,S.default)("quill"),R=function(){l(I,null,[{key:"debug",value:function(A){A===!0&&(A="log"),S.default.level(A)}},{key:"find",value:function(A){return A.__quill||p.default.find(A)}},{key:"import",value:function(A){return this.imports[A]==null&&j.error("Cannot import "+A+". Are you sure it was registered?"),this.imports[A]}},{key:"register",value:function(A,L){var $=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof A!="string"){var K=A.attrName||A.blotName;typeof K=="string"?this.register("formats/"+K,A,L):Object.keys(A).forEach(function(D){$.register(D,A[D],L)})}else this.imports[A]!=null&&!W&&j.warn("Overwriting "+A+" with",L),this.imports[A]=L,(A.startsWith("blots/")||A.startsWith("formats/"))&&L.blotName!=="abstract"?p.default.register(L):A.startsWith("modules")&&typeof L.register=="function"&&L.register()}}]);function I(M){var A=this,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(O(this,I),this.options=F(M,L),this.container=this.options.container,this.container==null)return j.error("Invalid Quill container",M);this.options.debug&&I.debug(this.options.debug);var $=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 u.default,this.scroll=p.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new f.default(this.scroll),this.selection=new w.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(u.default.events.EDITOR_CHANGE,function(K){K===u.default.events.TEXT_CHANGE&&A.root.classList.toggle("ql-blank",A.editor.isBlank())}),this.emitter.on(u.default.events.SCROLL_UPDATE,function(K,D){var B=A.selection.lastRange,G=B&&B.length===0?B.index:void 0;q.call(A,function(){return A.editor.update(null,D,G)},K)});var W=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+$+"<p><br></p></div>");this.setContents(W),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(I,[{key:"addContainer",value:function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof A=="string"){var $=A;A=document.createElement("div"),A.classList.add($)}return this.container.insertBefore(A,L),A}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(A,L,$){var W=this,K=V(A,L,$),D=a(K,4);return A=D[0],L=D[1],$=D[3],q.call(this,function(){return W.editor.deleteText(A,L)},$,A,-1*L)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(A),this.container.classList.toggle("ql-disabled",!A)}},{key:"focus",value:function(){var A=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=A,this.scrollIntoView()}},{key:"format",value:function(A,L){var $=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;return q.call(this,function(){var K=$.getSelection(!0),D=new m.default;if(K==null)return D;if(p.default.query(A,p.default.Scope.BLOCK))D=$.editor.formatLine(K.index,K.length,_({},A,L));else{if(K.length===0)return $.selection.format(A,L),D;D=$.editor.formatText(K.index,K.length,_({},A,L))}return $.setSelection(K,u.default.sources.SILENT),D},W)}},{key:"formatLine",value:function(A,L,$,W,K){var D=this,B=void 0,G=V(A,L,$,W,K),Y=a(G,4);return A=Y[0],L=Y[1],B=Y[2],K=Y[3],q.call(this,function(){return D.editor.formatLine(A,L,B)},K,A,0)}},{key:"formatText",value:function(A,L,$,W,K){var D=this,B=void 0,G=V(A,L,$,W,K),Y=a(G,4);return A=Y[0],L=Y[1],B=Y[2],K=Y[3],q.call(this,function(){return D.editor.formatText(A,L,B)},K,A,0)}},{key:"getBounds",value:function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=void 0;typeof A=="number"?$=this.selection.getBounds(A,L):$=this.selection.getBounds(A.index,A.length);var W=this.container.getBoundingClientRect();return{bottom:$.bottom-W.top,height:$.height,left:$.left-W.left,right:$.right-W.left,top:$.top-W.top,width:$.width}}},{key:"getContents",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,$=V(A,L),W=a($,2);return A=W[0],L=W[1],this.editor.getContents(A,L)}},{key:"getFormat",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof A=="number"?this.editor.getFormat(A,L):this.editor.getFormat(A.index,A.length)}},{key:"getIndex",value:function(A){return A.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(A){return this.scroll.leaf(A)}},{key:"getLine",value:function(A){return this.scroll.line(A)}},{key:"getLines",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof A!="number"?this.scroll.lines(A.index,A.length):this.scroll.lines(A,L)}},{key:"getModule",value:function(A){return this.theme.modules[A]}},{key:"getSelection",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return A&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-A,$=V(A,L),W=a($,2);return A=W[0],L=W[1],this.editor.getText(A,L)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(A,L,$){var W=this,K=arguments.length>3&&arguments[3]!==void 0?arguments[3]:I.sources.API;return q.call(this,function(){return W.editor.insertEmbed(A,L,$)},K,A)}},{key:"insertText",value:function(A,L,$,W,K){var D=this,B=void 0,G=V(A,0,$,W,K),Y=a(G,4);return A=Y[0],B=Y[2],K=Y[3],q.call(this,function(){return D.editor.insertText(A,L,B)},K,A,L.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(A,L,$){this.clipboard.dangerouslyPasteHTML(A,L,$)}},{key:"removeFormat",value:function(A,L,$){var W=this,K=V(A,L,$),D=a(K,4);return A=D[0],L=D[1],$=D[3],q.call(this,function(){return W.editor.removeFormat(A,L)},$,A)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(A){var L=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API;return q.call(this,function(){A=new m.default(A);var W=L.getLength(),K=L.editor.deleteText(0,W),D=L.editor.applyDelta(A),B=D.ops[D.ops.length-1];B!=null&&typeof B.insert=="string"&&B.insert[B.insert.length-1]===` `&&(L.editor.deleteText(L.getLength()-1,1),D.delete(1));var G=K.compose(D);return G},$)}},{key:"setSelection",value:function(A,L,$){if(A==null)this.selection.setRange(null,L||I.sources.API);else{var W=V(A,L,$),K=a(W,4);A=K[0],L=K[1],$=K[3],this.selection.setRange(new d.Range(A,L),$),$!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API,$=new m.default().insert(A);return this.setContents($,L)}},{key:"update",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u.default.sources.USER,L=this.scroll.update(A);return this.selection.update(A),L}},{key:"updateContents",value:function(A){var L=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API;return q.call(this,function(){return A=new m.default(A),L.editor.applyDelta(A,$)},$,!0)}}]),I}();R.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},R.events=u.default.events,R.sources=u.default.sources,R.version="1.3.7",R.imports={delta:m.default,parchment:p.default,"core/module":h.default,"core/theme":P.default};function F(I,M){if(M=(0,b.default)(!0,{container:I,modules:{clipboard:!0,keyboard:!0,history:!0}},M),!M.theme||M.theme===R.DEFAULTS.theme)M.theme=P.default;else if(M.theme=R.import("themes/"+M.theme),M.theme==null)throw new Error("Invalid theme "+M.theme+". Did you register it?");var A=(0,b.default)(!0,{},M.theme.DEFAULTS);[A,M].forEach(function(W){W.modules=W.modules||{},Object.keys(W.modules).forEach(function(K){W.modules[K]===!0&&(W.modules[K]={})})});var L=Object.keys(A.modules).concat(Object.keys(M.modules)),$=L.reduce(function(W,K){var D=R.import("modules/"+K);return D==null?j.error("Cannot load "+K+" module. Are you sure you registered it?"):W[K]=D.DEFAULTS||{},W},{});return M.modules!=null&&M.modules.toolbar&&M.modules.toolbar.constructor!==Object&&(M.modules.toolbar={container:M.modules.toolbar}),M=(0,b.default)(!0,{},R.DEFAULTS,{modules:$},A,M),["bounds","container","scrollingContainer"].forEach(function(W){typeof M[W]=="string"&&(M[W]=document.querySelector(M[W]))}),M.modules=Object.keys(M.modules).reduce(function(W,K){return M.modules[K]&&(W[K]=M.modules[K]),W},{}),M}function q(I,M,A,L){if(this.options.strict&&!this.isEnabled()&&M===u.default.sources.USER)return new m.default;var $=A==null?null:this.getSelection(),W=this.editor.delta,K=I();if($!=null&&(A===!0&&(A=$.index),L==null?$=H($,K,M):L!==0&&($=H($,A,L,M)),this.setSelection($,u.default.sources.SILENT)),K.length()>0){var D,B=[u.default.events.TEXT_CHANGE,K,W,M];if((D=this.emitter).emit.apply(D,[u.default.events.EDITOR_CHANGE].concat(B)),M!==u.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,B)}}return K}function V(I,M,A,L,$){var W={};return typeof I.index=="number"&&typeof I.length=="number"?typeof M!="number"?($=L,L=A,A=M,M=I.length,I=I.index):(M=I.length,I=I.index):typeof M!="number"&&($=L,L=A,A=M,M=0),(typeof A>"u"?"undefined":i(A))==="object"?(W=A,$=L):typeof A=="string"&&(L!=null?W[A]=L:$=A),$=$||u.default.sources.API,[I,M,W,$]}function H(I,M,A,L){if(I==null)return null;var $=void 0,W=void 0;if(M instanceof m.default){var K=[I.index,I.index+I.length].map(function(Y){return M.transformPosition(Y,L!==u.default.sources.USER)}),D=a(K,2);$=D[0],W=D[1]}else{var B=[I.index,I.index+I.length].map(function(Y){return Y<M||Y===M&&L===u.default.sources.USER?Y:A>=0?Y+A:Math.max(M,Y+A)}),G=a(B,2);$=G[0],W=G[1]}return new d.Range($,W-$)}r.expandConfig=F,r.overload=V,r.default=R},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function g(p,d){for(var w=0;w<d.length;w++){var y=d[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return function(p,d,w){return d&&g(p.prototype,d),w&&g(p,w),p}}(),a=function g(p,d,w){p===null&&(p=Function.prototype);var y=Object.getOwnPropertyDescriptor(p,d);if(y===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:g(b,d,w)}else{if("value"in y)return y.value;var T=y.get;return T===void 0?void 0:T.call(w)}},l=o(7),s=f(l),m=o(0),v=f(m);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function u(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function x(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var h=function(g){x(p,g);function p(){return c(this,p),u(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return i(p,[{key:"formatAt",value:function(w,y,b,T){if(p.compare(this.statics.blotName,b)<0&&v.default.query(b,v.default.Scope.BLOT)){var S=this.isolate(w,y);T&&S.wrap(b,T)}else a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"formatAt",this).call(this,w,y,b,T)}},{key:"optimize",value:function(w){if(a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,w),this.parent instanceof p&&p.compare(this.statics.blotName,this.parent.statics.blotName)>0){var y=this.parent.isolate(this.offset(),this.length());this.moveChildren(y),y.wrap(this)}}}],[{key:"compare",value:function(w,y){var b=p.order.indexOf(w),T=p.order.indexOf(y);return b>=0||T>=0?b-T:w===y?0:w<y?-1:1}}]),p}(v.default.Inline);h.allowedChildren=[h,v.default.Embed,s.default],h.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(0),a=l(i);function l(c){return c&&c.__esModule?c:{default:c}}function s(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function m(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function v(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var f=function(c){v(u,c);function u(){return s(this,u),m(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(a.default.Text);r.default=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function d(w,y){for(var b=0;b<y.length;b++){var T=y[b];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(w,T.key,T)}}return function(w,y,b){return y&&d(w.prototype,y),b&&d(w,b),w}}(),a=function d(w,y,b){w===null&&(w=Function.prototype);var T=Object.getOwnPropertyDescriptor(w,y);if(T===void 0){var S=Object.getPrototypeOf(w);return S===null?void 0:d(S,y,b)}else{if("value"in T)return T.value;var C=T.get;return C===void 0?void 0:C.call(b)}},l=o(54),s=f(l),m=o(10),v=f(m);function f(d){return d&&d.__esModule?d:{default:d}}function c(d,w){if(!(d instanceof w))throw new TypeError("Cannot call a class as a function")}function u(d,w){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:d}function x(d,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);d.prototype=Object.create(w&&w.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(d,w):d.__proto__=w)}var h=(0,v.default)("quill:events"),g=["selectionchange","mousedown","mouseup","click"];g.forEach(function(d){document.addEventListener(d,function(){for(var w=arguments.length,y=Array(w),b=0;b<w;b++)y[b]=arguments[b];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(T){if(T.__quill&&T.__quill.emitter){var S;(S=T.__quill.emitter).handleDOM.apply(S,y)}})})});var p=function(d){x(w,d);function w(){c(this,w);var y=u(this,(w.__proto__||Object.getPrototypeOf(w)).call(this));return y.listeners={},y.on("error",h.error),y}return i(w,[{key:"emit",value:function(){h.log.apply(h,arguments),a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(b){for(var T=arguments.length,S=Array(T>1?T-1:0),C=1;C<T;C++)S[C-1]=arguments[C];(this.listeners[b.type]||[]).forEach(function(P){var k=P.node,_=P.handler;(b.target===k||k.contains(b.target))&&_.apply(void 0,[b].concat(S))})}},{key:"listenDOM",value:function(b,T,S){this.listeners[b]||(this.listeners[b]=[]),this.listeners[b].push({node:T,handler:S})}}]),w}(s.default);p.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"},p.sources={API:"api",SILENT:"silent",USER:"user"},r.default=p},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});function i(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}var a=function l(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,l),this.quill=s,this.options=m};a.DEFAULTS={},r.default=a},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=["error","warn","log","info"],a="warn";function l(m){if(i.indexOf(m)<=i.indexOf(a)){for(var v,f=arguments.length,c=Array(f>1?f-1:0),u=1;u<f;u++)c[u-1]=arguments[u];(v=console)[m].apply(v,c)}}function s(m){return i.reduce(function(v,f){return v[f]=l.bind(console,f,m),v},{})}l.level=s.level=function(m){a=m},r.default=s},function(n,r,o){var i=Array.prototype.slice,a=o(52),l=o(53),s=n.exports=function(c,u,x){return x||(x={}),c===u?!0:c instanceof Date&&u instanceof Date?c.getTime()===u.getTime():!c||!u||typeof c!="object"&&typeof u!="object"?x.strict?c===u:c==u:f(c,u,x)};function m(c){return c==null}function v(c){return!(!c||typeof c!="object"||typeof c.length!="number"||typeof c.copy!="function"||typeof c.slice!="function"||c.length>0&&typeof c[0]!="number")}function f(c,u,x){var h,g;if(m(c)||m(u)||c.prototype!==u.prototype)return!1;if(l(c))return l(u)?(c=i.call(c),u=i.call(u),s(c,u,x)):!1;if(v(c)){if(!v(u)||c.length!==u.length)return!1;for(h=0;h<c.length;h++)if(c[h]!==u[h])return!1;return!0}try{var p=a(c),d=a(u)}catch{return!1}if(p.length!=d.length)return!1;for(p.sort(),d.sort(),h=p.length-1;h>=0;h--)if(p[h]!=d[h])return!1;for(h=p.length-1;h>=0;h--)if(g=p[h],!s(c[g],u[g],x))return!1;return typeof c==typeof u}},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(1),a=function(){function l(s,m,v){v===void 0&&(v={}),this.attrName=s,this.keyName=m;var f=i.Scope.TYPE&i.Scope.ATTRIBUTE;v.scope!=null?this.scope=v.scope&i.Scope.LEVEL|f:this.scope=i.Scope.ATTRIBUTE,v.whitelist!=null&&(this.whitelist=v.whitelist)}return l.keys=function(s){return[].map.call(s.attributes,function(m){return m.name})},l.prototype.add=function(s,m){return this.canAdd(s,m)?(s.setAttribute(this.keyName,m),!0):!1},l.prototype.canAdd=function(s,m){var v=i.query(s,i.Scope.BLOT&(this.scope|i.Scope.TYPE));return v==null?!1:this.whitelist==null?!0:typeof m=="string"?this.whitelist.indexOf(m.replace(/["']/g,""))>-1:this.whitelist.indexOf(m)>-1},l.prototype.remove=function(s){s.removeAttribute(this.keyName)},l.prototype.value=function(s){var m=s.getAttribute(this.keyName);return this.canAdd(s,m)&&m?m:""},l}();r.default=a},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var i=function(){function C(P,k){var _=[],O=!0,j=!1,R=void 0;try{for(var F=P[Symbol.iterator](),q;!(O=(q=F.next()).done)&&(_.push(q.value),!(k&&_.length===k));O=!0);}catch(V){j=!0,R=V}finally{try{!O&&F.return&&F.return()}finally{if(j)throw R}}return _}return function(P,k){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return C(P,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function C(P,k){for(var _=0;_<k.length;_++){var O=k[_];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(P,O.key,O)}}return function(P,k,_){return k&&C(P.prototype,k),_&&C(P,_),P}}(),l=function C(P,k,_){P===null&&(P=Function.prototype);var O=Object.getOwnPropertyDescriptor(P,k);if(O===void 0){var j=Object.getPrototypeOf(P);return j===null?void 0:C(j,k,_)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(_)}},s=o(2),m=d(s),v=o(0),f=d(v),c=o(4),u=d(c),x=o(6),h=d(x),g=o(7),p=d(g);function d(C){return C&&C.__esModule?C:{default:C}}function w(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function y(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function b(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var T=function(C){b(P,C);function P(){return w(this,P),y(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return P}(h.default);T.blotName="code",T.tagName="CODE";var S=function(C){b(P,C);function P(){return w(this,P),y(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return a(P,[{key:"delta",value:function(){var _=this,O=this.domNode.textContent;return O.endsWith(` `)&&(O=O.slice(0,-1)),O.split(` `).reduce(function(j,R){return j.insert(R).insert(` `,_.formats())},new m.default)}},{key:"format",value:function(_,O){if(!(_===this.statics.blotName&&O)){var j=this.descendant(p.default,this.length()-1),R=i(j,1),F=R[0];F!=null&&F.deleteAt(F.length()-1,1),l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"format",this).call(this,_,O)}}},{key:"formatAt",value:function(_,O,j,R){if(O!==0&&!(f.default.query(j,f.default.Scope.BLOCK)==null||j===this.statics.blotName&&R===this.statics.formats(this.domNode))){var F=this.newlineIndex(_);if(!(F<0||F>=_+O)){var q=this.newlineIndex(_,!0)+1,V=F-q+1,H=this.isolate(q,V),I=H.next;H.format(j,R),I instanceof P&&I.formatAt(0,_-q+O-V,j,R)}}}},{key:"insertAt",value:function(_,O,j){if(j==null){var R=this.descendant(p.default,_),F=i(R,2),q=F[0],V=F[1];q.insertAt(V,O)}}},{key:"length",value:function(){var _=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` `)?_:_+1}},{key:"newlineIndex",value:function(_){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(O)return this.domNode.textContent.slice(0,_).lastIndexOf(` `);var j=this.domNode.textContent.slice(_).indexOf(` `);return j>-1?_+j:-1}},{key:"optimize",value:function(_){this.domNode.textContent.endsWith(` `)||this.appendChild(f.default.create("text",` `)),l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,_);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===O.statics.formats(O.domNode)&&(O.optimize(_),O.moveChildren(this),O.remove())}},{key:"replace",value:function(_){l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"replace",this).call(this,_),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(O){var j=f.default.find(O);j==null?O.parentNode.removeChild(O):j instanceof f.default.Embed?j.remove():j.unwrap()})}}],[{key:"create",value:function(_){var O=l(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,_);return O.setAttribute("spellcheck",!1),O}},{key:"formats",value:function(){return!0}}]),P}(u.default);S.blotName="code-block",S.tagName="PRE",S.TAB=" ",r.Code=T,r.default=S},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},a=function(){function I(M,A){var L=[],$=!0,W=!1,K=void 0;try{for(var D=M[Symbol.iterator](),B;!($=(B=D.next()).done)&&(L.push(B.value),!(A&&L.length===A));$=!0);}catch(G){W=!0,K=G}finally{try{!$&&D.return&&D.return()}finally{if(W)throw K}}return L}return function(M,A){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return I(M,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function I(M,A){for(var L=0;L<A.length;L++){var $=A[L];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(M,$.key,$)}}return function(M,A,L){return A&&I(M.prototype,A),L&&I(M,L),M}}(),s=o(2),m=O(s),v=o(20),f=O(v),c=o(0),u=O(c),x=o(13),h=O(x),g=o(24),p=O(g),d=o(4),w=O(d),y=o(16),b=O(y),T=o(21),S=O(T),C=o(11),P=O(C),k=o(3),_=O(k);function O(I){return I&&I.__esModule?I:{default:I}}function j(I,M,A){return M in I?Object.defineProperty(I,M,{value:A,enumerable:!0,configurable:!0,writable:!0}):I[M]=A,I}function R(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}var F=/^[ -~]*$/,q=function(){function I(M){R(this,I),this.scroll=M,this.delta=this.getDelta()}return l(I,[{key:"applyDelta",value:function(A){var L=this,$=!1;this.scroll.update();var W=this.scroll.length();return this.scroll.batchStart(),A=H(A),A.reduce(function(K,D){var B=D.retain||D.delete||D.insert.length||1,G=D.attributes||{};if(D.insert!=null){if(typeof D.insert=="string"){var Y=D.insert;Y.endsWith(` `)&&$&&($=!1,Y=Y.slice(0,-1)),K>=W&&!Y.endsWith(` `)&&($=!0),L.scroll.insertAt(K,Y);var Q=L.scroll.line(K),te=a(Q,2),le=te[0],ce=te[1],pe=(0,_.default)({},(0,d.bubbleFormats)(le));if(le instanceof w.default){var ge=le.descendant(u.default.Leaf,ce),Ae=a(ge,1),Oe=Ae[0];pe=(0,_.default)(pe,(0,d.bubbleFormats)(Oe))}G=f.default.attributes.diff(pe,G)||{}}else if(i(D.insert)==="object"){var Z=Object.keys(D.insert)[0];if(Z==null)return K;L.scroll.insertAt(K,Z,D.insert[Z])}W+=B}return Object.keys(G).forEach(function(J){L.scroll.formatAt(K,B,J,G[J])}),K+B},0),A.reduce(function(K,D){return typeof D.delete=="number"?(L.scroll.deleteAt(K,D.delete),K):K+(D.retain||D.insert.length||1)},0),this.scroll.batchEnd(),this.update(A)}},{key:"deleteText",value:function(A,L){return this.scroll.deleteAt(A,L),this.update(new m.default().retain(A).delete(L))}},{key:"formatLine",value:function(A,L){var $=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(W).forEach(function(K){if(!($.scroll.whitelist!=null&&!$.scroll.whitelist[K])){var D=$.scroll.lines(A,Math.max(L,1)),B=L;D.forEach(function(G){var Y=G.length();if(!(G instanceof h.default))G.format(K,W[K]);else{var Q=A-G.offset($.scroll),te=G.newlineIndex(Q+B)-Q+1;G.formatAt(Q,te,K,W[K])}B-=Y})}}),this.scroll.optimize(),this.update(new m.default().retain(A).retain(L,(0,S.default)(W)))}},{key:"formatText",value:function(A,L){var $=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(W).forEach(function(K){$.scroll.formatAt(A,L,K,W[K])}),this.update(new m.default().retain(A).retain(L,(0,S.default)(W)))}},{key:"getContents",value:function(A,L){return this.delta.slice(A,A+L)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(A,L){return A.concat(L.delta())},new m.default)}},{key:"getFormat",value:function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=[],W=[];L===0?this.scroll.path(A).forEach(function(D){var B=a(D,1),G=B[0];G instanceof w.default?$.push(G):G instanceof u.default.Leaf&&W.push(G)}):($=this.scroll.lines(A,L),W=this.scroll.descendants(u.default.Leaf,A,L));var K=[$,W].map(function(D){if(D.length===0)return{};for(var B=(0,d.bubbleFormats)(D.shift());Object.keys(B).length>0;){var G=D.shift();if(G==null)return B;B=V((0,d.bubbleFormats)(G),B)}return B});return _.default.apply(_.default,K)}},{key:"getText",value:function(A,L){return this.getContents(A,L).filter(function($){return typeof $.insert=="string"}).map(function($){return $.insert}).join("")}},{key:"insertEmbed",value:function(A,L,$){return this.scroll.insertAt(A,L,$),this.update(new m.default().retain(A).insert(j({},L,$)))}},{key:"insertText",value:function(A,L){var $=this,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L=L.replace(/\r\n/g,` `).replace(/\r/g,` `),this.scroll.insertAt(A,L),Object.keys(W).forEach(function(K){$.scroll.formatAt(A,L.length,K,W[K])}),this.update(new m.default().retain(A).insert(L,(0,S.default)(W)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var A=this.scroll.children.head;return A.statics.blotName!==w.default.blotName||A.children.length>1?!1:A.children.head instanceof b.default}},{key:"removeFormat",value:function(A,L){var $=this.getText(A,L),W=this.scroll.line(A+L),K=a(W,2),D=K[0],B=K[1],G=0,Y=new m.default;D!=null&&(D instanceof h.default?G=D.newlineIndex(B)-B+1:G=D.length()-B,Y=D.delta().slice(B,B+G-1).insert(` `));var Q=this.getContents(A,L+G),te=Q.diff(new m.default().insert($).concat(Y)),le=new m.default().retain(A).concat(te);return this.applyDelta(le)}},{key:"update",value:function(A){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,W=this.delta;if(L.length===1&&L[0].type==="characterData"&&L[0].target.data.match(F)&&u.default.find(L[0].target)){var K=u.default.find(L[0].target),D=(0,d.bubbleFormats)(K),B=K.offset(this.scroll),G=L[0].oldValue.replace(p.default.CONTENTS,""),Y=new m.default().insert(G),Q=new m.default().insert(K.value()),te=new m.default().retain(B).concat(Y.diff(Q,$));A=te.reduce(function(le,ce){return ce.insert?le.insert(ce.insert,D):le.push(ce)},new m.default),this.delta=W.compose(A)}else this.delta=this.getDelta(),(!A||!(0,P.default)(W.compose(A),this.delta))&&(A=W.diff(this.delta,$));return A}}]),I}();function V(I,M){return Object.keys(M).reduce(function(A,L){return I[L]==null||(M[L]===I[L]?A[L]=M[L]:Array.isArray(M[L])?M[L].indexOf(I[L])<0&&(A[L]=M[L].concat([I[L]])):A[L]=[M[L],I[L]]),A},{})}function H(I){return I.reduce(function(M,A){if(A.insert===1){var L=(0,S.default)(A.attributes);return delete L.image,M.insert({image:A.attributes.image},L)}if(A.attributes!=null&&(A.attributes.list===!0||A.attributes.bullet===!0)&&(A=(0,S.default)(A),A.attributes.list?A.attributes.list="ordered":(A.attributes.list="bullet",delete A.attributes.bullet)),typeof A.insert=="string"){var $=A.insert.replace(/\r\n/g,` `).replace(/\r/g,` `);return M.insert($,A.attributes)}return M.push(A)},new m.default)}r.default=q},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var i=function(){function C(P,k){var _=[],O=!0,j=!1,R=void 0;try{for(var F=P[Symbol.iterator](),q;!(O=(q=F.next()).done)&&(_.push(q.value),!(k&&_.length===k));O=!0);}catch(V){j=!0,R=V}finally{try{!O&&F.return&&F.return()}finally{if(j)throw R}}return _}return function(P,k){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return C(P,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function C(P,k){for(var _=0;_<k.length;_++){var O=k[_];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(P,O.key,O)}}return function(P,k,_){return k&&C(P.prototype,k),_&&C(P,_),P}}(),l=o(0),s=p(l),m=o(21),v=p(m),f=o(11),c=p(f),u=o(8),x=p(u),h=o(10),g=p(h);function p(C){return C&&C.__esModule?C:{default:C}}function d(C){if(Array.isArray(C)){for(var P=0,k=Array(C.length);P<C.length;P++)k[P]=C[P];return k}else return Array.from(C)}function w(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}var y=(0,g.default)("quill:selection"),b=function C(P){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;w(this,C),this.index=P,this.length=k},T=function(){function C(P,k){var _=this;w(this,C),this.emitter=k,this.scroll=P,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=s.default.create("cursor",this),this.lastRange=this.savedRange=new b(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){_.mouseDown||setTimeout(_.update.bind(_,x.default.sources.USER),1)}),this.emitter.on(x.default.events.EDITOR_CHANGE,function(O,j){O===x.default.events.TEXT_CHANGE&&j.length()>0&&_.update(x.default.sources.SILENT)}),this.emitter.on(x.default.events.SCROLL_BEFORE_UPDATE,function(){if(_.hasFocus()){var O=_.getNativeRange();O!=null&&O.start.node!==_.cursor.textNode&&_.emitter.once(x.default.events.SCROLL_UPDATE,function(){try{_.setNativeRange(O.start.node,O.start.offset,O.end.node,O.end.offset)}catch{}})}}),this.emitter.on(x.default.events.SCROLL_OPTIMIZE,function(O,j){if(j.range){var R=j.range,F=R.startNode,q=R.startOffset,V=R.endNode,H=R.endOffset;_.setNativeRange(F,q,V,H)}}),this.update(x.default.sources.SILENT)}return a(C,[{key:"handleComposition",value:function(){var k=this;this.root.addEventListener("compositionstart",function(){k.composing=!0}),this.root.addEventListener("compositionend",function(){if(k.composing=!1,k.cursor.parent){var _=k.cursor.restore();if(!_)return;setTimeout(function(){k.setNativeRange(_.startNode,_.startOffset,_.endNode,_.endOffset)},1)}})}},{key:"handleDragging",value:function(){var k=this;this.emitter.listenDOM("mousedown",document.body,function(){k.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){k.mouseDown=!1,k.update(x.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(k,_){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[k])){this.scroll.update();var O=this.getNativeRange();if(!(O==null||!O.native.collapsed||s.default.query(k,s.default.Scope.BLOCK))){if(O.start.node!==this.cursor.textNode){var j=s.default.find(O.start.node,!1);if(j==null)return;if(j instanceof s.default.Leaf){var R=j.split(O.start.offset);j.parent.insertBefore(this.cursor,R)}else j.insertBefore(this.cursor,O.start.node);this.cursor.attach()}this.cursor.format(k,_),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(k){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,O=this.scroll.length();k=Math.min(k,O-1),_=Math.min(k+_,O-1)-k;var j=void 0,R=this.scroll.leaf(k),F=i(R,2),q=F[0],V=F[1];if(q==null)return null;var H=q.position(V,!0),I=i(H,2);j=I[0],V=I[1];var M=document.createRange();if(_>0){M.setStart(j,V);var A=this.scroll.leaf(k+_),L=i(A,2);if(q=L[0],V=L[1],q==null)return null;var $=q.position(V,!0),W=i($,2);return j=W[0],V=W[1],M.setEnd(j,V),M.getBoundingClientRect()}else{var K="left",D=void 0;return j instanceof Text?(V<j.data.length?(M.setStart(j,V),M.setEnd(j,V+1)):(M.setStart(j,V-1),M.setEnd(j,V),K="right"),D=M.getBoundingClientRect()):(D=q.domNode.getBoundingClientRect(),V>0&&(K="right")),{bottom:D.top+D.height,height:D.height,left:D[K],right:D[K],top:D.top,width:0}}}},{key:"getNativeRange",value:function(){var k=document.getSelection();if(k==null||k.rangeCount<=0)return null;var _=k.getRangeAt(0);if(_==null)return null;var O=this.normalizeNative(_);return y.info("getNativeRange",O),O}},{key:"getRange",value:function(){var k=this.getNativeRange();if(k==null)return[null,null];var _=this.normalizedToRange(k);return[_,k]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(k){var _=this,O=[[k.start.node,k.start.offset]];k.native.collapsed||O.push([k.end.node,k.end.offset]);var j=O.map(function(q){var V=i(q,2),H=V[0],I=V[1],M=s.default.find(H,!0),A=M.offset(_.scroll);return I===0?A:M instanceof s.default.Container?A+M.length():A+M.index(H,I)}),R=Math.min(Math.max.apply(Math,d(j)),this.scroll.length()-1),F=Math.min.apply(Math,[R].concat(d(j)));return new b(F,R-F)}},{key:"normalizeNative",value:function(k){if(!S(this.root,k.startContainer)||!k.collapsed&&!S(this.root,k.endContainer))return null;var _={start:{node:k.startContainer,offset:k.startOffset},end:{node:k.endContainer,offset:k.endOffset},native:k};return[_.start,_.end].forEach(function(O){for(var j=O.node,R=O.offset;!(j instanceof Text)&&j.childNodes.length>0;)if(j.childNodes.length>R)j=j.childNodes[R],R=0;else if(j.childNodes.length===R)j=j.lastChild,R=j instanceof Text?j.data.length:j.childNodes.length+1;else break;O.node=j,O.offset=R}),_}},{key:"rangeToNative",value:function(k){var _=this,O=k.collapsed?[k.index]:[k.index,k.index+k.length],j=[],R=this.scroll.length();return O.forEach(function(F,q){F=Math.min(R-1,F);var V=void 0,H=_.scroll.leaf(F),I=i(H,2),M=I[0],A=I[1],L=M.position(A,q!==0),$=i(L,2);V=$[0],A=$[1],j.push(V,A)}),j.length<2&&(j=j.concat(j)),j}},{key:"scrollIntoView",value:function(k){var _=this.lastRange;if(_!=null){var O=this.getBounds(_.index,_.length);if(O!=null){var j=this.scroll.length()-1,R=this.scroll.line(Math.min(_.index,j)),F=i(R,1),q=F[0],V=q;if(_.length>0){var H=this.scroll.line(Math.min(_.index+_.length,j)),I=i(H,1);V=I[0]}if(!(q==null||V==null)){var M=k.getBoundingClientRect();O.top<M.top?k.scrollTop-=M.top-O.top:O.bottom>M.bottom&&(k.scrollTop+=O.bottom-M.bottom)}}}}},{key:"setNativeRange",value:function(k,_){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:_,R=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",k,_,O,j),!(k!=null&&(this.root.parentNode==null||k.parentNode==null||O.parentNode==null))){var F=document.getSelection();if(F!=null)if(k!=null){this.hasFocus()||this.root.focus();var q=(this.getNativeRange()||{}).native;if(q==null||R||k!==q.startContainer||_!==q.startOffset||O!==q.endContainer||j!==q.endOffset){k.tagName=="BR"&&(_=[].indexOf.call(k.parentNode.childNodes,k),k=k.parentNode),O.tagName=="BR"&&(j=[].indexOf.call(O.parentNode.childNodes,O),O=O.parentNode);var V=document.createRange();V.setStart(k,_),V.setEnd(O,j),F.removeAllRanges(),F.addRange(V)}}else F.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(k){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.default.sources.API;if(typeof _=="string"&&(O=_,_=!1),y.info("setRange",k),k!=null){var j=this.rangeToNative(k);this.setNativeRange.apply(this,d(j).concat([_]))}else this.setNativeRange(null);this.update(O)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.default.sources.USER,_=this.lastRange,O=this.getRange(),j=i(O,2),R=j[0],F=j[1];if(this.lastRange=R,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(_,this.lastRange)){var q;!this.composing&&F!=null&&F.native.collapsed&&F.start.node!==this.cursor.textNode&&this.cursor.restore();var V=[x.default.events.SELECTION_CHANGE,(0,v.default)(this.lastRange),(0,v.default)(_),k];if((q=this.emitter).emit.apply(q,[x.default.events.EDITOR_CHANGE].concat(V)),k!==x.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,V)}}}}]),C}();function S(C,P){try{P.parentNode}catch{return!1}return P instanceof Text&&(P=P.parentNode),C.contains(P)}r.Range=b,r.default=T},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function x(h,g){for(var p=0;p<g.length;p++){var d=g[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,g,p){return g&&x(h.prototype,g),p&&x(h,p),h}}(),a=function x(h,g,p){h===null&&(h=Function.prototype);var d=Object.getOwnPropertyDescriptor(h,g);if(d===void 0){var w=Object.getPrototypeOf(h);return w===null?void 0:x(w,g,p)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(p)}},l=o(0),s=m(l);function m(x){return x&&x.__esModule?x:{default:x}}function v(x,h){if(!(x instanceof h))throw new TypeError("Cannot call a class as a function")}function f(x,h){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:x}function c(x,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);x.prototype=Object.create(h&&h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(x,h):x.__proto__=h)}var u=function(x){c(h,x);function h(){return v(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return i(h,[{key:"insertInto",value:function(p,d){p.children.length===0?a(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"insertInto",this).call(this,p,d):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),h}(s.default.Embed);u.blotName="break",u.tagName="BR",r.default=u},function(n,r,o){var i=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var x in u)u.hasOwnProperty(x)&&(c[x]=u[x])};return function(c,u){f(c,u);function x(){this.constructor=c}c.prototype=u===null?Object.create(u):(x.prototype=u.prototype,new x)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(44),l=o(30),s=o(1),m=function(f){i(c,f);function c(u){var x=f.call(this,u)||this;return x.build(),x}return c.prototype.appendChild=function(u){this.insertBefore(u)},c.prototype.attach=function(){f.prototype.attach.call(this),this.children.forEach(function(u){u.attach()})},c.prototype.build=function(){var u=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(x){try{var h=v(x);u.insertBefore(h,u.children.head||void 0)}catch(g){if(g instanceof s.ParchmentError)return;throw g}})},c.prototype.deleteAt=function(u,x){if(u===0&&x===this.length())return this.remove();this.children.forEachAt(u,x,function(h,g,p){h.deleteAt(g,p)})},c.prototype.descendant=function(u,x){var h=this.children.find(x),g=h[0],p=h[1];return u.blotName==null&&u(g)||u.blotName!=null&&g instanceof u?[g,p]:g instanceof c?g.descendant(u,p):[null,-1]},c.prototype.descendants=function(u,x,h){x===void 0&&(x=0),h===void 0&&(h=Number.MAX_VALUE);var g=[],p=h;return this.children.forEachAt(x,h,function(d,w,y){(u.blotName==null&&u(d)||u.blotName!=null&&d instanceof u)&&g.push(d),d instanceof c&&(g=g.concat(d.descendants(u,w,p))),p-=y}),g},c.prototype.detach=function(){this.children.forEach(function(u){u.detach()}),f.prototype.detach.call(this)},c.prototype.formatAt=function(u,x,h,g){this.children.forEachAt(u,x,function(p,d,w){p.formatAt(d,w,h,g)})},c.prototype.insertAt=function(u,x,h){var g=this.children.find(u),p=g[0],d=g[1];if(p)p.insertAt(d,x,h);else{var w=h==null?s.create("text",x):s.create(x,h);this.appendChild(w)}},c.prototype.insertBefore=function(u,x){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(h){return u instanceof h}))throw new s.ParchmentError("Cannot insert "+u.statics.blotName+" into "+this.statics.blotName);u.insertInto(this,x)},c.prototype.length=function(){return this.children.reduce(function(u,x){return u+x.length()},0)},c.prototype.moveChildren=function(u,x){this.children.forEach(function(h){u.insertBefore(h,x)})},c.prototype.optimize=function(u){if(f.prototype.optimize.call(this,u),this.children.length===0)if(this.statics.defaultChild!=null){var x=s.create(this.statics.defaultChild);this.appendChild(x),x.optimize(u)}else this.remove()},c.prototype.path=function(u,x){x===void 0&&(x=!1);var h=this.children.find(u,x),g=h[0],p=h[1],d=[[this,u]];return g instanceof c?d.concat(g.path(p,x)):(g!=null&&d.push([g,p]),d)},c.prototype.removeChild=function(u){this.children.remove(u)},c.prototype.replace=function(u){u instanceof c&&u.moveChildren(this),f.prototype.replace.call(this,u)},c.prototype.split=function(u,x){if(x===void 0&&(x=!1),!x){if(u===0)return this;if(u===this.length())return this.next}var h=this.clone();return this.parent.insertBefore(h,this.next),this.children.forEachAt(u,this.length(),function(g,p,d){g=g.split(p,x),h.appendChild(g)}),h},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(u,x){var h=this,g=[],p=[];u.forEach(function(d){d.target===h.domNode&&d.type==="childList"&&(g.push.apply(g,d.addedNodes),p.push.apply(p,d.removedNodes))}),p.forEach(function(d){if(!(d.parentNode!=null&&d.tagName!=="IFRAME"&&document.body.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var w=s.find(d);w!=null&&(w.domNode.parentNode==null||w.domNode.parentNode===h.domNode)&&w.detach()}}),g.filter(function(d){return d.parentNode==h.domNode}).sort(function(d,w){return d===w?0:d.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(d){var w=null;d.nextSibling!=null&&(w=s.find(d.nextSibling));var y=v(d);(y.next!=w||y.next==null)&&(y.parent!=null&&y.parent.removeChild(h),h.insertBefore(y,w||void 0))})},c}(l.default);function v(f){var c=s.find(f);if(c==null)try{c=s.create(f)}catch{c=s.create(s.Scope.INLINE),[].slice.call(f.childNodes).forEach(function(x){c.domNode.appendChild(x)}),f.parentNode&&f.parentNode.replaceChild(c.domNode,f),c.attach()}return c}r.default=m},function(n,r,o){var i=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var x in u)u.hasOwnProperty(x)&&(c[x]=u[x])};return function(c,u){f(c,u);function x(){this.constructor=c}c.prototype=u===null?Object.create(u):(x.prototype=u.prototype,new x)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(12),l=o(31),s=o(17),m=o(1),v=function(f){i(c,f);function c(u){var x=f.call(this,u)||this;return x.attributes=new l.default(x.domNode),x}return c.formats=function(u){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return u.tagName.toLowerCase()},c.prototype.format=function(u,x){var h=m.query(u);h instanceof a.default?this.attributes.attribute(h,x):x&&h!=null&&(u!==this.statics.blotName||this.formats()[u]!==x)&&this.replaceWith(u,x)},c.prototype.formats=function(){var u=this.attributes.values(),x=this.statics.formats(this.domNode);return x!=null&&(u[this.statics.blotName]=x),u},c.prototype.replaceWith=function(u,x){var h=f.prototype.replaceWith.call(this,u,x);return this.attributes.copy(h),h},c.prototype.update=function(u,x){var h=this;f.prototype.update.call(this,u,x),u.some(function(g){return g.target===h.domNode&&g.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(u,x){var h=f.prototype.wrap.call(this,u,x);return h instanceof c&&h.statics.scope===this.statics.scope&&this.attributes.move(h),h},c}(s.default);r.default=v},function(n,r,o){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var c in f)f.hasOwnProperty(c)&&(v[c]=f[c])};return function(v,f){m(v,f);function c(){this.constructor=v}v.prototype=f===null?Object.create(f):(c.prototype=f.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(30),l=o(1),s=function(m){i(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.value=function(f){return!0},v.prototype.index=function(f,c){return this.domNode===f||this.domNode.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},v.prototype.position=function(f,c){var u=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return f>0&&(u+=1),[this.parent.domNode,u]},v.prototype.value=function(){var f;return f={},f[this.statics.blotName]=this.statics.value(this.domNode)||!0,f},v.scope=l.Scope.INLINE_BLOT,v}(a.default);r.default=s},function(n,r,o){var i=o(11),a=o(3),l={attributes:{compose:function(m,v,f){typeof m!="object"&&(m={}),typeof v!="object"&&(v={});var c=a(!0,{},v);f||(c=Object.keys(c).reduce(function(x,h){return c[h]!=null&&(x[h]=c[h]),x},{}));for(var u in m)m[u]!==void 0&&v[u]===void 0&&(c[u]=m[u]);return Object.keys(c).length>0?c:void 0},diff:function(m,v){typeof m!="object"&&(m={}),typeof v!="object"&&(v={});var f=Object.keys(m).concat(Object.keys(v)).reduce(function(c,u){return i(m[u],v[u])||(c[u]=v[u]===void 0?null:v[u]),c},{});return Object.keys(f).length>0?f:void 0},transform:function(m,v,f){if(typeof m!="object")return v;if(typeof v=="object"){if(!f)return v;var c=Object.keys(v).reduce(function(u,x){return m[x]===void 0&&(u[x]=v[x]),u},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(m){return new s(m)},length:function(m){return typeof m.delete=="number"?m.delete:typeof m.retain=="number"?m.retain:typeof m.insert=="string"?m.insert.length:1}};function s(m){this.ops=m,this.index=0,this.offset=0}s.prototype.hasNext=function(){return this.peekLength()<1/0},s.prototype.next=function(m){m||(m=1/0);var v=this.ops[this.index];if(v){var f=this.offset,c=l.length(v);if(m>=c-f?(m=c-f,this.index+=1,this.offset=0):this.offset+=m,typeof v.delete=="number")return{delete:m};var u={};return v.attributes&&(u.attributes=v.attributes),typeof v.retain=="number"?u.retain=m:typeof v.insert=="string"?u.insert=v.insert.substr(f,m):u.insert=v.insert,u}else return{retain:1/0}},s.prototype.peek=function(){return this.ops[this.index]},s.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},s.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"},s.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var m=this.offset,v=this.index,f=this.next(),c=this.ops.slice(this.index);return this.offset=m,this.index=v,[f].concat(c)}else return[]},n.exports=l},function(n,r){var o=function(){function i(h,g){return g!=null&&h instanceof g}var a;try{a=Map}catch{a=function(){}}var l;try{l=Set}catch{l=function(){}}var s;try{s=Promise}catch{s=function(){}}function m(h,g,p,d,w){typeof g=="object"&&(p=g.depth,d=g.prototype,w=g.includeNonEnumerable,g=g.circular);var y=[],b=[],T=typeof Buffer<"u";typeof g>"u"&&(g=!0),typeof p>"u"&&(p=1/0);function S(C,P){if(C===null)return null;if(P===0)return C;var k,_;if(typeof C!="object")return C;if(i(C,a))k=new a;else if(i(C,l))k=new l;else if(i(C,s))k=new s(function(M,A){C.then(function(L){M(S(L,P-1))},function(L){A(S(L,P-1))})});else if(m.__isArray(C))k=[];else if(m.__isRegExp(C))k=new RegExp(C.source,x(C)),C.lastIndex&&(k.lastIndex=C.lastIndex);else if(m.__isDate(C))k=new Date(C.getTime());else{if(T&&Buffer.isBuffer(C))return Buffer.allocUnsafe?k=Buffer.allocUnsafe(C.length):k=new Buffer(C.length),C.copy(k),k;i(C,Error)?k=Object.create(C):typeof d>"u"?(_=Object.getPrototypeOf(C),k=Object.create(_)):(k=Object.create(d),_=d)}if(g){var O=y.indexOf(C);if(O!=-1)return b[O];y.push(C),b.push(k)}i(C,a)&&C.forEach(function(M,A){var L=S(A,P-1),$=S(M,P-1);k.set(L,$)}),i(C,l)&&C.forEach(function(M){var A=S(M,P-1);k.add(A)});for(var j in C){var R;_&&(R=Object.getOwnPropertyDescriptor(_,j)),!(R&&R.set==null)&&(k[j]=S(C[j],P-1))}if(Object.getOwnPropertySymbols)for(var F=Object.getOwnPropertySymbols(C),j=0;j<F.length;j++){var q=F[j],V=Object.getOwnPropertyDescriptor(C,q);V&&!V.enumerable&&!w||(k[q]=S(C[q],P-1),V.enumerable||Object.defineProperty(k,q,{enumerable:!1}))}if(w)for(var H=Object.getOwnPropertyNames(C),j=0;j<H.length;j++){var I=H[j],V=Object.getOwnPropertyDescriptor(C,I);V&&V.enumerable||(k[I]=S(C[I],P-1),Object.defineProperty(k,I,{enumerable:!1}))}return k}return S(h,p)}m.clonePrototype=function(g){if(g===null)return null;var p=function(){};return p.prototype=g,new p};function v(h){return Object.prototype.toString.call(h)}m.__objToStr=v;function f(h){return typeof h=="object"&&v(h)==="[object Date]"}m.__isDate=f;function c(h){return typeof h=="object"&&v(h)==="[object Array]"}m.__isArray=c;function u(h){return typeof h=="object"&&v(h)==="[object RegExp]"}m.__isRegExp=u;function x(h){var g="";return h.global&&(g+="g"),h.ignoreCase&&(g+="i"),h.multiline&&(g+="m"),g}return m.__getRegExpFlags=x,m}();typeof n=="object"&&n.exports&&(n.exports=o)},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function k(_,O){var j=[],R=!0,F=!1,q=void 0;try{for(var V=_[Symbol.iterator](),H;!(R=(H=V.next()).done)&&(j.push(H.value),!(O&&j.length===O));R=!0);}catch(I){F=!0,q=I}finally{try{!R&&V.return&&V.return()}finally{if(F)throw q}}return j}return function(_,O){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return k(_,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function k(_,O){for(var j=0;j<O.length;j++){var R=O[j];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(_,R.key,R)}}return function(_,O,j){return O&&k(_.prototype,O),j&&k(_,j),_}}(),l=function k(_,O,j){_===null&&(_=Function.prototype);var R=Object.getOwnPropertyDescriptor(_,O);if(R===void 0){var F=Object.getPrototypeOf(_);return F===null?void 0:k(F,O,j)}else{if("value"in R)return R.value;var q=R.get;return q===void 0?void 0:q.call(j)}},s=o(0),m=y(s),v=o(8),f=y(v),c=o(4),u=y(c),x=o(16),h=y(x),g=o(13),p=y(g),d=o(25),w=y(d);function y(k){return k&&k.__esModule?k:{default:k}}function b(k,_){if(!(k instanceof _))throw new TypeError("Cannot call a class as a function")}function T(k,_){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:k}function S(k,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);k.prototype=Object.create(_&&_.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(k,_):k.__proto__=_)}function C(k){return k instanceof u.default||k instanceof c.BlockEmbed}var P=function(k){S(_,k);function _(O,j){b(this,_);var R=T(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,O));return R.emitter=j.emitter,Array.isArray(j.whitelist)&&(R.whitelist=j.whitelist.reduce(function(F,q){return F[q]=!0,F},{})),R.domNode.addEventListener("DOMNodeInserted",function(){}),R.optimize(),R.enable(),R}return a(_,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(j,R){var F=this.line(j),q=i(F,2),V=q[0],H=q[1],I=this.line(j+R),M=i(I,1),A=M[0];if(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"deleteAt",this).call(this,j,R),A!=null&&V!==A&&H>0){if(V instanceof c.BlockEmbed||A instanceof c.BlockEmbed){this.optimize();return}if(V instanceof p.default){var L=V.newlineIndex(V.length(),!0);if(L>-1&&(V=V.split(L+1),V===A)){this.optimize();return}}else if(A instanceof p.default){var $=A.newlineIndex(0);$>-1&&A.split($+1)}var W=A.children.head instanceof h.default?null:A.children.head;V.moveChildren(A,W),V.remove()}this.optimize()}},{key:"enable",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",j)}},{key:"formatAt",value:function(j,R,F,q){this.whitelist!=null&&!this.whitelist[F]||(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"formatAt",this).call(this,j,R,F,q),this.optimize())}},{key:"insertAt",value:function(j,R,F){if(!(F!=null&&this.whitelist!=null&&!this.whitelist[R])){if(j>=this.length())if(F==null||m.default.query(R,m.default.Scope.BLOCK)==null){var q=m.default.create(this.statics.defaultChild);this.appendChild(q),F==null&&R.endsWith(` `)&&(R=R.slice(0,-1)),q.insertAt(0,R,F)}else{var V=m.default.create(R,F);this.appendChild(V)}else l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertAt",this).call(this,j,R,F);this.optimize()}}},{key:"insertBefore",value:function(j,R){if(j.statics.scope===m.default.Scope.INLINE_BLOT){var F=m.default.create(this.statics.defaultChild);F.appendChild(j),j=F}l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertBefore",this).call(this,j,R)}},{key:"leaf",value:function(j){return this.path(j).pop()||[null,-1]}},{key:"line",value:function(j){return j===this.length()?this.line(j-1):this.descendant(C,j)}},{key:"lines",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,F=function q(V,H,I){var M=[],A=I;return V.children.forEachAt(H,I,function(L,$,W){C(L)?M.push(L):L instanceof m.default.Container&&(M=M.concat(q(L,$,A))),A-=W}),M};return F(this,j,R)}},{key:"optimize",value:function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,j,R),j.length>0&&this.emitter.emit(f.default.events.SCROLL_OPTIMIZE,j,R))}},{key:"path",value:function(j){return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"path",this).call(this,j).slice(1)}},{key:"update",value:function(j){if(this.batch!==!0){var R=f.default.sources.USER;typeof j=="string"&&(R=j),Array.isArray(j)||(j=this.observer.takeRecords()),j.length>0&&this.emitter.emit(f.default.events.SCROLL_BEFORE_UPDATE,R,j),l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"update",this).call(this,j.concat([])),j.length>0&&this.emitter.emit(f.default.events.SCROLL_UPDATE,R,j)}}}]),_}(m.default.Scroll);P.blotName="scroll",P.className="ql-editor",P.tagName="DIV",P.defaultChild="block",P.allowedChildren=[u.default,c.BlockEmbed,w.default],r.default=P},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(D){return typeof D}:function(D){return D&&typeof Symbol=="function"&&D.constructor===Symbol&&D!==Symbol.prototype?"symbol":typeof D},a=function(){function D(B,G){var Y=[],Q=!0,te=!1,le=void 0;try{for(var ce=B[Symbol.iterator](),pe;!(Q=(pe=ce.next()).done)&&(Y.push(pe.value),!(G&&Y.length===G));Q=!0);}catch(ge){te=!0,le=ge}finally{try{!Q&&ce.return&&ce.return()}finally{if(te)throw le}}return Y}return function(B,G){if(Array.isArray(B))return B;if(Symbol.iterator in Object(B))return D(B,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function D(B,G){for(var Y=0;Y<G.length;Y++){var Q=G[Y];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(B,Q.key,Q)}}return function(B,G,Y){return G&&D(B.prototype,G),Y&&D(B,Y),B}}(),s=o(21),m=k(s),v=o(11),f=k(v),c=o(3),u=k(c),x=o(2),h=k(x),g=o(20),p=k(g),d=o(0),w=k(d),y=o(5),b=k(y),T=o(10),S=k(T),C=o(9),P=k(C);function k(D){return D&&D.__esModule?D:{default:D}}function _(D,B,G){return B in D?Object.defineProperty(D,B,{value:G,enumerable:!0,configurable:!0,writable:!0}):D[B]=G,D}function O(D,B){if(!(D instanceof B))throw new TypeError("Cannot call a class as a function")}function j(D,B){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B&&(typeof B=="object"||typeof B=="function")?B:D}function R(D,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof B);D.prototype=Object.create(B&&B.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),B&&(Object.setPrototypeOf?Object.setPrototypeOf(D,B):D.__proto__=B)}var F=(0,S.default)("quill:keyboard"),q=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",V=function(D){R(B,D),l(B,null,[{key:"match",value:function(Y,Q){return Q=K(Q),["altKey","ctrlKey","metaKey","shiftKey"].some(function(te){return!!Q[te]!==Y[te]&&Q[te]!==null})?!1:Q.key===(Y.which||Y.keyCode)}}]);function B(G,Y){O(this,B);var Q=j(this,(B.__proto__||Object.getPrototypeOf(B)).call(this,G,Y));return Q.bindings={},Object.keys(Q.options.bindings).forEach(function(te){te==="list autofill"&&G.scroll.whitelist!=null&&!G.scroll.whitelist.list||Q.options.bindings[te]&&Q.addBinding(Q.options.bindings[te])}),Q.addBinding({key:B.keys.ENTER,shiftKey:null},L),Q.addBinding({key:B.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(Q.addBinding({key:B.keys.BACKSPACE},{collapsed:!0},I),Q.addBinding({key:B.keys.DELETE},{collapsed:!0},M)):(Q.addBinding({key:B.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},I),Q.addBinding({key:B.keys.DELETE},{collapsed:!0,suffix:/^.?$/},M)),Q.addBinding({key:B.keys.BACKSPACE},{collapsed:!1},A),Q.addBinding({key:B.keys.DELETE},{collapsed:!1},A),Q.addBinding({key:B.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},I),Q.listen(),Q}return l(B,[{key:"addBinding",value:function(Y){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},le=K(Y);if(le==null||le.key==null)return F.warn("Attempted to add invalid keyboard binding",le);typeof Q=="function"&&(Q={handler:Q}),typeof te=="function"&&(te={handler:te}),le=(0,u.default)(le,Q,te),this.bindings[le.key]=this.bindings[le.key]||[],this.bindings[le.key].push(le)}},{key:"listen",value:function(){var Y=this;this.quill.root.addEventListener("keydown",function(Q){if(!Q.defaultPrevented){var te=Q.which||Q.keyCode,le=(Y.bindings[te]||[]).filter(function(Te){return B.match(Q,Te)});if(le.length!==0){var ce=Y.quill.getSelection();if(!(ce==null||!Y.quill.hasFocus())){var pe=Y.quill.getLine(ce.index),ge=a(pe,2),Ae=ge[0],Oe=ge[1],Z=Y.quill.getLeaf(ce.index),J=a(Z,2),re=J[0],se=J[1],z=ce.length===0?[re,se]:Y.quill.getLeaf(ce.index+ce.length),U=a(z,2),X=U[0],ie=U[1],ye=re instanceof w.default.Text?re.value().slice(0,se):"",Le=X instanceof w.default.Text?X.value().slice(ie):"",Ne={collapsed:ce.length===0,empty:ce.length===0&&Ae.length()<=1,format:Y.quill.getFormat(ce),offset:Oe,prefix:ye,suffix:Le},mn=le.some(function(Te){if(Te.collapsed!=null&&Te.collapsed!==Ne.collapsed||Te.empty!=null&&Te.empty!==Ne.empty||Te.offset!=null&&Te.offset!==Ne.offset)return!1;if(Array.isArray(Te.format)){if(Te.format.every(function(ht){return Ne.format[ht]==null}))return!1}else if(i(Te.format)==="object"&&!Object.keys(Te.format).every(function(ht){return Te.format[ht]===!0?Ne.format[ht]!=null:Te.format[ht]===!1?Ne.format[ht]==null:(0,f.default)(Te.format[ht],Ne.format[ht])}))return!1;return Te.prefix!=null&&!Te.prefix.test(Ne.prefix)||Te.suffix!=null&&!Te.suffix.test(Ne.suffix)?!1:Te.handler.call(Y,ce,Ne)!==!0});mn&&Q.preventDefault()}}}})}}]),B}(P.default);V.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},V.DEFAULTS={bindings:{bold:W("bold"),italic:W("italic"),underline:W("underline"),indent:{key:V.keys.TAB,format:["blockquote","indent","list"],handler:function(B,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","+1",b.default.sources.USER)}},outdent:{key:V.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(B,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","-1",b.default.sources.USER)}},"outdent backspace":{key:V.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(B,G){G.format.indent!=null?this.quill.format("indent","-1",b.default.sources.USER):G.format.list!=null&&this.quill.format("list",!1,b.default.sources.USER)}},"indent code-block":$(!0),"outdent code-block":$(!1),"remove tab":{key:V.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(B){this.quill.deleteText(B.index-1,1,b.default.sources.USER)}},tab:{key:V.keys.TAB,handler:function(B){this.quill.history.cutoff();var G=new h.default().retain(B.index).delete(B.length).insert(" ");this.quill.updateContents(G,b.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index+1,b.default.sources.SILENT)}},"list empty enter":{key:V.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(B,G){this.quill.format("list",!1,b.default.sources.USER),G.format.indent&&this.quill.format("indent",!1,b.default.sources.USER)}},"checklist enter":{key:V.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(B){var G=this.quill.getLine(B.index),Y=a(G,2),Q=Y[0],te=Y[1],le=(0,u.default)({},Q.formats(),{list:"checked"}),ce=new h.default().retain(B.index).insert(` `,le).retain(Q.length()-te-1).retain(1,{list:"unchecked"});this.quill.updateContents(ce,b.default.sources.USER),this.quill.setSelection(B.index+1,b.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:V.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(B,G){var Y=this.quill.getLine(B.index),Q=a(Y,2),te=Q[0],le=Q[1],ce=new h.default().retain(B.index).insert(` `,G.format).retain(te.length()-le-1).retain(1,{header:null});this.quill.updateContents(ce,b.default.sources.USER),this.quill.setSelection(B.index+1,b.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(B,G){var Y=G.prefix.length,Q=this.quill.getLine(B.index),te=a(Q,2),le=te[0],ce=te[1];if(ce>Y)return!0;var pe=void 0;switch(G.prefix.trim()){case"[]":case"[ ]":pe="unchecked";break;case"[x]":pe="checked";break;case"-":case"*":pe="bullet";break;default:pe="ordered"}this.quill.insertText(B.index," ",b.default.sources.USER),this.quill.history.cutoff();var ge=new h.default().retain(B.index-ce).delete(Y+1).retain(le.length()-2-ce).retain(1,{list:pe});this.quill.updateContents(ge,b.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(B.index-Y,b.default.sources.SILENT)}},"code exit":{key:V.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(B){var G=this.quill.getLine(B.index),Y=a(G,2),Q=Y[0],te=Y[1],le=new h.default().retain(B.index+Q.length()-te-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(le,b.default.sources.USER)}},"embed left":H(V.keys.LEFT,!1),"embed left shift":H(V.keys.LEFT,!0),"embed right":H(V.keys.RIGHT,!1),"embed right shift":H(V.keys.RIGHT,!0)}};function H(D,B){var G,Y=D===V.keys.LEFT?"prefix":"suffix";return G={key:D,shiftKey:B,altKey:null},_(G,Y,/^$/),_(G,"handler",function(te){var le=te.index;D===V.keys.RIGHT&&(le+=te.length+1);var ce=this.quill.getLeaf(le),pe=a(ce,1),ge=pe[0];return ge instanceof w.default.Embed?(D===V.keys.LEFT?B?this.quill.setSelection(te.index-1,te.length+1,b.default.sources.USER):this.quill.setSelection(te.index-1,b.default.sources.USER):B?this.quill.setSelection(te.index,te.length+1,b.default.sources.USER):this.quill.setSelection(te.index+te.length+1,b.default.sources.USER),!1):!0}),G}function I(D,B){if(!(D.index===0||this.quill.getLength()<=1)){var G=this.quill.getLine(D.index),Y=a(G,1),Q=Y[0],te={};if(B.offset===0){var le=this.quill.getLine(D.index-1),ce=a(le,1),pe=ce[0];if(pe!=null&&pe.length()>1){var ge=Q.formats(),Ae=this.quill.getFormat(D.index-1,1);te=p.default.attributes.diff(ge,Ae)||{}}}var Oe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(B.prefix)?2:1;this.quill.deleteText(D.index-Oe,Oe,b.default.sources.USER),Object.keys(te).length>0&&this.quill.formatLine(D.index-Oe,Oe,te,b.default.sources.USER),this.quill.focus()}}function M(D,B){var G=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(B.suffix)?2:1;if(!(D.index>=this.quill.getLength()-G)){var Y={},Q=0,te=this.quill.getLine(D.index),le=a(te,1),ce=le[0];if(B.offset>=ce.length()-1){var pe=this.quill.getLine(D.index+1),ge=a(pe,1),Ae=ge[0];if(Ae){var Oe=ce.formats(),Z=this.quill.getFormat(D.index,1);Y=p.default.attributes.diff(Oe,Z)||{},Q=Ae.length()}}this.quill.deleteText(D.index,G,b.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine(D.index+Q-1,G,Y,b.default.sources.USER)}}function A(D){var B=this.quill.getLines(D),G={};if(B.length>1){var Y=B[0].formats(),Q=B[B.length-1].formats();G=p.default.attributes.diff(Q,Y)||{}}this.quill.deleteText(D,b.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(D.index,1,G,b.default.sources.USER),this.quill.setSelection(D.index,b.default.sources.SILENT),this.quill.focus()}function L(D,B){var G=this;D.length>0&&this.quill.scroll.deleteAt(D.index,D.length);var Y=Object.keys(B.format).reduce(function(Q,te){return w.default.query(te,w.default.Scope.BLOCK)&&!Array.isArray(B.format[te])&&(Q[te]=B.format[te]),Q},{});this.quill.insertText(D.index,` `,Y,b.default.sources.USER),this.quill.setSelection(D.index+1,b.default.sources.SILENT),this.quill.focus(),Object.keys(B.format).forEach(function(Q){Y[Q]==null&&(Array.isArray(B.format[Q])||Q!=="link"&&G.quill.format(Q,B.format[Q],b.default.sources.USER))})}function $(D){return{key:V.keys.TAB,shiftKey:!D,format:{"code-block":!0},handler:function(G){var Y=w.default.query("code-block"),Q=G.index,te=G.length,le=this.quill.scroll.descendant(Y,Q),ce=a(le,2),pe=ce[0],ge=ce[1];if(pe!=null){var Ae=this.quill.getIndex(pe),Oe=pe.newlineIndex(ge,!0)+1,Z=pe.newlineIndex(Ae+ge+te),J=pe.domNode.textContent.slice(Oe,Z).split(` `);ge=0,J.forEach(function(re,se){D?(pe.insertAt(Oe+ge,Y.TAB),ge+=Y.TAB.length,se===0?Q+=Y.TAB.length:te+=Y.TAB.length):re.startsWith(Y.TAB)&&(pe.deleteAt(Oe+ge,Y.TAB.length),ge-=Y.TAB.length,se===0?Q-=Y.TAB.length:te-=Y.TAB.length),ge+=re.length+1}),this.quill.update(b.default.sources.USER),this.quill.setSelection(Q,te,b.default.sources.SILENT)}}}}function W(D){return{key:D[0].toUpperCase(),shortKey:!0,handler:function(G,Y){this.quill.format(D,!Y.format[D],b.default.sources.USER)}}}function K(D){if(typeof D=="string"||typeof D=="number")return K({key:D});if((typeof D>"u"?"undefined":i(D))==="object"&&(D=(0,m.default)(D,!1)),typeof D.key=="string")if(V.keys[D.key.toUpperCase()]!=null)D.key=V.keys[D.key.toUpperCase()];else if(D.key.length===1)D.key=D.key.toUpperCase().charCodeAt(0);else return null;return D.shortKey&&(D[q]=D.shortKey,delete D.shortKey),D}r.default=V,r.SHORTKEY=q},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function p(d,w){var y=[],b=!0,T=!1,S=void 0;try{for(var C=d[Symbol.iterator](),P;!(b=(P=C.next()).done)&&(y.push(P.value),!(w&&y.length===w));b=!0);}catch(k){T=!0,S=k}finally{try{!b&&C.return&&C.return()}finally{if(T)throw S}}return y}return function(d,w){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return p(d,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function p(d,w,y){d===null&&(d=Function.prototype);var b=Object.getOwnPropertyDescriptor(d,w);if(b===void 0){var T=Object.getPrototypeOf(d);return T===null?void 0:p(T,w,y)}else{if("value"in b)return b.value;var S=b.get;return S===void 0?void 0:S.call(y)}},l=function(){function p(d,w){for(var y=0;y<w.length;y++){var b=w[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(d,b.key,b)}}return function(d,w,y){return w&&p(d.prototype,w),y&&p(d,y),d}}(),s=o(0),m=c(s),v=o(7),f=c(v);function c(p){return p&&p.__esModule?p:{default:p}}function u(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}function x(p,d){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:p}function h(p,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);p.prototype=Object.create(d&&d.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(p,d):p.__proto__=d)}var g=function(p){h(d,p),l(d,null,[{key:"value",value:function(){}}]);function d(w,y){u(this,d);var b=x(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,w));return b.selection=y,b.textNode=document.createTextNode(d.CONTENTS),b.domNode.appendChild(b.textNode),b._length=0,b}return l(d,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(y,b){if(this._length!==0)return a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"format",this).call(this,y,b);for(var T=this,S=0;T!=null&&T.statics.scope!==m.default.Scope.BLOCK_BLOT;)S+=T.offset(T.parent),T=T.parent;T!=null&&(this._length=d.CONTENTS.length,T.optimize(),T.formatAt(S,d.CONTENTS.length,y,b),this._length=0)}},{key:"index",value:function(y,b){return y===this.textNode?0:a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"index",this).call(this,y,b)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var y=this.textNode,b=this.selection.getNativeRange(),T=void 0,S=void 0,C=void 0;if(b!=null&&b.start.node===y&&b.end.node===y){var P=[y,b.start.offset,b.end.offset];T=P[0],S=P[1],C=P[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==d.CONTENTS){var k=this.textNode.data.split(d.CONTENTS).join("");this.next instanceof f.default?(T=this.next.domNode,this.next.insertAt(0,k),this.textNode.data=d.CONTENTS):(this.textNode.data=k,this.parent.insertBefore(m.default.create(this.textNode),this),this.textNode=document.createTextNode(d.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),S!=null){var _=[S,C].map(function(j){return Math.max(0,Math.min(T.data.length,j-1))}),O=i(_,2);return S=O[0],C=O[1],{startNode:T,startOffset:S,endNode:T,endOffset:C}}}}},{key:"update",value:function(y,b){var T=this;if(y.some(function(C){return C.type==="characterData"&&C.target===T.textNode})){var S=this.restore();S&&(b.range=S)}}},{key:"value",value:function(){return""}}]),d}(m.default.Embed);g.blotName="cursor",g.className="ql-cursor",g.tagName="span",g.CONTENTS="\uFEFF",r.default=g},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(0),a=m(i),l=o(4),s=m(l);function m(x){return x&&x.__esModule?x:{default:x}}function v(x,h){if(!(x instanceof h))throw new TypeError("Cannot call a class as a function")}function f(x,h){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:x}function c(x,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);x.prototype=Object.create(h&&h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(x,h):x.__proto__=h)}var u=function(x){c(h,x);function h(){return v(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(a.default.Container);u.allowedChildren=[s.default,l.BlockEmbed,u],r.default=u},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var i=function(){function g(p,d){for(var w=0;w<d.length;w++){var y=d[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return function(p,d,w){return d&&g(p.prototype,d),w&&g(p,w),p}}(),a=function g(p,d,w){p===null&&(p=Function.prototype);var y=Object.getOwnPropertyDescriptor(p,d);if(y===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:g(b,d,w)}else{if("value"in y)return y.value;var T=y.get;return T===void 0?void 0:T.call(w)}},l=o(0),s=m(l);function m(g){return g&&g.__esModule?g:{default:g}}function v(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function f(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function c(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var u=function(g){c(p,g);function p(){return v(this,p),f(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return i(p,[{key:"value",value:function(w){var y=a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"value",this).call(this,w);return y.startsWith("rgb(")?(y=y.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+y.split(",").map(function(b){return("00"+parseInt(b).toString(16)).slice(-2)}).join("")):y}}]),p}(s.default.Attributor.Style),x=new s.default.Attributor.Class("color","ql-color",{scope:s.default.Scope.INLINE}),h=new u("color","color",{scope:s.default.Scope.INLINE});r.ColorAttributor=u,r.ColorClass=x,r.ColorStyle=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var i=function(){function h(g,p){for(var d=0;d<p.length;d++){var w=p[d];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,p,d){return p&&h(g.prototype,p),d&&h(g,d),g}}(),a=function h(g,p,d){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,p);if(w===void 0){var y=Object.getPrototypeOf(g);return y===null?void 0:h(y,p,d)}else{if("value"in w)return w.value;var b=w.get;return b===void 0?void 0:b.call(d)}},l=o(6),s=m(l);function m(h){return h&&h.__esModule?h:{default:h}}function v(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")}function f(h,g){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:h}function c(h,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);h.prototype=Object.create(g&&g.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(h,g):h.__proto__=g)}var u=function(h){c(g,h);function g(){return v(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return i(g,[{key:"format",value:function(d,w){if(d!==this.statics.blotName||!w)return a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,d,w);w=this.constructor.sanitize(w),this.domNode.setAttribute("href",w)}}],[{key:"create",value:function(d){var w=a(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,d);return d=this.sanitize(d),w.setAttribute("href",d),w.setAttribute("rel","noopener noreferrer"),w.setAttribute("target","_blank"),w}},{key:"formats",value:function(d){return d.getAttribute("href")}},{key:"sanitize",value:function(d){return x(d,this.PROTOCOL_WHITELIST)?d:this.SANITIZED_URL}}]),g}(s.default);u.blotName="link",u.tagName="A",u.SANITIZED_URL="about:blank",u.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function x(h,g){var p=document.createElement("a");p.href=h;var d=p.href.slice(0,p.href.indexOf(":"));return g.indexOf(d)>-1}r.default=u,r.sanitize=x},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=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},a=function(){function g(p,d){for(var w=0;w<d.length;w++){var y=d[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return function(p,d,w){return d&&g(p.prototype,d),w&&g(p,w),p}}(),l=o(23),s=f(l),m=o(107),v=f(m);function f(g){return g&&g.__esModule?g:{default:g}}function c(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}var u=0;function x(g,p){g.setAttribute(p,g.getAttribute(p)!=="true")}var h=function(){function g(p){var d=this;c(this,g),this.select=p,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(){d.togglePicker()}),this.label.addEventListener("keydown",function(w){switch(w.keyCode){case s.default.keys.ENTER:d.togglePicker();break;case s.default.keys.ESCAPE:d.escape(),w.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(g,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),x(this.label,"aria-expanded"),x(this.options,"aria-hidden")}},{key:"buildItem",value:function(d){var w=this,y=document.createElement("span");return y.tabIndex="0",y.setAttribute("role","button"),y.classList.add("ql-picker-item"),d.hasAttribute("value")&&y.setAttribute("data-value",d.getAttribute("value")),d.textContent&&y.setAttribute("data-label",d.textContent),y.addEventListener("click",function(){w.selectItem(y,!0)}),y.addEventListener("keydown",function(b){switch(b.keyCode){case s.default.keys.ENTER:w.selectItem(y,!0),b.preventDefault();break;case s.default.keys.ESCAPE:w.escape(),b.preventDefault();break}}),y}},{key:"buildLabel",value:function(){var d=document.createElement("span");return d.classList.add("ql-picker-label"),d.innerHTML=v.default,d.tabIndex="0",d.setAttribute("role","button"),d.setAttribute("aria-expanded","false"),this.container.appendChild(d),d}},{key:"buildOptions",value:function(){var d=this,w=document.createElement("span");w.classList.add("ql-picker-options"),w.setAttribute("aria-hidden","true"),w.tabIndex="-1",w.id="ql-picker-options-"+u,u+=1,this.label.setAttribute("aria-controls",w.id),this.options=w,[].slice.call(this.select.options).forEach(function(y){var b=d.buildItem(y);w.appendChild(b),y.selected===!0&&d.selectItem(b)}),this.container.appendChild(w)}},{key:"buildPicker",value:function(){var d=this;[].slice.call(this.select.attributes).forEach(function(w){d.container.setAttribute(w.name,w.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var d=this;this.close(),setTimeout(function(){return d.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(d){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(d!==y&&(y!=null&&y.classList.remove("ql-selected"),d!=null&&(d.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(d.parentNode.children,d),d.hasAttribute("data-value")?this.label.setAttribute("data-value",d.getAttribute("data-value")):this.label.removeAttribute("data-value"),d.hasAttribute("data-label")?this.label.setAttribute("data-label",d.getAttribute("data-label")):this.label.removeAttribute("data-label"),w))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":i(Event))==="object"){var b=document.createEvent("Event");b.initEvent("change",!0,!0),this.select.dispatchEvent(b)}this.close()}}},{key:"update",value:function(){var d=void 0;if(this.select.selectedIndex>-1){var w=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];d=this.select.options[this.select.selectedIndex],this.selectItem(w)}else this.selectItem(null);var y=d!=null&&d!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),g}();r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(0),a=F(i),l=o(5),s=F(l),m=o(4),v=F(m),f=o(16),c=F(f),u=o(25),x=F(u),h=o(24),g=F(h),p=o(35),d=F(p),w=o(6),y=F(w),b=o(22),T=F(b),S=o(7),C=F(S),P=o(55),k=F(P),_=o(42),O=F(_),j=o(23),R=F(j);function F(q){return q&&q.__esModule?q:{default:q}}s.default.register({"blots/block":v.default,"blots/block/embed":m.BlockEmbed,"blots/break":c.default,"blots/container":x.default,"blots/cursor":g.default,"blots/embed":d.default,"blots/inline":y.default,"blots/scroll":T.default,"blots/text":C.default,"modules/clipboard":k.default,"modules/history":O.default,"modules/keyboard":R.default}),a.default.register(v.default,c.default,g.default,y.default,T.default,C.default),r.default=s.default},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(1),a=function(){function l(s){this.domNode=s,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(s){if(this.tagName==null)throw new i.ParchmentError("Blot definition missing tagName");var m;return Array.isArray(this.tagName)?(typeof s=="string"&&(s=s.toUpperCase(),parseInt(s).toString()===s&&(s=parseInt(s))),typeof s=="number"?m=document.createElement(this.tagName[s-1]):this.tagName.indexOf(s)>-1?m=document.createElement(s):m=document.createElement(this.tagName[0])):m=document.createElement(this.tagName),this.className&&m.classList.add(this.className),m},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var s=this.domNode.cloneNode(!1);return i.create(s)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},l.prototype.deleteAt=function(s,m){var v=this.isolate(s,m);v.remove()},l.prototype.formatAt=function(s,m,v,f){var c=this.isolate(s,m);if(i.query(v,i.Scope.BLOT)!=null&&f)c.wrap(v,f);else if(i.query(v,i.Scope.ATTRIBUTE)!=null){var u=i.create(this.statics.scope);c.wrap(u),u.format(v,f)}},l.prototype.insertAt=function(s,m,v){var f=v==null?i.create("text",m):i.create(m,v),c=this.split(s);this.parent.insertBefore(f,c)},l.prototype.insertInto=function(s,m){m===void 0&&(m=null),this.parent!=null&&this.parent.children.remove(this);var v=null;s.children.insertBefore(this,m),m!=null&&(v=m.domNode),(this.domNode.parentNode!=s.domNode||this.domNode.nextSibling!=v)&&s.domNode.insertBefore(this.domNode,v),this.parent=s,this.attach()},l.prototype.isolate=function(s,m){var v=this.split(s);return v.split(m),v},l.prototype.length=function(){return 1},l.prototype.offset=function(s){return s===void 0&&(s=this.parent),this.parent==null||this==s?0:this.parent.children.offset(this)+this.parent.offset(s)},l.prototype.optimize=function(s){this.domNode[i.DATA_KEY]!=null&&delete this.domNode[i.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(s){s.parent!=null&&(s.parent.insertBefore(this,s.next),s.remove())},l.prototype.replaceWith=function(s,m){var v=typeof s=="string"?i.create(s,m):s;return v.replace(this),v},l.prototype.split=function(s,m){return s===0?this:this.next},l.prototype.update=function(s,m){},l.prototype.wrap=function(s,m){var v=typeof s=="string"?i.create(s,m):s;return this.parent!=null&&this.parent.insertBefore(v,this.next),v.appendChild(this),v},l.blotName="abstract",l}();r.default=a},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(12),a=o(32),l=o(33),s=o(1),m=function(){function v(f){this.attributes={},this.domNode=f,this.build()}return v.prototype.attribute=function(f,c){c?f.add(this.domNode,c)&&(f.value(this.domNode)!=null?this.attributes[f.attrName]=f:delete this.attributes[f.attrName]):(f.remove(this.domNode),delete this.attributes[f.attrName])},v.prototype.build=function(){var f=this;this.attributes={};var c=i.default.keys(this.domNode),u=a.default.keys(this.domNode),x=l.default.keys(this.domNode);c.concat(u).concat(x).forEach(function(h){var g=s.query(h,s.Scope.ATTRIBUTE);g instanceof i.default&&(f.attributes[g.attrName]=g)})},v.prototype.copy=function(f){var c=this;Object.keys(this.attributes).forEach(function(u){var x=c.attributes[u].value(c.domNode);f.format(u,x)})},v.prototype.move=function(f){var c=this;this.copy(f),Object.keys(this.attributes).forEach(function(u){c.attributes[u].remove(c.domNode)}),this.attributes={}},v.prototype.values=function(){var f=this;return Object.keys(this.attributes).reduce(function(c,u){return c[u]=f.attributes[u].value(f.domNode),c},{})},v}();r.default=m},function(n,r,o){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var c in f)f.hasOwnProperty(c)&&(v[c]=f[c])};return function(v,f){m(v,f);function c(){this.constructor=v}v.prototype=f===null?Object.create(f):(c.prototype=f.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(12);function l(m,v){var f=m.getAttribute("class")||"";return f.split(/\s+/).filter(function(c){return c.indexOf(v+"-")===0})}var s=function(m){i(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.keys=function(f){return(f.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},v.prototype.add=function(f,c){return this.canAdd(f,c)?(this.remove(f),f.classList.add(this.keyName+"-"+c),!0):!1},v.prototype.remove=function(f){var c=l(f,this.keyName);c.forEach(function(u){f.classList.remove(u)}),f.classList.length===0&&f.removeAttribute("class")},v.prototype.value=function(f){var c=l(f,this.keyName)[0]||"",u=c.slice(this.keyName.length+1);return this.canAdd(f,u)?u:""},v}(a.default);r.default=s},function(n,r,o){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var c in f)f.hasOwnProperty(c)&&(v[c]=f[c])};return function(v,f){m(v,f);function c(){this.constructor=v}v.prototype=f===null?Object.create(f):(c.prototype=f.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(12);function l(m){var v=m.split("-"),f=v.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return v[0]+f}var s=function(m){i(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.keys=function(f){return(f.getAttribute("style")||"").split(";").map(function(c){var u=c.split(":");return u[0].trim()})},v.prototype.add=function(f,c){return this.canAdd(f,c)?(f.style[l(this.keyName)]=c,!0):!1},v.prototype.remove=function(f){f.style[l(this.keyName)]="",f.getAttribute("style")||f.removeAttribute("style")},v.prototype.value=function(f){var c=f.style[l(this.keyName)];return this.canAdd(f,c)?c:""},v}(a.default);r.default=s},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function s(m,v){for(var f=0;f<v.length;f++){var c=v[f];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(m,c.key,c)}}return function(m,v,f){return v&&s(m.prototype,v),f&&s(m,f),m}}();function a(s,m){if(!(s instanceof m))throw new TypeError("Cannot call a class as a function")}var l=function(){function s(m,v){a(this,s),this.quill=m,this.options=v,this.modules={}}return i(s,[{key:"init",value:function(){var v=this;Object.keys(this.options.modules).forEach(function(f){v.modules[f]==null&&v.addModule(f)})}},{key:"addModule",value:function(v){var f=this.quill.constructor.import("modules/"+v);return this.modules[v]=new f(this.quill,this.options.modules[v]||{}),this.modules[v]}}]),s}();l.DEFAULTS={modules:{}},l.themes={default:l},r.default=l},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function p(d,w){for(var y=0;y<w.length;y++){var b=w[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(d,b.key,b)}}return function(d,w,y){return w&&p(d.prototype,w),y&&p(d,y),d}}(),a=function p(d,w,y){d===null&&(d=Function.prototype);var b=Object.getOwnPropertyDescriptor(d,w);if(b===void 0){var T=Object.getPrototypeOf(d);return T===null?void 0:p(T,w,y)}else{if("value"in b)return b.value;var S=b.get;return S===void 0?void 0:S.call(y)}},l=o(0),s=f(l),m=o(7),v=f(m);function f(p){return p&&p.__esModule?p:{default:p}}function c(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}function u(p,d){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:p}function x(p,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);p.prototype=Object.create(d&&d.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(p,d):p.__proto__=d)}var h="\uFEFF",g=function(p){x(d,p);function d(w){c(this,d);var y=u(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,w));return y.contentNode=document.createElement("span"),y.contentNode.setAttribute("contenteditable",!1),[].slice.call(y.domNode.childNodes).forEach(function(b){y.contentNode.appendChild(b)}),y.leftGuard=document.createTextNode(h),y.rightGuard=document.createTextNode(h),y.domNode.appendChild(y.leftGuard),y.domNode.appendChild(y.contentNode),y.domNode.appendChild(y.rightGuard),y}return i(d,[{key:"index",value:function(y,b){return y===this.leftGuard?0:y===this.rightGuard?1:a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"index",this).call(this,y,b)}},{key:"restore",value:function(y){var b=void 0,T=void 0,S=y.data.split(h).join("");if(y===this.leftGuard)if(this.prev instanceof v.default){var C=this.prev.length();this.prev.insertAt(C,S),b={startNode:this.prev.domNode,startOffset:C+S.length}}else T=document.createTextNode(S),this.parent.insertBefore(s.default.create(T),this),b={startNode:T,startOffset:S.length};else y===this.rightGuard&&(this.next instanceof v.default?(this.next.insertAt(0,S),b={startNode:this.next.domNode,startOffset:S.length}):(T=document.createTextNode(S),this.parent.insertBefore(s.default.create(T),this.next),b={startNode:T,startOffset:S.length}));return y.data=h,b}},{key:"update",value:function(y,b){var T=this;y.forEach(function(S){if(S.type==="characterData"&&(S.target===T.leftGuard||S.target===T.rightGuard)){var C=T.restore(S.target);C&&(b.range=C)}})}}]),d}(s.default.Embed);r.default=g},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var i=o(0),a=l(i);function l(c){return c&&c.__esModule?c:{default:c}}var s={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},m=new a.default.Attributor.Attribute("align","align",s),v=new a.default.Attributor.Class("align","ql-align",s),f=new a.default.Attributor.Style("align","text-align",s);r.AlignAttribute=m,r.AlignClass=v,r.AlignStyle=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var i=o(0),a=s(i),l=o(26);function s(f){return f&&f.__esModule?f:{default:f}}var m=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),v=new l.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});r.BackgroundClass=m,r.BackgroundStyle=v},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var i=o(0),a=l(i);function l(c){return c&&c.__esModule?c:{default:c}}var s={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},m=new a.default.Attributor.Attribute("direction","dir",s),v=new a.default.Attributor.Class("direction","ql-direction",s),f=new a.default.Attributor.Style("direction","direction",s);r.DirectionAttribute=m,r.DirectionClass=v,r.DirectionStyle=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var i=function(){function p(d,w){for(var y=0;y<w.length;y++){var b=w[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(d,b.key,b)}}return function(d,w,y){return w&&p(d.prototype,w),y&&p(d,y),d}}(),a=function p(d,w,y){d===null&&(d=Function.prototype);var b=Object.getOwnPropertyDescriptor(d,w);if(b===void 0){var T=Object.getPrototypeOf(d);return T===null?void 0:p(T,w,y)}else{if("value"in b)return b.value;var S=b.get;return S===void 0?void 0:S.call(y)}},l=o(0),s=m(l);function m(p){return p&&p.__esModule?p:{default:p}}function v(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}function f(p,d){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:p}function c(p,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);p.prototype=Object.create(d&&d.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(p,d):p.__proto__=d)}var u={scope:s.default.Scope.INLINE,whitelist:["serif","monospace"]},x=new s.default.Attributor.Class("font","ql-font",u),h=function(p){c(d,p);function d(){return v(this,d),f(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return i(d,[{key:"value",value:function(y){return a(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"value",this).call(this,y).replace(/["']/g,"")}}]),d}(s.default.Attributor.Style),g=new h("font","font-family",u);r.FontStyle=g,r.FontClass=x},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var i=o(0),a=l(i);function l(v){return v&&v.__esModule?v:{default:v}}var s=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),m=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=s,r.SizeStyle=m},function(n,r,o){n.exports={align:{"":o(76),center:o(77),right:o(78),justify:o(79)},background:o(80),blockquote:o(81),bold:o(82),clean:o(83),code:o(58),"code-block":o(58),color:o(84),direction:{"":o(85),rtl:o(86)},float:{center:o(87),full:o(88),left:o(89),right:o(90)},formula:o(91),header:{1:o(92),2:o(93)},italic:o(94),image:o(95),indent:{"+1":o(96),"-1":o(97)},link:o(98),list:{ordered:o(99),bullet:o(100),check:o(101)},script:{sub:o(102),super:o(103)},strike:o(104),underline:o(105),video:o(106)}},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var i=function(){function w(y,b){for(var T=0;T<b.length;T++){var S=b[T];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(y,S.key,S)}}return function(y,b,T){return b&&w(y.prototype,b),T&&w(y,T),y}}(),a=o(0),l=c(a),s=o(5),m=c(s),v=o(9),f=c(v);function c(w){return w&&w.__esModule?w:{default:w}}function u(w,y){if(!(w instanceof y))throw new TypeError("Cannot call a class as a function")}function x(w,y){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:w}function h(w,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);w.prototype=Object.create(y&&y.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(w,y):w.__proto__=y)}var g=function(w){h(y,w);function y(b,T){u(this,y);var S=x(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,b,T));return S.lastRecorded=0,S.ignoreChange=!1,S.clear(),S.quill.on(m.default.events.EDITOR_CHANGE,function(C,P,k,_){C!==m.default.events.TEXT_CHANGE||S.ignoreChange||(!S.options.userOnly||_===m.default.sources.USER?S.record(P,k):S.transform(P))}),S.quill.keyboard.addBinding({key:"Z",shortKey:!0},S.undo.bind(S)),S.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},S.redo.bind(S)),/Win/i.test(navigator.platform)&&S.quill.keyboard.addBinding({key:"Y",shortKey:!0},S.redo.bind(S)),S}return i(y,[{key:"change",value:function(T,S){if(this.stack[T].length!==0){var C=this.stack[T].pop();this.stack[S].push(C),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(C[T],m.default.sources.USER),this.ignoreChange=!1;var P=d(C[T]);this.quill.setSelection(P)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(T,S){if(T.ops.length!==0){this.stack.redo=[];var C=this.quill.getContents().diff(S),P=Date.now();if(this.lastRecorded+this.options.delay>P&&this.stack.undo.length>0){var k=this.stack.undo.pop();C=C.compose(k.undo),T=k.redo.compose(T)}else this.lastRecorded=P;this.stack.undo.push({redo:T,undo:C}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(T){this.stack.undo.forEach(function(S){S.undo=T.transform(S.undo,!0),S.redo=T.transform(S.redo,!0)}),this.stack.redo.forEach(function(S){S.undo=T.transform(S.undo,!0),S.redo=T.transform(S.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),y}(f.default);g.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function p(w){var y=w.ops[w.ops.length-1];return y==null?!1:y.insert!=null?typeof y.insert=="string"&&y.insert.endsWith(` `):y.attributes!=null?Object.keys(y.attributes).some(function(b){return l.default.query(b,l.default.Scope.BLOCK)!=null}):!1}function d(w){var y=w.reduce(function(T,S){return T+=S.delete||0,T},0),b=w.length()-y;return p(w)&&(b-=1),b}r.default=g,r.getLastChangeIndex=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var i=function(){function L($,W){for(var K=0;K<W.length;K++){var D=W[K];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty($,D.key,D)}}return function($,W,K){return W&&L($.prototype,W),K&&L($,K),$}}(),a=function L($,W,K){$===null&&($=Function.prototype);var D=Object.getOwnPropertyDescriptor($,W);if(D===void 0){var B=Object.getPrototypeOf($);return B===null?void 0:L(B,W,K)}else{if("value"in D)return D.value;var G=D.get;return G===void 0?void 0:G.call(K)}},l=o(3),s=P(l),m=o(2),v=P(m),f=o(8),c=P(f),u=o(23),x=P(u),h=o(34),g=P(h),p=o(59),d=P(p),w=o(60),y=P(w),b=o(28),T=P(b),S=o(61),C=P(S);function P(L){return L&&L.__esModule?L:{default:L}}function k(L,$){if(!(L instanceof $))throw new TypeError("Cannot call a class as a function")}function _(L,$){if(!L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $&&(typeof $=="object"||typeof $=="function")?$:L}function O(L,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof $);L.prototype=Object.create($&&$.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),$&&(Object.setPrototypeOf?Object.setPrototypeOf(L,$):L.__proto__=$)}var j=[!1,"center","right","justify"],R=["#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"],q=["1","2","3",!1],V=["small",!1,"large","huge"],H=function(L){O($,L);function $(W,K){k(this,$);var D=_(this,($.__proto__||Object.getPrototypeOf($)).call(this,W,K)),B=function G(Y){if(!document.body.contains(W.root))return document.body.removeEventListener("click",G);D.tooltip!=null&&!D.tooltip.root.contains(Y.target)&&document.activeElement!==D.tooltip.textbox&&!D.quill.hasFocus()&&D.tooltip.hide(),D.pickers!=null&&D.pickers.forEach(function(Q){Q.container.contains(Y.target)||Q.close()})};return W.emitter.listenDOM("click",document.body,B),D}return i($,[{key:"addModule",value:function(K){var D=a($.prototype.__proto__||Object.getPrototypeOf($.prototype),"addModule",this).call(this,K);return K==="toolbar"&&this.extendToolbar(D),D}},{key:"buildButtons",value:function(K,D){K.forEach(function(B){var G=B.getAttribute("class")||"";G.split(/\s+/).forEach(function(Y){if(Y.startsWith("ql-")&&(Y=Y.slice(3),D[Y]!=null))if(Y==="direction")B.innerHTML=D[Y][""]+D[Y].rtl;else if(typeof D[Y]=="string")B.innerHTML=D[Y];else{var Q=B.value||"";Q!=null&&D[Y][Q]&&(B.innerHTML=D[Y][Q])}})})}},{key:"buildPickers",value:function(K,D){var B=this;this.pickers=K.map(function(Y){if(Y.classList.contains("ql-align"))return Y.querySelector("option")==null&&A(Y,j),new y.default(Y,D.align);if(Y.classList.contains("ql-background")||Y.classList.contains("ql-color")){var Q=Y.classList.contains("ql-background")?"background":"color";return Y.querySelector("option")==null&&A(Y,R,Q==="background"?"#ffffff":"#000000"),new d.default(Y,D[Q])}else return Y.querySelector("option")==null&&(Y.classList.contains("ql-font")?A(Y,F):Y.classList.contains("ql-header")?A(Y,q):Y.classList.contains("ql-size")&&A(Y,V)),new T.default(Y)});var G=function(){B.pickers.forEach(function(Q){Q.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,G)}}]),$}(g.default);H.DEFAULTS=(0,s.default)(!0,{},g.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var $=this,W=this.container.querySelector("input.ql-image[type=file]");W==null&&(W=document.createElement("input"),W.setAttribute("type","file"),W.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),W.classList.add("ql-image"),W.addEventListener("change",function(){if(W.files!=null&&W.files[0]!=null){var K=new FileReader;K.onload=function(D){var B=$.quill.getSelection(!0);$.quill.updateContents(new v.default().retain(B.index).delete(B.length).insert({image:D.target.result}),c.default.sources.USER),$.quill.setSelection(B.index+1,c.default.sources.SILENT),W.value=""},K.readAsDataURL(W.files[0])}}),this.container.appendChild(W)),W.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var I=function(L){O($,L);function $(W,K){k(this,$);var D=_(this,($.__proto__||Object.getPrototypeOf($)).call(this,W,K));return D.textbox=D.root.querySelector('input[type="text"]'),D.listen(),D}return i($,[{key:"listen",value:function(){var K=this;this.textbox.addEventListener("keydown",function(D){x.default.match(D,"enter")?(K.save(),D.preventDefault()):x.default.match(D,"escape")&&(K.cancel(),D.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),D!=null?this.textbox.value=D:K!==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-"+K)||""),this.root.setAttribute("data-mode",K)}},{key:"restoreFocus",value:function(){var K=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=K}},{key:"save",value:function(){var K=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var D=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",K,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",K,c.default.sources.USER)),this.quill.root.scrollTop=D;break}case"video":K=M(K);case"formula":{if(!K)break;var B=this.quill.getSelection(!0);if(B!=null){var G=B.index+B.length;this.quill.insertEmbed(G,this.root.getAttribute("data-mode"),K,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(G+1," ",c.default.sources.USER),this.quill.setSelection(G+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),$}(C.default);function M(L){var $=L.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||L.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return $?($[1]||"https")+"://www.youtube.com/embed/"+$[2]+"?showinfo=0":($=L.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?($[1]||"https")+"://player.vimeo.com/video/"+$[2]+"/":L}function A(L,$){var W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;$.forEach(function(K){var D=document.createElement("option");K===W?D.setAttribute("selected","selected"):D.setAttribute("value",K),L.appendChild(D)})}r.BaseTooltip=I,r.default=H},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},a.prototype.contains=function(l){for(var s,m=this.iterator();s=m();)if(s===l)return!0;return!1},a.prototype.insertBefore=function(l,s){l&&(l.next=s,s!=null?(l.prev=s.prev,s.prev!=null&&(s.prev.next=l),s.prev=l,s===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)},a.prototype.offset=function(l){for(var s=0,m=this.head;m!=null;){if(m===l)return s;s+=m.length(),m=m.next}return-1},a.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)},a.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var s=l;return l!=null&&(l=l.next),s}},a.prototype.find=function(l,s){s===void 0&&(s=!1);for(var m,v=this.iterator();m=v();){var f=m.length();if(l<f||s&&l===f&&(m.next==null||m.next.length()!==0))return[m,l];l-=f}return[null,0]},a.prototype.forEach=function(l){for(var s,m=this.iterator();s=m();)l(s)},a.prototype.forEachAt=function(l,s,m){if(!(s<=0))for(var v=this.find(l),f=v[0],c=v[1],u,x=l-c,h=this.iterator(f);(u=h())&&x<l+s;){var g=u.length();l>x?m(u,l-x,Math.min(s,x+g-l)):m(u,0,Math.min(g,l+s-x)),x+=g}},a.prototype.map=function(l){return this.reduce(function(s,m){return s.push(l(m)),s},[])},a.prototype.reduce=function(l,s){for(var m,v=this.iterator();m=v();)s=l(s,m);return s},a}();r.default=i},function(n,r,o){var i=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var x in u)u.hasOwnProperty(x)&&(c[x]=u[x])};return function(c,u){f(c,u);function x(){this.constructor=c}c.prototype=u===null?Object.create(u):(x.prototype=u.prototype,new x)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(17),l=o(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},m=100,v=function(f){i(c,f);function c(u){var x=f.call(this,u)||this;return x.scroll=x,x.observer=new MutationObserver(function(h){x.update(h)}),x.observer.observe(x.domNode,s),x.attach(),x}return c.prototype.detach=function(){f.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(u,x){this.update(),u===0&&x===this.length()?this.children.forEach(function(h){h.remove()}):f.prototype.deleteAt.call(this,u,x)},c.prototype.formatAt=function(u,x,h,g){this.update(),f.prototype.formatAt.call(this,u,x,h,g)},c.prototype.insertAt=function(u,x,h){this.update(),f.prototype.insertAt.call(this,u,x,h)},c.prototype.optimize=function(u,x){var h=this;u===void 0&&(u=[]),x===void 0&&(x={}),f.prototype.optimize.call(this,x);for(var g=[].slice.call(this.observer.takeRecords());g.length>0;)u.push(g.pop());for(var p=function(b,T){T===void 0&&(T=!0),!(b==null||b===h)&&b.domNode.parentNode!=null&&(b.domNode[l.DATA_KEY].mutations==null&&(b.domNode[l.DATA_KEY].mutations=[]),T&&p(b.parent))},d=function(b){b.domNode[l.DATA_KEY]==null||b.domNode[l.DATA_KEY].mutations==null||(b instanceof a.default&&b.children.forEach(d),b.optimize(x))},w=u,y=0;w.length>0;y+=1){if(y>=m)throw new Error("[Parchment] Maximum optimize iterations reached");for(w.forEach(function(b){var T=l.find(b.target,!0);T!=null&&(T.domNode===b.target&&(b.type==="childList"?(p(l.find(b.previousSibling,!1)),[].forEach.call(b.addedNodes,function(S){var C=l.find(S,!1);p(C,!1),C instanceof a.default&&C.children.forEach(function(P){p(P,!1)})})):b.type==="attributes"&&p(T.prev)),p(T))}),this.children.forEach(d),w=[].slice.call(this.observer.takeRecords()),g=w.slice();g.length>0;)u.push(g.pop())}},c.prototype.update=function(u,x){var h=this;x===void 0&&(x={}),u=u||this.observer.takeRecords(),u.map(function(g){var p=l.find(g.target,!0);return p==null?null:p.domNode[l.DATA_KEY].mutations==null?(p.domNode[l.DATA_KEY].mutations=[g],p):(p.domNode[l.DATA_KEY].mutations.push(g),null)}).forEach(function(g){g==null||g===h||g.domNode[l.DATA_KEY]==null||g.update(g.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(u,x)},c.blotName="scroll",c.defaultChild="block",c.scope=l.Scope.BLOCK_BLOT,c.tagName="DIV",c}(a.default);r.default=v},function(n,r,o){var i=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,c){f.__proto__=c}||function(f,c){for(var u in c)c.hasOwnProperty(u)&&(f[u]=c[u])};return function(f,c){v(f,c);function u(){this.constructor=f}f.prototype=c===null?Object.create(c):(u.prototype=c.prototype,new u)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(18),l=o(1);function s(v,f){if(Object.keys(v).length!==Object.keys(f).length)return!1;for(var c in v)if(v[c]!==f[c])return!1;return!0}var m=function(v){i(f,v);function f(){return v!==null&&v.apply(this,arguments)||this}return f.formats=function(c){if(c.tagName!==f.tagName)return v.formats.call(this,c)},f.prototype.format=function(c,u){var x=this;c===this.statics.blotName&&!u?(this.children.forEach(function(h){h instanceof a.default||(h=h.wrap(f.blotName,!0)),x.attributes.copy(h)}),this.unwrap()):v.prototype.format.call(this,c,u)},f.prototype.formatAt=function(c,u,x,h){if(this.formats()[x]!=null||l.query(x,l.Scope.ATTRIBUTE)){var g=this.isolate(c,u);g.format(x,h)}else v.prototype.formatAt.call(this,c,u,x,h)},f.prototype.optimize=function(c){v.prototype.optimize.call(this,c);var u=this.formats();if(Object.keys(u).length===0)return this.unwrap();var x=this.next;x instanceof f&&x.prev===this&&s(u,x.formats())&&(x.moveChildren(this),x.remove())},f.blotName="inline",f.scope=l.Scope.INLINE_BLOT,f.tagName="SPAN",f}(a.default);r.default=m},function(n,r,o){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var c in f)f.hasOwnProperty(c)&&(v[c]=f[c])};return function(v,f){m(v,f);function c(){this.constructor=v}v.prototype=f===null?Object.create(f):(c.prototype=f.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(18),l=o(1),s=function(m){i(v,m);function v(){return m!==null&&m.apply(this,arguments)||this}return v.formats=function(f){var c=l.query(v.blotName).tagName;if(f.tagName!==c)return m.formats.call(this,f)},v.prototype.format=function(f,c){l.query(f,l.Scope.BLOCK)!=null&&(f===this.statics.blotName&&!c?this.replaceWith(v.blotName):m.prototype.format.call(this,f,c))},v.prototype.formatAt=function(f,c,u,x){l.query(u,l.Scope.BLOCK)!=null?this.format(u,x):m.prototype.formatAt.call(this,f,c,u,x)},v.prototype.insertAt=function(f,c,u){if(u==null||l.query(c,l.Scope.INLINE)!=null)m.prototype.insertAt.call(this,f,c,u);else{var x=this.split(f),h=l.create(c,u);x.parent.insertBefore(h,x)}},v.prototype.update=function(f,c){navigator.userAgent.match(/Trident/)?this.build():m.prototype.update.call(this,f,c)},v.blotName="block",v.scope=l.Scope.BLOCK_BLOT,v.tagName="P",v}(a.default);r.default=s},function(n,r,o){var i=this&&this.__extends||function(){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,v){m.__proto__=v}||function(m,v){for(var f in v)v.hasOwnProperty(f)&&(m[f]=v[f])};return function(m,v){s(m,v);function f(){this.constructor=m}m.prototype=v===null?Object.create(v):(f.prototype=v.prototype,new f)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(19),l=function(s){i(m,s);function m(){return s!==null&&s.apply(this,arguments)||this}return m.formats=function(v){},m.prototype.format=function(v,f){s.prototype.formatAt.call(this,0,this.length(),v,f)},m.prototype.formatAt=function(v,f,c,u){v===0&&f===this.length()?this.format(c,u):s.prototype.formatAt.call(this,v,f,c,u)},m.prototype.formats=function(){return this.statics.formats(this.domNode)},m}(a.default);r.default=l},function(n,r,o){var i=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,f){v.__proto__=f}||function(v,f){for(var c in f)f.hasOwnProperty(c)&&(v[c]=f[c])};return function(v,f){m(v,f);function c(){this.constructor=v}v.prototype=f===null?Object.create(f):(c.prototype=f.prototype,new c)}}();Object.defineProperty(r,"__esModule",{value:!0});var a=o(19),l=o(1),s=function(m){i(v,m);function v(f){var c=m.call(this,f)||this;return c.text=c.statics.value(c.domNode),c}return v.create=function(f){return document.createTextNode(f)},v.value=function(f){var c=f.data;return c.normalize&&(c=c.normalize()),c},v.prototype.deleteAt=function(f,c){this.domNode.data=this.text=this.text.slice(0,f)+this.text.slice(f+c)},v.prototype.index=function(f,c){return this.domNode===f?c:-1},v.prototype.insertAt=function(f,c,u){u==null?(this.text=this.text.slice(0,f)+c+this.text.slice(f),this.domNode.data=this.text):m.prototype.insertAt.call(this,f,c,u)},v.prototype.length=function(){return this.text.length},v.prototype.optimize=function(f){m.prototype.optimize.call(this,f),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof v&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},v.prototype.position=function(f,c){return[this.domNode,f]},v.prototype.split=function(f,c){if(c===void 0&&(c=!1),!c){if(f===0)return this;if(f===this.length())return this.next}var u=l.create(this.domNode.splitText(f));return this.parent.insertBefore(u,this.next),this.text=this.statics.value(this.domNode),u},v.prototype.update=function(f,c){var u=this;f.some(function(x){return x.type==="characterData"&&x.target===u.domNode})&&(this.text=this.statics.value(this.domNode))},v.prototype.value=function(){return this.text},v.blotName="text",v.scope=l.Scope.INLINE_BLOT,v}(a.default);r.default=s},function(n,r,o){var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,s){return arguments.length>1&&!this.contains(l)==!s?s:a.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,s){return s=s||0,this.substr(s,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,s){var m=this.toString();(typeof s!="number"||!isFinite(s)||Math.floor(s)!==s||s>m.length)&&(s=m.length),s-=l.length;var v=m.indexOf(l,s);return v!==-1&&v===s}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(s){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof s!="function")throw new TypeError("predicate must be a function");for(var m=Object(this),v=m.length>>>0,f=arguments[1],c,u=0;u<v;u++)if(c=m[u],s.call(f,c,u,m))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(n,r){var o=-1,i=1,a=0;function l(y,b,T){if(y==b)return y?[[a,y]]:[];(T<0||y.length<T)&&(T=null);var S=f(y,b),C=y.substring(0,S);y=y.substring(S),b=b.substring(S),S=c(y,b);var P=y.substring(y.length-S);y=y.substring(0,y.length-S),b=b.substring(0,b.length-S);var k=s(y,b);return C&&k.unshift([a,C]),P&&k.push([a,P]),x(k),T!=null&&(k=p(k,T)),k=d(k),k}function s(y,b){var T;if(!y)return[[i,b]];if(!b)return[[o,y]];var S=y.length>b.length?y:b,C=y.length>b.length?b:y,P=S.indexOf(C);if(P!=-1)return T=[[i,S.substring(0,P)],[a,C],[i,S.substring(P+C.length)]],y.length>b.length&&(T[0][0]=T[2][0]=o),T;if(C.length==1)return[[o,y],[i,b]];var k=u(y,b);if(k){var _=k[0],O=k[1],j=k[2],R=k[3],F=k[4],q=l(_,j),V=l(O,R);return q.concat([[a,F]],V)}return m(y,b)}function m(y,b){for(var T=y.length,S=b.length,C=Math.ceil((T+S)/2),P=C,k=2*C,_=new Array(k),O=new Array(k),j=0;j<k;j++)_[j]=-1,O[j]=-1;_[P+1]=0,O[P+1]=0;for(var R=T-S,F=R%2!=0,q=0,V=0,H=0,I=0,M=0;M<C;M++){for(var A=-M+q;A<=M-V;A+=2){var L=P+A,$;A==-M||A!=M&&_[L-1]<_[L+1]?$=_[L+1]:$=_[L-1]+1;for(var W=$-A;$<T&&W<S&&y.charAt($)==b.charAt(W);)$++,W++;if(_[L]=$,$>T)V+=2;else if(W>S)q+=2;else if(F){var K=P+R-A;if(K>=0&&K<k&&O[K]!=-1){var D=T-O[K];if($>=D)return v(y,b,$,W)}}}for(var B=-M+H;B<=M-I;B+=2){var K=P+B,D;B==-M||B!=M&&O[K-1]<O[K+1]?D=O[K+1]:D=O[K-1]+1;for(var G=D-B;D<T&&G<S&&y.charAt(T-D-1)==b.charAt(S-G-1);)D++,G++;if(O[K]=D,D>T)I+=2;else if(G>S)H+=2;else if(!F){var L=P+R-B;if(L>=0&&L<k&&_[L]!=-1){var $=_[L],W=P+$-L;if(D=T-D,$>=D)return v(y,b,$,W)}}}}return[[o,y],[i,b]]}function v(y,b,T,S){var C=y.substring(0,T),P=b.substring(0,S),k=y.substring(T),_=b.substring(S),O=l(C,P),j=l(k,_);return O.concat(j)}function f(y,b){if(!y||!b||y.charAt(0)!=b.charAt(0))return 0;for(var T=0,S=Math.min(y.length,b.length),C=S,P=0;T<C;)y.substring(P,C)==b.substring(P,C)?(T=C,P=T):S=C,C=Math.floor((S-T)/2+T);return C}function c(y,b){if(!y||!b||y.charAt(y.length-1)!=b.charAt(b.length-1))return 0;for(var T=0,S=Math.min(y.length,b.length),C=S,P=0;T<C;)y.substring(y.length-C,y.length-P)==b.substring(b.length-C,b.length-P)?(T=C,P=T):S=C,C=Math.floor((S-T)/2+T);return C}function u(y,b){var T=y.length>b.length?y:b,S=y.length>b.length?b:y;if(T.length<4||S.length*2<T.length)return null;function C(V,H,I){for(var M=V.substring(I,I+Math.floor(V.length/4)),A=-1,L="",$,W,K,D;(A=H.indexOf(M,A+1))!=-1;){var B=f(V.substring(I),H.substring(A)),G=c(V.substring(0,I),H.substring(0,A));L.length<G+B&&(L=H.substring(A-G,A)+H.substring(A,A+B),$=V.substring(0,I-G),W=V.substring(I+B),K=H.substring(0,A-G),D=H.substring(A+B))}return L.length*2>=V.length?[$,W,K,D,L]:null}var P=C(T,S,Math.ceil(T.length/4)),k=C(T,S,Math.ceil(T.length/2)),_;if(!P&&!k)return null;k?P?_=P[4].length>k[4].length?P:k:_=k:_=P;var O,j,R,F;y.length>b.length?(O=_[0],j=_[1],R=_[2],F=_[3]):(R=_[0],F=_[1],O=_[2],j=_[3]);var q=_[4];return[O,j,R,F,q]}function x(y){y.push([a,""]);for(var b=0,T=0,S=0,C="",P="",k;b<y.length;)switch(y[b][0]){case i:S++,P+=y[b][1],b++;break;case o:T++,C+=y[b][1],b++;break;case a:T+S>1?(T!==0&&S!==0&&(k=f(P,C),k!==0&&(b-T-S>0&&y[b-T-S-1][0]==a?y[b-T-S-1][1]+=P.substring(0,k):(y.splice(0,0,[a,P.substring(0,k)]),b++),P=P.substring(k),C=C.substring(k)),k=c(P,C),k!==0&&(y[b][1]=P.substring(P.length-k)+y[b][1],P=P.substring(0,P.length-k),C=C.substring(0,C.length-k))),T===0?y.splice(b-S,T+S,[i,P]):S===0?y.splice(b-T,T+S,[o,C]):y.splice(b-T-S,T+S,[o,C],[i,P]),b=b-T-S+(T?1:0)+(S?1:0)+1):b!==0&&y[b-1][0]==a?(y[b-1][1]+=y[b][1],y.splice(b,1)):b++,S=0,T=0,C="",P="";break}y[y.length-1][1]===""&&y.pop();var _=!1;for(b=1;b<y.length-1;)y[b-1][0]==a&&y[b+1][0]==a&&(y[b][1].substring(y[b][1].length-y[b-1][1].length)==y[b-1][1]?(y[b][1]=y[b-1][1]+y[b][1].substring(0,y[b][1].length-y[b-1][1].length),y[b+1][1]=y[b-1][1]+y[b+1][1],y.splice(b-1,1),_=!0):y[b][1].substring(0,y[b+1][1].length)==y[b+1][1]&&(y[b-1][1]+=y[b+1][1],y[b][1]=y[b][1].substring(y[b+1][1].length)+y[b+1][1],y.splice(b+1,1),_=!0)),b++;_&&x(y)}var h=l;h.INSERT=i,h.DELETE=o,h.EQUAL=a,n.exports=h;function g(y,b){if(b===0)return[a,y];for(var T=0,S=0;S<y.length;S++){var C=y[S];if(C[0]===o||C[0]===a){var P=T+C[1].length;if(b===P)return[S+1,y];if(b<P){y=y.slice();var k=b-T,_=[C[0],C[1].slice(0,k)],O=[C[0],C[1].slice(k)];return y.splice(S,1,_,O),[S+1,y]}else T=P}}throw new Error("cursor_pos is out of bounds!")}function p(y,b){var T=g(y,b),S=T[1],C=T[0],P=S[C],k=S[C+1];if(P==null)return y;if(P[0]!==a)return y;if(k!=null&&P[1]+k[1]===k[1]+P[1])return S.splice(C,2,k,P),w(S,C,2);if(k!=null&&k[1].indexOf(P[1])===0){S.splice(C,2,[k[0],P[1]],[0,P[1]]);var _=k[1].slice(P[1].length);return _.length>0&&S.splice(C+2,0,[k[0],_]),w(S,C,3)}else return y}function d(y){for(var b=!1,T=function(k){return k.charCodeAt(0)>=56320&&k.charCodeAt(0)<=57343},S=function(k){return k.charCodeAt(k.length-1)>=55296&&k.charCodeAt(k.length-1)<=56319},C=2;C<y.length;C+=1)y[C-2][0]===a&&S(y[C-2][1])&&y[C-1][0]===o&&T(y[C-1][1])&&y[C][0]===i&&T(y[C][1])&&(b=!0,y[C-1][1]=y[C-2][1].slice(-1)+y[C-1][1],y[C][1]=y[C-2][1].slice(-1)+y[C][1],y[C-2][1]=y[C-2][1].slice(0,-1));if(!b)return y;for(var P=[],C=0;C<y.length;C+=1)y[C][1].length>0&&P.push(y[C]);return P}function w(y,b,T){for(var S=b+T-1;S>=0&&S>=b-1;S--)if(S+1<y.length){var C=y[S],P=y[S+1];C[0]===P[1]&&y.splice(S,2,[C[0],C[1]+P[1]])}return y}},function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:o,r.shim=o;function o(i){var a=[];for(var l in i)a.push(l);return a}},function(n,r){var o=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=n.exports=o?i:a,r.supported=i;function i(l){return Object.prototype.toString.call(l)=="[object Arguments]"}r.unsupported=a;function a(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 o=Object.prototype.hasOwnProperty,i="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(i=!1));function l(m,v,f){this.fn=m,this.context=v,this.once=f||!1}function s(){this._events=new a,this._eventsCount=0}s.prototype.eventNames=function(){var v=[],f,c;if(this._eventsCount===0)return v;for(c in f=this._events)o.call(f,c)&&v.push(i?c.slice(1):c);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(f)):v},s.prototype.listeners=function(v,f){var c=i?i+v:v,u=this._events[c];if(f)return!!u;if(!u)return[];if(u.fn)return[u.fn];for(var x=0,h=u.length,g=new Array(h);x<h;x++)g[x]=u[x].fn;return g},s.prototype.emit=function(v,f,c,u,x,h){var g=i?i+v:v;if(!this._events[g])return!1;var p=this._events[g],d=arguments.length,w,y;if(p.fn){switch(p.once&&this.removeListener(v,p.fn,void 0,!0),d){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,f),!0;case 3:return p.fn.call(p.context,f,c),!0;case 4:return p.fn.call(p.context,f,c,u),!0;case 5:return p.fn.call(p.context,f,c,u,x),!0;case 6:return p.fn.call(p.context,f,c,u,x,h),!0}for(y=1,w=new Array(d-1);y<d;y++)w[y-1]=arguments[y];p.fn.apply(p.context,w)}else{var b=p.length,T;for(y=0;y<b;y++)switch(p[y].once&&this.removeListener(v,p[y].fn,void 0,!0),d){case 1:p[y].fn.call(p[y].context);break;case 2:p[y].fn.call(p[y].context,f);break;case 3:p[y].fn.call(p[y].context,f,c);break;case 4:p[y].fn.call(p[y].context,f,c,u);break;default:if(!w)for(T=1,w=new Array(d-1);T<d;T++)w[T-1]=arguments[T];p[y].fn.apply(p[y].context,w)}}return!0},s.prototype.on=function(v,f,c){var u=new l(f,c||this),x=i?i+v:v;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],u]:this._events[x].push(u):(this._events[x]=u,this._eventsCount++),this},s.prototype.once=function(v,f,c){var u=new l(f,c||this,!0),x=i?i+v:v;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],u]:this._events[x].push(u):(this._events[x]=u,this._eventsCount++),this},s.prototype.removeListener=function(v,f,c,u){var x=i?i+v:v;if(!this._events[x])return this;if(!f)return--this._eventsCount===0?this._events=new a:delete this._events[x],this;var h=this._events[x];if(h.fn)h.fn===f&&(!u||h.once)&&(!c||h.context===c)&&(--this._eventsCount===0?this._events=new a:delete this._events[x]);else{for(var g=0,p=[],d=h.length;g<d;g++)(h[g].fn!==f||u&&!h[g].once||c&&h[g].context!==c)&&p.push(h[g]);p.length?this._events[x]=p.length===1?p[0]:p:--this._eventsCount===0?this._events=new a:delete this._events[x]}return this},s.prototype.removeAllListeners=function(v){var f;return v?(f=i?i+v:v,this._events[f]&&(--this._eventsCount===0?this._events=new a:delete this._events[f])):(this._events=new a,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=i,s.EventEmitter=s,typeof n<"u"&&(n.exports=s)},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},a=function(){function Z(J,re){var se=[],z=!0,U=!1,X=void 0;try{for(var ie=J[Symbol.iterator](),ye;!(z=(ye=ie.next()).done)&&(se.push(ye.value),!(re&&se.length===re));z=!0);}catch(Le){U=!0,X=Le}finally{try{!z&&ie.return&&ie.return()}finally{if(U)throw X}}return se}return function(J,re){if(Array.isArray(J))return J;if(Symbol.iterator in Object(J))return Z(J,re);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function Z(J,re){for(var se=0;se<re.length;se++){var z=re[se];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(J,z.key,z)}}return function(J,re,se){return re&&Z(J.prototype,re),se&&Z(J,se),J}}(),s=o(3),m=O(s),v=o(2),f=O(v),c=o(0),u=O(c),x=o(5),h=O(x),g=o(10),p=O(g),d=o(9),w=O(d),y=o(36),b=o(37),T=o(13),S=O(T),C=o(26),P=o(38),k=o(39),_=o(40);function O(Z){return Z&&Z.__esModule?Z:{default:Z}}function j(Z,J,re){return J in Z?Object.defineProperty(Z,J,{value:re,enumerable:!0,configurable:!0,writable:!0}):Z[J]=re,Z}function R(Z,J){if(!(Z instanceof J))throw new TypeError("Cannot call a class as a function")}function F(Z,J){if(!Z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return J&&(typeof J=="object"||typeof J=="function")?J:Z}function q(Z,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof J);Z.prototype=Object.create(J&&J.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}}),J&&(Object.setPrototypeOf?Object.setPrototypeOf(Z,J):Z.__proto__=J)}var V=(0,p.default)("quill:clipboard"),H="__ql-matcher",I=[[Node.TEXT_NODE,Oe],[Node.TEXT_NODE,pe],["br",te],[Node.ELEMENT_NODE,pe],[Node.ELEMENT_NODE,Q],[Node.ELEMENT_NODE,ge],[Node.ELEMENT_NODE,Y],[Node.ELEMENT_NODE,Ae],["li",ce],["b",G.bind(G,"bold")],["i",G.bind(G,"italic")],["style",le]],M=[y.AlignAttribute,P.DirectionAttribute].reduce(function(Z,J){return Z[J.keyName]=J,Z},{}),A=[y.AlignStyle,b.BackgroundStyle,C.ColorStyle,P.DirectionStyle,k.FontStyle,_.SizeStyle].reduce(function(Z,J){return Z[J.keyName]=J,Z},{}),L=function(Z){q(J,Z);function J(re,se){R(this,J);var z=F(this,(J.__proto__||Object.getPrototypeOf(J)).call(this,re,se));return z.quill.root.addEventListener("paste",z.onPaste.bind(z)),z.container=z.quill.addContainer("ql-clipboard"),z.container.setAttribute("contenteditable",!0),z.container.setAttribute("tabindex",-1),z.matchers=[],I.concat(z.options.matchers).forEach(function(U){var X=a(U,2),ie=X[0],ye=X[1];!se.matchVisual&&ye===ge||z.addMatcher(ie,ye)}),z}return l(J,[{key:"addMatcher",value:function(se,z){this.matchers.push([se,z])}},{key:"convert",value:function(se){if(typeof se=="string")return this.container.innerHTML=se.replace(/\>\r?\n +\</g,"><"),this.convert();var z=this.quill.getFormat(this.quill.selection.savedRange.index);if(z[S.default.blotName]){var U=this.container.innerText;return this.container.innerHTML="",new f.default().insert(U,j({},S.default.blotName,z[S.default.blotName]))}var X=this.prepareMatching(),ie=a(X,2),ye=ie[0],Le=ie[1],Ne=B(this.container,ye,Le);return K(Ne,` `)&&Ne.ops[Ne.ops.length-1].attributes==null&&(Ne=Ne.compose(new f.default().retain(Ne.length()-1).delete(1))),V.log("convert",this.container.innerHTML,Ne),this.container.innerHTML="",Ne}},{key:"dangerouslyPasteHTML",value:function(se,z){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.default.sources.API;if(typeof se=="string")this.quill.setContents(this.convert(se),z),this.quill.setSelection(0,h.default.sources.SILENT);else{var X=this.convert(z);this.quill.updateContents(new f.default().retain(se).concat(X),U),this.quill.setSelection(se+X.length(),h.default.sources.SILENT)}}},{key:"onPaste",value:function(se){var z=this;if(!(se.defaultPrevented||!this.quill.isEnabled())){var U=this.quill.getSelection(),X=new f.default().retain(U.index),ie=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(h.default.sources.SILENT),setTimeout(function(){X=X.concat(z.convert()).delete(U.length),z.quill.updateContents(X,h.default.sources.USER),z.quill.setSelection(X.length()-U.length,h.default.sources.SILENT),z.quill.scrollingContainer.scrollTop=ie,z.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var se=this,z=[],U=[];return this.matchers.forEach(function(X){var ie=a(X,2),ye=ie[0],Le=ie[1];switch(ye){case Node.TEXT_NODE:U.push(Le);break;case Node.ELEMENT_NODE:z.push(Le);break;default:[].forEach.call(se.container.querySelectorAll(ye),function(Ne){Ne[H]=Ne[H]||[],Ne[H].push(Le)});break}}),[z,U]}}]),J}(w.default);L.DEFAULTS={matchers:[],matchVisual:!0};function $(Z,J,re){return(typeof J>"u"?"undefined":i(J))==="object"?Object.keys(J).reduce(function(se,z){return $(se,z,J[z])},Z):Z.reduce(function(se,z){return z.attributes&&z.attributes[J]?se.push(z):se.insert(z.insert,(0,m.default)({},j({},J,re),z.attributes))},new f.default)}function W(Z){if(Z.nodeType!==Node.ELEMENT_NODE)return{};var J="__ql-computed-style";return Z[J]||(Z[J]=window.getComputedStyle(Z))}function K(Z,J){for(var re="",se=Z.ops.length-1;se>=0&&re.length<J.length;--se){var z=Z.ops[se];if(typeof z.insert!="string")break;re=z.insert+re}return re.slice(-1*J.length)===J}function D(Z){if(Z.childNodes.length===0)return!1;var J=W(Z);return["block","list-item"].indexOf(J.display)>-1}function B(Z,J,re){return Z.nodeType===Z.TEXT_NODE?re.reduce(function(se,z){return z(Z,se)},new f.default):Z.nodeType===Z.ELEMENT_NODE?[].reduce.call(Z.childNodes||[],function(se,z){var U=B(z,J,re);return z.nodeType===Z.ELEMENT_NODE&&(U=J.reduce(function(X,ie){return ie(z,X)},U),U=(z[H]||[]).reduce(function(X,ie){return ie(z,X)},U)),se.concat(U)},new f.default):new f.default}function G(Z,J,re){return $(re,Z,!0)}function Y(Z,J){var re=u.default.Attributor.Attribute.keys(Z),se=u.default.Attributor.Class.keys(Z),z=u.default.Attributor.Style.keys(Z),U={};return re.concat(se).concat(z).forEach(function(X){var ie=u.default.query(X,u.default.Scope.ATTRIBUTE);ie!=null&&(U[ie.attrName]=ie.value(Z),U[ie.attrName])||(ie=M[X],ie!=null&&(ie.attrName===X||ie.keyName===X)&&(U[ie.attrName]=ie.value(Z)||void 0),ie=A[X],ie!=null&&(ie.attrName===X||ie.keyName===X)&&(ie=A[X],U[ie.attrName]=ie.value(Z)||void 0))}),Object.keys(U).length>0&&(J=$(J,U)),J}function Q(Z,J){var re=u.default.query(Z);if(re==null)return J;if(re.prototype instanceof u.default.Embed){var se={},z=re.value(Z);z!=null&&(se[re.blotName]=z,J=new f.default().insert(se,re.formats(Z)))}else typeof re.formats=="function"&&(J=$(J,re.blotName,re.formats(Z)));return J}function te(Z,J){return K(J,` `)||J.insert(` `),J}function le(){return new f.default}function ce(Z,J){var re=u.default.query(Z);if(re==null||re.blotName!=="list-item"||!K(J,` `))return J;for(var se=-1,z=Z.parentNode;!z.classList.contains("ql-clipboard");)(u.default.query(z)||{}).blotName==="list"&&(se+=1),z=z.parentNode;return se<=0?J:J.compose(new f.default().retain(J.length()-1).retain(1,{indent:se}))}function pe(Z,J){return K(J,` `)||(D(Z)||J.length()>0&&Z.nextSibling&&D(Z.nextSibling))&&J.insert(` `),J}function ge(Z,J){if(D(Z)&&Z.nextElementSibling!=null&&!K(J,` `)){var re=Z.offsetHeight+parseFloat(W(Z).marginTop)+parseFloat(W(Z).marginBottom);Z.nextElementSibling.offsetTop>Z.offsetTop+re*1.5&&J.insert(` `)}return J}function Ae(Z,J){var re={},se=Z.style||{};return se.fontStyle&&W(Z).fontStyle==="italic"&&(re.italic=!0),se.fontWeight&&(W(Z).fontWeight.startsWith("bold")||parseInt(W(Z).fontWeight)>=700)&&(re.bold=!0),Object.keys(re).length>0&&(J=$(J,re)),parseFloat(se.textIndent||0)>0&&(J=new f.default().insert(" ").concat(J)),J}function Oe(Z,J){var re=Z.data;if(Z.parentNode.tagName==="O:P")return J.insert(re.trim());if(re.trim().length===0&&Z.parentNode.classList.contains("ql-clipboard"))return J;if(!W(Z.parentNode).whiteSpace.startsWith("pre")){var se=function(U,X){return X=X.replace(/[^\u00a0]/g,""),X.length<1&&U?" ":X};re=re.replace(/\r\n/g," ").replace(/\n/g," "),re=re.replace(/\s\s+/g,se.bind(se,!0)),(Z.previousSibling==null&&D(Z.parentNode)||Z.previousSibling!=null&&D(Z.previousSibling))&&(re=re.replace(/^\s+/,se.bind(se,!1))),(Z.nextSibling==null&&D(Z.parentNode)||Z.nextSibling!=null&&D(Z.nextSibling))&&(re=re.replace(/\s+$/,se.bind(se,!1)))}return J.insert(re)}r.default=L,r.matchAttributor=Y,r.matchBlot=Q,r.matchNewline=pe,r.matchSpacing=ge,r.matchText=Oe},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function x(h,g){for(var p=0;p<g.length;p++){var d=g[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,g,p){return g&&x(h.prototype,g),p&&x(h,p),h}}(),a=function x(h,g,p){h===null&&(h=Function.prototype);var d=Object.getOwnPropertyDescriptor(h,g);if(d===void 0){var w=Object.getPrototypeOf(h);return w===null?void 0:x(w,g,p)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(p)}},l=o(6),s=m(l);function m(x){return x&&x.__esModule?x:{default:x}}function v(x,h){if(!(x instanceof h))throw new TypeError("Cannot call a class as a function")}function f(x,h){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:x}function c(x,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);x.prototype=Object.create(h&&h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(x,h):x.__proto__=h)}var u=function(x){c(h,x);function h(){return v(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return i(h,[{key:"optimize",value:function(p){a(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"optimize",this).call(this,p),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),h}(s.default);u.blotName="bold",u.tagName=["STRONG","B"],r.default=u},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var i=function(){function _(O,j){var R=[],F=!0,q=!1,V=void 0;try{for(var H=O[Symbol.iterator](),I;!(F=(I=H.next()).done)&&(R.push(I.value),!(j&&R.length===j));F=!0);}catch(M){q=!0,V=M}finally{try{!F&&H.return&&H.return()}finally{if(q)throw V}}return R}return function(O,j){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return _(O,j);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function _(O,j){for(var R=0;R<j.length;R++){var F=j[R];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(O,F.key,F)}}return function(O,j,R){return j&&_(O.prototype,j),R&&_(O,R),O}}(),l=o(2),s=p(l),m=o(0),v=p(m),f=o(5),c=p(f),u=o(10),x=p(u),h=o(9),g=p(h);function p(_){return _&&_.__esModule?_:{default:_}}function d(_,O,j){return O in _?Object.defineProperty(_,O,{value:j,enumerable:!0,configurable:!0,writable:!0}):_[O]=j,_}function w(_,O){if(!(_ instanceof O))throw new TypeError("Cannot call a class as a function")}function y(_,O){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:_}function b(_,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);_.prototype=Object.create(O&&O.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(_,O):_.__proto__=O)}var T=(0,x.default)("quill:toolbar"),S=function(_){b(O,_);function O(j,R){w(this,O);var F=y(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,j,R));if(Array.isArray(F.options.container)){var q=document.createElement("div");P(q,F.options.container),j.container.parentNode.insertBefore(q,j.container),F.container=q}else typeof F.options.container=="string"?F.container=document.querySelector(F.options.container):F.container=F.options.container;if(!(F.container instanceof HTMLElement)){var V;return V=T.error("Container required for toolbar",F.options),y(F,V)}return F.container.classList.add("ql-toolbar"),F.controls=[],F.handlers={},Object.keys(F.options.handlers).forEach(function(H){F.addHandler(H,F.options.handlers[H])}),[].forEach.call(F.container.querySelectorAll("button, select"),function(H){F.attach(H)}),F.quill.on(c.default.events.EDITOR_CHANGE,function(H,I){H===c.default.events.SELECTION_CHANGE&&F.update(I)}),F.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var H=F.quill.selection.getRange(),I=i(H,1),M=I[0];F.update(M)}),F}return a(O,[{key:"addHandler",value:function(R,F){this.handlers[R]=F}},{key:"attach",value:function(R){var F=this,q=[].find.call(R.classList,function(H){return H.indexOf("ql-")===0});if(q){if(q=q.slice(3),R.tagName==="BUTTON"&&R.setAttribute("type","button"),this.handlers[q]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[q]==null){T.warn("ignoring attaching to disabled format",q,R);return}if(v.default.query(q)==null){T.warn("ignoring attaching to nonexistent format",q,R);return}}var V=R.tagName==="SELECT"?"change":"click";R.addEventListener(V,function(H){var I=void 0;if(R.tagName==="SELECT"){if(R.selectedIndex<0)return;var M=R.options[R.selectedIndex];M.hasAttribute("selected")?I=!1:I=M.value||!1}else R.classList.contains("ql-active")?I=!1:I=R.value||!R.hasAttribute("value"),H.preventDefault();F.quill.focus();var A=F.quill.selection.getRange(),L=i(A,1),$=L[0];if(F.handlers[q]!=null)F.handlers[q].call(F,I);else if(v.default.query(q).prototype instanceof v.default.Embed){if(I=prompt("Enter "+q),!I)return;F.quill.updateContents(new s.default().retain($.index).delete($.length).insert(d({},q,I)),c.default.sources.USER)}else F.quill.format(q,I,c.default.sources.USER);F.update($)}),this.controls.push([q,R])}}},{key:"update",value:function(R){var F=R==null?{}:this.quill.getFormat(R);this.controls.forEach(function(q){var V=i(q,2),H=V[0],I=V[1];if(I.tagName==="SELECT"){var M=void 0;if(R==null)M=null;else if(F[H]==null)M=I.querySelector("option[selected]");else if(!Array.isArray(F[H])){var A=F[H];typeof A=="string"&&(A=A.replace(/\"/g,'\\"')),M=I.querySelector('option[value="'+A+'"]')}M==null?(I.value="",I.selectedIndex=-1):M.selected=!0}else if(R==null)I.classList.remove("ql-active");else if(I.hasAttribute("value")){var L=F[H]===I.getAttribute("value")||F[H]!=null&&F[H].toString()===I.getAttribute("value")||F[H]==null&&!I.getAttribute("value");I.classList.toggle("ql-active",L)}else I.classList.toggle("ql-active",F[H]!=null)})}}]),O}(g.default);S.DEFAULTS={};function C(_,O,j){var R=document.createElement("button");R.setAttribute("type","button"),R.classList.add("ql-"+O),j!=null&&(R.value=j),_.appendChild(R)}function P(_,O){Array.isArray(O[0])||(O=[O]),O.forEach(function(j){var R=document.createElement("span");R.classList.add("ql-formats"),j.forEach(function(F){if(typeof F=="string")C(R,F);else{var q=Object.keys(F)[0],V=F[q];Array.isArray(V)?k(R,q,V):C(R,q,V)}}),_.appendChild(R)})}function k(_,O,j){var R=document.createElement("select");R.classList.add("ql-"+O),j.forEach(function(F){var q=document.createElement("option");F!==!1?q.setAttribute("value",F):q.setAttribute("selected","selected"),R.appendChild(q)}),_.appendChild(R)}S.DEFAULTS={container:null,handlers:{clean:function(){var O=this,j=this.quill.getSelection();if(j!=null)if(j.length==0){var R=this.quill.getFormat();Object.keys(R).forEach(function(F){v.default.query(F,v.default.Scope.INLINE)!=null&&O.quill.format(F,!1)})}else this.quill.removeFormat(j,c.default.sources.USER)},direction:function(O){var j=this.quill.getFormat().align;O==="rtl"&&j==null?this.quill.format("align","right",c.default.sources.USER):!O&&j==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",O,c.default.sources.USER)},indent:function(O){var j=this.quill.getSelection(),R=this.quill.getFormat(j),F=parseInt(R.indent||0);if(O==="+1"||O==="-1"){var q=O==="+1"?1:-1;R.direction==="rtl"&&(q*=-1),this.quill.format("indent",F+q,c.default.sources.USER)}},link:function(O){O===!0&&(O=prompt("Enter link URL:")),this.quill.format("link",O,c.default.sources.USER)},list:function(O){var j=this.quill.getSelection(),R=this.quill.getFormat(j);O==="check"?R.list==="checked"||R.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",O,c.default.sources.USER)}}},r.default=S,r.addControls=P},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,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function x(h,g){for(var p=0;p<g.length;p++){var d=g[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,g,p){return g&&x(h.prototype,g),p&&x(h,p),h}}(),a=function x(h,g,p){h===null&&(h=Function.prototype);var d=Object.getOwnPropertyDescriptor(h,g);if(d===void 0){var w=Object.getPrototypeOf(h);return w===null?void 0:x(w,g,p)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(p)}},l=o(28),s=m(l);function m(x){return x&&x.__esModule?x:{default:x}}function v(x,h){if(!(x instanceof h))throw new TypeError("Cannot call a class as a function")}function f(x,h){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:x}function c(x,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);x.prototype=Object.create(h&&h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(x,h):x.__proto__=h)}var u=function(x){c(h,x);function h(g,p){v(this,h);var d=f(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,g));return d.label.innerHTML=p,d.container.classList.add("ql-color-picker"),[].slice.call(d.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(w){w.classList.add("ql-primary")}),d}return i(h,[{key:"buildItem",value:function(p){var d=a(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"buildItem",this).call(this,p);return d.style.backgroundColor=p.getAttribute("value")||"",d}},{key:"selectItem",value:function(p,d){a(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"selectItem",this).call(this,p,d);var w=this.label.querySelector(".ql-color-label"),y=p&&p.getAttribute("data-value")||"";w&&(w.tagName==="line"?w.style.stroke=y:w.style.fill=y)}}]),h}(s.default);r.default=u},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function x(h,g){for(var p=0;p<g.length;p++){var d=g[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,g,p){return g&&x(h.prototype,g),p&&x(h,p),h}}(),a=function x(h,g,p){h===null&&(h=Function.prototype);var d=Object.getOwnPropertyDescriptor(h,g);if(d===void 0){var w=Object.getPrototypeOf(h);return w===null?void 0:x(w,g,p)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(p)}},l=o(28),s=m(l);function m(x){return x&&x.__esModule?x:{default:x}}function v(x,h){if(!(x instanceof h))throw new TypeError("Cannot call a class as a function")}function f(x,h){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:x}function c(x,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);x.prototype=Object.create(h&&h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(x,h):x.__proto__=h)}var u=function(x){c(h,x);function h(g,p){v(this,h);var d=f(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,g));return d.container.classList.add("ql-icon-picker"),[].forEach.call(d.container.querySelectorAll(".ql-picker-item"),function(w){w.innerHTML=p[w.getAttribute("data-value")||""]}),d.defaultItem=d.container.querySelector(".ql-selected"),d.selectItem(d.defaultItem),d}return i(h,[{key:"selectItem",value:function(p,d){a(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"selectItem",this).call(this,p,d),p=p||this.defaultItem,this.label.innerHTML=p.innerHTML}}]),h}(s.default);r.default=u},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function s(m,v){for(var f=0;f<v.length;f++){var c=v[f];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(m,c.key,c)}}return function(m,v,f){return v&&s(m.prototype,v),f&&s(m,f),m}}();function a(s,m){if(!(s instanceof m))throw new TypeError("Cannot call a class as a function")}var l=function(){function s(m,v){var f=this;a(this,s),this.quill=m,this.boundsContainer=v||document.body,this.root=m.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 i(s,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(v){var f=v.left+v.width/2-this.root.offsetWidth/2,c=v.bottom+this.quill.root.scrollTop;this.root.style.left=f+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var u=this.boundsContainer.getBoundingClientRect(),x=this.root.getBoundingClientRect(),h=0;if(x.right>u.right&&(h=u.right-x.right,this.root.style.left=f+h+"px"),x.left<u.left&&(h=u.left-x.left,this.root.style.left=f+h+"px"),x.bottom>u.bottom){var g=x.bottom-x.top,p=v.bottom-v.top+g;this.root.style.top=c-p+"px",this.root.classList.add("ql-flip")}return h}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),s}();r.default=l},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function k(_,O){var j=[],R=!0,F=!1,q=void 0;try{for(var V=_[Symbol.iterator](),H;!(R=(H=V.next()).done)&&(j.push(H.value),!(O&&j.length===O));R=!0);}catch(I){F=!0,q=I}finally{try{!R&&V.return&&V.return()}finally{if(F)throw q}}return j}return function(_,O){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return k(_,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function k(_,O,j){_===null&&(_=Function.prototype);var R=Object.getOwnPropertyDescriptor(_,O);if(R===void 0){var F=Object.getPrototypeOf(_);return F===null?void 0:k(F,O,j)}else{if("value"in R)return R.value;var q=R.get;return q===void 0?void 0:q.call(j)}},l=function(){function k(_,O){for(var j=0;j<O.length;j++){var R=O[j];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(_,R.key,R)}}return function(_,O,j){return O&&k(_.prototype,O),j&&k(_,j),_}}(),s=o(3),m=w(s),v=o(8),f=w(v),c=o(43),u=w(c),x=o(27),h=w(x),g=o(15),p=o(41),d=w(p);function w(k){return k&&k.__esModule?k:{default:k}}function y(k,_){if(!(k instanceof _))throw new TypeError("Cannot call a class as a function")}function b(k,_){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:k}function T(k,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);k.prototype=Object.create(_&&_.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(k,_):k.__proto__=_)}var S=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],C=function(k){T(_,k);function _(O,j){y(this,_),j.modules.toolbar!=null&&j.modules.toolbar.container==null&&(j.modules.toolbar.container=S);var R=b(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,O,j));return R.quill.container.classList.add("ql-snow"),R}return l(_,[{key:"extendToolbar",value:function(j){j.container.classList.add("ql-snow"),this.buildButtons([].slice.call(j.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(j.container.querySelectorAll("select")),d.default),this.tooltip=new P(this.quill,this.options.bounds),j.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(R,F){j.handlers.link.call(j,!F.format.link)})}}]),_}(u.default);C.DEFAULTS=(0,m.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(_){if(_){var O=this.quill.getSelection();if(O==null||O.length==0)return;var j=this.quill.getText(O);/^\S+@\S+\.\S+$/.test(j)&&j.indexOf("mailto:")!==0&&(j="mailto:"+j);var R=this.quill.theme.tooltip;R.edit("link",j)}else this.quill.format("link",!1)}}}}});var P=function(k){T(_,k);function _(O,j){y(this,_);var R=b(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,O,j));return R.preview=R.root.querySelector("a.ql-preview"),R}return l(_,[{key:"listen",value:function(){var j=this;a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(R){j.root.classList.contains("ql-editing")?j.save():j.edit("link",j.preview.textContent),R.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(R){if(j.linkRange!=null){var F=j.linkRange;j.restoreFocus(),j.quill.formatText(F,"link",!1,f.default.sources.USER),delete j.linkRange}R.preventDefault(),j.hide()}),this.quill.on(f.default.events.SELECTION_CHANGE,function(R,F,q){if(R!=null){if(R.length===0&&q===f.default.sources.USER){var V=j.quill.scroll.descendant(h.default,R.index),H=i(V,2),I=H[0],M=H[1];if(I!=null){j.linkRange=new g.Range(R.index-M,I.length());var A=h.default.formats(I.domNode);j.preview.textContent=A,j.preview.setAttribute("href",A),j.show(),j.position(j.quill.getBounds(j.linkRange));return}}else delete j.linkRange;j.hide()}})}},{key:"show",value:function(){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),_}(c.BaseTooltip);P.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=C},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(29),a=z(i),l=o(36),s=o(38),m=o(64),v=o(65),f=z(v),c=o(66),u=z(c),x=o(67),h=z(x),g=o(37),p=o(26),d=o(39),w=o(40),y=o(56),b=z(y),T=o(68),S=z(T),C=o(27),P=z(C),k=o(69),_=z(k),O=o(70),j=z(O),R=o(71),F=z(R),q=o(72),V=z(q),H=o(73),I=z(H),M=o(13),A=z(M),L=o(74),$=z(L),W=o(75),K=z(W),D=o(57),B=z(D),G=o(41),Y=z(G),Q=o(28),te=z(Q),le=o(59),ce=z(le),pe=o(60),ge=z(pe),Ae=o(61),Oe=z(Ae),Z=o(108),J=z(Z),re=o(62),se=z(re);function z(U){return U&&U.__esModule?U:{default:U}}a.default.register({"attributors/attribute/direction":s.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":s.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":w.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":g.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":s.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":w.SizeStyle},!0),a.default.register({"formats/align":l.AlignClass,"formats/direction":s.DirectionClass,"formats/indent":m.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":d.FontClass,"formats/size":w.SizeClass,"formats/blockquote":f.default,"formats/code-block":A.default,"formats/header":u.default,"formats/list":h.default,"formats/bold":b.default,"formats/code":M.Code,"formats/italic":S.default,"formats/link":P.default,"formats/script":_.default,"formats/strike":j.default,"formats/underline":F.default,"formats/image":V.default,"formats/video":I.default,"formats/list/item":x.ListItem,"modules/formula":$.default,"modules/syntax":K.default,"modules/toolbar":B.default,"themes/bubble":J.default,"themes/snow":se.default,"ui/icons":Y.default,"ui/picker":te.default,"ui/icon-picker":ge.default,"ui/color-picker":ce.default,"ui/tooltip":Oe.default},!0),r.default=a.default},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var i=function(){function h(g,p){for(var d=0;d<p.length;d++){var w=p[d];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(g,w.key,w)}}return function(g,p,d){return p&&h(g.prototype,p),d&&h(g,d),g}}(),a=function h(g,p,d){g===null&&(g=Function.prototype);var w=Object.getOwnPropertyDescriptor(g,p);if(w===void 0){var y=Object.getPrototypeOf(g);return y===null?void 0:h(y,p,d)}else{if("value"in w)return w.value;var b=w.get;return b===void 0?void 0:b.call(d)}},l=o(0),s=m(l);function m(h){return h&&h.__esModule?h:{default:h}}function v(h,g){if(!(h instanceof g))throw new TypeError("Cannot call a class as a function")}function f(h,g){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:h}function c(h,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);h.prototype=Object.create(g&&g.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(h,g):h.__proto__=g)}var u=function(h){c(g,h);function g(){return v(this,g),f(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return i(g,[{key:"add",value:function(d,w){if(w==="+1"||w==="-1"){var y=this.value(d)||0;w=w==="+1"?y+1:y-1}return w===0?(this.remove(d),!0):a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"add",this).call(this,d,w)}},{key:"canAdd",value:function(d,w){return a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,d,w)||a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,d,parseInt(w))}},{key:"value",value:function(d){return parseInt(a(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,d))||void 0}}]),g}(s.default.Attributor.Class),x=new u("indent","ql-indent",{scope:s.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=x},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(4),a=l(i);function l(c){return c&&c.__esModule?c:{default:c}}function s(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function m(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function v(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var f=function(c){v(u,c);function u(){return s(this,u),m(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(a.default);f.blotName="blockquote",f.tagName="blockquote",r.default=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function u(x,h){for(var g=0;g<h.length;g++){var p=h[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(x,p.key,p)}}return function(x,h,g){return h&&u(x.prototype,h),g&&u(x,g),x}}(),a=o(4),l=s(a);function s(u){return u&&u.__esModule?u:{default:u}}function m(u,x){if(!(u instanceof x))throw new TypeError("Cannot call a class as a function")}function v(u,x){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:u}function f(u,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);u.prototype=Object.create(x&&x.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(u,x):u.__proto__=x)}var c=function(u){f(x,u);function x(){return m(this,x),v(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return i(x,null,[{key:"formats",value:function(g){return this.tagName.indexOf(g.tagName)+1}}]),x}(l.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],r.default=c},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var i=function(){function y(b,T){for(var S=0;S<T.length;S++){var C=T[S];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(b,C.key,C)}}return function(b,T,S){return T&&y(b.prototype,T),S&&y(b,S),b}}(),a=function y(b,T,S){b===null&&(b=Function.prototype);var C=Object.getOwnPropertyDescriptor(b,T);if(C===void 0){var P=Object.getPrototypeOf(b);return P===null?void 0:y(P,T,S)}else{if("value"in C)return C.value;var k=C.get;return k===void 0?void 0:k.call(S)}},l=o(0),s=u(l),m=o(4),v=u(m),f=o(25),c=u(f);function u(y){return y&&y.__esModule?y:{default:y}}function x(y,b,T){return b in y?Object.defineProperty(y,b,{value:T,enumerable:!0,configurable:!0,writable:!0}):y[b]=T,y}function h(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function g(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function p(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var d=function(y){p(b,y);function b(){return h(this,b),g(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return i(b,[{key:"format",value:function(S,C){S===w.blotName&&!C?this.replaceWith(s.default.create(this.statics.scope)):a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,S,C)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(S,C){return this.parent.isolate(this.offset(this.parent),this.length()),S===this.parent.statics.blotName?(this.parent.replaceWith(S,C),this):(this.parent.unwrap(),a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"replaceWith",this).call(this,S,C))}}],[{key:"formats",value:function(S){return S.tagName===this.tagName?void 0:a(b.__proto__||Object.getPrototypeOf(b),"formats",this).call(this,S)}}]),b}(v.default);d.blotName="list-item",d.tagName="LI";var w=function(y){p(b,y),i(b,null,[{key:"create",value:function(S){var C=S==="ordered"?"OL":"UL",P=a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,C);return(S==="checked"||S==="unchecked")&&P.setAttribute("data-checked",S==="checked"),P}},{key:"formats",value:function(S){if(S.tagName==="OL")return"ordered";if(S.tagName==="UL")return S.hasAttribute("data-checked")?S.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function b(T){h(this,b);var S=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,T)),C=function(k){if(k.target.parentNode===T){var _=S.statics.formats(T),O=s.default.find(k.target);_==="checked"?O.format("list","unchecked"):_==="unchecked"&&O.format("list","checked")}};return T.addEventListener("touchstart",C),T.addEventListener("mousedown",C),S}return i(b,[{key:"format",value:function(S,C){this.children.length>0&&this.children.tail.format(S,C)}},{key:"formats",value:function(){return x({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(S,C){if(S instanceof d)a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,S,C);else{var P=C==null?this.length():C.offset(this),k=this.split(P);k.parent.insertBefore(S,k)}}},{key:"optimize",value:function(S){a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,S);var C=this.next;C!=null&&C.prev===this&&C.statics.blotName===this.statics.blotName&&C.domNode.tagName===this.domNode.tagName&&C.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(C.moveChildren(this),C.remove())}},{key:"replace",value:function(S){if(S.statics.blotName!==this.statics.blotName){var C=s.default.create(this.statics.defaultChild);S.moveChildren(C),this.appendChild(C)}a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"replace",this).call(this,S)}}]),b}(c.default);w.blotName="list",w.scope=s.default.Scope.BLOCK_BLOT,w.tagName=["OL","UL"],w.defaultChild="list-item",w.allowedChildren=[d],r.ListItem=d,r.default=w},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(56),a=l(i);function l(c){return c&&c.__esModule?c:{default:c}}function s(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function m(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function v(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var f=function(c){v(u,c);function u(){return s(this,u),m(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(a.default);f.blotName="italic",f.tagName=["EM","I"],r.default=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function x(h,g){for(var p=0;p<g.length;p++){var d=g[p];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(h,d.key,d)}}return function(h,g,p){return g&&x(h.prototype,g),p&&x(h,p),h}}(),a=function x(h,g,p){h===null&&(h=Function.prototype);var d=Object.getOwnPropertyDescriptor(h,g);if(d===void 0){var w=Object.getPrototypeOf(h);return w===null?void 0:x(w,g,p)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(p)}},l=o(6),s=m(l);function m(x){return x&&x.__esModule?x:{default:x}}function v(x,h){if(!(x instanceof h))throw new TypeError("Cannot call a class as a function")}function f(x,h){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:x}function c(x,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);x.prototype=Object.create(h&&h.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(x,h):x.__proto__=h)}var u=function(x){c(h,x);function h(){return v(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return i(h,null,[{key:"create",value:function(p){return p==="super"?document.createElement("sup"):p==="sub"?document.createElement("sub"):a(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this,p)}},{key:"formats",value:function(p){if(p.tagName==="SUB")return"sub";if(p.tagName==="SUP")return"super"}}]),h}(s.default);u.blotName="script",u.tagName=["SUB","SUP"],r.default=u},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(6),a=l(i);function l(c){return c&&c.__esModule?c:{default:c}}function s(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function m(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function v(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var f=function(c){v(u,c);function u(){return s(this,u),m(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(a.default);f.blotName="strike",f.tagName="S",r.default=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o(6),a=l(i);function l(c){return c&&c.__esModule?c:{default:c}}function s(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function m(c,u){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:c}function v(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(c,u):c.__proto__=u)}var f=function(c){v(u,c);function u(){return s(this,u),m(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u}(a.default);f.blotName="underline",f.tagName="U",r.default=f},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function g(p,d){for(var w=0;w<d.length;w++){var y=d[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return function(p,d,w){return d&&g(p.prototype,d),w&&g(p,w),p}}(),a=function g(p,d,w){p===null&&(p=Function.prototype);var y=Object.getOwnPropertyDescriptor(p,d);if(y===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:g(b,d,w)}else{if("value"in y)return y.value;var T=y.get;return T===void 0?void 0:T.call(w)}},l=o(0),s=v(l),m=o(27);function v(g){return g&&g.__esModule?g:{default:g}}function f(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function c(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function u(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var x=["alt","height","width"],h=function(g){u(p,g);function p(){return f(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return i(p,[{key:"format",value:function(w,y){x.indexOf(w)>-1?y?this.domNode.setAttribute(w,y):this.domNode.removeAttribute(w):a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"format",this).call(this,w,y)}}],[{key:"create",value:function(w){var y=a(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,w);return typeof w=="string"&&y.setAttribute("src",this.sanitize(w)),y}},{key:"formats",value:function(w){return x.reduce(function(y,b){return w.hasAttribute(b)&&(y[b]=w.getAttribute(b)),y},{})}},{key:"match",value:function(w){return/\.(jpe?g|gif|png)$/.test(w)||/^data:image\/.+;base64/.test(w)}},{key:"sanitize",value:function(w){return(0,m.sanitize)(w,["http","https","data"])?w:"//:0"}},{key:"value",value:function(w){return w.getAttribute("src")}}]),p}(s.default.Embed);h.blotName="image",h.tagName="IMG",r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function g(p,d){for(var w=0;w<d.length;w++){var y=d[w];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return function(p,d,w){return d&&g(p.prototype,d),w&&g(p,w),p}}(),a=function g(p,d,w){p===null&&(p=Function.prototype);var y=Object.getOwnPropertyDescriptor(p,d);if(y===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:g(b,d,w)}else{if("value"in y)return y.value;var T=y.get;return T===void 0?void 0:T.call(w)}},l=o(4),s=o(27),m=v(s);function v(g){return g&&g.__esModule?g:{default:g}}function f(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function c(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function u(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var x=["height","width"],h=function(g){u(p,g);function p(){return f(this,p),c(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return i(p,[{key:"format",value:function(w,y){x.indexOf(w)>-1?y?this.domNode.setAttribute(w,y):this.domNode.removeAttribute(w):a(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"format",this).call(this,w,y)}}],[{key:"create",value:function(w){var y=a(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,w);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(w)),y}},{key:"formats",value:function(w){return x.reduce(function(y,b){return w.hasAttribute(b)&&(y[b]=w.getAttribute(b)),y},{})}},{key:"sanitize",value:function(w){return m.default.sanitize(w)}},{key:"value",value:function(w){return w.getAttribute("src")}}]),p}(l.BlockEmbed);h.blotName="video",h.className="ql-video",h.tagName="IFRAME",r.default=h},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var i=function(){function w(y,b){for(var T=0;T<b.length;T++){var S=b[T];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(y,S.key,S)}}return function(y,b,T){return b&&w(y.prototype,b),T&&w(y,T),y}}(),a=function w(y,b,T){y===null&&(y=Function.prototype);var S=Object.getOwnPropertyDescriptor(y,b);if(S===void 0){var C=Object.getPrototypeOf(y);return C===null?void 0:w(C,b,T)}else{if("value"in S)return S.value;var P=S.get;return P===void 0?void 0:P.call(T)}},l=o(35),s=u(l),m=o(5),v=u(m),f=o(9),c=u(f);function u(w){return w&&w.__esModule?w:{default:w}}function x(w,y){if(!(w instanceof y))throw new TypeError("Cannot call a class as a function")}function h(w,y){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:w}function g(w,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);w.prototype=Object.create(y&&y.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(w,y):w.__proto__=y)}var p=function(w){g(y,w);function y(){return x(this,y),h(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return i(y,null,[{key:"create",value:function(T){var S=a(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,T);return typeof T=="string"&&(window.katex.render(T,S,{throwOnError:!1,errorColor:"#f00"}),S.setAttribute("data-value",T)),S}},{key:"value",value:function(T){return T.getAttribute("data-value")}}]),y}(s.default);p.blotName="formula",p.className="ql-formula",p.tagName="SPAN";var d=function(w){g(y,w),i(y,null,[{key:"register",value:function(){v.default.register(p,!0)}}]);function y(){x(this,y);var b=h(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return b}return y}(c.default);r.FormulaBlot=p,r.default=d},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var i=function(){function T(S,C){for(var P=0;P<C.length;P++){var k=C[P];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}return function(S,C,P){return C&&T(S.prototype,C),P&&T(S,P),S}}(),a=function T(S,C,P){S===null&&(S=Function.prototype);var k=Object.getOwnPropertyDescriptor(S,C);if(k===void 0){var _=Object.getPrototypeOf(S);return _===null?void 0:T(_,C,P)}else{if("value"in k)return k.value;var O=k.get;return O===void 0?void 0:O.call(P)}},l=o(0),s=h(l),m=o(5),v=h(m),f=o(9),c=h(f),u=o(13),x=h(u);function h(T){return T&&T.__esModule?T:{default:T}}function g(T,S){if(!(T instanceof S))throw new TypeError("Cannot call a class as a function")}function p(T,S){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:T}function d(T,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);T.prototype=Object.create(S&&S.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(T,S):T.__proto__=S)}var w=function(T){d(S,T);function S(){return g(this,S),p(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return i(S,[{key:"replaceWith",value:function(P){this.domNode.textContent=this.domNode.textContent,this.attach(),a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,P)}},{key:"highlight",value:function(P){var k=this.domNode.textContent;this.cachedText!==k&&((k.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=P(k),this.domNode.normalize(),this.attach()),this.cachedText=k)}}]),S}(x.default);w.className="ql-syntax";var y=new s.default.Attributor.Class("token","hljs",{scope:s.default.Scope.INLINE}),b=function(T){d(S,T),i(S,null,[{key:"register",value:function(){v.default.register(y,!0),v.default.register(w,!0)}}]);function S(C,P){g(this,S);var k=p(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,C,P));if(typeof k.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var _=null;return k.quill.on(v.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(_),_=setTimeout(function(){k.highlight(),_=null},k.options.interval)}),k.highlight(),k}return i(S,[{key:"highlight",value:function(){var P=this;if(!this.quill.selection.composing){this.quill.update(v.default.sources.USER);var k=this.quill.getSelection();this.quill.scroll.descendants(w).forEach(function(_){_.highlight(P.options.highlight)}),this.quill.update(v.default.sources.SILENT),k!=null&&this.quill.setSelection(k,v.default.sources.SILENT)}}}]),S}(c.default);b.DEFAULTS={highlight:function(){return window.hljs==null?null:function(T){var S=window.hljs.highlightAuto(T);return S.value}}(),interval:1e3},r.CodeBlock=w,r.CodeToken=y,r.default=b},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> <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>'},function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var i=function S(C,P,k){C===null&&(C=Function.prototype);var _=Object.getOwnPropertyDescriptor(C,P);if(_===void 0){var O=Object.getPrototypeOf(C);return O===null?void 0:S(O,P,k)}else{if("value"in _)return _.value;var j=_.get;return j===void 0?void 0:j.call(k)}},a=function(){function S(C,P){for(var k=0;k<P.length;k++){var _=P[k];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(C,_.key,_)}}return function(C,P,k){return P&&S(C.prototype,P),k&&S(C,k),C}}(),l=o(3),s=g(l),m=o(8),v=g(m),f=o(43),c=g(f),u=o(15),x=o(41),h=g(x);function g(S){return S&&S.__esModule?S:{default:S}}function p(S,C){if(!(S instanceof C))throw new TypeError("Cannot call a class as a function")}function d(S,C){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:S}function w(S,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);S.prototype=Object.create(C&&C.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(S,C):S.__proto__=C)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],b=function(S){w(C,S);function C(P,k){p(this,C),k.modules.toolbar!=null&&k.modules.toolbar.container==null&&(k.modules.toolbar.container=y);var _=d(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,k));return _.quill.container.classList.add("ql-bubble"),_}return a(C,[{key:"extendToolbar",value:function(k){this.tooltip=new T(this.quill,this.options.bounds),this.tooltip.root.appendChild(k.container),this.buildButtons([].slice.call(k.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(k.container.querySelectorAll("select")),h.default)}}]),C}(c.default);b.DEFAULTS=(0,s.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(C){C?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var T=function(S){w(C,S);function C(P,k){p(this,C);var _=d(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,k));return _.quill.on(v.default.events.EDITOR_CHANGE,function(O,j,R,F){if(O===v.default.events.SELECTION_CHANGE)if(j!=null&&j.length>0&&F===v.default.sources.USER){_.show(),_.root.style.left="0px",_.root.style.width="",_.root.style.width=_.root.offsetWidth+"px";var q=_.quill.getLines(j.index,j.length);if(q.length===1)_.position(_.quill.getBounds(j));else{var V=q[q.length-1],H=_.quill.getIndex(V),I=Math.min(V.length()-1,j.index+j.length-H),M=_.quill.getBounds(new u.Range(H,I));_.position(M)}}else document.activeElement!==_.textbox&&_.quill.hasFocus()&&_.hide()}),_}return a(C,[{key:"listen",value:function(){var k=this;i(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){k.root.classList.remove("ql-editing")}),this.quill.on(v.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!k.root.classList.contains("ql-hidden")){var _=k.quill.getSelection();_!=null&&k.position(k.quill.getBounds(_))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(k){var _=i(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"position",this).call(this,k),O=this.root.querySelector(".ql-tooltip-arrow");if(O.style.marginLeft="",_===0)return _;O.style.marginLeft=-1*_-O.offsetWidth/2+"px"}}]),C}(f.BaseTooltip);T.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=T,r.default=b},function(n,r,o){n.exports=o(63)}]).default})})(Yw);var o5=Yw.exports,i5=Mt&&Mt.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fs=Mt&&Mt.__assign||function(){return fs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},fs.apply(this,arguments)},a5=Mt&&Mt.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,l=i.length;a<l;a++,o++)r[o]=i[a];return r},ru=Mt&&Mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xn=ru(N),l5=ru(Ir),Ii=ru(r5),jm=ru(o5),s5=function(e){i5(t,e);function t(n){var r=e.call(this,n)||this;r.dirtyProps=["modules","formats","bounds","theme","children"],r.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],r.state={generation:0},r.selection=null,r.onEditorChange=function(i,a,l,s){var m,v,f,c;i==="text-change"?(v=(m=r).onEditorChangeText)===null||v===void 0||v.call(m,r.editor.root.innerHTML,a,s,r.unprivilegedEditor):i==="selection-change"&&((c=(f=r).onEditorChangeSelection)===null||c===void 0||c.call(f,a,s,r.unprivilegedEditor))};var o=r.isControlled()?n.value:n.defaultValue;return r.value=o??"",r}return t.prototype.validateProps=function(n){var r;if(xn.default.Children.count(n.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(xn.default.Children.count(n.children)){var o=xn.default.Children.only(n.children);if(((r=o)===null||r===void 0?void 0:r.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&n.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")},t.prototype.shouldComponentUpdate=function(n,r){var o=this,i;if(this.validateProps(n),!this.editor||this.state.generation!==r.generation)return!0;if("value"in n){var a=this.getEditorContents(),l=(i=n.value,i??"");this.isEqualValue(l,a)||this.setEditorContents(this.editor,l)}return n.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,n.readOnly),a5(this.cleanProps,this.dirtyProps).some(function(s){return!Ii.default(n[s],o.props[s])})},t.prototype.shouldComponentRegenerate=function(n){var r=this;return this.dirtyProps.some(function(o){return!Ii.default(n[o],r.props[o])})},t.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},t.prototype.componentWillUnmount=function(){this.destroyEditor()},t.prototype.componentDidUpdate=function(n,r){var o=this;if(this.editor&&this.shouldComponentRegenerate(n)){var i=this.editor.getContents(),a=this.editor.getSelection();this.regenerationSnapshot={delta:i,selection:a},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==r.generation){var l=this.regenerationSnapshot,i=l.delta,s=l.selection;delete this.regenerationSnapshot,this.instantiateEditor();var m=this.editor;m.setContents(i),Rm(function(){return o.setEditorSelection(m,s)})}},t.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},t.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},t.prototype.isControlled=function(){return"value"in this.props},t.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}},t.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},t.prototype.createEditor=function(n,r){var o=new jm.default(n,r);return r.tabIndex!=null&&this.setEditorTabIndex(o,r.tabIndex),this.hookEditor(o),o},t.prototype.hookEditor=function(n){this.unprivilegedEditor=this.makeUnprivilegedEditor(n),n.on("editor-change",this.onEditorChange)},t.prototype.unhookEditor=function(n){n.off("editor-change",this.onEditorChange)},t.prototype.getEditorContents=function(){return this.value},t.prototype.getEditorSelection=function(){return this.selection},t.prototype.isDelta=function(n){return n&&n.ops},t.prototype.isEqualValue=function(n,r){return this.isDelta(n)&&this.isDelta(r)?Ii.default(n.ops,r.ops):Ii.default(n,r)},t.prototype.setEditorContents=function(n,r){var o=this;this.value=r;var i=this.getEditorSelection();typeof r=="string"?n.setContents(n.clipboard.convert(r)):n.setContents(r),Rm(function(){return o.setEditorSelection(n,i)})},t.prototype.setEditorSelection=function(n,r){if(this.selection=r,r){var o=n.getLength();r.index=Math.max(0,Math.min(r.index,o-1)),r.length=Math.max(0,Math.min(r.length,o-1-r.index)),n.setSelection(r)}},t.prototype.setEditorTabIndex=function(n,r){var o,i;!((i=(o=n)===null||o===void 0?void 0:o.scroll)===null||i===void 0)&&i.domNode&&(n.scroll.domNode.tabIndex=r)},t.prototype.setEditorReadOnly=function(n,r){r?n.disable():n.enable()},t.prototype.makeUnprivilegedEditor=function(n){var r=n;return{getHTML:function(){return r.root.innerHTML},getLength:r.getLength.bind(r),getText:r.getText.bind(r),getContents:r.getContents.bind(r),getSelection:r.getSelection.bind(r),getBounds:r.getBounds.bind(r)}},t.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var n=l5.default.findDOMNode(this.editingArea);if(!n)throw new Error("Cannot find element for editing area");if(n.nodeType===3)throw new Error("Editing area cannot be a text node");return n},t.prototype.renderEditingArea=function(){var n=this,r=this.props,o=r.children,i=r.preserveWhitespace,a=this.state.generation,l={key:a,ref:function(s){n.editingArea=s}};return xn.default.Children.count(o)?xn.default.cloneElement(xn.default.Children.only(o),l):i?xn.default.createElement("pre",fs({},l)):xn.default.createElement("div",fs({},l))},t.prototype.render=function(){var n;return xn.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(n=this.props.className,n??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},t.prototype.onEditorChangeText=function(n,r,o,i){var a,l;if(this.editor){var s=this.isDelta(this.value)?i.getContents():i.getHTML();s!==this.getEditorContents()&&(this.lastDeltaChangeSet=r,this.value=s,(l=(a=this.props).onChange)===null||l===void 0||l.call(a,n,r,o,i))}},t.prototype.onEditorChangeSelection=function(n,r,o){var i,a,l,s,m,v;if(this.editor){var f=this.getEditorSelection(),c=!f&&n,u=f&&!n;Ii.default(n,f)||(this.selection=n,(a=(i=this.props).onChangeSelection)===null||a===void 0||a.call(i,n,r,o),c?(s=(l=this.props).onFocus)===null||s===void 0||s.call(l,n,r,o):u&&((v=(m=this.props).onBlur)===null||v===void 0||v.call(m,f,r,o)))}},t.prototype.focus=function(){this.editor&&this.editor.focus()},t.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},t.displayName="React Quill",t.Quill=jm.default,t.defaultProps={theme:"snow",modules:{},readOnly:!1},t}(xn.default.Component);function Rm(e){Promise.resolve().then(e)}var u5=s5;const c5=wf(u5),f5=({initialContent:e="",onContentChange:t,onSave:n,className:r=""})=>{const[o,i]=N.useState(e),[a,l]=N.useState(0),[s,m]=N.useState(0),v=N.useRef(null),{toast:f}=md(),c=w=>{i(w),t==null||t(w);const y=w.replace(/<[^>]*>/g,"").trim();m(y.length),l(y?y.split(/\s+/).length:0)},u=()=>{n==null||n(o),f({title:"Content Saved",description:"Your text has been saved successfully."})},x=w=>{let y,b,T;switch(w){case"txt":y=o.replace(/<[^>]*>/g,""),b="text/plain",T="document.txt";break;case"html":y=o,b="text/html",T="document.html";break;case"json":y=JSON.stringify({content:o,wordCount:a,characterCount:s},null,2),b="application/json",T="document.json";break}const S=new Blob([y],{type:b}),C=URL.createObjectURL(S),P=document.createElement("a");P.href=C,P.download=T,document.body.appendChild(P),P.click(),document.body.removeChild(P),URL.revokeObjectURL(C),f({title:"Export Complete",description:`Document exported as ${w.toUpperCase()}`})},h=async()=>{try{const w=o.replace(/<[^>]*>/g,"");await navigator.clipboard.writeText(w),f({title:"Copied to Clipboard",description:"Text content has been copied."})}catch{f({title:"Copy Failed",description:"Unable to copy content to clipboard.",variant:"destructive"})}},g=()=>{i(""),l(0),m(0),f({title:"Content Cleared",description:"All content has been removed."})},p={toolbar:[[{header:[1,2,3,4,5,6,!1]}],[{font:[]}],[{size:["small",!1,"large","huge"]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{script:"sub"},{script:"super"}],[{list:"ordered"},{list:"bullet"}],[{indent:"-1"},{indent:"+1"}],[{align:[]}],["link","image","video"],["blockquote","code-block"],["clean"]],clipboard:{matchVisual:!1}},d=["header","font","size","bold","italic","underline","strike","color","background","script","list","bullet","indent","align","link","image","video","blockquote","code-block"];return E.jsxs(Gs,{className:`w-full ${r}`,children:[E.jsx(z1,{className:"pb-3",children:E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsx(q1,{className:"text-lg font-semibold",children:"Real-Time Text Editor"}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsxs(he,{variant:"outline",size:"sm",onClick:u,className:"hover:bg-secondary",children:[E.jsx(As,{className:"h-4 w-4 mr-1"}),"Save"]}),E.jsxs(he,{variant:"outline",size:"sm",onClick:()=>x("txt"),className:"hover:bg-secondary",children:[E.jsx(Nd,{className:"h-4 w-4 mr-1"}),"Export"]}),E.jsx(he,{variant:"outline",size:"sm",onClick:h,className:"hover:bg-secondary",children:E.jsx(TS,{className:"h-4 w-4"})}),E.jsx(he,{variant:"outline",size:"sm",onClick:g,className:"hover:bg-destructive hover:text-destructive-foreground",children:E.jsx(js,{className:"h-4 w-4"})})]})]})}),E.jsxs(U1,{className:"space-y-4",children:[E.jsx("div",{className:"border rounded-md overflow-hidden",children:E.jsx(c5,{ref:v,theme:"snow",value:o,onChange:c,modules:p,formats:d,placeholder:"Start typing your content here...",style:{minHeight:"400px"},className:"real-time-editor"})}),E.jsx(tt,{}),E.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[E.jsxs("div",{className:"flex items-center gap-4",children:[E.jsxs("span",{children:["Words: ",a]}),E.jsxs("span",{children:["Characters: ",s]})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx(he,{variant:"ghost",size:"sm",onClick:()=>x("html"),className:"text-xs",children:"Export HTML"}),E.jsx(he,{variant:"ghost",size:"sm",onClick:()=>x("json"),className:"text-xs",children:"Export JSON"})]})]})]})]})},d5=()=>{var Xt;const{toast:e}=md(),[t,n]=N.useState("select"),[r,o]=N.useState([]),[i,a]=N.useState([[]]),[l,s]=N.useState(0),[m,v]=N.useState(!1),[f,c]=N.useState(1),[u,x]=N.useState(1),[h,g]=N.useState(100),[p,d]=N.useState("single"),[w,y]=N.useState("Untitled.pdf"),[b,T]=N.useState(null),[S,C]=N.useState(!1),[P,k]=N.useState("#3b82f6"),[_,O]=N.useState(2),[j,R]=N.useState(14),[F,q]=N.useState("Arial"),[V,H]=N.useState("normal"),[I,M]=N.useState("normal"),[A,L]=N.useState("none"),[$,W]=N.useState("left"),[K,D]=N.useState(1),[B,G]=N.useState(null),[Y,Q]=N.useState(!1),[te,le]=N.useState("new"),[ce,pe]=N.useState(!1);N.useState(null),N.useState(null);const[ge,Ae]=N.useState(!1),Oe=N.useRef(null),[Z,J]=N.useState(!1),[re,se]=N.useState([]),z=oe=>{const ue=i.slice(0,l+1);ue.push([...oe]),a(ue),s(ue.length-1),o(oe)},U=()=>{l>0&&(s(l-1),o([...i[l-1]]),e({title:"Undone",description:"Last action has been undone."}))},X=()=>{l<i.length-1&&(s(l+1),o([...i[l+1]]),e({title:"Redone",description:"Action has been redone."}))},ie=oe=>{oe>=1&&oe<=u&&c(oe)},ye=()=>ie(f+1),Le=()=>ie(f-1),Ne=()=>ie(1),mn=()=>ie(u),Te=()=>g(Math.min(h+25,300)),ht=()=>g(Math.max(h-25,25)),Ra=()=>g(100),Yt=oe=>{le(oe),Q(!0)},rr=(oe,ue,fe)=>{switch(te){case"new":o([]),a([[]]),s(0),c(1),y("Untitled.pdf"),T(null),x(1),e({title:"New Document",description:"Created a new PDF document."});break;case"open":fe?La(fe):(e({title:"File Open",description:`Opened ${oe||"document"}.pdf`}),oe&&y(`${oe}.pdf`));break;case"save":Dn(oe);break;case"export":Pt(oe,ue);break}Q(!1)},La=async oe=>{if(C(!0),!oe){e({title:"Error",description:"No file selected.",variant:"destructive"}),C(!1);return}if(oe.size===0){e({title:"Error",description:"The selected file is empty.",variant:"destructive"}),C(!1);return}if(oe.type!=="application/pdf"){e({title:"Error",description:"Please select a valid PDF file.",variant:"destructive"}),C(!1);return}console.log("Loading PDF file:",oe.name,"Size:",oe.size,"Type:",oe.type);try{const ue=await oe.arrayBuffer();if(console.log("ArrayBuffer length:",ue.byteLength),ue.byteLength===0)throw new Error("File data is empty after reading");const fe=await Gp(()=>import("./pdf-MvK3oSNw.js"),[]);fe.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${fe.version}/build/pdf.worker.min.mjs`;const me=await fe.getDocument({data:ue}).promise;T(me),x(me.numPages),c(1),y(oe.name),o([]),a([[]]),s(0),e({title:"PDF Loaded",description:`Successfully loaded ${oe.name} with ${me.numPages} pages.`})}catch(ue){console.error("Error loading PDF:",ue);let fe="Failed to load PDF file. Please try again.";ue instanceof Error&&(ue.message.includes("empty")||ue.message.includes("zero bytes")?fe="The PDF file appears to be empty or corrupted.":ue.name==="InvalidPDFException"&&(fe="Invalid PDF file. Please select a valid PDF document.")),e({title:"Error",description:fe,variant:"destructive"})}finally{C(!1)}},Qt=oe=>{const ue={...oe,id:`annotation-${Date.now()}-${Math.random().toString(36).substr(2,9)}`},fe=[...r,ue];z(fe)},Ma=oe=>{const ue=r.filter(fe=>fe.id!==oe);z(ue)},bi=(oe,ue)=>{const fe=r.map(me=>me.id===oe?{...me,...ue}:me);z(fe)},Ei=async()=>{console.log("🖨️ Print function called with textAnnotations:",re);const oe=Oe.current;if(!oe){e({title:"Error",description:"No content to print",variant:"destructive"});return}try{const ue=document.createElement("canvas");ue.width=oe.width,ue.height=oe.height;const fe=ue.getContext("2d");if(!fe)return;fe.drawImage(oe,0,0),console.log("📝 Drawing text annotations for print:",re.length),re.forEach(je=>{console.log("🎯 Processing text annotation for print:",je),je.isEditing||(fe.save(),fe.font=`${je.fontWeight||"normal"} ${je.fontStyle||"normal"} ${je.fontSize}px ${je.fontFamily}`,fe.fillStyle=je.color,fe.textAlign=je.textAlign||"left",je.text.split(` `).forEach((At,In)=>{const po=je.y+In*je.fontSize*1.2;fe.fillText(At,je.x,po)}),fe.restore())});const me=window.open("","_blank");if(!me){e({title:"Error",description:"Please allow popups to print",variant:"destructive"});return}const $e=ue.toDataURL("image/png");me.document.write(` <!DOCTYPE html> <html> <head> <title>Print PDF - Page ${f}</title> <style> body { margin: 0; padding: 20px; display: flex; justify-content: center; align-items: center; min-height: 100vh; } img { max-width: 100%; max-height: 100vh; object-fit: contain; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } @media print { body { padding: 0; } img { width: 100%; height: auto; box-shadow: none; page-break-inside: avoid; } } </style> </head> <body> <img src="${$e}" alt="PDF Page ${f}" onload="window.print(); window.close();" /> </body> </html> `),me.document.close(),e({title:"Print",description:`Printing page ${f}...`})}catch(ue){console.error("🖨️ Print error:",ue),e({title:"Error",description:"Failed to print",variant:"destructive"})}},Da=()=>{const oe=document.createElement("input");oe.type="file",oe.accept="image/*",oe.onchange=ue=>{var me;const fe=(me=ue.target.files)==null?void 0:me[0];if(fe){const $e=new FileReader;$e.onload=je=>{var At;const ho=(At=je.target)==null?void 0:At.result;Qt({type:"image",page:f,x:100,y:100,width:150,height:150,color:P,strokeWidth:_,opacity:K,imageData:ho,text:fe.name})},$e.readAsDataURL(fe)}},oe.click()},ou=()=>{J(!0)},Si=oe=>{Qt({type:"signature",page:f,x:100,y:100,width:150,height:75,color:P,strokeWidth:_,opacity:K,imageData:oe}),J(!1),e({title:"Signature Added",description:"Signature has been added to the document."})},vn=()=>{J(!1)},or=(oe,ue)=>{if(B){const fe=r.find(me=>me.id===B);fe&&fe.type==="text"&&bi(B,{[oe]:ue})}switch(oe){case"fontFamily":q(ue);break;case"fontSize":R(ue);break;case"fontWeight":H(ue);break;case"fontStyle":M(ue);break;case"textDecoration":L(ue);break;case"textAlign":W(ue);break}},we=oe=>{console.log("Text editor content changed:",oe)},Me=oe=>{Qt({type:"text",page:f,x:50,y:50,text:oe.replace(/<[^>]*>/g,""),fontSize:14,fontFamily:"Arial",color:P,strokeWidth:1,opacity:1})},Ie=(oe,ue)=>{console.log("🎯 Creating new text annotation at:",{x:oe,y:ue});const fe={id:`text-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,x:oe,y:ue,text:"",fontSize:16,fontFamily:"Arial",color:"#000000",isEditing:!0};console.log("📝 New text annotation created:",fe),se(me=>{const $e=[...me,fe];return console.log("📋 Updated textAnnotations array:",$e),$e}),e({title:"Text Added",description:"Double-click to edit text or drag to move."})},Tt=(oe,ue)=>{console.log("🔄 Updating text annotation:",oe,"with updates:",ue),se(fe=>{const me=fe.map($e=>$e.id===oe?{...$e,...ue}:$e);return console.log("📋 Updated textAnnotations after update:",me),me})},Ct=oe=>{se(ue=>ue.filter(fe=>fe.id!==oe)),e({title:"Text Deleted",description:"Text annotation has been removed."})},gn=()=>{B&&(Ma(B),G(null),e({title:"Deleted",description:"Selected item has been deleted."}))},Dn=async oe=>{console.log("💾 Save function called with textAnnotations:",re);const ue=Oe.current;if(!ue){e({title:"Error",description:"No content to save",variant:"destructive"});return}try{const fe=document.createElement("canvas");fe.width=ue.width,fe.height=ue.height;const me=fe.getContext("2d");if(!me)return;me.drawImage(ue,0,0),console.log("📝 Drawing text annotations:",re.length),re.forEach(je=>{console.log("🎯 Processing text annotation:",je),je.isEditing||(me.save(),me.font=`${je.fontWeight||"normal"} ${je.fontStyle||"normal"} ${je.fontSize}px ${je.fontFamily}`,me.fillStyle=je.color,me.textAlign=je.textAlign||"left",je.text.split(` `).forEach((At,In)=>{const po=je.y+In*je.fontSize*1.2;me.fillText(At,je.x,po)}),me.restore())});const $e=document.createElement("a");$e.download=`${oe||w.replace(".pdf","")}.png`,$e.href=fe.toDataURL("image/png"),$e.click(),e({title:"File Saved",description:`Saved ${oe||w} as PNG`}),oe&&y(`${oe}.pdf`)}catch(fe){console.error("💥 Save error:",fe),e({title:"Error",description:"Failed to save file",variant:"destructive"})}},Pt=async(oe,ue)=>{console.log("📤 Export function called with textAnnotations:",re);const fe=Oe.current;if(!fe){e({title:"Error",description:"No content to export",variant:"destructive"});return}try{const me=document.createElement("canvas");me.width=fe.width,me.height=fe.height;const $e=me.getContext("2d");if(!$e)return;$e.drawImage(fe,0,0),console.log("📝 Drawing text annotations for export:",re.length),re.forEach(jt=>{console.log("🎯 Processing text annotation for export:",jt),jt.isEditing||($e.save(),$e.font=`${jt.fontWeight||"normal"} ${jt.fontStyle||"normal"} ${jt.fontSize}px ${jt.fontFamily}`,$e.fillStyle=jt.color,$e.textAlign=jt.textAlign||"left",jt.text.split(` `).forEach((Fn,yn)=>{const ki=jt.y+yn*jt.fontSize*1.2;$e.fillText(Fn,jt.x,ki)}),$e.restore())});const je=ue||"png",ho=oe||w.replace(".pdf","");let At,In;switch(je.toLowerCase()){case"pdf":try{const{jsPDF:Fn}=await Gp(async()=>{const{jsPDF:Qw}=await import("./jspdf.es.min-BAl_0SL7.js").then(Xw=>Xw.j);return{jsPDF:Qw}},[]),yn=new Fn({orientation:me.width>me.height?"landscape":"portrait",unit:"px",format:[me.width,me.height]}),ki=me.toDataURL("image/png");yn.addImage(ki,"PNG",0,0,me.width,me.height),At=yn.output("blob"),In="application/pdf"}catch(Fn){console.error("PDF export error:",Fn),At=await new Promise(yn=>{me.toBlob(ki=>yn(ki),"image/png")}),In="image/png",e({title:"Warning",description:"PDF export failed, saved as PNG instead",variant:"destructive"})}break;case"docx":case"doc":const Jd=` <html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word'> <head><meta charset='utf-8'><title>Export</title></head> <body><img src="${me.toDataURL("image/png")}" style="max-width:100%"></body> </html> `;At=new Blob([Jd],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),In="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"jpg":case"jpeg":At=await new Promise(Fn=>{me.toBlob(yn=>Fn(yn),"image/jpeg",.9)}),In="image/jpeg";break;case"png":default:At=await new Promise(Fn=>{me.toBlob(yn=>Fn(yn),"image/png")}),In="image/png";break}const po=URL.createObjectURL(At),_i=document.createElement("a");_i.href=po,_i.download=`${ho}.${je}`,document.body.appendChild(_i),_i.click(),document.body.removeChild(_i),setTimeout(()=>URL.revokeObjectURL(po),100),e({title:"Export Complete",description:`Successfully exported as ${ho}.${je}`})}catch(me){console.error("Export error:",me),e({title:"Error",description:"Failed to export file",variant:"destructive"})}};return N.useEffect(()=>{const oe=ue=>{if(ue.ctrlKey||ue.metaKey)switch(ue.key){case"z":ue.preventDefault(),ue.shiftKey?X():U();break;case"n":ue.preventDefault(),Yt("new");break;case"o":ue.preventDefault(),Yt("open");break;case"s":ue.preventDefault(),Yt("save");break;case"p":ue.preventDefault(),Ei();break}};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[l,i]),N.useEffect(()=>{b||(async()=>{try{const ue=document.createElement("canvas");ue.width=595,ue.height=842;const fe=ue.getContext("2d");fe&&(fe.fillStyle="#ffffff",fe.fillRect(0,0,595,842),fe.fillStyle="#333333",fe.font="16px Arial",fe.fillText("Sample PDF Document",50,100),fe.fillText("Click any tool on the left to start editing!",50,150),fe.fillText("• Select tool: Click and drag annotations",50,200),fe.fillText("• Text tool: Click anywhere to add text",50,230),fe.fillText("• Pen tool: Draw freehand",50,260),fe.fillText("• Shape tools: Draw rectangles, circles, etc.",50,290),fe.fillText("• Note tool: Add sticky notes",50,320),fe.fillText("• Image tool: Upload and place images",50,350),fe.fillText("• Signature tool: Add digital signatures",50,380)),ue.toBlob(me=>{if(me){const $e=new File([me],"sample.pdf",{type:"application/pdf"});y("Sample Document (Tools Ready)"),x(1),c(1),C(!1)}})}catch(ue){console.error("Error creating sample document:",ue)}})()},[b]),E.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[E.jsx("div",{className:"shrink-0",children:E.jsx(LT,{onNew:()=>Yt("new"),onOpen:()=>Yt("open"),onSave:()=>Yt("save"),onExport:()=>Yt("export"),onPrint:Ei,onUndo:U,onRedo:X,canUndo:l>0,canRedo:l<i.length-1,zoom:h,onZoomIn:Te,onZoomOut:ht,onFitToPage:Ra,currentPage:f,totalPages:u,onPageChange:ie,onFirstPage:Ne,onPrevPage:Le,onNextPage:ye,onLastPage:mn,viewMode:p,onViewModeChange:d,onDelete:gn,hasSelection:!!B,onToggleMobileMenu:()=>Ae(!ge)})}),(t==="text"||B&&((Xt=r.find(oe=>oe.id===B))==null?void 0:Xt.type)==="text")&&E.jsx("div",{className:"shrink-0",children:E.jsx(PC,{fontFamily:F,onFontFamilyChange:oe=>or("fontFamily",oe),fontWeight:V,onFontWeightChange:oe=>or("fontWeight",oe),fontStyle:I,onFontStyleChange:oe=>or("fontStyle",oe),textDecoration:A,onTextDecorationChange:oe=>or("textDecoration",oe),textAlign:$,onTextAlignChange:oe=>or("textAlign",oe),fontSize:j,onFontSizeChange:oe=>or("fontSize",oe)})}),E.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[ge&&E.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 lg:hidden",onClick:()=>Ae(!1)}),E.jsx("div",{className:`${m?"w-12":"w-64"} transition-all duration-300 shrink-0 lg:block ${ge?"block":"hidden"} lg:relative absolute lg:z-0 z-50 h-full`,children:E.jsx(DT,{isCollapsed:m,onToggleCollapse:()=>v(!m),activeTool:t,onToolChange:oe=>{n(oe),window.innerWidth<1024&&Ae(!1)},onImageUpload:Da,onSignatureUpload:ou})}),E.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:E.jsxs("div",{className:"flex-1 flex flex-col lg:flex-row overflow-hidden",children:[E.jsx("div",{className:"flex-1 bg-editor-canvas overflow-auto",children:E.jsx(W1,{ref:Oe,currentPage:f,zoom:h,viewMode:p,activeTool:t,annotations:r.filter(oe=>oe.page===f),onAddAnnotation:Qt,onRemoveAnnotation:Ma,onUpdateAnnotation:bi,pdfDocument:b,isLoading:S,toolProperties:{color:P,strokeWidth:_,fontSize:j,fontFamily:F,fontWeight:V,fontStyle:I,textDecoration:A,textAlign:$,opacity:K},selectedAnnotation:B,onSelectAnnotation:G,textAnnotations:re,onAddTextAnnotation:Ie,onUpdateTextAnnotation:Tt,onDeleteTextAnnotation:Ct})}),E.jsx("div",{className:"hidden lg:block",children:E.jsx(hC,{selectedColor:P,onColorChange:k,strokeWidth:_,onStrokeWidthChange:O,fontSize:j,onFontSizeChange:R,opacity:K,onOpacityChange:D,activeTool:t,selectedAnnotation:B,annotations:r.filter(oe=>oe.page===f),onUpdateAnnotation:bi,fontFamily:F,onFontFamilyChange:q,fontWeight:V,onFontWeightChange:H,fontStyle:I,onFontStyleChange:M,textDecoration:A,onTextDecorationChange:L,textAlign:$,onTextAlignChange:W,isEditingText:t==="text_edit"||t==="text"})})]})})]}),E.jsx(VT,{documentName:w,currentPage:f,totalPages:u,zoom:h,annotationCount:r.length}),Y&&E.jsx(CC,{type:te,onConfirm:rr,onCancel:()=>Q(!1)}),ce&&E.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:E.jsxs("div",{className:"bg-background rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] overflow-hidden",children:[E.jsxs("div",{className:"p-4 border-b flex items-center justify-between",children:[E.jsx("h2",{className:"text-lg font-semibold",children:"Real-Time Text Editor"}),E.jsx(he,{variant:"ghost",size:"sm",onClick:()=>pe(!1),className:"hover:bg-secondary",children:"✕"})]}),E.jsx("div",{className:"p-4 max-h-[calc(90vh-120px)] overflow-auto",children:E.jsx(f5,{onContentChange:we,onSave:Me,className:"border-0 shadow-none"})})]})}),Z&&E.jsx(H1,{onSave:Si,onCancel:vn,strokeColor:P,strokeWidth:_})]})},h5=()=>E.jsx("div",{className:"min-h-screen bg-background",children:E.jsx(d5,{})}),p5=()=>{const e=q0();return N.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),E.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:E.jsxs("div",{className:"text-center",children:[E.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),E.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),E.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},m5=new gN,v5=()=>E.jsx(wN,{client:m5,children:E.jsxs(Kk,{children:[E.jsx(P2,{}),E.jsx(s_,{}),E.jsx(oO,{children:E.jsxs(tO,{children:[E.jsx(tf,{path:"/",element:E.jsx(h5,{})}),E.jsx(tf,{path:"*",element:E.jsx(p5,{})})]})})]})});ty(document.getElementById("root")).render(E.jsx(v5,{}));export{Gp as _,Mt as c,wf as g};
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 2.6 |
proxy
|
phpinfo
|
ÐаÑтройка