@gientech/modual 1.8.5 → 1.8.6-fix1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +643 -643
  2. package/assets/EyeOutlined-DdyN56qp.js +235 -0
  3. package/assets/{GientechStreamReader-C7an1QrK.js → GientechStreamReader-C6V7hB3R.js} +2 -2
  4. package/assets/database.svg +11 -11
  5. package/assets/database_add.svg +53 -53
  6. package/assets/database_connect.svg +66 -66
  7. package/assets/database_upload.svg +29 -29
  8. package/assets/databse.svg +6 -6
  9. package/assets/defaultWeLogo.svg +14 -14
  10. package/assets/graph.svg +4 -4
  11. package/assets/index-BA909cu5.js +7 -0
  12. package/assets/index-Ba8yNM_m.js +1859 -0
  13. package/assets/index-C6U-beTf.js +1 -0
  14. package/assets/index-CGkdAb5z.js +1093 -0
  15. package/assets/index-CHM5080I.js +1 -0
  16. package/assets/{index-8usKJjKH.js → index-CdABwiUV.js} +2 -2
  17. package/assets/{index-tplNfcnA.js → index-DVUhz1-T.js} +3 -3
  18. package/assets/index-RiMZym1k.js +1 -0
  19. package/assets/{index-Di5Ga230.js → index-VMH3h1RB.js} +3 -3
  20. package/assets/knowledge.svg +4 -4
  21. package/assets/{MySQL.svg → mysql.svg} +14 -14
  22. package/assets/{plus-Dbo_i_9Z.js → plus-URwrOfgp.js} +1 -1
  23. package/assets/sensitive.svg +5 -5
  24. package/assets/style-0wKQlYgL.js +66 -0
  25. package/assets/style.css +1 -1
  26. package/assets/{x-C7NWGGXn.js → x-DJ7I9-U1.js} +1 -1
  27. package/assistantConfig.js +1 -1
  28. package/chat.js +19 -19
  29. package/database.js +2 -2
  30. package/databaseId.js +1 -1
  31. package/databaseTable.js +2 -2
  32. package/index.js +1 -1
  33. package/modelManage.js +1 -1
  34. package/package.json +6 -6
  35. package/sensitive.js +1 -1
  36. package/streamFilesReader.js +1 -1
  37. package/worker/pdf.worker.min.js +21 -21
  38. package/assets/index-6Ox5f3GI.js +0 -1
  39. package/assets/index-B0fJUyM7.js +0 -1
  40. package/assets/index-BmVOh6oe.js +0 -1
  41. package/assets/index-CFqsgVcx.js +0 -1088
  42. package/assets/index-D4NnOWbo.js +0 -576
  43. package/assets/index-DhczpnL_.js +0 -1291
  44. package/assets/index-OjluyvX1.js +0 -280
  45. package/assets/style-bUXwVVWZ.js +0 -21
@@ -0,0 +1,1093 @@
1
+ import*as m from"react";import Ce,{useState as et,useCallback as Ge,useImperativeHandle as Os,forwardRef as cn,useMemo as Je,useRef as at,createContext as Rr,useContext as Vr,useEffect as gt,memo as Go,Suspense as rp,createElement as Ha,useLayoutEffect as np,useReducer as op,Component as ap}from"react";import Ll,{flushSync as ip,unstable_batchedUpdates as lp,createPortal as sp}from"react-dom";import{jsx as Gn}from"react/jsx-runtime";import{R as Ka,a as Va,S as zd,P as Hd}from"./index-VMH3h1RB.js";import{ao as Cr,c7 as up,b4 as Kd,Q as Rt,n as Vd,bC as Ns,bM as Wa,I as wt,N as je,d as $e,am as Wd,L as Ke,P as le,cb as Rs,bp as an,O as he,_ as ot,aq as qd,x as Hr,M as Nr,J as Ud,au as Wr,c2 as Zd,c3 as Gd,at as Xd,as as Yd,av as Bo,t as Ci,k as Is,aa as pr,a9 as Yt,h as qr,j as Xn,T as qa,cc as cp,X as dp,f as ke,l as Jd,aK as Ps,g as Xo,m as kn,bq as Qd,aE as Ua,a1 as Ts,bb as jl,r as Yo,ay as ur,bn as fp,V as bi,an as Sr,o as Jo,bt as ef,aH as pp,aG as gp,aJ as hp,aI as mp,a2 as vp,aF as Lu,U as ju,a5 as Cp,a4 as bp,b1 as yi,ai as Ms,cd as yp,Y as xp,aT as wp,aO as Dp,H as Za,S as Ep,b8 as Sp,ce as kp,c5 as Ap,aY as Bp,Z as Ga,u as Fp,aj as $p,bS as Op,R as ln,bD as Ls,ar as js,cf as _u,cg as _s,ch as zu,ci as Hu,z as Xa,cj as tf,a7 as Ya,bo as Np,c4 as ct,ck as Rp,K as Ip,a$ as Pp,D as Tp,bQ as Mp,bT as Lp,A as rf,c9 as Ku,cl as jp,B as _p,aZ as zp,y as Hp,G as Kp,bc as Vp}from"./EyeOutlined-DdyN56qp.js";import{S as Wp}from"./index-RiMZym1k.js";import{R as nf}from"./index-BA909cu5.js";function _l(e){return e!=null&&e===e.window}const qp=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return _l(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!_l(e)&&typeof n!="number"&&(n=(r=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function Up(e,t,r,n){const o=r-t;return e/=n/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function Zp(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),l=qp(a),i=Date.now(),u=()=>{const c=Date.now()-i,p=Up(c>o?o:c,l,e,o);_l(a)?a.scrollTo(window.pageXOffset,p):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=p:a.scrollTop=p,c<o?Cr(u):typeof n=="function"&&n()};Cr(u)}const Gp=e=>{const[t,r]=et(null);return[Ge((o,a,l)=>{const i=t??o,u=Math.min(i||0,o),s=Math.max(i||0,o),c=a.slice(u,s+1).map(e),p=c.some(g=>!l.has(g)),d=[];return c.forEach(g=>{p?(l.has(g)||d.push(g),l.add(g)):(l.delete(g),d.push(g))}),r(p?s:null),d},[t]),r]};function Xp(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e}const Yp=(e,t)=>Os(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(o,a){return r[a]?r[a]:Reflect.get(o,a)}}):Xp(n,r)}),Jp=e=>{const t=m.useRef(e),[,r]=up();return[()=>t.current,n=>{t.current=n,r()}]};var of=function(t){if(Kd()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(o){return o in n.style})}return!1},Qp=function(t,r){if(!of(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function eg(e,t){return!Array.isArray(e)&&t!==void 0?Qp(e,t):of(e)}var tg=Rt.ESC,rg=Rt.TAB;function ng(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,l=m.useRef(!1),i=function(){if(t){var p,d;(p=r.current)===null||p===void 0||(d=p.focus)===null||d===void 0||d.call(p),n==null||n(!1)}},u=function(){var p;return(p=a.current)!==null&&p!==void 0&&p.focus?(a.current.focus(),l.current=!0,!0):!1},s=function(p){switch(p.keyCode){case tg:i();break;case rg:{var d=!1;l.current||(d=u()),d?p.preventDefault():i();break}}};m.useEffect(function(){return t?(window.addEventListener("keydown",s),o&&Cr(u,3),function(){window.removeEventListener("keydown",s),l.current=!1}):function(){l.current=!1}},[t])}var og=cn(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=Je(function(){var i;return typeof r=="function"?i=r():i=r,i},[r]),l=Vd(t,Ns(a));return Ce.createElement(Ce.Fragment,null,n&&Ce.createElement("div",{className:"".concat(o,"-arrow")}),Ce.cloneElement(a,{ref:Wa(a)?l:void 0}))}),Tn={adjustX:1,adjustY:1},Mn=[0,0],ag={topLeft:{points:["bl","tl"],overflow:Tn,offset:[0,-4],targetOffset:Mn},top:{points:["bc","tc"],overflow:Tn,offset:[0,-4],targetOffset:Mn},topRight:{points:["br","tr"],overflow:Tn,offset:[0,-4],targetOffset:Mn},bottomLeft:{points:["tl","bl"],overflow:Tn,offset:[0,4],targetOffset:Mn},bottom:{points:["tc","bc"],overflow:Tn,offset:[0,4],targetOffset:Mn},bottomRight:{points:["tr","br"],overflow:Tn,offset:[0,4],targetOffset:Mn}},ig=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function lg(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,l=a===void 0?"rc-dropdown":a,i=e.transitionName,u=e.animation,s=e.align,c=e.placement,p=c===void 0?"bottomLeft":c,d=e.placements,g=d===void 0?ag:d,h=e.getPopupContainer,v=e.showAction,f=e.hideAction,b=e.overlayClassName,x=e.overlayStyle,C=e.visible,y=e.trigger,w=y===void 0?["hover"]:y,A=e.autoFocus,k=e.overlay,F=e.children,D=e.onVisibleChange,I=wt(e,ig),$=Ce.useState(),M=je($,2),P=M[0],S=M[1],B="visible"in e?C:P,N=Ce.useRef(null),R=Ce.useRef(null),L=Ce.useRef(null);Ce.useImperativeHandle(t,function(){return N.current});var O=function(W){S(W),D==null||D(W)};ng({visible:B,triggerRef:L,onVisibleChange:O,autoFocus:A,overlayRef:R});var V=function(W){var z=e.onOverlayClick;S(!1),z&&z(W)},_=function(){return Ce.createElement(og,{ref:R,overlay:k,prefixCls:l,arrow:o})},K=function(){return typeof k=="function"?_:_()},q=function(){var W=e.minOverlayWidthMatchTrigger,z=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?W:!z},Q=function(){var W=e.openClassName;return W!==void 0?W:"".concat(l,"-open")},se=Ce.cloneElement(F,{className:$e((r=F.props)===null||r===void 0?void 0:r.className,B&&Q()),ref:Wa(F)?Vd(L,Ns(F)):void 0}),T=f;return!T&&w.indexOf("contextMenu")!==-1&&(T=["click"]),Ce.createElement(Wd,Ke({builtinPlacements:g},I,{prefixCls:l,ref:N,popupClassName:$e(b,le({},"".concat(l,"-show-arrow"),o)),popupStyle:x,action:w,showAction:v,hideAction:T,popupPlacement:p,popupAlign:s,popupTransitionName:i,popupAnimation:u,popupVisible:B,stretch:q()?"minWidth":"",popup:K(),onPopupVisibleChange:O,onPopupClick:V,getPopupContainer:h}),se)}const sg=Ce.forwardRef(lg),ug=e=>typeof e!="object"&&typeof e!="function"||e===null;var af=m.createContext(null);function lf(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function sf(e){var t=m.useContext(af);return lf(t,e)}var cg=["children","locked"],kr=m.createContext(null);function dg(e,t){var r=he({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function Mo(e){var t=e.children,r=e.locked,n=wt(e,cg),o=m.useContext(kr),a=Rs(function(){return dg(o,n)},[o,n],function(l,i){return!r&&(l[0]!==i[0]||!an(l[1],i[1],!0))});return m.createElement(kr.Provider,{value:a},t)}var fg=[],uf=m.createContext(null);function xi(){return m.useContext(uf)}var cf=m.createContext(fg);function ao(e){var t=m.useContext(cf);return m.useMemo(function(){return e!==void 0?[].concat(ot(t),[e]):t},[t,e])}var df=m.createContext(null),zs=m.createContext({});function Vu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(qd(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),l=null;return o&&!Number.isNaN(a)?l=a:n&&l===null&&(l=0),n&&e.disabled&&(l=null),l!==null&&(l>=0||t&&l<0)}return!1}function pg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=ot(e.querySelectorAll("*")).filter(function(n){return Vu(n,t)});return Vu(e,t)&&r.unshift(e),r}var zl=Rt.LEFT,Hl=Rt.RIGHT,Kl=Rt.UP,Fa=Rt.DOWN,$a=Rt.ENTER,ff=Rt.ESC,bo=Rt.HOME,yo=Rt.END,Wu=[Kl,Fa,zl,Hl];function gg(e,t,r,n){var o,a="prev",l="next",i="children",u="parent";if(e==="inline"&&n===$a)return{inlineTrigger:!0};var s=le(le({},Kl,a),Fa,l),c=le(le(le(le({},zl,r?l:a),Hl,r?a:l),Fa,i),$a,i),p=le(le(le(le(le(le({},Kl,a),Fa,l),$a,i),ff,u),zl,r?i:u),Hl,r?u:i),d={inline:s,horizontal:c,vertical:p,inlineSub:s,horizontalSub:p,verticalSub:p},g=(o=d["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(g){case a:return{offset:-1,sibling:!0};case l:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case i:return{offset:1,sibling:!1};default:return null}}function hg(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function mg(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function Hs(e,t){var r=pg(e,!0);return r.filter(function(n){return t.has(n)})}function qu(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=Hs(e,t),a=o.length,l=o.findIndex(function(i){return r===i});return n<0?l===-1?l=a-1:l-=1:n>0&&(l+=1),l=(l+a)%a,o[l]}var Vl=function(t,r){var n=new Set,o=new Map,a=new Map;return t.forEach(function(l){var i=document.querySelector("[data-menu-id='".concat(lf(r,l),"']"));i&&(n.add(i),a.set(i,l),o.set(l,i))}),{elements:n,key2element:o,element2key:a}};function vg(e,t,r,n,o,a,l,i,u,s){var c=m.useRef(),p=m.useRef();p.current=t;var d=function(){Cr.cancel(c.current)};return m.useEffect(function(){return function(){d()}},[]),function(g){var h=g.which;if([].concat(Wu,[$a,ff,bo,yo]).includes(h)){var v=a(),f=Vl(v,n),b=f,x=b.elements,C=b.key2element,y=b.element2key,w=C.get(t),A=mg(w,x),k=y.get(A),F=gg(e,l(k,!0).length===1,r,h);if(!F&&h!==bo&&h!==yo)return;(Wu.includes(h)||[bo,yo].includes(h))&&g.preventDefault();var D=function(R){if(R){var L=R,O=R.querySelector("a");O!=null&&O.getAttribute("href")&&(L=O);var V=y.get(R);i(V),d(),c.current=Cr(function(){p.current===V&&L.focus()})}};if([bo,yo].includes(h)||F.sibling||!A){var I;!A||e==="inline"?I=o.current:I=hg(A);var $,M=Hs(I,x);h===bo?$=M[0]:h===yo?$=M[M.length-1]:$=qu(I,x,A,F.offset),D($)}else if(F.inlineTrigger)u(k);else if(F.offset>0)u(k,!0),d(),c.current=Cr(function(){f=Vl(v,n);var N=A.getAttribute("aria-controls"),R=document.getElementById(N),L=qu(R,f.elements);D(L)},5);else if(F.offset<0){var P=l(k,!0),S=P[P.length-2],B=C.get(S);u(S,!1),D(B)}}s==null||s(g)}}function Cg(e){Promise.resolve().then(e)}var Ks="__RC_UTIL_PATH_SPLIT__",Uu=function(t){return t.join(Ks)},bg=function(t){return t.split(Ks)},Wl="rc-menu-more";function yg(){var e=m.useState({}),t=je(e,2),r=t[1],n=at(new Map),o=at(new Map),a=m.useState([]),l=je(a,2),i=l[0],u=l[1],s=at(0),c=at(!1),p=function(){c.current||r({})},d=Ge(function(C,y){var w=Uu(y);o.current.set(w,C),n.current.set(C,w),s.current+=1;var A=s.current;Cg(function(){A===s.current&&p()})},[]),g=Ge(function(C,y){var w=Uu(y);o.current.delete(w),n.current.delete(C)},[]),h=Ge(function(C){u(C)},[]),v=Ge(function(C,y){var w=n.current.get(C)||"",A=bg(w);return y&&i.includes(A[0])&&A.unshift(Wl),A},[i]),f=Ge(function(C,y){return C.filter(function(w){return w!==void 0}).some(function(w){var A=v(w,!0);return A.includes(y)})},[v]),b=function(){var y=ot(n.current.keys());return i.length&&y.push(Wl),y},x=Ge(function(C){var y="".concat(n.current.get(C)).concat(Ks),w=new Set;return ot(o.current.keys()).forEach(function(A){A.startsWith(y)&&w.add(o.current.get(A))}),w},[]);return m.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:d,unregisterPath:g,refreshOverflowKeys:h,isSubPathKey:f,getKeyPath:v,getKeys:b,getSubPathKeys:x}}function So(e){var t=m.useRef(e);t.current=e;var r=m.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var xg=Math.random().toFixed(5).toString().slice(2),Zu=0;function wg(e){var t=Hr(e,{value:e}),r=je(t,2),n=r[0],o=r[1];return m.useEffect(function(){Zu+=1;var a="".concat(xg,"-").concat(Zu);o("rc-menu-uuid-".concat(a))},[]),n}function pf(e,t,r,n){var o=m.useContext(kr),a=o.activeKey,l=o.onActive,i=o.onInactive,u={active:a===e};return t||(u.onMouseEnter=function(s){r==null||r({key:e,domEvent:s}),l(e)},u.onMouseLeave=function(s){n==null||n({key:e,domEvent:s}),i(e)}),u}function gf(e){var t=m.useContext(kr),r=t.mode,n=t.rtl,o=t.inlineIndent;if(r!=="inline")return null;var a=e;return n?{paddingRight:a*o}:{paddingLeft:a*o}}function hf(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=m.createElement(t,he({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var Dg=["item"];function Ja(e){var t=e.item,r=wt(e,Dg);return Object.defineProperty(r,"item",{get:function(){return Nr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var Eg=["title","attribute","elementRef"],Sg=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],kg=["active"],Ag=(function(e){Zd(r,e);var t=Gd(r);function r(){return Xd(this,r),t.apply(this,arguments)}return Yd(r,[{key:"render",value:function(){var o=this.props,a=o.title,l=o.attribute,i=o.elementRef,u=wt(o,Eg),s=Wr(u,["eventKey","popupClassName","popupOffset","onTitleClick"]);return Nr(!l,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),m.createElement(Bo.Item,Ke({},l,{title:typeof a=="string"?a:void 0},s,{ref:i}))}}]),r})(m.Component),Bg=m.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,l=e.itemIcon,i=e.children,u=e.role,s=e.onMouseEnter,c=e.onMouseLeave,p=e.onClick,d=e.onKeyDown,g=e.onFocus,h=wt(e,Sg),v=sf(o),f=m.useContext(kr),b=f.prefixCls,x=f.onItemClick,C=f.disabled,y=f.overflowDisabled,w=f.itemIcon,A=f.selectedKeys,k=f.onActive,F=m.useContext(zs),D=F._internalRenderMenuItem,I="".concat(b,"-item"),$=m.useRef(),M=m.useRef(),P=C||a,S=Ud(t,M),B=ao(o),N=function(z){return{key:o,keyPath:ot(B).reverse(),item:$.current,domEvent:z}},R=l||w,L=pf(o,P,s,c),O=L.active,V=wt(L,kg),_=A.includes(o),K=gf(B.length),q=function(z){if(!P){var G=N(z);p==null||p(Ja(G)),x(G)}},Q=function(z){if(d==null||d(z),z.which===Rt.ENTER){var G=N(z);p==null||p(Ja(G)),x(G)}},se=function(z){k(o),g==null||g(z)},T={};e.role==="option"&&(T["aria-selected"]=_);var Z=m.createElement(Ag,Ke({ref:$,elementRef:S,role:u===null?"none":u||"menuitem",tabIndex:a?null:-1,"data-menu-id":y&&v?null:v},Wr(h,["extra"]),V,T,{component:"li","aria-disabled":a,style:he(he({},K),r),className:$e(I,le(le(le({},"".concat(I,"-active"),O),"".concat(I,"-selected"),_),"".concat(I,"-disabled"),P),n),onClick:q,onKeyDown:Q,onFocus:se}),i,m.createElement(hf,{props:he(he({},e),{},{isSelected:_}),icon:R}));return D&&(Z=D(Z,e,{selected:_})),Z});function Fg(e,t){var r=e.eventKey,n=xi(),o=ao(r);return m.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:m.createElement(Bg,Ke({},e,{ref:t}))}const wi=m.forwardRef(Fg);var $g=["className","children"],Og=function(t,r){var n=t.className,o=t.children,a=wt(t,$g),l=m.useContext(kr),i=l.prefixCls,u=l.mode,s=l.rtl;return m.createElement("ul",Ke({className:$e(i,s&&"".concat(i,"-rtl"),"".concat(i,"-sub"),"".concat(i,"-").concat(u==="inline"?"inline":"vertical"),n),role:"menu"},a,{"data-menu-list":!0,ref:r}),o)},Vs=m.forwardRef(Og);Vs.displayName="SubMenuList";function Ws(e,t){return Ci(e).map(function(r,n){if(m.isValidElement(r)){var o,a,l=r.key,i=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:l,u=i==null;u&&(i="tmp_key-".concat([].concat(ot(t),[n]).join("-")));var s={key:i,eventKey:i};return m.cloneElement(r,s)}return r})}var Gt={adjustX:1,adjustY:1},Ng={topLeft:{points:["bl","tl"],overflow:Gt},topRight:{points:["br","tr"],overflow:Gt},bottomLeft:{points:["tl","bl"],overflow:Gt},bottomRight:{points:["tr","br"],overflow:Gt},leftTop:{points:["tr","tl"],overflow:Gt},leftBottom:{points:["br","bl"],overflow:Gt},rightTop:{points:["tl","tr"],overflow:Gt},rightBottom:{points:["bl","br"],overflow:Gt}},Rg={topLeft:{points:["bl","tl"],overflow:Gt},topRight:{points:["br","tr"],overflow:Gt},bottomLeft:{points:["tl","bl"],overflow:Gt},bottomRight:{points:["tr","br"],overflow:Gt},rightTop:{points:["tr","tl"],overflow:Gt},rightBottom:{points:["br","bl"],overflow:Gt},leftTop:{points:["tl","tr"],overflow:Gt},leftBottom:{points:["bl","br"],overflow:Gt}};function mf(e,t,r){if(t)return t;if(r)return r[e]||r.other}var Ig={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Pg(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,l=e.popupClassName,i=e.popupOffset,u=e.disabled,s=e.mode,c=e.onVisibleChange,p=m.useContext(kr),d=p.getPopupContainer,g=p.rtl,h=p.subMenuOpenDelay,v=p.subMenuCloseDelay,f=p.builtinPlacements,b=p.triggerSubMenuAction,x=p.forceSubMenuRender,C=p.rootClassName,y=p.motion,w=p.defaultMotions,A=m.useState(!1),k=je(A,2),F=k[0],D=k[1],I=g?he(he({},Rg),f):he(he({},Ng),f),$=Ig[s],M=mf(s,y,w),P=m.useRef(M);s!=="inline"&&(P.current=M);var S=he(he({},P.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),B=m.useRef();return m.useEffect(function(){return B.current=Cr(function(){D(r)}),function(){Cr.cancel(B.current)}},[r]),m.createElement(Wd,{prefixCls:t,popupClassName:$e("".concat(t,"-popup"),le({},"".concat(t,"-rtl"),g),l,C),stretch:s==="horizontal"?"minWidth":null,getPopupContainer:d,builtinPlacements:I,popupPlacement:$,popupVisible:F,popup:o,popupStyle:a,popupAlign:i&&{offset:i},action:u?[]:[b],mouseEnterDelay:h,mouseLeaveDelay:v,onPopupVisibleChange:c,forceRender:x,popupMotion:S,fresh:!0},n)}function Tg(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",l=m.useContext(kr),i=l.prefixCls,u=l.forceSubMenuRender,s=l.motion,c=l.defaultMotions,p=l.mode,d=m.useRef(!1);d.current=p===a;var g=m.useState(!d.current),h=je(g,2),v=h[0],f=h[1],b=d.current?r:!1;m.useEffect(function(){d.current&&f(!1)},[p]);var x=he({},mf(a,s,c));n.length>1&&(x.motionAppear=!1);var C=x.onVisibleChanged;return x.onVisibleChanged=function(y){return!d.current&&!y&&f(!0),C==null?void 0:C(y)},v?null:m.createElement(Mo,{mode:a,locked:!d.current},m.createElement(Is,Ke({visible:b},x,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(i,"-hidden")}),function(y){var w=y.className,A=y.style;return m.createElement(Vs,{id:t,className:w,style:A},o)}))}var Mg=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Lg=["active"],jg=m.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var l=e.disabled,i=e.internalPopupClose,u=e.children,s=e.itemIcon,c=e.expandIcon,p=e.popupClassName,d=e.popupOffset,g=e.popupStyle,h=e.onClick,v=e.onMouseEnter,f=e.onMouseLeave,b=e.onTitleClick,x=e.onTitleMouseEnter,C=e.onTitleMouseLeave,y=wt(e,Mg),w=sf(a),A=m.useContext(kr),k=A.prefixCls,F=A.mode,D=A.openKeys,I=A.disabled,$=A.overflowDisabled,M=A.activeKey,P=A.selectedKeys,S=A.itemIcon,B=A.expandIcon,N=A.onItemClick,R=A.onOpenChange,L=A.onActive,O=m.useContext(zs),V=O._internalRenderSubMenuItem,_=m.useContext(df),K=_.isSubPathKey,q=ao(),Q="".concat(k,"-submenu"),se=I||l,T=m.useRef(),Z=m.useRef(),W=s??S,z=c??B,G=D.includes(a),Y=!$&&G,J=K(P,a),oe=pf(a,se,x,C),re=oe.active,ne=wt(oe,Lg),ue=m.useState(!1),ce=je(ue,2),xe=ce[0],Te=ce[1],Fe=function(qe){se||Te(qe)},ge=function(qe){Fe(!0),v==null||v({key:a,domEvent:qe})},ye=function(qe){Fe(!1),f==null||f({key:a,domEvent:qe})},Ee=m.useMemo(function(){return re||(F!=="inline"?xe||K([M],a):!1)},[F,re,M,xe,a,K]),Ve=gf(q.length),Ne=function(qe){se||(b==null||b({key:a,domEvent:qe}),F==="inline"&&R(a,!G))},Ie=So(function(Ze){h==null||h(Ja(Ze)),N(Ze)}),tt=function(qe){F!=="inline"&&R(a,qe)},Ue=function(){L(a)},_e=w&&"".concat(w,"-popup"),Xe=m.useMemo(function(){return m.createElement(hf,{icon:F!=="horizontal"?z:void 0,props:he(he({},e),{},{isOpen:Y,isSubMenu:!0})},m.createElement("i",{className:"".concat(Q,"-arrow")}))},[F,z,e,Y,Q]),Se=m.createElement("div",Ke({role:"menuitem",style:Ve,className:"".concat(Q,"-title"),tabIndex:se?null:-1,ref:T,title:typeof o=="string"?o:null,"data-menu-id":$&&w?null:w,"aria-expanded":Y,"aria-haspopup":!0,"aria-controls":_e,"aria-disabled":se,onClick:Ne,onFocus:Ue},ne),o,Xe),De=m.useRef(F);if(F!=="inline"&&q.length>1?De.current="vertical":De.current=F,!$){var Re=De.current;Se=m.createElement(Pg,{mode:Re,prefixCls:Q,visible:!i&&Y&&F!=="inline",popupClassName:p,popupOffset:d,popupStyle:g,popup:m.createElement(Mo,{mode:Re==="horizontal"?"vertical":Re},m.createElement(Vs,{id:_e,ref:Z},u)),disabled:se,onVisibleChange:tt},Se)}var ze=m.createElement(Bo.Item,Ke({ref:t,role:"none"},y,{component:"li",style:r,className:$e(Q,"".concat(Q,"-").concat(F),n,le(le(le(le({},"".concat(Q,"-open"),Y),"".concat(Q,"-active"),Ee),"".concat(Q,"-selected"),J),"".concat(Q,"-disabled"),se)),onMouseEnter:ge,onMouseLeave:ye}),Se,!$&&m.createElement(Tg,{id:_e,open:Y,keyPath:q},u));return V&&(ze=V(ze,e,{selected:J,active:Ee,open:Y,disabled:se})),m.createElement(Mo,{onItemClick:Ie,mode:F==="horizontal"?"vertical":F,itemIcon:W,expandIcon:z},ze)}),Di=m.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=ao(r),a=Ws(n,o),l=xi();m.useEffect(function(){if(l)return l.registerPath(r,o),function(){l.unregisterPath(r,o)}},[o]);var i;return l?i=a:i=m.createElement(jg,Ke({ref:t},e),a),m.createElement(cf.Provider,{value:o},i)});function qs(e){var t=e.className,r=e.style,n=m.useContext(kr),o=n.prefixCls,a=xi();return a?null:m.createElement("li",{role:"separator",className:$e("".concat(o,"-item-divider"),t),style:r})}var _g=["className","title","eventKey","children"],zg=m.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=wt(e,_g),l=m.useContext(kr),i=l.prefixCls,u="".concat(i,"-item-group");return m.createElement("li",Ke({ref:t,role:"presentation"},a,{onClick:function(c){return c.stopPropagation()},className:$e(u,r)}),m.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof n=="string"?n:void 0},n),m.createElement("ul",{role:"group",className:"".concat(u,"-list")},o))}),Us=m.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=ao(r),a=Ws(n,o),l=xi();return l?a:m.createElement(zg,Ke({ref:t},Wr(e,["warnKey"])),a)}),Hg=["label","children","key","type","extra"];function ql(e,t,r){var n=t.item,o=t.group,a=t.submenu,l=t.divider;return(e||[]).map(function(i,u){if(i&&pr(i)==="object"){var s=i,c=s.label,p=s.children,d=s.key,g=s.type,h=s.extra,v=wt(s,Hg),f=d??"tmp-".concat(u);return p||g==="group"?g==="group"?m.createElement(o,Ke({key:f},v,{title:c}),ql(p,t,r)):m.createElement(a,Ke({key:f},v,{title:c}),ql(p,t,r)):g==="divider"?m.createElement(l,Ke({key:f},v)):m.createElement(n,Ke({key:f},v,{extra:h}),c,(!!h||h===0)&&m.createElement("span",{className:"".concat(r,"-item-extra")},h))}return null}).filter(function(i){return i})}function Gu(e,t,r,n,o){var a=e,l=he({divider:qs,item:wi,group:Us,submenu:Di},n);return t&&(a=ql(t,l,o)),Ws(a,r)}var Kg=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],mn=[],Vg=m.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,l=n.rootClassName,i=n.style,u=n.className,s=n.tabIndex,c=s===void 0?0:s,p=n.items,d=n.children,g=n.direction,h=n.id,v=n.mode,f=v===void 0?"vertical":v,b=n.inlineCollapsed,x=n.disabled,C=n.disabledOverflow,y=n.subMenuOpenDelay,w=y===void 0?.1:y,A=n.subMenuCloseDelay,k=A===void 0?.1:A,F=n.forceSubMenuRender,D=n.defaultOpenKeys,I=n.openKeys,$=n.activeKey,M=n.defaultActiveFirst,P=n.selectable,S=P===void 0?!0:P,B=n.multiple,N=B===void 0?!1:B,R=n.defaultSelectedKeys,L=n.selectedKeys,O=n.onSelect,V=n.onDeselect,_=n.inlineIndent,K=_===void 0?24:_,q=n.motion,Q=n.defaultMotions,se=n.triggerSubMenuAction,T=se===void 0?"hover":se,Z=n.builtinPlacements,W=n.itemIcon,z=n.expandIcon,G=n.overflowedIndicator,Y=G===void 0?"...":G,J=n.overflowedIndicatorPopupClassName,oe=n.getPopupContainer,re=n.onClick,ne=n.onOpenChange,ue=n.onKeyDown;n.openAnimation,n.openTransitionName;var ce=n._internalRenderMenuItem,xe=n._internalRenderSubMenuItem,Te=n._internalComponents,Fe=wt(n,Kg),ge=m.useMemo(function(){return[Gu(d,p,mn,Te,a),Gu(d,p,mn,{},a)]},[d,p,Te]),ye=je(ge,2),Ee=ye[0],Ve=ye[1],Ne=m.useState(!1),Ie=je(Ne,2),tt=Ie[0],Ue=Ie[1],_e=m.useRef(),Xe=wg(h),Se=g==="rtl",De=Hr(D,{value:I,postState:function(ht){return ht||mn}}),Re=je(De,2),ze=Re[0],Ze=Re[1],qe=function(ht){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Zt(){Ze(ht),ne==null||ne(ht)}Dt?ip(Zt):Zt()},Ct=m.useState(ze),Ye=je(Ct,2),ut=Ye[0],mt=Ye[1],bt=m.useRef(!1),dt=m.useMemo(function(){return(f==="inline"||f==="vertical")&&b?["vertical",b]:[f,!1]},[f,b]),Ut=je(dt,2),Ot=Ut[0],Vt=Ut[1],Mt=Ot==="inline",Lt=m.useState(Ot),Nt=je(Lt,2),Pe=Nt[0],kt=Nt[1],Qt=m.useState(Vt),gr=je(Qt,2),hr=gr[0],ir=gr[1];m.useEffect(function(){kt(Ot),ir(Vt),bt.current&&(Mt?Ze(ut):qe(mn))},[Ot,Vt]);var Zr=m.useState(0),X=je(Zr,2),me=X[0],Me=X[1],de=me>=Ee.length-1||Pe!=="horizontal"||C;m.useEffect(function(){Mt&&mt(ze)},[ze]),m.useEffect(function(){return bt.current=!0,function(){bt.current=!1}},[]);var U=yg(),ve=U.registerPath,be=U.unregisterPath,ie=U.refreshOverflowKeys,pe=U.isSubPathKey,te=U.getKeyPath,ee=U.getKeys,Oe=U.getSubPathKeys,We=m.useMemo(function(){return{registerPath:ve,unregisterPath:be}},[ve,be]),pt=m.useMemo(function(){return{isSubPathKey:pe}},[pe]);m.useEffect(function(){ie(de?mn:Ee.slice(me+1).map(function(Et){return Et.key}))},[me,de]);var Qe=Hr($||M&&((r=Ee[0])===null||r===void 0?void 0:r.key),{value:$}),Ae=je(Qe,2),nt=Ae[0],er=Ae[1],Gr=So(function(Et){er(Et)}),Xr=So(function(){er(void 0)});Os(t,function(){return{list:_e.current,focus:function(ht){var Dt,Zt=ee(),jt=Vl(Zt,Xe),pn=jt.elements,mo=jt.key2element,ua=jt.element2key,Rn=Hs(_e.current,pn),vo=nt??(Rn[0]?ua.get(Rn[0]):(Dt=Ee.find(function(Ui){return!Ui.props.disabled}))===null||Dt===void 0?void 0:Dt.key),Pr=mo.get(vo);if(vo&&Pr){var In;Pr==null||(In=Pr.focus)===null||In===void 0||In.call(Pr,ht)}}}});var Hi=Hr(R||[],{value:L,postState:function(ht){return Array.isArray(ht)?ht:ht==null?mn:[ht]}}),go=je(Hi,2),Ir=go[0],ia=go[1],Ki=function(ht){if(S){var Dt=ht.key,Zt=Ir.includes(Dt),jt;N?Zt?jt=Ir.filter(function(mo){return mo!==Dt}):jt=[].concat(ot(Ir),[Dt]):jt=[Dt],ia(jt);var pn=he(he({},ht),{},{selectedKeys:jt});Zt?V==null||V(pn):O==null||O(pn)}!N&&ze.length&&Pe!=="inline"&&qe(mn)},la=So(function(Et){re==null||re(Ja(Et)),Ki(Et)}),ho=So(function(Et,ht){var Dt=ze.filter(function(jt){return jt!==Et});if(ht)Dt.push(Et);else if(Pe!=="inline"){var Zt=Oe(Et);Dt=Dt.filter(function(jt){return!Zt.has(jt)})}an(ze,Dt,!0)||qe(Dt,!0)}),Vi=function(ht,Dt){var Zt=Dt??!ze.includes(ht);ho(ht,Zt)},Wi=vg(Pe,nt,Se,Xe,_e,ee,te,er,Vi,ue);m.useEffect(function(){Ue(!0)},[]);var qi=m.useMemo(function(){return{_internalRenderMenuItem:ce,_internalRenderSubMenuItem:xe}},[ce,xe]),sa=Pe!=="horizontal"||C?Ee:Ee.map(function(Et,ht){return m.createElement(Mo,{key:Et.key,overflowDisabled:ht>me},Et)}),fn=m.createElement(Bo,Ke({id:h,ref:_e,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:wi,className:$e(a,"".concat(a,"-root"),"".concat(a,"-").concat(Pe),u,le(le({},"".concat(a,"-inline-collapsed"),hr),"".concat(a,"-rtl"),Se),l),dir:g,style:i,role:"menu",tabIndex:c,data:sa,renderRawItem:function(ht){return ht},renderRawRest:function(ht){var Dt=ht.length,Zt=Dt?Ee.slice(-Dt):null;return m.createElement(Di,{eventKey:Wl,title:Y,disabled:de,internalPopupClose:Dt===0,popupClassName:J},Zt)},maxCount:Pe!=="horizontal"||C?Bo.INVALIDATE:Bo.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ht){Me(ht)},onKeyDown:Wi},Fe));return m.createElement(zs.Provider,{value:qi},m.createElement(af.Provider,{value:Xe},m.createElement(Mo,{prefixCls:a,rootClassName:l,mode:Pe,openKeys:ze,rtl:Se,disabled:x,motion:tt?q:null,defaultMotions:tt?Q:null,activeKey:nt,onActive:Gr,onInactive:Xr,selectedKeys:Ir,inlineIndent:K,subMenuOpenDelay:w,subMenuCloseDelay:k,forceSubMenuRender:F,builtinPlacements:Z,triggerSubMenuAction:T,getPopupContainer:oe,itemIcon:W,expandIcon:z,onItemClick:la,onOpenChange:ho},m.createElement(df.Provider,{value:pt},fn),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(uf.Provider,{value:We},Ve)))))}),Qo=Vg;Qo.Item=wi;Qo.SubMenu=Di;Qo.ItemGroup=Us;Qo.Divider=qs;const vf=m.createContext({});var Wg={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},qg=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:Wg}))},Cf=m.forwardRef(qg);const Qa=Rr({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var Ug=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const bf=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=Ug(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=m.useContext(qr),l=a("menu",t),i=$e({[`${l}-item-divider-dashed`]:!!n},r);return m.createElement(qs,Object.assign({className:i},o))},yf=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:l,extra:i}=e,{prefixCls:u,firstLevel:s,direction:c,disableMenuItemTitleTooltip:p,inlineCollapsed:d}=m.useContext(Qa),g=C=>{const y=n==null?void 0:n[0],w=m.createElement("span",{className:$e(`${u}-title-content`,{[`${u}-title-content-with-extra`]:!!i||i===0})},n);return(!o||m.isValidElement(n)&&n.type==="span")&&n&&C&&s&&typeof y=="string"?m.createElement("div",{className:`${u}-inline-collapsed-noicon`},y.charAt(0)):w},{siderCollapsed:h}=m.useContext(vf);let v=a;typeof a>"u"?v=s?n:"":a===!1&&(v="");const f={title:v};!h&&!d&&(f.title=null,f.open=!1);const b=Ci(n).length;let x=m.createElement(wi,Object.assign({},Wr(e,["title","icon","danger"]),{className:$e({[`${u}-item-danger`]:l,[`${u}-item-only-child`]:(o?b+1:b)===1},r),title:typeof a=="string"?a:void 0}),Xn(o,{className:$e(m.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),g(d));return p||(x=m.createElement(qa,Object.assign({},f,{placement:c==="rtl"?"left":"right",classNames:{root:`${u}-inline-collapsed-tooltip`}}),x)),x};var Zg=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const ei=m.createContext(null),xf=m.forwardRef((e,t)=>{const{children:r}=e,n=Zg(e,["children"]),o=m.useContext(ei),a=m.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),l=cp(r),i=Ud(t,l?Ns(r):null);return m.createElement(ei.Provider,{value:a},m.createElement(dp,{space:!0},l?m.cloneElement(r,{ref:i}):r))}),Gg=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:l,itemPaddingInline:i}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${ke(a)} ${l} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},[`> ${t}-item:hover,
2
+ > ${t}-item-active,
3
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},Xg=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
4
+ ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ke(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ke(t)})`}}}}),Xu=e=>Jd(e),Yu=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:l,itemBg:i,subMenuItemBg:u,itemSelectedBg:s,activeBarHeight:c,activeBarWidth:p,activeBarBorderWidth:d,motionDurationSlow:g,motionEaseInOut:h,motionEaseOut:v,itemPaddingInline:f,motionDurationMid:b,itemHoverColor:x,lineType:C,colorSplit:y,itemDisabledColor:w,dangerItemColor:A,dangerItemHoverColor:k,dangerItemSelectedColor:F,dangerItemActiveBg:D,dangerItemSelectedBg:I,popupBg:$,itemHoverBg:M,itemActiveBg:P,menuSubMenuBg:S,horizontalItemSelectedColor:B,horizontalItemSelectedBg:N,horizontalItemBorderRadius:R,horizontalItemHoverBg:L}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:i,[`&${r}-root:focus-visible`]:Object.assign({},Xu(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:l}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},Xu(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${w} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:x}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:P}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:P}}},[`${r}-item-danger`]:{color:A,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:k}},[`&${r}-item:active`]:{background:D}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:F},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:s,[`&${r}-item-danger`]:{backgroundColor:I}},[`&${r}-submenu > ${r}`]:{backgroundColor:S},[`&${r}-popup > ${r}`]:{backgroundColor:$},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:$},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:d,marginTop:e.calc(d).mul(-1).equal(),marginBottom:0,borderRadius:R,"&::after":{position:"absolute",insetInline:f,bottom:0,borderBottom:`${ke(c)} solid transparent`,transition:`border-color ${g} ${h}`,content:'""'},"&:hover, &-active, &-open":{background:L,"&::after":{borderBottomWidth:c,borderBottomColor:B}},"&-selected":{color:B,backgroundColor:N,"&:hover":{backgroundColor:N},"&::after":{borderBottomWidth:c,borderBottomColor:B}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${ke(d)} ${C} ${y}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:u},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ke(p)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${v}`,`opacity ${b} ${v}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:F}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${h}`,`opacity ${b} ${h}`].join(",")}}}}}},Ju=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:l,itemMarginBlock:i,itemWidth:u,itemPaddingInline:s}=e,c=e.calc(a).add(o).add(l).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:ke(r),paddingInline:s,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:i,width:u},[`> ${t}-item,
5
+ > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:ke(r)},[`${t}-item-group-list ${t}-submenu-title,
6
+ ${t}-submenu-title`]:{paddingInlineEnd:c}}},Yg=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:l,motionEaseOut:i,paddingXL:u,itemMarginInline:s,fontSizeLG:c,motionDurationFast:p,motionDurationSlow:d,paddingXS:g,boxShadowSecondary:h,collapsedWidth:v,collapsedIconSize:f}=e,b={height:n,lineHeight:ke(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},Ju(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},Ju(e)),{boxShadow:h})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${ke(e.calc(l).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${d}`,`background ${d}`,`padding ${p} ${i}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:b,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:b}},{[`${t}-inline-collapsed`]:{width:v,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:c,textAlign:"center"}}},[`> ${t}-item,
7
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
8
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
9
+ > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ke(e.calc(f).div(2).equal())} - ${ke(s)})`,textOverflow:"clip",[`
10
+ ${t}-submenu-arrow,
11
+ ${t}-submenu-expand-icon
12
+ `]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:f,lineHeight:ke(n),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},Ps),{paddingInline:g})}}]},Qu=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:l,iconSize:i,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${l}`]:{minWidth:i,fontSize:i,transition:[`font-size ${n} ${a}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},fp()),[`&${t}-item-only-child`]:{[`> ${l}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ec=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:l}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ke(e.calc(l).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ke(l)})`}}}}},Jg=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:l,paddingXS:i,padding:u,colorSplit:s,lineWidth:c,zIndexPopup:p,borderRadiusLG:d,subMenuItemBorderRadius:g,menuArrowSize:h,menuArrowOffset:v,lineType:f,groupTitleLineHeight:b,groupTitleFontSize:x}=e;return[{"":{[r]:Object.assign(Object.assign({},jl()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Yo(e)),jl()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${ke(i)} ${ke(u)}`,fontSize:x,lineHeight:b,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${l}`,`background ${o} ${l}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${l}`,`background ${o} ${l}`,`padding ${a} ${l}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${l}`,`padding ${o} ${l}`].join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:s,borderStyle:f,borderWidth:0,borderTopWidth:c,marginBlock:c,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Qu(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${ke(e.calc(n).mul(2).equal())} ${ke(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:d,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:d},Qu(e)),ec(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:g},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${l}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),ec(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
13
+ &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ke(v)})`},"&::after":{transform:`rotate(45deg) translateX(${ke(e.calc(v).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${ke(e.calc(h).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ke(e.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ke(v)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},Qg=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:l,colorErrorBg:i,colorText:u,colorTextDescription:s,colorBgContainer:c,colorFillAlter:p,colorFillContent:d,lineWidth:g,lineWidthBold:h,controlItemBgActive:v,colorBgTextHover:f,controlHeightLG:b,lineHeight:x,colorBgElevated:C,marginXXS:y,padding:w,fontSize:A,controlHeightSM:k,fontSizeLG:F,colorTextLightSolid:D,colorErrorHover:I}=e,$=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,M=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:g,P=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,S=new ur(D).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:u,itemColor:u,colorItemTextHover:u,itemHoverColor:u,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:c,itemBg:c,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:d,itemActiveBg:v,colorSubItemBg:p,subMenuItemBg:p,colorItemBgSelected:v,itemSelectedBg:v,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:$,colorActiveBarHeight:h,activeBarHeight:h,colorActiveBarBorderSize:g,activeBarBorderWidth:M,colorItemTextDisabled:l,itemDisabledColor:l,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:P,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:x,collapsedWidth:b*2,popupBg:C,itemMarginBlock:y,itemPaddingInline:w,horizontalLineHeight:`${b*1.15}px`,iconSize:A,iconMarginInlineEnd:k-A,collapsedIconSize:F,groupTitleFontSize:A,darkItemDisabledColor:new ur(D).setA(.25).toRgbString(),darkItemColor:S,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:D,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:S,darkItemHoverColor:D,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:D,darkDangerItemActiveBg:a,itemWidth:$?`calc(100% + ${M}px)`:`calc(100% - ${P*2}px)`}},eh=(e,t=e,r=!0)=>Xo("Menu",o=>{const{colorBgElevated:a,controlHeightLG:l,fontSize:i,darkItemColor:u,darkDangerItemColor:s,darkItemBg:c,darkSubMenuItemBg:p,darkItemSelectedColor:d,darkItemSelectedBg:g,darkDangerItemSelectedBg:h,darkItemHoverBg:v,darkGroupTitleColor:f,darkItemHoverColor:b,darkItemDisabledColor:x,darkDangerItemHoverColor:C,darkDangerItemSelectedColor:y,darkDangerItemActiveBg:w,popupBg:A,darkPopupBg:k}=o,F=o.calc(i).div(7).mul(5).equal(),D=kn(o,{menuArrowSize:F,menuHorizontalHeight:o.calc(l).mul(1.15).equal(),menuArrowOffset:o.calc(F).mul(.25).equal(),menuSubMenuBg:a,calc:o.calc,popupBg:A}),I=kn(D,{itemColor:u,itemHoverColor:b,groupTitleColor:f,itemSelectedColor:d,subMenuItemSelectedColor:d,itemBg:c,popupBg:k,subMenuItemBg:p,itemActiveBg:"transparent",itemSelectedBg:g,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:x,dangerItemColor:s,dangerItemHoverColor:C,dangerItemSelectedColor:y,dangerItemActiveBg:w,dangerItemSelectedBg:h,menuSubMenuBg:p,horizontalItemSelectedColor:d,horizontalItemSelectedBg:g});return[Jg(D),Gg(D),Yg(D),Yu(D,"light"),Yu(I,"dark"),Xg(D),Qd(D),Ua(D,"slide-up"),Ua(D,"slide-down"),Ts(D,"zoom-big")]},Qg,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),wf=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,l=m.useContext(Qa),{prefixCls:i,inlineCollapsed:u,theme:s}=l,c=ao();let p;if(!n)p=u&&!c.length&&o&&typeof o=="string"?m.createElement("div",{className:`${i}-inline-collapsed-noicon`},o.charAt(0)):m.createElement("span",{className:`${i}-title-content`},o);else{const h=m.isValidElement(o)&&o.type==="span";p=m.createElement(m.Fragment,null,Xn(n,{className:$e(m.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${i}-item-icon`)}),h?o:m.createElement("span",{className:`${i}-title-content`},o))}const d=m.useMemo(()=>Object.assign(Object.assign({},l),{firstLevel:!1}),[l]),[g]=bi("Menu");return m.createElement(Qa.Provider,{value:d},m.createElement(Di,Object.assign({},Wr(e,["icon"]),{title:p,popupClassName:$e(i,r,`${i}-${a||s}`),popupStyle:Object.assign({zIndex:g},e.popupStyle)})))};var th=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Gi(e){return e===null||e===!1}const rh={item:yf,submenu:wf,divider:bf},nh=cn((e,t)=>{var r;const n=m.useContext(ei),o=n||{},{getPrefixCls:a,getPopupContainer:l,direction:i,menu:u}=m.useContext(qr),s=a(),{prefixCls:c,className:p,style:d,theme:g="light",expandIcon:h,_internalDisableMenuItemTitleTooltip:v,inlineCollapsed:f,siderCollapsed:b,rootClassName:x,mode:C,selectable:y,onClick:w,overflowedIndicatorPopupClassName:A}=e,k=th(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),F=Wr(k,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:C});const D=Sr((...K)=>{var q;w==null||w.apply(void 0,K),(q=o.onClick)===null||q===void 0||q.call(o)}),I=o.mode||C,$=y??o.selectable,M=f??b,P={horizontal:{motionName:`${s}-slide-up`},inline:ef(s),other:{motionName:`${s}-zoom-big`}},S=a("menu",c||o.prefixCls),B=Jo(S),[N,R,L]=eh(S,B,!n),O=$e(`${S}-${g}`,u==null?void 0:u.className,p),V=m.useMemo(()=>{var K,q;if(typeof h=="function"||Gi(h))return h||null;if(typeof o.expandIcon=="function"||Gi(o.expandIcon))return o.expandIcon||null;if(typeof(u==null?void 0:u.expandIcon)=="function"||Gi(u==null?void 0:u.expandIcon))return(u==null?void 0:u.expandIcon)||null;const Q=(K=h??(o==null?void 0:o.expandIcon))!==null&&K!==void 0?K:u==null?void 0:u.expandIcon;return Xn(Q,{className:$e(`${S}-submenu-expand-icon`,m.isValidElement(Q)?(q=Q.props)===null||q===void 0?void 0:q.className:void 0)})},[h,o==null?void 0:o.expandIcon,u==null?void 0:u.expandIcon,S]),_=m.useMemo(()=>({prefixCls:S,inlineCollapsed:M||!1,direction:i,firstLevel:!0,theme:g,mode:I,disableMenuItemTitleTooltip:v}),[S,M,i,v,g]);return N(m.createElement(ei.Provider,{value:null},m.createElement(Qa.Provider,{value:_},m.createElement(Qo,Object.assign({getPopupContainer:l,overflowedIndicator:m.createElement(Cf,null),overflowedIndicatorPopupClassName:$e(S,`${S}-${g}`,A),mode:I,selectable:$,onClick:D},F,{inlineCollapsed:M,style:Object.assign(Object.assign({},u==null?void 0:u.style),d),className:O,prefixCls:S,direction:i,defaultMotions:P,expandIcon:V,ref:t,rootClassName:$e(x,R,o.rootClassName,L,B),_internalComponents:rh})))))}),io=cn((e,t)=>{const r=at(null),n=m.useContext(vf);return Os(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),m.createElement(nh,Object.assign({ref:r},e,n))});io.Item=yf;io.SubMenu=wf;io.Divider=bf;io.ItemGroup=Us;const oh=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,a=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},ah=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:l,iconCls:i,motionDurationMid:u,paddingBlock:s,fontSize:c,dropdownEdgeChildPadding:p,colorTextDisabled:d,fontSizeIcon:g,controlPaddingHorizontal:h,colorBgElevated:v}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${l}-btn`]:{[`& > ${i}-down, & > ${l}-btn-icon > ${i}-down`]:{fontSize:g}},[`${t}-wrap`]:{position:"relative",[`${l}-btn > ${i}-down`]:{fontSize:g},[`${i}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${i}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomLeft,
14
+ &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomLeft,
15
+ &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottom,
16
+ &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottom,
17
+ &${l}-slide-down-enter${l}-slide-down-enter-active${t}-placement-bottomRight,
18
+ &${l}-slide-down-appear${l}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:mp},[`&${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topLeft,
19
+ &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topLeft,
20
+ &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-top,
21
+ &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-top,
22
+ &${l}-slide-up-enter${l}-slide-up-enter-active${t}-placement-topRight,
23
+ &${l}-slide-up-appear${l}-slide-up-appear-active${t}-placement-topRight`]:{animationName:hp},[`&${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomLeft,
24
+ &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottom,
25
+ &${l}-slide-down-leave${l}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:gp},[`&${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topLeft,
26
+ &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-top,
27
+ &${l}-slide-up-leave${l}-slide-up-leave-active${t}-placement-topRight`]:{animationName:pp}}},vp(e,v,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Yo(e)),{[r]:Object.assign(Object.assign({padding:p,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},ju(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${ke(s)} ${ke(h)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:c,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${ke(s)} ${ke(h)}`,color:e.colorText,fontWeight:"normal",fontSize:c,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},ju(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:d,cursor:"not-allowed","&:hover":{color:d,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ke(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:g,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${ke(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(h).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:d,backgroundColor:v,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ua(e,"slide-up"),Ua(e,"slide-down"),Lu(e,"move-up"),Lu(e,"move-down"),Ts(e,"zoom-big")]]},ih=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},Cp({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),bp(e)),lh=Xo("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=kn(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[ah(a),oh(a)]},ih,{resetStyle:!1}),Ei=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:l,disabled:i,dropdownRender:u,popupRender:s,getPopupContainer:c,overlayClassName:p,rootClassName:d,overlayStyle:g,open:h,onOpenChange:v,visible:f,onVisibleChange:b,mouseEnterDelay:x=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:y=!0,placement:w="",overlay:A,transitionName:k,destroyOnHidden:F,destroyPopupOnHide:D}=e,{getPopupContainer:I,getPrefixCls:$,direction:M,dropdown:P}=m.useContext(qr),S=s||u;yi();const B=m.useMemo(()=>{const ce=$();return k!==void 0?k:w.includes("top")?`${ce}-slide-down`:`${ce}-slide-up`},[$,w,k]),N=m.useMemo(()=>w?w.includes("Center")?w.slice(0,w.indexOf("Center")):w:M==="rtl"?"bottomRight":"bottomLeft",[w,M]),R=$("dropdown",o),L=Jo(R),[O,V,_]=lh(R,L),[,K]=Ms(),q=m.Children.only(ug(a)?m.createElement("span",null,a):a),Q=Xn(q,{className:$e(`${R}-trigger`,{[`${R}-rtl`]:M==="rtl"},q.props.className),disabled:(t=q.props.disabled)!==null&&t!==void 0?t:i}),se=i?[]:l,T=!!(se!=null&&se.includes("contextMenu")),[Z,W]=Hr(!1,{value:h??f}),z=Sr(ce=>{v==null||v(ce,{source:"trigger"}),b==null||b(ce),W(ce)}),G=$e(p,d,V,_,L,P==null?void 0:P.className,{[`${R}-rtl`]:M==="rtl"}),Y=yp({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:y,offset:K.marginXXS,arrowWidth:n?K.sizePopupArrow:0,borderRadius:K.borderRadius}),J=Sr(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(v==null||v(!1,{source:"menu"}),W(!1))}),oe=()=>{let ce;return r!=null&&r.items?ce=m.createElement(io,Object.assign({},r)):typeof A=="function"?ce=A():ce=A,S&&(ce=S(ce)),ce=m.Children.only(typeof ce=="string"?m.createElement("span",null,ce):ce),m.createElement(xf,{prefixCls:`${R}-menu`,rootClassName:$e(_,L),expandIcon:m.createElement("span",{className:`${R}-menu-submenu-arrow`},M==="rtl"?m.createElement(Ka,{className:`${R}-menu-submenu-arrow-icon`}):m.createElement(Va,{className:`${R}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:J,validator:({mode:xe})=>{}},ce)},[re,ne]=bi("Dropdown",g==null?void 0:g.zIndex);let ue=m.createElement(sg,Object.assign({alignPoint:T},Wr(e,["rootClassName"]),{mouseEnterDelay:x,mouseLeaveDelay:C,visible:Z,builtinPlacements:Y,arrow:!!n,overlayClassName:G,prefixCls:R,getPopupContainer:c||I,transitionName:B,trigger:se,overlay:oe,placement:N,onVisibleChange:z,overlayStyle:Object.assign(Object.assign(Object.assign({},P==null?void 0:P.style),g),{zIndex:re}),autoDestroy:F??D}),Q);return re&&(ue=m.createElement(xp.Provider,{value:ne},ue)),O(ue)},sh=wp(Ei,"align",void 0,"dropdown",e=>e),uh=e=>m.createElement(sh,Object.assign({},e),m.createElement("span",null));Ei._InternalPanelDoNotUseOrYouWillBeFired=uh;function sr(e,t){return e[t]}var ch=["children"];function Df(e,t){return"".concat(e,"-").concat(t)}function dh(e){return e&&e.type&&e.type.isTreeNode}function ea(e,t){return e??t}function Yn(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,l=r||"title";return{title:l,_title:n||[l],key:o||"key",children:a||"children"}}function Ef(e){function t(r){var n=Ci(r);return n.map(function(o){if(!dh(o))return Nr(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,l=o.props,i=l.children,u=wt(l,ch),s=he({key:a},u),c=t(i);return c.length&&(s.children=c),s}).filter(function(o){return o})}return t(e)}function Xi(e,t,r){var n=Yn(r),o=n._title,a=n.key,l=n.children,i=new Set(t===!0?[]:t),u=[];function s(c){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(d,g){for(var h=Df(p?p.pos:"0",g),v=ea(d[a],h),f,b=0;b<o.length;b+=1){var x=o[b];if(d[x]!==void 0){f=d[x];break}}var C=Object.assign(Wr(d,[].concat(ot(o),[a,l])),{title:f,key:v,parent:p,pos:h,children:null,data:d,isStart:[].concat(ot(p?p.isStart:[]),[g===0]),isEnd:[].concat(ot(p?p.isEnd:[]),[g===c.length-1])});return u.push(C),t===!0||i.has(v)?C.children=s(d[l]||[],C):C.children=[],C})}return s(e),u}function fh(e,t,r){var n={};pr(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,l=o.externalGetKey,i=o.fieldNames,u=Yn(i),s=u.key,c=u.children,p=a||c,d;l?typeof l=="string"?d=function(v){return v[l]}:typeof l=="function"&&(d=function(v){return l(v)}):d=function(v,f){return ea(v[s],f)};function g(h,v,f,b){var x=h?h[p]:e,C=h?Df(f.pos,v):"0",y=h?[].concat(ot(b),[h]):[];if(h){var w=d(h,C),A={node:h,index:v,pos:C,key:w,parentPos:f.node?f.pos:null,level:f.level+1,nodes:y};t(A)}x&&x.forEach(function(k,F){g(k,F,{node:h,pos:C,level:f?f.level+1:-1},y)})}g(null)}function Zs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,l=t.childrenPropName,i=t.fieldNames,u=arguments.length>2?arguments[2]:void 0,s=a||u,c={},p={},d={posEntities:c,keyEntities:p};return r&&(d=r(d)||d),fh(e,function(g){var h=g.node,v=g.index,f=g.pos,b=g.key,x=g.parentPos,C=g.level,y=g.nodes,w={node:h,nodes:y,index:v,key:b,pos:f,level:C},A=ea(b,f);c[f]=w,p[A]=w,w.parent=c[x],w.parent&&(w.parent.children=w.parent.children||[],w.parent.children.push(w)),n&&n(w,d)},{externalGetKey:s,childrenPropName:l,fieldNames:i}),o&&o(d),d}function Fo(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,l=t.checkedKeys,i=t.halfCheckedKeys,u=t.dragOverNodeKey,s=t.dropPosition,c=t.keyEntities,p=sr(c,e),d={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:l.indexOf(e)!==-1,halfChecked:i.indexOf(e)!==-1,pos:String(p?p.pos:""),dragOver:u===e&&s===0,dragOverGapTop:u===e&&s===-1,dragOverGapBottom:u===e&&s===1};return d}function Pt(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,l=e.loading,i=e.halfChecked,u=e.dragOver,s=e.dragOverGapTop,c=e.dragOverGapBottom,p=e.pos,d=e.active,g=e.eventKey,h=he(he({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:l,halfChecked:i,dragOver:u,dragOverGapTop:s,dragOverGapBottom:c,pos:p,active:d,key:g});return"props"in h||Object.defineProperty(h,"props",{get:function(){return Nr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),h}function Sf(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function ph(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function gh(e,t,r,n){for(var o=new Set(e),a=new Set,l=0;l<=r;l+=1){var i=t.get(l)||new Set;i.forEach(function(p){var d=p.key,g=p.node,h=p.children,v=h===void 0?[]:h;o.has(d)&&!n(g)&&v.filter(function(f){return!n(f.node)}).forEach(function(f){o.add(f.key)})})}for(var u=new Set,s=r;s>=0;s-=1){var c=t.get(s)||new Set;c.forEach(function(p){var d=p.parent,g=p.node;if(!(n(g)||!p.parent||u.has(p.parent.key))){if(n(p.parent.node)){u.add(d.key);return}var h=!0,v=!1;(d.children||[]).filter(function(f){return!n(f.node)}).forEach(function(f){var b=f.key,x=o.has(b);h&&!x&&(h=!1),!v&&(x||a.has(b))&&(v=!0)}),h&&o.add(d.key),v&&a.add(d.key),u.add(d.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(Sf(a,o))}}function hh(e,t,r,n,o){for(var a=new Set(e),l=new Set(t),i=0;i<=n;i+=1){var u=r.get(i)||new Set;u.forEach(function(d){var g=d.key,h=d.node,v=d.children,f=v===void 0?[]:v;!a.has(g)&&!l.has(g)&&!o(h)&&f.filter(function(b){return!o(b.node)}).forEach(function(b){a.delete(b.key)})})}l=new Set;for(var s=new Set,c=n;c>=0;c-=1){var p=r.get(c)||new Set;p.forEach(function(d){var g=d.parent,h=d.node;if(!(o(h)||!d.parent||s.has(d.parent.key))){if(o(d.parent.node)){s.add(g.key);return}var v=!0,f=!1;(g.children||[]).filter(function(b){return!o(b.node)}).forEach(function(b){var x=b.key,C=a.has(x);v&&!C&&(v=!1),!f&&(C||l.has(x))&&(f=!0)}),v||a.delete(g.key),f&&l.add(g.key),s.add(g.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Sf(l,a))}}function Wn(e,t,r,n){var o=[],a;n?a=n:a=ph;var l=new Set(e.filter(function(c){var p=!!sr(r,c);return p||o.push(c),p})),i=new Map,u=0;Object.keys(r).forEach(function(c){var p=r[c],d=p.level,g=i.get(d);g||(g=new Set,i.set(d,g)),g.add(p),u=Math.max(u,d)}),Nr(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var s;return t===!0?s=gh(l,i,u,a):s=hh(l,t.halfCheckedKeys,i,u,a),s}var mh=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const kf=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=m.useContext(qr),{prefixCls:o,type:a="default",danger:l,disabled:i,loading:u,onClick:s,htmlType:c,children:p,className:d,menu:g,arrow:h,autoFocus:v,overlay:f,trigger:b,align:x,open:C,onOpenChange:y,placement:w,getPopupContainer:A,href:k,icon:F=m.createElement(Cf,null),title:D,buttonsRender:I=Y=>Y,mouseEnterDelay:$,mouseLeaveDelay:M,overlayClassName:P,overlayStyle:S,destroyOnHidden:B,destroyPopupOnHide:N,dropdownRender:R,popupRender:L}=e,O=mh(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),V=r("dropdown",o),_=`${V}-button`,q={menu:g,arrow:h,autoFocus:v,align:x,disabled:i,trigger:i?[]:b,onOpenChange:y,getPopupContainer:A||t,mouseEnterDelay:$,mouseLeaveDelay:M,overlayClassName:P,overlayStyle:S,destroyOnHidden:B,popupRender:L||R},{compactSize:Q,compactItemClassnames:se}=Dp(V,n),T=$e(_,se,d);"destroyPopupOnHide"in e&&(q.destroyPopupOnHide=N),"overlay"in e&&(q.overlay=f),"open"in e&&(q.open=C),"placement"in e?q.placement=w:q.placement=n==="rtl"?"bottomLeft":"bottomRight";const Z=m.createElement(Za,{type:a,danger:l,disabled:i,loading:u,onClick:s,htmlType:c,href:k,title:D},p),W=m.createElement(Za,{type:a,danger:l,icon:F}),[z,G]=I([Z,W]);return m.createElement(Wp.Compact,Object.assign({className:T,size:Q,block:!0},O),z,m.createElement(Ei,Object.assign({},q),G))};kf.__ANT_BUTTON=!0;const Gs=Ei;Gs.Button=kf;function Af(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function vh(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}function nn(e,t,r,n){var o=Ll.unstable_batchedUpdates?function(l){Ll.unstable_batchedUpdates(r,l)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var ta=m.createContext(null),Ch=function(t){var r=t.visible,n=t.maskTransitionName,o=t.getContainer,a=t.prefixCls,l=t.rootClassName,i=t.icons,u=t.countRender,s=t.showSwitch,c=t.showProgress,p=t.current,d=t.transform,g=t.count,h=t.scale,v=t.minScale,f=t.maxScale,b=t.closeIcon,x=t.onActive,C=t.onClose,y=t.onZoomIn,w=t.onZoomOut,A=t.onRotateRight,k=t.onRotateLeft,F=t.onFlipX,D=t.onFlipY,I=t.onReset,$=t.toolbarRender,M=t.zIndex,P=t.image,S=Vr(ta),B=i.rotateLeft,N=i.rotateRight,R=i.zoomIn,L=i.zoomOut,O=i.close,V=i.left,_=i.right,K=i.flipX,q=i.flipY,Q="".concat(a,"-operations-operation");m.useEffect(function(){var ue=function(xe){xe.keyCode===Rt.ESC&&C()};return r&&window.addEventListener("keydown",ue),function(){window.removeEventListener("keydown",ue)}},[r]);var se=function(ce,xe){ce.preventDefault(),ce.stopPropagation(),x(xe)},T=m.useCallback(function(ue){var ce=ue.type,xe=ue.disabled,Te=ue.onClick,Fe=ue.icon;return m.createElement("div",{key:ce,className:$e(Q,"".concat(a,"-operations-operation-").concat(ce),le({},"".concat(a,"-operations-operation-disabled"),!!xe)),onClick:Te},Fe)},[Q,a]),Z=s?T({icon:V,onClick:function(ce){return se(ce,-1)},type:"prev",disabled:p===0}):void 0,W=s?T({icon:_,onClick:function(ce){return se(ce,1)},type:"next",disabled:p===g-1}):void 0,z=T({icon:q,onClick:D,type:"flipY"}),G=T({icon:K,onClick:F,type:"flipX"}),Y=T({icon:B,onClick:k,type:"rotateLeft"}),J=T({icon:N,onClick:A,type:"rotateRight"}),oe=T({icon:L,onClick:w,type:"zoomOut",disabled:h<=v}),re=T({icon:R,onClick:y,type:"zoomIn",disabled:h===f}),ne=m.createElement("div",{className:"".concat(a,"-operations")},z,G,Y,J,oe,re);return m.createElement(Is,{visible:r,motionName:n},function(ue){var ce=ue.className,xe=ue.style;return m.createElement(Ep,{open:!0,getContainer:o??document.body},m.createElement("div",{className:$e("".concat(a,"-operations-wrapper"),ce,l),style:he(he({},xe),{},{zIndex:M})},b===null?null:m.createElement("button",{className:"".concat(a,"-close"),onClick:C},b||O),s&&m.createElement(m.Fragment,null,m.createElement("div",{className:$e("".concat(a,"-switch-left"),le({},"".concat(a,"-switch-left-disabled"),p===0)),onClick:function(Fe){return se(Fe,-1)}},V),m.createElement("div",{className:$e("".concat(a,"-switch-right"),le({},"".concat(a,"-switch-right-disabled"),p===g-1)),onClick:function(Fe){return se(Fe,1)}},_)),m.createElement("div",{className:"".concat(a,"-footer")},c&&m.createElement("div",{className:"".concat(a,"-progress")},u?u(p+1,g):m.createElement("bdi",null,"".concat(p+1," / ").concat(g))),$?$(ne,he(he({icons:{prevIcon:Z,nextIcon:W,flipYIcon:z,flipXIcon:G,rotateLeftIcon:Y,rotateRightIcon:J,zoomOutIcon:oe,zoomInIcon:re},actions:{onActive:x,onFlipY:D,onFlipX:F,onRotateLeft:k,onRotateRight:A,onZoomOut:w,onZoomIn:y,onReset:I,onClose:C},transform:d},S?{current:p,total:g}:{}),{},{image:P})):ne)))})},ca={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function bh(e,t,r,n){var o=at(null),a=at([]),l=et(ca),i=je(l,2),u=i[0],s=i[1],c=function(h){s(ca),an(ca,u)||n==null||n({transform:ca,action:h})},p=function(h,v){o.current===null&&(a.current=[],o.current=Cr(function(){s(function(f){var b=f;return a.current.forEach(function(x){b=he(he({},b),x)}),o.current=null,n==null||n({transform:b,action:v}),b})})),a.current.push(he(he({},u),h))},d=function(h,v,f,b,x){var C=e.current,y=C.width,w=C.height,A=C.offsetWidth,k=C.offsetHeight,F=C.offsetLeft,D=C.offsetTop,I=h,$=u.scale*h;$>r?($=r,I=r/u.scale):$<t&&($=x?$:t,I=$/u.scale);var M=f??innerWidth/2,P=b??innerHeight/2,S=I-1,B=S*y*.5,N=S*w*.5,R=S*(M-u.x-F),L=S*(P-u.y-D),O=u.x-(R-B),V=u.y-(L-N);if(h<1&&$===1){var _=A*$,K=k*$,q=Af(),Q=q.width,se=q.height;_<=Q&&K<=se&&(O=0,V=0)}p({x:O,y:V,scale:$},v)};return{transform:u,resetTransform:c,updateTransform:p,dispatchZoomChange:d}}function tc(e,t,r,n){var o=t+r,a=(r-n)/2;if(r>n){if(t>0)return le({},e,a);if(t<0&&o<n)return le({},e,-a)}else if(t<0||o>n)return le({},e,t<0?a:-a);return{}}function Bf(e,t,r,n){var o=Af(),a=o.width,l=o.height,i=null;return e<=a&&t<=l?i={x:0,y:0}:(e>a||t>l)&&(i=he(he({},tc("x",r,e,a)),tc("y",n,t,l))),i}var zn=1,yh=1;function xh(e,t,r,n,o,a,l){var i=o.rotate,u=o.scale,s=o.x,c=o.y,p=et(!1),d=je(p,2),g=d[0],h=d[1],v=at({diffX:0,diffY:0,transformX:0,transformY:0}),f=function(w){!t||w.button!==0||(w.preventDefault(),w.stopPropagation(),v.current={diffX:w.pageX-s,diffY:w.pageY-c,transformX:s,transformY:c},h(!0))},b=function(w){r&&g&&a({x:w.pageX-v.current.diffX,y:w.pageY-v.current.diffY},"move")},x=function(){if(r&&g){h(!1);var w=v.current,A=w.transformX,k=w.transformY,F=s!==A&&c!==k;if(!F)return;var D=e.current.offsetWidth*u,I=e.current.offsetHeight*u,$=e.current.getBoundingClientRect(),M=$.left,P=$.top,S=i%180!==0,B=Bf(S?I:D,S?D:I,M,P);B&&a(he({},B),"dragRebound")}},C=function(w){if(!(!r||w.deltaY==0)){var A=Math.abs(w.deltaY/100),k=Math.min(A,yh),F=zn+k*n;w.deltaY>0&&(F=zn/F),l(F,"wheel",w.clientX,w.clientY)}};return gt(function(){var y,w,A,k;if(t){A=nn(window,"mouseup",x,!1),k=nn(window,"mousemove",b,!1);try{window.top!==window.self&&(y=nn(window.top,"mouseup",x,!1),w=nn(window.top,"mousemove",b,!1))}catch{}}return function(){var F,D,I,$;(F=A)===null||F===void 0||F.remove(),(D=k)===null||D===void 0||D.remove(),(I=y)===null||I===void 0||I.remove(),($=w)===null||$===void 0||$.remove()}},[r,g,s,c,i,t]),{isMoving:g,onMouseDown:f,onMouseMove:b,onMouseUp:x,onWheel:C}}function wh(e){return new Promise(function(t){if(!e){t(!1);return}var r=document.createElement("img");r.onerror=function(){return t(!1)},r.onload=function(){return t(!0)},r.src=e})}function Ff(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,o=et(r?"loading":"normal"),a=je(o,2),l=a[0],i=a[1],u=at(!1),s=l==="error";gt(function(){var g=!0;return wh(t).then(function(h){!h&&g&&i("error")}),function(){g=!1}},[t]),gt(function(){r&&!u.current?i("loading"):s&&i("normal")},[t]);var c=function(){i("normal")},p=function(h){u.current=!1,l==="loading"&&h!==null&&h!==void 0&&h.complete&&(h.naturalWidth||h.naturalHeight)&&(u.current=!0,c())},d=s&&n?{src:n}:{onLoad:c,src:t};return[p,d,l]}function ti(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function Dh(e,t,r,n){var o=ti(e,r),a=ti(t,n);if(o===0&&a===0)return[e.x,e.y];var l=o/(o+a),i=e.x+l*(t.x-e.x),u=e.y+l*(t.y-e.y);return[i,u]}function Eh(e,t,r,n,o,a,l){var i=o.rotate,u=o.scale,s=o.x,c=o.y,p=et(!1),d=je(p,2),g=d[0],h=d[1],v=at({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),f=function(w){v.current=he(he({},v.current),w)},b=function(w){if(t){w.stopPropagation(),h(!0);var A=w.touches,k=A===void 0?[]:A;k.length>1?f({point1:{x:k[0].clientX,y:k[0].clientY},point2:{x:k[1].clientX,y:k[1].clientY},eventType:"touchZoom"}):f({point1:{x:k[0].clientX-s,y:k[0].clientY-c},eventType:"move"})}},x=function(w){var A=w.touches,k=A===void 0?[]:A,F=v.current,D=F.point1,I=F.point2,$=F.eventType;if(k.length>1&&$==="touchZoom"){var M={x:k[0].clientX,y:k[0].clientY},P={x:k[1].clientX,y:k[1].clientY},S=Dh(D,I,M,P),B=je(S,2),N=B[0],R=B[1],L=ti(M,P)/ti(D,I);l(L,"touchZoom",N,R,!0),f({point1:M,point2:P,eventType:"touchZoom"})}else $==="move"&&(a({x:k[0].clientX-D.x,y:k[0].clientY-D.y},"move"),f({eventType:"move"}))},C=function(){if(r){if(g&&h(!1),f({eventType:"none"}),n>u)return a({x:0,y:0,scale:n},"touchZoom");var w=e.current.offsetWidth*u,A=e.current.offsetHeight*u,k=e.current.getBoundingClientRect(),F=k.left,D=k.top,I=i%180!==0,$=Bf(I?A:w,I?w:A,F,D);$&&a(he({},$),"dragRebound")}};return gt(function(){var y;return r&&t&&(y=nn(window,"touchmove",function(w){return w.preventDefault()},{passive:!1})),function(){var w;(w=y)===null||w===void 0||w.remove()}},[r,t]),{isTouching:g,onTouchStart:b,onTouchMove:x,onTouchEnd:C}}var Sh=["fallback","src","imgRef"],kh=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],Ah=function(t){var r=t.fallback,n=t.src,o=t.imgRef,a=wt(t,Sh),l=Ff({src:n,fallback:r}),i=je(l,2),u=i[0],s=i[1];return Ce.createElement("img",Ke({ref:function(p){o.current=p,u(p)}},a,s))},$f=function(t){var r=t.prefixCls,n=t.src,o=t.alt,a=t.imageInfo,l=t.fallback,i=t.movable,u=i===void 0?!0:i,s=t.onClose,c=t.visible,p=t.icons,d=p===void 0?{}:p,g=t.rootClassName,h=t.closeIcon,v=t.getContainer,f=t.current,b=f===void 0?0:f,x=t.count,C=x===void 0?1:x,y=t.countRender,w=t.scaleStep,A=w===void 0?.5:w,k=t.minScale,F=k===void 0?1:k,D=t.maxScale,I=D===void 0?50:D,$=t.transitionName,M=$===void 0?"zoom":$,P=t.maskTransitionName,S=P===void 0?"fade":P,B=t.imageRender,N=t.imgCommonProps,R=t.toolbarRender,L=t.onTransform,O=t.onChange,V=wt(t,kh),_=at(),K=Vr(ta),q=K&&C>1,Q=K&&C>=1,se=et(!0),T=je(se,2),Z=T[0],W=T[1],z=bh(_,F,I,L),G=z.transform,Y=z.resetTransform,J=z.updateTransform,oe=z.dispatchZoomChange,re=xh(_,u,c,A,G,J,oe),ne=re.isMoving,ue=re.onMouseDown,ce=re.onWheel,xe=Eh(_,u,c,F,G,J,oe),Te=xe.isTouching,Fe=xe.onTouchStart,ge=xe.onTouchMove,ye=xe.onTouchEnd,Ee=G.rotate,Ve=G.scale,Ne=$e(le({},"".concat(r,"-moving"),ne));gt(function(){Z||W(!0)},[Z]);var Ie=function(){Y("close")},tt=function(){oe(zn+A,"zoomIn")},Ue=function(){oe(zn/(zn+A),"zoomOut")},_e=function(){J({rotate:Ee+90},"rotateRight")},Xe=function(){J({rotate:Ee-90},"rotateLeft")},Se=function(){J({flipX:!G.flipX},"flipX")},De=function(){J({flipY:!G.flipY},"flipY")},Re=function(){Y("reset")},ze=function(mt){var bt=b+mt;!Number.isInteger(bt)||bt<0||bt>C-1||(W(!1),Y(mt<0?"prev":"next"),O==null||O(bt,b))},Ze=function(mt){!c||!q||(mt.keyCode===Rt.LEFT?ze(-1):mt.keyCode===Rt.RIGHT&&ze(1))},qe=function(mt){c&&(Ve!==1?J({x:0,y:0,scale:1},"doubleClick"):oe(zn+A,"doubleClick",mt.clientX,mt.clientY))};gt(function(){var ut=nn(window,"keydown",Ze,!1);return function(){ut.remove()}},[c,q,b]);var Ct=Ce.createElement(Ah,Ke({},N,{width:t.width,height:t.height,imgRef:_,className:"".concat(r,"-img"),alt:o,style:{transform:"translate3d(".concat(G.x,"px, ").concat(G.y,"px, 0) scale3d(").concat(G.flipX?"-":"").concat(Ve,", ").concat(G.flipY?"-":"").concat(Ve,", 1) rotate(").concat(Ee,"deg)"),transitionDuration:(!Z||Te)&&"0s"},fallback:l,src:n,onWheel:ce,onMouseDown:ue,onDoubleClick:qe,onTouchStart:Fe,onTouchMove:ge,onTouchEnd:ye,onTouchCancel:ye})),Ye=he({url:n,alt:o},a);return Ce.createElement(Ce.Fragment,null,Ce.createElement(Sp,Ke({transitionName:M,maskTransitionName:S,closable:!1,keyboard:!0,prefixCls:r,onClose:s,visible:c,classNames:{wrapper:Ne},rootClassName:g,getContainer:v},V,{afterClose:Ie}),Ce.createElement("div",{className:"".concat(r,"-img-wrapper")},B?B(Ct,he({transform:G,image:Ye},K?{current:b}:{})):Ct)),Ce.createElement(Ch,{visible:c,transform:G,maskTransitionName:S,closeIcon:h,getContainer:v,prefixCls:r,rootClassName:g,icons:d,countRender:y,showSwitch:q,showProgress:Q,current:b,count:C,scale:Ve,minScale:F,maxScale:I,toolbarRender:R,onActive:ze,onZoomIn:tt,onZoomOut:Ue,onRotateRight:_e,onRotateLeft:Xe,onFlipX:Se,onFlipY:De,onClose:s,onReset:Re,zIndex:V.zIndex!==void 0?V.zIndex+1:void 0,image:Ye}))},Ul=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function Bh(e){var t=m.useState({}),r=je(t,2),n=r[0],o=r[1],a=m.useCallback(function(i,u){return o(function(s){return he(he({},s),{},le({},i,u))}),function(){o(function(s){var c=he({},s);return delete c[i],c})}},[]),l=m.useMemo(function(){return e?e.map(function(i){if(typeof i=="string")return{data:{src:i}};var u={};return Object.keys(i).forEach(function(s){["src"].concat(ot(Ul)).includes(s)&&(u[s]=i[s])}),{data:u}}):Object.keys(n).reduce(function(i,u){var s=n[u],c=s.canPreview,p=s.data;return c&&i.push({data:p,id:u}),i},[])},[e,n]);return[l,a,!!e]}var Fh=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],$h=["src"],Oh=function(t){var r,n=t.previewPrefixCls,o=n===void 0?"rc-image-preview":n,a=t.children,l=t.icons,i=l===void 0?{}:l,u=t.items,s=t.preview,c=t.fallback,p=pr(s)==="object"?s:{},d=p.visible,g=p.onVisibleChange,h=p.getContainer,v=p.current,f=p.movable,b=p.minScale,x=p.maxScale,C=p.countRender,y=p.closeIcon,w=p.onChange,A=p.onTransform,k=p.toolbarRender,F=p.imageRender,D=wt(p,Fh),I=Bh(u),$=je(I,3),M=$[0],P=$[1],S=$[2],B=Hr(0,{value:v}),N=je(B,2),R=N[0],L=N[1],O=et(!1),V=je(O,2),_=V[0],K=V[1],q=((r=M[R])===null||r===void 0?void 0:r.data)||{},Q=q.src,se=wt(q,$h),T=Hr(!!d,{value:d,onChange:function(Te,Fe){g==null||g(Te,Fe,R)}}),Z=je(T,2),W=Z[0],z=Z[1],G=et(null),Y=je(G,2),J=Y[0],oe=Y[1],re=m.useCallback(function(xe,Te,Fe,ge){var ye=S?M.findIndex(function(Ee){return Ee.data.src===Te}):M.findIndex(function(Ee){return Ee.id===xe});L(ye<0?0:ye),z(!0),oe({x:Fe,y:ge}),K(!0)},[M,S]);m.useEffect(function(){W?_||L(0):K(!1)},[W]);var ne=function(Te,Fe){L(Te),w==null||w(Te,Fe)},ue=function(){z(!1),oe(null)},ce=m.useMemo(function(){return{register:P,onPreview:re}},[P,re]);return m.createElement(ta.Provider,{value:ce},a,m.createElement($f,Ke({"aria-hidden":!W,movable:f,visible:W,prefixCls:o,closeIcon:y,onClose:ue,mousePosition:J,imgCommonProps:se,src:Q,fallback:c,icons:i,minScale:b,maxScale:x,getContainer:h,current:R,count:M.length,countRender:C,onTransform:A,toolbarRender:k,imageRender:F,onChange:ne},D)))},rc=0;function Nh(e,t){var r=m.useState(function(){return rc+=1,String(rc)}),n=je(r,1),o=n[0],a=m.useContext(ta),l={data:t,canPreview:e};return m.useEffect(function(){if(a)return a.register(o,l)},[]),m.useEffect(function(){a&&a.register(o,l)},[e,t]),o}var Rh=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Ih=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Xs=function(t){var r=t.src,n=t.alt,o=t.onPreviewClose,a=t.prefixCls,l=a===void 0?"rc-image":a,i=t.previewPrefixCls,u=i===void 0?"".concat(l,"-preview"):i,s=t.placeholder,c=t.fallback,p=t.width,d=t.height,g=t.style,h=t.preview,v=h===void 0?!0:h,f=t.className,b=t.onClick,x=t.onError,C=t.wrapperClassName,y=t.wrapperStyle,w=t.rootClassName,A=wt(t,Rh),k=s&&s!==!0,F=pr(v)==="object"?v:{},D=F.src,I=F.visible,$=I===void 0?void 0:I,M=F.onVisibleChange,P=M===void 0?o:M,S=F.getContainer,B=S===void 0?void 0:S,N=F.mask,R=F.maskClassName,L=F.movable,O=F.icons,V=F.scaleStep,_=F.minScale,K=F.maxScale,q=F.imageRender,Q=F.toolbarRender,se=wt(F,Ih),T=D??r,Z=Hr(!!$,{value:$,onChange:P}),W=je(Z,2),z=W[0],G=W[1],Y=Ff({src:r,isCustomPlaceholder:k,fallback:c}),J=je(Y,3),oe=J[0],re=J[1],ne=J[2],ue=et(null),ce=je(ue,2),xe=ce[0],Te=ce[1],Fe=Vr(ta),ge=!!v,ye=function(){G(!1),Te(null)},Ee=$e(l,C,w,le({},"".concat(l,"-error"),ne==="error")),Ve=Je(function(){var Ue={};return Ul.forEach(function(_e){t[_e]!==void 0&&(Ue[_e]=t[_e])}),Ue},Ul.map(function(Ue){return t[Ue]})),Ne=Je(function(){return he(he({},Ve),{},{src:T})},[T,Ve]),Ie=Nh(ge,Ne),tt=function(_e){var Xe=vh(_e.target),Se=Xe.left,De=Xe.top;Fe?Fe.onPreview(Ie,T,Se,De):(Te({x:Se,y:De}),G(!0)),b==null||b(_e)};return m.createElement(m.Fragment,null,m.createElement("div",Ke({},A,{className:Ee,onClick:ge?tt:b,style:he({width:p,height:d},y)}),m.createElement("img",Ke({},Ve,{className:$e("".concat(l,"-img"),le({},"".concat(l,"-img-placeholder"),s===!0),f),style:he({height:d},g),ref:oe},re,{width:p,height:d,onError:x})),ne==="loading"&&m.createElement("div",{"aria-hidden":"true",className:"".concat(l,"-placeholder")},s),N&&ge&&m.createElement("div",{className:$e("".concat(l,"-mask"),R),style:{display:(g==null?void 0:g.display)==="none"?"none":void 0}},N)),!Fe&&ge&&m.createElement($f,Ke({"aria-hidden":!z,visible:z,prefixCls:u,onClose:ye,mousePosition:xe,src:T,alt:n,imageInfo:{width:p,height:d},fallback:c,getContainer:B,icons:O,movable:L,scaleStep:V,minScale:_,maxScale:K,rootClassName:w,imageRender:q,imgCommonProps:Ve,toolbarRender:Q},se)))};Xs.PreviewGroup=Oh;var Ph={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Th=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:Ph}))},Mh=m.forwardRef(Th),Lh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},jh=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:Lh}))},_h=m.forwardRef(jh),zh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},Hh=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:zh}))},nc=m.forwardRef(Hh),Kh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},Vh=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:Kh}))},Wh=m.forwardRef(Vh),qh={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},Uh=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:qh}))},Zh=m.forwardRef(Uh);const Zl=e=>({position:e||"absolute",inset:0}),Gh=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:o,prefixCls:a,colorTextLightSolid:l}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:l,background:new ur("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${a}-mask-info`]:Object.assign(Object.assign({},Ps),{padding:`0 ${ke(n)}`,[t]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},Xh=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:o,margin:a,paddingLG:l,previewOperationColorDisabled:i,previewOperationHoverColor:u,motionDurationSlow:s,iconCls:c,colorTextLightSolid:p}=e,d=new ur(r).setA(.1),g=d.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:o,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:a},[`${t}-close`]:{position:"fixed",top:o,right:{_skip_check_:!0,value:o},display:"flex",color:p,backgroundColor:d.toRgbString(),borderRadius:"50%",padding:n,outline:0,border:0,cursor:"pointer",transition:`all ${s}`,"&:hover":{backgroundColor:g.toRgbString()},[`& > ${c}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${ke(l)}`,backgroundColor:d.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${s}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${c}`]:{color:u},"&-disabled":{color:i,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${c}`]:{fontSize:e.previewOperationSize}}}}},Yh=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:o,zIndexPopup:a,motionDurationSlow:l}=e,i=new ur(t).setA(.1),u=i.clone().setA(.2);return{[`${o}-switch-left, ${o}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(a).add(1).equal(),display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:e.calc(e.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:e.previewOperationColor,background:i.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${l}`,userSelect:"none","&:hover":{background:u.toRgbString()},"&-disabled":{"&, &:hover":{color:n,background:"transparent",cursor:"not-allowed",[`> ${r}`]:{cursor:"not-allowed"}}},[`> ${r}`]:{fontSize:e.previewOperationSize}},[`${o}-switch-left`]:{insetInlineStart:e.marginSM},[`${o}-switch-right`]:{insetInlineEnd:e.marginSM}}},Jh=e=>{const{motionEaseOut:t,previewCls:r,motionDurationSlow:n,componentCls:o}=e;return[{[`${o}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:Object.assign(Object.assign({},Zl()),{overflow:"hidden"}),[`${r}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${n} ${t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},Zl()),{transition:`transform ${n} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${r}-moving`]:{[`${r}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${o}-preview-root`]:{[`${r}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${o}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[Xh(e),Yh(e)]}]},Qh=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},Gh(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},Zl())}}},em=e=>{const{previewCls:t}=e;return{[`${t}-root`]:Ts(e,"zoom"),"&":Ap(e,!0)}},tm=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new ur(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new ur(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new ur(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),Of=Xo("Image",e=>{const t=`${e.componentCls}-preview`,r=kn(e,{previewCls:t,modalMaskBg:new ur("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[Qh(r),Jh(r),kp(kn(r,{componentCls:t})),em(r)]},tm);var rm=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Nf={rotateLeft:m.createElement(Mh,null),rotateRight:m.createElement(_h,null),zoomIn:m.createElement(Wh,null),zoomOut:m.createElement(Zh,null),close:m.createElement(Bp,null),left:m.createElement(Ka,null),right:m.createElement(Va,null),flipX:m.createElement(nc,null),flipY:m.createElement(nc,{rotate:90})},nm=e=>{var{previewPrefixCls:t,preview:r}=e,n=rm(e,["previewPrefixCls","preview"]);const{getPrefixCls:o,direction:a}=m.useContext(qr),l=o("image",t),i=`${l}-preview`,u=o(),s=Jo(l),[c,p,d]=Of(l,s),[g]=bi("ImagePreview",typeof r=="object"?r.zIndex:void 0),h=m.useMemo(()=>Object.assign(Object.assign({},Nf),{left:a==="rtl"?m.createElement(Va,null):m.createElement(Ka,null),right:a==="rtl"?m.createElement(Ka,null):m.createElement(Va,null)}),[a]),v=m.useMemo(()=>{var f;if(r===!1)return r;const b=typeof r=="object"?r:{},x=$e(p,d,s,(f=b.rootClassName)!==null&&f!==void 0?f:"");return Object.assign(Object.assign({},b),{transitionName:Ga(u,"zoom",b.transitionName),maskTransitionName:Ga(u,"fade",b.maskTransitionName),rootClassName:x,zIndex:g})},[r,u,g,p,d,s]);return c(m.createElement(Xs.PreviewGroup,Object.assign({preview:v,previewPrefixCls:i,icons:h},n)))};var oc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Rf=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:o,style:a,fallback:l}=e,i=oc(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:u,getPopupContainer:s,className:c,style:p,preview:d,fallback:g}=Fp("image"),[h]=$p("Image"),v=u("image",t),f=u(),b=Jo(v),[x,C,y]=Of(v,b),w=$e(o,C,y,b),A=$e(n,C,c),[k]=bi("ImagePreview",typeof r=="object"?r.zIndex:void 0),F=m.useMemo(()=>{if(r===!1)return r;const $=typeof r=="object"?r:{},{getContainer:M,closeIcon:P,rootClassName:S,destroyOnClose:B,destroyOnHidden:N}=$,R=oc($,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:m.createElement("div",{className:`${v}-mask-info`},m.createElement(Op,null),h==null?void 0:h.preview),icons:Nf},R),{destroyOnClose:N??B,rootClassName:$e(w,S),getContainer:M??s,transitionName:Ga(f,"zoom",$.transitionName),maskTransitionName:Ga(f,"fade",$.maskTransitionName),zIndex:k,closeIcon:P??(d==null?void 0:d.closeIcon)})},[r,h,d==null?void 0:d.closeIcon]),D=Object.assign(Object.assign({},p),a),I=l??g;return x(m.createElement(Xs,Object.assign({prefixCls:v,preview:F,rootClassName:w,className:A,style:D,fallback:I},i)))};Rf.PreviewGroup=nm;var en={},ra="rc-table-internal-hook";function Ys(e){var t=m.createContext(void 0),r=function(o){var a=o.value,l=o.children,i=m.useRef(a);i.current=a;var u=m.useState(function(){return{getValue:function(){return i.current},listeners:new Set}}),s=je(u,1),c=s[0];return ln(function(){lp(function(){c.listeners.forEach(function(p){p(a)})})},[a]),m.createElement(t.Provider,{value:c},l)};return{Context:t,Provider:r,defaultValue:e}}function Kt(e,t){var r=Sr(typeof t=="function"?t:function(p){if(t===void 0)return p;if(!Array.isArray(t))return p[t];var d={};return t.forEach(function(g){d[g]=p[g]}),d}),n=m.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,l=o.getValue,i=m.useRef();i.current=r(n?l():e==null?void 0:e.defaultValue);var u=m.useState({}),s=je(u,2),c=s[1];return ln(function(){if(!n)return;function p(d){var g=r(d);an(i.current,g,!0)||c({})}return a.add(p),function(){a.delete(p)}},[n]),i.current}function om(){var e=m.createContext(null);function t(){return m.useContext(e)}function r(o,a){var l=Wa(o),i=function(s,c){var p=l?{ref:c}:{},d=m.useRef(0),g=m.useRef(s),h=t();return h!==null?m.createElement(o,Ke({},s,p)):((!a||a(g.current,s))&&(d.current+=1),g.current=s,m.createElement(e.Provider,{value:d.current},m.createElement(o,Ke({},s,p))))};return l?m.forwardRef(i):i}function n(o,a){var l=Wa(o),i=function(s,c){var p=l?{ref:c}:{};return t(),m.createElement(o,Ke({},s,p))};return l?m.memo(m.forwardRef(i),a):m.memo(i,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var Js=om(),If=Js.makeImmutable,lo=Js.responseImmutable,am=Js.useImmutableMark,Jt=Ys(),Pf=m.createContext({renderWithProps:!1}),im="RC_TABLE_KEY";function lm(e){return e==null?[]:Array.isArray(e)?e:[e]}function Si(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,l=o.dataIndex,i=a||lm(l).join("-")||im;r[i];)i="".concat(i,"_next");r[i]=!0,t.push(i)}),t}function Gl(e){return e!=null}function sm(e){return typeof e=="number"&&!Number.isNaN(e)}function um(e){return e&&pr(e)==="object"&&!Array.isArray(e)&&!m.isValidElement(e)}function cm(e,t,r,n,o,a){var l=m.useContext(Pf),i=am(),u=Rs(function(){if(Gl(n))return[n];var s=t==null||t===""?[]:Array.isArray(t)?t:[t],c=Ls(e,s),p=c,d=void 0;if(o){var g=o(c,e,r);um(g)?(p=g.children,d=g.props,l.renderWithProps=!0):p=g}return[p,d]},[i,e,n,t,o,r],function(s,c){if(a){var p=je(s,2),d=p[1],g=je(c,2),h=g[1];return a(h,d)}return l.renderWithProps?!0:!an(s,c,!0)});return u}function dm(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function fm(e,t){return Kt(Jt,function(r){var n=dm(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var pm=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,l=r===!0?{showTitle:!0}:r;return l&&(l.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():m.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function gm(e){var t,r,n,o,a,l,i,u,s=e.component,c=e.children,p=e.ellipsis,d=e.scope,g=e.prefixCls,h=e.className,v=e.align,f=e.record,b=e.render,x=e.dataIndex,C=e.renderIndex,y=e.shouldCellUpdate,w=e.index,A=e.rowType,k=e.colSpan,F=e.rowSpan,D=e.fixLeft,I=e.fixRight,$=e.firstFixLeft,M=e.lastFixLeft,P=e.firstFixRight,S=e.lastFixRight,B=e.appendNode,N=e.additionalProps,R=N===void 0?{}:N,L=e.isSticky,O="".concat(g,"-cell"),V=Kt(Jt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),_=V.supportSticky,K=V.allColumnsFixedLeft,q=V.rowHoverable,Q=cm(f,x,C,c,b,y),se=je(Q,2),T=se[0],Z=se[1],W={},z=typeof D=="number"&&_,G=typeof I=="number"&&_;z&&(W.position="sticky",W.left=D),G&&(W.position="sticky",W.right=I);var Y=(t=(r=(n=Z==null?void 0:Z.colSpan)!==null&&n!==void 0?n:R.colSpan)!==null&&r!==void 0?r:k)!==null&&t!==void 0?t:1,J=(o=(a=(l=Z==null?void 0:Z.rowSpan)!==null&&l!==void 0?l:R.rowSpan)!==null&&a!==void 0?a:F)!==null&&o!==void 0?o:1,oe=fm(w,J),re=je(oe,2),ne=re[0],ue=re[1],ce=Sr(function(Ve){var Ne;f&&ue(w,w+J-1),R==null||(Ne=R.onMouseEnter)===null||Ne===void 0||Ne.call(R,Ve)}),xe=Sr(function(Ve){var Ne;f&&ue(-1,-1),R==null||(Ne=R.onMouseLeave)===null||Ne===void 0||Ne.call(R,Ve)});if(Y===0||J===0)return null;var Te=(i=R.title)!==null&&i!==void 0?i:pm({rowType:A,ellipsis:p,children:T}),Fe=$e(O,h,(u={},le(le(le(le(le(le(le(le(le(le(u,"".concat(O,"-fix-left"),z&&_),"".concat(O,"-fix-left-first"),$&&_),"".concat(O,"-fix-left-last"),M&&_),"".concat(O,"-fix-left-all"),M&&K&&_),"".concat(O,"-fix-right"),G&&_),"".concat(O,"-fix-right-first"),P&&_),"".concat(O,"-fix-right-last"),S&&_),"".concat(O,"-ellipsis"),p),"".concat(O,"-with-append"),B),"".concat(O,"-fix-sticky"),(z||G)&&L&&_),le(u,"".concat(O,"-row-hover"),!Z&&ne)),R.className,Z==null?void 0:Z.className),ge={};v&&(ge.textAlign=v);var ye=he(he(he(he({},Z==null?void 0:Z.style),W),ge),R.style),Ee=T;return pr(Ee)==="object"&&!Array.isArray(Ee)&&!m.isValidElement(Ee)&&(Ee=null),p&&(M||P)&&(Ee=m.createElement("span",{className:"".concat(O,"-content")},Ee)),m.createElement(s,Ke({},Z,R,{className:Fe,style:ye,title:Te,scope:d,onMouseEnter:q?ce:void 0,onMouseLeave:q?xe:void 0,colSpan:Y!==1?Y:null,rowSpan:J!==1?J:null}),B,Ee)}const so=m.memo(gm);function Qs(e,t,r,n,o){var a=r[e]||{},l=r[t]||{},i,u;a.fixed==="left"?i=n.left[o==="rtl"?t:e]:l.fixed==="right"&&(u=n.right[o==="rtl"?e:t]);var s=!1,c=!1,p=!1,d=!1,g=r[t+1],h=r[e-1],v=g&&!g.fixed||h&&!h.fixed||r.every(function(y){return y.fixed==="left"});if(o==="rtl"){if(i!==void 0){var f=h&&h.fixed==="left";d=!f&&v}else if(u!==void 0){var b=g&&g.fixed==="right";p=!b&&v}}else if(i!==void 0){var x=g&&g.fixed==="left";s=!x&&v}else if(u!==void 0){var C=h&&h.fixed==="right";c=!C&&v}return{fixLeft:i,fixRight:u,lastFixLeft:s,firstFixRight:c,lastFixRight:p,firstFixLeft:d,isSticky:n.isSticky}}var Tf=m.createContext({});function hm(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,l=e.rowSpan,i=e.align,u=Kt(Jt,["prefixCls","direction"]),s=u.prefixCls,c=u.direction,p=m.useContext(Tf),d=p.scrollColumnIndex,g=p.stickyOffsets,h=p.flattenColumns,v=r+a-1,f=v+1===d?a+1:a,b=Qs(r,r+f-1,h,g,c);return m.createElement(so,Ke({className:t,index:r,component:"td",prefixCls:s,record:null,dataIndex:null,align:i,colSpan:f,rowSpan:l,render:function(){return n}},b))}var mm=["children"];function vm(e){var t=e.children,r=wt(e,mm);return m.createElement("tr",r,t)}function ki(e){var t=e.children;return t}ki.Row=vm;ki.Cell=hm;function Cm(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Kt(Jt,"prefixCls"),a=n.length-1,l=n[a],i=m.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:l!=null&&l.scrollbar?a:null}},[l,n,a,r]);return m.createElement(Tf.Provider,{value:i},m.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const da=lo(Cm);var Mf=ki;function bm(e){return null}function ym(e){return null}function Lf(e,t,r,n,o,a,l){var i=a(t,l);e.push({record:t,indent:r,index:l,rowKey:i});var u=o==null?void 0:o.has(i);if(t&&Array.isArray(t[n])&&u)for(var s=0;s<t[n].length;s+=1)Lf(e,t[n][s],r+1,n,o,a,s)}function jf(e,t,r,n){var o=m.useMemo(function(){if(r!=null&&r.size){for(var a=[],l=0;l<(e==null?void 0:e.length);l+=1){var i=e[l];Lf(a,i,0,t,r,n,l)}return a}return e==null?void 0:e.map(function(u,s){return{record:u,indent:0,index:s,rowKey:n(u,s)}})},[e,t,r,n]);return o}function _f(e,t,r,n){var o=Kt(Jt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,l=o.expandableType,i=o.expandedKeys,u=o.childrenColumnName,s=o.onTriggerExpand,c=o.rowExpandable,p=o.onRow,d=o.expandRowByClick,g=o.rowClassName,h=l==="nest",v=l==="row"&&(!c||c(e)),f=v||h,b=i&&i.has(t),x=u&&e&&e[u],C=Sr(s),y=p==null?void 0:p(e,r),w=y==null?void 0:y.onClick,A=function(I){d&&f&&s(e,I);for(var $=arguments.length,M=new Array($>1?$-1:0),P=1;P<$;P++)M[P-1]=arguments[P];w==null||w.apply(void 0,[I].concat(M))},k;typeof g=="string"?k=g:typeof g=="function"&&(k=g(e,r,n));var F=Si(a);return he(he({},o),{},{columnsKey:F,nestExpandable:h,expanded:b,hasNestChildren:x,record:e,onTriggerExpand:C,rowSupportExpand:v,expandable:f,rowProps:he(he({},y),{},{className:$e(k,y==null?void 0:y.className),onClick:A})})}function zf(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,l=e.expanded,i=e.colSpan,u=e.isEmpty,s=e.stickyOffset,c=s===void 0?0:s,p=Kt(Jt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),d=p.scrollbarSize,g=p.fixHeader,h=p.fixColumn,v=p.componentWidth,f=p.horizonScroll,b=r;return(u?f&&v:h)&&(b=m.createElement("div",{style:{width:v-c-(g&&!u?d:0),position:"sticky",left:c,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},b)),m.createElement(n,{className:a,style:{display:l?null:"none"}},m.createElement(so,{component:o,prefixCls:t,colSpan:i},b))}function xm(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,l="".concat(t,"-row-expand-icon");if(!a)return m.createElement("span",{className:$e(l,"".concat(t,"-row-spaced"))});var i=function(s){n(r,s),s.stopPropagation()};return m.createElement("span",{className:$e(l,le(le({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:i})}function wm(e,t,r){var n=[];function o(a){(a||[]).forEach(function(l,i){n.push(t(l,i)),o(l[r])})}return o(e),n}function Hf(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function Kf(e,t,r,n,o){var a,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,u=e.record,s=e.prefixCls,c=e.columnsKey,p=e.fixedInfoList,d=e.expandIconColumnIndex,g=e.nestExpandable,h=e.indentSize,v=e.expandIcon,f=e.expanded,b=e.hasNestChildren,x=e.onTriggerExpand,C=e.expandable,y=e.expandedKeys,w=c[r],A=p[r],k;r===(d||0)&&g&&(k=m.createElement(m.Fragment,null,m.createElement("span",{style:{paddingLeft:"".concat(h*n,"px")},className:"".concat(s,"-row-indent indent-level-").concat(n)}),v({prefixCls:s,expanded:f,expandable:b,record:u,onExpand:x})));var F=((a=t.onCell)===null||a===void 0?void 0:a.call(t,u,o))||{};if(i){var D=F.rowSpan,I=D===void 0?1:D;if(C&&I&&r<i){for(var $=I,M=o;M<o+I;M+=1){var P=l[M];y.has(P)&&($+=1)}F.rowSpan=$}}return{key:w,fixedInfo:A,appendCellNode:k,additionalCellProps:F}}function Dm(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,l=e.rowKey,i=e.rowKeys,u=e.indent,s=u===void 0?0:u,c=e.rowComponent,p=e.cellComponent,d=e.scopeCellComponent,g=e.expandedRowInfo,h=_f(n,l,o,s),v=h.prefixCls,f=h.flattenColumns,b=h.expandedRowClassName,x=h.expandedRowRender,C=h.rowProps,y=h.expanded,w=h.rowSupportExpand,A=m.useRef(!1);A.current||(A.current=y);var k=Hf(b,n,o,s),F=m.createElement(c,Ke({},C,{"data-row-key":l,className:$e(t,"".concat(v,"-row"),"".concat(v,"-row-level-").concat(s),C==null?void 0:C.className,le({},k,s>=1)),style:he(he({},r),C==null?void 0:C.style)}),f.map(function($,M){var P=$.render,S=$.dataIndex,B=$.className,N=Kf(h,$,M,s,o,i,g==null?void 0:g.offset),R=N.key,L=N.fixedInfo,O=N.appendCellNode,V=N.additionalCellProps;return m.createElement(so,Ke({className:B,ellipsis:$.ellipsis,align:$.align,scope:$.rowScope,component:$.rowScope?d:p,prefixCls:v,key:R,record:n,index:o,renderIndex:a,dataIndex:S,render:P,shouldCellUpdate:$.shouldCellUpdate},L,{appendNode:O,additionalProps:V}))})),D;if(w&&(A.current||y)){var I=x(n,o,s+1,y);D=m.createElement(zf,{expanded:y,className:$e("".concat(v,"-expanded-row"),"".concat(v,"-expanded-row-level-").concat(s+1),k),prefixCls:v,component:c,cellComponent:p,colSpan:g?g.colSpan:f.length,stickyOffset:g==null?void 0:g.sticky,isEmpty:!1},I)}return m.createElement(m.Fragment,null,F,D)}const Em=lo(Dm);function Sm(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=m.useRef();return ln(function(){a.current&&r(t,a.current.offsetWidth)},[]),m.createElement(js,{data:t},m.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},m.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function km(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=m.useRef(null),l=Kt(Jt,["measureRowRender"]),i=l.measureRowRender,u=m.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},m.createElement(js.Collection,{onBatchResize:function(c){qd(a.current)&&c.forEach(function(p){var d=p.data,g=p.size;n(d,g.offsetWidth)})}},r.map(function(s){var c=o.find(function(g){return g.key===s}),p=c==null?void 0:c.title,d=m.isValidElement(p)?m.cloneElement(p,{ref:null}):p;return m.createElement(Sm,{prefixCls:t,key:s,columnKey:s,onColumnResize:n,title:d})})));return i?i(u):u}function Am(e){var t=e.data,r=e.measureColumnWidth,n=Kt(Jt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,l=n.onColumnResize,i=n.flattenColumns,u=n.getRowKey,s=n.expandedKeys,c=n.childrenColumnName,p=n.emptyNode,d=n.expandedRowOffset,g=d===void 0?0:d,h=n.colWidths,v=jf(t,c,s,u),f=m.useMemo(function(){return v.map(function(D){return D.rowKey})},[v]),b=m.useRef({renderWithProps:!1}),x=m.useMemo(function(){for(var D=i.length-g,I=0,$=0;$<g;$+=1)I+=h[$]||0;return{offset:g,colSpan:D,sticky:I}},[i.length,g,h]),C=a(["body","wrapper"],"tbody"),y=a(["body","row"],"tr"),w=a(["body","cell"],"td"),A=a(["body","cell"],"th"),k;t.length?k=v.map(function(D,I){var $=D.record,M=D.indent,P=D.index,S=D.rowKey;return m.createElement(Em,{key:S,rowKey:S,rowKeys:f,record:$,index:I,renderIndex:P,rowComponent:y,cellComponent:w,scopeCellComponent:A,indent:M,expandedRowInfo:x})}):k=m.createElement(zf,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:y,cellComponent:w,colSpan:i.length,isEmpty:!0},p);var F=Si(i);return m.createElement(Pf.Provider,{value:b.current},m.createElement(C,{className:"".concat(o,"-tbody")},r&&m.createElement(km,{prefixCls:o,columnsKey:F,onColumnResize:l,columns:i}),k))}const Bm=lo(Am);var Fm=["expandable"],$o="RC_TABLE_INTERNAL_COL_DEFINE";function $m(e){var t=e.expandable,r=wt(e,Fm),n;return"expandable"in e?n=he(he({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var Om=["columnType"];function Vf(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Kt(Jt,["tableLayout"]),a=o.tableLayout,l=[],i=n||r.length,u=!1,s=i-1;s>=0;s-=1){var c=t[s],p=r&&r[s],d=void 0,g=void 0;if(p&&(d=p[$o],a==="auto"&&(g=p.minWidth)),c||g||d||u){var h=d||{};h.columnType;var v=wt(h,Om);l.unshift(m.createElement("col",Ke({key:s,style:{width:c,minWidth:g}},v))),u=!0}}return l.length>0?m.createElement("colgroup",null,l):null}var Nm=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function Rm(e,t){return Je(function(){for(var r=[],n=0;n<t;n+=1){var o=e[n];if(o!==void 0)r[n]=o;else return null}return r},[e.join("_"),t])}var Im=m.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,l=e.colWidths,i=e.colGroup,u=e.columCount,s=e.stickyOffsets,c=e.direction,p=e.fixHeader,d=e.stickyTopOffset,g=e.stickyBottomOffset,h=e.stickyClassName,v=e.scrollX,f=e.tableLayout,b=f===void 0?"fixed":f,x=e.onScroll,C=e.children,y=wt(e,Nm),w=Kt(Jt,["prefixCls","scrollbarSize","isSticky","getComponent"]),A=w.prefixCls,k=w.scrollbarSize,F=w.isSticky,D=w.getComponent,I=D(["header","table"],"table"),$=F&&!p?0:k,M=m.useRef(null),P=m.useCallback(function(_){_u(t,_),_u(M,_)},[]);m.useEffect(function(){function _(q){var Q=q,se=Q.currentTarget,T=Q.deltaX;T&&(x({currentTarget:se,scrollLeft:se.scrollLeft+T}),q.preventDefault())}var K=M.current;return K==null||K.addEventListener("wheel",_,{passive:!1}),function(){K==null||K.removeEventListener("wheel",_)}},[]);var S=a[a.length-1],B={fixed:S?S.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(A,"-cell-scrollbar")}}},N=Je(function(){return $?[].concat(ot(o),[B]):o},[$,o]),R=Je(function(){return $?[].concat(ot(a),[B]):a},[$,a]),L=Je(function(){var _=s.right,K=s.left;return he(he({},s),{},{left:c==="rtl"?[].concat(ot(K.map(function(q){return q+$})),[0]):K,right:c==="rtl"?_:[].concat(ot(_.map(function(q){return q+$})),[0]),isSticky:F})},[$,s,F]),O=Rm(l,u),V=Je(function(){var _=!O||!O.length||O.every(function(K){return!K});return n||_},[n,O]);return m.createElement("div",{style:he({overflow:"hidden"},F?{top:d,bottom:g}:{}),ref:P,className:$e(r,le({},h,!!h))},m.createElement(I,{style:{tableLayout:b,minWidth:"100%",width:v}},V?i:m.createElement(Vf,{colWidths:[].concat(ot(O),[$]),columCount:u+1,columns:R}),C(he(he({},y),{},{stickyOffsets:L,columns:N,flattenColumns:R}))))});const ac=m.memo(Im);var Pm=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,l=t.cellComponent,i=t.onHeaderRow,u=t.index,s=Kt(Jt,["prefixCls","direction"]),c=s.prefixCls,p=s.direction,d;i&&(d=i(r.map(function(h){return h.column}),u));var g=Si(r.map(function(h){return h.column}));return m.createElement(a,d,r.map(function(h,v){var f=h.column,b=Qs(h.colStart,h.colEnd,o,n,p),x;return f&&f.onHeaderCell&&(x=h.column.onHeaderCell(f)),m.createElement(so,Ke({},h,{scope:f.title?h.colSpan>1?"colgroup":"col":null,ellipsis:f.ellipsis,align:f.align,component:l,prefixCls:c,key:g[v]},b,{additionalProps:x,rowType:"header"}))}))};function Tm(e){var t=[];function r(l,i){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var s=i,c=l.filter(Boolean).map(function(p){var d={key:p.key,className:p.className||"",children:p.title,column:p,colStart:s},g=1,h=p.children;return h&&h.length>0&&(g=r(h,s,u+1).reduce(function(v,f){return v+f},0),d.hasSubColumns=!0),"colSpan"in p&&(g=p.colSpan),"rowSpan"in p&&(d.rowSpan=p.rowSpan),d.colSpan=g,d.colEnd=d.colStart+g-1,t[u].push(d),s+=g,g});return c}r(e,0);for(var n=t.length,o=function(i){t[i].forEach(function(u){!("rowSpan"in u)&&!u.hasSubColumns&&(u.rowSpan=n-i)})},a=0;a<n;a+=1)o(a);return t}var Mm=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,a=t.onHeaderRow,l=Kt(Jt,["prefixCls","getComponent"]),i=l.prefixCls,u=l.getComponent,s=m.useMemo(function(){return Tm(n)},[n]),c=u(["header","wrapper"],"thead"),p=u(["header","row"],"tr"),d=u(["header","cell"],"th");return m.createElement(c,{className:"".concat(i,"-thead")},s.map(function(g,h){var v=m.createElement(Pm,{key:h,flattenColumns:o,cells:g,stickyOffsets:r,rowComponent:p,cellComponent:d,onHeaderRow:a,index:h});return v}))};const ic=lo(Mm);function lc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function Lm(e,t,r){return m.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(d){var g=lc(t,d.width);g?n+=g:o+=1});var a=Math.max(t,r),l=Math.max(a-n,o),i=o,u=l/o,s=0,c=e.map(function(d){var g=he({},d),h=lc(t,g.width);if(h)g.width=h;else{var v=Math.floor(u);g.width=i===1?l:v,l-=v,i-=1}return s+=g.width,g});if(s<a){var p=a/s;l=a,c.forEach(function(d,g){var h=Math.floor(d.width*p);d.width=g===c.length-1?l:h,l-=h})}return[c,Math.max(s,a)]}return[e,t]},[e,t,r])}var jm=["children"],_m=["fixed"];function eu(e){return Ci(e).filter(function(t){return m.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=wt(n,jm),l=he({key:r},a);return o&&(l.children=eu(o)),l})}function Wf(e){return e.filter(function(t){return t&&pr(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?he(he({},t),{},{children:Wf(r)}):t})}function Xl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&pr(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,l=a===!0?"left":a,i="".concat(t,"-").concat(o),u=n.children;return u&&u.length>0?[].concat(ot(r),ot(Xl(u,i).map(function(s){var c;return he(he({},s),{},{fixed:(c=s.fixed)!==null&&c!==void 0?c:l})}))):[].concat(ot(r),[he(he({key:i},n),{},{fixed:l})])},[])}function zm(e){return e.map(function(t){var r=t.fixed,n=wt(t,_m),o=r;return r==="left"?o="right":r==="right"&&(o="left"),he({fixed:o},n)})}function Hm(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,l=e.expandedKeys,i=e.columnTitle,u=e.getRowKey,s=e.onTriggerExpand,c=e.expandIcon,p=e.rowExpandable,d=e.expandIconColumnIndex,g=e.expandedRowOffset,h=g===void 0?0:g,v=e.direction,f=e.expandRowByClick,b=e.columnWidth,x=e.fixed,C=e.scrollWidth,y=e.clientWidth,w=m.useMemo(function(){var S=n||eu(o)||[];return Wf(S.slice())},[n,o]),A=m.useMemo(function(){if(a){var S=w.slice();if(!S.includes(en)){var B=d||0,N=B===0&&x==="right"?w.length:B;N>=0&&S.splice(N,0,en)}var R=S.indexOf(en);S=S.filter(function(_,K){return _!==en||K===R});var L=w[R],O;x?O=x:O=L?L.fixed:null;var V=le(le(le(le(le(le({},$o,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",i),"fixed",O),"className","".concat(r,"-row-expand-icon-cell")),"width",b),"render",function(K,q,Q){var se=u(q,Q),T=l.has(se),Z=p?p(q):!0,W=c({prefixCls:r,expanded:T,expandable:Z,record:q,onExpand:s});return f?m.createElement("span",{onClick:function(G){return G.stopPropagation()}},W):W});return S.map(function(_,K){var q=_===en?V:_;return K<h?he(he({},q),{},{fixed:q.fixed||"left"}):q})}return w.filter(function(_){return _!==en})},[a,w,u,l,c,v,h]),k=m.useMemo(function(){var S=A;return t&&(S=t(S)),S.length||(S=[{render:function(){return null}}]),S},[t,A,v]),F=m.useMemo(function(){return v==="rtl"?zm(Xl(k)):Xl(k)},[k,v,C]),D=m.useMemo(function(){for(var S=-1,B=F.length-1;B>=0;B-=1){var N=F[B].fixed;if(N==="left"||N===!0){S=B;break}}if(S>=0)for(var R=0;R<=S;R+=1){var L=F[R].fixed;if(L!=="left"&&L!==!0)return!0}var O=F.findIndex(function(K){var q=K.fixed;return q==="right"});if(O>=0)for(var V=O;V<F.length;V+=1){var _=F[V].fixed;if(_!=="right")return!0}return!1},[F]),I=Lm(F,C,y),$=je(I,2),M=$[0],P=$[1];return[k,M,P,D]}function Km(e,t,r){var n=$m(e),o=n.expandIcon,a=n.expandedRowKeys,l=n.defaultExpandedRowKeys,i=n.defaultExpandAllRows,u=n.expandedRowRender,s=n.onExpand,c=n.onExpandedRowsChange,p=n.childrenColumnName,d=o||xm,g=p||"children",h=m.useMemo(function(){return u?"row":e.expandable&&e.internalHooks===ra&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(w){return w&&pr(w)==="object"&&w[g]})?"nest":!1},[!!u,t]),v=m.useState(function(){return l||(i?wm(t,r,g):[])}),f=je(v,2),b=f[0],x=f[1],C=m.useMemo(function(){return new Set(a||b||[])},[a,b]),y=m.useCallback(function(w){var A=r(w,t.indexOf(w)),k,F=C.has(A);F?(C.delete(A),k=ot(C)):k=[].concat(ot(C),[A]),x(k),s&&s(!F,w),c&&c(k)},[r,C,t,s,c]);return[n,h,C,d,g,y]}function Vm(e,t,r){var n=e.map(function(o,a){return Qs(a,a,e,t,r)});return Rs(function(){return n},[n],function(o,a){return!an(o,a)})}function Wm(e){var t=at(e),r=et({}),n=je(r,2),o=n[1],a=at(null),l=at([]);function i(u){l.current.push(u);var s=Promise.resolve();a.current=s,s.then(function(){if(a.current===s){var c=l.current,p=t.current;l.current=[],c.forEach(function(d){t.current=d(t.current)}),a.current=null,p!==t.current&&o({})}})}return gt(function(){return function(){a.current=null}},[]),[t.current,i]}function qm(e){var t=at(null),r=at();function n(){window.clearTimeout(r.current)}function o(l){t.current=l,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return gt(function(){return n},[]),[o,a]}function Um(){var e=m.useState(-1),t=je(e,2),r=t[0],n=t[1],o=m.useState(-1),a=je(o,2),l=a[0],i=a[1],u=m.useCallback(function(s,c){n(s),i(c)},[]);return[r,l,u]}var sc=Kd()?window:null;function Zm(e,t){var r=pr(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,l=a===void 0?0:a,i=r.offsetScroll,u=i===void 0?0:i,s=r.getContainer,c=s===void 0?function(){return sc}:s,p=c()||sc,d=!!e;return m.useMemo(function(){return{isSticky:d,stickyClassName:d?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:l,offsetScroll:u,container:p}},[d,u,o,l,t,p])}function Gm(e,t,r){var n=Je(function(){var o=t.length,a=function(s,c,p){for(var d=[],g=0,h=s;h!==c;h+=p)d.push(g),t[h].fixed&&(g+=e[h]||0);return d},l=a(0,o,1),i=a(o-1,-1,-1).reverse();return r==="rtl"?{left:i,right:l}:{left:l,right:i}},[e,t,r]);return n}function uc(e){var t=e.className,r=e.children;return m.createElement("div",{className:t},r)}function cc(e){var t=_s(e),r=t.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var Xm=function(t,r){var n,o,a=t.scrollBodyRef,l=t.onScroll,i=t.offsetScroll,u=t.container,s=t.direction,c=Kt(Jt,"prefixCls"),p=((n=a.current)===null||n===void 0?void 0:n.scrollWidth)||0,d=((o=a.current)===null||o===void 0?void 0:o.clientWidth)||0,g=p&&d*(d/p),h=m.useRef(),v=Wm({scrollLeft:0,isHiddenScrollBar:!0}),f=je(v,2),b=f[0],x=f[1],C=m.useRef({delta:0,x:0}),y=m.useState(!1),w=je(y,2),A=w[0],k=w[1],F=m.useRef(null);m.useEffect(function(){return function(){Cr.cancel(F.current)}},[]);var D=function(){k(!1)},I=function(B){B.persist(),C.current.delta=B.pageX-b.scrollLeft,C.current.x=0,k(!0),B.preventDefault()},$=function(B){var N,R=B||((N=window)===null||N===void 0?void 0:N.event),L=R.buttons;if(!A||L===0){A&&k(!1);return}var O=C.current.x+B.pageX-C.current.x-C.current.delta,V=s==="rtl";O=Math.max(V?g-d:0,Math.min(V?0:d-g,O));var _=!V||Math.abs(O)+Math.abs(g)<d;_&&(l({scrollLeft:O/d*(p+2)}),C.current.x=B.pageX)},M=function(){Cr.cancel(F.current),F.current=Cr(function(){if(a.current){var B=cc(a.current).top,N=B+a.current.offsetHeight,R=u===window?document.documentElement.scrollTop+window.innerHeight:cc(u).top+u.clientHeight;x(function(L){return he(he({},L),{},{isHiddenScrollBar:N-zu()<=R||B>=R-i})})}})},P=function(B){x(function(N){return he(he({},N),{},{scrollLeft:p?B/p*d:0})})};return m.useImperativeHandle(r,function(){return{setScrollLeft:P,checkScrollBarVisible:M}}),m.useEffect(function(){var S=nn(document.body,"mouseup",D,!1),B=nn(document.body,"mousemove",$,!1);return M(),function(){S.remove(),B.remove()}},[g,A]),m.useEffect(function(){if(a.current){for(var S=[],B=_s(a.current);B;)S.push(B),B=B.parentElement;return S.forEach(function(N){return N.addEventListener("scroll",M,!1)}),window.addEventListener("resize",M,!1),window.addEventListener("scroll",M,!1),u.addEventListener("scroll",M,!1),function(){S.forEach(function(N){return N.removeEventListener("scroll",M)}),window.removeEventListener("resize",M),window.removeEventListener("scroll",M),u.removeEventListener("scroll",M)}}},[u]),m.useEffect(function(){b.isHiddenScrollBar||x(function(S){var B=a.current;return B?he(he({},S),{},{scrollLeft:B.scrollLeft/B.scrollWidth*B.clientWidth}):S})},[b.isHiddenScrollBar]),p<=d||!g||b.isHiddenScrollBar?null:m.createElement("div",{style:{height:zu(),width:d,bottom:i},className:"".concat(c,"-sticky-scroll")},m.createElement("div",{onMouseDown:I,ref:h,className:$e("".concat(c,"-sticky-scroll-bar"),le({},"".concat(c,"-sticky-scroll-bar-active"),A)),style:{width:"".concat(g,"px"),transform:"translate3d(".concat(b.scrollLeft,"px, 0, 0)")}}))};const Ym=m.forwardRef(Xm);var qf="rc-table",Jm=[],Qm={};function ev(){return"No Data"}function tv(e,t){var r=he({rowKey:"key",prefixCls:qf,emptyText:ev},e),n=r.prefixCls,o=r.className,a=r.rowClassName,l=r.style,i=r.data,u=r.rowKey,s=r.scroll,c=r.tableLayout,p=r.direction,d=r.title,g=r.footer,h=r.summary,v=r.caption,f=r.id,b=r.showHeader,x=r.components,C=r.emptyText,y=r.onRow,w=r.onHeaderRow,A=r.measureRowRender,k=r.onScroll,F=r.internalHooks,D=r.transformColumns,I=r.internalRefs,$=r.tailor,M=r.getContainerWidth,P=r.sticky,S=r.rowHoverable,B=S===void 0?!0:S,N=i||Jm,R=!!N.length,L=F===ra,O=m.useCallback(function(lt,ft){return Ls(x,lt)||ft},[x]),V=m.useMemo(function(){return typeof u=="function"?u:function(lt){var ft=lt&&lt[u];return ft}},[u]),_=O(["body"]),K=Um(),q=je(K,3),Q=q[0],se=q[1],T=q[2],Z=Km(r,N,V),W=je(Z,6),z=W[0],G=W[1],Y=W[2],J=W[3],oe=W[4],re=W[5],ne=s==null?void 0:s.x,ue=m.useState(0),ce=je(ue,2),xe=ce[0],Te=ce[1],Fe=Hm(he(he(he({},r),z),{},{expandable:!!z.expandedRowRender,columnTitle:z.columnTitle,expandedKeys:Y,getRowKey:V,onTriggerExpand:re,expandIcon:J,expandIconColumnIndex:z.expandIconColumnIndex,direction:p,scrollWidth:L&&$&&typeof ne=="number"?ne:null,clientWidth:xe}),L?D:null),ge=je(Fe,4),ye=ge[0],Ee=ge[1],Ve=ge[2],Ne=ge[3],Ie=Ve??ne,tt=m.useMemo(function(){return{columns:ye,flattenColumns:Ee}},[ye,Ee]),Ue=m.useRef(),_e=m.useRef(),Xe=m.useRef(),Se=m.useRef();m.useImperativeHandle(t,function(){return{nativeElement:Ue.current,scrollTo:function(ft){var Wt;if(Xe.current instanceof HTMLElement){var mr=ft.index,qt=ft.top,Pn=ft.key;if(sm(qt)){var gn;(gn=Xe.current)===null||gn===void 0||gn.scrollTo({top:qt})}else{var hn,Co=Pn??V(N[mr]);(hn=Xe.current.querySelector('[data-row-key="'.concat(Co,'"]')))===null||hn===void 0||hn.scrollIntoView()}}else(Wt=Xe.current)!==null&&Wt!==void 0&&Wt.scrollTo&&Xe.current.scrollTo(ft)}}});var De=m.useRef(),Re=m.useState(!1),ze=je(Re,2),Ze=ze[0],qe=ze[1],Ct=m.useState(!1),Ye=je(Ct,2),ut=Ye[0],mt=Ye[1],bt=m.useState(new Map),dt=je(bt,2),Ut=dt[0],Ot=dt[1],Vt=Si(Ee),Mt=Vt.map(function(lt){return Ut.get(lt)}),Lt=m.useMemo(function(){return Mt},[Mt.join("_")]),Nt=Gm(Lt,Ee,p),Pe=s&&Gl(s.y),kt=s&&Gl(Ie)||!!z.fixed,Qt=kt&&Ee.some(function(lt){var ft=lt.fixed;return ft}),gr=m.useRef(),hr=Zm(P,n),ir=hr.isSticky,Zr=hr.offsetHeader,X=hr.offsetSummary,me=hr.offsetScroll,Me=hr.stickyClassName,de=hr.container,U=m.useMemo(function(){return h==null?void 0:h(N)},[h,N]),ve=(Pe||ir)&&m.isValidElement(U)&&U.type===ki&&U.props.fixed,be,ie,pe;Pe&&(ie={overflowY:R?"scroll":"auto",maxHeight:s.y}),kt&&(be={overflowX:"auto"},Pe||(ie={overflowY:"hidden"}),pe={width:Ie===!0?"auto":Ie,minWidth:"100%"});var te=m.useCallback(function(lt,ft){Ot(function(Wt){if(Wt.get(lt)!==ft){var mr=new Map(Wt);return mr.set(lt,ft),mr}return Wt})},[]),ee=qm(),Oe=je(ee,2),We=Oe[0],pt=Oe[1];function Qe(lt,ft){ft&&(typeof ft=="function"?ft(lt):ft.scrollLeft!==lt&&(ft.scrollLeft=lt,ft.scrollLeft!==lt&&setTimeout(function(){ft.scrollLeft=lt},0)))}var Ae=Sr(function(lt){var ft=lt.currentTarget,Wt=lt.scrollLeft,mr=p==="rtl",qt=typeof Wt=="number"?Wt:ft.scrollLeft,Pn=ft||Qm;if(!pt()||pt()===Pn){var gn;We(Pn),Qe(qt,_e.current),Qe(qt,Xe.current),Qe(qt,De.current),Qe(qt,(gn=gr.current)===null||gn===void 0?void 0:gn.setScrollLeft)}var hn=ft||_e.current;if(hn){var Co=L&&$&&typeof Ie=="number"?Ie:hn.scrollWidth,Zi=hn.clientWidth;if(Co===Zi){qe(!1),mt(!1);return}mr?(qe(-qt<Co-Zi),mt(-qt>0)):(qe(qt>0),mt(qt<Co-Zi))}}),nt=Sr(function(lt){Ae(lt),k==null||k(lt)}),er=function(){if(kt&&Xe.current){var ft;Ae({currentTarget:_s(Xe.current),scrollLeft:(ft=Xe.current)===null||ft===void 0?void 0:ft.scrollLeft})}else qe(!1),mt(!1)},Gr=function(ft){var Wt,mr=ft.width;(Wt=gr.current)===null||Wt===void 0||Wt.checkScrollBarVisible();var qt=Ue.current?Ue.current.offsetWidth:mr;L&&M&&Ue.current&&(qt=M(Ue.current,qt)||qt),qt!==xe&&(er(),Te(qt))},Xr=m.useRef(!1);m.useEffect(function(){Xr.current&&er()},[kt,i,ye.length]),m.useEffect(function(){Xr.current=!0},[]);var Hi=m.useState(0),go=je(Hi,2),Ir=go[0],ia=go[1],Ki=m.useState(!0),la=je(Ki,2),ho=la[0],Vi=la[1];ln(function(){(!$||!L)&&(Xe.current instanceof Element?ia(Hu(Xe.current).width):ia(Hu(Se.current).width)),Vi(eg("position","sticky"))},[]),m.useEffect(function(){L&&I&&(I.body.current=Xe.current)});var Wi=m.useCallback(function(lt){return m.createElement(m.Fragment,null,m.createElement(ic,lt),ve==="top"&&m.createElement(da,lt,U))},[ve,U]),qi=m.useCallback(function(lt){return m.createElement(da,lt,U)},[U]),sa=O(["table"],"table"),fn=m.useMemo(function(){return c||(Qt?Ie==="max-content"?"auto":"fixed":Pe||ir||Ee.some(function(lt){var ft=lt.ellipsis;return ft})?"fixed":"auto")},[Pe,Qt,Ee,c,ir]),Et,ht={colWidths:Lt,columCount:Ee.length,stickyOffsets:Nt,onHeaderRow:w,fixHeader:Pe,scroll:s},Dt=m.useMemo(function(){return R?null:typeof C=="function"?C():C},[R,C]),Zt=m.createElement(Bm,{data:N,measureColumnWidth:Pe||kt||ir}),jt=m.createElement(Vf,{colWidths:Ee.map(function(lt){var ft=lt.width;return ft}),columns:Ee}),pn=v!=null?m.createElement("caption",{className:"".concat(n,"-caption")},v):void 0,mo=Xa(r,{data:!0}),ua=Xa(r,{aria:!0});if(Pe||ir){var Rn;typeof _=="function"?(Rn=_(N,{scrollbarSize:Ir,ref:Xe,onScroll:Ae}),ht.colWidths=Ee.map(function(lt,ft){var Wt=lt.width,mr=ft===Ee.length-1?Wt-Ir:Wt;return typeof mr=="number"&&!Number.isNaN(mr)?mr:0})):Rn=m.createElement("div",{style:he(he({},be),ie),onScroll:nt,ref:Xe,className:$e("".concat(n,"-body"))},m.createElement(sa,Ke({style:he(he({},pe),{},{tableLayout:fn})},ua),pn,jt,Zt,!ve&&U&&m.createElement(da,{stickyOffsets:Nt,flattenColumns:Ee},U)));var vo=he(he(he({noData:!N.length},ht),tt),{},{direction:p,stickyClassName:Me,scrollX:Ie,tableLayout:fn,onScroll:Ae});Et=m.createElement(m.Fragment,null,b!==!1&&m.createElement(ac,Ke({},vo,{stickyTopOffset:Zr,className:"".concat(n,"-header"),ref:_e,colGroup:jt}),Wi),Rn,ve&&ve!=="top"&&m.createElement(ac,Ke({},vo,{stickyBottomOffset:X,className:"".concat(n,"-summary"),ref:De,colGroup:jt}),qi),ir&&Xe.current&&Xe.current instanceof Element&&m.createElement(Ym,{ref:gr,offsetScroll:me,scrollBodyRef:Xe,onScroll:Ae,container:de,direction:p}))}else Et=m.createElement("div",{style:he(he({},be),ie),className:$e("".concat(n,"-content")),onScroll:Ae,ref:Xe},m.createElement(sa,Ke({style:he(he({},pe),{},{tableLayout:fn})},ua),pn,jt,b!==!1&&m.createElement(ic,Ke({},ht,tt)),Zt,U&&m.createElement(da,{stickyOffsets:Nt,flattenColumns:Ee},U)));var Pr=m.createElement("div",Ke({className:$e(n,o,le(le(le(le(le(le(le(le(le(le({},"".concat(n,"-rtl"),p==="rtl"),"".concat(n,"-ping-left"),Ze),"".concat(n,"-ping-right"),ut),"".concat(n,"-layout-fixed"),c==="fixed"),"".concat(n,"-fixed-header"),Pe),"".concat(n,"-fixed-column"),Qt),"".concat(n,"-fixed-column-gapped"),Qt&&Ne),"".concat(n,"-scroll-horizontal"),kt),"".concat(n,"-has-fix-left"),Ee[0]&&Ee[0].fixed),"".concat(n,"-has-fix-right"),Ee[Ee.length-1]&&Ee[Ee.length-1].fixed==="right")),style:l,id:f,ref:Ue},mo),d&&m.createElement(uc,{className:"".concat(n,"-title")},d(N)),m.createElement("div",{ref:Se,className:"".concat(n,"-container")},Et),g&&m.createElement(uc,{className:"".concat(n,"-footer")},g(N)));kt&&(Pr=m.createElement(js,{onResize:Gr},Pr));var In=Vm(Ee,Nt,p),Ui=m.useMemo(function(){return{scrollX:Ie,prefixCls:n,getComponent:O,scrollbarSize:Ir,direction:p,fixedInfoList:In,isSticky:ir,supportSticky:ho,componentWidth:xe,fixHeader:Pe,fixColumn:Qt,horizonScroll:kt,tableLayout:fn,rowClassName:a,expandedRowClassName:z.expandedRowClassName,expandIcon:J,expandableType:G,expandRowByClick:z.expandRowByClick,expandedRowRender:z.expandedRowRender,expandedRowOffset:z.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:z.expandIconColumnIndex,indentSize:z.indentSize,allColumnsFixedLeft:Ee.every(function(lt){return lt.fixed==="left"}),emptyNode:Dt,columns:ye,flattenColumns:Ee,onColumnResize:te,colWidths:Lt,hoverStartRow:Q,hoverEndRow:se,onHover:T,rowExpandable:z.rowExpandable,onRow:y,getRowKey:V,expandedKeys:Y,childrenColumnName:oe,rowHoverable:B,measureRowRender:A}},[Ie,n,O,Ir,p,In,ir,ho,xe,Pe,Qt,kt,fn,a,z.expandedRowClassName,J,G,z.expandRowByClick,z.expandedRowRender,z.expandedRowOffset,re,z.expandIconColumnIndex,z.indentSize,Dt,ye,Ee,te,Lt,Q,se,T,z.rowExpandable,y,V,Y,oe,B,A]);return m.createElement(Jt.Provider,{value:Ui},Pr)}var rv=m.forwardRef(tv);function Uf(e){return If(rv,e)}var uo=Uf();uo.EXPAND_COLUMN=en;uo.INTERNAL_HOOKS=ra;uo.Column=bm;uo.ColumnGroup=ym;uo.Summary=Mf;var tu=Ys(null),Zf=Ys(null);function nv(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function ov(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,l=e.component,i=e.renderIndex,u=e.record,s=e.style,c=e.className,p=e.inverse,d=e.getHeight,g=r.render,h=r.dataIndex,v=r.className,f=r.width,b=Kt(Zf,["columnsOffset"]),x=b.columnsOffset,C=Kf(t,r,n,o,a),y=C.key,w=C.fixedInfo,A=C.appendCellNode,k=C.additionalCellProps,F=k.style,D=k.colSpan,I=D===void 0?1:D,$=k.rowSpan,M=$===void 0?1:$,P=n-1,S=nv(P,I,x),B=I>1?f-S:0,N=he(he(he({},F),s),{},{flex:"0 0 ".concat(S,"px"),width:"".concat(S,"px"),marginRight:B,pointerEvents:"auto"}),R=m.useMemo(function(){return p?M<=1:I===0||M===0||M>1},[M,I,p]);R?N.visibility="hidden":p&&(N.height=d==null?void 0:d(M));var L=R?function(){return null}:g,O={};return(M===0||I===0)&&(O.rowSpan=1,O.colSpan=1),m.createElement(so,Ke({className:$e(v,c),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:l,prefixCls:t.prefixCls,key:y,record:u,index:a,renderIndex:i,dataIndex:h,render:L,shouldCellUpdate:r.shouldCellUpdate},w,{appendNode:A,additionalProps:he(he({},k),{},{style:N},O)}))}var av=["data","index","className","rowKey","style","extra","getHeight"],iv=m.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,l=e.style,i=e.extra,u=e.getHeight,s=wt(e,av),c=r.record,p=r.indent,d=r.index,g=Kt(Jt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),h=g.scrollX,v=g.flattenColumns,f=g.prefixCls,b=g.fixColumn,x=g.componentWidth,C=Kt(tu,["getComponent"]),y=C.getComponent,w=_f(c,a,n,p),A=y(["body","row"],"div"),k=y(["body","cell"],"div"),F=w.rowSupportExpand,D=w.expanded,I=w.rowProps,$=w.expandedRowRender,M=w.expandedRowClassName,P;if(F&&D){var S=$(c,n,p+1,D),B=Hf(M,c,n,p),N={};b&&(N={style:le({},"--virtual-width","".concat(x,"px"))});var R="".concat(f,"-expanded-row-cell");P=m.createElement(A,{className:$e("".concat(f,"-expanded-row"),"".concat(f,"-expanded-row-level-").concat(p+1),B)},m.createElement(so,{component:k,prefixCls:f,className:$e(R,le({},"".concat(R,"-fixed"),b)),additionalProps:N},S))}var L=he(he({},l),{},{width:h});i&&(L.position="absolute",L.pointerEvents="none");var O=m.createElement(A,Ke({},I,s,{"data-row-key":a,ref:F?null:t,className:$e(o,"".concat(f,"-row"),I==null?void 0:I.className,le({},"".concat(f,"-row-extra"),i)),style:he(he({},L),I==null?void 0:I.style)}),v.map(function(V,_){return m.createElement(ov,{key:_,component:k,rowInfo:w,column:V,colIndex:_,indent:p,index:n,renderIndex:d,record:c,inverse:i,getHeight:u})}));return F?m.createElement("div",{ref:t},O,P):O}),dc=lo(iv),lv=m.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Kt(Jt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,l=o.onColumnResize,i=o.getRowKey,u=o.expandedKeys,s=o.prefixCls,c=o.childrenColumnName,p=o.scrollX,d=o.direction,g=Kt(tu),h=g.sticky,v=g.scrollY,f=g.listItemHeight,b=g.getComponent,x=g.onScroll,C=m.useRef(),y=jf(r,c,u,i),w=m.useMemo(function(){var P=0;return a.map(function(S){var B=S.width,N=S.minWidth,R=S.key,L=Math.max(B||0,N||0);return P+=L,[R,L,P]})},[a]),A=m.useMemo(function(){return w.map(function(P){return P[2]})},[w]);m.useEffect(function(){w.forEach(function(P){var S=je(P,2),B=S[0],N=S[1];l(B,N)})},[w]),m.useImperativeHandle(t,function(){var P,S={scrollTo:function(N){var R;(R=C.current)===null||R===void 0||R.scrollTo(N)},nativeElement:(P=C.current)===null||P===void 0?void 0:P.nativeElement};return Object.defineProperty(S,"scrollLeft",{get:function(){var N;return((N=C.current)===null||N===void 0?void 0:N.getScrollInfo().x)||0},set:function(N){var R;(R=C.current)===null||R===void 0||R.scrollTo({left:N})}}),Object.defineProperty(S,"scrollTop",{get:function(){var N;return((N=C.current)===null||N===void 0?void 0:N.getScrollInfo().y)||0},set:function(N){var R;(R=C.current)===null||R===void 0||R.scrollTo({top:N})}}),S});var k=function(S,B){var N,R=(N=y[B])===null||N===void 0?void 0:N.record,L=S.onCell;if(L){var O,V=L(R,B);return(O=V==null?void 0:V.rowSpan)!==null&&O!==void 0?O:1}return 1},F=function(S){var B=S.start,N=S.end,R=S.getSize,L=S.offsetY;if(N<0)return null;for(var O=a.filter(function(Y){return k(Y,B)===0}),V=B,_=function(J){if(O=O.filter(function(oe){return k(oe,J)===0}),!O.length)return V=J,1},K=B;K>=0&&!_(K);K-=1);for(var q=a.filter(function(Y){return k(Y,N)!==1}),Q=N,se=function(J){if(q=q.filter(function(oe){return k(oe,J)!==1}),!q.length)return Q=Math.max(J-1,N),1},T=N;T<y.length&&!se(T);T+=1);for(var Z=[],W=function(J){var oe=y[J];if(!oe)return 1;a.some(function(re){return k(re,J)>1})&&Z.push(J)},z=V;z<=Q;z+=1)W(z);var G=Z.map(function(Y){var J=y[Y],oe=i(J.record,Y),re=function(ce){var xe=Y+ce-1,Te=i(y[xe].record,xe),Fe=R(oe,Te);return Fe.bottom-Fe.top},ne=R(oe);return m.createElement(dc,{key:Y,data:J,rowKey:oe,index:Y,style:{top:-L+ne.top},extra:!0,getHeight:re})});return G},D=m.useMemo(function(){return{columnsOffset:A}},[A]),I="".concat(s,"-tbody"),$=b(["body","wrapper"]),M={};return h&&(M.position="sticky",M.bottom=0,pr(h)==="object"&&h.offsetScroll&&(M.bottom=h.offsetScroll)),m.createElement(Zf.Provider,{value:D},m.createElement(tf,{fullHeight:!1,ref:C,prefixCls:"".concat(I,"-virtual"),styles:{horizontalScrollBar:M},className:I,height:v,itemHeight:f||24,data:y,itemKey:function(S){return i(S.record)},component:$,scrollWidth:p,direction:d,onVirtualScroll:function(S){var B,N=S.x;n({currentTarget:(B=C.current)===null||B===void 0?void 0:B.nativeElement,scrollLeft:N})},onScroll:x,extraRender:F},function(P,S,B){var N=i(P.record,S);return m.createElement(dc,{data:P,rowKey:N,index:S,style:B.style})}))}),sv=lo(lv),uv=function(t,r){var n=r.ref,o=r.onScroll;return m.createElement(sv,{ref:n,data:t,onScroll:o})};function cv(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,l=e.prefixCls,i=l===void 0?qf:l,u=e.className,s=e.listItemHeight,c=e.components,p=e.onScroll,d=o||{},g=d.x,h=d.y;typeof g!="number"&&(g=1),typeof h!="number"&&(h=500);var v=Sr(function(x,C){return Ls(c,x)||C}),f=Sr(p),b=m.useMemo(function(){return{sticky:a,scrollY:h,listItemHeight:s,getComponent:v,onScroll:f}},[a,h,s,v,f]);return m.createElement(tu.Provider,{value:b},m.createElement(uo,Ke({},e,{className:$e(u,"".concat(i,"-virtual")),scroll:he(he({},o),{},{x:g}),components:he(he({},c),{},{body:r!=null&&r.length?uv:void 0}),columns:n,internalHooks:ra,tailor:!0,ref:t})))}var dv=m.forwardRef(cv);function Gf(e){return If(dv,e)}Gf();const fv=e=>null,pv=e=>null;var ru=m.createContext(null),gv=m.createContext({}),hv=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,l="".concat(r,"-indent-unit"),i=[],u=0;u<n;u+=1)i.push(m.createElement("span",{key:u,className:$e(l,le(le({},"".concat(l,"-start"),o[u]),"".concat(l,"-end"),a[u]))}));return m.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},i)};const mv=m.memo(hv);var vv=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],fc="open",pc="close",Cv="---",Lo=function(t){var r,n,o,a=t.eventKey,l=t.className,i=t.style,u=t.dragOver,s=t.dragOverGapTop,c=t.dragOverGapBottom,p=t.isLeaf,d=t.isStart,g=t.isEnd,h=t.expanded,v=t.selected,f=t.checked,b=t.halfChecked,x=t.loading,C=t.domRef,y=t.active,w=t.data,A=t.onMouseMove,k=t.selectable,F=wt(t,vv),D=Ce.useContext(ru),I=Ce.useContext(gv),$=Ce.useRef(null),M=Ce.useState(!1),P=je(M,2),S=P[0],B=P[1],N=!!(D.disabled||t.disabled||(r=I.nodeDisabled)!==null&&r!==void 0&&r.call(I,w)),R=Ce.useMemo(function(){return!D.checkable||t.checkable===!1?!1:D.checkable},[D.checkable,t.checkable]),L=function(De){N||D.onNodeSelect(De,Pt(t))},O=function(De){N||!R||t.disableCheckbox||D.onNodeCheck(De,Pt(t),!f)},V=Ce.useMemo(function(){return typeof k=="boolean"?k:D.selectable},[k,D.selectable]),_=function(De){D.onNodeClick(De,Pt(t)),V?L(De):O(De)},K=function(De){D.onNodeDoubleClick(De,Pt(t))},q=function(De){D.onNodeMouseEnter(De,Pt(t))},Q=function(De){D.onNodeMouseLeave(De,Pt(t))},se=function(De){D.onNodeContextMenu(De,Pt(t))},T=Ce.useMemo(function(){return!!(D.draggable&&(!D.draggable.nodeDraggable||D.draggable.nodeDraggable(w)))},[D.draggable,w]),Z=function(De){De.stopPropagation(),B(!0),D.onNodeDragStart(De,t);try{De.dataTransfer.setData("text/plain","")}catch{}},W=function(De){De.preventDefault(),De.stopPropagation(),D.onNodeDragEnter(De,t)},z=function(De){De.preventDefault(),De.stopPropagation(),D.onNodeDragOver(De,t)},G=function(De){De.stopPropagation(),D.onNodeDragLeave(De,t)},Y=function(De){De.stopPropagation(),B(!1),D.onNodeDragEnd(De,t)},J=function(De){De.preventDefault(),De.stopPropagation(),B(!1),D.onNodeDrop(De,t)},oe=function(De){x||D.onNodeExpand(De,Pt(t))},re=Ce.useMemo(function(){var Se=sr(D.keyEntities,a)||{},De=Se.children;return!!(De||[]).length},[D.keyEntities,a]),ne=Ce.useMemo(function(){return p===!1?!1:p||!D.loadData&&!re||D.loadData&&t.loaded&&!re},[p,D.loadData,re,t.loaded]);Ce.useEffect(function(){x||typeof D.loadData=="function"&&h&&!ne&&!t.loaded&&D.onNodeLoad(Pt(t))},[x,D.loadData,D.onNodeLoad,h,ne,t]);var ue=Ce.useMemo(function(){var Se;return(Se=D.draggable)!==null&&Se!==void 0&&Se.icon?Ce.createElement("span",{className:"".concat(D.prefixCls,"-draggable-icon")},D.draggable.icon):null},[D.draggable]),ce=function(De){var Re=t.switcherIcon||D.switcherIcon;return typeof Re=="function"?Re(he(he({},t),{},{isLeaf:De})):Re},xe=function(){if(ne){var De=ce(!0);return De!==!1?Ce.createElement("span",{className:$e("".concat(D.prefixCls,"-switcher"),"".concat(D.prefixCls,"-switcher-noop"))},De):null}var Re=ce(!1);return Re!==!1?Ce.createElement("span",{onClick:oe,className:$e("".concat(D.prefixCls,"-switcher"),"".concat(D.prefixCls,"-switcher_").concat(h?fc:pc))},Re):null},Te=Ce.useMemo(function(){if(!R)return null;var Se=typeof R!="boolean"?R:null;return Ce.createElement("span",{className:$e("".concat(D.prefixCls,"-checkbox"),le(le(le({},"".concat(D.prefixCls,"-checkbox-checked"),f),"".concat(D.prefixCls,"-checkbox-indeterminate"),!f&&b),"".concat(D.prefixCls,"-checkbox-disabled"),N||t.disableCheckbox)),onClick:O,role:"checkbox","aria-checked":b?"mixed":f,"aria-disabled":N||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Se)},[R,f,b,N,t.disableCheckbox,t.title]),Fe=Ce.useMemo(function(){return ne?null:h?fc:pc},[ne,h]),ge=Ce.useMemo(function(){return Ce.createElement("span",{className:$e("".concat(D.prefixCls,"-iconEle"),"".concat(D.prefixCls,"-icon__").concat(Fe||"docu"),le({},"".concat(D.prefixCls,"-icon_loading"),x))})},[D.prefixCls,Fe,x]),ye=Ce.useMemo(function(){var Se=!!D.draggable,De=!t.disabled&&Se&&D.dragOverNodeKey===a;return De?D.dropIndicatorRender({dropPosition:D.dropPosition,dropLevelOffset:D.dropLevelOffset,indent:D.indent,prefixCls:D.prefixCls,direction:D.direction}):null},[D.dropPosition,D.dropLevelOffset,D.indent,D.prefixCls,D.direction,D.draggable,D.dragOverNodeKey,D.dropIndicatorRender]),Ee=Ce.useMemo(function(){var Se=t.title,De=Se===void 0?Cv:Se,Re="".concat(D.prefixCls,"-node-content-wrapper"),ze;if(D.showIcon){var Ze=t.icon||D.icon;ze=Ze?Ce.createElement("span",{className:$e("".concat(D.prefixCls,"-iconEle"),"".concat(D.prefixCls,"-icon__customize"))},typeof Ze=="function"?Ze(t):Ze):ge}else D.loadData&&x&&(ze=ge);var qe;return typeof De=="function"?qe=De(w):D.titleRender?qe=D.titleRender(w):qe=De,Ce.createElement("span",{ref:$,title:typeof De=="string"?De:"",className:$e(Re,"".concat(Re,"-").concat(Fe||"normal"),le({},"".concat(D.prefixCls,"-node-selected"),!N&&(v||S))),onMouseEnter:q,onMouseLeave:Q,onContextMenu:se,onClick:_,onDoubleClick:K},ze,Ce.createElement("span",{className:"".concat(D.prefixCls,"-title")},qe),ye)},[D.prefixCls,D.showIcon,t,D.icon,ge,D.titleRender,w,Fe,q,Q,se,_,K]),Ve=Xa(F,{aria:!0,data:!0}),Ne=sr(D.keyEntities,a)||{},Ie=Ne.level,tt=g[g.length-1],Ue=!N&&T,_e=D.draggingNodeKey===a,Xe=k!==void 0?{"aria-selected":!!k}:void 0;return Ce.createElement("div",Ke({ref:C,role:"treeitem","aria-expanded":p?void 0:h,className:$e(l,"".concat(D.prefixCls,"-treenode"),(o={},le(le(le(le(le(le(le(le(le(le(o,"".concat(D.prefixCls,"-treenode-disabled"),N),"".concat(D.prefixCls,"-treenode-switcher-").concat(h?"open":"close"),!p),"".concat(D.prefixCls,"-treenode-checkbox-checked"),f),"".concat(D.prefixCls,"-treenode-checkbox-indeterminate"),b),"".concat(D.prefixCls,"-treenode-selected"),v),"".concat(D.prefixCls,"-treenode-loading"),x),"".concat(D.prefixCls,"-treenode-active"),y),"".concat(D.prefixCls,"-treenode-leaf-last"),tt),"".concat(D.prefixCls,"-treenode-draggable"),T),"dragging",_e),le(le(le(le(le(le(le(o,"drop-target",D.dropTargetKey===a),"drop-container",D.dropContainerKey===a),"drag-over",!N&&u),"drag-over-gap-top",!N&&s),"drag-over-gap-bottom",!N&&c),"filter-node",(n=D.filterTreeNode)===null||n===void 0?void 0:n.call(D,Pt(t))),"".concat(D.prefixCls,"-treenode-leaf"),ne))),style:i,draggable:Ue,onDragStart:Ue?Z:void 0,onDragEnter:T?W:void 0,onDragOver:T?z:void 0,onDragLeave:T?G:void 0,onDrop:T?J:void 0,onDragEnd:T?Y:void 0,onMouseMove:A},Xe,Ve),Ce.createElement(mv,{prefixCls:D.prefixCls,level:Ie,isStart:d,isEnd:g}),ue,xe(),Te,Ee)};Lo.isTreeNode=1;function Br(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Mr(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function nu(e){return e.split("-")}function bv(e,t){var r=[],n=sr(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(l){var i=l.key,u=l.children;r.push(i),o(u)})}return o(n.children),r}function yv(e){if(e.parent){var t=nu(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function xv(e){var t=nu(e.pos);return Number(t[t.length-1])===0}function gc(e,t,r,n,o,a,l,i,u,s){var c,p=e.clientX,d=e.clientY,g=e.target.getBoundingClientRect(),h=g.top,v=g.height,f=(s==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-p),b=(f-12)/n,x=u.filter(function(N){var R;return(R=i[N])===null||R===void 0||(R=R.children)===null||R===void 0?void 0:R.length}),C=sr(i,r.eventKey);if(d<h+v/2){var y=l.findIndex(function(N){return N.key===C.key}),w=y<=0?0:y-1,A=l[w].key;C=sr(i,A)}var k=C.key,F=C,D=C.key,I=0,$=0;if(!x.includes(k))for(var M=0;M<b&&yv(C);M+=1)C=C.parent,$+=1;var P=t.data,S=C.node,B=!0;return xv(C)&&C.level===0&&d<h+v/2&&a({dragNode:P,dropNode:S,dropPosition:-1})&&C.key===r.eventKey?I=-1:(F.children||[]).length&&x.includes(D)?a({dragNode:P,dropNode:S,dropPosition:0})?I=0:B=!1:$===0?b>-1.5?a({dragNode:P,dropNode:S,dropPosition:1})?I=1:B=!1:a({dragNode:P,dropNode:S,dropPosition:0})?I=0:a({dragNode:P,dropNode:S,dropPosition:1})?I=1:B=!1:a({dragNode:P,dropNode:S,dropPosition:1})?I=1:B=!1,{dropPosition:I,dropLevelOffset:$,dropTargetKey:C.key,dropTargetPos:C.pos,dragOverNodeKey:D,dropContainerKey:I===0?null:((c=C.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:B}}function hc(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function Yi(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(pr(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Nr(!1,"`checkedKeys` is not an array or an object"),null;return t}function Yl(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=sr(t,o);if(a){r.add(o);var l=a.parent,i=a.node;i.disabled||l&&n(l.key)}}}return(e||[]).forEach(function(o){n(o)}),ot(r)}const Jr={},Jl="SELECT_ALL",Ql="SELECT_INVERT",es="SELECT_NONE",mc=[],Xf=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&Xf(e,n[e],r)}),r),wv=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:l,onChange:i,onSelect:u,onSelectAll:s,onSelectInvert:c,onSelectNone:p,onSelectMultiple:d,columnWidth:g,type:h,selections:v,fixed:f,renderCell:b,hideSelectAll:x,checkStrictly:C=!0}=t||{},{prefixCls:y,data:w,pageData:A,getRecordByKey:k,getRowKey:F,expandType:D,childrenColumnName:I,locale:$,getPopupContainer:M}=e,P=yi(),[S,B]=Gp(J=>J),[N,R]=Hr(n||o||mc,{value:n}),L=m.useRef(new Map),O=Ge(J=>{if(r){const oe=new Map;J.forEach(re=>{let ne=k(re);!ne&&L.current.has(re)&&(ne=L.current.get(re)),oe.set(re,ne)}),L.current=oe}},[k,r]);m.useEffect(()=>{O(N)},[N]);const V=Je(()=>Xf(I,A),[I,A]),{keyEntities:_}=Je(()=>{if(C)return{keyEntities:null};let J=w;if(r){const oe=new Set(V.map((ne,ue)=>F(ne,ue))),re=Array.from(L.current).reduce((ne,[ue,ce])=>oe.has(ue)?ne:ne.concat(ce),[]);J=[].concat(ot(J),ot(re))}return Zs(J,{externalGetKey:F,childrenPropName:I})},[w,F,C,I,r,V]),K=Je(()=>{const J=new Map;return V.forEach((oe,re)=>{const ne=F(oe,re),ue=(a?a(oe):null)||{};J.set(ne,ue)}),J},[V,F,a]),q=Ge(J=>{const oe=F(J);let re;return K.has(oe)?re=K.get(F(J)):re=a?a(J):void 0,!!(re!=null&&re.disabled)},[K,F]),[Q,se]=Je(()=>{if(C)return[N||[],[]];const{checkedKeys:J,halfCheckedKeys:oe}=Wn(N,!0,_,q);return[J||[],oe]},[N,C,_,q]),T=Je(()=>{const J=h==="radio"?Q.slice(0,1):Q;return new Set(J)},[Q,h]),Z=Je(()=>h==="radio"?new Set:new Set(se),[se,h]);m.useEffect(()=>{t||R(mc)},[!!t]);const W=Ge((J,oe)=>{let re,ne;O(J),r?(re=J,ne=J.map(ue=>L.current.get(ue))):(re=[],ne=[],J.forEach(ue=>{const ce=k(ue);ce!==void 0&&(re.push(ue),ne.push(ce))})),R(re),i==null||i(re,ne,{type:oe})},[R,k,i,r]),z=Ge((J,oe,re,ne)=>{if(u){const ue=re.map(ce=>k(ce));u(k(J),oe,ue,ne)}W(re,"single")},[u,k,W]),G=Je(()=>!v||x?null:(v===!0?[Jl,Ql,es]:v).map(oe=>oe===Jl?{key:"all",text:$.selectionAll,onSelect(){W(w.map((re,ne)=>F(re,ne)).filter(re=>{const ne=K.get(re);return!(ne!=null&&ne.disabled)||T.has(re)}),"all")}}:oe===Ql?{key:"invert",text:$.selectInvert,onSelect(){const re=new Set(T);A.forEach((ue,ce)=>{const xe=F(ue,ce),Te=K.get(xe);Te!=null&&Te.disabled||(re.has(xe)?re.delete(xe):re.add(xe))});const ne=Array.from(re);c&&(P.deprecated(!1,"onSelectInvert","onChange"),c(ne)),W(ne,"invert")}}:oe===es?{key:"none",text:$.selectNone,onSelect(){p==null||p(),W(Array.from(T).filter(re=>{const ne=K.get(re);return ne==null?void 0:ne.disabled}),"none")}}:oe).map(oe=>Object.assign(Object.assign({},oe),{onSelect:(...re)=>{var ne,ue;(ue=oe.onSelect)===null||ue===void 0||(ne=ue).call.apply(ne,[oe].concat(re)),B(null)}})),[v,T,A,F,c,W]);return[Ge(J=>{var oe;if(!t)return J.filter(Se=>Se!==Jr);let re=ot(J);const ne=new Set(T),ue=V.map(F).filter(Se=>!K.get(Se).disabled),ce=ue.every(Se=>ne.has(Se)),xe=ue.some(Se=>ne.has(Se)),Te=()=>{const Se=[];ce?ue.forEach(Re=>{ne.delete(Re),Se.push(Re)}):ue.forEach(Re=>{ne.has(Re)||(ne.add(Re),Se.push(Re))});const De=Array.from(ne);s==null||s(!ce,De.map(Re=>k(Re)),Se.map(Re=>k(Re))),W(De,"all"),B(null)};let Fe,ge;if(h!=="radio"){let Se;if(G){const ut={getPopupContainer:M,items:G.map((mt,bt)=>{const{key:dt,text:Ut,onSelect:Ot}=mt;return{key:dt??bt,onClick:()=>{Ot==null||Ot(ue)},label:Ut}})};Se=m.createElement("div",{className:`${y}-selection-extra`},m.createElement(Gs,{menu:ut,getPopupContainer:M},m.createElement("span",null,m.createElement(Np,null))))}const De=V.map((ut,mt)=>{const bt=F(ut,mt),dt=K.get(bt)||{};return Object.assign({checked:ne.has(bt)},dt)}).filter(({disabled:ut})=>ut),Re=!!De.length&&De.length===V.length,ze=Re&&De.every(({checked:ut})=>ut),Ze=Re&&De.some(({checked:ut})=>ut),qe=(l==null?void 0:l())||{},{onChange:Ct,disabled:Ye}=qe;ge=m.createElement(Ya,Object.assign({"aria-label":Se?"Custom selection":"Select all"},qe,{checked:Re?ze:!!V.length&&ce,indeterminate:Re?!ze&&Ze:!ce&&xe,onChange:ut=>{Te(),Ct==null||Ct(ut)},disabled:Ye??(V.length===0||Re),skipGroup:!0})),Fe=!x&&m.createElement("div",{className:`${y}-selection`},ge,Se)}let ye;h==="radio"?ye=(Se,De,Re)=>{const ze=F(De,Re),Ze=ne.has(ze),qe=K.get(ze);return{node:m.createElement(nf,Object.assign({},qe,{checked:Ze,onClick:Ct=>{var Ye;Ct.stopPropagation(),(Ye=qe==null?void 0:qe.onClick)===null||Ye===void 0||Ye.call(qe,Ct)},onChange:Ct=>{var Ye;ne.has(ze)||z(ze,!0,[ze],Ct.nativeEvent),(Ye=qe==null?void 0:qe.onChange)===null||Ye===void 0||Ye.call(qe,Ct)}})),checked:Ze}}:ye=(Se,De,Re)=>{var ze;const Ze=F(De,Re),qe=ne.has(Ze),Ct=Z.has(Ze),Ye=K.get(Ze);let ut;return D==="nest"?ut=Ct:ut=(ze=Ye==null?void 0:Ye.indeterminate)!==null&&ze!==void 0?ze:Ct,{node:m.createElement(Ya,Object.assign({},Ye,{indeterminate:ut,checked:qe,skipGroup:!0,onClick:mt=>{var bt;mt.stopPropagation(),(bt=Ye==null?void 0:Ye.onClick)===null||bt===void 0||bt.call(Ye,mt)},onChange:mt=>{var bt;const{nativeEvent:dt}=mt,{shiftKey:Ut}=dt,Ot=ue.indexOf(Ze),Vt=Q.some(Mt=>ue.includes(Mt));if(Ut&&C&&Vt){const Mt=S(Ot,ue,ne),Lt=Array.from(ne);d==null||d(!qe,Lt.map(Nt=>k(Nt)),Mt.map(Nt=>k(Nt))),W(Lt,"multiple")}else{const Mt=Q;if(C){const Lt=qe?Br(Mt,Ze):Mr(Mt,Ze);z(Ze,!qe,Lt,dt)}else{const Lt=Wn([].concat(ot(Mt),[Ze]),!0,_,q),{checkedKeys:Nt,halfCheckedKeys:Pe}=Lt;let kt=Nt;if(qe){const Qt=new Set(Nt);Qt.delete(Ze),kt=Wn(Array.from(Qt),{halfCheckedKeys:Pe},_,q).checkedKeys}z(Ze,!qe,kt,dt)}}B(qe?null:Ot),(bt=Ye==null?void 0:Ye.onChange)===null||bt===void 0||bt.call(Ye,mt)}})),checked:qe}};const Ee=(Se,De,Re)=>{const{node:ze,checked:Ze}=ye(Se,De,Re);return b?b(Ze,De,Re,ze):ze};if(!re.includes(Jr))if(re.findIndex(Se=>{var De;return((De=Se[$o])===null||De===void 0?void 0:De.columnType)==="EXPAND_COLUMN"})===0){const[Se,...De]=re;re=[Se,Jr].concat(ot(De))}else re=[Jr].concat(ot(re));const Ve=re.indexOf(Jr);re=re.filter((Se,De)=>Se!==Jr||De===Ve);const Ne=re[Ve-1],Ie=re[Ve+1];let tt=f;tt===void 0&&((Ie==null?void 0:Ie.fixed)!==void 0?tt=Ie.fixed:(Ne==null?void 0:Ne.fixed)!==void 0&&(tt=Ne.fixed)),tt&&Ne&&((oe=Ne[$o])===null||oe===void 0?void 0:oe.columnType)==="EXPAND_COLUMN"&&Ne.fixed===void 0&&(Ne.fixed=tt);const Ue=$e(`${y}-selection-col`,{[`${y}-selection-col-with-dropdown`]:v&&h==="checkbox"}),_e=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(ge):t.columnTitle:Fe,Xe={fixed:tt,width:g,className:`${y}-selection-column`,title:_e(),render:Ee,onCell:t.onCell,align:t.align,[$o]:{className:Ue}};return re.map(Se=>Se===Jr?Xe:Se)},[F,V,t,Q,T,Z,g,G,D,K,d,z,q]),T]};function Dv(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:l}=t,i=`${r}-row-expand-icon`;return m.createElement("button",{type:"button",onClick:u=>{n(o,u),u.stopPropagation()},className:$e(i,{[`${i}-spaced`]:!l,[`${i}-expanded`]:l&&a,[`${i}-collapsed`]:l&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function Ev(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let a=n;if(o){const l=getComputedStyle(o),i=Number.parseInt(l.borderLeftWidth,10),u=Number.parseInt(l.borderRightWidth,10);a=n-i-u}return a}}const sn=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function co(e,t){return t?`${t}-${e}`:`${e}`}const Ai=(e,t)=>typeof e=="function"?e(t):e,Sv=(e,t)=>{const r=Ai(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var kv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},Av=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:kv}))},Bv=m.forwardRef(Av),Fv=function(t){var r=t.dropPosition,n=t.dropLevelOffset,o=t.indent,a={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:a.top=0,a.left=-n*o;break;case 1:a.bottom=0,a.left=-n*o;break;case 0:a.bottom=0,a.left=o;break}return Ce.createElement("div",{style:a})};function Yf(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function $v(e,t){var r=m.useState(!1),n=je(r,2),o=n[0],a=n[1];ln(function(){if(o)return e(),function(){t()}},[o]),ln(function(){return a(!0),function(){a(!1)}},[])}var Ov=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Nv=m.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,l=e.motionType,i=e.onMotionStart,u=e.onMotionEnd,s=e.active,c=e.treeNodeRequiredProps,p=wt(e,Ov),d=m.useState(!0),g=je(d,2),h=g[0],v=g[1],f=m.useContext(ru),b=f.prefixCls,x=a&&l!=="hide";ln(function(){a&&x!==h&&v(x)},[a]);var C=function(){a&&i()},y=m.useRef(!1),w=function(){a&&!y.current&&(y.current=!0,u())};$v(C,w);var A=function(F){x===F&&w()};return a?m.createElement(Is,Ke({ref:t,visible:h},o,{motionAppear:l==="show",onVisibleChanged:A}),function(k,F){var D=k.className,I=k.style;return m.createElement("div",{ref:F,className:$e("".concat(b,"-treenode-motion"),D),style:I},a.map(function($){var M=Object.assign({},(Yf($.data),$.data)),P=$.title,S=$.key,B=$.isStart,N=$.isEnd;delete M.children;var R=Fo(S,c);return m.createElement(Lo,Ke({},M,R,{title:P,active:s,data:$.data,key:S,isStart:B,isEnd:N}))}))}):m.createElement(Lo,Ke({domRef:t,className:r,style:n},p,{active:s}))});function Rv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(a,l){var i=new Map;a.forEach(function(s){i.set(s,!0)});var u=l.filter(function(s){return!i.has(s)});return u.length===1?u[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function vc(e,t,r){var n=e.findIndex(function(i){return i.key===r}),o=e[n+1],a=t.findIndex(function(i){return i.key===r});if(o){var l=t.findIndex(function(i){return i.key===o.key});return t.slice(a+1,l)}return t.slice(a+1)}var Iv=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Cc={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Pv=function(){},An="RC_TREE_MOTION_".concat(Math.random()),ts={key:An},Jf={key:An,level:0,index:0,pos:"0",node:ts,nodes:[ts]},bc={parent:null,children:[],pos:Jf.pos,data:ts,title:null,key:An,isStart:[],isEnd:[]};function yc(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function xc(e){var t=e.key,r=e.pos;return ea(t,r)}function Tv(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var Mv=m.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,l=e.checkedKeys,i=e.loadedKeys,u=e.loadingKeys,s=e.halfCheckedKeys,c=e.keyEntities,p=e.disabled,d=e.dragging,g=e.dragOverNodeKey,h=e.dropPosition,v=e.motion,f=e.height,b=e.itemHeight,x=e.virtual,C=e.scrollWidth,y=e.focusable,w=e.activeItem,A=e.focused,k=e.tabIndex,F=e.onKeyDown,D=e.onFocus,I=e.onBlur,$=e.onActiveChange,M=e.onListChangeStart,P=e.onListChangeEnd,S=wt(e,Iv),B=m.useRef(null),N=m.useRef(null);m.useImperativeHandle(t,function(){return{scrollTo:function(ye){B.current.scrollTo(ye)},getIndentWidth:function(){return N.current.offsetWidth}}});var R=m.useState(o),L=je(R,2),O=L[0],V=L[1],_=m.useState(n),K=je(_,2),q=K[0],Q=K[1],se=m.useState(n),T=je(se,2),Z=T[0],W=T[1],z=m.useState([]),G=je(z,2),Y=G[0],J=G[1],oe=m.useState(null),re=je(oe,2),ne=re[0],ue=re[1],ce=m.useRef(n);ce.current=n;function xe(){var ge=ce.current;Q(ge),W(ge),J([]),ue(null),P()}ln(function(){V(o);var ge=Rv(O,o);if(ge.key!==null)if(ge.add){var ye=q.findIndex(function(Ue){var _e=Ue.key;return _e===ge.key}),Ee=yc(vc(q,n,ge.key),x,f,b),Ve=q.slice();Ve.splice(ye+1,0,bc),W(Ve),J(Ee),ue("show")}else{var Ne=n.findIndex(function(Ue){var _e=Ue.key;return _e===ge.key}),Ie=yc(vc(n,q,ge.key),x,f,b),tt=n.slice();tt.splice(Ne+1,0,bc),W(tt),J(Ie),ue("hide")}else q!==n&&(Q(n),W(n))},[o,n]),m.useEffect(function(){d||xe()},[d]);var Te=v?Z:n,Fe={expandedKeys:o,selectedKeys:a,loadedKeys:i,loadingKeys:u,checkedKeys:l,halfCheckedKeys:s,dragOverNodeKey:g,dropPosition:h,keyEntities:c};return m.createElement(m.Fragment,null,A&&w&&m.createElement("span",{style:Cc,"aria-live":"assertive"},Tv(w)),m.createElement("div",null,m.createElement("input",{style:Cc,disabled:y===!1||p,tabIndex:y!==!1?k:null,onKeyDown:F,onFocus:D,onBlur:I,value:"",onChange:Pv,"aria-label":"for screen reader"})),m.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},m.createElement("div",{className:"".concat(r,"-indent")},m.createElement("div",{ref:N,className:"".concat(r,"-indent-unit")}))),m.createElement(tf,Ke({},S,{data:Te,itemKey:xc,height:f,fullHeight:!1,virtual:x,itemHeight:b,scrollWidth:C,prefixCls:"".concat(r,"-list"),ref:B,role:"tree",onVisibleChange:function(ye){ye.every(function(Ee){return xc(Ee)!==An})&&xe()}}),function(ge){var ye=ge.pos,Ee=Object.assign({},(Yf(ge.data),ge.data)),Ve=ge.title,Ne=ge.key,Ie=ge.isStart,tt=ge.isEnd,Ue=ea(Ne,ye);delete Ee.key,delete Ee.children;var _e=Fo(Ue,Fe);return m.createElement(Nv,Ke({},Ee,_e,{title:Ve,active:!!w&&Ne===w.key,pos:ye,data:ge.data,isStart:Ie,isEnd:tt,motion:v,motionNodes:Ne===An?Y:null,motionType:ne,onMotionStart:M,onMotionEnd:xe,treeNodeRequiredProps:Fe,onMouseMove:function(){$(null)}}))}))}),Lv=10,ou=(function(e){Zd(r,e);var t=Gd(r);function r(){var n;Xd(this,r);for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return n=t.call.apply(t,[this].concat(a)),le(ct(n),"destroyed",!1),le(ct(n),"delayedDragEnterLogic",void 0),le(ct(n),"loadingRetryTimes",{}),le(ct(n),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Yn()}),le(ct(n),"dragStartMousePosition",null),le(ct(n),"dragNodeProps",null),le(ct(n),"currentMouseOverDroppableNodeKey",null),le(ct(n),"listRef",m.createRef()),le(ct(n),"onNodeDragStart",function(i,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,d=n.props.onDragStart,g=u.eventKey;n.dragNodeProps=u,n.dragStartMousePosition={x:i.clientX,y:i.clientY};var h=Br(c,g);n.setState({draggingNodeKey:g,dragChildrenKeys:bv(g,p),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(h),window.addEventListener("dragend",n.onWindowDragEnd),d==null||d({event:i,node:Pt(u)})}),le(ct(n),"onNodeDragEnter",function(i,u){var s=n.state,c=s.expandedKeys,p=s.keyEntities,d=s.dragChildrenKeys,g=s.flattenNodes,h=s.indent,v=n.props,f=v.onDragEnter,b=v.onExpand,x=v.allowDrop,C=v.direction,y=u.pos,w=u.eventKey;if(n.currentMouseOverDroppableNodeKey!==w&&(n.currentMouseOverDroppableNodeKey=w),!n.dragNodeProps){n.resetDragState();return}var A=gc(i,n.dragNodeProps,u,h,n.dragStartMousePosition,x,g,p,c,C),k=A.dropPosition,F=A.dropLevelOffset,D=A.dropTargetKey,I=A.dropContainerKey,$=A.dropTargetPos,M=A.dropAllowed,P=A.dragOverNodeKey;if(d.includes(D)||!M){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(S){clearTimeout(n.delayedDragEnterLogic[S])}),n.dragNodeProps.eventKey!==u.eventKey&&(i.persist(),n.delayedDragEnterLogic[y]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var S=ot(c),B=sr(p,u.eventKey);B&&(B.children||[]).length&&(S=Mr(c,u.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(S),b==null||b(S,{node:Pt(u),expanded:!0,nativeEvent:i.nativeEvent})}},800)),n.dragNodeProps.eventKey===D&&F===0){n.resetDragState();return}n.setState({dragOverNodeKey:P,dropPosition:k,dropLevelOffset:F,dropTargetKey:D,dropContainerKey:I,dropTargetPos:$,dropAllowed:M}),f==null||f({event:i,node:Pt(u),expandedKeys:c})}),le(ct(n),"onNodeDragOver",function(i,u){var s=n.state,c=s.dragChildrenKeys,p=s.flattenNodes,d=s.keyEntities,g=s.expandedKeys,h=s.indent,v=n.props,f=v.onDragOver,b=v.allowDrop,x=v.direction;if(n.dragNodeProps){var C=gc(i,n.dragNodeProps,u,h,n.dragStartMousePosition,b,p,d,g,x),y=C.dropPosition,w=C.dropLevelOffset,A=C.dropTargetKey,k=C.dropContainerKey,F=C.dropTargetPos,D=C.dropAllowed,I=C.dragOverNodeKey;c.includes(A)||!D||(n.dragNodeProps.eventKey===A&&w===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():y===n.state.dropPosition&&w===n.state.dropLevelOffset&&A===n.state.dropTargetKey&&k===n.state.dropContainerKey&&F===n.state.dropTargetPos&&D===n.state.dropAllowed&&I===n.state.dragOverNodeKey||n.setState({dropPosition:y,dropLevelOffset:w,dropTargetKey:A,dropContainerKey:k,dropTargetPos:F,dropAllowed:D,dragOverNodeKey:I}),f==null||f({event:i,node:Pt(u)}))}}),le(ct(n),"onNodeDragLeave",function(i,u){n.currentMouseOverDroppableNodeKey===u.eventKey&&!i.currentTarget.contains(i.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var s=n.props.onDragLeave;s==null||s({event:i,node:Pt(u)})}),le(ct(n),"onWindowDragEnd",function(i){n.onNodeDragEnd(i,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),le(ct(n),"onNodeDragEnd",function(i,u){var s=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),s==null||s({event:i,node:Pt(u)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),le(ct(n),"onNodeDrop",function(i,u){var s,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=n.state,d=p.dragChildrenKeys,g=p.dropPosition,h=p.dropTargetKey,v=p.dropTargetPos,f=p.dropAllowed;if(f){var b=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),h!==null){var x=he(he({},Fo(h,n.getTreeNodeRequiredProps())),{},{active:((s=n.getActiveItem())===null||s===void 0?void 0:s.key)===h,data:sr(n.state.keyEntities,h).node}),C=d.includes(h);Nr(!C,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var y=nu(v),w={event:i,node:Pt(x),dragNode:n.dragNodeProps?Pt(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(d),dropToGap:g!==0,dropPosition:g+Number(y[y.length-1])};c||b==null||b(w),n.dragNodeProps=null}}}),le(ct(n),"cleanDragState",function(){var i=n.state.draggingNodeKey;i!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),le(ct(n),"triggerExpandActionExpand",function(i,u){var s=n.state,c=s.expandedKeys,p=s.flattenNodes,d=u.expanded,g=u.key,h=u.isLeaf;if(!(h||i.shiftKey||i.metaKey||i.ctrlKey)){var v=p.filter(function(b){return b.key===g})[0],f=Pt(he(he({},Fo(g,n.getTreeNodeRequiredProps())),{},{data:v.data}));n.setExpandedKeys(d?Br(c,g):Mr(c,g)),n.onNodeExpand(i,f)}}),le(ct(n),"onNodeClick",function(i,u){var s=n.props,c=s.onClick,p=s.expandAction;p==="click"&&n.triggerExpandActionExpand(i,u),c==null||c(i,u)}),le(ct(n),"onNodeDoubleClick",function(i,u){var s=n.props,c=s.onDoubleClick,p=s.expandAction;p==="doubleClick"&&n.triggerExpandActionExpand(i,u),c==null||c(i,u)}),le(ct(n),"onNodeSelect",function(i,u){var s=n.state.selectedKeys,c=n.state,p=c.keyEntities,d=c.fieldNames,g=n.props,h=g.onSelect,v=g.multiple,f=u.selected,b=u[d.key],x=!f;x?v?s=Mr(s,b):s=[b]:s=Br(s,b);var C=s.map(function(y){var w=sr(p,y);return w?w.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:s}),h==null||h(s,{event:"select",selected:x,node:u,selectedNodes:C,nativeEvent:i.nativeEvent})}),le(ct(n),"onNodeCheck",function(i,u,s){var c=n.state,p=c.keyEntities,d=c.checkedKeys,g=c.halfCheckedKeys,h=n.props,v=h.checkStrictly,f=h.onCheck,b=u.key,x,C={event:"check",node:u,checked:s,nativeEvent:i.nativeEvent};if(v){var y=s?Mr(d,b):Br(d,b),w=Br(g,b);x={checked:y,halfChecked:w},C.checkedNodes=y.map(function($){return sr(p,$)}).filter(Boolean).map(function($){return $.node}),n.setUncontrolledState({checkedKeys:y})}else{var A=Wn([].concat(ot(d),[b]),!0,p),k=A.checkedKeys,F=A.halfCheckedKeys;if(!s){var D=new Set(k);D.delete(b);var I=Wn(Array.from(D),{halfCheckedKeys:F},p);k=I.checkedKeys,F=I.halfCheckedKeys}x=k,C.checkedNodes=[],C.checkedNodesPositions=[],C.halfCheckedKeys=F,k.forEach(function($){var M=sr(p,$);if(M){var P=M.node,S=M.pos;C.checkedNodes.push(P),C.checkedNodesPositions.push({node:P,pos:S})}}),n.setUncontrolledState({checkedKeys:k},!1,{halfCheckedKeys:F})}f==null||f(x,C)}),le(ct(n),"onNodeLoad",function(i){var u,s=i.key,c=n.state.keyEntities,p=sr(c,s);if(!(p!=null&&(u=p.children)!==null&&u!==void 0&&u.length)){var d=new Promise(function(g,h){n.setState(function(v){var f=v.loadedKeys,b=f===void 0?[]:f,x=v.loadingKeys,C=x===void 0?[]:x,y=n.props,w=y.loadData,A=y.onLoad;if(!w||b.includes(s)||C.includes(s))return null;var k=w(i);return k.then(function(){var F=n.state.loadedKeys,D=Mr(F,s);A==null||A(D,{event:"load",node:i}),n.setUncontrolledState({loadedKeys:D}),n.setState(function(I){return{loadingKeys:Br(I.loadingKeys,s)}}),g()}).catch(function(F){if(n.setState(function(I){return{loadingKeys:Br(I.loadingKeys,s)}}),n.loadingRetryTimes[s]=(n.loadingRetryTimes[s]||0)+1,n.loadingRetryTimes[s]>=Lv){var D=n.state.loadedKeys;Nr(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Mr(D,s)}),g()}h(F)}),{loadingKeys:Mr(C,s)}})});return d.catch(function(){}),d}}),le(ct(n),"onNodeMouseEnter",function(i,u){var s=n.props.onMouseEnter;s==null||s({event:i,node:u})}),le(ct(n),"onNodeMouseLeave",function(i,u){var s=n.props.onMouseLeave;s==null||s({event:i,node:u})}),le(ct(n),"onNodeContextMenu",function(i,u){var s=n.props.onRightClick;s&&(i.preventDefault(),s({event:i,node:u}))}),le(ct(n),"onFocus",function(){var i=n.props.onFocus;n.setState({focused:!0});for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];i==null||i.apply(void 0,s)}),le(ct(n),"onBlur",function(){var i=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var u=arguments.length,s=new Array(u),c=0;c<u;c++)s[c]=arguments[c];i==null||i.apply(void 0,s)}),le(ct(n),"getTreeNodeRequiredProps",function(){var i=n.state,u=i.expandedKeys,s=i.selectedKeys,c=i.loadedKeys,p=i.loadingKeys,d=i.checkedKeys,g=i.halfCheckedKeys,h=i.dragOverNodeKey,v=i.dropPosition,f=i.keyEntities;return{expandedKeys:u||[],selectedKeys:s||[],loadedKeys:c||[],loadingKeys:p||[],checkedKeys:d||[],halfCheckedKeys:g||[],dragOverNodeKey:h,dropPosition:v,keyEntities:f}}),le(ct(n),"setExpandedKeys",function(i){var u=n.state,s=u.treeData,c=u.fieldNames,p=Xi(s,i,c);n.setUncontrolledState({expandedKeys:i,flattenNodes:p},!0)}),le(ct(n),"onNodeExpand",function(i,u){var s=n.state.expandedKeys,c=n.state,p=c.listChanging,d=c.fieldNames,g=n.props,h=g.onExpand,v=g.loadData,f=u.expanded,b=u[d.key];if(!p){var x=s.includes(b),C=!f;if(Nr(f&&x||!f&&!x,"Expand state not sync with index check"),s=C?Mr(s,b):Br(s,b),n.setExpandedKeys(s),h==null||h(s,{node:u,expanded:C,nativeEvent:i.nativeEvent}),C&&v){var y=n.onNodeLoad(u);y&&y.then(function(){var w=Xi(n.state.treeData,s,d);n.setUncontrolledState({flattenNodes:w})}).catch(function(){var w=n.state.expandedKeys,A=Br(w,b);n.setExpandedKeys(A)})}}}),le(ct(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),le(ct(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),le(ct(n),"onActiveChange",function(i){var u=n.state.activeKey,s=n.props,c=s.onActiveChange,p=s.itemScrollOffset,d=p===void 0?0:p;u!==i&&(n.setState({activeKey:i}),i!==null&&n.scrollTo({key:i,offset:d}),c==null||c(i))}),le(ct(n),"getActiveItem",function(){var i=n.state,u=i.activeKey,s=i.flattenNodes;return u===null?null:s.find(function(c){var p=c.key;return p===u})||null}),le(ct(n),"offsetActiveKey",function(i){var u=n.state,s=u.flattenNodes,c=u.activeKey,p=s.findIndex(function(h){var v=h.key;return v===c});p===-1&&i<0&&(p=s.length),p=(p+i+s.length)%s.length;var d=s[p];if(d){var g=d.key;n.onActiveChange(g)}else n.onActiveChange(null)}),le(ct(n),"onKeyDown",function(i){var u=n.state,s=u.activeKey,c=u.expandedKeys,p=u.checkedKeys,d=u.fieldNames,g=n.props,h=g.onKeyDown,v=g.checkable,f=g.selectable;switch(i.which){case Rt.UP:{n.offsetActiveKey(-1),i.preventDefault();break}case Rt.DOWN:{n.offsetActiveKey(1),i.preventDefault();break}}var b=n.getActiveItem();if(b&&b.data){var x=n.getTreeNodeRequiredProps(),C=b.data.isLeaf===!1||!!(b.data[d.children]||[]).length,y=Pt(he(he({},Fo(s,x)),{},{data:b.data,active:!0}));switch(i.which){case Rt.LEFT:{C&&c.includes(s)?n.onNodeExpand({},y):b.parent&&n.onActiveChange(b.parent.key),i.preventDefault();break}case Rt.RIGHT:{C&&!c.includes(s)?n.onNodeExpand({},y):b.children&&b.children.length&&n.onActiveChange(b.children[0].key),i.preventDefault();break}case Rt.ENTER:case Rt.SPACE:{v&&!y.disabled&&y.checkable!==!1&&!y.disableCheckbox?n.onNodeCheck({},y,!p.includes(s)):!v&&f&&!y.disabled&&y.selectable!==!1&&n.onNodeSelect({},y);break}}}h==null||h(i)}),le(ct(n),"setUncontrolledState",function(i){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var c=!1,p=!0,d={};Object.keys(i).forEach(function(g){if(n.props.hasOwnProperty(g)){p=!1;return}c=!0,d[g]=i[g]}),c&&(!u||p)&&n.setState(he(he({},d),s))}}),le(ct(n),"scrollTo",function(i){n.listRef.current.scrollTo(i)}),n}return Yd(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,a=o.activeKey,l=o.itemScrollOffset,i=l===void 0?0:l;a!==void 0&&a!==this.state.activeKey&&(this.setState({activeKey:a}),a!==null&&this.scrollTo({key:a,offset:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o=this.state,a=o.focused,l=o.flattenNodes,i=o.keyEntities,u=o.draggingNodeKey,s=o.activeKey,c=o.dropLevelOffset,p=o.dropContainerKey,d=o.dropTargetKey,g=o.dropPosition,h=o.dragOverNodeKey,v=o.indent,f=this.props,b=f.prefixCls,x=f.className,C=f.style,y=f.showLine,w=f.focusable,A=f.tabIndex,k=A===void 0?0:A,F=f.selectable,D=f.showIcon,I=f.icon,$=f.switcherIcon,M=f.draggable,P=f.checkable,S=f.checkStrictly,B=f.disabled,N=f.motion,R=f.loadData,L=f.filterTreeNode,O=f.height,V=f.itemHeight,_=f.scrollWidth,K=f.virtual,q=f.titleRender,Q=f.dropIndicatorRender,se=f.onContextMenu,T=f.onScroll,Z=f.direction,W=f.rootClassName,z=f.rootStyle,G=Xa(this.props,{aria:!0,data:!0}),Y;M&&(pr(M)==="object"?Y=M:typeof M=="function"?Y={nodeDraggable:M}:Y={});var J={prefixCls:b,selectable:F,showIcon:D,icon:I,switcherIcon:$,draggable:Y,draggingNodeKey:u,checkable:P,checkStrictly:S,disabled:B,keyEntities:i,dropLevelOffset:c,dropContainerKey:p,dropTargetKey:d,dropPosition:g,dragOverNodeKey:h,indent:v,direction:Z,dropIndicatorRender:Q,loadData:R,filterTreeNode:L,titleRender:q,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return m.createElement(ru.Provider,{value:J},m.createElement("div",{className:$e(b,x,W,le(le(le({},"".concat(b,"-show-line"),y),"".concat(b,"-focused"),a),"".concat(b,"-active-focused"),s!==null)),style:z},m.createElement(Mv,Ke({ref:this.listRef,prefixCls:b,style:C,data:l,disabled:B,selectable:F,checkable:!!P,motion:N,dragging:u!==null,height:O,itemHeight:V,virtual:K,focusable:w,focused:a,tabIndex:k,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:se,onScroll:T,scrollWidth:_},this.getTreeNodeRequiredProps(),G))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var l=a.prevProps,i={prevProps:o};function u(k){return!l&&o.hasOwnProperty(k)||l&&l[k]!==o[k]}var s,c=a.fieldNames;if(u("fieldNames")&&(c=Yn(o.fieldNames),i.fieldNames=c),u("treeData")?s=o.treeData:u("children")&&(Nr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),s=Ef(o.children)),s){i.treeData=s;var p=Zs(s,{fieldNames:c});i.keyEntities=he(le({},An,Jf),p.keyEntities)}var d=i.keyEntities||a.keyEntities;if(u("expandedKeys")||l&&u("autoExpandParent"))i.expandedKeys=o.autoExpandParent||!l&&o.defaultExpandParent?Yl(o.expandedKeys,d):o.expandedKeys;else if(!l&&o.defaultExpandAll){var g=he({},d);delete g[An];var h=[];Object.keys(g).forEach(function(k){var F=g[k];F.children&&F.children.length&&h.push(F.key)}),i.expandedKeys=h}else!l&&o.defaultExpandedKeys&&(i.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Yl(o.defaultExpandedKeys,d):o.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,s||i.expandedKeys){var v=Xi(s||a.treeData,i.expandedKeys||a.expandedKeys,c);i.flattenNodes=v}if(o.selectable&&(u("selectedKeys")?i.selectedKeys=hc(o.selectedKeys,o):!l&&o.defaultSelectedKeys&&(i.selectedKeys=hc(o.defaultSelectedKeys,o))),o.checkable){var f;if(u("checkedKeys")?f=Yi(o.checkedKeys)||{}:!l&&o.defaultCheckedKeys?f=Yi(o.defaultCheckedKeys)||{}:s&&(f=Yi(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),f){var b=f,x=b.checkedKeys,C=x===void 0?[]:x,y=b.halfCheckedKeys,w=y===void 0?[]:y;if(!o.checkStrictly){var A=Wn(C,!0,d);C=A.checkedKeys,w=A.halfCheckedKeys}i.checkedKeys=C,i.halfCheckedKeys=w}}return u("loadedKeys")&&(i.loadedKeys=o.loadedKeys),i}}]),r})(m.Component);le(ou,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Fv,allowDrop:function(){return!0},expandAction:!1});le(ou,"TreeNode",Lo);var jv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},_v=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:jv}))},Qf=m.forwardRef(_v),zv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},Hv=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:zv}))},Kv=m.forwardRef(Hv),Vv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},Wv=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:Vv}))},qv=m.forwardRef(Wv),Uv={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},Zv=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:Uv}))},Gv=m.forwardRef(Zv);const Xv=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:l})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:a},"&:hover:before":{background:l}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),Yv=new Ip("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),Jv=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Qv=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${ke(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),e3=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:l,nodeSelectedBg:i,nodeHoverBg:u,colorTextQuaternary:s,controlItemBgActiveDisabled:c}=t;return{[r]:Object.assign(Object.assign({},Yo(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:Jd(t),[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:Yv,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:ke(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:c},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:s},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:l}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},Jv(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},Qv(e,t)),{"&:hover":{backgroundColor:u},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:i},[`${r}-iconEle`]:{display:"inline-block",width:a,height:a,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${ke(t.calc(a).div(2).equal())} !important`}})}},t3=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),l=kn(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[e3(e,l),r&&Xv(l)].filter(Boolean)},r3=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},n3=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},r3(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},o3=Xo("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Rp(`${t}-checkbox`,e)},t3(t,e),Qd(e)],n3),wc=4;function a3(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,l=a==="ltr"?"left":"right",i=a==="ltr"?"right":"left",u={[l]:-r*o+wc,[i]:0};switch(t){case-1:u.top=-3;break;case 1:u.bottom=-3;break;default:u.bottom=-3,u[l]=o+wc;break}return Ce.createElement("div",{style:u,className:`${n}-drop-indicator`})}var i3={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},l3=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:i3}))},s3=m.forwardRef(l3),u3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},c3=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:u3}))},d3=m.forwardRef(c3),f3={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},p3=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:f3}))},g3=m.forwardRef(p3);const h3=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:l,switcherLoadingIcon:i}=e,{isLeaf:u,expanded:s,loading:c}=a;if(c)return m.isValidElement(i)?i:m.createElement(Pp,{className:`${n}-switcher-loading-icon`});let p;if(l&&typeof l=="object"&&(p=l.showLeafIcon),u){if(!l)return null;if(typeof p!="boolean"&&p){const h=typeof p=="function"?p(a):p,v=`${n}-switcher-line-custom-icon`;return m.isValidElement(h)?Xn(h,{className:$e((t=h.props)===null||t===void 0?void 0:t.className,v)}):h}return p?m.createElement(Qf,{className:`${n}-switcher-line-icon`}):m.createElement("span",{className:`${n}-switcher-leaf-line`})}const d=`${n}-switcher-icon`,g=typeof o=="function"?o(a):o;return m.isValidElement(g)?Xn(g,{className:$e((r=g.props)===null||r===void 0?void 0:r.className,d)}):g!==void 0?g:l?s?m.createElement(d3,{className:`${n}-switcher-line-icon`}):m.createElement(g3,{className:`${n}-switcher-line-icon`}):m.createElement(s3,{className:d})},e2=Ce.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:l}=Ce.useContext(qr),{prefixCls:i,className:u,showIcon:s=!1,showLine:c,switcherIcon:p,switcherLoadingIcon:d,blockNode:g=!1,children:h,checkable:v=!1,selectable:f=!0,draggable:b,disabled:x,motion:C,style:y}=e,w=n("tree",i),A=n(),k=Ce.useContext(Tp),F=x??k,D=C??Object.assign(Object.assign({},ef(A)),{motionAppear:!1}),I=Object.assign(Object.assign({},e),{checkable:v,selectable:f,showIcon:s,motion:D,blockNode:g,disabled:F,showLine:!!c,dropIndicatorRender:a3}),[$,M,P]=o3(w),[,S]=Ms(),B=S.paddingXS/2+(((r=S.Tree)===null||r===void 0?void 0:r.titleHeight)||S.controlHeightSM),N=Ce.useMemo(()=>{if(!b)return!1;let L={};switch(typeof b){case"function":L.nodeDraggable=b;break;case"object":L=Object.assign({},b);break}return L.icon!==!1&&(L.icon=L.icon||Ce.createElement(Gv,null)),L},[b]),R=L=>Ce.createElement(h3,{prefixCls:w,switcherIcon:p,switcherLoadingIcon:d,treeNodeProps:L,showLine:c});return $(Ce.createElement(ou,Object.assign({itemHeight:B,ref:t,virtual:a},I,{style:Object.assign(Object.assign({},l==null?void 0:l.style),y),prefixCls:w,className:$e({[`${w}-icon-hide`]:!s,[`${w}-block-node`]:g,[`${w}-unselectable`]:!f,[`${w}-rtl`]:o==="rtl",[`${w}-disabled`]:F},l==null?void 0:l.className,u,M,P),direction:o,checkable:v&&Ce.createElement("span",{className:`${w}-checkbox-inner`}),selectable:f,switcherIcon:R,draggable:N}),h))}),Dc=0,Ji=1,Ec=2;function au(e,t,r){const{key:n,children:o}=r;function a(l){const i=l[n],u=l[o];t(i,l)!==!1&&au(u||[],t,r)}e.forEach(a)}function m3({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let l=Dc;if(r&&r===n)return[r];if(!r||!n)return[];function i(u){return u===r||u===n}return au(e,u=>{if(l===Ec)return!1;if(i(u)){if(a.push(u),l===Dc)l=Ji;else if(l===Ji)return l=Ec,!1}else l===Ji&&a.push(u);return t.includes(u)},Yn(o)),a}function Qi(e,t,r){const n=ot(t),o=[];return au(e,(a,l)=>{const i=n.indexOf(a);return i!==-1&&(o.push(l),n.splice(i,1)),!!n.length},Yn(r)),o}var Sc=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function v3(e){const{isLeaf:t,expanded:r}=e;return t?m.createElement(Qf,null):r?m.createElement(Kv,null):m.createElement(qv,null)}function kc({treeData:e,children:t}){return e||Ef(t)}const C3=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=Sc(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const l=m.useRef(null),i=m.useRef(null),u=()=>{const{keyEntities:F}=Zs(kc(a),{fieldNames:a.fieldNames});let D;return r?D=Object.keys(F):n?D=Yl(a.expandedKeys||o||[],F):D=a.expandedKeys||o||[],D},[s,c]=m.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[p,d]=m.useState(()=>u());m.useEffect(()=>{"selectedKeys"in a&&c(a.selectedKeys)},[a.selectedKeys]),m.useEffect(()=>{"expandedKeys"in a&&d(a.expandedKeys)},[a.expandedKeys]);const g=(F,D)=>{var I;return"expandedKeys"in a||d(F),(I=a.onExpand)===null||I===void 0?void 0:I.call(a,F,D)},h=(F,D)=>{var I;const{multiple:$,fieldNames:M}=a,{node:P,nativeEvent:S}=D,{key:B=""}=P,N=kc(a),R=Object.assign(Object.assign({},D),{selected:!0}),L=(S==null?void 0:S.ctrlKey)||(S==null?void 0:S.metaKey),O=S==null?void 0:S.shiftKey;let V;$&&L?(V=F,l.current=B,i.current=V,R.selectedNodes=Qi(N,V,M)):$&&O?(V=Array.from(new Set([].concat(ot(i.current||[]),ot(m3({treeData:N,expandedKeys:p,startKey:B,endKey:l.current,fieldNames:M}))))),R.selectedNodes=Qi(N,V,M)):(V=[B],l.current=B,i.current=V,R.selectedNodes=Qi(N,V,M)),(I=a.onSelect)===null||I===void 0||I.call(a,V,R),"selectedKeys"in a||c(V)},{getPrefixCls:v,direction:f}=m.useContext(qr),{prefixCls:b,className:x,showIcon:C=!0,expandAction:y="click"}=a,w=Sc(a,["prefixCls","className","showIcon","expandAction"]),A=v("tree",b),k=$e(`${A}-directory`,{[`${A}-directory-rtl`]:f==="rtl"},x);return m.createElement(e2,Object.assign({icon:v3,ref:t,blockNode:!0},w,{showIcon:C,expandAction:y,prefixCls:A,className:k,expandedKeys:p,selectedKeys:s,onSelect:h,onExpand:g}))},b3=m.forwardRef(C3),iu=e2;iu.DirectoryTree=b3;iu.TreeNode=Lo;const Ac=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?m.createElement("div",{className:`${n}-filter-dropdown-search`},m.createElement(Mp,{prefix:m.createElement(Lp,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},y3=e=>{const{keyCode:t}=e;t===Rt.ENTER&&e.stopPropagation()},x3=m.forwardRef((e,t)=>m.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:y3,ref:t},e.children));function qn(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(ot(t),ot(qn(n))))}),t}function w3(e){return e.some(({children:t})=>t)}function t2(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function r2({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((l,i)=>{const u=String(l.value);if(l.children)return{key:u||i,label:l.text,popupClassName:`${t}-dropdown-submenu`,children:r2({filters:l.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const s=n?Ya:nf,c={key:l.value!==void 0?u:i,label:m.createElement(m.Fragment,null,m.createElement(s,{checked:r.includes(u)}),m.createElement("span",null,l.text))};return o.trim()?typeof a=="function"?a(o,l)?c:null:t2(o,l.text)?c:null:c})}function el(e){return e||[]}const D3=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:l,column:i,dropdownPrefixCls:u,columnKey:s,filterOnClose:c,filterMultiple:p,filterMode:d="menu",filterSearch:g=!1,filterState:h,triggerFilter:v,locale:f,children:b,getPopupContainer:x,rootClassName:C}=e,{filterResetToDefaultFilteredValue:y,defaultFilteredValue:w,filterDropdownProps:A={},filterDropdownOpen:k,filterDropdownVisible:F,onFilterDropdownVisibleChange:D,onFilterDropdownOpenChange:I}=i,[$,M]=m.useState(!1),P=!!(h&&(!((t=h.filteredKeys)===null||t===void 0)&&t.length||h.forceFiltered)),S=ge=>{var ye;M(ge),(ye=A.onOpenChange)===null||ye===void 0||ye.call(A,ge),I==null||I(ge),D==null||D(ge)},B=(o=(n=(r=A.open)!==null&&r!==void 0?r:k)!==null&&n!==void 0?n:F)!==null&&o!==void 0?o:$,N=h==null?void 0:h.filteredKeys,[R,L]=Jp(el(N)),O=({selectedKeys:ge})=>{L(ge)},V=(ge,{node:ye,checked:Ee})=>{O(p?{selectedKeys:ge}:{selectedKeys:Ee&&ye.key?[ye.key]:[]})};m.useEffect(()=>{$&&O({selectedKeys:el(N)})},[N]);const[_,K]=m.useState([]),q=ge=>{K(ge)},[Q,se]=m.useState(""),T=ge=>{const{value:ye}=ge.target;se(ye)};m.useEffect(()=>{$||se("")},[$]);const Z=ge=>{const ye=ge!=null&&ge.length?ge:null;if(ye===null&&(!h||!h.filteredKeys)||an(ye,h==null?void 0:h.filteredKeys,!0))return null;v({column:i,key:s,filteredKeys:ye})},W=()=>{S(!1),Z(R())},z=({confirm:ge,closeDropdown:ye}={confirm:!1,closeDropdown:!1})=>{ge&&Z([]),ye&&S(!1),se(""),L(y?(w||[]).map(Ee=>String(Ee)):[])},G=({closeDropdown:ge}={closeDropdown:!0})=>{ge&&S(!1),Z(R())},Y=(ge,ye)=>{ye.source==="trigger"&&(ge&&N!==void 0&&L(el(N)),S(ge),!ge&&!i.filterDropdown&&c&&W())},J=$e({[`${u}-menu-without-submenu`]:!w3(i.filters||[])}),oe=ge=>{if(ge.target.checked){const ye=qn(i==null?void 0:i.filters).map(Ee=>String(Ee));L(ye)}else L([])},re=({filters:ge})=>(ge||[]).map((ye,Ee)=>{const Ve=String(ye.value),Ne={title:ye.text,key:ye.value!==void 0?Ve:String(Ee)};return ye.children&&(Ne.children=re({filters:ye.children})),Ne}),ne=ge=>{var ye;return Object.assign(Object.assign({},ge),{text:ge.title,value:ge.key,children:((ye=ge.children)===null||ye===void 0?void 0:ye.map(Ee=>ne(Ee)))||[]})};let ue;const{direction:ce,renderEmpty:xe}=m.useContext(qr);if(typeof i.filterDropdown=="function")ue=i.filterDropdown({prefixCls:`${u}-custom`,setSelectedKeys:ge=>O({selectedKeys:ge}),selectedKeys:R(),confirm:G,clearFilters:z,filters:i.filters,visible:B,close:()=>{S(!1)}});else if(i.filterDropdown)ue=i.filterDropdown;else{const ge=R()||[],ye=()=>{var Ve,Ne;const Ie=(Ve=xe==null?void 0:xe("Table.filter"))!==null&&Ve!==void 0?Ve:m.createElement(Ku,{image:Ku.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((i.filters||[]).length===0)return Ie;if(d==="tree")return m.createElement(m.Fragment,null,m.createElement(Ac,{filterSearch:g,value:Q,onChange:T,tablePrefixCls:a,locale:f}),m.createElement("div",{className:`${a}-filter-dropdown-tree`},p?m.createElement(Ya,{checked:ge.length===qn(i.filters).length,indeterminate:ge.length>0&&ge.length<qn(i.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:oe},(Ne=f==null?void 0:f.filterCheckall)!==null&&Ne!==void 0?Ne:f==null?void 0:f.filterCheckAll):null,m.createElement(iu,{checkable:!0,selectable:!1,blockNode:!0,multiple:p,checkStrictly:!p,className:`${u}-menu`,onCheck:V,checkedKeys:ge,selectedKeys:ge,showIcon:!1,treeData:re({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Q.trim()?_e=>typeof g=="function"?g(Q,ne(_e)):t2(Q,_e.title):void 0})));const tt=r2({filters:i.filters||[],filterSearch:g,prefixCls:l,filteredKeys:R(),filterMultiple:p,searchValue:Q}),Ue=tt.every(_e=>_e===null);return m.createElement(m.Fragment,null,m.createElement(Ac,{filterSearch:g,value:Q,onChange:T,tablePrefixCls:a,locale:f}),Ue?Ie:m.createElement(io,{selectable:!0,multiple:p,prefixCls:`${u}-menu`,className:J,onSelect:O,onDeselect:O,selectedKeys:ge,getPopupContainer:x,openKeys:_,onOpenChange:q,items:tt}))},Ee=()=>y?an((w||[]).map(Ve=>String(Ve)),ge,!0):ge.length===0;ue=m.createElement(m.Fragment,null,ye(),m.createElement("div",{className:`${l}-dropdown-btns`},m.createElement(Za,{type:"link",size:"small",disabled:Ee(),onClick:()=>z()},f.filterReset),m.createElement(Za,{type:"primary",size:"small",onClick:W},f.filterConfirm)))}i.filterDropdown&&(ue=m.createElement(xf,{selectable:void 0},ue)),ue=m.createElement(x3,{className:`${l}-dropdown`},ue);const Fe=rf({trigger:["click"],placement:ce==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let ge;return typeof i.filterIcon=="function"?ge=i.filterIcon(P):i.filterIcon?ge=i.filterIcon:ge=m.createElement(Bv,null),m.createElement("span",{role:"button",tabIndex:-1,className:$e(`${l}-trigger`,{active:P}),onClick:ye=>{ye.stopPropagation()}},ge)})(),getPopupContainer:x},Object.assign(Object.assign({},A),{rootClassName:$e(C,A.rootClassName),open:B,onOpenChange:Y,popupRender:()=>typeof(A==null?void 0:A.dropdownRender)=="function"?A.dropdownRender(ue):ue}));return m.createElement("div",{className:`${l}-column`},m.createElement("span",{className:`${a}-column-title`},b),m.createElement(Gs,Object.assign({},Fe)))},rs=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var l;const i=co(a,r),u=o.filterDropdown!==void 0;if(o.filters||u||"onFilter"in o)if("filteredValue"in o){let s=o.filteredValue;u||(s=(l=s==null?void 0:s.map(String))!==null&&l!==void 0?l:s),n.push({column:o,key:sn(o,i),filteredKeys:s,forceFiltered:o.filtered})}else n.push({column:o,key:sn(o,i),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(ot(n),ot(rs(o.children,t,i))))}),n};function n2(e,t,r,n,o,a,l,i,u){return r.map((s,c)=>{const p=co(c,i),{filterOnClose:d=!0,filterMultiple:g=!0,filterMode:h,filterSearch:v}=s;let f=s;if(f.filters||f.filterDropdown){const b=sn(f,p),x=n.find(({key:C})=>b===C);f=Object.assign(Object.assign({},f),{title:C=>m.createElement(D3,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:f,columnKey:b,filterState:x,filterOnClose:d,filterMultiple:g,filterMode:h,filterSearch:v,triggerFilter:a,locale:o,getPopupContainer:l,rootClassName:u},Ai(s.title,C))})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:n2(e,t,f.children,n,o,a,l,p,u)})),f})}const Bc=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:l,filterDropdown:i}=o;if(i)t[a]=n||null;else if(Array.isArray(n)){const u=qn(l);t[a]=u.filter(s=>n.includes(String(s)))}else t[a]=null}),t},ns=(e,t,r)=>t.reduce((o,a)=>{const{column:{onFilter:l,filters:i},filteredKeys:u}=a;return l&&u&&u.length?o.map(s=>Object.assign({},s)).filter(s=>u.some(c=>{const p=qn(i),d=p.findIndex(h=>String(h)===String(c)),g=d!==-1?p[d]:c;return s[r]&&(s[r]=ns(s[r],t,r)),l(g,s)})):o},e),o2=e=>e.flatMap(t=>"children"in t?[t].concat(ot(o2(t.children||[]))):[t]),E3=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:l,rootClassName:i}=e;yi();const u=m.useMemo(()=>o2(n||[]),[n]),[s,c]=m.useState(()=>rs(u,!0)),p=m.useMemo(()=>{const v=rs(u,!1);if(v.length===0)return v;let f=!0;if(v.forEach(({filteredKeys:b})=>{b!==void 0&&(f=!1)}),f){const b=(u||[]).map((x,C)=>sn(x,co(C)));return s.filter(({key:x})=>b.includes(x)).map(x=>{const C=u[b.indexOf(x.key)];return Object.assign(Object.assign({},x),{column:Object.assign(Object.assign({},x.column),C),forceFiltered:C.filtered})})}return v},[u,s]),d=m.useMemo(()=>Bc(p),[p]),g=v=>{const f=p.filter(({key:b})=>b!==v.key);f.push(v),c(f),o(Bc(f),f)};return[v=>n2(t,r,v,p,l,g,a,void 0,i),p,d]},S3=(e,t,r)=>{const n=m.useRef({});function o(a){var l;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let u=function(s){s.forEach((c,p)=>{const d=r(c,p);i.set(d,c),c&&typeof c=="object"&&t in c&&u(c[t]||[])})};const i=new Map;u(e),n.current={data:e,childrenColumnName:t,kvMap:i,getRowKey:r}}return(l=n.current.kvMap)===null||l===void 0?void 0:l.get(a)}return[o]};var k3=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const a2=10;function A3(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(o=>{const a=e[o];typeof a!="function"&&(r[o]=a)}),r}function B3(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=k3(n,["total"]),[l,i]=et(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:a2})),u=rf(l,a,{total:o>0?o:e}),s=Math.ceil((o||e)/u.pageSize);u.current>s&&(u.current=s||1);const c=(d,g)=>{i({current:d??1,pageSize:g||u.pageSize})},p=(d,g)=>{var h;r&&((h=r.onChange)===null||h===void 0||h.call(r,d,g)),c(d,g),t(d,g||(u==null?void 0:u.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},u),{onChange:p}),c]}var F3={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},$3=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:F3}))},O3=m.forwardRef($3),N3={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},R3=function(t,r){return m.createElement(Yt,Ke({},t,{ref:r,icon:N3}))},I3=m.forwardRef(R3);const Oa="ascend",tl="descend",ri=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,Fc=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,P3=(e,t)=>t?e[e.indexOf(t)+1]:e[0],os=(e,t,r)=>{let n=[];const o=(a,l)=>{n.push({column:a,key:sn(a,l),multiplePriority:ri(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,l)=>{const i=co(l,r);a.children?("sortOrder"in a&&o(a,i),n=[].concat(ot(n),ot(os(a.children,t,i)))):a.sorter&&("sortOrder"in a?o(a,i):t&&a.defaultSortOrder&&n.push({column:a,key:sn(a,i),multiplePriority:ri(a),sortOrder:a.defaultSortOrder}))}),n},i2=(e,t,r,n,o,a,l,i)=>(t||[]).map((s,c)=>{const p=co(c,i);let d=s;if(d.sorter){const g=d.sortDirections||o,h=d.showSorterTooltip===void 0?l:d.showSorterTooltip,v=sn(d,p),f=r.find(({key:D})=>D===v),b=f?f.sortOrder:null,x=P3(g,b);let C;if(s.sortIcon)C=s.sortIcon({sortOrder:b});else{const D=g.includes(Oa)&&m.createElement(I3,{className:$e(`${e}-column-sorter-up`,{active:b===Oa})}),I=g.includes(tl)&&m.createElement(O3,{className:$e(`${e}-column-sorter-down`,{active:b===tl})});C=m.createElement("span",{className:$e(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(D&&I)})},m.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},D,I))}const{cancelSort:y,triggerAsc:w,triggerDesc:A}=a||{};let k=y;x===tl?k=A:x===Oa&&(k=w);const F=typeof h=="object"?Object.assign({title:k},h):{title:k};d=Object.assign(Object.assign({},d),{className:$e(d.className,{[`${e}-column-sort`]:b}),title:D=>{const I=`${e}-column-sorters`,$=m.createElement("span",{className:`${e}-column-title`},Ai(s.title,D)),M=m.createElement("div",{className:I},$,C);return h?typeof h!="boolean"&&(h==null?void 0:h.target)==="sorter-icon"?m.createElement("div",{className:`${I} ${e}-column-sorters-tooltip-target-sorter`},$,m.createElement(qa,Object.assign({},F),C)):m.createElement(qa,Object.assign({},F),M):M},onHeaderCell:D=>{var I;const $=((I=s.onHeaderCell)===null||I===void 0?void 0:I.call(s,D))||{},M=$.onClick,P=$.onKeyDown;$.onClick=N=>{n({column:s,key:v,sortOrder:x,multiplePriority:ri(s)}),M==null||M(N)},$.onKeyDown=N=>{N.keyCode===Rt.ENTER&&(n({column:s,key:v,sortOrder:x,multiplePriority:ri(s)}),P==null||P(N))};const S=Sv(s.title,{}),B=S==null?void 0:S.toString();return b&&($["aria-sort"]=b==="ascend"?"ascending":"descending"),$["aria-label"]=B||"",$.className=$e($.className,`${e}-column-has-sorters`),$.tabIndex=0,s.ellipsis&&($.title=(S??"").toString()),$}})}return"children"in d&&(d=Object.assign(Object.assign({},d),{children:i2(e,d.children,r,n,o,a,l,p)})),d}),$c=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Oc=e=>{const t=e.filter(({sortOrder:r})=>r).map($c);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},$c(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},as=(e,t,r)=>{const n=t.slice().sort((l,i)=>i.multiplePriority-l.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:l},sortOrder:i})=>Fc(l)&&i);return a.length?o.sort((l,i)=>{for(let u=0;u<a.length;u+=1){const s=a[u],{column:{sorter:c},sortOrder:p}=s,d=Fc(c);if(d&&p){const g=d(l,i,p);if(g!==0)return p===Oa?g:-g}}return 0}).map(l=>{const i=l[r];return i?Object.assign(Object.assign({},l),{[r]:as(i,t,r)}):l}):o},T3=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:l}=e,[i,u]=m.useState(()=>os(r,!0)),s=(v,f)=>{const b=[];return v.forEach((x,C)=>{const y=co(C,f);if(b.push(sn(x,y)),Array.isArray(x.children)){const w=s(x.children,y);b.push.apply(b,ot(w))}}),b},c=m.useMemo(()=>{let v=!0;const f=os(r,!1);if(!f.length){const y=s(r);return i.filter(({key:w})=>y.includes(w))}const b=[];function x(y){v?b.push(y):b.push(Object.assign(Object.assign({},y),{sortOrder:null}))}let C=null;return f.forEach(y=>{C===null?(x(y),y.sortOrder&&(y.multiplePriority===!1?v=!1:C=!0)):(C&&y.multiplePriority!==!1||(v=!1),x(y))}),b},[r,i]),p=m.useMemo(()=>{var v,f;const b=c.map(({column:x,sortOrder:C})=>({column:x,order:C}));return{sortColumns:b,sortColumn:(v=b[0])===null||v===void 0?void 0:v.column,sortOrder:(f=b[0])===null||f===void 0?void 0:f.order}},[c]),d=v=>{let f;v.multiplePriority===!1||!c.length||c[0].multiplePriority===!1?f=[v]:f=[].concat(ot(c.filter(({key:b})=>b!==v.key)),[v]),u(f),l(Oc(f),f)};return[v=>i2(t,v,c,d,n,o,a),c,p,()=>Oc(c)]},l2=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=Ai(n.title,t),"children"in o&&(o.children=l2(o.children,t)),o}),M3=e=>[m.useCallback(r=>l2(r,e),[e])],L3=Uf((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),j3=Gf((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),_3=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:l,tablePaddingHorizontal:i,calc:u}=e,s=`${ke(r)} ${n} ${o}`,c=(p,d,g)=>({[`&${t}-${p}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${ke(u(d).mul(-1).equal())}
28
+ ${ke(u(u(g).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:s,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:s,borderTop:s,[`
29
+ > ${t}-content,
30
+ > ${t}-header,
31
+ > ${t}-body,
32
+ > ${t}-summary
33
+ `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:s},"> thead":{"> tr:not(:last-child) > th":{borderBottom:s},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:s}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${ke(u(l).mul(-1).equal())} ${ke(u(u(i).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:s,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
34
+ > tr${t}-expanded-row,
35
+ > tr${t}-placeholder
36
+ `]:{"> th, > td":{borderInlineEnd:0}}}}}},c("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),c("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:s,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${ke(r)} 0 ${ke(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:s}}}},z3=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},Ps),{wordBreak:"keep-all",[`
37
+ &${t}-cell-fix-left-last,
38
+ &${t}-cell-fix-right-first
39
+ `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},H3=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},K3=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:l,tableBorderColor:i,tableExpandIconBg:u,tableExpandColumnWidth:s,borderRadius:c,tablePaddingVertical:p,tablePaddingHorizontal:d,tableExpandedRowBg:g,paddingXXS:h,expandIconMarginTop:v,expandIconSize:f,expandIconHalfInner:b,expandIconScale:x,calc:C}=e,y=`${ke(o)} ${l} ${i}`,w=C(h).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:s},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},jp(e)),{position:"relative",float:"left",width:f,height:f,color:"inherit",lineHeight:ke(f),background:u,border:y,borderRadius:c,transform:`scale(${x})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:b,insetInlineEnd:w,insetInlineStart:w,height:o},"&::after":{top:w,bottom:w,insetInlineStart:b,width:o,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:v,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:g}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${ke(C(p).mul(-1).equal())} ${ke(C(d).mul(-1).equal())}`,padding:`${ke(p)} ${ke(d)}`}}}},V3=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:l,paddingXS:i,colorText:u,lineWidth:s,lineType:c,tableBorderColor:p,headerIconColor:d,fontSizeSM:g,tablePaddingHorizontal:h,borderRadius:v,motionDurationSlow:f,colorIcon:b,colorPrimary:x,tableHeaderFilterActiveBg:C,colorTextDisabled:y,tableFilterDropdownBg:w,tableFilterDropdownHeight:A,controlItemBgHover:k,controlItemBgActive:F,boxShadowSecondary:D,filterDropdownMenuBg:I,calc:$}=e,M=`${r}-dropdown`,P=`${t}-filter-dropdown`,S=`${r}-tree`,B=`${ke(s)} ${c} ${p}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:$(l).mul(-1).equal(),marginInline:`${ke(l)} ${ke($(h).div(2).mul(-1).equal())}`,padding:`0 ${ke(l)}`,color:d,fontSize:g,borderRadius:v,cursor:"pointer",transition:`all ${f}`,"&:hover":{color:b,background:C},"&.active":{color:x}}}},{[`${r}-dropdown`]:{[P]:Object.assign(Object.assign({},Yo(e)),{minWidth:o,backgroundColor:w,borderRadius:v,boxShadow:D,overflow:"hidden",[`${M}-menu`]:{maxHeight:A,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:I,"&:empty::after":{display:"block",padding:`${ke(i)} 0`,color:y,fontSize:g,textAlign:"center",content:'"Not Found"'}},[`${P}-tree`]:{paddingBlock:`${ke(i)} 0`,paddingInline:i,[S]:{padding:0},[`${S}-treenode ${S}-node-content-wrapper:hover`]:{backgroundColor:k},[`${S}-treenode-checkbox-checked ${S}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:F}}},[`${P}-search`]:{padding:i,borderBottom:B,"&-input":{input:{minWidth:a},[n]:{color:y}}},[`${P}-checkall`]:{width:"100%",marginBottom:l,marginInlineStart:l},[`${P}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${ke($(i).sub(s).equal())} ${ke(i)}`,overflow:"hidden",borderTop:B}})}},{[`${r}-dropdown ${P}, ${P}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:i,color:u},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},W3=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:l,zIndexTableSticky:i,calc:u}=e,s=n;return{[`${t}-wrapper`]:{[`
40
+ ${t}-cell-fix-left,
41
+ ${t}-cell-fix-right
42
+ `]:{position:"sticky !important",zIndex:a,background:l},[`
43
+ ${t}-cell-fix-left-first::after,
44
+ ${t}-cell-fix-left-last::after
45
+ `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:u(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
46
+ ${t}-cell-fix-right-first::after,
47
+ ${t}-cell-fix-right-last::after
48
+ `]:{position:"absolute",top:0,bottom:u(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:u(i).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`
49
+ ${t}-cell-fix-left-first::after,
50
+ ${t}-cell-fix-left-last::after
51
+ `]:{boxShadow:`inset 10px 0 8px -8px ${s}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${s}`},[`
52
+ ${t}-cell-fix-right-first::after,
53
+ ${t}-cell-fix-right-last::after
54
+ `]:{boxShadow:`inset -10px 0 8px -8px ${s}`}},[`${t}-fixed-column-gapped`]:{[`
55
+ ${t}-cell-fix-left-first::after,
56
+ ${t}-cell-fix-left-last::after,
57
+ ${t}-cell-fix-right-first::after,
58
+ ${t}-cell-fix-right-last::after
59
+ `]:{boxShadow:"none"}}}}},q3=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${ke(n)} 0`}}},U3=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${ke(r)} ${ke(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${ke(r)} ${ke(r)}`}}}}},Z3=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},G3=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:l,headerIconColor:i,headerIconHoverColor:u,tableSelectionColumnWidth:s,tableSelectedRowBg:c,tableSelectedRowHoverBg:p,tableRowHoverBg:d,tablePaddingHorizontal:g,calc:h}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:s,[`&${t}-selection-col-with-dropdown`]:{width:h(s).add(o).add(h(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:h(s).add(h(l).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:h(s).add(o).add(h(a).div(4)).add(h(l).mul(2)).equal()}},[`
60
+ table tr th${t}-selection-column,
61
+ table tr td${t}-selection-column,
62
+ ${t}-selection-column
63
+ `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:h(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:ke(h(g).div(4).equal()),[n]:{color:i,fontSize:o,verticalAlign:"baseline","&:hover":{color:u}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:c,"&-row-hover":{background:p}}},[`> ${t}-cell-row-hover`]:{background:d}}}}}},X3=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,l,i,u)=>({[`${t}${t}-${a}`]:{fontSize:u,[`
64
+ ${t}-title,
65
+ ${t}-footer,
66
+ ${t}-cell,
67
+ ${t}-thead > tr > th,
68
+ ${t}-tbody > tr > th,
69
+ ${t}-tbody > tr > td,
70
+ tfoot > tr > th,
71
+ tfoot > tr > td
72
+ `]:{padding:`${ke(l)} ${ke(i)}`},[`${t}-filter-trigger`]:{marginInlineEnd:ke(n(i).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${ke(n(l).mul(-1).equal())} ${ke(n(i).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:ke(n(l).mul(-1).equal()),marginInline:`${ke(n(r).sub(i).equal())} ${ke(n(i).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:ke(n(i).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},Y3=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:o,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`
73
+ &${t}-cell-fix-left:hover,
74
+ &${t}-cell-fix-right:hover
75
+ `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},J3=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:l,zIndexTableSticky:i,stickyScrollBarBorderRadius:u,lineWidth:s,lineType:c,tableBorderColor:p}=e,d=`${ke(s)} ${c} ${p}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:i,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${ke(a)} !important`,zIndex:i,display:"flex",alignItems:"center",background:l,borderTop:d,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:u,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},Nc=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${ke(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${ke(o(r).mul(-1).equal())} 0 ${n}`}}}},Q3=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:l}=e,i=`${ke(n)} ${o} ${a}`,u=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
76
+ & > ${t}-row,
77
+ & > div:not(${t}-row) > ${t}-row
78
+ `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:i,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${u}${u}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${ke(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:i,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:i,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:l(n).mul(-1).equal(),borderInlineStart:i}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:i,borderBottom:i}}}}}},e6=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:l,lineType:i,tableBorderColor:u,tableFontSize:s,tableBg:c,tableRadius:p,tableHeaderTextColor:d,motionDurationMid:g,tableHeaderBg:h,tableHeaderCellSplitColor:v,tableFooterTextColor:f,tableFooterBg:b,calc:x}=e,C=`${ke(l)} ${i} ${u}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},jl()),{[t]:Object.assign(Object.assign({},Yo(e)),{fontSize:s,background:c,borderRadius:`${ke(p)} ${ke(p)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${ke(p)} ${ke(p)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
79
+ ${t}-cell,
80
+ ${t}-thead > tr > th,
81
+ ${t}-tbody > tr > th,
82
+ ${t}-tbody > tr > td,
83
+ tfoot > tr > th,
84
+ tfoot > tr > td
85
+ `]:{position:"relative",padding:`${ke(n)} ${ke(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${ke(n)} ${ke(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:d,fontWeight:r,textAlign:"start",background:h,borderBottom:C,transition:`background ${g} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:v,transform:"translateY(-50%)",transition:`background-color ${g}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${g}, border-color ${g}`,borderBottom:C,[`
86
+ > ${t}-wrapper:only-child,
87
+ > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
88
+ `]:{[t]:{marginBlock:ke(x(n).mul(-1).equal()),marginInline:`${ke(x(a).sub(o).equal())}
89
+ ${ke(x(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:d,fontWeight:r,textAlign:"start",background:h,borderBottom:C,transition:`background ${g} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${ke(n)} ${ke(o)}`,color:f,background:b}})}},t6=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:l,controlItemBgActiveHover:i,padding:u,paddingSM:s,paddingXS:c,colorBorderSecondary:p,borderRadiusLG:d,controlHeight:g,colorTextPlaceholder:h,fontSize:v,fontSizeSM:f,lineHeight:b,lineWidth:x,colorIcon:C,colorIconHover:y,opacityLoading:w,controlInteractiveSize:A}=e,k=new ur(o).onBackground(r).toHexString(),F=new ur(a).onBackground(r).toHexString(),D=new ur(t).onBackground(r).toHexString(),I=new ur(C),$=new ur(y),M=A/2-x,P=M*2+x*3;return{headerBg:D,headerColor:n,headerSortActiveBg:k,headerSortHoverBg:F,bodySortBg:D,rowHoverBg:D,rowSelectedBg:l,rowSelectedHoverBg:i,rowExpandedBg:t,cellPaddingBlock:u,cellPaddingInline:u,cellPaddingBlockMD:s,cellPaddingInlineMD:c,cellPaddingBlockSM:c,cellPaddingInlineSM:c,borderColor:p,headerBorderRadius:d,footerBg:D,footerColor:n,cellFontSize:v,cellFontSizeMD:v,cellFontSizeSM:v,headerSplitColor:p,fixedHeaderSortActiveBg:k,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:g,stickyScrollBarBg:h,stickyScrollBarBorderRadius:100,expandIconMarginTop:(v*b-x*3)/2-Math.ceil((f*1.4-x*3)/2),headerIconColor:I.clone().setA(I.a*w).toRgbString(),headerIconHoverColor:$.clone().setA($.a*w).toRgbString(),expandIconHalfInner:M,expandIconSize:P,expandIconScale:A/P}},Rc=2,r6=Xo("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:l,headerSortActiveBg:i,headerSortHoverBg:u,bodySortBg:s,rowHoverBg:c,rowSelectedBg:p,rowSelectedHoverBg:d,rowExpandedBg:g,cellPaddingBlock:h,cellPaddingInline:v,cellPaddingBlockMD:f,cellPaddingInlineMD:b,cellPaddingBlockSM:x,cellPaddingInlineSM:C,borderColor:y,footerBg:w,footerColor:A,headerBorderRadius:k,cellFontSize:F,cellFontSizeMD:D,cellFontSizeSM:I,headerSplitColor:$,fixedHeaderSortActiveBg:M,headerFilterHoverBg:P,filterDropdownBg:S,expandIconBg:B,selectionColumnWidth:N,stickyScrollBarBg:R,calc:L}=e,O=kn(e,{tableFontSize:F,tableBg:n,tableRadius:k,tablePaddingVertical:h,tablePaddingHorizontal:v,tablePaddingVerticalMiddle:f,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:x,tablePaddingHorizontalSmall:C,tableBorderColor:y,tableHeaderTextColor:l,tableHeaderBg:a,tableFooterTextColor:A,tableFooterBg:w,tableHeaderCellSplitColor:$,tableHeaderSortBg:i,tableHeaderSortHoverBg:u,tableBodySortBg:s,tableFixedHeaderSortActiveBg:M,tableHeaderFilterActiveBg:P,tableFilterDropdownBg:S,tableRowHoverBg:c,tableSelectedRowBg:p,tableSelectedRowHoverBg:d,zIndexTableFixed:Rc,zIndexTableSticky:L(Rc).add(1).equal({unit:!1}),tableFontSizeMiddle:D,tableFontSizeSmall:I,tableSelectionColumnWidth:N,tableExpandIconBg:B,tableExpandColumnWidth:L(o).add(L(e.padding).mul(2)).equal(),tableExpandedRowBg:g,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:R,tableScrollThumbBgHover:t,tableScrollBg:r});return[e6(O),q3(O),Nc(O),Y3(O),V3(O),_3(O),U3(O),K3(O),Nc(O),H3(O),G3(O),W3(O),J3(O),z3(O),X3(O),Z3(O),Q3(O)]},t6,{unitless:{expandIconScale:!0}}),Ic=[],n6=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:l,style:i,size:u,bordered:s,dropdownPrefixCls:c,dataSource:p,pagination:d,rowSelection:g,rowKey:h="key",rowClassName:v,columns:f,children:b,childrenColumnName:x,onChange:C,getPopupContainer:y,loading:w,expandIcon:A,expandable:k,expandedRowRender:F,expandIconColumnIndex:D,indentSize:I,scroll:$,sortDirections:M,locale:P,showSorterTooltip:S={target:"full-header"},virtual:B}=e;yi();const N=m.useMemo(()=>f||eu(b),[f,b]),R=m.useMemo(()=>N.some(de=>de.responsive),[N]),L=_p(R),O=m.useMemo(()=>{const de=new Set(Object.keys(L).filter(U=>L[U]));return N.filter(U=>!U.responsive||U.responsive.some(ve=>de.has(ve)))},[N,L]),V=Wr(e,["className","style","columns"]),{locale:_=zp,direction:K,table:q,renderEmpty:Q,getPrefixCls:se,getPopupContainer:T}=m.useContext(qr),Z=Hp(u),W=Object.assign(Object.assign({},_.Table),P),z=p||Ic,G=se("table",o),Y=se("dropdown",c),[,J]=Ms(),oe=Jo(G),[re,ne,ue]=r6(G,oe),ce=Object.assign(Object.assign({childrenColumnName:x,expandIconColumnIndex:D},k),{expandIcon:(r=k==null?void 0:k.expandIcon)!==null&&r!==void 0?r:(n=q==null?void 0:q.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:xe="children"}=ce,Te=m.useMemo(()=>z.some(de=>de==null?void 0:de[xe])?"nest":F||k!=null&&k.expandedRowRender?"row":null,[z]),Fe={body:m.useRef(null)},ge=Ev(G),ye=m.useRef(null),Ee=m.useRef(null);Yp(t,()=>Object.assign(Object.assign({},Ee.current),{nativeElement:ye.current}));const Ve=m.useMemo(()=>typeof h=="function"?h:de=>de==null?void 0:de[h],[h]),[Ne]=S3(z,xe,Ve),Ie={},tt=(de,U,ve=!1)=>{var be,ie,pe,te;const ee=Object.assign(Object.assign({},Ie),de);ve&&((be=Ie.resetPagination)===null||be===void 0||be.call(Ie),!((ie=ee.pagination)===null||ie===void 0)&&ie.current&&(ee.pagination.current=1),d&&((pe=d.onChange)===null||pe===void 0||pe.call(d,1,(te=ee.pagination)===null||te===void 0?void 0:te.pageSize))),$&&$.scrollToFirstRowOnChange!==!1&&Fe.body.current&&Zp(0,{getContainer:()=>Fe.body.current}),C==null||C(ee.pagination,ee.filters,ee.sorter,{currentDataSource:ns(as(z,ee.sorterStates,xe),ee.filterStates,xe),action:U})},Ue=(de,U)=>{tt({sorter:de,sorterStates:U},"sort",!1)},[_e,Xe,Se,De]=T3({prefixCls:G,mergedColumns:O,onSorterChange:Ue,sortDirections:M||["ascend","descend"],tableLocale:W,showSorterTooltip:S}),Re=m.useMemo(()=>as(z,Xe,xe),[z,Xe]);Ie.sorter=De(),Ie.sorterStates=Xe;const ze=(de,U)=>{tt({filters:de,filterStates:U},"filter",!0)},[Ze,qe,Ct]=E3({prefixCls:G,locale:W,dropdownPrefixCls:Y,mergedColumns:O,onFilterChange:ze,getPopupContainer:y||T,rootClassName:$e(l,oe)}),Ye=ns(Re,qe,xe);Ie.filters=Ct,Ie.filterStates=qe;const ut=m.useMemo(()=>{const de={};return Object.keys(Ct).forEach(U=>{Ct[U]!==null&&(de[U]=Ct[U])}),Object.assign(Object.assign({},Se),{filters:de})},[Se,Ct]),[mt]=M3(ut),bt=(de,U)=>{tt({pagination:Object.assign(Object.assign({},Ie.pagination),{current:de,pageSize:U})},"paginate")},[dt,Ut]=B3(Ye.length,bt,d);Ie.pagination=d===!1?{}:A3(dt,d),Ie.resetPagination=Ut;const Ot=m.useMemo(()=>{if(d===!1||!dt.pageSize)return Ye;const{current:de=1,total:U,pageSize:ve=a2}=dt;return Ye.length<U?Ye.length>ve?Ye.slice((de-1)*ve,de*ve):Ye:Ye.slice((de-1)*ve,de*ve)},[!!d,Ye,dt==null?void 0:dt.current,dt==null?void 0:dt.pageSize,dt==null?void 0:dt.total]),[Vt,Mt]=wv({prefixCls:G,data:Ye,pageData:Ot,getRowKey:Ve,getRecordByKey:Ne,expandType:Te,childrenColumnName:xe,locale:W,getPopupContainer:y||T},g),Lt=(de,U,ve)=>{let be;return typeof v=="function"?be=$e(v(de,U,ve)):be=$e(v),$e({[`${G}-row-selected`]:Mt.has(Ve(de,U))},be)};ce.__PARENT_RENDER_ICON__=ce.expandIcon,ce.expandIcon=ce.expandIcon||A||Dv(W),Te==="nest"&&ce.expandIconColumnIndex===void 0?ce.expandIconColumnIndex=g?1:0:ce.expandIconColumnIndex>0&&g&&(ce.expandIconColumnIndex-=1),typeof ce.indentSize!="number"&&(ce.indentSize=typeof I=="number"?I:15);const Nt=m.useCallback(de=>mt(Vt(Ze(_e(de)))),[_e,Ze,Vt]),Pe=()=>{if(d===!1||!(dt!=null&&dt.total))return{};const de=()=>dt.size||(Z==="small"||Z==="middle"?"small":void 0),U=Ae=>{const nt=Ae==="left"?"start":Ae==="right"?"end":Ae;return m.createElement(Hd,Object.assign({},dt,{align:dt.align||nt,className:$e(`${G}-pagination`,dt.className),size:de()}))},ve=K==="rtl"?"left":"right",be=dt.position;if(be===null||!Array.isArray(be))return{bottom:U(ve)};const ie=be.find(Ae=>typeof Ae=="string"&&Ae.toLowerCase().includes("top")),pe=be.find(Ae=>typeof Ae=="string"&&Ae.toLowerCase().includes("bottom")),te=be.every(Ae=>`${Ae}`=="none"),ee=ie?ie.toLowerCase().replace("top",""):"",Oe=pe?pe.toLowerCase().replace("bottom",""):"",We=!ie&&!pe&&!te,pt=()=>ee?U(ee):void 0,Qe=()=>{if(Oe)return U(Oe);if(We)return U(ve)};return{top:pt(),bottom:Qe()}},kt=m.useMemo(()=>typeof w=="boolean"?{spinning:w}:typeof w=="object"&&w!==null?Object.assign({spinning:!0},w):void 0,[w]),Qt=$e(ue,oe,`${G}-wrapper`,q==null?void 0:q.className,{[`${G}-wrapper-rtl`]:K==="rtl"},a,l,ne),gr=Object.assign(Object.assign({},q==null?void 0:q.style),i),hr=m.useMemo(()=>kt!=null&&kt.spinning&&z===Ic?null:typeof(P==null?void 0:P.emptyText)<"u"?P.emptyText:(Q==null?void 0:Q("Table"))||m.createElement(Kp,{componentName:"Table"}),[kt==null?void 0:kt.spinning,z,P==null?void 0:P.emptyText,Q]),ir=B?j3:L3,Zr={},X=m.useMemo(()=>{const{fontSize:de,lineHeight:U,lineWidth:ve,padding:be,paddingXS:ie,paddingSM:pe}=J,te=Math.floor(de*U);switch(Z){case"middle":return pe*2+te+ve;case"small":return ie*2+te+ve;default:return be*2+te+ve}},[J,Z]);B&&(Zr.listItemHeight=X);const{top:me,bottom:Me}=Pe();return re(m.createElement("div",{ref:ye,className:Qt,style:gr},m.createElement(zd,Object.assign({spinning:!1},kt),me,m.createElement(ir,Object.assign({},Zr,V,{ref:Ee,columns:O,direction:K,expandable:ce,prefixCls:G,className:$e({[`${G}-middle`]:Z==="middle",[`${G}-small`]:Z==="small",[`${G}-bordered`]:s,[`${G}-empty`]:z.length===0},ue,oe,ne),data:Ot,rowKey:Ve,rowClassName:Lt,emptyText:hr,internalHooks:ra,internalRefs:Fe,transformColumns:Nt,getContainerWidth:ge,measureRowRender:de=>m.createElement(Vp,{getPopupContainer:U=>U},de)})),Me)))},o6=m.forwardRef(n6),a6=(e,t)=>{const r=m.useRef(0);return r.current+=1,m.createElement(o6,Object.assign({},e,{ref:t,_renderTimes:r.current}))},Ur=m.forwardRef(a6);Ur.SELECTION_COLUMN=Jr;Ur.EXPAND_COLUMN=en;Ur.SELECTION_ALL=Jl;Ur.SELECTION_INVERT=Ql;Ur.SELECTION_NONE=es;Ur.Column=fv;Ur.ColumnGroup=pv;Ur.Summary=Mf;const i6={colors:{primary:"#4E6EF2",secondary:"#6D86F5",success:"#52C41A",warning:"#FAAD14",error:"#F5222D",info:"#1890FF",background:"#F7F8FA",appBackground:"transparent",listBackground:"#F2F3F5",dashboardBackground:"#FFFFFF",text:"#1D2129",textSecondary:"#4E5969",textTertiary:"#86909C",textInverse:"#FFFFFF",border:"#DDE0E5",borderWeak:"#E5E6EB",disabled:"#C9CDD4",disabledBackground:"#F5F7FA",disabledText:"#C9CDD4",shadow:"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",primaryHover:"#6D86F5",primaryActive:"#2D4BE0",surfaceSubtle:"#F2F3F5",surfaceSelected:"#EEF3FE",btnPrimaryBg:"#4E6EF2",btnPrimaryBgHover:"#6D86F5",btnPrimaryBgActive:"#2D4BE0",btnPrimaryBgDisabled:"#F5F7FA",btnPrimaryText:"#FFFFFF",btnPrimaryTextDisabled:"#C9CDD4",btnSecondaryText:"#4E6EF2",btnSecondaryTextHover:"#4E6EF2",btnSecondaryTextActive:"#2D4BE0",btnSecondaryTextDisabled:"#C9CDD4",btnSecondaryBg:"#FFFFFF",btnSecondaryBgHover:"#EEF3FE",btnSecondaryBgActive:"#EEF3FE",btnSecondaryBgDisabled:"#F5F7FA",btnSecondaryBorder:"#4E6EF2",btnSecondaryBorderHover:"#6D86F5",btnSecondaryBorderActive:"#2D4BE0",btnSecondaryBorderDisabled:"#E5E6EB",btnTextText:"#4E6EF2",btnTextTextHover:"#6D86F5",btnTextTextActive:"#2D4BE0",btnTextTextDisabled:"#C9CDD4"},space:{sidebar:"260px",size:"12px",radius:"4px",padding:"8px",margin:"8px",shadow:"0 2px 8px rgba(0,0,0,0.1)",lineHeight:"1.5"},fonts:{body:{size:"14px",weight:"normal",family:"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:"16px",weight:"600",family:"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},icons:{aiAvatar:"http://10.15.12.13:9000/dev-rag-data/header_pic/JIABINBIN00/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20231212161213.jpg",userAvatar:"http://10.15.12.13:9005/assets/nav-logo-BKaOCDqi.png",pdf:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/pdf-icon.png",word:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/word-icon.png",image:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/image-icon.png",video:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/video-icon.png",audio:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/audio-icon.png",excel:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/excel-icon.png",ppt:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/ppt-icon.png"},others:{baseFontWeight:"normal"}},l6=Rr({theme:i6,mode:"light"}),Bi=()=>Vr(l6),s2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.69727%205.36035C9.24139%205.36035%209.7044%205.43727%2010.0781%205.59961L10.1787%205.64355V6.78418L9.93066%206.64746C9.56044%206.44228%209.15313%206.33892%208.70508%206.33887C8.12836%206.33887%207.66998%206.52918%207.31543%206.90527L7.31445%206.90625C6.96154%207.27886%206.77643%207.78905%206.77637%208.45605C6.77641%209.08819%206.94869%209.57219%207.27637%209.92578L7.4043%2010.0488C7.71343%2010.3185%208.1013%2010.456%208.5791%2010.4561C9.10219%2010.4561%209.54903%2010.3382%209.9248%2010.1084L10.1787%209.95312V11.0381L10.0889%2011.085C9.65012%2011.3158%209.10967%2011.4268%208.47559%2011.4268C7.6423%2011.4268%206.9605%2011.1612%206.44922%2010.6191V10.6182C5.93981%2010.0754%205.69145%209.36307%205.69141%208.49902C5.69147%207.57075%205.97064%206.80719%206.54102%206.22656C7.10964%205.64782%207.83309%205.36042%208.69727%205.36035ZM6.3291%206.75488C6.32678%206.75844%206.32457%206.76206%206.32227%206.76562C6.36901%206.69342%206.41884%206.62326%206.47266%206.55566L6.3291%206.75488ZM8.10645%205.57812C8.01275%205.59511%207.92124%205.61615%207.83203%205.6416C8.0108%205.5906%208.19869%205.55704%208.39551%205.54004L8.10645%205.57812Z'%20fill='%23339C43'/%3e%3c/svg%3e",u2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33301C11.457%201.33301%2011.6182%201.39584%2011.7412%201.50879L12.6504%202.3457L11.9736%203.08105L11.1602%202.33301H4V13.666H12.667V3.71387L11.9766%203.08398L11.9736%203.08203L12.6504%202.3457L13.4502%203.07617C13.5879%203.20229%2013.6668%203.38063%2013.667%203.56738V14L13.6533%2014.1338C13.5913%2014.4377%2013.3223%2014.666%2013%2014.666H3.66699L3.53223%2014.6523C3.27187%2014.599%203.06687%2014.3942%203.01367%2014.1338L3%2014V2C3.00012%201.67798%203.22857%201.40887%203.53223%201.34668L3.66699%201.33301H11.29ZM10.5%209C10.7761%209%2011%209.22386%2011%209.5C11%209.77614%2010.7761%2010%2010.5%2010H6.5C6.22386%2010%206%209.77614%206%209.5C6%209.22386%206.22386%209%206.5%209H10.5ZM10.5%207C10.7761%207%2011%207.22386%2011%207.5C11%207.77614%2010.7761%208%2010.5%208H6.5C6.22386%208%206%207.77614%206%207.5C6%207.22386%206.22386%207%206.5%207H10.5Z'%20fill='%23426BFF'/%3e%3c/svg%3e",c2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.71582%205.33301C6.78793%205.33301%206.85481%205.37254%206.89258%205.43652L7.9541%207.25586L9.00488%205.43848C9.04265%205.3745%209.10953%205.33496%209.18164%205.33496H9.79395C9.83089%205.33515%209.86769%205.34564%209.89941%205.36523C9.93101%205.3848%209.95694%205.41285%209.97461%205.44629C9.99224%205.47972%2010.0011%205.5176%2010%205.55566C9.99877%205.59389%209.9876%205.63179%209.96777%205.66406L8.50293%208.01855L9.94531%2010.3359C10.0071%2010.4354%209.97971%2010.5668%209.88379%2010.6309C9.84945%2010.6522%209.81097%2010.665%209.77148%2010.665H9.12793C9.05762%2010.665%208.99086%2010.6274%208.95312%2010.5635L7.88379%208.76172L6.80664%2010.5654C6.76885%2010.6275%206.70384%2010.667%206.63184%2010.667H6.04004C6.00321%2010.6669%205.96628%2010.6561%205.93457%2010.6367C5.90309%2010.6174%205.87717%2010.5897%205.85938%2010.5566C5.84153%2010.5233%205.83209%2010.4854%205.83301%2010.4473C5.83393%2010.4093%205.84491%2010.3721%205.86426%2010.3398L7.2959%207.97949L5.88379%205.66211C5.82198%205.56081%205.85112%205.42939%205.94727%205.36719C5.97982%205.3442%206.01726%205.33302%206.05664%205.33301H6.71582Z'%20fill='%232F913E'/%3e%3c/svg%3e",d2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1162%203.07617C13.2543%203.20232%2013.3338%203.3804%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM10%208.5C10.2761%208.5%2010.5%208.72386%2010.5%209C10.5%209.27614%2010.2761%209.5%2010%209.5H6C5.72386%209.5%205.5%209.27614%205.5%209C5.5%208.72386%205.72386%208.5%206%208.5H10ZM9%206C9.27614%206%209.5%206.22386%209.5%206.5C9.5%206.77614%209.27614%207%209%207H6C5.72386%207%205.5%206.77614%205.5%206.5C5.5%206.22386%205.72386%206%206%206H9Z'%20fill='%2370706E'/%3e%3c/svg%3e",f2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H8.22957C8.49499%202%208.73512%202.15744%208.84095%202.40085L9.92791%204.90085C10.1193%205.34115%209.79664%205.83333%209.31652%205.83333H2.66667C2.29848%205.83333%202%205.53486%202%205.16667V2.66667Z'%20fill='%23F9B13C'/%3e%3cpath%20d='M3%204.50008C3%204.31599%203.14924%204.16675%203.33333%204.16675H12.6667C12.8508%204.16675%2013%204.31599%2013%204.50008V13.1667C13%2013.3508%2012.8508%2013.5001%2012.6667%2013.5001H3.33333C3.14924%2013.5001%203%2013.3508%203%2013.1667V4.50008Z'%20fill='white'/%3e%3cpath%20d='M2%204.66675H13.3333C13.7015%204.66675%2014%204.96522%2014%205.33341V13.3334C14%2013.7016%2013.7015%2014.0001%2013.3333%2014.0001H2.66667C2.29848%2014.0001%202%2013.7016%202%2013.3334V4.66675Z'%20fill='%23FFCB2E'/%3e%3c/svg%3e",p2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.95117%208.80469C8.95117%209.45619%208.83123%209.99047%208.58105%2010.3984L8.46582%2010.5654C8.13575%2010.9898%207.68375%2011.2012%207.12109%2011.2012C6.86476%2011.2012%206.64525%2011.1636%206.4668%2011.083L6.4082%2011.0566V10.0342L6.56641%2010.1494C6.70723%2010.2516%206.88862%2010.3066%207.11719%2010.3066C7.40052%2010.3066%207.60577%2010.1907%207.74609%209.95508C7.89129%209.7111%207.9707%209.33189%207.9707%208.80469V4.84961H8.95117V8.80469Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",g2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13%201C13.5523%201%2014%201.44772%2014%202V13H3.5C3.22386%2013%203%2013.2239%203%2013.5C3%2013.7761%203.22386%2014%203.5%2014H14C14%2014.5523%2013.5523%2015%2013%2015H4C2.89543%2015%202%2014.1046%202%2013V3C2%201.89543%202.89543%201%204%201H13ZM5.5%204C5.22386%204%205%204.22386%205%204.5C5%204.77614%205.22386%205%205.5%205H10.5C10.7761%205%2011%204.77614%2011%204.5C11%204.22386%2010.7761%204%2010.5%204H5.5Z'%20fill='%230956E4'/%3e%3c/svg%3e",h2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5C4.41015%2014.5%201.5%2011.5899%201.5%208C1.5%204.41015%204.41015%201.5%208%201.5ZM8%202.42871C4.92298%202.42871%202.42871%204.92298%202.42871%208C2.42871%2011.077%204.92298%2013.5713%208%2013.5713C11.077%2013.5713%2013.5713%2011.077%2013.5713%208C13.5713%204.92298%2011.077%202.42871%208%202.42871ZM6.19434%207.36523C6.2548%207.30503%206.3537%207.30487%206.41406%207.36523L6.68262%207.63477C6.74275%207.69515%206.74275%207.79314%206.68262%207.85352L6.30371%208.23242C5.89985%208.63677%205.89974%209.29201%206.30371%209.69629C6.70813%2010.1005%207.3642%2010.1006%207.76855%209.69629L8.14746%209.31738C8.20788%209.25744%208.30591%209.25726%208.36621%209.31738L8.63574%209.58691C8.69582%209.64722%208.69567%209.74526%208.63574%209.80566L8.25684%2010.1846C7.58294%2010.8585%206.49045%2010.8582%205.81641%2010.1846C5.14239%209.51056%205.14239%208.41815%205.81641%207.74414L6.19434%207.36523ZM8.27441%207.27246C8.33487%207.21231%208.43282%207.21214%208.49316%207.27246L8.7627%207.54199C8.82268%207.60237%208.82273%207.7004%208.7627%207.76074L7.76074%208.76172C7.70035%208.82211%207.60244%208.82201%207.54199%208.76172L7.27246%208.49316C7.21217%208.43285%207.21239%208.33487%207.27246%208.27441L8.27441%207.27246ZM7.74414%205.81543C8.41813%205.14189%209.51068%205.14173%2010.1846%205.81543C10.8584%206.48938%2010.8583%207.58286%2010.1846%208.25684L9.80566%208.63477C9.74528%208.69515%209.64736%208.69505%209.58691%208.63477L9.31738%208.36621C9.25716%208.30593%209.25744%208.20792%209.31738%208.14746L9.69629%207.76855C10.1004%207.36418%2010.1005%206.70805%209.69629%206.30371C9.29201%205.89962%208.6368%205.89978%208.23242%206.30371L7.85352%206.68262C7.79319%206.74294%207.69523%206.74271%207.63477%206.68262L7.36523%206.41309C7.30484%206.35264%207.30481%206.25476%207.36523%206.19434L7.74414%205.81543Z'%20fill='%2339B83F'/%3e%3c/svg%3e",m2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957Z'%20fill='%23675FF0'/%3e%3cpath%20d='M5%206.81818C5.12597%206.81818%205.22541%206.79021%205.30497%206.73427C5.38453%206.67832%205.43757%206.6014%205.46409%206.51049C5.49061%206.41259%205.50387%206.25175%205.50387%206.02098C5.50387%205.79021%205.5105%205.63636%205.51713%205.56643C5.53039%205.44755%205.55691%205.35664%205.60331%205.28671C5.64309%205.21678%205.6895%205.16084%205.74917%205.11888C5.80884%205.07692%205.88177%205.04895%205.97459%205.02098C6.03425%205.00699%206.14033%205%206.27956%205H6.41878V5.32867H6.34586C6.17348%205.32867%206.06077%205.35664%206.00773%205.40559C5.9547%205.45454%205.92155%205.57343%205.92155%205.75525C5.92155%206.11888%205.91492%206.34266%205.89503%206.44056C5.86851%206.58741%205.81547%206.6993%205.74254%206.78322C5.66961%206.86014%205.55691%206.93706%205.41105%207C5.59006%207.06294%205.72265%207.16084%205.80221%207.29371C5.88177%207.42657%205.92155%207.63636%205.92155%207.93706C5.92155%208.2028%205.92818%208.36364%205.92818%208.41958C5.94144%208.51049%205.97459%208.58042%206.02762%208.61539C6.08066%208.65035%206.18674%208.67133%206.33923%208.67133H6.41215V9H6.27293C6.11381%209%205.99448%208.99301%205.92818%208.96503C5.8221%208.93007%205.73591%208.88112%205.66961%208.81119C5.60331%208.74126%205.55691%208.65035%205.53702%208.53846C5.51713%208.42657%205.50387%208.25175%205.50387%208C5.50387%207.74825%205.49061%207.58042%205.46409%207.48252C5.43757%207.39161%205.38453%207.30769%205.30497%207.25874C5.22541%207.2028%205.12597%207.17483%205%207.16783V6.81818ZM10.5956%206.06993H7.22099C7.04199%206.06993%206.90276%205.91608%206.90276%205.73427V5.67133C6.90276%205.48252%207.04862%205.33566%207.22099%205.33566H10.5956C10.7746%205.33566%2010.9138%205.48951%2010.9138%205.67133V5.73427C10.9138%205.91608%2010.768%206.06993%2010.5956%206.06993ZM10.5956%207.3986H7.22099C7.04199%207.3986%206.90276%207.24476%206.90276%207.06294V7C6.90276%206.81119%207.04862%206.66434%207.22099%206.66434H10.5956C10.7746%206.66434%2010.9138%206.81818%2010.9138%207V7.06294C10.9138%207.24476%2010.768%207.3986%2010.5956%207.3986ZM10.5956%208.73427H7.22099C7.04199%208.73427%206.90276%208.58042%206.90276%208.3986V8.33566C6.90276%208.14685%207.04862%208%207.22099%208H10.5956C10.7746%208%2010.9138%208.15385%2010.9138%208.33566V8.3986C10.9138%208.58042%2010.768%208.73427%2010.5956%208.73427Z'%20fill='%23675FF0'/%3e%3cpath%20d='M11.5%2010.1265H10.8525V12H10.3677V10.1265H9.72168V9.73096H11.5V10.1265Z'%20fill='%23675FF0'/%3e%3cpath%20d='M7.55811%2012V9.73096H8.3418C9.14746%209.73096%209.55029%2010.0996%209.55029%2010.8369C9.55029%2011.1875%209.4375%2011.4692%209.21191%2011.6821C8.98633%2011.894%208.69531%2012%208.33887%2012H7.55811ZM8.0415%2010.1265V11.6045H8.30518C8.53467%2011.6045%208.71484%2011.5361%208.8457%2011.3994C8.97656%2011.2627%209.04199%2011.0776%209.04199%2010.8442C9.04199%2010.6187%208.97363%2010.4429%208.83691%2010.3169C8.7002%2010.1899%208.52246%2010.1265%208.30371%2010.1265H8.0415Z'%20fill='%23675FF0'/%3e%3cpath%20d='M4.96094%2010.8955C4.96094%2010.54%205.06445%2010.251%205.27148%2010.0283C5.47949%209.80469%205.75391%209.69287%206.09473%209.69287C6.41895%209.69287%206.67969%209.80078%206.87695%2010.0166C7.0752%2010.2324%207.17432%2010.5098%207.17432%2010.8486C7.17432%2011.2021%207.07129%2011.4893%206.86523%2011.71C6.66016%2011.9297%206.39111%2012.0396%206.05811%2012.0396C5.73291%2012.0396%205.46875%2011.9331%205.26562%2011.7202C5.0625%2011.5063%204.96094%2011.2314%204.96094%2010.8955ZM5.46924%2010.8691C5.46924%2011.0898%205.52246%2011.2705%205.62891%2011.4111C5.73535%2011.5508%205.88135%2011.6206%206.06689%2011.6206C6.25635%2011.6206%206.40381%2011.5537%206.50928%2011.4199C6.61475%2011.2852%206.66748%2011.1045%206.66748%2010.8779C6.66748%2010.6416%206.61621%2010.4551%206.51367%2010.3184C6.41113%2010.1807%206.2666%2010.1118%206.08008%2010.1118C5.89062%2010.1118%205.74121%2010.1821%205.63184%2010.3228C5.52344%2010.4634%205.46924%2010.6455%205.46924%2010.8691Z'%20fill='%23675FF0'/%3e%3c/svg%3e",v2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM7.71191%205.00098C7.95398%205.01182%208.23799%205.16198%208.30664%205.54688C8.40941%206.03464%208.27759%206.57316%208.17285%207.00488L8.16699%207.03027C8.37835%207.57951%208.66991%207.94773%209.11426%208.21875C10.017%208.10683%2010.5964%208.16863%2010.835%208.40332C10.9994%208.56776%2011.0484%208.87519%2010.9473%209.11914C10.8894%209.25831%2010.7357%209.48926%2010.3457%209.48926C9.95189%209.48921%209.37167%209.31384%208.8623%209.04102C8.40175%209.11875%207.8926%209.29278%207.40137%209.45898C7.2966%209.49512%207.18778%209.5311%207.08301%209.56543C6.3969%2010.7429%205.8824%2010.9998%205.56445%2011C5.48865%2011%205.4233%2010.9837%205.36914%2010.9639C5.24449%2010.9169%205.13813%2010.8189%205.07129%2010.6924C5.01181%2010.5787%204.98629%2010.4528%205.00781%2010.3535C5.1144%209.81502%205.83149%209.3878%206.36621%209.11133C6.65343%208.60533%207.04538%207.75431%207.29102%207.16895C7.09599%206.41389%206.98933%205.82132%207.1084%205.3877C7.17162%205.15099%207.42651%204.98835%207.71191%205.00098ZM6.18555%209.77441C5.99948%209.94427%205.76264%2010.1801%205.6416%2010.4023C5.74457%2010.3228%205.93444%2010.1394%206.18555%209.77441ZM7.73926%207.69629C7.60016%208.05769%207.39944%208.55181%207.15918%208.9873C7.23144%208.95839%207.30596%208.9272%207.38184%208.89648C7.69966%208.76643%208.05529%208.61975%208.44531%208.53125C8.17624%208.31804%207.93249%208.03049%207.73926%207.69629ZM9.73535%208.74707C10.3674%208.99599%2010.5185%208.91259%2010.5352%208.90234L10.5391%208.89648H10.543C10.5536%208.88933%2010.5516%208.88347%2010.5498%208.87988C10.544%208.87053%2010.4509%208.71359%209.73535%208.74707ZM7.72852%205.4834C7.67613%205.54303%207.68883%206.05251%207.77734%206.41211C7.8496%206.16635%207.86152%205.68036%207.76758%205.51953C7.75502%205.4962%207.74284%205.48532%207.72852%205.4834Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",C2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1777%202.67969C14.4553%202.7361%2014.6644%202.98029%2014.666%203.27441V12.667C14.6659%2012.9891%2014.4376%2013.2583%2014.1338%2013.3203L14%2013.334H2L1.86523%2013.3203C1.56164%2013.2581%201.33312%2012.989%201.33301%2012.667V3.33398C1.33301%203.01196%201.56164%202.74298%201.86523%202.68066L2%202.66699H14.0557L14.1777%202.67969ZM2.33301%2012.334H13.666V3.66699H2.33301V12.334ZM8.78125%207.39355C8.79747%207.40146%208.81204%207.41261%208.82324%207.42676L10.8545%2010.0166C10.915%2010.0939%2010.8601%2010.2078%2010.7607%2010.208H5.28613C5.26386%2010.2081%205.24156%2010.2022%205.22266%2010.1904C5.20374%2010.1786%205.18849%2010.1616%205.17871%2010.1416C5.16897%2010.1216%205.16469%2010.0993%205.16699%2010.0771C5.16933%2010.055%205.17865%2010.0341%205.19238%2010.0166L6.67676%208.12305C6.68788%208.10885%206.70253%208.09775%206.71875%208.08984C6.73488%208.08198%206.75256%208.07818%206.77051%208.07812C6.78858%208.07812%206.807%208.08193%206.82324%208.08984C6.83924%208.09768%206.85322%208.10907%206.86426%208.12305L7.47656%208.90332L8.63379%207.42676C8.64501%207.41261%208.65955%207.40145%208.67578%207.39355C8.69215%207.38564%208.71034%207.38086%208.72852%207.38086C8.74668%207.38087%208.7649%207.38565%208.78125%207.39355ZM6.35547%205.83301C6.51333%205.83301%206.66474%205.89619%206.77637%206.00781C6.888%206.11944%206.95117%206.27084%206.95117%206.42871C6.95111%206.5865%206.88794%206.73803%206.77637%206.84961C6.66476%206.9611%206.51323%207.02344%206.35547%207.02344C6.19768%207.02338%206.04615%206.96118%205.93457%206.84961C5.823%206.73803%205.7608%206.5865%205.76074%206.42871C5.76074%206.27095%205.82308%206.11942%205.93457%206.00781C6.04615%205.89624%206.19768%205.83307%206.35547%205.83301Z'%20fill='%2332A3FF'/%3e%3c/svg%3e",b2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.1543%205.26758H8.1543C9.30194%205.26778%209.9998%206.03334%2010%207.08105C10%208.14247%209.29247%208.89045%208.15039%208.89062H6.93262V10.7275C6.93262%2010.812%206.86371%2010.8816%206.7793%2010.8818H6.1543C6.06968%2010.8818%206%2010.8122%206%2010.7275V5.41992C6.00002%205.33532%206.06969%205.2666%206.1543%205.2666V5.26758ZM6.93262%206.03906V8.12402H7.68066C8.54028%208.12402%209.0498%207.91372%209.0498%207.0791C9.04962%206.41793%208.66339%206.03914%208.01367%206.03906H6.93262Z'%20fill='%23FA8C16'/%3e%3c/svg%3e",y2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.73633%201.57642C2.53848%200.774265%203.74473%200.714862%204.87207%201.03052C6.02182%201.35245%207.24885%202.09683%208.3125%203.1604C9.37624%204.22414%2010.1204%205.45195%2010.4424%206.60181C10.758%207.72909%2010.6986%208.93446%209.89648%209.73657C9.09439%2010.5387%207.88901%2010.5981%206.76172%2010.2825C5.61186%209.96051%204.38405%209.21632%203.32031%208.15259C2.25674%207.08894%201.51236%205.86191%201.19043%204.71216C0.874775%203.58481%200.934176%202.37857%201.73633%201.57642Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.76172%205.41479C7.88883%205.09929%209.09442%205.15888%209.89648%205.96069C10.6986%206.76284%2010.758%207.96909%2010.4424%209.09644C10.1204%2010.2462%209.37617%2011.4732%208.3125%2012.5369C7.24882%2013.6005%206.02187%2014.3448%204.87207%2014.6667C3.74472%2014.9824%202.53848%2014.923%201.73633%2014.1208C0.934528%2013.3188%200.874922%2012.1132%201.19043%2010.9861C1.51239%209.83623%202.25659%208.60841%203.32031%207.54468C4.38405%206.48096%205.61186%205.73675%206.76172%205.41479Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.1282%201.03052C12.2553%200.715012%2013.4609%200.774612%2014.263%201.57642C15.0651%202.37857%2015.1246%203.58481%2014.8089%204.71216C14.4869%205.86196%2013.7427%207.08892%2012.679%208.15259C11.6153%209.21627%2010.3884%209.96048%209.23859%2010.2825C8.11124%2010.5981%206.90499%2010.5387%206.10284%209.73657C5.30106%208.9345%205.24144%207.72892%205.55695%206.60181C5.8789%205.45195%206.62311%204.22414%207.68683%203.1604C8.75056%202.09668%209.97838%201.35248%2011.1282%201.03052Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.10284%205.96069C6.90499%205.15855%208.11124%205.09914%209.23859%205.41479C10.3883%205.73673%2011.6154%206.48111%2012.679%207.54468C13.7427%208.60841%2014.4869%209.83623%2014.8089%2010.9861C15.1245%2012.1134%2015.0651%2013.3188%2014.263%2014.1208C13.4609%2014.9229%2012.2555%2014.9823%2011.1282%2014.6667C9.97838%2014.3448%208.75055%2013.6006%207.68683%2012.5369C6.62325%2011.4732%205.87888%2010.2462%205.55695%209.09644C5.24129%207.96909%205.3007%206.76284%206.10284%205.96069Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",x2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM9.91406%205.16699C10.0058%205.16721%2010.0799%205.24128%2010.0801%205.33301V5.9707C10.0801%206.06262%2010.0059%206.13748%209.91406%206.1377H8.64648C8.55457%206.1377%208.47971%206.21185%208.47949%206.30371V10.5469C8.47936%2010.6387%208.40525%2010.7127%208.31348%2010.7129H7.59375C7.50178%2010.7129%207.42689%2010.6388%207.42676%2010.5469V6.30371C7.42654%206.21185%207.35168%206.1377%207.25977%206.1377H6C5.90795%206.1377%205.83301%206.06275%205.83301%205.9707V5.33301C5.83323%205.24115%205.90809%205.16699%206%205.16699H9.91406Z'%20fill='%234089FF'/%3e%3c/svg%3e",w2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.9568%201.33276C11.1238%201.33276%2011.2849%201.39651%2011.408%201.50952L12.3171%202.34644L11.6404%203.08179L10.8269%202.33374H3.66675V13.6667H12.3337V3.7146L11.6433%203.08472L11.6404%203.08276L12.3171%202.34644L13.1169%203.0769C13.2546%203.20307%2013.3336%203.38138%2013.3337%203.56812V14.0007L13.3201%2014.1345C13.2578%2014.4382%2012.9888%2014.6667%2012.6667%2014.6667H3.33374L3.19897%2014.6531C2.93875%2014.5998%202.73378%2014.3947%202.68042%2014.1345L2.66675%2014.0007V2.00073C2.66675%201.67864%202.89529%201.40965%203.19897%201.34741L3.33374%201.33276H10.9568ZM6.05542%207.31616C6.12046%207.25114%206.22568%207.25122%206.29077%207.31616L6.58081%207.6062C6.64589%207.67128%206.64588%207.77646%206.58081%207.84155L6.17358%208.24976C5.73807%208.68527%205.73807%209.39139%206.17358%209.8269C6.60912%2010.2622%207.31529%2010.2624%207.75073%209.8269L8.15796%209.4187C8.22305%209.35363%208.32921%209.35362%208.39429%209.4187L8.68433%209.70874C8.74934%209.77383%208.74937%209.88%208.68433%209.94507L8.27612%2010.3523C7.55026%2011.0782%206.37308%2011.0782%205.64722%2010.3523C4.92174%209.62652%204.92177%208.45016%205.64722%207.72437L6.05542%207.31616ZM8.29468%207.21655C8.35977%207.15147%208.46592%207.15147%208.53101%207.21655L8.82104%207.50659C8.88578%207.5716%208.88575%207.67692%208.82104%207.74194L7.74194%208.82104C7.67692%208.88583%207.57163%208.8858%207.50659%208.82104L7.21655%208.53101C7.15147%208.46592%207.15147%208.35977%207.21655%208.29468L8.29468%207.21655ZM7.72339%205.64722C8.44919%204.92141%209.62642%204.92152%2010.3523%205.64722C11.0782%206.37308%2011.0782%207.55026%2010.3523%208.27612L9.94409%208.68433C9.87904%208.74897%209.77371%208.7491%209.70874%208.68433L9.4187%208.39429C9.35361%208.3292%209.35361%208.22305%209.4187%208.15796L9.8269%207.75073C10.2623%207.31533%2010.2621%206.60913%209.8269%206.17358C9.39139%205.73807%208.68527%205.73807%208.24976%206.17358L7.84155%206.58081C7.77647%206.64589%207.67129%206.64588%207.6062%206.58081L7.31616%206.29077C7.25109%206.22568%207.25108%206.1205%207.31616%206.05542L7.72339%205.64722Z'%20fill='%231998FF'/%3e%3c/svg%3e",D2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM5.77832%205.83301C5.87031%205.83301%205.94933%205.8983%205.9707%205.98828L6.72852%209.2998L7.54492%205.98535C7.56627%205.89541%207.64507%205.83309%207.73535%205.83301H8.26465C8.35498%205.83305%208.43373%205.89538%208.45508%205.98535L9.27344%209.30664L10.0254%205.98828C10.0467%205.89837%2010.1259%205.83313%2010.2178%205.83301H10.8027C10.8329%205.83312%2010.8626%205.84093%2010.8896%205.85449C10.9167%205.86808%2010.9406%205.88781%2010.959%205.91211C10.9773%205.93632%2010.9901%205.96425%2010.9961%205.99414C11.0021%206.02417%2011.0008%206.05533%2010.9932%206.08496L9.77148%2010.6846C9.74853%2010.7727%209.66957%2010.8328%209.58105%2010.833H9.05859C8.96987%2010.833%208.89019%2010.7712%208.86719%2010.6846L8%207.40137L7.13281%2010.6846C7.10985%2010.7728%207.03094%2010.8328%206.94238%2010.833H6.41602C6.32739%2010.8329%206.24857%2010.7712%206.22559%2010.6846L5.00684%206.08496C4.99909%206.05533%204.99796%206.0242%205.00391%205.99414C5.00985%205.9641%205.02262%205.93543%205.04102%205.91113C5.05939%205.88697%205.08338%205.86703%205.11035%205.85352C5.13734%205.84008%205.1672%205.83306%205.19727%205.83301H5.77832Z'%20fill='%23426BFF'/%3e%3c/svg%3e",E2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33008C11.457%201.33008%2011.6182%201.39298%2011.7412%201.50586L12.6504%202.34277L11.9736%203.07812L11.1602%202.33008H4V13.6631H12.667V3.71094L11.9766%203.08105L11.9736%203.0791L12.6504%202.34277L13.4502%203.07324C13.588%203.19942%2013.6669%203.37761%2013.667%203.56445V13.9971L13.6533%2014.1309C13.5912%2014.4347%2013.3222%2014.6631%2013%2014.6631H3.66699L3.53223%2014.6494C3.27204%2014.5959%203.06685%2014.3912%203.01367%2014.1309L3%2013.9971V1.99707C3%201.67508%203.22869%201.40611%203.53223%201.34375L3.66699%201.33008H11.29ZM7.36816%206.39941C7.65187%206.39959%207.84768%206.57468%207.95605%206.93066L7.52734%207.78809L7.31641%207.35938C7.24417%207.22007%207.15618%207.14756%207.04785%207.14746H6.19043C6.04599%207.14751%206.00977%207.21486%206.08203%207.35938L7.04199%209.38867C7.68737%208.10825%208.05967%207.27658%208.21973%206.93066C8.40557%206.5332%208.62233%206.39943%208.90625%206.39941H10.791C11.1471%206.39948%2011.2705%206.57449%2011.1621%206.93066C11.0536%207.287%2010.5013%208.46426%209.50488%2010.457C9.46874%2010.5241%209.41249%2010.5762%209.35059%2010.6123C9.1441%2010.731%208.88077%2010.6635%208.75684%2010.457L8.22461%209.28027L8.65332%208.42285L9.13379%209.43945L10.1504%207.35938C10.2175%207.21997%2010.1866%207.14746%2010.042%207.14746H8.97852L7.47656%2010.3535C7.43013%2010.5031%207.31627%2010.6168%207.17188%2010.6582C6.93438%2010.7253%206.68626%2010.591%206.61914%2010.3535C5.62275%208.28844%205.09083%207.1111%205.01855%206.82715C4.94645%206.54338%205.09114%206.39941%205.44727%206.39941H7.36816Z'%20fill='%23ED8E35'/%3e%3c/svg%3e",S2="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H13.3333C13.7015%202%2014%202.29848%2014%202.66667V8H2V2.66667Z'%20fill='%234DC6FF'/%3e%3cpath%20d='M2%208H14V13.3333C14%2013.7015%2013.7015%2014%2013.3333%2014H2.66667C2.29848%2014%202%2013.7015%202%2013.3333V8Z'%20fill='%234DCE84'/%3e%3crect%20x='14'%20y='6'%20width='4'%20height='12'%20transform='rotate(90%2014%206)'%20fill='%23FF5F5A'/%3e%3crect%20x='6'%20y='2'%20width='4'%20height='12'%20fill='%23FCC048'/%3e%3crect%20x='5.66667'%20y='5.66667'%20width='4.66667'%20height='4.66667'%20rx='0.666667'%20stroke='white'%20stroke-width='0.666667'/%3e%3c/svg%3e",s6=Object.assign({});function u6(e,t,r){let n=e;for(let o=0;o<t.length-1;o+=1){const a=t[o];(!n[a]||typeof n[a]!="object")&&(n[a]={}),n=n[a]}n[t[t.length-1]]=r}function c6(e){return e.replace(/^\.\//,"").split("?")[0].replace(/\.svg$/i,"").split("/")}function d6(e,t){const r=Ce.lazy(()=>e().then(o=>({default:o.default||o.ReactComponent}))),n=o=>Gn(rp,{fallback:null,children:Gn(r,{...o})});return n.displayName=t,Go(n)}const k2={};Object.entries(s6).forEach(([e,t])=>{const r=c6(e),n=d6(t,`Icon(${r.join("/")})`);u6(k2,r,n)});const f6=Object.assign({"./rag/csv.svg":s2,"./rag/document.svg":u2,"./rag/excel.svg":c2,"./rag/file.svg":d2,"./rag/folder.svg":f2,"./rag/json.svg":p2,"./rag/knowledgebase.svg":g2,"./rag/netretrive.svg":h2,"./rag/odf.svg":m2,"./rag/pdf.svg":v2,"./rag/pic.svg":C2,"./rag/ppt.svg":b2,"./rag/think.svg":y2,"./rag/txt.svg":x2,"./rag/url.svg":w2,"./rag/word.svg":D2,"./rag/wps.svg":E2,"./rag/zip.svg":S2});function p6(e,t,r){let n=e;for(let o=0;o<t.length-1;o+=1){const a=t[o];(!n[a]||typeof n[a]!="object")&&(n[a]={}),n=n[a]}n[t[t.length-1]]=r}function g6(e){return e.replace(/^\.\//,"").split("?")[0].replace(/\.svg$/i,"").split("/")}const A2={};Object.entries(f6).forEach(([e,t])=>{const r=g6(e);p6(A2,r,t)});function h6(e){const t=e.split("/").filter(Boolean);let r=k2;for(const n of t){if(!r)return;r=r[n]}return typeof r=="function"?r:void 0}function m6(e){const t=e.split("/").filter(Boolean);let r=A2;for(const n of t){if(!r)return;r=r[n]}return typeof r=="string"?r:void 0}const fa=({type:e,size:t,...r})=>{const n=h6(e),o=typeof t<"u"?{width:t,height:t}:{};if(n)return Gn(n,{...o,...r});const a=m6(e);return a?Gn("img",{src:a,alt:"",...o,...r}):null},v6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.69727%205.36035C9.24139%205.36035%209.7044%205.43727%2010.0781%205.59961L10.1787%205.64355V6.78418L9.93066%206.64746C9.56044%206.44228%209.15313%206.33892%208.70508%206.33887C8.12836%206.33887%207.66998%206.52918%207.31543%206.90527L7.31445%206.90625C6.96154%207.27886%206.77643%207.78905%206.77637%208.45605C6.77641%209.08819%206.94869%209.57219%207.27637%209.92578L7.4043%2010.0488C7.71343%2010.3185%208.1013%2010.456%208.5791%2010.4561C9.10219%2010.4561%209.54903%2010.3382%209.9248%2010.1084L10.1787%209.95312V11.0381L10.0889%2011.085C9.65012%2011.3158%209.10967%2011.4268%208.47559%2011.4268C7.6423%2011.4268%206.9605%2011.1612%206.44922%2010.6191V10.6182C5.93981%2010.0754%205.69145%209.36307%205.69141%208.49902C5.69147%207.57075%205.97064%206.80719%206.54102%206.22656C7.10964%205.64782%207.83309%205.36042%208.69727%205.36035ZM6.3291%206.75488C6.32678%206.75844%206.32457%206.76206%206.32227%206.76562C6.36901%206.69342%206.41884%206.62326%206.47266%206.55566L6.3291%206.75488ZM8.10645%205.57812C8.01275%205.59511%207.92124%205.61615%207.83203%205.6416C8.0108%205.5906%208.19869%205.55704%208.39551%205.54004L8.10645%205.57812Z'%20fill='%23339C43'/%3e%3c/svg%3e",C6=Object.freeze(Object.defineProperty({__proto__:null,default:v6},Symbol.toStringTag,{value:"Module"})),b6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33301C11.457%201.33301%2011.6182%201.39584%2011.7412%201.50879L12.6504%202.3457L11.9736%203.08105L11.1602%202.33301H4V13.666H12.667V3.71387L11.9766%203.08398L11.9736%203.08203L12.6504%202.3457L13.4502%203.07617C13.5879%203.20229%2013.6668%203.38063%2013.667%203.56738V14L13.6533%2014.1338C13.5913%2014.4377%2013.3223%2014.666%2013%2014.666H3.66699L3.53223%2014.6523C3.27187%2014.599%203.06687%2014.3942%203.01367%2014.1338L3%2014V2C3.00012%201.67798%203.22857%201.40887%203.53223%201.34668L3.66699%201.33301H11.29ZM10.5%209C10.7761%209%2011%209.22386%2011%209.5C11%209.77614%2010.7761%2010%2010.5%2010H6.5C6.22386%2010%206%209.77614%206%209.5C6%209.22386%206.22386%209%206.5%209H10.5ZM10.5%207C10.7761%207%2011%207.22386%2011%207.5C11%207.77614%2010.7761%208%2010.5%208H6.5C6.22386%208%206%207.77614%206%207.5C6%207.22386%206.22386%207%206.5%207H10.5Z'%20fill='%23426BFF'/%3e%3c/svg%3e",y6=Object.freeze(Object.defineProperty({__proto__:null,default:b6},Symbol.toStringTag,{value:"Module"})),x6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.71582%205.33301C6.78793%205.33301%206.85481%205.37254%206.89258%205.43652L7.9541%207.25586L9.00488%205.43848C9.04265%205.3745%209.10953%205.33496%209.18164%205.33496H9.79395C9.83089%205.33515%209.86769%205.34564%209.89941%205.36523C9.93101%205.3848%209.95694%205.41285%209.97461%205.44629C9.99224%205.47972%2010.0011%205.5176%2010%205.55566C9.99877%205.59389%209.9876%205.63179%209.96777%205.66406L8.50293%208.01855L9.94531%2010.3359C10.0071%2010.4354%209.97971%2010.5668%209.88379%2010.6309C9.84945%2010.6522%209.81097%2010.665%209.77148%2010.665H9.12793C9.05762%2010.665%208.99086%2010.6274%208.95312%2010.5635L7.88379%208.76172L6.80664%2010.5654C6.76885%2010.6275%206.70384%2010.667%206.63184%2010.667H6.04004C6.00321%2010.6669%205.96628%2010.6561%205.93457%2010.6367C5.90309%2010.6174%205.87717%2010.5897%205.85938%2010.5566C5.84153%2010.5233%205.83209%2010.4854%205.83301%2010.4473C5.83393%2010.4093%205.84491%2010.3721%205.86426%2010.3398L7.2959%207.97949L5.88379%205.66211C5.82198%205.56081%205.85112%205.42939%205.94727%205.36719C5.97982%205.3442%206.01726%205.33302%206.05664%205.33301H6.71582Z'%20fill='%232F913E'/%3e%3c/svg%3e",w6=Object.freeze(Object.defineProperty({__proto__:null,default:x6},Symbol.toStringTag,{value:"Module"})),D6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1162%203.07617C13.2543%203.20232%2013.3338%203.3804%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM10%208.5C10.2761%208.5%2010.5%208.72386%2010.5%209C10.5%209.27614%2010.2761%209.5%2010%209.5H6C5.72386%209.5%205.5%209.27614%205.5%209C5.5%208.72386%205.72386%208.5%206%208.5H10ZM9%206C9.27614%206%209.5%206.22386%209.5%206.5C9.5%206.77614%209.27614%207%209%207H6C5.72386%207%205.5%206.77614%205.5%206.5C5.5%206.22386%205.72386%206%206%206H9Z'%20fill='%2370706E'/%3e%3c/svg%3e",E6=Object.freeze(Object.defineProperty({__proto__:null,default:D6},Symbol.toStringTag,{value:"Module"})),S6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H8.22957C8.49499%202%208.73512%202.15744%208.84095%202.40085L9.92791%204.90085C10.1193%205.34115%209.79664%205.83333%209.31652%205.83333H2.66667C2.29848%205.83333%202%205.53486%202%205.16667V2.66667Z'%20fill='%23F9B13C'/%3e%3cpath%20d='M3%204.50008C3%204.31599%203.14924%204.16675%203.33333%204.16675H12.6667C12.8508%204.16675%2013%204.31599%2013%204.50008V13.1667C13%2013.3508%2012.8508%2013.5001%2012.6667%2013.5001H3.33333C3.14924%2013.5001%203%2013.3508%203%2013.1667V4.50008Z'%20fill='white'/%3e%3cpath%20d='M2%204.66675H13.3333C13.7015%204.66675%2014%204.96522%2014%205.33341V13.3334C14%2013.7016%2013.7015%2014.0001%2013.3333%2014.0001H2.66667C2.29848%2014.0001%202%2013.7016%202%2013.3334V4.66675Z'%20fill='%23FFCB2E'/%3e%3c/svg%3e",k6=Object.freeze(Object.defineProperty({__proto__:null,default:S6},Symbol.toStringTag,{value:"Module"})),A6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM8.95117%208.80469C8.95117%209.45619%208.83123%209.99047%208.58105%2010.3984L8.46582%2010.5654C8.13575%2010.9898%207.68375%2011.2012%207.12109%2011.2012C6.86476%2011.2012%206.64525%2011.1636%206.4668%2011.083L6.4082%2011.0566V10.0342L6.56641%2010.1494C6.70723%2010.2516%206.88862%2010.3066%207.11719%2010.3066C7.40052%2010.3066%207.60577%2010.1907%207.74609%209.95508C7.89129%209.7111%207.9707%209.33189%207.9707%208.80469V4.84961H8.95117V8.80469Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",B6=Object.freeze(Object.defineProperty({__proto__:null,default:A6},Symbol.toStringTag,{value:"Module"})),F6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M13%201C13.5523%201%2014%201.44772%2014%202V13H3.5C3.22386%2013%203%2013.2239%203%2013.5C3%2013.7761%203.22386%2014%203.5%2014H14C14%2014.5523%2013.5523%2015%2013%2015H4C2.89543%2015%202%2014.1046%202%2013V3C2%201.89543%202.89543%201%204%201H13ZM5.5%204C5.22386%204%205%204.22386%205%204.5C5%204.77614%205.22386%205%205.5%205H10.5C10.7761%205%2011%204.77614%2011%204.5C11%204.22386%2010.7761%204%2010.5%204H5.5Z'%20fill='%230956E4'/%3e%3c/svg%3e",$6=Object.freeze(Object.defineProperty({__proto__:null,default:F6},Symbol.toStringTag,{value:"Module"})),O6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%201.5C11.5899%201.5%2014.5%204.41015%2014.5%208C14.5%2011.5899%2011.5899%2014.5%208%2014.5C4.41015%2014.5%201.5%2011.5899%201.5%208C1.5%204.41015%204.41015%201.5%208%201.5ZM8%202.42871C4.92298%202.42871%202.42871%204.92298%202.42871%208C2.42871%2011.077%204.92298%2013.5713%208%2013.5713C11.077%2013.5713%2013.5713%2011.077%2013.5713%208C13.5713%204.92298%2011.077%202.42871%208%202.42871ZM6.19434%207.36523C6.2548%207.30503%206.3537%207.30487%206.41406%207.36523L6.68262%207.63477C6.74275%207.69515%206.74275%207.79314%206.68262%207.85352L6.30371%208.23242C5.89985%208.63677%205.89974%209.29201%206.30371%209.69629C6.70813%2010.1005%207.3642%2010.1006%207.76855%209.69629L8.14746%209.31738C8.20788%209.25744%208.30591%209.25726%208.36621%209.31738L8.63574%209.58691C8.69582%209.64722%208.69567%209.74526%208.63574%209.80566L8.25684%2010.1846C7.58294%2010.8585%206.49045%2010.8582%205.81641%2010.1846C5.14239%209.51056%205.14239%208.41815%205.81641%207.74414L6.19434%207.36523ZM8.27441%207.27246C8.33487%207.21231%208.43282%207.21214%208.49316%207.27246L8.7627%207.54199C8.82268%207.60237%208.82273%207.7004%208.7627%207.76074L7.76074%208.76172C7.70035%208.82211%207.60244%208.82201%207.54199%208.76172L7.27246%208.49316C7.21217%208.43285%207.21239%208.33487%207.27246%208.27441L8.27441%207.27246ZM7.74414%205.81543C8.41813%205.14189%209.51068%205.14173%2010.1846%205.81543C10.8584%206.48938%2010.8583%207.58286%2010.1846%208.25684L9.80566%208.63477C9.74528%208.69515%209.64736%208.69505%209.58691%208.63477L9.31738%208.36621C9.25716%208.30593%209.25744%208.20792%209.31738%208.14746L9.69629%207.76855C10.1004%207.36418%2010.1005%206.70805%209.69629%206.30371C9.29201%205.89962%208.6368%205.89978%208.23242%206.30371L7.85352%206.68262C7.79319%206.74294%207.69523%206.74271%207.63477%206.68262L7.36523%206.41309C7.30484%206.35264%207.30481%206.25476%207.36523%206.19434L7.74414%205.81543Z'%20fill='%2339B83F'/%3e%3c/svg%3e",N6=Object.freeze(Object.defineProperty({__proto__:null,default:O6},Symbol.toStringTag,{value:"Module"})),R6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957Z'%20fill='%23675FF0'/%3e%3cpath%20d='M5%206.81818C5.12597%206.81818%205.22541%206.79021%205.30497%206.73427C5.38453%206.67832%205.43757%206.6014%205.46409%206.51049C5.49061%206.41259%205.50387%206.25175%205.50387%206.02098C5.50387%205.79021%205.5105%205.63636%205.51713%205.56643C5.53039%205.44755%205.55691%205.35664%205.60331%205.28671C5.64309%205.21678%205.6895%205.16084%205.74917%205.11888C5.80884%205.07692%205.88177%205.04895%205.97459%205.02098C6.03425%205.00699%206.14033%205%206.27956%205H6.41878V5.32867H6.34586C6.17348%205.32867%206.06077%205.35664%206.00773%205.40559C5.9547%205.45454%205.92155%205.57343%205.92155%205.75525C5.92155%206.11888%205.91492%206.34266%205.89503%206.44056C5.86851%206.58741%205.81547%206.6993%205.74254%206.78322C5.66961%206.86014%205.55691%206.93706%205.41105%207C5.59006%207.06294%205.72265%207.16084%205.80221%207.29371C5.88177%207.42657%205.92155%207.63636%205.92155%207.93706C5.92155%208.2028%205.92818%208.36364%205.92818%208.41958C5.94144%208.51049%205.97459%208.58042%206.02762%208.61539C6.08066%208.65035%206.18674%208.67133%206.33923%208.67133H6.41215V9H6.27293C6.11381%209%205.99448%208.99301%205.92818%208.96503C5.8221%208.93007%205.73591%208.88112%205.66961%208.81119C5.60331%208.74126%205.55691%208.65035%205.53702%208.53846C5.51713%208.42657%205.50387%208.25175%205.50387%208C5.50387%207.74825%205.49061%207.58042%205.46409%207.48252C5.43757%207.39161%205.38453%207.30769%205.30497%207.25874C5.22541%207.2028%205.12597%207.17483%205%207.16783V6.81818ZM10.5956%206.06993H7.22099C7.04199%206.06993%206.90276%205.91608%206.90276%205.73427V5.67133C6.90276%205.48252%207.04862%205.33566%207.22099%205.33566H10.5956C10.7746%205.33566%2010.9138%205.48951%2010.9138%205.67133V5.73427C10.9138%205.91608%2010.768%206.06993%2010.5956%206.06993ZM10.5956%207.3986H7.22099C7.04199%207.3986%206.90276%207.24476%206.90276%207.06294V7C6.90276%206.81119%207.04862%206.66434%207.22099%206.66434H10.5956C10.7746%206.66434%2010.9138%206.81818%2010.9138%207V7.06294C10.9138%207.24476%2010.768%207.3986%2010.5956%207.3986ZM10.5956%208.73427H7.22099C7.04199%208.73427%206.90276%208.58042%206.90276%208.3986V8.33566C6.90276%208.14685%207.04862%208%207.22099%208H10.5956C10.7746%208%2010.9138%208.15385%2010.9138%208.33566V8.3986C10.9138%208.58042%2010.768%208.73427%2010.5956%208.73427Z'%20fill='%23675FF0'/%3e%3cpath%20d='M11.5%2010.1265H10.8525V12H10.3677V10.1265H9.72168V9.73096H11.5V10.1265Z'%20fill='%23675FF0'/%3e%3cpath%20d='M7.55811%2012V9.73096H8.3418C9.14746%209.73096%209.55029%2010.0996%209.55029%2010.8369C9.55029%2011.1875%209.4375%2011.4692%209.21191%2011.6821C8.98633%2011.894%208.69531%2012%208.33887%2012H7.55811ZM8.0415%2010.1265V11.6045H8.30518C8.53467%2011.6045%208.71484%2011.5361%208.8457%2011.3994C8.97656%2011.2627%209.04199%2011.0776%209.04199%2010.8442C9.04199%2010.6187%208.97363%2010.4429%208.83691%2010.3169C8.7002%2010.1899%208.52246%2010.1265%208.30371%2010.1265H8.0415Z'%20fill='%23675FF0'/%3e%3cpath%20d='M4.96094%2010.8955C4.96094%2010.54%205.06445%2010.251%205.27148%2010.0283C5.47949%209.80469%205.75391%209.69287%206.09473%209.69287C6.41895%209.69287%206.67969%209.80078%206.87695%2010.0166C7.0752%2010.2324%207.17432%2010.5098%207.17432%2010.8486C7.17432%2011.2021%207.07129%2011.4893%206.86523%2011.71C6.66016%2011.9297%206.39111%2012.0396%206.05811%2012.0396C5.73291%2012.0396%205.46875%2011.9331%205.26562%2011.7202C5.0625%2011.5063%204.96094%2011.2314%204.96094%2010.8955ZM5.46924%2010.8691C5.46924%2011.0898%205.52246%2011.2705%205.62891%2011.4111C5.73535%2011.5508%205.88135%2011.6206%206.06689%2011.6206C6.25635%2011.6206%206.40381%2011.5537%206.50928%2011.4199C6.61475%2011.2852%206.66748%2011.1045%206.66748%2010.8779C6.66748%2010.6416%206.61621%2010.4551%206.51367%2010.3184C6.41113%2010.1807%206.2666%2010.1118%206.08008%2010.1118C5.89062%2010.1118%205.74121%2010.1821%205.63184%2010.3228C5.52344%2010.4634%205.46924%2010.6455%205.46924%2010.8691Z'%20fill='%23675FF0'/%3e%3c/svg%3e",I6=Object.freeze(Object.defineProperty({__proto__:null,default:R6},Symbol.toStringTag,{value:"Module"})),P6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM7.71191%205.00098C7.95398%205.01182%208.23799%205.16198%208.30664%205.54688C8.40941%206.03464%208.27759%206.57316%208.17285%207.00488L8.16699%207.03027C8.37835%207.57951%208.66991%207.94773%209.11426%208.21875C10.017%208.10683%2010.5964%208.16863%2010.835%208.40332C10.9994%208.56776%2011.0484%208.87519%2010.9473%209.11914C10.8894%209.25831%2010.7357%209.48926%2010.3457%209.48926C9.95189%209.48921%209.37167%209.31384%208.8623%209.04102C8.40175%209.11875%207.8926%209.29278%207.40137%209.45898C7.2966%209.49512%207.18778%209.5311%207.08301%209.56543C6.3969%2010.7429%205.8824%2010.9998%205.56445%2011C5.48865%2011%205.4233%2010.9837%205.36914%2010.9639C5.24449%2010.9169%205.13813%2010.8189%205.07129%2010.6924C5.01181%2010.5787%204.98629%2010.4528%205.00781%2010.3535C5.1144%209.81502%205.83149%209.3878%206.36621%209.11133C6.65343%208.60533%207.04538%207.75431%207.29102%207.16895C7.09599%206.41389%206.98933%205.82132%207.1084%205.3877C7.17162%205.15099%207.42651%204.98835%207.71191%205.00098ZM6.18555%209.77441C5.99948%209.94427%205.76264%2010.1801%205.6416%2010.4023C5.74457%2010.3228%205.93444%2010.1394%206.18555%209.77441ZM7.73926%207.69629C7.60016%208.05769%207.39944%208.55181%207.15918%208.9873C7.23144%208.95839%207.30596%208.9272%207.38184%208.89648C7.69966%208.76643%208.05529%208.61975%208.44531%208.53125C8.17624%208.31804%207.93249%208.03049%207.73926%207.69629ZM9.73535%208.74707C10.3674%208.99599%2010.5185%208.91259%2010.5352%208.90234L10.5391%208.89648H10.543C10.5536%208.88933%2010.5516%208.88347%2010.5498%208.87988C10.544%208.87053%2010.4509%208.71359%209.73535%208.74707ZM7.72852%205.4834C7.67613%205.54303%207.68883%206.05251%207.77734%206.41211C7.8496%206.16635%207.86152%205.68036%207.76758%205.51953C7.75502%205.4962%207.74284%205.48532%207.72852%205.4834Z'%20fill='%23FF4D50'/%3e%3c/svg%3e",T6=Object.freeze(Object.defineProperty({__proto__:null,default:P6},Symbol.toStringTag,{value:"Module"})),M6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1777%202.67969C14.4553%202.7361%2014.6644%202.98029%2014.666%203.27441V12.667C14.6659%2012.9891%2014.4376%2013.2583%2014.1338%2013.3203L14%2013.334H2L1.86523%2013.3203C1.56164%2013.2581%201.33312%2012.989%201.33301%2012.667V3.33398C1.33301%203.01196%201.56164%202.74298%201.86523%202.68066L2%202.66699H14.0557L14.1777%202.67969ZM2.33301%2012.334H13.666V3.66699H2.33301V12.334ZM8.78125%207.39355C8.79747%207.40146%208.81204%207.41261%208.82324%207.42676L10.8545%2010.0166C10.915%2010.0939%2010.8601%2010.2078%2010.7607%2010.208H5.28613C5.26386%2010.2081%205.24156%2010.2022%205.22266%2010.1904C5.20374%2010.1786%205.18849%2010.1616%205.17871%2010.1416C5.16897%2010.1216%205.16469%2010.0993%205.16699%2010.0771C5.16933%2010.055%205.17865%2010.0341%205.19238%2010.0166L6.67676%208.12305C6.68788%208.10885%206.70253%208.09775%206.71875%208.08984C6.73488%208.08198%206.75256%208.07818%206.77051%208.07812C6.78858%208.07812%206.807%208.08193%206.82324%208.08984C6.83924%208.09768%206.85322%208.10907%206.86426%208.12305L7.47656%208.90332L8.63379%207.42676C8.64501%207.41261%208.65955%207.40145%208.67578%207.39355C8.69215%207.38564%208.71034%207.38086%208.72852%207.38086C8.74668%207.38087%208.7649%207.38565%208.78125%207.39355ZM6.35547%205.83301C6.51333%205.83301%206.66474%205.89619%206.77637%206.00781C6.888%206.11944%206.95117%206.27084%206.95117%206.42871C6.95111%206.5865%206.88794%206.73803%206.77637%206.84961C6.66476%206.9611%206.51323%207.02344%206.35547%207.02344C6.19768%207.02338%206.04615%206.96118%205.93457%206.84961C5.823%206.73803%205.7608%206.5865%205.76074%206.42871C5.76074%206.27095%205.82308%206.11942%205.93457%206.00781C6.04615%205.89624%206.19768%205.83307%206.35547%205.83301Z'%20fill='%2332A3FF'/%3e%3c/svg%3e",L6=Object.freeze(Object.defineProperty({__proto__:null,default:M6},Symbol.toStringTag,{value:"Module"})),j6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM6.1543%205.26758H8.1543C9.30194%205.26778%209.9998%206.03334%2010%207.08105C10%208.14247%209.29247%208.89045%208.15039%208.89062H6.93262V10.7275C6.93262%2010.812%206.86371%2010.8816%206.7793%2010.8818H6.1543C6.06968%2010.8818%206%2010.8122%206%2010.7275V5.41992C6.00002%205.33532%206.06969%205.2666%206.1543%205.2666V5.26758ZM6.93262%206.03906V8.12402H7.68066C8.54028%208.12402%209.0498%207.91372%209.0498%207.0791C9.04962%206.41793%208.66339%206.03914%208.01367%206.03906H6.93262Z'%20fill='%23FA8C16'/%3e%3c/svg%3e",_6=Object.freeze(Object.defineProperty({__proto__:null,default:j6},Symbol.toStringTag,{value:"Module"})),z6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.73633%201.57642C2.53848%200.774265%203.74473%200.714862%204.87207%201.03052C6.02182%201.35245%207.24885%202.09683%208.3125%203.1604C9.37624%204.22414%2010.1204%205.45195%2010.4424%206.60181C10.758%207.72909%2010.6986%208.93446%209.89648%209.73657C9.09439%2010.5387%207.88901%2010.5981%206.76172%2010.2825C5.61186%209.96051%204.38405%209.21632%203.32031%208.15259C2.25674%207.08894%201.51236%205.86191%201.19043%204.71216C0.874775%203.58481%200.934176%202.37857%201.73633%201.57642Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.76172%205.41479C7.88883%205.09929%209.09442%205.15888%209.89648%205.96069C10.6986%206.76284%2010.758%207.96909%2010.4424%209.09644C10.1204%2010.2462%209.37617%2011.4732%208.3125%2012.5369C7.24882%2013.6005%206.02187%2014.3448%204.87207%2014.6667C3.74472%2014.9824%202.53848%2014.923%201.73633%2014.1208C0.934528%2013.3188%200.874922%2012.1132%201.19043%2010.9861C1.51239%209.83623%202.25659%208.60841%203.32031%207.54468C4.38405%206.48096%205.61186%205.73675%206.76172%205.41479Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.1282%201.03052C12.2553%200.715012%2013.4609%200.774612%2014.263%201.57642C15.0651%202.37857%2015.1246%203.58481%2014.8089%204.71216C14.4869%205.86196%2013.7427%207.08892%2012.679%208.15259C11.6153%209.21627%2010.3884%209.96048%209.23859%2010.2825C8.11124%2010.5981%206.90499%2010.5387%206.10284%209.73657C5.30106%208.9345%205.24144%207.72892%205.55695%206.60181C5.8789%205.45195%206.62311%204.22414%207.68683%203.1604C8.75056%202.09668%209.97838%201.35248%2011.1282%201.03052Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M6.10284%205.96069C6.90499%205.15855%208.11124%205.09914%209.23859%205.41479C10.3883%205.73673%2011.6154%206.48111%2012.679%207.54468C13.7427%208.60841%2014.4869%209.83623%2014.8089%2010.9861C15.1245%2012.1134%2015.0651%2013.3188%2014.263%2014.1208C13.4609%2014.9229%2012.2555%2014.9823%2011.1282%2014.6667C9.97838%2014.3448%208.75055%2013.6006%207.68683%2012.5369C6.62325%2011.4732%205.87888%2010.2462%205.55695%209.09644C5.24129%207.96909%205.3007%206.76284%206.10284%205.96069Z'%20stroke='%234E6EF2'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",H6=Object.freeze(Object.defineProperty({__proto__:null,default:z6},Symbol.toStringTag,{value:"Module"})),K6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM9.91406%205.16699C10.0058%205.16721%2010.0799%205.24128%2010.0801%205.33301V5.9707C10.0801%206.06262%2010.0059%206.13748%209.91406%206.1377H8.64648C8.55457%206.1377%208.47971%206.21185%208.47949%206.30371V10.5469C8.47936%2010.6387%208.40525%2010.7127%208.31348%2010.7129H7.59375C7.50178%2010.7129%207.42689%2010.6388%207.42676%2010.5469V6.30371C7.42654%206.21185%207.35168%206.1377%207.25977%206.1377H6C5.90795%206.1377%205.83301%206.06275%205.83301%205.9707V5.33301C5.83323%205.24115%205.90809%205.16699%206%205.16699H9.91406Z'%20fill='%234089FF'/%3e%3c/svg%3e",V6=Object.freeze(Object.defineProperty({__proto__:null,default:K6},Symbol.toStringTag,{value:"Module"})),W6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.9568%201.33276C11.1238%201.33276%2011.2849%201.39651%2011.408%201.50952L12.3171%202.34644L11.6404%203.08179L10.8269%202.33374H3.66675V13.6667H12.3337V3.7146L11.6433%203.08472L11.6404%203.08276L12.3171%202.34644L13.1169%203.0769C13.2546%203.20307%2013.3336%203.38138%2013.3337%203.56812V14.0007L13.3201%2014.1345C13.2578%2014.4382%2012.9888%2014.6667%2012.6667%2014.6667H3.33374L3.19897%2014.6531C2.93875%2014.5998%202.73378%2014.3947%202.68042%2014.1345L2.66675%2014.0007V2.00073C2.66675%201.67864%202.89529%201.40965%203.19897%201.34741L3.33374%201.33276H10.9568ZM6.05542%207.31616C6.12046%207.25114%206.22568%207.25122%206.29077%207.31616L6.58081%207.6062C6.64589%207.67128%206.64588%207.77646%206.58081%207.84155L6.17358%208.24976C5.73807%208.68527%205.73807%209.39139%206.17358%209.8269C6.60912%2010.2622%207.31529%2010.2624%207.75073%209.8269L8.15796%209.4187C8.22305%209.35363%208.32921%209.35362%208.39429%209.4187L8.68433%209.70874C8.74934%209.77383%208.74937%209.88%208.68433%209.94507L8.27612%2010.3523C7.55026%2011.0782%206.37308%2011.0782%205.64722%2010.3523C4.92174%209.62652%204.92177%208.45016%205.64722%207.72437L6.05542%207.31616ZM8.29468%207.21655C8.35977%207.15147%208.46592%207.15147%208.53101%207.21655L8.82104%207.50659C8.88578%207.5716%208.88575%207.67692%208.82104%207.74194L7.74194%208.82104C7.67692%208.88583%207.57163%208.8858%207.50659%208.82104L7.21655%208.53101C7.15147%208.46592%207.15147%208.35977%207.21655%208.29468L8.29468%207.21655ZM7.72339%205.64722C8.44919%204.92141%209.62642%204.92152%2010.3523%205.64722C11.0782%206.37308%2011.0782%207.55026%2010.3523%208.27612L9.94409%208.68433C9.87904%208.74897%209.77371%208.7491%209.70874%208.68433L9.4187%208.39429C9.35361%208.3292%209.35361%208.22305%209.4187%208.15796L9.8269%207.75073C10.2623%207.31533%2010.2621%206.60913%209.8269%206.17358C9.39139%205.73807%208.68527%205.73807%208.24976%206.17358L7.84155%206.58081C7.77647%206.64589%207.67129%206.64588%207.6062%206.58081L7.31616%206.29077C7.25109%206.22568%207.25108%206.1205%207.31616%206.05542L7.72339%205.64722Z'%20fill='%231998FF'/%3e%3c/svg%3e",q6=Object.freeze(Object.defineProperty({__proto__:null,default:W6},Symbol.toStringTag,{value:"Module"})),U6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.957%201.33301C11.124%201.33307%2011.2853%201.39583%2011.4082%201.50879L12.3174%202.3457L11.6406%203.08105L10.8271%202.33301H3.66699V13.666H12.334V3.71387L11.6436%203.08398L11.6406%203.08203L12.3174%202.3457L13.1172%203.07617C13.2549%203.20229%2013.3338%203.38063%2013.334%203.56738V14L13.3203%2014.1338C13.2583%2014.4376%2012.9891%2014.6659%2012.667%2014.666H3.33398L3.19922%2014.6523C2.93884%2014.599%202.73387%2014.3942%202.68066%2014.1338L2.66699%2014V2C2.66711%201.67798%202.89556%201.40887%203.19922%201.34668L3.33398%201.33301H10.957ZM5.77832%205.83301C5.87031%205.83301%205.94933%205.8983%205.9707%205.98828L6.72852%209.2998L7.54492%205.98535C7.56627%205.89541%207.64507%205.83309%207.73535%205.83301H8.26465C8.35498%205.83305%208.43373%205.89538%208.45508%205.98535L9.27344%209.30664L10.0254%205.98828C10.0467%205.89837%2010.1259%205.83313%2010.2178%205.83301H10.8027C10.8329%205.83312%2010.8626%205.84093%2010.8896%205.85449C10.9167%205.86808%2010.9406%205.88781%2010.959%205.91211C10.9773%205.93632%2010.9901%205.96425%2010.9961%205.99414C11.0021%206.02417%2011.0008%206.05533%2010.9932%206.08496L9.77148%2010.6846C9.74853%2010.7727%209.66957%2010.8328%209.58105%2010.833H9.05859C8.96987%2010.833%208.89019%2010.7712%208.86719%2010.6846L8%207.40137L7.13281%2010.6846C7.10985%2010.7728%207.03094%2010.8328%206.94238%2010.833H6.41602C6.32739%2010.8329%206.24857%2010.7712%206.22559%2010.6846L5.00684%206.08496C4.99909%206.05533%204.99796%206.0242%205.00391%205.99414C5.00985%205.9641%205.02262%205.93543%205.04102%205.91113C5.05939%205.88697%205.08338%205.86703%205.11035%205.85352C5.13734%205.84008%205.1672%205.83306%205.19727%205.83301H5.77832Z'%20fill='%23426BFF'/%3e%3c/svg%3e",Z6=Object.freeze(Object.defineProperty({__proto__:null,default:U6},Symbol.toStringTag,{value:"Module"})),G6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.29%201.33008C11.457%201.33008%2011.6182%201.39298%2011.7412%201.50586L12.6504%202.34277L11.9736%203.07812L11.1602%202.33008H4V13.6631H12.667V3.71094L11.9766%203.08105L11.9736%203.0791L12.6504%202.34277L13.4502%203.07324C13.588%203.19942%2013.6669%203.37761%2013.667%203.56445V13.9971L13.6533%2014.1309C13.5912%2014.4347%2013.3222%2014.6631%2013%2014.6631H3.66699L3.53223%2014.6494C3.27204%2014.5959%203.06685%2014.3912%203.01367%2014.1309L3%2013.9971V1.99707C3%201.67508%203.22869%201.40611%203.53223%201.34375L3.66699%201.33008H11.29ZM7.36816%206.39941C7.65187%206.39959%207.84768%206.57468%207.95605%206.93066L7.52734%207.78809L7.31641%207.35938C7.24417%207.22007%207.15618%207.14756%207.04785%207.14746H6.19043C6.04599%207.14751%206.00977%207.21486%206.08203%207.35938L7.04199%209.38867C7.68737%208.10825%208.05967%207.27658%208.21973%206.93066C8.40557%206.5332%208.62233%206.39943%208.90625%206.39941H10.791C11.1471%206.39948%2011.2705%206.57449%2011.1621%206.93066C11.0536%207.287%2010.5013%208.46426%209.50488%2010.457C9.46874%2010.5241%209.41249%2010.5762%209.35059%2010.6123C9.1441%2010.731%208.88077%2010.6635%208.75684%2010.457L8.22461%209.28027L8.65332%208.42285L9.13379%209.43945L10.1504%207.35938C10.2175%207.21997%2010.1866%207.14746%2010.042%207.14746H8.97852L7.47656%2010.3535C7.43013%2010.5031%207.31627%2010.6168%207.17188%2010.6582C6.93438%2010.7253%206.68626%2010.591%206.61914%2010.3535C5.62275%208.28844%205.09083%207.1111%205.01855%206.82715C4.94645%206.54338%205.09114%206.39941%205.44727%206.39941H7.36816Z'%20fill='%23ED8E35'/%3e%3c/svg%3e",X6=Object.freeze(Object.defineProperty({__proto__:null,default:G6},Symbol.toStringTag,{value:"Module"})),Y6="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%202.66667C2%202.29848%202.29848%202%202.66667%202H13.3333C13.7015%202%2014%202.29848%2014%202.66667V8H2V2.66667Z'%20fill='%234DC6FF'/%3e%3cpath%20d='M2%208H14V13.3333C14%2013.7015%2013.7015%2014%2013.3333%2014H2.66667C2.29848%2014%202%2013.7015%202%2013.3333V8Z'%20fill='%234DCE84'/%3e%3crect%20x='14'%20y='6'%20width='4'%20height='12'%20transform='rotate(90%2014%206)'%20fill='%23FF5F5A'/%3e%3crect%20x='6'%20y='2'%20width='4'%20height='12'%20fill='%23FCC048'/%3e%3crect%20x='5.66667'%20y='5.66667'%20width='4.66667'%20height='4.66667'%20rx='0.666667'%20stroke='white'%20stroke-width='0.666667'/%3e%3c/svg%3e",J6=Object.freeze(Object.defineProperty({__proto__:null,default:Y6},Symbol.toStringTag,{value:"Module"})),Q6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAV9SURBVHgBvVZfb1VFEJ/ZPS2l9cpFQypSEEMhUmKiYjQBoxDjm8ZoQuKjTyZ+AV9MrOAH8MlHE99rRKOvPgCSoAkalbQx1mBLLV4vpX9u2t6es7vjzOyevZdg5Y2b7N09c3Zn5jfzm9kDcJ9/uN2LZy6c/RAMfoCASFlKcoKAREb8H0Us/G89RH2v9OHc9gYvnQusDPnHU1Ajaky9jAbjGsQhijPV+6IjaVYdcTuY7QzyaT4ouyijU5k8q5hEC1JaK2KFo/ti6Kg+GWrnoID/+yUDmM9TDUxDG50Ssf5jL+SEtQGq98E9ECZDd6IGjWVUlgxjTlKMxl1nkvG+FMhWejtQ+HgzVM1Vt0n/dNfwRneZ/u6u4HK1Dl1f8ZZwV75Xqk1YDyX8tDan2iJirJVjzkZKv0jrkE7yQ5ONggsBtkJFnXIDV7bWYbnswLovMUQnE4mSKn7eMzAiijKhqAaCRIk06YAyUA2K+GDexUh88HwwkOO5Cg6dcxAghiYRNBOVCorhTXRSttZ5jZkVZmGkGmWDyWHCwAgDk8o5z4YqKitHlavQM/raWEKpFipTwe3OCiXMiD18cVYKZw71GUw8kpA0B4bhUGOUxPhiZwlLX8JDQw/S0V378NbmKsysLmTdzjr6q3UTEqJM2x71YkhrapkzZ87kN6m+YKPqwvMPH8K3Dp7AHWDB+0BvjD2L7xx+GTrdDUFPnsPsXQUyF6yzQMOzASszD8syC7JGKgySlZnlZmpqKuJlgYzABtfLLZi5vQA7i0E4vfcYPNHYiy8+MgEXFq/B9U6LwAckz1kNknLCAUyK1Sgb0rUFMTTAT1FuUR1IISXNX2osHEv4sf0HHGjsgVfGnoIju/ZBm0P5+exl4GRq1IwxylIpZKNpjQyJvYawl03IsyxNMthrj0IOPtKttuDb+Z9huNgBR3ePwdTv38GtzTVSbYxKB0UFBcRw9oWOYphl3RsSZjMxMVFTVLwUpKBM9R72jjRz8o/tPgDkHBsKrBplsHJDMhfGyICCDIfXinFUGePnZ7QxvyhhNtPT01TnUPKh2LksmoPDcOLRCbg0/wtMt+fgpf1PwrHmfkAuF84hyYye1y6gGLIcxQFjhSg5Z2JEUEUyJdIcP3481yCm6jD88Prhkyo/f+0ifPL9F+rUu0+/BlyUXHwVUOl47blgvTLTMqKovGYsZCNMquiEdJpGo5GLRq8tdn589z4YGRyCK3PXoL22RJtlF7+ZvgyvTpyEN4+8AOdnLiKzhkPMEbYVrP45D3UtZyXx4r7j+hWyFZ1OJ3ca7jBSF/Db0hx89esFuL60KCiQ80mfXvkSPvvha2QkYG0BwTA6g4IY2SPlpehlMKJD25sYDdB3pbLJ4urVq7JYYWkzukHabYQ0xIO9AMmTvhMDhlQkiqUU2uUSaalAuhQ8xXaVvj8wrrG/tQGjfG9oeOh9fvGYZaWDpoAGk6a58wHpMjAyMKTMNZaTzmetEWoYcOTpRmsR0VGqvxxZzLdwbpqxt9e3vh0dHS3Ksiz8iLfh8WE7ePRgS4mkpR0PxOqm3AkZZfIbIzyT+mhKXuh94UB6odpgfHwcWq0WFUXh7aD1uMGcCHyefTR8ynBk5ZnvK25rJCGUZ+46rMHJHGU6BK2TNMg5VlBJCcm7gLJX3Z+dnSU26tvtNrOo8J25m1tCdzEkSrjuJI9g2Sgb4YGqUHpqMqQzK48Gs+HsAGGVnJJwQq/NxW+cMcA9p5/bkBBJ7vRa096AiXlBc8j0SV0R8ydAok6ug97HaYyp1LicksF4wJ06dcrBAnhG8REqKlQE0kmUjYy2Ro0+hlU7T5LXSKFGKmdiiIkcnQXoK9nJyUkjow9tP/I8+vboOcqEvPfvX+6cfN20TwR9AAAAAElFTkSuQmCC",e5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVNSURBVHgBvVZLbxxFEK7qmXHWiR1siwNIFnmAhDAIlERw9gFx4J57jty5IIRk5Q8AF/4Cl/wJCyRuFhJInALhsQRC/Iqza292Zrr46tHrjSVzZLS93T3TXY+vvqpuov/54fM+fPTV9A5R9TkWrAoJ6c93sDAJC7GcrhYugiSEytzE5/wAW+8mOvdJWyR5lVyZa+TnlHgTUZEiGGZdJ/Yj//Pe5/lazvJlfa4+kavmhZg34U8Oz+zHc2vdbVg0c42jdy/tH69W/sNDtTuzmsfmhRtv5uogRLvXsUby6XsJu9j2cJmfq1CyzM9ctm0PkY5TGBOj4ljRSYazGxvI+GKRO5D/xbSllfGE5GAkvPuEZPco8/iEaNpDf36eYCp9NCF61hHdf2i6Qrmb5dgXQ3lmQIkhCEIr6lSXidqOZTzpeXQi9GQMoa2bp+jynAs6v7xoH4w4M6/CHTcCPy6cI1OoIq66JbpXuIfSHvzozQDhtg8a+KaiWKSAFFg6n4071jMb3wrxzKCi0B54yEsDptUlKOqFH+6RqLdtJ5yDAFzCED5NO6G9IycTG03tG4cNbEQLoOWsQjW5Sk6otWWmFoFDXHnaRY7RLBRcAtP3LMNd85yfpwwXoRxstjf17du3TZF6gMSko3Gmtmf66XeRHtYbvJJEey4CFKrs1QXQU50iuFywDpQN7TSju+pM9+7dm5miz6TN9NdeT+OTzHDQsyBn/uCGlxmosTjrOMe4qaG0ZrG+0pZinGShJm4qogZ9jb7e2NhIGtweMeuyW5bxN7hgrDDDN9+u6M0rjHgRf/sjEE1aWMx8TsjkKkF1qk4pLMKzSJfyEN8sLQClbjRaaIBeWq3ojSsJZOjk2suJ37nu9eHGqwzPRb7/JXsNgwyEnNQbl5fmCp7XmFksw4A6sDWSwVVAkPjFy4k0z9+/2fDiwlzlx/Pu68R/7DHtPQ32scOoMBHDEK5kPi+NXBJFLojT5JynIAWSXaAgUSkAXa/eE80Xf32Ojom+3u5RgZhWLhF990MLwYkM3yK/GOl5IjPS3Lp1yxfB3sUL+qZQ6HRP1N1ZW75I9OF7iSZwZYoXhSh10jE8wLyxdyCSjgthtC0vL4unhdDJM5GDceZHhz09PMj0z5HQ0+MsJ62wZwOaCU6oPhUdI0cv9om+2cf+EiYPj0MYZJlDR+rhcKigI58yHT/LfDhu6dFhpl8f9zTcy7Q/6vmkjZNAI1RVsLYhkFIwpgnYPZmqBo1f8srpRScALSeHBZPr+/cX1KBDseINxSigLYLYou+0Za+nookPSuLgoJ4zVaAJdNLfRyw1GJZPi8nsQsLlDGX31tJiY4No/2D0yeDi4qfY8AocoEHDtDRIdBmxUrYudlAEIxJIoTLrJpHyQ4vAn487TlkPVgluBLBW4kt6zOxgBmmaneFwYbl+azB4Ya0ZpaVmIV2qF29+9jPY6/nq9ordnwwYVQyNCWyAn5QaZymnucvT7Nzlsl9KHq431/PweNSmapCrBeq7BYSHKiCYgtUeP8kclT9Kda5EEzDqBUc+u54o2XbrsNPDa2+9s7MDQF7L6+uTdnhcy9pot9+Xjtf6ZDGbFYwcSg2p5PPk156gcOTc/NWkpGI5pcLDzc31fnt7G9+Gsm/L1vGhOQQaK3qCGPtIJSc/EoNAqowC3tDjmEfyc7mu2W1PlacHCRZnKFOSoa5Qt7m5idNv2IF2H2Pdb0gCi16FspsyQM7gp1Q6VqZSjeOngrwKErQZgZBiPsb5qnXavvEBytbd4rnRdmtrK2kjv82leJ/Otrk17GyQc2/wZ59/AcalYkfFCITdAAAAAElFTkSuQmCC",t5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVbSURBVHgBvVbLblxFED3V9854bEfEeeBEJkROogjhSCDFC7Zs2LMJ66z4AhaIjZUfgB2ssgYpC8QfZEeQiJBATAIisUGJE5yH7Tjj8X10F1Xd1deTSAZWGann9vSd7lNV51RVA6/4Qwe9eHb1q8vk6HMwjuhv5vgN5xzLh+KP/zrH9oBIxyp5XDkQ8PnVL1flv4vpNOIAFnwyXCZdU5gILuuYfE5iGp59tsqDAMmHRVIAPVx2uMC6kWwt2YHOtbQeFIzzSnIOHA2O5wBzBwMG3RgUQ+1MRrJOOJo9YYyFWM3K68hoKQiByYDxL4De7OcUEk54McDp4OQdmzGIjkvYxUye2GPTiNgZznxZvr5A08yhGjPv7BC2tzk8e0bYGwNtK1jhJW5k/94euG3BD9bZFs2KzOlLHMo8e7gib+bkUMDLaD37vTFhPAaPnoObmpI+Ep/I+hMjaDAtfPsU2hQGYzCGVr8py1m3lha3RVuK8WYJp3DIdP48uTfehP/xB/i1u0miFJ2LhMWDQpD/ynDO3E5y4cR/JC9xGvnoAHOYSL0M3oN9S+Wx4wgbG8CRYwi/3VKCOLBRlzOx14Pf2rRVJTjqxdQ6AWcvXgDUiRIOFUzbsHBKNDeHsL2lYY071STLtXi4a/u8u7GeEgP7XBlgNi1JTWbu0qVLLwpBmZAQhbZRy0H9PtpHD+GbGr6tEYRP8Z5Z3nMjQ6IRjDrOjmQns4CSduLr8tq1axYM0lIim4McGAHJjXZSXCRsCgBXxDwLpsBYgdo2VRhYEiLjmc5cTAjOIXXZbw2TJbCqD0pWefoMtev30H/nItzR47LmRR+aHpT0Z2VMGNc6F2udjmBJykm6KZMtGTOH2UqVacQvT50Gzcxi9O03GFx8DzMffkTN2h/GBlG7dgfN2l3LApf42a9r5lIWTKaWyC0tLWUCk88W8d6Zc2j+WkX/rSX0FHxqSuYX0Fs8B/SnMHj/g0xNdEy/vMZYabF6mHh0MWrqtSKUw+Ewpyorf9Qr5dCzAjBAeXIBKArsfn8d/tHfKOZPYurtd8WYs6hu/QLvGxVQKliq2FS/ctpkPjvxqJDL5eXlzkMVRSFc6eYw2sH2d1+jfSJ5WFUc4/HwHo9/vilxcUlM+vSDeHBhVazrf1bBmZI1ynhALm2aCjKchCoXvt2fbsDvSllra1FiRVnzTpM/isDFc4q6ws7Gr9G79A9rRlkbmGBV3pTj8dgSRfBDUlJ15zZqSeaYi5L8UgCsBzIpF6RgUQMO1NbUShF3ia1c9KjzzoqANTkqMRzqqy2pLnPt8y20Tx9Loj8QMOEmpBEkHbTkWStQWHNF8vXxBnMTdMWqTcjSs/LHXYeKiX9BVDp6+vTT6Znpz+Tk09FIKcSFiIZnDsV8pEEdi3THjXiWCrfn3fv3ietghuz3Be6yVDeF/U4ladFfLp/05o8enl4Y9acHZZjqzQS33NDtmORWf50y47p2HrXhjDOHNC+cGhJMN9bQ9oUa5+UFs2lvd8RuULRNqMj5vguNT+0oNSGEeLuw61pXqLW4cO4PEla2/3Pu7d1FhNMNA+Wj4TC8fupU6M3O1huHGf09ucxhU94cQlSiAVpAKDdDuzCkQmlXOGf1xPrOxLb9C2N5XSYfnzjRrq+vE540tWQhtl7zLsyGbTngsBQDFFaw7dwkIOMz3ZQSAJunE0BmGMhiu+pWVlbC5s2b4cHCQnNj/nE1PT9f/R42KxHnJ1T7Pwtpi6g8ObnWQNRIIhBqZMSnnN+KqhrPQX6LWqHPUMm8TiOoglVUTdiUcQWcm6k8pTcWOkwDuZO4l4cYOfk+U/u/Pv8AUhuD27A+V7IAAAAASUVORK5CYII=",r5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAfnSURBVHgB7VhdbFxHFT5n5t7d63XWJnYc167Jj5u2wklDGlciVCJsKUKRAuoLFvAQflRQUQNURZWQ4KHNC1KQihp4QFRFiEgIlaiVEBWPlYUoVUvskASHiqaNg62k+bE39np/7r0zczgzd3e9dt24uwkv1R5rfOfOvXfm+86cv1mAtrSlLW1pS1va0paWBaF1afyWap33vvfIfZJKnwLyR0FSb+/WXT76pRmNdNLo1L9STz43CbdRsJnn1NB/puHZg4e+0DHSCY8GKA8ZjB8gfoL8MqGAzXcNA6KsT0cCzyiEY6/NnT3+0JFxBbcouN740w39navfHwPYd8fDD3ao1DHW8P0ImkEb93mdwDATEAKW6SdTkPDfQYNfxief+yfcZgK1MWTwcI6vI7kcj41Dju/Hr4KAnSPuyWO9B75FwvxcAGUIE9AWqJuAyGob+rfvABCYzIrucX0BploBKX8of/DLX8FtIuDurdZrwOdnZ+WNTMGrKIOpSIvaiz/aP/rtnjQ8aywMcOp2jXkwQ0uC//PbA8N3g+ErCh6zz1ctaIkblN/xnvjFC3CbCDjN53I58TuY9gZ3fL770OHDn2AzCKIoEqK8kElfmb47/faZHwsyG4isSjWgIat0VrZ2k4TzefAqRRjYvhVQsg8Iw5QQ1tp0AlHUOn3Af+rZv8EtEKhr39r61NiIfG3icsfxV089PLB16zZjDEIcynjm/BZz4a39VJi7V2uTMloxeLZ9wztBtm+ANO8LGci/OQ5DO+4CKTy3AwI/iIB1bjEpgvAz+NjzJWhCROONAz8G2Mems/j6ogw85bONZhgObwD/LxcCfe3KkCot3qGU9kmxtpViwDE3DiixBsMNeEzwX+SIWMew5IzbobW1yOSM2RtHmUehSakRwPrcJwD+UxjHrn6NJgo8o5TdfwKLby6fVYvXh0jIbggCpCAAzZEGDQM2muzVNsOEtIrBbooxycy0bsQm8JT6OrRIgGrT9+UAN5ZHsNhrUFN9WLP5GFq41o1LC73ZA19JdX3xG9D9yDfhY2PfBbFnP1AUIcUMOo74bcMaoWRSShzVESDhgqnBhgUbCCCoB8JjT+2CFgg0TJdzAX971IvpwO5uZMNMFJfLQItzXapczlpTXnz1Fci/8FMo/PXP0Ln700B9g2xGOgHPO4BsUmw0kCS1xPbJsamF2dVQ0MGRUNwHLRBw051zs4zDhqUIl7o0pilARWhjZ2jCElGxkIGokkoSleJKwUD89jnnvNDZxQRY+yoCo0Jw/lEFRjW0VUNFukkGjYNRaIFAPeNm70mum8Aqk9gSFOuVVRrHOqoseXGlLKxTcuyG0E9Dau8+BiQhunSBuYVsaRWI+RqFJdBW24YSwCaJUFj16Q9qHKl6oQnxap0jrMc/8joTEwCprMJilZBSRkuQYbkcqahY1NFS0YX+roe+xEnrIET5G/Dey7+B8MK7YHkmYZWRBBHk52/A1OQkBEKC+6i6F/WiotqhhkSNJvChCfFW3HFtM8o4CtsA3pg12GFfwFiB1qiEKcdKlSrlio0tMPPib6Fy7u8uZLrY70IOh1HWNCjWOvsCKG420yblkQMuquaz7OANRFwrzkATstKJTyQ309MAGZ+XynDoNMjGLkP0PN4Ub96YuGwRCQ6TIorARh6KYqI46XPwZx+osPnFDnyCrOq8BMs70OgW1WYLDc4bJ6EFAitiQn+HR+VFSVEFSbDyeSgKunsKXpC+xEvkdaFA2tp4rFwC44bWaY0No+zEdgyjuK6XhiyzjnBCE6mz0IR4qwcK2UYyZdBCOwIy5UfYvfG/nhdc/PfPfrLFD8sZDhkubFq7J6NcCQH2deu4ouaZrCN28pWxE9cErxHP7H3p5CloQlaUElPVFZYupqiUnyctORmHoSPgbegs+4P3zIqg46yvy9c5axlnPsq2yPmCbXYn7A4YDqm1KjpJWtWq9WZizDFoUsTqgfFxcIlscNgzMvbU+dNTJYhLzro7hu6c97LZKTJiOg6VotDafcjArekkTdtIxGMCjauHkgVMdfa1izlw1PD8n/Ibj0OTUj+8WN08U61E86OjIpWdk68XRPpSYWHD58a+NrCwWPEkxbLTUKq/cGVkKF46iqQ7XdGfOB9IexawDmuM2wGfE10ak/PMGrqqAnerV3w/tW/Xi2+ehhYJ1PpocwGbEg6OAl4aGPArlzv8q6aUwpLvi7QRNrn53A4O93+1B81Ri2v5JEbuGCltY/CWkO2/f6ll8CLh9vgnXzrV0qlMrh6wh0XeBXj3Xr7ObqHunsh0dvXoXl/EPYRx50YR3dfphfMlf3Kgi64FUuz3kYMsI/FY1Z4DzZWlO5Mlu5Ngfz8B5lZk1z285+XTz0OLctMj5eM5wGwB8OrmHU5Rb92oiKEhTrJlXf/uTuzbzch/zwXbcK1ormnWxvXqSbMhklIyLnASQnxizysTTZ/CGkWuRSDH1z6+/mUaIM87Qfl5WCzOU//SEMHmNM2GkjZRiq6VBJyX+nIm9H6d9uVF/nqbBOx3SQmXCdQmtiW2EfQPrrCOzmyS3//sHybegVuUm/0qUS/waj+nWN9wP01UxXbHq1eo9g9m99zvS72TrWrUKP1x9oNYo7wuJU3w2fiN3ScmmkpUrRBYMU7Vm6dh3SNVXY4sf1r/HtZNAq3JhwX1ocGvkv8L6La0pS1taUtbPjLyPy268QDdSiqgAAAAAElFTkSuQmCC",n5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAATKSURBVHgBvVZLbxxFEK7qmXViW7acYA6WIsHBUiRLnCzuBq5cfedXcEHCPC7cOPET4JYfgbghTAQHC4EvCBwrD7/iXXsz092VevXMrGUnOWWk3pme6a6vvqqvqhfgLV9404ePfzz6KgN+GRCRiAY7kICIf4D4k73jObwWSczkb25c+NFPJ1kMidFMahEVzAEE0D3GGSdeQUKucOMXNzDDTt75XAx3xjswoQHXsns9YPF+cC+sZoz43dYQYMAZSN0zCPkrAa9zoAMfMJ1x4AanBynQzZ9xnr6/jLAyboieTBI+Gmd6zPfnU4IpZzPnWWEI3vOG4KIF+ONZIqDeXsnpdQ7Uft/h9SuyJ2aAhgEmLzKDZTjhcdkSJjAjnKc+tDxfnQ9FpTTwxtLpTqA7KA+1e/W+82flZsw5q1ooE6SUMTGBDIbUKRJVkWCBFGuhxNkE5KDlndqGHtCuTKqyHiiTjsjPto1EF+qxc0ps4WLMcbe5lqYuUUoFvEAOANGtcS4lYXBvuablOcBxG6CN7IBr5HgS4Z+jBsq+NAI6fnomZJDUyjC2AD0hQ6i3t7cByiKlx6DM8P67I3xn8TZcvf5+8gL++mVqomBTKXEoc+7k6BS7UFiJlrBbdGoOc8sYdMFqORq3+OisgYOTBp5NIt27M4effnAHHjw8oYcHF+rYySR78SHdXajwwe/HpSbVCQmSMbNUK/6VkEpqrYuQMW2bCOfjKTbz5t/ltMHTs0ugEHhJRRCC5lzZ5IRB3mcoTJ0vWUYH5VoAxTdTH+9imfKIUKVIyMZkYUg8z5ESb1HXlYbRCaSCA0ukdzsglxiUUtF99cbGhs9dxhKCnLggI4TYMtDIosXvQttgqthk0KOCkdDzXihk9juIK4heMKiRE2DzpN7b2/N0lO5QjGQNVakjrhFWCDOnhCmwUUxiGygilI5dsSfUdRgqpWFtXb1ArDc3NzvG/l33iFJTTGzfQirNIMbEcBFzhRorwopozmtOmOVSclA6nYoGrQ/wmwz10tJSJ1s9a3mTGOd0QW4j5JTtK99T02KsghBHSw6DzxGc/fuYbVfFBuTuaPQm0Zck1efn5yUE0tfsOZMykpb2658H8PNv/xNnFBLWmGJEqiRbQZOXYsA0nYImlN+pbrQIgpVEd0CiiWZ3d1dmpzxWuvNUQ2gNgDucMJWMQQ7MHBKIX9xxdfHT4wvi3mddJthhaHVo3LzQurarpwWz/HxhYfELfvtezT+36gCLtypYnh9BbkZwe8TtTfwNNbTIW6pac9Qmov8Ojhg9qk3u++CNxsgNjsDS09FBKx96IN9fXcXTD787q1iCtfoup0XFgkGMWUIb/OBAOyXUZgAp/uyc0LREs4AZleH6+jrs7+/T2toap47dZGWKMpIcSh4cDiVGCpoR8nBqyeuz5Y7PFehThl78vYAK3cJO3WRQPDw8hLuf/DCpgme0dBUJmwfGXA/OUubhyknhM8K+2/CknPjZw5kFTPlLaVB/pnrdaseQErH/pCIiyZuEOBljz1NXj11PNcQg57oDJimsra0tuSfMzbeRu4uWh3YcNp5abrFROlA3RMrcHHjwnxsfvA7IBxcv2rMcqunrIX/c2dkJMpxtr4YrY7DG5P4m/7z9egkURHiCa3UU2QAAAABJRU5ErkJggg==",o5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAVZSURBVHgBvVbNbhxFEK7qmdm1ndhZm40D5M9STCL5BFiIq+EJuPiAxIGn4IKE+XkAngIE8gPkCDxAIKDIUsBEjmMR23H8u/aud7urqKrumd1FdsIpu+rtmZ7p+urnq68X4BV/8LwHH373/EsC/MIhIjMP7EAGZvkBlkdxTe7hpUhqhr4+98UPvt8jNaRGic0iGlgCUMDkMQ458YIg9OPOfZIMDEWna+leDVfGKzANA86M7uWApfcDcxnVkJE0x3cY0OEQpO0ZSPkLAc9yoAIfiHTIgXOcHiiBbf5U6vRt20Oj1WXePg74T4t4S+bDDkNHqkk0TAzFO+wynPQAft8JDNy3V9b0LAfyNC/J+w3d4wmgKwDHpyRgBHsy2j3GANGI1KmfWrlvjrqSpTzgTSxncgKTg3qRJ69mUvzCXEIiMrYwMYRAGCQAgohUMRKNkRATqdZcmedIoARarplt6APGD7GxrA9EbMPLddzGygvzOMUUxMJJS/Ie76017RULqQQvIQcA9T4XJy/UUJgkEQmQ9wHuTGWYYQ6/PT3ldo+Mc+/fGMHdE8K/dk4hFMC7zw40GGSzMpjblDeACtEtLi6aMxp5ngFMjWUwmkmzS1oFFD555xJ8/PYE3GpkEHoB3rzoUNfeu1qDIA5JBiQzOgROhwZGEO/VMKn3OlizA255eblKgg/Rt4kRByRpvHEpckoju/1aYQ5cHc/spfsbJ3IvZfYeXQSJqUve2zUhOyUaa+yskgX53Nyc9qLUirEj9BwpnKTVmedzr0vqjr1Qn2D2ch2p5+HqRHTiz81TZqkzkBSAAjqnc9V4qf04BjPQri5yhVH1sic90ekGGB/JQOt3bbKAJ7un8HCzDdcna1DPkW9fqdt9q91DATSCOY4pNIT0tUhjGuM3goDr3ryJxkphqGSI2xJlITW81ihgeryA++stuPf3kXn31lSO1yfrsP78NBqjmD9ITBRDmGhuDaExOa2W9pS2ifJk9e5djg0oGQoB9zoeJi8WMDs9aiAPN1q81+pZPj56t2lrvz464tCV2im55JGjaD2TXuRKYbhsjSjrbMcZag2T7KqDIKkKSh68dWUUNnY6sL1zjMc95pWNI5y5fMFMPXh8IMYVQSjhXdyt9KCy5aBUOtMHjDpglM2np6cpiYwxtedFP0Ugp8ZrAtjWWjJ1Az5YO4S5a+Owsn4E1JWwMqcsRO46OHi8JbuzqvOpOhqTSPRbkvPt7W091AFL2ZXHv/yxBY82TwxQmInSIvzDT+vw48/rxsbcwBxjpu3j0bc72tJixLEJgCmA4xgZQ7/xAfOVlRV9dV9QG5omTZAzt8jyIlQU/ZJQtLlNsShGozmStWd7Xorvo8o4V7ZiWbxS6CvZzefn57nVan1W1Mc+zzO8WRN9G6vnMDFWwOSFYHQfqwVQUXApDUWWgdhWAeGNp/ty4c2m6D5g4oMFN3AElpqOScCzZvNOrTsyU4SiXtBEIx97Y+EJKb0xHRJKgJiuUoftgIg/cWi6KcWEUb95GJDQZGN2dhZWV/dpamrf48UmB96U1HvEakfU9xAiE2xBLyiTNwJaflH7OkC/ZHa0IAwQCFJ0vLq6yjMzM2Ft7QibLueDlg+Npre0WUeVwBj1uGSYCGhSLe1tN3RSlOdV+h/HZW+WJz6tra3p7Hd2dJqXDg4qGEYSVHm2A9WxPBD+METttONRn8scIIocV62AfeDyzNVuNcklOaaCAi4sLAgD7nlH3W8oeDt6ZEZVBQ491DURayhnea4SJUP+3KRBMjgNCF2M115P9a+gahIZS0tLTkfFgrju/jsG3ol0/z//vNPnXykvrFYTHUlOAAAAAElFTkSuQmCC",a5=Object.assign({}),i5=Object.assign({}),l5=Object.assign({"./rag/csv.svg":C6,"./rag/document.svg":y6,"./rag/excel.svg":w6,"./rag/file.svg":E6,"./rag/folder.svg":k6,"./rag/json.svg":B6,"./rag/knowledgebase.svg":$6,"./rag/netretrive.svg":N6,"./rag/odf.svg":I6,"./rag/pdf.svg":T6,"./rag/pic.svg":L6,"./rag/ppt.svg":_6,"./rag/think.svg":H6,"./rag/txt.svg":V6,"./rag/url.svg":q6,"./rag/word.svg":Z6,"./rag/wps.svg":X6,"./rag/zip.svg":J6}),s5=Object.assign({"./assets/img/excel.png":Q6,"./assets/img/img.png":e5,"./assets/img/pdf.png":t5,"./assets/img/ppt.png":r5,"./assets/img/txt.png":n5,"./assets/img/word.png":o5}),u5=Object.assign({"./rag/csv.svg":s2,"./rag/document.svg":u2,"./rag/excel.svg":c2,"./rag/file.svg":d2,"./rag/folder.svg":f2,"./rag/json.svg":p2,"./rag/knowledgebase.svg":g2,"./rag/netretrive.svg":h2,"./rag/odf.svg":m2,"./rag/pdf.svg":v2,"./rag/pic.svg":C2,"./rag/ppt.svg":b2,"./rag/think.svg":y2,"./rag/txt.svg":x2,"./rag/url.svg":w2,"./rag/word.svg":D2,"./rag/wps.svg":E2,"./rag/zip.svg":S2});function B2(e,t,r){let n=e;for(let o=0;o<t.length-1;o+=1){const a=t[o];(!n[a]||typeof n[a]!="object")&&(n[a]={}),n=n[a]}n[t[t.length-1]]=r}function lu(e,t){return e.replace(/^\.\//,"").split("?")[0].replace(new RegExp(`\\.${t}$`,"i"),"").split("/")}const ni={};function su(e){Object.entries(e).forEach(([t,r])=>{let n;const o=r;if(o&&typeof o.ReactComponent=="function")n=o.ReactComponent;else if(o&&typeof o.default=="function")n=o.default;else return;const a=Go(n),l=lu(t,"svg");a.displayName=`Icon(${l.join("/")})`,B2(ni,l,a)})}su(a5);su(i5);su(l5);Object.entries(s5).forEach(([e,t])=>{const r=Go(o=>Gn("img",{src:t,alt:"",...o})),n=lu(e,"png");r.displayName=`IconImg(${n.join("/")})`,B2(ni,n,r)});Object.entries(u5).forEach(([e,t])=>{const r=lu(e,"svg");let n=ni;for(let l=0;l<r.length;l+=1){const i=r[l];n[i]||(n[i]={}),n=n[i]}if(typeof n=="function")return;const o=Go(l=>Gn("img",{src:t,alt:"",...l}));o.displayName=`IconSvgUrl(${r.join("/")})`;let a=ni;for(let l=0;l<r.length-1;l+=1){const i=r[l];(!a[i]||typeof a[i]!="object")&&(a[i]={}),a=a[i]}a[r[r.length-1]]=o});var dr={},c5=Object.defineProperty,d5=(e,t,r)=>t in e?c5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,St=(e,t,r)=>d5(e,typeof t!="symbol"?t+"":t,r),pa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pc={exports:{}},xo={};/**
90
+ * @license React
91
+ * react-jsx-runtime.production.min.js
92
+ *
93
+ * Copyright (c) Facebook, Inc. and its affiliates.
94
+ *
95
+ * This source code is licensed under the MIT license found in the
96
+ * LICENSE file in the root directory of this source tree.
97
+ */var Tc;function f5(){if(Tc)return xo;Tc=1;var e=Ce,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(i,u,s){var c,p={},d=null,g=null;s!==void 0&&(d=""+s),u.key!==void 0&&(d=""+u.key),u.ref!==void 0&&(g=u.ref);for(c in u)n.call(u,c)&&!a.hasOwnProperty(c)&&(p[c]=u[c]);if(i&&i.defaultProps)for(c in u=i.defaultProps,u)p[c]===void 0&&(p[c]=u[c]);return{$$typeof:t,type:i,key:d,ref:g,props:p,_owner:o.current}}return xo.Fragment=r,xo.jsx=l,xo.jsxs=l,xo}var Mc;function p5(){return Mc||(Mc=1,Pc.exports=f5()),Pc.exports}var j=p5();/*!
98
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
99
+ *
100
+ * Copyright (c) 2014-2017, Jon Schlinkert.
101
+ * Released under the MIT License.
102
+ */function Lc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xt(e){var t,r;return Lc(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Lc(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var F2=Symbol.for("immer-nothing"),jc=Symbol.for("immer-draftable"),fr=Symbol.for("immer-state");function wr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function Bn(e){return!!e&&!!e[fr]}function Fn(e){var t;return e?$2(e)||Array.isArray(e)||!!e[jc]||!!((t=e.constructor)!=null&&t[jc])||na(e)||Oi(e):!1}var g5=Object.prototype.constructor.toString(),_c=new WeakMap;function $2(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=_c.get(r);return n===void 0&&(n=Function.toString.call(r),_c.set(r,n)),n===g5}function oi(e,t,r=!0){$i(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,o)=>t(o,n,e))}function $i(e){const t=e[fr];return t?t.type_:Array.isArray(e)?1:na(e)?2:Oi(e)?3:0}function is(e,t){return $i(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function O2(e,t,r){const n=$i(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function h5(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function na(e){return e instanceof Map}function Oi(e){return e instanceof Set}function vn(e){return e.copy_||e.base_}function ls(e,t){if(na(e))return new Map(e);if(Oi(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=$2(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[fr];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const l=o[a],i=n[l];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[l]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[l]})}return Object.create(jo(e),n)}else{const n=jo(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function uu(e,t=!1){return Ni(e)||Bn(e)||!Fn(e)||($i(e)>1&&Object.defineProperties(e,{set:ga,add:ga,clear:ga,delete:ga}),Object.freeze(e),t&&Object.values(e).forEach(r=>uu(r,!0))),e}function m5(){wr(2)}var ga={value:m5};function Ni(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var v5={};function $n(e){const t=v5[e];return t||wr(0,e),t}var _o;function N2(){return _o}function C5(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function zc(e,t){t&&($n("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ss(e){us(e),e.drafts_.forEach(b5),e.drafts_=null}function us(e){e===_o&&(_o=e.parent_)}function Hc(e){return _o=C5(_o,e)}function b5(e){const t=e[fr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Kc(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[fr].modified_&&(ss(t),wr(4)),Fn(e)&&(e=ai(t,e),t.parent_||ii(t,e)),t.patches_&&$n("Patches").generateReplacementPatches_(r[fr].base_,e,t.patches_,t.inversePatches_)):e=ai(t,r,[]),ss(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==F2?e:void 0}function ai(e,t,r){if(Ni(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[fr];if(!o)return oi(t,(a,l)=>Vc(e,o,t,a,l,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return ii(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const a=o.copy_;let l=a,i=!1;o.type_===3&&(l=new Set(a),a.clear(),i=!0),oi(l,(u,s)=>Vc(e,o,a,u,s,r,i),n),ii(e,a,!1),r&&e.patches_&&$n("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Vc(e,t,r,n,o,a,l){if(o==null||typeof o!="object"&&!l)return;const i=Ni(o);if(!(i&&!l)){if(Bn(o)){const u=a&&t&&t.type_!==3&&!is(t.assigned_,n)?a.concat(n):void 0,s=ai(e,o,u);if(O2(r,n,s),Bn(s))e.canAutoFreeze_=!1;else return}else l&&r.add(o);if(Fn(o)&&!i){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&i)return;ai(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(na(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&ii(e,o)}}}function ii(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&uu(t,r)}function y5(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:N2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=cu;r&&(o=[n],a=zo);const{revoke:l,proxy:i}=Proxy.revocable(o,a);return n.draft_=i,n.revoke_=l,i}var cu={get(e,t){if(t===fr)return e;const r=vn(e);if(!is(r,t))return x5(e,r,t);const n=r[t];return e.finalized_||!Fn(n)?n:n===rl(e.base_,t)?(nl(e),e.copy_[t]=ds(n,e)):n},has(e,t){return t in vn(e)},ownKeys(e){return Reflect.ownKeys(vn(e))},set(e,t,r){const n=R2(vn(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=rl(vn(e),t),a=o==null?void 0:o[fr];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(h5(r,o)&&(r!==void 0||is(e.base_,t)))return!0;nl(e),cs(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return rl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,nl(e),cs(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=vn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){wr(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){wr(12)}},zo={};oi(cu,(e,t)=>{zo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});zo.deleteProperty=function(e,t){return zo.set.call(this,e,t,void 0)};zo.set=function(e,t,r){return cu.set.call(this,e[0],t,r,e[0])};function rl(e,t){const r=e[fr];return(r?vn(r):e)[t]}function x5(e,t,r){var o;const n=R2(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function R2(e,t){if(!(t in e))return;let r=jo(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=jo(r)}}function cs(e){e.modified_||(e.modified_=!0,e.parent_&&cs(e.parent_))}function nl(e){e.copy_||(e.copy_=ls(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var w5=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const l=this;return function(i=a,...u){return l.produce(i,s=>r.call(this,s,...u))}}typeof r!="function"&&wr(6),n!==void 0&&typeof n!="function"&&wr(7);let o;if(Fn(t)){const a=Hc(this),l=ds(t,void 0);let i=!0;try{o=r(l),i=!1}finally{i?ss(a):us(a)}return zc(a,n),Kc(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===F2&&(o=void 0),this.autoFreeze_&&uu(o,!0),n){const a=[],l=[];$n("Patches").generateReplacementPatches_(t,o,a,l),n(a,l)}return o}else wr(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...l)=>this.produceWithPatches(a,i=>t(i,...l));let n,o;return[this.produce(t,r,(a,l)=>{n=a,o=l}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Fn(e)||wr(8),Bn(e)&&(e=D5(e));const t=Hc(this),r=ds(e,void 0);return r[fr].isManual_=!0,us(t),r}finishDraft(e,t){const r=e&&e[fr];(!r||!r.isManual_)&&wr(9);const{scope_:n}=r;return zc(n,t),Kc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=$n("Patches").applyPatches_;return Bn(e)?n(e,t):this.produce(e,o=>n(o,t))}};function ds(e,t){const r=na(e)?$n("MapSet").proxyMap_(e,t):Oi(e)?$n("MapSet").proxySet_(e,t):y5(e,t);return(t?t.scope_:N2()).drafts_.push(r),r}function D5(e){return Bn(e)||wr(10,e),I2(e)}function I2(e){if(!Fn(e)||Ni(e))return e;const t=e[fr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ls(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ls(e,!0);return oi(r,(o,a)=>{O2(r,o,I2(a))},n),t&&(t.finalized_=!1),r}var Ho=new w5,du=Ho.produce,Wc=Ho.createDraft.bind(Ho),qc=Ho.finishDraft.bind(Ho),E5={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=H.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},S5={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=st.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},k5={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=ae.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},li=new WeakMap,si=new WeakMap,Oo=new WeakMap,P2=new WeakMap,Uc=new WeakMap,Zc=new WeakMap,Gc=new WeakMap,H={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=H.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],a=t[n];if(o!==a)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],l=t[r];return H.equals(n,o)&&a>l},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return H.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],l=t[r];return H.equals(n,o)&&a<l},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return H.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&H.compare(e,t)===0},isBefore(e,t){return H.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&H.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&H.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&H.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&H.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],a=t[t.length-1];return o!==a&&H.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!H.isAncestor(t,e)&&!H.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:a}=t;(H.equals(a,n)||H.endsBefore(a,n)||H.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:l}=t;if(H.equals(l,n)||H.isAncestor(l,n))return null;H.endsBefore(l,n)&&(n[l.length-1]-=1);break}case"merge_node":{var{path:i,position:u}=t;H.equals(i,n)||H.endsBefore(i,n)?n[i.length-1]-=1:H.isAncestor(i,n)&&(n[i.length-1]-=1,n[i.length]+=u);break}case"split_node":{var{path:s,position:c}=t;if(H.equals(s,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else H.endsBefore(s,n)?n[s.length-1]+=1:H.isAncestor(s,n)&&e[s.length]>=c&&(n[s.length-1]+=1,n[s.length]-=c);break}case"move_node":{var{path:p,newPath:d}=t;if(H.equals(p,d))return n;if(H.isAncestor(p,n)||H.equals(p,n)){var g=d.slice();return H.endsBefore(p,d)&&p.length<d.length&&(g[p.length-1]-=1),g.concat(n.slice(p.length))}else H.isSibling(p,d)&&(H.isAncestor(d,n)||H.equals(d,n))?H.endsBefore(p,n)?n[p.length-1]-=1:n[p.length-1]+=1:H.endsBefore(d,n)||H.equals(d,n)||H.isAncestor(d,n)?(H.endsBefore(p,n)&&(n[p.length-1]-=1),n[d.length-1]+=1):H.endsBefore(p,n)&&(H.equals(d,n)&&(n[d.length-1]+=1),n[p.length-1]-=1);break}}return n}};function Ko(e){"@babel/helpers - typeof";return Ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ko(e)}function A5(e,t){if(Ko(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ko(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B5(e){var t=A5(e,"string");return Ko(t)==="symbol"?t:String(t)}function or(e,t,r){return t=B5(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xc(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var F5=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Be.parent(e,n),l=n[n.length-1];if(l>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(l,0,o),t)for(var[i,u]of ae.points(t))t[u]=st.transform(i,r);break}case"insert_text":{var{path:s,offset:c,text:p}=r;if(p.length===0)break;var d=Be.leaf(e,s),g=d.text.slice(0,c),h=d.text.slice(c);if(d.text=g+p+h,t)for(var[v,f]of ae.points(t))t[f]=st.transform(v,r);break}case"merge_node":{var{path:b}=r,x=Be.get(e,b),C=H.previous(b),y=Be.get(e,C),w=Be.parent(e,b),A=b[b.length-1];if(Le.isText(x)&&Le.isText(y))y.text+=x.text;else if(!Le.isText(x)&&!Le.isText(y))y.children.push(...x.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Ht.stringify(x)," ").concat(Ht.stringify(y)));if(w.children.splice(A,1),t)for(var[k,F]of ae.points(t))t[F]=st.transform(k,r);break}case"move_node":{var{path:D,newPath:I}=r;if(H.isAncestor(D,I))throw new Error("Cannot move a path [".concat(D,"] to new path [").concat(I,"] because the destination is inside itself."));var $=Be.get(e,D),M=Be.parent(e,D),P=D[D.length-1];M.children.splice(P,1);var S=H.transform(D,r),B=Be.get(e,H.parent(S)),N=S[S.length-1];if(B.children.splice(N,0,$),t)for(var[R,L]of ae.points(t))t[L]=st.transform(R,r);break}case"remove_node":{var{path:O}=r,V=O[O.length-1],_=Be.parent(e,O);if(_.children.splice(V,1),t)for(var[K,q]of ae.points(t)){var Q=st.transform(K,r);if(t!=null&&Q!=null)t[q]=Q;else{var se=void 0,T=void 0;for(var[Z,W]of Be.texts(e))if(H.compare(W,O)===-1)se=[Z,W];else{T=[Z,W];break}var z=!1;se&&T&&(H.equals(T[1],O)?z=!H.hasPrevious(T[1]):z=H.common(se[1],O).length<H.common(T[1],O).length),se&&!z?(K.path=se[1],K.offset=se[0].text.length):T?(K.path=T[1],K.offset=0):t=null}}break}case"remove_text":{var{path:G,offset:Y,text:J}=r;if(J.length===0)break;var oe=Be.leaf(e,G),re=oe.text.slice(0,Y),ne=oe.text.slice(Y+J.length);if(oe.text=re+ne,t)for(var[ue,ce]of ae.points(t))t[ce]=st.transform(ue,r);break}case"set_node":{var{path:xe,properties:Te,newProperties:Fe}=r;if(xe.length===0)throw new Error("Cannot set properties on the root node!");var ge=Be.get(e,xe);for(var ye in Fe){if(ye==="children"||ye==="text")throw new Error('Cannot set the "'.concat(ye,'" property of nodes!'));var Ee=Fe[ye];Ee==null?delete ge[ye]:ge[ye]=Ee}for(var Ve in Te)Fe.hasOwnProperty(Ve)||delete ge[Ve];break}case"set_selection":{var{newProperties:Ne}=r;if(Ne==null)t=Ne;else{if(t==null){if(!ae.isRange(Ne))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ht.stringify(Ne)," when there is no current selection."));t=wo({},Ne)}for(var Ie in Ne){var tt=Ne[Ie];if(tt==null){if(Ie==="anchor"||Ie==="focus")throw new Error('Cannot remove the "'.concat(Ie,'" selection property'));delete t[Ie]}else t[Ie]=tt}}break}case"split_node":{var{path:Ue,position:_e,properties:Xe}=r;if(Ue.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Ue,"] because the root node cannot be split."));var Se=Be.get(e,Ue),De=Be.parent(e,Ue),Re=Ue[Ue.length-1],ze;if(Le.isText(Se)){var Ze=Se.text.slice(0,_e),qe=Se.text.slice(_e);Se.text=Ze,ze=wo(wo({},Xe),{},{text:qe})}else{var Ct=Se.children.slice(0,_e),Ye=Se.children.slice(_e);Se.children=Ct,ze=wo(wo({},Xe),{},{children:Ye})}if(De.children.splice(Re+1,0,ze),t)for(var[ut,mt]of ae.points(t))t[mt]=st.transform(ut,r);break}}return t},$5={transform(e,t){e.children=Wc(e.children);var r=e.selection&&Wc(e.selection);try{r=F5(e,r,t)}finally{e.children=qc(e.children),r?e.selection=Bn(r)?qc(r):r:e.selection=null}}},O5={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},N5={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},T2=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Xt(n)&&Xt(o)){if(!T2(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==o[a])return!1}else if(n!==o)return!1}for(var l in t)if(e[l]===void 0&&t[l]!==void 0)return!1;return!0};function R5(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Kr(e,t){if(e==null)return{};var r=R5(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var I5=["anchor","focus"];function Yc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function P5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yc(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ae={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return ae.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=ae.edges(e);return t},equals(e,t){return st.equals(e.anchor,t.anchor)&&st.equals(e.focus,t.focus)},includes(e,t){if(ae.isRange(t)){if(ae.includes(e,t.anchor)||ae.includes(e,t.focus))return!0;var[r,n]=ae.edges(e),[o,a]=ae.edges(t);return st.isBefore(r,o)&&st.isAfter(n,a)}var[l,i]=ae.edges(e),u=!1,s=!1;return st.isPoint(t)?(u=st.compare(t,l)>=0,s=st.compare(t,i)<=0):(u=H.compare(t,l.path)>=0,s=H.compare(t,i.path)<=0),u&&s},intersection(e,t){var r=Kr(e,I5),[n,o]=ae.edges(e),[a,l]=ae.edges(t),i=st.isBefore(n,a)?a:n,u=st.isBefore(o,l)?o:l;return st.isBefore(u,i)?null:P5({anchor:i,focus:u},r)},isBackward(e){var{anchor:t,focus:r}=e;return st.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return st.equals(t,r)},isExpanded(e){return!ae.isCollapsed(e)},isForward(e){return!ae.isBackward(e)},isRange(e){return Xt(e)&&st.isPoint(e.anchor)&&st.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=ae.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return du(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,l;if(o==="inward"){var i=ae.isCollapsed(n);ae.isForward(n)?(a="forward",l=i?a:"backward"):(a="backward",l=i?a:"forward")}else o==="outward"?ae.isForward(n)?(a="backward",l="forward"):(a="forward",l="backward"):(a=o,l=o);var u=st.transform(n.anchor,t,{affinity:a}),s=st.transform(n.focus,t,{affinity:l});if(!u||!s)return null;n.anchor=u,n.focus=s})}},Jc=e=>Xt(e)&&Be.isNodeList(e.children)&&!E.isEditor(e),He={isAncestor(e){return Xt(e)&&Be.isNodeList(e.children)},isElement:Jc,isElementList(e){return Array.isArray(e)&&e.every(t=>He.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Jc(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},T5=["children"],M5=["text"],Qc=new WeakMap,Be={ancestor(e,t){var r=Be.get(e,t);if(Le.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ht.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of H.ancestors(t,r)){var o=Be.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(Le.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ht.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ht.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=Be.ancestor(e,t),{children:a}=o,l=n?a.length-1:0;n?l>=0:l<a.length;){var i=Be.child(o,l),u=t.concat(l);yield[i,u],l=n?l-1:l+1}})()},common(e,t,r){var n=H.common(t,r),o=Be.get(e,n);return[o,n]},descendant(e,t){var r=Be.get(e,t);if(E.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ht.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Be.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Be.nodes(e,t))He.isElement(r)&&(yield[r,n])})()},extractProps(e){if(He.isAncestor(e)){var t=Kr(e,T5);return t}else{var t=Kr(e,M5);return t}},first(e,t){for(var r=t.slice(),n=Be.get(e,r);n&&!(Le.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(Le.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ht.stringify(e)));var r=du({children:e.children},n=>{var[o,a]=ae.edges(t),l=Be.nodes(n,{reverse:!0,pass:d=>{var[,g]=d;return!ae.includes(t,g)}});for(var[,i]of l){if(!ae.includes(t,i)){var u=Be.parent(n,i),s=i[i.length-1];u.children.splice(s,1)}if(H.equals(i,a.path)){var c=Be.leaf(n,i);c.text=c.text.slice(0,a.offset)}if(H.equals(i,o.path)){var p=Be.leaf(n,i);p.text=p.text.slice(o.offset)}}E.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Le.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ht.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(Le.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return Le.isText(e)||He.isElement(e)||E.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Qc.get(e);if(t!==void 0)return t;var r=e.every(n=>Be.isNode(n));return Qc.set(e,r),r},last(e,t){for(var r=t.slice(),n=Be.get(e,r);n&&!(Le.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=Be.get(e,t);if(!Le.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ht.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of H.levels(t,r)){var o=Be.get(e,n);yield[o,n]}})()},matches(e,t){return He.isElement(e)&&He.isElementProps(t)&&He.matches(e,t)||Le.isText(e)&&Le.isTextProps(t)&&Le.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:a}=t,l=new Set,i=[],u=e;!(a&&(n?H.isBefore(i,a):H.isAfter(i,a)));){if(l.has(u)||(yield[u,i]),!l.has(u)&&!Le.isText(u)&&u.children.length!==0&&(r==null||r([u,i])===!1)){l.add(u);var s=n?u.children.length-1:0;H.isAncestor(i,o)&&(s=o[i.length]),i=i.concat(s),u=Be.get(e,i);continue}if(i.length===0)break;if(!n){var c=H.next(i);if(Be.has(e,c)){i=c,u=Be.get(e,i);continue}}if(n&&i[i.length-1]!==0){var p=H.previous(i);i=p,u=Be.get(e,i);continue}i=H.parent(i),u=Be.get(e,i),l.add(u)}})()},parent(e,t){var r=H.parent(t),n=Be.get(e,r);if(Le.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return Le.isText(e)?e.text:e.children.map(Be.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Be.nodes(e,t))Le.isText(r)&&(yield[r,n])})()}};function e0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ko={isNodeOperation(e){return ko.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Xt(e))return!1;switch(e.type){case"insert_node":return H.isPath(e.path)&&Be.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&H.isPath(e.path);case"merge_node":return typeof e.position=="number"&&H.isPath(e.path)&&Xt(e.properties);case"move_node":return H.isPath(e.path)&&H.isPath(e.newPath);case"remove_node":return H.isPath(e.path)&&Be.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&H.isPath(e.path);case"set_node":return H.isPath(e.path)&&Xt(e.properties)&&Xt(e.newProperties);case"set_selection":return e.properties===null&&ae.isRange(e.newProperties)||e.newProperties===null&&ae.isRange(e.properties)||Xt(e.properties)&&Xt(e.newProperties);case"split_node":return H.isPath(e.path)&&typeof e.position=="number"&&Xt(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>ko.isOperation(t))},isSelectionOperation(e){return ko.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return ko.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Bt(Bt({},e),{},{type:"remove_node"});case"insert_text":return Bt(Bt({},e),{},{type:"remove_text"});case"merge_node":return Bt(Bt({},e),{},{type:"split_node",path:H.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(H.equals(t,r))return e;if(H.isSibling(r,t))return Bt(Bt({},e),{},{path:t,newPath:r});var n=H.transform(r,e),o=H.transform(H.next(r),e);return Bt(Bt({},e),{},{path:n,newPath:o})}case"remove_node":return Bt(Bt({},e),{},{type:"insert_node"});case"remove_text":return Bt(Bt({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:l}=e;return Bt(Bt({},e),{},{properties:l,newProperties:a})}case"set_selection":{var{properties:i,newProperties:u}=e;return i==null?Bt(Bt({},e),{},{properties:u,newProperties:null}):u==null?Bt(Bt({},e),{},{properties:null,newProperties:i}):Bt(Bt({},e),{},{properties:u,newProperties:i})}case"split_node":return Bt(Bt({},e),{},{type:"merge_node",path:H.next(e.path)})}}},t0=new WeakMap,L5=e=>{var t=t0.get(e);if(t!==void 0)return t;if(!Xt(e))return!1;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Xt(e.marks))&&(e.selection===null||ae.isRange(e.selection))&&Be.isNodeList(e.children)&&ko.isOperationList(e.operations);return t0.set(e,r),r},E={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor(e){return L5(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},j5={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(H.isPath)}};function r0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function n0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var st={compare(e,t){var r=H.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return st.compare(e,t)===1},isBefore(e,t){return st.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&H.equals(e.path,t.path)},isPoint(e){return Xt(e)&&typeof e.offset=="number"&&H.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return du(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:l}=n;switch(t.type){case"insert_node":case"move_node":{n.path=H.transform(a,t,r);break}case"insert_text":{H.equals(t.path,a)&&(t.offset<l||t.offset===l&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{H.equals(t.path,a)&&(n.offset+=t.position),n.path=H.transform(a,t,r);break}case"remove_text":{H.equals(t.path,a)&&t.offset<=l&&(n.offset-=Math.min(l-t.offset,t.text.length));break}case"remove_node":{if(H.equals(t.path,a)||H.isAncestor(t.path,a))return null;n.path=H.transform(a,t,r);break}case"split_node":{if(H.equals(t.path,a)){if(t.position===l&&o==null)return null;(t.position<l||t.position===l&&o==="forward")&&(n.offset-=t.position,n.path=H.transform(a,t,n0(n0({},r),{},{affinity:"forward"})))}else n.path=H.transform(a,t,r);break}}})}},o0=void 0,Ht={setScrubber(e){o0=e},stringify(e){return JSON.stringify(e,o0)}},_5=["text"],z5=["anchor","focus"];function a0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?a0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Le={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var l=Kr(a,_5);return l}return T2(n?o(e):e,n?o(t):t)},isText(e){return Xt(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>Le.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[Tr({},e)];for(var n of t){var o=Kr(n,z5),[a,l]=ae.edges(n),i=[],u=0,s=a.offset,c=l.offset;for(var p of r){var{length:d}=p.text,g=u;if(u+=d,s<=g&&u<=c){Object.assign(p,o),i.push(p);continue}if(s!==c&&(s===u||c===g)||s>u||c<g||c===g&&g!==0){i.push(p);continue}var h=p,v=void 0,f=void 0;if(c<u){var b=c-g;f=Tr(Tr({},h),{},{text:h.text.slice(b)}),h=Tr(Tr({},h),{},{text:h.text.slice(0,b)})}if(s>g){var x=s-g;v=Tr(Tr({},h),{},{text:h.text.slice(0,x)}),h=Tr(Tr({},h),{},{text:h.text.slice(x)})}Object.assign(h,o),v&&i.push(v),i.push(h),f&&i.push(f)}r=i}return r}},fu=e=>e.selection?e.selection:e.children.length>0?E.end(e,[]):[0],fo=(e,t)=>{var[r]=E.node(e,t);return n=>n===r},pu=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?U5(e):e,o=rt.None,a=rt.None,l=0,i=null,u=null;for(var s of n){var c=s.codePointAt(0);if(!c)break;var p=a8(s,c);if([o,a]=r?[a,p]:[p,o],Hn(o,rt.ZWJ)&&Hn(a,rt.ExtPict)&&(r?i=i0(e.substring(0,l)):i=i0(e.substring(0,e.length-l)),!i)||Hn(o,rt.RI)&&Hn(a,rt.RI)&&(u!==null?u=!u:r?u=!0:u=c8(e.substring(0,e.length-l)),!u)||o!==rt.None&&a!==rt.None&&l8(o,a))break;l+=s.length}return l||1},H5=/\s/,K5=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,V5=/['\u2018\u2019]/,W5=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=pu(e,t),[a,l]=gu(e,o,t);if(q5(a,l,t))n=!0,r+=o;else if(!n)r+=o;else break;e=l}return r},gu=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},q5=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(H5.test(t))return!1;if(V5.test(t)){var o=pu(r,n),[a,l]=gu(r,o,n);if(e(a,l,n))return!0}return!K5.test(t)},U5=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(G5(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(Z5(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},Z5=e=>e>=55296&&e<=56319,G5=e=>e>=56320&&e<=57343,rt;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(rt||(rt={}));var X5=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,Y5=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,J5=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Q5=/^[\u1100-\u115F\uA960-\uA97C]$/,e8=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,t8=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,r8=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,n8=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,o8=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,a8=(e,t)=>{var r=rt.Any;return e.search(X5)!==-1&&(r|=rt.Extend),t===8205&&(r|=rt.ZWJ),t>=127462&&t<=127487&&(r|=rt.RI),e.search(Y5)!==-1&&(r|=rt.Prepend),e.search(J5)!==-1&&(r|=rt.SpacingMark),e.search(Q5)!==-1&&(r|=rt.L),e.search(e8)!==-1&&(r|=rt.V),e.search(t8)!==-1&&(r|=rt.T),e.search(r8)!==-1&&(r|=rt.LV),e.search(n8)!==-1&&(r|=rt.LVT),e.search(o8)!==-1&&(r|=rt.ExtPict),r};function Hn(e,t){return(e&t)!==0}var i8=[[rt.L,rt.L|rt.V|rt.LV|rt.LVT],[rt.LV|rt.V,rt.V|rt.T],[rt.LVT|rt.T,rt.T],[rt.Any,rt.Extend|rt.ZWJ],[rt.Any,rt.SpacingMark],[rt.Prepend,rt.Any],[rt.ZWJ,rt.ExtPict],[rt.RI,rt.RI]];function l8(e,t){return i8.findIndex(r=>Hn(e,r[0])&&Hn(t,r[1]))===-1}var s8=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,i0=e=>e.search(s8)!==-1,u8=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,c8=e=>{var t=e.match(u8);if(t===null)return!1;var r=t[0].length/2;return r%2===1},d8={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=fu(e)}=r;if(H.isPath(o)&&(o=E.range(e,o)),ae.isRange(o))if(ae.isCollapsed(o))o=o.anchor;else{var a=ae.end(o);if(!n&&E.void(e,{at:a}))return;var l=ae.start(o),i=E.pointRef(e,l),u=E.pointRef(e,a);we.delete(e,{at:o,voids:n});var s=i.unref(),c=u.unref();o=s||c,we.setSelection(e,{anchor:o,focus:o})}if(!(!n&&E.void(e,{at:o})||E.elementReadOnly(e,{at:o}))){var{path:p,offset:d}=o;t.length>0&&e.apply({type:"insert_text",path:p,offset:d,text:t})}})}};function l0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ha(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var we=ha(ha(ha(ha({},$5),O5),N5),d8),Na=new WeakMap,f8=e=>Na.get(e)||!1,p8=(e,t,r)=>{var n=Na.get(e)||!1;Na.set(e,!0);try{t(),r()}finally{Na.set(e,n)}};function M2(e,t,r){var n=li.get(e)||[],o=si.get(e)||new Set,a,l,i=p=>{if(p){var d=p.join(",");l.has(d)||(l.add(d),a.push(p))}};if(r){a=[],l=new Set;for(var u of n){var s=r(u);i(s)}}else a=n,l=o;for(var c of t)i(c);li.set(e,a),si.set(e,l)}var g8=(e,t)=>{for(var r of E.pathRefs(e))E5.transform(r,t);for(var n of E.pointRefs(e))S5.transform(n,t);for(var o of E.rangeRefs(e))k5.transform(o,t);if(!f8(e)){var a=H.operationCanTransformPath(t)?l=>H.transform(l,t):void 0;M2(e,e.getDirtyPaths(t),a)}we.transform(e,t),e.operations.push(t),E.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Oo.get(e)||(Oo.set(e,!0),Promise.resolve().then(()=>{Oo.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},h8=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return H.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=H.levels(o),l=Le.isText(n)?[]:Array.from(Be.nodes(n),I=>{var[,$]=I;return o.concat($)});return[...a,...l]}case"merge_node":{var{path:i}=t,u=H.ancestors(i),s=H.previous(i);return[...u,s]}case"move_node":{var{path:c,newPath:p}=t;if(H.equals(c,p))return[];var d=[],g=[];for(var h of H.ancestors(c)){var v=H.transform(h,t);d.push(v)}for(var f of H.ancestors(p)){var b=H.transform(f,t);g.push(b)}var x=g[g.length-1],C=p[p.length-1],y=x.concat(C);return[...d,...g,y]}case"remove_node":{var{path:w}=t,A=H.ancestors(w);return[...A]}case"split_node":{var{path:k}=t,F=H.levels(k),D=H.next(k);return[...F,D]}default:return[]}},m8=e=>{var{selection:t}=e;return t?Be.fragment(e,t):[]},v8=(e,t)=>{var[r,n]=t;if(!Le.isText(r)){if(He.isElement(r)&&r.children.length===0){var o={text:""};we.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=E.isEditor(r)?!1:He.isElement(r)&&(e.isInline(r)||r.children.length===0||Le.isText(r.children[0])||e.isInline(r.children[0])),l=0,i=0;i<r.children.length;i++,l++){var u=Be.get(e,n);if(!Le.isText(u)){var s=u.children[l],c=u.children[l-1],p=i===r.children.length-1,d=Le.isText(s)||He.isElement(s)&&e.isInline(s);if(d!==a)we.removeNodes(e,{at:n.concat(l),voids:!0}),l--;else if(He.isElement(s)){if(e.isInline(s)){if(c==null||!Le.isText(c)){var g={text:""};we.insertNodes(e,g,{at:n.concat(l),voids:!0}),l++}else if(p){var h={text:""};we.insertNodes(e,h,{at:n.concat(l+1),voids:!0}),l++}}}else{if(!Le.isText(s)&&!("children"in s)){var v=s;v.children=[]}c!=null&&Le.isText(c)&&(Le.equals(s,c,{loose:!0})?(we.mergeNodes(e,{at:n.concat(l),voids:!0}),l--):c.text===""?(we.removeNodes(e,{at:n.concat(l-1),voids:!0}),l--):s.text===""&&(we.removeNodes(e,{at:n.concat(l),voids:!0}),l--))}}}}},C8=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},b8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:o=e.selection,match:a}=t;if(o){var l=E.path(e,o),i=n==="lowest";for(var[u,s]of E.levels(e,{at:l,voids:r,match:a,reverse:i}))if(!Le.isText(u)){if(ae.isRange(o)){if(H.isAncestor(s,o.anchor.path)&&H.isAncestor(s,o.focus.path))return[u,s]}else if(!H.equals(l,s))return[u,s]}}};function s0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function u0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?s0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var y8=(e,t,r)=>{var{selection:n}=e;if(n){var o=(p,d)=>{if(!Le.isText(p))return!1;var[g,h]=E.parent(e,d);return!e.isVoid(g)||e.markableVoid(g)},a=ae.isExpanded(n),l=!1;if(!a){var[i,u]=E.node(e,n);if(i&&o(i,u)){var[s]=E.parent(e,u);l=s&&e.markableVoid(s)}}if(a||l)we.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var c=u0(u0({},E.marks(e)||{}),{},{[t]:r});e.marks=c,Oo.get(e)||e.onChange()}}};function c0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function d0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var x8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=E.point(e,t,{edge:"end"}),o=E.end(e,[]),a={anchor:n,focus:o},{distance:l=1}=r,i=0,u;for(var s of E.positions(e,d0(d0({},r),{},{at:a}))){if(i>l)break;i!==0&&(u=s),i++}return u};function f0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function p0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var w8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=E.start(e,[]),o=E.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:l=1}=r,i=0,u;for(var s of E.positions(e,p0(p0({},r),{},{at:a,reverse:!0}))){if(i>l)break;i!==0&&(u=s),i++}return u},D8=(e,t)=>{var{selection:r}=e;r&&ae.isCollapsed(r)&&we.delete(e,{unit:t,reverse:!0})},E8=(e,t)=>{var{selection:r}=e;r&&ae.isCollapsed(r)&&we.delete(e,{unit:t})},S8=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&ae.isExpanded(r)&&we.delete(e,{reverse:t==="backward"})},k8=(e,t)=>[E.start(e,t),E.end(e,t)];function g0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function h0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var A8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.above(e,h0(h0({},t),{},{match:r=>He.isElement(r)&&E.isElementReadOnly(e,r)}))},B8=(e,t)=>E.point(e,t,{edge:"end"}),F8=(e,t)=>{var r=E.path(e,t,{edge:"start"});return E.node(e,r)},$8=(e,t)=>{var r=E.range(e,t);return Be.fragment(e,r)};function m0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function v0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.above(e,v0(v0({},t),{},{match:r=>He.isElement(r)&&E.isVoid(e,r)}))},N8=(e,t)=>t.children.some(r=>He.isElement(r)&&E.isBlock(e,r)),R8=(e,t)=>t.children.some(r=>Le.isText(r)||E.isInline(e,r)),I8=(e,t)=>Be.has(e,t),P8=(e,t)=>t.children.every(r=>Le.isText(r)),T8=e=>{we.splitNodes(e,{always:!0})},M8=(e,t,r)=>{we.insertNodes(e,t,r)},L8=e=>{we.splitNodes(e,{always:!0})};function C0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function j8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:o}=e;if(n){if(o){var a=j8({text:t},o);we.insertNodes(e,a,{at:r.at,voids:r.voids})}else we.insertText(e,t,r);e.marks=null}},z8=(e,t)=>!e.isInline(t),H8=(e,t,r)=>E.isStart(e,t,r)||E.isEnd(e,t,r),K8=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&Le.isText(n)&&n.text===""&&!e.isVoid(t)},V8=(e,t,r)=>{var n=E.end(e,r);return st.equals(t,n)},W8=e=>{var t=P2.get(e);return t===void 0?!0:t},q8=(e,t,r)=>{if(t.offset!==0)return!1;var n=E.start(e,r);return st.equals(t,n)},U8=(e,t)=>{var r=E.path(e,t,{edge:"end"});return E.node(e,r)},Z8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=E.path(e,t,r),o=Be.leaf(e,n);return[o,n]};function G8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:a}=t;if(a==null&&(a=()=>!0),!!r){var l=[],i=E.path(e,r);for(var[u,s]of Be.levels(e,i))if(a(u,s)&&(l.push([u,s]),!o&&He.isElement(u)&&E.isVoid(e,u)))break;n&&l.reverse(),yield*l}})()}var X8=["text"],Y8=["text"],J8=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(ae.isExpanded(r)){var a=E.isEnd(e,n,n.path);if(a){var l=E.after(e,n);l&&(n=l)}var[i]=E.nodes(e,{match:Le.isText,at:{anchor:n,focus:o}});if(i){var[u]=i,s=Kr(u,X8);return s}else return{}}var{path:c}=n,[p]=E.leaf(e,c);if(n.offset===0){var d=E.previous(e,{at:c,match:Le.isText}),g=E.above(e,{match:C=>He.isElement(C)&&E.isVoid(e,C)&&e.markableVoid(C)});if(!g){var h=E.above(e,{match:C=>He.isElement(C)&&E.isBlock(e,C)});if(d&&h){var[v,f]=d,[,b]=h;H.isAncestor(b,f)&&(p=v)}}}var x=Kr(p,Y8);return x},Q8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var l=E.after(e,a,{voids:n});if(l){var[,i]=E.last(e,[]),u=[l.path,i];if(H.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(H.isPath(a)){var[s]=E.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=E.nodes(e,{at:u,match:o,mode:r,voids:n});return c}}},eC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=E.path(e,t,r),o=Be.get(e,n);return[o,n]};function tC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:a=!1,voids:l=!1,ignoreNonSelectable:i=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!r){var s,c;if(j5.isSpan(r))s=r[0],c=r[1];else{var p=E.path(e,r,{edge:"start"}),d=E.path(e,r,{edge:"end"});s=a?d:p,c=a?p:d}var g=Be.nodes(e,{reverse:a,from:s,to:c,pass:y=>{var[w]=y;return He.isElement(w)?!!(!l&&(E.isVoid(e,w)||E.isElementReadOnly(e,w))||i&&!E.isSelectable(e,w)):!1}}),h=[],v;for(var[f,b]of g)if(!(i&&He.isElement(f)&&!E.isSelectable(e,f))){var x=v&&H.compare(b,v[1])===0;if(!(n==="highest"&&x)){if(!u(f,b)){if(o&&!x&&Le.isText(f))return;continue}if(n==="lowest"&&x){v=[f,b];continue}var C=n==="lowest"?v:[f,b];C&&(o?h.push(C):yield C),v=[f,b]}}n==="lowest"&&v&&(o?h.push(v):yield v),o&&(yield*h)}})()}var rC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=s=>li.get(s)||[],a=s=>si.get(s)||new Set,l=s=>{var c=o(s).pop(),p=c.join(",");return a(s).delete(p),c};if(E.isNormalizing(e)){if(r){var i=Array.from(Be.nodes(e),s=>{var[,c]=s;return c}),u=new Set(i.map(s=>s.join(",")));li.set(e,i),si.set(e,u)}o(e).length!==0&&E.withoutNormalizing(e,()=>{for(var s of o(e))if(Be.has(e,s)){var c=E.node(e,s),[p,d]=c;He.isElement(p)&&p.children.length===0&&e.normalizeNode(c,{operation:n})}for(var g=o(e),h=g.length,v=0;g.length!==0;){if(!e.shouldNormalize({dirtyPaths:g,iteration:v,initialDirtyPathsLength:h,operation:n}))return;var f=l(e);if(Be.has(e,f)){var b=E.node(e,f);e.normalizeNode(b,{operation:n})}v++,g=o(e)}})}},nC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=E.path(e,t,r),o=H.parent(n),a=E.node(e,o);return a},oC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=E.pathRefs(e);return i.delete(o),o.current=null,l}},a=E.pathRefs(e);return a.add(o),o},aC=e=>{var t=Uc.get(e);return t||(t=new Set,Uc.set(e,t)),t},iC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(H.isPath(t)){if(o==="start"){var[,a]=Be.first(e,t);t=a}else if(o==="end"){var[,l]=Be.last(e,t);t=l}}return ae.isRange(t)&&(o==="start"?t=ae.start(t):o==="end"?t=ae.end(t):t=H.common(t.anchor.path,t.focus.path)),st.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},lC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=E.pointRefs(e);return i.delete(o),o.current=null,l}},a=E.pointRefs(e);return a.add(o),o},sC=e=>{var t=Zc.get(e);return t||(t=new Set,Zc.set(e,t)),t},uC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(H.isPath(t)){var o;if(n==="end"){var[,a]=Be.last(e,t);o=a}else{var[,l]=Be.first(e,t);o=l}var i=Be.get(e,o);if(!Le.isText(i))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:n==="end"?i.text.length:0}}if(ae.isRange(t)){var[u,s]=ae.edges(t);return n==="start"?u:s}return t};function cC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:a=!1,ignoreNonSelectable:l=!1}=t;if(!r)return;var i=E.range(e,r),[u,s]=ae.edges(i),c=o?s:u,p=!1,d="",g=0,h=0,v=0;for(var[f,b]of E.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:l})){if(He.isElement(f)){if(!a&&(e.isVoid(f)||e.isElementReadOnly(f))){yield E.start(e,b);continue}if(e.isInline(f))continue;if(E.hasInlines(e,f)){var x=H.isAncestor(b,s.path)?s:E.end(e,b),C=H.isAncestor(b,u.path)?u:E.start(e,b);d=E.string(e,{anchor:C,focus:x},{voids:a}),p=!0}}if(Le.isText(f)){var y=H.equals(b,c.path);for(y?(h=o?c.offset:f.text.length-c.offset,v=c.offset):(h=f.text.length,v=o?h:0),(y||p||n==="offset")&&(yield{path:b,offset:v},p=!1);;){if(g===0){if(d==="")break;g=w(d,n,o),d=gu(d,g,o)[1]}if(v=o?v-g:v+g,h=h-g,h<0){g=-h;break}g=0,yield{path:b,offset:v}}}}function w(A,k,F){return k==="character"?pu(A,F):k==="word"?W5(A,F):k==="line"||k==="block"?A.length:1}})()}var dC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var l=E.before(e,a,{voids:n});if(l){var[,i]=E.first(e,[]),u=[l.path,i];if(H.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(H.isPath(a)){var[s]=E.parent(e,a);o=p=>s.children.includes(p)}else o=()=>!0;var[c]=E.nodes(e,{reverse:!0,at:u,match:o,mode:r,voids:n});return c}}},fC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:l}=o,i=E.rangeRefs(e);return i.delete(o),o.current=null,l}},a=E.rangeRefs(e);return a.add(o),o},pC=e=>{var t=Gc.get(e);return t||(t=new Set,Gc.set(e,t)),t},gC=(e,t,r)=>{if(ae.isRange(t)&&!r)return t;var n=E.start(e,t),o=E.end(e,r||t);return{anchor:n,focus:o}};function b0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mC=(e,t)=>{var{selection:r}=e;if(r){var n=(c,p)=>{if(!Le.isText(c))return!1;var[d,g]=E.parent(e,p);return!e.isVoid(d)||e.markableVoid(d)},o=ae.isExpanded(r),a=!1;if(!o){var[l,i]=E.node(e,r);if(l&&n(l,i)){var[u]=E.parent(e,i);a=u&&e.markableVoid(u)}}if(o||a)we.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var s=hC({},E.marks(e)||{});delete s[t],e.marks=s,Oo.get(e)||e.onChange()}}},vC=(e,t)=>{P2.set(e,t)},CC=(e,t)=>E.point(e,t,{edge:"start"}),bC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=E.range(e,t),[a,l]=ae.edges(o),i="";for(var[u,s]of E.nodes(e,{at:o,match:Le.isText,voids:n})){var c=u.text;H.equals(s,l.path)&&(c=c.slice(0,l.offset)),H.equals(s,a.path)&&(c=c.slice(a.offset)),i+=c}return i},yC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=ae.edges(t);if(o.offset!==0||a.offset!==0||ae.isCollapsed(t)||H.hasPrevious(a.path))return t;var l=E.above(e,{at:a,match:g=>He.isElement(g)&&E.isBlock(e,g),voids:n}),i=l?l[1]:[],u=E.start(e,o),s={anchor:u,focus:a},c=!0;for(var[p,d]of E.nodes(e,{at:s,match:Le.isText,reverse:!0,voids:n})){if(c){c=!1;continue}if(p.text!==""||H.isBefore(d,i)){a={path:d,offset:p.text.length};break}}return{anchor:o,focus:a}},xC=(e,t)=>{var r=E.isNormalizing(e);E.setNormalizing(e,!1);try{t()}finally{E.setNormalizing(e,r)}E.normalize(e)},wC=(e,t,r)=>{var[n,o]=t;return He.isElement(n)&&E.isEmpty(e,n)||Le.isText(n)&&n.text===""&&o[o.length-1]!==0},DC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:l=1,voids:i=!1}=t,{at:u=e.selection,hanging:s=!1}=t;if(u){var c=!1;if(ae.isRange(u)&&ae.isCollapsed(u)&&(c=!0,u=u.anchor),st.isPoint(u)){var p=E.void(e,{at:u,mode:"highest"});if(!i&&p){var[,d]=p;u=d}else{var g={unit:a,distance:l},h=o?E.before(e,u,g)||E.start(e,[]):E.after(e,u,g)||E.end(e,[]);u={anchor:u,focus:h},s=!0}}if(H.isPath(u)){we.removeNodes(e,{at:u,voids:i});return}if(!ae.isCollapsed(u)){if(!s){var[,v]=ae.edges(u),f=E.end(e,[]);st.equals(v,f)||(u=E.unhangRange(e,u,{voids:i}))}var[b,x]=ae.edges(u),C=E.above(e,{match:oe=>He.isElement(oe)&&E.isBlock(e,oe),at:b,voids:i}),y=E.above(e,{match:oe=>He.isElement(oe)&&E.isBlock(e,oe),at:x,voids:i}),w=C&&y&&!H.equals(C[1],y[1]),A=H.equals(b.path,x.path),k=i?null:(r=E.void(e,{at:b,mode:"highest"}))!==null&&r!==void 0?r:E.elementReadOnly(e,{at:b,mode:"highest"}),F=i?null:(n=E.void(e,{at:x,mode:"highest"}))!==null&&n!==void 0?n:E.elementReadOnly(e,{at:x,mode:"highest"});if(k){var D=E.before(e,b);D&&C&&H.isAncestor(C[1],D.path)&&(b=D)}if(F){var I=E.after(e,x);I&&y&&H.isAncestor(y[1],I.path)&&(x=I)}var $=[],M;for(var P of E.nodes(e,{at:u,voids:i})){var[S,B]=P;M&&H.compare(B,M)===0||(!i&&He.isElement(S)&&(E.isVoid(e,S)||E.isElementReadOnly(e,S))||!H.isCommon(B,b.path)&&!H.isCommon(B,x.path))&&($.push(P),M=B)}var N=Array.from($,oe=>{var[,re]=oe;return E.pathRef(e,re)}),R=E.pointRef(e,b),L=E.pointRef(e,x),O="";if(!A&&!k){var V=R.current,[_]=E.leaf(e,V),{path:K}=V,{offset:q}=b,Q=_.text.slice(q);Q.length>0&&(e.apply({type:"remove_text",path:K,offset:q,text:Q}),O=Q)}if(N.reverse().map(oe=>oe.unref()).filter(oe=>oe!==null).forEach(oe=>we.removeNodes(e,{at:oe,voids:i})),!F){var se=L.current,[T]=E.leaf(e,se),{path:Z}=se,W=A?b.offset:0,z=T.text.slice(W,x.offset);z.length>0&&(e.apply({type:"remove_text",path:Z,offset:W,text:z}),O=z)}!A&&w&&L.current&&R.current&&we.mergeNodes(e,{at:L.current,hanging:!0,voids:i}),c&&o&&a==="character"&&O.length>1&&O.match(/[\u0E00-\u0E7F]+/)&&we.insertText(e,O.slice(0,O.length-l));var G=R.unref(),Y=L.unref(),J=o?G||Y:Y||G;t.at==null&&J&&we.select(e,J)}}})},EC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=fu(e),batchDirty:l=!0}=r;if(t.length){if(ae.isRange(a))if(n||(a=E.unhangRange(e,a,{voids:o})),ae.isCollapsed(a))a=a.anchor;else{var[,i]=ae.edges(a);if(!o&&E.void(e,{at:i}))return;var u=E.pointRef(e,i);we.delete(e,{at:a}),a=u.unref()}else H.isPath(a)&&(a=E.start(e,a));if(!(!o&&E.void(e,{at:a}))){var s=E.above(e,{at:a,match:Q=>He.isElement(Q)&&E.isInline(e,Q),mode:"highest",voids:o});if(s){var[,c]=s;if(E.isEnd(e,a,c)){var p=E.after(e,c);a=p}else if(E.isStart(e,a,c)){var d=E.before(e,c);a=d}}var g=E.above(e,{match:Q=>He.isElement(Q)&&E.isBlock(e,Q),at:a,voids:o}),[,h]=g,v=E.isStart(e,a,h),f=E.isEnd(e,a,h),b=v&&f,x=!v||v&&f,C=!f,[,y]=Be.first({children:t},[]),[,w]=Be.last({children:t},[]),A=[],k=Q=>{var[se,T]=Q,Z=T.length===0;return Z?!1:b?!0:!(x&&H.isAncestor(T,y)&&He.isElement(se)&&!e.isVoid(se)&&!e.isInline(se)||C&&H.isAncestor(T,w)&&He.isElement(se)&&!e.isVoid(se)&&!e.isInline(se))};for(var F of Be.nodes({children:t},{pass:k}))k(F)&&A.push(F);var D=[],I=[],$=[],M=!0,P=!1;for(var[S]of A)He.isElement(S)&&!e.isInline(S)?(M=!1,P=!0,I.push(S)):M?D.push(S):$.push(S);var[B]=E.nodes(e,{at:a,match:Q=>Le.isText(Q)||E.isInline(e,Q),mode:"highest",voids:o}),[,N]=B,R=E.isStart(e,a,N),L=E.isEnd(e,a,N),O=E.pathRef(e,f&&!$.length?H.next(h):h),V=E.pathRef(e,L?H.next(N):N);we.splitNodes(e,{at:a,match:Q=>P?He.isElement(Q)&&E.isBlock(e,Q):Le.isText(Q)||E.isInline(e,Q),mode:P?"lowest":"highest",always:P&&(!v||D.length>0)&&(!f||$.length>0),voids:o});var _=E.pathRef(e,!R||R&&L?H.next(N):N);if(we.insertNodes(e,D,{at:_.current,match:Q=>Le.isText(Q)||E.isInline(e,Q),mode:"highest",voids:o,batchDirty:l}),b&&!D.length&&I.length&&!$.length&&we.delete(e,{at:h,voids:o}),we.insertNodes(e,I,{at:O.current,match:Q=>He.isElement(Q)&&E.isBlock(e,Q),mode:"lowest",voids:o,batchDirty:l}),we.insertNodes(e,$,{at:V.current,match:Q=>Le.isText(Q)||E.isInline(e,Q),mode:"highest",voids:o,batchDirty:l}),!r.at){var K;if($.length>0&&V.current?K=H.previous(V.current):I.length>0&&O.current?K=H.previous(O.current):_.current&&(K=H.previous(_.current)),K){var q=E.end(e,K);we.select(e,q)}}_.unref(),O.unref(),V.unref()}}})},SC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")we.select(e,n.anchor);else if(r==="focus")we.select(e,n.focus);else if(r==="start"){var[o]=ae.edges(n);we.select(e,o)}else if(r==="end"){var[,a]=ae.edges(n);we.select(e,a)}}else return},kC=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},AC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:o="character",reverse:a=!1}=t,{edge:l=null}=t;if(r){l==="start"&&(l=ae.isBackward(r)?"focus":"anchor"),l==="end"&&(l=ae.isBackward(r)?"anchor":"focus");var{anchor:i,focus:u}=r,s={distance:n,unit:o,ignoreNonSelectable:!0},c={};if(l==null||l==="anchor"){var p=a?E.before(e,i,s):E.after(e,i,s);p&&(c.anchor=p)}if(l==null||l==="focus"){var d=a?E.before(e,u,s):E.after(e,u,s);d&&(c.focus=d)}we.setSelection(e,c)}},BC=(e,t)=>{var{selection:r}=e;if(t=E.range(e,t),r){we.setSelection(e,t);return}if(!ae.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Ht.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function y0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function x0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var FC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=ae.isBackward(n)?"focus":"anchor"),o==="end"&&(o=ae.isBackward(n)?"anchor":"focus");var{anchor:a,focus:l}=n,i=o==="anchor"?a:l;we.setSelection(e,{[o==="anchor"?"anchor":"focus"]:x0(x0({},i),t)})}},$C=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!st.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!st.equals(t.focus,r.focus)||a!=="anchor"&&a!=="focus"&&t[a]!==r[a])&&(n[a]=r[a],o[a]=t[a]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},OC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:l=!0}=r,{at:i,match:u,select:s}=r;if(Be.isNode(t)&&(t=[t]),t.length!==0){var[c]=t;if(i||(i=fu(e),s!==!1&&(s=!0)),s==null&&(s=!1),ae.isRange(i))if(n||(i=E.unhangRange(e,i,{voids:o})),ae.isCollapsed(i))i=i.anchor;else{var[,p]=ae.edges(i),d=E.pointRef(e,p);we.delete(e,{at:i}),i=d.unref()}if(st.isPoint(i)){u==null&&(Le.isText(c)?u=D=>Le.isText(D):e.isInline(c)?u=D=>Le.isText(D)||E.isInline(e,D):u=D=>He.isElement(D)&&E.isBlock(e,D));var[g]=E.nodes(e,{at:i.path,match:u,mode:a,voids:o});if(g){var[,h]=g,v=E.pathRef(e,h),f=E.isEnd(e,i,h);we.splitNodes(e,{at:i,match:u,mode:a,voids:o});var b=v.unref();i=f?H.next(b):b}else return}var x=H.parent(i),C=i[i.length-1];if(!(!o&&E.void(e,{at:x}))){if(l){var y=[],w=H.levels(x);p8(e,()=>{var D=function(){var $=x.concat(C);C++;var M={type:"insert_node",path:$,node:I};e.apply(M),i=H.next(i),y.push(M),Le.isText?w.push(...Array.from(Be.nodes(I),P=>{var[,S]=P;return $.concat(S)})):w.push($)};for(var I of t)D()},()=>{M2(e,w,D=>{var I=D;for(var $ of y)if(H.operationCanTransformPath($)&&(I=H.transform(I,$),!I))return null;return I})})}else for(var A of t){var k=x.concat(C);C++,e.apply({type:"insert_node",path:k,node:A}),i=H.next(i)}if(i=H.previous(i),s){var F=E.end(e,i);F&&we.select(e,F)}}}})},NC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=H.isPath(r)?fo(e,r):C=>He.isElement(C)&&E.isBlock(e,C)),!!r){var l=E.nodes(e,{at:r,match:a,mode:n,voids:o}),i=Array.from(l,C=>{var[,y]=C;return E.pathRef(e,y)});for(var u of i){var s=u.unref();if(s.length<2)throw new Error("Cannot lift node at a path [".concat(s,"] because it has a depth of less than `2`."));var c=E.node(e,H.parent(s)),[p,d]=c,g=s[s.length-1],{length:h}=p.children;if(h===1){var v=H.next(d);we.moveNodes(e,{at:s,to:v,voids:o}),we.removeNodes(e,{at:d,voids:o})}else if(g===0)we.moveNodes(e,{at:s,to:d,voids:o});else if(g===h-1){var f=H.next(d);we.moveNodes(e,{at:s,to:f,voids:o})}else{var b=H.next(s),x=H.next(d);we.splitNodes(e,{at:b,voids:o}),we.moveNodes(e,{at:s,to:x,voids:o})}}}})},RC=["text"],IC=["children"],L2=(e,t)=>{if(He.isElement(t)){var r=t;return E.isVoid(e,t)?!0:r.children.length===1?L2(e,r.children[0]):!1}else return!E.isEditor(t)},PC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:l="lowest"}=t;if(n){if(r==null)if(H.isPath(n)){var[i]=E.parent(e,n);r=D=>i.children.includes(D)}else r=D=>He.isElement(D)&&E.isBlock(e,D);if(!o&&ae.isRange(n)&&(n=E.unhangRange(e,n,{voids:a})),ae.isRange(n))if(ae.isCollapsed(n))n=n.anchor;else{var[,u]=ae.edges(n),s=E.pointRef(e,u);we.delete(e,{at:n}),n=s.unref(),t.at==null&&we.select(e,n)}var[c]=E.nodes(e,{at:n,match:r,voids:a,mode:l}),p=E.previous(e,{at:n,match:r,voids:a,mode:l});if(!(!c||!p)){var[d,g]=c,[h,v]=p;if(!(g.length===0||v.length===0)){var f=H.next(v),b=H.common(g,v),x=H.isSibling(g,v),C=Array.from(E.levels(e,{at:g}),D=>{var[I]=D;return I}).slice(b.length).slice(0,-1),y=E.above(e,{at:g,mode:"highest",match:D=>C.includes(D)&&L2(e,D)}),w=y&&E.pathRef(e,y[1]),A,k;if(Le.isText(d)&&Le.isText(h)){var F=Kr(d,RC);k=h.text.length,A=F}else if(He.isElement(d)&&He.isElement(h)){var F=Kr(d,IC);k=h.children.length,A=F}else throw new Error("Cannot merge the node at path [".concat(g,"] with the previous sibling because it is not the same kind: ").concat(Ht.stringify(d)," ").concat(Ht.stringify(h)));x||we.moveNodes(e,{at:g,to:f,voids:a}),w&&we.removeNodes(e,{at:w.current,voids:a}),E.shouldMergeNodesRemovePrevNode(e,p,c)?we.removeNodes(e,{at:v,voids:a}):e.apply({type:"merge_node",path:f,position:k,properties:A}),w&&w.unref()}}}})},TC=(e,t)=>{E.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:l}=t;if(n){l==null&&(l=H.isPath(n)?fo(e,n):g=>He.isElement(g)&&E.isBlock(e,g));var i=E.pathRef(e,r),u=E.nodes(e,{at:n,match:l,mode:o,voids:a}),s=Array.from(u,g=>{var[,h]=g;return E.pathRef(e,h)});for(var c of s){var p=c.unref(),d=i.current;p.length!==0&&e.apply({type:"move_node",path:p,newPath:d}),i.current&&H.isSibling(d,p)&&H.isAfter(d,p)&&(i.current=H.next(i.current))}i.unref()}})},MC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:l}=t;if(a){l==null&&(l=H.isPath(a)?fo(e,a):d=>He.isElement(d)&&E.isBlock(e,d)),!r&&ae.isRange(a)&&(a=E.unhangRange(e,a,{voids:n}));var i=E.nodes(e,{at:a,match:l,mode:o,voids:n}),u=Array.from(i,d=>{var[,g]=d;return E.pathRef(e,g)});for(var s of u){var c=s.unref();if(c){var[p]=E.node(e,c);e.apply({type:"remove_node",path:c,node:p})}}}})},LC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:l}=r,{hanging:i=!1,mode:u="lowest",split:s=!1,voids:c=!1}=r;if(o){if(n==null&&(n=H.isPath(o)?fo(e,o):k=>He.isElement(k)&&E.isBlock(e,k)),!i&&ae.isRange(o)&&(o=E.unhangRange(e,o,{voids:c})),s&&ae.isRange(o)){if(ae.isCollapsed(o)&&E.leaf(e,o.anchor)[0].text.length>0)return;var p=E.rangeRef(e,o,{affinity:"inward"}),[d,g]=ae.edges(o),h=u==="lowest"?"lowest":"highest",v=E.isEnd(e,g,g.path);we.splitNodes(e,{at:g,match:n,mode:h,voids:c,always:!v});var f=E.isStart(e,d,d.path);we.splitNodes(e,{at:d,match:n,mode:h,voids:c,always:!f}),o=p.unref(),r.at==null&&we.select(e,o)}a||(a=(k,F)=>k!==F);for(var[b,x]of E.nodes(e,{at:o,match:n,mode:u,voids:c})){var C={},y={};if(x.length!==0){var w=!1;for(var A in t)A==="children"||A==="text"||a(t[A],b[A])&&(w=!0,b.hasOwnProperty(A)&&(C[A]=b[A]),l?t[A]!=null&&(y[A]=l(b[A],t[A])):t[A]!=null&&(y[A]=t[A]));w&&e.apply({type:"set_node",path:x,properties:C,newProperties:y})}}}})},jC=(e,t)=>{if(ae.isCollapsed(t))return t.anchor;var[,r]=ae.edges(t),n=E.pointRef(e,r);return we.delete(e,{at:t}),n.unref()},_C=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:l=0,always:i=!1}=t;if(o==null&&(o=L=>He.isElement(L)&&E.isBlock(e,L)),ae.isRange(a)&&(a=jC(e,a)),H.isPath(a)){var u=a,s=E.point(e,u),[c]=E.parent(e,u);o=L=>L===c,l=s.path.length-u.length+1,a=s,i=!0}if(a){var p=E.pointRef(e,a,{affinity:"backward"}),d;try{var[g]=E.nodes(e,{at:a,match:o,mode:r,voids:n});if(!g)return;var h=E.void(e,{at:a,mode:"highest"}),v=0;if(!n&&h){var[f,b]=h;if(He.isElement(f)&&e.isInline(f)){var x=E.after(e,b);if(!x){var C={text:""},y=H.next(b);we.insertNodes(e,C,{at:y,voids:n}),x=E.point(e,y)}a=x,i=!0}var w=a.path.length-b.length;l=w+1,i=!0}d=E.pointRef(e,a);var A=a.path.length-l,[,k]=g,F=a.path.slice(0,A),D=l===0?a.offset:a.path[A]+v;for(var[I,$]of E.levels(e,{at:F,reverse:!0,voids:n})){var M=!1;if($.length<k.length||$.length===0||!n&&He.isElement(I)&&E.isVoid(e,I))break;var P=p.current,S=E.isEnd(e,P,$);if(i||!p||!E.isEdge(e,P,$)){M=!0;var B=Be.extractProps(I);e.apply({type:"split_node",path:$,position:D,properties:B})}D=$[$.length-1]+(M||S?1:0)}if(t.at==null){var N=d.current||E.end(e,[]);we.select(e,N)}}finally{var R;p.unref(),(R=d)===null||R===void 0||R.unref()}}})},zC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var o of t)n[o]=null;we.setNodes(e,n,r)},HC=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:l}=t;if(a){l==null&&(l=H.isPath(a)?fo(e,a):d=>He.isElement(d)&&E.isBlock(e,d)),H.isPath(a)&&(a=E.range(e,a));var i=ae.isRange(a)?E.rangeRef(e,a):null,u=E.nodes(e,{at:a,match:l,mode:r,voids:o}),s=Array.from(u,d=>{var[,g]=d;return E.pathRef(e,g)}).reverse(),c=function(){var d=p.unref(),[g]=E.node(e,d),h=E.range(e,d);n&&i&&(h=ae.intersection(i.current,h)),we.liftNodes(e,{at:h,match:v=>He.isAncestor(g)&&g.children.includes(v),voids:o})};for(var p of s)c();i&&i.unref()}})};function w0(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function D0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w0(Object(r),!0).forEach(function(n){or(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var KC=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:l,at:i=e.selection}=r;if(i){if(l==null&&(H.isPath(i)?l=fo(e,i):e.isInline(t)?l=h=>He.isElement(h)&&E.isInline(e,h)||Le.isText(h):l=h=>He.isElement(h)&&E.isBlock(e,h)),o&&ae.isRange(i)){var[u,s]=ae.edges(i),c=E.rangeRef(e,i,{affinity:"inward"});we.splitNodes(e,{at:s,match:l,voids:a}),we.splitNodes(e,{at:u,match:l,voids:a}),i=c.unref(),r.at==null&&we.select(e,i)}var p=Array.from(E.nodes(e,{at:i,match:e.isInline(t)?h=>He.isElement(h)&&E.isBlock(e,h):h=>E.isEditor(h),mode:"lowest",voids:a})),d=function(){var h=ae.isRange(i)?ae.intersection(i,E.range(e,g)):i;if(!h)return 0;var v=Array.from(E.nodes(e,{at:h,match:l,mode:n,voids:a}));if(v.length>0){var[f]=v,b=v[v.length-1],[,x]=f,[,C]=b;if(x.length===0&&C.length===0)return 0;var y=H.equals(x,C)?H.parent(x):H.common(x,C),w=E.range(e,x,C),A=E.node(e,y),[k]=A,F=y.length+1,D=H.next(C.slice(0,F)),I=D0(D0({},t),{},{children:[]});we.insertNodes(e,I,{at:D,voids:a}),we.moveNodes(e,{at:w,match:$=>He.isAncestor(k)&&k.children.includes($),to:D.concat(0),voids:a})}};for(var[,g]of p)d()}})},VC=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g8(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y8(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D8(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E8(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S8(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m8(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T8(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L8(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return EC(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M8(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _8(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v8(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mC(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h8(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C8(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b8(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x8(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w8(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return SC(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return DC(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kC(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k8(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A8(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B8(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F8(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $8(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return J8(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N8(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return R8(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I8(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P8(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return OC(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return z8(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H8(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return K8(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return V8(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return W8(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return q8(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return U8(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Z8(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return G8(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return NC(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return PC(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return AC(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return TC(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Q8(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return eC(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tC(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rC(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nC(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return iC(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oC(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return aC(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uC(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lC(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sC(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cC(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dC(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gC(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fC(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pC(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return MC(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return BC(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return LC(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vC(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return FC(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $C(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _C(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return CC(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bC(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yC(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zC(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return HC(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O8(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xC(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return KC(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wC(e,...r)}};return e},ol,E0;function WC(){if(E0)return ol;E0=1,ol=o;var e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",t="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",r=new RegExp("^[^"+t+"]*["+e+"]"),n=new RegExp("^[^"+e+"]*["+t+"]");function o(a){return a=String(a||""),r.test(a)?"rtl":n.test(a)?"ltr":"neutral"}return ol}var qC=WC();const j2=Fi(qC);var al,S0;function hu(){if(S0)return al;S0=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return al=e,al}var il,k0;function UC(){if(k0)return il;k0=1;var e=typeof pa=="object"&&pa&&pa.Object===Object&&pa;return il=e,il}var ll,A0;function _2(){if(A0)return ll;A0=1;var e=UC(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return ll=r,ll}var sl,B0;function ZC(){if(B0)return sl;B0=1;var e=_2(),t=function(){return e.Date.now()};return sl=t,sl}var ul,F0;function GC(){if(F0)return ul;F0=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return ul=t,ul}var cl,$0;function XC(){if($0)return cl;$0=1;var e=GC(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return cl=r,cl}var dl,O0;function z2(){if(O0)return dl;O0=1;var e=_2(),t=e.Symbol;return dl=t,dl}var fl,N0;function YC(){if(N0)return fl;N0=1;var e=z2(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(l){var i=r.call(l,o),u=l[o];try{l[o]=void 0;var s=!0}catch{}var c=n.call(l);return s&&(i?l[o]=u:delete l[o]),c}return fl=a,fl}var pl,R0;function JC(){if(R0)return pl;R0=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return pl=r,pl}var gl,I0;function QC(){if(I0)return gl;I0=1;var e=z2(),t=YC(),r=JC(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function l(i){return i==null?i===void 0?o:n:a&&a in Object(i)?t(i):r(i)}return gl=l,gl}var hl,P0;function e7(){if(P0)return hl;P0=1;function e(t){return t!=null&&typeof t=="object"}return hl=e,hl}var ml,T0;function t7(){if(T0)return ml;T0=1;var e=QC(),t=e7(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return ml=n,ml}var vl,M0;function r7(){if(M0)return vl;M0=1;var e=XC(),t=hu(),r=t7(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,i=parseInt;function u(s){if(typeof s=="number")return s;if(r(s))return n;if(t(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=t(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=e(s);var p=a.test(s);return p||l.test(s)?i(s.slice(2),p?2:8):o.test(s)?n:+s}return vl=u,vl}var Cl,L0;function H2(){if(L0)return Cl;L0=1;var e=hu(),t=ZC(),r=r7(),n="Expected a function",o=Math.max,a=Math.min;function l(i,u,s){var c,p,d,g,h,v,f=0,b=!1,x=!1,C=!0;if(typeof i!="function")throw new TypeError(n);u=r(u)||0,e(s)&&(b=!!s.leading,x="maxWait"in s,d=x?o(r(s.maxWait)||0,u):d,C="trailing"in s?!!s.trailing:C);function y(P){var S=c,B=p;return c=p=void 0,f=P,g=i.apply(B,S),g}function w(P){return f=P,h=setTimeout(F,u),b?y(P):g}function A(P){var S=P-v,B=P-f,N=u-S;return x?a(N,d-B):N}function k(P){var S=P-v,B=P-f;return v===void 0||S>=u||S<0||x&&B>=d}function F(){var P=t();if(k(P))return D(P);h=setTimeout(F,A(P))}function D(P){return h=void 0,C&&c?y(P):(c=p=void 0,g)}function I(){h!==void 0&&clearTimeout(h),f=0,c=v=p=h=void 0}function $(){return h===void 0?g:D(t())}function M(){var P=t(),S=k(P);if(c=arguments,p=this,v=P,S){if(h===void 0)return w(v);if(x)return clearTimeout(h),h=setTimeout(F,u),y(v)}return h===void 0&&(h=setTimeout(F,u)),g}return M.cancel=I,M.flush=$,M}return Cl=l,Cl}var n7=H2();const o7=Fi(n7);var bl,j0;function a7(){if(j0)return bl;j0=1;var e=H2(),t=hu(),r="Expected a function";function n(o,a,l){var i=!0,u=!0;if(typeof o!="function")throw new TypeError(r);return t(l)&&(i="leading"in l?!!l.leading:i,u="trailing"in l?!!l.trailing:u),e(o,a,{leading:i,maxWait:a,trailing:u})}return bl=n,bl}var i7=a7();const l7=Fi(i7),_0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,z0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",ma=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return z0(r.overflowY,t)||z0(r.overflowX,t)||(n=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},va=(e,t,r,n,o,a,l,i)=>a<e&&l>t||a>e&&l<t?0:a<=e&&i<=r||l>=t&&i>=r?a-e-n:l>t&&i<r||a<e&&i>r?l-t+o:0,s7=e=>e.parentElement??(e.getRootNode().host||null),H0=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:l,block:i,inline:u,boundary:s,skipOverflowHiddenElements:c}=t,p=typeof s=="function"?s:N=>N!==s;if(!_0(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,g=[];let h=e;for(;_0(h)&&p(h);){if(h=s7(h),h===d){g.push(h);break}h!=null&&h===document.body&&ma(h)&&!ma(document.documentElement)||h!=null&&ma(h,c)&&g.push(h)}const v=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,f=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:b,scrollY:x}=window,{height:C,width:y,top:w,right:A,bottom:k,left:F}=e.getBoundingClientRect(),{top:D,right:I,bottom:$,left:M}=(N=>{const R=window.getComputedStyle(N);return{top:parseFloat(R.scrollMarginTop)||0,right:parseFloat(R.scrollMarginRight)||0,bottom:parseFloat(R.scrollMarginBottom)||0,left:parseFloat(R.scrollMarginLeft)||0}})(e);let P=i==="start"||i==="nearest"?w-D:i==="end"?k+$:w+C/2-D+$,S=u==="center"?F+y/2-M+I:u==="end"?A+I:F-M;const B=[];for(let N=0;N<g.length;N++){const R=g[N],{height:L,width:O,top:V,right:_,bottom:K,left:q}=R.getBoundingClientRect();if(l==="if-needed"&&w>=0&&F>=0&&k<=f&&A<=v&&(R===d&&!ma(R)||w>=V&&k<=K&&F>=q&&A<=_))return B;const Q=getComputedStyle(R),se=parseInt(Q.borderLeftWidth,10),T=parseInt(Q.borderTopWidth,10),Z=parseInt(Q.borderRightWidth,10),W=parseInt(Q.borderBottomWidth,10);let z=0,G=0;const Y="offsetWidth"in R?R.offsetWidth-R.clientWidth-se-Z:0,J="offsetHeight"in R?R.offsetHeight-R.clientHeight-T-W:0,oe="offsetWidth"in R?R.offsetWidth===0?0:O/R.offsetWidth:0,re="offsetHeight"in R?R.offsetHeight===0?0:L/R.offsetHeight:0;if(d===R)z=i==="start"?P:i==="end"?P-f:i==="nearest"?va(x,x+f,f,T,W,x+P,x+P+C,C):P-f/2,G=u==="start"?S:u==="center"?S-v/2:u==="end"?S-v:va(b,b+v,v,se,Z,b+S,b+S+y,y),z=Math.max(0,z+x),G=Math.max(0,G+b);else{z=i==="start"?P-V-T:i==="end"?P-K+W+J:i==="nearest"?va(V,K,L,T,W+J,P,P+C,C):P-(V+L/2)+J/2,G=u==="start"?S-q-se:u==="center"?S-(q+O/2)+Y/2:u==="end"?S-_+Z+Y:va(q,_,O,se,Z+Y,S,S+y,y);const{scrollLeft:ne,scrollTop:ue}=R;z=re===0?0:Math.max(0,Math.min(ue+z/re,R.scrollHeight-L/re+J)),G=oe===0?0:Math.max(0,Math.min(ne+G/oe,R.scrollWidth-O/oe+Y)),P+=ue-z,S+=ne-G}B.push({el:R,top:z,left:G})}return B},u7=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function c7(e,t){if(!e.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(e))return;const r=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(H0(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:l}of H0(e,u7(t))){const i=a-r.top+r.bottom,u=l-r.left+r.right;o.scroll({top:i,left:u,behavior:n})}}var xn=[],d7=function(){return xn.some(function(e){return e.activeTargets.length>0})},f7=function(){return xn.some(function(e){return e.skippedTargets.length>0})},K0="ResizeObserver loop completed with undelivered notifications.",p7=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:K0}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=K0),window.dispatchEvent(e)},Vo;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Vo||(Vo={}));var wn=function(e){return Object.freeze(e)},g7=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,wn(this)}return e})(),K2=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,wn(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,l=t.bottom,i=t.left,u=t.width,s=t.height;return{x:r,y:n,top:o,right:a,bottom:l,left:i,width:u,height:s}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),mu=function(e){return e instanceof SVGElement&&"getBBox"in e},V2=function(e){if(mu(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,l=o.offsetHeight;return!(a||l||e.getClientRects().length)},V0=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},h7=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},No=typeof window<"u"?window:{},Ca=new WeakMap,W0=/auto|scroll/,m7=/^tb|vertical/,v7=/msie|trident/i.test(No.navigator&&No.navigator.userAgent),Ar=function(e){return parseFloat(e||"0")},Un=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new g7((r?t:e)||0,(r?e:t)||0)},q0=wn({devicePixelContentBoxSize:Un(),borderBoxSize:Un(),contentBoxSize:Un(),contentRect:new K2(0,0,0,0)}),W2=function(e,t){if(t===void 0&&(t=!1),Ca.has(e)&&!t)return Ca.get(e);if(V2(e))return Ca.set(e,q0),q0;var r=getComputedStyle(e),n=mu(e)&&e.ownerSVGElement&&e.getBBox(),o=!v7&&r.boxSizing==="border-box",a=m7.test(r.writingMode||""),l=!n&&W0.test(r.overflowY||""),i=!n&&W0.test(r.overflowX||""),u=n?0:Ar(r.paddingTop),s=n?0:Ar(r.paddingRight),c=n?0:Ar(r.paddingBottom),p=n?0:Ar(r.paddingLeft),d=n?0:Ar(r.borderTopWidth),g=n?0:Ar(r.borderRightWidth),h=n?0:Ar(r.borderBottomWidth),v=n?0:Ar(r.borderLeftWidth),f=p+s,b=u+c,x=v+g,C=d+h,y=i?e.offsetHeight-C-e.clientHeight:0,w=l?e.offsetWidth-x-e.clientWidth:0,A=o?f+x:0,k=o?b+C:0,F=n?n.width:Ar(r.width)-A-w,D=n?n.height:Ar(r.height)-k-y,I=F+f+w+x,$=D+b+y+C,M=wn({devicePixelContentBoxSize:Un(Math.round(F*devicePixelRatio),Math.round(D*devicePixelRatio),a),borderBoxSize:Un(I,$,a),contentBoxSize:Un(F,D,a),contentRect:new K2(p,u,F,D)});return Ca.set(e,M),M},q2=function(e,t,r){var n=W2(e,r),o=n.borderBoxSize,a=n.contentBoxSize,l=n.devicePixelContentBoxSize;switch(t){case Vo.DEVICE_PIXEL_CONTENT_BOX:return l;case Vo.BORDER_BOX:return o;default:return a}},C7=(function(){function e(t){var r=W2(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=wn([r.borderBoxSize]),this.contentBoxSize=wn([r.contentBoxSize]),this.devicePixelContentBoxSize=wn([r.devicePixelContentBoxSize])}return e})(),U2=function(e){if(V2(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},b7=function(){var e=1/0,t=[];xn.forEach(function(a){if(a.activeTargets.length!==0){var l=[];a.activeTargets.forEach(function(i){var u=new C7(i.target),s=U2(i.target);l.push(u),i.lastReportedSize=q2(i.target,i.observedBox),s<e&&(e=s)}),t.push(function(){a.callback.call(a.observer,l,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},U0=function(e){xn.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(U2(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},y7=function(){var e=0;for(U0(e);d7();)e=b7(),U0(e);return f7()&&p7(),e>0},yl,Z2=[],x7=function(){return Z2.splice(0).forEach(function(e){return e()})},w7=function(e){if(!yl){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return x7()}).observe(r,n),yl=function(){r.textContent="".concat(t?t--:t++)}}Z2.push(e),yl()},D7=function(e){w7(function(){requestAnimationFrame(e)})},Ra=0,E7=function(){return!!Ra},S7=250,k7={attributes:!0,characterData:!0,childList:!0,subtree:!0},Z0=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],G0=function(e){return e===void 0&&(e=0),Date.now()+e},xl=!1,A7=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=S7),!xl){xl=!0;var n=G0(t);D7(function(){var o=!1;try{o=y7()}finally{if(xl=!1,t=n-G0(),!E7())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,k7)};document.body?r():No.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Z0.forEach(function(r){return No.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Z0.forEach(function(r){return No.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),fs=new A7,X0=function(e){!Ra&&e>0&&fs.start(),Ra+=e,!Ra&&fs.stop()},B7=function(e){return!mu(e)&&!h7(e)&&getComputedStyle(e).display==="inline"},F7=(function(){function e(t,r){this.target=t,this.observedBox=r||Vo.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=q2(this.target,this.observedBox,!0);return B7(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),$7=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),ba=new WeakMap,Y0=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},ya=(function(){function e(){}return e.connect=function(t,r){var n=new $7(t,r);ba.set(t,n)},e.observe=function(t,r,n){var o=ba.get(t),a=o.observationTargets.length===0;Y0(o.observationTargets,r)<0&&(a&&xn.push(o),o.observationTargets.push(new F7(r,n&&n.box)),X0(1),fs.schedule())},e.unobserve=function(t,r){var n=ba.get(t),o=Y0(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&xn.splice(xn.indexOf(n),1),n.observationTargets.splice(o,1),X0(-1))},e.disconnect=function(t){var r=this,n=ba.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),O7=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ya.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!V0(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ya.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!V0(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ya.unobserve(this,t)},e.prototype.disconnect=function(){ya.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),xr={},J0;function N7(){if(J0)return xr;J0=1,Object.defineProperty(xr,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)n["f"+o]=111+o;function a(d,g,h){g&&!("byKey"in g)&&(h=g,g=null),Array.isArray(d)||(d=[d]);var v=d.map(function(x){return u(x,g)}),f=function(x){return v.some(function(C){return s(C,x)})},b=h==null?f:f(h);return b}function l(d,g){return a(d,g)}function i(d,g){return a(d,{byKey:!0},g)}function u(d,g){var h=g&&g.byKey,v={};d=d.replace("++","+add");var f=d.split("+"),b=f.length;for(var x in t)v[t[x]]=!1;var C=!0,y=!1,w=void 0;try{for(var A=f[Symbol.iterator](),k;!(C=(k=A.next()).done);C=!0){var F=k.value,D=F.endsWith("?")&&F.length>1;D&&(F=F.slice(0,-1));var I=p(F),$=t[I];if(F.length>1&&!$&&!r[F]&&!n[I])throw new TypeError('Unknown modifier: "'+F+'"');(b===1||!$)&&(h?v.key=I:v.which=c(F)),$&&(v[$]=D?null:!0)}}catch(M){y=!0,w=M}finally{try{!C&&A.return&&A.return()}finally{if(y)throw w}}return v}function s(d,g){for(var h in d){var v=d[h],f=void 0;if(v!=null&&(h==="key"&&g.key!=null?f=g.key.toLowerCase():h==="which"?f=v===91&&g.which===93?91:g.which:f=g[h],!(f==null&&v===!1)&&f!==v))return!1}return!0}function c(d){d=p(d);var g=n[d]||d.toUpperCase().charCodeAt(0);return g}function p(d){return d=d.toLowerCase(),d=r[d]||d,d}return xr.default=a,xr.isHotkey=a,xr.isCodeHotkey=l,xr.isKeyHotkey=i,xr.parseHotkey=u,xr.compareHotkey=s,xr.toKeyCode=c,xr.toKeyName=p,xr}var wl=N7();function R7(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Jn(e,t){if(e==null)return{};var r=R7(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Wo(e){"@babel/helpers - typeof";return Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wo(e)}function I7(e,t){if(Wo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Wo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function P7(e){var t=I7(e,"string");return Wo(t)==="symbol"?t:String(t)}function br(e,t,r){return t=P7(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var vu=Rr(null),dn=()=>{var e=Vr(vu);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},Dl,El,G2=parseInt(Ce.version.split(".")[0],10),X2=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Q0=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),rr=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Kn=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Cn=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),T7=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Y2=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),M7=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),L7=rr&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),j7=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),_7=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),z7=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Ia=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(Dl=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Dl!==void 0&&Dl[1]&&parseInt((El=navigator.userAgent.match(/Version\/(\d+)/))===null||El===void 0?void 0:El[1],10)<17;var Yr=(!M7||!L7)&&!T7&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Zn=new WeakMap,Cu=new WeakMap,bu=new WeakMap,J2=new WeakMap,Pa=new WeakMap,ps=new WeakMap,qo=new WeakMap,Dn=new WeakMap,ui=new WeakMap,Ri=new WeakMap,gs=new WeakMap,on=new WeakMap,bn=new WeakMap,Ro=new WeakMap,hs=new WeakMap,yu=new WeakMap,Dr=new WeakMap,jr=new WeakMap,lr=new WeakMap,tn=new WeakMap,rn=new WeakMap,Q2=new WeakMap,Qn=Symbol("placeholder"),e1=Symbol("mark-placeholder"),t1=globalThis.Node,H7=globalThis.Text,xu=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,K7=e=>un(e)&&e.nodeType===8,vr=e=>un(e)&&e.nodeType===1,un=e=>{var t=xu(e);return!!t&&e instanceof t.Node},ms=e=>{var t=e&&e.anchorNode&&xu(e.anchorNode);return!!t&&e instanceof t.Selection},r1=e=>un(e)&&e.nodeType===3,V7=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,W7=e=>{var[t,r]=e;if(vr(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=n1(t,o,n?"backward":"forward"),n=o<r;vr(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=U7(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},q7=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},n1=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,l=!1,i=!1;(K7(o)||vr(o)&&o.childNodes.length===0||vr(o)&&o.getAttribute("contenteditable")==="false")&&!(l&&i);){if(a>=n.length){l=!0,a=t-1,r="backward";continue}if(a<0){i=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},U7=(e,t,r)=>{var[n]=n1(e,t,r);return n},o1=e=>{var t="";if(r1(e)&&e.nodeValue)return e.nodeValue;if(vr(e)){for(var r of Array.from(e.childNodes))t+=o1(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
103
+ `)}return t},Z7=/data-slate-fragment="(.+?)"/m,G7=e=>{var t=e.getData("text/html"),[,r]=t.match(Z7)||[];return r},Io=e=>e.getSelection!=null?e.getSelection():document.getSelection(),wu=(e,t,r)=>{var{target:n}=t;if(vr(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=fe.getWindow(e);if(o.contains(n))return fe.hasDOMNode(e,n,{editable:!0});var a=r.find(l=>{var{addedNodes:i,removedNodes:u}=l;for(var s of i)if(s===n||s.contains(n))return!0;for(var c of u)if(c===n||c.contains(n))return!0});return!a||a===t?!1:wu(e,a,r)},X7=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},ed=(e,t)=>!!(e.compareDocumentPosition(t)&t1.DOCUMENT_POSITION_PRECEDING),Y7=(e,t)=>!!(e.compareDocumentPosition(t)&t1.DOCUMENT_POSITION_FOLLOWING),J7=0;class Q7{constructor(){br(this,"id",void 0),this.id="".concat(J7++)}}var fe={androidPendingDiffs:e=>lr.get(e),androidScheduleFlush:e=>{var t;(t=yu.get(e))===null||t===void 0||t()},blur:e=>{var t=fe.toDOMNode(e,e),r=fe.findDocumentOrShadowRoot(e);on.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=fe.findDocumentOrShadowRoot(e),n=Io(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&we.deselect(e)},findDocumentOrShadowRoot:e=>{var t=fe.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var a=fe.toSlateNode(e,t.target),l=fe.findPath(e,a);if(He.isElement(a)&&E.isVoid(e,a)){var i=o.getBoundingClientRect(),u=e.isInline(a)?r-i.left<i.left+i.width-r:n-i.top<i.top+i.height-n,s=E.point(e,l,{edge:u?"start":"end"}),c=u?E.before(e,s):E.after(e,s);if(c){var p=E.range(e,c);return p}}var d,{document:g}=fe.getWindow(e);if(g.caretRangeFromPoint)d=g.caretRangeFromPoint(r,n);else{var h=g.caretPositionFromPoint(r,n);h&&(d=g.createRange(),d.setStart(h.offsetNode,h.offset),d.setEnd(h.offsetNode,h.offset))}if(!d)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var v=fe.toSlateRange(e,d,{exactMatch:!1,suppressThrow:!1});return v},findKey:(e,t)=>{var r=ui.get(t);return r||(r=new Q7,ui.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=bu.get(n);if(o==null){if(E.isEditor(n))return r;break}var a=Cu.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Ht.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!on.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{fe.focus(e,{retries:t.retries-1})},10);return}var r=fe.toDOMNode(e,e),n=fe.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Io(n),a=fe.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||we.select(e,E.start(e,[])),on.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=J2.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:n=!1}=r,o=fe.toDOMNode(e,e),a;try{a=vr(t)?t:t.parentElement}catch(l){if(l instanceof Error&&!l.message.includes('Permission denied to access property "nodeType"'))throw l}return a?a.closest("[data-slate-editor]")===o&&(!n||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>un(t)&&fe.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return E.hasPath(e,r.path)&&E.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>fe.hasEditableTarget(e,t)||fe.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>un(t)&&fe.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!bn.get(e),isFocused:e=>!!on.get(e),isReadOnly:e=>!!gs.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(gs.get(e))return!1;var r=fe.hasTarget(e,t)&&fe.toSlateNode(e,t);return He.isElement(r)&&E.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=Ri.get(e),n=E.isEditor(t)?Pa.get(e):r==null?void 0:r.get(fe.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Ht.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=E.node(e,t.path),n=fe.toDOMNode(e,r),o;E.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",l=Array.from(n.querySelectorAll(a)),i=0,u=0;u<l.length;u++){var s=l[u],c=s.childNodes[0];if(!(c==null||c.textContent==null)){var{length:p}=c.textContent,d=s.getAttribute("data-slate-length"),g=d==null?p:parseInt(d,10),h=i+g,v=l[u+1];if(t.offset===h&&v!==null&&v!==void 0&&v.hasAttribute("data-slate-mark-placeholder")){var f,b=v.childNodes[0];o=[b instanceof H7?b:v,(f=v.textContent)!==null&&f!==void 0&&f.startsWith("\uFEFF")?1:0];break}if(t.offset<=h){var x=Math.min(p,Math.max(0,t.offset-i));o=[c,x];break}i=h}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Ht.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=ae.isBackward(t),a=fe.toDOMPoint(e,r),l=ae.isCollapsed(t)?a:fe.toDOMPoint(e,n),i=fe.getWindow(e),u=i.document.createRange(),[s,c]=o?l:a,[p,d]=o?a:l,g=vr(s)?s:s.parentElement,h=!!g.getAttribute("data-slate-zero-width"),v=vr(p)?p:p.parentElement,f=!!v.getAttribute("data-slate-zero-width");return u.setStart(s,h?1:c),u.setEnd(p,f?1:d),u},toSlateNode:(e,t)=>{var r=vr(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?qo.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:a="backward"}=r,[l,i]=n?t:W7(t),u=l.parentNode,s=null,c=0;if(u){var p,d,g=fe.toDOMNode(e,e),h=u.closest('[data-slate-void="true"]'),v=h&&g.contains(h)?h:null,f=u.closest('[contenteditable="false"]'),b=f&&g.contains(f)?f:null,x=u.closest("[data-slate-leaf]"),C=null;if(x){if(s=x.closest('[data-slate-node="text"]'),s){var y=fe.getWindow(e),w=y.document.createRange();w.setStart(s,0),w.setEnd(l,i);var A=w.cloneContents(),k=[...Array.prototype.slice.call(A.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(A.querySelectorAll("[contenteditable=false]"))];k.forEach(q=>{if(rr&&!n&&q.hasAttribute("data-slate-zero-width")&&q.textContent.length>0&&q.textContext!=="\uFEFF"){q.textContent.startsWith("\uFEFF")&&(q.textContent=q.textContent.slice(1));return}q.parentNode.removeChild(q)}),c=A.textContent.length,C=s}}else if(v){for(var F=v.querySelectorAll("[data-slate-leaf]"),D=0;D<F.length;D++){var I=F[D];if(fe.hasDOMNode(e,I)){x=I;break}}x?(s=x.closest('[data-slate-node="text"]'),C=x,c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(q=>{c-=q.textContent.length})):c=1}else if(b){var $=q=>q?q.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],M=b.closest('[data-slate-node="element"]');if(a==="forward"){var P,S=[...$(M),...$(M==null?void 0:M.nextElementSibling)];x=(P=S.find(q=>Y7(b,q)))!==null&&P!==void 0?P:null}else{var B,N=[...$(M==null?void 0:M.previousElementSibling),...$(M)];x=(B=N.findLast(q=>ed(b,q)))!==null&&B!==void 0?B:null}x&&(s=x.closest('[data-slate-node="text"]'),C=x,a==="forward"?c=0:(c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(q=>{c-=q.textContent.length})))}C&&c===C.textContent.length&&rr&&C.getAttribute("data-slate-zero-width")==="z"&&(p=C.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")&&(u.hasAttribute("data-slate-zero-width")||Kn&&(d=C.textContent)!==null&&d!==void 0&&d.endsWith(`
104
+
105
+ `))&&c--}if(rr&&!s&&!n){var R=u.hasAttribute("data-slate-node")?u:u.closest("[data-slate-node]");if(R&&fe.hasDOMNode(e,R,{editable:!0})){var L=fe.toSlateNode(e,R),{path:O,offset:V}=E.start(e,fe.findPath(e,L));return R.querySelector("[data-slate-leaf]")||(V=i),{path:O,offset:V}}}if(!s){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var _=fe.toSlateNode(e,s),K=fe.findPath(e,_);return{path:K,offset:c}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,l=ms(t)?t.anchorNode:t.startContainer,i,u,s,c,p;if(l)if(ms(t)){if(Kn&&t.rangeCount>1){s=t.focusNode;var d=t.getRangeAt(0),g=t.getRangeAt(t.rangeCount-1);if(s instanceof HTMLTableRowElement&&d.startContainer instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement){let A=function(k){return k.childElementCount>0?A(k.children[0]):k};var h=d.startContainer,v=g.startContainer,f=A(h.children[d.startOffset]),b=A(v.children[g.startOffset]);c=0,b.childNodes.length>0?i=b.childNodes[0]:i=b,f.childNodes.length>0?s=f.childNodes[0]:s=f,b instanceof HTMLElement?u=b.innerHTML.length:u=0}else d.startContainer===s?(i=g.endContainer,u=g.endOffset,c=d.startOffset):(i=d.startContainer,u=d.endOffset,c=g.startOffset)}else i=t.anchorNode,u=t.anchorOffset,s=t.focusNode,c=t.focusOffset;Y2&&q7(i)||Kn?p=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:p=t.isCollapsed}else i=t.startContainer,u=t.startOffset,s=t.endContainer,c=t.endOffset,p=t.collapsed;if(i==null||s==null||u==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Kn&&(n=s.textContent)!==null&&n!==void 0&&n.endsWith(`
106
+
107
+ `)&&c===s.textContent.length&&c--;var x=fe.toSlatePoint(e,[i,u],{exactMatch:o,suppressThrow:a});if(!x)return null;var C=ed(i,s)||i===s&&c<u,y=p?x:fe.toSlatePoint(e,[s,c],{exactMatch:o,suppressThrow:a,searchDirection:C?"forward":"backward"});if(!y)return null;var w={anchor:x,focus:y};return ae.isExpanded(w)&&ae.isForward(w)&&vr(s)&&E.void(e,{at:w.focus,mode:"highest"})&&(w=E.unhangRange(e,w,{voids:!0})),w}};function e4(e,t){var{path:r,diff:n}=t;if(!E.hasPath(e,r))return!1;var o=Be.get(e,r);if(!Le.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var a=H.next(r);if(!E.hasPath(e,a))return!1;var l=Be.get(e,a);return Le.isText(l)&&l.text.startsWith(n.text)}function a1(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,a)=>o.slice(0,a.start)+a.text+o.slice(a.end),e)}function t4(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function r4(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function i1(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),l=t4(a,o),i=Math.min(a.length-l,o.length-l),u=r4(a,o,i),s={start:r+l,end:n-u,text:o.slice(l,o.length-u)};return s.start===s.end&&s.text.length===0?null:s}function n4(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),a=a1(e,t,r),l=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),i=a.slice(n,l),u=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return i1(e,{start:n,end:u,text:i})}function o4(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function vs(e,t){var{path:r,offset:n}=t;if(!E.hasPath(e,r))return null;var o=Be.get(e,r);if(!Le.isText(o))return null;var a=E.above(e,{match:i=>He.isElement(i)&&E.isBlock(e,i),at:r});if(!a)return null;for(;n>o.text.length;){var l=E.next(e,{at:r,match:Le.isText});if(!l||!H.isDescendant(l[1],a[1]))return null;n-=o.text.length,o=l[0],r=l[1]}return{path:r,offset:n}}function td(e,t){var r=vs(e,t.anchor);if(!r)return null;if(ae.isCollapsed(t))return{anchor:r,focus:r};var n=vs(e,t.focus);return n?{anchor:r,focus:n}:null}function Cs(e,t,r){var n=lr.get(e),o=n==null?void 0:n.find(c=>{var{path:p}=c;return H.equals(p,t.path)});if(!o||t.offset<=o.diff.start)return st.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var l={path:t.path,offset:a.start},i=st.transform(l,r,{affinity:"backward"});return i?{path:i.path,offset:i.offset+t.offset-a.start}:null}var u={path:t.path,offset:t.offset-a.text.length+a.end-a.start},s=st.transform(u,r,{affinity:"backward"});return s?r.type==="split_node"&&H.equals(r.path,t.path)&&u.offset<r.position&&a.start<r.position?s:{path:s.path,offset:s.offset+a.text.length-a.end+a.start}:null}function rd(e,t,r){var n=Cs(e,t.anchor,r);if(!n)return null;if(ae.isCollapsed(t))return{anchor:n,focus:n};var o=Cs(e,t.focus,r);return o?{anchor:n,focus:o}:null}function a4(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!H.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!H.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!H.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:H.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:H.transform(r,t,{affinity:"forward"})};case"merge_node":return H.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:H.transform(r,t)}:{diff:n,id:o,path:H.transform(r,t)}}var a=H.transform(r,t);return a?{diff:n,path:a,id:o}:null}function nd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function xa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nd(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var i4=25,l4=200,s4=function(){},u4=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function c4(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,l=null,i=null,u=0,s=!1,c=()=>{var M=rn.get(t);if(rn.delete(t),M){var{selection:P}=t,S=td(t,M);S&&(!P||!ae.equals(S,P))&&we.select(t,S)}},p=()=>{var M=tn.get(t);if(tn.delete(t),!!M){if(M.at){var P=st.isPoint(M.at)?vs(t,M.at):td(t,M.at);if(!P)return;var S=E.range(t,P);(!t.selection||!ae.equals(t.selection,S))&&we.select(t,P)}M.run()}},d=()=>{if(l&&(clearTimeout(l),l=null),i&&(clearTimeout(i),i=null),!y()&&!C()){c();return}o||(o=!0,setTimeout(()=>o=!1)),C()&&(o="action");var M=t.selection&&E.rangeRef(t,t.selection,{affinity:"forward"});jr.set(t,t.marks),s4("flush",tn.get(t),lr.get(t));for(var P=y(),S;S=(B=lr.get(t))===null||B===void 0?void 0:B[0];){var B,N,R=Dr.get(t);R!==void 0&&(Dr.delete(t),t.marks=R),R&&s===!1&&(s=null);var L=o4(S);(!t.selection||!ae.equals(t.selection,L))&&we.select(t,L),S.diff.text?E.insertText(t,S.diff.text):E.deleteFragment(t),lr.set(t,(N=lr.get(t))===null||N===void 0?void 0:N.filter(_=>{var{id:K}=_;return K!==S.id})),e4(t,S)||(P=!1,tn.delete(t),jr.delete(t),o="action",rn.delete(t),r.cancel(),n.cancel(),M==null||M.unref())}var O=M==null?void 0:M.unref();if(O&&!rn.get(t)&&(!t.selection||!ae.equals(O,t.selection))&&we.select(t,O),C()){p();return}P&&r(),r.flush(),n.flush(),c();var V=jr.get(t);jr.delete(t),V!==void 0&&(t.marks=V,t.onChange())},g=M=>{a&&clearTimeout(a),a=setTimeout(()=>{bn.set(t,!1),d()},i4)},h=M=>{bn.set(t,!0),a&&(clearTimeout(a),a=null)},v=function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,P=ps.get(t);if(P){if(y()||M){P.style.display="none";return}P.style.removeProperty("display")}},f=(M,P)=>{var S,B=(S=lr.get(t))!==null&&S!==void 0?S:[];lr.set(t,B);var N=Be.leaf(t,M),R=B.findIndex(V=>H.equals(V.path,M));if(R<0){var L=i1(N.text,P);L&&B.push({path:M,diff:P,id:u++}),v();return}var O=n4(N.text,B[R].diff,P);if(!O){B.splice(R,1),v();return}B[R]=xa(xa({},B[R]),{},{diff:O})},b=function(M){var{at:P}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};s=!1,rn.delete(t),r.cancel(),n.cancel(),C()&&d(),tn.set(t,{at:P,run:M}),i=setTimeout(d)},x=M=>{var P;if(l&&(clearTimeout(l),l=null),!Zn.get(t)){var{inputType:S}=M,B=null,N=M.dataTransfer||M.data||void 0;s!==!1&&S!=="insertText"&&S!=="insertCompositionText"&&(s=!1);var[R]=M.getTargetRanges();R&&(B=fe.toSlateRange(t,R,{exactMatch:!1,suppressThrow:!0}));var L=fe.getWindow(t),O=L.getSelection();if(!B&&O&&(R=O,B=fe.toSlateRange(t,O,{exactMatch:!1,suppressThrow:!0})),B=(P=B)!==null&&P!==void 0?P:t.selection,!!B){var V=!0;if(S.startsWith("delete")){if(ae.isExpanded(B)){var[_,K]=ae.edges(B),q=Be.leaf(t,_.path);if(q.text.length===_.offset&&K.offset===0){var Q=E.next(t,{at:_.path,match:Le.isText});Q&&H.equals(Q[1],K.path)&&(B={anchor:K,focus:K})}}var se=S.endsWith("Backward")?"backward":"forward",[T,Z]=ae.edges(B),[W,z]=E.leaf(t,T.path),G={text:"",start:T.offset,end:Z.offset},Y=lr.get(t),J=Y==null?void 0:Y.find(Ue=>H.equals(Ue.path,z)),oe=J?[J.diff,G]:[G],re=a1(W.text,...oe);if(re.length===0&&(V=!1),ae.isExpanded(B)){if(V&&H.equals(B.anchor.path,B.focus.path)){var ne={path:B.anchor.path,offset:T.offset},ue=E.range(t,ne,ne);return k(ue),f(B.anchor.path,{text:"",end:Z.offset,start:T.offset})}return b(()=>E.deleteFragment(t,{direction:se}),{at:B})}}switch(S){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return b(()=>E.deleteFragment(t),{at:B});case"deleteContent":case"deleteContentForward":{var{anchor:ce}=B;if(V&&ae.isCollapsed(B)){var xe=Be.leaf(t,ce.path);if(ce.offset<xe.text.length)return f(ce.path,{text:"",start:ce.offset,end:ce.offset+1})}return b(()=>E.deleteForward(t),{at:B})}case"deleteContentBackward":{var Te,{anchor:Fe}=B,ge=ms(R)?R.isCollapsed:!!((Te=R)!==null&&Te!==void 0&&Te.collapsed);return V&&ge&&ae.isCollapsed(B)&&Fe.offset>0?f(Fe.path,{text:"",start:Fe.offset-1,end:Fe.offset}):b(()=>E.deleteBackward(t),{at:B})}case"deleteEntireSoftLine":return b(()=>{E.deleteBackward(t,{unit:"line"}),E.deleteForward(t,{unit:"line"})},{at:B});case"deleteHardLineBackward":return b(()=>E.deleteBackward(t,{unit:"block"}),{at:B});case"deleteSoftLineBackward":return b(()=>E.deleteBackward(t,{unit:"line"}),{at:B});case"deleteHardLineForward":return b(()=>E.deleteForward(t,{unit:"block"}),{at:B});case"deleteSoftLineForward":return b(()=>E.deleteForward(t,{unit:"line"}),{at:B});case"deleteWordBackward":return b(()=>E.deleteBackward(t,{unit:"word"}),{at:B});case"deleteWordForward":return b(()=>E.deleteForward(t,{unit:"word"}),{at:B});case"insertLineBreak":return b(()=>E.insertSoftBreak(t),{at:B});case"insertParagraph":return b(()=>E.insertBreak(t),{at:B});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(u4(N))return b(()=>fe.insertData(t,N),{at:B});var ye=N??"";if(Dr.get(t)&&(ye=ye.replace("\uFEFF","")),S==="insertText"&&/.*\n.*\n$/.test(ye)&&(ye=ye.slice(0,-1)),ye.includes(`
108
+ `))return b(()=>{var Ue=ye.split(`
109
+ `);Ue.forEach((_e,Xe)=>{_e&&E.insertText(t,_e),Xe!==Ue.length-1&&E.insertSoftBreak(t)})},{at:B});if(H.equals(B.anchor.path,B.focus.path)){var[Ee,Ve]=ae.edges(B),Ne={start:Ee.offset,end:Ve.offset,text:ye};if(ye&&s&&S==="insertCompositionText"){var Ie=s.start+s.text.search(/\S|$/),tt=Ne.start+Ne.text.search(/\S|$/);tt===Ie+1&&Ne.end===s.start+s.text.length?(Ne.start-=1,s=null,I()):s=!1}else S==="insertText"?s===null?s=Ne:s&&ae.isCollapsed(B)&&s.end+s.text.length===Ee.offset?s=xa(xa({},s),{},{text:s.text+ye}):s=!1:s=!1;if(V){f(Ee.path,Ne);return}}return b(()=>E.insertText(t,ye),{at:B})}}}}},C=()=>!!tn.get(t),y=()=>{var M;return!!((M=lr.get(t))!==null&&M!==void 0&&M.length)},w=()=>C()||y(),A=()=>o,k=M=>{rn.set(t,M),l&&(clearTimeout(l),l=null);var{selection:P}=t;if(M){var S=!P||!H.equals(P.anchor.path,M.anchor.path),B=!P||!H.equals(P.anchor.path.slice(0,-1),M.anchor.path.slice(0,-1));(S&&s||B)&&(s=!1),(S||y())&&(l=setTimeout(d,l4))}},F=()=>{(C()||!y())&&d()},D=M=>{y()||(v(!0),setTimeout(v))},I=()=>{C()||(i=setTimeout(d))},$=M=>{if(!(y()||C())&&M.some(S=>wu(t,S,M))){var P;(P=Q2.get(t))===null||P===void 0||P()}};return{flush:d,scheduleFlush:I,hasPendingDiffs:y,hasPendingAction:C,hasPendingChanges:w,isFlushing:A,handleUserSelect:k,handleCompositionEnd:g,handleCompositionStart:h,handleDOMBeforeInput:x,handleKeyDown:D,handleDomMutations:$,handleInput:F}}function d4(){var e=at(!1);return gt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Uo=Ia?np:gt;function f4(e,t,r){var[n]=et(()=>new MutationObserver(t));Uo(()=>{n.takeRecords()}),gt(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var p4=["node"];function od(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function g4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?od(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):od(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var h4={subtree:!0,childList:!0,characterData:!0},m4=rr?e=>{var{node:t}=e,r=Jn(e,p4);if(!rr)return null;var n=dn(),o=d4(),[a]=et(()=>c4(g4({editor:n},r)));return f4(t,a.handleDomMutations,h4),yu.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,v4=["anchor","focus"],C4=["anchor","focus"],b4=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),l1=(e,t)=>{var r=Jn(e,v4),n=Jn(t,C4);return e[Qn]===t[Qn]&&b4(r,n)},y4=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!ae.equals(n,o)||!l1(n,o))return!1}return!0},x4=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!l1(n,o))return!1}return!0};function ad(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function w4(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ad(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ad(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var D4=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=dn(),l=fe.findPath(a,o),i=H.parent(l),u=!!r[e1];return a.isVoid(n)?Ce.createElement(Sl,{length:Be.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&E.string(a,i)===""?Ce.createElement(Sl,{isLineBreak:!0,isMarkPlaceholder:u}):r.text===""?Ce.createElement(Sl,{isMarkPlaceholder:u}):t&&r.text.slice(-1)===`
110
+ `?Ce.createElement(id,{isTrailing:!0,text:r.text}):Ce.createElement(id,{text:r.text})},id=e=>{var{text:t,isTrailing:r=!1}=e,n=at(null),o=()=>"".concat(t??"").concat(r?`
111
+ `:""),[a]=et(o);return Uo(()=>{var l=o();n.current&&n.current.textContent!==l&&(n.current.textContent=l)}),Ce.createElement(E4,{ref:n},a)},E4=Go(cn((e,t)=>Ce.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Sl=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),Ce.createElement("span",w4({},o),!(rr||X2)||!r?"\uFEFF":null,r?Ce.createElement("br",null):null)};function ld(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function s1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ld(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ld(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var S4=rr?300:0;function k4(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function sd(e){e.current&&(clearTimeout(e.current),e.current=null)}var A4=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:l=x=>Ce.createElement(F4,s1({},x))}=e,i=dn(),u=at(null),s=at(null),[c,p]=et(!1),d=at(null),g=Ge(x=>{if(k4(u,x==null),x==null){var C;ps.delete(i),(C=t.onPlaceholderResize)===null||C===void 0||C.call(t,null)}else{if(ps.set(i,x),!u.current){var y=window.ResizeObserver||O7;u.current=new y(()=>{var w;(w=t.onPlaceholderResize)===null||w===void 0||w.call(t,x)})}u.current.observe(x),s.current=x}},[s,t,i]),h=Ce.createElement(D4,{isLast:r,leaf:t,parent:o,text:n}),v=!!t[Qn];if(gt(()=>(v?d.current||(d.current=setTimeout(()=>{p(!0),d.current=null},S4)):(sd(d),p(!1)),()=>sd(d)),[v,p]),v&&c){var f={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:Cn?"inherit":void 0},contentEditable:!1,ref:g}};h=Ce.createElement(Ce.Fragment,null,a(f),h)}var b={"data-slate-leaf":!0};return l({attributes:b,children:h,leaf:t,text:n})},B4=Ce.memo(A4,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&Le.equals(t.leaf,e.leaf)&&t.leaf[Qn]===e.leaf[Qn]),F4=e=>{var{attributes:t,children:r}=e;return Ce.createElement("span",s1({},t),r)},$4=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:l}=e,i=dn(),u=at(null),s=Le.decorations(l,t),c=fe.findKey(i,l),p=[],d=0;d<s.length;d++){var g=s[d];p.push(Ce.createElement(B4,{isLast:r&&d===s.length-1,key:"".concat(c.id,"-").concat(d),renderPlaceholder:o,leaf:g,text:l,parent:n,renderLeaf:a}))}var h=Ge(v=>{var f=Ri.get(i);v?(f==null||f.set(c,v),Dn.set(l,v),qo.set(v,l)):(f==null||f.delete(c),Dn.delete(l),u.current&&qo.delete(u.current)),u.current=v},[u,i,c,l]);return Ce.createElement("span",{"data-slate-node":"text",ref:h},p)},u1=Ce.memo($4,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&x4(t.decorations,e.decorations));function ud(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function bs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ud(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ud(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O4=e=>{var{decorations:t,element:r,renderElement:n=x=>Ce.createElement(R4,bs({},x)),renderPlaceholder:o,renderLeaf:a,selection:l}=e,i=dn(),u=T4(),s=i.isInline(r),c=fe.findKey(i,r),p=Ge(x=>{var C=Ri.get(i);x?(C==null||C.set(c,x),Dn.set(r,x),qo.set(x,r)):(C==null||C.delete(c),Dn.delete(r))},[i,c,r]),d=d1({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:l}),g={"data-slate-node":"element",ref:p};if(s&&(g["data-slate-inline"]=!0),!s&&E.hasInlines(i,r)){var h=Be.string(r),v=j2(h);v==="rtl"&&(g.dir=v)}if(E.isVoid(i,r)){g["data-slate-void"]=!0,!u&&s&&(g.contentEditable=!1);var f=s?"span":"div",[[b]]=Be.texts(r);d=Ce.createElement(f,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Ce.createElement(u1,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:b})),Cu.set(b,0),bu.set(b,r)}return n({attributes:g,children:d,element:r})},N4=Ce.memo(O4,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&y4(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&ae.equals(e.selection,t.selection))),R4=e=>{var{attributes:t,children:r,element:n}=e,o=dn(),a=o.isInline(n)?"span":"div";return Ce.createElement(a,bs(bs({},t),{},{style:{position:"relative"}}),r)},c1=Rr(()=>[]),I4=()=>Vr(c1),P4=Rr(!1),d1=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:l}=e,i=I4(),u=dn();Zn.set(u,!1);for(var s=fe.findPath(u,r),c=[],p=He.isElement(r)&&!u.isInline(r)&&E.hasInlines(u,r),d=0;d<r.children.length;d++){var g=s.concat(d),h=r.children[d],v=fe.findKey(u,h),f=E.range(u,g),b=l&&ae.intersection(f,l),x=i([h,g]);for(var C of t){var y=ae.intersection(C,f);y&&x.push(y)}He.isElement(h)?c.push(Ce.createElement(P4.Provider,{key:"provider-".concat(v.id),value:!!b},Ce.createElement(N4,{decorations:x,element:h,key:v.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:b}))):c.push(Ce.createElement(u1,{decorations:x,key:v.id,isLast:p&&d===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:h})),Cu.set(h,d),bu.set(h,r)}return c},f1=Rr(!1),T4=()=>Vr(f1),p1=Rr(null),g1=()=>{var e=Vr(p1);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function M4(){var e=dn(),t=at(!1),r=at(0),n=Ge(()=>{if(!t.current){t.current=!0;var o=fe.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return gt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var L4=3,j4={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},_4={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},z4={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ft=e=>{var t=j4[e],r=_4[e],n=z4[e],o=t&&wl.isHotkey(t),a=r&&wl.isHotkey(r),l=n&&wl.isHotkey(n);return i=>!!(o&&o(i)||Q0&&a&&a(i)||!Q0&&l&&l(i))},$t={isBold:Ft("bold"),isCompose:Ft("compose"),isMoveBackward:Ft("moveBackward"),isMoveForward:Ft("moveForward"),isDeleteBackward:Ft("deleteBackward"),isDeleteForward:Ft("deleteForward"),isDeleteLineBackward:Ft("deleteLineBackward"),isDeleteLineForward:Ft("deleteLineForward"),isDeleteWordBackward:Ft("deleteWordBackward"),isDeleteWordForward:Ft("deleteWordForward"),isExtendBackward:Ft("extendBackward"),isExtendForward:Ft("extendForward"),isExtendLineBackward:Ft("extendLineBackward"),isExtendLineForward:Ft("extendLineForward"),isItalic:Ft("italic"),isMoveLineBackward:Ft("moveLineBackward"),isMoveLineForward:Ft("moveLineForward"),isMoveWordBackward:Ft("moveWordBackward"),isMoveWordForward:Ft("moveWordForward"),isRedo:Ft("redo"),isSoftBreak:Ft("insertSoftBreak"),isSplitBlock:Ft("splitBlock"),isTransposeCharacter:Ft("transposeCharacter"),isUndo:Ft("undo")},H4=(e,t)=>{var r=[],n=()=>{r=[]},o=l=>{if(t.current){var i=l.filter(u=>wu(e,u,l));r.push(...i)}};function a(){r.length>0&&(r.reverse().forEach(l=>{l.type!=="characterData"&&(l.removedNodes.forEach(i=>{l.target.insertBefore(i,l.nextSibling)}),l.addedNodes.forEach(i=>{l.target.removeChild(i)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},K4={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class h1 extends ap{constructor(){super(...arguments),br(this,"context",null),br(this,"manager",null),br(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,K4)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=H4(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}br(h1,"contextType",vu);var V4=rr?h1:e=>{var{children:t}=e;return Ce.createElement(Ce.Fragment,null,t)},W4=Rr(!1),q4=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],U4=["text"];function cd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cd(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Z4=e=>Ce.createElement(Ce.Fragment,null,d1(e)),kl=cn((e,t)=>{var r=Ge(T=>Ce.createElement(G4,Fr({},T)),[]),{autoFocus:n,decorate:o=X4,onDOMBeforeInput:a,placeholder:l,readOnly:i=!1,renderElement:u,renderLeaf:s,renderPlaceholder:c=r,scrollSelectionIntoView:p=Y4,style:d={},as:g="div",disableDefaultStyles:h=!1}=e,v=Jn(e,q4),f=g1(),[b,x]=et(!1),C=at(null),y=at([]),[w,A]=et(),k=at(!1),{onUserInput:F,receivedUserInput:D}=M4(),[,I]=op(T=>T+1,0);Q2.set(f,I),gs.set(f,i);var $=Je(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);gt(()=>{C.current&&n&&C.current.focus()},[n]);var M=at(),P=Je(()=>l7(()=>{if(Zn.get(f)){P();return}var T=fe.toDOMNode(f,f),Z=T.getRootNode();if(!k.current&&Cn&&Z instanceof ShadowRoot){k.current=!0;var W=X7();W?document.execCommand("indent"):we.deselect(f),k.current=!1;return}var z=M.current;if((rr||!fe.isComposing(f))&&(!$.isUpdatingSelection||z!=null&&z.isFlushing())&&!$.isDraggingInternally){var G=fe.findDocumentOrShadowRoot(f),{activeElement:Y}=G,J=fe.toDOMNode(f,f),oe=Io(G);if(Y===J?($.latestElement=Y,on.set(f,!0)):on.delete(f),!oe)return we.deselect(f);var{anchorNode:re,focusNode:ne}=oe,ue=fe.hasEditableTarget(f,re)||fe.isTargetInsideNonReadonlyVoid(f,re),ce=fe.hasTarget(f,ne);if(ue&&ce){var xe=fe.toSlateRange(f,oe,{exactMatch:!1,suppressThrow:!0});xe&&(!fe.isComposing(f)&&!(z!=null&&z.hasPendingChanges())&&!(z!=null&&z.isFlushing())?we.select(f,xe):z==null||z.handleUserSelect(xe))}i&&(!ue||!ce)&&we.deselect(f)}},100),[f,i,$]),S=Je(()=>o7(P,0),[P]);M.current=m4({node:C,onDOMSelectionChange:P,scheduleOnDOMSelectionChange:S}),Uo(()=>{var T,Z,W;C.current&&(W=xu(C.current))?(J2.set(f,W),Pa.set(f,C.current),Dn.set(f,C.current),qo.set(C.current,f)):Dn.delete(f);var{selection:z}=f,G=fe.findDocumentOrShadowRoot(f),Y=Io(G);if(!(!Y||!fe.isFocused(f)||(T=M.current)!==null&&T!==void 0&&T.hasPendingAction())){var J=ue=>{var ce=Y.type!=="None";if(!(!z&&!ce)){var xe=Y.focusNode,Te;if(Kn&&Y.rangeCount>1){var Fe=Y.getRangeAt(0),ge=Y.getRangeAt(Y.rangeCount-1);Fe.startContainer===xe?Te=ge.endContainer:Te=Fe.startContainer}else Te=Y.anchorNode;var ye=Pa.get(f),Ee=!1;if(ye.contains(Te)&&ye.contains(xe)&&(Ee=!0),ce&&Ee&&z&&!ue){var Ve=fe.toSlateRange(f,Y,{exactMatch:!0,suppressThrow:!0});if(Ve&&ae.equals(Ve,z)){var Ne;if(!$.hasMarkPlaceholder||(Ne=Te)!==null&&Ne!==void 0&&(Ne=Ne.parentElement)!==null&&Ne!==void 0&&Ne.hasAttribute("data-slate-mark-placeholder"))return}}if(z&&!fe.hasRange(f,z)){f.selection=fe.toSlateRange(f,Y,{exactMatch:!1,suppressThrow:!0});return}$.isUpdatingSelection=!0;var Ie=z&&fe.toDOMRange(f,z);return Ie?(fe.isComposing(f)&&!rr?Y.collapseToEnd():ae.isBackward(z)?Y.setBaseAndExtent(Ie.endContainer,Ie.endOffset,Ie.startContainer,Ie.startOffset):Y.setBaseAndExtent(Ie.startContainer,Ie.startOffset,Ie.endContainer,Ie.endOffset),p(f,Ie)):Y.removeAllRanges(),Ie}};Y.rangeCount<=1&&J();var oe=((Z=M.current)===null||Z===void 0?void 0:Z.isFlushing())==="action";if(!rr||!oe){setTimeout(()=>{$.isUpdatingSelection=!1});return}var re=null,ne=requestAnimationFrame(()=>{if(oe){var ue=ce=>{try{var xe=fe.toDOMNode(f,f);xe.focus(),J(ce)}catch{}};ue(),re=setTimeout(()=>{ue(!0),$.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(ne),re&&clearTimeout(re)}}});var B=Ge(T=>{var Z=fe.toDOMNode(f,f),W=Z.getRootNode();if(k!=null&&k.current&&Cn&&W instanceof ShadowRoot){var z=T.getTargetRanges(),G=z[0],Y=new window.Range;Y.setStart(G.startContainer,G.startOffset),Y.setEnd(G.endContainer,G.endOffset);var J=fe.toSlateRange(f,Y,{exactMatch:!1,suppressThrow:!1});we.select(f,J),T.preventDefault(),T.stopImmediatePropagation();return}if(F(),!i&&fe.hasEditableTarget(f,T.target)&&!J4(T,a)){var oe;if(M.current)return M.current.handleDOMBeforeInput(T);S.flush(),P.flush();var{selection:re}=f,{inputType:ne}=T,ue=T.dataTransfer||T.data||void 0,ce=ne==="insertCompositionText"||ne==="deleteCompositionText";if(ce&&fe.isComposing(f))return;var xe=!1;if(ne==="insertText"&&re&&ae.isCollapsed(re)&&T.data&&T.data.length===1&&/[a-z ]/i.test(T.data)&&re.anchor.offset!==0&&(xe=!0,f.marks&&(xe=!1),!Zn.get(f))){var Te,Fe,{anchor:ge}=re,[ye,Ee]=fe.toDOMPoint(f,ge),Ve=(Te=ye.parentElement)===null||Te===void 0?void 0:Te.closest("a"),Ne=fe.getWindow(f);if(xe&&Ve&&fe.hasDOMNode(f,Ve)){var Ie,tt=Ne==null?void 0:Ne.document.createTreeWalker(Ve,NodeFilter.SHOW_TEXT).lastChild();tt===ye&&((Ie=tt.textContent)===null||Ie===void 0?void 0:Ie.length)===Ee&&(xe=!1)}if(xe&&ye.parentElement&&(Ne==null||(Fe=Ne.getComputedStyle(ye.parentElement))===null||Fe===void 0?void 0:Fe.whiteSpace)==="pre"){var Ue=E.above(f,{at:ge.path,match:ze=>He.isElement(ze)&&E.isBlock(f,ze)});Ue&&Be.string(Ue[0]).includes(" ")&&(xe=!1)}}if((!ne.startsWith("delete")||ne.startsWith("deleteBy"))&&!Zn.get(f)){var[_e]=T.getTargetRanges();if(_e){var Xe=fe.toSlateRange(f,_e,{exactMatch:!1,suppressThrow:!1});if(!re||!ae.equals(re,Xe)){xe=!1;var Se=!ce&&f.selection&&E.rangeRef(f,f.selection);we.select(f,Xe),Se&&Ro.set(f,Se)}}}if(ce)return;if(xe||T.preventDefault(),re&&ae.isExpanded(re)&&ne.startsWith("delete")){var De=ne.endsWith("Backward")?"backward":"forward";E.deleteFragment(f,{direction:De});return}switch(ne){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{E.deleteFragment(f);break}case"deleteContent":case"deleteContentForward":{E.deleteForward(f);break}case"deleteContentBackward":{E.deleteBackward(f);break}case"deleteEntireSoftLine":{E.deleteBackward(f,{unit:"line"}),E.deleteForward(f,{unit:"line"});break}case"deleteHardLineBackward":{E.deleteBackward(f,{unit:"block"});break}case"deleteSoftLineBackward":{E.deleteBackward(f,{unit:"line"});break}case"deleteHardLineForward":{E.deleteForward(f,{unit:"block"});break}case"deleteSoftLineForward":{E.deleteForward(f,{unit:"line"});break}case"deleteWordBackward":{E.deleteBackward(f,{unit:"word"});break}case"deleteWordForward":{E.deleteForward(f,{unit:"word"});break}case"insertLineBreak":E.insertSoftBreak(f);break;case"insertParagraph":{E.insertBreak(f);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{ne==="insertFromComposition"&&fe.isComposing(f)&&(x(!1),bn.set(f,!1)),(ue==null?void 0:ue.constructor.name)==="DataTransfer"?fe.insertData(f,ue):typeof ue=="string"&&(xe?y.current.push(()=>E.insertText(f,ue)):E.insertText(f,ue));break}}var Re=(oe=Ro.get(f))===null||oe===void 0?void 0:oe.unref();Ro.delete(f),Re&&(!f.selection||!ae.equals(f.selection,Re))&&we.select(f,Re)}},[f,P,F,a,i,S]),N=Ge(T=>{T==null?(P.cancel(),S.cancel(),Pa.delete(f),Dn.delete(f),C.current&&Yr&&C.current.removeEventListener("beforeinput",B)):Yr&&T.addEventListener("beforeinput",B),C.current=T,typeof t=="function"?t(T):t&&(t.current=T)},[P,S,f,B,t]);Uo(()=>{var T=fe.getWindow(f);T.document.addEventListener("selectionchange",S);var Z=()=>{$.isDraggingInternally=!1};return T.document.addEventListener("dragend",Z),T.document.addEventListener("drop",Z),()=>{T.document.removeEventListener("selectionchange",S),T.document.removeEventListener("dragend",Z),T.document.removeEventListener("drop",Z)}},[S,$]);var R=o([f,[]]),L=l&&f.children.length===1&&Array.from(Be.texts(f)).length===1&&Be.string(f)===""&&!b,O=Ge(T=>{if(T&&L){var Z;A((Z=T.getBoundingClientRect())===null||Z===void 0?void 0:Z.height)}else A(void 0)},[L]);if(L){var V=E.start(f,[]);R.push({[Qn]:!0,placeholder:l,onPlaceholderResize:O,anchor:V,focus:V})}var{marks:_}=f;if($.hasMarkPlaceholder=!1,f.selection&&ae.isCollapsed(f.selection)&&_){var{anchor:K}=f.selection,q=Be.leaf(f,K.path),Q=Jn(q,U4);if(!Le.equals(q,_,{loose:!0})){$.hasMarkPlaceholder=!0;var se=Object.fromEntries(Object.keys(Q).map(T=>[T,null]));R.push(Fr(Fr(Fr({[e1]:!0},se),_),{},{anchor:K,focus:K}))}}return gt(()=>{setTimeout(()=>{var{selection:T}=f;if(T){var{anchor:Z}=T,W=Be.leaf(f,Z.path);if(_&&!Le.equals(W,_,{loose:!0})){Dr.set(f,_);return}}Dr.delete(f)})}),Ce.createElement(f1.Provider,{value:i},Ce.createElement(W4.Provider,{value:b},Ce.createElement(c1.Provider,{value:o},Ce.createElement(V4,{node:C,receivedUserInput:D},Ce.createElement(g,Fr(Fr({role:i?void 0:"textbox","aria-multiline":i?void 0:!0},v),{},{spellCheck:Yr||!Ia?v.spellCheck:!1,autoCorrect:Yr||!Ia?v.autoCorrect:"false",autoCapitalize:Yr||!Ia?v.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!i,zindex:-1,suppressContentEditableWarning:!0,ref:N,style:Fr(Fr({},h?{}:Fr({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},w?{minHeight:w}:{})),d),onBeforeInput:Ge(T=>{if(!Yr&&!i&&!tr(T,v.onBeforeInput)&&fe.hasSelectableTarget(f,T.target)&&(T.preventDefault(),!fe.isComposing(f))){var Z=T.data;E.insertText(f,Z)}},[v.onBeforeInput,f,i]),onInput:Ge(T=>{if(!tr(T,v.onInput)){if(M.current){M.current.handleInput();return}for(var Z of y.current)Z();if(y.current=[],!fe.isFocused(f)){var W=T.nativeEvent,z=f;if(W.inputType==="historyUndo"&&typeof z.undo=="function"){z.undo();return}if(W.inputType==="historyRedo"&&typeof z.redo=="function"){z.redo();return}}}},[v.onInput,f]),onBlur:Ge(T=>{if(!(i||$.isUpdatingSelection||!fe.hasSelectableTarget(f,T.target)||tr(T,v.onBlur))){var Z=fe.findDocumentOrShadowRoot(f);if($.latestElement!==Z.activeElement){var{relatedTarget:W}=T,z=fe.toDOMNode(f,f);if(W!==z&&!(vr(W)&&W.hasAttribute("data-slate-spacer"))){if(W!=null&&un(W)&&fe.hasDOMNode(f,W)){var G=fe.toSlateNode(f,W);if(He.isElement(G)&&!f.isVoid(G))return}if(Cn){var Y=Io(Z);Y==null||Y.removeAllRanges()}on.delete(f)}}}},[i,$.isUpdatingSelection,$.latestElement,f,v.onBlur]),onClick:Ge(T=>{if(fe.hasTarget(f,T.target)&&!tr(T,v.onClick)&&un(T.target)){var Z=fe.toSlateNode(f,T.target),W=fe.findPath(f,Z);if(!E.hasPath(f,W)||Be.get(f,W)!==Z)return;if(T.detail===L4&&W.length>=1){var z=W;if(!(He.isElement(Z)&&E.isBlock(f,Z))){var G,Y=E.above(f,{match:xe=>He.isElement(xe)&&E.isBlock(f,xe),at:W});z=(G=Y==null?void 0:Y[1])!==null&&G!==void 0?G:W.slice(0,1)}var J=E.range(f,z);we.select(f,J);return}if(i)return;var oe=E.start(f,W),re=E.end(f,W),ne=E.void(f,{at:oe}),ue=E.void(f,{at:re});if(ne&&ue&&H.equals(ne[1],ue[1])){var ce=E.range(f,oe);we.select(f,ce)}}},[f,v.onClick,i]),onCompositionEnd:Ge(T=>{if(fe.hasSelectableTarget(f,T.target)){var Z;if(fe.isComposing(f)&&Promise.resolve().then(()=>{x(!1),bn.set(f,!1)}),(Z=M.current)===null||Z===void 0||Z.handleCompositionEnd(T),tr(T,v.onCompositionEnd)||rr)return;if(!Cn&&!j7&&!X2&&!z7&&!_7&&T.data){var W=Dr.get(f);Dr.delete(f),W!==void 0&&(jr.set(f,f.marks),f.marks=W),E.insertText(f,T.data);var z=jr.get(f);jr.delete(f),z!==void 0&&(f.marks=z)}}},[v.onCompositionEnd,f]),onCompositionUpdate:Ge(T=>{fe.hasSelectableTarget(f,T.target)&&!tr(T,v.onCompositionUpdate)&&(fe.isComposing(f)||(x(!0),bn.set(f,!0)))},[v.onCompositionUpdate,f]),onCompositionStart:Ge(T=>{if(fe.hasSelectableTarget(f,T.target)){var Z;if((Z=M.current)===null||Z===void 0||Z.handleCompositionStart(T),tr(T,v.onCompositionStart)||rr)return;x(!0);var{selection:W}=f;if(W&&ae.isExpanded(W)){E.deleteFragment(f);return}}},[v.onCompositionStart,f]),onCopy:Ge(T=>{fe.hasSelectableTarget(f,T.target)&&!tr(T,v.onCopy)&&!dd(T)&&(T.preventDefault(),fe.setFragmentData(f,T.clipboardData,"copy"))},[v.onCopy,f]),onCut:Ge(T=>{if(!i&&fe.hasSelectableTarget(f,T.target)&&!tr(T,v.onCut)&&!dd(T)){T.preventDefault(),fe.setFragmentData(f,T.clipboardData,"cut");var{selection:Z}=f;if(Z)if(ae.isExpanded(Z))E.deleteFragment(f);else{var W=Be.parent(f,Z.anchor.path);E.isVoid(f,W)&&we.delete(f)}}},[i,f,v.onCut]),onDragOver:Ge(T=>{if(fe.hasTarget(f,T.target)&&!tr(T,v.onDragOver)){var Z=fe.toSlateNode(f,T.target);He.isElement(Z)&&E.isVoid(f,Z)&&T.preventDefault()}},[v.onDragOver,f]),onDragStart:Ge(T=>{if(!i&&fe.hasTarget(f,T.target)&&!tr(T,v.onDragStart)){var Z=fe.toSlateNode(f,T.target),W=fe.findPath(f,Z),z=He.isElement(Z)&&E.isVoid(f,Z)||E.void(f,{at:W,voids:!0});if(z){var G=E.range(f,W);we.select(f,G)}$.isDraggingInternally=!0,fe.setFragmentData(f,T.dataTransfer,"drag")}},[i,f,v.onDragStart,$]),onDrop:Ge(T=>{if(!i&&fe.hasTarget(f,T.target)&&!tr(T,v.onDrop)){T.preventDefault();var Z=f.selection,W=fe.findEventRange(f,T),z=T.dataTransfer;we.select(f,W),$.isDraggingInternally&&Z&&!ae.equals(Z,W)&&!E.void(f,{at:W,voids:!0})&&we.delete(f,{at:Z}),fe.insertData(f,z),fe.isFocused(f)||fe.focus(f)}},[i,f,v.onDrop,$]),onDragEnd:Ge(T=>{!i&&$.isDraggingInternally&&v.onDragEnd&&fe.hasTarget(f,T.target)&&v.onDragEnd(T)},[i,$,v,f]),onFocus:Ge(T=>{if(!i&&!$.isUpdatingSelection&&fe.hasEditableTarget(f,T.target)&&!tr(T,v.onFocus)){var Z=fe.toDOMNode(f,f),W=fe.findDocumentOrShadowRoot(f);if($.latestElement=W.activeElement,Kn&&T.target!==Z){Z.focus();return}on.set(f,!0)}},[i,$,f,v.onFocus]),onKeyDown:Ge(T=>{if(!i&&fe.hasEditableTarget(f,T.target)){var Z;(Z=M.current)===null||Z===void 0||Z.handleKeyDown(T);var{nativeEvent:W}=T;if(fe.isComposing(f)&&W.isComposing===!1&&(bn.set(f,!1),x(!1)),tr(T,v.onKeyDown)||fe.isComposing(f))return;var{selection:z}=f,G=f.children[z!==null?z.focus.path[0]:0],Y=j2(Be.string(G))==="rtl";if($t.isRedo(W)){T.preventDefault();var J=f;typeof J.redo=="function"&&J.redo();return}if($t.isUndo(W)){T.preventDefault();var oe=f;typeof oe.undo=="function"&&oe.undo();return}if($t.isMoveLineBackward(W)){T.preventDefault(),we.move(f,{unit:"line",reverse:!0});return}if($t.isMoveLineForward(W)){T.preventDefault(),we.move(f,{unit:"line"});return}if($t.isExtendLineBackward(W)){T.preventDefault(),we.move(f,{unit:"line",edge:"focus",reverse:!0});return}if($t.isExtendLineForward(W)){T.preventDefault(),we.move(f,{unit:"line",edge:"focus"});return}if($t.isMoveBackward(W)){T.preventDefault(),z&&ae.isCollapsed(z)?we.move(f,{reverse:!Y}):we.collapse(f,{edge:Y?"end":"start"});return}if($t.isMoveForward(W)){T.preventDefault(),z&&ae.isCollapsed(z)?we.move(f,{reverse:Y}):we.collapse(f,{edge:Y?"start":"end"});return}if($t.isMoveWordBackward(W)){T.preventDefault(),z&&ae.isExpanded(z)&&we.collapse(f,{edge:"focus"}),we.move(f,{unit:"word",reverse:!Y});return}if($t.isMoveWordForward(W)){T.preventDefault(),z&&ae.isExpanded(z)&&we.collapse(f,{edge:"focus"}),we.move(f,{unit:"word",reverse:Y});return}if(Yr){if((Y2||Cn)&&z&&($t.isDeleteBackward(W)||$t.isDeleteForward(W))&&ae.isCollapsed(z)){var re=Be.parent(f,z.anchor.path);if(He.isElement(re)&&E.isVoid(f,re)&&(E.isInline(f,re)||E.isBlock(f,re))){T.preventDefault(),E.deleteBackward(f,{unit:"block"});return}}}else{if($t.isBold(W)||$t.isItalic(W)||$t.isTransposeCharacter(W)){T.preventDefault();return}if($t.isSoftBreak(W)){T.preventDefault(),E.insertSoftBreak(f);return}if($t.isSplitBlock(W)){T.preventDefault(),E.insertBreak(f);return}if($t.isDeleteBackward(W)){T.preventDefault(),z&&ae.isExpanded(z)?E.deleteFragment(f,{direction:"backward"}):E.deleteBackward(f);return}if($t.isDeleteForward(W)){T.preventDefault(),z&&ae.isExpanded(z)?E.deleteFragment(f,{direction:"forward"}):E.deleteForward(f);return}if($t.isDeleteLineBackward(W)){T.preventDefault(),z&&ae.isExpanded(z)?E.deleteFragment(f,{direction:"backward"}):E.deleteBackward(f,{unit:"line"});return}if($t.isDeleteLineForward(W)){T.preventDefault(),z&&ae.isExpanded(z)?E.deleteFragment(f,{direction:"forward"}):E.deleteForward(f,{unit:"line"});return}if($t.isDeleteWordBackward(W)){T.preventDefault(),z&&ae.isExpanded(z)?E.deleteFragment(f,{direction:"backward"}):E.deleteBackward(f,{unit:"word"});return}if($t.isDeleteWordForward(W)){T.preventDefault(),z&&ae.isExpanded(z)?E.deleteFragment(f,{direction:"forward"}):E.deleteForward(f,{unit:"word"});return}}}},[i,f,v.onKeyDown]),onPaste:Ge(T=>{!i&&fe.hasEditableTarget(f,T.target)&&!tr(T,v.onPaste)&&(!Yr||V7(T.nativeEvent)||Cn)&&(T.preventDefault(),fe.insertData(f,T.clipboardData))},[i,f,v.onPaste])}),Ce.createElement(Z4,{decorations:R,node:f,renderElement:u,renderPlaceholder:c,renderLeaf:s,selection:f.selection}))))))}),G4=e=>{var{attributes:t,children:r}=e;return Ce.createElement("span",Fr({},t),r,rr&&Ce.createElement("br",null))},X4=()=>[],Y4=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&ae.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),c7(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},tr=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},dd=e=>un(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),J4=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},Q4=Rr(!1),eb=Rr({});function tb(e){var t=at([]).current,r=at({editor:e}).current,n=Ge(a=>{r.editor=a,t.forEach(l=>l(a))},[t,r]),o=Je(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var rb=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],Al=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:l}=e,i=Jn(e,rb),[u,s]=Ce.useState(()=>{if(!Be.isNodeList(l))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Ht.stringify(l)));if(!E.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Ht.stringify(t)));return t.children=l,Object.assign(t,i),{v:0,editor:t}}),{selectorContext:c,onChange:p}=tb(t),d=Ge(v=>{var f;switch(n&&n(t.children),v==null||(f=v.operation)===null||f===void 0?void 0:f.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}s(b=>({v:b.v+1,editor:t})),p(t)},[t,p,n,o,a]);gt(()=>(hs.set(t,d),()=>{hs.set(t,()=>{})}),[t,d]);var[g,h]=et(fe.isFocused(t));return gt(()=>{h(fe.isFocused(t))},[t]),Uo(()=>{var v=()=>h(fe.isFocused(t));return G2>=17?(document.addEventListener("focusin",v),document.addEventListener("focusout",v),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",v)}):(document.addEventListener("focus",v,!0),document.addEventListener("blur",v,!0),()=>{document.removeEventListener("focus",v,!0),document.removeEventListener("blur",v,!0)})},[]),Ce.createElement(eb.Provider,{value:c},Ce.createElement(p1.Provider,{value:u},Ce.createElement(vu.Provider,{value:u.editor},Ce.createElement(Q4.Provider,{value:g},r))))},fd=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},pd=(e,t,r)=>{var n=fe.toDOMRange(e,t).getBoundingClientRect(),o=fe.toDOMRange(e,r).getBoundingClientRect();return fd(n,o)&&fd(o,n)},nb=(e,t)=>{var r=E.range(e,ae.end(t)),n=Array.from(E.positions(e,{at:t})),o=0,a=n.length,l=Math.floor(a/2);if(pd(e,E.range(e,n[o]),r))return E.range(e,n[o],r);if(n.length<2)return E.range(e,n[n.length-1],r);for(;l!==n.length&&l!==o;)pd(e,E.range(e,n[l]),r)?a=l:o=l,l=Math.floor((o+a)/2);return E.range(e,n[a],r)};function gd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gd(Object(r),!0).forEach(function(n){br(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ob=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:o,deleteBackward:a,addMark:l,removeMark:i}=r;return Ri.set(r,new WeakMap),r.addMark=(u,s)=>{var c,p;(c=yu.get(r))===null||c===void 0||c(),!Dr.get(r)&&(p=lr.get(r))!==null&&p!==void 0&&p.length&&Dr.set(r,null),jr.delete(r),l(u,s)},r.removeMark=u=>{var s;!Dr.get(r)&&(s=lr.get(r))!==null&&s!==void 0&&s.length&&Dr.set(r,null),jr.delete(r),i(u)},r.deleteBackward=u=>{if(u!=="line")return a(u);if(r.selection&&ae.isCollapsed(r.selection)){var s=E.above(r,{match:g=>He.isElement(g)&&E.isBlock(r,g),at:r.selection});if(s){var[,c]=s,p=E.range(r,c,r.selection.anchor),d=nb(r,p);ae.isCollapsed(d)||we.delete(r,{at:d})}}},r.apply=u=>{var s=[],c=[],p=lr.get(r);if(p!=null&&p.length){var d=p.map(P=>a4(P,u)).filter(Boolean);lr.set(r,d)}var g=rn.get(r);g&&rn.set(r,rd(r,g,u));var h=tn.get(r);if(h!=null&&h.at){var v=st.isPoint(h==null?void 0:h.at)?Cs(r,h.at,u):rd(r,h.at,u);tn.set(r,v?hd(hd({},h),{},{at:v}):null)}switch(u.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{s.push(...Ln(r,u.path));break}case"set_selection":{var f;(f=Ro.get(r))===null||f===void 0||f.unref(),Ro.delete(r);break}case"insert_node":case"remove_node":{s.push(...Ln(r,H.parent(u.path)));break}case"merge_node":{var b=H.previous(u.path);s.push(...Ln(r,b));break}case"move_node":{var x=H.common(H.parent(u.path),H.parent(u.newPath));s.push(...Ln(r,x));var C;H.isBefore(u.path,u.newPath)?(s.push(...Ln(r,H.parent(u.path))),C=u.newPath):(s.push(...Ln(r,H.parent(u.newPath))),C=u.path);var y=Be.get(e,H.parent(C)),w=fe.findKey(r,y),A=E.pathRef(r,H.parent(C));c.push([A,w]);break}}switch(n(u),u.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Zn.set(r,!0)}for(var[k,F]of s){var[D]=E.node(r,k);ui.set(D,F)}for(var[I,$]of c){if(I.current){var[M]=E.node(r,I.current);ui.set(M,$)}I.unref()}},r.setFragmentData=u=>{var{selection:s}=r;if(s){var[c,p]=ae.edges(s),d=E.void(r,{at:c.path}),g=E.void(r,{at:p.path});if(!(ae.isCollapsed(s)&&!d)){var h=fe.toDOMRange(r,s),v=h.cloneContents(),f=v.childNodes[0];if(v.childNodes.forEach(D=>{D.textContent&&D.textContent.trim()!==""&&(f=D)}),g){var[b]=g,x=h.cloneRange(),C=fe.toDOMNode(r,b);x.setEndAfter(C),v=x.cloneContents()}if(d&&(f=v.querySelector("[data-slate-spacer]")),Array.from(v.querySelectorAll("[data-slate-zero-width]")).forEach(D=>{var I=D.getAttribute("data-slate-zero-width")==="n";D.textContent=I?`
112
+ `:""}),r1(f)){var y=f.ownerDocument.createElement("span");y.style.whiteSpace="pre",y.appendChild(f),v.appendChild(y),f=y}var w=r.getFragment(),A=JSON.stringify(w),k=window.btoa(encodeURIComponent(A));f.setAttribute("data-slate-fragment",k),u.setData("application/".concat(t),k);var F=v.ownerDocument.createElement("div");return F.appendChild(v),F.setAttribute("hidden","true"),v.ownerDocument.body.appendChild(F),u.setData("text/html",F.innerHTML),u.setData("text/plain",o1(F)),v.ownerDocument.body.removeChild(F),u}}},r.insertData=u=>{r.insertFragmentData(u)||r.insertTextData(u)},r.insertFragmentData=u=>{var s=u.getData("application/".concat(t))||G7(u);if(s){var c=decodeURIComponent(window.atob(s)),p=JSON.parse(c);return r.insertFragment(p),!0}return!1},r.insertTextData=u=>{var s=u.getData("text/plain");if(s){var c=s.split(/\r\n|\r|\n/),p=!1;for(var d of c)p&&we.splitNodes(r,{always:!0}),r.insertText(d),p=!0;return!0}return!1},r.onChange=u=>{var s=G2<18?Ll.unstable_batchedUpdates:c=>c();s(()=>{var c=hs.get(r);c&&c(u),o(u)})},r},Ln=(e,t)=>{var r=[];for(var[n,o]of E.levels(e,{at:t})){var a=fe.findKey(e,n);r.push([o,a])}return r};function Du(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nn=Du();function m1(e){Nn=e}var Po={exec:()=>null};function xt(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(nr.caret,"$1"),r=r.replace(o,l),n},getRegex:()=>new RegExp(r,t)};return n}var nr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},ab=/^(?:[ \t]*(?:\n|$))+/,ib=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,oa=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,sb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Eu=/(?:[*+-]|\d{1,9}[.)])/,v1=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,C1=xt(v1).replace(/bull/g,Eu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ub=xt(v1).replace(/bull/g,Eu).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Su=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cb=/^[^\n]+/,ku=/(?!\s*\])(?:\\.|[^\[\]\\])+/,db=xt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ku).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fb=xt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Eu).getRegex(),Ii="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Au=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pb=xt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Au).replace("tag",Ii).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),b1=xt(Su).replace("hr",oa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ii).getRegex(),gb=xt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",b1).getRegex(),Bu={blockquote:gb,code:ib,def:db,fences:lb,heading:sb,hr:oa,html:pb,lheading:C1,list:fb,newline:ab,paragraph:b1,table:Po,text:cb},md=xt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",oa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ii).getRegex(),hb={...Bu,lheading:ub,table:md,paragraph:xt(Su).replace("hr",oa).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",md).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ii).getRegex()},mb={...Bu,html:xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Au).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Po,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xt(Su).replace("hr",oa).replace("heading",` *#{1,6} *[^
113
+ ]`).replace("lheading",C1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cb=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,y1=/^( {2,}|\\)\n(?!\s*$)/,bb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pi=/[\p{P}\p{S}]/u,Fu=/[\s\p{P}\p{S}]/u,x1=/[^\s\p{P}\p{S}]/u,yb=xt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fu).getRegex(),w1=/(?!~)[\p{P}\p{S}]/u,xb=/(?!~)[\s\p{P}\p{S}]/u,wb=/(?:[^\s\p{P}\p{S}]|~)/u,Db=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,D1=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Eb=xt(D1,"u").replace(/punct/g,Pi).getRegex(),Sb=xt(D1,"u").replace(/punct/g,w1).getRegex(),E1="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",kb=xt(E1,"gu").replace(/notPunctSpace/g,x1).replace(/punctSpace/g,Fu).replace(/punct/g,Pi).getRegex(),Ab=xt(E1,"gu").replace(/notPunctSpace/g,wb).replace(/punctSpace/g,xb).replace(/punct/g,w1).getRegex(),Bb=xt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,x1).replace(/punctSpace/g,Fu).replace(/punct/g,Pi).getRegex(),Fb=xt(/\\(punct)/,"gu").replace(/punct/g,Pi).getRegex(),$b=xt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ob=xt(Au).replace("(?:-->|$)","-->").getRegex(),Nb=xt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ob).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ci=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Rb=xt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ci).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),S1=xt(/^!?\[(label)\]\[(ref)\]/).replace("label",ci).replace("ref",ku).getRegex(),k1=xt(/^!?\[(ref)\](?:\[\])?/).replace("ref",ku).getRegex(),Ib=xt("reflink|nolink(?!\\()","g").replace("reflink",S1).replace("nolink",k1).getRegex(),$u={_backpedal:Po,anyPunctuation:Fb,autolink:$b,blockSkip:Db,br:y1,code:Cb,del:Po,emStrongLDelim:Eb,emStrongRDelimAst:kb,emStrongRDelimUnd:Bb,escape:vb,link:Rb,nolink:k1,punctuation:yb,reflink:S1,reflinkSearch:Ib,tag:Nb,text:bb,url:Po},Pb={...$u,link:xt(/^!?\[(label)\]\((.*?)\)/).replace("label",ci).getRegex(),reflink:xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ci).getRegex()},ys={...$u,emStrongRDelimAst:Ab,emStrongLDelim:Sb,url:xt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Tb={...ys,br:xt(y1).replace("{2,}","*").getRegex(),text:xt(ys.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wa={normal:Bu,gfm:hb,pedantic:mb},Do={normal:$u,gfm:ys,breaks:Tb,pedantic:Pb},Mb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vd=e=>Mb[e];function $r(e,t){if(t){if(nr.escapeTest.test(e))return e.replace(nr.escapeReplace,vd)}else if(nr.escapeTestNoEncode.test(e))return e.replace(nr.escapeReplaceNoEncode,vd);return e}function Cd(e){try{e=encodeURI(e).replace(nr.percentDecode,"%")}catch{return null}return e}function bd(e,t){var a;const r=e.replace(nr.findPipe,(l,i,u)=>{let s=!1,c=i;for(;--c>=0&&u[c]==="\\";)s=!s;return s?"|":" |"}),n=r.split(nr.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(nr.slashPipe,"|");return n}function Eo(e,t,r){const n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function Lb(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function yd(e,t,r,n,o){const a=t.href,l=t.title||null,i=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:l,text:i,tokens:n.inlineTokens(i)};return n.state.inLink=!1,u}function jb(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
114
+ `).map(a=>{const l=a.match(r.other.beginningSpace);if(l===null)return a;const[i]=l;return i.length>=o.length?a.slice(o.length):a}).join(`
115
+ `)}var di=class{constructor(e){St(this,"options"),St(this,"rules"),St(this,"lexer"),this.options=e||Nn}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Eo(r,`
116
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=jb(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const n=Eo(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Eo(t[0],`
117
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=Eo(t[0],`
118
+ `).split(`
119
+ `),n="",o="";const a=[];for(;r.length>0;){let l=!1;const i=[];let u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))i.push(r[u]),l=!0;else if(!l)i.push(r[u]);else break;r=r.slice(u);const s=i.join(`
120
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
121
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
122
+ ${s}`:s,o=o?`${o}
123
+ ${c}`:c;const p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=p,r.length===0)break;const d=a.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){const g=d,h=g.raw+`
124
+ `+r.join(`
125
+ `),v=this.blockquote(h);a[a.length-1]=v,n=n.substring(0,n.length-g.raw.length)+v.raw,o=o.substring(0,o.length-g.text.length)+v.text;break}else if((d==null?void 0:d.type)==="list"){const g=d,h=g.raw+`
126
+ `+r.join(`
127
+ `),v=this.list(h);a[a.length-1]=v,n=n.substring(0,n.length-d.raw.length)+v.raw,o=o.substring(0,o.length-g.raw.length)+v.raw,r=h.substring(a.at(-1).raw.length).split(`
128
+ `);continue}}return{type:"blockquote",raw:n,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let l=!1;for(;e;){let u=!1,s="",c="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let p=t[2].split(`
129
+ `,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=e.split(`
130
+ `,1)[0],g=!p.trim(),h=0;if(this.options.pedantic?(h=2,c=p.trimStart()):g?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,c=p.slice(h),h+=t[1].length),g&&this.rules.other.blankLine.test(d)&&(s+=d+`
131
+ `,e=e.substring(d.length+1),u=!0),!u){const b=this.rules.other.nextBulletRegex(h),x=this.rules.other.hrRegex(h),C=this.rules.other.fencesBeginRegex(h),y=this.rules.other.headingBeginRegex(h),w=this.rules.other.htmlBeginRegex(h);for(;e;){const A=e.split(`
132
+ `,1)[0];let k;if(d=A,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),k=d):k=d.replace(this.rules.other.tabCharGlobal," "),C.test(d)||y.test(d)||w.test(d)||b.test(d)||x.test(d))break;if(k.search(this.rules.other.nonSpaceChar)>=h||!d.trim())c+=`
133
+ `+k.slice(h);else{if(g||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(p)||y.test(p)||x.test(p))break;c+=`
134
+ `+d}!g&&!d.trim()&&(g=!0),s+=A+`
135
+ `,e=e.substring(A.length+1),p=k.slice(h)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(l=!0));let v=null,f;this.options.gfm&&(v=this.rules.other.listIsTask.exec(c),v&&(f=v[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:s,task:!!v,checked:f,loose:!1,text:c,tokens:[]}),o.raw+=s}const i=o.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let u=0;u<o.items.length;u++)if(this.lexer.state.top=!1,o.items[u].tokens=this.lexer.blockTokens(o.items[u].text,[]),!o.loose){const s=o.items[u].tokens.filter(p=>p.type==="space"),c=s.length>0&&s.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=c}if(o.loose)for(let u=0;u<o.items.length;u++)o.items[u].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:o}}}table(e){var l;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=bd(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
136
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const i of n)this.rules.other.tableAlignRight.test(i)?a.align.push("right"):this.rules.other.tableAlignCenter.test(i)?a.align.push("center"):this.rules.other.tableAlignLeft.test(i)?a.align.push("left"):a.align.push(null);for(let i=0;i<r.length;i++)a.header.push({text:r[i],tokens:this.lexer.inline(r[i]),header:!0,align:a.align[i]});for(const i of o)a.rows.push(bd(i,a.header.length).map((u,s)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:a.align[s]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
137
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=Eo(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Lb(t[2],"()");if(a===-2)return;if(a>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),yd(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[n.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return yd(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){const o=[...n[0]].length-1;let a,l,i=o,u=0;const s=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(s.lastIndex=0,t=t.slice(-1*e.length+o);(n=s.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(l=[...a].length,n[3]||n[4]){i+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){u+=l;continue}if(i-=l,i>0)continue;l=Math.min(l,l+i+u);const c=[...n[0]][0].length,p=e.slice(0,o+n.index+c+l);if(Math.min(o,l)%2){const g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}const d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},_r=class xs{constructor(t){St(this,"tokens"),St(this,"options"),St(this,"state"),St(this,"tokenizer"),St(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Nn,this.options.tokenizer=this.options.tokenizer||new di,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:nr,block:wa.normal,inline:Do.normal};this.options.pedantic?(r.block=wa.pedantic,r.inline=Do.pedantic):this.options.gfm&&(r.block=wa.gfm,this.options.breaks?r.inline=Do.breaks:r.inline=Do.gfm),this.tokenizer.rules=r}static get rules(){return{block:wa,inline:Do}}static lex(t,r){return new xs(r).lex(t)}static lexInline(t,r){return new xs(r).inlineTokens(t)}lex(t){t=t.replace(nr.carriageReturn,`
138
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var o,a,l;for(this.options.pedantic&&(t=t.replace(nr.tabCharGlobal," ").replace(nr.spaceLine,""));t;){let i;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(s=>(i=s.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);const s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
139
+ `:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
140
+ `+i.raw,s.text+=`
141
+ `+i.text,this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="paragraph"||(s==null?void 0:s.type)==="text"?(s.raw+=`
142
+ `+i.raw,s.text+=`
143
+ `+i.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let u=t;if((l=this.options.extensions)!=null&&l.startBlock){let s=1/0;const c=t.slice(1);let p;this.options.extensions.startBlock.forEach(d=>{p=d.call({lexer:this},c),typeof p=="number"&&p>=0&&(s=Math.min(s,p))}),s<1/0&&s>=0&&(u=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(u))){const s=r.at(-1);n&&(s==null?void 0:s.type)==="paragraph"?(s.raw+=`
144
+ `+i.raw,s.text+=`
145
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i),n=u.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);const s=r.at(-1);(s==null?void 0:s.type)==="text"?(s.raw+=`
146
+ `+i.raw,s.text+=`
147
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var i,u,s;let n=t,o=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,l="";for(;t;){a||(l=""),a=!1;let c;if((u=(i=this.options.extensions)==null?void 0:i.inline)!=null&&u.some(d=>(c=d.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);const d=r.at(-1);c.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,n,l)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let p=t;if((s=this.options.extensions)!=null&&s.startInline){let d=1/0;const g=t.slice(1);let h;this.options.extensions.startInline.forEach(v=>{h=v.call({lexer:this},g),typeof h=="number"&&h>=0&&(d=Math.min(d,h))}),d<1/0&&d>=0&&(p=t.substring(0,d+1))}if(c=this.tokenizer.inlineText(p)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(l=c.raw.slice(-1)),a=!0;const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):r.push(c);continue}if(t){const d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return r}},fi=class{constructor(e){St(this,"options"),St(this,"parser"),this.options=e||Nn}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(nr.notSpaceStart))==null?void 0:a[0],o=e.replace(nr.endingNewline,"")+`
148
+ `;return n?'<pre><code class="language-'+$r(n)+'">'+(r?o:$r(o,!0))+`</code></pre>
149
+ `:"<pre><code>"+(r?o:$r(o,!0))+`</code></pre>
150
+ `}blockquote({tokens:e}){return`<blockquote>
151
+ ${this.parser.parse(e)}</blockquote>
152
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
153
+ `}hr(e){return`<hr>
154
+ `}list(e){const t=e.ordered,r=e.start;let n="";for(let l=0;l<e.items.length;l++){const i=e.items[l];n+=this.listitem(i)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
155
+ `+n+"</"+o+`>
156
+ `}listitem(e){var r;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+$r(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
157
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
158
+ `}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const a=e.rows[o];r="";for(let l=0;l<a.length;l++)r+=this.tablecell(a[l]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
159
+ <thead>
160
+ `+t+`</thead>
161
+ `+n+`</table>
162
+ `}tablerow({text:e}){return`<tr>
163
+ ${e}</tr>
164
+ `}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
165
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${$r(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=Cd(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+$r(t)+'"'),a+=">"+n+"</a>",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=Cd(e);if(o===null)return $r(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${$r(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$r(e.text)}},Ou=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},zr=class ws{constructor(t){St(this,"options"),St(this,"renderer"),St(this,"textRenderer"),this.options=t||Nn,this.options.renderer=this.options.renderer||new fi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ou}static parse(t,r){return new ws(r).parse(t)}static parseInline(t,r){return new ws(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let l=0;l<t.length;l++){const i=t[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[i.type]){const s=i,c=this.options.extensions.renderers[s.type].call({parser:this},s);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){n+=c||"";continue}}const u=i;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let s=u,c=this.renderer.text(s);for(;l+1<t.length&&t[l+1].type==="text";)s=t[++l],c+=`
166
+ `+this.renderer.text(s);r?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let l=0;l<t.length;l++){const i=t[l];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[i.type]){const s=this.options.extensions.renderers[i.type].call({parser:this},i);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=s||"";continue}}const u=i;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{const s='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},Bl,Ta=(Bl=class{constructor(e){St(this,"options"),St(this,"block"),this.options=e||Nn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?_r.lex:_r.lexInline}provideParser(){return this.block?zr.parse:zr.parseInline}},St(Bl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Bl),_b=class{constructor(...e){St(this,"defaults",Du()),St(this,"options",this.setOptions),St(this,"parse",this.parseMarkdown(!0)),St(this,"parseInline",this.parseMarkdown(!1)),St(this,"Parser",zr),St(this,"Renderer",fi),St(this,"TextRenderer",Ou),St(this,"Lexer",_r),St(this,"Tokenizer",di),St(this,"Hooks",Ta),this.use(...e)}walkTokens(e,t){var n,o;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const l=a;for(const i of l.header)r=r.concat(this.walkTokens(i.tokens,t));for(const i of l.rows)for(const u of i)r=r.concat(this.walkTokens(u.tokens,t));break}case"list":{const l=a;r=r.concat(this.walkTokens(l.items,t));break}default:{const l=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[l.type]?this.defaults.extensions.childTokens[l.type].forEach(i=>{const u=l[i].flat(1/0);r=r.concat(this.walkTokens(u,t))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=t.renderers[o.name];a?t.renderers[o.name]=function(...l){let i=o.renderer.apply(this,l);return i===!1&&(i=a.apply(this,l)),i}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=this.defaults.renderer||new fi(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const l=a,i=r.renderer[l],u=o[l];o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new di(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const l=a,i=r.tokenizer[l],u=o[l];o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new Ta;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const l=a,i=r.hooks[l],u=o[l];Ta.passThroughHooks.has(a)?o[l]=s=>{if(this.defaults.async)return Promise.resolve(i.call(o,s)).then(p=>u.call(o,p));const c=i.call(o,s);return u.call(o,c)}:o[l]=(...s)=>{let c=i.apply(o,s);return c===!1&&(c=u.apply(o,s)),c}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(l){let i=[];return i.push(a.call(this,l)),o&&(i=i.concat(o.call(this,l))),i}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _r.lex(e,t??this.defaults)}parser(e,t){return zr.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?_r.lex:_r.lexInline,i=o.hooks?o.hooks.provideParser():e?zr.parse:zr.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(u=>l(u,o)).then(u=>o.hooks?o.hooks.processAllTokens(u):u).then(u=>o.walkTokens?Promise.all(this.walkTokens(u,o.walkTokens)).then(()=>u):u).then(u=>i(u,o)).then(u=>o.hooks?o.hooks.postprocess(u):u).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let u=l(t,o);o.hooks&&(u=o.hooks.processAllTokens(u)),o.walkTokens&&this.walkTokens(u,o.walkTokens);let s=i(u,o);return o.hooks&&(s=o.hooks.postprocess(s)),s}catch(u){return a(u)}}}onError(e,t){return r=>{if(r.message+=`
167
+ Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+$r(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},On=new _b;function vt(e,t){return On.parse(e,t)}vt.options=vt.setOptions=function(e){return On.setOptions(e),vt.defaults=On.defaults,m1(vt.defaults),vt};vt.getDefaults=Du;vt.defaults=Nn;vt.use=function(...e){return On.use(...e),vt.defaults=On.defaults,m1(vt.defaults),vt};vt.walkTokens=function(e,t){return On.walkTokens(e,t)};vt.parseInline=On.parseInline;vt.Parser=zr;vt.parser=zr.parse;vt.Renderer=fi;vt.TextRenderer=Ou;vt.Lexer=_r;vt.lexer=_r.lex;vt.Tokenizer=di;vt.Hooks=Ta;vt.parse=vt;vt.options;vt.setOptions;vt.use;vt.walkTokens;vt.parseInline;zr.parse;_r.lex;var cr=function(){return cr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},cr.apply(this,arguments)};function pi(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var At="-ms-",To="-moz-",yt="-webkit-",A1="comm",Ti="rule",Nu="decl",zb="@import",B1="@keyframes",Hb="@layer",F1=Math.abs,Ru=String.fromCharCode,Ds=Object.assign;function Kb(e,t){return zt(e,0)^45?(((t<<2^zt(e,0))<<2^zt(e,1))<<2^zt(e,2))<<2^zt(e,3):0}function $1(e){return e.trim()}function Lr(e,t){return(e=t.exec(e))?e[0]:e}function it(e,t,r){return e.replace(t,r)}function Ma(e,t,r){return e.indexOf(t,r)}function zt(e,t){return e.charCodeAt(t)|0}function eo(e,t,r){return e.slice(t,r)}function Or(e){return e.length}function O1(e){return e.length}function Ao(e,t){return t.push(e),e}function Vb(e,t){return e.map(t).join("")}function xd(e,t){return e.filter(function(r){return!Lr(r,t)})}var Mi=1,to=1,N1=0,yr=0,Tt=0,po="";function Li(e,t,r,n,o,a,l,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Mi,column:to,length:l,return:"",siblings:i}}function Qr(e,t){return Ds(Li("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function jn(e){for(;e.root;)e=Qr(e.root,{children:[e]});Ao(e,e.siblings)}function Wb(){return Tt}function qb(){return Tt=yr>0?zt(po,--yr):0,to--,Tt===10&&(to=1,Mi--),Tt}function Er(){return Tt=yr<N1?zt(po,yr++):0,to++,Tt===10&&(to=1,Mi++),Tt}function En(){return zt(po,yr)}function La(){return yr}function ji(e,t){return eo(po,e,t)}function Es(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ub(e){return Mi=to=1,N1=Or(po=e),yr=0,[]}function Zb(e){return po="",e}function Fl(e){return $1(ji(yr-1,Ss(e===91?e+2:e===40?e+1:e)))}function Gb(e){for(;(Tt=En())&&Tt<33;)Er();return Es(e)>2||Es(Tt)>3?"":" "}function Xb(e,t){for(;--t&&Er()&&!(Tt<48||Tt>102||Tt>57&&Tt<65||Tt>70&&Tt<97););return ji(e,La()+(t<6&&En()==32&&Er()==32))}function Ss(e){for(;Er();)switch(Tt){case e:return yr;case 34:case 39:e!==34&&e!==39&&Ss(Tt);break;case 40:e===41&&Ss(e);break;case 92:Er();break}return yr}function Yb(e,t){for(;Er()&&e+Tt!==57&&!(e+Tt===84&&En()===47););return"/*"+ji(t,yr-1)+"*"+Ru(e===47?e:Er())}function Jb(e){for(;!Es(En());)Er();return ji(e,yr)}function Qb(e){return Zb(ja("",null,null,null,[""],e=Ub(e),0,[0],e))}function ja(e,t,r,n,o,a,l,i,u){for(var s=0,c=0,p=l,d=0,g=0,h=0,v=1,f=1,b=1,x=0,C="",y=o,w=a,A=n,k=C;f;)switch(h=x,x=Er()){case 40:if(h!=108&&zt(k,p-1)==58){Ma(k+=it(Fl(x),"&","&\f"),"&\f",F1(s?i[s-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:k+=Fl(x);break;case 9:case 10:case 13:case 32:k+=Gb(h);break;case 92:k+=Xb(La()-1,7);continue;case 47:switch(En()){case 42:case 47:Ao(ey(Yb(Er(),La()),t,r,u),u);break;default:k+="/"}break;case 123*v:i[s++]=Or(k)*b;case 125*v:case 59:case 0:switch(x){case 0:case 125:f=0;case 59+c:b==-1&&(k=it(k,/\f/g,"")),g>0&&Or(k)-p&&Ao(g>32?Dd(k+";",n,r,p-1,u):Dd(it(k," ","")+";",n,r,p-2,u),u);break;case 59:k+=";";default:if(Ao(A=wd(k,t,r,s,c,o,i,C,y=[],w=[],p,a),a),x===123)if(c===0)ja(k,t,A,A,y,a,p,i,w);else switch(d===99&&zt(k,3)===110?100:d){case 100:case 108:case 109:case 115:ja(e,A,A,n&&Ao(wd(e,A,A,0,0,o,i,C,o,y=[],p,w),w),o,w,p,i,n?y:w);break;default:ja(k,A,A,A,[""],w,0,i,w)}}s=c=g=0,v=b=1,C=k="",p=l;break;case 58:p=1+Or(k),g=h;default:if(v<1){if(x==123)--v;else if(x==125&&v++==0&&qb()==125)continue}switch(k+=Ru(x),x*v){case 38:b=c>0?1:(k+="\f",-1);break;case 44:i[s++]=(Or(k)-1)*b,b=1;break;case 64:En()===45&&(k+=Fl(Er())),d=En(),c=p=Or(C=k+=Jb(La())),x++;break;case 45:h===45&&Or(k)==2&&(v=0)}}return a}function wd(e,t,r,n,o,a,l,i,u,s,c,p){for(var d=o-1,g=o===0?a:[""],h=O1(g),v=0,f=0,b=0;v<n;++v)for(var x=0,C=eo(e,d+1,d=F1(f=l[v])),y=e;x<h;++x)(y=$1(f>0?g[x]+" "+C:it(C,/&\f/g,g[x])))&&(u[b++]=y);return Li(e,t,r,o===0?Ti:i,u,s,c,p)}function ey(e,t,r,n){return Li(e,t,r,A1,Ru(Wb()),eo(e,2,-2),0,n)}function Dd(e,t,r,n,o){return Li(e,t,r,Nu,eo(e,0,n),eo(e,n+1,-1),n,o)}function R1(e,t,r){switch(Kb(e,t)){case 5103:return yt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return yt+e+e;case 4789:return To+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return yt+e+To+e+At+e+e;case 5936:switch(zt(e,t+11)){case 114:return yt+e+At+it(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return yt+e+At+it(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return yt+e+At+it(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return yt+e+At+e+e;case 6165:return yt+e+At+"flex-"+e+e;case 5187:return yt+e+it(e,/(\w+).+(:[^]+)/,yt+"box-$1$2"+At+"flex-$1$2")+e;case 5443:return yt+e+At+"flex-item-"+it(e,/flex-|-self/g,"")+(Lr(e,/flex-|baseline/)?"":At+"grid-row-"+it(e,/flex-|-self/g,""))+e;case 4675:return yt+e+At+"flex-line-pack"+it(e,/align-content|flex-|-self/g,"")+e;case 5548:return yt+e+At+it(e,"shrink","negative")+e;case 5292:return yt+e+At+it(e,"basis","preferred-size")+e;case 6060:return yt+"box-"+it(e,"-grow","")+yt+e+At+it(e,"grow","positive")+e;case 4554:return yt+it(e,/([^-])(transform)/g,"$1"+yt+"$2")+e;case 6187:return it(it(it(e,/(zoom-|grab)/,yt+"$1"),/(image-set)/,yt+"$1"),e,"")+e;case 5495:case 3959:return it(e,/(image-set\([^]*)/,yt+"$1$`$1");case 4968:return it(it(e,/(.+:)(flex-)?(.*)/,yt+"box-pack:$3"+At+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+yt+e+e;case 4200:if(!Lr(e,/flex-|baseline/))return At+"grid-column-align"+eo(e,t)+e;break;case 2592:case 3360:return At+it(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,Lr(n.props,/grid-\w+-end/)})?~Ma(e+(r=r[t].value),"span",0)?e:At+it(e,"-start","")+e+At+"grid-row-span:"+(~Ma(r,"span",0)?Lr(r,/\d+/):+Lr(r,/\d+/)-+Lr(e,/\d+/))+";":At+it(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return Lr(n.props,/grid-\w+-start/)})?e:At+it(it(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return it(e,/(.+)-inline(.+)/,yt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Or(e)-1-t>6)switch(zt(e,t+1)){case 109:if(zt(e,t+4)!==45)break;case 102:return it(e,/(.+:)(.+)-([^]+)/,"$1"+yt+"$2-$3$1"+To+(zt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ma(e,"stretch",0)?R1(it(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return it(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,l,i,u,s){return At+o+":"+a+s+(l?At+o+"-span:"+(i?u:+u-+a)+s:"")+e});case 4949:if(zt(e,t+6)===121)return it(e,":",":"+yt)+e;break;case 6444:switch(zt(e,zt(e,14)===45?18:11)){case 120:return it(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+yt+(zt(e,14)===45?"inline-":"")+"box$3$1"+yt+"$2$3$1"+At+"$2box$3")+e;case 100:return it(e,":",":"+At)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return it(e,"scroll-","scroll-snap-")+e}return e}function gi(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function ty(e,t,r,n){switch(e.type){case Hb:if(e.children.length)break;case zb:case Nu:return e.return=e.return||e.value;case A1:return"";case B1:return e.return=e.value+"{"+gi(e.children,n)+"}";case Ti:if(!Or(e.value=e.props.join(",")))return""}return Or(r=gi(e.children,n))?e.return=e.value+"{"+r+"}":""}function ry(e){var t=O1(e);return function(r,n,o,a){for(var l="",i=0;i<t;i++)l+=e[i](r,n,o,a)||"";return l}}function ny(e){return function(t){t.root||(t=t.return)&&e(t)}}function oy(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Nu:e.return=R1(e.value,e.length,r);return;case B1:return gi([Qr(e,{value:it(e.value,"@","@"+yt)})],n);case Ti:if(e.length)return Vb(r=e.props,function(o){switch(Lr(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":jn(Qr(e,{props:[it(o,/:(read-\w+)/,":"+To+"$1")]})),jn(Qr(e,{props:[o]})),Ds(e,{props:xd(r,n)});break;case"::placeholder":jn(Qr(e,{props:[it(o,/:(plac\w+)/,":"+yt+"input-$1")]})),jn(Qr(e,{props:[it(o,/:(plac\w+)/,":"+To+"$1")]})),jn(Qr(e,{props:[it(o,/:(plac\w+)/,At+"input-$1")]})),jn(Qr(e,{props:[o]})),Ds(e,{props:xd(r,n)});break}return""})}}var ay={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ro=typeof process<"u"&&dr!==void 0&&(dr.REACT_APP_SC_ATTR||dr.SC_ATTR)||"data-styled",I1="active",P1="data-styled-version",_i="6.1.19",Iu=`/*!sc*/
168
+ `,hi=typeof window<"u"&&typeof document<"u",iy=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&dr!==void 0&&dr.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&dr.REACT_APP_SC_DISABLE_SPEEDY!==""?dr.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&dr.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&dr!==void 0&&dr.SC_DISABLE_SPEEDY!==void 0&&dr.SC_DISABLE_SPEEDY!==""&&dr.SC_DISABLE_SPEEDY!=="false"&&dr.SC_DISABLE_SPEEDY),zi=Object.freeze([]),no=Object.freeze({});function ly(e,t,r){return r===void 0&&(r=no),e.theme!==r.theme&&e.theme||t||r.theme}var T1=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),sy=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,uy=/(^-|-$)/g;function Ed(e){return e.replace(sy,"-").replace(uy,"")}var cy=/(a)(d)/gi,Da=52,Sd=function(e){return String.fromCharCode(e+(e>25?39:97))};function ks(e){var t,r="";for(t=Math.abs(e);t>Da;t=t/Da|0)r=Sd(t%Da)+r;return(Sd(t%Da)+r).replace(cy,"$1-$2")}var $l,M1=5381,Vn=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},L1=function(e){return Vn(M1,e)};function dy(e){return ks(L1(e)>>>0)}function fy(e){return e.displayName||e.name||"Component"}function Ol(e){return typeof e=="string"&&!0}var j1=typeof Symbol=="function"&&Symbol.for,_1=j1?Symbol.for("react.memo"):60115,py=j1?Symbol.for("react.forward_ref"):60112,gy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},hy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},z1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},my=(($l={})[py]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$l[_1]=z1,$l);function kd(e){return("type"in(t=e)&&t.type.$$typeof)===_1?z1:"$$typeof"in e?my[e.$$typeof]:gy;var t}var vy=Object.defineProperty,Cy=Object.getOwnPropertyNames,Ad=Object.getOwnPropertySymbols,by=Object.getOwnPropertyDescriptor,yy=Object.getPrototypeOf,Bd=Object.prototype;function H1(e,t,r){if(typeof t!="string"){if(Bd){var n=yy(t);n&&n!==Bd&&H1(e,n,r)}var o=Cy(t);Ad&&(o=o.concat(Ad(t)));for(var a=kd(e),l=kd(t),i=0;i<o.length;++i){var u=o[i];if(!(u in hy||r&&r[u]||l&&u in l||a&&u in a)){var s=by(t,u);try{vy(e,u,s)}catch{}}}}return e}function oo(e){return typeof e=="function"}function Pu(e){return typeof e=="object"&&"styledComponentId"in e}function yn(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Fd(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Zo(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function As(e,t,r){if(r===void 0&&(r=!1),!r&&!Zo(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=As(e[n],t[n]);else if(Zo(t))for(var n in t)e[n]=As(e[n],t[n]);return e}function Tu(e,t){Object.defineProperty(e,"toString",{value:t})}function aa(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var xy=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)if((a<<=1)<0)throw aa(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var l=o;l<a;l++)this.groupSizes[l]=0}for(var i=this.indexOfGroup(t+1),u=(l=0,r.length);l<u;l++)this.tag.insertRule(i,r[l])&&(this.groupSizes[t]++,i++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,l=o;l<a;l++)r+="".concat(this.tag.getRule(l)).concat(Iu);return r},e})(),_a=new Map,mi=new Map,za=1,Ea=function(e){if(_a.has(e))return _a.get(e);for(;mi.has(za);)za++;var t=za++;return _a.set(e,t),mi.set(t,e),t},wy=function(e,t){za=t+1,_a.set(e,t),mi.set(t,e)},Dy="style[".concat(ro,"][").concat(P1,'="').concat(_i,'"]'),Ey=new RegExp("^".concat(ro,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Sy=function(e,t,r){for(var n,o=r.split(","),a=0,l=o.length;a<l;a++)(n=o[a])&&e.registerName(t,n)},ky=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Iu),o=[],a=0,l=n.length;a<l;a++){var i=n[a].trim();if(i){var u=i.match(Ey);if(u){var s=0|parseInt(u[1],10),c=u[2];s!==0&&(wy(c,s),Sy(e,c,u[3]),e.getTag().insertRules(s,o)),o.length=0}else o.push(i)}}},$d=function(e){for(var t=document.querySelectorAll(Dy),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(ro)!==I1&&(ky(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Ay(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var K1=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(i){var u=Array.from(i.querySelectorAll("style[".concat(ro,"]")));return u[u.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(ro,I1),n.setAttribute(P1,_i);var l=Ay();return l&&n.setAttribute("nonce",l),r.insertBefore(n,a),n},By=(function(){function e(t){this.element=K1(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,a=n.length;o<a;o++){var l=n[o];if(l.ownerNode===r)return l}throw aa(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),Fy=(function(){function e(t){this.element=K1(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),$y=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),Od=hi,Oy={isServer:!hi,useCSSOMInjection:!iy},V1=(function(){function e(t,r,n){t===void 0&&(t=no),r===void 0&&(r={});var o=this;this.options=cr(cr({},Oy),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&hi&&Od&&(Od=!1,$d(this)),Tu(this,function(){return(function(a){for(var l=a.getTag(),i=l.length,u="",s=function(p){var d=(function(b){return mi.get(b)})(p);if(d===void 0)return"continue";var g=a.names.get(d),h=l.getGroup(p);if(g===void 0||!g.size||h.length===0)return"continue";var v="".concat(ro,".g").concat(p,'[id="').concat(d,'"]'),f="";g!==void 0&&g.forEach(function(b){b.length>0&&(f+="".concat(b,","))}),u+="".concat(h).concat(v,'{content:"').concat(f,'"}').concat(Iu)},c=0;c<i;c++)s(c);return u})(o)})}return e.registerId=function(t){return Ea(t)},e.prototype.rehydrate=function(){!this.server&&hi&&$d(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(cr(cr({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new $y(o):n?new By(o):new Fy(o)})(this.options),new xy(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Ea(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(Ea(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Ea(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),Ny=/&/g,Ry=/^\s*\/\/.*$/gm;function W1(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=W1(r.children,t)),r})}function Iy(e){var t,r,n,o=no,a=o.options,l=a===void 0?no:a,i=o.plugins,u=i===void 0?zi:i,s=function(d,g,h){return h.startsWith(r)&&h.endsWith(r)&&h.replaceAll(r,"").length>0?".".concat(t):d},c=u.slice();c.push(function(d){d.type===Ti&&d.value.includes("&")&&(d.props[0]=d.props[0].replace(Ny,r).replace(n,s))}),l.prefix&&c.push(oy),c.push(ty);var p=function(d,g,h,v){g===void 0&&(g=""),h===void 0&&(h=""),v===void 0&&(v="&"),t=v,r=g,n=new RegExp("\\".concat(r,"\\b"),"g");var f=d.replace(Ry,""),b=Qb(h||g?"".concat(h," ").concat(g," { ").concat(f," }"):f);l.namespace&&(b=W1(b,l.namespace));var x=[];return gi(b,ry(c.concat(ny(function(C){return x.push(C)})))),x};return p.hash=u.length?u.reduce(function(d,g){return g.name||aa(15),Vn(d,g.name)},M1).toString():"",p}var Py=new V1,Bs=Iy(),q1=Ce.createContext({shouldForwardProp:void 0,styleSheet:Py,stylis:Bs});q1.Consumer;Ce.createContext(void 0);function Nd(){return Vr(q1)}var Ty=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=Bs);var l=n.name+a.hash;o.hasNameForId(n.id,l)||o.insertRules(n.id,l,a(n.rules,l,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,Tu(this,function(){throw aa(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Bs),this.name+t.hash},e})(),My=function(e){return e>="A"&&e<="Z"};function Rd(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;My(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var U1=function(e){return e==null||e===!1||e===""},Z1=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!U1(a)&&(Array.isArray(a)&&a.isCss||oo(a)?n.push("".concat(Rd(o),":"),a,";"):Zo(a)?n.push.apply(n,pi(pi(["".concat(o," {")],Z1(a),!1),["}"],!1)):n.push("".concat(Rd(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in ay||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Sn(e,t,r,n){if(U1(e))return[];if(Pu(e))return[".".concat(e.styledComponentId)];if(oo(e)){if(!oo(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return Sn(o,t,r,n)}var a;return e instanceof Ty?r?(e.inject(r,n),[e.getName(n)]):[e]:Zo(e)?Z1(e):Array.isArray(e)?Array.prototype.concat.apply(zi,e.map(function(l){return Sn(l,t,r,n)})):[e.toString()]}function Ly(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(oo(r)&&!Pu(r))return!1}return!0}var jy=L1(_i),_y=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&Ly(t),this.componentId=r,this.baseHash=Vn(jy,r),this.baseStyle=n,V1.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=yn(o,this.staticRulesId);else{var a=Fd(Sn(this.rules,t,r,n)),l=ks(Vn(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,l)){var i=n(a,".".concat(l),void 0,this.componentId);r.insertRules(this.componentId,l,i)}o=yn(o,l),this.staticRulesId=l}else{for(var u=Vn(this.baseHash,n.hash),s="",c=0;c<this.rules.length;c++){var p=this.rules[c];if(typeof p=="string")s+=p;else if(p){var d=Fd(Sn(p,t,r,n));u=Vn(u,d+c),s+=d}}if(s){var g=ks(u>>>0);r.hasNameForId(this.componentId,g)||r.insertRules(this.componentId,g,n(s,".".concat(g),void 0,this.componentId)),o=yn(o,g)}}return o},e})(),G1=Ce.createContext(void 0);G1.Consumer;var Nl={};function zy(e,t,r){var n=Pu(e),o=e,a=!Ol(e),l=t.attrs,i=l===void 0?zi:l,u=t.componentId,s=u===void 0?(function(y,w){var A=typeof y!="string"?"sc":Ed(y);Nl[A]=(Nl[A]||0)+1;var k="".concat(A,"-").concat(dy(_i+A+Nl[A]));return w?"".concat(w,"-").concat(k):k})(t.displayName,t.parentComponentId):u,c=t.displayName,p=c===void 0?(function(y){return Ol(y)?"styled.".concat(y):"Styled(".concat(fy(y),")")})(e):c,d=t.displayName&&t.componentId?"".concat(Ed(t.displayName),"-").concat(t.componentId):t.componentId||s,g=n&&o.attrs?o.attrs.concat(i).filter(Boolean):i,h=t.shouldForwardProp;if(n&&o.shouldForwardProp){var v=o.shouldForwardProp;if(t.shouldForwardProp){var f=t.shouldForwardProp;h=function(y,w){return v(y,w)&&f(y,w)}}else h=v}var b=new _y(r,d,n?o.componentStyle:void 0);function x(y,w){return(function(A,k,F){var D=A.attrs,I=A.componentStyle,$=A.defaultProps,M=A.foldedComponentIds,P=A.styledComponentId,S=A.target,B=Ce.useContext(G1),N=Nd(),R=A.shouldForwardProp||N.shouldForwardProp,L=ly(k,B,$)||no,O=(function(se,T,Z){for(var W,z=cr(cr({},T),{className:void 0,theme:Z}),G=0;G<se.length;G+=1){var Y=oo(W=se[G])?W(z):W;for(var J in Y)z[J]=J==="className"?yn(z[J],Y[J]):J==="style"?cr(cr({},z[J]),Y[J]):Y[J]}return T.className&&(z.className=yn(z.className,T.className)),z})(D,k,L),V=O.as||S,_={};for(var K in O)O[K]===void 0||K[0]==="$"||K==="as"||K==="theme"&&O.theme===L||(K==="forwardedAs"?_.as=O.forwardedAs:R&&!R(K,V)||(_[K]=O[K]));var q=(function(se,T){var Z=Nd(),W=se.generateAndInjectStyles(T,Z.styleSheet,Z.stylis);return W})(I,O),Q=yn(M,P);return q&&(Q+=" "+q),O.className&&(Q+=" "+O.className),_[Ol(V)&&!T1.has(V)?"class":"className"]=Q,F&&(_.ref=F),Ha(V,_)})(C,y,w)}x.displayName=p;var C=Ce.forwardRef(x);return C.attrs=g,C.componentStyle=b,C.displayName=p,C.shouldForwardProp=h,C.foldedComponentIds=n?yn(o.foldedComponentIds,o.styledComponentId):"",C.styledComponentId=d,C.target=n?o.target:e,Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(y){this._foldedDefaultProps=n?(function(w){for(var A=[],k=1;k<arguments.length;k++)A[k-1]=arguments[k];for(var F=0,D=A;F<D.length;F++)As(w,D[F],!0);return w})({},o.defaultProps,y):y}}),Tu(C,function(){return".".concat(C.styledComponentId)}),a&&H1(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function Id(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var Pd=function(e){return Object.assign(e,{isCss:!0})};function Hy(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(oo(e)||Zo(e))return Pd(Sn(Id(zi,pi([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Sn(n):Pd(Sn(Id(n,t)))}function Fs(e,t,r){if(r===void 0&&(r=no),!t)throw aa(1,t);var n=function(o){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];return e(t,r,Hy.apply(void 0,pi([o],a,!1)))};return n.attrs=function(o){return Fs(e,t,cr(cr({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return Fs(e,t,cr(cr({},r),o))},n}var X1=function(e){return Fs(zy,e)},It=X1;T1.forEach(function(e){It[e]=X1(e)});const Ky=It.span`
169
+ display: inline-block;
170
+ min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
171
+ padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
172
+ margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
173
+ border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
174
+ border: none !important;
175
+ cursor: pointer;
176
+ transition: all 0.2s;
177
+ font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
178
+ user-select: none;
179
+ font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
180
+ line-height: 2;
181
+ width: auto; /* 让宽度根据内容自动调整 */
182
+ min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
183
+ min-height: ${e=>{var l,i,u,s;const t=((i=(l=e.$styles)==null?void 0:l.templateField)==null?void 0:i.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
184
+
185
+ /* 高度自适应 */
186
+ height: auto; /* 允许高度根据内容自动调整 */
187
+ white-space: normal; /* 允许换行 */
188
+ box-sizing: border-box; /* 确保padding和border包含在宽度内 */
189
+ overflow: visible; /* 确保内容不被隐藏 */
190
+ word-wrap: break-word; /* 允许长单词换行 */
191
+ max-width: 100%; /* 限制在容器宽度内 */
192
+
193
+ /* 使用传入的样式配置 */
194
+ background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
195
+ color: #055AFF;
196
+ border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
197
+
198
+ ${e=>{var t,r;return e.$isEditing&&`
199
+ background-color: white !important;
200
+ color: #055AFF !important;
201
+ border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
202
+ outline: none;
203
+ min-width: 30px;
204
+ `}}
205
+
206
+ &:hover {
207
+ opacity: 0.8;
208
+ }
209
+ `,Vy=It.input`
210
+ background: white;
211
+ border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
212
+ border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
213
+ padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
214
+ margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
215
+ min-width: ${"30px"};
216
+ width: ${e=>{var s,c,p,d;const t=e.$value.length;if(t===0)return((c=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:c.minWidth)||"120px";const r=((d=(p=e.$styles)==null?void 0:p.templateField)==null?void 0:d.padding)||"2px 6.2px",n=r.split(" ").map(g=>parseInt(g)),o=n.length===2?n[1]:n[0],a=12.5,l=20,i=t*a+o*2+l,u=Math.min(Math.max(i,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:l,calculatedWidth:i,maxWidth:e.$maxWidth,finalWidth:u,inputValue:e.$value}),u+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
217
+ height: ${e=>{var l,i,u,s;const t=((i=(l=e.$styles)==null?void 0:l.templateField)==null?void 0:i.padding)||"2px 6px",r=((s=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:s.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
218
+ font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
219
+ font-family: inherit;
220
+ outline: none;
221
+ color: #055AFF;
222
+ line-height: 2;
223
+ box-sizing: border-box;
224
+ white-space: nowrap; /* 防止内部换行 */
225
+ overflow: hidden; /* 隐藏超出部分 */
226
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
227
+
228
+ &:focus {
229
+ border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
230
+ box-shadow: 0 0 0 3px ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}}20;
231
+ }
232
+ `,Y1=cn(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var A,k,F,D,I,$,M,P,S,B,N,R;const l=g1(),[i,u]=et(!1),[s,c]=et(e.value||""),[p,d]=et(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[g,h]=et(600),v=at(null),f=Ge(()=>{try{const L=document.querySelector('[data-slate-editor="true"]');if(L){const O=L.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||L.parentElement;if(O){const V=O.clientWidth,_=V-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",V,"\u53EF\u7528\u5BBD\u5EA6:",_),Math.max(_,200)}}return 600}catch(L){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",L),600}},[]);gt(()=>{d(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const L=f();h(L)},[e.value,e.placeholder,f]);const b=Ge(()=>{u(!0),c(e.value||""),setTimeout(()=>{v.current&&(v.current.focus(),v.current.select())},0)},[e.value]),x=Ge(L=>{const O=L.target.value;c(O)},[]),C=Ge(()=>{const L=fe.findPath(l,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",L),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",s),we.setNodes(l,{value:s},{at:L});const O=s.trim()!==""?s:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";d(O);const V=l.children[L[0]];if(V&&"children"in V){const _=V.children[L[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",_)}u(!1)},[l,e,s]),y=Ge(()=>{C()},[C]),w=Ge(L=>{L.key==="Enter"?(L.preventDefault(),C()):L.key==="Escape"&&(L.preventDefault(),c(e.value||""),u(!1))},[C,e.value]);return i?j.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[j.jsx(Vy,{ref:v,value:s,onChange:x,onBlur:y,onKeyDown:w,placeholder:"",$styles:n,$value:s,$maxWidth:g,style:{backgroundColor:"white",color:((A=n==null?void 0:n.templateField)==null?void 0:A.textColor)||"#055AFF",border:`2px solid ${((k=n==null?void 0:n.templateField)==null?void 0:k.borderColor)||"#84ADFF"}`,minWidth:((F=n==null?void 0:n.templateField)==null?void 0:F.minWidth)||"120px"}}),r]}):j.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[j.jsxs(Ky,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:p.length,onClick:b,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(D=n==null?void 0:n.templateField)==null?void 0:D.backgroundColor,borderColor:(I=n==null?void 0:n.templateField)==null?void 0:I.borderColor,borderRadius:($=n==null?void 0:n.templateField)==null?void 0:$.borderRadius,padding:(M=n==null?void 0:n.templateField)==null?void 0:M.padding,margin:(P=n==null?void 0:n.templateField)==null?void 0:P.margin,fontSize:(S=n==null?void 0:n.templateField)==null?void 0:S.fontSize,fontWeight:(B=n==null?void 0:n.templateField)==null?void 0:B.fontWeight,minWidth:(N=n==null?void 0:n.templateField)==null?void 0:N.minWidth,color:(R=n==null?void 0:n.templateField)==null?void 0:R.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:p,displayValueLength:p.length,contentLength:p.length}),null),p]}),j.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});Y1.displayName="TemplateField";const Wy=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return j.jsxs("div",{...t,className:"think-container",children:[j.jsx("div",{className:"think-indicator"}),j.jsx("div",{className:"think-content py-2",children:j.jsx("div",{className:"think-text text-[#86909C] pl-5 my-3 border border-[#ECECEE] border-solid border-l-3 border-t-0 border-b-0 border-r-0",style:{color:`${(a=r==null?void 0:r.text)==null?void 0:a.color} !important`,display:o?"none":"block"},children:e})})]})},J1=Ce.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:o},a)=>{var y;const[l,i]=et(null),[u,s]=et(!0),[c,p]=et(1),[d,g]=et(10);gt(()=>{if(!l){if(!n){s(!0);try{const w=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(w)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const w=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",w);let A=null,k=null,F;for(const $ of w){const M=$==null?void 0:$.reply;if(!(M!=null&&M.databaseReference))continue;const P=M.databaseReference;console.log(P,"123123123jk123lk12j3l12jl3"),P!=null&&P.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",P.retrieveSqlData.filePath),F=P.retrieveSqlData.filePath);let S=P;if(typeof P=="string")try{S=JSON.parse(P)}catch{}if(!S)continue;const B=Array.isArray(S)?S:[S],N=B.findIndex(O=>(O==null?void 0:O.id)===t.id),R=N>=0?B[N]:null;if(console.log("~~~~~~~~~~~~~~~",R),R){A=R,k=R.retrieveSqlData||R.retrieve_table_data||R.retrieveTableData;break}const L=B.find(O=>{var V,_;return(((_=(V=O==null?void 0:O.retrieveSqlData)==null?void 0:V.preData)==null?void 0:_.length)||0)>0});!A&&L&&(A=L,k=L.retrieveSqlData||L.retrieve_table_data||L.retrieveTableData)}if(!A||!k){console.warn("No databaseReference with preData found for id:",t.id),s(!1);return}const D=Array.isArray(k==null?void 0:k.preData)?k.preData[0]:null;if(!D){console.warn("Matched item has no preData"),s(!1);return}const I={columns:(D.columns||[]).map($=>({key:$.key,title:$.title})),rows:D.data||D.rows||[],total:(k==null?void 0:k.total)||0,fetchUrl:(k==null?void 0:k.fetchUrl)||"/index/knowledgeBase/file/stream",source:F||(k==null?void 0:k.source)||(A==null?void 0:A.source)};i(I),s(!1)}catch(w){console.error("Init preData parsing failed:",w),s(!1)}}},[t.id,l,n]),gt(()=>{const w=A=>{try{const k=(A==null?void 0:A.detail)||{},F=k==null?void 0:k.id;if(!F||String(F)!==String(t.id))return;const D=k.databaseReference;if(!D)return;let I=D;if(typeof D=="string")try{I=JSON.parse(D)}catch{}if(!I)return;const $=Array.isArray(I)?I:[I],M=$.findIndex(R=>String(R==null?void 0:R.id)===String(t.id)),P=M>=0?$[M]:null;if(!P)return;const S=(P==null?void 0:P.retrieveSqlData)||(P==null?void 0:P.retrieve_table_data)||(P==null?void 0:P.retrieveTableData),B=Array.isArray(S==null?void 0:S.preData)?S.preData[0]:null;if(!B)return;const N={columns:(B.columns||[]).map(R=>({key:R.key,title:R.title})),rows:B.data||B.rows||[],total:(S==null?void 0:S.total)||0,fetchUrl:(S==null?void 0:S.fetchUrl)||"/index/knowledgeBase/file/stream",source:(P==null?void 0:P.source)||(S==null?void 0:S.source)};i(N),s(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",w),()=>{window.removeEventListener("retrieve-sql-data:data-response",w)}},[t.id]);const h=w=>{if(!w||w.length===0)return[];const A=w.find(k=>k&&typeof k=="object")||{};return Object.keys(A).map(k=>({key:k,title:k}))},v=(w,A)=>{p(w),A&&g(A);const k=F=>{let D=null;if(F&&Array.isArray(F.columns)&&Array.isArray(F.rows))D={columns:F.columns,rows:F.rows,total:Number(F.total)||0,fetchUrl:F.fetchUrl||(l==null?void 0:l.fetchUrl)||"",source:F.source||(l==null?void 0:l.source)};else if(F&&Array.isArray(F.data)){const I=F.data;D={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:h(I),rows:I,total:Number(F.totalCount??F.total??(l==null?void 0:l.total)??I.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source},typeof F.currentPage=="number"&&p(F.currentPage),typeof F.pageSize=="number"&&g(F.pageSize)}else if(Array.isArray(F)){const I=F;D={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:h(I),rows:I,total:Number((l==null?void 0:l.total)??I.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source}}if(!D){console.warn("replacePredataFunction received unsupported data format:",F);return}console.log("Replacing table data with:",D),i(D)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:w,pageSize:A||d,fetchUrl:l==null?void 0:l.fetchUrl,total:l==null?void 0:l.total,source:l==null?void 0:l.source,replacePredataFunction:k})},f=w=>l!=null&&l.rows?Math.max(...l.rows.map(A=>{const k=A[w];return k?String(k).length:0})):0,b=(((y=l==null?void 0:l.columns)==null?void 0:y.length)||0)===1,x=(l==null?void 0:l.columns.map((w,A)=>({title:w.title||w.key,dataIndex:w.key,key:w.key,render:k=>{const F=k==null||k===""?"-":k;return b?j.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(F)}):F},...b?{width:void 0}:{}})))||[],C=(l==null?void 0:l.rows.map((w,A)=>({key:A,...w})))||[];return j.jsx("div",{...e,ref:a,className:"retrieve-sql-data-container my-4",children:u?j.jsxs("div",{className:"flex items-center justify-center py-8",children:[j.jsx(zd,{size:"large"}),j.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):l?j.jsxs("div",{className:"retrieve-sql-data-content",children:[o!==null&&j.jsxs("div",{className:"mb-2 flex items-center",children:[j.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center",children:o}),j.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]}),j.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:j.jsx(Ur,{columns:x.map((w,A)=>({...w,...b?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:A===0?160:void 0,minWidth:120,maxWidth:A===0?180:300,fixed:A===0?"left":void 0,ellipsis:{showTitle:!0}},render:k=>{if(k==null)return"-";const F=String(k);if(b)return j.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:F,children:F});const D=f(w.key);let I="200px";return A===0?I="80px":D<=8?I="100px":D<=15?I="150px":D<=25?I="200px":D<=40?I="250px":I="300px",j.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:I,display:"inline-block",cursor:"default"},title:F,children:F})}})),dataSource:C,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:b?"100%":"1000px"},scroll:{x:b?void 0:"max-content",y:400}})}),l.total>d&&j.jsx("div",{className:"flex justify-center mt-3",children:j.jsx(Hd,{current:c,pageSize:d,total:l.total,onChange:v,onShowSizeChange:v,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):j.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});J1.displayName="RetrieveSqlDataElement";const qy=e=>{var a,l,i,u,s,c,p,d;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return j.jsx("div",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(a=t==null?void 0:t.text)==null?void 0:a.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return j.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(l=t==null?void 0:t.text)==null?void 0:l.color} !important`},children:n});case"heading-two":return j.jsx("h2",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`},children:n});case"heading-three":return j.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(u=t==null?void 0:t.text)==null?void 0:u.color} !important`},children:n});case"bulleted-list":return j.jsx("ul",{...o,children:n});case"numbered-list":return j.jsx("ol",{...o,children:n});case"list-item":return j.jsx("li",{...o,children:n});case"table":return j.jsx("div",{className:"table-container",children:j.jsx("table",{...o,children:j.jsx("tbody",{children:n})})});case"table-row":return j.jsx("tr",{...o,children:n});case"table-cell":return r.header?j.jsx("th",{...o,children:n}):j.jsx("td",{...o,children:n});case"block-quote":return j.jsx("blockquote",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(s=t==null?void 0:t.text)==null?void 0:s.color} !important`},children:n});case"code-block":return j.jsx("pre",{...o,children:j.jsx("code",{style:{color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n})});case"think":const g=e.extraProps||{},h=g.isCollapsed!==void 0?g.isCollapsed:Object.values(g)[1]===!0,v={...g,isCollapsed:h};return j.jsx(Wy,{attributes:o,styles:t,extraProps:v,children:n});case"template":return j.jsx(Y1,{...o,element:r,children:n,styles:t});case"retrieve-sql-data":const f=(b=>{if(!b)return null;try{const x=typeof b=="string"?JSON.parse(b):b;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(x)?x[0]:x}}]}}catch(x){return console.error("Failed to parse databaseReference:",x),null}})(((p=e.extraProps)==null?void 0:p.databaseReference)||e.databaseReference);return j.jsx(J1,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:f||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),j.jsx("img",{...o,src:r.url,alt:r.alt||"",style:{maxWidth:"100%",height:"auto",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",transition:"transform 0.2s ease-in-out",display:"block"},onError:b=>{const x=b.target;x.style.display="none",console.warn("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",r.url)}});case"iframe":return console.log("\u6E32\u67D3iframe\u5143\u7D20:",{src:r.src,width:r.width,height:r.height}),j.jsx("iframe",{...o,src:r.src,width:r.width||"100%",height:r.height||"400",frameBorder:r.frameborder||"0",title:r.title||"",style:{width:r.width||"100%",height:r.height||"400px",border:"none",borderRadius:"0.5rem",margin:"1rem 0",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)",display:"block"},onError:b=>{const x=b.target;x.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return j.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(d=t==null?void 0:t.text)==null?void 0:d.color} !important`},children:n})}},Uy=e=>{var l,i,u,s,c,p;const{attributes:t,children:r,leaf:n,styles:o}=e;(l=o==null?void 0:o.text)!=null&&l.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const d=n.fromtype==="0",g=n.fromtype==="1",h=n.fromtype==="2",v=n.text||"";let f=v,b="#e6f7ff",x="#1890ff",C="#bae7ff";return d?(f=`${v}`,b="#e6f7ff",x="#1890ff",C="#bae7ff"):g?(f=`${v}`,b="#f6ffed",x="#52c41a",C="#d9f7be"):h&&(f=`${v}`,b="#E7F8FB",x="#10BBD9",C="#E7F8FB"),a=j.jsx("span",{...t,style:{display:"inline-block",background:b,color:x,height:24,width:24,borderRadius:3,padding:"1px 9px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"22px",cursor:"pointer",verticalAlign:"middle"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:y=>y.currentTarget.style.background=C,onMouseLeave:y=>y.currentTarget.style.background=b,children:f}),a}if(n.code)a=j.jsx("code",{...t,style:{color:`${(i=o==null?void 0:o.text)==null?void 0:i.color} !important`},children:a});else{const d=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),g={color:`${(u=o==null?void 0:o.text)==null?void 0:u.color} !important`,fontSize:(s=o==null?void 0:o.text)==null?void 0:s.fontSize,lineHeight:(c=o==null?void 0:o.text)==null?void 0:c.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=j.jsx("span",{...t,className:d,style:g,children:a})}return n.link&&(a=j.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(p=o==null?void 0:o.text)==null?void 0:p.color} !important`},children:a})),a},Rl=It.div`
233
+
234
+
235
+ & > * + * {
236
+ margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
237
+ }
238
+
239
+ /* 标题样式 */
240
+ & h1 {
241
+ font-size: ${e=>e.$size==="sm"?"20px":"32px"};
242
+ font-weight: 600;
243
+ margin: 24px 0 16px 0;
244
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
245
+ border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
246
+ padding-bottom: 8px;
247
+ }
248
+
249
+ & h2 {
250
+ font-size: ${e=>e.$size==="sm"?"18px":"24px"};
251
+ font-weight: 600;
252
+ margin: 24px 0 16px 0;
253
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
254
+ border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
255
+ padding-bottom: 6px;
256
+ }
257
+
258
+ & h3 {
259
+ font-size: ${e=>e.$size==="sm"?"16px":"20px"};
260
+ font-weight: 600;
261
+ margin: 24px 0 16px 0;
262
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
263
+ }
264
+
265
+ /* 段落样式 */
266
+ & p {
267
+ font-size: ${e=>e.$size==="sm"?"14px":"16px"};
268
+ margin: 16px 0;
269
+ line-height: 1.6;
270
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
271
+ }
272
+
273
+ /* 列表样式 - GitHub 风格简约设计 */
274
+ & ul, & ol {
275
+ margin: 16px 0;
276
+ padding-left: 24px;
277
+ line-height: 1.6;
278
+ }
279
+
280
+ & ul {
281
+ list-style-type: disc;
282
+ }
283
+
284
+ & ol {
285
+ list-style-type: decimal;
286
+ }
287
+
288
+ & li {
289
+ margin: 4px 0;
290
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
291
+ }
292
+
293
+ /* 嵌套列表 */
294
+ & ul ul, & ol ol, & ul ol, & ol ul {
295
+ margin: 8px 0;
296
+ }
297
+
298
+ /* 引用块样式 */
299
+ & blockquote {
300
+ font-size: ${e=>e.$size==="sm"?"14px":"16px"};
301
+ border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
302
+ padding: 0 16px;
303
+ margin: 16px 0;
304
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
305
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
306
+ }
307
+
308
+ /* 行内代码样式 */
309
+ & code {
310
+ font-size: 0.875em;
311
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
312
+ padding: 0.125em 0.25em;
313
+ border-radius: 6px;
314
+ font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
315
+ color: #d73a49;
316
+ }
317
+
318
+ /* 代码块样式 */
319
+ & pre {
320
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
321
+ padding: 16px;
322
+ border-radius: 6px;
323
+ overflow-x: auto;
324
+ margin: 16px 0;
325
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
326
+ }
327
+
328
+ & pre code {
329
+ background-color: transparent;
330
+ padding: 0;
331
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
332
+ }
333
+
334
+ /* 表格样式 */
335
+ & table {
336
+ width: 100%;
337
+ border-collapse: collapse;
338
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
339
+ margin: 16px 0;
340
+ }
341
+
342
+ & th, & td {
343
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
344
+ padding: 8px 12px;
345
+ text-align: left;
346
+ }
347
+
348
+ & th {
349
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
350
+ font-weight: 600;
351
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
352
+ }
353
+
354
+ & tr:nth-child(even) {
355
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
356
+ }
357
+
358
+ & td {
359
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
360
+ }
361
+
362
+ /* 图片样式 */
363
+ & img {
364
+ max-width: 100%;
365
+ height: auto;
366
+ border-radius: 6px;
367
+ margin: 16px 0;
368
+ }
369
+
370
+ /* 链接样式 */
371
+ & a {
372
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
373
+ text-decoration: none;
374
+
375
+ &:hover {
376
+ text-decoration: underline;
377
+ }
378
+ }
379
+
380
+ /* 文本样式 */
381
+ & strong {
382
+ font-weight: 600;
383
+ }
384
+
385
+ & em {
386
+ font-style: italic;
387
+ }
388
+
389
+ & u {
390
+ text-decoration: underline;
391
+ }
392
+
393
+ & s {
394
+ text-decoration: line-through;
395
+ }
396
+
397
+ /* 分割线样式 */
398
+ & hr {
399
+ border: none;
400
+ border-top: 1px solid #d0d7de;
401
+ margin: 24px 0;
402
+ }
403
+
404
+ /* 思考容器样式 */
405
+ & .think-container {
406
+
407
+
408
+ }
409
+
410
+ & .think-header {
411
+
412
+ }
413
+
414
+ & .think-icon {
415
+
416
+ }
417
+
418
+ & .think-title {
419
+ font-weight: 600;
420
+ color: #24292f;
421
+ font-size: 14px;
422
+ }
423
+
424
+ & .think-text {
425
+ color: #86909C;
426
+ font-size: 14px;
427
+ line-height: 1.6;
428
+ }
429
+
430
+ /* 召回标签样式 */
431
+ & .retrive-tag {
432
+ display: inline-block;
433
+ background: #e6f7ff;
434
+ color: #1890ff;
435
+ border: 1px solid rgba(114, 187, 255, 0.3);
436
+ border-radius: 6px;
437
+ padding: 2px 6px;
438
+ margin: 0 2px;
439
+ font-weight: 500;
440
+ font-size: 12px;
441
+ line-height: 1.4;
442
+ cursor: pointer;
443
+ vertical-align: middle;
444
+ transition: background-color 0.2s ease;
445
+ }
446
+
447
+ & .retrive-tag:hover {
448
+ background: #bae7ff;
449
+ }
450
+ `;function Q1(e){return e.map(t=>!t.children||t.children.length===0?{...t,children:[{text:""}]}:{...t,children:t.children.map(r=>typeof r=="object"&&"type"in r?Q1([r])[0]:r)})}function ep(e,t){const r=(t==null?void 0:t.disabledTags)||[];console.log("\u{1F50D} deserializeMarkdown \u5F00\u59CB\u5904\u7406:",{markdownLength:e.length,basePath:t==null?void 0:t.basePath,hasImgTags:e.includes("<img"),hasMarkdownImages:e.includes("![")});function n(s){var c;if(s.indexOf("<think>")>-1)if(s.indexOf("</think>")>-1){const p=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,d=s.match(p);return d?{thinkContent:d[1],content:d[2],finish:!0}:{thinkContent:"",content:s,finish:!0}}else{const p=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((c=s.match(p))==null?void 0:c[1])||"",content:""}}else return{thinkContent:"",content:s}}const{thinkContent:o,content:a,finish:l}=n(e||"");let i=[],u=0;if(!r.includes("think")&&o){const s=o.split(/\n+/).map(c=>c.trim()).filter(Boolean).flatMap(c=>{if(/<retrive-tag/i.test(c)){const p=document.createElement("div");return p.innerHTML=c,Td(p,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:c}]}]});i.push({type:"think",id:`think-${u++}`,thinkContent:o,finish:l,children:s})}if(a){let s=a;r.includes("retrive")||(s=s.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(d,g,h)=>`<retrive-tag${g?" "+g.trim():""}>${h}</retrive-tag>`)),r.includes("retrieve-sql-data")||(s=s.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(d,g)=>`<retrieve-sql-data id="${g}"></retrieve-sql-data>`)),vt.setOptions({gfm:!0,breaks:!0,pedantic:!1});const c=vt(s),p=typeof c=="string"?c:"";if(console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:p.length,hasImgTags:p.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:p}),typeof c=="string"){const d=document.createElement("div");d.innerHTML=c,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:d.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(d.querySelectorAll("*")).map(h=>h.tagName),imgElements:Array.from(d.querySelectorAll("img")).map(h=>({src:h.src,alt:h.alt}))});const g=Td(d,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:g.length,hasImageElements:g.some(h=>h.type==="image")}),g&&g.length>0&&(i=i.concat(g))}}return!i||i.length===0?[{type:"paragraph",children:[{text:""}]}]:Q1(i)}function Td(e,t){const r=[];return console.log("\u{1F3AF} deserializeHtmlNode \u5F00\u59CB\u89E3\u6790:",{nodeType:e.nodeType,nodeName:e.nodeName,basePath:t,childNodesCount:e.childNodes.length}),((n,o)=>(o.forEach(a=>{var l;if(a.nodeType===Node.ELEMENT_NODE){const i=a;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:i.tagName,isImg:i.tagName==="IMG",src:i.getAttribute("src"),basePath:t}),i.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:_t(i,t)});break;case"h1":n.push({type:"heading-one",children:_t(i,t)});break;case"h2":n.push({type:"heading-two",children:_t(i,t)});break;case"h3":n.push({type:"heading-three",children:_t(i,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(i.children).map(s=>({type:"list-item",children:_t(s)}))});break;case"ol":const u={type:"numbered-list",children:Array.from(i.children).map(s=>({type:"list-item",children:_t(s)}))};n.push(u);break;case"li":n.push({type:"list-item",children:_t(i,t)});break;case"pre":{const s=i.querySelector("code");s?n.push({type:"code-block",children:_t(s)}):n.push({type:"code-block",children:_t(i,t)});break}case"code":{i.closest("pre")||n.push({type:"paragraph",children:_t(i,t)});break}case"retrive-tag":{const s=_t(i,t);s.length>0&&n.push({type:"paragraph",children:s});break}case"retrieve-sql-data":{const s=i.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:s,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:_t(i,t)});break;case"table":n.push(Zy(i));break;case"img":{const s=i.getAttribute("src")||"",c=i.getAttribute("alt")||"";let p=s;if(t)if(s.startsWith("./"))p=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const d=t.substring(0,t.lastIndexOf("/"));p=s.replace(/^\.\.\//,d+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(p=`${t}/${s}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:p}),n.push({type:"image",url:p,alt:c,children:[{text:""}]});break}case"iframe":{const s=i.getAttribute("src")||"",c=i.getAttribute("width")||"100%",p=i.getAttribute("height")||"400",d=i.getAttribute("frameborder")||"0",g=i.getAttribute("title")||"";let h=s;if(t)if(s.startsWith("./"))h=s.replace(/^\.\//,t+"/");else if(s.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));h=s.replace(/^\.\.\//,v+"/")}else!s.startsWith("/")&&!s.startsWith("http")&&(h=`${t}/${s}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:s,basePath:t,processedSrc:h}),n.push({type:"iframe",src:h,width:c,height:p,frameborder:d,title:g,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:_t(i)});break;default:n.push({type:"paragraph",children:_t(i,t)});break}}else a.nodeType===Node.TEXT_NODE&&((l=a.textContent)!=null&&l.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function _t(e,t){const r=[];function n(a){const l=[];let i="",u=!1,s=!1,c=0;for(;c<a.length;)a.startsWith("**",c)?(i&&(l.push({text:i,code:!0,bold:u,italic:s}),i=""),u=!u,c+=2):a.startsWith("*",c)?(i&&(l.push({text:i,code:!0,bold:u,italic:s}),i=""),s=!s,c+=1):(i+=a[c],c+=1);return i&&l.push({text:i,code:!0,bold:u,italic:s}),l}function o(a,l={}){var i,u;if(a.nodeType===Node.TEXT_NODE){const s=(i=a.textContent)==null?void 0:i.trim();return s?l.code?n(s):[{text:s,...l}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const s=a,c={...l};switch(s.tagName.toLowerCase()){case"em":case"i":c.italic=!0;break;case"strong":case"b":c.bold=!0;break;case"code":s.closest("pre")||(c.code=!0);break;case"del":case"s":c.strikethrough=!0;break;case"u":c.underline=!0;break;case"a":c.link=s.getAttribute("href")||void 0;break;case"retrive-tag":{const d={};for(const{name:g,value:h}of Array.from(s.attributes))d[g]=h;return[{text:s.textContent||""||"[0]",retrive:!0,...d}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:s.getAttribute("id")||"",children:[{text:""}]}];case"img":{const d=s.getAttribute("src")||"",g=s.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:d,alt:g,basePath:t});let h=d;if(t)if(d.startsWith("./"))h=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));h=d.replace(/^\.\.\//,v+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(h=`${t}/${d}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:d,processedSrc:h}),[{type:"image",url:h,alt:g,children:[{text:""}]}]}case"iframe":{const d=s.getAttribute("src")||"",g=s.getAttribute("width")||"100%",h=s.getAttribute("height")||"400",v=s.getAttribute("frameborder")||"0",f=s.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:d,width:g,height:h,basePath:t});let b=d;if(t)if(d.startsWith("./"))b=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const x=t.substring(0,t.lastIndexOf("/"));b=d.replace(/^\.\.\//,x+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(b=`${t}/${d}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:d,processedSrc:b}),[{type:"iframe",src:b,width:g,height:h,frameborder:v,title:f,children:[{text:""}]}]}}if(s.childNodes.length===0&&((u=s.textContent)!=null&&u.trim()))return c.code?n(s.textContent):[{text:s.textContent,...c}];let p=[];for(const d of Array.from(s.childNodes))p=p.concat(o(d,c));return p}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function Zy(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const o=Array.from(e.querySelectorAll("tr"));o.length>0&&(t.push({type:"table-row",children:Array.from(o[0].children).map(a=>({type:"table-cell",header:!0,children:_t(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(l=>({type:"table-cell",header:!1,children:_t(l)}))})}))}else{if(r){const o=r.querySelector("tr");o&&t.push({type:"table-row",children:Array.from(o.querySelectorAll("th")).map(a=>({type:"table-cell",header:!0,children:_t(a)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(o=>{t.push({type:"table-row",children:Array.from(o.querySelectorAll("td")).map(a=>({type:"table-cell",header:!1,children:_t(a)}))})})}return{type:"table",children:t}}const Gy=It.div`
451
+ border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
452
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
453
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
454
+ min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
455
+ overflow: hidden;
456
+ transition: all 0.2s ease-in-out;
457
+
458
+ ${e=>{var t,r;return e.$isEditing&&`
459
+ &:focus-within {
460
+ border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
461
+ box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
462
+ }
463
+ `}}
464
+ `,Il=It.div`
465
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
466
+ min-height: inherit;
467
+ outline: none;
468
+
469
+ & > * + * {
470
+ margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
471
+ }
472
+ `;var vi=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(vi||{});const Mu=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:l,onFocus:i,onBlur:u,renderElement:s,renderLeaf:c,onRetriveTagClick:p,eventsEmit:d,extraProps:g={},className:h,style:v,styles:f,enableTemplateInput:b=!1,disabledTags:x=[]})=>{const C=Bi(),y=Je(()=>{var _,K,q,Q,se,T,Z,W,z;return{primaryColor:((_=C==null?void 0:C.colors)==null?void 0:_.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((K=C==null?void 0:C.colors)==null?void 0:K.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((q=C==null?void 0:C.colors)==null?void 0:q.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((Q=C==null?void 0:C.colors)==null?void 0:Q.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((se=C==null?void 0:C.colors)==null?void 0:se.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((T=C==null?void 0:C.colors)==null?void 0:T.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((Z=C==null?void 0:C.space)==null?void 0:Z.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((W=C==null?void 0:C.space)==null?void 0:W.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((z=C==null?void 0:C.space)==null?void 0:z.margin)||(a==null?void 0:a.margin)||"0.5rem",minHeight:(a==null?void 0:a.minHeight)||"200px",baseFontSize:(a==null?void 0:a.baseFontSize)||(o==="md"?14:12),...a}},[C,a,o]),w=at();if(!w.current){const _=VC(),K=ob(_),{isInline:q}=K;K.isInline=T=>!x.includes("template")&&T.type==="template"?!0:q(T);const{isVoid:Q}=K;K.isVoid=T=>!x.includes("template")&&T.type==="template"?!0:Q(T);const se=T=>{if(!(b&&!x.includes("template")))return T;const{insertText:Z,insertData:W}=T,z=()=>{const G=/<template>([^<]*)<\/template>/g,Y=Array.from(E.nodes(T,{match:J=>Le.isText(J)&&G.test(J.text)}));if(Y.length!==0)for(const J of Y){const[oe,re]=J,ne=oe.text||"",ue=[];let ce=0,xe;for(G.lastIndex=0;(xe=G.exec(ne))!==null;){if(xe.index>ce){const Te=ne.slice(ce,xe.index);Te&&ue.push({text:Te})}ue.push({type:"template",placeholder:(xe[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),ce=xe.index+xe[0].length}if(ce<ne.length){const Te=ne.slice(ce);Te&&ue.push({text:Te})}we.removeNodes(T,{at:re}),we.insertNodes(T,ue,{at:re})}};return T.insertText=G=>{Z(G),z()},T.insertData=G=>{const Y=G.getData("text/plain");if(Y&&/<template>[\s\S]*?<\/template>/.test(Y)){Z(Y),z();return}return W(G)},T};w.current=se(K)}const A=w.current,[k,F]=et(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[D,I]=et(0);gt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const _=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",_),F(_),I(K=>K+1)}},[e.type,e.content]);const $=at(void 0);gt(()=>{if(e.type!=="markdown")return;const _=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");$.current!==_&&($.current=_,I(K=>K+1))},[e.type,e.content]);const M=at("");gt(()=>{if(e.type!=="markdown")return;const _=JSON.stringify(g||{});_!==M.current&&(M.current=_,I(K=>K+1))},[g,e.type]);const P=Ge(_=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",_),_&&Array.isArray(_)?(F(_),l==null||l(_,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",_)},[l]),S=Je(()=>{const _=y==null?void 0:y.baseFontSize;return typeof _=="number"&&!Number.isNaN(_)?_:o==="md"?14:12},[y,o]),B=Ge(_=>{const K={..._,size:o,styles:f,eventsEmit:d,extraProps:g};return s?s(K):qy(K)},[s,o,f,d,g]),N=Ge(_=>{const K={..._,styles:f,onRetriveTagClick:p};return c?c(K):Uy(K)},[c,f,p]);gt(()=>(window.copyCodeFromData=_=>{const K=_.getAttribute("data-code");if(!K){console.error("No code content found");return}const q=K.replace(/\\n/g,`
473
+ `).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/&quot;/g,'"');navigator.clipboard.writeText(q).then(()=>{const Q=_.innerHTML;_.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#2da44e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>',_.classList.add("copied"),setTimeout(()=>{_.innerHTML=Q,_.classList.remove("copied")},2e3)}).catch(Q=>{console.error("\u590D\u5236\u5931\u8D25:",Q);const se=_.innerHTML;_.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',_.style.background="#d73a49",_.style.borderColor="#d73a49",_.style.color="white",setTimeout(()=>{_.innerHTML=se,_.style.background="",_.style.borderColor="",_.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const R=Je(()=>{var _,K;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(_=e.content)==null?void 0:_.length,basePath:n,hasImages:(K=e.content)==null?void 0:K.includes("![")});const q=ep(e.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:q.length,hasImageElements:q.some(z=>z.type==="image"),imageElements:q.filter(z=>z.type==="image")}),q&&q.length>0)return j.jsx(Rl,{theme:y,$size:o,children:j.jsx(Al,{editor:A,initialValue:q,onChange:()=>{},children:j.jsx(Il,{theme:y,children:j.jsx(kl,{renderElement:B,renderLeaf:N,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${S}px`}})})},D)});const Q={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let se=vt(e.content||"",Q);se=se.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),se=se.replace(/<\/table>/g,"</table></div>"),se=se.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(z,G,Y)=>{const J=Y.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,"&quot;");return`<pre><code${G}>${Y}</code><button class="code-copy-btn" data-code="${J}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre>`});const T=(y==null?void 0:y.disabledBackground)||(y==null?void 0:y.backgroundColor)||"#ffffff",Z=(z,G)=>z.startsWith("#")?`${z}${Math.round(G*255).toString(16).padStart(2,"0")}`:z,W=`
474
+ <style>
475
+ .table-container{ overflow:auto; border:1px solid ${(y==null?void 0:y.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(y==null?void 0:y.backgroundColor)||"transparent"} !important; }
476
+ .table-container table{ background:${(y==null?void 0:y.backgroundColor)||"transparent"} !important; color:${(y==null?void 0:y.textColor)||"#24292f"} !important; }
477
+ .table-container th{ background:${(y==null?void 0:y.disabledBackground)||"#f6f8fa"} !important; color:${(y==null?void 0:y.textColor)||"#24292f"} !important; }
478
+ .table-container td{ color:${(y==null?void 0:y.textColor)||"#24292f"} !important; background:${(y==null?void 0:y.backgroundColor)||"transparent"} !important; }
479
+ .table-container tr:nth-child(even) td{ background:${(y==null?void 0:y.disabledBackground)||"#f6f8fa"} !important; }
480
+ pre{ position:relative; background:${T}; border:1px solid ${(y==null?void 0:y.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(y==null?void 0:y.textColor)||"#e5e7eb"}; }
481
+ pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${Z("#22c55e",.25)}, ${Z("#f59e0b",.25)}, ${Z("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
482
+ pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(y==null?void 0:y.borderColor)||"#e5e7eb"}; color:${(y==null?void 0:y.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
483
+ pre .code-copy-btn:hover{ background:${(y==null?void 0:y.hoverBackground)||"rgba(0,0,0,0.06)"}; }
484
+ </style>
485
+ `;return j.jsx("div",{style:{padding:(y==null?void 0:y.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(y==null?void 0:y.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:W+se}})}catch(q){return console.error("Markdown parsing error:",q),j.jsx("div",{children:e.content})}},[e,y,A,D,B,N,S]),L=Je(()=>e.type!=="html"?null:j.jsx("div",{style:{padding:(y==null?void 0:y.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(y==null?void 0:y.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,y,S]),O=Je(()=>e.type!=="text"?null:j.jsx("div",{style:{padding:(y==null?void 0:y.padding)||"1rem",fontSize:`${S}px`,lineHeight:1.6,color:(y==null?void 0:y.textColor)||"#24292f"},children:j.jsx("span",{children:e.content||""})}),[e,y,S]),V=()=>{switch(e.type){case"markdown":return R;case"html":return L;case"text":return O;case"slate":default:return t?j.jsx(Rl,{theme:y,$size:o,children:j.jsx(Al,{editor:A,initialValue:k,onChange:P,children:j.jsx(Il,{theme:y,children:j.jsx(kl,{renderElement:B,renderLeaf:N,placeholder:r,readOnly:!1,onFocus:i,onBlur:u,style:{minHeight:"inherit",outline:"none",fontSize:`${S}px`}})})},D)}):j.jsx(Rl,{theme:y,$size:o,children:j.jsx(Al,{editor:A,initialValue:k,onChange:()=>{},children:j.jsx(Il,{theme:y,children:j.jsx(kl,{renderElement:B,renderLeaf:N,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${S}px`}})})},D)})}};return j.jsx(Gy,{theme:y,$isEditing:t,className:h,style:v,children:V()})};var $s={exports:{}},Xy=$s.exports,Md;function Yy(){return Md||(Md=1,(function(e,t){(function(r,n){e.exports=n()})(Xy,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",l="second",i="minute",u="hour",s="day",c="week",p="month",d="quarter",g="year",h="date",v="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(S){var B=["th","st","nd","rd"],N=S%100;return"["+S+(B[(N-20)%10]||B[N]||B[0])+"]"}},C=function(S,B,N){var R=String(S);return!R||R.length>=B?S:""+Array(B+1-R.length).join(N)+S},y={s:C,z:function(S){var B=-S.utcOffset(),N=Math.abs(B),R=Math.floor(N/60),L=N%60;return(B<=0?"+":"-")+C(R,2,"0")+":"+C(L,2,"0")},m:function S(B,N){if(B.date()<N.date())return-S(N,B);var R=12*(N.year()-B.year())+(N.month()-B.month()),L=B.clone().add(R,p),O=N-L<0,V=B.clone().add(R+(O?-1:1),p);return+(-(R+(N-L)/(O?L-V:V-L))||0)},a:function(S){return S<0?Math.ceil(S)||0:Math.floor(S)},p:function(S){return{M:p,y:g,w:c,d:s,D:h,h:u,m:i,s:l,ms:a,Q:d}[S]||String(S||"").toLowerCase().replace(/s$/,"")},u:function(S){return S===void 0}},w="en",A={};A[w]=x;var k="$isDayjsObject",F=function(S){return S instanceof M||!(!S||!S[k])},D=function S(B,N,R){var L;if(!B)return w;if(typeof B=="string"){var O=B.toLowerCase();A[O]&&(L=O),N&&(A[O]=N,L=O);var V=B.split("-");if(!L&&V.length>1)return S(V[0])}else{var _=B.name;A[_]=B,L=_}return!R&&L&&(w=L),L||!R&&w},I=function(S,B){if(F(S))return S.clone();var N=typeof B=="object"?B:{};return N.date=S,N.args=arguments,new M(N)},$=y;$.l=D,$.i=F,$.w=function(S,B){return I(S,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var M=(function(){function S(N){this.$L=D(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[k]=!0}var B=S.prototype;return B.parse=function(N){this.$d=(function(R){var L=R.date,O=R.utc;if(L===null)return new Date(NaN);if($.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var V=L.match(f);if(V){var _=V[2]-1||0,K=(V[7]||"0").substring(0,3);return O?new Date(Date.UTC(V[1],_,V[3]||1,V[4]||0,V[5]||0,V[6]||0,K)):new Date(V[1],_,V[3]||1,V[4]||0,V[5]||0,V[6]||0,K)}}return new Date(L)})(N),this.init()},B.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},B.$utils=function(){return $},B.isValid=function(){return this.$d.toString()!==v},B.isSame=function(N,R){var L=I(N);return this.startOf(R)<=L&&L<=this.endOf(R)},B.isAfter=function(N,R){return I(N)<this.startOf(R)},B.isBefore=function(N,R){return this.endOf(R)<I(N)},B.$g=function(N,R,L){return $.u(N)?this[R]:this.set(L,N)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(N,R){var L=this,O=!!$.u(R)||R,V=$.p(N),_=function(z,G){var Y=$.w(L.$u?Date.UTC(L.$y,G,z):new Date(L.$y,G,z),L);return O?Y:Y.endOf(s)},K=function(z,G){return $.w(L.toDate()[z].apply(L.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(G)),L)},q=this.$W,Q=this.$M,se=this.$D,T="set"+(this.$u?"UTC":"");switch(V){case g:return O?_(1,0):_(31,11);case p:return O?_(1,Q):_(0,Q+1);case c:var Z=this.$locale().weekStart||0,W=(q<Z?q+7:q)-Z;return _(O?se-W:se+(6-W),Q);case s:case h:return K(T+"Hours",0);case u:return K(T+"Minutes",1);case i:return K(T+"Seconds",2);case l:return K(T+"Milliseconds",3);default:return this.clone()}},B.endOf=function(N){return this.startOf(N,!1)},B.$set=function(N,R){var L,O=$.p(N),V="set"+(this.$u?"UTC":""),_=(L={},L[s]=V+"Date",L[h]=V+"Date",L[p]=V+"Month",L[g]=V+"FullYear",L[u]=V+"Hours",L[i]=V+"Minutes",L[l]=V+"Seconds",L[a]=V+"Milliseconds",L)[O],K=O===s?this.$D+(R-this.$W):R;if(O===p||O===g){var q=this.clone().set(h,1);q.$d[_](K),q.init(),this.$d=q.set(h,Math.min(this.$D,q.daysInMonth())).$d}else _&&this.$d[_](K);return this.init(),this},B.set=function(N,R){return this.clone().$set(N,R)},B.get=function(N){return this[$.p(N)]()},B.add=function(N,R){var L,O=this;N=Number(N);var V=$.p(R),_=function(Q){var se=I(O);return $.w(se.date(se.date()+Math.round(Q*N)),O)};if(V===p)return this.set(p,this.$M+N);if(V===g)return this.set(g,this.$y+N);if(V===s)return _(1);if(V===c)return _(7);var K=(L={},L[i]=n,L[u]=o,L[l]=r,L)[V]||1,q=this.$d.getTime()+N*K;return $.w(q,this)},B.subtract=function(N,R){return this.add(-1*N,R)},B.format=function(N){var R=this,L=this.$locale();if(!this.isValid())return L.invalidDate||v;var O=N||"YYYY-MM-DDTHH:mm:ssZ",V=$.z(this),_=this.$H,K=this.$m,q=this.$M,Q=L.weekdays,se=L.months,T=L.meridiem,Z=function(G,Y,J,oe){return G&&(G[Y]||G(R,O))||J[Y].slice(0,oe)},W=function(G){return $.s(_%12||12,G,"0")},z=T||function(G,Y,J){var oe=G<12?"AM":"PM";return J?oe.toLowerCase():oe};return O.replace(b,(function(G,Y){return Y||(function(J){switch(J){case"YY":return String(R.$y).slice(-2);case"YYYY":return $.s(R.$y,4,"0");case"M":return q+1;case"MM":return $.s(q+1,2,"0");case"MMM":return Z(L.monthsShort,q,se,3);case"MMMM":return Z(se,q);case"D":return R.$D;case"DD":return $.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Z(L.weekdaysMin,R.$W,Q,2);case"ddd":return Z(L.weekdaysShort,R.$W,Q,3);case"dddd":return Q[R.$W];case"H":return String(_);case"HH":return $.s(_,2,"0");case"h":return W(1);case"hh":return W(2);case"a":return z(_,K,!0);case"A":return z(_,K,!1);case"m":return String(K);case"mm":return $.s(K,2,"0");case"s":return String(R.$s);case"ss":return $.s(R.$s,2,"0");case"SSS":return $.s(R.$ms,3,"0");case"Z":return V}return null})(G)||V.replace(":","")}))},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(N,R,L){var O,V=this,_=$.p(R),K=I(N),q=(K.utcOffset()-this.utcOffset())*n,Q=this-K,se=function(){return $.m(V,K)};switch(_){case g:O=se()/12;break;case p:O=se();break;case d:O=se()/3;break;case c:O=(Q-q)/6048e5;break;case s:O=(Q-q)/864e5;break;case u:O=Q/o;break;case i:O=Q/n;break;case l:O=Q/r;break;default:O=Q}return L?O:$.a(O)},B.daysInMonth=function(){return this.endOf(p).$D},B.$locale=function(){return A[this.$L]},B.locale=function(N,R){if(!N)return this.$L;var L=this.clone(),O=D(N,R,!0);return O&&(L.$L=O),L},B.clone=function(){return $.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},S})(),P=M.prototype;return I.prototype=P,[["$ms",a],["$s",l],["$m",i],["$H",u],["$W",s],["$M",p],["$y",g],["$D",h]].forEach((function(S){P[S[1]]=function(B){return this.$g(B,S[0],S[1])}})),I.extend=function(S,B){return S.$i||(S(B,M,I),S.$i=!0),I},I.locale=D,I.isDayjs=F,I.unix=function(S){return I(1e3*S)},I.en=A[w],I.Ls=A,I.p={},I}))})($s)),$s.exports}var Jy=Yy();const Qy=Fi(Jy);/**
486
+ * @license lucide-react v0.456.0 - ISC
487
+ *
488
+ * This source code is licensed under the ISC license.
489
+ * See the LICENSE file in the root directory of this source tree.
490
+ */const e9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tp=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
491
+ * @license lucide-react v0.456.0 - ISC
492
+ *
493
+ * This source code is licensed under the ISC license.
494
+ * See the LICENSE file in the root directory of this source tree.
495
+ */var t9={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"};/**
496
+ * @license lucide-react v0.456.0 - ISC
497
+ *
498
+ * This source code is licensed under the ISC license.
499
+ * See the LICENSE file in the root directory of this source tree.
500
+ */const r9=cn(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:l,...i},u)=>Ha("svg",{ref:u,...t9,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:tp("lucide",o),...i},[...l.map(([s,c])=>Ha(s,c)),...Array.isArray(a)?a:[a]]));/**
501
+ * @license lucide-react v0.456.0 - ISC
502
+ *
503
+ * This source code is licensed under the ISC license.
504
+ * See the LICENSE file in the root directory of this source tree.
505
+ */const ar=(e,t)=>{const r=cn(({className:n,...o},a)=>Ha(r9,{ref:a,iconNode:t,className:tp(`lucide-${e9(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
506
+ * @license lucide-react v0.456.0 - ISC
507
+ *
508
+ * This source code is licensed under the ISC license.
509
+ * See the LICENSE file in the root directory of this source tree.
510
+ */const Sa=ar("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
511
+ * @license lucide-react v0.456.0 - ISC
512
+ *
513
+ * This source code is licensed under the ISC license.
514
+ * See the LICENSE file in the root directory of this source tree.
515
+ */const n9=ar("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
516
+ * @license lucide-react v0.456.0 - ISC
517
+ *
518
+ * This source code is licensed under the ISC license.
519
+ * See the LICENSE file in the root directory of this source tree.
520
+ */const ka=ar("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
521
+ * @license lucide-react v0.456.0 - ISC
522
+ *
523
+ * This source code is licensed under the ISC license.
524
+ * See the LICENSE file in the root directory of this source tree.
525
+ */const o9=ar("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"}]]);/**
526
+ * @license lucide-react v0.456.0 - ISC
527
+ *
528
+ * This source code is licensed under the ISC license.
529
+ * See the LICENSE file in the root directory of this source tree.
530
+ */const a9=ar("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
531
+ * @license lucide-react v0.456.0 - ISC
532
+ *
533
+ * This source code is licensed under the ISC license.
534
+ * See the LICENSE file in the root directory of this source tree.
535
+ */const i9=ar("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"}]]);/**
536
+ * @license lucide-react v0.456.0 - ISC
537
+ *
538
+ * This source code is licensed under the ISC license.
539
+ * See the LICENSE file in the root directory of this source tree.
540
+ */const l9=ar("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
541
+ * @license lucide-react v0.456.0 - ISC
542
+ *
543
+ * This source code is licensed under the ISC license.
544
+ * See the LICENSE file in the root directory of this source tree.
545
+ */const s9=ar("MessageSquareDot",[["path",{d:"M11.7 3H5a2 2 0 0 0-2 2v16l4-4h12a2 2 0 0 0 2-2v-2.7",key:"uodpkb"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
546
+ * @license lucide-react v0.456.0 - ISC
547
+ *
548
+ * This source code is licensed under the ISC license.
549
+ * See the LICENSE file in the root directory of this source tree.
550
+ */const u9=ar("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"}]]);/**
551
+ * @license lucide-react v0.456.0 - ISC
552
+ *
553
+ * This source code is licensed under the ISC license.
554
+ * See the LICENSE file in the root directory of this source tree.
555
+ */const c9=ar("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
556
+ * @license lucide-react v0.456.0 - ISC
557
+ *
558
+ * This source code is licensed under the ISC license.
559
+ * See the LICENSE file in the root directory of this source tree.
560
+ */const d9=ar("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
561
+ * @license lucide-react v0.456.0 - ISC
562
+ *
563
+ * This source code is licensed under the ISC license.
564
+ * See the LICENSE file in the root directory of this source tree.
565
+ */const f9=ar("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
566
+ * @license lucide-react v0.456.0 - ISC
567
+ *
568
+ * This source code is licensed under the ISC license.
569
+ * See the LICENSE file in the root directory of this source tree.
570
+ */const p9=ar("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
571
+ * @license lucide-react v0.456.0 - ISC
572
+ *
573
+ * This source code is licensed under the ISC license.
574
+ * See the LICENSE file in the root directory of this source tree.
575
+ */const g9=ar("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
576
+ * @license lucide-react v0.456.0 - ISC
577
+ *
578
+ * This source code is licensed under the ISC license.
579
+ * See the LICENSE file in the root directory of this source tree.
580
+ */const h9=ar("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"}]]),Pl=({src:e,index:t,token:r,url:n,eventsEmit:o,...a})=>{const[l,i]=et(""),u=async p=>{try{const d=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({convertedFilePath:p})});if(!d.ok)throw new Error(`Fetch failed: ${d.status}`);return{data:await d.arrayBuffer()}}catch{return null}},s=async p=>{const d=await u(p);if(!d)return;const g=new Blob([d.data]);return window.URL.createObjectURL(g)},c=async p=>{const d=await s(p);i(d||"")};return gt(()=>{try{if(!r||!n){i(e);return}c(e)}catch{i(e)}},[e]),j.jsx(j.Fragment,{children:l&&j.jsx(Rf,{src:l,...a,preview:!1,onClick:()=>o&&o("imageClick",l)},t||1)})};function Ld(e){const t=(e||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t)?"rag/pic":t==="pdf"?"rag/pdf":["doc","docx"].includes(t)?"rag/word":["xls","xlsx"].includes(t)?"rag/excel":["ppt","pptx"].includes(t)?"rag/ppt":t==="txt"||t==="md"?"rag/txt":t==="csv"?"rag/csv":t==="json"?"rag/json":["zip","rar","7z"].includes(t)?"rag/zip":["odt","ods","odp","odf"].includes(t)?"rag/odf":t==="wps"?"rag/wps":["html","htm","url"].includes(t)?"rag/url":["mp4","avi","mov","wmv","flv","webm","mkv"].includes(t)?"rag/video":"rag/file"}function _n(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(_n(r.children)));return t}function m9(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const a=n[1].split(";").map(l=>l.trim()).filter(Boolean);t.push(...a)}const o=/\[retrive-tag[^\]]*image_urls=['"]([^'"]+)['"][^\]]*\]\[[^\]]+\]\[\/retrive-tag\]/g;for(;n=o.exec(e);){const a=n[1].split(";").map(l=>l.trim()).filter(Boolean);t.push(...a)}return Array.from(new Set(t))}function Aa(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function v9(e){const t=[];let r=1;const n=o=>{o.forEach(a=>{(a==null?void 0:a.type)==="retrieve-sql-data"&&(a!=null&&a.id)&&t.push({id:String(a.id),index:r++}),Array.isArray(a==null?void 0:a.children)&&a.children.length&&n(a.children)})};return Array.isArray(e)&&e.length&&n(e),t}const C9=It.div`
581
+ display: flex;
582
+ flex-direction: column;
583
+ margin-bottom: 0.5rem;
584
+ animation: fadeIn 0.3s ease-in-out;
585
+ width: 100%;
586
+ text-wrap: wrap;
587
+
588
+ ${e=>e.$align==="right"&&`
589
+ align-items: flex-end;
590
+ `}
591
+
592
+ ${e=>e.$align==="center"&&`
593
+ align-items: center;
594
+ `}
595
+
596
+ @keyframes fadeIn {
597
+ from {
598
+ opacity: 0;
599
+ transform: translateY(10px);
600
+ }
601
+ to {
602
+ opacity: 1;
603
+ transform: translateY(0);
604
+ }
605
+ }
606
+ `,b9=It.div`
607
+ display: flex;
608
+ align-items: center;
609
+ gap: 0.25rem;
610
+ margin-bottom: 0.5rem;
611
+ width: 100%;
612
+
613
+ ${e=>e.$isUser&&`
614
+ flex-direction: row-reverse;
615
+ justify-content: end;
616
+ `}
617
+ `,y9=It.div`
618
+ background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
619
+ border-radius: 50%;
620
+ width: 2rem;
621
+ height: 2rem;
622
+ flex-shrink: 0;
623
+ display: flex;
624
+ align-items: center;
625
+ justify-content: center;
626
+ font-size: 1rem;
627
+ `,x9=It.div`
628
+ width: 100%;
629
+ margin-top: 0.5rem;
630
+ .message-time {
631
+ font-size: 0.75rem;
632
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
633
+ }
634
+
635
+ .message-card {
636
+ background: ${e=>e.$isUser?"#E3ECFF":"#ffffff"};
637
+ border: 1px solid ${e=>(e.$isUser,"transparent")};
638
+ border-radius: 0.5rem;
639
+
640
+ overflow: hidden;
641
+ max-width: ${e=>e.$isUser?"fit-content":"100%"};
642
+ margin-left: ${e=>e.$isUser?"auto":"0"};
643
+ margin-right: ${e=>e.$isUser?"40px":"0"};
644
+ padding: 0.25rem 1.8rem;
645
+ .message-text {
646
+ width: 100%;
647
+ line-height: 1.6;
648
+
649
+ border-radius: 0.5rem;
650
+ min-height: ${e=>e.$isUser?"auto":"40px"};
651
+ font-size: 0.875rem;
652
+ }
653
+ }
654
+ `,w9=It.div`
655
+ margin-top: 0.5rem;
656
+ display: flex;
657
+ padding: 0.5rem;
658
+ align-items: center;
659
+
660
+ gap: 0.75rem;
661
+
662
+ button {
663
+ display: flex;
664
+ align-items: center;
665
+ gap: 0.25rem;
666
+ font-size: 0.875rem;
667
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
668
+ background: none;
669
+ border: none;
670
+ cursor: pointer;
671
+ transition: color 0.2s;
672
+
673
+ &:hover {
674
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
675
+ }
676
+
677
+ &.active {
678
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
679
+ }
680
+ }
681
+ `,D9=It.div`
682
+ margin-top: 1rem;
683
+ padding: 0 2.9rem;
684
+
685
+ border-radius: 0.5rem;
686
+
687
+ @keyframes followUpIn {
688
+ from {
689
+ opacity: 0;
690
+ transform: translateY(6px);
691
+ }
692
+ to {
693
+ opacity: 1;
694
+ transform: translateY(0);
695
+ }
696
+ }
697
+
698
+ .follow-up-title {
699
+ font-size: 0.875rem;
700
+ font-weight: 600;
701
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
702
+ margin-bottom: 0.75rem;
703
+ }
704
+
705
+ .follow-up-list {
706
+ display: flex;
707
+ flex-direction: column;
708
+ gap: 0.5rem;
709
+ }
710
+
711
+ .follow-up-item {
712
+ width: fit-content;
713
+ background: #ffffff;
714
+ border: 1px solid #e5e7eb;
715
+ border-radius: 0.375rem;
716
+ padding: 0.75rem 1rem;
717
+ cursor: pointer;
718
+ transition: all 0.2s ease;
719
+ text-align: left;
720
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
721
+ font-size: 0.875rem;
722
+ line-height: 1.4;
723
+ opacity: 0;
724
+ transform: translateY(6px);
725
+ animation: followUpIn 280ms ease forwards;
726
+ animation-play-state: running;
727
+
728
+ &:hover {
729
+ background: #e5e7eb;
730
+ border-color: #d1d5db;
731
+ }
732
+
733
+ &:active {
734
+ transform: translateY(1px);
735
+ }
736
+ }
737
+ `,Ba=It.div`
738
+ padding: 1rem;
739
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
740
+
741
+ border-radius: 0.5rem;
742
+
743
+ .reference-title {
744
+ font-size: 0.875rem;
745
+ font-weight: 600;
746
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
747
+ margin-bottom: 0.75rem;
748
+ }
749
+
750
+ .reference-list {
751
+ display: flex;
752
+ flex-direction: column;
753
+ gap: 0.5rem;
754
+ }
755
+
756
+ .reference-item {
757
+ background: #ffffff;
758
+
759
+ border-radius: 0.375rem;
760
+ padding: 0.75rem 0;
761
+ display: flex;
762
+ align-items: center;
763
+ gap: 0.5rem;
764
+
765
+ .file-icon {
766
+ width: 2rem;
767
+ height: 2rem;
768
+ background: #e2e8f0;
769
+ border-radius: 0.25rem;
770
+ display: flex;
771
+ align-items: center;
772
+ justify-content: center;
773
+ font-size: 0.75rem;
774
+ color: #64748b;
775
+ }
776
+
777
+ .file-info {
778
+ flex: 1;
779
+
780
+ .file-name {
781
+ font-size: 0.875rem;
782
+ font-weight: 500;
783
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
784
+ margin-bottom: 0.25rem;
785
+ }
786
+
787
+ .file-meta {
788
+ font-size: 0.75rem;
789
+ color: #64748b;
790
+ }
791
+ }
792
+
793
+ .file-score {
794
+ font-size: 0.75rem;
795
+ color: #059669;
796
+ font-weight: 500;
797
+ }
798
+ }
799
+ `,E9=It.div`
800
+ position: fixed;
801
+ top: 0;
802
+ left: 0;
803
+ right: 0;
804
+ bottom: 0;
805
+ background: rgba(0, 0, 0, 0.8);
806
+ display: ${e=>e.$show?"flex":"none"};
807
+ align-items: center;
808
+ justify-content: center;
809
+ z-index: 1000;
810
+ cursor: pointer;
811
+
812
+ .modal-content {
813
+ max-width: 90vw;
814
+ max-height: 90vh;
815
+ position: relative;
816
+ cursor: default;
817
+ display: flex;
818
+ flex-direction: column;
819
+ align-items: center;
820
+ }
821
+
822
+ .modal-image {
823
+ max-width: 100%;
824
+ max-height: calc(90vh - 60px);
825
+ object-fit: contain;
826
+ border-radius: 8px;
827
+ }
828
+
829
+ .modal-close {
830
+ margin-top: 16px;
831
+ background: rgba(255, 255, 255, 0.3);
832
+ border: none;
833
+ border-radius: 20px;
834
+ padding: 8px 20px;
835
+ display: flex;
836
+ align-items: center;
837
+ justify-content: center;
838
+ cursor: pointer;
839
+ font-size: 14px;
840
+ color: #333;
841
+ font-weight: 500;
842
+ transition: all 0.2s ease;
843
+
844
+ &:hover {
845
+ background: rgba(255, 255, 255, 1);
846
+ transform: translateY(-1px);
847
+ }
848
+ }
849
+ `,Tl=It.div`
850
+ padding: 0rem 2.5rem;
851
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
852
+
853
+ .gallery-grid {
854
+ display: grid;
855
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
856
+ gap: 0.75rem;
857
+ }
858
+
859
+ .gallery-item {
860
+ position: relative;
861
+ aspect-ratio: 1;
862
+ border-radius: 0.375rem;
863
+ overflow: hidden;
864
+ cursor: pointer;
865
+ transition:
866
+ transform 0.2s ease,
867
+ box-shadow 0.2s ease;
868
+ border: 2px solid transparent;
869
+
870
+ &:hover {
871
+ transform: translateY(-2px);
872
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
873
+ border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
874
+ }
875
+
876
+ .gallery-image {
877
+ width: 100%;
878
+ height: 100%;
879
+ object-fit: cover;
880
+ background: #f3f4f6;
881
+ }
882
+
883
+ .gallery-overlay {
884
+ position: absolute;
885
+ bottom: 0;
886
+ left: 0;
887
+ right: 0;
888
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
889
+ color: white;
890
+ padding: 0.5rem;
891
+ font-size: 0.75rem;
892
+ text-align: center;
893
+ opacity: 0;
894
+ transition: opacity 0.2s ease;
895
+ }
896
+
897
+ &:hover .gallery-overlay {
898
+ opacity: 1;
899
+ }
900
+ }
901
+ `,_9=({token:e,streamUrl:t,is_download:r,content:n,contentType:o="plainText",align:a="left",displayStatus:l="ready",avatar:i,isUser:u=!1,userAvatar:s,aiAvatar:c,date:p,time:d,timestamp:g,showTime:h=!0,errorMessage:v,styles:f,reference:b,webReference:x,databaseReference:C,graphReference:y,filePaths:w,currentFiles:A,fileManagerData:k,audioUrl:F,feedbackResult:D,queryId:I,defaultAnswer:$,isWelcome:M=!1,isLast:P=!1,respTime:S,tokens:B,resultType:N,followUpQuestions:R=[],tools:L={},eventsEmit:O,referenceMode:V="list"})=>{gt(()=>{console.log("isUser",u),console.log("isLast",P)},[P,u]);const _=Bi(),K=Je(()=>{var X,me,Me,de,U,ve,be,ie,pe,te,ee;return{colors:{primary:((X=_==null?void 0:_.colors)==null?void 0:X.primary)||"#3b82f6",background:((me=_==null?void 0:_.colors)==null?void 0:me.background)||"#ffffff",userBackground:((Me=_==null?void 0:_.colors)==null?void 0:Me.primary)||"#3b82f6",border:((de=_==null?void 0:_.colors)==null?void 0:de.border)||"#e5e7eb",text:((U=_==null?void 0:_.colors)==null?void 0:U.text)||"#374151",disabled:((ve=_==null?void 0:_.colors)==null?void 0:ve.disabled)||"#6b7280",info:((be=_==null?void 0:_.colors)==null?void 0:be.info)||"#3b82f6",warning:((ie=_==null?void 0:_.colors)==null?void 0:ie.warning)||"#f59e0b",error:((pe=_==null?void 0:_.colors)==null?void 0:pe.error)||"#ef4444",...(te=f==null?void 0:f.theme)==null?void 0:te.colors},icons:{aiAvatar:c||"/vite.svg",userAvatar:s||"/default-user-avatar.png",...(ee=f==null?void 0:f.theme)==null?void 0:ee.icons}}},[_,f,c,s]),q=Je(()=>{const X=d||p||g;return!X||!h?null:Qy(X).format("YY-MM-DD HH:mm:ss")},[d,p,g,h]),[Q,se]=et([]),[T,Z]=et(null),[W,z]=et(!1),[G,Y]=et(!1),[J,oe]=et(!1),[re,ne]=et(!1),[ue,ce]=et(!1);console.log("isThinkCollahandleImageClickhandleImageClickhandleImageClickpsed");const xe=(X,me)=>{switch(console.log("handleImageClick",X,me),X){case"imageClick":Z(me);break}},Te=()=>{const X={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:"\u{1F4AD}"},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:"\u{1F4AD}"},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:v||"\u62B1\u6B49\uFF0C\u672C\u6B21\u8BF7\u6C42\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",icon:"\u274C"},initializing:{text:"\u6B63\u5728\u521D\u59CB\u5316...",icon:"\u2699\uFE0F"},ready:{text:"\u601D\u8003\u5B8C\u6210",icon:j.jsx(fa,{type:"rag/think",size:16})}}[l]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},me=S?`(\u7528\u65F6 ${Math.round(S/1e3)} \u79D2)`:"";return j.jsx("div",{className:"think-header",children:j.jsx("div",{className:"think-header-left ml-[16px]",children:j.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[j.jsx("div",{className:"think-icon",children:X.icon}),j.jsx("div",{className:"think-title",children:X.text}),me&&j.jsx("div",{className:"think-time",children:me}),Ye&&j.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{ce(!ue)},children:j.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:ue?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:j.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},[Fe,ge]=et([]),[ye,Ee]=et(null),Ve=Je(()=>{try{if(!b)return[];const X=JSON.parse(b);return Array.isArray(X)?X:[]}catch{return[]}},[b]),Ne=(X,me)=>{var be,ie,pe;const Me=((be=X==null?void 0:X.metadata)==null?void 0:be.source)||(X==null?void 0:X.file_path)||(X==null?void 0:X.path)||(X==null?void 0:X.convertedFilePath)||(X==null?void 0:X.parsedFilePath)||"",de=((ie=X==null?void 0:X.metadata)==null?void 0:ie.title)||(X==null?void 0:X.file_name)||"",U=((pe=X==null?void 0:X.metadata)==null?void 0:pe.id)||(X==null?void 0:X.id)||(X==null?void 0:X.file_id)||"",ve=Ve.find(te=>{var pt,Qe,Ae;const ee=((pt=te==null?void 0:te.metadata)==null?void 0:pt.source)||(te==null?void 0:te.file_path)||(te==null?void 0:te.path)||(te==null?void 0:te.convertedFilePath)||(te==null?void 0:te.parsedFilePath)||"",Oe=((Qe=te==null?void 0:te.metadata)==null?void 0:Qe.title)||(te==null?void 0:te.file_name)||"",We=((Ae=te==null?void 0:te.metadata)==null?void 0:Ae.id)||(te==null?void 0:te.id)||"";return U&&We&&String(U)===String(We)||Me&&ee&&ee===Me||de&&Oe&&Oe===de});if(ve){const te=(ve!=null&&ve.references&&Array.isArray(ve.references)?ve.references:[ve]).find(ee=>String(ee.order_num)===String(me)||String(ee.id)===String(me));if(te)return te}for(const te of Ve){if(te!=null&&te.references&&Array.isArray(te.references)){const ee=te.references.find(Oe=>String(Oe.order_num)===String(me)||String(Oe.id)===String(me));if(ee)return ee}if(String(te.order_num)===String(me)||String(te.id)===String(me))return te}return null},Ie=(X,me)=>{function Me(ie,pe){for(const te of ie){if(te.references&&Array.isArray(te.references)){const ee=te.references.find(Oe=>String(Oe.order_num)===String(pe)||String(Oe.id)===String(pe));if(ee)return ee}if(String(te.order_num)===String(pe)||String(te.id)===String(pe))return te}return null}let de=[];try{b&&(de=JSON.parse(b))}catch(ie){console.error("Failed to parse reference:",ie)}const U=Me(de,X.id),ve=ie=>{if(typeof n!="string")return;const pe=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ie}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(pe&&pe[1]){const te=Number(pe[1]);return Number.isNaN(te)?void 0:te}},be={tagInfo:{id:X==null?void 0:X.id,index:ve(String(X==null?void 0:X.id)),image_urls:(X==null?void 0:X.imageUrls)||(X==null?void 0:X.image_urls)||[]},fromtype:String((X==null?void 0:X.fromtype)??""),leaf:X,attributes:me,referenceDoc:U||void 0};if(String(X==null?void 0:X.fromtype)==="2"&&y)try{const ie=JSON.parse(y||"[]"),pe=(Array.isArray(ie)?ie:[]).find(te=>{if(Array.isArray(te==null?void 0:te.traceNodes))return te.traceNodes.some(Oe=>String(Oe==null?void 0:Oe.id)===String(X.id));const ee=String(X.id||"").split("_")[0];return String(te==null?void 0:te.id)===ee});pe&&(be.graph={id:pe.id,graphName:pe.graphName,fetchUrl:pe.fetchUrl,cyphers:pe.cyphers},be.traceNode=Array.isArray(pe.traceNodes)?pe.traceNodes.find(te=>String(te==null?void 0:te.id)===String(X.id)):void 0)}catch{}O==null||O("action_retrive_tag",be),O==null||O("retrive_tag:click",be)},tt=X=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",X),console.log("databaseReference available:",!!C),X.id&&C){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",C);const me=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:X.id,databaseReference:C}});console.log("Dispatching event:",me),window.dispatchEvent(me)}else console.log("Cannot send response - missing id or databaseReference")};Ce.useEffect(()=>{const X=me=>{tt(me.detail)};return window.addEventListener("retrieve-sql-data:request-data",X),()=>{window.removeEventListener("retrieve-sql-data:request-data",X)}},[C]),Ce.useEffect(()=>{const X=me=>{Ue(me.detail)};return window.addEventListener("rtext_pagination_click",X),()=>{window.removeEventListener("rtext_pagination_click",X)}},[ye]);const Ue=X=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",X),X.replacePredataFunction&&ye){const me={...ye,rows:ye.rows};X.replacePredataFunction(me)}O==null||O("rtext_pagination_click",X)},_e=at(new Map),Xe=at(1),Se=at(""),De=at({0:1,1:1,2:1,3:1}),Re=Je(()=>{if(typeof n=="string"){let X=n;const me=[];return I&&I!==Se.current&&(_e.current.clear(),Xe.current=1,De.current={0:1,1:1,2:1,3:1},Se.current=I),o==="stream"&&(X=X.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Me,de)=>{const U=de.match(/id=['"]([^'"]+)['"]/),ve=de.match(/fromType=['"]([^'"]+)['"]/);if(U){const be=U[1],ie=ve?ve[1]:"0";if(!_e.current.has(be)){const te=De.current,ee=ie==="1"?"1":ie==="2"?"2":ie==="3"?"3":"0",Oe=te[ee]??1;_e.current.set(be,Oe),te[ee]=Oe+1,De.current=te}const pe=_e.current.get(be);return`[retrive-tag${de}][${pe}][/retrive-tag]`}return Me})),X=X.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Me=>{const de=Me.match(/image_urls=['"]([^'"]+)['"]/);if(de){const U=de[1].split(";").map(ve=>ve.trim()).filter(Boolean);me.push(...U)}return Me}),me.length>0&&se(me),X}return n},[n,o,I]),ze=Je(()=>{if(typeof Re=="string")try{return ep(Re)}catch(X){return console.error("Failed to deserialize markdown:",X),[]}return[]},[Re]),Ze=Ge(X=>{if(!(!X||typeof Re!="string"))try{const me=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${X}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Re);if(me&&me[1]){const Me=Number(me[1]);return Number.isNaN(Me)?me[1]:Me}}catch{}},[Re]),qe=Je(()=>v9(ze||[]),[ze]),Ct=Je(()=>{const X={};return qe.forEach(me=>{me!=null&&me.id&&!X[me.id]&&(X[me.id]=me.index)}),X},[qe]);gt(()=>{try{o==="stream"&&C&&(X=>{try{const me=typeof X=="string"?JSON.parse(X):X;return me?Array.isArray(me)?me:[me]:[]}catch{return[]}})(C).forEach(X=>{const me=X==null?void 0:X.id;if(!me)return;const Me=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:me,databaseReference:X}});window.dispatchEvent(Me)})}catch{}},[o,C]);const Ye=Je(()=>{if(!Array.isArray(ze))return!1;const X=Me=>{for(const de of Me)if(de.type==="think"||Array.isArray(de.children)&&X(de.children))return!0;return!1},me=X(ze);return console.log("Think detection:",{slateContent:ze,hasThinkElement:me,displayStatus:l,isUser:u}),me},[ze,l,u]),ut=Je(()=>({databaseReference:C,...Ye&&{isThinkCollapsed:ue}}),[C,Ye,ue]),mt=Je(()=>i||(u?K.icons.userAvatar:K.icons.aiAvatar),[i,u,K.icons]),bt=Je(()=>typeof n=="string"?n:Array.isArray(n)?n.map(X=>typeof X=="string"?X:X.text||"").join(""):$||"",[n,$]),dt=()=>{if(M)return null;const X=[{key:"copy",show:L.copy!==!1,icon:o9,label:"\u590D\u5236",onClick:()=>O==null?void 0:O("chatbox:copy",{content:bt})},{key:"like",show:L.like!==!1,icon:g9,label:"\u8D5E",onClick:()=>O==null?void 0:O("chatbox:like",{result:D,queryId:I}),active:D===1},{key:"dislike",show:L.dislike!==!1,icon:p9,label:"\u8E29",onClick:()=>O==null?void 0:O("chatbox:dislike",{result:D,queryId:I}),active:D===0},{key:"repeat",show:!u&&P,icon:d9,label:"\u91CD\u590D",onClick:()=>O==null?void 0:O("chatbox:repeat",{content:n,queryId:I,filePaths:w,audioUrl:F})},{key:"forward",show:L.forward,icon:f9,label:"\u8F6C\u53D1",onClick:()=>O==null?void 0:O("chatbox:forward",{content:bt,queryId:I})},{key:"delete",show:L.delete,icon:h9,label:"\u5220\u9664",onClick:()=>O==null?void 0:O("chatbox:delete",{queryId:I})},{key:"edit",show:L.edit,icon:u9,label:"\u7F16\u8F91",onClick:()=>O==null?void 0:O("chatbox:edit",{content:bt,queryId:I})}];return j.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[j.jsx(w9,{$theme:K,children:X.filter(me=>me.show).map(me=>{const Me=me.icon;return j.jsx(qa,{title:me.label,placement:"top",children:j.jsx("button",{className:me.active?"active":"",onClick:me.onClick,children:j.jsx(Me,{size:18})})},me.key)})}),!u&&l=="ready"&&!M&&j.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017 ",j.jsx("span",{style:{color:K.colors.primary},children:B||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",j.jsx("span",{style:{color:K.colors.primary},children:Math.round((S||0)/1e3)}),"\u79D2"]})]})},Ut=Je(()=>{if(!b)return[];let X=[];try{const U=JSON.parse(b);X=Array.isArray(U)?U:[]}catch{return[]}let me=X.map(U=>{var ve;try{const be=U.metadata||{};let ie="";be.type==="video"&&be.source_name&&typeof be.source_name=="string"?ie=be.source_name:U.name&&typeof U.name=="string"?ie=U.name:U.file_name&&typeof U.file_name=="string"?ie=U.file_name:be.title&&typeof be.title=="string"?ie=be.title:be.source&&typeof be.source=="string"?ie=be.source.split("/").pop()||"":U.order_num?ie=String(U.order_num):ie="\u672A\u77E5\u6587\u6863";let pe="pdf";if(be.type&&typeof be.type=="string")pe=be.type.toLowerCase();else if(U.name&&typeof U.name=="string"){const Qe=U.name.split(".").pop();Qe&&(pe=Qe.toLowerCase())}else if(be.source&&typeof be.source=="string"){const Qe=be.source.split(".").pop();Qe&&(pe=Qe.toLowerCase())}else if(U.file_path&&typeof U.file_path=="string"){const Qe=U.file_path.split(".").pop();Qe&&(pe=Qe.toLowerCase())}const te=U.parsedFilePath||be.file_path||U.file_path||U.convertedFilePath||be.link||be.source_link||"",{metadata:ee,...Oe}=U,We=be.source||"",pt=Aa(U.score??be.score);return{file_id:be.id||U.uid||"",file_name:ie,file_type:pe,path:te,score:pt,tags:[],parsedFilePath:U.parsedFilePath,source:We,...Oe}}catch(be){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",be,U);const{metadata:ie,...pe}=U,te=((ve=U.metadata)==null?void 0:ve.source)||U.file_path||U.convertedFilePath||"",ee=Aa(U.score);return{file_id:U.uid||"",file_name:U.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:U.convertedFilePath||U.file_path||"",score:ee,tags:[],parsedFilePath:U.parsedFilePath,source:te,...pe}}});const Me=_n(ze||[]);if(Me&&Me.length){const U=Me.filter(be=>be.fromtype==="0"),ve=Me.filter(be=>be.fromtype==="3");me=me.map(be=>{const ie=U.map(te=>{var pt;const ee=X.find(Qe=>String(Qe.order_num)===String(te.id));if(!ee||!((pt=ee==null?void 0:ee.metadata)!=null&&pt.source))return null;const Oe=be.source||"",We=ee.metadata.source||"";return Oe&&We&&Oe!==We?null:{id:te.id||"",index:Ze(String(te.id))||te.indexId||"",image_urls:te.imageUrls?Array.isArray(te.imageUrls)?te.imageUrls:[te.imageUrls]:te.image_urls?te.image_urls.split(";").map(Qe=>Qe.trim()).filter(Boolean):[],metadata:ee.metadata||{},order_num:ee.order_num,parsedFilePath:ee.parsedFilePath}}).filter(te=>te!==null),pe=ve.map(te=>{var pt;const ee=X.find(Qe=>String(Qe.order_num)===String(te.id));if(!ee||!((pt=ee==null?void 0:ee.metadata)!=null&&pt.source))return null;const Oe=be.source||"",We=ee.metadata.source||"";return Oe&&We&&Oe!==We?null:{id:te.id||"",index:Ze(String(te.id))||te.indexId||"",image_urls:te.imageUrls?Array.isArray(te.imageUrls)?te.imageUrls:[te.imageUrls]:te.image_urls?te.image_urls.split(";").map(Qe=>Qe.trim()).filter(Boolean):[],metadata:ee.metadata||{},order_num:ee.order_num,parsedFilePath:ee.parsedFilePath}}).filter(te=>te!==null);return{...be,tags:[...ie,...pe]}})}const de=new Map;return me.filter(U=>{const ve=(U==null?void 0:U.source)||U.file_name;return ve?de.has(ve)?!1:(de.set(ve,!0),!0):!0}).sort((U,ve)=>Number((ve==null?void 0:ve.score)??0)-Number((U==null?void 0:U.score)??0))},[b,ze,Re,Ze]),Ot=Je(()=>{if(!x)return[];let X=[];try{const de=JSON.parse(x);X=Array.isArray(de)?de:[]}catch{return[]}if(!(X!=null&&X.length))return[];let me=X.map(de=>{var ve,be,ie;const U=(de==null?void 0:de.score)??((ve=de==null?void 0:de.metadata)==null?void 0:ve.score);return{link:(be=de==null?void 0:de.metadata)==null?void 0:be.link,file_name:(ie=de==null?void 0:de.metadata)==null?void 0:ie.title,score:Aa(U),tags:[]}});const Me=_n(ze||[]);if(Me&&Me.length){const de=Me.filter(U=>U.fromtype==="1");me=me.map(U=>{const ve=de.map(be=>{var pe;const ie=X.find(te=>String(te.order_num)===String(be.id));return!ie||!((pe=ie==null?void 0:ie.metadata)!=null&&pe.title)||ie.metadata.title!==U.file_name?null:{id:be.id||"",index:Ze(String(be.id))||be.indexId||"",image_urls:be.imageUrls?Array.isArray(be.imageUrls)?be.imageUrls:[be.imageUrls]:be.image_urls?be.image_urls.split(";").map(te=>te.trim()).filter(Boolean):[],metadata:ie.metadata||{},order_num:ie.order_num}}).filter(be=>be!==null);return{...U,tags:ve}})}return me.sort((de,U)=>Number((U==null?void 0:U.score)??0)-Number((de==null?void 0:de.score)??0))},[x,ze,Re,Ze]),Vt=Je(()=>{if(console.log("[ChatMessageAdapter] parseGraphReferenceData - graphReference:",y,"type:",typeof y),!y)return console.log("[ChatMessageAdapter] graphReference \u4E3A\u7A7A\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];let X=[];try{if(typeof y=="string"){if(y==="[]"||y==="null"||y.trim()==="")return console.log("[ChatMessageAdapter] graphReference \u662F\u7A7A\u5B57\u7B26\u4E32\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];const de=JSON.parse(y);X=Array.isArray(de)?de:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",X.length)}else if(Array.isArray(y))X=y,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",X.length);else if(typeof y=="object"&&y!==null)X=[y],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",X.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof y,y),[]}catch(de){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",de,y),[]}let me=X.map((de,U)=>{const{metadata:ve,...be}=de;return{id:de.id||`graph-${U}`,graphName:de.graphName||`\u56FE\u8C31${U+1}`,tags:[],...be}});const Me=_n(ze||[]);if(Me&&Me.length){const de=Me.filter(U=>U.fromtype==="2");me=me.map(U=>{let ve=[];Array.isArray(U.traceNodes)&&U.traceNodes.length>0?ve=U.traceNodes.map((pe,te)=>({id:pe.id,index:Ze(String(pe.id))??te+1,image_urls:[],metadata:pe.metadata||{},...pe})):ve=de.filter(pe=>String(pe.id)===String(U.id)).map(pe=>({id:pe.id||"",index:Ze(String(pe.id))||pe.indexId||"",image_urls:pe.imageUrls?Array.isArray(pe.imageUrls)?pe.imageUrls:[pe.imageUrls]:pe.image_urls?pe.image_urls.split(";").map(te=>te.trim()).filter(Boolean):[],metadata:{}}));const be=new Set,ie=ve.filter(pe=>be.has(String(pe.id))?!1:(be.add(String(pe.id)),!0)).sort((pe,te)=>Number(pe.index)-Number(te.index));return{...U,tags:ie}})}return me},[y,ze,Re,Ze]),Mt=Je(()=>{const X=[..._n(ze||[]).filter(me=>me.imageUrls&&Array.isArray(me.imageUrls)).flatMap(me=>me.imageUrls),...Q];return Array.from(new Set(X))},[ze,Q]),Lt=Je(()=>typeof n!="string"?[]:m9(n),[n]),Nt=Je(()=>Array.from(new Set([...Mt||[],...Lt||[]])),[Mt,Lt]),Pe=Je(()=>{var X,me,Me,de,U,ve,be,ie;if(!C)return null;try{const pe=typeof C=="string"?JSON.parse(C):C;if(Array.isArray(pe)&&pe.length>0){const te=pe[0];if(te.retrieveSqlData)return{dataFetchUrl:te.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:te.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:te.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:te.retrieveSqlData.total||0,type:te.retrieveSqlData.type||"COLLECTION",preData:{columns:((me=(X=te.retrieveSqlData.preData)==null?void 0:X[0])==null?void 0:me.columns)||[],rows:((de=(Me=te.retrieveSqlData.preData)==null?void 0:Me[0])==null?void 0:de.data)||[]}}}return pe.retrieveSqlData?{dataFetchUrl:pe.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:pe.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:pe.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:pe.retrieveSqlData.total||0,type:pe.retrieveSqlData.type||"COLLECTION",preData:{columns:((ve=(U=pe.retrieveSqlData.preData)==null?void 0:U[0])==null?void 0:ve.columns)||[],rows:((ie=(be=pe.retrieveSqlData.preData)==null?void 0:be[0])==null?void 0:ie.data)||[]}}:{dataFetchUrl:pe.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:pe.databaseName||"\u6570\u636E\u5E93",tableName:pe.tableName||"\u6570\u636E\u8868",total:pe.total||0,type:pe.type||"COLLECTION",preData:pe.preData||{columns:[],rows:[]}}}catch(pe){return console.error("Failed to parse databaseReference:",pe),null}},[C]),kt=X=>{const{dataSourceType:me,databaseName:Me,businessTableName:de,tableName:U}=X;return me==="DataTable"?`${Me||"\u6570\u636E\u5E93"} - ${de||"\u6570\u636E\u8868"}`:me==="DirectDB"?`${Me||"\u6570\u636E\u5E93"} - ${U||"\u6570\u636E\u8868"}`:Me||de||U||"\u6570\u636E\u5E93"};Ce.useEffect(()=>{Ee(null),se([])},[I]),Ce.useEffect(()=>{var Me;const X=de=>{try{const U=typeof de=="string"?JSON.parse(de):de;return U?Array.isArray(U)?U:[U]:[]}catch(U){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",U),[]}},me=(de,U)=>{if(!Array.isArray(de))return[];const ve=U!=null&&U.id?String(U.id):void 0,be=ve?Ze(ve):void 0,ie=ve?Ct[ve]:void 0,pe=be??ie??(U==null?void 0:U.referenceIndex)??void 0,te=ve&&pe!==void 0?[{id:ve,index:pe}]:[];return de.map(ee=>{var Oe,We,pt,Qe;return{...ee,id:ee.id||ve||ee.tableName,referenceId:ve,referenceIndex:pe,tags:te,fetchUrl:ee.fetchUrl||((Oe=U==null?void 0:U.retrieveSqlData)==null?void 0:Oe.fetchUrl)||(Pe==null?void 0:Pe.dataFetchUrl)||"",databaseName:ee.databaseName||((We=U==null?void 0:U.retrieveSqlData)==null?void 0:We.databaseName)||(Pe==null?void 0:Pe.databaseName)||"",tableName:ee.tableName||((pt=U==null?void 0:U.retrieveSqlData)==null?void 0:pt.tableName)||(Pe==null?void 0:Pe.tableName)||"",dataSourceType:ee.dataSourceType||((Qe=U==null?void 0:U.retrieveSqlData)==null?void 0:Qe.type)||(Pe==null?void 0:Pe.type)||"DataTable"}})};if(C){const de=X(C),U=[];if(de.forEach(ve=>{var be,ie,pe;if(Array.isArray(ve==null?void 0:ve.retrieveTableDataList)&&ve.retrieveTableDataList.length)U.push(...me(ve.retrieveTableDataList,ve));else if(Array.isArray((pe=(ie=(be=ve==null?void 0:ve.retrieveSqlData)==null?void 0:be.preData)==null?void 0:ie[0])==null?void 0:pe.data)&&ve.retrieveSqlData.preData[0].data.length){const te={businessTableName:ve.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:ve.retrieveSqlData.databaseName||(Pe==null?void 0:Pe.databaseName)||"\u6570\u636E\u5E93",tableName:ve.retrieveSqlData.tableName||(Pe==null?void 0:Pe.tableName)||"\u6570\u636E\u8868",fetchUrl:ve.retrieveSqlData.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",dataSourceType:ve.retrieveSqlData.type||"DirectDB",total:ve.retrieveSqlData.total};U.push(...me([te],ve))}}),U.length>0){ge(U);return}if((Me=Pe==null?void 0:Pe.preData)!=null&&Me.rows){const ve=me(Pe.preData.rows,{});ge(ve);return}console.warn("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] \u672A\u627E\u5230\u53EF\u7528\u7684\u6570\u636E\u5E93\u6570\u636E")}else console.log("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] databaseReference \u4E0D\u5B58\u5728\uFF0C\u6E05\u7A7A databaseData");ge([])},[C,Pe,I,Ct,Ze]);const Qt=Ge(()=>{try{const X=Array.isArray(Ut)?Ut:[],me=Array.isArray(Ot)?Ot:[],Me=Array.isArray(Vt)?Vt:[],de=Nt,U=_n(ze||[]),ve=Oe=>typeof Re!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Oe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(Re),be=Oe=>{const We=new Map;return Oe.forEach(pt=>{if(pt.id){const Qe=String(pt.id);if(!We.has(Qe))We.set(Qe,pt);else{const Ae=We.get(Qe),nt=Number(pt.index)||0,er=Number(Ae.index)||0;(nt<er||nt===er&&!Ae.index)&&We.set(Qe,pt)}}}),Array.from(We.values())},ie=X.map(Oe=>({...Oe,tags:be((Oe.tags||[]).filter(We=>We.id&&ve(String(We.id))))})),pe=me.map(Oe=>({...Oe,tags:be((Oe.tags||[]).filter(We=>We.id&&ve(String(We.id))))})),te=Me.map(Oe=>({...Oe,tags:be((Oe.tags||[]).filter(We=>We.id&&ve(String(We.id))))})),ee=Fe&&Fe.length>0?Fe.map(Oe=>({id:Oe.id||Oe.tableName||Oe.referenceId||"",databaseName:Oe.databaseName||(Pe==null?void 0:Pe.databaseName)||"",tableName:Oe.tableName||(Pe==null?void 0:Pe.tableName)||"",fetchUrl:Oe.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",score:Aa(Oe.score),tags:Oe.tags||[],referenceIndex:Oe.referenceIndex,metadata:Oe.metadata?{...Oe.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:I,knowledgeRefs:ie,webRefs:pe,graphRefs:te,databaseRefs:ee,images:de,raw:{reference:b,webReference:x,graphReference:y,databaseReference:C,retriveNodes:U}}}catch{return{queryId:I,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:b,webReference:x,graphReference:y,databaseReference:C,retriveNodes:[]}}}},[Ut,Ot,Vt,Pe,Fe,Nt,ze,I,b,x,y,C,Re]),gr=Je(()=>{if(!u)return[];if(Array.isArray(A))return A;if(typeof A=="string"&&A)try{return JSON.parse(A)}catch{return[]}return[]},[u,A]),hr=()=>{if(!u||gr.length===0)return null;const X=ie=>ie!=null&&ie.status&&(String(ie.status).toLowerCase()==="uploading"||String(ie.status).toLowerCase()==="parsing")?!1:!!(ie!=null&&ie.url||ie!=null&&ie.filePath||ie!=null&&ie.convertedFilePath),me=gr.filter(ie=>{const pe=(ie.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(pe.toLowerCase())}),Me=gr.filter(ie=>{const pe=(ie.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(pe.toLowerCase())}),de=me.filter(X),U=me.filter(ie=>!X(ie)),ve=Me.filter(X),be=Me.filter(ie=>!X(ie));return j.jsxs("div",{className:"w-full px-[1.8rem] mt-4",children:[(de.length>0||U.length>0)&&j.jsx(Tl,{$theme:K,children:j.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[U.map((ie,pe)=>{var te;return j.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:j.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((te=K.colors)==null?void 0:te.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${pe}`)}),de.map(ie=>j.jsxs("div",{className:"gallery-item",onClick:()=>{O==null||O("reference_file:click",{file:ie.name,file_type:"image",url:ie.url||ie.filePath,parse_url:ie.parseUrl||ie.convertedFilePath,retrieve_tags:ie.retrieveTags||[],file_id:ie.uid,parsed_file_type:"image",references:ie,type:"image",isUploadFile:!0,pdfPages:ie.pdfPages||0})},children:[j.jsx(Pl,{src:ie.url||ie.filePath,alt:ie.name,className:"gallery-image",token:e,url:t,eventsEmit:xe}),j.jsx("div",{className:"gallery-overlay",children:ie.name})]},ie.uid||ie.name))]})}),(ve.length>0||be.length>0)&&j.jsxs("div",{className:"w-full",children:[j.jsxs("div",{className:"text-sm font-semibold text-gray-700 mb-3 px-4",children:["\u4E0A\u4F20\u6587\u6863 (",ve.length,")"]}),j.jsxs("div",{className:"flex flex-col gap-2 px-4",style:{direction:"ltr"},children:[be.map((ie,pe)=>{var te;return j.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 bg-gray-50/40",children:[j.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded bg-gray-200"}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"h-3 rounded bg-gray-200 w-[60%]"})}),j.jsx("div",{className:"w-6 h-6",children:j.jsx("div",{className:"animate-spin",style:{width:18,height:18,border:"2px solid #d1d5db",borderTopColor:((te=K.colors)==null?void 0:te.primary)||"#3b82f6",borderRadius:"9999px"}})})]},`pending-doc-${pe}`)}),ve.map(ie=>{const pe=(ie.name||"").split(".").pop()||"";return j.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:border-blue-300 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>{O==null||O("reference_file:click",{file:ie.name,file_type:pe,url:ie.url||ie.filePath,parse_url:ie.parseUrl||ie.convertedFilePath,retrieve_tags:ie.retrieveTags||[],file_id:ie.uid,parsed_file_type:pe,references:ie,type:"file",isUploadFile:!0,pdfPages:ie.pdfPages||0})},children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center ",children:j.jsx(fa,{type:Ld(pe),size:16})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:te=>{te.stopPropagation(),O==null||O("referenceFile_question",{data:{...ie,file_type:pe,file_name:ie.name,metadata:ie,parsedFilePath:ie.url||ie.filePath}})},children:ie.name})}),ie.size&&j.jsx("div",{className:"text-sm text-gray-600",children:ie.size})]},ie.uid||ie.name)})]})]})]})},ir=()=>{var te;if(u)return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",V),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",y),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",Vt);const X=Array.isArray(Ut)?Ut:[],me=Array.isArray(Ot)?Ot:[],Me=Array.isArray(Vt)?Vt:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",X.length,"webList:",me.length,"graphList:",Me.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",Me);const de=X.length>0&&N!==5,U=me.length>0,ve=Me.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",de,"hasWebRefs:",U,"hasGraphRefs:",ve);const be=Nt.length>0,ie=Fe&&Fe.length>0,pe=de||U||ve||be||ie;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",pe),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",C),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",Fe),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",Fe==null?void 0:Fe.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",ie),V==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",pe),!pe)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const ee=de&&(X==null?void 0:X.length)||0,Oe=U&&(me==null?void 0:me.length)||0,We=ve&&(Me==null?void 0:Me.length)||0,pt=ie&&(Fe==null?void 0:Fe.length)||0;let Qe=ee+Oe+We+pt;return Qe===0&&be&&(Qe=1),j.jsxs(j.Fragment,{children:[be&&j.jsx(Tl,{$theme:K,children:j.jsx("div",{className:"gallery-grid",children:Nt.map((Ae,nt)=>j.jsxs("div",{className:"gallery-item",onClick:()=>{O==null||O("reference_file:click",{file:`\u56FE${nt+1}`,file_type:"image",url:Ae,parse_url:Ae,retrieve_tags:[],references:{url:Ae},type:"image",isUploadFile:!1})},children:[j.jsx(Pl,{src:Ae,alt:`\u56FE${nt+1}`,className:"gallery-image",token:e,url:t,eventsEmit:xe}),j.jsxs("div",{className:"gallery-overlay",children:["\u56FE",nt+1]})]},Ae+nt))})}),j.jsx("div",{style:{padding:"6px 2.9rem"},children:j.jsxs("button",{style:{cursor:"pointer",color:((te=K.colors)==null?void 0:te.textDisabled)||"#86909C"},className:"text-sm flex items-center gap-x-1 px-3 py-1 rounded border border-gray-200 hover:border-blue-300 transition-colors",onClick:()=>{const Ae=Qt();O==null||O("references:click",Ae)},onMouseEnter:Ae=>{var nt;Ae.currentTarget.style.color=((nt=K.colors)==null?void 0:nt.primary)||"#3b82f6"},onMouseLeave:Ae=>{var nt;Ae.currentTarget.style.color=((nt=K.colors)==null?void 0:nt.textDisabled)||"#86909C"},children:[j.jsx(l9,{size:16}),j.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",Qe?` ${Qe}`:""]}),j.jsx(n9,{size:16})]})})]})}return pe?j.jsxs(j.Fragment,{children:[be&&j.jsx(Tl,{$theme:K,children:j.jsx("div",{className:"gallery-grid",children:Nt.map((ee,Oe)=>j.jsxs("div",{className:"gallery-item",onClick:()=>{O==null||O("reference_file:click",{file:`\u56FE${Oe+1}`,file_type:"image",url:ee,parse_url:ee,retrieve_tags:[],references:{url:ee},type:"image",isUploadFile:!1})},children:[j.jsx(Pl,{src:ee,alt:`\u56FE${Oe+1}`,className:"gallery-image",token:e,url:t,eventsEmit:xe}),j.jsxs("div",{className:"gallery-overlay",children:["\u56FE",Oe+1]})]},ee+Oe))})}),de&&j.jsxs(Ba,{$theme:K,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${X.length})`}),X.length>2&&j.jsx("div",{onClick:()=>z(!W),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:W?j.jsx(ka,{size:16,className:"text-[#b4b4b4]"}):j.jsx(Sa,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(W?X:X.slice(0,2)).map((ee,Oe)=>ee&&j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:(()=>{const We=ee.file_type||(ee.file_name||"").split(".").pop()||"pdf",pt=(ee.file_name||"").split(".").pop()||"file";return We==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(We)?j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:j.jsx(c9,{size:16,className:"text-red-600"})}):j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:j.jsx(fa,{type:Ld(pt),size:16})})})()}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:We=>{We.stopPropagation(),O==null||O("knowledge_referenceFile_title:click",{data:{...ee,file_type:ee.file_type,file_name:ee.file_name,metadata:ee.metadata,parsedFilePath:ee.parsedFilePath}})},children:ee.file_name})}),j.jsx("div",{className:"flex items-center gap-1",children:(()=>{const We=new Set,pt=(ee.tags||[]).filter(Ae=>We.has(Ae.id)?!1:(We.add(Ae.id),!0)).sort((Ae,nt)=>Number(Ae.index)-Number(nt.index)),Qe=Ae=>{if(typeof Re!="string")return Ae;const nt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Ae}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Re);return nt?nt[1]:Ae};return pt.slice(0,10).map(Ae=>j.jsx("span",{className:"w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:nt=>{nt.stopPropagation();const er=Ne(ee,Ae.id),Gr=ee.file_type==="video"?"3":"0";O==null||O("retrive_tag:click",{tagInfo:er||ee,fromtype:Gr,leaf:{id:Ae.id,fromtype:Gr},attributes:{}})},children:Qe(Ae.id)},Ae.id))})()}),typeof ee.score=="number"&&j.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ee.score).toFixed(2)]}),ee.file_type!=="video"&&j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx(i9,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:We=>{r&&(We.stopPropagation(),O==null||O("referenceFile_download",{data:{...ee,file_type:ee.file_type,file_name:ee.file_name,metadata:ee.metadata,parsedFilePath:ee.parsedFilePath}}))}}),j.jsx("div",{className:"w-px h-4 bg-gray-300"}),j.jsx(s9,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:We=>{We.stopPropagation(),O==null||O("referenceFile_filechat",{data:{...ee,file_type:ee.file_type,file_name:ee.file_name,metadata:ee.metadata,parsedFilePath:ee.parsedFilePath}})}})]})]})},ee.file_id||Oe))})]}),ie&&j.jsxs(Ba,{$theme:K,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Fe.length||0})`}),Fe.length>2&&j.jsx("div",{onClick:()=>oe(!J),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:J?j.jsx(ka,{size:16,className:"text-[#b4b4b4]"}):j.jsx(Sa,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(J?Fe:Fe.slice(0,2)).map((ee,Oe)=>j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:j.jsx(a9,{size:20,className:"text-blue-600"})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:We=>{We.stopPropagation(),O==null||O("database_referenceFile_title:click",{data:{...ee,file_type:"database",file_name:kt(ee),metadata:ee,parsedFilePath:ee.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",file:ee.databaseName||"database",url:ee.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",parse_url:ee.fetchUrl||(Pe==null?void 0:Pe.dataFetchUrl)||"",retrieve_tags:ee.tags||[],references:ee,type:"database",isUploadFile:!1}})},children:kt(ee)})}),j.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(ee.tags)&&ee.tags.length?ee.tags:[{id:ee.referenceId||`database-${Oe}`,index:ee.referenceIndex??Oe+1}]).map(We=>j.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:We.index??Oe+1},`${We.id||"database"}-${We.index}`))}),typeof ee.score=="number"&&j.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ee.score).toFixed(2)]})]})},ee.tableName||Oe))})]}),U&&j.jsxs(Ba,{$theme:K,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${me.length})`}),me.length>2&&j.jsx("div",{onClick:()=>Y(!G),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:G?j.jsx(ka,{size:16,className:"text-[#b4b4b4]"}):j.jsx(Sa,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(G?me:me.slice(0,2)).map((ee,Oe)=>j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:j.jsx(fa,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:We=>{We.stopPropagation(),O==null||O("web_referenceFile_title:click",{data:{...ee,file_type:ee.file_type,file_name:ee.file_name,metadata:ee.metadata,parsedFilePath:ee.parsedFilePath,file:ee.file_name,url:ee.link,parse_url:ee.link,retrieve_tags:ee.tags||[],references:ee,type:"file",isUploadFile:!1}})},children:ee.file_name})}),j.jsx("div",{className:"flex items-center gap-1",children:(()=>{const We=new Set,pt=(ee.tags||[]).filter(Ae=>We.has(Ae.id)?!1:(We.add(Ae.id),!0)).sort((Ae,nt)=>Number(Ae.index)-Number(nt.index)),Qe=Ae=>{if(typeof Re!="string")return Ae;const nt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Ae}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Re);return nt?nt[1]:Ae};return pt.slice(0,1).map(Ae=>j.jsx("span",{className:"w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:nt=>{nt.stopPropagation();const er=Ne(ee,Ae.id);O==null||O("retrive_tag:click",{tagInfo:er||ee,fromtype:"1",leaf:{id:Ae.id,fromtype:"1"},attributes:{}})},children:Qe(Ae.id)},Ae.id))})()}),typeof ee.score=="number"&&j.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(ee.score).toFixed(2)]})]})},(ee.link||"")+Oe))})]}),ve&&j.jsxs(Ba,{$theme:K,children:[j.jsx("div",{className:"reference-title justify-between items-center flex",children:j.jsxs("div",{className:"flex items-center gap-2",children:[j.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),j.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Me.length})`}),Me.length>2&&j.jsx("div",{onClick:()=>ne(!re),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:re?j.jsx(ka,{size:16,className:"text-[#b4b4b4]"}):j.jsx(Sa,{size:16,className:"text-[#b4b4b4]"})})]})}),j.jsx("div",{className:"reference-list",children:(re?Me:Me.slice(0,2)).map((ee,Oe)=>j.jsx("div",{className:"reference-item",children:j.jsxs("div",{className:"file-info flex items-end gap-2",children:[j.jsx("div",{className:"flex-shrink-0",children:j.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:j.jsx("div",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center",children:"\u56FE"})})}),j.jsx("div",{className:"flex-1 min-w-0",children:j.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:ee.graphName||`\u56FE\u8C31${Oe+1}`})}),j.jsx("div",{className:"flex items-center gap-1",children:(()=>{const We=new Set,pt=(ee.tags||[]).filter(Ae=>We.has(Ae.id)?!1:(We.add(Ae.id),!0)).sort((Ae,nt)=>Number(Ae.index)-Number(nt.index)),Qe=Ae=>{if(typeof Re!="string")return null;const nt=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${Ae}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Re);return nt?nt[1]??null:null};return pt.map(Ae=>({tag:Ae,num:Qe(Ae.id)})).filter(Ae=>Ae.num!==null&&Ae.num!==void 0&&Ae.num!=="").slice(0,10).map(({tag:Ae,num:nt})=>j.jsx("span",{className:"w-6 h-6 bg-purple-100 text-purple-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-purple-200 transition-colors",onClick:er=>{er.stopPropagation();const Gr=Array.isArray(ee.traceNodes)?ee.traceNodes.find(Xr=>String(Xr==null?void 0:Xr.id)===String(Ae.id)):void 0;O==null||O("retrive_tag:click",{tagInfo:{id:Ae.id,index:Ae.index,image_urls:Ae.image_urls||[]},fromtype:"2",graph:{id:ee.id,graphName:ee.graphName,fetchUrl:ee.fetchUrl,cyphers:ee.cyphers},traceNode:Gr})},children:nt},Ae.id))})()})]})},ee.id||Oe))})]})]}):null},Zr=()=>u||!P||!R||R.length===0?null:j.jsx(D9,{$theme:K,children:j.jsx("div",{className:"follow-up-list",children:R.map((X,me)=>j.jsx("div",{className:"follow-up-item",style:{animationDelay:`${me*260}ms`},onClick:()=>{O==null||O("chatbox:follow_up_question_click",{question:X,queryId:I})},children:X},`${String(X)}-${me}`))})});return j.jsxs(C9,{$align:a,$isUser:u,children:[j.jsxs(b9,{$isUser:u,children:[j.jsx(y9,{$src:mt,$isUser:u}),q&&j.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:q})]}),j.jsx(x9,{$isUser:u,$theme:K,children:j.jsx("div",{className:"message-card",children:j.jsx("div",{className:"message-text",children:o==="stream"?j.jsxs(j.Fragment,{children:[!u&&Te(),j.jsx(Mu,{dataSource:{type:vi.MARKDOWN,content:Re},styles:{letterSpacing:f==null?void 0:f.letterSpacing,lineHeight:f==null?void 0:f.lineHeight,templateField:f==null?void 0:f.templateField,text:f==null?void 0:f.text},theme:{...f==null?void 0:f.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:Ie,eventsEmit:O,extraProps:ut},`md-${(Re||"").length}-think-${ue}`)]}):j.jsx("div",{children:bt})})})}),hr(),ir(),!u&&dt(),Zr(),typeof document<"u"&&sp(j.jsx(E9,{$show:T!==null,onClick:()=>Z(null),children:T&&j.jsxs("div",{className:"modal-content",onClick:X=>X.stopPropagation(),children:[j.jsx("img",{src:T,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),j.jsx("button",{className:"modal-close",onClick:()=>Z(null),children:"\u5173\u95ED"})]})}),document.body)]})},S9=It.div`
902
+ position: relative;
903
+ width: 100%;
904
+ height: 100%;
905
+ overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
906
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
907
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
908
+
909
+ /* 自定义滚动条 */
910
+ &::-webkit-scrollbar {
911
+ width: 8px;
912
+ }
913
+
914
+ &::-webkit-scrollbar-track {
915
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
916
+ border-radius: 4px;
917
+ }
918
+
919
+ &::-webkit-scrollbar-thumb {
920
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
921
+ border-radius: 4px;
922
+
923
+ &:hover {
924
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
925
+ }
926
+ }
927
+ `,k9=It.div`
928
+ position: relative;
929
+ width: 100%;
930
+ height: 100%;
931
+ overflow: auto;
932
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
933
+
934
+ /* 自定义滚动条 */
935
+ &::-webkit-scrollbar {
936
+ width: 8px;
937
+ }
938
+
939
+ &::-webkit-scrollbar-track {
940
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
941
+ border-radius: 4px;
942
+ }
943
+
944
+ &::-webkit-scrollbar-thumb {
945
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
946
+ border-radius: 4px;
947
+
948
+ &:hover {
949
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
950
+ }
951
+ }
952
+ `,jd=It.div`
953
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
954
+ min-height: ${e=>e.height||"auto"};
955
+
956
+ /* 富文本内容样式增强 */
957
+ & h1, & h2, & h3, & h4, & h5, & h6 {
958
+ scroll-margin-top: 2rem;
959
+ }
960
+
961
+ & img {
962
+ max-width: 100%;
963
+ height: auto;
964
+ border-radius: 0.5rem;
965
+ margin: 1rem 0;
966
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
967
+ transition: transform 0.2s ease-in-out;
968
+
969
+ &:hover {
970
+ transform: scale(1.02);
971
+ }
972
+ }
973
+
974
+ /* 表格样式 - 主题感知 */
975
+ & .table-container {
976
+ overflow: auto;
977
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
978
+ border-radius: 6px;
979
+ margin: 1rem 0;
980
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
981
+ }
982
+
983
+ & .table-container table {
984
+ width: 100%;
985
+ border-collapse: collapse;
986
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
987
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
988
+ }
989
+
990
+ & .table-container th,
991
+ & .table-container td {
992
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
993
+ padding: 8px 12px;
994
+ text-align: left;
995
+ }
996
+
997
+ & .table-container th {
998
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
999
+ font-weight: 600;
1000
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1001
+ }
1002
+
1003
+ & .table-container td {
1004
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1005
+ }
1006
+
1007
+ & .table-container tr:nth-child(even) {
1008
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
1009
+ }
1010
+
1011
+ & pre {
1012
+ position: relative;
1013
+
1014
+ &::before {
1015
+ content: '';
1016
+ position: absolute;
1017
+ top: 0;
1018
+ left: 0;
1019
+ right: 0;
1020
+ height: 2px;
1021
+ background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
1022
+ border-radius: 2px 2px 0 0;
1023
+ }
1024
+ }
1025
+
1026
+ & blockquote {
1027
+ position: relative;
1028
+
1029
+ &::before {
1030
+ content: '"';
1031
+ position: absolute;
1032
+ top: -0.5rem;
1033
+ left: -1rem;
1034
+ font-size: 3rem;
1035
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1036
+ opacity: 0.3;
1037
+ }
1038
+ }
1039
+
1040
+
1041
+ `,A9=It.div`
1042
+ display: flex;
1043
+ align-items: center;
1044
+ justify-content: center;
1045
+ padding: 2rem;
1046
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1047
+ font-size: 0.875rem;
1048
+
1049
+ &::before {
1050
+ content: '';
1051
+ width: 20px;
1052
+ height: 20px;
1053
+ border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
1054
+ border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1055
+ border-radius: 50%;
1056
+ animation: spin 1s linear infinite;
1057
+ margin-right: 0.5rem;
1058
+ }
1059
+
1060
+ @keyframes spin {
1061
+ 0% { transform: rotate(0deg); }
1062
+ 100% { transform: rotate(360deg); }
1063
+ }
1064
+ `,B9=It.div`
1065
+ display: flex;
1066
+ flex-direction: column;
1067
+ align-items: center;
1068
+ justify-content: center;
1069
+ padding: 3rem;
1070
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1071
+ text-align: center;
1072
+
1073
+ &::before {
1074
+ content: '📄';
1075
+ font-size: 3rem;
1076
+ margin-bottom: 1rem;
1077
+ }
1078
+ `,F9=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:l=!1,size:i="sm",basePath:u,theme:s={},onChange:c,onScroll:p,onScrollToTop:d,onScrollToBottom:g,onSegmentClick:h,className:v,style:f,height:b="100%"})=>{const x=Bi(),C=Je(()=>{var G,Y,J,oe,re,ne,ue,ce,xe;return{primaryColor:(s==null?void 0:s.primaryColor)||((G=x==null?void 0:x.colors)==null?void 0:G.primary)||"#007bff",secondaryColor:(s==null?void 0:s.secondaryColor)||((Y=x==null?void 0:x.colors)==null?void 0:Y.secondary)||"#6c757d",backgroundColor:(s==null?void 0:s.backgroundColor)||((J=x==null?void 0:x.colors)==null?void 0:J.background)||"#ffffff",textColor:(s==null?void 0:s.textColor)||((oe=x==null?void 0:x.colors)==null?void 0:oe.text)||"#24292f",borderColor:(s==null?void 0:s.borderColor)||((re=x==null?void 0:x.colors)==null?void 0:re.border)||"#dee2e6",disabledBackground:(s==null?void 0:s.disabledBackground)||((ne=x==null?void 0:x.colors)==null?void 0:ne.disabledBackground)||"#f8f9fa",hoverBackground:(s==null?void 0:s.hoverBackground)||((ue=x==null?void 0:x.colors)==null?void 0:ue.hoverBackground)||"#e9ecef",borderRadius:(s==null?void 0:s.borderRadius)||((ce=x==null?void 0:x.space)==null?void 0:ce.radius)||"8px",padding:(s==null?void 0:s.padding)||((xe=x==null?void 0:x.space)==null?void 0:xe.padding)||"1rem",scrollbarTrack:(s==null?void 0:s.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(s==null?void 0:s.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(s==null?void 0:s.scrollbarThumbHover)||"#a8a8a8",...s}},[x,s]),y=at(0);y.current+=1,console.log("[Markdownit] render count:",y.current);const[w,A]=et([]),[k,F]=et({start:0,end:10}),[D,I]=et(0),[$,M]=et(0),[P,S]=et(!1),[B,N]=et(!1),[R,L]=et(!1),O=at(null),V=at(null),_=at(null),K=Je(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);gt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(K)?K.length:"n/a"),A(K)},[K]);const q=Je(()=>t?`${w.length*r}px`:"auto",[w.length,r,t]),Q=Je(()=>{if(!t)return w;const G=Math.max(0,k.start-n),Y=Math.min(w.length,k.end+n);return w.slice(G,Y).map((J,oe)=>({...J,virtualIndex:G+oe}))},[w,k,t,n]),se=Ge(G=>{const{scrollTop:Y,scrollHeight:J,clientHeight:oe}=G.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:Y,scrollHeight:J,clientHeight:oe});const re=!t&&!p&&!d&&!g&&!o;if(console.log("[Markdownit] passiveOnly:",re),re||I(ne=>ne!==Y?(console.log("[Markdownit] setScrollTop:",Y),Y):ne),t&&!re){const ne=Math.floor(Y/r),ue=Math.min(w.length,ne+Math.ceil($/r)+1);F(ce=>ce.start!==ne||ce.end!==ue?(console.log("[Markdownit] setVisibleRange:",{start:ne,end:ue}),{start:ne,end:ue}):ce)}if(!re){const ne=Y<=10;ne!==B&&(console.log("[Markdownit] isAtTop ->",ne),N(ne),ne&&d&&(console.log("[Markdownit] onScrollToTop callback"),d()))}if(!re){const ne=Y+oe>=J-10;ne!==R&&(console.log("[Markdownit] isAtBottom ->",ne),L(ne),ne&&g&&(console.log("[Markdownit] onScrollToBottom callback"),g()))}p&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:Y,scrollHeight:J}),p(Y,J)),o&&a&&!P&&!l&&J-Y-$<100&&T()},[t,r,w.length,$,o,a,P,l,B,R,d,g,p]),T=Ge(async()=>{if(!(!a||P||l)){S(!0);try{const G=w[w.length-1],Y=await a(G.id);A(J=>[...J,...Y])}catch(G){console.error("Failed to load more segments:",G)}finally{S(!1)}}},[a,w,P,l]);gt(()=>{const G=()=>{O.current&&M(O.current.clientHeight)};return G(),window.addEventListener("resize",G),()=>window.removeEventListener("resize",G)},[]);const Z=Ge((G,Y)=>{const J={type:G.type,content:G.content},oe=t?{position:"absolute",top:`${(G.virtualIndex||Y)*r}px`,left:0,right:0,height:`${r}px`}:{};return j.jsx("div",{style:oe,onClick:()=>h==null?void 0:h(G.id,G),className:h?"cursor-pointer hover:bg-gray-50":"",children:j.jsx(Mu,{dataSource:J,isEditing:!1,size:i,basePath:u,theme:C,onChange:c,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},G.id)},[t,r,C,c,h]),W=()=>(console.log("[Markdownit] renderContent segments.len:",w.length,"enableVirtualScroll:",t),w.length===0?j.jsxs(B9,{theme:C,children:[j.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),j.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?j.jsx("div",{ref:_,style:{height:q,position:"relative"},children:Q.map(Z)}):j.jsx("div",{ref:_,children:w.map(Z)})),z=()=>!P&&!l?null:j.jsx(A9,{theme:C,children:l?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return j.jsx(S9,{ref:O,theme:C,$isVirtualized:t,className:v,style:{height:b,...f},children:t?j.jsx(k9,{ref:V,theme:C,onScroll:se,children:j.jsx(jd,{theme:C,height:q,children:W()})}):j.jsxs(jd,{theme:C,onScroll:se,children:[W(),z()]})})},z9=e=>{const{onRendered:t}=e;return gt(()=>{if(!t)return;const r=requestAnimationFrame(()=>{const n=document.querySelector('[data-markdownit-root="1"]');n&&(console.log("[Markdownit _onRendered] fired"),t(n))});return()=>cancelAnimationFrame(r)},[e.dataSource,e.enableVirtualScroll,t]),j.jsx("div",{"data-markdownit-root":"1",children:j.jsx(F9,{...e})})};It.div`
1079
+ background: #f6f8fa;
1080
+ border: 1px solid #d0d7de;
1081
+ border-radius: 6px;
1082
+ padding: 16px;
1083
+ margin-bottom: 20px;
1084
+ `;It.p`
1085
+ margin: 0 0 16px 0;
1086
+ color: #656d76;
1087
+ font-size: 14px;
1088
+ line-height: 1.5;
1089
+ `;const _d=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,o,a=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(o=t.exec(e))!==null;){const l=o[0],i=o[1]||"",u=(o[2]||"").trim(),s=o.index,c=s+l.length;if(s>n){const b=e.slice(n,s);b.trim()!==""&&(r.push({text:b}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:b}))}const p=b=>{const x=new RegExp(`${b}\\s*=\\s*(["'])((?:\\\\.|[^\\
1090
+ ])*?)\\1`,"i"),C=i.match(x);return C?C[2]:void 0},d=/\S/.test(i),g=p("key"),h=p("placeholder"),v=g||`template-${Date.now()}-${a++}`,f={type:"template",key:v,placeholder:d?h||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":u||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:d?u:"",style:"blue",fieldId:v,children:[{text:""}],inline:!0};r.push(f),console.log("\u6DFB\u52A0template\u5143\u7D20:",f),n=c}if(n<e.length){const l=e.slice(n);l.trim()!==""&&(r.push({text:l}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:l}))}return r.length===0&&(e.trim()===""?r.push({text:""}):r.push({text:e}),console.log("\u6CA1\u6709\u627E\u5230template\u6807\u7B7E\uFF0C\u8FD4\u56DE\u539F\u59CB\u6587\u672C")),r.length>0&&r[0].type!=="paragraph"?[{type:"paragraph",children:r}]:(console.log("\u89E3\u6790\u5B8C\u6210\uFF0C\u7ED3\u679C:",r),r)},Ml=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="",n="";return console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2)),t.children.forEach(o=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",o),o.type==="template"){const a=o.key||o.fieldId||"",l=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",i=o.value||"",u=` key="${String(a)}" placeholder="${String(l)}"`;r+=`<template${u}>${i}</template>`,n=i||l}else if(o.text!==void 0){const a=o.text||"";a.trim()!==""?a!==n?(console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${a}`),r+=a,n=a):console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20"):console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20")}else{console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",o);const a=o.text||"";a.trim()!==""&&a!==n&&(r+=a,n=a)}}),console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},$9=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=n.value||n.placeholder||"")}),r},O9=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
1091
+ ${n.value||n.placeholder}\`\`\`
1092
+ \`\`\`
1093
+ `)}),r},N9=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if(n.text!==void 0)r+=n.text;else if(n.type==="template"){const o=n.key||n.fieldId||"",a=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=n.value||"",i=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${i}>${l}</template>`}}),r},H9=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var g,h,v,f,b,x,C,y,w,A,k,F,D,I,$,M,P,S,B,N,R,L,O,V,_,K,q,Q,se,T,Z,W,z,G,Y,J,oe,re,ne,ue,ce,xe,Te,Fe,ge,ye,Ee,Ve,Ne,Ie,tt,Ue;const a=Bi(),l={theme:{colors:{primary:((g=a==null?void 0:a.colors)==null?void 0:g.primary)||"#055AFF",secondary:((h=a==null?void 0:a.colors)==null?void 0:h.secondary)||"#84ADFF",background:((v=a==null?void 0:a.colors)==null?void 0:v.background)||"#E5EEFF",text:((f=a==null?void 0:a.colors)==null?void 0:f.text)||"#055AFF",border:((b=a==null?void 0:a.colors)==null?void 0:b.border)||"#84ADFF",success:((x=a==null?void 0:a.colors)==null?void 0:x.success)||"#008000",warning:((C=a==null?void 0:a.colors)==null?void 0:C.warning)||"#FFA500",error:((y=a==null?void 0:a.colors)==null?void 0:y.error)||"#FF0000",info:((w=a==null?void 0:a.colors)==null?void 0:w.info)||"#0000FF",disabled:((A=a==null?void 0:a.colors)==null?void 0:A.disabled)||"#808080",disabledBackground:((k=a==null?void 0:a.colors)==null?void 0:k.disabledBackground)||"#F5F5F5",disabledText:((F=a==null?void 0:a.colors)==null?void 0:F.disabledText)||"#808080",shadow:((D=a==null?void 0:a.colors)==null?void 0:D.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((I=a==null?void 0:a.colors)==null?void 0:I.appBackground)||"transparent",listBackground:(($=a==null?void 0:a.colors)==null?void 0:$.listBackground)||"#f9f9f9",dashboardBackground:((M=a==null?void 0:a.colors)==null?void 0:M.dashboardBackground)||"#ffffff",textSecondary:((P=a==null?void 0:a.colors)==null?void 0:P.textSecondary)||"#6b7280"},space:{sidebar:((S=a==null?void 0:a.space)==null?void 0:S.sidebar)||"260px",size:((B=a==null?void 0:a.space)==null?void 0:B.size)||"12px",radius:((N=a==null?void 0:a.space)==null?void 0:N.radius)||"6px",padding:((R=a==null?void 0:a.space)==null?void 0:R.padding)||"16px",margin:((L=a==null?void 0:a.space)==null?void 0:L.margin)||"20px",shadow:((O=a==null?void 0:a.space)==null?void 0:O.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((V=a==null?void 0:a.space)==null?void 0:V.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((K=(_=a==null?void 0:a.fonts)==null?void 0:_.body)==null?void 0:K.size)||"14px",weight:((Q=(q=a==null?void 0:a.fonts)==null?void 0:q.body)==null?void 0:Q.weight)||"normal",family:((T=(se=a==null?void 0:a.fonts)==null?void 0:se.body)==null?void 0:T.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((W=(Z=a==null?void 0:a.fonts)==null?void 0:Z.heading)==null?void 0:W.size)||"16px",weight:((G=(z=a==null?void 0:a.fonts)==null?void 0:z.heading)==null?void 0:G.weight)||"600",family:((J=(Y=a==null?void 0:a.fonts)==null?void 0:Y.heading)==null?void 0:J.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((oe=a==null?void 0:a.others)==null?void 0:oe.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},i={backgroundColor:((re=a==null?void 0:a.colors)==null?void 0:re.background)||"#E5EEFF",borderColor:((ne=a==null?void 0:a.colors)==null?void 0:ne.border)||"#84ADFF",borderRadius:((ue=a==null?void 0:a.space)==null?void 0:ue.radius)||"6px",padding:((ce=a==null?void 0:a.space)==null?void 0:ce.padding)||"8px 12px",margin:"2px",fontSize:((Te=(xe=a==null?void 0:a.fonts)==null?void 0:xe.body)==null?void 0:Te.size)||"14px",fontWeight:((ge=(Fe=a==null?void 0:a.fonts)==null?void 0:Fe.body)==null?void 0:ge.weight)||"500",minWidth:"30px",textColor:((ye=a==null?void 0:a.colors)==null?void 0:ye.text)||"#84ADFF"},u={...l,...n,theme:{...l.theme,...n==null?void 0:n.theme,colors:{...(Ee=l.theme)==null?void 0:Ee.colors,...(Ve=n==null?void 0:n.theme)==null?void 0:Ve.colors},space:{...(Ne=l.theme)==null?void 0:Ne.space,...(Ie=n==null?void 0:n.theme)==null?void 0:Ie.space},fonts:{...(tt=l.theme)==null?void 0:tt.fonts,...(Ue=n==null?void 0:n.theme)==null?void 0:Ue.fonts}},templateField:{...i,...n==null?void 0:n.templateField}},[s,c]=et(()=>_d(e));gt(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const _e=_d(e);console.log("\u65B0\u7684Slate\u6570\u636E:",_e),c(_e)},[e]),gt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",s)},[s]);const p=Ge((_e,Xe)=>{if(Xe===vi.SLATE&&_e){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",_e),c(_e);const Se=Ml(_e);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Se),t==null||t(Se)}},[t]),d=Ge(_e=>{if(!s||s.length===0)return"";switch(_e){case"pure_string":return $9(s);case"string":return Ml(s);case"markdown":return O9(s);case"html":return N9(s);default:return Ml(s)}},[s]);return gt(()=>{o==null||o(d)},[d,o]),j.jsx(Mu,{dataSource:{type:vi.SLATE,content:s},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:p,size:"md",styles:u,enableTemplateInput:!0})};export{Gs as D,Ur as F,H9 as K,iu as T,_9 as U,z9 as V,vi as c};