@gientech/modual 2.1.39 → 2.2.0

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 (51) hide show
  1. package/README.md +761 -761
  2. package/assets/{GientechStreamReader-BYPlltUh.js → GientechStreamReader-C5jijqVw.js} +57 -57
  3. package/assets/LeftOutlined-9XTSYGbi.js +1 -0
  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/iconAi.svg +9 -9
  12. package/assets/{index-TcKs3T8h.js → index-B64Nj5uU.js} +2 -2
  13. package/assets/{index-B-AFa3n1.js → index-B872BsjL.js} +1 -1
  14. package/assets/{index-CS-Rgw_E.js → index-BIrUv1JE.js} +1 -1
  15. package/assets/index-Bk-pRt65.js +27 -0
  16. package/assets/{index-8h59dJlj.js → index-BvpN2hYX.js} +1 -1
  17. package/assets/{index-BdNcL3V6.js → index-BxR_BLxA.js} +1 -1
  18. package/assets/index-CkVpaVb6.js +1 -0
  19. package/assets/{index-DoUk2Ei_.js → index-D3Z0MZbL.js} +4 -4
  20. package/assets/{index-C6WKbL3A.js → index-DaM9Fbys.js} +3 -3
  21. package/assets/{index-CVis9Agw.js → index-SbYeytsI.js} +1 -1
  22. package/assets/index-hDlFWjNU.js +1969 -0
  23. package/assets/{index-ON3wgCdz.js → index-sWqCalkt.js} +144 -192
  24. package/assets/knowledge.svg +4 -4
  25. package/assets/mysql.svg +14 -14
  26. package/assets/{plus-CnVxGdOo.js → plus-DDbDO7lA.js} +1 -1
  27. package/assets/search-BoBdGjgo.js +6 -0
  28. package/assets/sensitive.svg +5 -5
  29. package/assets/style-DwfpZJI9.js +196 -0
  30. package/assets/style4.css +1 -1
  31. package/assets/{triangle-alert-BycMPaz2.js → triangle-alert-DF53kXdm.js} +1 -1
  32. package/assets/{x-CmbLQ9dc.js → x-DfdS1_QC.js} +1 -1
  33. package/assistantConfig.js +152 -1
  34. package/chat.d.ts +11 -1
  35. package/chat.js +1 -196
  36. package/chatCompare.js +1 -1
  37. package/database.js +2 -2
  38. package/databaseId.js +1 -1
  39. package/databaseTable.js +2 -2
  40. package/index.d.ts +301 -0
  41. package/index.js +1 -1
  42. package/modelManage.d.ts +124 -0
  43. package/modelManage.js +1 -1
  44. package/package.json +6 -6
  45. package/sensitive.d.ts +134 -2
  46. package/sensitive.js +205 -1
  47. package/streamFilesReader.js +1 -1
  48. package/worker/pdf.worker.min.js +21 -21
  49. package/assets/index-BN3yu4iN.js +0 -1
  50. package/assets/index-CMlRkGxa.js +0 -1995
  51. package/assets/index-Cbz7IFQk.js +0 -157
@@ -0,0 +1,1969 @@
1
+ import*as S from"react";import qe,{useState as At,useCallback as St,useImperativeHandle as yg,useContext as ho,useRef as Yt,useEffect as Jt,useMemo as vt,forwardRef as Xa,createElement as Ki,createContext as po,useLayoutEffect as xg,useReducer as wg,Component as Cg,memo as Dg}from"react";import e0,{unstable_batchedUpdates as kg,createPortal as Eg}from"react-dom";import{R as Xh,N as wo}from"./index-sWqCalkt.js";import{b6 as qo,b3 as Sg,aB as Yh,a9 as wn,X as We,V as ao,aC as Gh,G as Gt,t as Zh,O as Wr,e as gt,Y as Pe,z as Jh,$ as Ag,K as kn,W as Et,bb as Go,_ as Bt,aG as Bg,p as Hi,I as en,g as W0,m as qi,aR as vn,bU as Fg,a$ as Ng,f as Tg,a_ as Qh,x as mt,ay as Mg,n as Ya,as as V0,a4 as e1,q as Wi,u as Og,aj as Rg,b2 as $g,Z as lo,aq as uo,b8 as Vc,ba as t1,bV as U0,bv as X0,bc as Pg,bW as Uc,bX as Y0,bY as Xc,bZ as Yc,U as Vi,b_ as r1,ax as G0,am as Ui,b$ as zg,aV as Ig,aW as jg,aX as _g,aY as Wt,aZ as Lg,c0 as Kg,b1 as Hg,r as Z0,w as qg,ab as Wg,at as Vg,s as Gc,b5 as Ug,b4 as Xg,ai as n1,c1 as Yg,c2 as Gg,N as Zc,E as o1,bp as Jc,T as t0,c3 as Zg,aJ as Jg,H as Qg,aN as e4,D as t4,L as r4,aK as n4,a as us}from"./index-BvpN2hYX.js";import{S as a1,P as i1}from"./index-DaM9Fbys.js";import{D as s1,M as o4,O as a4}from"./index-Bk-pRt65.js";import{a as r0,R as n0}from"./LeftOutlined-9XTSYGbi.js";function o0(e){return e!=null&&e===e.window}const i4=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return o0(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!o0(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 s4(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 l4(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),c=i4(a),u=Date.now(),f=()=>{const p=Date.now()-u,v=s4(p>o?o:p,c,e,o);o0(a)?a.scrollTo(window.pageXOffset,v):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=v:a.scrollTop=v,p<o?qo(f):typeof n=="function"&&n()};qo(f)}const u4=e=>{const[t,r]=At(null);return[St((o,a,c)=>{const u=t??o,f=Math.min(u||0,o),d=Math.max(u||0,o),p=a.slice(f,d+1).map(e),v=p.some(x=>!c.has(x)),g=[];return p.forEach(x=>{v?(c.has(x)||g.push(x),c.add(x)):(c.delete(x),g.push(x))}),r(v?d:null),g},[t]),r]};function c4(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 d4=(e,t)=>yg(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)}}):c4(n,r)}),f4=e=>{const t=S.useRef(e),[,r]=Sg();return[()=>t.current,n=>{t.current=n,r()}]};var l1=function(t){if(Yh()&&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},h4=function(t,r){if(!l1(t))return!1;var n=document.createElement("div"),o=n.style[t];return n.style[t]=r,n.style[t]!==o};function p4(e,t){return!Array.isArray(e)&&t!==void 0?h4(e,t):l1(e)}function sn(e,t){return e[t]}var m4=["children"];function u1(e,t){return"".concat(e,"-").concat(t)}function g4(e){return e&&e.type&&e.type.isTreeNode}function Ga(e,t){return e??t}function Zo(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,c=r||"title";return{title:c,_title:n||[c],key:o||"key",children:a||"children"}}function c1(e){function t(r){var n=Zh(r);return n.map(function(o){if(!g4(o))return ao(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,c=o.props,u=c.children,f=Wr(c,m4),d=We({key:a},f),p=t(u);return p.length&&(d.children=p),d}).filter(function(o){return o})}return t(e)}function sl(e,t,r){var n=Zo(r),o=n._title,a=n.key,c=n.children,u=new Set(t===!0?[]:t),f=[];function d(p){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(g,x){for(var w=u1(v?v.pos:"0",x),C=Ga(g[a],w),m,E=0;E<o.length;E+=1){var N=o[E];if(g[N]!==void 0){m=g[N];break}}var B=Object.assign(Gh(g,[].concat(Gt(o),[a,c])),{title:m,key:C,parent:v,pos:w,children:null,data:g,isStart:[].concat(Gt(v?v.isStart:[]),[x===0]),isEnd:[].concat(Gt(v?v.isEnd:[]),[x===p.length-1])});return f.push(B),t===!0||u.has(C)?B.children=d(g[c]||[],B):B.children=[],B})}return d(e),f}function v4(e,t,r){var n={};wn(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,c=o.externalGetKey,u=o.fieldNames,f=Zo(u),d=f.key,p=f.children,v=a||p,g;c?typeof c=="string"?g=function(C){return C[c]}:typeof c=="function"&&(g=function(C){return c(C)}):g=function(C,m){return Ga(C[d],m)};function x(w,C,m,E){var N=w?w[v]:e,B=w?u1(m.pos,C):"0",$=w?[].concat(Gt(E),[w]):[];if(w){var A=g(w,B),_={node:w,index:C,pos:B,key:A,parentPos:m.node?m.pos:null,level:m.level+1,nodes:$};t(_)}N&&N.forEach(function(P,q){x(P,q,{node:w,pos:B,level:m?m.level+1:-1},$)})}x(null)}function J0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,c=t.childrenPropName,u=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=a||f,p={},v={},g={posEntities:p,keyEntities:v};return r&&(g=r(g)||g),v4(e,function(x){var w=x.node,C=x.index,m=x.pos,E=x.key,N=x.parentPos,B=x.level,$=x.nodes,A={node:w,nodes:$,index:C,key:E,pos:m,level:B},_=Ga(E,m);p[m]=A,v[_]=A,A.parent=p[N],A.parent&&(A.parent.children=A.parent.children||[],A.parent.children.push(A)),n&&n(A,g)},{externalGetKey:d,childrenPropName:c,fieldNames:u}),o&&o(g),g}function Aa(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,c=t.checkedKeys,u=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,p=t.keyEntities,v=sn(p,e),g={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:c.indexOf(e)!==-1,halfChecked:u.indexOf(e)!==-1,pos:String(v?v.pos:""),dragOver:f===e&&d===0,dragOverGapTop:f===e&&d===-1,dragOverGapBottom:f===e&&d===1};return g}function Tr(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,c=e.loading,u=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,p=e.dragOverGapBottom,v=e.pos,g=e.active,x=e.eventKey,w=We(We({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:c,halfChecked:u,dragOver:f,dragOverGapTop:d,dragOverGapBottom:p,pos:v,active:g,key:x});return"props"in w||Object.defineProperty(w,"props",{get:function(){return ao(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),w}function d1(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function b4(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function y4(e,t,r,n){for(var o=new Set(e),a=new Set,c=0;c<=r;c+=1){var u=t.get(c)||new Set;u.forEach(function(v){var g=v.key,x=v.node,w=v.children,C=w===void 0?[]:w;o.has(g)&&!n(x)&&C.filter(function(m){return!n(m.node)}).forEach(function(m){o.add(m.key)})})}for(var f=new Set,d=r;d>=0;d-=1){var p=t.get(d)||new Set;p.forEach(function(v){var g=v.parent,x=v.node;if(!(n(x)||!v.parent||f.has(v.parent.key))){if(n(v.parent.node)){f.add(g.key);return}var w=!0,C=!1;(g.children||[]).filter(function(m){return!n(m.node)}).forEach(function(m){var E=m.key,N=o.has(E);w&&!N&&(w=!1),!C&&(N||a.has(E))&&(C=!0)}),w&&o.add(g.key),C&&a.add(g.key),f.add(g.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(d1(a,o))}}function x4(e,t,r,n,o){for(var a=new Set(e),c=new Set(t),u=0;u<=n;u+=1){var f=r.get(u)||new Set;f.forEach(function(g){var x=g.key,w=g.node,C=g.children,m=C===void 0?[]:C;!a.has(x)&&!c.has(x)&&!o(w)&&m.filter(function(E){return!o(E.node)}).forEach(function(E){a.delete(E.key)})})}c=new Set;for(var d=new Set,p=n;p>=0;p-=1){var v=r.get(p)||new Set;v.forEach(function(g){var x=g.parent,w=g.node;if(!(o(w)||!g.parent||d.has(g.parent.key))){if(o(g.parent.node)){d.add(x.key);return}var C=!0,m=!1;(x.children||[]).filter(function(E){return!o(E.node)}).forEach(function(E){var N=E.key,B=a.has(N);C&&!B&&(C=!1),!m&&(B||c.has(N))&&(m=!0)}),C||a.delete(x.key),m&&c.add(x.key),d.add(x.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(d1(c,a))}}function Wo(e,t,r,n){var o=[],a;n?a=n:a=b4;var c=new Set(e.filter(function(p){var v=!!sn(r,p);return v||o.push(p),v})),u=new Map,f=0;Object.keys(r).forEach(function(p){var v=r[p],g=v.level,x=u.get(g);x||(x=new Set,u.set(g,x)),x.add(v),f=Math.max(f,g)}),ao(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(p){return"'".concat(p,"'")}).join(", ")));var d;return t===!0?d=y4(c,u,f,a):d=x4(c,t.halfCheckedKeys,u,f,a),d}function f1(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function w4(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 io(e,t,r,n){var o=e0.unstable_batchedUpdates?function(c){e0.unstable_batchedUpdates(r,c)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var Za=S.createContext(null),C4=function(t){var r=t.visible,n=t.maskTransitionName,o=t.getContainer,a=t.prefixCls,c=t.rootClassName,u=t.icons,f=t.countRender,d=t.showSwitch,p=t.showProgress,v=t.current,g=t.transform,x=t.count,w=t.scale,C=t.minScale,m=t.maxScale,E=t.closeIcon,N=t.onActive,B=t.onClose,$=t.onZoomIn,A=t.onZoomOut,_=t.onRotateRight,P=t.onRotateLeft,q=t.onFlipX,O=t.onFlipY,V=t.onReset,L=t.toolbarRender,Z=t.zIndex,Y=t.image,j=ho(Za),K=u.rotateLeft,U=u.rotateRight,X=u.zoomIn,ee=u.zoomOut,R=u.close,se=u.left,ye=u.right,Ce=u.flipX,Se=u.flipY,ue="".concat(a,"-operations-operation");S.useEffect(function(){var Me=function(Ve){Ve.keyCode===kn.ESC&&B()};return r&&window.addEventListener("keydown",Me),function(){window.removeEventListener("keydown",Me)}},[r]);var Fe=function(je,Ve){je.preventDefault(),je.stopPropagation(),N(Ve)},G=S.useCallback(function(Me){var je=Me.type,Ve=Me.disabled,ht=Me.onClick,it=Me.icon;return S.createElement("div",{key:je,className:gt(ue,"".concat(a,"-operations-operation-").concat(je),Pe({},"".concat(a,"-operations-operation-disabled"),!!Ve)),onClick:ht},it)},[ue,a]),ve=d?G({icon:se,onClick:function(je){return Fe(je,-1)},type:"prev",disabled:v===0}):void 0,de=d?G({icon:ye,onClick:function(je){return Fe(je,1)},type:"next",disabled:v===x-1}):void 0,re=G({icon:Se,onClick:O,type:"flipY"}),he=G({icon:Ce,onClick:q,type:"flipX"}),we=G({icon:K,onClick:P,type:"rotateLeft"}),be=G({icon:U,onClick:_,type:"rotateRight"}),Ee=G({icon:ee,onClick:A,type:"zoomOut",disabled:w<=C}),De=G({icon:X,onClick:$,type:"zoomIn",disabled:w===m}),Ae=S.createElement("div",{className:"".concat(a,"-operations")},re,he,we,be,Ee,De);return S.createElement(Jh,{visible:r,motionName:n},function(Me){var je=Me.className,Ve=Me.style;return S.createElement(Ag,{open:!0,getContainer:o??document.body},S.createElement("div",{className:gt("".concat(a,"-operations-wrapper"),je,c),style:We(We({},Ve),{},{zIndex:Z})},E===null?null:S.createElement("button",{className:"".concat(a,"-close"),onClick:B},E||R),d&&S.createElement(S.Fragment,null,S.createElement("div",{className:gt("".concat(a,"-switch-left"),Pe({},"".concat(a,"-switch-left-disabled"),v===0)),onClick:function(it){return Fe(it,-1)}},se),S.createElement("div",{className:gt("".concat(a,"-switch-right"),Pe({},"".concat(a,"-switch-right-disabled"),v===x-1)),onClick:function(it){return Fe(it,1)}},ye)),S.createElement("div",{className:"".concat(a,"-footer")},p&&S.createElement("div",{className:"".concat(a,"-progress")},f?f(v+1,x):S.createElement("bdi",null,"".concat(v+1," / ").concat(x))),L?L(Ae,We(We({icons:{prevIcon:ve,nextIcon:de,flipYIcon:re,flipXIcon:he,rotateLeftIcon:we,rotateRightIcon:be,zoomOutIcon:Ee,zoomInIcon:De},actions:{onActive:N,onFlipY:O,onFlipX:q,onRotateLeft:P,onRotateRight:_,onZoomOut:A,onZoomIn:$,onReset:V,onClose:B},transform:g},j?{current:v,total:x}:{}),{},{image:Y})):Ae)))})},pi={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function D4(e,t,r,n){var o=Yt(null),a=Yt([]),c=At(pi),u=Et(c,2),f=u[0],d=u[1],p=function(w){d(pi),Go(pi,f)||n==null||n({transform:pi,action:w})},v=function(w,C){o.current===null&&(a.current=[],o.current=qo(function(){d(function(m){var E=m;return a.current.forEach(function(N){E=We(We({},E),N)}),o.current=null,n==null||n({transform:E,action:C}),E})})),a.current.push(We(We({},f),w))},g=function(w,C,m,E,N){var B=e.current,$=B.width,A=B.height,_=B.offsetWidth,P=B.offsetHeight,q=B.offsetLeft,O=B.offsetTop,V=w,L=f.scale*w;L>r?(L=r,V=r/f.scale):L<t&&(L=N?L:t,V=L/f.scale);var Z=m??innerWidth/2,Y=E??innerHeight/2,j=V-1,K=j*$*.5,U=j*A*.5,X=j*(Z-f.x-q),ee=j*(Y-f.y-O),R=f.x-(X-K),se=f.y-(ee-U);if(w<1&&L===1){var ye=_*L,Ce=P*L,Se=f1(),ue=Se.width,Fe=Se.height;ye<=ue&&Ce<=Fe&&(R=0,se=0)}v({x:R,y:se,scale:L},C)};return{transform:f,resetTransform:p,updateTransform:v,dispatchZoomChange:g}}function Qc(e,t,r,n){var o=t+r,a=(r-n)/2;if(r>n){if(t>0)return Pe({},e,a);if(t<0&&o<n)return Pe({},e,-a)}else if(t<0||o>n)return Pe({},e,t<0?a:-a);return{}}function h1(e,t,r,n){var o=f1(),a=o.width,c=o.height,u=null;return e<=a&&t<=c?u={x:0,y:0}:(e>a||t>c)&&(u=We(We({},Qc("x",r,e,a)),Qc("y",n,t,c))),u}var _o=1,k4=1;function E4(e,t,r,n,o,a,c){var u=o.rotate,f=o.scale,d=o.x,p=o.y,v=At(!1),g=Et(v,2),x=g[0],w=g[1],C=Yt({diffX:0,diffY:0,transformX:0,transformY:0}),m=function(A){!t||A.button!==0||(A.preventDefault(),A.stopPropagation(),C.current={diffX:A.pageX-d,diffY:A.pageY-p,transformX:d,transformY:p},w(!0))},E=function(A){r&&x&&a({x:A.pageX-C.current.diffX,y:A.pageY-C.current.diffY},"move")},N=function(){if(r&&x){w(!1);var A=C.current,_=A.transformX,P=A.transformY,q=d!==_&&p!==P;if(!q)return;var O=e.current.offsetWidth*f,V=e.current.offsetHeight*f,L=e.current.getBoundingClientRect(),Z=L.left,Y=L.top,j=u%180!==0,K=h1(j?V:O,j?O:V,Z,Y);K&&a(We({},K),"dragRebound")}},B=function(A){if(!(!r||A.deltaY==0)){var _=Math.abs(A.deltaY/100),P=Math.min(_,k4),q=_o+P*n;A.deltaY>0&&(q=_o/q),c(q,"wheel",A.clientX,A.clientY)}};return Jt(function(){var $,A,_,P;if(t){_=io(window,"mouseup",N,!1),P=io(window,"mousemove",E,!1);try{window.top!==window.self&&($=io(window.top,"mouseup",N,!1),A=io(window.top,"mousemove",E,!1))}catch{}}return function(){var q,O,V,L;(q=_)===null||q===void 0||q.remove(),(O=P)===null||O===void 0||O.remove(),(V=$)===null||V===void 0||V.remove(),(L=A)===null||L===void 0||L.remove()}},[r,x,d,p,u,t]),{isMoving:x,onMouseDown:m,onMouseMove:E,onMouseUp:N,onWheel:B}}function S4(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 p1(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,o=At(r?"loading":"normal"),a=Et(o,2),c=a[0],u=a[1],f=Yt(!1),d=c==="error";Jt(function(){var x=!0;return S4(t).then(function(w){!w&&x&&u("error")}),function(){x=!1}},[t]),Jt(function(){r&&!f.current?u("loading"):d&&u("normal")},[t]);var p=function(){u("normal")},v=function(w){f.current=!1,c==="loading"&&w!==null&&w!==void 0&&w.complete&&(w.naturalWidth||w.naturalHeight)&&(f.current=!0,p())},g=d&&n?{src:n}:{onLoad:p,src:t};return[v,g,c]}function Xi(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function A4(e,t,r,n){var o=Xi(e,r),a=Xi(t,n);if(o===0&&a===0)return[e.x,e.y];var c=o/(o+a),u=e.x+c*(t.x-e.x),f=e.y+c*(t.y-e.y);return[u,f]}function B4(e,t,r,n,o,a,c){var u=o.rotate,f=o.scale,d=o.x,p=o.y,v=At(!1),g=Et(v,2),x=g[0],w=g[1],C=Yt({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),m=function(A){C.current=We(We({},C.current),A)},E=function(A){if(t){A.stopPropagation(),w(!0);var _=A.touches,P=_===void 0?[]:_;P.length>1?m({point1:{x:P[0].clientX,y:P[0].clientY},point2:{x:P[1].clientX,y:P[1].clientY},eventType:"touchZoom"}):m({point1:{x:P[0].clientX-d,y:P[0].clientY-p},eventType:"move"})}},N=function(A){var _=A.touches,P=_===void 0?[]:_,q=C.current,O=q.point1,V=q.point2,L=q.eventType;if(P.length>1&&L==="touchZoom"){var Z={x:P[0].clientX,y:P[0].clientY},Y={x:P[1].clientX,y:P[1].clientY},j=A4(O,V,Z,Y),K=Et(j,2),U=K[0],X=K[1],ee=Xi(Z,Y)/Xi(O,V);c(ee,"touchZoom",U,X,!0),m({point1:Z,point2:Y,eventType:"touchZoom"})}else L==="move"&&(a({x:P[0].clientX-O.x,y:P[0].clientY-O.y},"move"),m({eventType:"move"}))},B=function(){if(r){if(x&&w(!1),m({eventType:"none"}),n>f)return a({x:0,y:0,scale:n},"touchZoom");var A=e.current.offsetWidth*f,_=e.current.offsetHeight*f,P=e.current.getBoundingClientRect(),q=P.left,O=P.top,V=u%180!==0,L=h1(V?_:A,V?A:_,q,O);L&&a(We({},L),"dragRebound")}};return Jt(function(){var $;return r&&t&&($=io(window,"touchmove",function(A){return A.preventDefault()},{passive:!1})),function(){var A;(A=$)===null||A===void 0||A.remove()}},[r,t]),{isTouching:x,onTouchStart:E,onTouchMove:N,onTouchEnd:B}}var F4=["fallback","src","imgRef"],N4=["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"],T4=function(t){var r=t.fallback,n=t.src,o=t.imgRef,a=Wr(t,F4),c=p1({src:n,fallback:r}),u=Et(c,2),f=u[0],d=u[1];return qe.createElement("img",Bt({ref:function(v){o.current=v,f(v)}},a,d))},m1=function(t){var r=t.prefixCls,n=t.src,o=t.alt,a=t.imageInfo,c=t.fallback,u=t.movable,f=u===void 0?!0:u,d=t.onClose,p=t.visible,v=t.icons,g=v===void 0?{}:v,x=t.rootClassName,w=t.closeIcon,C=t.getContainer,m=t.current,E=m===void 0?0:m,N=t.count,B=N===void 0?1:N,$=t.countRender,A=t.scaleStep,_=A===void 0?.5:A,P=t.minScale,q=P===void 0?1:P,O=t.maxScale,V=O===void 0?50:O,L=t.transitionName,Z=L===void 0?"zoom":L,Y=t.maskTransitionName,j=Y===void 0?"fade":Y,K=t.imageRender,U=t.imgCommonProps,X=t.toolbarRender,ee=t.onTransform,R=t.onChange,se=Wr(t,N4),ye=Yt(),Ce=ho(Za),Se=Ce&&B>1,ue=Ce&&B>=1,Fe=At(!0),G=Et(Fe,2),ve=G[0],de=G[1],re=D4(ye,q,V,ee),he=re.transform,we=re.resetTransform,be=re.updateTransform,Ee=re.dispatchZoomChange,De=E4(ye,f,p,_,he,be,Ee),Ae=De.isMoving,Me=De.onMouseDown,je=De.onWheel,Ve=B4(ye,f,p,q,he,be,Ee),ht=Ve.isTouching,it=Ve.onTouchStart,Te=Ve.onTouchMove,Ie=Ve.onTouchEnd,Ze=he.rotate,dt=he.scale,at=gt(Pe({},"".concat(r,"-moving"),Ae));Jt(function(){ve||de(!0)},[ve]);var et=function(){we("close")},Tt=function(){Ee(_o+_,"zoomIn")},xt=function(){Ee(_o/(_o+_),"zoomOut")},yt=function(){be({rotate:Ze+90},"rotateRight")},pt=function(){be({rotate:Ze-90},"rotateLeft")},ze=function(){be({flipX:!he.flipX},"flipX")},ce=function(){be({flipY:!he.flipY},"flipY")},bt=function(){we("reset")},Pt=function(nr){var hr=E+nr;!Number.isInteger(hr)||hr<0||hr>B-1||(de(!1),we(nr<0?"prev":"next"),R==null||R(hr,E))},Vt=function(nr){!p||!Se||(nr.keyCode===kn.LEFT?Pt(-1):nr.keyCode===kn.RIGHT&&Pt(1))},$t=function(nr){p&&(dt!==1?be({x:0,y:0,scale:1},"doubleClick"):Ee(_o+_,"doubleClick",nr.clientX,nr.clientY))};Jt(function(){var Mt=io(window,"keydown",Vt,!1);return function(){Mt.remove()}},[p,Se,E]);var ir=qe.createElement(T4,Bt({},U,{width:t.width,height:t.height,imgRef:ye,className:"".concat(r,"-img"),alt:o,style:{transform:"translate3d(".concat(he.x,"px, ").concat(he.y,"px, 0) scale3d(").concat(he.flipX?"-":"").concat(dt,", ").concat(he.flipY?"-":"").concat(dt,", 1) rotate(").concat(Ze,"deg)"),transitionDuration:(!ve||ht)&&"0s"},fallback:c,src:n,onWheel:je,onMouseDown:Me,onDoubleClick:$t,onTouchStart:it,onTouchMove:Te,onTouchEnd:Ie,onTouchCancel:Ie})),Ct=We({url:n,alt:o},a);return qe.createElement(qe.Fragment,null,qe.createElement(Bg,Bt({transitionName:Z,maskTransitionName:j,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:p,classNames:{wrapper:at},rootClassName:x,getContainer:C},se,{afterClose:et}),qe.createElement("div",{className:"".concat(r,"-img-wrapper")},K?K(ir,We({transform:he,image:Ct},Ce?{current:E}:{})):ir)),qe.createElement(C4,{visible:p,transform:he,maskTransitionName:j,closeIcon:w,getContainer:C,prefixCls:r,rootClassName:x,icons:g,countRender:$,showSwitch:Se,showProgress:ue,current:E,count:B,scale:dt,minScale:q,maxScale:V,toolbarRender:X,onActive:Pt,onZoomIn:Tt,onZoomOut:xt,onRotateRight:yt,onRotateLeft:pt,onFlipX:ze,onFlipY:ce,onClose:d,onReset:bt,zIndex:se.zIndex!==void 0?se.zIndex+1:void 0,image:Ct}))},a0=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function M4(e){var t=S.useState({}),r=Et(t,2),n=r[0],o=r[1],a=S.useCallback(function(u,f){return o(function(d){return We(We({},d),{},Pe({},u,f))}),function(){o(function(d){var p=We({},d);return delete p[u],p})}},[]),c=S.useMemo(function(){return e?e.map(function(u){if(typeof u=="string")return{data:{src:u}};var f={};return Object.keys(u).forEach(function(d){["src"].concat(Gt(a0)).includes(d)&&(f[d]=u[d])}),{data:f}}):Object.keys(n).reduce(function(u,f){var d=n[f],p=d.canPreview,v=d.data;return p&&u.push({data:v,id:f}),u},[])},[e,n]);return[c,a,!!e]}var O4=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],R4=["src"],$4=function(t){var r,n=t.previewPrefixCls,o=n===void 0?"rc-image-preview":n,a=t.children,c=t.icons,u=c===void 0?{}:c,f=t.items,d=t.preview,p=t.fallback,v=wn(d)==="object"?d:{},g=v.visible,x=v.onVisibleChange,w=v.getContainer,C=v.current,m=v.movable,E=v.minScale,N=v.maxScale,B=v.countRender,$=v.closeIcon,A=v.onChange,_=v.onTransform,P=v.toolbarRender,q=v.imageRender,O=Wr(v,O4),V=M4(f),L=Et(V,3),Z=L[0],Y=L[1],j=L[2],K=Hi(0,{value:C}),U=Et(K,2),X=U[0],ee=U[1],R=At(!1),se=Et(R,2),ye=se[0],Ce=se[1],Se=((r=Z[X])===null||r===void 0?void 0:r.data)||{},ue=Se.src,Fe=Wr(Se,R4),G=Hi(!!g,{value:g,onChange:function(ht,it){x==null||x(ht,it,X)}}),ve=Et(G,2),de=ve[0],re=ve[1],he=At(null),we=Et(he,2),be=we[0],Ee=we[1],De=S.useCallback(function(Ve,ht,it,Te){var Ie=j?Z.findIndex(function(Ze){return Ze.data.src===ht}):Z.findIndex(function(Ze){return Ze.id===Ve});ee(Ie<0?0:Ie),re(!0),Ee({x:it,y:Te}),Ce(!0)},[Z,j]);S.useEffect(function(){de?ye||ee(0):Ce(!1)},[de]);var Ae=function(ht,it){ee(ht),A==null||A(ht,it)},Me=function(){re(!1),Ee(null)},je=S.useMemo(function(){return{register:Y,onPreview:De}},[Y,De]);return S.createElement(Za.Provider,{value:je},a,S.createElement(m1,Bt({"aria-hidden":!de,movable:m,visible:de,prefixCls:o,closeIcon:$,onClose:Me,mousePosition:be,imgCommonProps:Fe,src:ue,fallback:p,icons:u,minScale:E,maxScale:N,getContainer:w,current:X,count:Z.length,countRender:B,onTransform:_,toolbarRender:P,imageRender:q,onChange:Ae},O)))},ed=0;function P4(e,t){var r=S.useState(function(){return ed+=1,String(ed)}),n=Et(r,1),o=n[0],a=S.useContext(Za),c={data:t,canPreview:e};return S.useEffect(function(){if(a)return a.register(o,c)},[]),S.useEffect(function(){a&&a.register(o,c)},[e,t]),o}var z4=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],I4=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Q0=function(t){var r=t.src,n=t.alt,o=t.onPreviewClose,a=t.prefixCls,c=a===void 0?"rc-image":a,u=t.previewPrefixCls,f=u===void 0?"".concat(c,"-preview"):u,d=t.placeholder,p=t.fallback,v=t.width,g=t.height,x=t.style,w=t.preview,C=w===void 0?!0:w,m=t.className,E=t.onClick,N=t.onError,B=t.wrapperClassName,$=t.wrapperStyle,A=t.rootClassName,_=Wr(t,z4),P=d&&d!==!0,q=wn(C)==="object"?C:{},O=q.src,V=q.visible,L=V===void 0?void 0:V,Z=q.onVisibleChange,Y=Z===void 0?o:Z,j=q.getContainer,K=j===void 0?void 0:j,U=q.mask,X=q.maskClassName,ee=q.movable,R=q.icons,se=q.scaleStep,ye=q.minScale,Ce=q.maxScale,Se=q.imageRender,ue=q.toolbarRender,Fe=Wr(q,I4),G=O??r,ve=Hi(!!L,{value:L,onChange:Y}),de=Et(ve,2),re=de[0],he=de[1],we=p1({src:r,isCustomPlaceholder:P,fallback:p}),be=Et(we,3),Ee=be[0],De=be[1],Ae=be[2],Me=At(null),je=Et(Me,2),Ve=je[0],ht=je[1],it=ho(Za),Te=!!C,Ie=function(){he(!1),ht(null)},Ze=gt(c,B,A,Pe({},"".concat(c,"-error"),Ae==="error")),dt=vt(function(){var xt={};return a0.forEach(function(yt){t[yt]!==void 0&&(xt[yt]=t[yt])}),xt},a0.map(function(xt){return t[xt]})),at=vt(function(){return We(We({},dt),{},{src:G})},[G,dt]),et=P4(Te,at),Tt=function(yt){var pt=w4(yt.target),ze=pt.left,ce=pt.top;it?it.onPreview(et,G,ze,ce):(ht({x:ze,y:ce}),he(!0)),E==null||E(yt)};return S.createElement(S.Fragment,null,S.createElement("div",Bt({},_,{className:Ze,onClick:Te?Tt:E,style:We({width:v,height:g},$)}),S.createElement("img",Bt({},dt,{className:gt("".concat(c,"-img"),Pe({},"".concat(c,"-img-placeholder"),d===!0),m),style:We({height:g},x),ref:Ee},De,{width:v,height:g,onError:N})),Ae==="loading"&&S.createElement("div",{"aria-hidden":"true",className:"".concat(c,"-placeholder")},d),U&&Te&&S.createElement("div",{className:gt("".concat(c,"-mask"),X),style:{display:(x==null?void 0:x.display)==="none"?"none":void 0}},U)),!it&&Te&&S.createElement(m1,Bt({"aria-hidden":!re,visible:re,prefixCls:f,onClose:Ie,mousePosition:Ve,src:G,alt:n,imageInfo:{width:v,height:g},fallback:p,getContainer:K,icons:R,movable:ee,scaleStep:se,minScale:ye,maxScale:Ce,rootClassName:A,imageRender:Se,imgCommonProps:dt,toolbarRender:ue},Fe)))};Q0.PreviewGroup=$4;var j4={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"},_4=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:j4}))},L4=S.forwardRef(_4),K4={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"},H4=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:K4}))},q4=S.forwardRef(H4),W4={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"},V4=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:W4}))},td=S.forwardRef(V4),U4={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"},X4=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:U4}))},Y4=S.forwardRef(X4),G4={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"},Z4=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:G4}))},J4=S.forwardRef(Z4);const i0=e=>({position:e||"absolute",inset:0}),Q4=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:o,prefixCls:a,colorTextLightSolid:c}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:c,background:new vn("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${a}-mask-info`]:Object.assign(Object.assign({},Qh),{padding:`0 ${mt(n)}`,[t]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},e2=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:o,margin:a,paddingLG:c,previewOperationColorDisabled:u,previewOperationHoverColor:f,motionDurationSlow:d,iconCls:p,colorTextLightSolid:v}=e,g=new vn(r).setA(.1),x=g.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:v,backgroundColor:g.toRgbString(),borderRadius:"50%",padding:n,outline:0,border:0,cursor:"pointer",transition:`all ${d}`,"&:hover":{backgroundColor:x.toRgbString()},[`& > ${p}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${mt(c)}`,backgroundColor:g.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${d}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${p}`]:{color:f},"&-disabled":{color:u,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${p}`]:{fontSize:e.previewOperationSize}}}}},t2=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:o,zIndexPopup:a,motionDurationSlow:c}=e,u=new vn(t).setA(.1),f=u.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:u.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${c}`,userSelect:"none","&:hover":{background:f.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}}},r2=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({},i0()),{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({},i0()),{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()},"&":[e2(e),t2(e)]}]},n2=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({},Q4(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},i0())}}},o2=e=>{const{previewCls:t}=e;return{[`${t}-root`]:Tg(e,"zoom"),"&":Ng(e,!0)}},a2=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new vn(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new vn(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new vn(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),g1=W0("Image",e=>{const t=`${e.componentCls}-preview`,r=qi(e,{previewCls:t,modalMaskBg:new vn("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[n2(r),r2(r),Fg(qi(r,{componentCls:t})),o2(r)]},a2);var i2=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 v1={rotateLeft:S.createElement(L4,null),rotateRight:S.createElement(q4,null),zoomIn:S.createElement(Y4,null),zoomOut:S.createElement(J4,null),close:S.createElement(Mg,null),left:S.createElement(n0,null),right:S.createElement(r0,null),flipX:S.createElement(td,null),flipY:S.createElement(td,{rotate:90})},s2=e=>{var{previewPrefixCls:t,preview:r}=e,n=i2(e,["previewPrefixCls","preview"]);const{getPrefixCls:o,direction:a}=S.useContext(Ya),c=o("image",t),u=`${c}-preview`,f=o(),d=V0(c),[p,v,g]=g1(c,d),[x]=e1("ImagePreview",typeof r=="object"?r.zIndex:void 0),w=S.useMemo(()=>Object.assign(Object.assign({},v1),{left:a==="rtl"?S.createElement(r0,null):S.createElement(n0,null),right:a==="rtl"?S.createElement(n0,null):S.createElement(r0,null)}),[a]),C=S.useMemo(()=>{var m;if(r===!1)return r;const E=typeof r=="object"?r:{},N=gt(v,g,d,(m=E.rootClassName)!==null&&m!==void 0?m:"");return Object.assign(Object.assign({},E),{transitionName:Wi(f,"zoom",E.transitionName),maskTransitionName:Wi(f,"fade",E.maskTransitionName),rootClassName:N,zIndex:x})},[r,f,x,v,g,d]);return p(S.createElement(Q0.PreviewGroup,Object.assign({preview:C,previewPrefixCls:u,icons:w},n)))};var rd=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 b1=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:o,style:a,fallback:c}=e,u=rd(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:f,getPopupContainer:d,className:p,style:v,preview:g,fallback:x}=Og("image"),[w]=Rg("Image"),C=f("image",t),m=f(),E=V0(C),[N,B,$]=g1(C,E),A=gt(o,B,$,E),_=gt(n,B,p),[P]=e1("ImagePreview",typeof r=="object"?r.zIndex:void 0),q=S.useMemo(()=>{if(r===!1)return r;const L=typeof r=="object"?r:{},{getContainer:Z,closeIcon:Y,rootClassName:j,destroyOnClose:K,destroyOnHidden:U}=L,X=rd(L,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:S.createElement("div",{className:`${C}-mask-info`},S.createElement($g,null),w==null?void 0:w.preview),icons:v1},X),{destroyOnClose:U??K,rootClassName:gt(A,j),getContainer:Z??d,transitionName:Wi(m,"zoom",L.transitionName),maskTransitionName:Wi(m,"fade",L.maskTransitionName),zIndex:P,closeIcon:Y??(g==null?void 0:g.closeIcon)})},[r,w,g==null?void 0:g.closeIcon]),O=Object.assign(Object.assign({},v),a),V=c??x;return N(S.createElement(Q0,Object.assign({prefixCls:C,preview:q,rootClassName:A,className:_,style:O,fallback:V},u)))};b1.PreviewGroup=s2;var ro={},Ja="rc-table-internal-hook";function eu(e){var t=S.createContext(void 0),r=function(o){var a=o.value,c=o.children,u=S.useRef(a);u.current=a;var f=S.useState(function(){return{getValue:function(){return u.current},listeners:new Set}}),d=Et(f,1),p=d[0];return lo(function(){kg(function(){p.listeners.forEach(function(v){v(a)})})},[a]),S.createElement(t.Provider,{value:p},c)};return{Context:t,Provider:r,defaultValue:e}}function Hr(e,t){var r=uo(typeof t=="function"?t:function(v){if(t===void 0)return v;if(!Array.isArray(t))return v[t];var g={};return t.forEach(function(x){g[x]=v[x]}),g}),n=S.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,c=o.getValue,u=S.useRef();u.current=r(n?c():e==null?void 0:e.defaultValue);var f=S.useState({}),d=Et(f,2),p=d[1];return lo(function(){if(!n)return;function v(g){var x=r(g);Go(u.current,x,!0)||p({})}return a.add(v),function(){a.delete(v)}},[n]),u.current}function l2(){var e=S.createContext(null);function t(){return S.useContext(e)}function r(o,a){var c=Vc(o),u=function(d,p){var v=c?{ref:p}:{},g=S.useRef(0),x=S.useRef(d),w=t();return w!==null?S.createElement(o,Bt({},d,v)):((!a||a(x.current,d))&&(g.current+=1),x.current=d,S.createElement(e.Provider,{value:g.current},S.createElement(o,Bt({},d,v))))};return c?S.forwardRef(u):u}function n(o,a){var c=Vc(o),u=function(d,p){var v=c?{ref:p}:{};return t(),S.createElement(o,Bt({},d,v))};return c?S.memo(S.forwardRef(u),a):S.memo(u,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var tu=l2(),y1=tu.makeImmutable,aa=tu.responseImmutable,u2=tu.useImmutableMark,Ur=eu(),x1=S.createContext({renderWithProps:!1}),c2="RC_TABLE_KEY";function d2(e){return e==null?[]:Array.isArray(e)?e:[e]}function cs(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,c=o.dataIndex,u=a||d2(c).join("-")||c2;r[u];)u="".concat(u,"_next");r[u]=!0,t.push(u)}),t}function s0(e){return e!=null}function f2(e){return typeof e=="number"&&!Number.isNaN(e)}function h2(e){return e&&wn(e)==="object"&&!Array.isArray(e)&&!S.isValidElement(e)}function p2(e,t,r,n,o,a){var c=S.useContext(x1),u=u2(),f=t1(function(){if(s0(n))return[n];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],p=U0(e,d),v=p,g=void 0;if(o){var x=o(p,e,r);h2(x)?(v=x.children,g=x.props,c.renderWithProps=!0):v=x}return[v,g]},[u,e,n,t,o,r],function(d,p){if(a){var v=Et(d,2),g=v[1],x=Et(p,2),w=x[1];return a(w,g)}return c.renderWithProps?!0:!Go(d,p,!0)});return f}function m2(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function g2(e,t){return Hr(Ur,function(r){var n=m2(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var v2=function(t){var r=t.ellipsis,n=t.rowType,o=t.children,a,c=r===!0?{showTitle:!0}:r;return c&&(c.showTitle||n==="header")&&(typeof o=="string"||typeof o=="number"?a=o.toString():S.isValidElement(o)&&typeof o.props.children=="string"&&(a=o.props.children)),a};function b2(e){var t,r,n,o,a,c,u,f,d=e.component,p=e.children,v=e.ellipsis,g=e.scope,x=e.prefixCls,w=e.className,C=e.align,m=e.record,E=e.render,N=e.dataIndex,B=e.renderIndex,$=e.shouldCellUpdate,A=e.index,_=e.rowType,P=e.colSpan,q=e.rowSpan,O=e.fixLeft,V=e.fixRight,L=e.firstFixLeft,Z=e.lastFixLeft,Y=e.firstFixRight,j=e.lastFixRight,K=e.appendNode,U=e.additionalProps,X=U===void 0?{}:U,ee=e.isSticky,R="".concat(x,"-cell"),se=Hr(Ur,["supportSticky","allColumnsFixedLeft","rowHoverable"]),ye=se.supportSticky,Ce=se.allColumnsFixedLeft,Se=se.rowHoverable,ue=p2(m,N,B,p,E,$),Fe=Et(ue,2),G=Fe[0],ve=Fe[1],de={},re=typeof O=="number"&&ye,he=typeof V=="number"&&ye;re&&(de.position="sticky",de.left=O),he&&(de.position="sticky",de.right=V);var we=(t=(r=(n=ve==null?void 0:ve.colSpan)!==null&&n!==void 0?n:X.colSpan)!==null&&r!==void 0?r:P)!==null&&t!==void 0?t:1,be=(o=(a=(c=ve==null?void 0:ve.rowSpan)!==null&&c!==void 0?c:X.rowSpan)!==null&&a!==void 0?a:q)!==null&&o!==void 0?o:1,Ee=g2(A,be),De=Et(Ee,2),Ae=De[0],Me=De[1],je=uo(function(dt){var at;m&&Me(A,A+be-1),X==null||(at=X.onMouseEnter)===null||at===void 0||at.call(X,dt)}),Ve=uo(function(dt){var at;m&&Me(-1,-1),X==null||(at=X.onMouseLeave)===null||at===void 0||at.call(X,dt)});if(we===0||be===0)return null;var ht=(u=X.title)!==null&&u!==void 0?u:v2({rowType:_,ellipsis:v,children:G}),it=gt(R,w,(f={},Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(f,"".concat(R,"-fix-left"),re&&ye),"".concat(R,"-fix-left-first"),L&&ye),"".concat(R,"-fix-left-last"),Z&&ye),"".concat(R,"-fix-left-all"),Z&&Ce&&ye),"".concat(R,"-fix-right"),he&&ye),"".concat(R,"-fix-right-first"),Y&&ye),"".concat(R,"-fix-right-last"),j&&ye),"".concat(R,"-ellipsis"),v),"".concat(R,"-with-append"),K),"".concat(R,"-fix-sticky"),(re||he)&&ee&&ye),Pe(f,"".concat(R,"-row-hover"),!ve&&Ae)),X.className,ve==null?void 0:ve.className),Te={};C&&(Te.textAlign=C);var Ie=We(We(We(We({},ve==null?void 0:ve.style),de),Te),X.style),Ze=G;return wn(Ze)==="object"&&!Array.isArray(Ze)&&!S.isValidElement(Ze)&&(Ze=null),v&&(Z||Y)&&(Ze=S.createElement("span",{className:"".concat(R,"-content")},Ze)),S.createElement(d,Bt({},ve,X,{className:it,style:Ie,title:ht,scope:g,onMouseEnter:Se?je:void 0,onMouseLeave:Se?Ve:void 0,colSpan:we!==1?we:null,rowSpan:be!==1?be:null}),K,Ze)}const ia=S.memo(b2);function ru(e,t,r,n,o){var a=r[e]||{},c=r[t]||{},u,f;a.fixed==="left"?u=n.left[o==="rtl"?t:e]:c.fixed==="right"&&(f=n.right[o==="rtl"?e:t]);var d=!1,p=!1,v=!1,g=!1,x=r[t+1],w=r[e-1],C=x&&!x.fixed||w&&!w.fixed||r.every(function($){return $.fixed==="left"});if(o==="rtl"){if(u!==void 0){var m=w&&w.fixed==="left";g=!m&&C}else if(f!==void 0){var E=x&&x.fixed==="right";v=!E&&C}}else if(u!==void 0){var N=x&&x.fixed==="left";d=!N&&C}else if(f!==void 0){var B=w&&w.fixed==="right";p=!B&&C}return{fixLeft:u,fixRight:f,lastFixLeft:d,firstFixRight:p,lastFixRight:v,firstFixLeft:g,isSticky:n.isSticky}}var w1=S.createContext({});function y2(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,c=e.rowSpan,u=e.align,f=Hr(Ur,["prefixCls","direction"]),d=f.prefixCls,p=f.direction,v=S.useContext(w1),g=v.scrollColumnIndex,x=v.stickyOffsets,w=v.flattenColumns,C=r+a-1,m=C+1===g?a+1:a,E=ru(r,r+m-1,w,x,p);return S.createElement(ia,Bt({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:u,colSpan:m,rowSpan:c,render:function(){return n}},E))}var x2=["children"];function w2(e){var t=e.children,r=Wr(e,x2);return S.createElement("tr",r,t)}function ds(e){var t=e.children;return t}ds.Row=w2;ds.Cell=y2;function C2(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=Hr(Ur,"prefixCls"),a=n.length-1,c=n[a],u=S.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:c!=null&&c.scrollbar?a:null}},[c,n,a,r]);return S.createElement(w1.Provider,{value:u},S.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const mi=aa(C2);var C1=ds;function D2(e){return null}function k2(e){return null}function D1(e,t,r,n,o,a,c){var u=a(t,c);e.push({record:t,indent:r,index:c,rowKey:u});var f=o==null?void 0:o.has(u);if(t&&Array.isArray(t[n])&&f)for(var d=0;d<t[n].length;d+=1)D1(e,t[n][d],r+1,n,o,a,d)}function k1(e,t,r,n){var o=S.useMemo(function(){if(r!=null&&r.size){for(var a=[],c=0;c<(e==null?void 0:e.length);c+=1){var u=e[c];D1(a,u,0,t,r,n,c)}return a}return e==null?void 0:e.map(function(f,d){return{record:f,indent:0,index:d,rowKey:n(f,d)}})},[e,t,r,n]);return o}function E1(e,t,r,n){var o=Hr(Ur,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,c=o.expandableType,u=o.expandedKeys,f=o.childrenColumnName,d=o.onTriggerExpand,p=o.rowExpandable,v=o.onRow,g=o.expandRowByClick,x=o.rowClassName,w=c==="nest",C=c==="row"&&(!p||p(e)),m=C||w,E=u&&u.has(t),N=f&&e&&e[f],B=uo(d),$=v==null?void 0:v(e,r),A=$==null?void 0:$.onClick,_=function(V){g&&m&&d(e,V);for(var L=arguments.length,Z=new Array(L>1?L-1:0),Y=1;Y<L;Y++)Z[Y-1]=arguments[Y];A==null||A.apply(void 0,[V].concat(Z))},P;typeof x=="string"?P=x:typeof x=="function"&&(P=x(e,r,n));var q=cs(a);return We(We({},o),{},{columnsKey:q,nestExpandable:w,expanded:E,hasNestChildren:N,record:e,onTriggerExpand:B,rowSupportExpand:C,expandable:m,rowProps:We(We({},$),{},{className:gt(P,$==null?void 0:$.className),onClick:_})})}function S1(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,c=e.expanded,u=e.colSpan,f=e.isEmpty,d=e.stickyOffset,p=d===void 0?0:d,v=Hr(Ur,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),g=v.scrollbarSize,x=v.fixHeader,w=v.fixColumn,C=v.componentWidth,m=v.horizonScroll,E=r;return(f?m&&C:w)&&(E=S.createElement("div",{style:{width:C-p-(x&&!f?g:0),position:"sticky",left:p,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},E)),S.createElement(n,{className:a,style:{display:c?null:"none"}},S.createElement(ia,{component:o,prefixCls:t,colSpan:u},E))}function E2(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,c="".concat(t,"-row-expand-icon");if(!a)return S.createElement("span",{className:gt(c,"".concat(t,"-row-spaced"))});var u=function(d){n(r,d),d.stopPropagation()};return S.createElement("span",{className:gt(c,Pe(Pe({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:u})}function S2(e,t,r){var n=[];function o(a){(a||[]).forEach(function(c,u){n.push(t(c,u)),o(c[r])})}return o(e),n}function A1(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function B1(e,t,r,n,o){var a,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,f=e.record,d=e.prefixCls,p=e.columnsKey,v=e.fixedInfoList,g=e.expandIconColumnIndex,x=e.nestExpandable,w=e.indentSize,C=e.expandIcon,m=e.expanded,E=e.hasNestChildren,N=e.onTriggerExpand,B=e.expandable,$=e.expandedKeys,A=p[r],_=v[r],P;r===(g||0)&&x&&(P=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(w*n,"px")},className:"".concat(d,"-row-indent indent-level-").concat(n)}),C({prefixCls:d,expanded:m,expandable:E,record:f,onExpand:N})));var q=((a=t.onCell)===null||a===void 0?void 0:a.call(t,f,o))||{};if(u){var O=q.rowSpan,V=O===void 0?1:O;if(B&&V&&r<u){for(var L=V,Z=o;Z<o+V;Z+=1){var Y=c[Z];$.has(Y)&&(L+=1)}q.rowSpan=L}}return{key:A,fixedInfo:_,appendCellNode:P,additionalCellProps:q}}function A2(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,c=e.rowKey,u=e.rowKeys,f=e.indent,d=f===void 0?0:f,p=e.rowComponent,v=e.cellComponent,g=e.scopeCellComponent,x=e.expandedRowInfo,w=E1(n,c,o,d),C=w.prefixCls,m=w.flattenColumns,E=w.expandedRowClassName,N=w.expandedRowRender,B=w.rowProps,$=w.expanded,A=w.rowSupportExpand,_=S.useRef(!1);_.current||(_.current=$);var P=A1(E,n,o,d),q=S.createElement(p,Bt({},B,{"data-row-key":c,className:gt(t,"".concat(C,"-row"),"".concat(C,"-row-level-").concat(d),B==null?void 0:B.className,Pe({},P,d>=1)),style:We(We({},r),B==null?void 0:B.style)}),m.map(function(L,Z){var Y=L.render,j=L.dataIndex,K=L.className,U=B1(w,L,Z,d,o,u,x==null?void 0:x.offset),X=U.key,ee=U.fixedInfo,R=U.appendCellNode,se=U.additionalCellProps;return S.createElement(ia,Bt({className:K,ellipsis:L.ellipsis,align:L.align,scope:L.rowScope,component:L.rowScope?g:v,prefixCls:C,key:X,record:n,index:o,renderIndex:a,dataIndex:j,render:Y,shouldCellUpdate:L.shouldCellUpdate},ee,{appendNode:R,additionalProps:se}))})),O;if(A&&(_.current||$)){var V=N(n,o,d+1,$);O=S.createElement(S1,{expanded:$,className:gt("".concat(C,"-expanded-row"),"".concat(C,"-expanded-row-level-").concat(d+1),P),prefixCls:C,component:p,cellComponent:v,colSpan:x?x.colSpan:m.length,stickyOffset:x==null?void 0:x.sticky,isEmpty:!1},V)}return S.createElement(S.Fragment,null,q,O)}const B2=aa(A2);function F2(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,o=e.title,a=S.useRef();return lo(function(){a.current&&r(t,a.current.offsetWidth)},[]),S.createElement(X0,{data:t},S.createElement("th",{ref:a,className:"".concat(n,"-measure-cell")},S.createElement("div",{className:"".concat(n,"-measure-cell-content")},o||"\xA0")))}function N2(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=e.columns,a=S.useRef(null),c=Hr(Ur,["measureRowRender"]),u=c.measureRowRender,f=S.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:a,tabIndex:-1},S.createElement(X0.Collection,{onBatchResize:function(p){Pg(a.current)&&p.forEach(function(v){var g=v.data,x=v.size;n(g,x.offsetWidth)})}},r.map(function(d){var p=o.find(function(x){return x.key===d}),v=p==null?void 0:p.title,g=S.isValidElement(v)?S.cloneElement(v,{ref:null}):v;return S.createElement(F2,{prefixCls:t,key:d,columnKey:d,onColumnResize:n,title:g})})));return u?u(f):f}function T2(e){var t=e.data,r=e.measureColumnWidth,n=Hr(Ur,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,c=n.onColumnResize,u=n.flattenColumns,f=n.getRowKey,d=n.expandedKeys,p=n.childrenColumnName,v=n.emptyNode,g=n.expandedRowOffset,x=g===void 0?0:g,w=n.colWidths,C=k1(t,p,d,f),m=S.useMemo(function(){return C.map(function(O){return O.rowKey})},[C]),E=S.useRef({renderWithProps:!1}),N=S.useMemo(function(){for(var O=u.length-x,V=0,L=0;L<x;L+=1)V+=w[L]||0;return{offset:x,colSpan:O,sticky:V}},[u.length,x,w]),B=a(["body","wrapper"],"tbody"),$=a(["body","row"],"tr"),A=a(["body","cell"],"td"),_=a(["body","cell"],"th"),P;t.length?P=C.map(function(O,V){var L=O.record,Z=O.indent,Y=O.index,j=O.rowKey;return S.createElement(B2,{key:j,rowKey:j,rowKeys:m,record:L,index:V,renderIndex:Y,rowComponent:$,cellComponent:A,scopeCellComponent:_,indent:Z,expandedRowInfo:N})}):P=S.createElement(S1,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:$,cellComponent:A,colSpan:u.length,isEmpty:!0},v);var q=cs(u);return S.createElement(x1.Provider,{value:E.current},S.createElement(B,{className:"".concat(o,"-tbody")},r&&S.createElement(N2,{prefixCls:o,columnsKey:q,onColumnResize:c,columns:u}),P))}const M2=aa(T2);var O2=["expandable"],Ba="RC_TABLE_INTERNAL_COL_DEFINE";function R2(e){var t=e.expandable,r=Wr(e,O2),n;return"expandable"in e?n=We(We({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var $2=["columnType"];function F1(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=Hr(Ur,["tableLayout"]),a=o.tableLayout,c=[],u=n||r.length,f=!1,d=u-1;d>=0;d-=1){var p=t[d],v=r&&r[d],g=void 0,x=void 0;if(v&&(g=v[Ba],a==="auto"&&(x=v.minWidth)),p||x||g||f){var w=g||{};w.columnType;var C=Wr(w,$2);c.unshift(S.createElement("col",Bt({key:d,style:{width:p,minWidth:x}},C))),f=!0}}return c.length>0?S.createElement("colgroup",null,c):null}var P2=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function z2(e,t){return vt(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 I2=S.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,c=e.colWidths,u=e.colGroup,f=e.columCount,d=e.stickyOffsets,p=e.direction,v=e.fixHeader,g=e.stickyTopOffset,x=e.stickyBottomOffset,w=e.stickyClassName,C=e.scrollX,m=e.tableLayout,E=m===void 0?"fixed":m,N=e.onScroll,B=e.children,$=Wr(e,P2),A=Hr(Ur,["prefixCls","scrollbarSize","isSticky","getComponent"]),_=A.prefixCls,P=A.scrollbarSize,q=A.isSticky,O=A.getComponent,V=O(["header","table"],"table"),L=q&&!v?0:P,Z=S.useRef(null),Y=S.useCallback(function(ye){Uc(t,ye),Uc(Z,ye)},[]);S.useEffect(function(){function ye(Se){var ue=Se,Fe=ue.currentTarget,G=ue.deltaX;G&&(N({currentTarget:Fe,scrollLeft:Fe.scrollLeft+G}),Se.preventDefault())}var Ce=Z.current;return Ce==null||Ce.addEventListener("wheel",ye,{passive:!1}),function(){Ce==null||Ce.removeEventListener("wheel",ye)}},[]);var j=a[a.length-1],K={fixed:j?j.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(_,"-cell-scrollbar")}}},U=vt(function(){return L?[].concat(Gt(o),[K]):o},[L,o]),X=vt(function(){return L?[].concat(Gt(a),[K]):a},[L,a]),ee=vt(function(){var ye=d.right,Ce=d.left;return We(We({},d),{},{left:p==="rtl"?[].concat(Gt(Ce.map(function(Se){return Se+L})),[0]):Ce,right:p==="rtl"?ye:[].concat(Gt(ye.map(function(Se){return Se+L})),[0]),isSticky:q})},[L,d,q]),R=z2(c,f),se=vt(function(){var ye=!R||!R.length||R.every(function(Ce){return!Ce});return n||ye},[n,R]);return S.createElement("div",{style:We({overflow:"hidden"},q?{top:g,bottom:x}:{}),ref:Y,className:gt(r,Pe({},w,!!w))},S.createElement(V,{style:{tableLayout:E,minWidth:"100%",width:C}},se?u:S.createElement(F1,{colWidths:[].concat(Gt(R),[L]),columCount:f+1,columns:X}),B(We(We({},$),{},{stickyOffsets:ee,columns:U,flattenColumns:X}))))});const nd=S.memo(I2);var j2=function(t){var r=t.cells,n=t.stickyOffsets,o=t.flattenColumns,a=t.rowComponent,c=t.cellComponent,u=t.onHeaderRow,f=t.index,d=Hr(Ur,["prefixCls","direction"]),p=d.prefixCls,v=d.direction,g;u&&(g=u(r.map(function(w){return w.column}),f));var x=cs(r.map(function(w){return w.column}));return S.createElement(a,g,r.map(function(w,C){var m=w.column,E=ru(w.colStart,w.colEnd,o,n,v),N;return m&&m.onHeaderCell&&(N=w.column.onHeaderCell(m)),S.createElement(ia,Bt({},w,{scope:m.title?w.colSpan>1?"colgroup":"col":null,ellipsis:m.ellipsis,align:m.align,component:c,prefixCls:p,key:x[C]},E,{additionalProps:N,rowType:"header"}))}))};function _2(e){var t=[];function r(c,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[f]=t[f]||[];var d=u,p=c.filter(Boolean).map(function(v){var g={key:v.key,className:v.className||"",children:v.title,column:v,colStart:d},x=1,w=v.children;return w&&w.length>0&&(x=r(w,d,f+1).reduce(function(C,m){return C+m},0),g.hasSubColumns=!0),"colSpan"in v&&(x=v.colSpan),"rowSpan"in v&&(g.rowSpan=v.rowSpan),g.colSpan=x,g.colEnd=g.colStart+x-1,t[f].push(g),d+=x,x});return p}r(e,0);for(var n=t.length,o=function(u){t[u].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=n-u)})},a=0;a<n;a+=1)o(a);return t}var L2=function(t){var r=t.stickyOffsets,n=t.columns,o=t.flattenColumns,a=t.onHeaderRow,c=Hr(Ur,["prefixCls","getComponent"]),u=c.prefixCls,f=c.getComponent,d=S.useMemo(function(){return _2(n)},[n]),p=f(["header","wrapper"],"thead"),v=f(["header","row"],"tr"),g=f(["header","cell"],"th");return S.createElement(p,{className:"".concat(u,"-thead")},d.map(function(x,w){var C=S.createElement(j2,{key:w,flattenColumns:o,cells:x,stickyOffsets:r,rowComponent:v,cellComponent:g,onHeaderRow:a,index:w});return C}))};const od=aa(L2);function ad(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 K2(e,t,r){return S.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(g){var x=ad(t,g.width);x?n+=x:o+=1});var a=Math.max(t,r),c=Math.max(a-n,o),u=o,f=c/o,d=0,p=e.map(function(g){var x=We({},g),w=ad(t,x.width);if(w)x.width=w;else{var C=Math.floor(f);x.width=u===1?c:C,c-=C,u-=1}return d+=x.width,x});if(d<a){var v=a/d;c=a,p.forEach(function(g,x){var w=Math.floor(g.width*v);g.width=x===p.length-1?c:w,c-=w})}return[p,Math.max(d,a)]}return[e,t]},[e,t,r])}var H2=["children"],q2=["fixed"];function nu(e){return Zh(e).filter(function(t){return S.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=Wr(n,H2),c=We({key:r},a);return o&&(c.children=nu(o)),c})}function N1(e){return e.filter(function(t){return t&&wn(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?We(We({},t),{},{children:N1(r)}):t})}function l0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&wn(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,c=a===!0?"left":a,u="".concat(t,"-").concat(o),f=n.children;return f&&f.length>0?[].concat(Gt(r),Gt(l0(f,u).map(function(d){var p;return We(We({},d),{},{fixed:(p=d.fixed)!==null&&p!==void 0?p:c})}))):[].concat(Gt(r),[We(We({key:u},n),{},{fixed:c})])},[])}function W2(e){return e.map(function(t){var r=t.fixed,n=Wr(t,q2),o=r;return r==="left"?o="right":r==="right"&&(o="left"),We({fixed:o},n)})}function V2(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,c=e.expandedKeys,u=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,p=e.expandIcon,v=e.rowExpandable,g=e.expandIconColumnIndex,x=e.expandedRowOffset,w=x===void 0?0:x,C=e.direction,m=e.expandRowByClick,E=e.columnWidth,N=e.fixed,B=e.scrollWidth,$=e.clientWidth,A=S.useMemo(function(){var j=n||nu(o)||[];return N1(j.slice())},[n,o]),_=S.useMemo(function(){if(a){var j=A.slice();if(!j.includes(ro)){var K=g||0,U=K===0&&N==="right"?A.length:K;U>=0&&j.splice(U,0,ro)}var X=j.indexOf(ro);j=j.filter(function(ye,Ce){return ye!==ro||Ce===X});var ee=A[X],R;N?R=N:R=ee?ee.fixed:null;var se=Pe(Pe(Pe(Pe(Pe(Pe({},Ba,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",R),"className","".concat(r,"-row-expand-icon-cell")),"width",E),"render",function(Ce,Se,ue){var Fe=f(Se,ue),G=c.has(Fe),ve=v?v(Se):!0,de=p({prefixCls:r,expanded:G,expandable:ve,record:Se,onExpand:d});return m?S.createElement("span",{onClick:function(he){return he.stopPropagation()}},de):de});return j.map(function(ye,Ce){var Se=ye===ro?se:ye;return Ce<w?We(We({},Se),{},{fixed:Se.fixed||"left"}):Se})}return A.filter(function(ye){return ye!==ro})},[a,A,f,c,p,C,w]),P=S.useMemo(function(){var j=_;return t&&(j=t(j)),j.length||(j=[{render:function(){return null}}]),j},[t,_,C]),q=S.useMemo(function(){return C==="rtl"?W2(l0(P)):l0(P)},[P,C,B]),O=S.useMemo(function(){for(var j=-1,K=q.length-1;K>=0;K-=1){var U=q[K].fixed;if(U==="left"||U===!0){j=K;break}}if(j>=0)for(var X=0;X<=j;X+=1){var ee=q[X].fixed;if(ee!=="left"&&ee!==!0)return!0}var R=q.findIndex(function(Ce){var Se=Ce.fixed;return Se==="right"});if(R>=0)for(var se=R;se<q.length;se+=1){var ye=q[se].fixed;if(ye!=="right")return!0}return!1},[q]),V=K2(q,B,$),L=Et(V,2),Z=L[0],Y=L[1];return[P,Z,Y,O]}function U2(e,t,r){var n=R2(e),o=n.expandIcon,a=n.expandedRowKeys,c=n.defaultExpandedRowKeys,u=n.defaultExpandAllRows,f=n.expandedRowRender,d=n.onExpand,p=n.onExpandedRowsChange,v=n.childrenColumnName,g=o||E2,x=v||"children",w=S.useMemo(function(){return f?"row":e.expandable&&e.internalHooks===Ja&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(A){return A&&wn(A)==="object"&&A[x]})?"nest":!1},[!!f,t]),C=S.useState(function(){return c||(u?S2(t,r,x):[])}),m=Et(C,2),E=m[0],N=m[1],B=S.useMemo(function(){return new Set(a||E||[])},[a,E]),$=S.useCallback(function(A){var _=r(A,t.indexOf(A)),P,q=B.has(_);q?(B.delete(_),P=Gt(B)):P=[].concat(Gt(B),[_]),N(P),d&&d(!q,A),p&&p(P)},[r,B,t,d,p]);return[n,w,B,g,x,$]}function X2(e,t,r){var n=e.map(function(o,a){return ru(a,a,e,t,r)});return t1(function(){return n},[n],function(o,a){return!Go(o,a)})}function Y2(e){var t=Yt(e),r=At({}),n=Et(r,2),o=n[1],a=Yt(null),c=Yt([]);function u(f){c.current.push(f);var d=Promise.resolve();a.current=d,d.then(function(){if(a.current===d){var p=c.current,v=t.current;c.current=[],p.forEach(function(g){t.current=g(t.current)}),a.current=null,v!==t.current&&o({})}})}return Jt(function(){return function(){a.current=null}},[]),[t.current,u]}function G2(e){var t=Yt(null),r=Yt();function n(){window.clearTimeout(r.current)}function o(c){t.current=c,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return Jt(function(){return n},[]),[o,a]}function Z2(){var e=S.useState(-1),t=Et(e,2),r=t[0],n=t[1],o=S.useState(-1),a=Et(o,2),c=a[0],u=a[1],f=S.useCallback(function(d,p){n(d),u(p)},[]);return[r,c,f]}var id=Yh()?window:null;function J2(e,t){var r=wn(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,c=a===void 0?0:a,u=r.offsetScroll,f=u===void 0?0:u,d=r.getContainer,p=d===void 0?function(){return id}:d,v=p()||id,g=!!e;return S.useMemo(function(){return{isSticky:g,stickyClassName:g?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:c,offsetScroll:f,container:v}},[g,f,o,c,t,v])}function Q2(e,t,r){var n=vt(function(){var o=t.length,a=function(d,p,v){for(var g=[],x=0,w=d;w!==p;w+=v)g.push(x),t[w].fixed&&(x+=e[w]||0);return g},c=a(0,o,1),u=a(o-1,-1,-1).reverse();return r==="rtl"?{left:u,right:c}:{left:c,right:u}},[e,t,r]);return n}function sd(e){var t=e.className,r=e.children;return S.createElement("div",{className:t},r)}function ld(e){var t=Y0(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 e3=function(t,r){var n,o,a=t.scrollBodyRef,c=t.onScroll,u=t.offsetScroll,f=t.container,d=t.direction,p=Hr(Ur,"prefixCls"),v=((n=a.current)===null||n===void 0?void 0:n.scrollWidth)||0,g=((o=a.current)===null||o===void 0?void 0:o.clientWidth)||0,x=v&&g*(g/v),w=S.useRef(),C=Y2({scrollLeft:0,isHiddenScrollBar:!0}),m=Et(C,2),E=m[0],N=m[1],B=S.useRef({delta:0,x:0}),$=S.useState(!1),A=Et($,2),_=A[0],P=A[1],q=S.useRef(null);S.useEffect(function(){return function(){qo.cancel(q.current)}},[]);var O=function(){P(!1)},V=function(K){K.persist(),B.current.delta=K.pageX-E.scrollLeft,B.current.x=0,P(!0),K.preventDefault()},L=function(K){var U,X=K||((U=window)===null||U===void 0?void 0:U.event),ee=X.buttons;if(!_||ee===0){_&&P(!1);return}var R=B.current.x+K.pageX-B.current.x-B.current.delta,se=d==="rtl";R=Math.max(se?x-g:0,Math.min(se?0:g-x,R));var ye=!se||Math.abs(R)+Math.abs(x)<g;ye&&(c({scrollLeft:R/g*(v+2)}),B.current.x=K.pageX)},Z=function(){qo.cancel(q.current),q.current=qo(function(){if(a.current){var K=ld(a.current).top,U=K+a.current.offsetHeight,X=f===window?document.documentElement.scrollTop+window.innerHeight:ld(f).top+f.clientHeight;N(function(ee){return We(We({},ee),{},{isHiddenScrollBar:U-Xc()<=X||K>=X-u})})}})},Y=function(K){N(function(U){return We(We({},U),{},{scrollLeft:v?K/v*g:0})})};return S.useImperativeHandle(r,function(){return{setScrollLeft:Y,checkScrollBarVisible:Z}}),S.useEffect(function(){var j=io(document.body,"mouseup",O,!1),K=io(document.body,"mousemove",L,!1);return Z(),function(){j.remove(),K.remove()}},[x,_]),S.useEffect(function(){if(a.current){for(var j=[],K=Y0(a.current);K;)j.push(K),K=K.parentElement;return j.forEach(function(U){return U.addEventListener("scroll",Z,!1)}),window.addEventListener("resize",Z,!1),window.addEventListener("scroll",Z,!1),f.addEventListener("scroll",Z,!1),function(){j.forEach(function(U){return U.removeEventListener("scroll",Z)}),window.removeEventListener("resize",Z),window.removeEventListener("scroll",Z),f.removeEventListener("scroll",Z)}}},[f]),S.useEffect(function(){E.isHiddenScrollBar||N(function(j){var K=a.current;return K?We(We({},j),{},{scrollLeft:K.scrollLeft/K.scrollWidth*K.clientWidth}):j})},[E.isHiddenScrollBar]),v<=g||!x||E.isHiddenScrollBar?null:S.createElement("div",{style:{height:Xc(),width:g,bottom:u},className:"".concat(p,"-sticky-scroll")},S.createElement("div",{onMouseDown:V,ref:w,className:gt("".concat(p,"-sticky-scroll-bar"),Pe({},"".concat(p,"-sticky-scroll-bar-active"),_)),style:{width:"".concat(x,"px"),transform:"translate3d(".concat(E.scrollLeft,"px, 0, 0)")}}))};const t3=S.forwardRef(e3);var T1="rc-table",r3=[],n3={};function o3(){return"No Data"}function a3(e,t){var r=We({rowKey:"key",prefixCls:T1,emptyText:o3},e),n=r.prefixCls,o=r.className,a=r.rowClassName,c=r.style,u=r.data,f=r.rowKey,d=r.scroll,p=r.tableLayout,v=r.direction,g=r.title,x=r.footer,w=r.summary,C=r.caption,m=r.id,E=r.showHeader,N=r.components,B=r.emptyText,$=r.onRow,A=r.onHeaderRow,_=r.measureRowRender,P=r.onScroll,q=r.internalHooks,O=r.transformColumns,V=r.internalRefs,L=r.tailor,Z=r.getContainerWidth,Y=r.sticky,j=r.rowHoverable,K=j===void 0?!0:j,U=u||r3,X=!!U.length,ee=q===Ja,R=S.useCallback(function(kt,_t){return U0(N,kt)||_t},[N]),se=S.useMemo(function(){return typeof f=="function"?f:function(kt){var _t=kt&&kt[f];return _t}},[f]),ye=R(["body"]),Ce=Z2(),Se=Et(Ce,3),ue=Se[0],Fe=Se[1],G=Se[2],ve=U2(r,U,se),de=Et(ve,6),re=de[0],he=de[1],we=de[2],be=de[3],Ee=de[4],De=de[5],Ae=d==null?void 0:d.x,Me=S.useState(0),je=Et(Me,2),Ve=je[0],ht=je[1],it=V2(We(We(We({},r),re),{},{expandable:!!re.expandedRowRender,columnTitle:re.columnTitle,expandedKeys:we,getRowKey:se,onTriggerExpand:De,expandIcon:be,expandIconColumnIndex:re.expandIconColumnIndex,direction:v,scrollWidth:ee&&L&&typeof Ae=="number"?Ae:null,clientWidth:Ve}),ee?O:null),Te=Et(it,4),Ie=Te[0],Ze=Te[1],dt=Te[2],at=Te[3],et=dt??Ae,Tt=S.useMemo(function(){return{columns:Ie,flattenColumns:Ze}},[Ie,Ze]),xt=S.useRef(),yt=S.useRef(),pt=S.useRef(),ze=S.useRef();S.useImperativeHandle(t,function(){return{nativeElement:xt.current,scrollTo:function(_t){var $r;if(pt.current instanceof HTMLElement){var Xr=_t.index,Ar=_t.top,Cn=_t.key;if(f2(Ar)){var Qe;(Qe=pt.current)===null||Qe===void 0||Qe.scrollTo({top:Ar})}else{var Yr,Bn=Cn??se(U[Xr]);(Yr=pt.current.querySelector('[data-row-key="'.concat(Bn,'"]')))===null||Yr===void 0||Yr.scrollIntoView()}}else($r=pt.current)!==null&&$r!==void 0&&$r.scrollTo&&pt.current.scrollTo(_t)}}});var ce=S.useRef(),bt=S.useState(!1),Pt=Et(bt,2),Vt=Pt[0],$t=Pt[1],ir=S.useState(!1),Ct=Et(ir,2),Mt=Ct[0],nr=Ct[1],hr=S.useState(new Map),Dt=Et(hr,2),Kt=Dt[0],Ut=Dt[1],Fr=cs(Ze),Ir=Fr.map(function(kt){return Kt.get(kt)}),jr=S.useMemo(function(){return Ir},[Ir.join("_")]),Or=Q2(jr,Ze,v),Rr=d&&s0(d.y),dr=d&&s0(et)||!!re.fixed,It=dr&&Ze.some(function(kt){var _t=kt.fixed;return _t}),y=S.useRef(),D=J2(Y,n),Re=D.isSticky,T=D.offsetHeader,J=D.offsetSummary,or=D.offsetScroll,tt=D.stickyClassName,_e=D.container,wt=S.useMemo(function(){return w==null?void 0:w(U)},[w,U]),rt=(Rr||Re)&&S.isValidElement(wt)&&wt.type===ds&&wt.props.fixed,Nt,sr,Nr;Rr&&(sr={overflowY:X?"scroll":"auto",maxHeight:d.y}),dr&&(Nt={overflowX:"auto"},Rr||(sr={overflowY:"hidden"}),Nr={width:et===!0?"auto":et,minWidth:"100%"});var Q=S.useCallback(function(kt,_t){Ut(function($r){if($r.get(kt)!==_t){var Xr=new Map($r);return Xr.set(kt,_t),Xr}return $r})},[]),gr=G2(),oe=Et(gr,2),ie=oe[0],Ne=oe[1];function ot(kt,_t){_t&&(typeof _t=="function"?_t(kt):_t.scrollLeft!==kt&&(_t.scrollLeft=kt,_t.scrollLeft!==kt&&setTimeout(function(){_t.scrollLeft=kt},0)))}var $e=uo(function(kt){var _t=kt.currentTarget,$r=kt.scrollLeft,Xr=v==="rtl",Ar=typeof $r=="number"?$r:_t.scrollLeft,Cn=_t||n3;if(!Ne()||Ne()===Cn){var Qe;ie(Cn),ot(Ar,yt.current),ot(Ar,pt.current),ot(Ar,ce.current),ot(Ar,(Qe=y.current)===null||Qe===void 0?void 0:Qe.setScrollLeft)}var Yr=_t||yt.current;if(Yr){var Bn=ee&&L&&typeof et=="number"?et:Yr.scrollWidth,vr=Yr.clientWidth;if(Bn===vr){$t(!1),nr(!1);return}Xr?($t(-Ar<Bn-vr),nr(-Ar>0)):($t(Ar>0),nr(Ar<Bn-vr))}}),ae=uo(function(kt){$e(kt),P==null||P(kt)}),Ye=function(){if(dr&&pt.current){var _t;$e({currentTarget:Y0(pt.current),scrollLeft:(_t=pt.current)===null||_t===void 0?void 0:_t.scrollLeft})}else $t(!1),nr(!1)},Ue=function(_t){var $r,Xr=_t.width;($r=y.current)===null||$r===void 0||$r.checkScrollBarVisible();var Ar=xt.current?xt.current.offsetWidth:Xr;ee&&Z&&xt.current&&(Ar=Z(xt.current,Ar)||Ar),Ar!==Ve&&(Ye(),ht(Ar))},st=S.useRef(!1);S.useEffect(function(){st.current&&Ye()},[dr,u,Ie.length]),S.useEffect(function(){st.current=!0},[]);var le=S.useState(0),xe=Et(le,2),me=xe[0],He=xe[1],lt=S.useState(!0),Xt=Et(lt,2),Ot=Xt[0],ut=Xt[1];lo(function(){(!L||!ee)&&(pt.current instanceof Element?He(Yc(pt.current).width):He(Yc(ze.current).width)),ut(p4("position","sticky"))},[]),S.useEffect(function(){ee&&V&&(V.body.current=pt.current)});var Ht=S.useCallback(function(kt){return S.createElement(S.Fragment,null,S.createElement(od,kt),rt==="top"&&S.createElement(mi,kt,wt))},[rt,wt]),rn=S.useCallback(function(kt){return S.createElement(mi,kt,wt)},[wt]),Sr=R(["table"],"table"),hn=S.useMemo(function(){return p||(It?et==="max-content"?"auto":"fixed":Rr||Re||Ze.some(function(kt){var _t=kt.ellipsis;return _t})?"fixed":"auto")},[Rr,It,Ze,p,Re]),da,fa={colWidths:jr,columCount:Ze.length,stickyOffsets:Or,onHeaderRow:A,fixHeader:Rr,scroll:d},ha=S.useMemo(function(){return X?null:typeof B=="function"?B():B},[X,B]),ri=S.createElement(M2,{data:U,measureColumnWidth:Rr||dr||Re}),Oo=S.createElement(F1,{colWidths:Ze.map(function(kt){var _t=kt.width;return _t}),columns:Ze}),ni=C!=null?S.createElement("caption",{className:"".concat(n,"-caption")},C):void 0,Bs=Vi(r,{data:!0}),go=Vi(r,{aria:!0});if(Rr||Re){var Ro;typeof ye=="function"?(Ro=ye(U,{scrollbarSize:me,ref:pt,onScroll:$e}),fa.colWidths=Ze.map(function(kt,_t){var $r=kt.width,Xr=_t===Ze.length-1?$r-me:$r;return typeof Xr=="number"&&!Number.isNaN(Xr)?Xr:0})):Ro=S.createElement("div",{style:We(We({},Nt),sr),onScroll:ae,ref:pt,className:gt("".concat(n,"-body"))},S.createElement(Sr,Bt({style:We(We({},Nr),{},{tableLayout:hn})},go),ni,Oo,ri,!rt&&wt&&S.createElement(mi,{stickyOffsets:Or,flattenColumns:Ze},wt)));var pa=We(We(We({noData:!U.length},fa),Tt),{},{direction:v,stickyClassName:tt,scrollX:et,tableLayout:hn,onScroll:$e});da=S.createElement(S.Fragment,null,E!==!1&&S.createElement(nd,Bt({},pa,{stickyTopOffset:T,className:"".concat(n,"-header"),ref:yt,colGroup:Oo}),Ht),Ro,rt&&rt!=="top"&&S.createElement(nd,Bt({},pa,{stickyBottomOffset:J,className:"".concat(n,"-summary"),ref:ce,colGroup:Oo}),rn),Re&&pt.current&&pt.current instanceof Element&&S.createElement(t3,{ref:y,offsetScroll:or,scrollBodyRef:pt,onScroll:$e,container:_e,direction:v}))}else da=S.createElement("div",{style:We(We({},Nt),sr),className:gt("".concat(n,"-content")),onScroll:$e,ref:pt},S.createElement(Sr,Bt({style:We(We({},Nr),{},{tableLayout:hn})},go),ni,Oo,E!==!1&&S.createElement(od,Bt({},fa,Tt)),ri,wt&&S.createElement(mi,{stickyOffsets:Or,flattenColumns:Ze},wt)));var ge=S.createElement("div",Bt({className:gt(n,o,Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe({},"".concat(n,"-rtl"),v==="rtl"),"".concat(n,"-ping-left"),Vt),"".concat(n,"-ping-right"),Mt),"".concat(n,"-layout-fixed"),p==="fixed"),"".concat(n,"-fixed-header"),Rr),"".concat(n,"-fixed-column"),It),"".concat(n,"-fixed-column-gapped"),It&&at),"".concat(n,"-scroll-horizontal"),dr),"".concat(n,"-has-fix-left"),Ze[0]&&Ze[0].fixed),"".concat(n,"-has-fix-right"),Ze[Ze.length-1]&&Ze[Ze.length-1].fixed==="right")),style:c,id:m,ref:xt},Bs),g&&S.createElement(sd,{className:"".concat(n,"-title")},g(U)),S.createElement("div",{ref:ze,className:"".concat(n,"-container")},da),x&&S.createElement(sd,{className:"".concat(n,"-footer")},x(U)));dr&&(ge=S.createElement(X0,{onResize:Ue},ge));var pr=X2(Ze,Or,v),In=S.useMemo(function(){return{scrollX:et,prefixCls:n,getComponent:R,scrollbarSize:me,direction:v,fixedInfoList:pr,isSticky:Re,supportSticky:Ot,componentWidth:Ve,fixHeader:Rr,fixColumn:It,horizonScroll:dr,tableLayout:hn,rowClassName:a,expandedRowClassName:re.expandedRowClassName,expandIcon:be,expandableType:he,expandRowByClick:re.expandRowByClick,expandedRowRender:re.expandedRowRender,expandedRowOffset:re.expandedRowOffset,onTriggerExpand:De,expandIconColumnIndex:re.expandIconColumnIndex,indentSize:re.indentSize,allColumnsFixedLeft:Ze.every(function(kt){return kt.fixed==="left"}),emptyNode:ha,columns:Ie,flattenColumns:Ze,onColumnResize:Q,colWidths:jr,hoverStartRow:ue,hoverEndRow:Fe,onHover:G,rowExpandable:re.rowExpandable,onRow:$,getRowKey:se,expandedKeys:we,childrenColumnName:Ee,rowHoverable:K,measureRowRender:_}},[et,n,R,me,v,pr,Re,Ot,Ve,Rr,It,dr,hn,a,re.expandedRowClassName,be,he,re.expandRowByClick,re.expandedRowRender,re.expandedRowOffset,De,re.expandIconColumnIndex,re.indentSize,ha,Ie,Ze,Q,jr,ue,Fe,G,re.rowExpandable,$,se,we,Ee,K,_]);return S.createElement(Ur.Provider,{value:In},ge)}var i3=S.forwardRef(a3);function M1(e){return y1(i3,e)}var sa=M1();sa.EXPAND_COLUMN=ro;sa.INTERNAL_HOOKS=Ja;sa.Column=D2;sa.ColumnGroup=k2;sa.Summary=C1;var ou=eu(null),O1=eu(null);function s3(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function l3(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,c=e.component,u=e.renderIndex,f=e.record,d=e.style,p=e.className,v=e.inverse,g=e.getHeight,x=r.render,w=r.dataIndex,C=r.className,m=r.width,E=Hr(O1,["columnsOffset"]),N=E.columnsOffset,B=B1(t,r,n,o,a),$=B.key,A=B.fixedInfo,_=B.appendCellNode,P=B.additionalCellProps,q=P.style,O=P.colSpan,V=O===void 0?1:O,L=P.rowSpan,Z=L===void 0?1:L,Y=n-1,j=s3(Y,V,N),K=V>1?m-j:0,U=We(We(We({},q),d),{},{flex:"0 0 ".concat(j,"px"),width:"".concat(j,"px"),marginRight:K,pointerEvents:"auto"}),X=S.useMemo(function(){return v?Z<=1:V===0||Z===0||Z>1},[Z,V,v]);X?U.visibility="hidden":v&&(U.height=g==null?void 0:g(Z));var ee=X?function(){return null}:x,R={};return(Z===0||V===0)&&(R.rowSpan=1,R.colSpan=1),S.createElement(ia,Bt({className:gt(C,p),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:c,prefixCls:t.prefixCls,key:$,record:f,index:a,renderIndex:u,dataIndex:w,render:ee,shouldCellUpdate:r.shouldCellUpdate},A,{appendNode:_,additionalProps:We(We({},P),{},{style:U},R)}))}var u3=["data","index","className","rowKey","style","extra","getHeight"],c3=S.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,c=e.style,u=e.extra,f=e.getHeight,d=Wr(e,u3),p=r.record,v=r.indent,g=r.index,x=Hr(Ur,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),w=x.scrollX,C=x.flattenColumns,m=x.prefixCls,E=x.fixColumn,N=x.componentWidth,B=Hr(ou,["getComponent"]),$=B.getComponent,A=E1(p,a,n,v),_=$(["body","row"],"div"),P=$(["body","cell"],"div"),q=A.rowSupportExpand,O=A.expanded,V=A.rowProps,L=A.expandedRowRender,Z=A.expandedRowClassName,Y;if(q&&O){var j=L(p,n,v+1,O),K=A1(Z,p,n,v),U={};E&&(U={style:Pe({},"--virtual-width","".concat(N,"px"))});var X="".concat(m,"-expanded-row-cell");Y=S.createElement(_,{className:gt("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(v+1),K)},S.createElement(ia,{component:P,prefixCls:m,className:gt(X,Pe({},"".concat(X,"-fixed"),E)),additionalProps:U},j))}var ee=We(We({},c),{},{width:w});u&&(ee.position="absolute",ee.pointerEvents="none");var R=S.createElement(_,Bt({},V,d,{"data-row-key":a,ref:q?null:t,className:gt(o,"".concat(m,"-row"),V==null?void 0:V.className,Pe({},"".concat(m,"-row-extra"),u)),style:We(We({},ee),V==null?void 0:V.style)}),C.map(function(se,ye){return S.createElement(l3,{key:ye,component:P,rowInfo:A,column:se,colIndex:ye,indent:v,index:n,renderIndex:g,record:p,inverse:u,getHeight:f})}));return q?S.createElement("div",{ref:t},R,Y):R}),ud=aa(c3),d3=S.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=Hr(Ur,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,c=o.onColumnResize,u=o.getRowKey,f=o.expandedKeys,d=o.prefixCls,p=o.childrenColumnName,v=o.scrollX,g=o.direction,x=Hr(ou),w=x.sticky,C=x.scrollY,m=x.listItemHeight,E=x.getComponent,N=x.onScroll,B=S.useRef(),$=k1(r,p,f,u),A=S.useMemo(function(){var Y=0;return a.map(function(j){var K=j.width,U=j.minWidth,X=j.key,ee=Math.max(K||0,U||0);return Y+=ee,[X,ee,Y]})},[a]),_=S.useMemo(function(){return A.map(function(Y){return Y[2]})},[A]);S.useEffect(function(){A.forEach(function(Y){var j=Et(Y,2),K=j[0],U=j[1];c(K,U)})},[A]),S.useImperativeHandle(t,function(){var Y,j={scrollTo:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo(U)},nativeElement:(Y=B.current)===null||Y===void 0?void 0:Y.nativeElement};return Object.defineProperty(j,"scrollLeft",{get:function(){var U;return((U=B.current)===null||U===void 0?void 0:U.getScrollInfo().x)||0},set:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo({left:U})}}),Object.defineProperty(j,"scrollTop",{get:function(){var U;return((U=B.current)===null||U===void 0?void 0:U.getScrollInfo().y)||0},set:function(U){var X;(X=B.current)===null||X===void 0||X.scrollTo({top:U})}}),j});var P=function(j,K){var U,X=(U=$[K])===null||U===void 0?void 0:U.record,ee=j.onCell;if(ee){var R,se=ee(X,K);return(R=se==null?void 0:se.rowSpan)!==null&&R!==void 0?R:1}return 1},q=function(j){var K=j.start,U=j.end,X=j.getSize,ee=j.offsetY;if(U<0)return null;for(var R=a.filter(function(we){return P(we,K)===0}),se=K,ye=function(be){if(R=R.filter(function(Ee){return P(Ee,be)===0}),!R.length)return se=be,1},Ce=K;Ce>=0&&!ye(Ce);Ce-=1);for(var Se=a.filter(function(we){return P(we,U)!==1}),ue=U,Fe=function(be){if(Se=Se.filter(function(Ee){return P(Ee,be)!==1}),!Se.length)return ue=Math.max(be-1,U),1},G=U;G<$.length&&!Fe(G);G+=1);for(var ve=[],de=function(be){var Ee=$[be];if(!Ee)return 1;a.some(function(De){return P(De,be)>1})&&ve.push(be)},re=se;re<=ue;re+=1)de(re);var he=ve.map(function(we){var be=$[we],Ee=u(be.record,we),De=function(je){var Ve=we+je-1,ht=u($[Ve].record,Ve),it=X(Ee,ht);return it.bottom-it.top},Ae=X(Ee);return S.createElement(ud,{key:we,data:be,rowKey:Ee,index:we,style:{top:-ee+Ae.top},extra:!0,getHeight:De})});return he},O=S.useMemo(function(){return{columnsOffset:_}},[_]),V="".concat(d,"-tbody"),L=E(["body","wrapper"]),Z={};return w&&(Z.position="sticky",Z.bottom=0,wn(w)==="object"&&w.offsetScroll&&(Z.bottom=w.offsetScroll)),S.createElement(O1.Provider,{value:O},S.createElement(r1,{fullHeight:!1,ref:B,prefixCls:"".concat(V,"-virtual"),styles:{horizontalScrollBar:Z},className:V,height:C,itemHeight:m||24,data:$,itemKey:function(j){return u(j.record)},component:L,scrollWidth:v,direction:g,onVirtualScroll:function(j){var K,U=j.x;n({currentTarget:(K=B.current)===null||K===void 0?void 0:K.nativeElement,scrollLeft:U})},onScroll:N,extraRender:q},function(Y,j,K){var U=u(Y.record,j);return S.createElement(ud,{data:Y,rowKey:U,index:j,style:K.style})}))}),f3=aa(d3),h3=function(t,r){var n=r.ref,o=r.onScroll;return S.createElement(f3,{ref:n,data:t,onScroll:o})};function p3(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,c=e.prefixCls,u=c===void 0?T1:c,f=e.className,d=e.listItemHeight,p=e.components,v=e.onScroll,g=o||{},x=g.x,w=g.y;typeof x!="number"&&(x=1),typeof w!="number"&&(w=500);var C=uo(function(N,B){return U0(p,N)||B}),m=uo(v),E=S.useMemo(function(){return{sticky:a,scrollY:w,listItemHeight:d,getComponent:C,onScroll:m}},[a,w,d,C,m]);return S.createElement(ou.Provider,{value:E},S.createElement(sa,Bt({},e,{className:gt(f,"".concat(u,"-virtual")),scroll:We(We({},o),{},{x}),components:We(We({},p),{},{body:r!=null&&r.length?h3:void 0}),columns:n,internalHooks:Ja,tailor:!0,ref:t})))}var m3=S.forwardRef(p3);function R1(e){return y1(m3,e)}R1();const g3=e=>null,v3=e=>null;var au=S.createContext(null),b3=S.createContext({}),y3=function(t){for(var r=t.prefixCls,n=t.level,o=t.isStart,a=t.isEnd,c="".concat(r,"-indent-unit"),u=[],f=0;f<n;f+=1)u.push(S.createElement("span",{key:f,className:gt(c,Pe(Pe({},"".concat(c,"-start"),o[f]),"".concat(c,"-end"),a[f]))}));return S.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},u)};const x3=S.memo(y3);var w3=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],cd="open",dd="close",C3="---",$a=function(t){var r,n,o,a=t.eventKey,c=t.className,u=t.style,f=t.dragOver,d=t.dragOverGapTop,p=t.dragOverGapBottom,v=t.isLeaf,g=t.isStart,x=t.isEnd,w=t.expanded,C=t.selected,m=t.checked,E=t.halfChecked,N=t.loading,B=t.domRef,$=t.active,A=t.data,_=t.onMouseMove,P=t.selectable,q=Wr(t,w3),O=qe.useContext(au),V=qe.useContext(b3),L=qe.useRef(null),Z=qe.useState(!1),Y=Et(Z,2),j=Y[0],K=Y[1],U=!!(O.disabled||t.disabled||(r=V.nodeDisabled)!==null&&r!==void 0&&r.call(V,A)),X=qe.useMemo(function(){return!O.checkable||t.checkable===!1?!1:O.checkable},[O.checkable,t.checkable]),ee=function(ce){U||O.onNodeSelect(ce,Tr(t))},R=function(ce){U||!X||t.disableCheckbox||O.onNodeCheck(ce,Tr(t),!m)},se=qe.useMemo(function(){return typeof P=="boolean"?P:O.selectable},[P,O.selectable]),ye=function(ce){O.onNodeClick(ce,Tr(t)),se?ee(ce):R(ce)},Ce=function(ce){O.onNodeDoubleClick(ce,Tr(t))},Se=function(ce){O.onNodeMouseEnter(ce,Tr(t))},ue=function(ce){O.onNodeMouseLeave(ce,Tr(t))},Fe=function(ce){O.onNodeContextMenu(ce,Tr(t))},G=qe.useMemo(function(){return!!(O.draggable&&(!O.draggable.nodeDraggable||O.draggable.nodeDraggable(A)))},[O.draggable,A]),ve=function(ce){ce.stopPropagation(),K(!0),O.onNodeDragStart(ce,t);try{ce.dataTransfer.setData("text/plain","")}catch{}},de=function(ce){ce.preventDefault(),ce.stopPropagation(),O.onNodeDragEnter(ce,t)},re=function(ce){ce.preventDefault(),ce.stopPropagation(),O.onNodeDragOver(ce,t)},he=function(ce){ce.stopPropagation(),O.onNodeDragLeave(ce,t)},we=function(ce){ce.stopPropagation(),K(!1),O.onNodeDragEnd(ce,t)},be=function(ce){ce.preventDefault(),ce.stopPropagation(),K(!1),O.onNodeDrop(ce,t)},Ee=function(ce){N||O.onNodeExpand(ce,Tr(t))},De=qe.useMemo(function(){var ze=sn(O.keyEntities,a)||{},ce=ze.children;return!!(ce||[]).length},[O.keyEntities,a]),Ae=qe.useMemo(function(){return v===!1?!1:v||!O.loadData&&!De||O.loadData&&t.loaded&&!De},[v,O.loadData,De,t.loaded]);qe.useEffect(function(){N||typeof O.loadData=="function"&&w&&!Ae&&!t.loaded&&O.onNodeLoad(Tr(t))},[N,O.loadData,O.onNodeLoad,w,Ae,t]);var Me=qe.useMemo(function(){var ze;return(ze=O.draggable)!==null&&ze!==void 0&&ze.icon?qe.createElement("span",{className:"".concat(O.prefixCls,"-draggable-icon")},O.draggable.icon):null},[O.draggable]),je=function(ce){var bt=t.switcherIcon||O.switcherIcon;return typeof bt=="function"?bt(We(We({},t),{},{isLeaf:ce})):bt},Ve=function(){if(Ae){var ce=je(!0);return ce!==!1?qe.createElement("span",{className:gt("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher-noop"))},ce):null}var bt=je(!1);return bt!==!1?qe.createElement("span",{onClick:Ee,className:gt("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher_").concat(w?cd:dd))},bt):null},ht=qe.useMemo(function(){if(!X)return null;var ze=typeof X!="boolean"?X:null;return qe.createElement("span",{className:gt("".concat(O.prefixCls,"-checkbox"),Pe(Pe(Pe({},"".concat(O.prefixCls,"-checkbox-checked"),m),"".concat(O.prefixCls,"-checkbox-indeterminate"),!m&&E),"".concat(O.prefixCls,"-checkbox-disabled"),U||t.disableCheckbox)),onClick:R,role:"checkbox","aria-checked":E?"mixed":m,"aria-disabled":U||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},ze)},[X,m,E,U,t.disableCheckbox,t.title]),it=qe.useMemo(function(){return Ae?null:w?cd:dd},[Ae,w]),Te=qe.useMemo(function(){return qe.createElement("span",{className:gt("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__").concat(it||"docu"),Pe({},"".concat(O.prefixCls,"-icon_loading"),N))})},[O.prefixCls,it,N]),Ie=qe.useMemo(function(){var ze=!!O.draggable,ce=!t.disabled&&ze&&O.dragOverNodeKey===a;return ce?O.dropIndicatorRender({dropPosition:O.dropPosition,dropLevelOffset:O.dropLevelOffset,indent:O.indent,prefixCls:O.prefixCls,direction:O.direction}):null},[O.dropPosition,O.dropLevelOffset,O.indent,O.prefixCls,O.direction,O.draggable,O.dragOverNodeKey,O.dropIndicatorRender]),Ze=qe.useMemo(function(){var ze=t.title,ce=ze===void 0?C3:ze,bt="".concat(O.prefixCls,"-node-content-wrapper"),Pt;if(O.showIcon){var Vt=t.icon||O.icon;Pt=Vt?qe.createElement("span",{className:gt("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__customize"))},typeof Vt=="function"?Vt(t):Vt):Te}else O.loadData&&N&&(Pt=Te);var $t;return typeof ce=="function"?$t=ce(A):O.titleRender?$t=O.titleRender(A):$t=ce,qe.createElement("span",{ref:L,title:typeof ce=="string"?ce:"",className:gt(bt,"".concat(bt,"-").concat(it||"normal"),Pe({},"".concat(O.prefixCls,"-node-selected"),!U&&(C||j))),onMouseEnter:Se,onMouseLeave:ue,onContextMenu:Fe,onClick:ye,onDoubleClick:Ce},Pt,qe.createElement("span",{className:"".concat(O.prefixCls,"-title")},$t),Ie)},[O.prefixCls,O.showIcon,t,O.icon,Te,O.titleRender,A,it,Se,ue,Fe,ye,Ce]),dt=Vi(q,{aria:!0,data:!0}),at=sn(O.keyEntities,a)||{},et=at.level,Tt=x[x.length-1],xt=!U&&G,yt=O.draggingNodeKey===a,pt=P!==void 0?{"aria-selected":!!P}:void 0;return qe.createElement("div",Bt({ref:B,role:"treeitem","aria-expanded":v?void 0:w,className:gt(c,"".concat(O.prefixCls,"-treenode"),(o={},Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(Pe(o,"".concat(O.prefixCls,"-treenode-disabled"),U),"".concat(O.prefixCls,"-treenode-switcher-").concat(w?"open":"close"),!v),"".concat(O.prefixCls,"-treenode-checkbox-checked"),m),"".concat(O.prefixCls,"-treenode-checkbox-indeterminate"),E),"".concat(O.prefixCls,"-treenode-selected"),C),"".concat(O.prefixCls,"-treenode-loading"),N),"".concat(O.prefixCls,"-treenode-active"),$),"".concat(O.prefixCls,"-treenode-leaf-last"),Tt),"".concat(O.prefixCls,"-treenode-draggable"),G),"dragging",yt),Pe(Pe(Pe(Pe(Pe(Pe(Pe(o,"drop-target",O.dropTargetKey===a),"drop-container",O.dropContainerKey===a),"drag-over",!U&&f),"drag-over-gap-top",!U&&d),"drag-over-gap-bottom",!U&&p),"filter-node",(n=O.filterTreeNode)===null||n===void 0?void 0:n.call(O,Tr(t))),"".concat(O.prefixCls,"-treenode-leaf"),Ae))),style:u,draggable:xt,onDragStart:xt?ve:void 0,onDragEnter:G?de:void 0,onDragOver:G?re:void 0,onDragLeave:G?he:void 0,onDrop:G?be:void 0,onDragEnd:G?we:void 0,onMouseMove:_},pt,dt),qe.createElement(x3,{prefixCls:O.prefixCls,level:et,isStart:g,isEnd:x}),Me,Ve(),ht,Ze)};$a.isTreeNode=1;function Rn(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Hn(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function iu(e){return e.split("-")}function D3(e,t){var r=[],n=sn(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(c){var u=c.key,f=c.children;r.push(u),o(f)})}return o(n.children),r}function k3(e){if(e.parent){var t=iu(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function E3(e){var t=iu(e.pos);return Number(t[t.length-1])===0}function fd(e,t,r,n,o,a,c,u,f,d){var p,v=e.clientX,g=e.clientY,x=e.target.getBoundingClientRect(),w=x.top,C=x.height,m=(d==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-v),E=(m-12)/n,N=f.filter(function(U){var X;return(X=u[U])===null||X===void 0||(X=X.children)===null||X===void 0?void 0:X.length}),B=sn(u,r.eventKey);if(g<w+C/2){var $=c.findIndex(function(U){return U.key===B.key}),A=$<=0?0:$-1,_=c[A].key;B=sn(u,_)}var P=B.key,q=B,O=B.key,V=0,L=0;if(!N.includes(P))for(var Z=0;Z<E&&k3(B);Z+=1)B=B.parent,L+=1;var Y=t.data,j=B.node,K=!0;return E3(B)&&B.level===0&&g<w+C/2&&a({dragNode:Y,dropNode:j,dropPosition:-1})&&B.key===r.eventKey?V=-1:(q.children||[]).length&&N.includes(O)?a({dragNode:Y,dropNode:j,dropPosition:0})?V=0:K=!1:L===0?E>-1.5?a({dragNode:Y,dropNode:j,dropPosition:1})?V=1:K=!1:a({dragNode:Y,dropNode:j,dropPosition:0})?V=0:a({dragNode:Y,dropNode:j,dropPosition:1})?V=1:K=!1:a({dragNode:Y,dropNode:j,dropPosition:1})?V=1:K=!1,{dropPosition:V,dropLevelOffset:L,dropTargetKey:B.key,dropTargetPos:B.pos,dragOverNodeKey:O,dropContainerKey:V===0?null:((p=B.parent)===null||p===void 0?void 0:p.key)||null,dropAllowed:K}}function hd(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function ll(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(wn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return ao(!1,"`checkedKeys` is not an array or an object"),null;return t}function u0(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=sn(t,o);if(a){r.add(o);var c=a.parent,u=a.node;u.disabled||c&&n(c.key)}}}return(e||[]).forEach(function(o){n(o)}),Gt(r)}const eo={},c0="SELECT_ALL",d0="SELECT_INVERT",f0="SELECT_NONE",pd=[],$1=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&$1(e,n[e],r)}),r),S3=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:c,onChange:u,onSelect:f,onSelectAll:d,onSelectInvert:p,onSelectNone:v,onSelectMultiple:g,columnWidth:x,type:w,selections:C,fixed:m,renderCell:E,hideSelectAll:N,checkStrictly:B=!0}=t||{},{prefixCls:$,data:A,pageData:_,getRecordByKey:P,getRowKey:q,expandType:O,childrenColumnName:V,locale:L,getPopupContainer:Z}=e,Y=G0(),[j,K]=u4(be=>be),[U,X]=Hi(n||o||pd,{value:n}),ee=S.useRef(new Map),R=St(be=>{if(r){const Ee=new Map;be.forEach(De=>{let Ae=P(De);!Ae&&ee.current.has(De)&&(Ae=ee.current.get(De)),Ee.set(De,Ae)}),ee.current=Ee}},[P,r]);S.useEffect(()=>{R(U)},[U]);const se=vt(()=>$1(V,_),[V,_]),{keyEntities:ye}=vt(()=>{if(B)return{keyEntities:null};let be=A;if(r){const Ee=new Set(se.map((Ae,Me)=>q(Ae,Me))),De=Array.from(ee.current).reduce((Ae,[Me,je])=>Ee.has(Me)?Ae:Ae.concat(je),[]);be=[].concat(Gt(be),Gt(De))}return J0(be,{externalGetKey:q,childrenPropName:V})},[A,q,B,V,r,se]),Ce=vt(()=>{const be=new Map;return se.forEach((Ee,De)=>{const Ae=q(Ee,De),Me=(a?a(Ee):null)||{};be.set(Ae,Me)}),be},[se,q,a]),Se=St(be=>{const Ee=q(be);let De;return Ce.has(Ee)?De=Ce.get(q(be)):De=a?a(be):void 0,!!(De!=null&&De.disabled)},[Ce,q]),[ue,Fe]=vt(()=>{if(B)return[U||[],[]];const{checkedKeys:be,halfCheckedKeys:Ee}=Wo(U,!0,ye,Se);return[be||[],Ee]},[U,B,ye,Se]),G=vt(()=>{const be=w==="radio"?ue.slice(0,1):ue;return new Set(be)},[ue,w]),ve=vt(()=>w==="radio"?new Set:new Set(Fe),[Fe,w]);S.useEffect(()=>{t||X(pd)},[!!t]);const de=St((be,Ee)=>{let De,Ae;R(be),r?(De=be,Ae=be.map(Me=>ee.current.get(Me))):(De=[],Ae=[],be.forEach(Me=>{const je=P(Me);je!==void 0&&(De.push(Me),Ae.push(je))})),X(De),u==null||u(De,Ae,{type:Ee})},[X,P,u,r]),re=St((be,Ee,De,Ae)=>{if(f){const Me=De.map(je=>P(je));f(P(be),Ee,Me,Ae)}de(De,"single")},[f,P,de]),he=vt(()=>!C||N?null:(C===!0?[c0,d0,f0]:C).map(Ee=>Ee===c0?{key:"all",text:L.selectionAll,onSelect(){de(A.map((De,Ae)=>q(De,Ae)).filter(De=>{const Ae=Ce.get(De);return!(Ae!=null&&Ae.disabled)||G.has(De)}),"all")}}:Ee===d0?{key:"invert",text:L.selectInvert,onSelect(){const De=new Set(G);_.forEach((Me,je)=>{const Ve=q(Me,je),ht=Ce.get(Ve);ht!=null&&ht.disabled||(De.has(Ve)?De.delete(Ve):De.add(Ve))});const Ae=Array.from(De);p&&(Y.deprecated(!1,"onSelectInvert","onChange"),p(Ae)),de(Ae,"invert")}}:Ee===f0?{key:"none",text:L.selectNone,onSelect(){v==null||v(),de(Array.from(G).filter(De=>{const Ae=Ce.get(De);return Ae==null?void 0:Ae.disabled}),"none")}}:Ee).map(Ee=>Object.assign(Object.assign({},Ee),{onSelect:(...De)=>{var Ae,Me;(Me=Ee.onSelect)===null||Me===void 0||(Ae=Me).call.apply(Ae,[Ee].concat(De)),K(null)}})),[C,G,_,q,p,de]);return[St(be=>{var Ee;if(!t)return be.filter(ze=>ze!==eo);let De=Gt(be);const Ae=new Set(G),Me=se.map(q).filter(ze=>!Ce.get(ze).disabled),je=Me.every(ze=>Ae.has(ze)),Ve=Me.some(ze=>Ae.has(ze)),ht=()=>{const ze=[];je?Me.forEach(bt=>{Ae.delete(bt),ze.push(bt)}):Me.forEach(bt=>{Ae.has(bt)||(Ae.add(bt),ze.push(bt))});const ce=Array.from(Ae);d==null||d(!je,ce.map(bt=>P(bt)),ze.map(bt=>P(bt))),de(ce,"all"),K(null)};let it,Te;if(w!=="radio"){let ze;if(he){const Mt={getPopupContainer:Z,items:he.map((nr,hr)=>{const{key:Dt,text:Kt,onSelect:Ut}=nr;return{key:Dt??hr,onClick:()=>{Ut==null||Ut(Me)},label:Kt}})};ze=S.createElement("div",{className:`${$}-selection-extra`},S.createElement(s1,{menu:Mt,getPopupContainer:Z},S.createElement("span",null,S.createElement(zg,null))))}const ce=se.map((Mt,nr)=>{const hr=q(Mt,nr),Dt=Ce.get(hr)||{};return Object.assign({checked:Ae.has(hr)},Dt)}).filter(({disabled:Mt})=>Mt),bt=!!ce.length&&ce.length===se.length,Pt=bt&&ce.every(({checked:Mt})=>Mt),Vt=bt&&ce.some(({checked:Mt})=>Mt),$t=(c==null?void 0:c())||{},{onChange:ir,disabled:Ct}=$t;Te=S.createElement(Ui,Object.assign({"aria-label":ze?"Custom selection":"Select all"},$t,{checked:bt?Pt:!!se.length&&je,indeterminate:bt?!Pt&&Vt:!je&&Ve,onChange:Mt=>{ht(),ir==null||ir(Mt)},disabled:Ct??(se.length===0||bt),skipGroup:!0})),it=!N&&S.createElement("div",{className:`${$}-selection`},Te,ze)}let Ie;w==="radio"?Ie=(ze,ce,bt)=>{const Pt=q(ce,bt),Vt=Ae.has(Pt),$t=Ce.get(Pt);return{node:S.createElement(Xh,Object.assign({},$t,{checked:Vt,onClick:ir=>{var Ct;ir.stopPropagation(),(Ct=$t==null?void 0:$t.onClick)===null||Ct===void 0||Ct.call($t,ir)},onChange:ir=>{var Ct;Ae.has(Pt)||re(Pt,!0,[Pt],ir.nativeEvent),(Ct=$t==null?void 0:$t.onChange)===null||Ct===void 0||Ct.call($t,ir)}})),checked:Vt}}:Ie=(ze,ce,bt)=>{var Pt;const Vt=q(ce,bt),$t=Ae.has(Vt),ir=ve.has(Vt),Ct=Ce.get(Vt);let Mt;return O==="nest"?Mt=ir:Mt=(Pt=Ct==null?void 0:Ct.indeterminate)!==null&&Pt!==void 0?Pt:ir,{node:S.createElement(Ui,Object.assign({},Ct,{indeterminate:Mt,checked:$t,skipGroup:!0,onClick:nr=>{var hr;nr.stopPropagation(),(hr=Ct==null?void 0:Ct.onClick)===null||hr===void 0||hr.call(Ct,nr)},onChange:nr=>{var hr;const{nativeEvent:Dt}=nr,{shiftKey:Kt}=Dt,Ut=Me.indexOf(Vt),Fr=ue.some(Ir=>Me.includes(Ir));if(Kt&&B&&Fr){const Ir=j(Ut,Me,Ae),jr=Array.from(Ae);g==null||g(!$t,jr.map(Or=>P(Or)),Ir.map(Or=>P(Or))),de(jr,"multiple")}else{const Ir=ue;if(B){const jr=$t?Rn(Ir,Vt):Hn(Ir,Vt);re(Vt,!$t,jr,Dt)}else{const jr=Wo([].concat(Gt(Ir),[Vt]),!0,ye,Se),{checkedKeys:Or,halfCheckedKeys:Rr}=jr;let dr=Or;if($t){const It=new Set(Or);It.delete(Vt),dr=Wo(Array.from(It),{halfCheckedKeys:Rr},ye,Se).checkedKeys}re(Vt,!$t,dr,Dt)}}K($t?null:Ut),(hr=Ct==null?void 0:Ct.onChange)===null||hr===void 0||hr.call(Ct,nr)}})),checked:$t}};const Ze=(ze,ce,bt)=>{const{node:Pt,checked:Vt}=Ie(ze,ce,bt);return E?E(Vt,ce,bt,Pt):Pt};if(!De.includes(eo))if(De.findIndex(ze=>{var ce;return((ce=ze[Ba])===null||ce===void 0?void 0:ce.columnType)==="EXPAND_COLUMN"})===0){const[ze,...ce]=De;De=[ze,eo].concat(Gt(ce))}else De=[eo].concat(Gt(De));const dt=De.indexOf(eo);De=De.filter((ze,ce)=>ze!==eo||ce===dt);const at=De[dt-1],et=De[dt+1];let Tt=m;Tt===void 0&&((et==null?void 0:et.fixed)!==void 0?Tt=et.fixed:(at==null?void 0:at.fixed)!==void 0&&(Tt=at.fixed)),Tt&&at&&((Ee=at[Ba])===null||Ee===void 0?void 0:Ee.columnType)==="EXPAND_COLUMN"&&at.fixed===void 0&&(at.fixed=Tt);const xt=gt(`${$}-selection-col`,{[`${$}-selection-col-with-dropdown`]:C&&w==="checkbox"}),yt=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Te):t.columnTitle:it,pt={fixed:Tt,width:x,className:`${$}-selection-column`,title:yt(),render:Ze,onCell:t.onCell,align:t.align,[Ba]:{className:xt}};return De.map(ze=>ze===eo?pt:ze)},[q,se,t,ue,G,ve,x,he,O,Ce,g,re,Se]),G]};function A3(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:c}=t,u=`${r}-row-expand-icon`;return S.createElement("button",{type:"button",onClick:f=>{n(o,f),f.stopPropagation()},className:gt(u,{[`${u}-spaced`]:!c,[`${u}-expanded`]:c&&a,[`${u}-collapsed`]:c&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function B3(e){return(r,n)=>{const o=r.querySelector(`.${e}-container`);let a=n;if(o){const c=getComputedStyle(o),u=Number.parseInt(c.borderLeftWidth,10),f=Number.parseInt(c.borderRightWidth,10);a=n-u-f}return a}}const co=(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 la(e,t){return t?`${t}-${e}`:`${e}`}const fs=(e,t)=>typeof e=="function"?e(t):e,F3=(e,t)=>{const r=fs(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var N3={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"},T3=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:N3}))},M3=S.forwardRef(T3),O3=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 qe.createElement("div",{style:a})};function P1(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function R3(e,t){var r=S.useState(!1),n=Et(r,2),o=n[0],a=n[1];lo(function(){if(o)return e(),function(){t()}},[o]),lo(function(){return a(!0),function(){a(!1)}},[])}var $3=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],P3=S.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,c=e.motionType,u=e.onMotionStart,f=e.onMotionEnd,d=e.active,p=e.treeNodeRequiredProps,v=Wr(e,$3),g=S.useState(!0),x=Et(g,2),w=x[0],C=x[1],m=S.useContext(au),E=m.prefixCls,N=a&&c!=="hide";lo(function(){a&&N!==w&&C(N)},[a]);var B=function(){a&&u()},$=S.useRef(!1),A=function(){a&&!$.current&&($.current=!0,f())};R3(B,A);var _=function(q){N===q&&A()};return a?S.createElement(Jh,Bt({ref:t,visible:w},o,{motionAppear:c==="show",onVisibleChanged:_}),function(P,q){var O=P.className,V=P.style;return S.createElement("div",{ref:q,className:gt("".concat(E,"-treenode-motion"),O),style:V},a.map(function(L){var Z=Object.assign({},(P1(L.data),L.data)),Y=L.title,j=L.key,K=L.isStart,U=L.isEnd;delete Z.children;var X=Aa(j,p);return S.createElement($a,Bt({},Z,X,{title:Y,active:d,data:L.data,key:j,isStart:K,isEnd:U}))}))}):S.createElement($a,Bt({domRef:t,className:r,style:n},v,{active:d}))});function z3(){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,c){var u=new Map;a.forEach(function(d){u.set(d,!0)});var f=c.filter(function(d){return!u.has(d)});return f.length===1?f[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function md(e,t,r){var n=e.findIndex(function(u){return u.key===r}),o=e[n+1],a=t.findIndex(function(u){return u.key===r});if(o){var c=t.findIndex(function(u){return u.key===o.key});return t.slice(a+1,c)}return t.slice(a+1)}var I3=["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"],gd={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},j3=function(){},Ao="RC_TREE_MOTION_".concat(Math.random()),h0={key:Ao},z1={key:Ao,level:0,index:0,pos:"0",node:h0,nodes:[h0]},vd={parent:null,children:[],pos:z1.pos,data:h0,title:null,key:Ao,isStart:[],isEnd:[]};function bd(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function yd(e){var t=e.key,r=e.pos;return Ga(t,r)}function _3(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 L3=S.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,c=e.checkedKeys,u=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,p=e.keyEntities,v=e.disabled,g=e.dragging,x=e.dragOverNodeKey,w=e.dropPosition,C=e.motion,m=e.height,E=e.itemHeight,N=e.virtual,B=e.scrollWidth,$=e.focusable,A=e.activeItem,_=e.focused,P=e.tabIndex,q=e.onKeyDown,O=e.onFocus,V=e.onBlur,L=e.onActiveChange,Z=e.onListChangeStart,Y=e.onListChangeEnd,j=Wr(e,I3),K=S.useRef(null),U=S.useRef(null);S.useImperativeHandle(t,function(){return{scrollTo:function(Ie){K.current.scrollTo(Ie)},getIndentWidth:function(){return U.current.offsetWidth}}});var X=S.useState(o),ee=Et(X,2),R=ee[0],se=ee[1],ye=S.useState(n),Ce=Et(ye,2),Se=Ce[0],ue=Ce[1],Fe=S.useState(n),G=Et(Fe,2),ve=G[0],de=G[1],re=S.useState([]),he=Et(re,2),we=he[0],be=he[1],Ee=S.useState(null),De=Et(Ee,2),Ae=De[0],Me=De[1],je=S.useRef(n);je.current=n;function Ve(){var Te=je.current;ue(Te),de(Te),be([]),Me(null),Y()}lo(function(){se(o);var Te=z3(R,o);if(Te.key!==null)if(Te.add){var Ie=Se.findIndex(function(xt){var yt=xt.key;return yt===Te.key}),Ze=bd(md(Se,n,Te.key),N,m,E),dt=Se.slice();dt.splice(Ie+1,0,vd),de(dt),be(Ze),Me("show")}else{var at=n.findIndex(function(xt){var yt=xt.key;return yt===Te.key}),et=bd(md(n,Se,Te.key),N,m,E),Tt=n.slice();Tt.splice(at+1,0,vd),de(Tt),be(et),Me("hide")}else Se!==n&&(ue(n),de(n))},[o,n]),S.useEffect(function(){g||Ve()},[g]);var ht=C?ve:n,it={expandedKeys:o,selectedKeys:a,loadedKeys:u,loadingKeys:f,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:x,dropPosition:w,keyEntities:p};return S.createElement(S.Fragment,null,_&&A&&S.createElement("span",{style:gd,"aria-live":"assertive"},_3(A)),S.createElement("div",null,S.createElement("input",{style:gd,disabled:$===!1||v,tabIndex:$!==!1?P:null,onKeyDown:q,onFocus:O,onBlur:V,value:"",onChange:j3,"aria-label":"for screen reader"})),S.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},S.createElement("div",{className:"".concat(r,"-indent")},S.createElement("div",{ref:U,className:"".concat(r,"-indent-unit")}))),S.createElement(r1,Bt({},j,{data:ht,itemKey:yd,height:m,fullHeight:!1,virtual:N,itemHeight:E,scrollWidth:B,prefixCls:"".concat(r,"-list"),ref:K,role:"tree",onVisibleChange:function(Ie){Ie.every(function(Ze){return yd(Ze)!==Ao})&&Ve()}}),function(Te){var Ie=Te.pos,Ze=Object.assign({},(P1(Te.data),Te.data)),dt=Te.title,at=Te.key,et=Te.isStart,Tt=Te.isEnd,xt=Ga(at,Ie);delete Ze.key,delete Ze.children;var yt=Aa(xt,it);return S.createElement(P3,Bt({},Ze,yt,{title:dt,active:!!A&&at===A.key,pos:Ie,data:Te.data,isStart:et,isEnd:Tt,motion:C,motionNodes:at===Ao?we:null,motionType:Ae,onMotionStart:Z,onMotionEnd:Ve,treeNodeRequiredProps:it,onMouseMove:function(){L(null)}}))}))}),K3=10,su=(function(e){Ig(r,e);var t=jg(r);function r(){var n;_g(this,r);for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return n=t.call.apply(t,[this].concat(a)),Pe(Wt(n),"destroyed",!1),Pe(Wt(n),"delayedDragEnterLogic",void 0),Pe(Wt(n),"loadingRetryTimes",{}),Pe(Wt(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:Zo()}),Pe(Wt(n),"dragStartMousePosition",null),Pe(Wt(n),"dragNodeProps",null),Pe(Wt(n),"currentMouseOverDroppableNodeKey",null),Pe(Wt(n),"listRef",S.createRef()),Pe(Wt(n),"onNodeDragStart",function(u,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=n.props.onDragStart,x=f.eventKey;n.dragNodeProps=f,n.dragStartMousePosition={x:u.clientX,y:u.clientY};var w=Rn(p,x);n.setState({draggingNodeKey:x,dragChildrenKeys:D3(x,v),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(w),window.addEventListener("dragend",n.onWindowDragEnd),g==null||g({event:u,node:Tr(f)})}),Pe(Wt(n),"onNodeDragEnter",function(u,f){var d=n.state,p=d.expandedKeys,v=d.keyEntities,g=d.dragChildrenKeys,x=d.flattenNodes,w=d.indent,C=n.props,m=C.onDragEnter,E=C.onExpand,N=C.allowDrop,B=C.direction,$=f.pos,A=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==A&&(n.currentMouseOverDroppableNodeKey=A),!n.dragNodeProps){n.resetDragState();return}var _=fd(u,n.dragNodeProps,f,w,n.dragStartMousePosition,N,x,v,p,B),P=_.dropPosition,q=_.dropLevelOffset,O=_.dropTargetKey,V=_.dropContainerKey,L=_.dropTargetPos,Z=_.dropAllowed,Y=_.dragOverNodeKey;if(g.includes(O)||!Z){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(j){clearTimeout(n.delayedDragEnterLogic[j])}),n.dragNodeProps.eventKey!==f.eventKey&&(u.persist(),n.delayedDragEnterLogic[$]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var j=Gt(p),K=sn(v,f.eventKey);K&&(K.children||[]).length&&(j=Hn(p,f.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(j),E==null||E(j,{node:Tr(f),expanded:!0,nativeEvent:u.nativeEvent})}},800)),n.dragNodeProps.eventKey===O&&q===0){n.resetDragState();return}n.setState({dragOverNodeKey:Y,dropPosition:P,dropLevelOffset:q,dropTargetKey:O,dropContainerKey:V,dropTargetPos:L,dropAllowed:Z}),m==null||m({event:u,node:Tr(f),expandedKeys:p})}),Pe(Wt(n),"onNodeDragOver",function(u,f){var d=n.state,p=d.dragChildrenKeys,v=d.flattenNodes,g=d.keyEntities,x=d.expandedKeys,w=d.indent,C=n.props,m=C.onDragOver,E=C.allowDrop,N=C.direction;if(n.dragNodeProps){var B=fd(u,n.dragNodeProps,f,w,n.dragStartMousePosition,E,v,g,x,N),$=B.dropPosition,A=B.dropLevelOffset,_=B.dropTargetKey,P=B.dropContainerKey,q=B.dropTargetPos,O=B.dropAllowed,V=B.dragOverNodeKey;p.includes(_)||!O||(n.dragNodeProps.eventKey===_&&A===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():$===n.state.dropPosition&&A===n.state.dropLevelOffset&&_===n.state.dropTargetKey&&P===n.state.dropContainerKey&&q===n.state.dropTargetPos&&O===n.state.dropAllowed&&V===n.state.dragOverNodeKey||n.setState({dropPosition:$,dropLevelOffset:A,dropTargetKey:_,dropContainerKey:P,dropTargetPos:q,dropAllowed:O,dragOverNodeKey:V}),m==null||m({event:u,node:Tr(f)}))}}),Pe(Wt(n),"onNodeDragLeave",function(u,f){n.currentMouseOverDroppableNodeKey===f.eventKey&&!u.currentTarget.contains(u.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var d=n.props.onDragLeave;d==null||d({event:u,node:Tr(f)})}),Pe(Wt(n),"onWindowDragEnd",function(u){n.onNodeDragEnd(u,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),Pe(Wt(n),"onNodeDragEnd",function(u,f){var d=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),d==null||d({event:u,node:Tr(f)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),Pe(Wt(n),"onNodeDrop",function(u,f){var d,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,v=n.state,g=v.dragChildrenKeys,x=v.dropPosition,w=v.dropTargetKey,C=v.dropTargetPos,m=v.dropAllowed;if(m){var E=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),w!==null){var N=We(We({},Aa(w,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===w,data:sn(n.state.keyEntities,w).node}),B=g.includes(w);ao(!B,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var $=iu(C),A={event:u,node:Tr(N),dragNode:n.dragNodeProps?Tr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(g),dropToGap:x!==0,dropPosition:x+Number($[$.length-1])};p||E==null||E(A),n.dragNodeProps=null}}}),Pe(Wt(n),"cleanDragState",function(){var u=n.state.draggingNodeKey;u!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),Pe(Wt(n),"triggerExpandActionExpand",function(u,f){var d=n.state,p=d.expandedKeys,v=d.flattenNodes,g=f.expanded,x=f.key,w=f.isLeaf;if(!(w||u.shiftKey||u.metaKey||u.ctrlKey)){var C=v.filter(function(E){return E.key===x})[0],m=Tr(We(We({},Aa(x,n.getTreeNodeRequiredProps())),{},{data:C.data}));n.setExpandedKeys(g?Rn(p,x):Hn(p,x)),n.onNodeExpand(u,m)}}),Pe(Wt(n),"onNodeClick",function(u,f){var d=n.props,p=d.onClick,v=d.expandAction;v==="click"&&n.triggerExpandActionExpand(u,f),p==null||p(u,f)}),Pe(Wt(n),"onNodeDoubleClick",function(u,f){var d=n.props,p=d.onDoubleClick,v=d.expandAction;v==="doubleClick"&&n.triggerExpandActionExpand(u,f),p==null||p(u,f)}),Pe(Wt(n),"onNodeSelect",function(u,f){var d=n.state.selectedKeys,p=n.state,v=p.keyEntities,g=p.fieldNames,x=n.props,w=x.onSelect,C=x.multiple,m=f.selected,E=f[g.key],N=!m;N?C?d=Hn(d,E):d=[E]:d=Rn(d,E);var B=d.map(function($){var A=sn(v,$);return A?A.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),w==null||w(d,{event:"select",selected:N,node:f,selectedNodes:B,nativeEvent:u.nativeEvent})}),Pe(Wt(n),"onNodeCheck",function(u,f,d){var p=n.state,v=p.keyEntities,g=p.checkedKeys,x=p.halfCheckedKeys,w=n.props,C=w.checkStrictly,m=w.onCheck,E=f.key,N,B={event:"check",node:f,checked:d,nativeEvent:u.nativeEvent};if(C){var $=d?Hn(g,E):Rn(g,E),A=Rn(x,E);N={checked:$,halfChecked:A},B.checkedNodes=$.map(function(L){return sn(v,L)}).filter(Boolean).map(function(L){return L.node}),n.setUncontrolledState({checkedKeys:$})}else{var _=Wo([].concat(Gt(g),[E]),!0,v),P=_.checkedKeys,q=_.halfCheckedKeys;if(!d){var O=new Set(P);O.delete(E);var V=Wo(Array.from(O),{halfCheckedKeys:q},v);P=V.checkedKeys,q=V.halfCheckedKeys}N=P,B.checkedNodes=[],B.checkedNodesPositions=[],B.halfCheckedKeys=q,P.forEach(function(L){var Z=sn(v,L);if(Z){var Y=Z.node,j=Z.pos;B.checkedNodes.push(Y),B.checkedNodesPositions.push({node:Y,pos:j})}}),n.setUncontrolledState({checkedKeys:P},!1,{halfCheckedKeys:q})}m==null||m(N,B)}),Pe(Wt(n),"onNodeLoad",function(u){var f,d=u.key,p=n.state.keyEntities,v=sn(p,d);if(!(v!=null&&(f=v.children)!==null&&f!==void 0&&f.length)){var g=new Promise(function(x,w){n.setState(function(C){var m=C.loadedKeys,E=m===void 0?[]:m,N=C.loadingKeys,B=N===void 0?[]:N,$=n.props,A=$.loadData,_=$.onLoad;if(!A||E.includes(d)||B.includes(d))return null;var P=A(u);return P.then(function(){var q=n.state.loadedKeys,O=Hn(q,d);_==null||_(O,{event:"load",node:u}),n.setUncontrolledState({loadedKeys:O}),n.setState(function(V){return{loadingKeys:Rn(V.loadingKeys,d)}}),x()}).catch(function(q){if(n.setState(function(V){return{loadingKeys:Rn(V.loadingKeys,d)}}),n.loadingRetryTimes[d]=(n.loadingRetryTimes[d]||0)+1,n.loadingRetryTimes[d]>=K3){var O=n.state.loadedKeys;ao(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Hn(O,d)}),x()}w(q)}),{loadingKeys:Hn(B,d)}})});return g.catch(function(){}),g}}),Pe(Wt(n),"onNodeMouseEnter",function(u,f){var d=n.props.onMouseEnter;d==null||d({event:u,node:f})}),Pe(Wt(n),"onNodeMouseLeave",function(u,f){var d=n.props.onMouseLeave;d==null||d({event:u,node:f})}),Pe(Wt(n),"onNodeContextMenu",function(u,f){var d=n.props.onRightClick;d&&(u.preventDefault(),d({event:u,node:f}))}),Pe(Wt(n),"onFocus",function(){var u=n.props.onFocus;n.setState({focused:!0});for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];u==null||u.apply(void 0,d)}),Pe(Wt(n),"onBlur",function(){var u=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];u==null||u.apply(void 0,d)}),Pe(Wt(n),"getTreeNodeRequiredProps",function(){var u=n.state,f=u.expandedKeys,d=u.selectedKeys,p=u.loadedKeys,v=u.loadingKeys,g=u.checkedKeys,x=u.halfCheckedKeys,w=u.dragOverNodeKey,C=u.dropPosition,m=u.keyEntities;return{expandedKeys:f||[],selectedKeys:d||[],loadedKeys:p||[],loadingKeys:v||[],checkedKeys:g||[],halfCheckedKeys:x||[],dragOverNodeKey:w,dropPosition:C,keyEntities:m}}),Pe(Wt(n),"setExpandedKeys",function(u){var f=n.state,d=f.treeData,p=f.fieldNames,v=sl(d,u,p);n.setUncontrolledState({expandedKeys:u,flattenNodes:v},!0)}),Pe(Wt(n),"onNodeExpand",function(u,f){var d=n.state.expandedKeys,p=n.state,v=p.listChanging,g=p.fieldNames,x=n.props,w=x.onExpand,C=x.loadData,m=f.expanded,E=f[g.key];if(!v){var N=d.includes(E),B=!m;if(ao(m&&N||!m&&!N,"Expand state not sync with index check"),d=B?Hn(d,E):Rn(d,E),n.setExpandedKeys(d),w==null||w(d,{node:f,expanded:B,nativeEvent:u.nativeEvent}),B&&C){var $=n.onNodeLoad(f);$&&$.then(function(){var A=sl(n.state.treeData,d,g);n.setUncontrolledState({flattenNodes:A})}).catch(function(){var A=n.state.expandedKeys,_=Rn(A,E);n.setExpandedKeys(_)})}}}),Pe(Wt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),Pe(Wt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),Pe(Wt(n),"onActiveChange",function(u){var f=n.state.activeKey,d=n.props,p=d.onActiveChange,v=d.itemScrollOffset,g=v===void 0?0:v;f!==u&&(n.setState({activeKey:u}),u!==null&&n.scrollTo({key:u,offset:g}),p==null||p(u))}),Pe(Wt(n),"getActiveItem",function(){var u=n.state,f=u.activeKey,d=u.flattenNodes;return f===null?null:d.find(function(p){var v=p.key;return v===f})||null}),Pe(Wt(n),"offsetActiveKey",function(u){var f=n.state,d=f.flattenNodes,p=f.activeKey,v=d.findIndex(function(w){var C=w.key;return C===p});v===-1&&u<0&&(v=d.length),v=(v+u+d.length)%d.length;var g=d[v];if(g){var x=g.key;n.onActiveChange(x)}else n.onActiveChange(null)}),Pe(Wt(n),"onKeyDown",function(u){var f=n.state,d=f.activeKey,p=f.expandedKeys,v=f.checkedKeys,g=f.fieldNames,x=n.props,w=x.onKeyDown,C=x.checkable,m=x.selectable;switch(u.which){case kn.UP:{n.offsetActiveKey(-1),u.preventDefault();break}case kn.DOWN:{n.offsetActiveKey(1),u.preventDefault();break}}var E=n.getActiveItem();if(E&&E.data){var N=n.getTreeNodeRequiredProps(),B=E.data.isLeaf===!1||!!(E.data[g.children]||[]).length,$=Tr(We(We({},Aa(d,N)),{},{data:E.data,active:!0}));switch(u.which){case kn.LEFT:{B&&p.includes(d)?n.onNodeExpand({},$):E.parent&&n.onActiveChange(E.parent.key),u.preventDefault();break}case kn.RIGHT:{B&&!p.includes(d)?n.onNodeExpand({},$):E.children&&E.children.length&&n.onActiveChange(E.children[0].key),u.preventDefault();break}case kn.ENTER:case kn.SPACE:{C&&!$.disabled&&$.checkable!==!1&&!$.disableCheckbox?n.onNodeCheck({},$,!v.includes(d)):!C&&m&&!$.disabled&&$.selectable!==!1&&n.onNodeSelect({},$);break}}}w==null||w(u)}),Pe(Wt(n),"setUncontrolledState",function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var p=!1,v=!0,g={};Object.keys(u).forEach(function(x){if(n.props.hasOwnProperty(x)){v=!1;return}p=!0,g[x]=u[x]}),p&&(!f||v)&&n.setState(We(We({},g),d))}}),Pe(Wt(n),"scrollTo",function(u){n.listRef.current.scrollTo(u)}),n}return Lg(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,c=o.itemScrollOffset,u=c===void 0?0:c;a!==void 0&&a!==this.state.activeKey&&(this.setState({activeKey:a}),a!==null&&this.scrollTo({key:a,offset:u}))}},{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,c=o.flattenNodes,u=o.keyEntities,f=o.draggingNodeKey,d=o.activeKey,p=o.dropLevelOffset,v=o.dropContainerKey,g=o.dropTargetKey,x=o.dropPosition,w=o.dragOverNodeKey,C=o.indent,m=this.props,E=m.prefixCls,N=m.className,B=m.style,$=m.showLine,A=m.focusable,_=m.tabIndex,P=_===void 0?0:_,q=m.selectable,O=m.showIcon,V=m.icon,L=m.switcherIcon,Z=m.draggable,Y=m.checkable,j=m.checkStrictly,K=m.disabled,U=m.motion,X=m.loadData,ee=m.filterTreeNode,R=m.height,se=m.itemHeight,ye=m.scrollWidth,Ce=m.virtual,Se=m.titleRender,ue=m.dropIndicatorRender,Fe=m.onContextMenu,G=m.onScroll,ve=m.direction,de=m.rootClassName,re=m.rootStyle,he=Vi(this.props,{aria:!0,data:!0}),we;Z&&(wn(Z)==="object"?we=Z:typeof Z=="function"?we={nodeDraggable:Z}:we={});var be={prefixCls:E,selectable:q,showIcon:O,icon:V,switcherIcon:L,draggable:we,draggingNodeKey:f,checkable:Y,checkStrictly:j,disabled:K,keyEntities:u,dropLevelOffset:p,dropContainerKey:v,dropTargetKey:g,dropPosition:x,dragOverNodeKey:w,indent:C,direction:ve,dropIndicatorRender:ue,loadData:X,filterTreeNode:ee,titleRender:Se,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 S.createElement(au.Provider,{value:be},S.createElement("div",{className:gt(E,N,de,Pe(Pe(Pe({},"".concat(E,"-show-line"),$),"".concat(E,"-focused"),a),"".concat(E,"-active-focused"),d!==null)),style:re},S.createElement(L3,Bt({ref:this.listRef,prefixCls:E,style:B,data:c,disabled:K,selectable:q,checkable:!!Y,motion:U,dragging:f!==null,height:R,itemHeight:se,virtual:Ce,focusable:A,focused:a,tabIndex:P,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Fe,onScroll:G,scrollWidth:ye},this.getTreeNodeRequiredProps(),he))))}}],[{key:"getDerivedStateFromProps",value:function(o,a){var c=a.prevProps,u={prevProps:o};function f(P){return!c&&o.hasOwnProperty(P)||c&&c[P]!==o[P]}var d,p=a.fieldNames;if(f("fieldNames")&&(p=Zo(o.fieldNames),u.fieldNames=p),f("treeData")?d=o.treeData:f("children")&&(ao(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=c1(o.children)),d){u.treeData=d;var v=J0(d,{fieldNames:p});u.keyEntities=We(Pe({},Ao,z1),v.keyEntities)}var g=u.keyEntities||a.keyEntities;if(f("expandedKeys")||c&&f("autoExpandParent"))u.expandedKeys=o.autoExpandParent||!c&&o.defaultExpandParent?u0(o.expandedKeys,g):o.expandedKeys;else if(!c&&o.defaultExpandAll){var x=We({},g);delete x[Ao];var w=[];Object.keys(x).forEach(function(P){var q=x[P];q.children&&q.children.length&&w.push(q.key)}),u.expandedKeys=w}else!c&&o.defaultExpandedKeys&&(u.expandedKeys=o.autoExpandParent||o.defaultExpandParent?u0(o.defaultExpandedKeys,g):o.defaultExpandedKeys);if(u.expandedKeys||delete u.expandedKeys,d||u.expandedKeys){var C=sl(d||a.treeData,u.expandedKeys||a.expandedKeys,p);u.flattenNodes=C}if(o.selectable&&(f("selectedKeys")?u.selectedKeys=hd(o.selectedKeys,o):!c&&o.defaultSelectedKeys&&(u.selectedKeys=hd(o.defaultSelectedKeys,o))),o.checkable){var m;if(f("checkedKeys")?m=ll(o.checkedKeys)||{}:!c&&o.defaultCheckedKeys?m=ll(o.defaultCheckedKeys)||{}:d&&(m=ll(o.checkedKeys)||{checkedKeys:a.checkedKeys,halfCheckedKeys:a.halfCheckedKeys}),m){var E=m,N=E.checkedKeys,B=N===void 0?[]:N,$=E.halfCheckedKeys,A=$===void 0?[]:$;if(!o.checkStrictly){var _=Wo(B,!0,g);B=_.checkedKeys,A=_.halfCheckedKeys}u.checkedKeys=B,u.halfCheckedKeys=A}}return f("loadedKeys")&&(u.loadedKeys=o.loadedKeys),u}}]),r})(S.Component);Pe(su,"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:O3,allowDrop:function(){return!0},expandAction:!1});Pe(su,"TreeNode",$a);var H3={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"},q3=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:H3}))},I1=S.forwardRef(q3),W3={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"},V3=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:W3}))},U3=S.forwardRef(V3),X3={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"},Y3=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:X3}))},G3=S.forwardRef(Y3),Z3={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"},J3=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:Z3}))},Q3=S.forwardRef(J3);const e5=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:c})=>({[`${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:c}},[`${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}}}}}),t5=new qg("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),r5=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),n5=(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:`${mt(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),o5=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:c,nodeSelectedBg:u,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:p}=t;return{[r]:Object.assign(Object.assign({},Z0(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)`]:Wg(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:t5,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:mt(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:p},[`${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:d},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:c}},[`${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({},r5(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`},n5(e,t)),{"&:hover":{backgroundColor:f},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:u},[`${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:`${mt(t.calc(a).div(2).equal())} !important`}})}},a5=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),c=qi(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[o5(e,c),r&&e5(c)].filter(Boolean)},i5=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}},s5=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},i5(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},l5=W0("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Kg(`${t}-checkbox`,e)},a5(t,e),Hg(e)],s5),xd=4;function u5(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,c=a==="ltr"?"left":"right",u=a==="ltr"?"right":"left",f={[c]:-r*o+xd,[u]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[c]=o+xd;break}return qe.createElement("div",{style:f,className:`${n}-drop-indicator`})}var c5={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"},d5=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:c5}))},f5=S.forwardRef(d5),h5={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"},p5=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:h5}))},m5=S.forwardRef(p5),g5={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"},v5=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:g5}))},b5=S.forwardRef(v5);const y5=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:c,switcherLoadingIcon:u}=e,{isLeaf:f,expanded:d,loading:p}=a;if(p)return S.isValidElement(u)?u:S.createElement(Vg,{className:`${n}-switcher-loading-icon`});let v;if(c&&typeof c=="object"&&(v=c.showLeafIcon),f){if(!c)return null;if(typeof v!="boolean"&&v){const w=typeof v=="function"?v(a):v,C=`${n}-switcher-line-custom-icon`;return S.isValidElement(w)?Gc(w,{className:gt((t=w.props)===null||t===void 0?void 0:t.className,C)}):w}return v?S.createElement(I1,{className:`${n}-switcher-line-icon`}):S.createElement("span",{className:`${n}-switcher-leaf-line`})}const g=`${n}-switcher-icon`,x=typeof o=="function"?o(a):o;return S.isValidElement(x)?Gc(x,{className:gt((r=x.props)===null||r===void 0?void 0:r.className,g)}):x!==void 0?x:c?d?S.createElement(m5,{className:`${n}-switcher-line-icon`}):S.createElement(b5,{className:`${n}-switcher-line-icon`}):S.createElement(f5,{className:g})},j1=qe.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:c}=qe.useContext(Ya),{prefixCls:u,className:f,showIcon:d=!1,showLine:p,switcherIcon:v,switcherLoadingIcon:g,blockNode:x=!1,children:w,checkable:C=!1,selectable:m=!0,draggable:E,disabled:N,motion:B,style:$}=e,A=n("tree",u),_=n(),P=qe.useContext(Ug),q=N??P,O=B??Object.assign(Object.assign({},Xg(_)),{motionAppear:!1}),V=Object.assign(Object.assign({},e),{checkable:C,selectable:m,showIcon:d,motion:O,blockNode:x,disabled:q,showLine:!!p,dropIndicatorRender:u5}),[L,Z,Y]=l5(A),[,j]=n1(),K=j.paddingXS/2+(((r=j.Tree)===null||r===void 0?void 0:r.titleHeight)||j.controlHeightSM),U=qe.useMemo(()=>{if(!E)return!1;let ee={};switch(typeof E){case"function":ee.nodeDraggable=E;break;case"object":ee=Object.assign({},E);break}return ee.icon!==!1&&(ee.icon=ee.icon||qe.createElement(Q3,null)),ee},[E]),X=ee=>qe.createElement(y5,{prefixCls:A,switcherIcon:v,switcherLoadingIcon:g,treeNodeProps:ee,showLine:p});return L(qe.createElement(su,Object.assign({itemHeight:K,ref:t,virtual:a},V,{style:Object.assign(Object.assign({},c==null?void 0:c.style),$),prefixCls:A,className:gt({[`${A}-icon-hide`]:!d,[`${A}-block-node`]:x,[`${A}-unselectable`]:!m,[`${A}-rtl`]:o==="rtl",[`${A}-disabled`]:q},c==null?void 0:c.className,f,Z,Y),direction:o,checkable:C&&qe.createElement("span",{className:`${A}-checkbox-inner`}),selectable:m,switcherIcon:X,draggable:U}),w))}),wd=0,ul=1,Cd=2;function lu(e,t,r){const{key:n,children:o}=r;function a(c){const u=c[n],f=c[o];t(u,c)!==!1&&lu(f||[],t,r)}e.forEach(a)}function x5({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let c=wd;if(r&&r===n)return[r];if(!r||!n)return[];function u(f){return f===r||f===n}return lu(e,f=>{if(c===Cd)return!1;if(u(f)){if(a.push(f),c===wd)c=ul;else if(c===ul)return c=Cd,!1}else c===ul&&a.push(f);return t.includes(f)},Zo(o)),a}function cl(e,t,r){const n=Gt(t),o=[];return lu(e,(a,c)=>{const u=n.indexOf(a);return u!==-1&&(o.push(c),n.splice(u,1)),!!n.length},Zo(r)),o}var Dd=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 w5(e){const{isLeaf:t,expanded:r}=e;return t?S.createElement(I1,null):r?S.createElement(U3,null):S.createElement(G3,null)}function kd({treeData:e,children:t}){return e||c1(t)}const C5=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=Dd(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const c=S.useRef(null),u=S.useRef(null),f=()=>{const{keyEntities:q}=J0(kd(a),{fieldNames:a.fieldNames});let O;return r?O=Object.keys(q):n?O=u0(a.expandedKeys||o||[],q):O=a.expandedKeys||o||[],O},[d,p]=S.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[v,g]=S.useState(()=>f());S.useEffect(()=>{"selectedKeys"in a&&p(a.selectedKeys)},[a.selectedKeys]),S.useEffect(()=>{"expandedKeys"in a&&g(a.expandedKeys)},[a.expandedKeys]);const x=(q,O)=>{var V;return"expandedKeys"in a||g(q),(V=a.onExpand)===null||V===void 0?void 0:V.call(a,q,O)},w=(q,O)=>{var V;const{multiple:L,fieldNames:Z}=a,{node:Y,nativeEvent:j}=O,{key:K=""}=Y,U=kd(a),X=Object.assign(Object.assign({},O),{selected:!0}),ee=(j==null?void 0:j.ctrlKey)||(j==null?void 0:j.metaKey),R=j==null?void 0:j.shiftKey;let se;L&&ee?(se=q,c.current=K,u.current=se,X.selectedNodes=cl(U,se,Z)):L&&R?(se=Array.from(new Set([].concat(Gt(u.current||[]),Gt(x5({treeData:U,expandedKeys:v,startKey:K,endKey:c.current,fieldNames:Z}))))),X.selectedNodes=cl(U,se,Z)):(se=[K],c.current=K,u.current=se,X.selectedNodes=cl(U,se,Z)),(V=a.onSelect)===null||V===void 0||V.call(a,se,X),"selectedKeys"in a||p(se)},{getPrefixCls:C,direction:m}=S.useContext(Ya),{prefixCls:E,className:N,showIcon:B=!0,expandAction:$="click"}=a,A=Dd(a,["prefixCls","className","showIcon","expandAction"]),_=C("tree",E),P=gt(`${_}-directory`,{[`${_}-directory-rtl`]:m==="rtl"},N);return S.createElement(j1,Object.assign({icon:w5,ref:t,blockNode:!0},A,{showIcon:B,expandAction:$,prefixCls:_,className:P,expandedKeys:v,selectedKeys:d,onSelect:w,onExpand:x}))},D5=S.forwardRef(C5),uu=j1;uu.DirectoryTree=D5;uu.TreeNode=$a;const Ed=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?S.createElement("div",{className:`${n}-filter-dropdown-search`},S.createElement(Yg,{prefix:S.createElement(Gg,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},k5=e=>{const{keyCode:t}=e;t===kn.ENTER&&e.stopPropagation()},E5=S.forwardRef((e,t)=>S.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:k5,ref:t},e.children));function Vo(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Gt(t),Gt(Vo(n))))}),t}function S5(e){return e.some(({children:t})=>t)}function _1(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function L1({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((c,u)=>{const f=String(c.value);if(c.children)return{key:f||u,label:c.text,popupClassName:`${t}-dropdown-submenu`,children:L1({filters:c.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const d=n?Ui:Xh,p={key:c.value!==void 0?f:u,label:S.createElement(S.Fragment,null,S.createElement(d,{checked:r.includes(f)}),S.createElement("span",null,c.text))};return o.trim()?typeof a=="function"?a(o,c)?p:null:_1(o,c.text)?p:null:p})}function dl(e){return e||[]}const A5=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:c,column:u,dropdownPrefixCls:f,columnKey:d,filterOnClose:p,filterMultiple:v,filterMode:g="menu",filterSearch:x=!1,filterState:w,triggerFilter:C,locale:m,children:E,getPopupContainer:N,rootClassName:B}=e,{filterResetToDefaultFilteredValue:$,defaultFilteredValue:A,filterDropdownProps:_={},filterDropdownOpen:P,filterDropdownVisible:q,onFilterDropdownVisibleChange:O,onFilterDropdownOpenChange:V}=u,[L,Z]=S.useState(!1),Y=!!(w&&(!((t=w.filteredKeys)===null||t===void 0)&&t.length||w.forceFiltered)),j=Te=>{var Ie;Z(Te),(Ie=_.onOpenChange)===null||Ie===void 0||Ie.call(_,Te),V==null||V(Te),O==null||O(Te)},K=(o=(n=(r=_.open)!==null&&r!==void 0?r:P)!==null&&n!==void 0?n:q)!==null&&o!==void 0?o:L,U=w==null?void 0:w.filteredKeys,[X,ee]=f4(dl(U)),R=({selectedKeys:Te})=>{ee(Te)},se=(Te,{node:Ie,checked:Ze})=>{R(v?{selectedKeys:Te}:{selectedKeys:Ze&&Ie.key?[Ie.key]:[]})};S.useEffect(()=>{L&&R({selectedKeys:dl(U)})},[U]);const[ye,Ce]=S.useState([]),Se=Te=>{Ce(Te)},[ue,Fe]=S.useState(""),G=Te=>{const{value:Ie}=Te.target;Fe(Ie)};S.useEffect(()=>{L||Fe("")},[L]);const ve=Te=>{const Ie=Te!=null&&Te.length?Te:null;if(Ie===null&&(!w||!w.filteredKeys)||Go(Ie,w==null?void 0:w.filteredKeys,!0))return null;C({column:u,key:d,filteredKeys:Ie})},de=()=>{j(!1),ve(X())},re=({confirm:Te,closeDropdown:Ie}={confirm:!1,closeDropdown:!1})=>{Te&&ve([]),Ie&&j(!1),Fe(""),ee($?(A||[]).map(Ze=>String(Ze)):[])},he=({closeDropdown:Te}={closeDropdown:!0})=>{Te&&j(!1),ve(X())},we=(Te,Ie)=>{Ie.source==="trigger"&&(Te&&U!==void 0&&ee(dl(U)),j(Te),!Te&&!u.filterDropdown&&p&&de())},be=gt({[`${f}-menu-without-submenu`]:!S5(u.filters||[])}),Ee=Te=>{if(Te.target.checked){const Ie=Vo(u==null?void 0:u.filters).map(Ze=>String(Ze));ee(Ie)}else ee([])},De=({filters:Te})=>(Te||[]).map((Ie,Ze)=>{const dt=String(Ie.value),at={title:Ie.text,key:Ie.value!==void 0?dt:String(Ze)};return Ie.children&&(at.children=De({filters:Ie.children})),at}),Ae=Te=>{var Ie;return Object.assign(Object.assign({},Te),{text:Te.title,value:Te.key,children:((Ie=Te.children)===null||Ie===void 0?void 0:Ie.map(Ze=>Ae(Ze)))||[]})};let Me;const{direction:je,renderEmpty:Ve}=S.useContext(Ya);if(typeof u.filterDropdown=="function")Me=u.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:Te=>R({selectedKeys:Te}),selectedKeys:X(),confirm:he,clearFilters:re,filters:u.filters,visible:K,close:()=>{j(!1)}});else if(u.filterDropdown)Me=u.filterDropdown;else{const Te=X()||[],Ie=()=>{var dt,at;const et=(dt=Ve==null?void 0:Ve("Table.filter"))!==null&&dt!==void 0?dt:S.createElement(Jc,{image:Jc.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((u.filters||[]).length===0)return et;if(g==="tree")return S.createElement(S.Fragment,null,S.createElement(Ed,{filterSearch:x,value:ue,onChange:G,tablePrefixCls:a,locale:m}),S.createElement("div",{className:`${a}-filter-dropdown-tree`},v?S.createElement(Ui,{checked:Te.length===Vo(u.filters).length,indeterminate:Te.length>0&&Te.length<Vo(u.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:Ee},(at=m==null?void 0:m.filterCheckall)!==null&&at!==void 0?at:m==null?void 0:m.filterCheckAll):null,S.createElement(uu,{checkable:!0,selectable:!1,blockNode:!0,multiple:v,checkStrictly:!v,className:`${f}-menu`,onCheck:se,checkedKeys:Te,selectedKeys:Te,showIcon:!1,treeData:De({filters:u.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:ue.trim()?yt=>typeof x=="function"?x(ue,Ae(yt)):_1(ue,yt.title):void 0})));const Tt=L1({filters:u.filters||[],filterSearch:x,prefixCls:c,filteredKeys:X(),filterMultiple:v,searchValue:ue}),xt=Tt.every(yt=>yt===null);return S.createElement(S.Fragment,null,S.createElement(Ed,{filterSearch:x,value:ue,onChange:G,tablePrefixCls:a,locale:m}),xt?et:S.createElement(o4,{selectable:!0,multiple:v,prefixCls:`${f}-menu`,className:be,onSelect:R,onDeselect:R,selectedKeys:Te,getPopupContainer:N,openKeys:ye,onOpenChange:Se,items:Tt}))},Ze=()=>$?Go((A||[]).map(dt=>String(dt)),Te,!0):Te.length===0;Me=S.createElement(S.Fragment,null,Ie(),S.createElement("div",{className:`${c}-dropdown-btns`},S.createElement(Zc,{type:"link",size:"small",disabled:Ze(),onClick:()=>re()},m.filterReset),S.createElement(Zc,{type:"primary",size:"small",onClick:de},m.filterConfirm)))}u.filterDropdown&&(Me=S.createElement(a4,{selectable:void 0},Me)),Me=S.createElement(E5,{className:`${c}-dropdown`},Me);const it=o1({trigger:["click"],placement:je==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let Te;return typeof u.filterIcon=="function"?Te=u.filterIcon(Y):u.filterIcon?Te=u.filterIcon:Te=S.createElement(M3,null),S.createElement("span",{role:"button",tabIndex:-1,className:gt(`${c}-trigger`,{active:Y}),onClick:Ie=>{Ie.stopPropagation()}},Te)})(),getPopupContainer:N},Object.assign(Object.assign({},_),{rootClassName:gt(B,_.rootClassName),open:K,onOpenChange:we,popupRender:()=>typeof(_==null?void 0:_.dropdownRender)=="function"?_.dropdownRender(Me):Me}));return S.createElement("div",{className:`${c}-column`},S.createElement("span",{className:`${a}-column-title`},E),S.createElement(s1,Object.assign({},it)))},p0=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var c;const u=la(a,r),f=o.filterDropdown!==void 0;if(o.filters||f||"onFilter"in o)if("filteredValue"in o){let d=o.filteredValue;f||(d=(c=d==null?void 0:d.map(String))!==null&&c!==void 0?c:d),n.push({column:o,key:co(o,u),filteredKeys:d,forceFiltered:o.filtered})}else n.push({column:o,key:co(o,u),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(Gt(n),Gt(p0(o.children,t,u))))}),n};function K1(e,t,r,n,o,a,c,u,f){return r.map((d,p)=>{const v=la(p,u),{filterOnClose:g=!0,filterMultiple:x=!0,filterMode:w,filterSearch:C}=d;let m=d;if(m.filters||m.filterDropdown){const E=co(m,v),N=n.find(({key:B})=>E===B);m=Object.assign(Object.assign({},m),{title:B=>S.createElement(A5,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:E,filterState:N,filterOnClose:g,filterMultiple:x,filterMode:w,filterSearch:C,triggerFilter:a,locale:o,getPopupContainer:c,rootClassName:f},fs(d.title,B))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:K1(e,t,m.children,n,o,a,c,v,f)})),m})}const Sd=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:c,filterDropdown:u}=o;if(u)t[a]=n||null;else if(Array.isArray(n)){const f=Vo(c);t[a]=f.filter(d=>n.includes(String(d)))}else t[a]=null}),t},m0=(e,t,r)=>t.reduce((o,a)=>{const{column:{onFilter:c,filters:u},filteredKeys:f}=a;return c&&f&&f.length?o.map(d=>Object.assign({},d)).filter(d=>f.some(p=>{const v=Vo(u),g=v.findIndex(w=>String(w)===String(p)),x=g!==-1?v[g]:p;return d[r]&&(d[r]=m0(d[r],t,r)),c(x,d)})):o},e),H1=e=>e.flatMap(t=>"children"in t?[t].concat(Gt(H1(t.children||[]))):[t]),B5=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:c,rootClassName:u}=e;G0();const f=S.useMemo(()=>H1(n||[]),[n]),[d,p]=S.useState(()=>p0(f,!0)),v=S.useMemo(()=>{const C=p0(f,!1);if(C.length===0)return C;let m=!0;if(C.forEach(({filteredKeys:E})=>{E!==void 0&&(m=!1)}),m){const E=(f||[]).map((N,B)=>co(N,la(B)));return d.filter(({key:N})=>E.includes(N)).map(N=>{const B=f[E.indexOf(N.key)];return Object.assign(Object.assign({},N),{column:Object.assign(Object.assign({},N.column),B),forceFiltered:B.filtered})})}return C},[f,d]),g=S.useMemo(()=>Sd(v),[v]),x=C=>{const m=v.filter(({key:E})=>E!==C.key);m.push(C),p(m),o(Sd(m),m)};return[C=>K1(t,r,C,v,c,x,a,void 0,u),v,g]},F5=(e,t,r)=>{const n=S.useRef({});function o(a){var c;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(d){d.forEach((p,v)=>{const g=r(p,v);u.set(g,p),p&&typeof p=="object"&&t in p&&f(p[t]||[])})};const u=new Map;f(e),n.current={data:e,childrenColumnName:t,kvMap:u,getRowKey:r}}return(c=n.current.kvMap)===null||c===void 0?void 0:c.get(a)}return[o]};var N5=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 q1=10;function T5(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 M5(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=N5(n,["total"]),[c,u]=At(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:q1})),f=o1(c,a,{total:o>0?o:e}),d=Math.ceil((o||e)/f.pageSize);f.current>d&&(f.current=d||1);const p=(g,x)=>{u({current:g??1,pageSize:x||f.pageSize})},v=(g,x)=>{var w;r&&((w=r.onChange)===null||w===void 0||w.call(r,g,x)),p(g,x),t(g,x||(f==null?void 0:f.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:v}),p]}var O5={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"},R5=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:O5}))},$5=S.forwardRef(R5),P5={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"},z5=function(t,r){return S.createElement(en,Bt({},t,{ref:r,icon:P5}))},I5=S.forwardRef(z5);const Ni="ascend",fl="descend",Yi=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,Ad=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,j5=(e,t)=>t?e[e.indexOf(t)+1]:e[0],g0=(e,t,r)=>{let n=[];const o=(a,c)=>{n.push({column:a,key:co(a,c),multiplePriority:Yi(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,c)=>{const u=la(c,r);a.children?("sortOrder"in a&&o(a,u),n=[].concat(Gt(n),Gt(g0(a.children,t,u)))):a.sorter&&("sortOrder"in a?o(a,u):t&&a.defaultSortOrder&&n.push({column:a,key:co(a,u),multiplePriority:Yi(a),sortOrder:a.defaultSortOrder}))}),n},W1=(e,t,r,n,o,a,c,u)=>(t||[]).map((d,p)=>{const v=la(p,u);let g=d;if(g.sorter){const x=g.sortDirections||o,w=g.showSorterTooltip===void 0?c:g.showSorterTooltip,C=co(g,v),m=r.find(({key:O})=>O===C),E=m?m.sortOrder:null,N=j5(x,E);let B;if(d.sortIcon)B=d.sortIcon({sortOrder:E});else{const O=x.includes(Ni)&&S.createElement(I5,{className:gt(`${e}-column-sorter-up`,{active:E===Ni})}),V=x.includes(fl)&&S.createElement($5,{className:gt(`${e}-column-sorter-down`,{active:E===fl})});B=S.createElement("span",{className:gt(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(O&&V)})},S.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},O,V))}const{cancelSort:$,triggerAsc:A,triggerDesc:_}=a||{};let P=$;N===fl?P=_:N===Ni&&(P=A);const q=typeof w=="object"?Object.assign({title:P},w):{title:P};g=Object.assign(Object.assign({},g),{className:gt(g.className,{[`${e}-column-sort`]:E}),title:O=>{const V=`${e}-column-sorters`,L=S.createElement("span",{className:`${e}-column-title`},fs(d.title,O)),Z=S.createElement("div",{className:V},L,B);return w?typeof w!="boolean"&&(w==null?void 0:w.target)==="sorter-icon"?S.createElement("div",{className:`${V} ${e}-column-sorters-tooltip-target-sorter`},L,S.createElement(t0,Object.assign({},q),B)):S.createElement(t0,Object.assign({},q),Z):Z},onHeaderCell:O=>{var V;const L=((V=d.onHeaderCell)===null||V===void 0?void 0:V.call(d,O))||{},Z=L.onClick,Y=L.onKeyDown;L.onClick=U=>{n({column:d,key:C,sortOrder:N,multiplePriority:Yi(d)}),Z==null||Z(U)},L.onKeyDown=U=>{U.keyCode===kn.ENTER&&(n({column:d,key:C,sortOrder:N,multiplePriority:Yi(d)}),Y==null||Y(U))};const j=F3(d.title,{}),K=j==null?void 0:j.toString();return E&&(L["aria-sort"]=E==="ascend"?"ascending":"descending"),L["aria-label"]=K||"",L.className=gt(L.className,`${e}-column-has-sorters`),L.tabIndex=0,d.ellipsis&&(L.title=(j??"").toString()),L}})}return"children"in g&&(g=Object.assign(Object.assign({},g),{children:W1(e,g.children,r,n,o,a,c,v)})),g}),Bd=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Fd=e=>{const t=e.filter(({sortOrder:r})=>r).map(Bd);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},Bd(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},v0=(e,t,r)=>{const n=t.slice().sort((c,u)=>u.multiplePriority-c.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:c},sortOrder:u})=>Ad(c)&&u);return a.length?o.sort((c,u)=>{for(let f=0;f<a.length;f+=1){const d=a[f],{column:{sorter:p},sortOrder:v}=d,g=Ad(p);if(g&&v){const x=g(c,u,v);if(x!==0)return v===Ni?x:-x}}return 0}).map(c=>{const u=c[r];return u?Object.assign(Object.assign({},c),{[r]:v0(u,t,r)}):c}):o},_5=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:c}=e,[u,f]=S.useState(()=>g0(r,!0)),d=(C,m)=>{const E=[];return C.forEach((N,B)=>{const $=la(B,m);if(E.push(co(N,$)),Array.isArray(N.children)){const A=d(N.children,$);E.push.apply(E,Gt(A))}}),E},p=S.useMemo(()=>{let C=!0;const m=g0(r,!1);if(!m.length){const $=d(r);return u.filter(({key:A})=>$.includes(A))}const E=[];function N($){C?E.push($):E.push(Object.assign(Object.assign({},$),{sortOrder:null}))}let B=null;return m.forEach($=>{B===null?(N($),$.sortOrder&&($.multiplePriority===!1?C=!1:B=!0)):(B&&$.multiplePriority!==!1||(C=!1),N($))}),E},[r,u]),v=S.useMemo(()=>{var C,m;const E=p.map(({column:N,sortOrder:B})=>({column:N,order:B}));return{sortColumns:E,sortColumn:(C=E[0])===null||C===void 0?void 0:C.column,sortOrder:(m=E[0])===null||m===void 0?void 0:m.order}},[p]),g=C=>{let m;C.multiplePriority===!1||!p.length||p[0].multiplePriority===!1?m=[C]:m=[].concat(Gt(p.filter(({key:E})=>E!==C.key)),[C]),f(m),c(Fd(m),m)};return[C=>W1(t,C,p,g,n,o,a),p,v,()=>Fd(p)]},V1=(e,t)=>e.map(n=>{const o=Object.assign({},n);return o.title=fs(n.title,t),"children"in o&&(o.children=V1(o.children,t)),o}),L5=e=>[S.useCallback(r=>V1(r,e),[e])],K5=M1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),H5=R1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),q5=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:c,tablePaddingHorizontal:u,calc:f}=e,d=`${mt(r)} ${n} ${o}`,p=(v,g,x)=>({[`&${t}-${v}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${mt(f(g).mul(-1).equal())}
2
+ ${mt(f(f(x).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:d,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:d,borderTop:d,[`
3
+ > ${t}-content,
4
+ > ${t}-header,
5
+ > ${t}-body,
6
+ > ${t}-summary
7
+ `]:{"> 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:d},"> thead":{"> tr:not(:last-child) > th":{borderBottom:d},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:d}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${mt(f(c).mul(-1).equal())} ${mt(f(f(u).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:d,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
8
+ > tr${t}-expanded-row,
9
+ > tr${t}-placeholder
10
+ `]:{"> th, > td":{borderInlineEnd:0}}}}}},p("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),p("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:d,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${mt(r)} 0 ${mt(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},W5=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},Qh),{wordBreak:"keep-all",[`
11
+ &${t}-cell-fix-left-last,
12
+ &${t}-cell-fix-right-first
13
+ `]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},V5=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}}}}},U5=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:c,tableBorderColor:u,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:p,tablePaddingVertical:v,tablePaddingHorizontal:g,tableExpandedRowBg:x,paddingXXS:w,expandIconMarginTop:C,expandIconSize:m,expandIconHalfInner:E,expandIconScale:N,calc:B}=e,$=`${mt(o)} ${c} ${u}`,A=B(w).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:d},[`${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({},Zg(e)),{position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:mt(m),background:f,border:$,borderRadius:p,transform:`scale(${N})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:E,insetInlineEnd:A,insetInlineStart:A,height:o},"&::after":{top:A,bottom:A,insetInlineStart:E,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:C,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:x}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${mt(B(v).mul(-1).equal())} ${mt(B(g).mul(-1).equal())}`,padding:`${mt(v)} ${mt(g)}`}}}},X5=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:c,paddingXS:u,colorText:f,lineWidth:d,lineType:p,tableBorderColor:v,headerIconColor:g,fontSizeSM:x,tablePaddingHorizontal:w,borderRadius:C,motionDurationSlow:m,colorIcon:E,colorPrimary:N,tableHeaderFilterActiveBg:B,colorTextDisabled:$,tableFilterDropdownBg:A,tableFilterDropdownHeight:_,controlItemBgHover:P,controlItemBgActive:q,boxShadowSecondary:O,filterDropdownMenuBg:V,calc:L}=e,Z=`${r}-dropdown`,Y=`${t}-filter-dropdown`,j=`${r}-tree`,K=`${mt(d)} ${p} ${v}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:L(c).mul(-1).equal(),marginInline:`${mt(c)} ${mt(L(w).div(2).mul(-1).equal())}`,padding:`0 ${mt(c)}`,color:g,fontSize:x,borderRadius:C,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:E,background:B},"&.active":{color:N}}}},{[`${r}-dropdown`]:{[Y]:Object.assign(Object.assign({},Z0(e)),{minWidth:o,backgroundColor:A,borderRadius:C,boxShadow:O,overflow:"hidden",[`${Z}-menu`]:{maxHeight:_,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:V,"&:empty::after":{display:"block",padding:`${mt(u)} 0`,color:$,fontSize:x,textAlign:"center",content:'"Not Found"'}},[`${Y}-tree`]:{paddingBlock:`${mt(u)} 0`,paddingInline:u,[j]:{padding:0},[`${j}-treenode ${j}-node-content-wrapper:hover`]:{backgroundColor:P},[`${j}-treenode-checkbox-checked ${j}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:q}}},[`${Y}-search`]:{padding:u,borderBottom:K,"&-input":{input:{minWidth:a},[n]:{color:$}}},[`${Y}-checkall`]:{width:"100%",marginBottom:c,marginInlineStart:c},[`${Y}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${mt(L(u).sub(d).equal())} ${mt(u)}`,overflow:"hidden",borderTop:K}})}},{[`${r}-dropdown ${Y}, ${Y}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:u,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Y5=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:c,zIndexTableSticky:u,calc:f}=e,d=n;return{[`${t}-wrapper`]:{[`
14
+ ${t}-cell-fix-left,
15
+ ${t}-cell-fix-right
16
+ `]:{position:"sticky !important",zIndex:a,background:c},[`
17
+ ${t}-cell-fix-left-first::after,
18
+ ${t}-cell-fix-left-last::after
19
+ `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:f(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"},[`
20
+ ${t}-cell-fix-right-first::after,
21
+ ${t}-cell-fix-right-last::after
22
+ `]:{position:"absolute",top:0,bottom:f(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:f(u).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 ${d}`},[`
23
+ ${t}-cell-fix-left-first::after,
24
+ ${t}-cell-fix-left-last::after
25
+ `]:{boxShadow:`inset 10px 0 8px -8px ${d}`},[`${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 ${d}`},[`
26
+ ${t}-cell-fix-right-first::after,
27
+ ${t}-cell-fix-right-last::after
28
+ `]:{boxShadow:`inset -10px 0 8px -8px ${d}`}},[`${t}-fixed-column-gapped`]:{[`
29
+ ${t}-cell-fix-left-first::after,
30
+ ${t}-cell-fix-left-last::after,
31
+ ${t}-cell-fix-right-first::after,
32
+ ${t}-cell-fix-right-last::after
33
+ `]:{boxShadow:"none"}}}}},G5=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${mt(n)} 0`}}},Z5=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${mt(r)} ${mt(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 ${mt(r)} ${mt(r)}`}}}}},J5=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"}}}}},Q5=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:c,headerIconColor:u,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:p,tableSelectedRowHoverBg:v,tableRowHoverBg:g,tablePaddingHorizontal:x,calc:w}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:w(d).add(o).add(w(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:w(d).add(w(c).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:w(d).add(o).add(w(a).div(4)).add(w(c).mul(2)).equal()}},[`
34
+ table tr th${t}-selection-column,
35
+ table tr td${t}-selection-column,
36
+ ${t}-selection-column
37
+ `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:w(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:mt(w(x).div(4).equal()),[n]:{color:u,fontSize:o,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:p,"&-row-hover":{background:v}}},[`> ${t}-cell-row-hover`]:{background:g}}}}}},e6=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,c,u,f)=>({[`${t}${t}-${a}`]:{fontSize:f,[`
38
+ ${t}-title,
39
+ ${t}-footer,
40
+ ${t}-cell,
41
+ ${t}-thead > tr > th,
42
+ ${t}-tbody > tr > th,
43
+ ${t}-tbody > tr > td,
44
+ tfoot > tr > th,
45
+ tfoot > tr > td
46
+ `]:{padding:`${mt(c)} ${mt(u)}`},[`${t}-filter-trigger`]:{marginInlineEnd:mt(n(u).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${mt(n(c).mul(-1).equal())} ${mt(n(u).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:mt(n(c).mul(-1).equal()),marginInline:`${mt(n(r).sub(u).equal())} ${mt(n(u).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:mt(n(u).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))}},t6=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},[`
47
+ &${t}-cell-fix-left:hover,
48
+ &${t}-cell-fix-right:hover
49
+ `]:{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}}}},r6=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:c,zIndexTableSticky:u,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:p,tableBorderColor:v}=e,g=`${mt(d)} ${p} ${v}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:u,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${mt(a)} !important`,zIndex:u,display:"flex",alignItems:"center",background:c,borderTop:g,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:f,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},Nd=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${mt(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 ${mt(o(r).mul(-1).equal())} 0 ${n}`}}}},n6=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:c}=e,u=`${mt(n)} ${o} ${a}`,f=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
50
+ & > ${t}-row,
51
+ & > div:not(${t}-row) > ${t}-row
52
+ `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:u,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${f}${f}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${mt(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:u,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:u,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:c(n).mul(-1).equal(),borderInlineStart:u}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:u,borderBottom:u}}}}}},o6=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:c,lineType:u,tableBorderColor:f,tableFontSize:d,tableBg:p,tableRadius:v,tableHeaderTextColor:g,motionDurationMid:x,tableHeaderBg:w,tableHeaderCellSplitColor:C,tableFooterTextColor:m,tableFooterBg:E,calc:N}=e,B=`${mt(c)} ${u} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},Jg()),{[t]:Object.assign(Object.assign({},Z0(e)),{fontSize:d,background:p,borderRadius:`${mt(v)} ${mt(v)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${mt(v)} ${mt(v)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
53
+ ${t}-cell,
54
+ ${t}-thead > tr > th,
55
+ ${t}-tbody > tr > th,
56
+ ${t}-tbody > tr > td,
57
+ tfoot > tr > th,
58
+ tfoot > tr > td
59
+ `]:{position:"relative",padding:`${mt(n)} ${mt(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${mt(n)} ${mt(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:w,borderBottom:B,transition:`background ${x} 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:C,transform:"translateY(-50%)",transition:`background-color ${x}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${x}, border-color ${x}`,borderBottom:B,[`
60
+ > ${t}-wrapper:only-child,
61
+ > ${t}-expanded-row-fixed > ${t}-wrapper:only-child
62
+ `]:{[t]:{marginBlock:mt(N(n).mul(-1).equal()),marginInline:`${mt(N(a).sub(o).equal())}
63
+ ${mt(N(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:g,fontWeight:r,textAlign:"start",background:w,borderBottom:B,transition:`background ${x} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${mt(n)} ${mt(o)}`,color:m,background:E}})}},a6=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:c,controlItemBgActiveHover:u,padding:f,paddingSM:d,paddingXS:p,colorBorderSecondary:v,borderRadiusLG:g,controlHeight:x,colorTextPlaceholder:w,fontSize:C,fontSizeSM:m,lineHeight:E,lineWidth:N,colorIcon:B,colorIconHover:$,opacityLoading:A,controlInteractiveSize:_}=e,P=new vn(o).onBackground(r).toHexString(),q=new vn(a).onBackground(r).toHexString(),O=new vn(t).onBackground(r).toHexString(),V=new vn(B),L=new vn($),Z=_/2-N,Y=Z*2+N*3;return{headerBg:O,headerColor:n,headerSortActiveBg:P,headerSortHoverBg:q,bodySortBg:O,rowHoverBg:O,rowSelectedBg:c,rowSelectedHoverBg:u,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:p,cellPaddingBlockSM:p,cellPaddingInlineSM:p,borderColor:v,headerBorderRadius:g,footerBg:O,footerColor:n,cellFontSize:C,cellFontSizeMD:C,cellFontSizeSM:C,headerSplitColor:v,fixedHeaderSortActiveBg:P,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:x,stickyScrollBarBg:w,stickyScrollBarBorderRadius:100,expandIconMarginTop:(C*E-N*3)/2-Math.ceil((m*1.4-N*3)/2),headerIconColor:V.clone().setA(V.a*A).toRgbString(),headerIconHoverColor:L.clone().setA(L.a*A).toRgbString(),expandIconHalfInner:Z,expandIconSize:Y,expandIconScale:_/Y}},Td=2,i6=W0("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:c,headerSortActiveBg:u,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:p,rowSelectedBg:v,rowSelectedHoverBg:g,rowExpandedBg:x,cellPaddingBlock:w,cellPaddingInline:C,cellPaddingBlockMD:m,cellPaddingInlineMD:E,cellPaddingBlockSM:N,cellPaddingInlineSM:B,borderColor:$,footerBg:A,footerColor:_,headerBorderRadius:P,cellFontSize:q,cellFontSizeMD:O,cellFontSizeSM:V,headerSplitColor:L,fixedHeaderSortActiveBg:Z,headerFilterHoverBg:Y,filterDropdownBg:j,expandIconBg:K,selectionColumnWidth:U,stickyScrollBarBg:X,calc:ee}=e,R=qi(e,{tableFontSize:q,tableBg:n,tableRadius:P,tablePaddingVertical:w,tablePaddingHorizontal:C,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:E,tablePaddingVerticalSmall:N,tablePaddingHorizontalSmall:B,tableBorderColor:$,tableHeaderTextColor:c,tableHeaderBg:a,tableFooterTextColor:_,tableFooterBg:A,tableHeaderCellSplitColor:L,tableHeaderSortBg:u,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:Z,tableHeaderFilterActiveBg:Y,tableFilterDropdownBg:j,tableRowHoverBg:p,tableSelectedRowBg:v,tableSelectedRowHoverBg:g,zIndexTableFixed:Td,zIndexTableSticky:ee(Td).add(1).equal({unit:!1}),tableFontSizeMiddle:O,tableFontSizeSmall:V,tableSelectionColumnWidth:U,tableExpandIconBg:K,tableExpandColumnWidth:ee(o).add(ee(e.padding).mul(2)).equal(),tableExpandedRowBg:x,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:X,tableScrollThumbBgHover:t,tableScrollBg:r});return[o6(R),G5(R),Nd(R),t6(R),X5(R),q5(R),Z5(R),U5(R),Nd(R),V5(R),Q5(R),Y5(R),r6(R),W5(R),e6(R),J5(R),n6(R)]},a6,{unitless:{expandIconScale:!0}}),Md=[],s6=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:c,style:u,size:f,bordered:d,dropdownPrefixCls:p,dataSource:v,pagination:g,rowSelection:x,rowKey:w="key",rowClassName:C,columns:m,children:E,childrenColumnName:N,onChange:B,getPopupContainer:$,loading:A,expandIcon:_,expandable:P,expandedRowRender:q,expandIconColumnIndex:O,indentSize:V,scroll:L,sortDirections:Z,locale:Y,showSorterTooltip:j={target:"full-header"},virtual:K}=e;G0();const U=S.useMemo(()=>m||nu(E),[m,E]),X=S.useMemo(()=>U.some(_e=>_e.responsive),[U]),ee=Qg(X),R=S.useMemo(()=>{const _e=new Set(Object.keys(ee).filter(wt=>ee[wt]));return U.filter(wt=>!wt.responsive||wt.responsive.some(rt=>_e.has(rt)))},[U,ee]),se=Gh(e,["className","style","columns"]),{locale:ye=e4,direction:Ce,table:Se,renderEmpty:ue,getPrefixCls:Fe,getPopupContainer:G}=S.useContext(Ya),ve=t4(f),de=Object.assign(Object.assign({},ye.Table),Y),re=v||Md,he=Fe("table",o),we=Fe("dropdown",p),[,be]=n1(),Ee=V0(he),[De,Ae,Me]=i6(he,Ee),je=Object.assign(Object.assign({childrenColumnName:N,expandIconColumnIndex:O},P),{expandIcon:(r=P==null?void 0:P.expandIcon)!==null&&r!==void 0?r:(n=Se==null?void 0:Se.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:Ve="children"}=je,ht=S.useMemo(()=>re.some(_e=>_e==null?void 0:_e[Ve])?"nest":q||P!=null&&P.expandedRowRender?"row":null,[re]),it={body:S.useRef(null)},Te=B3(he),Ie=S.useRef(null),Ze=S.useRef(null);d4(t,()=>Object.assign(Object.assign({},Ze.current),{nativeElement:Ie.current}));const dt=S.useMemo(()=>typeof w=="function"?w:_e=>_e==null?void 0:_e[w],[w]),[at]=F5(re,Ve,dt),et={},Tt=(_e,wt,rt=!1)=>{var Nt,sr,Nr,Q;const gr=Object.assign(Object.assign({},et),_e);rt&&((Nt=et.resetPagination)===null||Nt===void 0||Nt.call(et),!((sr=gr.pagination)===null||sr===void 0)&&sr.current&&(gr.pagination.current=1),g&&((Nr=g.onChange)===null||Nr===void 0||Nr.call(g,1,(Q=gr.pagination)===null||Q===void 0?void 0:Q.pageSize))),L&&L.scrollToFirstRowOnChange!==!1&&it.body.current&&l4(0,{getContainer:()=>it.body.current}),B==null||B(gr.pagination,gr.filters,gr.sorter,{currentDataSource:m0(v0(re,gr.sorterStates,Ve),gr.filterStates,Ve),action:wt})},xt=(_e,wt)=>{Tt({sorter:_e,sorterStates:wt},"sort",!1)},[yt,pt,ze,ce]=_5({prefixCls:he,mergedColumns:R,onSorterChange:xt,sortDirections:Z||["ascend","descend"],tableLocale:de,showSorterTooltip:j}),bt=S.useMemo(()=>v0(re,pt,Ve),[re,pt]);et.sorter=ce(),et.sorterStates=pt;const Pt=(_e,wt)=>{Tt({filters:_e,filterStates:wt},"filter",!0)},[Vt,$t,ir]=B5({prefixCls:he,locale:de,dropdownPrefixCls:we,mergedColumns:R,onFilterChange:Pt,getPopupContainer:$||G,rootClassName:gt(c,Ee)}),Ct=m0(bt,$t,Ve);et.filters=ir,et.filterStates=$t;const Mt=S.useMemo(()=>{const _e={};return Object.keys(ir).forEach(wt=>{ir[wt]!==null&&(_e[wt]=ir[wt])}),Object.assign(Object.assign({},ze),{filters:_e})},[ze,ir]),[nr]=L5(Mt),hr=(_e,wt)=>{Tt({pagination:Object.assign(Object.assign({},et.pagination),{current:_e,pageSize:wt})},"paginate")},[Dt,Kt]=M5(Ct.length,hr,g);et.pagination=g===!1?{}:T5(Dt,g),et.resetPagination=Kt;const Ut=S.useMemo(()=>{if(g===!1||!Dt.pageSize)return Ct;const{current:_e=1,total:wt,pageSize:rt=q1}=Dt;return Ct.length<wt?Ct.length>rt?Ct.slice((_e-1)*rt,_e*rt):Ct:Ct.slice((_e-1)*rt,_e*rt)},[!!g,Ct,Dt==null?void 0:Dt.current,Dt==null?void 0:Dt.pageSize,Dt==null?void 0:Dt.total]),[Fr,Ir]=S3({prefixCls:he,data:Ct,pageData:Ut,getRowKey:dt,getRecordByKey:at,expandType:ht,childrenColumnName:Ve,locale:de,getPopupContainer:$||G},x),jr=(_e,wt,rt)=>{let Nt;return typeof C=="function"?Nt=gt(C(_e,wt,rt)):Nt=gt(C),gt({[`${he}-row-selected`]:Ir.has(dt(_e,wt))},Nt)};je.__PARENT_RENDER_ICON__=je.expandIcon,je.expandIcon=je.expandIcon||_||A3(de),ht==="nest"&&je.expandIconColumnIndex===void 0?je.expandIconColumnIndex=x?1:0:je.expandIconColumnIndex>0&&x&&(je.expandIconColumnIndex-=1),typeof je.indentSize!="number"&&(je.indentSize=typeof V=="number"?V:15);const Or=S.useCallback(_e=>nr(Fr(Vt(yt(_e)))),[yt,Vt,Fr]),Rr=()=>{if(g===!1||!(Dt!=null&&Dt.total))return{};const _e=()=>Dt.size||(ve==="small"||ve==="middle"?"small":void 0),wt=$e=>{const ae=$e==="left"?"start":$e==="right"?"end":$e;return S.createElement(i1,Object.assign({},Dt,{align:Dt.align||ae,className:gt(`${he}-pagination`,Dt.className),size:_e()}))},rt=Ce==="rtl"?"left":"right",Nt=Dt.position;if(Nt===null||!Array.isArray(Nt))return{bottom:wt(rt)};const sr=Nt.find($e=>typeof $e=="string"&&$e.toLowerCase().includes("top")),Nr=Nt.find($e=>typeof $e=="string"&&$e.toLowerCase().includes("bottom")),Q=Nt.every($e=>`${$e}`=="none"),gr=sr?sr.toLowerCase().replace("top",""):"",oe=Nr?Nr.toLowerCase().replace("bottom",""):"",ie=!sr&&!Nr&&!Q,Ne=()=>gr?wt(gr):void 0,ot=()=>{if(oe)return wt(oe);if(ie)return wt(rt)};return{top:Ne(),bottom:ot()}},dr=S.useMemo(()=>typeof A=="boolean"?{spinning:A}:typeof A=="object"&&A!==null?Object.assign({spinning:!0},A):void 0,[A]),It=gt(Me,Ee,`${he}-wrapper`,Se==null?void 0:Se.className,{[`${he}-wrapper-rtl`]:Ce==="rtl"},a,c,Ae),y=Object.assign(Object.assign({},Se==null?void 0:Se.style),u),D=S.useMemo(()=>dr!=null&&dr.spinning&&re===Md?null:typeof(Y==null?void 0:Y.emptyText)<"u"?Y.emptyText:(ue==null?void 0:ue("Table"))||S.createElement(r4,{componentName:"Table"}),[dr==null?void 0:dr.spinning,re,Y==null?void 0:Y.emptyText,ue]),Re=K?H5:K5,T={},J=S.useMemo(()=>{const{fontSize:_e,lineHeight:wt,lineWidth:rt,padding:Nt,paddingXS:sr,paddingSM:Nr}=be,Q=Math.floor(_e*wt);switch(ve){case"middle":return Nr*2+Q+rt;case"small":return sr*2+Q+rt;default:return Nt*2+Q+rt}},[be,ve]);K&&(T.listItemHeight=J);const{top:or,bottom:tt}=Rr();return De(S.createElement("div",{ref:Ie,className:It,style:y},S.createElement(a1,Object.assign({spinning:!1},dr),or,S.createElement(Re,Object.assign({},T,se,{ref:Ze,columns:R,direction:Ce,expandable:je,prefixCls:he,className:gt({[`${he}-middle`]:ve==="middle",[`${he}-small`]:ve==="small",[`${he}-bordered`]:d,[`${he}-empty`]:re.length===0},Me,Ee,Ae),data:Ut,rowKey:dt,rowClassName:jr,emptyText:D,internalHooks:Ja,internalRefs:it,transformColumns:Or,getContainerWidth:Te,measureRowRender:_e=>S.createElement(n4,{getPopupContainer:wt=>wt},_e)})),tt)))},l6=S.forwardRef(s6),u6=(e,t)=>{const r=S.useRef(0);return r.current+=1,S.createElement(l6,Object.assign({},e,{ref:t,_renderTimes:r.current}))},Yn=S.forwardRef(u6);Yn.SELECTION_COLUMN=eo;Yn.EXPAND_COLUMN=ro;Yn.SELECTION_ALL=c0;Yn.SELECTION_INVERT=d0;Yn.SELECTION_NONE=f0;Yn.Column=g3;Yn.ColumnGroup=v3;Yn.Summary=C1;var dn={},c6=Object.defineProperty,d6=(e,t,r)=>t in e?c6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mr=(e,t,r)=>d6(e,typeof t!="symbol"?t+"":t,r),gi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Od={exports:{}},ya={};/**
64
+ * @license React
65
+ * react-jsx-runtime.production.min.js
66
+ *
67
+ * Copyright (c) Facebook, Inc. and its affiliates.
68
+ *
69
+ * This source code is licensed under the MIT license found in the
70
+ * LICENSE file in the root directory of this source tree.
71
+ */var Rd;function f6(){if(Rd)return ya;Rd=1;var e=qe,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 c(u,f,d){var p,v={},g=null,x=null;d!==void 0&&(g=""+d),f.key!==void 0&&(g=""+f.key),f.ref!==void 0&&(x=f.ref);for(p in f)n.call(f,p)&&!a.hasOwnProperty(p)&&(v[p]=f[p]);if(u&&u.defaultProps)for(p in f=u.defaultProps,f)v[p]===void 0&&(v[p]=f[p]);return{$$typeof:t,type:u,key:g,ref:x,props:v,_owner:o.current}}return ya.Fragment=r,ya.jsx=c,ya.jsxs=c,ya}var $d;function h6(){return $d||($d=1,Od.exports=f6()),Od.exports}var H=h6();/*!
72
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
73
+ *
74
+ * Copyright (c) 2014-2017, Jon Schlinkert.
75
+ * Released under the MIT License.
76
+ */function Pd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vr(e){var t,r;return Pd(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Pd(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var U1=Symbol.for("immer-nothing"),zd=Symbol.for("immer-draftable"),fn=Symbol.for("immer-state");function En(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Pa=Object.getPrototypeOf;function Bo(e){return!!e&&!!e[fn]}function Fo(e){var t;return e?X1(e)||Array.isArray(e)||!!e[zd]||!!((t=e.constructor)!=null&&t[zd])||Qa(e)||ms(e):!1}var p6=Object.prototype.constructor.toString(),Id=new WeakMap;function X1(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=Id.get(r);return n===void 0&&(n=Function.toString.call(r),Id.set(r,n)),n===p6}function Gi(e,t,r=!0){ps(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 ps(e){const t=e[fn];return t?t.type_:Array.isArray(e)?1:Qa(e)?2:ms(e)?3:0}function b0(e,t){return ps(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Y1(e,t,r){const n=ps(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function m6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Qa(e){return e instanceof Map}function ms(e){return e instanceof Set}function vo(e){return e.copy_||e.base_}function y0(e,t){if(Qa(e))return new Map(e);if(ms(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=X1(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[fn];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const c=o[a],u=n[c];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[c]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[c]})}return Object.create(Pa(e),n)}else{const n=Pa(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function cu(e,t=!1){return gs(e)||Bo(e)||!Fo(e)||(ps(e)>1&&Object.defineProperties(e,{set:vi,add:vi,clear:vi,delete:vi}),Object.freeze(e),t&&Object.values(e).forEach(r=>cu(r,!0))),e}function g6(){En(2)}var vi={value:g6};function gs(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var v6={};function No(e){const t=v6[e];return t||En(0,e),t}var za;function G1(){return za}function b6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jd(e,t){t&&(No("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function x0(e){w0(e),e.drafts_.forEach(y6),e.drafts_=null}function w0(e){e===za&&(za=e.parent_)}function _d(e){return za=b6(za,e)}function y6(e){const t=e[fn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ld(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[fn].modified_&&(x0(t),En(4)),Fo(e)&&(e=Zi(t,e),t.parent_||Ji(t,e)),t.patches_&&No("Patches").generateReplacementPatches_(r[fn].base_,e,t.patches_,t.inversePatches_)):e=Zi(t,r,[]),x0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==U1?e:void 0}function Zi(e,t,r){if(gs(t))return t;const n=e.immer_.shouldUseStrictIteration(),o=t[fn];if(!o)return Gi(t,(a,c)=>Kd(e,o,t,a,c,r),n),t;if(o.scope_!==e)return t;if(!o.modified_)return Ji(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const a=o.copy_;let c=a,u=!1;o.type_===3&&(c=new Set(a),a.clear(),u=!0),Gi(c,(f,d)=>Kd(e,o,a,f,d,r,u),n),Ji(e,a,!1),r&&e.patches_&&No("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Kd(e,t,r,n,o,a,c){if(o==null||typeof o!="object"&&!c)return;const u=gs(o);if(!(u&&!c)){if(Bo(o)){const f=a&&t&&t.type_!==3&&!b0(t.assigned_,n)?a.concat(n):void 0,d=Zi(e,o,f);if(Y1(r,n,d),Bo(d))e.canAutoFreeze_=!1;else return}else c&&r.add(o);if(Fo(o)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===o&&u)return;Zi(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Qa(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Ji(e,o)}}}function Ji(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cu(t,r)}function x6(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:G1(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=du;r&&(o=[n],a=Ia);const{revoke:c,proxy:u}=Proxy.revocable(o,a);return n.draft_=u,n.revoke_=c,u}var du={get(e,t){if(t===fn)return e;const r=vo(e);if(!b0(r,t))return w6(e,r,t);const n=r[t];return e.finalized_||!Fo(n)?n:n===hl(e.base_,t)?(pl(e),e.copy_[t]=D0(n,e)):n},has(e,t){return t in vo(e)},ownKeys(e){return Reflect.ownKeys(vo(e))},set(e,t,r){const n=Z1(vo(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=hl(vo(e),t),a=o==null?void 0:o[fn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(m6(r,o)&&(r!==void 0||b0(e.base_,t)))return!0;pl(e),C0(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 hl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,pl(e),C0(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=vo(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){En(11)},getPrototypeOf(e){return Pa(e.base_)},setPrototypeOf(){En(12)}},Ia={};Gi(du,(e,t)=>{Ia[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ia.deleteProperty=function(e,t){return Ia.set.call(this,e,t,void 0)};Ia.set=function(e,t,r){return du.set.call(this,e[0],t,r,e[0])};function hl(e,t){const r=e[fn];return(r?vo(r):e)[t]}function w6(e,t,r){var o;const n=Z1(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function Z1(e,t){if(!(t in e))return;let r=Pa(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Pa(r)}}function C0(e){e.modified_||(e.modified_=!0,e.parent_&&C0(e.parent_))}function pl(e){e.copy_||(e.copy_=y0(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var C6=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 c=this;return function(u=a,...f){return c.produce(u,d=>r.call(this,d,...f))}}typeof r!="function"&&En(6),n!==void 0&&typeof n!="function"&&En(7);let o;if(Fo(t)){const a=_d(this),c=D0(t,void 0);let u=!0;try{o=r(c),u=!1}finally{u?x0(a):w0(a)}return jd(a,n),Ld(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===U1&&(o=void 0),this.autoFreeze_&&cu(o,!0),n){const a=[],c=[];No("Patches").generateReplacementPatches_(t,o,a,c),n(a,c)}return o}else En(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...c)=>this.produceWithPatches(a,u=>t(u,...c));let n,o;return[this.produce(t,r,(a,c)=>{n=a,o=c}),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){Fo(e)||En(8),Bo(e)&&(e=D6(e));const t=_d(this),r=D0(e,void 0);return r[fn].isManual_=!0,w0(t),r}finishDraft(e,t){const r=e&&e[fn];(!r||!r.isManual_)&&En(9);const{scope_:n}=r;return jd(n,t),Ld(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=No("Patches").applyPatches_;return Bo(e)?n(e,t):this.produce(e,o=>n(o,t))}};function D0(e,t){const r=Qa(e)?No("MapSet").proxyMap_(e,t):ms(e)?No("MapSet").proxySet_(e,t):x6(e,t);return(t?t.scope_:G1()).drafts_.push(r),r}function D6(e){return Bo(e)||En(10,e),J1(e)}function J1(e){if(!Fo(e)||gs(e))return e;const t=e[fn];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=y0(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=y0(e,!0);return Gi(r,(o,a)=>{Y1(r,o,J1(a))},n),t&&(t.finalized_=!1),r}var ja=new C6,fu=ja.produce,Hd=ja.createDraft.bind(ja),qd=ja.finishDraft.bind(ja),k6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=ne.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},E6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Lt.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},S6={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Be.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Qi=new WeakMap,es=new WeakMap,Fa=new WeakMap,Q1=new WeakMap,Wd=new WeakMap,Vd=new WeakMap,Ud=new WeakMap,ne={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=ne.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],c=t[r];return ne.equals(n,o)&&a>c},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return ne.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],c=t[r];return ne.equals(n,o)&&a<c},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 ne.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&ne.compare(e,t)===0},isBefore(e,t){return ne.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&ne.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&ne.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&ne.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&ne.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&&ne.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(!ne.isAncestor(t,e)&&!ne.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;(ne.equals(a,n)||ne.endsBefore(a,n)||ne.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:c}=t;if(ne.equals(c,n)||ne.isAncestor(c,n))return null;ne.endsBefore(c,n)&&(n[c.length-1]-=1);break}case"merge_node":{var{path:u,position:f}=t;ne.equals(u,n)||ne.endsBefore(u,n)?n[u.length-1]-=1:ne.isAncestor(u,n)&&(n[u.length-1]-=1,n[u.length]+=f);break}case"split_node":{var{path:d,position:p}=t;if(ne.equals(d,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else ne.endsBefore(d,n)?n[d.length-1]+=1:ne.isAncestor(d,n)&&e[d.length]>=p&&(n[d.length-1]+=1,n[d.length]-=p);break}case"move_node":{var{path:v,newPath:g}=t;if(ne.equals(v,g))return n;if(ne.isAncestor(v,n)||ne.equals(v,n)){var x=g.slice();return ne.endsBefore(v,g)&&v.length<g.length&&(x[v.length-1]-=1),x.concat(n.slice(v.length))}else ne.isSibling(v,g)&&(ne.isAncestor(g,n)||ne.equals(g,n))?ne.endsBefore(v,n)?n[v.length-1]-=1:n[v.length-1]+=1:ne.endsBefore(g,n)||ne.equals(g,n)||ne.isAncestor(g,n)?(ne.endsBefore(v,n)&&(n[v.length-1]-=1),n[g.length-1]+=1):ne.endsBefore(v,n)&&(ne.equals(g,n)&&(n[g.length-1]+=1),n[v.length-1]-=1);break}}return n}};function _a(e){"@babel/helpers - typeof";return _a=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},_a(e)}function A6(e,t){if(_a(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_a(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B6(e){var t=A6(e,"string");return _a(t)==="symbol"?t:String(t)}function tn(e,t,r){return t=B6(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xd(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?Xd(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var F6=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Je.parent(e,n),c=n[n.length-1];if(c>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(c,0,o),t)for(var[u,f]of Be.points(t))t[f]=Lt.transform(u,r);break}case"insert_text":{var{path:d,offset:p,text:v}=r;if(v.length===0)break;var g=Je.leaf(e,d),x=g.text.slice(0,p),w=g.text.slice(p);if(g.text=x+v+w,t)for(var[C,m]of Be.points(t))t[m]=Lt.transform(C,r);break}case"merge_node":{var{path:E}=r,N=Je.get(e,E),B=ne.previous(E),$=Je.get(e,B),A=Je.parent(e,E),_=E[E.length-1];if(ct.isText(N)&&ct.isText($))$.text+=N.text;else if(!ct.isText(N)&&!ct.isText($))$.children.push(...N.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(E,"] to nodes of different interfaces: ").concat(Kr.stringify(N)," ").concat(Kr.stringify($)));if(A.children.splice(_,1),t)for(var[P,q]of Be.points(t))t[q]=Lt.transform(P,r);break}case"move_node":{var{path:O,newPath:V}=r;if(ne.isAncestor(O,V))throw new Error("Cannot move a path [".concat(O,"] to new path [").concat(V,"] because the destination is inside itself."));var L=Je.get(e,O),Z=Je.parent(e,O),Y=O[O.length-1];Z.children.splice(Y,1);var j=ne.transform(O,r),K=Je.get(e,ne.parent(j)),U=j[j.length-1];if(K.children.splice(U,0,L),t)for(var[X,ee]of Be.points(t))t[ee]=Lt.transform(X,r);break}case"remove_node":{var{path:R}=r,se=R[R.length-1],ye=Je.parent(e,R);if(ye.children.splice(se,1),t)for(var[Ce,Se]of Be.points(t)){var ue=Lt.transform(Ce,r);if(t!=null&&ue!=null)t[Se]=ue;else{var Fe=void 0,G=void 0;for(var[ve,de]of Je.texts(e))if(ne.compare(de,R)===-1)Fe=[ve,de];else{G=[ve,de];break}var re=!1;Fe&&G&&(ne.equals(G[1],R)?re=!ne.hasPrevious(G[1]):re=ne.common(Fe[1],R).length<ne.common(G[1],R).length),Fe&&!re?(Ce.path=Fe[1],Ce.offset=Fe[0].text.length):G?(Ce.path=G[1],Ce.offset=0):t=null}}break}case"remove_text":{var{path:he,offset:we,text:be}=r;if(be.length===0)break;var Ee=Je.leaf(e,he),De=Ee.text.slice(0,we),Ae=Ee.text.slice(we+be.length);if(Ee.text=De+Ae,t)for(var[Me,je]of Be.points(t))t[je]=Lt.transform(Me,r);break}case"set_node":{var{path:Ve,properties:ht,newProperties:it}=r;if(Ve.length===0)throw new Error("Cannot set properties on the root node!");var Te=Je.get(e,Ve);for(var Ie in it){if(Ie==="children"||Ie==="text")throw new Error('Cannot set the "'.concat(Ie,'" property of nodes!'));var Ze=it[Ie];Ze==null?delete Te[Ie]:Te[Ie]=Ze}for(var dt in ht)it.hasOwnProperty(dt)||delete Te[dt];break}case"set_selection":{var{newProperties:at}=r;if(at==null)t=at;else{if(t==null){if(!Be.isRange(at))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Kr.stringify(at)," when there is no current selection."));t=xa({},at)}for(var et in at){var Tt=at[et];if(Tt==null){if(et==="anchor"||et==="focus")throw new Error('Cannot remove the "'.concat(et,'" selection property'));delete t[et]}else t[et]=Tt}}break}case"split_node":{var{path:xt,position:yt,properties:pt}=r;if(xt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(xt,"] because the root node cannot be split."));var ze=Je.get(e,xt),ce=Je.parent(e,xt),bt=xt[xt.length-1],Pt;if(ct.isText(ze)){var Vt=ze.text.slice(0,yt),$t=ze.text.slice(yt);ze.text=Vt,Pt=xa(xa({},pt),{},{text:$t})}else{var ir=ze.children.slice(0,yt),Ct=ze.children.slice(yt);ze.children=ir,Pt=xa(xa({},pt),{},{children:Ct})}if(ce.children.splice(bt+1,0,Pt),t)for(var[Mt,nr]of Be.points(t))t[nr]=Lt.transform(Mt,r);break}}return t},N6={transform(e,t){e.children=Hd(e.children);var r=e.selection&&Hd(e.selection);try{r=F6(e,r,t)}finally{e.children=qd(e.children),r?e.selection=Bo(r)?qd(r):r:e.selection=null}}},T6={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)}},M6={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)}},ep=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Vr(n)&&Vr(o)){if(!ep(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 c in t)if(e[c]===void 0&&t[c]!==void 0)return!1;return!0};function O6(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 Xn(e,t){if(e==null)return{};var r=O6(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 R6=["anchor","focus"];function Yd(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 $6(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Be={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return Be.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=Be.edges(e);return t},equals(e,t){return Lt.equals(e.anchor,t.anchor)&&Lt.equals(e.focus,t.focus)},includes(e,t){if(Be.isRange(t)){if(Be.includes(e,t.anchor)||Be.includes(e,t.focus))return!0;var[r,n]=Be.edges(e),[o,a]=Be.edges(t);return Lt.isBefore(r,o)&&Lt.isAfter(n,a)}var[c,u]=Be.edges(e),f=!1,d=!1;return Lt.isPoint(t)?(f=Lt.compare(t,c)>=0,d=Lt.compare(t,u)<=0):(f=ne.compare(t,c.path)>=0,d=ne.compare(t,u.path)<=0),f&&d},intersection(e,t){var r=Xn(e,R6),[n,o]=Be.edges(e),[a,c]=Be.edges(t),u=Lt.isBefore(n,a)?a:n,f=Lt.isBefore(o,c)?o:c;return Lt.isBefore(f,u)?null:$6({anchor:u,focus:f},r)},isBackward(e){var{anchor:t,focus:r}=e;return Lt.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Lt.equals(t,r)},isExpanded(e){return!Be.isCollapsed(e)},isForward(e){return!Be.isBackward(e)},isRange(e){return Vr(e)&&Lt.isPoint(e.anchor)&&Lt.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Be.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fu(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,c;if(o==="inward"){var u=Be.isCollapsed(n);Be.isForward(n)?(a="forward",c=u?a:"backward"):(a="backward",c=u?a:"forward")}else o==="outward"?Be.isForward(n)?(a="backward",c="forward"):(a="forward",c="backward"):(a=o,c=o);var f=Lt.transform(n.anchor,t,{affinity:a}),d=Lt.transform(n.focus,t,{affinity:c});if(!f||!d)return null;n.anchor=f,n.focus=d})}},Gd=e=>Vr(e)&&Je.isNodeList(e.children)&&!M.isEditor(e),ft={isAncestor(e){return Vr(e)&&Je.isNodeList(e.children)},isElement:Gd,isElementList(e){return Array.isArray(e)&&e.every(t=>ft.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 Gd(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},P6=["children"],z6=["text"],Zd=new WeakMap,Je={ancestor(e,t){var r=Je.get(e,t);if(ct.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Kr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ne.ancestors(t,r)){var o=Je.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(ct.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Kr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Kr.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=Je.ancestor(e,t),{children:a}=o,c=n?a.length-1:0;n?c>=0:c<a.length;){var u=Je.child(o,c),f=t.concat(c);yield[u,f],c=n?c-1:c+1}})()},common(e,t,r){var n=ne.common(t,r),o=Je.get(e,n);return[o,n]},descendant(e,t){var r=Je.get(e,t);if(M.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Kr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Je.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 Je.nodes(e,t))ft.isElement(r)&&(yield[r,n])})()},extractProps(e){if(ft.isAncestor(e)){var t=Xn(e,P6);return t}else{var t=Xn(e,z6);return t}},first(e,t){for(var r=t.slice(),n=Je.get(e,r);n&&!(ct.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(ct.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Kr.stringify(e)));var r=fu({children:e.children},n=>{var[o,a]=Be.edges(t),c=Je.nodes(n,{reverse:!0,pass:g=>{var[,x]=g;return!Be.includes(t,x)}});for(var[,u]of c){if(!Be.includes(t,u)){var f=Je.parent(n,u),d=u[u.length-1];f.children.splice(d,1)}if(ne.equals(u,a.path)){var p=Je.leaf(n,u);p.text=p.text.slice(0,a.offset)}if(ne.equals(u,o.path)){var v=Je.leaf(n,u);v.text=v.text.slice(o.offset)}}M.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(ct.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Kr.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(ct.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return ct.isText(e)||ft.isElement(e)||M.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Zd.get(e);if(t!==void 0)return t;var r=e.every(n=>Je.isNode(n));return Zd.set(e,r),r},last(e,t){for(var r=t.slice(),n=Je.get(e,r);n&&!(ct.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=Je.get(e,t);if(!ct.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Kr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ne.levels(t,r)){var o=Je.get(e,n);yield[o,n]}})()},matches(e,t){return ft.isElement(e)&&ft.isElementProps(t)&&ft.matches(e,t)||ct.isText(e)&&ct.isTextProps(t)&&ct.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,c=new Set,u=[],f=e;!(a&&(n?ne.isBefore(u,a):ne.isAfter(u,a)));){if(c.has(f)||(yield[f,u]),!c.has(f)&&!ct.isText(f)&&f.children.length!==0&&(r==null||r([f,u])===!1)){c.add(f);var d=n?f.children.length-1:0;ne.isAncestor(u,o)&&(d=o[u.length]),u=u.concat(d),f=Je.get(e,u);continue}if(u.length===0)break;if(!n){var p=ne.next(u);if(Je.has(e,p)){u=p,f=Je.get(e,u);continue}}if(n&&u[u.length-1]!==0){var v=ne.previous(u);u=v,f=Je.get(e,u);continue}u=ne.parent(u),f=Je.get(e,u),c.add(f)}})()},parent(e,t){var r=ne.parent(t),n=Je.get(e,r);if(ct.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 ct.isText(e)?e.text:e.children.map(Je.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Je.nodes(e,t))ct.isText(r)&&(yield[r,n])})()}};function Jd(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 Cr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Da={isNodeOperation(e){return Da.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Vr(e))return!1;switch(e.type){case"insert_node":return ne.isPath(e.path)&&Je.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ne.isPath(e.path);case"merge_node":return typeof e.position=="number"&&ne.isPath(e.path)&&Vr(e.properties);case"move_node":return ne.isPath(e.path)&&ne.isPath(e.newPath);case"remove_node":return ne.isPath(e.path)&&Je.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ne.isPath(e.path);case"set_node":return ne.isPath(e.path)&&Vr(e.properties)&&Vr(e.newProperties);case"set_selection":return e.properties===null&&Be.isRange(e.newProperties)||e.newProperties===null&&Be.isRange(e.properties)||Vr(e.properties)&&Vr(e.newProperties);case"split_node":return ne.isPath(e.path)&&typeof e.position=="number"&&Vr(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Da.isOperation(t))},isSelectionOperation(e){return Da.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Da.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Cr(Cr({},e),{},{type:"remove_node"});case"insert_text":return Cr(Cr({},e),{},{type:"remove_text"});case"merge_node":return Cr(Cr({},e),{},{type:"split_node",path:ne.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(ne.equals(t,r))return e;if(ne.isSibling(r,t))return Cr(Cr({},e),{},{path:t,newPath:r});var n=ne.transform(r,e),o=ne.transform(ne.next(r),e);return Cr(Cr({},e),{},{path:n,newPath:o})}case"remove_node":return Cr(Cr({},e),{},{type:"insert_node"});case"remove_text":return Cr(Cr({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:c}=e;return Cr(Cr({},e),{},{properties:c,newProperties:a})}case"set_selection":{var{properties:u,newProperties:f}=e;return u==null?Cr(Cr({},e),{},{properties:f,newProperties:null}):f==null?Cr(Cr({},e),{},{properties:null,newProperties:u}):Cr(Cr({},e),{},{properties:f,newProperties:u})}case"split_node":return Cr(Cr({},e),{},{type:"merge_node",path:ne.next(e.path)})}}},Qd=new WeakMap,I6=e=>{var t=Qd.get(e);if(t!==void 0)return t;if(!Vr(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||Vr(e.marks))&&(e.selection===null||Be.isRange(e.selection))&&Je.isNodeList(e.children)&&Da.isOperationList(e.operations);return Qd.set(e,r),r},M={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 I6(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)},j6={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(ne.isPath)}};function ef(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 tf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ef(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ef(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Lt={compare(e,t){var r=ne.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Lt.compare(e,t)===1},isBefore(e,t){return Lt.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&ne.equals(e.path,t.path)},isPoint(e){return Vr(e)&&typeof e.offset=="number"&&ne.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return fu(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:c}=n;switch(t.type){case"insert_node":case"move_node":{n.path=ne.transform(a,t,r);break}case"insert_text":{ne.equals(t.path,a)&&(t.offset<c||t.offset===c&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{ne.equals(t.path,a)&&(n.offset+=t.position),n.path=ne.transform(a,t,r);break}case"remove_text":{ne.equals(t.path,a)&&t.offset<=c&&(n.offset-=Math.min(c-t.offset,t.text.length));break}case"remove_node":{if(ne.equals(t.path,a)||ne.isAncestor(t.path,a))return null;n.path=ne.transform(a,t,r);break}case"split_node":{if(ne.equals(t.path,a)){if(t.position===c&&o==null)return null;(t.position<c||t.position===c&&o==="forward")&&(n.offset-=t.position,n.path=ne.transform(a,t,tf(tf({},r),{},{affinity:"forward"})))}else n.path=ne.transform(a,t,r);break}}})}},rf=void 0,Kr={setScrubber(e){rf=e},stringify(e){return JSON.stringify(e,rf)}},_6=["text"],L6=["anchor","focus"];function nf(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 Kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ct={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var c=Xn(a,_6);return c}return ep(n?o(e):e,n?o(t):t)},isText(e){return Vr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>ct.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=[Kn({},e)];for(var n of t){var o=Xn(n,L6),[a,c]=Be.edges(n),u=[],f=0,d=a.offset,p=c.offset;for(var v of r){var{length:g}=v.text,x=f;if(f+=g,d<=x&&f<=p){Object.assign(v,o),u.push(v);continue}if(d!==p&&(d===f||p===x)||d>f||p<x||p===x&&x!==0){u.push(v);continue}var w=v,C=void 0,m=void 0;if(p<f){var E=p-x;m=Kn(Kn({},w),{},{text:w.text.slice(E)}),w=Kn(Kn({},w),{},{text:w.text.slice(0,E)})}if(d>x){var N=d-x;C=Kn(Kn({},w),{},{text:w.text.slice(0,N)}),w=Kn(Kn({},w),{},{text:w.text.slice(N)})}Object.assign(w,o),C&&u.push(C),u.push(w),m&&u.push(m)}r=u}return r}},hu=e=>e.selection?e.selection:e.children.length>0?M.end(e,[]):[0],ua=(e,t)=>{var[r]=M.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?U6(e):e,o=Ft.None,a=Ft.None,c=0,u=null,f=null;for(var d of n){var p=d.codePointAt(0);if(!p)break;var v=av(d,p);if([o,a]=r?[a,v]:[v,o],Lo(o,Ft.ZWJ)&&Lo(a,Ft.ExtPict)&&(r?u=of(e.substring(0,c)):u=of(e.substring(0,e.length-c)),!u)||Lo(o,Ft.RI)&&Lo(a,Ft.RI)&&(f!==null?f=!f:r?f=!0:f=cv(e.substring(0,e.length-c)),!f)||o!==Ft.None&&a!==Ft.None&&sv(o,a))break;c+=d.length}return c||1},K6=/\s/,H6=/[\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]/,q6=/['\u2018\u2019]/,W6=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,c]=mu(e,o,t);if(V6(a,c,t))n=!0,r+=o;else if(!n)r+=o;else break;e=c}return r},mu=(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)]},V6=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(K6.test(t))return!1;if(q6.test(t)){var o=pu(r,n),[a,c]=mu(r,o,n);if(e(a,c,n))return!0}return!H6.test(t)},U6=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(Y6(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(X6(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},X6=e=>e>=55296&&e<=56319,Y6=e=>e>=56320&&e<=57343,Ft;(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"})(Ft||(Ft={}));var G6=/^(?:[\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])$/,Z6=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,J6=/^(?:[\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])$/,Q6=/^[\u1100-\u115F\uA960-\uA97C]$/,ev=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,tv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,rv=/^[\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]$/,nv=/^[\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]$/,ov=/^(?:[\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])$/,av=(e,t)=>{var r=Ft.Any;return e.search(G6)!==-1&&(r|=Ft.Extend),t===8205&&(r|=Ft.ZWJ),t>=127462&&t<=127487&&(r|=Ft.RI),e.search(Z6)!==-1&&(r|=Ft.Prepend),e.search(J6)!==-1&&(r|=Ft.SpacingMark),e.search(Q6)!==-1&&(r|=Ft.L),e.search(ev)!==-1&&(r|=Ft.V),e.search(tv)!==-1&&(r|=Ft.T),e.search(rv)!==-1&&(r|=Ft.LV),e.search(nv)!==-1&&(r|=Ft.LVT),e.search(ov)!==-1&&(r|=Ft.ExtPict),r};function Lo(e,t){return(e&t)!==0}var iv=[[Ft.L,Ft.L|Ft.V|Ft.LV|Ft.LVT],[Ft.LV|Ft.V,Ft.V|Ft.T],[Ft.LVT|Ft.T,Ft.T],[Ft.Any,Ft.Extend|Ft.ZWJ],[Ft.Any,Ft.SpacingMark],[Ft.Prepend,Ft.Any],[Ft.ZWJ,Ft.ExtPict],[Ft.RI,Ft.RI]];function sv(e,t){return iv.findIndex(r=>Lo(e,r[0])&&Lo(t,r[1]))===-1}var lv=/(?:[\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$/,of=e=>e.search(lv)!==-1,uv=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,cv=e=>{var t=e.match(uv);if(t===null)return!1;var r=t[0].length/2;return r%2===1},dv={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]:{};M.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=hu(e)}=r;if(ne.isPath(o)&&(o=M.range(e,o)),Be.isRange(o))if(Be.isCollapsed(o))o=o.anchor;else{var a=Be.end(o);if(!n&&M.void(e,{at:a}))return;var c=Be.start(o),u=M.pointRef(e,c),f=M.pointRef(e,a);Le.delete(e,{at:o,voids:n});var d=u.unref(),p=f.unref();o=d||p,Le.setSelection(e,{anchor:o,focus:o})}if(!(!n&&M.void(e,{at:o})||M.elementReadOnly(e,{at:o}))){var{path:v,offset:g}=o;t.length>0&&e.apply({type:"insert_text",path:v,offset:g,text:t})}})}};function af(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 bi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?af(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):af(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Le=bi(bi(bi(bi({},N6),T6),M6),dv),Ti=new WeakMap,fv=e=>Ti.get(e)||!1,hv=(e,t,r)=>{var n=Ti.get(e)||!1;Ti.set(e,!0);try{t(),r()}finally{Ti.set(e,n)}};function tp(e,t,r){var n=Qi.get(e)||[],o=es.get(e)||new Set,a,c,u=v=>{if(v){var g=v.join(",");c.has(g)||(c.add(g),a.push(v))}};if(r){a=[],c=new Set;for(var f of n){var d=r(f);u(d)}}else a=n,c=o;for(var p of t)u(p);Qi.set(e,a),es.set(e,c)}var pv=(e,t)=>{for(var r of M.pathRefs(e))k6.transform(r,t);for(var n of M.pointRefs(e))E6.transform(n,t);for(var o of M.rangeRefs(e))S6.transform(o,t);if(!fv(e)){var a=ne.operationCanTransformPath(t)?c=>ne.transform(c,t):void 0;tp(e,e.getDirtyPaths(t),a)}Le.transform(e,t),e.operations.push(t),M.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Fa.get(e)||(Fa.set(e,!0),Promise.resolve().then(()=>{Fa.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},mv=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return ne.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=ne.levels(o),c=ct.isText(n)?[]:Array.from(Je.nodes(n),V=>{var[,L]=V;return o.concat(L)});return[...a,...c]}case"merge_node":{var{path:u}=t,f=ne.ancestors(u),d=ne.previous(u);return[...f,d]}case"move_node":{var{path:p,newPath:v}=t;if(ne.equals(p,v))return[];var g=[],x=[];for(var w of ne.ancestors(p)){var C=ne.transform(w,t);g.push(C)}for(var m of ne.ancestors(v)){var E=ne.transform(m,t);x.push(E)}var N=x[x.length-1],B=v[v.length-1],$=N.concat(B);return[...g,...x,$]}case"remove_node":{var{path:A}=t,_=ne.ancestors(A);return[..._]}case"split_node":{var{path:P}=t,q=ne.levels(P),O=ne.next(P);return[...q,O]}default:return[]}},gv=e=>{var{selection:t}=e;return t?Je.fragment(e,t):[]},vv=(e,t)=>{var[r,n]=t;if(!ct.isText(r)){if(ft.isElement(r)&&r.children.length===0){var o={text:""};Le.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=M.isEditor(r)?!1:ft.isElement(r)&&(e.isInline(r)||r.children.length===0||ct.isText(r.children[0])||e.isInline(r.children[0])),c=0,u=0;u<r.children.length;u++,c++){var f=Je.get(e,n);if(!ct.isText(f)){var d=f.children[c],p=f.children[c-1],v=u===r.children.length-1,g=ct.isText(d)||ft.isElement(d)&&e.isInline(d);if(g!==a)Le.removeNodes(e,{at:n.concat(c),voids:!0}),c--;else if(ft.isElement(d)){if(e.isInline(d)){if(p==null||!ct.isText(p)){var x={text:""};Le.insertNodes(e,x,{at:n.concat(c),voids:!0}),c++}else if(v){var w={text:""};Le.insertNodes(e,w,{at:n.concat(c+1),voids:!0}),c++}}}else{if(!ct.isText(d)&&!("children"in d)){var C=d;C.children=[]}p!=null&&ct.isText(p)&&(ct.equals(d,p,{loose:!0})?(Le.mergeNodes(e,{at:n.concat(c),voids:!0}),c--):p.text===""?(Le.removeNodes(e,{at:n.concat(c-1),voids:!0}),c--):d.text===""&&(Le.removeNodes(e,{at:n.concat(c),voids:!0}),c--))}}}}},bv=(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},yv=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 c=M.path(e,o),u=n==="lowest";for(var[f,d]of M.levels(e,{at:c,voids:r,match:a,reverse:u}))if(!ct.isText(f)){if(Be.isRange(o)){if(ne.isAncestor(d,o.anchor.path)&&ne.isAncestor(d,o.focus.path))return[f,d]}else if(!ne.equals(c,d))return[f,d]}}};function sf(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 lf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var xv=(e,t,r)=>{var{selection:n}=e;if(n){var o=(v,g)=>{if(!ct.isText(v))return!1;var[x,w]=M.parent(e,g);return!e.isVoid(x)||e.markableVoid(x)},a=Be.isExpanded(n),c=!1;if(!a){var[u,f]=M.node(e,n);if(u&&o(u,f)){var[d]=M.parent(e,f);c=d&&e.markableVoid(d)}}if(a||c)Le.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var p=lf(lf({},M.marks(e)||{}),{},{[t]:r});e.marks=p,Fa.get(e)||e.onChange()}}};function uf(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 cf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var wv=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.point(e,t,{edge:"end"}),o=M.end(e,[]),a={anchor:n,focus:o},{distance:c=1}=r,u=0,f;for(var d of M.positions(e,cf(cf({},r),{},{at:a}))){if(u>c)break;u!==0&&(f=d),u++}return f};function df(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 ff(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?df(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Cv=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.start(e,[]),o=M.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:c=1}=r,u=0,f;for(var d of M.positions(e,ff(ff({},r),{},{at:a,reverse:!0}))){if(u>c)break;u!==0&&(f=d),u++}return f},Dv=(e,t)=>{var{selection:r}=e;r&&Be.isCollapsed(r)&&Le.delete(e,{unit:t,reverse:!0})},kv=(e,t)=>{var{selection:r}=e;r&&Be.isCollapsed(r)&&Le.delete(e,{unit:t})},Ev=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Be.isExpanded(r)&&Le.delete(e,{reverse:t==="backward"})},Sv=(e,t)=>[M.start(e,t),M.end(e,t)];function hf(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 pf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Av=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M.above(e,pf(pf({},t),{},{match:r=>ft.isElement(r)&&M.isElementReadOnly(e,r)}))},Bv=(e,t)=>M.point(e,t,{edge:"end"}),Fv=(e,t)=>{var r=M.path(e,t,{edge:"start"});return M.node(e,r)},Nv=(e,t)=>{var r=M.range(e,t);return Je.fragment(e,r)};function mf(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 gf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tv=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M.above(e,gf(gf({},t),{},{match:r=>ft.isElement(r)&&M.isVoid(e,r)}))},Mv=(e,t)=>t.children.some(r=>ft.isElement(r)&&M.isBlock(e,r)),Ov=(e,t)=>t.children.some(r=>ct.isText(r)||M.isInline(e,r)),Rv=(e,t)=>Je.has(e,t),$v=(e,t)=>t.children.every(r=>ct.isText(r)),Pv=e=>{Le.splitNodes(e,{always:!0})},zv=(e,t,r)=>{Le.insertNodes(e,t,r)},Iv=e=>{Le.splitNodes(e,{always:!0})};function vf(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 jv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _v=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=jv({text:t},o);Le.insertNodes(e,a,{at:r.at,voids:r.voids})}else Le.insertText(e,t,r);e.marks=null}},Lv=(e,t)=>!e.isInline(t),Kv=(e,t,r)=>M.isStart(e,t,r)||M.isEnd(e,t,r),Hv=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&ct.isText(n)&&n.text===""&&!e.isVoid(t)},qv=(e,t,r)=>{var n=M.end(e,r);return Lt.equals(t,n)},Wv=e=>{var t=Q1.get(e);return t===void 0?!0:t},Vv=(e,t,r)=>{if(t.offset!==0)return!1;var n=M.start(e,r);return Lt.equals(t,n)},Uv=(e,t)=>{var r=M.path(e,t,{edge:"end"});return M.node(e,r)},Xv=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.path(e,t,r),o=Je.leaf(e,n);return[o,n]};function Yv(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 c=[],u=M.path(e,r);for(var[f,d]of Je.levels(e,u))if(a(f,d)&&(c.push([f,d]),!o&&ft.isElement(f)&&M.isVoid(e,f)))break;n&&c.reverse(),yield*c}})()}var Gv=["text"],Zv=["text"],Jv=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(Be.isExpanded(r)){var a=M.isEnd(e,n,n.path);if(a){var c=M.after(e,n);c&&(n=c)}var[u]=M.nodes(e,{match:ct.isText,at:{anchor:n,focus:o}});if(u){var[f]=u,d=Xn(f,Gv);return d}else return{}}var{path:p}=n,[v]=M.leaf(e,p);if(n.offset===0){var g=M.previous(e,{at:p,match:ct.isText}),x=M.above(e,{match:B=>ft.isElement(B)&&M.isVoid(e,B)&&e.markableVoid(B)});if(!x){var w=M.above(e,{match:B=>ft.isElement(B)&&M.isBlock(e,B)});if(g&&w){var[C,m]=g,[,E]=w;ne.isAncestor(E,m)&&(v=C)}}}var N=Xn(v,Zv);return N},Qv=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 c=M.after(e,a,{voids:n});if(c){var[,u]=M.last(e,[]),f=[c.path,u];if(ne.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(ne.isPath(a)){var[d]=M.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=M.nodes(e,{at:f,match:o,mode:r,voids:n});return p}}},e7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.path(e,t,r),o=Je.get(e,n);return[o,n]};function t7(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:c=!1,ignoreNonSelectable:u=!1}=t,{match:f}=t;if(f||(f=()=>!0),!!r){var d,p;if(j6.isSpan(r))d=r[0],p=r[1];else{var v=M.path(e,r,{edge:"start"}),g=M.path(e,r,{edge:"end"});d=a?g:v,p=a?v:g}var x=Je.nodes(e,{reverse:a,from:d,to:p,pass:$=>{var[A]=$;return ft.isElement(A)?!!(!c&&(M.isVoid(e,A)||M.isElementReadOnly(e,A))||u&&!M.isSelectable(e,A)):!1}}),w=[],C;for(var[m,E]of x)if(!(u&&ft.isElement(m)&&!M.isSelectable(e,m))){var N=C&&ne.compare(E,C[1])===0;if(!(n==="highest"&&N)){if(!f(m,E)){if(o&&!N&&ct.isText(m))return;continue}if(n==="lowest"&&N){C=[m,E];continue}var B=n==="lowest"?C:[m,E];B&&(o?w.push(B):yield B),C=[m,E]}}n==="lowest"&&C&&(o?w.push(C):yield C),o&&(yield*w)}})()}var r7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=d=>Qi.get(d)||[],a=d=>es.get(d)||new Set,c=d=>{var p=o(d).pop(),v=p.join(",");return a(d).delete(v),p};if(M.isNormalizing(e)){if(r){var u=Array.from(Je.nodes(e),d=>{var[,p]=d;return p}),f=new Set(u.map(d=>d.join(",")));Qi.set(e,u),es.set(e,f)}o(e).length!==0&&M.withoutNormalizing(e,()=>{for(var d of o(e))if(Je.has(e,d)){var p=M.node(e,d),[v,g]=p;ft.isElement(v)&&v.children.length===0&&e.normalizeNode(p,{operation:n})}for(var x=o(e),w=x.length,C=0;x.length!==0;){if(!e.shouldNormalize({dirtyPaths:x,iteration:C,initialDirtyPathsLength:w,operation:n}))return;var m=c(e);if(Je.has(e,m)){var E=M.node(e,m);e.normalizeNode(E,{operation:n})}C++,x=o(e)}})}},n7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=M.path(e,t,r),o=ne.parent(n),a=M.node(e,o);return a},o7=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:c}=o,u=M.pathRefs(e);return u.delete(o),o.current=null,c}},a=M.pathRefs(e);return a.add(o),o},a7=e=>{var t=Wd.get(e);return t||(t=new Set,Wd.set(e,t)),t},i7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(ne.isPath(t)){if(o==="start"){var[,a]=Je.first(e,t);t=a}else if(o==="end"){var[,c]=Je.last(e,t);t=c}}return Be.isRange(t)&&(o==="start"?t=Be.start(t):o==="end"?t=Be.end(t):t=ne.common(t.anchor.path,t.focus.path)),Lt.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},s7=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:c}=o,u=M.pointRefs(e);return u.delete(o),o.current=null,c}},a=M.pointRefs(e);return a.add(o),o},l7=e=>{var t=Vd.get(e);return t||(t=new Set,Vd.set(e,t)),t},u7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(ne.isPath(t)){var o;if(n==="end"){var[,a]=Je.last(e,t);o=a}else{var[,c]=Je.first(e,t);o=c}var u=Je.get(e,o);if(!ct.isText(u))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"?u.text.length:0}}if(Be.isRange(t)){var[f,d]=Be.edges(t);return n==="start"?f:d}return t};function c7(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:c=!1}=t;if(!r)return;var u=M.range(e,r),[f,d]=Be.edges(u),p=o?d:f,v=!1,g="",x=0,w=0,C=0;for(var[m,E]of M.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:c})){if(ft.isElement(m)){if(!a&&(e.isVoid(m)||e.isElementReadOnly(m))){yield M.start(e,E);continue}if(e.isInline(m))continue;if(M.hasInlines(e,m)){var N=ne.isAncestor(E,d.path)?d:M.end(e,E),B=ne.isAncestor(E,f.path)?f:M.start(e,E);g=M.string(e,{anchor:B,focus:N},{voids:a}),v=!0}}if(ct.isText(m)){var $=ne.equals(E,p.path);for($?(w=o?p.offset:m.text.length-p.offset,C=p.offset):(w=m.text.length,C=o?w:0),($||v||n==="offset")&&(yield{path:E,offset:C},v=!1);;){if(x===0){if(g==="")break;x=A(g,n,o),g=mu(g,x,o)[1]}if(C=o?C-x:C+x,w=w-x,w<0){x=-w;break}x=0,yield{path:E,offset:C}}}}function A(_,P,q){return P==="character"?pu(_,q):P==="word"?W6(_,q):P==="line"||P==="block"?_.length:1}})()}var d7=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 c=M.before(e,a,{voids:n});if(c){var[,u]=M.first(e,[]),f=[c.path,u];if(ne.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(ne.isPath(a)){var[d]=M.parent(e,a);o=v=>d.children.includes(v)}else o=()=>!0;var[p]=M.nodes(e,{reverse:!0,at:f,match:o,mode:r,voids:n});return p}}},f7=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:c}=o,u=M.rangeRefs(e);return u.delete(o),o.current=null,c}},a=M.rangeRefs(e);return a.add(o),o},h7=e=>{var t=Ud.get(e);return t||(t=new Set,Ud.set(e,t)),t},p7=(e,t,r)=>{if(Be.isRange(t)&&!r)return t;var n=M.start(e,t),o=M.end(e,r||t);return{anchor:n,focus:o}};function bf(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 m7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var g7=(e,t)=>{var{selection:r}=e;if(r){var n=(p,v)=>{if(!ct.isText(p))return!1;var[g,x]=M.parent(e,v);return!e.isVoid(g)||e.markableVoid(g)},o=Be.isExpanded(r),a=!1;if(!o){var[c,u]=M.node(e,r);if(c&&n(c,u)){var[f]=M.parent(e,u);a=f&&e.markableVoid(f)}}if(o||a)Le.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=m7({},M.marks(e)||{});delete d[t],e.marks=d,Fa.get(e)||e.onChange()}}},v7=(e,t)=>{Q1.set(e,t)},b7=(e,t)=>M.point(e,t,{edge:"start"}),y7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=M.range(e,t),[a,c]=Be.edges(o),u="";for(var[f,d]of M.nodes(e,{at:o,match:ct.isText,voids:n})){var p=f.text;ne.equals(d,c.path)&&(p=p.slice(0,c.offset)),ne.equals(d,a.path)&&(p=p.slice(a.offset)),u+=p}return u},x7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=Be.edges(t);if(o.offset!==0||a.offset!==0||Be.isCollapsed(t)||ne.hasPrevious(a.path))return t;var c=M.above(e,{at:a,match:x=>ft.isElement(x)&&M.isBlock(e,x),voids:n}),u=c?c[1]:[],f=M.start(e,o),d={anchor:f,focus:a},p=!0;for(var[v,g]of M.nodes(e,{at:d,match:ct.isText,reverse:!0,voids:n})){if(p){p=!1;continue}if(v.text!==""||ne.isBefore(g,u)){a={path:g,offset:v.text.length};break}}return{anchor:o,focus:a}},w7=(e,t)=>{var r=M.isNormalizing(e);M.setNormalizing(e,!1);try{t()}finally{M.setNormalizing(e,r)}M.normalize(e)},C7=(e,t,r)=>{var[n,o]=t;return ft.isElement(n)&&M.isEmpty(e,n)||ct.isText(n)&&n.text===""&&o[o.length-1]!==0},D7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:c=1,voids:u=!1}=t,{at:f=e.selection,hanging:d=!1}=t;if(f){var p=!1;if(Be.isRange(f)&&Be.isCollapsed(f)&&(p=!0,f=f.anchor),Lt.isPoint(f)){var v=M.void(e,{at:f,mode:"highest"});if(!u&&v){var[,g]=v;f=g}else{var x={unit:a,distance:c},w=o?M.before(e,f,x)||M.start(e,[]):M.after(e,f,x)||M.end(e,[]);f={anchor:f,focus:w},d=!0}}if(ne.isPath(f)){Le.removeNodes(e,{at:f,voids:u});return}if(!Be.isCollapsed(f)){if(!d){var[,C]=Be.edges(f),m=M.end(e,[]);Lt.equals(C,m)||(f=M.unhangRange(e,f,{voids:u}))}var[E,N]=Be.edges(f),B=M.above(e,{match:Ee=>ft.isElement(Ee)&&M.isBlock(e,Ee),at:E,voids:u}),$=M.above(e,{match:Ee=>ft.isElement(Ee)&&M.isBlock(e,Ee),at:N,voids:u}),A=B&&$&&!ne.equals(B[1],$[1]),_=ne.equals(E.path,N.path),P=u?null:(r=M.void(e,{at:E,mode:"highest"}))!==null&&r!==void 0?r:M.elementReadOnly(e,{at:E,mode:"highest"}),q=u?null:(n=M.void(e,{at:N,mode:"highest"}))!==null&&n!==void 0?n:M.elementReadOnly(e,{at:N,mode:"highest"});if(P){var O=M.before(e,E);O&&B&&ne.isAncestor(B[1],O.path)&&(E=O)}if(q){var V=M.after(e,N);V&&$&&ne.isAncestor($[1],V.path)&&(N=V)}var L=[],Z;for(var Y of M.nodes(e,{at:f,voids:u})){var[j,K]=Y;Z&&ne.compare(K,Z)===0||(!u&&ft.isElement(j)&&(M.isVoid(e,j)||M.isElementReadOnly(e,j))||!ne.isCommon(K,E.path)&&!ne.isCommon(K,N.path))&&(L.push(Y),Z=K)}var U=Array.from(L,Ee=>{var[,De]=Ee;return M.pathRef(e,De)}),X=M.pointRef(e,E),ee=M.pointRef(e,N),R="";if(!_&&!P){var se=X.current,[ye]=M.leaf(e,se),{path:Ce}=se,{offset:Se}=E,ue=ye.text.slice(Se);ue.length>0&&(e.apply({type:"remove_text",path:Ce,offset:Se,text:ue}),R=ue)}if(U.reverse().map(Ee=>Ee.unref()).filter(Ee=>Ee!==null).forEach(Ee=>Le.removeNodes(e,{at:Ee,voids:u})),!q){var Fe=ee.current,[G]=M.leaf(e,Fe),{path:ve}=Fe,de=_?E.offset:0,re=G.text.slice(de,N.offset);re.length>0&&(e.apply({type:"remove_text",path:ve,offset:de,text:re}),R=re)}!_&&A&&ee.current&&X.current&&Le.mergeNodes(e,{at:ee.current,hanging:!0,voids:u}),p&&o&&a==="character"&&R.length>1&&R.match(/[\u0E00-\u0E7F]+/)&&Le.insertText(e,R.slice(0,R.length-c));var he=X.unref(),we=ee.unref(),be=o?he||we:we||he;t.at==null&&be&&Le.select(e,be)}}})},k7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=hu(e),batchDirty:c=!0}=r;if(t.length){if(Be.isRange(a))if(n||(a=M.unhangRange(e,a,{voids:o})),Be.isCollapsed(a))a=a.anchor;else{var[,u]=Be.edges(a);if(!o&&M.void(e,{at:u}))return;var f=M.pointRef(e,u);Le.delete(e,{at:a}),a=f.unref()}else ne.isPath(a)&&(a=M.start(e,a));if(!(!o&&M.void(e,{at:a}))){var d=M.above(e,{at:a,match:ue=>ft.isElement(ue)&&M.isInline(e,ue),mode:"highest",voids:o});if(d){var[,p]=d;if(M.isEnd(e,a,p)){var v=M.after(e,p);a=v}else if(M.isStart(e,a,p)){var g=M.before(e,p);a=g}}var x=M.above(e,{match:ue=>ft.isElement(ue)&&M.isBlock(e,ue),at:a,voids:o}),[,w]=x,C=M.isStart(e,a,w),m=M.isEnd(e,a,w),E=C&&m,N=!C||C&&m,B=!m,[,$]=Je.first({children:t},[]),[,A]=Je.last({children:t},[]),_=[],P=ue=>{var[Fe,G]=ue,ve=G.length===0;return ve?!1:E?!0:!(N&&ne.isAncestor(G,$)&&ft.isElement(Fe)&&!e.isVoid(Fe)&&!e.isInline(Fe)||B&&ne.isAncestor(G,A)&&ft.isElement(Fe)&&!e.isVoid(Fe)&&!e.isInline(Fe))};for(var q of Je.nodes({children:t},{pass:P}))P(q)&&_.push(q);var O=[],V=[],L=[],Z=!0,Y=!1;for(var[j]of _)ft.isElement(j)&&!e.isInline(j)?(Z=!1,Y=!0,V.push(j)):Z?O.push(j):L.push(j);var[K]=M.nodes(e,{at:a,match:ue=>ct.isText(ue)||M.isInline(e,ue),mode:"highest",voids:o}),[,U]=K,X=M.isStart(e,a,U),ee=M.isEnd(e,a,U),R=M.pathRef(e,m&&!L.length?ne.next(w):w),se=M.pathRef(e,ee?ne.next(U):U);Le.splitNodes(e,{at:a,match:ue=>Y?ft.isElement(ue)&&M.isBlock(e,ue):ct.isText(ue)||M.isInline(e,ue),mode:Y?"lowest":"highest",always:Y&&(!C||O.length>0)&&(!m||L.length>0),voids:o});var ye=M.pathRef(e,!X||X&&ee?ne.next(U):U);if(Le.insertNodes(e,O,{at:ye.current,match:ue=>ct.isText(ue)||M.isInline(e,ue),mode:"highest",voids:o,batchDirty:c}),E&&!O.length&&V.length&&!L.length&&Le.delete(e,{at:w,voids:o}),Le.insertNodes(e,V,{at:R.current,match:ue=>ft.isElement(ue)&&M.isBlock(e,ue),mode:"lowest",voids:o,batchDirty:c}),Le.insertNodes(e,L,{at:se.current,match:ue=>ct.isText(ue)||M.isInline(e,ue),mode:"highest",voids:o,batchDirty:c}),!r.at){var Ce;if(L.length>0&&se.current?Ce=ne.previous(se.current):V.length>0&&R.current?Ce=ne.previous(R.current):ye.current&&(Ce=ne.previous(ye.current)),Ce){var Se=M.end(e,Ce);Le.select(e,Se)}}ye.unref(),R.unref(),se.unref()}}})},E7=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")Le.select(e,n.anchor);else if(r==="focus")Le.select(e,n.focus);else if(r==="start"){var[o]=Be.edges(n);Le.select(e,o)}else if(r==="end"){var[,a]=Be.edges(n);Le.select(e,a)}}else return},S7=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},A7=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:c=null}=t;if(r){c==="start"&&(c=Be.isBackward(r)?"focus":"anchor"),c==="end"&&(c=Be.isBackward(r)?"anchor":"focus");var{anchor:u,focus:f}=r,d={distance:n,unit:o,ignoreNonSelectable:!0},p={};if(c==null||c==="anchor"){var v=a?M.before(e,u,d):M.after(e,u,d);v&&(p.anchor=v)}if(c==null||c==="focus"){var g=a?M.before(e,f,d):M.after(e,f,d);g&&(p.focus=g)}Le.setSelection(e,p)}},B7=(e,t)=>{var{selection:r}=e;if(t=M.range(e,t),r){Le.setSelection(e,t);return}if(!Be.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(Kr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function yf(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 xf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var F7=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=Be.isBackward(n)?"focus":"anchor"),o==="end"&&(o=Be.isBackward(n)?"anchor":"focus");var{anchor:a,focus:c}=n,u=o==="anchor"?a:c;Le.setSelection(e,{[o==="anchor"?"anchor":"focus"]:xf(xf({},u),t)})}},N7=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!Lt.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!Lt.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})}},T7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:c=!0}=r,{at:u,match:f,select:d}=r;if(Je.isNode(t)&&(t=[t]),t.length!==0){var[p]=t;if(u||(u=hu(e),d!==!1&&(d=!0)),d==null&&(d=!1),Be.isRange(u))if(n||(u=M.unhangRange(e,u,{voids:o})),Be.isCollapsed(u))u=u.anchor;else{var[,v]=Be.edges(u),g=M.pointRef(e,v);Le.delete(e,{at:u}),u=g.unref()}if(Lt.isPoint(u)){f==null&&(ct.isText(p)?f=O=>ct.isText(O):e.isInline(p)?f=O=>ct.isText(O)||M.isInline(e,O):f=O=>ft.isElement(O)&&M.isBlock(e,O));var[x]=M.nodes(e,{at:u.path,match:f,mode:a,voids:o});if(x){var[,w]=x,C=M.pathRef(e,w),m=M.isEnd(e,u,w);Le.splitNodes(e,{at:u,match:f,mode:a,voids:o});var E=C.unref();u=m?ne.next(E):E}else return}var N=ne.parent(u),B=u[u.length-1];if(!(!o&&M.void(e,{at:N}))){if(c){var $=[],A=ne.levels(N);hv(e,()=>{var O=function(){var L=N.concat(B);B++;var Z={type:"insert_node",path:L,node:V};e.apply(Z),u=ne.next(u),$.push(Z),ct.isText?A.push(...Array.from(Je.nodes(V),Y=>{var[,j]=Y;return L.concat(j)})):A.push(L)};for(var V of t)O()},()=>{tp(e,A,O=>{var V=O;for(var L of $)if(ne.operationCanTransformPath(L)&&(V=ne.transform(V,L),!V))return null;return V})})}else for(var _ of t){var P=N.concat(B);B++,e.apply({type:"insert_node",path:P,node:_}),u=ne.next(u)}if(u=ne.previous(u),d){var q=M.end(e,u);q&&Le.select(e,q)}}}})},M7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=ne.isPath(r)?ua(e,r):B=>ft.isElement(B)&&M.isBlock(e,B)),!!r){var c=M.nodes(e,{at:r,match:a,mode:n,voids:o}),u=Array.from(c,B=>{var[,$]=B;return M.pathRef(e,$)});for(var f of u){var d=f.unref();if(d.length<2)throw new Error("Cannot lift node at a path [".concat(d,"] because it has a depth of less than `2`."));var p=M.node(e,ne.parent(d)),[v,g]=p,x=d[d.length-1],{length:w}=v.children;if(w===1){var C=ne.next(g);Le.moveNodes(e,{at:d,to:C,voids:o}),Le.removeNodes(e,{at:g,voids:o})}else if(x===0)Le.moveNodes(e,{at:d,to:g,voids:o});else if(x===w-1){var m=ne.next(g);Le.moveNodes(e,{at:d,to:m,voids:o})}else{var E=ne.next(d),N=ne.next(g);Le.splitNodes(e,{at:E,voids:o}),Le.moveNodes(e,{at:d,to:N,voids:o})}}}})},O7=["text"],R7=["children"],rp=(e,t)=>{if(ft.isElement(t)){var r=t;return M.isVoid(e,t)?!0:r.children.length===1?rp(e,r.children[0]):!1}else return!M.isEditor(t)},$7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:c="lowest"}=t;if(n){if(r==null)if(ne.isPath(n)){var[u]=M.parent(e,n);r=O=>u.children.includes(O)}else r=O=>ft.isElement(O)&&M.isBlock(e,O);if(!o&&Be.isRange(n)&&(n=M.unhangRange(e,n,{voids:a})),Be.isRange(n))if(Be.isCollapsed(n))n=n.anchor;else{var[,f]=Be.edges(n),d=M.pointRef(e,f);Le.delete(e,{at:n}),n=d.unref(),t.at==null&&Le.select(e,n)}var[p]=M.nodes(e,{at:n,match:r,voids:a,mode:c}),v=M.previous(e,{at:n,match:r,voids:a,mode:c});if(!(!p||!v)){var[g,x]=p,[w,C]=v;if(!(x.length===0||C.length===0)){var m=ne.next(C),E=ne.common(x,C),N=ne.isSibling(x,C),B=Array.from(M.levels(e,{at:x}),O=>{var[V]=O;return V}).slice(E.length).slice(0,-1),$=M.above(e,{at:x,mode:"highest",match:O=>B.includes(O)&&rp(e,O)}),A=$&&M.pathRef(e,$[1]),_,P;if(ct.isText(g)&&ct.isText(w)){var q=Xn(g,O7);P=w.text.length,_=q}else if(ft.isElement(g)&&ft.isElement(w)){var q=Xn(g,R7);P=w.children.length,_=q}else throw new Error("Cannot merge the node at path [".concat(x,"] with the previous sibling because it is not the same kind: ").concat(Kr.stringify(g)," ").concat(Kr.stringify(w)));N||Le.moveNodes(e,{at:x,to:m,voids:a}),A&&Le.removeNodes(e,{at:A.current,voids:a}),M.shouldMergeNodesRemovePrevNode(e,v,p)?Le.removeNodes(e,{at:C,voids:a}):e.apply({type:"merge_node",path:m,position:P,properties:_}),A&&A.unref()}}}})},P7=(e,t)=>{M.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:c}=t;if(n){c==null&&(c=ne.isPath(n)?ua(e,n):x=>ft.isElement(x)&&M.isBlock(e,x));var u=M.pathRef(e,r),f=M.nodes(e,{at:n,match:c,mode:o,voids:a}),d=Array.from(f,x=>{var[,w]=x;return M.pathRef(e,w)});for(var p of d){var v=p.unref(),g=u.current;v.length!==0&&e.apply({type:"move_node",path:v,newPath:g}),u.current&&ne.isSibling(g,v)&&ne.isAfter(g,v)&&(u.current=ne.next(u.current))}u.unref()}})},z7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:c}=t;if(a){c==null&&(c=ne.isPath(a)?ua(e,a):g=>ft.isElement(g)&&M.isBlock(e,g)),!r&&Be.isRange(a)&&(a=M.unhangRange(e,a,{voids:n}));var u=M.nodes(e,{at:a,match:c,mode:o,voids:n}),f=Array.from(u,g=>{var[,x]=g;return M.pathRef(e,x)});for(var d of f){var p=d.unref();if(p){var[v]=M.node(e,p);e.apply({type:"remove_node",path:p,node:v})}}}})},I7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:c}=r,{hanging:u=!1,mode:f="lowest",split:d=!1,voids:p=!1}=r;if(o){if(n==null&&(n=ne.isPath(o)?ua(e,o):P=>ft.isElement(P)&&M.isBlock(e,P)),!u&&Be.isRange(o)&&(o=M.unhangRange(e,o,{voids:p})),d&&Be.isRange(o)){if(Be.isCollapsed(o)&&M.leaf(e,o.anchor)[0].text.length>0)return;var v=M.rangeRef(e,o,{affinity:"inward"}),[g,x]=Be.edges(o),w=f==="lowest"?"lowest":"highest",C=M.isEnd(e,x,x.path);Le.splitNodes(e,{at:x,match:n,mode:w,voids:p,always:!C});var m=M.isStart(e,g,g.path);Le.splitNodes(e,{at:g,match:n,mode:w,voids:p,always:!m}),o=v.unref(),r.at==null&&Le.select(e,o)}a||(a=(P,q)=>P!==q);for(var[E,N]of M.nodes(e,{at:o,match:n,mode:f,voids:p})){var B={},$={};if(N.length!==0){var A=!1;for(var _ in t)_==="children"||_==="text"||a(t[_],E[_])&&(A=!0,E.hasOwnProperty(_)&&(B[_]=E[_]),c?t[_]!=null&&($[_]=c(E[_],t[_])):t[_]!=null&&($[_]=t[_]));A&&e.apply({type:"set_node",path:N,properties:B,newProperties:$})}}}})},j7=(e,t)=>{if(Be.isCollapsed(t))return t.anchor;var[,r]=Be.edges(t),n=M.pointRef(e,r);return Le.delete(e,{at:t}),n.unref()},_7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:c=0,always:u=!1}=t;if(o==null&&(o=ee=>ft.isElement(ee)&&M.isBlock(e,ee)),Be.isRange(a)&&(a=j7(e,a)),ne.isPath(a)){var f=a,d=M.point(e,f),[p]=M.parent(e,f);o=ee=>ee===p,c=d.path.length-f.length+1,a=d,u=!0}if(a){var v=M.pointRef(e,a,{affinity:"backward"}),g;try{var[x]=M.nodes(e,{at:a,match:o,mode:r,voids:n});if(!x)return;var w=M.void(e,{at:a,mode:"highest"}),C=0;if(!n&&w){var[m,E]=w;if(ft.isElement(m)&&e.isInline(m)){var N=M.after(e,E);if(!N){var B={text:""},$=ne.next(E);Le.insertNodes(e,B,{at:$,voids:n}),N=M.point(e,$)}a=N,u=!0}var A=a.path.length-E.length;c=A+1,u=!0}g=M.pointRef(e,a);var _=a.path.length-c,[,P]=x,q=a.path.slice(0,_),O=c===0?a.offset:a.path[_]+C;for(var[V,L]of M.levels(e,{at:q,reverse:!0,voids:n})){var Z=!1;if(L.length<P.length||L.length===0||!n&&ft.isElement(V)&&M.isVoid(e,V))break;var Y=v.current,j=M.isEnd(e,Y,L);if(u||!v||!M.isEdge(e,Y,L)){Z=!0;var K=Je.extractProps(V);e.apply({type:"split_node",path:L,position:O,properties:K})}O=L[L.length-1]+(Z||j?1:0)}if(t.at==null){var U=g.current||M.end(e,[]);Le.select(e,U)}}finally{var X;v.unref(),(X=g)===null||X===void 0||X.unref()}}})},L7=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;Le.setNodes(e,n,r)},K7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:c}=t;if(a){c==null&&(c=ne.isPath(a)?ua(e,a):g=>ft.isElement(g)&&M.isBlock(e,g)),ne.isPath(a)&&(a=M.range(e,a));var u=Be.isRange(a)?M.rangeRef(e,a):null,f=M.nodes(e,{at:a,match:c,mode:r,voids:o}),d=Array.from(f,g=>{var[,x]=g;return M.pathRef(e,x)}).reverse(),p=function(){var g=v.unref(),[x]=M.node(e,g),w=M.range(e,g);n&&u&&(w=Be.intersection(u.current,w)),Le.liftNodes(e,{at:w,match:C=>ft.isAncestor(x)&&x.children.includes(C),voids:o})};for(var v of d)p();u&&u.unref()}})};function wf(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 Cf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wf(Object(r),!0).forEach(function(n){tn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var H7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};M.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:c,at:u=e.selection}=r;if(u){if(c==null&&(ne.isPath(u)?c=ua(e,u):e.isInline(t)?c=w=>ft.isElement(w)&&M.isInline(e,w)||ct.isText(w):c=w=>ft.isElement(w)&&M.isBlock(e,w)),o&&Be.isRange(u)){var[f,d]=Be.edges(u),p=M.rangeRef(e,u,{affinity:"inward"});Le.splitNodes(e,{at:d,match:c,voids:a}),Le.splitNodes(e,{at:f,match:c,voids:a}),u=p.unref(),r.at==null&&Le.select(e,u)}var v=Array.from(M.nodes(e,{at:u,match:e.isInline(t)?w=>ft.isElement(w)&&M.isBlock(e,w):w=>M.isEditor(w),mode:"lowest",voids:a})),g=function(){var w=Be.isRange(u)?Be.intersection(u,M.range(e,x)):u;if(!w)return 0;var C=Array.from(M.nodes(e,{at:w,match:c,mode:n,voids:a}));if(C.length>0){var[m]=C,E=C[C.length-1],[,N]=m,[,B]=E;if(N.length===0&&B.length===0)return 0;var $=ne.equals(N,B)?ne.parent(N):ne.common(N,B),A=M.range(e,N,B),_=M.node(e,$),[P]=_,q=$.length+1,O=ne.next(B.slice(0,q)),V=Cf(Cf({},t),{},{children:[]});Le.insertNodes(e,V,{at:O,voids:a}),Le.moveNodes(e,{at:A,match:L=>ft.isAncestor(P)&&P.children.includes(L),to:O.concat(0),voids:a})}};for(var[,x]of v)g()}})},q7=()=>{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 pv(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xv(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dv(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kv(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ev(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gv(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pv(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Iv(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k7(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zv(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _v(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vv(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g7(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mv(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bv(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yv(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wv(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cv(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E7(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D7(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S7(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sv(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Av(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bv(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fv(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nv(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jv(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mv(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ov(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Rv(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $v(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return T7(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lv(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kv(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hv(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qv(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wv(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vv(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uv(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xv(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yv(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M7(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $7(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A7(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P7(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qv(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e7(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return t7(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r7(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return n7(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i7(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o7(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a7(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return u7(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s7(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l7(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c7(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d7(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p7(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f7(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h7(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return z7(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B7(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I7(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v7(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F7(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N7(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _7(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b7(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y7(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x7(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L7(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return K7(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tv(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w7(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return H7(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C7(e,...r)}};return e},ml,Df;function W7(){if(Df)return ml;Df=1,ml=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 ml}var V7=W7();const np=hs(V7);var gl,kf;function gu(){if(kf)return gl;kf=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return gl=e,gl}var vl,Ef;function U7(){if(Ef)return vl;Ef=1;var e=typeof gi=="object"&&gi&&gi.Object===Object&&gi;return vl=e,vl}var bl,Sf;function op(){if(Sf)return bl;Sf=1;var e=U7(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return bl=r,bl}var yl,Af;function X7(){if(Af)return yl;Af=1;var e=op(),t=function(){return e.Date.now()};return yl=t,yl}var xl,Bf;function Y7(){if(Bf)return xl;Bf=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return xl=t,xl}var wl,Ff;function G7(){if(Ff)return wl;Ff=1;var e=Y7(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return wl=r,wl}var Cl,Nf;function ap(){if(Nf)return Cl;Nf=1;var e=op(),t=e.Symbol;return Cl=t,Cl}var Dl,Tf;function Z7(){if(Tf)return Dl;Tf=1;var e=ap(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(c){var u=r.call(c,o),f=c[o];try{c[o]=void 0;var d=!0}catch{}var p=n.call(c);return d&&(u?c[o]=f:delete c[o]),p}return Dl=a,Dl}var kl,Mf;function J7(){if(Mf)return kl;Mf=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return kl=r,kl}var El,Of;function Q7(){if(Of)return El;Of=1;var e=ap(),t=Z7(),r=J7(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function c(u){return u==null?u===void 0?o:n:a&&a in Object(u)?t(u):r(u)}return El=c,El}var Sl,Rf;function e8(){if(Rf)return Sl;Rf=1;function e(t){return t!=null&&typeof t=="object"}return Sl=e,Sl}var Al,$f;function t8(){if($f)return Al;$f=1;var e=Q7(),t=e8(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return Al=n,Al}var Bl,Pf;function r8(){if(Pf)return Bl;Pf=1;var e=G7(),t=gu(),r=t8(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;function f(d){if(typeof d=="number")return d;if(r(d))return n;if(t(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=t(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=e(d);var v=a.test(d);return v||c.test(d)?u(d.slice(2),v?2:8):o.test(d)?n:+d}return Bl=f,Bl}var Fl,zf;function ip(){if(zf)return Fl;zf=1;var e=gu(),t=X7(),r=r8(),n="Expected a function",o=Math.max,a=Math.min;function c(u,f,d){var p,v,g,x,w,C,m=0,E=!1,N=!1,B=!0;if(typeof u!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(E=!!d.leading,N="maxWait"in d,g=N?o(r(d.maxWait)||0,f):g,B="trailing"in d?!!d.trailing:B);function $(Y){var j=p,K=v;return p=v=void 0,m=Y,x=u.apply(K,j),x}function A(Y){return m=Y,w=setTimeout(q,f),E?$(Y):x}function _(Y){var j=Y-C,K=Y-m,U=f-j;return N?a(U,g-K):U}function P(Y){var j=Y-C,K=Y-m;return C===void 0||j>=f||j<0||N&&K>=g}function q(){var Y=t();if(P(Y))return O(Y);w=setTimeout(q,_(Y))}function O(Y){return w=void 0,B&&p?$(Y):(p=v=void 0,x)}function V(){w!==void 0&&clearTimeout(w),m=0,p=C=v=w=void 0}function L(){return w===void 0?x:O(t())}function Z(){var Y=t(),j=P(Y);if(p=arguments,v=this,C=Y,j){if(w===void 0)return A(C);if(N)return clearTimeout(w),w=setTimeout(q,f),$(C)}return w===void 0&&(w=setTimeout(q,f)),x}return Z.cancel=V,Z.flush=L,Z}return Fl=c,Fl}var n8=ip();const o8=hs(n8);var Nl,If;function a8(){if(If)return Nl;If=1;var e=ip(),t=gu(),r="Expected a function";function n(o,a,c){var u=!0,f=!0;if(typeof o!="function")throw new TypeError(r);return t(c)&&(u="leading"in c?!!c.leading:u,f="trailing"in c?!!c.trailing:f),e(o,a,{leading:u,maxWait:a,trailing:f})}return Nl=n,Nl}var i8=a8();const s8=hs(i8),jf=e=>typeof e=="object"&&e!=null&&e.nodeType===1,_f=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",yi=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return _f(r.overflowY,t)||_f(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},xi=(e,t,r,n,o,a,c,u)=>a<e&&c>t||a>e&&c<t?0:a<=e&&u<=r||c>=t&&u>=r?a-e-n:c>t&&u<r||a<e&&u>r?c-t+o:0,l8=e=>e.parentElement??(e.getRootNode().host||null),Lf=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:p}=t,v=typeof d=="function"?d:U=>U!==d;if(!jf(e))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,x=[];let w=e;for(;jf(w)&&v(w);){if(w=l8(w),w===g){x.push(w);break}w!=null&&w===document.body&&yi(w)&&!yi(document.documentElement)||w!=null&&yi(w,p)&&x.push(w)}const C=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,m=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:E,scrollY:N}=window,{height:B,width:$,top:A,right:_,bottom:P,left:q}=e.getBoundingClientRect(),{top:O,right:V,bottom:L,left:Z}=(U=>{const X=window.getComputedStyle(U);return{top:parseFloat(X.scrollMarginTop)||0,right:parseFloat(X.scrollMarginRight)||0,bottom:parseFloat(X.scrollMarginBottom)||0,left:parseFloat(X.scrollMarginLeft)||0}})(e);let Y=u==="start"||u==="nearest"?A-O:u==="end"?P+L:A+B/2-O+L,j=f==="center"?q+$/2-Z+V:f==="end"?_+V:q-Z;const K=[];for(let U=0;U<x.length;U++){const X=x[U],{height:ee,width:R,top:se,right:ye,bottom:Ce,left:Se}=X.getBoundingClientRect();if(c==="if-needed"&&A>=0&&q>=0&&P<=m&&_<=C&&(X===g&&!yi(X)||A>=se&&P<=Ce&&q>=Se&&_<=ye))return K;const ue=getComputedStyle(X),Fe=parseInt(ue.borderLeftWidth,10),G=parseInt(ue.borderTopWidth,10),ve=parseInt(ue.borderRightWidth,10),de=parseInt(ue.borderBottomWidth,10);let re=0,he=0;const we="offsetWidth"in X?X.offsetWidth-X.clientWidth-Fe-ve:0,be="offsetHeight"in X?X.offsetHeight-X.clientHeight-G-de:0,Ee="offsetWidth"in X?X.offsetWidth===0?0:R/X.offsetWidth:0,De="offsetHeight"in X?X.offsetHeight===0?0:ee/X.offsetHeight:0;if(g===X)re=u==="start"?Y:u==="end"?Y-m:u==="nearest"?xi(N,N+m,m,G,de,N+Y,N+Y+B,B):Y-m/2,he=f==="start"?j:f==="center"?j-C/2:f==="end"?j-C:xi(E,E+C,C,Fe,ve,E+j,E+j+$,$),re=Math.max(0,re+N),he=Math.max(0,he+E);else{re=u==="start"?Y-se-G:u==="end"?Y-Ce+de+be:u==="nearest"?xi(se,Ce,ee,G,de+be,Y,Y+B,B):Y-(se+ee/2)+be/2,he=f==="start"?j-Se-Fe:f==="center"?j-(Se+R/2)+we/2:f==="end"?j-ye+ve+we:xi(Se,ye,R,Fe,ve+we,j,j+$,$);const{scrollLeft:Ae,scrollTop:Me}=X;re=De===0?0:Math.max(0,Math.min(Me+re/De,X.scrollHeight-ee/De+be)),he=Ee===0?0:Math.max(0,Math.min(Ae+he/Ee,X.scrollWidth-R/Ee+we)),Y+=Me-re,j+=Ae-he}K.push({el:X,top:re,left:he})}return K},u8=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function c8(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(Lf(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:c}of Lf(e,u8(t))){const u=a-r.top+r.bottom,f=c-r.left+r.right;o.scroll({top:u,left:f,behavior:n})}}var Co=[],d8=function(){return Co.some(function(e){return e.activeTargets.length>0})},f8=function(){return Co.some(function(e){return e.skippedTargets.length>0})},Kf="ResizeObserver loop completed with undelivered notifications.",h8=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Kf}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Kf),window.dispatchEvent(e)},La;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(La||(La={}));var Do=function(e){return Object.freeze(e)},p8=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Do(this)}return e})(),sp=(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,Do(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,c=t.bottom,u=t.left,f=t.width,d=t.height;return{x:r,y:n,top:o,right:a,bottom:c,left:u,width:f,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),vu=function(e){return e instanceof SVGElement&&"getBBox"in e},lp=function(e){if(vu(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,c=o.offsetHeight;return!(a||c||e.getClientRects().length)},Hf=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)},m8=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},Na=typeof window<"u"?window:{},wi=new WeakMap,qf=/auto|scroll/,g8=/^tb|vertical/,v8=/msie|trident/i.test(Na.navigator&&Na.navigator.userAgent),On=function(e){return parseFloat(e||"0")},Uo=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new p8((r?t:e)||0,(r?e:t)||0)},Wf=Do({devicePixelContentBoxSize:Uo(),borderBoxSize:Uo(),contentBoxSize:Uo(),contentRect:new sp(0,0,0,0)}),up=function(e,t){if(t===void 0&&(t=!1),wi.has(e)&&!t)return wi.get(e);if(lp(e))return wi.set(e,Wf),Wf;var r=getComputedStyle(e),n=vu(e)&&e.ownerSVGElement&&e.getBBox(),o=!v8&&r.boxSizing==="border-box",a=g8.test(r.writingMode||""),c=!n&&qf.test(r.overflowY||""),u=!n&&qf.test(r.overflowX||""),f=n?0:On(r.paddingTop),d=n?0:On(r.paddingRight),p=n?0:On(r.paddingBottom),v=n?0:On(r.paddingLeft),g=n?0:On(r.borderTopWidth),x=n?0:On(r.borderRightWidth),w=n?0:On(r.borderBottomWidth),C=n?0:On(r.borderLeftWidth),m=v+d,E=f+p,N=C+x,B=g+w,$=u?e.offsetHeight-B-e.clientHeight:0,A=c?e.offsetWidth-N-e.clientWidth:0,_=o?m+N:0,P=o?E+B:0,q=n?n.width:On(r.width)-_-A,O=n?n.height:On(r.height)-P-$,V=q+m+A+N,L=O+E+$+B,Z=Do({devicePixelContentBoxSize:Uo(Math.round(q*devicePixelRatio),Math.round(O*devicePixelRatio),a),borderBoxSize:Uo(V,L,a),contentBoxSize:Uo(q,O,a),contentRect:new sp(v,f,q,O)});return wi.set(e,Z),Z},cp=function(e,t,r){var n=up(e,r),o=n.borderBoxSize,a=n.contentBoxSize,c=n.devicePixelContentBoxSize;switch(t){case La.DEVICE_PIXEL_CONTENT_BOX:return c;case La.BORDER_BOX:return o;default:return a}},b8=(function(){function e(t){var r=up(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Do([r.borderBoxSize]),this.contentBoxSize=Do([r.contentBoxSize]),this.devicePixelContentBoxSize=Do([r.devicePixelContentBoxSize])}return e})(),dp=function(e){if(lp(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},y8=function(){var e=1/0,t=[];Co.forEach(function(a){if(a.activeTargets.length!==0){var c=[];a.activeTargets.forEach(function(u){var f=new b8(u.target),d=dp(u.target);c.push(f),u.lastReportedSize=cp(u.target,u.observedBox),d<e&&(e=d)}),t.push(function(){a.callback.call(a.observer,c,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},Vf=function(e){Co.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(dp(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},x8=function(){var e=0;for(Vf(e);d8();)e=y8(),Vf(e);return f8()&&h8(),e>0},Tl,fp=[],w8=function(){return fp.splice(0).forEach(function(e){return e()})},C8=function(e){if(!Tl){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return w8()}).observe(r,n),Tl=function(){r.textContent="".concat(t?t--:t++)}}fp.push(e),Tl()},D8=function(e){C8(function(){requestAnimationFrame(e)})},Mi=0,k8=function(){return!!Mi},E8=250,S8={attributes:!0,characterData:!0,childList:!0,subtree:!0},Uf=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Xf=function(e){return e===void 0&&(e=0),Date.now()+e},Ml=!1,A8=(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=E8),!Ml){Ml=!0;var n=Xf(t);D8(function(){var o=!1;try{o=x8()}finally{if(Ml=!1,t=n-Xf(),!k8())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,S8)};document.body?r():Na.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Uf.forEach(function(r){return Na.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Uf.forEach(function(r){return Na.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),k0=new A8,Yf=function(e){!Mi&&e>0&&k0.start(),Mi+=e,!Mi&&k0.stop()},B8=function(e){return!vu(e)&&!m8(e)&&getComputedStyle(e).display==="inline"},F8=(function(){function e(t,r){this.target=t,this.observedBox=r||La.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=cp(this.target,this.observedBox,!0);return B8(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),N8=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ci=new WeakMap,Gf=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},Di=(function(){function e(){}return e.connect=function(t,r){var n=new N8(t,r);Ci.set(t,n)},e.observe=function(t,r,n){var o=Ci.get(t),a=o.observationTargets.length===0;Gf(o.observationTargets,r)<0&&(a&&Co.push(o),o.observationTargets.push(new F8(r,n&&n.box)),Yf(1),k0.schedule())},e.unobserve=function(t,r){var n=Ci.get(t),o=Gf(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&Co.splice(Co.indexOf(n),1),n.observationTargets.splice(o,1),Yf(-1))},e.disconnect=function(t){var r=this,n=Ci.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),T8=(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.");Di.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(!Hf(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Di.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(!Hf(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Di.unobserve(this,t)},e.prototype.disconnect=function(){Di.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Dn={},Zf;function M8(){if(Zf)return Dn;Zf=1,Object.defineProperty(Dn,"__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(g,x,w){x&&!("byKey"in x)&&(w=x,x=null),Array.isArray(g)||(g=[g]);var C=g.map(function(N){return f(N,x)}),m=function(N){return C.some(function(B){return d(B,N)})},E=w==null?m:m(w);return E}function c(g,x){return a(g,x)}function u(g,x){return a(g,{byKey:!0},x)}function f(g,x){var w=x&&x.byKey,C={};g=g.replace("++","+add");var m=g.split("+"),E=m.length;for(var N in t)C[t[N]]=!1;var B=!0,$=!1,A=void 0;try{for(var _=m[Symbol.iterator](),P;!(B=(P=_.next()).done);B=!0){var q=P.value,O=q.endsWith("?")&&q.length>1;O&&(q=q.slice(0,-1));var V=v(q),L=t[V];if(q.length>1&&!L&&!r[q]&&!n[V])throw new TypeError('Unknown modifier: "'+q+'"');(E===1||!L)&&(w?C.key=V:C.which=p(q)),L&&(C[L]=O?null:!0)}}catch(Z){$=!0,A=Z}finally{try{!B&&_.return&&_.return()}finally{if($)throw A}}return C}function d(g,x){for(var w in g){var C=g[w],m=void 0;if(C!=null&&(w==="key"&&x.key!=null?m=x.key.toLowerCase():w==="which"?m=C===91&&x.which===93?91:x.which:m=x[w],!(m==null&&C===!1)&&m!==C))return!1}return!0}function p(g){g=v(g);var x=n[g]||g.toUpperCase().charCodeAt(0);return x}function v(g){return g=g.toLowerCase(),g=r[g]||g,g}return Dn.default=a,Dn.isHotkey=a,Dn.isCodeHotkey=c,Dn.isKeyHotkey=u,Dn.parseHotkey=f,Dn.compareHotkey=d,Dn.toKeyCode=p,Dn.toKeyName=v,Dn}var Ol=M8();function O8(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 Jo(e,t){if(e==null)return{};var r=O8(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 Ka(e){"@babel/helpers - typeof";return Ka=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},Ka(e)}function R8(e,t){if(Ka(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ka(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $8(e){var t=R8(e,"string");return Ka(t)==="symbol"?t:String(t)}function yn(e,t,r){return t=$8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var bu=po(null),mo=()=>{var e=ho(bu);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},Rl,$l,hp=parseInt(qe.version.split(".")[0],10),pp=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Jf=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Jr=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Ko=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),bo=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),P8=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),mp=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),z8=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),I8=Jr&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),j8=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),_8=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),L8=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Oi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(Rl=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Rl!==void 0&&Rl[1]&&parseInt(($l=navigator.userAgent.match(/Version\/(\d+)/))===null||$l===void 0?void 0:$l[1],10)<17;var Qn=(!z8||!I8)&&!P8&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Xo=new WeakMap,yu=new WeakMap,xu=new WeakMap,gp=new WeakMap,Ri=new WeakMap,E0=new WeakMap,Ha=new WeakMap,ko=new WeakMap,ts=new WeakMap,vs=new WeakMap,S0=new WeakMap,so=new WeakMap,yo=new WeakMap,Ta=new WeakMap,A0=new WeakMap,wu=new WeakMap,Sn=new WeakMap,Wn=new WeakMap,an=new WeakMap,no=new WeakMap,oo=new WeakMap,vp=new WeakMap,Qo=Symbol("placeholder"),bp=Symbol("mark-placeholder"),yp=globalThis.Node,K8=globalThis.Text,Cu=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,H8=e=>fo(e)&&e.nodeType===8,bn=e=>fo(e)&&e.nodeType===1,fo=e=>{var t=Cu(e);return!!t&&e instanceof t.Node},B0=e=>{var t=e&&e.anchorNode&&Cu(e.anchorNode);return!!t&&e instanceof t.Selection},xp=e=>fo(e)&&e.nodeType===3,q8=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,W8=e=>{var[t,r]=e;if(bn(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=wp(t,o,n?"backward":"forward"),n=o<r;bn(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=U8(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},V8=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},wp=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,c=!1,u=!1;(H8(o)||bn(o)&&o.childNodes.length===0||bn(o)&&o.getAttribute("contenteditable")==="false")&&!(c&&u);){if(a>=n.length){c=!0,a=t-1,r="backward";continue}if(a<0){u=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},U8=(e,t,r)=>{var[n]=wp(e,t,r);return n},Cp=e=>{var t="";if(xp(e)&&e.nodeValue)return e.nodeValue;if(bn(e)){for(var r of Array.from(e.childNodes))t+=Cp(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
77
+ `)}return t},X8=/data-slate-fragment="(.+?)"/m,Y8=e=>{var t=e.getData("text/html"),[,r]=t.match(X8)||[];return r},Ma=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Du=(e,t,r)=>{var{target:n}=t;if(bn(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=Oe.getWindow(e);if(o.contains(n))return Oe.hasDOMNode(e,n,{editable:!0});var a=r.find(c=>{var{addedNodes:u,removedNodes:f}=c;for(var d of u)if(d===n||d.contains(n))return!0;for(var p of f)if(p===n||p.contains(n))return!0});return!a||a===t?!1:Du(e,a,r)},G8=()=>{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},Qf=(e,t)=>!!(e.compareDocumentPosition(t)&yp.DOCUMENT_POSITION_PRECEDING),Z8=(e,t)=>!!(e.compareDocumentPosition(t)&yp.DOCUMENT_POSITION_FOLLOWING),J8=0;class Q8{constructor(){yn(this,"id",void 0),this.id="".concat(J8++)}}var Oe={androidPendingDiffs:e=>an.get(e),androidScheduleFlush:e=>{var t;(t=wu.get(e))===null||t===void 0||t()},blur:e=>{var t=Oe.toDOMNode(e,e),r=Oe.findDocumentOrShadowRoot(e);so.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=Oe.findDocumentOrShadowRoot(e),n=Ma(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Le.deselect(e)},findDocumentOrShadowRoot:e=>{var t=Oe.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=Oe.toSlateNode(e,t.target),c=Oe.findPath(e,a);if(ft.isElement(a)&&M.isVoid(e,a)){var u=o.getBoundingClientRect(),f=e.isInline(a)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,d=M.point(e,c,{edge:f?"start":"end"}),p=f?M.before(e,d):M.after(e,d);if(p){var v=M.range(e,p);return v}}var g,{document:x}=Oe.getWindow(e);if(x.caretRangeFromPoint)g=x.caretRangeFromPoint(r,n);else{var w=x.caretPositionFromPoint(r,n);w&&(g=x.createRange(),g.setStart(w.offsetNode,w.offset),g.setEnd(w.offsetNode,w.offset))}if(!g)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var C=Oe.toSlateRange(e,g,{exactMatch:!1,suppressThrow:!1});return C},findKey:(e,t)=>{var r=ts.get(t);return r||(r=new Q8,ts.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=xu.get(n);if(o==null){if(M.isEditor(n))return r;break}var a=yu.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Kr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!so.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(()=>{Oe.focus(e,{retries:t.retries-1})},10);return}var r=Oe.toDOMNode(e,e),n=Oe.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Ma(n),a=Oe.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||Le.select(e,M.start(e,[])),so.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=gp.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=Oe.toDOMNode(e,e),a;try{a=bn(t)?t:t.parentElement}catch(c){if(c instanceof Error&&!c.message.includes('Permission denied to access property "nodeType"'))throw c}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)=>fo(t)&&Oe.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return M.hasPath(e,r.path)&&M.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>Oe.hasEditableTarget(e,t)||Oe.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>fo(t)&&Oe.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!yo.get(e),isFocused:e=>!!so.get(e),isReadOnly:e=>!!S0.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(S0.get(e))return!1;var r=Oe.hasTarget(e,t)&&Oe.toSlateNode(e,t);return ft.isElement(r)&&M.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=vs.get(e),n=M.isEditor(t)?Ri.get(e):r==null?void 0:r.get(Oe.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Kr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=M.node(e,t.path),n=Oe.toDOMNode(e,r),o;M.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",c=Array.from(n.querySelectorAll(a)),u=0,f=0;f<c.length;f++){var d=c[f],p=d.childNodes[0];if(!(p==null||p.textContent==null)){var{length:v}=p.textContent,g=d.getAttribute("data-slate-length"),x=g==null?v:parseInt(g,10),w=u+x,C=c[f+1];if(t.offset===w&&C!==null&&C!==void 0&&C.hasAttribute("data-slate-mark-placeholder")){var m,E=C.childNodes[0];o=[E instanceof K8?E:C,(m=C.textContent)!==null&&m!==void 0&&m.startsWith("\uFEFF")?1:0];break}if(t.offset<=w){var N=Math.min(v,Math.max(0,t.offset-u));o=[p,N];break}u=w}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Kr.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=Be.isBackward(t),a=Oe.toDOMPoint(e,r),c=Be.isCollapsed(t)?a:Oe.toDOMPoint(e,n),u=Oe.getWindow(e),f=u.document.createRange(),[d,p]=o?c:a,[v,g]=o?a:c,x=bn(d)?d:d.parentElement,w=!!x.getAttribute("data-slate-zero-width"),C=bn(v)?v:v.parentElement,m=!!C.getAttribute("data-slate-zero-width");return f.setStart(d,w?1:p),f.setEnd(v,m?1:g),f},toSlateNode:(e,t)=>{var r=bn(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Ha.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,[c,u]=n?t:W8(t),f=c.parentNode,d=null,p=0;if(f){var v,g,x=Oe.toDOMNode(e,e),w=f.closest('[data-slate-void="true"]'),C=w&&x.contains(w)?w:null,m=f.closest('[contenteditable="false"]'),E=m&&x.contains(m)?m:null,N=f.closest("[data-slate-leaf]"),B=null;if(N){if(d=N.closest('[data-slate-node="text"]'),d){var $=Oe.getWindow(e),A=$.document.createRange();A.setStart(d,0),A.setEnd(c,u);var _=A.cloneContents(),P=[...Array.prototype.slice.call(_.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(_.querySelectorAll("[contenteditable=false]"))];P.forEach(Se=>{if(Jr&&!n&&Se.hasAttribute("data-slate-zero-width")&&Se.textContent.length>0&&Se.textContext!=="\uFEFF"){Se.textContent.startsWith("\uFEFF")&&(Se.textContent=Se.textContent.slice(1));return}Se.parentNode.removeChild(Se)}),p=_.textContent.length,B=d}}else if(C){for(var q=C.querySelectorAll("[data-slate-leaf]"),O=0;O<q.length;O++){var V=q[O];if(Oe.hasDOMNode(e,V)){N=V;break}}N?(d=N.closest('[data-slate-node="text"]'),B=N,p=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(Se=>{p-=Se.textContent.length})):p=1}else if(E){var L=Se=>Se?Se.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],Z=E.closest('[data-slate-node="element"]');if(a==="forward"){var Y,j=[...L(Z),...L(Z==null?void 0:Z.nextElementSibling)];N=(Y=j.find(Se=>Z8(E,Se)))!==null&&Y!==void 0?Y:null}else{var K,U=[...L(Z==null?void 0:Z.previousElementSibling),...L(Z)];N=(K=U.findLast(Se=>Qf(E,Se)))!==null&&K!==void 0?K:null}N&&(d=N.closest('[data-slate-node="text"]'),B=N,a==="forward"?p=0:(p=B.textContent.length,B.querySelectorAll("[data-slate-zero-width]").forEach(Se=>{p-=Se.textContent.length})))}B&&p===B.textContent.length&&Jr&&B.getAttribute("data-slate-zero-width")==="z"&&(v=B.textContent)!==null&&v!==void 0&&v.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||Ko&&(g=B.textContent)!==null&&g!==void 0&&g.endsWith(`
78
+
79
+ `))&&p--}if(Jr&&!d&&!n){var X=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(X&&Oe.hasDOMNode(e,X,{editable:!0})){var ee=Oe.toSlateNode(e,X),{path:R,offset:se}=M.start(e,Oe.findPath(e,ee));return X.querySelector("[data-slate-leaf]")||(se=u),{path:R,offset:se}}}if(!d){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var ye=Oe.toSlateNode(e,d),Ce=Oe.findPath(e,ye);return{path:Ce,offset:p}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,c=B0(t)?t.anchorNode:t.startContainer,u,f,d,p,v;if(c)if(B0(t)){if(Ko&&t.rangeCount>1){d=t.focusNode;var g=t.getRangeAt(0),x=t.getRangeAt(t.rangeCount-1);if(d instanceof HTMLTableRowElement&&g.startContainer instanceof HTMLTableRowElement&&x.startContainer instanceof HTMLTableRowElement){let _=function(P){return P.childElementCount>0?_(P.children[0]):P};var w=g.startContainer,C=x.startContainer,m=_(w.children[g.startOffset]),E=_(C.children[x.startOffset]);p=0,E.childNodes.length>0?u=E.childNodes[0]:u=E,m.childNodes.length>0?d=m.childNodes[0]:d=m,E instanceof HTMLElement?f=E.innerHTML.length:f=0}else g.startContainer===d?(u=x.endContainer,f=x.endOffset,p=g.startOffset):(u=g.startContainer,f=g.endOffset,p=x.startOffset)}else u=t.anchorNode,f=t.anchorOffset,d=t.focusNode,p=t.focusOffset;mp&&V8(u)||Ko?v=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:v=t.isCollapsed}else u=t.startContainer,f=t.startOffset,d=t.endContainer,p=t.endOffset,v=t.collapsed;if(u==null||d==null||f==null||p==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Ko&&(n=d.textContent)!==null&&n!==void 0&&n.endsWith(`
80
+
81
+ `)&&p===d.textContent.length&&p--;var N=Oe.toSlatePoint(e,[u,f],{exactMatch:o,suppressThrow:a});if(!N)return null;var B=Qf(u,d)||u===d&&p<f,$=v?N:Oe.toSlatePoint(e,[d,p],{exactMatch:o,suppressThrow:a,searchDirection:B?"forward":"backward"});if(!$)return null;var A={anchor:N,focus:$};return Be.isExpanded(A)&&Be.isForward(A)&&bn(d)&&M.void(e,{at:A.focus,mode:"highest"})&&(A=M.unhangRange(e,A,{voids:!0})),A}};function eb(e,t){var{path:r,diff:n}=t;if(!M.hasPath(e,r))return!1;var o=Je.get(e,r);if(!ct.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=ne.next(r);if(!M.hasPath(e,a))return!1;var c=Je.get(e,a);return ct.isText(c)&&c.text.startsWith(n.text)}function Dp(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 tb(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 rb(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 kp(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),c=tb(a,o),u=Math.min(a.length-c,o.length-c),f=rb(a,o,u),d={start:r+c,end:n-f,text:o.slice(c,o.length-f)};return d.start===d.end&&d.text.length===0?null:d}function nb(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=Dp(e,t,r),c=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),u=a.slice(n,c),f=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return kp(e,{start:n,end:f,text:u})}function ob(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function F0(e,t){var{path:r,offset:n}=t;if(!M.hasPath(e,r))return null;var o=Je.get(e,r);if(!ct.isText(o))return null;var a=M.above(e,{match:u=>ft.isElement(u)&&M.isBlock(e,u),at:r});if(!a)return null;for(;n>o.text.length;){var c=M.next(e,{at:r,match:ct.isText});if(!c||!ne.isDescendant(c[1],a[1]))return null;n-=o.text.length,o=c[0],r=c[1]}return{path:r,offset:n}}function eh(e,t){var r=F0(e,t.anchor);if(!r)return null;if(Be.isCollapsed(t))return{anchor:r,focus:r};var n=F0(e,t.focus);return n?{anchor:r,focus:n}:null}function N0(e,t,r){var n=an.get(e),o=n==null?void 0:n.find(p=>{var{path:v}=p;return ne.equals(v,t.path)});if(!o||t.offset<=o.diff.start)return Lt.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var c={path:t.path,offset:a.start},u=Lt.transform(c,r,{affinity:"backward"});return u?{path:u.path,offset:u.offset+t.offset-a.start}:null}var f={path:t.path,offset:t.offset-a.text.length+a.end-a.start},d=Lt.transform(f,r,{affinity:"backward"});return d?r.type==="split_node"&&ne.equals(r.path,t.path)&&f.offset<r.position&&a.start<r.position?d:{path:d.path,offset:d.offset+a.text.length-a.end+a.start}:null}function th(e,t,r){var n=N0(e,t.anchor,r);if(!n)return null;if(Be.isCollapsed(t))return{anchor:n,focus:n};var o=N0(e,t.focus,r);return o?{anchor:n,focus:o}:null}function ab(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!ne.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!ne.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!ne.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:ne.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:ne.transform(r,t,{affinity:"forward"})};case"merge_node":return ne.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:ne.transform(r,t)}:{diff:n,id:o,path:ne.transform(r,t)}}var a=ne.transform(r,t);return a?{diff:n,path:a,id:o}:null}function rh(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 ki(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ib=25,sb=200,lb=function(){},ub=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function cb(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,c=null,u=null,f=0,d=!1,p=()=>{var Z=oo.get(t);if(oo.delete(t),Z){var{selection:Y}=t,j=eh(t,Z);j&&(!Y||!Be.equals(j,Y))&&Le.select(t,j)}},v=()=>{var Z=no.get(t);if(no.delete(t),!!Z){if(Z.at){var Y=Lt.isPoint(Z.at)?F0(t,Z.at):eh(t,Z.at);if(!Y)return;var j=M.range(t,Y);(!t.selection||!Be.equals(t.selection,j))&&Le.select(t,Y)}Z.run()}},g=()=>{if(c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),!$()&&!B()){p();return}o||(o=!0,setTimeout(()=>o=!1)),B()&&(o="action");var Z=t.selection&&M.rangeRef(t,t.selection,{affinity:"forward"});Wn.set(t,t.marks),lb("flush",no.get(t),an.get(t));for(var Y=$(),j;j=(K=an.get(t))===null||K===void 0?void 0:K[0];){var K,U,X=Sn.get(t);X!==void 0&&(Sn.delete(t),t.marks=X),X&&d===!1&&(d=null);var ee=ob(j);(!t.selection||!Be.equals(t.selection,ee))&&Le.select(t,ee),j.diff.text?M.insertText(t,j.diff.text):M.deleteFragment(t),an.set(t,(U=an.get(t))===null||U===void 0?void 0:U.filter(ye=>{var{id:Ce}=ye;return Ce!==j.id})),eb(t,j)||(Y=!1,no.delete(t),Wn.delete(t),o="action",oo.delete(t),r.cancel(),n.cancel(),Z==null||Z.unref())}var R=Z==null?void 0:Z.unref();if(R&&!oo.get(t)&&(!t.selection||!Be.equals(R,t.selection))&&Le.select(t,R),B()){v();return}Y&&r(),r.flush(),n.flush(),p();var se=Wn.get(t);Wn.delete(t),se!==void 0&&(t.marks=se,t.onChange())},x=Z=>{a&&clearTimeout(a),a=setTimeout(()=>{yo.set(t,!1),g()},ib)},w=Z=>{yo.set(t,!0),a&&(clearTimeout(a),a=null)},C=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Y=E0.get(t);if(Y){if($()||Z){Y.style.display="none";return}Y.style.removeProperty("display")}},m=(Z,Y)=>{var j,K=(j=an.get(t))!==null&&j!==void 0?j:[];an.set(t,K);var U=Je.leaf(t,Z),X=K.findIndex(se=>ne.equals(se.path,Z));if(X<0){var ee=kp(U.text,Y);ee&&K.push({path:Z,diff:Y,id:f++}),C();return}var R=nb(U.text,K[X].diff,Y);if(!R){K.splice(X,1),C();return}K[X]=ki(ki({},K[X]),{},{diff:R})},E=function(Z){var{at:Y}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,oo.delete(t),r.cancel(),n.cancel(),B()&&g(),no.set(t,{at:Y,run:Z}),u=setTimeout(g)},N=Z=>{var Y;if(c&&(clearTimeout(c),c=null),!Xo.get(t)){var{inputType:j}=Z,K=null,U=Z.dataTransfer||Z.data||void 0;d!==!1&&j!=="insertText"&&j!=="insertCompositionText"&&(d=!1);var[X]=Z.getTargetRanges();X&&(K=Oe.toSlateRange(t,X,{exactMatch:!1,suppressThrow:!0}));var ee=Oe.getWindow(t),R=ee.getSelection();if(!K&&R&&(X=R,K=Oe.toSlateRange(t,R,{exactMatch:!1,suppressThrow:!0})),K=(Y=K)!==null&&Y!==void 0?Y:t.selection,!!K){var se=!0;if(j.startsWith("delete")){if(Be.isExpanded(K)){var[ye,Ce]=Be.edges(K),Se=Je.leaf(t,ye.path);if(Se.text.length===ye.offset&&Ce.offset===0){var ue=M.next(t,{at:ye.path,match:ct.isText});ue&&ne.equals(ue[1],Ce.path)&&(K={anchor:Ce,focus:Ce})}}var Fe=j.endsWith("Backward")?"backward":"forward",[G,ve]=Be.edges(K),[de,re]=M.leaf(t,G.path),he={text:"",start:G.offset,end:ve.offset},we=an.get(t),be=we==null?void 0:we.find(xt=>ne.equals(xt.path,re)),Ee=be?[be.diff,he]:[he],De=Dp(de.text,...Ee);if(De.length===0&&(se=!1),Be.isExpanded(K)){if(se&&ne.equals(K.anchor.path,K.focus.path)){var Ae={path:K.anchor.path,offset:G.offset},Me=M.range(t,Ae,Ae);return P(Me),m(K.anchor.path,{text:"",end:ve.offset,start:G.offset})}return E(()=>M.deleteFragment(t,{direction:Fe}),{at:K})}}switch(j){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return E(()=>M.deleteFragment(t),{at:K});case"deleteContent":case"deleteContentForward":{var{anchor:je}=K;if(se&&Be.isCollapsed(K)){var Ve=Je.leaf(t,je.path);if(je.offset<Ve.text.length)return m(je.path,{text:"",start:je.offset,end:je.offset+1})}return E(()=>M.deleteForward(t),{at:K})}case"deleteContentBackward":{var ht,{anchor:it}=K,Te=B0(X)?X.isCollapsed:!!((ht=X)!==null&&ht!==void 0&&ht.collapsed);return se&&Te&&Be.isCollapsed(K)&&it.offset>0?m(it.path,{text:"",start:it.offset-1,end:it.offset}):E(()=>M.deleteBackward(t),{at:K})}case"deleteEntireSoftLine":return E(()=>{M.deleteBackward(t,{unit:"line"}),M.deleteForward(t,{unit:"line"})},{at:K});case"deleteHardLineBackward":return E(()=>M.deleteBackward(t,{unit:"block"}),{at:K});case"deleteSoftLineBackward":return E(()=>M.deleteBackward(t,{unit:"line"}),{at:K});case"deleteHardLineForward":return E(()=>M.deleteForward(t,{unit:"block"}),{at:K});case"deleteSoftLineForward":return E(()=>M.deleteForward(t,{unit:"line"}),{at:K});case"deleteWordBackward":return E(()=>M.deleteBackward(t,{unit:"word"}),{at:K});case"deleteWordForward":return E(()=>M.deleteForward(t,{unit:"word"}),{at:K});case"insertLineBreak":return E(()=>M.insertSoftBreak(t),{at:K});case"insertParagraph":return E(()=>M.insertBreak(t),{at:K});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(ub(U))return E(()=>Oe.insertData(t,U),{at:K});var Ie=U??"";if(Sn.get(t)&&(Ie=Ie.replace("\uFEFF","")),j==="insertText"&&/.*\n.*\n$/.test(Ie)&&(Ie=Ie.slice(0,-1)),Ie.includes(`
82
+ `))return E(()=>{var xt=Ie.split(`
83
+ `);xt.forEach((yt,pt)=>{yt&&M.insertText(t,yt),pt!==xt.length-1&&M.insertSoftBreak(t)})},{at:K});if(ne.equals(K.anchor.path,K.focus.path)){var[Ze,dt]=Be.edges(K),at={start:Ze.offset,end:dt.offset,text:Ie};if(Ie&&d&&j==="insertCompositionText"){var et=d.start+d.text.search(/\S|$/),Tt=at.start+at.text.search(/\S|$/);Tt===et+1&&at.end===d.start+d.text.length?(at.start-=1,d=null,V()):d=!1}else j==="insertText"?d===null?d=at:d&&Be.isCollapsed(K)&&d.end+d.text.length===Ze.offset?d=ki(ki({},d),{},{text:d.text+Ie}):d=!1:d=!1;if(se){m(Ze.path,at);return}}return E(()=>M.insertText(t,Ie),{at:K})}}}}},B=()=>!!no.get(t),$=()=>{var Z;return!!((Z=an.get(t))!==null&&Z!==void 0&&Z.length)},A=()=>B()||$(),_=()=>o,P=Z=>{oo.set(t,Z),c&&(clearTimeout(c),c=null);var{selection:Y}=t;if(Z){var j=!Y||!ne.equals(Y.anchor.path,Z.anchor.path),K=!Y||!ne.equals(Y.anchor.path.slice(0,-1),Z.anchor.path.slice(0,-1));(j&&d||K)&&(d=!1),(j||$())&&(c=setTimeout(g,sb))}},q=()=>{(B()||!$())&&g()},O=Z=>{$()||(C(!0),setTimeout(C))},V=()=>{B()||(u=setTimeout(g))},L=Z=>{if(!($()||B())&&Z.some(j=>Du(t,j,Z))){var Y;(Y=vp.get(t))===null||Y===void 0||Y()}};return{flush:g,scheduleFlush:V,hasPendingDiffs:$,hasPendingAction:B,hasPendingChanges:A,isFlushing:_,handleUserSelect:P,handleCompositionEnd:x,handleCompositionStart:w,handleDOMBeforeInput:N,handleKeyDown:O,handleDomMutations:L,handleInput:q}}function db(){var e=Yt(!1);return Jt(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var qa=Oi?xg:Jt;function fb(e,t,r){var[n]=At(()=>new MutationObserver(t));qa(()=>{n.takeRecords()}),Jt(()=>{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 hb=["node"];function nh(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 pb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nh(Object(r),!0).forEach(function(n){yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mb={subtree:!0,childList:!0,characterData:!0},gb=Jr?e=>{var{node:t}=e,r=Jo(e,hb);if(!Jr)return null;var n=mo(),o=db(),[a]=At(()=>cb(pb({editor:n},r)));return fb(t,a.handleDomMutations,mb),wu.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,vb=["anchor","focus"],bb=["anchor","focus"],yb=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),Ep=(e,t)=>{var r=Jo(e,vb),n=Jo(t,bb);return e[Qo]===t[Qo]&&yb(r,n)},xb=(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(!Be.equals(n,o)||!Ep(n,o))return!1}return!0},wb=(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||!Ep(n,o))return!1}return!0};function oh(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 Cb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oh(Object(r),!0).forEach(function(n){yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Db=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=mo(),c=Oe.findPath(a,o),u=ne.parent(c),f=!!r[bp];return a.isVoid(n)?qe.createElement(Pl,{length:Je.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&M.string(a,u)===""?qe.createElement(Pl,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?qe.createElement(Pl,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
84
+ `?qe.createElement(ah,{isTrailing:!0,text:r.text}):qe.createElement(ah,{text:r.text})},ah=e=>{var{text:t,isTrailing:r=!1}=e,n=Yt(null),o=()=>"".concat(t??"").concat(r?`
85
+ `:""),[a]=At(o);return qa(()=>{var c=o();n.current&&n.current.textContent!==c&&(n.current.textContent=c)}),qe.createElement(kb,{ref:n},a)},kb=Dg(Xa((e,t)=>qe.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Pl=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),qe.createElement("span",Cb({},o),!(Jr||pp)||!r?"\uFEFF":null,r?qe.createElement("br",null):null)};function ih(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 Sp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ih(Object(r),!0).forEach(function(n){yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ih(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Eb=Jr?300:0;function Sb(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function sh(e){e.current&&(clearTimeout(e.current),e.current=null)}var Ab=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:c=N=>qe.createElement(Fb,Sp({},N))}=e,u=mo(),f=Yt(null),d=Yt(null),[p,v]=At(!1),g=Yt(null),x=St(N=>{if(Sb(f,N==null),N==null){var B;E0.delete(u),(B=t.onPlaceholderResize)===null||B===void 0||B.call(t,null)}else{if(E0.set(u,N),!f.current){var $=window.ResizeObserver||T8;f.current=new $(()=>{var A;(A=t.onPlaceholderResize)===null||A===void 0||A.call(t,N)})}f.current.observe(N),d.current=N}},[d,t,u]),w=qe.createElement(Db,{isLast:r,leaf:t,parent:o,text:n}),C=!!t[Qo];if(Jt(()=>(C?g.current||(g.current=setTimeout(()=>{v(!0),g.current=null},Eb)):(sh(g),v(!1)),()=>sh(g)),[C,v]),C&&p){var m={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:bo?"inherit":void 0},contentEditable:!1,ref:x}};w=qe.createElement(qe.Fragment,null,a(m),w)}var E={"data-slate-leaf":!0};return c({attributes:E,children:w,leaf:t,text:n})},Bb=qe.memo(Ab,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&ct.equals(t.leaf,e.leaf)&&t.leaf[Qo]===e.leaf[Qo]),Fb=e=>{var{attributes:t,children:r}=e;return qe.createElement("span",Sp({},t),r)},Nb=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:c}=e,u=mo(),f=Yt(null),d=ct.decorations(c,t),p=Oe.findKey(u,c),v=[],g=0;g<d.length;g++){var x=d[g];v.push(qe.createElement(Bb,{isLast:r&&g===d.length-1,key:"".concat(p.id,"-").concat(g),renderPlaceholder:o,leaf:x,text:c,parent:n,renderLeaf:a}))}var w=St(C=>{var m=vs.get(u);C?(m==null||m.set(p,C),ko.set(c,C),Ha.set(C,c)):(m==null||m.delete(p),ko.delete(c),f.current&&Ha.delete(f.current)),f.current=C},[f,u,p,c]);return qe.createElement("span",{"data-slate-node":"text",ref:w},v)},Ap=qe.memo(Nb,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&wb(t.decorations,e.decorations));function lh(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 T0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(r),!0).forEach(function(n){yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Tb=e=>{var{decorations:t,element:r,renderElement:n=N=>qe.createElement(Ob,T0({},N)),renderPlaceholder:o,renderLeaf:a,selection:c}=e,u=mo(),f=Pb(),d=u.isInline(r),p=Oe.findKey(u,r),v=St(N=>{var B=vs.get(u);N?(B==null||B.set(p,N),ko.set(r,N),Ha.set(N,r)):(B==null||B.delete(p),ko.delete(r))},[u,p,r]),g=Fp({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:c}),x={"data-slate-node":"element",ref:v};if(d&&(x["data-slate-inline"]=!0),!d&&M.hasInlines(u,r)){var w=Je.string(r),C=np(w);C==="rtl"&&(x.dir=C)}if(M.isVoid(u,r)){x["data-slate-void"]=!0,!f&&d&&(x.contentEditable=!1);var m=d?"span":"div",[[E]]=Je.texts(r);g=qe.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},qe.createElement(Ap,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:E})),yu.set(E,0),xu.set(E,r)}return n({attributes:x,children:g,element:r})},Mb=qe.memo(Tb,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&xb(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Be.equals(e.selection,t.selection))),Ob=e=>{var{attributes:t,children:r,element:n}=e,o=mo(),a=o.isInline(n)?"span":"div";return qe.createElement(a,T0(T0({},t),{},{style:{position:"relative"}}),r)},Bp=po(()=>[]),Rb=()=>ho(Bp),$b=po(!1),Fp=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:c}=e,u=Rb(),f=mo();Xo.set(f,!1);for(var d=Oe.findPath(f,r),p=[],v=ft.isElement(r)&&!f.isInline(r)&&M.hasInlines(f,r),g=0;g<r.children.length;g++){var x=d.concat(g),w=r.children[g],C=Oe.findKey(f,w),m=M.range(f,x),E=c&&Be.intersection(m,c),N=u([w,x]);for(var B of t){var $=Be.intersection(B,m);$&&N.push($)}ft.isElement(w)?p.push(qe.createElement($b.Provider,{key:"provider-".concat(C.id),value:!!E},qe.createElement(Mb,{decorations:N,element:w,key:C.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:E}))):p.push(qe.createElement(Ap,{decorations:N,key:C.id,isLast:v&&g===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:w})),yu.set(w,g),xu.set(w,r)}return p},Np=po(!1),Pb=()=>ho(Np),Tp=po(null),Mp=()=>{var e=ho(Tp);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function zb(){var e=mo(),t=Yt(!1),r=Yt(0),n=St(()=>{if(!t.current){t.current=!0;var o=Oe.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Jt(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var Ib=3,jb={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"},_b={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"},Lb={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Dr=e=>{var t=jb[e],r=_b[e],n=Lb[e],o=t&&Ol.isHotkey(t),a=r&&Ol.isHotkey(r),c=n&&Ol.isHotkey(n);return u=>!!(o&&o(u)||Jf&&a&&a(u)||!Jf&&c&&c(u))},Er={isBold:Dr("bold"),isCompose:Dr("compose"),isMoveBackward:Dr("moveBackward"),isMoveForward:Dr("moveForward"),isDeleteBackward:Dr("deleteBackward"),isDeleteForward:Dr("deleteForward"),isDeleteLineBackward:Dr("deleteLineBackward"),isDeleteLineForward:Dr("deleteLineForward"),isDeleteWordBackward:Dr("deleteWordBackward"),isDeleteWordForward:Dr("deleteWordForward"),isExtendBackward:Dr("extendBackward"),isExtendForward:Dr("extendForward"),isExtendLineBackward:Dr("extendLineBackward"),isExtendLineForward:Dr("extendLineForward"),isItalic:Dr("italic"),isMoveLineBackward:Dr("moveLineBackward"),isMoveLineForward:Dr("moveLineForward"),isMoveWordBackward:Dr("moveWordBackward"),isMoveWordForward:Dr("moveWordForward"),isRedo:Dr("redo"),isSoftBreak:Dr("insertSoftBreak"),isSplitBlock:Dr("splitBlock"),isTransposeCharacter:Dr("transposeCharacter"),isUndo:Dr("undo")},Kb=(e,t)=>{var r=[],n=()=>{r=[]},o=c=>{if(t.current){var u=c.filter(f=>Du(e,f,c));r.push(...u)}};function a(){r.length>0&&(r.reverse().forEach(c=>{c.type!=="characterData"&&(c.removedNodes.forEach(u=>{c.target.insertBefore(u,c.nextSibling)}),c.addedNodes.forEach(u=>{c.target.removeChild(u)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},Hb={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class Op extends Cg{constructor(){super(...arguments),yn(this,"context",null),yn(this,"manager",null),yn(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,Hb)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=Kb(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}}yn(Op,"contextType",bu);var qb=Jr?Op:e=>{var{children:t}=e;return qe.createElement(qe.Fragment,null,t)},Wb=po(!1),Vb=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],Ub=["text"];function uh(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 $n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Xb=e=>qe.createElement(qe.Fragment,null,Fp(e)),zl=Xa((e,t)=>{var r=St(G=>qe.createElement(Yb,$n({},G)),[]),{autoFocus:n,decorate:o=Gb,onDOMBeforeInput:a,placeholder:c,readOnly:u=!1,renderElement:f,renderLeaf:d,renderPlaceholder:p=r,scrollSelectionIntoView:v=Zb,style:g={},as:x="div",disableDefaultStyles:w=!1}=e,C=Jo(e,Vb),m=Mp(),[E,N]=At(!1),B=Yt(null),$=Yt([]),[A,_]=At(),P=Yt(!1),{onUserInput:q,receivedUserInput:O}=zb(),[,V]=wg(G=>G+1,0);vp.set(m,V),S0.set(m,u);var L=vt(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Jt(()=>{B.current&&n&&B.current.focus()},[n]);var Z=Yt(),Y=vt(()=>s8(()=>{if(Xo.get(m)){Y();return}var G=Oe.toDOMNode(m,m),ve=G.getRootNode();if(!P.current&&bo&&ve instanceof ShadowRoot){P.current=!0;var de=G8();de?document.execCommand("indent"):Le.deselect(m),P.current=!1;return}var re=Z.current;if((Jr||!Oe.isComposing(m))&&(!L.isUpdatingSelection||re!=null&&re.isFlushing())&&!L.isDraggingInternally){var he=Oe.findDocumentOrShadowRoot(m),{activeElement:we}=he,be=Oe.toDOMNode(m,m),Ee=Ma(he);if(we===be?(L.latestElement=we,so.set(m,!0)):so.delete(m),!Ee)return Le.deselect(m);var{anchorNode:De,focusNode:Ae}=Ee,Me=Oe.hasEditableTarget(m,De)||Oe.isTargetInsideNonReadonlyVoid(m,De),je=Oe.hasTarget(m,Ae);if(Me&&je){var Ve=Oe.toSlateRange(m,Ee,{exactMatch:!1,suppressThrow:!0});Ve&&(!Oe.isComposing(m)&&!(re!=null&&re.hasPendingChanges())&&!(re!=null&&re.isFlushing())?Le.select(m,Ve):re==null||re.handleUserSelect(Ve))}u&&(!Me||!je)&&Le.deselect(m)}},100),[m,u,L]),j=vt(()=>o8(Y,0),[Y]);Z.current=gb({node:B,onDOMSelectionChange:Y,scheduleOnDOMSelectionChange:j}),qa(()=>{var G,ve,de;B.current&&(de=Cu(B.current))?(gp.set(m,de),Ri.set(m,B.current),ko.set(m,B.current),Ha.set(B.current,m)):ko.delete(m);var{selection:re}=m,he=Oe.findDocumentOrShadowRoot(m),we=Ma(he);if(!(!we||!Oe.isFocused(m)||(G=Z.current)!==null&&G!==void 0&&G.hasPendingAction())){var be=Me=>{var je=we.type!=="None";if(!(!re&&!je)){var Ve=we.focusNode,ht;if(Ko&&we.rangeCount>1){var it=we.getRangeAt(0),Te=we.getRangeAt(we.rangeCount-1);it.startContainer===Ve?ht=Te.endContainer:ht=it.startContainer}else ht=we.anchorNode;var Ie=Ri.get(m),Ze=!1;if(Ie.contains(ht)&&Ie.contains(Ve)&&(Ze=!0),je&&Ze&&re&&!Me){var dt=Oe.toSlateRange(m,we,{exactMatch:!0,suppressThrow:!0});if(dt&&Be.equals(dt,re)){var at;if(!L.hasMarkPlaceholder||(at=ht)!==null&&at!==void 0&&(at=at.parentElement)!==null&&at!==void 0&&at.hasAttribute("data-slate-mark-placeholder"))return}}if(re&&!Oe.hasRange(m,re)){m.selection=Oe.toSlateRange(m,we,{exactMatch:!1,suppressThrow:!0});return}L.isUpdatingSelection=!0;var et=re&&Oe.toDOMRange(m,re);return et?(Oe.isComposing(m)&&!Jr?we.collapseToEnd():Be.isBackward(re)?we.setBaseAndExtent(et.endContainer,et.endOffset,et.startContainer,et.startOffset):we.setBaseAndExtent(et.startContainer,et.startOffset,et.endContainer,et.endOffset),v(m,et)):we.removeAllRanges(),et}};we.rangeCount<=1&&be();var Ee=((ve=Z.current)===null||ve===void 0?void 0:ve.isFlushing())==="action";if(!Jr||!Ee){setTimeout(()=>{L.isUpdatingSelection=!1});return}var De=null,Ae=requestAnimationFrame(()=>{if(Ee){var Me=je=>{try{var Ve=Oe.toDOMNode(m,m);Ve.focus(),be(je)}catch{}};Me(),De=setTimeout(()=>{Me(!0),L.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Ae),De&&clearTimeout(De)}}});var K=St(G=>{var ve=Oe.toDOMNode(m,m),de=ve.getRootNode();if(P!=null&&P.current&&bo&&de instanceof ShadowRoot){var re=G.getTargetRanges(),he=re[0],we=new window.Range;we.setStart(he.startContainer,he.startOffset),we.setEnd(he.endContainer,he.endOffset);var be=Oe.toSlateRange(m,we,{exactMatch:!1,suppressThrow:!1});Le.select(m,be),G.preventDefault(),G.stopImmediatePropagation();return}if(q(),!u&&Oe.hasEditableTarget(m,G.target)&&!Jb(G,a)){var Ee;if(Z.current)return Z.current.handleDOMBeforeInput(G);j.flush(),Y.flush();var{selection:De}=m,{inputType:Ae}=G,Me=G.dataTransfer||G.data||void 0,je=Ae==="insertCompositionText"||Ae==="deleteCompositionText";if(je&&Oe.isComposing(m))return;var Ve=!1;if(Ae==="insertText"&&De&&Be.isCollapsed(De)&&G.data&&G.data.length===1&&/[a-z ]/i.test(G.data)&&De.anchor.offset!==0&&(Ve=!0,m.marks&&(Ve=!1),!Xo.get(m))){var ht,it,{anchor:Te}=De,[Ie,Ze]=Oe.toDOMPoint(m,Te),dt=(ht=Ie.parentElement)===null||ht===void 0?void 0:ht.closest("a"),at=Oe.getWindow(m);if(Ve&&dt&&Oe.hasDOMNode(m,dt)){var et,Tt=at==null?void 0:at.document.createTreeWalker(dt,NodeFilter.SHOW_TEXT).lastChild();Tt===Ie&&((et=Tt.textContent)===null||et===void 0?void 0:et.length)===Ze&&(Ve=!1)}if(Ve&&Ie.parentElement&&(at==null||(it=at.getComputedStyle(Ie.parentElement))===null||it===void 0?void 0:it.whiteSpace)==="pre"){var xt=M.above(m,{at:Te.path,match:Pt=>ft.isElement(Pt)&&M.isBlock(m,Pt)});xt&&Je.string(xt[0]).includes(" ")&&(Ve=!1)}}if((!Ae.startsWith("delete")||Ae.startsWith("deleteBy"))&&!Xo.get(m)){var[yt]=G.getTargetRanges();if(yt){var pt=Oe.toSlateRange(m,yt,{exactMatch:!1,suppressThrow:!1});if(!De||!Be.equals(De,pt)){Ve=!1;var ze=!je&&m.selection&&M.rangeRef(m,m.selection);Le.select(m,pt),ze&&Ta.set(m,ze)}}}if(je)return;if(Ve||G.preventDefault(),De&&Be.isExpanded(De)&&Ae.startsWith("delete")){var ce=Ae.endsWith("Backward")?"backward":"forward";M.deleteFragment(m,{direction:ce});return}switch(Ae){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{M.deleteFragment(m);break}case"deleteContent":case"deleteContentForward":{M.deleteForward(m);break}case"deleteContentBackward":{M.deleteBackward(m);break}case"deleteEntireSoftLine":{M.deleteBackward(m,{unit:"line"}),M.deleteForward(m,{unit:"line"});break}case"deleteHardLineBackward":{M.deleteBackward(m,{unit:"block"});break}case"deleteSoftLineBackward":{M.deleteBackward(m,{unit:"line"});break}case"deleteHardLineForward":{M.deleteForward(m,{unit:"block"});break}case"deleteSoftLineForward":{M.deleteForward(m,{unit:"line"});break}case"deleteWordBackward":{M.deleteBackward(m,{unit:"word"});break}case"deleteWordForward":{M.deleteForward(m,{unit:"word"});break}case"insertLineBreak":M.insertSoftBreak(m);break;case"insertParagraph":{M.insertBreak(m);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Ae==="insertFromComposition"&&Oe.isComposing(m)&&(N(!1),yo.set(m,!1)),(Me==null?void 0:Me.constructor.name)==="DataTransfer"?Oe.insertData(m,Me):typeof Me=="string"&&(Ve?$.current.push(()=>M.insertText(m,Me)):M.insertText(m,Me));break}}var bt=(Ee=Ta.get(m))===null||Ee===void 0?void 0:Ee.unref();Ta.delete(m),bt&&(!m.selection||!Be.equals(m.selection,bt))&&Le.select(m,bt)}},[m,Y,q,a,u,j]),U=St(G=>{G==null?(Y.cancel(),j.cancel(),Ri.delete(m),ko.delete(m),B.current&&Qn&&B.current.removeEventListener("beforeinput",K)):Qn&&G.addEventListener("beforeinput",K),B.current=G,typeof t=="function"?t(G):t&&(t.current=G)},[Y,j,m,K,t]);qa(()=>{var G=Oe.getWindow(m);G.document.addEventListener("selectionchange",j);var ve=()=>{L.isDraggingInternally=!1};return G.document.addEventListener("dragend",ve),G.document.addEventListener("drop",ve),()=>{G.document.removeEventListener("selectionchange",j),G.document.removeEventListener("dragend",ve),G.document.removeEventListener("drop",ve)}},[j,L]);var X=o([m,[]]),ee=c&&m.children.length===1&&Array.from(Je.texts(m)).length===1&&Je.string(m)===""&&!E,R=St(G=>{if(G&&ee){var ve;_((ve=G.getBoundingClientRect())===null||ve===void 0?void 0:ve.height)}else _(void 0)},[ee]);if(ee){var se=M.start(m,[]);X.push({[Qo]:!0,placeholder:c,onPlaceholderResize:R,anchor:se,focus:se})}var{marks:ye}=m;if(L.hasMarkPlaceholder=!1,m.selection&&Be.isCollapsed(m.selection)&&ye){var{anchor:Ce}=m.selection,Se=Je.leaf(m,Ce.path),ue=Jo(Se,Ub);if(!ct.equals(Se,ye,{loose:!0})){L.hasMarkPlaceholder=!0;var Fe=Object.fromEntries(Object.keys(ue).map(G=>[G,null]));X.push($n($n($n({[bp]:!0},Fe),ye),{},{anchor:Ce,focus:Ce}))}}return Jt(()=>{setTimeout(()=>{var{selection:G}=m;if(G){var{anchor:ve}=G,de=Je.leaf(m,ve.path);if(ye&&!ct.equals(de,ye,{loose:!0})){Sn.set(m,ye);return}}Sn.delete(m)})}),qe.createElement(Np.Provider,{value:u},qe.createElement(Wb.Provider,{value:E},qe.createElement(Bp.Provider,{value:o},qe.createElement(qb,{node:B,receivedUserInput:O},qe.createElement(x,$n($n({role:u?void 0:"textbox","aria-multiline":u?void 0:!0},C),{},{spellCheck:Qn||!Oi?C.spellCheck:!1,autoCorrect:Qn||!Oi?C.autoCorrect:"false",autoCapitalize:Qn||!Oi?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!u,zindex:-1,suppressContentEditableWarning:!0,ref:U,style:$n($n({},w?{}:$n({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},A?{minHeight:A}:{})),g),onBeforeInput:St(G=>{if(!Qn&&!u&&!Zr(G,C.onBeforeInput)&&Oe.hasSelectableTarget(m,G.target)&&(G.preventDefault(),!Oe.isComposing(m))){var ve=G.data;M.insertText(m,ve)}},[C.onBeforeInput,m,u]),onInput:St(G=>{if(!Zr(G,C.onInput)){if(Z.current){Z.current.handleInput();return}for(var ve of $.current)ve();if($.current=[],!Oe.isFocused(m)){var de=G.nativeEvent,re=m;if(de.inputType==="historyUndo"&&typeof re.undo=="function"){re.undo();return}if(de.inputType==="historyRedo"&&typeof re.redo=="function"){re.redo();return}}}},[C.onInput,m]),onBlur:St(G=>{if(!(u||L.isUpdatingSelection||!Oe.hasSelectableTarget(m,G.target)||Zr(G,C.onBlur))){var ve=Oe.findDocumentOrShadowRoot(m);if(L.latestElement!==ve.activeElement){var{relatedTarget:de}=G,re=Oe.toDOMNode(m,m);if(de!==re&&!(bn(de)&&de.hasAttribute("data-slate-spacer"))){if(de!=null&&fo(de)&&Oe.hasDOMNode(m,de)){var he=Oe.toSlateNode(m,de);if(ft.isElement(he)&&!m.isVoid(he))return}if(bo){var we=Ma(ve);we==null||we.removeAllRanges()}so.delete(m)}}}},[u,L.isUpdatingSelection,L.latestElement,m,C.onBlur]),onClick:St(G=>{if(Oe.hasTarget(m,G.target)&&!Zr(G,C.onClick)&&fo(G.target)){var ve=Oe.toSlateNode(m,G.target),de=Oe.findPath(m,ve);if(!M.hasPath(m,de)||Je.get(m,de)!==ve)return;if(G.detail===Ib&&de.length>=1){var re=de;if(!(ft.isElement(ve)&&M.isBlock(m,ve))){var he,we=M.above(m,{match:Ve=>ft.isElement(Ve)&&M.isBlock(m,Ve),at:de});re=(he=we==null?void 0:we[1])!==null&&he!==void 0?he:de.slice(0,1)}var be=M.range(m,re);Le.select(m,be);return}if(u)return;var Ee=M.start(m,de),De=M.end(m,de),Ae=M.void(m,{at:Ee}),Me=M.void(m,{at:De});if(Ae&&Me&&ne.equals(Ae[1],Me[1])){var je=M.range(m,Ee);Le.select(m,je)}}},[m,C.onClick,u]),onCompositionEnd:St(G=>{if(Oe.hasSelectableTarget(m,G.target)){var ve;if(Oe.isComposing(m)&&Promise.resolve().then(()=>{N(!1),yo.set(m,!1)}),(ve=Z.current)===null||ve===void 0||ve.handleCompositionEnd(G),Zr(G,C.onCompositionEnd)||Jr)return;if(!bo&&!j8&&!pp&&!L8&&!_8&&G.data){var de=Sn.get(m);Sn.delete(m),de!==void 0&&(Wn.set(m,m.marks),m.marks=de),M.insertText(m,G.data);var re=Wn.get(m);Wn.delete(m),re!==void 0&&(m.marks=re)}}},[C.onCompositionEnd,m]),onCompositionUpdate:St(G=>{Oe.hasSelectableTarget(m,G.target)&&!Zr(G,C.onCompositionUpdate)&&(Oe.isComposing(m)||(N(!0),yo.set(m,!0)))},[C.onCompositionUpdate,m]),onCompositionStart:St(G=>{if(Oe.hasSelectableTarget(m,G.target)){var ve;if((ve=Z.current)===null||ve===void 0||ve.handleCompositionStart(G),Zr(G,C.onCompositionStart)||Jr)return;N(!0);var{selection:de}=m;if(de&&Be.isExpanded(de)){M.deleteFragment(m);return}}},[C.onCompositionStart,m]),onCopy:St(G=>{Oe.hasSelectableTarget(m,G.target)&&!Zr(G,C.onCopy)&&!ch(G)&&(G.preventDefault(),Oe.setFragmentData(m,G.clipboardData,"copy"))},[C.onCopy,m]),onCut:St(G=>{if(!u&&Oe.hasSelectableTarget(m,G.target)&&!Zr(G,C.onCut)&&!ch(G)){G.preventDefault(),Oe.setFragmentData(m,G.clipboardData,"cut");var{selection:ve}=m;if(ve)if(Be.isExpanded(ve))M.deleteFragment(m);else{var de=Je.parent(m,ve.anchor.path);M.isVoid(m,de)&&Le.delete(m)}}},[u,m,C.onCut]),onDragOver:St(G=>{if(Oe.hasTarget(m,G.target)&&!Zr(G,C.onDragOver)){var ve=Oe.toSlateNode(m,G.target);ft.isElement(ve)&&M.isVoid(m,ve)&&G.preventDefault()}},[C.onDragOver,m]),onDragStart:St(G=>{if(!u&&Oe.hasTarget(m,G.target)&&!Zr(G,C.onDragStart)){var ve=Oe.toSlateNode(m,G.target),de=Oe.findPath(m,ve),re=ft.isElement(ve)&&M.isVoid(m,ve)||M.void(m,{at:de,voids:!0});if(re){var he=M.range(m,de);Le.select(m,he)}L.isDraggingInternally=!0,Oe.setFragmentData(m,G.dataTransfer,"drag")}},[u,m,C.onDragStart,L]),onDrop:St(G=>{if(!u&&Oe.hasTarget(m,G.target)&&!Zr(G,C.onDrop)){G.preventDefault();var ve=m.selection,de=Oe.findEventRange(m,G),re=G.dataTransfer;Le.select(m,de),L.isDraggingInternally&&ve&&!Be.equals(ve,de)&&!M.void(m,{at:de,voids:!0})&&Le.delete(m,{at:ve}),Oe.insertData(m,re),Oe.isFocused(m)||Oe.focus(m)}},[u,m,C.onDrop,L]),onDragEnd:St(G=>{!u&&L.isDraggingInternally&&C.onDragEnd&&Oe.hasTarget(m,G.target)&&C.onDragEnd(G)},[u,L,C,m]),onFocus:St(G=>{if(!u&&!L.isUpdatingSelection&&Oe.hasEditableTarget(m,G.target)&&!Zr(G,C.onFocus)){var ve=Oe.toDOMNode(m,m),de=Oe.findDocumentOrShadowRoot(m);if(L.latestElement=de.activeElement,Ko&&G.target!==ve){ve.focus();return}so.set(m,!0)}},[u,L,m,C.onFocus]),onKeyDown:St(G=>{if(!u&&Oe.hasEditableTarget(m,G.target)){var ve;(ve=Z.current)===null||ve===void 0||ve.handleKeyDown(G);var{nativeEvent:de}=G;if(Oe.isComposing(m)&&de.isComposing===!1&&(yo.set(m,!1),N(!1)),Zr(G,C.onKeyDown)||Oe.isComposing(m))return;var{selection:re}=m,he=m.children[re!==null?re.focus.path[0]:0],we=np(Je.string(he))==="rtl";if(Er.isRedo(de)){G.preventDefault();var be=m;typeof be.redo=="function"&&be.redo();return}if(Er.isUndo(de)){G.preventDefault();var Ee=m;typeof Ee.undo=="function"&&Ee.undo();return}if(Er.isMoveLineBackward(de)){G.preventDefault(),Le.move(m,{unit:"line",reverse:!0});return}if(Er.isMoveLineForward(de)){G.preventDefault(),Le.move(m,{unit:"line"});return}if(Er.isExtendLineBackward(de)){G.preventDefault(),Le.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(Er.isExtendLineForward(de)){G.preventDefault(),Le.move(m,{unit:"line",edge:"focus"});return}if(Er.isMoveBackward(de)){G.preventDefault(),re&&Be.isCollapsed(re)?Le.move(m,{reverse:!we}):Le.collapse(m,{edge:we?"end":"start"});return}if(Er.isMoveForward(de)){G.preventDefault(),re&&Be.isCollapsed(re)?Le.move(m,{reverse:we}):Le.collapse(m,{edge:we?"start":"end"});return}if(Er.isMoveWordBackward(de)){G.preventDefault(),re&&Be.isExpanded(re)&&Le.collapse(m,{edge:"focus"}),Le.move(m,{unit:"word",reverse:!we});return}if(Er.isMoveWordForward(de)){G.preventDefault(),re&&Be.isExpanded(re)&&Le.collapse(m,{edge:"focus"}),Le.move(m,{unit:"word",reverse:we});return}if(Qn){if((mp||bo)&&re&&(Er.isDeleteBackward(de)||Er.isDeleteForward(de))&&Be.isCollapsed(re)){var De=Je.parent(m,re.anchor.path);if(ft.isElement(De)&&M.isVoid(m,De)&&(M.isInline(m,De)||M.isBlock(m,De))){G.preventDefault(),M.deleteBackward(m,{unit:"block"});return}}}else{if(Er.isBold(de)||Er.isItalic(de)||Er.isTransposeCharacter(de)){G.preventDefault();return}if(Er.isSoftBreak(de)){G.preventDefault(),M.insertSoftBreak(m);return}if(Er.isSplitBlock(de)){G.preventDefault(),M.insertBreak(m);return}if(Er.isDeleteBackward(de)){G.preventDefault(),re&&Be.isExpanded(re)?M.deleteFragment(m,{direction:"backward"}):M.deleteBackward(m);return}if(Er.isDeleteForward(de)){G.preventDefault(),re&&Be.isExpanded(re)?M.deleteFragment(m,{direction:"forward"}):M.deleteForward(m);return}if(Er.isDeleteLineBackward(de)){G.preventDefault(),re&&Be.isExpanded(re)?M.deleteFragment(m,{direction:"backward"}):M.deleteBackward(m,{unit:"line"});return}if(Er.isDeleteLineForward(de)){G.preventDefault(),re&&Be.isExpanded(re)?M.deleteFragment(m,{direction:"forward"}):M.deleteForward(m,{unit:"line"});return}if(Er.isDeleteWordBackward(de)){G.preventDefault(),re&&Be.isExpanded(re)?M.deleteFragment(m,{direction:"backward"}):M.deleteBackward(m,{unit:"word"});return}if(Er.isDeleteWordForward(de)){G.preventDefault(),re&&Be.isExpanded(re)?M.deleteFragment(m,{direction:"forward"}):M.deleteForward(m,{unit:"word"});return}}}},[u,m,C.onKeyDown]),onPaste:St(G=>{!u&&Oe.hasEditableTarget(m,G.target)&&!Zr(G,C.onPaste)&&(!Qn||q8(G.nativeEvent)||bo)&&(G.preventDefault(),Oe.insertData(m,G.clipboardData))},[u,m,C.onPaste])}),qe.createElement(Xb,{decorations:X,node:m,renderElement:f,renderPlaceholder:p,renderLeaf:d,selection:m.selection}))))))}),Yb=e=>{var{attributes:t,children:r}=e;return qe.createElement("span",$n({},t),r,Jr&&qe.createElement("br",null))},Gb=()=>[],Zb=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Be.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),c8(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},Zr=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},ch=e=>fo(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),Jb=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},Qb=po(!1),ey=po({});function ty(e){var t=Yt([]).current,r=Yt({editor:e}).current,n=St(a=>{r.editor=a,t.forEach(c=>c(a))},[t,r]),o=vt(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var ry=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],Il=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:c}=e,u=Jo(e,ry),[f,d]=qe.useState(()=>{if(!Je.isNodeList(c))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Kr.stringify(c)));if(!M.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Kr.stringify(t)));return t.children=c,Object.assign(t,u),{v:0,editor:t}}),{selectorContext:p,onChange:v}=ty(t),g=St(C=>{var m;switch(n&&n(t.children),C==null||(m=C.operation)===null||m===void 0?void 0:m.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}d(E=>({v:E.v+1,editor:t})),v(t)},[t,v,n,o,a]);Jt(()=>(A0.set(t,g),()=>{A0.set(t,()=>{})}),[t,g]);var[x,w]=At(Oe.isFocused(t));return Jt(()=>{w(Oe.isFocused(t))},[t]),qa(()=>{var C=()=>w(Oe.isFocused(t));return hp>=17?(document.addEventListener("focusin",C),document.addEventListener("focusout",C),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",C)}):(document.addEventListener("focus",C,!0),document.addEventListener("blur",C,!0),()=>{document.removeEventListener("focus",C,!0),document.removeEventListener("blur",C,!0)})},[]),qe.createElement(ey.Provider,{value:p},qe.createElement(Tp.Provider,{value:f},qe.createElement(bu.Provider,{value:f.editor},qe.createElement(Qb.Provider,{value:x},r))))},dh=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},fh=(e,t,r)=>{var n=Oe.toDOMRange(e,t).getBoundingClientRect(),o=Oe.toDOMRange(e,r).getBoundingClientRect();return dh(n,o)&&dh(o,n)},ny=(e,t)=>{var r=M.range(e,Be.end(t)),n=Array.from(M.positions(e,{at:t})),o=0,a=n.length,c=Math.floor(a/2);if(fh(e,M.range(e,n[o]),r))return M.range(e,n[o],r);if(n.length<2)return M.range(e,n[n.length-1],r);for(;c!==n.length&&c!==o;)fh(e,M.range(e,n[c]),r)?a=c:o=c,c=Math.floor((o+a)/2);return M.range(e,n[a],r)};function hh(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 ph(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hh(Object(r),!0).forEach(function(n){yn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var oy=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:c,removeMark:u}=r;return vs.set(r,new WeakMap),r.addMark=(f,d)=>{var p,v;(p=wu.get(r))===null||p===void 0||p(),!Sn.get(r)&&(v=an.get(r))!==null&&v!==void 0&&v.length&&Sn.set(r,null),Wn.delete(r),c(f,d)},r.removeMark=f=>{var d;!Sn.get(r)&&(d=an.get(r))!==null&&d!==void 0&&d.length&&Sn.set(r,null),Wn.delete(r),u(f)},r.deleteBackward=f=>{if(f!=="line")return a(f);if(r.selection&&Be.isCollapsed(r.selection)){var d=M.above(r,{match:x=>ft.isElement(x)&&M.isBlock(r,x),at:r.selection});if(d){var[,p]=d,v=M.range(r,p,r.selection.anchor),g=ny(r,v);Be.isCollapsed(g)||Le.delete(r,{at:g})}}},r.apply=f=>{var d=[],p=[],v=an.get(r);if(v!=null&&v.length){var g=v.map(Y=>ab(Y,f)).filter(Boolean);an.set(r,g)}var x=oo.get(r);x&&oo.set(r,th(r,x,f));var w=no.get(r);if(w!=null&&w.at){var C=Lt.isPoint(w==null?void 0:w.at)?N0(r,w.at,f):th(r,w.at,f);no.set(r,C?ph(ph({},w),{},{at:C}):null)}switch(f.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{d.push(...zo(r,f.path));break}case"set_selection":{var m;(m=Ta.get(r))===null||m===void 0||m.unref(),Ta.delete(r);break}case"insert_node":case"remove_node":{d.push(...zo(r,ne.parent(f.path)));break}case"merge_node":{var E=ne.previous(f.path);d.push(...zo(r,E));break}case"move_node":{var N=ne.common(ne.parent(f.path),ne.parent(f.newPath));d.push(...zo(r,N));var B;ne.isBefore(f.path,f.newPath)?(d.push(...zo(r,ne.parent(f.path))),B=f.newPath):(d.push(...zo(r,ne.parent(f.newPath))),B=f.path);var $=Je.get(e,ne.parent(B)),A=Oe.findKey(r,$),_=M.pathRef(r,ne.parent(B));p.push([_,A]);break}}switch(n(f),f.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Xo.set(r,!0)}for(var[P,q]of d){var[O]=M.node(r,P);ts.set(O,q)}for(var[V,L]of p){if(V.current){var[Z]=M.node(r,V.current);ts.set(Z,L)}V.unref()}},r.setFragmentData=f=>{var{selection:d}=r;if(d){var[p,v]=Be.edges(d),g=M.void(r,{at:p.path}),x=M.void(r,{at:v.path});if(!(Be.isCollapsed(d)&&!g)){var w=Oe.toDOMRange(r,d),C=w.cloneContents(),m=C.childNodes[0];if(C.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(m=O)}),x){var[E]=x,N=w.cloneRange(),B=Oe.toDOMNode(r,E);N.setEndAfter(B),C=N.cloneContents()}if(g&&(m=C.querySelector("[data-slate-spacer]")),Array.from(C.querySelectorAll("[data-slate-zero-width]")).forEach(O=>{var V=O.getAttribute("data-slate-zero-width")==="n";O.textContent=V?`
86
+ `:""}),xp(m)){var $=m.ownerDocument.createElement("span");$.style.whiteSpace="pre",$.appendChild(m),C.appendChild($),m=$}var A=r.getFragment(),_=JSON.stringify(A),P=window.btoa(encodeURIComponent(_));m.setAttribute("data-slate-fragment",P),f.setData("application/".concat(t),P);var q=C.ownerDocument.createElement("div");return q.appendChild(C),q.setAttribute("hidden","true"),C.ownerDocument.body.appendChild(q),f.setData("text/html",q.innerHTML),f.setData("text/plain",Cp(q)),C.ownerDocument.body.removeChild(q),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||Y8(f);if(d){var p=decodeURIComponent(window.atob(d)),v=JSON.parse(p);return r.insertFragment(v),!0}return!1},r.insertTextData=f=>{var d=f.getData("text/plain");if(d){var p=d.split(/\r\n|\r|\n/),v=!1;for(var g of p)v&&Le.splitNodes(r,{always:!0}),r.insertText(g),v=!0;return!0}return!1},r.onChange=f=>{var d=hp<18?e0.unstable_batchedUpdates:p=>p();d(()=>{var p=A0.get(r);p&&p(f),o(f)})},r},zo=(e,t)=>{var r=[];for(var[n,o]of M.levels(e,{at:t})){var a=Oe.findKey(e,n);r.push([o,a])}return r};function ku(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mo=ku();function Rp(e){Mo=e}var Oa={exec:()=>null};function ur(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(Qr.caret,"$1"),r=r.replace(o,c),n},getRegex:()=>new RegExp(r,t)};return n}var Qr={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")},ay=/^(?:[ \t]*(?:\n|$))+/,iy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ei=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ly=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Eu=/(?:[*+-]|\d{1,9}[.)])/,$p=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Pp=ur($p).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(),uy=ur($p).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]+)*)/,cy=/^[^\n]+/,Au=/(?!\s*\])(?:\\.|[^\[\]\\])+/,dy=ur(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Au).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fy=ur(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Eu).getRegex(),bs="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",Bu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hy=ur("^ {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",Bu).replace("tag",bs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),zp=ur(Su).replace("hr",ei).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",bs).getRegex(),py=ur(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",zp).getRegex(),Fu={blockquote:py,code:iy,def:dy,fences:sy,heading:ly,hr:ei,html:hy,lheading:Pp,list:fy,newline:ay,paragraph:zp,table:Oa,text:cy},mh=ur("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ei).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",bs).getRegex(),my={...Fu,lheading:uy,table:mh,paragraph:ur(Su).replace("hr",ei).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",mh).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",bs).getRegex()},gy={...Fu,html:ur(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Bu).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:Oa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ur(Su).replace("hr",ei).replace("heading",` *#{1,6} *[^
87
+ ]`).replace("lheading",Pp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vy=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,by=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ip=/^( {2,}|\\)\n(?!\s*$)/,yy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ys=/[\p{P}\p{S}]/u,Nu=/[\s\p{P}\p{S}]/u,jp=/[^\s\p{P}\p{S}]/u,xy=ur(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nu).getRegex(),_p=/(?!~)[\p{P}\p{S}]/u,wy=/(?!~)[\s\p{P}\p{S}]/u,Cy=/(?:[^\s\p{P}\p{S}]|~)/u,Dy=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Lp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ky=ur(Lp,"u").replace(/punct/g,ys).getRegex(),Ey=ur(Lp,"u").replace(/punct/g,_p).getRegex(),Kp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Sy=ur(Kp,"gu").replace(/notPunctSpace/g,jp).replace(/punctSpace/g,Nu).replace(/punct/g,ys).getRegex(),Ay=ur(Kp,"gu").replace(/notPunctSpace/g,Cy).replace(/punctSpace/g,wy).replace(/punct/g,_p).getRegex(),By=ur("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,jp).replace(/punctSpace/g,Nu).replace(/punct/g,ys).getRegex(),Fy=ur(/\\(punct)/,"gu").replace(/punct/g,ys).getRegex(),Ny=ur(/^<(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(),Ty=ur(Bu).replace("(?:-->|$)","-->").getRegex(),My=ur("^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",Ty).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Oy=ur(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",rs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Hp=ur(/^!?\[(label)\]\[(ref)\]/).replace("label",rs).replace("ref",Au).getRegex(),qp=ur(/^!?\[(ref)\](?:\[\])?/).replace("ref",Au).getRegex(),Ry=ur("reflink|nolink(?!\\()","g").replace("reflink",Hp).replace("nolink",qp).getRegex(),Tu={_backpedal:Oa,anyPunctuation:Fy,autolink:Ny,blockSkip:Dy,br:Ip,code:by,del:Oa,emStrongLDelim:ky,emStrongRDelimAst:Sy,emStrongRDelimUnd:By,escape:vy,link:Oy,nolink:qp,punctuation:xy,reflink:Hp,reflinkSearch:Ry,tag:My,text:yy,url:Oa},$y={...Tu,link:ur(/^!?\[(label)\]\((.*?)\)/).replace("label",rs).getRegex(),reflink:ur(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rs).getRegex()},M0={...Tu,emStrongRDelimAst:Ay,emStrongLDelim:Ey,url:ur(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Py={...M0,br:ur(Ip).replace("{2,}","*").getRegex(),text:ur(M0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ei={normal:Fu,gfm:my,pedantic:gy},wa={normal:Tu,gfm:M0,breaks:Py,pedantic:$y},zy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},gh=e=>zy[e];function Pn(e,t){if(t){if(Qr.escapeTest.test(e))return e.replace(Qr.escapeReplace,gh)}else if(Qr.escapeTestNoEncode.test(e))return e.replace(Qr.escapeReplaceNoEncode,gh);return e}function vh(e){try{e=encodeURI(e).replace(Qr.percentDecode,"%")}catch{return null}return e}function bh(e,t){var a;const r=e.replace(Qr.findPipe,(c,u,f)=>{let d=!1,p=u;for(;--p>=0&&f[p]==="\\";)d=!d;return d?"|":" |"}),n=r.split(Qr.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(Qr.slashPipe,"|");return n}function Ca(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 Iy(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 yh(e,t,r,n,o){const a=t.href,c=t.title||null,u=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:c,text:u,tokens:n.inlineTokens(u)};return n.state.inLink=!1,f}function jy(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
88
+ `).map(a=>{const c=a.match(r.other.beginningSpace);if(c===null)return a;const[u]=c;return u.length>=o.length?a.slice(o.length):a}).join(`
89
+ `)}var ns=class{constructor(e){mr(this,"options"),mr(this,"rules"),mr(this,"lexer"),this.options=e||Mo}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:Ca(r,`
90
+ `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=jy(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=Ca(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:Ca(t[0],`
91
+ `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=Ca(t[0],`
92
+ `).split(`
93
+ `),n="",o="";const a=[];for(;r.length>0;){let c=!1;const u=[];let f;for(f=0;f<r.length;f++)if(this.rules.other.blockquoteStart.test(r[f]))u.push(r[f]),c=!0;else if(!c)u.push(r[f]);else break;r=r.slice(f);const d=u.join(`
94
+ `),p=d.replace(this.rules.other.blockquoteSetextReplace,`
95
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
96
+ ${d}`:d,o=o?`${o}
97
+ ${p}`:p;const v=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,a,!0),this.lexer.state.top=v,r.length===0)break;const g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const x=g,w=x.raw+`
98
+ `+r.join(`
99
+ `),C=this.blockquote(w);a[a.length-1]=C,n=n.substring(0,n.length-x.raw.length)+C.raw,o=o.substring(0,o.length-x.text.length)+C.text;break}else if((g==null?void 0:g.type)==="list"){const x=g,w=x.raw+`
100
+ `+r.join(`
101
+ `),C=this.list(w);a[a.length-1]=C,n=n.substring(0,n.length-g.raw.length)+C.raw,o=o.substring(0,o.length-x.raw.length)+C.raw,r=w.substring(a.at(-1).raw.length).split(`
102
+ `);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 c=!1;for(;e;){let f=!1,d="",p="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let v=t[2].split(`
103
+ `,1)[0].replace(this.rules.other.listReplaceTabs,E=>" ".repeat(3*E.length)),g=e.split(`
104
+ `,1)[0],x=!v.trim(),w=0;if(this.options.pedantic?(w=2,p=v.trimStart()):x?w=t[1].length+1:(w=t[2].search(this.rules.other.nonSpaceChar),w=w>4?1:w,p=v.slice(w),w+=t[1].length),x&&this.rules.other.blankLine.test(g)&&(d+=g+`
105
+ `,e=e.substring(g.length+1),f=!0),!f){const E=this.rules.other.nextBulletRegex(w),N=this.rules.other.hrRegex(w),B=this.rules.other.fencesBeginRegex(w),$=this.rules.other.headingBeginRegex(w),A=this.rules.other.htmlBeginRegex(w);for(;e;){const _=e.split(`
106
+ `,1)[0];let P;if(g=_,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),P=g):P=g.replace(this.rules.other.tabCharGlobal," "),B.test(g)||$.test(g)||A.test(g)||E.test(g)||N.test(g))break;if(P.search(this.rules.other.nonSpaceChar)>=w||!g.trim())p+=`
107
+ `+P.slice(w);else{if(x||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||B.test(v)||$.test(v)||N.test(v))break;p+=`
108
+ `+g}!x&&!g.trim()&&(x=!0),d+=_+`
109
+ `,e=e.substring(_.length+1),v=P.slice(w)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let C=null,m;this.options.gfm&&(C=this.rules.other.listIsTask.exec(p),C&&(m=C[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:d,task:!!C,checked:m,loose:!1,text:p,tokens:[]}),o.raw+=d}const u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f=0;f<o.items.length;f++)if(this.lexer.state.top=!1,o.items[f].tokens=this.lexer.blockTokens(o.items[f].text,[]),!o.loose){const d=o.items[f].tokens.filter(v=>v.type==="space"),p=d.length>0&&d.some(v=>this.rules.other.anyLine.test(v.raw));o.loose=p}if(o.loose)for(let f=0;f<o.items.length;f++)o.items[f].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 c;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=bh(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
110
+ `):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const u of n)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<r.length;u++)a.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:a.align[u]});for(const u of o)a.rows.push(bh(u,a.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:a.align[d]})));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)===`
111
+ `?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=Ca(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=Iy(t[2],"()");if(a===-2)return;if(a>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,c).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)),yh(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 yh(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,c,u=o,f=0;const d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+o);(n=d.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(c=[...a].length,n[3]||n[4]){u+=c;continue}else if((n[5]||n[6])&&o%3&&!((o+c)%3)){f+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+f);const p=[...n[0]][0].length,v=e.slice(0,o+n.index+p+c);if(Math.min(o,c)%2){const x=v.slice(1,-1);return{type:"em",raw:v,text:x,tokens:this.lexer.inlineTokens(x)}}const g=v.slice(2,-2);return{type:"strong",raw:v,text:g,tokens:this.lexer.inlineTokens(g)}}}}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}}}},Vn=class O0{constructor(t){mr(this,"tokens"),mr(this,"options"),mr(this,"state"),mr(this,"tokenizer"),mr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mo,this.options.tokenizer=this.options.tokenizer||new ns,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:Qr,block:Ei.normal,inline:wa.normal};this.options.pedantic?(r.block=Ei.pedantic,r.inline=wa.pedantic):this.options.gfm&&(r.block=Ei.gfm,this.options.breaks?r.inline=wa.breaks:r.inline=wa.gfm),this.tokenizer.rules=r}static get rules(){return{block:Ei,inline:wa}}static lex(t,r){return new O0(r).lex(t)}static lexInline(t,r){return new O0(r).inlineTokens(t)}lex(t){t=t.replace(Qr.carriageReturn,`
112
+ `),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,c;for(this.options.pedantic&&(t=t.replace(Qr.tabCharGlobal," ").replace(Qr.spaceLine,""));t;){let u;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(d=>(u=d.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.space(t)){t=t.substring(u.raw.length);const d=r.at(-1);u.raw.length===1&&d!==void 0?d.raw+=`
113
+ `:r.push(u);continue}if(u=this.tokenizer.code(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
114
+ `+u.raw,d.text+=`
115
+ `+u.text,this.inlineQueue.at(-1).src=d.text):r.push(u);continue}if(u=this.tokenizer.fences(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.heading(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.hr(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.blockquote(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.list(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.html(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.def(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
116
+ `+u.raw,d.text+=`
117
+ `+u.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[u.tag]||(this.tokens.links[u.tag]={href:u.href,title:u.title});continue}if(u=this.tokenizer.table(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.lheading(t)){t=t.substring(u.raw.length),r.push(u);continue}let f=t;if((c=this.options.extensions)!=null&&c.startBlock){let d=1/0;const p=t.slice(1);let v;this.options.extensions.startBlock.forEach(g=>{v=g.call({lexer:this},p),typeof v=="number"&&v>=0&&(d=Math.min(d,v))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(this.state.top&&(u=this.tokenizer.paragraph(f))){const d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
118
+ `+u.raw,d.text+=`
119
+ `+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(u),n=f.length!==t.length,t=t.substring(u.raw.length);continue}if(u=this.tokenizer.text(t)){t=t.substring(u.raw.length);const d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
120
+ `+u.raw,d.text+=`
121
+ `+u.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(u);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 this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var u,f,d;let n=t,o=null;if(this.tokens.links){const p=Object.keys(this.tokens.links);if(p.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)p.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,c="";for(;t;){a||(c=""),a=!1;let p;if((f=(u=this.options.extensions)==null?void 0:u.inline)!=null&&f.some(g=>(p=g.call({lexer:this},t,r))?(t=t.substring(p.raw.length),r.push(p),!0):!1))continue;if(p=this.tokenizer.escape(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.tag(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.link(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(p.raw.length);const g=r.at(-1);p.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(p=this.tokenizer.emStrong(t,n,c)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.codespan(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.br(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.del(t)){t=t.substring(p.raw.length),r.push(p);continue}if(p=this.tokenizer.autolink(t)){t=t.substring(p.raw.length),r.push(p);continue}if(!this.state.inLink&&(p=this.tokenizer.url(t))){t=t.substring(p.raw.length),r.push(p);continue}let v=t;if((d=this.options.extensions)!=null&&d.startInline){let g=1/0;const x=t.slice(1);let w;this.options.extensions.startInline.forEach(C=>{w=C.call({lexer:this},x),typeof w=="number"&&w>=0&&(g=Math.min(g,w))}),g<1/0&&g>=0&&(v=t.substring(0,g+1))}if(p=this.tokenizer.inlineText(v)){t=t.substring(p.raw.length),p.raw.slice(-1)!=="_"&&(c=p.raw.slice(-1)),a=!0;const g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=p.raw,g.text+=p.text):r.push(p);continue}if(t){const g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},os=class{constructor(e){mr(this,"options"),mr(this,"parser"),this.options=e||Mo}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(Qr.notSpaceStart))==null?void 0:a[0],o=e.replace(Qr.endingNewline,"")+`
122
+ `;return n?'<pre><code class="language-'+Pn(n)+'">'+(r?o:Pn(o,!0))+`</code></pre>
123
+ `:"<pre><code>"+(r?o:Pn(o,!0))+`</code></pre>
124
+ `}blockquote({tokens:e}){return`<blockquote>
125
+ ${this.parser.parse(e)}</blockquote>
126
+ `}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
127
+ `}hr(e){return`<hr>
128
+ `}list(e){const t=e.ordered,r=e.start;let n="";for(let c=0;c<e.items.length;c++){const u=e.items[c];n+=this.listitem(u)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
129
+ `+n+"</"+o+`>
130
+ `}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+" "+Pn(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>
131
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
132
+ `}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 c=0;c<a.length;c++)r+=this.tablecell(a[c]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
133
+ <thead>
134
+ `+t+`</thead>
135
+ `+n+`</table>
136
+ `}tablerow({text:e}){return`<tr>
137
+ ${e}</tr>
138
+ `}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
139
+ `}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>${Pn(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=vh(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Pn(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=vh(e);if(o===null)return Pn(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Pn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Pn(e.text)}},Mu=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""}},Un=class R0{constructor(t){mr(this,"options"),mr(this,"renderer"),mr(this,"textRenderer"),this.options=t||Mo,this.options.renderer=this.options.renderer||new os,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mu}static parse(t,r){return new R0(r).parse(t)}static parseInline(t,r){return new R0(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[u.type]){const d=u,p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=p||"";continue}}const f=u;switch(f.type){case"space":{n+=this.renderer.space(f);continue}case"hr":{n+=this.renderer.hr(f);continue}case"heading":{n+=this.renderer.heading(f);continue}case"code":{n+=this.renderer.code(f);continue}case"table":{n+=this.renderer.table(f);continue}case"blockquote":{n+=this.renderer.blockquote(f);continue}case"list":{n+=this.renderer.list(f);continue}case"html":{n+=this.renderer.html(f);continue}case"paragraph":{n+=this.renderer.paragraph(f);continue}case"text":{let d=f,p=this.renderer.text(d);for(;c+1<t.length&&t[c+1].type==="text";)d=t[++c],p+=`
140
+ `+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:p,text:p,tokens:[{type:"text",raw:p,text:p,escaped:!0}]}):n+=p;continue}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[u.type]){const d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){n+=d||"";continue}}const f=u;switch(f.type){case"escape":{n+=r.text(f);break}case"html":{n+=r.html(f);break}case"link":{n+=r.link(f);break}case"image":{n+=r.image(f);break}case"strong":{n+=r.strong(f);break}case"em":{n+=r.em(f);break}case"codespan":{n+=r.codespan(f);break}case"br":{n+=r.br(f);break}case"del":{n+=r.del(f);break}case"text":{n+=r.text(f);break}default:{const d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},jl,$i=(jl=class{constructor(e){mr(this,"options"),mr(this,"block"),this.options=e||Mo}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Vn.lex:Vn.lexInline}provideParser(){return this.block?Un.parse:Un.parseInline}},mr(jl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),jl),_y=class{constructor(...e){mr(this,"defaults",ku()),mr(this,"options",this.setOptions),mr(this,"parse",this.parseMarkdown(!0)),mr(this,"parseInline",this.parseMarkdown(!1)),mr(this,"Parser",Un),mr(this,"Renderer",os),mr(this,"TextRenderer",Mu),mr(this,"Lexer",Vn),mr(this,"Tokenizer",ns),mr(this,"Hooks",$i),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 c=a;for(const u of c.header)r=r.concat(this.walkTokens(u.tokens,t));for(const u of c.rows)for(const f of u)r=r.concat(this.walkTokens(f.tokens,t));break}case"list":{const c=a;r=r.concat(this.walkTokens(c.items,t));break}default:{const c=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{const f=c[u].flat(1/0);r=r.concat(this.walkTokens(f,t))}):c.tokens&&(r=r.concat(this.walkTokens(c.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(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=a.apply(this,c)),u}: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 os(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 c=a,u=r.renderer[c],f=o[c];o[c]=(...d)=>{let p=u.apply(o,d);return p===!1&&(p=f.apply(o,d)),p||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new ns(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 c=a,u=r.tokenizer[c],f=o[c];o[c]=(...d)=>{let p=u.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new $i;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 c=a,u=r.hooks[c],f=o[c];$i.passThroughHooks.has(a)?o[c]=d=>{if(this.defaults.async)return Promise.resolve(u.call(o,d)).then(v=>f.call(o,v));const p=u.call(o,d);return f.call(o,p)}:o[c]=(...d)=>{let p=u.apply(o,d);return p===!1&&(p=f.apply(o,d)),p}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(c){let u=[];return u.push(a.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Vn.lex(e,t??this.defaults)}parser(e,t){return Un.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 c=o.hooks?o.hooks.provideLexer():e?Vn.lex:Vn.lexInline,u=o.hooks?o.hooks.provideParser():e?Un.parse:Un.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(f=>c(f,o)).then(f=>o.hooks?o.hooks.processAllTokens(f):f).then(f=>o.walkTokens?Promise.all(this.walkTokens(f,o.walkTokens)).then(()=>f):f).then(f=>u(f,o)).then(f=>o.hooks?o.hooks.postprocess(f):f).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let f=c(t,o);o.hooks&&(f=o.hooks.processAllTokens(f)),o.walkTokens&&this.walkTokens(f,o.walkTokens);let d=u(f,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(f){return a(f)}}}onError(e,t){return r=>{if(r.message+=`
141
+ Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Pn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},To=new _y;function ar(e,t){return To.parse(e,t)}ar.options=ar.setOptions=function(e){return To.setOptions(e),ar.defaults=To.defaults,Rp(ar.defaults),ar};ar.getDefaults=ku;ar.defaults=Mo;ar.use=function(...e){return To.use(...e),ar.defaults=To.defaults,Rp(ar.defaults),ar};ar.walkTokens=function(e,t){return To.walkTokens(e,t)};ar.parseInline=To.parseInline;ar.Parser=Un;ar.parser=Un.parse;ar.Renderer=os;ar.TextRenderer=Mu;ar.Lexer=Vn;ar.lexer=Vn.lex;ar.Tokenizer=ns;ar.Hooks=$i;ar.parse=ar;ar.options;ar.setOptions;ar.use;ar.walkTokens;ar.parseInline;Un.parse;Vn.lex;var ln=function(){return ln=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},ln.apply(this,arguments)};function Wa(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 xr="-ms-",Ra="-moz-",lr="-webkit-",Wp="comm",xs="rule",Ou="decl",Ly="@import",Vp="@keyframes",Ky="@layer",Up=Math.abs,Ru=String.fromCharCode,$0=Object.assign;function Hy(e,t){return Lr(e,0)^45?(((t<<2^Lr(e,0))<<2^Lr(e,1))<<2^Lr(e,2))<<2^Lr(e,3):0}function Xp(e){return e.trim()}function qn(e,t){return(e=t.exec(e))?e[0]:e}function jt(e,t,r){return e.replace(t,r)}function Pi(e,t,r){return e.indexOf(t,r)}function Lr(e,t){return e.charCodeAt(t)|0}function ea(e,t,r){return e.slice(t,r)}function zn(e){return e.length}function Yp(e){return e.length}function ka(e,t){return t.push(e),e}function qy(e,t){return e.map(t).join("")}function xh(e,t){return e.filter(function(r){return!qn(r,t)})}var ws=1,ta=1,Gp=0,xn=0,Mr=0,ca="";function Cs(e,t,r,n,o,a,c,u){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:ws,column:ta,length:c,return:"",siblings:u}}function to(e,t){return $0(Cs("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Io(e){for(;e.root;)e=to(e.root,{children:[e]});ka(e,e.siblings)}function Wy(){return Mr}function Vy(){return Mr=xn>0?Lr(ca,--xn):0,ta--,Mr===10&&(ta=1,ws--),Mr}function An(){return Mr=xn<Gp?Lr(ca,xn++):0,ta++,Mr===10&&(ta=1,ws++),Mr}function Eo(){return Lr(ca,xn)}function zi(){return xn}function Ds(e,t){return ea(ca,e,t)}function P0(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 Uy(e){return ws=ta=1,Gp=zn(ca=e),xn=0,[]}function Xy(e){return ca="",e}function _l(e){return Xp(Ds(xn-1,z0(e===91?e+2:e===40?e+1:e)))}function Yy(e){for(;(Mr=Eo())&&Mr<33;)An();return P0(e)>2||P0(Mr)>3?"":" "}function Gy(e,t){for(;--t&&An()&&!(Mr<48||Mr>102||Mr>57&&Mr<65||Mr>70&&Mr<97););return Ds(e,zi()+(t<6&&Eo()==32&&An()==32))}function z0(e){for(;An();)switch(Mr){case e:return xn;case 34:case 39:e!==34&&e!==39&&z0(Mr);break;case 40:e===41&&z0(e);break;case 92:An();break}return xn}function Zy(e,t){for(;An()&&e+Mr!==57&&!(e+Mr===84&&Eo()===47););return"/*"+Ds(t,xn-1)+"*"+Ru(e===47?e:An())}function Jy(e){for(;!P0(Eo());)An();return Ds(e,xn)}function Qy(e){return Xy(Ii("",null,null,null,[""],e=Uy(e),0,[0],e))}function Ii(e,t,r,n,o,a,c,u,f){for(var d=0,p=0,v=c,g=0,x=0,w=0,C=1,m=1,E=1,N=0,B="",$=o,A=a,_=n,P=B;m;)switch(w=N,N=An()){case 40:if(w!=108&&Lr(P,v-1)==58){Pi(P+=jt(_l(N),"&","&\f"),"&\f",Up(d?u[d-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:P+=_l(N);break;case 9:case 10:case 13:case 32:P+=Yy(w);break;case 92:P+=Gy(zi()-1,7);continue;case 47:switch(Eo()){case 42:case 47:ka(ex(Zy(An(),zi()),t,r,f),f);break;default:P+="/"}break;case 123*C:u[d++]=zn(P)*E;case 125*C:case 59:case 0:switch(N){case 0:case 125:m=0;case 59+p:E==-1&&(P=jt(P,/\f/g,"")),x>0&&zn(P)-v&&ka(x>32?Ch(P+";",n,r,v-1,f):Ch(jt(P," ","")+";",n,r,v-2,f),f);break;case 59:P+=";";default:if(ka(_=wh(P,t,r,d,p,o,u,B,$=[],A=[],v,a),a),N===123)if(p===0)Ii(P,t,_,_,$,a,v,u,A);else switch(g===99&&Lr(P,3)===110?100:g){case 100:case 108:case 109:case 115:Ii(e,_,_,n&&ka(wh(e,_,_,0,0,o,u,B,o,$=[],v,A),A),o,A,v,u,n?$:A);break;default:Ii(P,_,_,_,[""],A,0,u,A)}}d=p=x=0,C=E=1,B=P="",v=c;break;case 58:v=1+zn(P),x=w;default:if(C<1){if(N==123)--C;else if(N==125&&C++==0&&Vy()==125)continue}switch(P+=Ru(N),N*C){case 38:E=p>0?1:(P+="\f",-1);break;case 44:u[d++]=(zn(P)-1)*E,E=1;break;case 64:Eo()===45&&(P+=_l(An())),g=Eo(),p=v=zn(B=P+=Jy(zi())),N++;break;case 45:w===45&&zn(P)==2&&(C=0)}}return a}function wh(e,t,r,n,o,a,c,u,f,d,p,v){for(var g=o-1,x=o===0?a:[""],w=Yp(x),C=0,m=0,E=0;C<n;++C)for(var N=0,B=ea(e,g+1,g=Up(m=c[C])),$=e;N<w;++N)($=Xp(m>0?x[N]+" "+B:jt(B,/&\f/g,x[N])))&&(f[E++]=$);return Cs(e,t,r,o===0?xs:u,f,d,p,v)}function ex(e,t,r,n){return Cs(e,t,r,Wp,Ru(Wy()),ea(e,2,-2),0,n)}function Ch(e,t,r,n,o){return Cs(e,t,r,Ou,ea(e,0,n),ea(e,n+1,-1),n,o)}function Zp(e,t,r){switch(Hy(e,t)){case 5103:return lr+"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 lr+e+e;case 4789:return Ra+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return lr+e+Ra+e+xr+e+e;case 5936:switch(Lr(e,t+11)){case 114:return lr+e+xr+jt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return lr+e+xr+jt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return lr+e+xr+jt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return lr+e+xr+e+e;case 6165:return lr+e+xr+"flex-"+e+e;case 5187:return lr+e+jt(e,/(\w+).+(:[^]+)/,lr+"box-$1$2"+xr+"flex-$1$2")+e;case 5443:return lr+e+xr+"flex-item-"+jt(e,/flex-|-self/g,"")+(qn(e,/flex-|baseline/)?"":xr+"grid-row-"+jt(e,/flex-|-self/g,""))+e;case 4675:return lr+e+xr+"flex-line-pack"+jt(e,/align-content|flex-|-self/g,"")+e;case 5548:return lr+e+xr+jt(e,"shrink","negative")+e;case 5292:return lr+e+xr+jt(e,"basis","preferred-size")+e;case 6060:return lr+"box-"+jt(e,"-grow","")+lr+e+xr+jt(e,"grow","positive")+e;case 4554:return lr+jt(e,/([^-])(transform)/g,"$1"+lr+"$2")+e;case 6187:return jt(jt(jt(e,/(zoom-|grab)/,lr+"$1"),/(image-set)/,lr+"$1"),e,"")+e;case 5495:case 3959:return jt(e,/(image-set\([^]*)/,lr+"$1$`$1");case 4968:return jt(jt(e,/(.+:)(flex-)?(.*)/,lr+"box-pack:$3"+xr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+lr+e+e;case 4200:if(!qn(e,/flex-|baseline/))return xr+"grid-column-align"+ea(e,t)+e;break;case 2592:case 3360:return xr+jt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,qn(n.props,/grid-\w+-end/)})?~Pi(e+(r=r[t].value),"span",0)?e:xr+jt(e,"-start","")+e+xr+"grid-row-span:"+(~Pi(r,"span",0)?qn(r,/\d+/):+qn(r,/\d+/)-+qn(e,/\d+/))+";":xr+jt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return qn(n.props,/grid-\w+-start/)})?e:xr+jt(jt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return jt(e,/(.+)-inline(.+)/,lr+"$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(zn(e)-1-t>6)switch(Lr(e,t+1)){case 109:if(Lr(e,t+4)!==45)break;case 102:return jt(e,/(.+:)(.+)-([^]+)/,"$1"+lr+"$2-$3$1"+Ra+(Lr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Pi(e,"stretch",0)?Zp(jt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return jt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,c,u,f,d){return xr+o+":"+a+d+(c?xr+o+"-span:"+(u?f:+f-+a)+d:"")+e});case 4949:if(Lr(e,t+6)===121)return jt(e,":",":"+lr)+e;break;case 6444:switch(Lr(e,Lr(e,14)===45?18:11)){case 120:return jt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+lr+(Lr(e,14)===45?"inline-":"")+"box$3$1"+lr+"$2$3$1"+xr+"$2box$3")+e;case 100:return jt(e,":",":"+xr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return jt(e,"scroll-","scroll-snap-")+e}return e}function as(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function tx(e,t,r,n){switch(e.type){case Ky:if(e.children.length)break;case Ly:case Ou:return e.return=e.return||e.value;case Wp:return"";case Vp:return e.return=e.value+"{"+as(e.children,n)+"}";case xs:if(!zn(e.value=e.props.join(",")))return""}return zn(r=as(e.children,n))?e.return=e.value+"{"+r+"}":""}function rx(e){var t=Yp(e);return function(r,n,o,a){for(var c="",u=0;u<t;u++)c+=e[u](r,n,o,a)||"";return c}}function nx(e){return function(t){t.root||(t=t.return)&&e(t)}}function ox(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ou:e.return=Zp(e.value,e.length,r);return;case Vp:return as([to(e,{value:jt(e.value,"@","@"+lr)})],n);case xs:if(e.length)return qy(r=e.props,function(o){switch(qn(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Io(to(e,{props:[jt(o,/:(read-\w+)/,":"+Ra+"$1")]})),Io(to(e,{props:[o]})),$0(e,{props:xh(r,n)});break;case"::placeholder":Io(to(e,{props:[jt(o,/:(plac\w+)/,":"+lr+"input-$1")]})),Io(to(e,{props:[jt(o,/:(plac\w+)/,":"+Ra+"$1")]})),Io(to(e,{props:[jt(o,/:(plac\w+)/,xr+"input-$1")]})),Io(to(e,{props:[o]})),$0(e,{props:xh(r,n)});break}return""})}}var ax={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},ra=typeof process<"u"&&dn!==void 0&&(dn.REACT_APP_SC_ATTR||dn.SC_ATTR)||"data-styled",Jp="active",Qp="data-styled-version",ks="6.1.19",$u=`/*!sc*/
142
+ `,is=typeof window<"u"&&typeof document<"u",ix=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&dn!==void 0&&dn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&dn.REACT_APP_SC_DISABLE_SPEEDY!==""?dn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&dn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&dn!==void 0&&dn.SC_DISABLE_SPEEDY!==void 0&&dn.SC_DISABLE_SPEEDY!==""&&dn.SC_DISABLE_SPEEDY!=="false"&&dn.SC_DISABLE_SPEEDY),Es=Object.freeze([]),na=Object.freeze({});function sx(e,t,r){return r===void 0&&(r=na),e.theme!==r.theme&&e.theme||t||r.theme}var em=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"]),lx=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,ux=/(^-|-$)/g;function Dh(e){return e.replace(lx,"-").replace(ux,"")}var cx=/(a)(d)/gi,Si=52,kh=function(e){return String.fromCharCode(e+(e>25?39:97))};function I0(e){var t,r="";for(t=Math.abs(e);t>Si;t=t/Si|0)r=kh(t%Si)+r;return(kh(t%Si)+r).replace(cx,"$1-$2")}var Ll,tm=5381,Ho=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},rm=function(e){return Ho(tm,e)};function nm(e){return I0(rm(e)>>>0)}function dx(e){return e.displayName||e.name||"Component"}function Kl(e){return typeof e=="string"&&!0}var om=typeof Symbol=="function"&&Symbol.for,am=om?Symbol.for("react.memo"):60115,fx=om?Symbol.for("react.forward_ref"):60112,hx={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},px={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},im={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},mx=((Ll={})[fx]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ll[am]=im,Ll);function Eh(e){return("type"in(t=e)&&t.type.$$typeof)===am?im:"$$typeof"in e?mx[e.$$typeof]:hx;var t}var gx=Object.defineProperty,vx=Object.getOwnPropertyNames,Sh=Object.getOwnPropertySymbols,bx=Object.getOwnPropertyDescriptor,yx=Object.getPrototypeOf,Ah=Object.prototype;function sm(e,t,r){if(typeof t!="string"){if(Ah){var n=yx(t);n&&n!==Ah&&sm(e,n,r)}var o=vx(t);Sh&&(o=o.concat(Sh(t)));for(var a=Eh(e),c=Eh(t),u=0;u<o.length;++u){var f=o[u];if(!(f in px||r&&r[f]||c&&f in c||a&&f in a)){var d=bx(t,f);try{gx(e,f,d)}catch{}}}}return e}function oa(e){return typeof e=="function"}function Pu(e){return typeof e=="object"&&"styledComponentId"in e}function xo(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function j0(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Va(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function _0(e,t,r){if(r===void 0&&(r=!1),!r&&!Va(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=_0(e[n],t[n]);else if(Va(t))for(var n in t)e[n]=_0(e[n],t[n]);return e}function zu(e,t){Object.defineProperty(e,"toString",{value:t})}function ti(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 xx=(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 ti(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var c=o;c<a;c++)this.groupSizes[c]=0}for(var u=this.indexOfGroup(t+1),f=(c=0,r.length);c<f;c++)this.tag.insertRule(u,r[c])&&(this.groupSizes[t]++,u++)},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,c=o;c<a;c++)r+="".concat(this.tag.getRule(c)).concat($u);return r},e})(),ji=new Map,ss=new Map,_i=1,Ai=function(e){if(ji.has(e))return ji.get(e);for(;ss.has(_i);)_i++;var t=_i++;return ji.set(e,t),ss.set(t,e),t},wx=function(e,t){_i=t+1,ji.set(e,t),ss.set(t,e)},Cx="style[".concat(ra,"][").concat(Qp,'="').concat(ks,'"]'),Dx=new RegExp("^".concat(ra,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),kx=function(e,t,r){for(var n,o=r.split(","),a=0,c=o.length;a<c;a++)(n=o[a])&&e.registerName(t,n)},Ex=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split($u),o=[],a=0,c=n.length;a<c;a++){var u=n[a].trim();if(u){var f=u.match(Dx);if(f){var d=0|parseInt(f[1],10),p=f[2];d!==0&&(wx(p,d),kx(e,p,f[3]),e.getTag().insertRules(d,o)),o.length=0}else o.push(u)}}},Bh=function(e){for(var t=document.querySelectorAll(Cx),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(ra)!==Jp&&(Ex(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function Sx(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var lm=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(u){var f=Array.from(u.querySelectorAll("style[".concat(ra,"]")));return f[f.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(ra,Jp),n.setAttribute(Qp,ks);var c=Sx();return c&&n.setAttribute("nonce",c),r.insertBefore(n,a),n},Ax=(function(){function e(t){this.element=lm(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 c=n[o];if(c.ownerNode===r)return c}throw ti(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})(),Bx=(function(){function e(t){this.element=lm(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})(),Fx=(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})(),Fh=is,Nx={isServer:!is,useCSSOMInjection:!ix},um=(function(){function e(t,r,n){t===void 0&&(t=na),r===void 0&&(r={});var o=this;this.options=ln(ln({},Nx),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&is&&Fh&&(Fh=!1,Bh(this)),zu(this,function(){return(function(a){for(var c=a.getTag(),u=c.length,f="",d=function(v){var g=(function(E){return ss.get(E)})(v);if(g===void 0)return"continue";var x=a.names.get(g),w=c.getGroup(v);if(x===void 0||!x.size||w.length===0)return"continue";var C="".concat(ra,".g").concat(v,'[id="').concat(g,'"]'),m="";x!==void 0&&x.forEach(function(E){E.length>0&&(m+="".concat(E,","))}),f+="".concat(w).concat(C,'{content:"').concat(m,'"}').concat($u)},p=0;p<u;p++)d(p);return f})(o)})}return e.registerId=function(t){return Ai(t)},e.prototype.rehydrate=function(){!this.server&&is&&Bh(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(ln(ln({},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 Fx(o):n?new Ax(o):new Bx(o)})(this.options),new xx(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(Ai(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(Ai(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Ai(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),Tx=/&/g,Mx=/^\s*\/\/.*$/gm;function cm(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=cm(r.children,t)),r})}function Ox(e){var t,r,n,o=na,a=o.options,c=a===void 0?na:a,u=o.plugins,f=u===void 0?Es:u,d=function(g,x,w){return w.startsWith(r)&&w.endsWith(r)&&w.replaceAll(r,"").length>0?".".concat(t):g},p=f.slice();p.push(function(g){g.type===xs&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(Tx,r).replace(n,d))}),c.prefix&&p.push(ox),p.push(tx);var v=function(g,x,w,C){x===void 0&&(x=""),w===void 0&&(w=""),C===void 0&&(C="&"),t=C,r=x,n=new RegExp("\\".concat(r,"\\b"),"g");var m=g.replace(Mx,""),E=Qy(w||x?"".concat(w," ").concat(x," { ").concat(m," }"):m);c.namespace&&(E=cm(E,c.namespace));var N=[];return as(E,rx(p.concat(nx(function(B){return N.push(B)})))),N};return v.hash=f.length?f.reduce(function(g,x){return x.name||ti(15),Ho(g,x.name)},tm).toString():"",v}var Rx=new um,L0=Ox(),dm=qe.createContext({shouldForwardProp:void 0,styleSheet:Rx,stylis:L0});dm.Consumer;qe.createContext(void 0);function Nh(){return ho(dm)}var fm=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=L0);var c=n.name+a.hash;o.hasNameForId(n.id,c)||o.insertRules(n.id,c,a(n.rules,c,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,zu(this,function(){throw ti(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=L0),this.name+t.hash},e})(),$x=function(e){return e>="A"&&e<="Z"};function Th(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;$x(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var hm=function(e){return e==null||e===!1||e===""},pm=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!hm(a)&&(Array.isArray(a)&&a.isCss||oa(a)?n.push("".concat(Th(o),":"),a,";"):Va(a)?n.push.apply(n,Wa(Wa(["".concat(o," {")],pm(a),!1),["}"],!1)):n.push("".concat(Th(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in ax||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function So(e,t,r,n){if(hm(e))return[];if(Pu(e))return[".".concat(e.styledComponentId)];if(oa(e)){if(!oa(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return So(o,t,r,n)}var a;return e instanceof fm?r?(e.inject(r,n),[e.getName(n)]):[e]:Va(e)?pm(e):Array.isArray(e)?Array.prototype.concat.apply(Es,e.map(function(c){return So(c,t,r,n)})):[e.toString()]}function Px(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(oa(r)&&!Pu(r))return!1}return!0}var zx=rm(ks),Ix=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&Px(t),this.componentId=r,this.baseHash=Ho(zx,r),this.baseStyle=n,um.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=xo(o,this.staticRulesId);else{var a=j0(So(this.rules,t,r,n)),c=I0(Ho(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,c)){var u=n(a,".".concat(c),void 0,this.componentId);r.insertRules(this.componentId,c,u)}o=xo(o,c),this.staticRulesId=c}else{for(var f=Ho(this.baseHash,n.hash),d="",p=0;p<this.rules.length;p++){var v=this.rules[p];if(typeof v=="string")d+=v;else if(v){var g=j0(So(v,t,r,n));f=Ho(f,g+p),d+=g}}if(d){var x=I0(f>>>0);r.hasNameForId(this.componentId,x)||r.insertRules(this.componentId,x,n(d,".".concat(x),void 0,this.componentId)),o=xo(o,x)}}return o},e})(),mm=qe.createContext(void 0);mm.Consumer;var Hl={};function jx(e,t,r){var n=Pu(e),o=e,a=!Kl(e),c=t.attrs,u=c===void 0?Es:c,f=t.componentId,d=f===void 0?(function($,A){var _=typeof $!="string"?"sc":Dh($);Hl[_]=(Hl[_]||0)+1;var P="".concat(_,"-").concat(nm(ks+_+Hl[_]));return A?"".concat(A,"-").concat(P):P})(t.displayName,t.parentComponentId):f,p=t.displayName,v=p===void 0?(function($){return Kl($)?"styled.".concat($):"Styled(".concat(dx($),")")})(e):p,g=t.displayName&&t.componentId?"".concat(Dh(t.displayName),"-").concat(t.componentId):t.componentId||d,x=n&&o.attrs?o.attrs.concat(u).filter(Boolean):u,w=t.shouldForwardProp;if(n&&o.shouldForwardProp){var C=o.shouldForwardProp;if(t.shouldForwardProp){var m=t.shouldForwardProp;w=function($,A){return C($,A)&&m($,A)}}else w=C}var E=new Ix(r,g,n?o.componentStyle:void 0);function N($,A){return(function(_,P,q){var O=_.attrs,V=_.componentStyle,L=_.defaultProps,Z=_.foldedComponentIds,Y=_.styledComponentId,j=_.target,K=qe.useContext(mm),U=Nh(),X=_.shouldForwardProp||U.shouldForwardProp,ee=sx(P,K,L)||na,R=(function(Fe,G,ve){for(var de,re=ln(ln({},G),{className:void 0,theme:ve}),he=0;he<Fe.length;he+=1){var we=oa(de=Fe[he])?de(re):de;for(var be in we)re[be]=be==="className"?xo(re[be],we[be]):be==="style"?ln(ln({},re[be]),we[be]):we[be]}return G.className&&(re.className=xo(re.className,G.className)),re})(O,P,ee),se=R.as||j,ye={};for(var Ce in R)R[Ce]===void 0||Ce[0]==="$"||Ce==="as"||Ce==="theme"&&R.theme===ee||(Ce==="forwardedAs"?ye.as=R.forwardedAs:X&&!X(Ce,se)||(ye[Ce]=R[Ce]));var Se=(function(Fe,G){var ve=Nh(),de=Fe.generateAndInjectStyles(G,ve.styleSheet,ve.stylis);return de})(V,R),ue=xo(Z,Y);return Se&&(ue+=" "+Se),R.className&&(ue+=" "+R.className),ye[Kl(se)&&!em.has(se)?"class":"className"]=ue,q&&(ye.ref=q),Ki(se,ye)})(B,$,A)}N.displayName=v;var B=qe.forwardRef(N);return B.attrs=x,B.componentStyle=E,B.displayName=v,B.shouldForwardProp=w,B.foldedComponentIds=n?xo(o.foldedComponentIds,o.styledComponentId):"",B.styledComponentId=g,B.target=n?o.target:e,Object.defineProperty(B,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function($){this._foldedDefaultProps=n?(function(A){for(var _=[],P=1;P<arguments.length;P++)_[P-1]=arguments[P];for(var q=0,O=_;q<O.length;q++)_0(A,O[q],!0);return A})({},o.defaultProps,$):$}}),zu(B,function(){return".".concat(B.styledComponentId)}),a&&sm(B,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),B}function Mh(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 Oh=function(e){return Object.assign(e,{isCss:!0})};function Ss(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(oa(e)||Va(e))return Oh(So(Mh(Es,Wa([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?So(n):Oh(So(Mh(n,t)))}function K0(e,t,r){if(r===void 0&&(r=na),!t)throw ti(1,t);var n=function(o){for(var a=[],c=1;c<arguments.length;c++)a[c-1]=arguments[c];return e(t,r,Ss.apply(void 0,Wa([o],a,!1)))};return n.attrs=function(o){return K0(e,t,ln(ln({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return K0(e,t,ln(ln({},r),o))},n}var gm=function(e){return K0(jx,e)},Ke=gm;em.forEach(function(e){Ke[e]=gm(e)});function vm(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=j0(Ss.apply(void 0,Wa([e],t,!1))),o=nm(n);return new fm(o,n)}const _x=Ke.span.attrs({className:"unified-rich-text-template-container"})`
143
+ display: inline-block;
144
+ min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
145
+ padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
146
+ margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
147
+ border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
148
+ border: none !important;
149
+ cursor: pointer;
150
+ transition: all 0.2s;
151
+ font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
152
+ user-select: none;
153
+ font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
154
+ line-height: 2;
155
+ width: auto; /* 让宽度根据内容自动调整 */
156
+ min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
157
+ min-height: ${e=>{var c,u,f,d;const t=((u=(c=e.$styles)==null?void 0:c.templateField)==null?void 0:u.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
158
+
159
+ /* 高度自适应 */
160
+ height: auto; /* 允许高度根据内容自动调整 */
161
+ white-space: normal; /* 允许换行 */
162
+ box-sizing: border-box; /* 确保padding和border包含在宽度内 */
163
+ overflow: visible; /* 确保内容不被隐藏 */
164
+ word-wrap: break-word; /* 允许长单词换行 */
165
+ max-width: 100%; /* 限制在容器宽度内 */
166
+
167
+ /* 使用传入的样式配置 */
168
+ background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
169
+ color: #055AFF;
170
+ border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
171
+
172
+ ${e=>{var t,r;return e.$isEditing&&`
173
+ background-color: white !important;
174
+ color: #055AFF !important;
175
+ border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
176
+ outline: none;
177
+ min-width: 30px;
178
+ `}}
179
+
180
+ &:hover {
181
+ opacity: 0.8;
182
+ }
183
+ `,Lx=Ke.input.attrs({className:"unified-rich-text-template-input"})`
184
+ background: white;
185
+ border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
186
+ border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
187
+ padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
188
+ margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
189
+ min-width: ${"30px"};
190
+ width: ${e=>{var d,p,v,g;const t=e.$value.length;if(t===0)return((p=(d=e.$styles)==null?void 0:d.templateField)==null?void 0:p.minWidth)||"120px";const r=((g=(v=e.$styles)==null?void 0:v.templateField)==null?void 0:g.padding)||"2px 6.2px",n=r.split(" ").map(x=>parseInt(x)),o=n.length===2?n[1]:n[0],a=12.5,c=20,u=t*a+o*2+c,f=Math.min(Math.max(u,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:c,calculatedWidth:u,maxWidth:e.$maxWidth,finalWidth:f,inputValue:e.$value}),f+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
191
+ height: ${e=>{var c,u,f,d;const t=((u=(c=e.$styles)==null?void 0:c.templateField)==null?void 0:u.padding)||"2px 6px",r=((d=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:d.fontSize)||"14px",n=t.split(" ").map(p=>parseInt(p)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
192
+ font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
193
+ font-family: inherit;
194
+ outline: none;
195
+ color: #055AFF;
196
+ line-height: 2;
197
+ box-sizing: border-box;
198
+ white-space: nowrap; /* 防止内部换行 */
199
+ overflow: hidden; /* 隐藏超出部分 */
200
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
201
+
202
+ &:focus {
203
+ border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
204
+ 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;
205
+ }
206
+ `,bm=Xa(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var _,P,q,O,V,L,Z,Y,j,K,U,X;const c=Mp(),[u,f]=At(!1),[d,p]=At(e.value||""),[v,g]=At(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[x,w]=At(600),C=Yt(null),m=St(()=>{try{const ee=document.querySelector('[data-slate-editor="true"]');if(ee){const R=ee.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||ee.parentElement;if(R){const se=R.clientWidth,ye=se-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",se,"\u53EF\u7528\u5BBD\u5EA6:",ye),Math.max(ye,200)}}return 600}catch(ee){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",ee),600}},[]);Jt(()=>{g(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const ee=m();w(ee)},[e.value,e.placeholder,m]);const E=St(()=>{f(!0),p(e.value||""),setTimeout(()=>{C.current&&(C.current.focus(),C.current.select())},0)},[e.value]),N=St(ee=>{const R=ee.target.value;p(R)},[]),B=St(()=>{const ee=Oe.findPath(c,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",ee),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",d),Le.setNodes(c,{value:d},{at:ee});const R=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";g(R);const se=c.children[ee[0]];if(se&&"children"in se){const ye=se.children[ee[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",ye)}f(!1)},[c,e,d]),$=St(()=>{B()},[B]),A=St(ee=>{ee.key==="Enter"?(ee.preventDefault(),B()):ee.key==="Escape"&&(ee.preventDefault(),p(e.value||""),f(!1))},[B,e.value]);return u?H.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[H.jsx(Lx,{ref:C,value:d,onChange:N,onBlur:$,onKeyDown:A,placeholder:"",$styles:n,$value:d,$maxWidth:x,style:{backgroundColor:"white",color:((_=n==null?void 0:n.templateField)==null?void 0:_.textColor)||"#055AFF",border:`2px solid ${((P=n==null?void 0:n.templateField)==null?void 0:P.borderColor)||"#84ADFF"}`,minWidth:((q=n==null?void 0:n.templateField)==null?void 0:q.minWidth)||"120px"}}),r]}):H.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[H.jsxs(_x,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:v.length,onClick:E,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(O=n==null?void 0:n.templateField)==null?void 0:O.backgroundColor,borderColor:(V=n==null?void 0:n.templateField)==null?void 0:V.borderColor,borderRadius:(L=n==null?void 0:n.templateField)==null?void 0:L.borderRadius,padding:(Z=n==null?void 0:n.templateField)==null?void 0:Z.padding,margin:(Y=n==null?void 0:n.templateField)==null?void 0:Y.margin,fontSize:(j=n==null?void 0:n.templateField)==null?void 0:j.fontSize,fontWeight:(K=n==null?void 0:n.templateField)==null?void 0:K.fontWeight,minWidth:(U=n==null?void 0:n.templateField)==null?void 0:U.minWidth,color:(X=n==null?void 0:n.templateField)==null?void 0:X.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:v,displayValueLength:v.length,contentLength:v.length}),null),v]}),H.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});bm.displayName="TemplateField";const Kx=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return H.jsxs("div",{...t,className:"think-container",children:[H.jsx("div",{className:"think-indicator"}),H.jsx("div",{className:"think-content py-2",children:H.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})})]})},ym=qe.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:o},a)=>{var $;const[c,u]=At(null),[f,d]=At(!0),[p,v]=At(1),[g,x]=At(10);Jt(()=>{if(!c){if(!n){d(!0);try{const A=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(A)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const A=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",A);let _=null,P=null,q;for(const L of A){const Z=L==null?void 0:L.reply;if(!(Z!=null&&Z.databaseReference))continue;const Y=Z.databaseReference;console.log(Y,"123123123jk123lk12j3l12jl3"),Y!=null&&Y.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",Y.retrieveSqlData.filePath),q=Y.retrieveSqlData.filePath);let j=Y;if(typeof Y=="string")try{j=JSON.parse(Y)}catch{}if(!j)continue;const K=Array.isArray(j)?j:[j],U=K.findIndex(R=>(R==null?void 0:R.id)===t.id),X=U>=0?K[U]:null;if(console.log("~~~~~~~~~~~~~~~",X),X){_=X,P=X.retrieveSqlData||X.retrieve_table_data||X.retrieveTableData;break}const ee=K.find(R=>{var se,ye;return(((ye=(se=R==null?void 0:R.retrieveSqlData)==null?void 0:se.preData)==null?void 0:ye.length)||0)>0});!_&&ee&&(_=ee,P=ee.retrieveSqlData||ee.retrieve_table_data||ee.retrieveTableData)}if(!_||!P){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const O=Array.isArray(P==null?void 0:P.preData)?P.preData[0]:null;if(!O){console.warn("Matched item has no preData"),d(!1);return}const V={columns:(O.columns||[]).map(L=>({key:L.key,title:L.title})),rows:O.data||O.rows||[],total:(P==null?void 0:P.total)||0,fetchUrl:(P==null?void 0:P.fetchUrl)||"/index/knowledgeBase/file/stream",source:q||(P==null?void 0:P.source)||(_==null?void 0:_.source)};u(V),d(!1)}catch(A){console.error("Init preData parsing failed:",A),d(!1)}}},[t.id,c,n]),Jt(()=>{const A=_=>{try{const P=(_==null?void 0:_.detail)||{},q=P==null?void 0:P.id;if(!q||String(q)!==String(t.id))return;const O=P.databaseReference;if(!O)return;let V=O;if(typeof O=="string")try{V=JSON.parse(O)}catch{}if(!V)return;const L=Array.isArray(V)?V:[V],Z=L.findIndex(X=>String(X==null?void 0:X.id)===String(t.id)),Y=Z>=0?L[Z]:null;if(!Y)return;const j=(Y==null?void 0:Y.retrieveSqlData)||(Y==null?void 0:Y.retrieve_table_data)||(Y==null?void 0:Y.retrieveTableData),K=Array.isArray(j==null?void 0:j.preData)?j.preData[0]:null;if(!K)return;const U={columns:(K.columns||[]).map(X=>({key:X.key,title:X.title})),rows:K.data||K.rows||[],total:(j==null?void 0:j.total)||0,fetchUrl:(j==null?void 0:j.fetchUrl)||"/index/knowledgeBase/file/stream",source:(Y==null?void 0:Y.source)||(j==null?void 0:j.source)};u(U),d(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",A),()=>{window.removeEventListener("retrieve-sql-data:data-response",A)}},[t.id]);const w=A=>{if(!A||A.length===0)return[];const _=A.find(P=>P&&typeof P=="object")||{};return Object.keys(_).map(P=>({key:P,title:P}))},C=(A,_)=>{v(A),_&&x(_);const P=q=>{let O=null;if(q&&Array.isArray(q.columns)&&Array.isArray(q.rows))O={columns:q.columns,rows:q.rows,total:Number(q.total)||0,fetchUrl:q.fetchUrl||(c==null?void 0:c.fetchUrl)||"",source:q.source||(c==null?void 0:c.source)};else if(q&&Array.isArray(q.data)){const V=q.data;O={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:w(V),rows:V,total:Number(q.totalCount??q.total??(c==null?void 0:c.total)??V.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source},typeof q.currentPage=="number"&&v(q.currentPage),typeof q.pageSize=="number"&&x(q.pageSize)}else if(Array.isArray(q)){const V=q;O={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:w(V),rows:V,total:Number((c==null?void 0:c.total)??V.length)||0,fetchUrl:(c==null?void 0:c.fetchUrl)||"",source:c==null?void 0:c.source}}if(!O){console.warn("replacePredataFunction received unsupported data format:",q);return}console.log("Replacing table data with:",O),u(O)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:A,pageSize:_||g,fetchUrl:c==null?void 0:c.fetchUrl,total:c==null?void 0:c.total,source:c==null?void 0:c.source,replacePredataFunction:P})},m=A=>c!=null&&c.rows?Math.max(...c.rows.map(_=>{const P=_[A];return P?String(P).length:0})):0,E=((($=c==null?void 0:c.columns)==null?void 0:$.length)||0)===1,N=(c==null?void 0:c.columns.map((A,_)=>({title:A.title||A.key,dataIndex:A.key,key:A.key,render:P=>{const q=P==null||P===""?"-":P;return E?H.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(q)}):q},...E?{width:void 0}:{}})))||[],B=(c==null?void 0:c.rows.map((A,_)=>({key:_,...A})))||[];return H.jsx("div",{...e,ref:a,className:"retrieve-sql-data-container my-4",children:f?H.jsxs("div",{className:"flex items-center justify-center py-8",children:[H.jsx(a1,{size:"large"}),H.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):c?H.jsxs("div",{className:"retrieve-sql-data-content",children:[o!==null&&(()=>{const A=String(o).length;let _="12px",P="24px",q="24px";return A===2?(_="9px",P="22px",q="24px"):A===3?(_="8px",P="24px",q="24px"):A>=4&&(_="8px",P="24px",q="30px"),H.jsxs("div",{className:"mb-2 flex items-center",children:[H.jsx("span",{className:"bg-orange-100 text-orange-600 rounded font-medium flex items-center justify-center",style:{width:P,height:P,minWidth:q,fontSize:_,lineHeight:1},children:o}),H.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]})})(),H.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:H.jsx(Yn,{columns:N.map((A,_)=>({...A,...E?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:_===0?160:void 0,minWidth:120,maxWidth:_===0?180:300,fixed:_===0?"left":void 0,ellipsis:{showTitle:!0}},render:P=>{if(P==null)return"-";const q=String(P);if(E)return H.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:q,children:q});const O=m(A.key);let V="200px";return _===0?V="80px":O<=8?V="100px":O<=15?V="150px":O<=25?V="200px":O<=40?V="250px":V="300px",H.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:V,display:"inline-block",cursor:"default"},title:q,children:q})}})),dataSource:B,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:E?"100%":"1000px"},scroll:{x:E?void 0:"max-content",y:400}})}),c.total>g&&H.jsx("div",{className:"flex justify-center mt-3",children:H.jsx(i1,{current:p,pageSize:g,total:c.total,onChange:C,onShowSizeChange:C,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):H.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});ym.displayName="RetrieveSqlDataElement";var Li={exports:{}},ql={exports:{}},Wl,Rh;function Hx(){if(Rh)return Wl;Rh=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wl=e,Wl}var Vl,$h;function qx(){if($h)return Vl;$h=1;var e=Hx();function t(){}function r(){}return r.resetWarningCache=t,Vl=function(){function n(c,u,f,d,p,v){if(v!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}n.isRequired=n;function o(){return n}var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},Vl}var Ph;function Wx(){return Ph||(Ph=1,ql.exports=qx()()),ql.exports}var H0={exports:{}},Vx=H0.exports,zh;function Ux(){return zh||(zh=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:Vx,function(){return(function(){var r={};(function(){r.d=function(s,i){for(var l in i)r.o(i,l)&&!r.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:i[l]})}})(),(function(){r.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)}})();var n={};r.d(n,{default:function(){return gg}});class o{constructor(i,l){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let h="KaTeX parse error: "+i,b,k;const F=l&&l.loc;if(F&&F.start<=F.end){const W=F.lexer.input;b=F.start,k=F.end,b===W.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const te=W.slice(b,k).replace(/[^]/g,"$&\u0332");let fe;b>15?fe="\u2026"+W.slice(b-15,b):fe=W.slice(0,b);let pe;k+15<W.length?pe=W.slice(k,k+15)+"\u2026":pe=W.slice(k),h+=fe+te+pe}const z=new Error(h);return z.name="ParseError",z.__proto__=o.prototype,z.position=b,b!=null&&k!=null&&(z.length=k-b),z.rawMessage=i,z}}o.prototype.__proto__=Error.prototype;var a=o;const c=function(s,i){return s===void 0?i:s},u=/([A-Z])/g,f=function(s){return s.replace(u,"-$1").toLowerCase()},d={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},p=/[&><"']/g;function v(s){return String(s).replace(p,i=>d[i])}const g=function(s){return s.type==="ordgroup"||s.type==="color"?s.body.length===1?g(s.body[0]):s:s.type==="font"?g(s.body):s},x=function(s){const i=g(s);return i.type==="mathord"||i.type==="textord"||i.type==="atom"},w=function(s){if(!s)throw new Error("Expected non-null, but got "+String(s));return s};var C={deflt:c,escape:v,hyphenate:f,getBaseElem:g,isCharacterBox:x,protocolFromUrl:function(s){const i=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(s);return i?i[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(i[1])?null:i[1].toLowerCase():"_relative"}};const m={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:s=>"#"+s},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(s,i)=>(i.push(s),i)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:s=>Math.max(0,s),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:s=>Math.max(0,s),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:s=>Math.max(0,s),cli:"-e, --max-expand <n>",cliProcessor:s=>s==="Infinity"?1/0:parseInt(s)},globalGroup:{type:"boolean",cli:!1}};function E(s){if(s.default)return s.default;const i=s.type,l=Array.isArray(i)?i[0]:i;if(typeof l!="string")return l.enum[0];switch(l){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class N{constructor(i){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,i=i||{};for(const l in m)if(m.hasOwnProperty(l)){const h=m[l];this[l]=i[l]!==void 0?h.processor?h.processor(i[l]):i[l]:E(h)}}reportNonstrict(i,l,h){let b=this.strict;if(typeof b=="function"&&(b=b(i,l,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(l+" ["+i+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+i+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+i+"]"))}}useStrictBehavior(i,l,h){let b=this.strict;if(typeof b=="function")try{b=b(i,l,h)}catch{b="error"}return!b||b==="ignore"?!1:b===!0||b==="error"?!0:b==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+i+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+i+"]")),!1)}isTrusted(i){if(i.url&&!i.protocol){const l=C.protocolFromUrl(i.url);if(l==null)return!1;i.protocol=l}return!!(typeof this.trust=="function"?this.trust(i):this.trust)}}class B{constructor(i,l,h){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=i,this.size=l,this.cramped=h}sup(){return Z[Y[this.id]]}sub(){return Z[j[this.id]]}fracNum(){return Z[K[this.id]]}fracDen(){return Z[U[this.id]]}cramp(){return Z[X[this.id]]}text(){return Z[ee[this.id]]}isTight(){return this.size>=2}}const $=0,A=1,_=2,P=3,q=4,O=5,V=6,L=7,Z=[new B($,0,!1),new B(A,0,!0),new B(_,1,!1),new B(P,1,!0),new B(q,2,!1),new B(O,2,!0),new B(V,3,!1),new B(L,3,!0)],Y=[q,O,q,O,V,L,V,L],j=[O,O,O,O,L,L,L,L],K=[_,P,q,O,V,L,V,L],U=[P,P,O,O,L,L,L,L],X=[A,A,P,P,O,O,L,L],ee=[$,A,_,P,_,P,_,P];var R={DISPLAY:Z[$],TEXT:Z[_],SCRIPT:Z[q],SCRIPTSCRIPT:Z[V]};const se=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function ye(s){for(let i=0;i<se.length;i++){const l=se[i];for(let h=0;h<l.blocks.length;h++){const b=l.blocks[h];if(s>=b[0]&&s<=b[1])return l.name}}return null}const Ce=[];se.forEach(s=>s.blocks.forEach(i=>Ce.push(...i)));function Se(s){for(let i=0;i<Ce.length;i+=2)if(s>=Ce[i]&&s<=Ce[i+1])return!0;return!1}const ue=80,Fe=function(s,i){return"M95,"+(622+s+i)+`
207
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
208
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
209
+ c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
210
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
211
+ c69,-144,104.5,-217.7,106.5,-221
212
+ l`+s/2.075+" -"+s+`
213
+ c5.3,-9.3,12,-14,20,-14
214
+ H400000v`+(40+s)+`H845.2724
215
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
216
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
217
+ M`+(834+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},G=function(s,i){return"M263,"+(601+s+i)+`c0.7,0,18,39.7,52,119
218
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
219
+ c340,-704.7,510.7,-1060.3,512,-1067
220
+ l`+s/2.084+" -"+s+`
221
+ c4.7,-7.3,11,-11,19,-11
222
+ H40000v`+(40+s)+`H1012.3
223
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
224
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
225
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
226
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
227
+ M`+(1001+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},ve=function(s,i){return"M983 "+(10+s+i)+`
228
+ l`+s/3.13+" -"+s+`
229
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+s)+`
230
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
231
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
232
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
233
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
234
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
235
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
236
+ M`+(1001+s)+" "+i+"h400000v"+(40+s)+"h-400000z"},de=function(s,i){return"M424,"+(2398+s+i)+`
237
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
238
+ c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
239
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
240
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
241
+ l`+s/4.223+" -"+s+`c4,-6.7,10,-10,18,-10 H400000
242
+ v`+(40+s)+`H1014.6
243
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
244
+ c-2,6,-10,9,-24,9
245
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+s)+" "+i+`
246
+ h400000v`+(40+s)+"h-400000z"},re=function(s,i){return"M473,"+(2713+s+i)+`
247
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+s/5.298+" -"+s+`
248
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+s)+`H1017.7
249
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
250
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
251
+ c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
252
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
253
+ 606zM`+(1001+s)+" "+i+"h400000v"+(40+s)+"H1017.7z"},he=function(s){const i=s/2;return"M400000 "+s+" H0 L"+i+" 0 l65 45 L145 "+(s-80)+" H400000z"},we=function(s,i,l){const h=l-54-i-s;return"M702 "+(s+i)+"H400000"+(40+s)+`
254
+ H742v`+h+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
255
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
256
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
257
+ 219 661 l218 661zM702 `+i+"H400000v"+(40+s)+"H742z"},be=function(s,i,l){i=1e3*i;let h="";switch(s){case"sqrtMain":h=Fe(i,ue);break;case"sqrtSize1":h=G(i,ue);break;case"sqrtSize2":h=ve(i,ue);break;case"sqrtSize3":h=de(i,ue);break;case"sqrtSize4":h=re(i,ue);break;case"sqrtTall":h=we(i,ue,l)}return h},Ee=function(s,i){switch(s){case"\u239C":return"M291 0 H417 V"+i+" H291z M291 0 H417 V"+i+" H291z";case"\u2223":return"M145 0 H188 V"+i+" H145z M145 0 H188 V"+i+" H145z";case"\u2225":return"M145 0 H188 V"+i+" H145z M145 0 H188 V"+i+" H145z"+("M367 0 H410 V"+i+" H367z M367 0 H410 V"+i+" H367z");case"\u239F":return"M457 0 H583 V"+i+" H457z M457 0 H583 V"+i+" H457z";case"\u23A2":return"M319 0 H403 V"+i+" H319z M319 0 H403 V"+i+" H319z";case"\u23A5":return"M263 0 H347 V"+i+" H263z M263 0 H347 V"+i+" H263z";case"\u23AA":return"M384 0 H504 V"+i+" H384z M384 0 H504 V"+i+" H384z";case"\u23D0":return"M312 0 H355 V"+i+" H312z M312 0 H355 V"+i+" H312z";case"\u2016":return"M257 0 H300 V"+i+" H257z M257 0 H300 V"+i+" H257z"+("M478 0 H521 V"+i+" H478z M478 0 H521 V"+i+" H478z");default:return""}},De={doubleleftarrow:`M262 157
258
+ l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
259
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
260
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
261
+ c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
262
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
263
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
264
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
265
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
266
+ -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
267
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
268
+ -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
269
+ -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
270
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
271
+ c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
272
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
273
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
274
+ -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
275
+ c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
276
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
277
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
278
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
279
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
280
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
281
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
282
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
283
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
284
+ H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
285
+ 435 0h399565z`,leftgroupunder:`M400000 262
286
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
287
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
288
+ -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
289
+ -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
290
+ -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
291
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
292
+ -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
293
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
294
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
295
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
296
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
297
+ -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
298
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
299
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
300
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
301
+ -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
302
+ -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
303
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
304
+ M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
305
+ M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
306
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
307
+ c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
308
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
309
+ M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
310
+ c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
311
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
312
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
313
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
314
+ c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
315
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
316
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
317
+ -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
318
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
319
+ m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
320
+ 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
321
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
322
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
323
+ c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
324
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
325
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
326
+ 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
327
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
328
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
329
+ c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
330
+ -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
331
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
332
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
333
+ -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
334
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
335
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
336
+ -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
337
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
338
+ c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
339
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
340
+ -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
341
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
342
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
343
+ -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
344
+ -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
345
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
346
+ -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
347
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
348
+ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
349
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
350
+ -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
351
+ -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
352
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
353
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
354
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
355
+ m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
356
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
357
+ -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
358
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
359
+ M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
360
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
361
+ -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
362
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
363
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
364
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
365
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
366
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
367
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
368
+ c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
369
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
370
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
371
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
372
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
373
+ -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
374
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
375
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
376
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
377
+ -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
378
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
379
+ c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
380
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
381
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
382
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
383
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
384
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
385
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
386
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
387
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
388
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
389
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
390
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
391
+ -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
392
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
393
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
394
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
395
+ c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
396
+ -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
397
+ -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
398
+ -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
399
+ -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
400
+ -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
401
+ -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
402
+ -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
403
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
404
+ c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
405
+ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
406
+ 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
407
+ s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
408
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
409
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
410
+ -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
411
+ 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
412
+ -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
413
+ -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
414
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
415
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
416
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
417
+ c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
418
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
419
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
420
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
421
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
422
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
423
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
424
+ M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
425
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
426
+ 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
427
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
428
+ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
429
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
430
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
431
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
432
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ae=function(s,i){switch(s){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+i+` v1759 h347 v-84
433
+ H403z M403 1759 V0 H319 V1759 v`+i+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+i+` v1759 H0 v84 H347z
434
+ M347 1759 V0 H263 V1759 v`+i+" v1759 h84z";case"vert":return"M145 15 v585 v"+i+` v585 c2.667,10,9.667,15,21,15
435
+ c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
436
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+i+" v585 h43z";case"doublevert":return"M145 15 v585 v"+i+` v585 c2.667,10,9.667,15,21,15
437
+ c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
438
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+i+` v585 h43z
439
+ M367 15 v585 v`+i+` v585 c2.667,10,9.667,15,21,15
440
+ c10,0,16.667,-5,20,-15 v-585 v`+-i+` v-585 c-2.667,-10,-9.667,-15,-21,-15
441
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+i+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+i+` v1715 h263 v84 H319z
442
+ MM319 602 V0 H403 V602 v`+i+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+i+` v1799 H0 v-84 H319z
443
+ MM319 602 V0 H403 V602 v`+i+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+i+` v602 h84z
444
+ M403 1759 V0 H319 V1759 v`+i+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+i+` v602 h84z
445
+ M347 1759 V0 h-84 V1759 v`+i+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
446
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
447
+ -36,557 l0,`+(i+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
448
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
449
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
450
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
451
+ l0,-`+(i+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
452
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
453
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
454
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(i+9)+`
455
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
456
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
457
+ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
458
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
459
+ l0,-`+(i+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
460
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};var Me={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const je={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ve={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function ht(s,i){Me[s]=i}function it(s,i,l){if(!Me[i])throw new Error("Font metrics not found for font: "+i+".");let h=s.charCodeAt(0),b=Me[i][h];if(!b&&s[0]in Ve&&(h=Ve[s[0]].charCodeAt(0),b=Me[i][h]),!b&&l==="text"&&Se(h)&&(b=Me[i][77]),b)return{depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]}}const Te={};function Ie(s){let i;if(s>=5?i=0:s>=3?i=1:i=2,!Te[i]){const l=Te[i]={cssEmPerMu:je.quad[i]/18};for(const h in je)je.hasOwnProperty(h)&&(l[h]=je[h][i])}return Te[i]}const Ze=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],dt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],at=function(s,i){return i.size<2?s:Ze[s-1][i.size-1]};class et{constructor(i){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=i.style,this.color=i.color,this.size=i.size||et.BASESIZE,this.textSize=i.textSize||this.size,this.phantom=!!i.phantom,this.font=i.font||"",this.fontFamily=i.fontFamily||"",this.fontWeight=i.fontWeight||"",this.fontShape=i.fontShape||"",this.sizeMultiplier=dt[this.size-1],this.maxSize=i.maxSize,this.minRuleThickness=i.minRuleThickness,this._fontMetrics=void 0}extend(i){const l={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const h in i)i.hasOwnProperty(h)&&(l[h]=i[h]);return new et(l)}havingStyle(i){return this.style===i?this:this.extend({style:i,size:at(this.textSize,i)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(i){return this.size===i&&this.textSize===i?this:this.extend({style:this.style.text(),size:i,textSize:i,sizeMultiplier:dt[i-1]})}havingBaseStyle(i){i=i||this.style.text();const l=at(et.BASESIZE,i);return this.size===l&&this.textSize===et.BASESIZE&&this.style===i?this:this.extend({style:i,size:l})}havingBaseSizing(){let i;switch(this.style.id){case 4:case 5:i=3;break;case 6:case 7:i=1;break;default:i=6}return this.extend({style:this.style.text(),size:i})}withColor(i){return this.extend({color:i})}withPhantom(){return this.extend({phantom:!0})}withFont(i){return this.extend({font:i})}withTextFontFamily(i){return this.extend({fontFamily:i,font:""})}withTextFontWeight(i){return this.extend({fontWeight:i,font:""})}withTextFontShape(i){return this.extend({fontShape:i,font:""})}sizingClasses(i){return i.size!==this.size?["sizing","reset-size"+i.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==et.BASESIZE?["sizing","reset-size"+this.size,"size"+et.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ie(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}et.BASESIZE=6;var Tt=et;const xt={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},yt={ex:!0,em:!0,mu:!0},pt=function(s){return typeof s!="string"&&(s=s.unit),s in xt||s in yt||s==="ex"},ze=function(s,i){let l;if(s.unit in xt)l=xt[s.unit]/i.fontMetrics().ptPerEm/i.sizeMultiplier;else if(s.unit==="mu")l=i.fontMetrics().cssEmPerMu;else{let h;if(i.style.isTight()?h=i.havingStyle(i.style.text()):h=i,s.unit==="ex")l=h.fontMetrics().xHeight;else if(s.unit==="em")l=h.fontMetrics().quad;else throw new a("Invalid unit: '"+s.unit+"'");h!==i&&(l*=h.sizeMultiplier/i.sizeMultiplier)}return Math.min(s.number*l,i.maxSize)},ce=function(s){return+s.toFixed(4)+"em"},bt=function(s){return s.filter(i=>i).join(" ")},Pt=function(s,i,l){if(this.classes=s||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=l||{},i){i.style.isTight()&&this.classes.push("mtight");const h=i.getColor();h&&(this.style.color=h)}},Vt=function(s){const i=document.createElement(s);i.className=bt(this.classes);for(const l in this.style)this.style.hasOwnProperty(l)&&(i.style[l]=this.style[l]);for(const l in this.attributes)this.attributes.hasOwnProperty(l)&&i.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)i.appendChild(this.children[l].toNode());return i},$t=/[\s"'>/=\x00-\x1f]/,ir=function(s){let i="<"+s;this.classes.length&&(i+=' class="'+C.escape(bt(this.classes))+'"');let l="";for(const h in this.style)this.style.hasOwnProperty(h)&&(l+=C.hyphenate(h)+":"+this.style[h]+";");l&&(i+=' style="'+C.escape(l)+'"');for(const h in this.attributes)if(this.attributes.hasOwnProperty(h)){if($t.test(h))throw new a("Invalid attribute name '"+h+"'");i+=" "+h+'="'+C.escape(this.attributes[h])+'"'}i+=">";for(let h=0;h<this.children.length;h++)i+=this.children[h].toMarkup();return i+="</"+s+">",i};class Ct{constructor(i,l,h,b){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Pt.call(this,i,h,b),this.children=l||[]}setAttribute(i,l){this.attributes[i]=l}hasClass(i){return this.classes.includes(i)}toNode(){return Vt.call(this,"span")}toMarkup(){return ir.call(this,"span")}}class Mt{constructor(i,l,h,b){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Pt.call(this,l,b),this.children=h||[],this.setAttribute("href",i)}setAttribute(i,l){this.attributes[i]=l}hasClass(i){return this.classes.includes(i)}toNode(){return Vt.call(this,"a")}toMarkup(){return ir.call(this,"a")}}class nr{constructor(i,l,h){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=l,this.src=i,this.classes=["mord"],this.style=h}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createElement("img");i.src=this.src,i.alt=this.alt,i.className="mord";for(const l in this.style)this.style.hasOwnProperty(l)&&(i.style[l]=this.style[l]);return i}toMarkup(){let i='<img src="'+C.escape(this.src)+'"'+(' alt="'+C.escape(this.alt)+'"'),l="";for(const h in this.style)this.style.hasOwnProperty(h)&&(l+=C.hyphenate(h)+":"+this.style[h]+";");return l&&(i+=' style="'+C.escape(l)+'"'),i+="'/>",i}}const hr={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"};class Dt{constructor(i,l,h,b,k,F,z,W){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=i,this.height=l||0,this.depth=h||0,this.italic=b||0,this.skew=k||0,this.width=F||0,this.classes=z||[],this.style=W||{},this.maxFontSize=0;const te=ye(this.text.charCodeAt(0));te&&this.classes.push(te+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=hr[this.text])}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createTextNode(this.text);let l=null;this.italic>0&&(l=document.createElement("span"),l.style.marginRight=ce(this.italic)),this.classes.length>0&&(l=l||document.createElement("span"),l.className=bt(this.classes));for(const h in this.style)this.style.hasOwnProperty(h)&&(l=l||document.createElement("span"),l.style[h]=this.style[h]);return l?(l.appendChild(i),l):i}toMarkup(){let i=!1,l="<span";this.classes.length&&(i=!0,l+=' class="',l+=C.escape(bt(this.classes)),l+='"');let h="";this.italic>0&&(h+="margin-right:"+this.italic+"em;");for(const k in this.style)this.style.hasOwnProperty(k)&&(h+=C.hyphenate(k)+":"+this.style[k]+";");h&&(i=!0,l+=' style="'+C.escape(h)+'"');const b=C.escape(this.text);return i?(l+=">",l+=b,l+="</span>",l):b}}class Kt{constructor(i,l){this.children=void 0,this.attributes=void 0,this.children=i||[],this.attributes=l||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&i.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)i.appendChild(this.children[l].toNode());return i}toMarkup(){let i='<svg xmlns="http://www.w3.org/2000/svg"';for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(i+=" "+l+'="'+C.escape(this.attributes[l])+'"');i+=">";for(let l=0;l<this.children.length;l++)i+=this.children[l].toMarkup();return i+="</svg>",i}}class Ut{constructor(i,l){this.pathName=void 0,this.alternate=void 0,this.pathName=i,this.alternate=l}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?i.setAttribute("d",this.alternate):i.setAttribute("d",De[this.pathName]),i}toMarkup(){return this.alternate?'<path d="'+C.escape(this.alternate)+'"/>':'<path d="'+C.escape(De[this.pathName])+'"/>'}}class Fr{constructor(i){this.attributes=void 0,this.attributes=i||{}}toNode(){const i=document.createElementNS("http://www.w3.org/2000/svg","line");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&i.setAttribute(l,this.attributes[l]);return i}toMarkup(){let i="<line";for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(i+=" "+l+'="'+C.escape(this.attributes[l])+'"');return i+="/>",i}}function Ir(s){if(s instanceof Dt)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function jr(s){if(s instanceof Ct)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const Or={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Rr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},dr={math:{},text:{}};var It=dr;function y(s,i,l,h,b,k){dr[s][b]={font:i,group:l,replace:h},k&&h&&(dr[s][h]=dr[s][b])}const D="math",Re="text",T="main",J="ams",or="accent-token",tt="bin",_e="close",wt="inner",rt="mathord",Nt="op-token",sr="open",Nr="punct",Q="rel",gr="spacing",oe="textord";y(D,T,Q,"\u2261","\\equiv",!0),y(D,T,Q,"\u227A","\\prec",!0),y(D,T,Q,"\u227B","\\succ",!0),y(D,T,Q,"\u223C","\\sim",!0),y(D,T,Q,"\u22A5","\\perp"),y(D,T,Q,"\u2AAF","\\preceq",!0),y(D,T,Q,"\u2AB0","\\succeq",!0),y(D,T,Q,"\u2243","\\simeq",!0),y(D,T,Q,"\u2223","\\mid",!0),y(D,T,Q,"\u226A","\\ll",!0),y(D,T,Q,"\u226B","\\gg",!0),y(D,T,Q,"\u224D","\\asymp",!0),y(D,T,Q,"\u2225","\\parallel"),y(D,T,Q,"\u22C8","\\bowtie",!0),y(D,T,Q,"\u2323","\\smile",!0),y(D,T,Q,"\u2291","\\sqsubseteq",!0),y(D,T,Q,"\u2292","\\sqsupseteq",!0),y(D,T,Q,"\u2250","\\doteq",!0),y(D,T,Q,"\u2322","\\frown",!0),y(D,T,Q,"\u220B","\\ni",!0),y(D,T,Q,"\u221D","\\propto",!0),y(D,T,Q,"\u22A2","\\vdash",!0),y(D,T,Q,"\u22A3","\\dashv",!0),y(D,T,Q,"\u220B","\\owns"),y(D,T,Nr,".","\\ldotp"),y(D,T,Nr,"\u22C5","\\cdotp"),y(D,T,oe,"#","\\#"),y(Re,T,oe,"#","\\#"),y(D,T,oe,"&","\\&"),y(Re,T,oe,"&","\\&"),y(D,T,oe,"\u2135","\\aleph",!0),y(D,T,oe,"\u2200","\\forall",!0),y(D,T,oe,"\u210F","\\hbar",!0),y(D,T,oe,"\u2203","\\exists",!0),y(D,T,oe,"\u2207","\\nabla",!0),y(D,T,oe,"\u266D","\\flat",!0),y(D,T,oe,"\u2113","\\ell",!0),y(D,T,oe,"\u266E","\\natural",!0),y(D,T,oe,"\u2663","\\clubsuit",!0),y(D,T,oe,"\u2118","\\wp",!0),y(D,T,oe,"\u266F","\\sharp",!0),y(D,T,oe,"\u2662","\\diamondsuit",!0),y(D,T,oe,"\u211C","\\Re",!0),y(D,T,oe,"\u2661","\\heartsuit",!0),y(D,T,oe,"\u2111","\\Im",!0),y(D,T,oe,"\u2660","\\spadesuit",!0),y(D,T,oe,"\xA7","\\S",!0),y(Re,T,oe,"\xA7","\\S"),y(D,T,oe,"\xB6","\\P",!0),y(Re,T,oe,"\xB6","\\P"),y(D,T,oe,"\u2020","\\dag"),y(Re,T,oe,"\u2020","\\dag"),y(Re,T,oe,"\u2020","\\textdagger"),y(D,T,oe,"\u2021","\\ddag"),y(Re,T,oe,"\u2021","\\ddag"),y(Re,T,oe,"\u2021","\\textdaggerdbl"),y(D,T,_e,"\u23B1","\\rmoustache",!0),y(D,T,sr,"\u23B0","\\lmoustache",!0),y(D,T,_e,"\u27EF","\\rgroup",!0),y(D,T,sr,"\u27EE","\\lgroup",!0),y(D,T,tt,"\u2213","\\mp",!0),y(D,T,tt,"\u2296","\\ominus",!0),y(D,T,tt,"\u228E","\\uplus",!0),y(D,T,tt,"\u2293","\\sqcap",!0),y(D,T,tt,"\u2217","\\ast"),y(D,T,tt,"\u2294","\\sqcup",!0),y(D,T,tt,"\u25EF","\\bigcirc",!0),y(D,T,tt,"\u2219","\\bullet",!0),y(D,T,tt,"\u2021","\\ddagger"),y(D,T,tt,"\u2240","\\wr",!0),y(D,T,tt,"\u2A3F","\\amalg"),y(D,T,tt,"&","\\And"),y(D,T,Q,"\u27F5","\\longleftarrow",!0),y(D,T,Q,"\u21D0","\\Leftarrow",!0),y(D,T,Q,"\u27F8","\\Longleftarrow",!0),y(D,T,Q,"\u27F6","\\longrightarrow",!0),y(D,T,Q,"\u21D2","\\Rightarrow",!0),y(D,T,Q,"\u27F9","\\Longrightarrow",!0),y(D,T,Q,"\u2194","\\leftrightarrow",!0),y(D,T,Q,"\u27F7","\\longleftrightarrow",!0),y(D,T,Q,"\u21D4","\\Leftrightarrow",!0),y(D,T,Q,"\u27FA","\\Longleftrightarrow",!0),y(D,T,Q,"\u21A6","\\mapsto",!0),y(D,T,Q,"\u27FC","\\longmapsto",!0),y(D,T,Q,"\u2197","\\nearrow",!0),y(D,T,Q,"\u21A9","\\hookleftarrow",!0),y(D,T,Q,"\u21AA","\\hookrightarrow",!0),y(D,T,Q,"\u2198","\\searrow",!0),y(D,T,Q,"\u21BC","\\leftharpoonup",!0),y(D,T,Q,"\u21C0","\\rightharpoonup",!0),y(D,T,Q,"\u2199","\\swarrow",!0),y(D,T,Q,"\u21BD","\\leftharpoondown",!0),y(D,T,Q,"\u21C1","\\rightharpoondown",!0),y(D,T,Q,"\u2196","\\nwarrow",!0),y(D,T,Q,"\u21CC","\\rightleftharpoons",!0),y(D,J,Q,"\u226E","\\nless",!0),y(D,J,Q,"\uE010","\\@nleqslant"),y(D,J,Q,"\uE011","\\@nleqq"),y(D,J,Q,"\u2A87","\\lneq",!0),y(D,J,Q,"\u2268","\\lneqq",!0),y(D,J,Q,"\uE00C","\\@lvertneqq"),y(D,J,Q,"\u22E6","\\lnsim",!0),y(D,J,Q,"\u2A89","\\lnapprox",!0),y(D,J,Q,"\u2280","\\nprec",!0),y(D,J,Q,"\u22E0","\\npreceq",!0),y(D,J,Q,"\u22E8","\\precnsim",!0),y(D,J,Q,"\u2AB9","\\precnapprox",!0),y(D,J,Q,"\u2241","\\nsim",!0),y(D,J,Q,"\uE006","\\@nshortmid"),y(D,J,Q,"\u2224","\\nmid",!0),y(D,J,Q,"\u22AC","\\nvdash",!0),y(D,J,Q,"\u22AD","\\nvDash",!0),y(D,J,Q,"\u22EA","\\ntriangleleft"),y(D,J,Q,"\u22EC","\\ntrianglelefteq",!0),y(D,J,Q,"\u228A","\\subsetneq",!0),y(D,J,Q,"\uE01A","\\@varsubsetneq"),y(D,J,Q,"\u2ACB","\\subsetneqq",!0),y(D,J,Q,"\uE017","\\@varsubsetneqq"),y(D,J,Q,"\u226F","\\ngtr",!0),y(D,J,Q,"\uE00F","\\@ngeqslant"),y(D,J,Q,"\uE00E","\\@ngeqq"),y(D,J,Q,"\u2A88","\\gneq",!0),y(D,J,Q,"\u2269","\\gneqq",!0),y(D,J,Q,"\uE00D","\\@gvertneqq"),y(D,J,Q,"\u22E7","\\gnsim",!0),y(D,J,Q,"\u2A8A","\\gnapprox",!0),y(D,J,Q,"\u2281","\\nsucc",!0),y(D,J,Q,"\u22E1","\\nsucceq",!0),y(D,J,Q,"\u22E9","\\succnsim",!0),y(D,J,Q,"\u2ABA","\\succnapprox",!0),y(D,J,Q,"\u2246","\\ncong",!0),y(D,J,Q,"\uE007","\\@nshortparallel"),y(D,J,Q,"\u2226","\\nparallel",!0),y(D,J,Q,"\u22AF","\\nVDash",!0),y(D,J,Q,"\u22EB","\\ntriangleright"),y(D,J,Q,"\u22ED","\\ntrianglerighteq",!0),y(D,J,Q,"\uE018","\\@nsupseteqq"),y(D,J,Q,"\u228B","\\supsetneq",!0),y(D,J,Q,"\uE01B","\\@varsupsetneq"),y(D,J,Q,"\u2ACC","\\supsetneqq",!0),y(D,J,Q,"\uE019","\\@varsupsetneqq"),y(D,J,Q,"\u22AE","\\nVdash",!0),y(D,J,Q,"\u2AB5","\\precneqq",!0),y(D,J,Q,"\u2AB6","\\succneqq",!0),y(D,J,Q,"\uE016","\\@nsubseteqq"),y(D,J,tt,"\u22B4","\\unlhd"),y(D,J,tt,"\u22B5","\\unrhd"),y(D,J,Q,"\u219A","\\nleftarrow",!0),y(D,J,Q,"\u219B","\\nrightarrow",!0),y(D,J,Q,"\u21CD","\\nLeftarrow",!0),y(D,J,Q,"\u21CF","\\nRightarrow",!0),y(D,J,Q,"\u21AE","\\nleftrightarrow",!0),y(D,J,Q,"\u21CE","\\nLeftrightarrow",!0),y(D,J,Q,"\u25B3","\\vartriangle"),y(D,J,oe,"\u210F","\\hslash"),y(D,J,oe,"\u25BD","\\triangledown"),y(D,J,oe,"\u25CA","\\lozenge"),y(D,J,oe,"\u24C8","\\circledS"),y(D,J,oe,"\xAE","\\circledR"),y(Re,J,oe,"\xAE","\\circledR"),y(D,J,oe,"\u2221","\\measuredangle",!0),y(D,J,oe,"\u2204","\\nexists"),y(D,J,oe,"\u2127","\\mho"),y(D,J,oe,"\u2132","\\Finv",!0),y(D,J,oe,"\u2141","\\Game",!0),y(D,J,oe,"\u2035","\\backprime"),y(D,J,oe,"\u25B2","\\blacktriangle"),y(D,J,oe,"\u25BC","\\blacktriangledown"),y(D,J,oe,"\u25A0","\\blacksquare"),y(D,J,oe,"\u29EB","\\blacklozenge"),y(D,J,oe,"\u2605","\\bigstar"),y(D,J,oe,"\u2222","\\sphericalangle",!0),y(D,J,oe,"\u2201","\\complement",!0),y(D,J,oe,"\xF0","\\eth",!0),y(Re,T,oe,"\xF0","\xF0"),y(D,J,oe,"\u2571","\\diagup"),y(D,J,oe,"\u2572","\\diagdown"),y(D,J,oe,"\u25A1","\\square"),y(D,J,oe,"\u25A1","\\Box"),y(D,J,oe,"\u25CA","\\Diamond"),y(D,J,oe,"\xA5","\\yen",!0),y(Re,J,oe,"\xA5","\\yen",!0),y(D,J,oe,"\u2713","\\checkmark",!0),y(Re,J,oe,"\u2713","\\checkmark"),y(D,J,oe,"\u2136","\\beth",!0),y(D,J,oe,"\u2138","\\daleth",!0),y(D,J,oe,"\u2137","\\gimel",!0),y(D,J,oe,"\u03DD","\\digamma",!0),y(D,J,oe,"\u03F0","\\varkappa"),y(D,J,sr,"\u250C","\\@ulcorner",!0),y(D,J,_e,"\u2510","\\@urcorner",!0),y(D,J,sr,"\u2514","\\@llcorner",!0),y(D,J,_e,"\u2518","\\@lrcorner",!0),y(D,J,Q,"\u2266","\\leqq",!0),y(D,J,Q,"\u2A7D","\\leqslant",!0),y(D,J,Q,"\u2A95","\\eqslantless",!0),y(D,J,Q,"\u2272","\\lesssim",!0),y(D,J,Q,"\u2A85","\\lessapprox",!0),y(D,J,Q,"\u224A","\\approxeq",!0),y(D,J,tt,"\u22D6","\\lessdot"),y(D,J,Q,"\u22D8","\\lll",!0),y(D,J,Q,"\u2276","\\lessgtr",!0),y(D,J,Q,"\u22DA","\\lesseqgtr",!0),y(D,J,Q,"\u2A8B","\\lesseqqgtr",!0),y(D,J,Q,"\u2251","\\doteqdot"),y(D,J,Q,"\u2253","\\risingdotseq",!0),y(D,J,Q,"\u2252","\\fallingdotseq",!0),y(D,J,Q,"\u223D","\\backsim",!0),y(D,J,Q,"\u22CD","\\backsimeq",!0),y(D,J,Q,"\u2AC5","\\subseteqq",!0),y(D,J,Q,"\u22D0","\\Subset",!0),y(D,J,Q,"\u228F","\\sqsubset",!0),y(D,J,Q,"\u227C","\\preccurlyeq",!0),y(D,J,Q,"\u22DE","\\curlyeqprec",!0),y(D,J,Q,"\u227E","\\precsim",!0),y(D,J,Q,"\u2AB7","\\precapprox",!0),y(D,J,Q,"\u22B2","\\vartriangleleft"),y(D,J,Q,"\u22B4","\\trianglelefteq"),y(D,J,Q,"\u22A8","\\vDash",!0),y(D,J,Q,"\u22AA","\\Vvdash",!0),y(D,J,Q,"\u2323","\\smallsmile"),y(D,J,Q,"\u2322","\\smallfrown"),y(D,J,Q,"\u224F","\\bumpeq",!0),y(D,J,Q,"\u224E","\\Bumpeq",!0),y(D,J,Q,"\u2267","\\geqq",!0),y(D,J,Q,"\u2A7E","\\geqslant",!0),y(D,J,Q,"\u2A96","\\eqslantgtr",!0),y(D,J,Q,"\u2273","\\gtrsim",!0),y(D,J,Q,"\u2A86","\\gtrapprox",!0),y(D,J,tt,"\u22D7","\\gtrdot"),y(D,J,Q,"\u22D9","\\ggg",!0),y(D,J,Q,"\u2277","\\gtrless",!0),y(D,J,Q,"\u22DB","\\gtreqless",!0),y(D,J,Q,"\u2A8C","\\gtreqqless",!0),y(D,J,Q,"\u2256","\\eqcirc",!0),y(D,J,Q,"\u2257","\\circeq",!0),y(D,J,Q,"\u225C","\\triangleq",!0),y(D,J,Q,"\u223C","\\thicksim"),y(D,J,Q,"\u2248","\\thickapprox"),y(D,J,Q,"\u2AC6","\\supseteqq",!0),y(D,J,Q,"\u22D1","\\Supset",!0),y(D,J,Q,"\u2290","\\sqsupset",!0),y(D,J,Q,"\u227D","\\succcurlyeq",!0),y(D,J,Q,"\u22DF","\\curlyeqsucc",!0),y(D,J,Q,"\u227F","\\succsim",!0),y(D,J,Q,"\u2AB8","\\succapprox",!0),y(D,J,Q,"\u22B3","\\vartriangleright"),y(D,J,Q,"\u22B5","\\trianglerighteq"),y(D,J,Q,"\u22A9","\\Vdash",!0),y(D,J,Q,"\u2223","\\shortmid"),y(D,J,Q,"\u2225","\\shortparallel"),y(D,J,Q,"\u226C","\\between",!0),y(D,J,Q,"\u22D4","\\pitchfork",!0),y(D,J,Q,"\u221D","\\varpropto"),y(D,J,Q,"\u25C0","\\blacktriangleleft"),y(D,J,Q,"\u2234","\\therefore",!0),y(D,J,Q,"\u220D","\\backepsilon"),y(D,J,Q,"\u25B6","\\blacktriangleright"),y(D,J,Q,"\u2235","\\because",!0),y(D,J,Q,"\u22D8","\\llless"),y(D,J,Q,"\u22D9","\\gggtr"),y(D,J,tt,"\u22B2","\\lhd"),y(D,J,tt,"\u22B3","\\rhd"),y(D,J,Q,"\u2242","\\eqsim",!0),y(D,T,Q,"\u22C8","\\Join"),y(D,J,Q,"\u2251","\\Doteq",!0),y(D,J,tt,"\u2214","\\dotplus",!0),y(D,J,tt,"\u2216","\\smallsetminus"),y(D,J,tt,"\u22D2","\\Cap",!0),y(D,J,tt,"\u22D3","\\Cup",!0),y(D,J,tt,"\u2A5E","\\doublebarwedge",!0),y(D,J,tt,"\u229F","\\boxminus",!0),y(D,J,tt,"\u229E","\\boxplus",!0),y(D,J,tt,"\u22C7","\\divideontimes",!0),y(D,J,tt,"\u22C9","\\ltimes",!0),y(D,J,tt,"\u22CA","\\rtimes",!0),y(D,J,tt,"\u22CB","\\leftthreetimes",!0),y(D,J,tt,"\u22CC","\\rightthreetimes",!0),y(D,J,tt,"\u22CF","\\curlywedge",!0),y(D,J,tt,"\u22CE","\\curlyvee",!0),y(D,J,tt,"\u229D","\\circleddash",!0),y(D,J,tt,"\u229B","\\circledast",!0),y(D,J,tt,"\u22C5","\\centerdot"),y(D,J,tt,"\u22BA","\\intercal",!0),y(D,J,tt,"\u22D2","\\doublecap"),y(D,J,tt,"\u22D3","\\doublecup"),y(D,J,tt,"\u22A0","\\boxtimes",!0),y(D,J,Q,"\u21E2","\\dashrightarrow",!0),y(D,J,Q,"\u21E0","\\dashleftarrow",!0),y(D,J,Q,"\u21C7","\\leftleftarrows",!0),y(D,J,Q,"\u21C6","\\leftrightarrows",!0),y(D,J,Q,"\u21DA","\\Lleftarrow",!0),y(D,J,Q,"\u219E","\\twoheadleftarrow",!0),y(D,J,Q,"\u21A2","\\leftarrowtail",!0),y(D,J,Q,"\u21AB","\\looparrowleft",!0),y(D,J,Q,"\u21CB","\\leftrightharpoons",!0),y(D,J,Q,"\u21B6","\\curvearrowleft",!0),y(D,J,Q,"\u21BA","\\circlearrowleft",!0),y(D,J,Q,"\u21B0","\\Lsh",!0),y(D,J,Q,"\u21C8","\\upuparrows",!0),y(D,J,Q,"\u21BF","\\upharpoonleft",!0),y(D,J,Q,"\u21C3","\\downharpoonleft",!0),y(D,T,Q,"\u22B6","\\origof",!0),y(D,T,Q,"\u22B7","\\imageof",!0),y(D,J,Q,"\u22B8","\\multimap",!0),y(D,J,Q,"\u21AD","\\leftrightsquigarrow",!0),y(D,J,Q,"\u21C9","\\rightrightarrows",!0),y(D,J,Q,"\u21C4","\\rightleftarrows",!0),y(D,J,Q,"\u21A0","\\twoheadrightarrow",!0),y(D,J,Q,"\u21A3","\\rightarrowtail",!0),y(D,J,Q,"\u21AC","\\looparrowright",!0),y(D,J,Q,"\u21B7","\\curvearrowright",!0),y(D,J,Q,"\u21BB","\\circlearrowright",!0),y(D,J,Q,"\u21B1","\\Rsh",!0),y(D,J,Q,"\u21CA","\\downdownarrows",!0),y(D,J,Q,"\u21BE","\\upharpoonright",!0),y(D,J,Q,"\u21C2","\\downharpoonright",!0),y(D,J,Q,"\u21DD","\\rightsquigarrow",!0),y(D,J,Q,"\u21DD","\\leadsto"),y(D,J,Q,"\u21DB","\\Rrightarrow",!0),y(D,J,Q,"\u21BE","\\restriction"),y(D,T,oe,"\u2018","`"),y(D,T,oe,"$","\\$"),y(Re,T,oe,"$","\\$"),y(Re,T,oe,"$","\\textdollar"),y(D,T,oe,"%","\\%"),y(Re,T,oe,"%","\\%"),y(D,T,oe,"_","\\_"),y(Re,T,oe,"_","\\_"),y(Re,T,oe,"_","\\textunderscore"),y(D,T,oe,"\u2220","\\angle",!0),y(D,T,oe,"\u221E","\\infty",!0),y(D,T,oe,"\u2032","\\prime"),y(D,T,oe,"\u25B3","\\triangle"),y(D,T,oe,"\u0393","\\Gamma",!0),y(D,T,oe,"\u0394","\\Delta",!0),y(D,T,oe,"\u0398","\\Theta",!0),y(D,T,oe,"\u039B","\\Lambda",!0),y(D,T,oe,"\u039E","\\Xi",!0),y(D,T,oe,"\u03A0","\\Pi",!0),y(D,T,oe,"\u03A3","\\Sigma",!0),y(D,T,oe,"\u03A5","\\Upsilon",!0),y(D,T,oe,"\u03A6","\\Phi",!0),y(D,T,oe,"\u03A8","\\Psi",!0),y(D,T,oe,"\u03A9","\\Omega",!0),y(D,T,oe,"A","\u0391"),y(D,T,oe,"B","\u0392"),y(D,T,oe,"E","\u0395"),y(D,T,oe,"Z","\u0396"),y(D,T,oe,"H","\u0397"),y(D,T,oe,"I","\u0399"),y(D,T,oe,"K","\u039A"),y(D,T,oe,"M","\u039C"),y(D,T,oe,"N","\u039D"),y(D,T,oe,"O","\u039F"),y(D,T,oe,"P","\u03A1"),y(D,T,oe,"T","\u03A4"),y(D,T,oe,"X","\u03A7"),y(D,T,oe,"\xAC","\\neg",!0),y(D,T,oe,"\xAC","\\lnot"),y(D,T,oe,"\u22A4","\\top"),y(D,T,oe,"\u22A5","\\bot"),y(D,T,oe,"\u2205","\\emptyset"),y(D,J,oe,"\u2205","\\varnothing"),y(D,T,rt,"\u03B1","\\alpha",!0),y(D,T,rt,"\u03B2","\\beta",!0),y(D,T,rt,"\u03B3","\\gamma",!0),y(D,T,rt,"\u03B4","\\delta",!0),y(D,T,rt,"\u03F5","\\epsilon",!0),y(D,T,rt,"\u03B6","\\zeta",!0),y(D,T,rt,"\u03B7","\\eta",!0),y(D,T,rt,"\u03B8","\\theta",!0),y(D,T,rt,"\u03B9","\\iota",!0),y(D,T,rt,"\u03BA","\\kappa",!0),y(D,T,rt,"\u03BB","\\lambda",!0),y(D,T,rt,"\u03BC","\\mu",!0),y(D,T,rt,"\u03BD","\\nu",!0),y(D,T,rt,"\u03BE","\\xi",!0),y(D,T,rt,"\u03BF","\\omicron",!0),y(D,T,rt,"\u03C0","\\pi",!0),y(D,T,rt,"\u03C1","\\rho",!0),y(D,T,rt,"\u03C3","\\sigma",!0),y(D,T,rt,"\u03C4","\\tau",!0),y(D,T,rt,"\u03C5","\\upsilon",!0),y(D,T,rt,"\u03D5","\\phi",!0),y(D,T,rt,"\u03C7","\\chi",!0),y(D,T,rt,"\u03C8","\\psi",!0),y(D,T,rt,"\u03C9","\\omega",!0),y(D,T,rt,"\u03B5","\\varepsilon",!0),y(D,T,rt,"\u03D1","\\vartheta",!0),y(D,T,rt,"\u03D6","\\varpi",!0),y(D,T,rt,"\u03F1","\\varrho",!0),y(D,T,rt,"\u03C2","\\varsigma",!0),y(D,T,rt,"\u03C6","\\varphi",!0),y(D,T,tt,"\u2217","*",!0),y(D,T,tt,"+","+"),y(D,T,tt,"\u2212","-",!0),y(D,T,tt,"\u22C5","\\cdot",!0),y(D,T,tt,"\u2218","\\circ",!0),y(D,T,tt,"\xF7","\\div",!0),y(D,T,tt,"\xB1","\\pm",!0),y(D,T,tt,"\xD7","\\times",!0),y(D,T,tt,"\u2229","\\cap",!0),y(D,T,tt,"\u222A","\\cup",!0),y(D,T,tt,"\u2216","\\setminus",!0),y(D,T,tt,"\u2227","\\land"),y(D,T,tt,"\u2228","\\lor"),y(D,T,tt,"\u2227","\\wedge",!0),y(D,T,tt,"\u2228","\\vee",!0),y(D,T,oe,"\u221A","\\surd"),y(D,T,sr,"\u27E8","\\langle",!0),y(D,T,sr,"\u2223","\\lvert"),y(D,T,sr,"\u2225","\\lVert"),y(D,T,_e,"?","?"),y(D,T,_e,"!","!"),y(D,T,_e,"\u27E9","\\rangle",!0),y(D,T,_e,"\u2223","\\rvert"),y(D,T,_e,"\u2225","\\rVert"),y(D,T,Q,"=","="),y(D,T,Q,":",":"),y(D,T,Q,"\u2248","\\approx",!0),y(D,T,Q,"\u2245","\\cong",!0),y(D,T,Q,"\u2265","\\ge"),y(D,T,Q,"\u2265","\\geq",!0),y(D,T,Q,"\u2190","\\gets"),y(D,T,Q,">","\\gt",!0),y(D,T,Q,"\u2208","\\in",!0),y(D,T,Q,"\uE020","\\@not"),y(D,T,Q,"\u2282","\\subset",!0),y(D,T,Q,"\u2283","\\supset",!0),y(D,T,Q,"\u2286","\\subseteq",!0),y(D,T,Q,"\u2287","\\supseteq",!0),y(D,J,Q,"\u2288","\\nsubseteq",!0),y(D,J,Q,"\u2289","\\nsupseteq",!0),y(D,T,Q,"\u22A8","\\models"),y(D,T,Q,"\u2190","\\leftarrow",!0),y(D,T,Q,"\u2264","\\le"),y(D,T,Q,"\u2264","\\leq",!0),y(D,T,Q,"<","\\lt",!0),y(D,T,Q,"\u2192","\\rightarrow",!0),y(D,T,Q,"\u2192","\\to"),y(D,J,Q,"\u2271","\\ngeq",!0),y(D,J,Q,"\u2270","\\nleq",!0),y(D,T,gr,"\xA0","\\ "),y(D,T,gr,"\xA0","\\space"),y(D,T,gr,"\xA0","\\nobreakspace"),y(Re,T,gr,"\xA0","\\ "),y(Re,T,gr,"\xA0"," "),y(Re,T,gr,"\xA0","\\space"),y(Re,T,gr,"\xA0","\\nobreakspace"),y(D,T,gr,null,"\\nobreak"),y(D,T,gr,null,"\\allowbreak"),y(D,T,Nr,",",","),y(D,T,Nr,";",";"),y(D,J,tt,"\u22BC","\\barwedge",!0),y(D,J,tt,"\u22BB","\\veebar",!0),y(D,T,tt,"\u2299","\\odot",!0),y(D,T,tt,"\u2295","\\oplus",!0),y(D,T,tt,"\u2297","\\otimes",!0),y(D,T,oe,"\u2202","\\partial",!0),y(D,T,tt,"\u2298","\\oslash",!0),y(D,J,tt,"\u229A","\\circledcirc",!0),y(D,J,tt,"\u22A1","\\boxdot",!0),y(D,T,tt,"\u25B3","\\bigtriangleup"),y(D,T,tt,"\u25BD","\\bigtriangledown"),y(D,T,tt,"\u2020","\\dagger"),y(D,T,tt,"\u22C4","\\diamond"),y(D,T,tt,"\u22C6","\\star"),y(D,T,tt,"\u25C3","\\triangleleft"),y(D,T,tt,"\u25B9","\\triangleright"),y(D,T,sr,"{","\\{"),y(Re,T,oe,"{","\\{"),y(Re,T,oe,"{","\\textbraceleft"),y(D,T,_e,"}","\\}"),y(Re,T,oe,"}","\\}"),y(Re,T,oe,"}","\\textbraceright"),y(D,T,sr,"{","\\lbrace"),y(D,T,_e,"}","\\rbrace"),y(D,T,sr,"[","\\lbrack",!0),y(Re,T,oe,"[","\\lbrack",!0),y(D,T,_e,"]","\\rbrack",!0),y(Re,T,oe,"]","\\rbrack",!0),y(D,T,sr,"(","\\lparen",!0),y(D,T,_e,")","\\rparen",!0),y(Re,T,oe,"<","\\textless",!0),y(Re,T,oe,">","\\textgreater",!0),y(D,T,sr,"\u230A","\\lfloor",!0),y(D,T,_e,"\u230B","\\rfloor",!0),y(D,T,sr,"\u2308","\\lceil",!0),y(D,T,_e,"\u2309","\\rceil",!0),y(D,T,oe,"\\","\\backslash"),y(D,T,oe,"\u2223","|"),y(D,T,oe,"\u2223","\\vert"),y(Re,T,oe,"|","\\textbar",!0),y(D,T,oe,"\u2225","\\|"),y(D,T,oe,"\u2225","\\Vert"),y(Re,T,oe,"\u2225","\\textbardbl"),y(Re,T,oe,"~","\\textasciitilde"),y(Re,T,oe,"\\","\\textbackslash"),y(Re,T,oe,"^","\\textasciicircum"),y(D,T,Q,"\u2191","\\uparrow",!0),y(D,T,Q,"\u21D1","\\Uparrow",!0),y(D,T,Q,"\u2193","\\downarrow",!0),y(D,T,Q,"\u21D3","\\Downarrow",!0),y(D,T,Q,"\u2195","\\updownarrow",!0),y(D,T,Q,"\u21D5","\\Updownarrow",!0),y(D,T,Nt,"\u2210","\\coprod"),y(D,T,Nt,"\u22C1","\\bigvee"),y(D,T,Nt,"\u22C0","\\bigwedge"),y(D,T,Nt,"\u2A04","\\biguplus"),y(D,T,Nt,"\u22C2","\\bigcap"),y(D,T,Nt,"\u22C3","\\bigcup"),y(D,T,Nt,"\u222B","\\int"),y(D,T,Nt,"\u222B","\\intop"),y(D,T,Nt,"\u222C","\\iint"),y(D,T,Nt,"\u222D","\\iiint"),y(D,T,Nt,"\u220F","\\prod"),y(D,T,Nt,"\u2211","\\sum"),y(D,T,Nt,"\u2A02","\\bigotimes"),y(D,T,Nt,"\u2A01","\\bigoplus"),y(D,T,Nt,"\u2A00","\\bigodot"),y(D,T,Nt,"\u222E","\\oint"),y(D,T,Nt,"\u222F","\\oiint"),y(D,T,Nt,"\u2230","\\oiiint"),y(D,T,Nt,"\u2A06","\\bigsqcup"),y(D,T,Nt,"\u222B","\\smallint"),y(Re,T,wt,"\u2026","\\textellipsis"),y(D,T,wt,"\u2026","\\mathellipsis"),y(Re,T,wt,"\u2026","\\ldots",!0),y(D,T,wt,"\u2026","\\ldots",!0),y(D,T,wt,"\u22EF","\\@cdots",!0),y(D,T,wt,"\u22F1","\\ddots",!0),y(D,T,oe,"\u22EE","\\varvdots"),y(Re,T,oe,"\u22EE","\\varvdots"),y(D,T,or,"\u02CA","\\acute"),y(D,T,or,"\u02CB","\\grave"),y(D,T,or,"\xA8","\\ddot"),y(D,T,or,"~","\\tilde"),y(D,T,or,"\u02C9","\\bar"),y(D,T,or,"\u02D8","\\breve"),y(D,T,or,"\u02C7","\\check"),y(D,T,or,"^","\\hat"),y(D,T,or,"\u20D7","\\vec"),y(D,T,or,"\u02D9","\\dot"),y(D,T,or,"\u02DA","\\mathring"),y(D,T,rt,"\uE131","\\@imath"),y(D,T,rt,"\uE237","\\@jmath"),y(D,T,oe,"\u0131","\u0131"),y(D,T,oe,"\u0237","\u0237"),y(Re,T,oe,"\u0131","\\i",!0),y(Re,T,oe,"\u0237","\\j",!0),y(Re,T,oe,"\xDF","\\ss",!0),y(Re,T,oe,"\xE6","\\ae",!0),y(Re,T,oe,"\u0153","\\oe",!0),y(Re,T,oe,"\xF8","\\o",!0),y(Re,T,oe,"\xC6","\\AE",!0),y(Re,T,oe,"\u0152","\\OE",!0),y(Re,T,oe,"\xD8","\\O",!0),y(Re,T,or,"\u02CA","\\'"),y(Re,T,or,"\u02CB","\\`"),y(Re,T,or,"\u02C6","\\^"),y(Re,T,or,"\u02DC","\\~"),y(Re,T,or,"\u02C9","\\="),y(Re,T,or,"\u02D8","\\u"),y(Re,T,or,"\u02D9","\\."),y(Re,T,or,"\xB8","\\c"),y(Re,T,or,"\u02DA","\\r"),y(Re,T,or,"\u02C7","\\v"),y(Re,T,or,"\xA8",'\\"'),y(Re,T,or,"\u02DD","\\H"),y(Re,T,or,"\u25EF","\\textcircled");const ie={"--":!0,"---":!0,"``":!0,"''":!0};y(Re,T,oe,"\u2013","--",!0),y(Re,T,oe,"\u2013","\\textendash"),y(Re,T,oe,"\u2014","---",!0),y(Re,T,oe,"\u2014","\\textemdash"),y(Re,T,oe,"\u2018","`",!0),y(Re,T,oe,"\u2018","\\textquoteleft"),y(Re,T,oe,"\u2019","'",!0),y(Re,T,oe,"\u2019","\\textquoteright"),y(Re,T,oe,"\u201C","``",!0),y(Re,T,oe,"\u201C","\\textquotedblleft"),y(Re,T,oe,"\u201D","''",!0),y(Re,T,oe,"\u201D","\\textquotedblright"),y(D,T,oe,"\xB0","\\degree",!0),y(Re,T,oe,"\xB0","\\degree"),y(Re,T,oe,"\xB0","\\textdegree",!0),y(D,T,oe,"\xA3","\\pounds"),y(D,T,oe,"\xA3","\\mathsterling",!0),y(Re,T,oe,"\xA3","\\pounds"),y(Re,T,oe,"\xA3","\\textsterling",!0),y(D,J,oe,"\u2720","\\maltese"),y(Re,J,oe,"\u2720","\\maltese");const Ne='0123456789/@."';for(let s=0;s<Ne.length;s++){const i=Ne.charAt(s);y(D,T,oe,i,i)}const ot='0123456789!@*()-=+";:?/.,';for(let s=0;s<ot.length;s++){const i=ot.charAt(s);y(Re,T,oe,i,i)}const $e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<$e.length;s++){const i=$e.charAt(s);y(D,T,rt,i,i),y(Re,T,oe,i,i)}y(D,J,oe,"C","\u2102"),y(Re,J,oe,"C","\u2102"),y(D,J,oe,"H","\u210D"),y(Re,J,oe,"H","\u210D"),y(D,J,oe,"N","\u2115"),y(Re,J,oe,"N","\u2115"),y(D,J,oe,"P","\u2119"),y(Re,J,oe,"P","\u2119"),y(D,J,oe,"Q","\u211A"),y(Re,J,oe,"Q","\u211A"),y(D,J,oe,"R","\u211D"),y(Re,J,oe,"R","\u211D"),y(D,J,oe,"Z","\u2124"),y(Re,J,oe,"Z","\u2124"),y(D,T,rt,"h","\u210E"),y(Re,T,rt,"h","\u210E");let ae="";for(let s=0;s<$e.length;s++){const i=$e.charAt(s);ae=String.fromCharCode(55349,56320+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56372+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56424+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56580+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56684+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56736+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56788+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56840+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56944+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),s<26&&(ae=String.fromCharCode(55349,56632+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,56476+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae))}ae="\u{1D55C}",y(D,T,rt,"k",ae),y(Re,T,oe,"k",ae);for(let s=0;s<10;s++){const i=s.toString();ae=String.fromCharCode(55349,57294+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,57314+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,57324+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae),ae=String.fromCharCode(55349,57334+s),y(D,T,rt,i,ae),y(Re,T,oe,i,ae)}const Ye="\xD0\xDE\xFE";for(let s=0;s<Ye.length;s++){const i=Ye.charAt(s);y(D,T,rt,i,i),y(Re,T,oe,i,i)}const Ue=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],st=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],le=function(s,i){const l=s.charCodeAt(0),h=s.charCodeAt(1),b=(l-55296)*1024+(h-56320)+65536,k=i==="math"?0:1;if(119808<=b&&b<120484){const F=Math.floor((b-119808)/26);return[Ue[F][2],Ue[F][k]]}else if(120782<=b&&b<=120831){const F=Math.floor((b-120782)/10);return[st[F][2],st[F][k]]}else{if(b===120485||b===120486)return[Ue[0][2],Ue[0][k]];if(120486<b&&b<120782)return["",""];throw new a("Unsupported character: "+s)}};class xe{constructor(i){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=i,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(i){return this.classes.includes(i)}toNode(){const i=document.createDocumentFragment();for(let l=0;l<this.children.length;l++)i.appendChild(this.children[l].toNode());return i}toMarkup(){let i="";for(let l=0;l<this.children.length;l++)i+=this.children[l].toMarkup();return i}toText(){const i=l=>l.toText();return this.children.map(i).join("")}}const me=function(s,i,l){return It[l][s]&&It[l][s].replace&&(s=It[l][s].replace),{value:s,metrics:it(s,i,l)}},He=function(s,i,l,h,b){const k=me(s,i,l),F=k.metrics;s=k.value;let z;if(F){let W=F.italic;(l==="text"||h&&h.font==="mathit")&&(W=0),z=new Dt(s,F.height,F.depth,W,F.skew,F.width,b)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+i+"' and mode '"+l+"'")),z=new Dt(s,0,0,0,0,0,b);if(h){z.maxFontSize=h.sizeMultiplier,h.style.isTight()&&z.classes.push("mtight");const W=h.getColor();W&&(z.style.color=W)}return z},lt=function(s,i,l,h){return h===void 0&&(h=[]),l.font==="boldsymbol"&&me(s,"Main-Bold",i).metrics?He(s,"Main-Bold",i,l,h.concat(["mathbf"])):s==="\\"||It[i][s].font==="main"?He(s,"Main-Regular",i,l,h):He(s,"AMS-Regular",i,l,h.concat(["amsrm"]))},Xt=function(s,i,l,h,b){return b!=="textord"&&me(s,"Math-BoldItalic",i).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Ot=function(s,i,l){const h=s.mode,b=s.text,k=["mord"],F=h==="math"||h==="text"&&i.font,z=F?i.font:i.fontFamily;let W="",te="";if(b.charCodeAt(0)===55349&&([W,te]=le(b,h)),W.length>0)return He(b,W,h,i,k.concat(te));if(z){let fe,pe;if(z==="boldsymbol"){const ke=Xt(b,h,i,k,l);fe=ke.fontName,pe=[ke.fontClass]}else F?(fe=Ro[z].fontName,pe=[z]):(fe=go(z,i.fontWeight,i.fontShape),pe=[z,i.fontWeight,i.fontShape]);if(me(b,fe,h).metrics)return He(b,fe,h,i,k.concat(pe));if(ie.hasOwnProperty(b)&&fe.slice(0,10)==="Typewriter"){const ke=[];for(let Ge=0;Ge<b.length;Ge++)ke.push(He(b[Ge],fe,h,i,k.concat(pe)));return ha(ke)}}if(l==="mathord")return He(b,"Math-Italic",h,i,k.concat(["mathnormal"]));if(l==="textord"){const fe=It[h][b]&&It[h][b].font;if(fe==="ams"){const pe=go("amsrm",i.fontWeight,i.fontShape);return He(b,pe,h,i,k.concat("amsrm",i.fontWeight,i.fontShape))}else if(fe==="main"||!fe){const pe=go("textrm",i.fontWeight,i.fontShape);return He(b,pe,h,i,k.concat(i.fontWeight,i.fontShape))}else{const pe=go(fe,i.fontWeight,i.fontShape);return He(b,pe,h,i,k.concat(pe,i.fontWeight,i.fontShape))}}else throw new Error("unexpected type: "+l+" in makeOrd")},ut=(s,i)=>{if(bt(s.classes)!==bt(i.classes)||s.skew!==i.skew||s.maxFontSize!==i.maxFontSize)return!1;if(s.classes.length===1){const l=s.classes[0];if(l==="mbin"||l==="mord")return!1}for(const l in s.style)if(s.style.hasOwnProperty(l)&&s.style[l]!==i.style[l])return!1;for(const l in i.style)if(i.style.hasOwnProperty(l)&&s.style[l]!==i.style[l])return!1;return!0},Ht=s=>{for(let i=0;i<s.length-1;i++){const l=s[i],h=s[i+1];l instanceof Dt&&h instanceof Dt&&ut(l,h)&&(l.text+=h.text,l.height=Math.max(l.height,h.height),l.depth=Math.max(l.depth,h.depth),l.italic=h.italic,s.splice(i+1,1),i--)}return s},rn=function(s){let i=0,l=0,h=0;for(let b=0;b<s.children.length;b++){const k=s.children[b];k.height>i&&(i=k.height),k.depth>l&&(l=k.depth),k.maxFontSize>h&&(h=k.maxFontSize)}s.height=i,s.depth=l,s.maxFontSize=h},Sr=function(s,i,l,h){const b=new Ct(s,i,l,h);return rn(b),b},hn=(s,i,l,h)=>new Ct(s,i,l,h),da=function(s,i,l){const h=Sr([s],[],i);return h.height=Math.max(l||i.fontMetrics().defaultRuleThickness,i.minRuleThickness),h.style.borderBottomWidth=ce(h.height),h.maxFontSize=1,h},fa=function(s,i,l,h){const b=new Mt(s,i,l,h);return rn(b),b},ha=function(s){const i=new xe(s);return rn(i),i},ri=function(s,i){return s instanceof xe?Sr([],[s],i):s},Oo=function(s){if(s.positionType==="individualShift"){const l=s.children,h=[l[0]],b=-l[0].shift-l[0].elem.depth;let k=b;for(let F=1;F<l.length;F++){const z=-l[F].shift-k-l[F].elem.depth,W=z-(l[F-1].elem.height+l[F-1].elem.depth);k=k+z,h.push({type:"kern",size:W}),h.push(l[F])}return{children:h,depth:b}}let i;if(s.positionType==="top"){let l=s.positionData;for(let h=0;h<s.children.length;h++){const b=s.children[h];l-=b.type==="kern"?b.size:b.elem.height+b.elem.depth}i=l}else if(s.positionType==="bottom")i=-s.positionData;else{const l=s.children[0];if(l.type!=="elem")throw new Error('First child must have type "elem".');if(s.positionType==="shift")i=-l.elem.depth-s.positionData;else if(s.positionType==="firstBaseline")i=-l.elem.depth;else throw new Error("Invalid positionType "+s.positionType+".")}return{children:s.children,depth:i}},ni=function(s,i){const{children:l,depth:h}=Oo(s);let b=0;for(let Ge=0;Ge<l.length;Ge++){const nt=l[Ge];if(nt.type==="elem"){const Rt=nt.elem;b=Math.max(b,Rt.maxFontSize,Rt.height)}}b+=2;const k=Sr(["pstrut"],[]);k.style.height=ce(b);const F=[];let z=h,W=h,te=h;for(let Ge=0;Ge<l.length;Ge++){const nt=l[Ge];if(nt.type==="kern")te+=nt.size;else{const Rt=nt.elem,Zt=nt.wrapperClasses||[],qt=nt.wrapperStyle||{},tr=Sr(Zt,[k,Rt],void 0,qt);tr.style.top=ce(-b-te-Rt.depth),nt.marginLeft&&(tr.style.marginLeft=nt.marginLeft),nt.marginRight&&(tr.style.marginRight=nt.marginRight),F.push(tr),te+=Rt.height+Rt.depth}z=Math.min(z,te),W=Math.max(W,te)}const fe=Sr(["vlist"],F);fe.style.height=ce(W);let pe;if(z<0){const Ge=Sr([],[]),nt=Sr(["vlist"],[Ge]);nt.style.height=ce(-z);const Rt=Sr(["vlist-s"],[new Dt("\u200B")]);pe=[Sr(["vlist-r"],[fe,Rt]),Sr(["vlist-r"],[nt])]}else pe=[Sr(["vlist-r"],[fe])];const ke=Sr(["vlist-t"],pe);return pe.length===2&&ke.classes.push("vlist-t2"),ke.height=W,ke.depth=-z,ke},Bs=(s,i)=>{const l=Sr(["mspace"],[],i),h=ze(s,i);return l.style.marginRight=ce(h),l},go=function(s,i,l){let h="";switch(s){case"amsrm":h="AMS";break;case"textrm":h="Main";break;case"textsf":h="SansSerif";break;case"texttt":h="Typewriter";break;default:h=s}let b;return i==="textbf"&&l==="textit"?b="BoldItalic":i==="textbf"?b="Bold":i==="textit"?b="Italic":b="Regular",h+"-"+b},Ro={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},pa={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var ge={fontMap:Ro,makeSymbol:He,mathsym:lt,makeSpan:Sr,makeSvgSpan:hn,makeLineSpan:da,makeAnchor:fa,makeFragment:ha,wrapFragment:ri,makeVList:ni,makeOrd:Ot,makeGlue:Bs,staticSvg:function(s,i){const[l,h,b]=pa[s],k=new Ut(l),F=new Kt([k],{width:ce(h),height:ce(b),style:"width:"+ce(h),viewBox:"0 0 "+1e3*h+" "+1e3*b,preserveAspectRatio:"xMinYMin"}),z=hn(["overlay"],[F],i);return z.height=b,z.style.height=ce(b),z.style.width=ce(h),z},svgData:pa,tryCombineChars:Ht};const pr={number:3,unit:"mu"},In={number:4,unit:"mu"},kt={number:5,unit:"mu"},_t={mord:{mop:pr,mbin:In,mrel:kt,minner:pr},mop:{mord:pr,mop:pr,mrel:kt,minner:pr},mbin:{mord:In,mop:In,mopen:In,minner:In},mrel:{mord:kt,mop:kt,mopen:kt,minner:kt},mopen:{},mclose:{mop:pr,mbin:In,mrel:kt,minner:pr},mpunct:{mord:pr,mop:pr,mrel:kt,mopen:pr,mclose:pr,mpunct:pr,minner:pr},minner:{mord:pr,mop:pr,mbin:In,mrel:kt,mopen:pr,mpunct:pr,minner:pr}},$r={mord:{mop:pr},mop:{mord:pr,mop:pr},mbin:{},mrel:{},mopen:{},mclose:{mop:pr},mpunct:{},minner:{mop:pr}},Xr={},Ar={},Cn={};function Qe(s){let{type:i,names:l,props:h,handler:b,htmlBuilder:k,mathmlBuilder:F}=s;const z={type:i,numArgs:h.numArgs,argTypes:h.argTypes,allowedInArgument:!!h.allowedInArgument,allowedInText:!!h.allowedInText,allowedInMath:h.allowedInMath===void 0?!0:h.allowedInMath,numOptionalArgs:h.numOptionalArgs||0,infix:!!h.infix,primitive:!!h.primitive,handler:b};for(let W=0;W<l.length;++W)Xr[l[W]]=z;i&&(k&&(Ar[i]=k),F&&(Cn[i]=F))}function Yr(s){let{type:i,htmlBuilder:l,mathmlBuilder:h}=s;Qe({type:i,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:l,mathmlBuilder:h})}const Bn=function(s){return s.type==="ordgroup"&&s.body.length===1?s.body[0]:s},vr=function(s){return s.type==="ordgroup"?s.body:[s]},jn=ge.makeSpan,km=["leftmost","mbin","mopen","mrel","mop","mpunct"],Em=["rightmost","mrel","mclose","mpunct"],Sm={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT},Am={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Pr=function(s,i,l,h){h===void 0&&(h=[null,null]);const b=[];for(let te=0;te<s.length;te++){const fe=Qt(s[te],i);if(fe instanceof xe){const pe=fe.children;b.push(...pe)}else b.push(fe)}if(ge.tryCombineChars(b),!l)return b;let k=i;if(s.length===1){const te=s[0];te.type==="sizing"?k=i.havingSize(te.size):te.type==="styling"&&(k=i.havingStyle(Sm[te.style]))}const F=jn([h[0]||"leftmost"],[],i),z=jn([h[1]||"rightmost"],[],i),W=l==="root";return Fs(b,(te,fe)=>{const pe=fe.classes[0],ke=te.classes[0];pe==="mbin"&&Em.includes(ke)?fe.classes[0]="mord":ke==="mbin"&&km.includes(pe)&&(te.classes[0]="mord")},{node:F},z,W),Fs(b,(te,fe)=>{const pe=Ts(fe),ke=Ts(te),Ge=pe&&ke?te.hasClass("mtight")?$r[pe][ke]:_t[pe][ke]:null;if(Ge)return ge.makeGlue(Ge,k)},{node:F},z,W),b},Fs=function(s,i,l,h,b){h&&s.push(h);let k=0;for(;k<s.length;k++){const F=s[k],z=Iu(F);if(z){Fs(z.children,i,l,null,b);continue}const W=!F.hasClass("mspace");if(W){const te=i(F,l.node);te&&(l.insertAfter?l.insertAfter(te):(s.unshift(te),k++))}W?l.node=F:b&&F.hasClass("newline")&&(l.node=jn(["leftmost"])),l.insertAfter=(te=>fe=>{s.splice(te+1,0,fe),k++})(k)}h&&s.pop()},Iu=function(s){return s instanceof xe||s instanceof Mt||s instanceof Ct&&s.hasClass("enclosing")?s:null},Ns=function(s,i){const l=Iu(s);if(l){const h=l.children;if(h.length){if(i==="right")return Ns(h[h.length-1],"right");if(i==="left")return Ns(h[0],"left")}}return s},Ts=function(s,i){return s?(i&&(s=Ns(s,i)),Am[s.classes[0]]||null):null},ma=function(s,i){const l=["nulldelimiter"].concat(s.baseSizingClasses());return jn(i.concat(l))},Qt=function(s,i,l){if(!s)return jn();if(Ar[s.type]){let h=Ar[s.type](s,i);if(l&&i.size!==l.size){h=jn(i.sizingClasses(l),[h],i);const b=i.sizeMultiplier/l.sizeMultiplier;h.height*=b,h.depth*=b}return h}else throw new a("Got group of unknown type: '"+s.type+"'")};function oi(s,i){const l=jn(["base"],s,i),h=jn(["strut"]);return h.style.height=ce(l.height+l.depth),l.depth&&(h.style.verticalAlign=ce(-l.depth)),l.children.unshift(h),l}function Ms(s,i){let l=null;s.length===1&&s[0].type==="tag"&&(l=s[0].tag,s=s[0].body);const h=Pr(s,i,"root");let b;h.length===2&&h[1].hasClass("tag")&&(b=h.pop());const k=[];let F=[];for(let te=0;te<h.length;te++)if(F.push(h[te]),h[te].hasClass("mbin")||h[te].hasClass("mrel")||h[te].hasClass("allowbreak")){let fe=!1;for(;te<h.length-1&&h[te+1].hasClass("mspace")&&!h[te+1].hasClass("newline");)te++,F.push(h[te]),h[te].hasClass("nobreak")&&(fe=!0);fe||(k.push(oi(F,i)),F=[])}else h[te].hasClass("newline")&&(F.pop(),F.length>0&&(k.push(oi(F,i)),F=[]),k.push(h[te]));F.length>0&&k.push(oi(F,i));let z;l?(z=oi(Pr(l,i,!0)),z.classes=["tag"],k.push(z)):b&&k.push(b);const W=jn(["katex-html"],k);if(W.setAttribute("aria-hidden","true"),z){const te=z.children[0];te.style.height=ce(W.height+W.depth),W.depth&&(te.style.verticalAlign=ce(-W.depth))}return W}function ju(s){return new xe(s)}class un{constructor(i,l,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=i,this.attributes={},this.children=l||[],this.classes=h||[]}setAttribute(i,l){this.attributes[i]=l}getAttribute(i){return this.attributes[i]}toNode(){const i=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&i.setAttribute(l,this.attributes[l]);this.classes.length>0&&(i.className=bt(this.classes));for(let l=0;l<this.children.length;l++)if(this.children[l]instanceof Fn&&this.children[l+1]instanceof Fn){let h=this.children[l].toText()+this.children[++l].toText();for(;this.children[l+1]instanceof Fn;)h+=this.children[++l].toText();i.appendChild(new Fn(h).toNode())}else i.appendChild(this.children[l].toNode());return i}toMarkup(){let i="<"+this.type;for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(i+=" "+l+'="',i+=C.escape(this.attributes[l]),i+='"');this.classes.length>0&&(i+=' class ="'+C.escape(bt(this.classes))+'"'),i+=">";for(let l=0;l<this.children.length;l++)i+=this.children[l].toMarkup();return i+="</"+this.type+">",i}toText(){return this.children.map(i=>i.toText()).join("")}}class Fn{constructor(i){this.text=void 0,this.text=i}toNode(){return document.createTextNode(this.text)}toMarkup(){return C.escape(this.toText())}toText(){return this.text}}class Bm{constructor(i){this.width=void 0,this.character=void 0,this.width=i,i>=.05555&&i<=.05556?this.character="\u200A":i>=.1666&&i<=.1667?this.character="\u2009":i>=.2222&&i<=.2223?this.character="\u2005":i>=.2777&&i<=.2778?this.character="\u2005\u200A":i>=-.05556&&i<=-.05555?this.character="\u200A\u2063":i>=-.1667&&i<=-.1666?this.character="\u2009\u2063":i>=-.2223&&i<=-.2222?this.character="\u205F\u2063":i>=-.2778&&i<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{const i=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return i.setAttribute("width",ce(this.width)),i}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ce(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Xe={MathNode:un,TextNode:Fn,SpaceNode:Bm,newDocumentFragment:ju};const pn=function(s,i,l){return It[i][s]&&It[i][s].replace&&s.charCodeAt(0)!==55349&&!(ie.hasOwnProperty(s)&&l&&(l.fontFamily&&l.fontFamily.slice(4,6)==="tt"||l.font&&l.font.slice(4,6)==="tt"))&&(s=It[i][s].replace),new Xe.TextNode(s)},Os=function(s){return s.length===1?s[0]:new Xe.MathNode("mrow",s)},Rs=function(s,i){if(i.fontFamily==="texttt")return"monospace";if(i.fontFamily==="textsf")return i.fontShape==="textit"&&i.fontWeight==="textbf"?"sans-serif-bold-italic":i.fontShape==="textit"?"sans-serif-italic":i.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(i.fontShape==="textit"&&i.fontWeight==="textbf")return"bold-italic";if(i.fontShape==="textit")return"italic";if(i.fontWeight==="textbf")return"bold";const l=i.font;if(!l||l==="mathnormal")return null;const h=s.mode;if(l==="mathit")return"italic";if(l==="boldsymbol")return s.type==="textord"?"bold":"bold-italic";if(l==="mathbf")return"bold";if(l==="mathbb")return"double-struck";if(l==="mathsfit")return"sans-serif-italic";if(l==="mathfrak")return"fraktur";if(l==="mathscr"||l==="mathcal")return"script";if(l==="mathsf")return"sans-serif";if(l==="mathtt")return"monospace";let b=s.text;if(["\\imath","\\jmath"].includes(b))return null;It[h][b]&&It[h][b].replace&&(b=It[h][b].replace);const k=ge.fontMap[l].fontName;return it(b,k,h)?ge.fontMap[l].variant:null};function $s(s){if(!s)return!1;if(s.type==="mi"&&s.children.length===1){const i=s.children[0];return i instanceof Fn&&i.text==="."}else if(s.type==="mo"&&s.children.length===1&&s.getAttribute("separator")==="true"&&s.getAttribute("lspace")==="0em"&&s.getAttribute("rspace")==="0em"){const i=s.children[0];return i instanceof Fn&&i.text===","}else return!1}const nn=function(s,i,l){if(s.length===1){const k=fr(s[0],i);return l&&k instanceof un&&k.type==="mo"&&(k.setAttribute("lspace","0em"),k.setAttribute("rspace","0em")),[k]}const h=[];let b;for(let k=0;k<s.length;k++){const F=fr(s[k],i);if(F instanceof un&&b instanceof un){if(F.type==="mtext"&&b.type==="mtext"&&F.getAttribute("mathvariant")===b.getAttribute("mathvariant")){b.children.push(...F.children);continue}else if(F.type==="mn"&&b.type==="mn"){b.children.push(...F.children);continue}else if($s(F)&&b.type==="mn"){b.children.push(...F.children);continue}else if(F.type==="mn"&&$s(b))F.children=[...b.children,...F.children],h.pop();else if((F.type==="msup"||F.type==="msub")&&F.children.length>=1&&(b.type==="mn"||$s(b))){const z=F.children[0];z instanceof un&&z.type==="mn"&&(z.children=[...b.children,...z.children],h.pop())}else if(b.type==="mi"&&b.children.length===1){const z=b.children[0];if(z instanceof Fn&&z.text==="\u0338"&&(F.type==="mo"||F.type==="mi"||F.type==="mn")){const W=F.children[0];W instanceof Fn&&W.text.length>0&&(W.text=W.text.slice(0,1)+"\u0338"+W.text.slice(1),h.pop())}}}h.push(F),b=F}return h},Gn=function(s,i,l){return Os(nn(s,i,l))},fr=function(s,i){if(!s)return new Xe.MathNode("mrow");if(Cn[s.type])return Cn[s.type](s,i);throw new a("Got group of unknown type: '"+s.type+"'")};function _u(s,i,l,h,b){const k=nn(s,l);let F;k.length===1&&k[0]instanceof un&&["mrow","mtable"].includes(k[0].type)?F=k[0]:F=new Xe.MathNode("mrow",k);const z=new Xe.MathNode("annotation",[new Xe.TextNode(i)]);z.setAttribute("encoding","application/x-tex");const W=new Xe.MathNode("semantics",[F,z]),te=new Xe.MathNode("math",[W]);te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h&&te.setAttribute("display","block");const fe=b?"katex":"katex-mathml";return ge.makeSpan([fe],[te])}const Lu=function(s){return new Tt({style:s.displayMode?R.DISPLAY:R.TEXT,maxSize:s.maxSize,minRuleThickness:s.minRuleThickness})},Ku=function(s,i){if(i.displayMode){const l=["katex-display"];i.leqno&&l.push("leqno"),i.fleqn&&l.push("fleqn"),s=ge.makeSpan(l,[s])}return s},Fm=function(s,i,l){const h=Lu(l);let b;if(l.output==="mathml")return _u(s,i,h,l.displayMode,!0);if(l.output==="html"){const k=Ms(s,h);b=ge.makeSpan(["katex"],[k])}else{const k=_u(s,i,h,l.displayMode,!1),F=Ms(s,h);b=ge.makeSpan(["katex"],[k,F])}return Ku(b,l)},Nm=function(s,i,l){const h=Lu(l),b=Ms(s,h),k=ge.makeSpan(["katex"],[b]);return Ku(k,l)},Tm={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Mm=function(s){const i=new Xe.MathNode("mo",[new Xe.TextNode(Tm[s.replace(/^\\/,"")])]);return i.setAttribute("stretchy","true"),i},Om={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Rm=function(s){return s.type==="ordgroup"?s.body.length:1};var _n={encloseSpan:function(s,i,l,h,b){let k;const F=s.height+s.depth+l+h;if(/fbox|color|angl/.test(i)){if(k=ge.makeSpan(["stretchy",i],[],b),i==="fbox"){const z=b.color&&b.getColor();z&&(k.style.borderColor=z)}}else{const z=[];/^[bx]cancel$/.test(i)&&z.push(new Fr({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(i)&&z.push(new Fr({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const W=new Kt(z,{width:"100%",height:ce(F)});k=ge.makeSvgSpan([],[W],b)}return k.height=F,k.style.height=ce(F),k},mathMLnode:Mm,svgSpan:function(s,i){function l(){let F=4e5;const z=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(z)){const W=Rm(s.base);let te,fe,pe;if(W>5)z==="widehat"||z==="widecheck"?(te=420,F=2364,pe=.42,fe=z+"4"):(te=312,F=2340,pe=.34,fe="tilde4");else{const nt=[1,1,2,2,3,3][W];z==="widehat"||z==="widecheck"?(F=[0,1062,2364,2364,2364][nt],te=[0,239,300,360,420][nt],pe=[0,.24,.3,.3,.36,.42][nt],fe=z+nt):(F=[0,600,1033,2339,2340][nt],te=[0,260,286,306,312][nt],pe=[0,.26,.286,.3,.306,.34][nt],fe="tilde"+nt)}const ke=new Ut(fe),Ge=new Kt([ke],{width:"100%",height:ce(pe),viewBox:"0 0 "+F+" "+te,preserveAspectRatio:"none"});return{span:ge.makeSvgSpan([],[Ge],i),minWidth:0,height:pe}}else{const W=[],te=Om[z],[fe,pe,ke]=te,Ge=ke/1e3,nt=fe.length;let Rt,Zt;if(nt===1){const qt=te[3];Rt=["hide-tail"],Zt=[qt]}else if(nt===2)Rt=["halfarrow-left","halfarrow-right"],Zt=["xMinYMin","xMaxYMin"];else if(nt===3)Rt=["brace-left","brace-center","brace-right"],Zt=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
461
+ `+nt+" children.");for(let qt=0;qt<nt;qt++){const tr=new Ut(fe[qt]),er=new Kt([tr],{width:"400em",height:ce(Ge),viewBox:"0 0 "+F+" "+ke,preserveAspectRatio:Zt[qt]+" slice"}),br=ge.makeSvgSpan([Rt[qt]],[er],i);if(nt===1)return{span:br,minWidth:pe,height:Ge};br.style.height=ce(Ge),W.push(br)}return{span:ge.makeSpan(["stretchy"],W,i),minWidth:pe,height:Ge}}}const{span:h,minWidth:b,height:k}=l();return h.height=k,h.style.height=ce(k),b>0&&(h.style.minWidth=ce(b)),h}};function zt(s,i){if(!s||s.type!==i)throw new Error("Expected node of type "+i+", but got "+(s?"node of type "+s.type:String(s)));return s}function Ps(s){const i=ai(s);if(!i)throw new Error("Expected node of symbol group type, but got "+(s?"node of type "+s.type:String(s)));return i}function ai(s){return s&&(s.type==="atom"||Rr.hasOwnProperty(s.type))?s:null}const zs=(s,i)=>{let l,h,b;s&&s.type==="supsub"?(h=zt(s.base,"accent"),l=h.base,s.base=l,b=jr(Qt(s,i)),s.base=h):(h=zt(s,"accent"),l=h.base);const k=Qt(l,i.havingCrampedStyle()),F=h.isShifty&&C.isCharacterBox(l);let z=0;if(F){const ke=C.getBaseElem(l),Ge=Qt(ke,i.havingCrampedStyle());z=Ir(Ge).skew}const W=h.label==="\\c";let te=W?k.height+k.depth:Math.min(k.height,i.fontMetrics().xHeight),fe;if(h.isStretchy)fe=_n.svgSpan(h,i),fe=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"elem",elem:fe,wrapperClasses:["svg-align"],wrapperStyle:z>0?{width:"calc(100% - "+ce(2*z)+")",marginLeft:ce(2*z)}:void 0}]},i);else{let ke,Ge;h.label==="\\vec"?(ke=ge.staticSvg("vec",i),Ge=ge.svgData.vec[1]):(ke=ge.makeOrd({mode:h.mode,text:h.label},i,"textord"),ke=Ir(ke),ke.italic=0,Ge=ke.width,W&&(te+=ke.depth)),fe=ge.makeSpan(["accent-body"],[ke]);const nt=h.label==="\\textcircled";nt&&(fe.classes.push("accent-full"),te=k.height);let Rt=z;nt||(Rt-=Ge/2),fe.style.left=ce(Rt),h.label==="\\textcircled"&&(fe.style.top=".2em"),fe=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:-te},{type:"elem",elem:fe}]},i)}const pe=ge.makeSpan(["mord","accent"],[fe],i);return b?(b.children[0]=pe,b.height=Math.max(pe.height,b.height),b.classes[0]="mord",b):pe},Hu=(s,i)=>{const l=s.isStretchy?_n.mathMLnode(s.label):new Xe.MathNode("mo",[pn(s.label,s.mode)]),h=new Xe.MathNode("mover",[fr(s.base,i),l]);return h.setAttribute("accent","true"),h},$m=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(s=>"\\"+s).join("|"));Qe({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(s,i)=>{const l=Bn(i[0]),h=!$m.test(s.funcName),b=!h||s.funcName==="\\widehat"||s.funcName==="\\widetilde"||s.funcName==="\\widecheck";return{type:"accent",mode:s.parser.mode,label:s.funcName,isStretchy:h,isShifty:b,base:l}},htmlBuilder:zs,mathmlBuilder:Hu}),Qe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(s,i)=>{const l=i[0];let h=s.parser.mode;return h==="math"&&(s.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+s.funcName+" works only in text mode"),h="text"),{type:"accent",mode:h,label:s.funcName,isStretchy:!1,isShifty:!0,base:l}},htmlBuilder:zs,mathmlBuilder:Hu}),Qe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(s,i)=>{let{parser:l,funcName:h}=s;const b=i[0];return{type:"accentUnder",mode:l.mode,label:h,base:b}},htmlBuilder:(s,i)=>{const l=Qt(s.base,i),h=_n.svgSpan(s,i),b=s.label==="\\utilde"?.12:0,k=ge.makeVList({positionType:"top",positionData:l.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:l}]},i);return ge.makeSpan(["mord","accentunder"],[k],i)},mathmlBuilder:(s,i)=>{const l=_n.mathMLnode(s.label),h=new Xe.MathNode("munder",[fr(s.base,i),l]);return h.setAttribute("accentunder","true"),h}});const ii=s=>{const i=new Xe.MathNode("mpadded",s?[s]:[]);return i.setAttribute("width","+0.6em"),i.setAttribute("lspace","0.3em"),i};Qe({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,l){let{parser:h,funcName:b}=s;return{type:"xArrow",mode:h.mode,label:b,body:i[0],below:l[0]}},htmlBuilder(s,i){const l=i.style;let h=i.havingStyle(l.sup());const b=ge.wrapFragment(Qt(s.body,h,i),i),k=s.label.slice(0,2)==="\\x"?"x":"cd";b.classes.push(k+"-arrow-pad");let F;s.below&&(h=i.havingStyle(l.sub()),F=ge.wrapFragment(Qt(s.below,h,i),i),F.classes.push(k+"-arrow-pad"));const z=_n.svgSpan(s,i),W=-i.fontMetrics().axisHeight+.5*z.height;let te=-i.fontMetrics().axisHeight-.5*z.height-.111;(b.depth>.25||s.label==="\\xleftequilibrium")&&(te-=b.depth);let fe;if(F){const pe=-i.fontMetrics().axisHeight+F.height+.5*z.height+.111;fe=ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:te},{type:"elem",elem:z,shift:W},{type:"elem",elem:F,shift:pe}]},i)}else fe=ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:te},{type:"elem",elem:z,shift:W}]},i);return fe.children[0].children[0].children[1].classes.push("svg-align"),ge.makeSpan(["mrel","x-arrow"],[fe],i)},mathmlBuilder(s,i){const l=_n.mathMLnode(s.label);l.setAttribute("minsize",s.label.charAt(0)==="x"?"1.75em":"3.0em");let h;if(s.body){const b=ii(fr(s.body,i));if(s.below){const k=ii(fr(s.below,i));h=new Xe.MathNode("munderover",[l,k,b])}else h=new Xe.MathNode("mover",[l,b])}else if(s.below){const b=ii(fr(s.below,i));h=new Xe.MathNode("munder",[l,b])}else h=ii(),h=new Xe.MathNode("mover",[l,h]);return h}});const Pm=ge.makeSpan;function qu(s,i){const l=Pr(s.body,i,!0);return Pm([s.mclass],l,i)}function Wu(s,i){let l;const h=nn(s.body,i);return s.mclass==="minner"?l=new Xe.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(l=h[0],l.type="mi"):l=new Xe.MathNode("mi",h):(s.isCharacterBox?(l=h[0],l.type="mo"):l=new Xe.MathNode("mo",h),s.mclass==="mbin"?(l.attributes.lspace="0.22em",l.attributes.rspace="0.22em"):s.mclass==="mpunct"?(l.attributes.lspace="0em",l.attributes.rspace="0.17em"):s.mclass==="mopen"||s.mclass==="mclose"?(l.attributes.lspace="0em",l.attributes.rspace="0em"):s.mclass==="minner"&&(l.attributes.lspace="0.0556em",l.attributes.width="+0.1111em")),l}Qe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(s,i){let{parser:l,funcName:h}=s;const b=i[0];return{type:"mclass",mode:l.mode,mclass:"m"+h.slice(5),body:vr(b),isCharacterBox:C.isCharacterBox(b)}},htmlBuilder:qu,mathmlBuilder:Wu});const si=s=>{const i=s.type==="ordgroup"&&s.body.length?s.body[0]:s;return i.type==="atom"&&(i.family==="bin"||i.family==="rel")?"m"+i.family:"mord"};Qe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,i){let{parser:l}=s;return{type:"mclass",mode:l.mode,mclass:si(i[0]),body:vr(i[1]),isCharacterBox:C.isCharacterBox(i[1])}}}),Qe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,i){let{parser:l,funcName:h}=s;const b=i[1],k=i[0];let F;h!=="\\stackrel"?F=si(b):F="mrel";const z={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:h!=="\\stackrel",body:vr(b)},W={type:"supsub",mode:k.mode,base:z,sup:h==="\\underset"?null:k,sub:h==="\\underset"?k:null};return{type:"mclass",mode:l.mode,mclass:F,body:[W],isCharacterBox:C.isCharacterBox(W)}},htmlBuilder:qu,mathmlBuilder:Wu}),Qe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:l}=s;return{type:"pmb",mode:l.mode,mclass:si(i[0]),body:vr(i[0])}},htmlBuilder(s,i){const l=Pr(s.body,i,!0),h=ge.makeSpan([s.mclass],l,i);return h.style.textShadow="0.02em 0.01em 0.04px",h},mathmlBuilder(s,i){const l=nn(s.body,i),h=new Xe.MathNode("mstyle",l);return h.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),h}});const zm={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Vu=()=>({type:"styling",body:[],mode:"math",style:"display"}),Uu=s=>s.type==="textord"&&s.text==="@",Im=(s,i)=>(s.type==="mathord"||s.type==="atom")&&s.text===i;function jm(s,i,l){const h=zm[s];switch(h){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return l.callFunction(h,[i[0]],[i[1]]);case"\\uparrow":case"\\downarrow":{const b=l.callFunction("\\\\cdleft",[i[0]],[]),k={type:"atom",text:h,mode:"math",family:"rel"},F=l.callFunction("\\Big",[k],[]),z=l.callFunction("\\\\cdright",[i[1]],[]),W={type:"ordgroup",mode:"math",body:[b,F,z]};return l.callFunction("\\\\cdparent",[W],[])}case"\\\\cdlongequal":return l.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const b={type:"textord",text:"\\Vert",mode:"math"};return l.callFunction("\\Big",[b],[])}default:return{type:"textord",text:" ",mode:"math"}}}function _m(s){const i=[];for(s.gullet.beginGroup(),s.gullet.macros.set("\\cr","\\\\\\relax"),s.gullet.beginGroup();;){i.push(s.parseExpression(!1,"\\\\")),s.gullet.endGroup(),s.gullet.beginGroup();const k=s.fetch().text;if(k==="&"||k==="\\\\")s.consume();else if(k==="\\end"){i[i.length-1].length===0&&i.pop();break}else throw new a("Expected \\\\ or \\cr or \\end",s.nextToken)}let l=[];const h=[l];for(let k=0;k<i.length;k++){const F=i[k];let z=Vu();for(let W=0;W<F.length;W++)if(!Uu(F[W]))z.body.push(F[W]);else{l.push(z),W+=1;const te=Ps(F[W]).text,fe=new Array(2);if(fe[0]={type:"ordgroup",mode:"math",body:[]},fe[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(te)>-1))if("<>AV".indexOf(te)>-1)for(let ke=0;ke<2;ke++){let Ge=!0;for(let nt=W+1;nt<F.length;nt++){if(Im(F[nt],te)){Ge=!1,W=nt;break}if(Uu(F[nt]))throw new a("Missing a "+te+" character to complete a CD arrow.",F[nt]);fe[ke].body.push(F[nt])}if(Ge)throw new a("Missing a "+te+" character to complete a CD arrow.",F[W])}else throw new a('Expected one of "<>AV=|." after @',F[W]);const pe={type:"styling",body:[jm(te,fe,s)],mode:"math",style:"display"};l.push(pe),z=Vu()}k%2===0?l.push(z):l.shift(),l=[],h.push(l)}s.gullet.endGroup(),s.gullet.endGroup();const b=new Array(h[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:h,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(h.length+1).fill([])}}Qe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(s,i){let{parser:l,funcName:h}=s;return{type:"cdlabel",mode:l.mode,side:h.slice(4),label:i[0]}},htmlBuilder(s,i){const l=i.havingStyle(i.style.sup()),h=ge.wrapFragment(Qt(s.label,l,i),i);return h.classes.push("cd-label-"+s.side),h.style.bottom=ce(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,i){let l=new Xe.MathNode("mrow",[fr(s.label,i)]);return l=new Xe.MathNode("mpadded",[l]),l.setAttribute("width","0"),s.side==="left"&&l.setAttribute("lspace","-1width"),l.setAttribute("voffset","0.7em"),l=new Xe.MathNode("mstyle",[l]),l.setAttribute("displaystyle","false"),l.setAttribute("scriptlevel","1"),l}}),Qe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(s,i){let{parser:l}=s;return{type:"cdlabelparent",mode:l.mode,fragment:i[0]}},htmlBuilder(s,i){const l=ge.wrapFragment(Qt(s.fragment,i),i);return l.classes.push("cd-vert-arrow"),l},mathmlBuilder(s,i){return new Xe.MathNode("mrow",[fr(s.fragment,i)])}}),Qe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:l}=s;const h=zt(i[0],"ordgroup").body;let b="";for(let z=0;z<h.length;z++){const W=zt(h[z],"textord");b+=W.text}let k=parseInt(b),F;if(isNaN(k))throw new a("\\@char has non-numeric argument "+b);if(k<0||k>=1114111)throw new a("\\@char with invalid code point "+b);return k<=65535?F=String.fromCharCode(k):(k-=65536,F=String.fromCharCode((k>>10)+55296,(k&1023)+56320)),{type:"textord",mode:l.mode,text:F}}});const Xu=(s,i)=>{const l=Pr(s.body,i.withColor(s.color),!1);return ge.makeFragment(l)},Yu=(s,i)=>{const l=nn(s.body,i.withColor(s.color)),h=new Xe.MathNode("mstyle",l);return h.setAttribute("mathcolor",s.color),h};Qe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(s,i){let{parser:l}=s;const h=zt(i[0],"color-token").color,b=i[1];return{type:"color",mode:l.mode,color:h,body:vr(b)}},htmlBuilder:Xu,mathmlBuilder:Yu}),Qe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(s,i){let{parser:l,breakOnTokenText:h}=s;const b=zt(i[0],"color-token").color;l.gullet.macros.set("\\current@color",b);const k=l.parseExpression(!0,h);return{type:"color",mode:l.mode,color:b,body:k}},htmlBuilder:Xu,mathmlBuilder:Yu}),Qe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(s,i,l){let{parser:h}=s;const b=h.gullet.future().text==="["?h.parseSizeGroup(!0):null,k=!h.settings.displayMode||!h.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:h.mode,newLine:k,size:b&&zt(b,"size").value}},htmlBuilder(s,i){const l=ge.makeSpan(["mspace"],[],i);return s.newLine&&(l.classes.push("newline"),s.size&&(l.style.marginTop=ce(ze(s.size,i)))),l},mathmlBuilder(s,i){const l=new Xe.MathNode("mspace");return s.newLine&&(l.setAttribute("linebreak","newline"),s.size&&l.setAttribute("height",ce(ze(s.size,i)))),l}});const Is={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Gu=s=>{const i=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",s);return i},Lm=s=>{let i=s.gullet.popToken();return i.text==="="&&(i=s.gullet.popToken(),i.text===" "&&(i=s.gullet.popToken())),i},Zu=(s,i,l,h)=>{let b=s.gullet.macros.get(l.text);b==null&&(l.noexpand=!0,b={tokens:[l],numArgs:0,unexpandable:!s.gullet.isExpandable(l.text)}),s.gullet.macros.set(i,b,h)};Qe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(s){let{parser:i,funcName:l}=s;i.consumeSpaces();const h=i.fetch();if(Is[h.text])return(l==="\\global"||l==="\\\\globallong")&&(h.text=Is[h.text]),zt(i.parseFunction(),"internal");throw new a("Invalid token after macro prefix",h)}}),Qe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:l}=s,h=i.gullet.popToken();const b=h.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(b))throw new a("Expected a control sequence",h);let k=0,F;const z=[[]];for(;i.gullet.future().text!=="{";)if(h=i.gullet.popToken(),h.text==="#"){if(i.gullet.future().text==="{"){F=i.gullet.future(),z[k].push("{");break}if(h=i.gullet.popToken(),!/^[1-9]$/.test(h.text))throw new a('Invalid argument number "'+h.text+'"');if(parseInt(h.text)!==k+1)throw new a('Argument number "'+h.text+'" out of order');k++,z.push([])}else{if(h.text==="EOF")throw new a("Expected a macro definition");z[k].push(h.text)}let{tokens:W}=i.gullet.consumeArg();return F&&W.unshift(F),(l==="\\edef"||l==="\\xdef")&&(W=i.gullet.expandTokens(W),W.reverse()),i.gullet.macros.set(b,{tokens:W,numArgs:k,delimiters:z},l===Is[l]),{type:"internal",mode:i.mode}}}),Qe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:l}=s;const h=Gu(i.gullet.popToken());i.gullet.consumeSpaces();const b=Lm(i);return Zu(i,h,b,l==="\\\\globallet"),{type:"internal",mode:i.mode}}}),Qe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:i,funcName:l}=s;const h=Gu(i.gullet.popToken()),b=i.gullet.popToken(),k=i.gullet.popToken();return Zu(i,h,k,l==="\\\\globalfuture"),i.gullet.pushToken(k),i.gullet.pushToken(b),{type:"internal",mode:i.mode}}});const ga=function(s,i,l){const h=It.math[s]&&It.math[s].replace,b=it(h||s,i,l);if(!b)throw new Error("Unsupported symbol "+s+" and font size "+i+".");return b},js=function(s,i,l,h){const b=l.havingBaseStyle(i),k=ge.makeSpan(h.concat(b.sizingClasses(l)),[s],l),F=b.sizeMultiplier/l.sizeMultiplier;return k.height*=F,k.depth*=F,k.maxFontSize=b.sizeMultiplier,k},Ju=function(s,i,l){const h=i.havingBaseStyle(l),b=(1-i.sizeMultiplier/h.sizeMultiplier)*i.fontMetrics().axisHeight;s.classes.push("delimcenter"),s.style.top=ce(b),s.height-=b,s.depth+=b},Km=function(s,i,l,h,b,k){const F=ge.makeSymbol(s,"Main-Regular",b,h),z=js(F,i,h,k);return l&&Ju(z,h,i),z},Hm=function(s,i,l,h){return ge.makeSymbol(s,"Size"+i+"-Regular",l,h)},Qu=function(s,i,l,h,b,k){const F=Hm(s,i,b,h),z=js(ge.makeSpan(["delimsizing","size"+i],[F],h),R.TEXT,h,k);return l&&Ju(z,h,R.TEXT),z},_s=function(s,i,l){let h;return i==="Size1-Regular"?h="delim-size1":h="delim-size4",{type:"elem",elem:ge.makeSpan(["delimsizinginner",h],[ge.makeSpan([],[ge.makeSymbol(s,i,l)])])}},Ls=function(s,i,l){const h=Me["Size4-Regular"][s.charCodeAt(0)]?Me["Size4-Regular"][s.charCodeAt(0)][4]:Me["Size1-Regular"][s.charCodeAt(0)][4],b=new Ut("inner",Ee(s,Math.round(1e3*i))),k=new Kt([b],{width:ce(h),height:ce(i),style:"width:"+ce(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*i),preserveAspectRatio:"xMinYMin"}),F=ge.makeSvgSpan([],[k],l);return F.height=i,F.style.height=ce(i),F.style.width=ce(h),{type:"elem",elem:F}},Ks=.008,li={type:"kern",size:-1*Ks},qm=["|","\\lvert","\\rvert","\\vert"],Wm=["\\|","\\lVert","\\rVert","\\Vert"],ec=function(s,i,l,h,b,k){let F,z,W,te,fe="",pe=0;F=W=te=s,z=null;let ke="Size1-Regular";s==="\\uparrow"?W=te="\u23D0":s==="\\Uparrow"?W=te="\u2016":s==="\\downarrow"?F=W="\u23D0":s==="\\Downarrow"?F=W="\u2016":s==="\\updownarrow"?(F="\\uparrow",W="\u23D0",te="\\downarrow"):s==="\\Updownarrow"?(F="\\Uparrow",W="\u2016",te="\\Downarrow"):qm.includes(s)?(W="\u2223",fe="vert",pe=333):Wm.includes(s)?(W="\u2225",fe="doublevert",pe=556):s==="["||s==="\\lbrack"?(F="\u23A1",W="\u23A2",te="\u23A3",ke="Size4-Regular",fe="lbrack",pe=667):s==="]"||s==="\\rbrack"?(F="\u23A4",W="\u23A5",te="\u23A6",ke="Size4-Regular",fe="rbrack",pe=667):s==="\\lfloor"||s==="\u230A"?(W=F="\u23A2",te="\u23A3",ke="Size4-Regular",fe="lfloor",pe=667):s==="\\lceil"||s==="\u2308"?(F="\u23A1",W=te="\u23A2",ke="Size4-Regular",fe="lceil",pe=667):s==="\\rfloor"||s==="\u230B"?(W=F="\u23A5",te="\u23A6",ke="Size4-Regular",fe="rfloor",pe=667):s==="\\rceil"||s==="\u2309"?(F="\u23A4",W=te="\u23A5",ke="Size4-Regular",fe="rceil",pe=667):s==="("||s==="\\lparen"?(F="\u239B",W="\u239C",te="\u239D",ke="Size4-Regular",fe="lparen",pe=875):s===")"||s==="\\rparen"?(F="\u239E",W="\u239F",te="\u23A0",ke="Size4-Regular",fe="rparen",pe=875):s==="\\{"||s==="\\lbrace"?(F="\u23A7",z="\u23A8",te="\u23A9",W="\u23AA",ke="Size4-Regular"):s==="\\}"||s==="\\rbrace"?(F="\u23AB",z="\u23AC",te="\u23AD",W="\u23AA",ke="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?(F="\u23A7",te="\u23A9",W="\u23AA",ke="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?(F="\u23AB",te="\u23AD",W="\u23AA",ke="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?(F="\u23A7",te="\u23AD",W="\u23AA",ke="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&(F="\u23AB",te="\u23A9",W="\u23AA",ke="Size4-Regular");const Ge=ga(F,ke,b),nt=Ge.height+Ge.depth,Rt=ga(W,ke,b),Zt=Rt.height+Rt.depth,qt=ga(te,ke,b),tr=qt.height+qt.depth;let er=0,br=1;if(z!==null){const Br=ga(z,ke,b);er=Br.height+Br.depth,br=2}const qr=nt+tr+er,Gr=Math.max(0,Math.ceil((i-qr)/(br*Zt))),mn=qr+Gr*br*Zt;let Po=h.fontMetrics().axisHeight;l&&(Po*=h.sizeMultiplier);const rr=mn/2-Po,cr=[];if(fe.length>0){const Br=mn-nt-tr,kr=Math.round(mn*1e3),gn=Ae(fe,Math.round(Br*1e3)),vg=new Ut(fe,gn),qc=(pe/1e3).toFixed(3)+"em",Wc=(kr/1e3).toFixed(3)+"em",bg=new Kt([vg],{width:qc,height:Wc,viewBox:"0 0 "+pe+" "+kr}),hi=ge.makeSvgSpan([],[bg],h);hi.height=kr/1e3,hi.style.width=qc,hi.style.height=Wc,cr.push({type:"elem",elem:hi})}else{if(cr.push(_s(te,ke,b)),cr.push(li),z===null){const Br=mn-nt-tr+2*Ks;cr.push(Ls(W,Br,h))}else{const Br=(mn-nt-tr-er)/2+2*Ks;cr.push(Ls(W,Br,h)),cr.push(li),cr.push(_s(z,ke,b)),cr.push(li),cr.push(Ls(W,Br,h))}cr.push(li),cr.push(_s(F,ke,b))}const yr=h.havingBaseStyle(R.TEXT),wr=ge.makeVList({positionType:"bottom",positionData:rr,children:cr},yr);return js(ge.makeSpan(["delimsizing","mult"],[wr],yr),R.TEXT,h,k)},Hs=80,qs=.08,Ws=function(s,i,l,h,b){const k=be(s,h,l),F=new Ut(s,k),z=new Kt([F],{width:"400em",height:ce(i),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});return ge.makeSvgSpan(["hide-tail"],[z],b)},Vm=function(s,i){const l=i.havingBaseSizing(),h=oc("\\surd",s*l.sizeMultiplier,nc,l);let b=l.sizeMultiplier;const k=Math.max(0,i.minRuleThickness-i.fontMetrics().sqrtRuleThickness);let F,z=0,W=0,te=0,fe;return h.type==="small"?(te=1e3+1e3*k+Hs,s<1?b=1:s<1.4&&(b=.7),z=(1+k+qs)/b,W=(1+k)/b,F=Ws("sqrtMain",z,te,k,i),F.style.minWidth="0.853em",fe=.833/b):h.type==="large"?(te=(1e3+Hs)*va[h.size],W=(va[h.size]+k)/b,z=(va[h.size]+k+qs)/b,F=Ws("sqrtSize"+h.size,z,te,k,i),F.style.minWidth="1.02em",fe=1/b):(z=s+k+qs,W=s+k,te=Math.floor(1e3*s+k)+Hs,F=Ws("sqrtTall",z,te,k,i),F.style.minWidth="0.742em",fe=1.056),F.height=W,F.style.height=ce(z),{span:F,advanceWidth:fe,ruleWidth:(i.fontMetrics().sqrtRuleThickness+k)*b}},tc=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Um=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],rc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],va=[0,1.2,1.8,2.4,3],Xm=function(s,i,l,h,b){if(s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle"),tc.includes(s)||rc.includes(s))return Qu(s,i,!1,l,h,b);if(Um.includes(s))return ec(s,va[i],!1,l,h,b);throw new a("Illegal delimiter: '"+s+"'")},Ym=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Gm=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],nc=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Zm=function(s){if(s.type==="small")return"Main-Regular";if(s.type==="large")return"Size"+s.size+"-Regular";if(s.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+s.type+"' here.")},oc=function(s,i,l,h){const b=Math.min(2,3-h.style.size);for(let k=b;k<l.length&&l[k].type!=="stack";k++){const F=ga(s,Zm(l[k]),"math");let z=F.height+F.depth;if(l[k].type==="small"){const W=h.havingBaseStyle(l[k].style);z*=W.sizeMultiplier}if(z>i)return l[k]}return l[l.length-1]},ac=function(s,i,l,h,b,k){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let F;rc.includes(s)?F=Ym:tc.includes(s)?F=nc:F=Gm;const z=oc(s,i,F,h);return z.type==="small"?Km(s,z.style,l,h,b,k):z.type==="large"?Qu(s,z.size,l,h,b,k):ec(s,i,l,h,b,k)};var Ln={sqrtImage:Vm,sizedDelim:Xm,sizeToMaxHeight:va,customSizedDelim:ac,leftRightDelim:function(s,i,l,h,b,k){const F=h.fontMetrics().axisHeight*h.sizeMultiplier,z=901,W=5/h.fontMetrics().ptPerEm,te=Math.max(i-F,l+F),fe=Math.max(te/500*z,2*te-W);return ac(s,fe,!0,h,b,k)}};const ic={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Jm=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function ui(s,i){const l=ai(s);if(l&&Jm.includes(l.text))return l;throw l?new a("Invalid delimiter '"+l.text+"' after '"+i.funcName+"'",s):new a("Invalid delimiter type '"+s.type+"'",s)}Qe({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(s,i)=>{const l=ui(i[0],s);return{type:"delimsizing",mode:s.parser.mode,size:ic[s.funcName].size,mclass:ic[s.funcName].mclass,delim:l.text}},htmlBuilder:(s,i)=>s.delim==="."?ge.makeSpan([s.mclass]):Ln.sizedDelim(s.delim,s.size,i,s.mode,[s.mclass]),mathmlBuilder:s=>{const i=[];s.delim!=="."&&i.push(pn(s.delim,s.mode));const l=new Xe.MathNode("mo",i);s.mclass==="mopen"||s.mclass==="mclose"?l.setAttribute("fence","true"):l.setAttribute("fence","false"),l.setAttribute("stretchy","true");const h=ce(Ln.sizeToMaxHeight[s.size]);return l.setAttribute("minsize",h),l.setAttribute("maxsize",h),l}});function sc(s){if(!s.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Qe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const l=s.parser.gullet.macros.get("\\current@color");if(l&&typeof l!="string")throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:s.parser.mode,delim:ui(i[0],s).text,color:l}}}),Qe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const l=ui(i[0],s),h=s.parser;++h.leftrightDepth;const b=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const k=zt(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:b,left:l.text,right:k.delim,rightColor:k.color}},htmlBuilder:(s,i)=>{sc(s);const l=Pr(s.body,i,!0,["mopen","mclose"]);let h=0,b=0,k=!1;for(let W=0;W<l.length;W++)l[W].isMiddle?k=!0:(h=Math.max(l[W].height,h),b=Math.max(l[W].depth,b));h*=i.sizeMultiplier,b*=i.sizeMultiplier;let F;if(s.left==="."?F=ma(i,["mopen"]):F=Ln.leftRightDelim(s.left,h,b,i,s.mode,["mopen"]),l.unshift(F),k)for(let W=1;W<l.length;W++){const te=l[W].isMiddle;te&&(l[W]=Ln.leftRightDelim(te.delim,h,b,te.options,s.mode,[]))}let z;if(s.right===".")z=ma(i,["mclose"]);else{const W=s.rightColor?i.withColor(s.rightColor):i;z=Ln.leftRightDelim(s.right,h,b,W,s.mode,["mclose"])}return l.push(z),ge.makeSpan(["minner"],l,i)},mathmlBuilder:(s,i)=>{sc(s);const l=nn(s.body,i);if(s.left!=="."){const h=new Xe.MathNode("mo",[pn(s.left,s.mode)]);h.setAttribute("fence","true"),l.unshift(h)}if(s.right!=="."){const h=new Xe.MathNode("mo",[pn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),l.push(h)}return Os(l)}}),Qe({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{const l=ui(i[0],s);if(!s.parser.leftrightDepth)throw new a("\\middle without preceding \\left",l);return{type:"middle",mode:s.parser.mode,delim:l.text}},htmlBuilder:(s,i)=>{let l;if(s.delim===".")l=ma(i,[]);else{l=Ln.sizedDelim(s.delim,1,i,s.mode,[]);const h={delim:s.delim,options:i};l.isMiddle=h}return l},mathmlBuilder:(s,i)=>{const l=s.delim==="\\vert"||s.delim==="|"?pn("|","text"):pn(s.delim,s.mode),h=new Xe.MathNode("mo",[l]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const Vs=(s,i)=>{const l=ge.wrapFragment(Qt(s.body,i),i),h=s.label.slice(1);let b=i.sizeMultiplier,k,F=0;const z=C.isCharacterBox(s.body);if(h==="sout")k=ge.makeSpan(["stretchy","sout"]),k.height=i.fontMetrics().defaultRuleThickness/b,F=-.5*i.fontMetrics().xHeight;else if(h==="phase"){const te=ze({number:.6,unit:"pt"},i),fe=ze({number:.35,unit:"ex"},i),pe=i.havingBaseSizing();b=b/pe.sizeMultiplier;const ke=l.height+l.depth+te+fe;l.style.paddingLeft=ce(ke/2+te);const Ge=Math.floor(1e3*ke*b),nt=he(Ge),Rt=new Kt([new Ut("phase",nt)],{width:"400em",height:ce(Ge/1e3),viewBox:"0 0 400000 "+Ge,preserveAspectRatio:"xMinYMin slice"});k=ge.makeSvgSpan(["hide-tail"],[Rt],i),k.style.height=ce(ke),F=l.depth+te+fe}else{/cancel/.test(h)?z||l.classes.push("cancel-pad"):h==="angl"?l.classes.push("anglpad"):l.classes.push("boxpad");let te=0,fe=0,pe=0;/box/.test(h)?(pe=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness),te=i.fontMetrics().fboxsep+(h==="colorbox"?0:pe),fe=te):h==="angl"?(pe=Math.max(i.fontMetrics().defaultRuleThickness,i.minRuleThickness),te=4*pe,fe=Math.max(0,.25-l.depth)):(te=z?.2:0,fe=te),k=_n.encloseSpan(l,h,te,fe,i),/fbox|boxed|fcolorbox/.test(h)?(k.style.borderStyle="solid",k.style.borderWidth=ce(pe)):h==="angl"&&pe!==.049&&(k.style.borderTopWidth=ce(pe),k.style.borderRightWidth=ce(pe)),F=l.depth+fe,s.backgroundColor&&(k.style.backgroundColor=s.backgroundColor,s.borderColor&&(k.style.borderColor=s.borderColor))}let W;if(s.backgroundColor)W=ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:k,shift:F},{type:"elem",elem:l,shift:0}]},i);else{const te=/cancel|phase/.test(h)?["svg-align"]:[];W=ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:k,shift:F,wrapperClasses:te}]},i)}return/cancel/.test(h)&&(W.height=l.height,W.depth=l.depth),/cancel/.test(h)&&!z?ge.makeSpan(["mord","cancel-lap"],[W],i):ge.makeSpan(["mord"],[W],i)},Us=(s,i)=>{let l=0;const h=new Xe.MathNode(s.label.indexOf("colorbox")>-1?"mpadded":"menclose",[fr(s.body,i)]);switch(s.label){case"\\cancel":h.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":h.setAttribute("notation","downdiagonalstrike");break;case"\\phase":h.setAttribute("notation","phasorangle");break;case"\\sout":h.setAttribute("notation","horizontalstrike");break;case"\\fbox":h.setAttribute("notation","box");break;case"\\angl":h.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(l=i.fontMetrics().fboxsep*i.fontMetrics().ptPerEm,h.setAttribute("width","+"+2*l+"pt"),h.setAttribute("height","+"+2*l+"pt"),h.setAttribute("lspace",l+"pt"),h.setAttribute("voffset",l+"pt"),s.label==="\\fcolorbox"){const b=Math.max(i.fontMetrics().fboxrule,i.minRuleThickness);h.setAttribute("style","border: "+b+"em solid "+String(s.borderColor))}break;case"\\xcancel":h.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return s.backgroundColor&&h.setAttribute("mathbackground",s.backgroundColor),h};Qe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(s,i,l){let{parser:h,funcName:b}=s;const k=zt(i[0],"color-token").color,F=i[1];return{type:"enclose",mode:h.mode,label:b,backgroundColor:k,body:F}},htmlBuilder:Vs,mathmlBuilder:Us}),Qe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,i,l){let{parser:h,funcName:b}=s;const k=zt(i[0],"color-token").color,F=zt(i[1],"color-token").color,z=i[2];return{type:"enclose",mode:h.mode,label:b,backgroundColor:F,borderColor:k,body:z}},htmlBuilder:Vs,mathmlBuilder:Us}),Qe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(s,i){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\fbox",body:i[0]}}}),Qe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(s,i){let{parser:l,funcName:h}=s;const b=i[0];return{type:"enclose",mode:l.mode,label:h,body:b}},htmlBuilder:Vs,mathmlBuilder:Us}),Qe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(s,i){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\angl",body:i[0]}}});const lc={};function Nn(s){let{type:i,names:l,props:h,handler:b,htmlBuilder:k,mathmlBuilder:F}=s;const z={type:i,numArgs:h.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:b};for(let W=0;W<l.length;++W)lc[l[W]]=z;k&&(Ar[i]=k),F&&(Cn[i]=F)}const uc={};function I(s,i){uc[s]=i}class on{constructor(i,l,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=i,this.start=l,this.end=h}static range(i,l){return l?!i||!i.loc||!l.loc||i.loc.lexer!==l.loc.lexer?null:new on(i.loc.lexer,i.loc.start,l.loc.end):i&&i.loc}}class cn{constructor(i,l){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=i,this.loc=l}range(i,l){return new cn(l,on.range(this,i))}}function cc(s){const i=[];s.consumeSpaces();let l=s.fetch().text;for(l==="\\relax"&&(s.consume(),s.consumeSpaces(),l=s.fetch().text);l==="\\hline"||l==="\\hdashline";)s.consume(),i.push(l==="\\hdashline"),s.consumeSpaces(),l=s.fetch().text;return i}const ci=s=>{if(!s.parser.settings.displayMode)throw new a("{"+s.envName+"} can be used only in display mode.")};function Xs(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function Zn(s,i,l){let{hskipBeforeAndAfter:h,addJot:b,cols:k,arraystretch:F,colSeparationType:z,autoTag:W,singleRow:te,emptySingleRow:fe,maxNumCols:pe,leqno:ke}=i;if(s.gullet.beginGroup(),te||s.gullet.macros.set("\\cr","\\\\\\relax"),!F){const br=s.gullet.expandMacroAsText("\\arraystretch");if(br==null)F=1;else if(F=parseFloat(br),!F||F<0)throw new a("Invalid \\arraystretch: "+br)}s.gullet.beginGroup();let Ge=[];const nt=[Ge],Rt=[],Zt=[],qt=W!=null?[]:void 0;function tr(){W&&s.gullet.macros.set("\\@eqnsw","1",!0)}function er(){qt&&(s.gullet.macros.get("\\df@tag")?(qt.push(s.subparse([new cn("\\df@tag")])),s.gullet.macros.set("\\df@tag",void 0,!0)):qt.push(!!W&&s.gullet.macros.get("\\@eqnsw")==="1"))}for(tr(),Zt.push(cc(s));;){let br=s.parseExpression(!1,te?"\\end":"\\\\");s.gullet.endGroup(),s.gullet.beginGroup(),br={type:"ordgroup",mode:s.mode,body:br},l&&(br={type:"styling",mode:s.mode,style:l,body:[br]}),Ge.push(br);const qr=s.fetch().text;if(qr==="&"){if(pe&&Ge.length===pe){if(te||z)throw new a("Too many tab characters: &",s.nextToken);s.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}s.consume()}else if(qr==="\\end"){er(),Ge.length===1&&br.type==="styling"&&br.body[0].body.length===0&&(nt.length>1||!fe)&&nt.pop(),Zt.length<nt.length+1&&Zt.push([]);break}else if(qr==="\\\\"){s.consume();let Gr;s.gullet.future().text!==" "&&(Gr=s.parseSizeGroup(!0)),Rt.push(Gr?Gr.value:null),er(),Zt.push(cc(s)),Ge=[],nt.push(Ge),tr()}else throw new a("Expected & or \\\\ or \\cr or \\end",s.nextToken)}return s.gullet.endGroup(),s.gullet.endGroup(),{type:"array",mode:s.mode,addJot:b,arraystretch:F,body:nt,cols:k,rowGaps:Rt,hskipBeforeAndAfter:h,hLinesBeforeRow:Zt,colSeparationType:z,tags:qt,leqno:ke}}function Ys(s){return s.slice(0,1)==="d"?"display":"text"}const Tn=function(s,i){let l,h;const b=s.body.length,k=s.hLinesBeforeRow;let F=0,z=new Array(b);const W=[],te=Math.max(i.fontMetrics().arrayRuleWidth,i.minRuleThickness),fe=1/i.fontMetrics().ptPerEm;let pe=5*fe;s.colSeparationType&&s.colSeparationType==="small"&&(pe=.2778*(i.havingStyle(R.SCRIPT).sizeMultiplier/i.sizeMultiplier));const ke=s.colSeparationType==="CD"?ze({number:3,unit:"ex"},i):12*fe,Ge=3*fe,nt=s.arraystretch*ke,Rt=.7*nt,Zt=.3*nt;let qt=0;function tr(rr){for(let cr=0;cr<rr.length;++cr)cr>0&&(qt+=.25),W.push({pos:qt,isDashed:rr[cr]})}for(tr(k[0]),l=0;l<s.body.length;++l){const rr=s.body[l];let cr=Rt,yr=Zt;F<rr.length&&(F=rr.length);const wr=new Array(rr.length);for(h=0;h<rr.length;++h){const gn=Qt(rr[h],i);yr<gn.depth&&(yr=gn.depth),cr<gn.height&&(cr=gn.height),wr[h]=gn}const Br=s.rowGaps[l];let kr=0;Br&&(kr=ze(Br,i),kr>0&&(kr+=Zt,yr<kr&&(yr=kr),kr=0)),s.addJot&&(yr+=Ge),wr.height=cr,wr.depth=yr,qt+=cr,wr.pos=qt,qt+=yr+kr,z[l]=wr,tr(k[l+1])}const er=qt/2+i.fontMetrics().axisHeight,br=s.cols||[],qr=[];let Gr,mn;const Po=[];if(s.tags&&s.tags.some(rr=>rr))for(l=0;l<b;++l){const rr=z[l],cr=rr.pos-er,yr=s.tags[l];let wr;yr===!0?wr=ge.makeSpan(["eqn-num"],[],i):yr===!1?wr=ge.makeSpan([],[],i):wr=ge.makeSpan([],Pr(yr,i,!0),i),wr.depth=rr.depth,wr.height=rr.height,Po.push({type:"elem",elem:wr,shift:cr})}for(h=0,mn=0;h<F||mn<br.length;++h,++mn){let rr=br[mn]||{},cr=!0;for(;rr.type==="separator";){if(cr||(Gr=ge.makeSpan(["arraycolsep"],[]),Gr.style.width=ce(i.fontMetrics().doubleRuleSep),qr.push(Gr)),rr.separator==="|"||rr.separator===":"){const Br=rr.separator==="|"?"solid":"dashed",kr=ge.makeSpan(["vertical-separator"],[],i);kr.style.height=ce(qt),kr.style.borderRightWidth=ce(te),kr.style.borderRightStyle=Br,kr.style.margin="0 "+ce(-te/2);const gn=qt-er;gn&&(kr.style.verticalAlign=ce(-gn)),qr.push(kr)}else throw new a("Invalid separator type: "+rr.separator);mn++,rr=br[mn]||{},cr=!1}if(h>=F)continue;let yr;(h>0||s.hskipBeforeAndAfter)&&(yr=C.deflt(rr.pregap,pe),yr!==0&&(Gr=ge.makeSpan(["arraycolsep"],[]),Gr.style.width=ce(yr),qr.push(Gr)));let wr=[];for(l=0;l<b;++l){const Br=z[l],kr=Br[h];if(!kr)continue;const gn=Br.pos-er;kr.depth=Br.depth,kr.height=Br.height,wr.push({type:"elem",elem:kr,shift:gn})}wr=ge.makeVList({positionType:"individualShift",children:wr},i),wr=ge.makeSpan(["col-align-"+(rr.align||"c")],[wr]),qr.push(wr),(h<F-1||s.hskipBeforeAndAfter)&&(yr=C.deflt(rr.postgap,pe),yr!==0&&(Gr=ge.makeSpan(["arraycolsep"],[]),Gr.style.width=ce(yr),qr.push(Gr)))}if(z=ge.makeSpan(["mtable"],qr),W.length>0){const rr=ge.makeLineSpan("hline",i,te),cr=ge.makeLineSpan("hdashline",i,te),yr=[{type:"elem",elem:z,shift:0}];for(;W.length>0;){const wr=W.pop(),Br=wr.pos-er;wr.isDashed?yr.push({type:"elem",elem:cr,shift:Br}):yr.push({type:"elem",elem:rr,shift:Br})}z=ge.makeVList({positionType:"individualShift",children:yr},i)}if(Po.length===0)return ge.makeSpan(["mord"],[z],i);{let rr=ge.makeVList({positionType:"individualShift",children:Po},i);return rr=ge.makeSpan(["tag"],[rr],i),ge.makeFragment([z,rr])}},Qm={c:"center ",l:"left ",r:"right "},Mn=function(s,i){const l=[],h=new Xe.MathNode("mtd",[],["mtr-glue"]),b=new Xe.MathNode("mtd",[],["mml-eqn-num"]);for(let pe=0;pe<s.body.length;pe++){const ke=s.body[pe],Ge=[];for(let nt=0;nt<ke.length;nt++)Ge.push(new Xe.MathNode("mtd",[fr(ke[nt],i)]));s.tags&&s.tags[pe]&&(Ge.unshift(h),Ge.push(h),s.leqno?Ge.unshift(b):Ge.push(b)),l.push(new Xe.MathNode("mtr",Ge))}let k=new Xe.MathNode("mtable",l);const F=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);k.setAttribute("rowspacing",ce(F));let z="",W="";if(s.cols&&s.cols.length>0){const pe=s.cols;let ke="",Ge=!1,nt=0,Rt=pe.length;pe[0].type==="separator"&&(z+="top ",nt=1),pe[pe.length-1].type==="separator"&&(z+="bottom ",Rt-=1);for(let Zt=nt;Zt<Rt;Zt++)pe[Zt].type==="align"?(W+=Qm[pe[Zt].align],Ge&&(ke+="none "),Ge=!0):pe[Zt].type==="separator"&&Ge&&(ke+=pe[Zt].separator==="|"?"solid ":"dashed ",Ge=!1);k.setAttribute("columnalign",W.trim()),/[sd]/.test(ke)&&k.setAttribute("columnlines",ke.trim())}if(s.colSeparationType==="align"){const pe=s.cols||[];let ke="";for(let Ge=1;Ge<pe.length;Ge++)ke+=Ge%2?"0em ":"1em ";k.setAttribute("columnspacing",ke.trim())}else s.colSeparationType==="alignat"||s.colSeparationType==="gather"?k.setAttribute("columnspacing","0em"):s.colSeparationType==="small"?k.setAttribute("columnspacing","0.2778em"):s.colSeparationType==="CD"?k.setAttribute("columnspacing","0.5em"):k.setAttribute("columnspacing","1em");let te="";const fe=s.hLinesBeforeRow;z+=fe[0].length>0?"left ":"",z+=fe[fe.length-1].length>0?"right ":"";for(let pe=1;pe<fe.length-1;pe++)te+=fe[pe].length===0?"none ":fe[pe][0]?"dashed ":"solid ";return/[sd]/.test(te)&&k.setAttribute("rowlines",te.trim()),z!==""&&(k=new Xe.MathNode("menclose",[k]),k.setAttribute("notation",z.trim())),s.arraystretch&&s.arraystretch<1&&(k=new Xe.MathNode("mstyle",[k]),k.setAttribute("scriptlevel","1")),k},dc=function(s,i){s.envName.indexOf("ed")===-1&&ci(s);const l=[],h=s.envName.indexOf("at")>-1?"alignat":"align",b=s.envName==="split",k=Zn(s.parser,{cols:l,addJot:!0,autoTag:b?void 0:Xs(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:b?2:void 0,leqno:s.parser.settings.leqno},"display");let F,z=0;const W={type:"ordgroup",mode:s.mode,body:[]};if(i[0]&&i[0].type==="ordgroup"){let fe="";for(let pe=0;pe<i[0].body.length;pe++){const ke=zt(i[0].body[pe],"textord");fe+=ke.text}F=Number(fe),z=F*2}const te=!z;k.body.forEach(function(fe){for(let pe=1;pe<fe.length;pe+=2){const ke=zt(fe[pe],"styling");zt(ke.body[0],"ordgroup").body.unshift(W)}if(te)z<fe.length&&(z=fe.length);else{const pe=fe.length/2;if(F<pe)throw new a("Too many math in a row: "+("expected "+F+", but got "+pe),fe[0])}});for(let fe=0;fe<z;++fe){let pe="r",ke=0;fe%2===1?pe="l":fe>0&&te&&(ke=1),l[fe]={type:"align",align:pe,pregap:ke,postgap:0}}return k.colSeparationType=te?"align":"alignat",k};Nn({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,i){const l=(ai(i[0])?[i[0]]:zt(i[0],"ordgroup").body).map(function(b){const k=Ps(b).text;if("lcr".indexOf(k)!==-1)return{type:"align",align:k};if(k==="|")return{type:"separator",separator:"|"};if(k===":")return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+k,b)}),h={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return Zn(s.parser,h,Ys(s.envName))},htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(s){const i={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[s.envName.replace("*","")];let l="c";const h={hskipBeforeAndAfter:!1,cols:[{type:"align",align:l}]};if(s.envName.charAt(s.envName.length-1)==="*"){const F=s.parser;if(F.consumeSpaces(),F.fetch().text==="["){if(F.consume(),F.consumeSpaces(),l=F.fetch().text,"lcr".indexOf(l)===-1)throw new a("Expected l or c or r",F.nextToken);F.consume(),F.consumeSpaces(),F.expect("]"),F.consume(),h.cols=[{type:"align",align:l}]}}const b=Zn(s.parser,h,Ys(s.envName)),k=Math.max(0,...b.body.map(F=>F.length));return b.cols=new Array(k).fill({type:"align",align:l}),i?{type:"leftright",mode:s.mode,body:[b],left:i[0],right:i[1],rightColor:void 0}:b},htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(s){const i={arraystretch:.5},l=Zn(s.parser,i,"script");return l.colSeparationType="small",l},htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["subarray"],props:{numArgs:1},handler(s,i){const l=(ai(i[0])?[i[0]]:zt(i[0],"ordgroup").body).map(function(b){const k=Ps(b).text;if("lc".indexOf(k)!==-1)return{type:"align",align:k};throw new a("Unknown column alignment: "+k,b)});if(l.length>1)throw new a("{subarray} can contain only one column");let h={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5};if(h=Zn(s.parser,h,"script"),h.body.length>0&&h.body[0].length>1)throw new a("{subarray} can contain only one column");return h},htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(s){const i={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},l=Zn(s.parser,i,Ys(s.envName));return{type:"leftright",mode:s.mode,body:[l],left:s.envName.indexOf("r")>-1?".":"\\{",right:s.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:dc,htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(s){["gather","gather*"].includes(s.envName)&&ci(s);const i={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Xs(s.envName),emptySingleRow:!0,leqno:s.parser.settings.leqno};return Zn(s.parser,i,"display")},htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:dc,htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(s){ci(s);const i={autoTag:Xs(s.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:s.parser.settings.leqno};return Zn(s.parser,i,"display")},htmlBuilder:Tn,mathmlBuilder:Mn}),Nn({type:"array",names:["CD"],props:{numArgs:0},handler(s){return ci(s),_m(s.parser)},htmlBuilder:Tn,mathmlBuilder:Mn}),I("\\nonumber","\\gdef\\@eqnsw{0}"),I("\\notag","\\nonumber"),Qe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(s,i){throw new a(s.funcName+" valid only within array environment")}});var fc=lc;Qe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(s,i){let{parser:l,funcName:h}=s;const b=i[0];if(b.type!=="ordgroup")throw new a("Invalid environment name",b);let k="";for(let F=0;F<b.body.length;++F)k+=zt(b.body[F],"textord").text;if(h==="\\begin"){if(!fc.hasOwnProperty(k))throw new a("No such environment: "+k,b);const F=fc[k],{args:z,optArgs:W}=l.parseArguments("\\begin{"+k+"}",F),te={mode:l.mode,envName:k,parser:l},fe=F.handler(te,z,W);l.expect("\\end",!1);const pe=l.nextToken,ke=zt(l.parseFunction(),"environment");if(ke.name!==k)throw new a("Mismatch: \\begin{"+k+"} matched by \\end{"+ke.name+"}",pe);return fe}return{type:"environment",mode:l.mode,name:k,nameGroup:b}}});const hc=(s,i)=>{const l=s.font,h=i.withFont(l);return Qt(s.body,h)},pc=(s,i)=>{const l=s.font,h=i.withFont(l);return fr(s.body,h)},mc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Qe({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(s,i)=>{let{parser:l,funcName:h}=s;const b=Bn(i[0]);let k=h;return k in mc&&(k=mc[k]),{type:"font",mode:l.mode,font:k.slice(1),body:b}},htmlBuilder:hc,mathmlBuilder:pc}),Qe({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(s,i)=>{let{parser:l}=s;const h=i[0],b=C.isCharacterBox(h);return{type:"mclass",mode:l.mode,mclass:si(h),body:[{type:"font",mode:l.mode,font:"boldsymbol",body:h}],isCharacterBox:b}}}),Qe({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{parser:l,funcName:h,breakOnTokenText:b}=s;const{mode:k}=l,F=l.parseExpression(!0,b),z="math"+h.slice(1);return{type:"font",mode:k,font:z,body:{type:"ordgroup",mode:l.mode,body:F}}},htmlBuilder:hc,mathmlBuilder:pc});const gc=(s,i)=>{let l=i;return s==="display"?l=l.id>=R.SCRIPT.id?l.text():R.DISPLAY:s==="text"&&l.size===R.DISPLAY.size?l=R.TEXT:s==="script"?l=R.SCRIPT:s==="scriptscript"&&(l=R.SCRIPTSCRIPT),l},Gs=(s,i)=>{const l=gc(s.size,i.style),h=l.fracNum(),b=l.fracDen();let k;k=i.havingStyle(h);const F=Qt(s.numer,k,i);if(s.continued){const tr=8.5/i.fontMetrics().ptPerEm,er=3.5/i.fontMetrics().ptPerEm;F.height=F.height<tr?tr:F.height,F.depth=F.depth<er?er:F.depth}k=i.havingStyle(b);const z=Qt(s.denom,k,i);let W,te,fe;s.hasBarLine?(s.barSize?(te=ze(s.barSize,i),W=ge.makeLineSpan("frac-line",i,te)):W=ge.makeLineSpan("frac-line",i),te=W.height,fe=W.height):(W=null,te=0,fe=i.fontMetrics().defaultRuleThickness);let pe,ke,Ge;l.size===R.DISPLAY.size||s.size==="display"?(pe=i.fontMetrics().num1,te>0?ke=3*fe:ke=7*fe,Ge=i.fontMetrics().denom1):(te>0?(pe=i.fontMetrics().num2,ke=fe):(pe=i.fontMetrics().num3,ke=3*fe),Ge=i.fontMetrics().denom2);let nt;if(W){const tr=i.fontMetrics().axisHeight;pe-F.depth-(tr+.5*te)<ke&&(pe+=ke-(pe-F.depth-(tr+.5*te))),tr-.5*te-(z.height-Ge)<ke&&(Ge+=ke-(tr-.5*te-(z.height-Ge)));const er=-(tr-.5*te);nt=ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:z,shift:Ge},{type:"elem",elem:W,shift:er},{type:"elem",elem:F,shift:-pe}]},i)}else{const tr=pe-F.depth-(z.height-Ge);tr<ke&&(pe+=.5*(ke-tr),Ge+=.5*(ke-tr)),nt=ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:z,shift:Ge},{type:"elem",elem:F,shift:-pe}]},i)}k=i.havingStyle(l),nt.height*=k.sizeMultiplier/i.sizeMultiplier,nt.depth*=k.sizeMultiplier/i.sizeMultiplier;let Rt;l.size===R.DISPLAY.size?Rt=i.fontMetrics().delim1:l.size===R.SCRIPTSCRIPT.size?Rt=i.havingStyle(R.SCRIPT).fontMetrics().delim2:Rt=i.fontMetrics().delim2;let Zt,qt;return s.leftDelim==null?Zt=ma(i,["mopen"]):Zt=Ln.customSizedDelim(s.leftDelim,Rt,!0,i.havingStyle(l),s.mode,["mopen"]),s.continued?qt=ge.makeSpan([]):s.rightDelim==null?qt=ma(i,["mclose"]):qt=Ln.customSizedDelim(s.rightDelim,Rt,!0,i.havingStyle(l),s.mode,["mclose"]),ge.makeSpan(["mord"].concat(k.sizingClasses(i)),[Zt,ge.makeSpan(["mfrac"],[nt]),qt],i)},Zs=(s,i)=>{let l=new Xe.MathNode("mfrac",[fr(s.numer,i),fr(s.denom,i)]);if(!s.hasBarLine)l.setAttribute("linethickness","0px");else if(s.barSize){const b=ze(s.barSize,i);l.setAttribute("linethickness",ce(b))}const h=gc(s.size,i.style);if(h.size!==i.style.size){l=new Xe.MathNode("mstyle",[l]);const b=h.size===R.DISPLAY.size?"true":"false";l.setAttribute("displaystyle",b),l.setAttribute("scriptlevel","0")}if(s.leftDelim!=null||s.rightDelim!=null){const b=[];if(s.leftDelim!=null){const k=new Xe.MathNode("mo",[new Xe.TextNode(s.leftDelim.replace("\\",""))]);k.setAttribute("fence","true"),b.push(k)}if(b.push(l),s.rightDelim!=null){const k=new Xe.MathNode("mo",[new Xe.TextNode(s.rightDelim.replace("\\",""))]);k.setAttribute("fence","true"),b.push(k)}return Os(b)}return l};Qe({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(s,i)=>{let{parser:l,funcName:h}=s;const b=i[0],k=i[1];let F,z=null,W=null,te="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":F=!0;break;case"\\\\atopfrac":F=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":F=!1,z="(",W=")";break;case"\\\\bracefrac":F=!1,z="\\{",W="\\}";break;case"\\\\brackfrac":F=!1,z="[",W="]";break;default:throw new Error("Unrecognized genfrac command")}switch(h){case"\\dfrac":case"\\dbinom":te="display";break;case"\\tfrac":case"\\tbinom":te="text";break}return{type:"genfrac",mode:l.mode,continued:!1,numer:b,denom:k,hasBarLine:F,leftDelim:z,rightDelim:W,size:te,barSize:null}},htmlBuilder:Gs,mathmlBuilder:Zs}),Qe({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,i)=>{let{parser:l,funcName:h}=s;const b=i[0],k=i[1];return{type:"genfrac",mode:l.mode,continued:!0,numer:b,denom:k,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Qe({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(s){let{parser:i,funcName:l,token:h}=s,b;switch(l){case"\\over":b="\\frac";break;case"\\choose":b="\\binom";break;case"\\atop":b="\\\\atopfrac";break;case"\\brace":b="\\\\bracefrac";break;case"\\brack":b="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:i.mode,replaceWith:b,token:h}}});const vc=["display","text","script","scriptscript"],bc=function(s){let i=null;return s.length>0&&(i=s,i=i==="."?null:i),i};Qe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(s,i){let{parser:l}=s;const h=i[4],b=i[5],k=Bn(i[0]),F=k.type==="atom"&&k.family==="open"?bc(k.text):null,z=Bn(i[1]),W=z.type==="atom"&&z.family==="close"?bc(z.text):null,te=zt(i[2],"size");let fe,pe=null;te.isBlank?fe=!0:(pe=te.value,fe=pe.number>0);let ke="auto",Ge=i[3];if(Ge.type==="ordgroup"){if(Ge.body.length>0){const nt=zt(Ge.body[0],"textord");ke=vc[Number(nt.text)]}}else Ge=zt(Ge,"textord"),ke=vc[Number(Ge.text)];return{type:"genfrac",mode:l.mode,numer:h,denom:b,continued:!1,hasBarLine:fe,barSize:pe,leftDelim:F,rightDelim:W,size:ke}},htmlBuilder:Gs,mathmlBuilder:Zs}),Qe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(s,i){let{parser:l,funcName:h,token:b}=s;return{type:"infix",mode:l.mode,replaceWith:"\\\\abovefrac",size:zt(i[0],"size").value,token:b}}}),Qe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,i)=>{let{parser:l,funcName:h}=s;const b=i[0],k=w(zt(i[1],"infix").size),F=i[2],z=k.number>0;return{type:"genfrac",mode:l.mode,numer:b,denom:F,continued:!1,hasBarLine:z,barSize:k,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Gs,mathmlBuilder:Zs});const yc=(s,i)=>{const l=i.style;let h,b;s.type==="supsub"?(h=s.sup?Qt(s.sup,i.havingStyle(l.sup()),i):Qt(s.sub,i.havingStyle(l.sub()),i),b=zt(s.base,"horizBrace")):b=zt(s,"horizBrace");const k=Qt(b.base,i.havingBaseStyle(R.DISPLAY)),F=_n.svgSpan(b,i);let z;if(b.isOver?(z=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:k},{type:"kern",size:.1},{type:"elem",elem:F}]},i),z.children[0].children[0].children[1].classes.push("svg-align")):(z=ge.makeVList({positionType:"bottom",positionData:k.depth+.1+F.height,children:[{type:"elem",elem:F},{type:"kern",size:.1},{type:"elem",elem:k}]},i),z.children[0].children[0].children[0].classes.push("svg-align")),h){const W=ge.makeSpan(["mord",b.isOver?"mover":"munder"],[z],i);b.isOver?z=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:W},{type:"kern",size:.2},{type:"elem",elem:h}]},i):z=ge.makeVList({positionType:"bottom",positionData:W.depth+.2+h.height+h.depth,children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:W}]},i)}return ge.makeSpan(["mord",b.isOver?"mover":"munder"],[z],i)};Qe({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(s,i){let{parser:l,funcName:h}=s;return{type:"horizBrace",mode:l.mode,label:h,isOver:/^\\over/.test(h),base:i[0]}},htmlBuilder:yc,mathmlBuilder:(s,i)=>{const l=_n.mathMLnode(s.label);return new Xe.MathNode(s.isOver?"mover":"munder",[fr(s.base,i),l])}}),Qe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(s,i)=>{let{parser:l}=s;const h=i[1],b=zt(i[0],"url").url;return l.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:l.mode,href:b,body:vr(h)}:l.formatUnsupportedCmd("\\href")},htmlBuilder:(s,i)=>{const l=Pr(s.body,i,!1);return ge.makeAnchor(s.href,[],l,i)},mathmlBuilder:(s,i)=>{let l=Gn(s.body,i);return l instanceof un||(l=new un("mrow",[l])),l.setAttribute("href",s.href),l}}),Qe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(s,i)=>{let{parser:l}=s;const h=zt(i[0],"url").url;if(!l.settings.isTrusted({command:"\\url",url:h}))return l.formatUnsupportedCmd("\\url");const b=[];for(let F=0;F<h.length;F++){let z=h[F];z==="~"&&(z="\\textasciitilde"),b.push({type:"textord",mode:"text",text:z})}const k={type:"text",mode:l.mode,font:"\\texttt",body:b};return{type:"href",mode:l.mode,href:h,body:vr(k)}}}),Qe({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(s,i){let{parser:l}=s;return{type:"hbox",mode:l.mode,body:vr(i[0])}},htmlBuilder(s,i){const l=Pr(s.body,i,!1);return ge.makeFragment(l)},mathmlBuilder(s,i){return new Xe.MathNode("mrow",nn(s.body,i))}}),Qe({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(s,i)=>{let{parser:l,funcName:h,token:b}=s;const k=zt(i[0],"raw").string,F=i[1];l.settings.strict&&l.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let z;const W={};switch(h){case"\\htmlClass":W.class=k,z={command:"\\htmlClass",class:k};break;case"\\htmlId":W.id=k,z={command:"\\htmlId",id:k};break;case"\\htmlStyle":W.style=k,z={command:"\\htmlStyle",style:k};break;case"\\htmlData":{const te=k.split(",");for(let fe=0;fe<te.length;fe++){const pe=te[fe].split("=");if(pe.length!==2)throw new a("Error parsing key-value for \\htmlData");W["data-"+pe[0].trim()]=pe[1].trim()}z={command:"\\htmlData",attributes:W};break}default:throw new Error("Unrecognized html command")}return l.settings.isTrusted(z)?{type:"html",mode:l.mode,attributes:W,body:vr(F)}:l.formatUnsupportedCmd(h)},htmlBuilder:(s,i)=>{const l=Pr(s.body,i,!1),h=["enclosing"];s.attributes.class&&h.push(...s.attributes.class.trim().split(/\s+/));const b=ge.makeSpan(h,l,i);for(const k in s.attributes)k!=="class"&&s.attributes.hasOwnProperty(k)&&b.setAttribute(k,s.attributes[k]);return b},mathmlBuilder:(s,i)=>Gn(s.body,i)}),Qe({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(s,i)=>{let{parser:l}=s;return{type:"htmlmathml",mode:l.mode,html:vr(i[0]),mathml:vr(i[1])}},htmlBuilder:(s,i)=>{const l=Pr(s.html,i,!1);return ge.makeFragment(l)},mathmlBuilder:(s,i)=>Gn(s.mathml,i)});const Js=function(s){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(s))return{number:+s,unit:"bp"};{const i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(s);if(!i)throw new a("Invalid size: '"+s+"' in \\includegraphics");const l={number:+(i[1]+i[2]),unit:i[3]};if(!pt(l))throw new a("Invalid unit: '"+l.unit+"' in \\includegraphics.");return l}};Qe({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(s,i,l)=>{let{parser:h}=s,b={number:0,unit:"em"},k={number:.9,unit:"em"},F={number:0,unit:"em"},z="";if(l[0]){const te=zt(l[0],"raw").string.split(",");for(let fe=0;fe<te.length;fe++){const pe=te[fe].split("=");if(pe.length===2){const ke=pe[1].trim();switch(pe[0].trim()){case"alt":z=ke;break;case"width":b=Js(ke);break;case"height":k=Js(ke);break;case"totalheight":F=Js(ke);break;default:throw new a("Invalid key: '"+pe[0]+"' in \\includegraphics.")}}}}const W=zt(i[0],"url").url;return z===""&&(z=W,z=z.replace(/^.*[\\/]/,""),z=z.substring(0,z.lastIndexOf("."))),h.settings.isTrusted({command:"\\includegraphics",url:W})?{type:"includegraphics",mode:h.mode,alt:z,width:b,height:k,totalheight:F,src:W}:h.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(s,i)=>{const l=ze(s.height,i);let h=0;s.totalheight.number>0&&(h=ze(s.totalheight,i)-l);let b=0;s.width.number>0&&(b=ze(s.width,i));const k={height:ce(l+h)};b>0&&(k.width=ce(b)),h>0&&(k.verticalAlign=ce(-h));const F=new nr(s.src,s.alt,k);return F.height=l,F.depth=h,F},mathmlBuilder:(s,i)=>{const l=new Xe.MathNode("mglyph",[]);l.setAttribute("alt",s.alt);const h=ze(s.height,i);let b=0;if(s.totalheight.number>0&&(b=ze(s.totalheight,i)-h,l.setAttribute("valign",ce(-b))),l.setAttribute("height",ce(h+b)),s.width.number>0){const k=ze(s.width,i);l.setAttribute("width",ce(k))}return l.setAttribute("src",s.src),l}}),Qe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(s,i){let{parser:l,funcName:h}=s;const b=zt(i[0],"size");if(l.settings.strict){const k=h[1]==="m",F=b.value.unit==="mu";k?(F||l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" supports only mu units, "+("not "+b.value.unit+" units")),l.mode!=="math"&&l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" works only in math mode")):F&&l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" doesn't support mu units")}return{type:"kern",mode:l.mode,dimension:b.value}},htmlBuilder(s,i){return ge.makeGlue(s.dimension,i)},mathmlBuilder(s,i){const l=ze(s.dimension,i);return new Xe.SpaceNode(l)}}),Qe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:l,funcName:h}=s;const b=i[0];return{type:"lap",mode:l.mode,alignment:h.slice(5),body:b}},htmlBuilder:(s,i)=>{let l;s.alignment==="clap"?(l=ge.makeSpan([],[Qt(s.body,i)]),l=ge.makeSpan(["inner"],[l],i)):l=ge.makeSpan(["inner"],[Qt(s.body,i)]);const h=ge.makeSpan(["fix"],[]);let b=ge.makeSpan([s.alignment],[l,h],i);const k=ge.makeSpan(["strut"]);return k.style.height=ce(b.height+b.depth),b.depth&&(k.style.verticalAlign=ce(-b.depth)),b.children.unshift(k),b=ge.makeSpan(["thinbox"],[b],i),ge.makeSpan(["mord","vbox"],[b],i)},mathmlBuilder:(s,i)=>{const l=new Xe.MathNode("mpadded",[fr(s.body,i)]);if(s.alignment!=="rlap"){const h=s.alignment==="llap"?"-1":"-0.5";l.setAttribute("lspace",h+"width")}return l.setAttribute("width","0px"),l}}),Qe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){let{funcName:l,parser:h}=s;const b=h.mode;h.switchMode("math");const k=l==="\\("?"\\)":"$",F=h.parseExpression(!1,k);return h.expect(k),h.switchMode(b),{type:"styling",mode:h.mode,style:"text",body:F}}}),Qe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,i){throw new a("Mismatched "+s.funcName)}});const xc=(s,i)=>{switch(i.style.size){case R.DISPLAY.size:return s.display;case R.TEXT.size:return s.text;case R.SCRIPT.size:return s.script;case R.SCRIPTSCRIPT.size:return s.scriptscript;default:return s.text}};Qe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(s,i)=>{let{parser:l}=s;return{type:"mathchoice",mode:l.mode,display:vr(i[0]),text:vr(i[1]),script:vr(i[2]),scriptscript:vr(i[3])}},htmlBuilder:(s,i)=>{const l=xc(s,i),h=Pr(l,i,!1);return ge.makeFragment(h)},mathmlBuilder:(s,i)=>{const l=xc(s,i);return Gn(l,i)}});const wc=(s,i,l,h,b,k,F)=>{s=ge.makeSpan([],[s]);const z=l&&C.isCharacterBox(l);let W,te;if(i){const ke=Qt(i,h.havingStyle(b.sup()),h);te={elem:ke,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-ke.depth)}}if(l){const ke=Qt(l,h.havingStyle(b.sub()),h);W={elem:ke,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-ke.height)}}let fe;if(te&&W){const ke=h.fontMetrics().bigOpSpacing5+W.elem.height+W.elem.depth+W.kern+s.depth+F;fe=ge.makeVList({positionType:"bottom",positionData:ke,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:W.elem,marginLeft:ce(-k)},{type:"kern",size:W.kern},{type:"elem",elem:s},{type:"kern",size:te.kern},{type:"elem",elem:te.elem,marginLeft:ce(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(W){const ke=s.height-F;fe=ge.makeVList({positionType:"top",positionData:ke,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:W.elem,marginLeft:ce(-k)},{type:"kern",size:W.kern},{type:"elem",elem:s}]},h)}else if(te){const ke=s.depth+F;fe=ge.makeVList({positionType:"bottom",positionData:ke,children:[{type:"elem",elem:s},{type:"kern",size:te.kern},{type:"elem",elem:te.elem,marginLeft:ce(k)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const pe=[fe];if(W&&k!==0&&!z){const ke=ge.makeSpan(["mspace"],[],h);ke.style.marginRight=ce(k),pe.unshift(ke)}return ge.makeSpan(["mop","op-limits"],pe,h)},Cc=["\\smallint"],$o=(s,i)=>{let l,h,b=!1,k;s.type==="supsub"?(l=s.sup,h=s.sub,k=zt(s.base,"op"),b=!0):k=zt(s,"op");const F=i.style;let z=!1;F.size===R.DISPLAY.size&&k.symbol&&!Cc.includes(k.name)&&(z=!0);let W;if(k.symbol){const pe=z?"Size2-Regular":"Size1-Regular";let ke="";if((k.name==="\\oiint"||k.name==="\\oiiint")&&(ke=k.name.slice(1),k.name=ke==="oiint"?"\\iint":"\\iiint"),W=ge.makeSymbol(k.name,pe,"math",i,["mop","op-symbol",z?"large-op":"small-op"]),ke.length>0){const Ge=W.italic,nt=ge.staticSvg(ke+"Size"+(z?"2":"1"),i);W=ge.makeVList({positionType:"individualShift",children:[{type:"elem",elem:W,shift:0},{type:"elem",elem:nt,shift:z?.08:0}]},i),k.name="\\"+ke,W.classes.unshift("mop"),W.italic=Ge}}else if(k.body){const pe=Pr(k.body,i,!0);pe.length===1&&pe[0]instanceof Dt?(W=pe[0],W.classes[0]="mop"):W=ge.makeSpan(["mop"],pe,i)}else{const pe=[];for(let ke=1;ke<k.name.length;ke++)pe.push(ge.mathsym(k.name[ke],k.mode,i));W=ge.makeSpan(["mop"],pe,i)}let te=0,fe=0;return(W instanceof Dt||k.name==="\\oiint"||k.name==="\\oiiint")&&!k.suppressBaseShift&&(te=(W.height-W.depth)/2-i.fontMetrics().axisHeight,fe=W.italic),b?wc(W,l,h,i,F,fe,te):(te&&(W.style.position="relative",W.style.top=ce(te)),W)},ba=(s,i)=>{let l;if(s.symbol)l=new un("mo",[pn(s.name,s.mode)]),Cc.includes(s.name)&&l.setAttribute("largeop","false");else if(s.body)l=new un("mo",nn(s.body,i));else{l=new un("mi",[new Fn(s.name.slice(1))]);const h=new un("mo",[pn("\u2061","text")]);s.parentIsSupSub?l=new un("mrow",[l,h]):l=ju([l,h])}return l},eg={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Qe({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:(s,i)=>{let{parser:l,funcName:h}=s,b=h;return b.length===1&&(b=eg[b]),{type:"op",mode:l.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},htmlBuilder:$o,mathmlBuilder:ba}),Qe({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(s,i)=>{let{parser:l}=s;const h=i[0];return{type:"op",mode:l.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:vr(h)}},htmlBuilder:$o,mathmlBuilder:ba});const tg={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Qe({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(s){let{parser:i,funcName:l}=s;return{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:$o,mathmlBuilder:ba}),Qe({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(s){let{parser:i,funcName:l}=s;return{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:$o,mathmlBuilder:ba}),Qe({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(s){let{parser:i,funcName:l}=s,h=l;return h.length===1&&(h=tg[h]),{type:"op",mode:i.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:$o,mathmlBuilder:ba});const Dc=(s,i)=>{let l,h,b=!1,k;s.type==="supsub"?(l=s.sup,h=s.sub,k=zt(s.base,"operatorname"),b=!0):k=zt(s,"operatorname");let F;if(k.body.length>0){const z=k.body.map(te=>{const fe=te.text;return typeof fe=="string"?{type:"textord",mode:te.mode,text:fe}:te}),W=Pr(z,i.withFont("mathrm"),!0);for(let te=0;te<W.length;te++){const fe=W[te];fe instanceof Dt&&(fe.text=fe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}F=ge.makeSpan(["mop"],W,i)}else F=ge.makeSpan(["mop"],[],i);return b?wc(F,l,h,i,i.style,0,0):F};Qe({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(s,i)=>{let{parser:l,funcName:h}=s;const b=i[0];return{type:"operatorname",mode:l.mode,body:vr(b),alwaysHandleSupSub:h==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Dc,mathmlBuilder:(s,i)=>{let l=nn(s.body,i.withFont("mathrm")),h=!0;for(let F=0;F<l.length;F++){const z=l[F];if(!(z instanceof Xe.SpaceNode))if(z instanceof Xe.MathNode)switch(z.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const W=z.children[0];z.children.length===1&&W instanceof Xe.TextNode?W.text=W.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const F=l.map(z=>z.toText()).join("");l=[new Xe.TextNode(F)]}const b=new Xe.MathNode("mi",l);b.setAttribute("mathvariant","normal");const k=new Xe.MathNode("mo",[pn("\u2061","text")]);return s.parentIsSupSub?new Xe.MathNode("mrow",[b,k]):Xe.newDocumentFragment([b,k])}}),I("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Yr({type:"ordgroup",htmlBuilder(s,i){return s.semisimple?ge.makeFragment(Pr(s.body,i,!1)):ge.makeSpan(["mord"],Pr(s.body,i,!0),i)},mathmlBuilder(s,i){return Gn(s.body,i,!0)}}),Qe({type:"overline",names:["\\overline"],props:{numArgs:1},handler(s,i){let{parser:l}=s;const h=i[0];return{type:"overline",mode:l.mode,body:h}},htmlBuilder(s,i){const l=Qt(s.body,i.havingCrampedStyle()),h=ge.makeLineSpan("overline-line",i),b=i.fontMetrics().defaultRuleThickness,k=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:3*b},{type:"elem",elem:h},{type:"kern",size:b}]},i);return ge.makeSpan(["mord","overline"],[k],i)},mathmlBuilder(s,i){const l=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Xe.MathNode("mover",[fr(s.body,i),l]);return h.setAttribute("accent","true"),h}}),Qe({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:l}=s;const h=i[0];return{type:"phantom",mode:l.mode,body:vr(h)}},htmlBuilder:(s,i)=>{const l=Pr(s.body,i.withPhantom(),!1);return ge.makeFragment(l)},mathmlBuilder:(s,i)=>{const l=nn(s.body,i);return new Xe.MathNode("mphantom",l)}}),Qe({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:l}=s;const h=i[0];return{type:"hphantom",mode:l.mode,body:h}},htmlBuilder:(s,i)=>{let l=ge.makeSpan([],[Qt(s.body,i.withPhantom())]);if(l.height=0,l.depth=0,l.children)for(let h=0;h<l.children.length;h++)l.children[h].height=0,l.children[h].depth=0;return l=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},i),ge.makeSpan(["mord"],[l],i)},mathmlBuilder:(s,i)=>{const l=nn(vr(s.body),i),h=new Xe.MathNode("mphantom",l),b=new Xe.MathNode("mpadded",[h]);return b.setAttribute("height","0px"),b.setAttribute("depth","0px"),b}}),Qe({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,i)=>{let{parser:l}=s;const h=i[0];return{type:"vphantom",mode:l.mode,body:h}},htmlBuilder:(s,i)=>{const l=ge.makeSpan(["inner"],[Qt(s.body,i.withPhantom())]),h=ge.makeSpan(["fix"],[]);return ge.makeSpan(["mord","rlap"],[l,h],i)},mathmlBuilder:(s,i)=>{const l=nn(vr(s.body),i),h=new Xe.MathNode("mphantom",l),b=new Xe.MathNode("mpadded",[h]);return b.setAttribute("width","0px"),b}}),Qe({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(s,i){let{parser:l}=s;const h=zt(i[0],"size").value,b=i[1];return{type:"raisebox",mode:l.mode,dy:h,body:b}},htmlBuilder(s,i){const l=Qt(s.body,i),h=ze(s.dy,i);return ge.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:l}]},i)},mathmlBuilder(s,i){const l=new Xe.MathNode("mpadded",[fr(s.body,i)]),h=s.dy.number+s.dy.unit;return l.setAttribute("voffset",h),l}}),Qe({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:i}=s;return{type:"internal",mode:i.mode}}}),Qe({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(s,i,l){let{parser:h}=s;const b=l[0],k=zt(i[0],"size"),F=zt(i[1],"size");return{type:"rule",mode:h.mode,shift:b&&zt(b,"size").value,width:k.value,height:F.value}},htmlBuilder(s,i){const l=ge.makeSpan(["mord","rule"],[],i),h=ze(s.width,i),b=ze(s.height,i),k=s.shift?ze(s.shift,i):0;return l.style.borderRightWidth=ce(h),l.style.borderTopWidth=ce(b),l.style.bottom=ce(k),l.width=h,l.height=b+k,l.depth=-k,l.maxFontSize=b*1.125*i.sizeMultiplier,l},mathmlBuilder(s,i){const l=ze(s.width,i),h=ze(s.height,i),b=s.shift?ze(s.shift,i):0,k=i.color&&i.getColor()||"black",F=new Xe.MathNode("mspace");F.setAttribute("mathbackground",k),F.setAttribute("width",ce(l)),F.setAttribute("height",ce(h));const z=new Xe.MathNode("mpadded",[F]);return b>=0?z.setAttribute("height",ce(b)):(z.setAttribute("height",ce(b)),z.setAttribute("depth",ce(-b))),z.setAttribute("voffset",ce(b)),z}});function kc(s,i,l){const h=Pr(s,i,!1),b=i.sizeMultiplier/l.sizeMultiplier;for(let k=0;k<h.length;k++){const F=h[k].classes.indexOf("sizing");F<0?Array.prototype.push.apply(h[k].classes,i.sizingClasses(l)):h[k].classes[F+1]==="reset-size"+i.size&&(h[k].classes[F+1]="reset-size"+l.size),h[k].height*=b,h[k].depth*=b}return ge.makeFragment(h)}const Ec=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Qe({type:"sizing",names:Ec,props:{numArgs:0,allowedInText:!0},handler:(s,i)=>{let{breakOnTokenText:l,funcName:h,parser:b}=s;const k=b.parseExpression(!1,l);return{type:"sizing",mode:b.mode,size:Ec.indexOf(h)+1,body:k}},htmlBuilder:(s,i)=>{const l=i.havingSize(s.size);return kc(s.body,l,i)},mathmlBuilder:(s,i)=>{const l=i.havingSize(s.size),h=nn(s.body,l),b=new Xe.MathNode("mstyle",h);return b.setAttribute("mathsize",ce(l.sizeMultiplier)),b}}),Qe({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,i,l)=>{let{parser:h}=s,b=!1,k=!1;const F=l[0]&&zt(l[0],"ordgroup");if(F){let W="";for(let te=0;te<F.body.length;++te)if(W=F.body[te].text,W==="t")b=!0;else if(W==="b")k=!0;else{b=!1,k=!1;break}}else b=!0,k=!0;const z=i[0];return{type:"smash",mode:h.mode,body:z,smashHeight:b,smashDepth:k}},htmlBuilder:(s,i)=>{const l=ge.makeSpan([],[Qt(s.body,i)]);if(!s.smashHeight&&!s.smashDepth)return l;if(s.smashHeight&&(l.height=0,l.children))for(let b=0;b<l.children.length;b++)l.children[b].height=0;if(s.smashDepth&&(l.depth=0,l.children))for(let b=0;b<l.children.length;b++)l.children[b].depth=0;const h=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},i);return ge.makeSpan(["mord"],[h],i)},mathmlBuilder:(s,i)=>{const l=new Xe.MathNode("mpadded",[fr(s.body,i)]);return s.smashHeight&&l.setAttribute("height","0px"),s.smashDepth&&l.setAttribute("depth","0px"),l}}),Qe({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,i,l){let{parser:h}=s;const b=l[0],k=i[0];return{type:"sqrt",mode:h.mode,body:k,index:b}},htmlBuilder(s,i){let l=Qt(s.body,i.havingCrampedStyle());l.height===0&&(l.height=i.fontMetrics().xHeight),l=ge.wrapFragment(l,i);const h=i.fontMetrics().defaultRuleThickness;let b=h;i.style.id<R.TEXT.id&&(b=i.fontMetrics().xHeight);let k=h+b/4;const F=l.height+l.depth+k+h,{span:z,ruleWidth:W,advanceWidth:te}=Ln.sqrtImage(F,i),fe=z.height-W;fe>l.height+l.depth+k&&(k=(k+fe-l.height-l.depth)/2);const pe=z.height-l.height-k-W;l.style.paddingLeft=ce(te);const ke=ge.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l,wrapperClasses:["svg-align"]},{type:"kern",size:-(l.height+pe)},{type:"elem",elem:z},{type:"kern",size:W}]},i);if(s.index){const Ge=i.havingStyle(R.SCRIPTSCRIPT),nt=Qt(s.index,Ge,i),Rt=.6*(ke.height-ke.depth),Zt=ge.makeVList({positionType:"shift",positionData:-Rt,children:[{type:"elem",elem:nt}]},i),qt=ge.makeSpan(["root"],[Zt]);return ge.makeSpan(["mord","sqrt"],[qt,ke],i)}else return ge.makeSpan(["mord","sqrt"],[ke],i)},mathmlBuilder(s,i){const{body:l,index:h}=s;return h?new Xe.MathNode("mroot",[fr(l,i),fr(h,i)]):new Xe.MathNode("msqrt",[fr(l,i)])}});const Sc={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT};Qe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s,i){let{breakOnTokenText:l,funcName:h,parser:b}=s;const k=b.parseExpression(!0,l),F=h.slice(1,h.length-5);return{type:"styling",mode:b.mode,style:F,body:k}},htmlBuilder(s,i){const l=Sc[s.style],h=i.havingStyle(l).withFont("");return kc(s.body,h,i)},mathmlBuilder(s,i){const l=Sc[s.style],h=i.havingStyle(l),b=nn(s.body,h),k=new Xe.MathNode("mstyle",b),F={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[s.style];return k.setAttribute("scriptlevel",F[0]),k.setAttribute("displaystyle",F[1]),k}});const rg=function(s,i){const l=s.base;return l?l.type==="op"?l.limits&&(i.style.size===R.DISPLAY.size||l.alwaysHandleSupSub)?$o:null:l.type==="operatorname"?l.alwaysHandleSupSub&&(i.style.size===R.DISPLAY.size||l.limits)?Dc:null:l.type==="accent"?C.isCharacterBox(l.base)?zs:null:l.type==="horizBrace"&&!s.sub===l.isOver?yc:null:null};Yr({type:"supsub",htmlBuilder(s,i){const l=rg(s,i);if(l)return l(s,i);const{base:h,sup:b,sub:k}=s,F=Qt(h,i);let z,W;const te=i.fontMetrics();let fe=0,pe=0;const ke=h&&C.isCharacterBox(h);if(b){const er=i.havingStyle(i.style.sup());z=Qt(b,er,i),ke||(fe=F.height-er.fontMetrics().supDrop*er.sizeMultiplier/i.sizeMultiplier)}if(k){const er=i.havingStyle(i.style.sub());W=Qt(k,er,i),ke||(pe=F.depth+er.fontMetrics().subDrop*er.sizeMultiplier/i.sizeMultiplier)}let Ge;i.style===R.DISPLAY?Ge=te.sup1:i.style.cramped?Ge=te.sup3:Ge=te.sup2;const nt=i.sizeMultiplier,Rt=ce(.5/te.ptPerEm/nt);let Zt=null;if(W){const er=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");(F instanceof Dt||er)&&(Zt=ce(-F.italic))}let qt;if(z&&W){fe=Math.max(fe,Ge,z.depth+.25*te.xHeight),pe=Math.max(pe,te.sub2);const er=4*te.defaultRuleThickness;if(fe-z.depth-(W.height-pe)<er){pe=er-(fe-z.depth)+W.height;const qr=.8*te.xHeight-(fe-z.depth);qr>0&&(fe+=qr,pe-=qr)}const br=[{type:"elem",elem:W,shift:pe,marginRight:Rt,marginLeft:Zt},{type:"elem",elem:z,shift:-fe,marginRight:Rt}];qt=ge.makeVList({positionType:"individualShift",children:br},i)}else if(W){pe=Math.max(pe,te.sub1,W.height-.8*te.xHeight);const er=[{type:"elem",elem:W,marginLeft:Zt,marginRight:Rt}];qt=ge.makeVList({positionType:"shift",positionData:pe,children:er},i)}else if(z)fe=Math.max(fe,Ge,z.depth+.25*te.xHeight),qt=ge.makeVList({positionType:"shift",positionData:-fe,children:[{type:"elem",elem:z,marginRight:Rt}]},i);else throw new Error("supsub must have either sup or sub.");const tr=Ts(F,"right")||"mord";return ge.makeSpan([tr],[F,ge.makeSpan(["msupsub"],[qt])],i)},mathmlBuilder(s,i){let l=!1,h,b;s.base&&s.base.type==="horizBrace"&&(b=!!s.sup,b===s.base.isOver&&(l=!0,h=s.base.isOver)),s.base&&(s.base.type==="op"||s.base.type==="operatorname")&&(s.base.parentIsSupSub=!0);const k=[fr(s.base,i)];s.sub&&k.push(fr(s.sub,i)),s.sup&&k.push(fr(s.sup,i));let F;if(l)F=h?"mover":"munder";else if(s.sub)if(s.sup){const z=s.base;z&&z.type==="op"&&z.limits&&i.style===R.DISPLAY||z&&z.type==="operatorname"&&z.alwaysHandleSupSub&&(i.style===R.DISPLAY||z.limits)?F="munderover":F="msubsup"}else{const z=s.base;z&&z.type==="op"&&z.limits&&(i.style===R.DISPLAY||z.alwaysHandleSupSub)||z&&z.type==="operatorname"&&z.alwaysHandleSupSub&&(z.limits||i.style===R.DISPLAY)?F="munder":F="msub"}else{const z=s.base;z&&z.type==="op"&&z.limits&&(i.style===R.DISPLAY||z.alwaysHandleSupSub)||z&&z.type==="operatorname"&&z.alwaysHandleSupSub&&(z.limits||i.style===R.DISPLAY)?F="mover":F="msup"}return new Xe.MathNode(F,k)}}),Yr({type:"atom",htmlBuilder(s,i){return ge.mathsym(s.text,s.mode,i,["m"+s.family])},mathmlBuilder(s,i){const l=new Xe.MathNode("mo",[pn(s.text,s.mode)]);if(s.family==="bin"){const h=Rs(s,i);h==="bold-italic"&&l.setAttribute("mathvariant",h)}else s.family==="punct"?l.setAttribute("separator","true"):(s.family==="open"||s.family==="close")&&l.setAttribute("stretchy","false");return l}});const Ac={mi:"italic",mn:"normal",mtext:"normal"};Yr({type:"mathord",htmlBuilder(s,i){return ge.makeOrd(s,i,"mathord")},mathmlBuilder(s,i){const l=new Xe.MathNode("mi",[pn(s.text,s.mode,i)]),h=Rs(s,i)||"italic";return h!==Ac[l.type]&&l.setAttribute("mathvariant",h),l}}),Yr({type:"textord",htmlBuilder(s,i){return ge.makeOrd(s,i,"textord")},mathmlBuilder(s,i){const l=pn(s.text,s.mode,i),h=Rs(s,i)||"normal";let b;return s.mode==="text"?b=new Xe.MathNode("mtext",[l]):/[0-9]/.test(s.text)?b=new Xe.MathNode("mn",[l]):s.text==="\\prime"?b=new Xe.MathNode("mo",[l]):b=new Xe.MathNode("mi",[l]),h!==Ac[b.type]&&b.setAttribute("mathvariant",h),b}});const Qs={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},el={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Yr({type:"spacing",htmlBuilder(s,i){if(el.hasOwnProperty(s.text)){const l=el[s.text].className||"";if(s.mode==="text"){const h=ge.makeOrd(s,i,"textord");return h.classes.push(l),h}else return ge.makeSpan(["mspace",l],[ge.mathsym(s.text,s.mode,i)],i)}else{if(Qs.hasOwnProperty(s.text))return ge.makeSpan(["mspace",Qs[s.text]],[],i);throw new a('Unknown type of space "'+s.text+'"')}},mathmlBuilder(s,i){let l;if(el.hasOwnProperty(s.text))l=new Xe.MathNode("mtext",[new Xe.TextNode("\xA0")]);else{if(Qs.hasOwnProperty(s.text))return new Xe.MathNode("mspace");throw new a('Unknown type of space "'+s.text+'"')}return l}});const Bc=()=>{const s=new Xe.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};Yr({type:"tag",mathmlBuilder(s,i){const l=new Xe.MathNode("mtable",[new Xe.MathNode("mtr",[Bc(),new Xe.MathNode("mtd",[Gn(s.body,i)]),Bc(),new Xe.MathNode("mtd",[Gn(s.tag,i)])])]);return l.setAttribute("width","100%"),l}});const Fc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Nc={"\\textbf":"textbf","\\textmd":"textmd"},ng={"\\textit":"textit","\\textup":"textup"},Tc=(s,i)=>{const l=s.font;if(l){if(Fc[l])return i.withTextFontFamily(Fc[l]);if(Nc[l])return i.withTextFontWeight(Nc[l]);if(l==="\\emph")return i.fontShape==="textit"?i.withTextFontShape("textup"):i.withTextFontShape("textit")}else return i;return i.withTextFontShape(ng[l])};Qe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(s,i){let{parser:l,funcName:h}=s;const b=i[0];return{type:"text",mode:l.mode,body:vr(b),font:h}},htmlBuilder(s,i){const l=Tc(s,i),h=Pr(s.body,l,!0);return ge.makeSpan(["mord","text"],h,l)},mathmlBuilder(s,i){const l=Tc(s,i);return Gn(s.body,l)}}),Qe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(s,i){let{parser:l}=s;return{type:"underline",mode:l.mode,body:i[0]}},htmlBuilder(s,i){const l=Qt(s.body,i),h=ge.makeLineSpan("underline-line",i),b=i.fontMetrics().defaultRuleThickness,k=ge.makeVList({positionType:"top",positionData:l.height,children:[{type:"kern",size:b},{type:"elem",elem:h},{type:"kern",size:3*b},{type:"elem",elem:l}]},i);return ge.makeSpan(["mord","underline"],[k],i)},mathmlBuilder(s,i){const l=new Xe.MathNode("mo",[new Xe.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Xe.MathNode("munder",[fr(s.body,i),l]);return h.setAttribute("accentunder","true"),h}}),Qe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(s,i){let{parser:l}=s;return{type:"vcenter",mode:l.mode,body:i[0]}},htmlBuilder(s,i){const l=Qt(s.body,i),h=i.fontMetrics().axisHeight,b=.5*(l.height-h-(l.depth+h));return ge.makeVList({positionType:"shift",positionData:b,children:[{type:"elem",elem:l}]},i)},mathmlBuilder(s,i){return new Xe.MathNode("mpadded",[fr(s.body,i)],["vcenter"])}}),Qe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(s,i,l){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(s,i){const l=Mc(s),h=[],b=i.havingStyle(i.style.text());for(let k=0;k<l.length;k++){let F=l[k];F==="~"&&(F="\\textasciitilde"),h.push(ge.makeSymbol(F,"Typewriter-Regular",s.mode,b,["mord","texttt"]))}return ge.makeSpan(["mord","text"].concat(b.sizingClasses(i)),ge.tryCombineChars(h),b)},mathmlBuilder(s,i){const l=new Xe.TextNode(Mc(s)),h=new Xe.MathNode("mtext",[l]);return h.setAttribute("mathvariant","monospace"),h}});const Mc=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var Jn=Xr;const Oc=`[ \r
462
+ ]`,og="\\\\[a-zA-Z@]+",ag="\\\\[^\uD800-\uDFFF]",ig="("+og+")"+Oc+"*",sg=`\\\\(
463
+ |[ \r ]+
464
+ ?)[ \r ]*`,tl="[\u0300-\u036F]",lg=new RegExp(tl+"+$"),ug="("+Oc+"+)|"+(sg+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(tl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(tl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+ig)+("|"+ag+")");class Rc{constructor(i,l){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=i,this.settings=l,this.tokenRegex=new RegExp(ug,"g"),this.catcodes={"%":14,"~":13}}setCatcode(i,l){this.catcodes[i]=l}lex(){const i=this.input,l=this.tokenRegex.lastIndex;if(l===i.length)return new cn("EOF",new on(this,l,l));const h=this.tokenRegex.exec(i);if(h===null||h.index!==l)throw new a("Unexpected character: '"+i[l]+"'",new cn(i[l],new on(this,l,l+1)));const b=h[6]||h[3]||(h[2]?"\\ ":" ");if(this.catcodes[b]===14){const k=i.indexOf(`
465
+ `,this.tokenRegex.lastIndex);return k===-1?(this.tokenRegex.lastIndex=i.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=k+1,this.lex()}return new cn(b,new on(this,l,this.tokenRegex.lastIndex))}}class cg{constructor(i,l){i===void 0&&(i={}),l===void 0&&(l={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=l,this.builtins=i,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const i=this.undefStack.pop();for(const l in i)i.hasOwnProperty(l)&&(i[l]==null?delete this.current[l]:this.current[l]=i[l])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(i){return this.current.hasOwnProperty(i)||this.builtins.hasOwnProperty(i)}get(i){return this.current.hasOwnProperty(i)?this.current[i]:this.builtins[i]}set(i,l,h){if(h===void 0&&(h=!1),h){for(let b=0;b<this.undefStack.length;b++)delete this.undefStack[b][i];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][i]=l)}else{const b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(i)&&(b[i]=this.current[i])}l==null?delete this.current[i]:this.current[i]=l}}var dg=uc;I("\\noexpand",function(s){const i=s.popToken();return s.isExpandable(i.text)&&(i.noexpand=!0,i.treatAsRelax=!0),{tokens:[i],numArgs:0}}),I("\\expandafter",function(s){const i=s.popToken();return s.expandOnce(!0),{tokens:[i],numArgs:0}}),I("\\@firstoftwo",function(s){return{tokens:s.consumeArgs(2)[0],numArgs:0}}),I("\\@secondoftwo",function(s){return{tokens:s.consumeArgs(2)[1],numArgs:0}}),I("\\@ifnextchar",function(s){const i=s.consumeArgs(3);s.consumeSpaces();const l=s.future();return i[0].length===1&&i[0][0].text===l.text?{tokens:i[1],numArgs:0}:{tokens:i[2],numArgs:0}}),I("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),I("\\TextOrMath",function(s){const i=s.consumeArgs(2);return s.mode==="text"?{tokens:i[0],numArgs:0}:{tokens:i[1],numArgs:0}});const $c={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};I("\\char",function(s){let i=s.popToken(),l,h="";if(i.text==="'")l=8,i=s.popToken();else if(i.text==='"')l=16,i=s.popToken();else if(i.text==="`")if(i=s.popToken(),i.text[0]==="\\")h=i.text.charCodeAt(1);else{if(i.text==="EOF")throw new a("\\char` missing argument");h=i.text.charCodeAt(0)}else l=10;if(l){if(h=$c[i.text],h==null||h>=l)throw new a("Invalid base-"+l+" digit "+i.text);let b;for(;(b=$c[s.future().text])!=null&&b<l;)h*=l,h+=b,s.popToken()}return"\\@char{"+h+"}"});const rl=(s,i,l,h)=>{let b=s.consumeArg().tokens;if(b.length!==1)throw new a("\\newcommand's first argument must be a macro name");const k=b[0].text,F=s.isDefined(k);if(F&&!i)throw new a("\\newcommand{"+k+"} attempting to redefine "+(k+"; use \\renewcommand"));if(!F&&!l)throw new a("\\renewcommand{"+k+"} when command "+k+" does not yet exist; use \\newcommand");let z=0;if(b=s.consumeArg().tokens,b.length===1&&b[0].text==="["){let W="",te=s.expandNextToken();for(;te.text!=="]"&&te.text!=="EOF";)W+=te.text,te=s.expandNextToken();if(!W.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+W);z=parseInt(W),b=s.consumeArg().tokens}return F&&h||s.macros.set(k,{tokens:b,numArgs:z}),""};I("\\newcommand",s=>rl(s,!1,!0,!1)),I("\\renewcommand",s=>rl(s,!0,!1,!1)),I("\\providecommand",s=>rl(s,!0,!0,!0)),I("\\message",s=>{const i=s.consumeArgs(1)[0];return console.log(i.reverse().map(l=>l.text).join("")),""}),I("\\errmessage",s=>{const i=s.consumeArgs(1)[0];return console.error(i.reverse().map(l=>l.text).join("")),""}),I("\\show",s=>{const i=s.popToken(),l=i.text;return console.log(i,s.macros.get(l),Jn[l],It.math[l],It.text[l]),""}),I("\\bgroup","{"),I("\\egroup","}"),I("~","\\nobreakspace"),I("\\lq","`"),I("\\rq","'"),I("\\aa","\\r a"),I("\\AA","\\r A"),I("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),I("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),I("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),I("\u212C","\\mathscr{B}"),I("\u2130","\\mathscr{E}"),I("\u2131","\\mathscr{F}"),I("\u210B","\\mathscr{H}"),I("\u2110","\\mathscr{I}"),I("\u2112","\\mathscr{L}"),I("\u2133","\\mathscr{M}"),I("\u211B","\\mathscr{R}"),I("\u212D","\\mathfrak{C}"),I("\u210C","\\mathfrak{H}"),I("\u2128","\\mathfrak{Z}"),I("\\Bbbk","\\Bbb{k}"),I("\xB7","\\cdotp"),I("\\llap","\\mathllap{\\textrm{#1}}"),I("\\rlap","\\mathrlap{\\textrm{#1}}"),I("\\clap","\\mathclap{\\textrm{#1}}"),I("\\mathstrut","\\vphantom{(}"),I("\\underbar","\\underline{\\text{#1}}"),I("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),I("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),I("\\ne","\\neq"),I("\u2260","\\neq"),I("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),I("\u2209","\\notin"),I("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),I("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),I("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),I("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),I("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),I("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),I("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),I("\u27C2","\\perp"),I("\u203C","\\mathclose{!\\mkern-0.8mu!}"),I("\u220C","\\notni"),I("\u231C","\\ulcorner"),I("\u231D","\\urcorner"),I("\u231E","\\llcorner"),I("\u231F","\\lrcorner"),I("\xA9","\\copyright"),I("\xAE","\\textregistered"),I("\uFE0F","\\textregistered"),I("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),I("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),I("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),I("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),I("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),I("\u22EE","\\vdots"),I("\\varGamma","\\mathit{\\Gamma}"),I("\\varDelta","\\mathit{\\Delta}"),I("\\varTheta","\\mathit{\\Theta}"),I("\\varLambda","\\mathit{\\Lambda}"),I("\\varXi","\\mathit{\\Xi}"),I("\\varPi","\\mathit{\\Pi}"),I("\\varSigma","\\mathit{\\Sigma}"),I("\\varUpsilon","\\mathit{\\Upsilon}"),I("\\varPhi","\\mathit{\\Phi}"),I("\\varPsi","\\mathit{\\Psi}"),I("\\varOmega","\\mathit{\\Omega}"),I("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),I("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),I("\\boxed","\\fbox{$\\displaystyle{#1}$}"),I("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),I("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),I("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),I("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),I("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const Pc={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};I("\\dots",function(s){let i="\\dotso";const l=s.expandAfterFuture().text;return l in Pc?i=Pc[l]:(l.slice(0,4)==="\\not"||l in It.math&&["bin","rel"].includes(It.math[l].group))&&(i="\\dotsb"),i});const nl={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};I("\\dotso",function(s){return s.future().text in nl?"\\ldots\\,":"\\ldots"}),I("\\dotsc",function(s){const i=s.future().text;return i in nl&&i!==","?"\\ldots\\,":"\\ldots"}),I("\\cdots",function(s){return s.future().text in nl?"\\@cdots\\,":"\\@cdots"}),I("\\dotsb","\\cdots"),I("\\dotsm","\\cdots"),I("\\dotsi","\\!\\cdots"),I("\\dotsx","\\ldots\\,"),I("\\DOTSI","\\relax"),I("\\DOTSB","\\relax"),I("\\DOTSX","\\relax"),I("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),I("\\,","\\tmspace+{3mu}{.1667em}"),I("\\thinspace","\\,"),I("\\>","\\mskip{4mu}"),I("\\:","\\tmspace+{4mu}{.2222em}"),I("\\medspace","\\:"),I("\\;","\\tmspace+{5mu}{.2777em}"),I("\\thickspace","\\;"),I("\\!","\\tmspace-{3mu}{.1667em}"),I("\\negthinspace","\\!"),I("\\negmedspace","\\tmspace-{4mu}{.2222em}"),I("\\negthickspace","\\tmspace-{5mu}{.277em}"),I("\\enspace","\\kern.5em "),I("\\enskip","\\hskip.5em\\relax"),I("\\quad","\\hskip1em\\relax"),I("\\qquad","\\hskip2em\\relax"),I("\\tag","\\@ifstar\\tag@literal\\tag@paren"),I("\\tag@paren","\\tag@literal{({#1})}"),I("\\tag@literal",s=>{if(s.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),I("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),I("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),I("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),I("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),I("\\newline","\\\\\\relax"),I("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const zc=ce(Me["Main-Regular"][84][1]-.7*Me["Main-Regular"][65][1]);I("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+zc+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),I("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+zc+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),I("\\hspace","\\@ifstar\\@hspacer\\@hspace"),I("\\@hspace","\\hskip #1\\relax"),I("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),I("\\ordinarycolon",":"),I("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),I("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),I("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),I("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),I("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),I("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),I("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),I("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),I("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),I("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),I("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),I("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),I("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),I("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),I("\u2237","\\dblcolon"),I("\u2239","\\eqcolon"),I("\u2254","\\coloneqq"),I("\u2255","\\eqqcolon"),I("\u2A74","\\Coloneqq"),I("\\ratio","\\vcentcolon"),I("\\coloncolon","\\dblcolon"),I("\\colonequals","\\coloneqq"),I("\\coloncolonequals","\\Coloneqq"),I("\\equalscolon","\\eqqcolon"),I("\\equalscoloncolon","\\Eqqcolon"),I("\\colonminus","\\coloneq"),I("\\coloncolonminus","\\Coloneq"),I("\\minuscolon","\\eqcolon"),I("\\minuscoloncolon","\\Eqcolon"),I("\\coloncolonapprox","\\Colonapprox"),I("\\coloncolonsim","\\Colonsim"),I("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),I("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),I("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),I("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),I("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),I("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),I("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),I("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),I("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),I("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),I("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),I("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),I("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),I("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),I("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),I("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),I("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),I("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),I("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),I("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),I("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),I("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),I("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),I("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),I("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),I("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),I("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),I("\\imath","\\html@mathml{\\@imath}{\u0131}"),I("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),I("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),I("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),I("\u27E6","\\llbracket"),I("\u27E7","\\rrbracket"),I("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),I("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),I("\u2983","\\lBrace"),I("\u2984","\\rBrace"),I("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),I("\u29B5","\\minuso"),I("\\darr","\\downarrow"),I("\\dArr","\\Downarrow"),I("\\Darr","\\Downarrow"),I("\\lang","\\langle"),I("\\rang","\\rangle"),I("\\uarr","\\uparrow"),I("\\uArr","\\Uparrow"),I("\\Uarr","\\Uparrow"),I("\\N","\\mathbb{N}"),I("\\R","\\mathbb{R}"),I("\\Z","\\mathbb{Z}"),I("\\alef","\\aleph"),I("\\alefsym","\\aleph"),I("\\Alpha","\\mathrm{A}"),I("\\Beta","\\mathrm{B}"),I("\\bull","\\bullet"),I("\\Chi","\\mathrm{X}"),I("\\clubs","\\clubsuit"),I("\\cnums","\\mathbb{C}"),I("\\Complex","\\mathbb{C}"),I("\\Dagger","\\ddagger"),I("\\diamonds","\\diamondsuit"),I("\\empty","\\emptyset"),I("\\Epsilon","\\mathrm{E}"),I("\\Eta","\\mathrm{H}"),I("\\exist","\\exists"),I("\\harr","\\leftrightarrow"),I("\\hArr","\\Leftrightarrow"),I("\\Harr","\\Leftrightarrow"),I("\\hearts","\\heartsuit"),I("\\image","\\Im"),I("\\infin","\\infty"),I("\\Iota","\\mathrm{I}"),I("\\isin","\\in"),I("\\Kappa","\\mathrm{K}"),I("\\larr","\\leftarrow"),I("\\lArr","\\Leftarrow"),I("\\Larr","\\Leftarrow"),I("\\lrarr","\\leftrightarrow"),I("\\lrArr","\\Leftrightarrow"),I("\\Lrarr","\\Leftrightarrow"),I("\\Mu","\\mathrm{M}"),I("\\natnums","\\mathbb{N}"),I("\\Nu","\\mathrm{N}"),I("\\Omicron","\\mathrm{O}"),I("\\plusmn","\\pm"),I("\\rarr","\\rightarrow"),I("\\rArr","\\Rightarrow"),I("\\Rarr","\\Rightarrow"),I("\\real","\\Re"),I("\\reals","\\mathbb{R}"),I("\\Reals","\\mathbb{R}"),I("\\Rho","\\mathrm{P}"),I("\\sdot","\\cdot"),I("\\sect","\\S"),I("\\spades","\\spadesuit"),I("\\sub","\\subset"),I("\\sube","\\subseteq"),I("\\supe","\\supseteq"),I("\\Tau","\\mathrm{T}"),I("\\thetasym","\\vartheta"),I("\\weierp","\\wp"),I("\\Zeta","\\mathrm{Z}"),I("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),I("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),I("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),I("\\bra","\\mathinner{\\langle{#1}|}"),I("\\ket","\\mathinner{|{#1}\\rangle}"),I("\\braket","\\mathinner{\\langle{#1}\\rangle}"),I("\\Bra","\\left\\langle#1\\right|"),I("\\Ket","\\left|#1\\right\\rangle");const Ic=s=>i=>{const l=i.consumeArg().tokens,h=i.consumeArg().tokens,b=i.consumeArg().tokens,k=i.consumeArg().tokens,F=i.macros.get("|"),z=i.macros.get("\\|");i.macros.beginGroup();const W=pe=>ke=>{s&&(ke.macros.set("|",F),b.length&&ke.macros.set("\\|",z));let Ge=pe;return!pe&&b.length&&ke.future().text==="|"&&(ke.popToken(),Ge=!0),{tokens:Ge?b:h,numArgs:0}};i.macros.set("|",W(!1)),b.length&&i.macros.set("\\|",W(!0));const te=i.consumeArg().tokens,fe=i.expandTokens([...k,...te,...l]);return i.macros.endGroup(),{tokens:fe.reverse(),numArgs:0}};I("\\bra@ket",Ic(!1)),I("\\bra@set",Ic(!0)),I("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),I("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),I("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),I("\\angln","{\\angl n}"),I("\\blue","\\textcolor{##6495ed}{#1}"),I("\\orange","\\textcolor{##ffa500}{#1}"),I("\\pink","\\textcolor{##ff00af}{#1}"),I("\\red","\\textcolor{##df0030}{#1}"),I("\\green","\\textcolor{##28ae7b}{#1}"),I("\\gray","\\textcolor{gray}{#1}"),I("\\purple","\\textcolor{##9d38bd}{#1}"),I("\\blueA","\\textcolor{##ccfaff}{#1}"),I("\\blueB","\\textcolor{##80f6ff}{#1}"),I("\\blueC","\\textcolor{##63d9ea}{#1}"),I("\\blueD","\\textcolor{##11accd}{#1}"),I("\\blueE","\\textcolor{##0c7f99}{#1}"),I("\\tealA","\\textcolor{##94fff5}{#1}"),I("\\tealB","\\textcolor{##26edd5}{#1}"),I("\\tealC","\\textcolor{##01d1c1}{#1}"),I("\\tealD","\\textcolor{##01a995}{#1}"),I("\\tealE","\\textcolor{##208170}{#1}"),I("\\greenA","\\textcolor{##b6ffb0}{#1}"),I("\\greenB","\\textcolor{##8af281}{#1}"),I("\\greenC","\\textcolor{##74cf70}{#1}"),I("\\greenD","\\textcolor{##1fab54}{#1}"),I("\\greenE","\\textcolor{##0d923f}{#1}"),I("\\goldA","\\textcolor{##ffd0a9}{#1}"),I("\\goldB","\\textcolor{##ffbb71}{#1}"),I("\\goldC","\\textcolor{##ff9c39}{#1}"),I("\\goldD","\\textcolor{##e07d10}{#1}"),I("\\goldE","\\textcolor{##a75a05}{#1}"),I("\\redA","\\textcolor{##fca9a9}{#1}"),I("\\redB","\\textcolor{##ff8482}{#1}"),I("\\redC","\\textcolor{##f9685d}{#1}"),I("\\redD","\\textcolor{##e84d39}{#1}"),I("\\redE","\\textcolor{##bc2612}{#1}"),I("\\maroonA","\\textcolor{##ffbde0}{#1}"),I("\\maroonB","\\textcolor{##ff92c6}{#1}"),I("\\maroonC","\\textcolor{##ed5fa6}{#1}"),I("\\maroonD","\\textcolor{##ca337c}{#1}"),I("\\maroonE","\\textcolor{##9e034e}{#1}"),I("\\purpleA","\\textcolor{##ddd7ff}{#1}"),I("\\purpleB","\\textcolor{##c6b9fc}{#1}"),I("\\purpleC","\\textcolor{##aa87ff}{#1}"),I("\\purpleD","\\textcolor{##7854ab}{#1}"),I("\\purpleE","\\textcolor{##543b78}{#1}"),I("\\mintA","\\textcolor{##f5f9e8}{#1}"),I("\\mintB","\\textcolor{##edf2df}{#1}"),I("\\mintC","\\textcolor{##e0e5cc}{#1}"),I("\\grayA","\\textcolor{##f6f7f7}{#1}"),I("\\grayB","\\textcolor{##f0f1f2}{#1}"),I("\\grayC","\\textcolor{##e3e5e6}{#1}"),I("\\grayD","\\textcolor{##d6d8da}{#1}"),I("\\grayE","\\textcolor{##babec2}{#1}"),I("\\grayF","\\textcolor{##888d93}{#1}"),I("\\grayG","\\textcolor{##626569}{#1}"),I("\\grayH","\\textcolor{##3b3e40}{#1}"),I("\\grayI","\\textcolor{##21242c}{#1}"),I("\\kaBlue","\\textcolor{##314453}{#1}"),I("\\kaGreen","\\textcolor{##71B307}{#1}");const jc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class fg{constructor(i,l,h){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=l,this.expansionCount=0,this.feed(i),this.macros=new cg(dg,l.macros),this.mode=h,this.stack=[]}feed(i){this.lexer=new Rc(i,this.settings)}switchMode(i){this.mode=i}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(i){this.stack.push(i)}pushTokens(i){this.stack.push(...i)}scanArgument(i){let l,h,b;if(i){if(this.consumeSpaces(),this.future().text!=="[")return null;l=this.popToken(),{tokens:b,end:h}=this.consumeArg(["]"])}else({tokens:b,start:l,end:h}=this.consumeArg());return this.pushToken(new cn("EOF",h.loc)),this.pushTokens(b),new cn("",on.range(l,h))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(i){const l=[],h=i&&i.length>0;h||this.consumeSpaces();const b=this.future();let k,F=0,z=0;do{if(k=this.popToken(),l.push(k),k.text==="{")++F;else if(k.text==="}"){if(--F,F===-1)throw new a("Extra }",k)}else if(k.text==="EOF")throw new a("Unexpected end of input in a macro argument, expected '"+(i&&h?i[z]:"}")+"'",k);if(i&&h)if((F===0||F===1&&i[z]==="{")&&k.text===i[z]){if(++z,z===i.length){l.splice(-z,z);break}}else z=0}while(F!==0||h);return b.text==="{"&&l[l.length-1].text==="}"&&(l.pop(),l.shift()),l.reverse(),{tokens:l,start:b,end:k}}consumeArgs(i,l){if(l){if(l.length!==i+1)throw new a("The length of delimiters doesn't match the number of args!");const b=l[0];for(let k=0;k<b.length;k++){const F=this.popToken();if(b[k]!==F.text)throw new a("Use of the macro doesn't match its definition",F)}}const h=[];for(let b=0;b<i;b++)h.push(this.consumeArg(l&&l[b+1]).tokens);return h}countExpansion(i){if(this.expansionCount+=i,this.expansionCount>this.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(i){const l=this.popToken(),h=l.text,b=l.noexpand?null:this._getExpansion(h);if(b==null||i&&b.unexpandable){if(i&&b==null&&h[0]==="\\"&&!this.isDefined(h))throw new a("Undefined control sequence: "+h);return this.pushToken(l),!1}this.countExpansion(1);let k=b.tokens;const F=this.consumeArgs(b.numArgs,b.delimiters);if(b.numArgs){k=k.slice();for(let z=k.length-1;z>=0;--z){let W=k[z];if(W.text==="#"){if(z===0)throw new a("Incomplete placeholder at end of macro body",W);if(W=k[--z],W.text==="#")k.splice(z+1,1);else if(/^[1-9]$/.test(W.text))k.splice(z,2,...F[+W.text-1]);else throw new a("Not a valid argument number",W)}}}return this.pushTokens(k),k.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){const i=this.stack.pop();return i.treatAsRelax&&(i.text="\\relax"),i}throw new Error}expandMacro(i){return this.macros.has(i)?this.expandTokens([new cn(i)]):void 0}expandTokens(i){const l=[],h=this.stack.length;for(this.pushTokens(i);this.stack.length>h;)if(this.expandOnce(!0)===!1){const b=this.stack.pop();b.treatAsRelax&&(b.noexpand=!1,b.treatAsRelax=!1),l.push(b)}return this.countExpansion(l.length),l}expandMacroAsText(i){const l=this.expandMacro(i);return l&&l.map(h=>h.text).join("")}_getExpansion(i){const l=this.macros.get(i);if(l==null)return l;if(i.length===1){const b=this.lexer.catcodes[i];if(b!=null&&b!==13)return}const h=typeof l=="function"?l(this):l;if(typeof h=="string"){let b=0;if(h.indexOf("#")!==-1){const W=h.replace(/##/g,"");for(;W.indexOf("#"+(b+1))!==-1;)++b}const k=new Rc(h,this.settings),F=[];let z=k.lex();for(;z.text!=="EOF";)F.push(z),z=k.lex();return F.reverse(),{tokens:F,numArgs:b}}return h}isDefined(i){return this.macros.has(i)||Jn.hasOwnProperty(i)||It.math.hasOwnProperty(i)||It.text.hasOwnProperty(i)||jc.hasOwnProperty(i)}isExpandable(i){const l=this.macros.get(i);return l!=null?typeof l=="string"||typeof l=="function"||!l.unexpandable:Jn.hasOwnProperty(i)&&!Jn[i].primitive}}const _c=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,di=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),ol={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},Lc={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"};class fi{constructor(i,l){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new fg(i,l,this.mode),this.settings=l,this.leftrightDepth=0}expect(i,l){if(l===void 0&&(l=!0),this.fetch().text!==i)throw new a("Expected '"+i+"', got '"+this.fetch().text+"'",this.fetch());l&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(i){this.mode=i,this.gullet.switchMode(i)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const i=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),i}finally{this.gullet.endGroups()}}subparse(i){const l=this.nextToken;this.consume(),this.gullet.pushToken(new cn("}")),this.gullet.pushTokens(i);const h=this.parseExpression(!1);return this.expect("}"),this.nextToken=l,h}parseExpression(i,l){const h=[];for(;;){this.mode==="math"&&this.consumeSpaces();const b=this.fetch();if(fi.endOfExpression.indexOf(b.text)!==-1||l&&b.text===l||i&&Jn[b.text]&&Jn[b.text].infix)break;const k=this.parseAtom(l);if(k){if(k.type==="internal")continue}else break;h.push(k)}return this.mode==="text"&&this.formLigatures(h),this.handleInfixNodes(h)}handleInfixNodes(i){let l=-1,h;for(let b=0;b<i.length;b++)if(i[b].type==="infix"){if(l!==-1)throw new a("only one infix operator per group",i[b].token);l=b,h=i[b].replaceWith}if(l!==-1&&h){let b,k;const F=i.slice(0,l),z=i.slice(l+1);F.length===1&&F[0].type==="ordgroup"?b=F[0]:b={type:"ordgroup",mode:this.mode,body:F},z.length===1&&z[0].type==="ordgroup"?k=z[0]:k={type:"ordgroup",mode:this.mode,body:z};let W;return h==="\\\\abovefrac"?W=this.callFunction(h,[b,i[l],k],[]):W=this.callFunction(h,[b,k],[]),[W]}else return i}handleSupSubscript(i){const l=this.fetch(),h=l.text;this.consume(),this.consumeSpaces();let b;do{var k;b=this.parseGroup(i)}while(((k=b)==null?void 0:k.type)==="internal");if(!b)throw new a("Expected group after '"+h+"'",l);return b}formatUnsupportedCmd(i){const l=[];for(let b=0;b<i.length;b++)l.push({type:"textord",mode:"text",text:i[b]});const h={type:"text",mode:this.mode,body:l};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[h]}}parseAtom(i){const l=this.parseGroup("atom",i);if((l==null?void 0:l.type)==="internal"||this.mode==="text")return l;let h,b;for(;;){this.consumeSpaces();const k=this.fetch();if(k.text==="\\limits"||k.text==="\\nolimits"){if(l&&l.type==="op"){const F=k.text==="\\limits";l.limits=F,l.alwaysHandleSupSub=!0}else if(l&&l.type==="operatorname")l.alwaysHandleSupSub&&(l.limits=k.text==="\\limits");else throw new a("Limit controls must follow a math operator",k);this.consume()}else if(k.text==="^"){if(h)throw new a("Double superscript",k);h=this.handleSupSubscript("superscript")}else if(k.text==="_"){if(b)throw new a("Double subscript",k);b=this.handleSupSubscript("subscript")}else if(k.text==="'"){if(h)throw new a("Double superscript",k);const F={type:"textord",mode:this.mode,text:"\\prime"},z=[F];for(this.consume();this.fetch().text==="'";)z.push(F),this.consume();this.fetch().text==="^"&&z.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:z}}else if(di[k.text]){const F=_c.test(k.text),z=[];for(z.push(new cn(di[k.text])),this.consume();;){const te=this.fetch().text;if(!di[te]||_c.test(te)!==F)break;z.unshift(new cn(di[te])),this.consume()}const W=this.subparse(z);F?b={type:"ordgroup",mode:"math",body:W}:h={type:"ordgroup",mode:"math",body:W}}else break}return h||b?{type:"supsub",mode:this.mode,base:l,sup:h,sub:b}:l}parseFunction(i,l){const h=this.fetch(),b=h.text,k=Jn[b];if(!k)return null;if(this.consume(),l&&l!=="atom"&&!k.allowedInArgument)throw new a("Got function '"+b+"' with no arguments"+(l?" as "+l:""),h);if(this.mode==="text"&&!k.allowedInText)throw new a("Can't use function '"+b+"' in text mode",h);if(this.mode==="math"&&k.allowedInMath===!1)throw new a("Can't use function '"+b+"' in math mode",h);const{args:F,optArgs:z}=this.parseArguments(b,k);return this.callFunction(b,F,z,h,i)}callFunction(i,l,h,b,k){const F={funcName:i,parser:this,token:b,breakOnTokenText:k},z=Jn[i];if(z&&z.handler)return z.handler(F,l,h);throw new a("No function handler for "+i)}parseArguments(i,l){const h=l.numArgs+l.numOptionalArgs;if(h===0)return{args:[],optArgs:[]};const b=[],k=[];for(let F=0;F<h;F++){let z=l.argTypes&&l.argTypes[F];const W=F<l.numOptionalArgs;(l.primitive&&z==null||l.type==="sqrt"&&F===1&&k[0]==null)&&(z="primitive");const te=this.parseGroupOfType("argument to '"+i+"'",z,W);if(W)k.push(te);else if(te!=null)b.push(te);else throw new a("Null argument, please report this as a bug")}return{args:b,optArgs:k}}parseGroupOfType(i,l,h){switch(l){case"color":return this.parseColorGroup(h);case"size":return this.parseSizeGroup(h);case"url":return this.parseUrlGroup(h);case"math":case"text":return this.parseArgumentGroup(h,l);case"hbox":{const b=this.parseArgumentGroup(h,"text");return b!=null?{type:"styling",mode:b.mode,body:[b],style:"text"}:null}case"raw":{const b=this.parseStringGroup("raw",h);return b!=null?{type:"raw",mode:"text",string:b.text}:null}case"primitive":{if(h)throw new a("A primitive argument cannot be optional");const b=this.parseGroup(i);if(b==null)throw new a("Expected group as "+i,this.fetch());return b}case"original":case null:case void 0:return this.parseArgumentGroup(h);default:throw new a("Unknown group type as "+i,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(i,l){const h=this.gullet.scanArgument(l);if(h==null)return null;let b="",k;for(;(k=this.fetch()).text!=="EOF";)b+=k.text,this.consume();return this.consume(),h.text=b,h}parseRegexGroup(i,l){const h=this.fetch();let b=h,k="",F;for(;(F=this.fetch()).text!=="EOF"&&i.test(k+F.text);)b=F,k+=b.text,this.consume();if(k==="")throw new a("Invalid "+l+": '"+h.text+"'",h);return h.range(b,k)}parseColorGroup(i){const l=this.parseStringGroup("color",i);if(l==null)return null;const h=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(l.text);if(!h)throw new a("Invalid color: '"+l.text+"'",l);let b=h[0];return/^[0-9a-f]{6}$/i.test(b)&&(b="#"+b),{type:"color-token",mode:this.mode,color:b}}parseSizeGroup(i){let l,h=!1;if(this.gullet.consumeSpaces(),!i&&this.gullet.future().text!=="{"?l=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):l=this.parseStringGroup("size",i),!l)return null;!i&&l.text.length===0&&(l.text="0pt",h=!0);const b=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(l.text);if(!b)throw new a("Invalid size: '"+l.text+"'",l);const k={number:+(b[1]+b[2]),unit:b[3]};if(!pt(k))throw new a("Invalid unit: '"+k.unit+"'",l);return{type:"size",mode:this.mode,value:k,isBlank:h}}parseUrlGroup(i){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const l=this.parseStringGroup("url",i);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),l==null)return null;const h=l.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:h}}parseArgumentGroup(i,l){const h=this.gullet.scanArgument(i);if(h==null)return null;const b=this.mode;l&&this.switchMode(l),this.gullet.beginGroup();const k=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const F={type:"ordgroup",mode:this.mode,loc:h.loc,body:k};return l&&this.switchMode(b),F}parseGroup(i,l){const h=this.fetch(),b=h.text;let k;if(b==="{"||b==="\\begingroup"){this.consume();const F=b==="{"?"}":"\\endgroup";this.gullet.beginGroup();const z=this.parseExpression(!1,F),W=this.fetch();this.expect(F),this.gullet.endGroup(),k={type:"ordgroup",mode:this.mode,loc:on.range(h,W),body:z,semisimple:b==="\\begingroup"||void 0}}else if(k=this.parseFunction(l,i)||this.parseSymbol(),k==null&&b[0]==="\\"&&!jc.hasOwnProperty(b)){if(this.settings.throwOnError)throw new a("Undefined control sequence: "+b,h);k=this.formatUnsupportedCmd(b),this.consume()}return k}formLigatures(i){let l=i.length-1;for(let h=0;h<l;++h){const b=i[h],k=b.text;k==="-"&&i[h+1].text==="-"&&(h+1<l&&i[h+2].text==="-"?(i.splice(h,3,{type:"textord",mode:"text",loc:on.range(b,i[h+2]),text:"---"}),l-=2):(i.splice(h,2,{type:"textord",mode:"text",loc:on.range(b,i[h+1]),text:"--"}),l-=1)),(k==="'"||k==="`")&&i[h+1].text===k&&(i.splice(h,2,{type:"textord",mode:"text",loc:on.range(b,i[h+1]),text:k+k}),l-=1)}}parseSymbol(){const i=this.fetch();let l=i.text;if(/^\\verb[^a-zA-Z]/.test(l)){this.consume();let k=l.slice(5);const F=k.charAt(0)==="*";if(F&&(k=k.slice(1)),k.length<2||k.charAt(0)!==k.slice(-1))throw new a(`\\verb assertion failed --
466
+ please report what input caused this bug`);return k=k.slice(1,-1),{type:"verb",mode:"text",body:k,star:F}}Lc.hasOwnProperty(l[0])&&!It[this.mode][l[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+l[0]+'" used in math mode',i),l=Lc[l[0]]+l.slice(1));const h=lg.exec(l);h&&(l=l.substring(0,h.index),l==="i"?l="\u0131":l==="j"&&(l="\u0237"));let b;if(It[this.mode][l]){this.settings.strict&&this.mode==="math"&&Ye.indexOf(l)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+l[0]+'" used in math mode',i);const k=It[this.mode][l].group,F=on.range(i);let z;if(Or.hasOwnProperty(k)){const W=k;z={type:"atom",mode:this.mode,family:W,loc:F,text:l}}else z={type:k,mode:this.mode,loc:F,text:l};b=z}else if(l.charCodeAt(0)>=128)this.settings.strict&&(Se(l.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+l[0]+'" used in math mode',i):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+l[0]+'"'+(" ("+l.charCodeAt(0)+")"),i)),b={type:"textord",mode:"text",loc:on.range(i),text:l};else return null;if(this.consume(),h)for(let k=0;k<h[0].length;k++){const F=h[0][k];if(!ol[F])throw new a("Unknown accent ' "+F+"'",i);const z=ol[F][this.mode]||ol[F].text;if(!z)throw new a("Accent "+F+" unsupported in "+this.mode+" mode",i);b={type:"accent",mode:this.mode,loc:on.range(i),label:z,isStretchy:!1,isShifty:!0,base:b}}return b}}fi.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var al=function(s,i){if(!(typeof s=="string"||s instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const l=new fi(s,i);delete l.gullet.macros.current["\\df@tag"];let h=l.parse();if(delete l.gullet.macros.current["\\current@color"],delete l.gullet.macros.current["\\color"],l.gullet.macros.get("\\df@tag")){if(!i.displayMode)throw new a("\\tag works only in display equations");h=[{type:"tag",mode:"text",body:h,tag:l.subparse([new cn("\\df@tag")])}]}return h};let Kc=function(s,i,l){i.textContent="";const h=il(s,l).toNode();i.appendChild(h)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Kc=function(){throw new a("KaTeX doesn't work in quirks mode.")});const hg=function(s,i){return il(s,i).toMarkup()},pg=function(s,i){const l=new N(i);return al(s,l)},Hc=function(s,i,l){if(l.throwOnError||!(s instanceof a))throw s;const h=ge.makeSpan(["katex-error"],[new Dt(i)]);return h.setAttribute("title",s.toString()),h.setAttribute("style","color:"+l.errorColor),h},il=function(s,i){const l=new N(i);try{const h=al(s,l);return Fm(h,s,l)}catch(h){return Hc(h,s,l)}};var mg={version:"0.16.25",render:Kc,renderToString:hg,ParseError:a,SETTINGS_SCHEMA:m,__parse:pg,__renderToDomTree:il,__renderToHTMLTree:function(s,i){const l=new N(i);try{const h=al(s,l);return Nm(h,s,l)}catch(h){return Hc(h,s,l)}},__setFontMetrics:ht,__defineSymbol:y,__defineFunction:Qe,__defineMacro:I,__domTree:{Span:Ct,Anchor:Mt,SymbolNode:Dt,SvgNode:Kt,PathNode:Ut,LineNode:Fr}},gg=mg;return n=n.default,n})()})})(H0)),H0.exports}var Xx=Li.exports,Ih;function Yx(){return Ih||(Ih=1,(function(e,t){(function(r,n){n(t,qe,Wx(),Ux())})(Xx,function(r,n,o,a){Object.defineProperty(r,"__esModule",{value:!0});function c(m,E){for(var N in E)Object.defineProperty(m,N,{enumerable:!0,get:E[N]})}c(r,{BlockMath:()=>w,InlineMath:()=>C}),n=d(n),o=u(o),a=u(a);function u(m){return m&&m.__esModule?m:{default:m}}function f(m){if(typeof WeakMap!="function")return null;var E=new WeakMap,N=new WeakMap;return(f=function(B){return B?N:E})(m)}function d(m,E){if(m&&m.__esModule)return m;if(m===null||typeof m!="object"&&typeof m!="function")return{default:m};var N=f(E);if(N&&N.has(m))return N.get(m);var B={},$=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in m)if(A!=="default"&&Object.prototype.hasOwnProperty.call(m,A)){var _=$?Object.getOwnPropertyDescriptor(m,A):null;_&&(_.get||_.set)?Object.defineProperty(B,A,_):B[A]=m[A]}return B.default=m,N&&N.set(m,B),B}const p=(m,{displayMode:E})=>{const N=({children:B,errorColor:$,math:A,renderError:_})=>{const P=A??B,{html:q,error:O}=(0,n.useMemo)(()=>{try{return{html:a.default.renderToString(P,{displayMode:E,errorColor:$,throwOnError:!!_}),error:void 0}}catch(V){if(V instanceof a.default.ParseError||V instanceof TypeError)return{error:V};throw V}},[P,$,_]);return O?_?_(O):n.default.createElement(m,{html:`${O.message}`}):n.default.createElement(m,{html:q})};return N.propTypes={children:o.default.string,errorColor:o.default.string,math:o.default.string,renderError:o.default.func},N},v={html:o.default.string.isRequired},g=({html:m})=>n.default.createElement("div",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});g.propTypes=v;const x=({html:m})=>n.default.createElement("span",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:m}});x.propTypes=v;const w=p(g,{displayMode:!0}),C=p(x,{displayMode:!1})})})(Li,Li.exports)),Li.exports}var xm=Yx();const Gx=Ke.span.attrs({className:"latex-inline-wrapper"})`
467
+ display: inline-flex;
468
+ align-items: baseline;
469
+ column-gap: 4px;
470
+ line-height: 1.2;
471
+ color: ${({$color:e})=>e||"inherit"};
472
+ `,Zx=Ke.span.attrs({className:"latex-inline-error"})`
473
+ display: inline-flex;
474
+ align-items: center;
475
+ column-gap: 6px;
476
+ padding: 2px 4px;
477
+ border-radius: 4px;
478
+ background: rgba(215, 58, 73, 0.08);
479
+ color: #d73a49;
480
+ font-size: 0.85em;
481
+ `,Jx=Ke.span.attrs({className:"latex-inline-error-message"})`
482
+ font-size: 0.75em;
483
+ color: #d73a49;
484
+ `,Qx=({attributes:e,formula:t,styles:r})=>{var a;const n=vt(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?H.jsx(Gx,{...e,$color:o,children:H.jsx(xm.InlineMath,{math:n,errorColor:"#d73a49",renderError:c=>H.jsxs(Zx,{children:[H.jsx("span",{children:n}),H.jsx(Jx,{children:c==null?void 0:c.message})]})})}):null},ew=Ke.div.attrs({className:"latex-block-wrapper"})`
485
+ width: 100%;
486
+ display: flex;
487
+ justify-content: center;
488
+ align-items: center;
489
+ margin: 1.25rem 0;
490
+ padding: 0.75rem;
491
+ border-radius: 8px;
492
+ background: rgba(2, 132, 199, 0.05);
493
+ color: ${({$textColor:e})=>e||"inherit"};
494
+ `,tw=Ke.div.attrs({className:"latex-block-error"})`
495
+ display: flex;
496
+ flex-direction: column;
497
+ width: 100%;
498
+ gap: 6px;
499
+ padding: 0.75rem;
500
+ background: rgba(215, 58, 73, 0.08);
501
+ border: 1px dashed #d73a49;
502
+ border-radius: 8px;
503
+ font-size: 0.9rem;
504
+ color: #d73a49;
505
+ `,rw=Ke.span.attrs({className:"latex-block-error-title"})`
506
+ font-weight: 600;
507
+ `,nw=Ke.code.attrs({className:"latex-block-error-formula"})`
508
+ font-size: 0.85rem;
509
+ color: #d73a49;
510
+ overflow-x: auto;
511
+ `,ow=({attributes:e,formula:t,styles:r})=>{var a;const n=vt(()=>(t||"").trim(),[t]),o=(a=r==null?void 0:r.text)==null?void 0:a.color;return n?H.jsx(ew,{...e,$textColor:o,children:H.jsx(xm.BlockMath,{math:n,errorColor:"#d73a49",renderError:c=>H.jsxs(tw,{children:[H.jsx(rw,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),H.jsx(nw,{children:n}),H.jsx("span",{children:c==null?void 0:c.message})]})})}):null},aw=e=>{var a,c,u,f,d,p,v,g;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return H.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 H.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n});case"heading-two":return H.jsx("h2",{...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"heading-three":return H.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(f=t==null?void 0:t.text)==null?void 0:f.color} !important`},children:n});case"bulleted-list":return H.jsx("ul",{...o,children:n});case"numbered-list":return H.jsx("ol",{...o,children:n});case"list-item":return H.jsx("li",{...o,children:n});case"table":return H.jsx("div",{className:"table-container",children:H.jsx("table",{...o,children:H.jsx("tbody",{children:n})})});case"table-row":return H.jsx("tr",{...o,children:n});case"table-cell":return r.header?H.jsx("th",{...o,children:n}):H.jsx("td",{...o,children:n});case"block-quote":return H.jsx("blockquote",{...o,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});case"code-block":return H.jsx("pre",{...o,children:H.jsx("code",{style:{color:`${(p=t==null?void 0:t.text)==null?void 0:p.color} !important`},children:n})});case"think":const x=e.extraProps||{},w=x.isCollapsed!==void 0?x.isCollapsed:Object.values(x)[1]===!0,C={...x,isCollapsed:w};return H.jsx(Kx,{attributes:o,styles:t,extraProps:C,children:n});case"template":return H.jsx(bm,{...o,element:r,children:n,styles:t});case"latex-inline":return H.jsx(Qx,{attributes:o,formula:r.formula,styles:t});case"latex-block":return H.jsx(ow,{attributes:o,formula:r.formula,styles:t});case"retrieve-sql-data":const m=(E=>{if(!E)return null;try{const N=typeof E=="string"?JSON.parse(E):E;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(N)?N[0]:N}}]}}catch(N){return console.error("Failed to parse databaseReference:",N),null}})(((v=e.extraProps)==null?void 0:v.databaseReference)||e.databaseReference);return H.jsx(ym,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:m||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),H.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:E=>{const N=E.target;N.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}),H.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:E=>{const N=E.target;N.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return H.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(g=t==null?void 0:t.text)==null?void 0:g.color} !important`},children:n})}},iw=e=>{var c,u,f,d,p,v;const{attributes:t,children:r,leaf:n,styles:o}=e;(c=o==null?void 0:o.text)!=null&&c.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const g=n.fromtype==="0",x=n.fromtype==="1",w=n.fromtype==="2",C=n.text||"";let m=C,E="#e6f7ff",N="#1890ff",B="#bae7ff";return g?(m=`${C}`,E="#e6f7ff",N="#1890ff",B="#bae7ff"):x?(m=`${C}`,E="#f6ffed",N="#52c41a",B="#d9f7be"):w&&(m=`${C}`,E="#E7F8FB",N="#10BBD9",B="#E7F8FB"),a=H.jsx("span",{...t,style:{display:"inline-block",background:E,color:N,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:$=>$.currentTarget.style.background=B,onMouseLeave:$=>$.currentTarget.style.background=E,children:m}),a}if(n.code)a=H.jsx("code",{...t,style:{color:`${(u=o==null?void 0:o.text)==null?void 0:u.color} !important`},children:a});else{const g=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),x={color:`${(f=o==null?void 0:o.text)==null?void 0:f.color} !important`,fontSize:(d=o==null?void 0:o.text)==null?void 0:d.fontSize,lineHeight:(p=o==null?void 0:o.text)==null?void 0:p.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=H.jsx("span",{...t,className:g,style:x,children:a})}return n.link&&(a=H.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(v=o==null?void 0:o.text)==null?void 0:v.color} !important`},children:a})),a},Ul=Ke.div.attrs({className:"unified-rich-text-container"})`
512
+
513
+
514
+ & > * + * {
515
+ margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
516
+ }
517
+
518
+ /* 标题样式 */
519
+ & h1 {
520
+ font-size: ${e=>e.$size==="sm"?"20px":"32px"};
521
+ font-weight: 600;
522
+ margin: 24px 0 16px 0;
523
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
524
+ border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
525
+ padding-bottom: 8px;
526
+ }
527
+
528
+ & h2 {
529
+ font-size: ${e=>e.$size==="sm"?"18px":"24px"};
530
+ font-weight: 600;
531
+ margin: 24px 0 16px 0;
532
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
533
+ border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
534
+ padding-bottom: 6px;
535
+ }
536
+
537
+ & h3 {
538
+ font-size: ${e=>e.$size==="sm"?"16px":"20px"};
539
+ font-weight: 600;
540
+ margin: 24px 0 16px 0;
541
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
542
+ }
543
+
544
+ /* 段落样式 */
545
+ & p {
546
+ font-size: ${e=>e.$size==="sm"?"14px":"16px"};
547
+ margin: 16px 0;
548
+ line-height: 1.6;
549
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
550
+ }
551
+
552
+ /* 列表样式 - GitHub 风格简约设计 */
553
+ & ul, & ol {
554
+ margin: 16px 0;
555
+ padding-left: 24px;
556
+ line-height: 1.6;
557
+ }
558
+
559
+ & ul {
560
+ list-style-type: disc;
561
+ }
562
+
563
+ & ol {
564
+ list-style-type: decimal;
565
+ }
566
+
567
+ & li {
568
+ margin: 4px 0;
569
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
570
+ }
571
+
572
+ /* 嵌套列表 */
573
+ & ul ul, & ol ol, & ul ol, & ol ul {
574
+ margin: 8px 0;
575
+ }
576
+
577
+ /* 引用块样式 */
578
+ & blockquote {
579
+ font-size: ${e=>e.$size==="sm"?"14px":"16px"};
580
+ border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
581
+ padding: 0 16px;
582
+ margin: 16px 0;
583
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
584
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
585
+ }
586
+
587
+ /* 行内代码样式 */
588
+ & code {
589
+ font-size: 0.875em;
590
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
591
+ padding: 0.125em 0.25em;
592
+ border-radius: 6px;
593
+ font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
594
+ color: #d73a49;
595
+ }
596
+
597
+ /* 代码块样式 */
598
+ & pre {
599
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
600
+ padding: 16px;
601
+ border-radius: 6px;
602
+ overflow-x: auto;
603
+ margin: 16px 0;
604
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
605
+ }
606
+
607
+ & pre code {
608
+ background-color: transparent;
609
+ padding: 0;
610
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
611
+ }
612
+
613
+ /* 表格容器样式 */
614
+ & .table-container {
615
+ overflow: auto;
616
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
617
+ border-radius: 6px;
618
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
619
+ margin: 16px 0;
620
+ }
621
+
622
+ /* 表格样式 */
623
+ & .table-container table,
624
+ & table {
625
+ width: 100%;
626
+ border-collapse: collapse;
627
+ border: none;
628
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
629
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
630
+ }
631
+
632
+ & .table-container th,
633
+ & .table-container td,
634
+ & th, & td {
635
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
636
+ padding: 8px 12px;
637
+ text-align: left;
638
+ }
639
+
640
+ & .table-container th,
641
+ & th {
642
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
643
+ font-weight: 600;
644
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
645
+ }
646
+
647
+ & .table-container tr:nth-child(even) td,
648
+ & tr:nth-child(even) {
649
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
650
+ }
651
+
652
+ & .table-container td,
653
+ & td {
654
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
655
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
656
+ }
657
+
658
+ /* 图片样式 */
659
+ & img {
660
+ max-width: 100%;
661
+ height: auto;
662
+ border-radius: 6px;
663
+ margin: 16px 0;
664
+ }
665
+
666
+ /* 链接样式 */
667
+ & a {
668
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
669
+ text-decoration: none;
670
+
671
+ &:hover {
672
+ text-decoration: underline;
673
+ }
674
+ }
675
+
676
+ /* 文本样式 */
677
+ & strong {
678
+ font-weight: 600;
679
+ }
680
+
681
+ & em {
682
+ font-style: italic;
683
+ }
684
+
685
+ & u {
686
+ text-decoration: underline;
687
+ }
688
+
689
+ & s {
690
+ text-decoration: line-through;
691
+ }
692
+
693
+ /* 分割线样式 */
694
+ & hr {
695
+ border: none;
696
+ border-top: 1px solid #d0d7de;
697
+ margin: 24px 0;
698
+ }
699
+
700
+ /* 思考容器样式 */
701
+ & .think-container {
702
+
703
+
704
+ }
705
+
706
+ & .think-header {
707
+
708
+ }
709
+
710
+ & .think-icon {
711
+
712
+ }
713
+
714
+ & .think-title {
715
+ font-weight: 600;
716
+ color: #24292f;
717
+ font-size: 14px;
718
+ }
719
+
720
+ & .think-text {
721
+ color: #86909C;
722
+ font-size: 14px;
723
+ line-height: 1.6;
724
+ }
725
+
726
+ /* 召回标签样式 */
727
+ & .retrive-tag {
728
+ display: inline-block;
729
+ background: #e6f7ff;
730
+ color: #1890ff;
731
+ border: 1px solid rgba(114, 187, 255, 0.3);
732
+ border-radius: 6px;
733
+ padding: 2px 6px;
734
+ margin: 0 2px;
735
+ font-weight: 500;
736
+ font-size: 12px;
737
+ line-height: 1.4;
738
+ cursor: pointer;
739
+ vertical-align: middle;
740
+ transition: background-color 0.2s ease;
741
+ }
742
+
743
+ & .retrive-tag:hover {
744
+ background: #bae7ff;
745
+ }
746
+ `;function wm(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?wm([r])[0]:r)})}const jh="__rtext_escaped_dollar__";function ls(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return console.warn("Failed to decode LaTeX formula:",e,t),e}}function sw(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function lw(e){const t=new Map;let r=e||"";if(!r)return{content:r,placeholders:t};let n=0;r=r.replace(/\\\$/g,jh);const o=(u,f)=>{const d=`RTEXT_LATEX_PLACEHOLDER_${n++}_${u.toUpperCase()}`;return t.set(d,{type:u,formula:(f||"").trim()}),d},a=/\$\$([\s\S]+?)\$\$/g;r=r.replace(a,(u,f)=>o("block",f));const c=new RegExp("(?<!\\\\)\\$(?!\\$)([\\s\\S]+?)(?<!\\\\)\\$(?!\\$)","g");return r=r.replace(c,(u,f)=>o("inline",f)),r=r.replace(new RegExp(jh,"g"),"\\$"),{content:r,placeholders:t}}function uw(e,t){if(!e||t.size===0)return e;let r=e;return t.forEach((n,o)=>{const a=n.type==="block"?"latex-block":"latex-inline",c=encodeURIComponent(n.formula),u=`<${a} data-formula="${c}"></${a}>`;r=r.replace(new RegExp(sw(o),"g"),u)}),r}function Cm(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(d){var p;if(d.indexOf("<think>")>-1)if(d.indexOf("</think>")>-1){const v=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,g=d.match(v);return g?{thinkContent:g[1],content:g[2],finish:!0}:{thinkContent:"",content:d,finish:!0}}else{const v=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((p=d.match(v))==null?void 0:p[1])||"",content:""}}else return{thinkContent:"",content:d}}const{thinkContent:o,content:a,finish:c}=n(e||"");let u=[],f=0;if(!r.includes("think")&&o){const d=o.split(/\n+/).map(p=>p.trim()).filter(Boolean).flatMap(p=>{if(/<retrive-tag/i.test(p)){const v=document.createElement("div");return v.innerHTML=p,_h(v,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:p}]}]});u.push({type:"think",id:`think-${f++}`,thinkContent:o,finish:c,children:d})}if(a){const{content:d,placeholders:p}=lw(a);let v=d;r.includes("retrive")||(v=v.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(w,C,m)=>`<retrive-tag${C?" "+C.trim():""}>${m}</retrive-tag>`)),r.includes("retrieve-sql-data")||(v=v.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(w,C)=>`<retrieve-sql-data id="${C}"></retrieve-sql-data>`)),ar.setOptions({gfm:!0,breaks:!0,pedantic:!1});const g=ar(v);let x=typeof g=="string"?g:"";if(x=uw(x,p),console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:x.length,hasImgTags:x.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:x}),typeof g=="string"){const w=document.createElement("div");w.innerHTML=x,console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:w.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(w.querySelectorAll("*")).map(m=>m.tagName),imgElements:Array.from(w.querySelectorAll("img")).map(m=>({src:m.src,alt:m.alt}))});const C=_h(w,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:C.length,hasImageElements:C.some(m=>m.type==="image")}),C&&C.length>0&&(u=u.concat(C))}}return!u||u.length===0?[{type:"paragraph",children:[{text:""}]}]:wm(u)}function _h(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 c;if(a.nodeType===Node.ELEMENT_NODE){const u=a;switch(console.log("\u{1F50D} \u5904\u7406\u5143\u7D20\u8282\u70B9:",{tagName:u.tagName,isImg:u.tagName==="IMG",src:u.getAttribute("src"),basePath:t}),u.tagName.toLowerCase()){case"p":n.push({type:"paragraph",children:_r(u,t)});break;case"h1":n.push({type:"heading-one",children:_r(u,t)});break;case"h2":n.push({type:"heading-two",children:_r(u,t)});break;case"h3":n.push({type:"heading-three",children:_r(u,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(u.children).map(d=>({type:"list-item",children:_r(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(u.children).map(d=>({type:"list-item",children:_r(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:_r(u,t)});break;case"pre":{const d=u.querySelector("code");d?n.push({type:"code-block",children:_r(d)}):n.push({type:"code-block",children:_r(u,t)});break}case"code":{u.closest("pre")||n.push({type:"paragraph",children:_r(u,t)});break}case"retrive-tag":{const d=_r(u,t);d.length>0&&n.push({type:"paragraph",children:d});break}case"retrieve-sql-data":{const d=u.getAttribute("id")||"";n.push({type:"retrieve-sql-data",id:d,children:[{text:""}]});break}case"blockquote":n.push({type:"block-quote",children:_r(u,t)});break;case"table":n.push(cw(u));break;case"img":{const d=u.getAttribute("src")||"",p=u.getAttribute("alt")||"";let v=d;if(t)if(d.startsWith("./"))v=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const g=t.substring(0,t.lastIndexOf("/"));v=d.replace(/^\.\.\//,g+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(v=`${t}/${d}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:v}),n.push({type:"image",url:v,alt:p,children:[{text:""}]});break}case"iframe":{const d=u.getAttribute("src")||"",p=u.getAttribute("width")||"100%",v=u.getAttribute("height")||"400",g=u.getAttribute("frameborder")||"0",x=u.getAttribute("title")||"";let w=d;if(t)if(d.startsWith("./"))w=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));w=d.replace(/^\.\.\//,C+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(w=`${t}/${d}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:w}),n.push({type:"iframe",src:w,width:p,height:v,frameborder:g,title:x,children:[{text:""}]});break}case"latex-inline":{const d=ls(u.getAttribute("data-formula"));n.push({type:"latex-inline",formula:d,children:[{text:""}]});break}case"latex-block":{const d=ls(u.getAttribute("data-formula"));n.push({type:"latex-block",formula:d,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:_r(u)});break;default:n.push({type:"paragraph",children:_r(u,t)});break}}else a.nodeType===Node.TEXT_NODE&&((c=a.textContent)!=null&&c.trim())&&n.push({type:"paragraph",children:[{text:a.textContent}]})}),n))(r,e.childNodes),r}function _r(e,t){const r=[];function n(a){const c=[];let u="",f=!1,d=!1,p=0;for(;p<a.length;)a.startsWith("**",p)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),f=!f,p+=2):a.startsWith("*",p)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),d=!d,p+=1):(u+=a[p],p+=1);return u&&c.push({text:u,code:!0,bold:f,italic:d}),c}function o(a,c={}){var u,f;if(a.nodeType===Node.TEXT_NODE){const d=(u=a.textContent)==null?void 0:u.trim();return d?c.code?n(d):[{text:d,...c}]:[]}if(a.nodeType===Node.ELEMENT_NODE){const d=a,p={...c};switch(d.tagName.toLowerCase()){case"em":case"i":p.italic=!0;break;case"strong":case"b":p.bold=!0;break;case"code":d.closest("pre")||(p.code=!0);break;case"del":case"s":p.strikethrough=!0;break;case"u":p.underline=!0;break;case"a":p.link=d.getAttribute("href")||void 0;break;case"retrive-tag":{const g={};for(const{name:x,value:w}of Array.from(d.attributes))g[x]=w;return[{text:d.textContent||""||"[0]",retrive:!0,...g}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:d.getAttribute("id")||"",children:[{text:""}]}];case"img":{const g=d.getAttribute("src")||"",x=d.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:g,alt:x,basePath:t});let w=g;if(t)if(g.startsWith("./"))w=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));w=g.replace(/^\.\.\//,C+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(w=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:w}),[{type:"image",url:w,alt:x,children:[{text:""}]}]}case"iframe":{const g=d.getAttribute("src")||"",x=d.getAttribute("width")||"100%",w=d.getAttribute("height")||"400",C=d.getAttribute("frameborder")||"0",m=d.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:g,width:x,height:w,basePath:t});let E=g;if(t)if(g.startsWith("./"))E=g.replace(/^\.\//,t+"/");else if(g.startsWith("../")){const N=t.substring(0,t.lastIndexOf("/"));E=g.replace(/^\.\.\//,N+"/")}else!g.startsWith("/")&&!g.startsWith("http")&&(E=`${t}/${g}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:g,processedSrc:E}),[{type:"iframe",src:E,width:x,height:w,frameborder:C,title:m,children:[{text:""}]}]}case"latex-inline":return[{type:"latex-inline",formula:ls(d.getAttribute("data-formula")),children:[{text:""}]}];case"latex-block":return[{type:"latex-block",formula:ls(d.getAttribute("data-formula")),children:[{text:""}]}]}if(d.childNodes.length===0&&((f=d.textContent)!=null&&f.trim()))return p.code?n(d.textContent):[{text:d.textContent,...p}];let v=[];for(const g of Array.from(d.childNodes))v=v.concat(o(g,p));return v}return[]}for(const a of Array.from(e.childNodes))r.push(...o(a));return r}function cw(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:_r(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(c=>({type:"table-cell",header:!1,children:_r(c)}))})}))}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:_r(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:_r(a)}))})})}return{type:"table",children:t}}const dw=Ke.div.attrs({className:"unified-rich-text-container"})`
747
+ border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
748
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
749
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
750
+ min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
751
+ overflow: hidden;
752
+ transition: all 0.2s ease-in-out;
753
+ padding-top: 14px;
754
+ ${e=>{var t,r;return e.$isEditing&&`
755
+ &:focus-within {
756
+ border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
757
+ box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
758
+ }
759
+ `}}
760
+ `,Xl=Ke.div.attrs({className:"unified-rich-text-editable-container"})`
761
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
762
+ min-height: inherit;
763
+ outline: none;
764
+
765
+ & > * + * {
766
+ margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
767
+ }
768
+ `,Lh=(e,t)=>t<0?e:`${e.slice(0,t)}\\${e.slice(t)}`,Kh=(e,t)=>{if(!e)return-1;const r=t.length;let n=-1;for(let o=0;o<e.length;o++){if(e[o]==="\\"){o+=1;continue}if(r===2){if(e.startsWith("$$",o)){n===-1?n=o:n=-1,o+=1;continue}}else if(r===1&&e[o]==="$"){if(e[o+1]==="$"){o+=1;continue}n===-1?n=o:n=-1}}return n},fw=e=>{const t=e||"";if(!t)return{content:"",hasPendingLatex:!1};let r=t,n=!1;const o=[],a=Kh(t,"$$");a!==-1&&(r=Lh(r,a),o.push(a),n=!0);const c=Kh(t,"$");if(c!==-1){const u=o.filter(f=>f<=c).length;r=Lh(r,c+u),n=!0}return{content:r,hasPendingLatex:n}};var Ua=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(Ua||{});const As=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:o="sm",theme:a={},onChange:c,onFocus:u,onBlur:f,renderElement:d,renderLeaf:p,onRetriveTagClick:v,eventsEmit:g,onEditorReady:x,extraProps:w={},className:C,style:m,styles:E,enableTemplateInput:N=!1,disabledTags:B=[]})=>{const $=us(),A=vt(()=>{var ue,Fe,G,ve,de,re,he,we,be;return{primaryColor:((ue=$==null?void 0:$.colors)==null?void 0:ue.primary)||(a==null?void 0:a.primaryColor)||"#007bff",secondaryColor:((Fe=$==null?void 0:$.colors)==null?void 0:Fe.secondary)||(a==null?void 0:a.secondaryColor)||"#6c757d",backgroundColor:((G=$==null?void 0:$.colors)==null?void 0:G.background)||(a==null?void 0:a.backgroundColor)||"transparent",textColor:((ve=$==null?void 0:$.colors)==null?void 0:ve.text)||(a==null?void 0:a.textColor)||"#24292f",borderColor:((de=$==null?void 0:$.colors)==null?void 0:de.border)||(a==null?void 0:a.borderColor)||"#dee2e6",disabledBackground:((re=$==null?void 0:$.colors)==null?void 0:re.disabledBackground)||(a==null?void 0:a.disabledBackground)||"#f8f9fa",hoverBackground:(a==null?void 0:a.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((he=$==null?void 0:$.space)==null?void 0:he.radius)||(a==null?void 0:a.borderRadius)||"4px",padding:((we=$==null?void 0:$.space)==null?void 0:we.padding)||(a==null?void 0:a.padding)||"0rem 1rem",margin:((be=$==null?void 0:$.space)==null?void 0:be.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}},[$,a,o]),_=Yt();if(!_.current){const ue=q7(),Fe=oy(ue),{isInline:G}=Fe;Fe.isInline=re=>!B.includes("template")&&re.type==="template"?!0:G(re);const{isVoid:ve}=Fe;Fe.isVoid=re=>!B.includes("template")&&re.type==="template"?!0:ve(re);const de=re=>{if(!(N&&!B.includes("template")))return re;const{insertText:he,insertData:we}=re,be=()=>{const Ee=/<template>([^<]*)<\/template>/g,De=Array.from(M.nodes(re,{match:Ae=>ct.isText(Ae)&&Ee.test(Ae.text)}));if(De.length!==0)for(const Ae of De){const[Me,je]=Ae,Ve=Me.text||"",ht=[];let it=0,Te;for(Ee.lastIndex=0;(Te=Ee.exec(Ve))!==null;){if(Te.index>it){const Ie=Ve.slice(it,Te.index);Ie&&ht.push({text:Ie})}ht.push({type:"template",placeholder:(Te[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),it=Te.index+Te[0].length}if(it<Ve.length){const Ie=Ve.slice(it);Ie&&ht.push({text:Ie})}Le.removeNodes(re,{at:je}),Le.insertNodes(re,ht,{at:je})}};return re.insertText=Ee=>{he(Ee),be()},re.insertData=Ee=>{const De=Ee.getData("text/plain");if(De&&/<template>[\s\S]*?<\/template>/.test(De)){he(De),be();return}return we(Ee)},re};_.current=de(Fe)}const P=_.current;Jt(()=>{P&&x&&t&&x(P)},[P,x,t]);const[q,O]=At(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[V,L]=At(0);Jt(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const ue=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",ue),O(ue),L(Fe=>Fe+1)}},[e.type,e.content]);const Z=Yt(void 0),Y=vt(()=>{if(e.type!=="markdown")return{content:"",hasPendingLatex:!1};const ue=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");return fw(ue)},[e.type,e.content]);Jt(()=>{if(e.type!=="markdown")return;const ue=Y.content;Z.current!==ue&&(Z.current=ue,L(Fe=>Fe+1))},[e.type,Y.content]);const j=vt(()=>e.type!=="markdown"?w:{...w||{},hasPendingLatex:Y.hasPendingLatex},[w,e.type,Y.hasPendingLatex]),K=Yt("");Jt(()=>{if(e.type!=="markdown")return;const ue=JSON.stringify(j||{});ue!==K.current&&(K.current=ue,L(Fe=>Fe+1))},[j,e.type]);const U=St(ue=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",ue),ue&&Array.isArray(ue)?(O(ue),c==null||c(ue,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",ue)},[c]),X=vt(()=>{const ue=A==null?void 0:A.baseFontSize;return typeof ue=="number"&&!Number.isNaN(ue)?ue:o==="md"?14:12},[A,o]),ee=St(ue=>{const Fe={...ue,size:o,styles:E,eventsEmit:g,extraProps:j};return d?d(Fe):aw(Fe)},[d,o,E,g,j]),R=St(ue=>{const Fe={...ue,styles:E,onRetriveTagClick:v};return p?p(Fe):iw(Fe)},[p,E,v]);Jt(()=>(window.copyCodeFromData=ue=>{const Fe=ue.getAttribute("data-code");if(!Fe){console.error("No code content found");return}const G=Fe.replace(/\\n/g,`
769
+ `).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/&quot;/g,'"');navigator.clipboard.writeText(G).then(()=>{const ve=ue.innerHTML;ue.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>',ue.classList.add("copied"),setTimeout(()=>{ue.innerHTML=ve,ue.classList.remove("copied")},2e3)}).catch(ve=>{console.error("\u590D\u5236\u5931\u8D25:",ve);const de=ue.innerHTML;ue.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>',ue.style.background="#d73a49",ue.style.borderColor="#d73a49",ue.style.color="white",setTimeout(()=>{ue.innerHTML=de,ue.style.background="",ue.style.borderColor="",ue.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const se=vt(()=>{var ue,Fe;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(ue=Y.content)==null?void 0:ue.length,basePath:n,hasImages:(Fe=Y.content)==null?void 0:Fe.includes("![")});const G=Cm(Y.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:G.length,hasImageElements:G.some(be=>be.type==="image"),imageElements:G.filter(be=>be.type==="image")}),G&&G.length>0)return H.jsx(Ul,{theme:A,$size:o,children:H.jsx(Il,{editor:P,initialValue:G,onChange:()=>{},children:H.jsx(Xl,{theme:A,children:H.jsx(zl,{renderElement:ee,renderLeaf:R,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${X}px`}})})},V)});const ve={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let de=ar(Y.content||"",ve);de=de.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),de=de.replace(/<\/table>/g,"</table></div>"),de=de.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(be,Ee,De)=>{const Ae=De.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,"&quot;");return`<pre><code${Ee}>${De}</code><button class="code-copy-btn" data-code="${Ae}" 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 re=(A==null?void 0:A.disabledBackground)||(A==null?void 0:A.backgroundColor)||"#ffffff",he=(be,Ee)=>be.startsWith("#")?`${be}${Math.round(Ee*255).toString(16).padStart(2,"0")}`:be,we=`
770
+ <style>
771
+ .table-container{ overflow:auto; border:1px solid ${(A==null?void 0:A.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(A==null?void 0:A.backgroundColor)||"transparent"} !important; }
772
+ .table-container table{ background:${(A==null?void 0:A.backgroundColor)||"transparent"} !important; color:${(A==null?void 0:A.textColor)||"#24292f"} !important; }
773
+ .table-container th{ background:${(A==null?void 0:A.disabledBackground)||"#f6f8fa"} !important; color:${(A==null?void 0:A.textColor)||"#24292f"} !important; }
774
+ .table-container td{ color:${(A==null?void 0:A.textColor)||"#24292f"} !important; background:${(A==null?void 0:A.backgroundColor)||"transparent"} !important; }
775
+ .table-container tr:nth-child(even) td{ background:${(A==null?void 0:A.disabledBackground)||"#f6f8fa"} !important; }
776
+ pre{ position:relative; background:${re}; border:1px solid ${(A==null?void 0:A.borderColor)||"#e5e7eb"}; border-radius:6px; padding:12px 36px 12px 12px; color:${(A==null?void 0:A.textColor)||"#e5e7eb"}; }
777
+ pre::before{ content:''; position:absolute; inset:0; border-radius:6px; pointer-events:none; background: linear-gradient(90deg, ${he("#22c55e",.25)}, ${he("#f59e0b",.25)}, ${he("#ef4444",.25)}); opacity: .45; mix-blend-mode: overlay; }
778
+ pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(A==null?void 0:A.borderColor)||"#e5e7eb"}; color:${(A==null?void 0:A.textColor)||"#24292f"}; border-radius:6px; padding:2px 6px; cursor:pointer; }
779
+ pre .code-copy-btn:hover{ background:${(A==null?void 0:A.hoverBackground)||"rgba(0,0,0,0.06)"}; }
780
+ </style>
781
+ `;return H.jsx("div",{style:{padding:(A==null?void 0:A.padding)||"1rem",fontSize:`${X}px`,lineHeight:1.6,color:(A==null?void 0:A.textColor)||"#24292f"},"data-pending-latex":Y.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:we+de}})}catch(G){return console.error("Markdown parsing error:",G),H.jsx("div",{children:e.content})}},[e,A,P,V,ee,R,X,Y]),ye=vt(()=>e.type!=="html"?null:H.jsx("div",{style:{padding:(A==null?void 0:A.padding)||"1rem",fontSize:`${X}px`,lineHeight:1.6,color:(A==null?void 0:A.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,A,X]),Ce=vt(()=>e.type!=="text"?null:H.jsx("div",{style:{padding:(A==null?void 0:A.padding)||"1rem",fontSize:`${X}px`,lineHeight:1.6,color:(A==null?void 0:A.textColor)||"#24292f"},children:H.jsx("span",{children:e.content||""})}),[e,A,X]),Se=()=>{switch(e.type){case"markdown":return se;case"html":return ye;case"text":return Ce;case"slate":default:return t?H.jsx(Ul,{theme:A,$size:o,children:H.jsx(Il,{editor:P,initialValue:q,onChange:U,children:H.jsx(Xl,{theme:A,children:H.jsx(zl,{renderElement:ee,renderLeaf:R,placeholder:r,readOnly:!1,onFocus:u,onBlur:f,style:{minHeight:"inherit",outline:"none",fontSize:`${X}px`}})})},V)}):H.jsx(Ul,{theme:A,$size:o,children:H.jsx(Il,{editor:P,initialValue:q,onChange:()=>{},children:H.jsx(Xl,{theme:A,children:H.jsx(zl,{renderElement:ee,renderLeaf:R,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${X}px`}})})},V)})}};return H.jsx(dw,{theme:A,$isEditing:t,className:C,style:m,children:Se()})};var q0={exports:{}},hw=q0.exports,Hh;function pw(){return Hh||(Hh=1,(function(e,t){(function(r,n){e.exports=n()})(hw,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",c="second",u="minute",f="hour",d="day",p="week",v="month",g="quarter",x="year",w="date",C="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|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,N={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(j){var K=["th","st","nd","rd"],U=j%100;return"["+j+(K[(U-20)%10]||K[U]||K[0])+"]"}},B=function(j,K,U){var X=String(j);return!X||X.length>=K?j:""+Array(K+1-X.length).join(U)+j},$={s:B,z:function(j){var K=-j.utcOffset(),U=Math.abs(K),X=Math.floor(U/60),ee=U%60;return(K<=0?"+":"-")+B(X,2,"0")+":"+B(ee,2,"0")},m:function j(K,U){if(K.date()<U.date())return-j(U,K);var X=12*(U.year()-K.year())+(U.month()-K.month()),ee=K.clone().add(X,v),R=U-ee<0,se=K.clone().add(X+(R?-1:1),v);return+(-(X+(U-ee)/(R?ee-se:se-ee))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:v,y:x,w:p,d,D:w,h:f,m:u,s:c,ms:a,Q:g}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},A="en",_={};_[A]=N;var P="$isDayjsObject",q=function(j){return j instanceof Z||!(!j||!j[P])},O=function j(K,U,X){var ee;if(!K)return A;if(typeof K=="string"){var R=K.toLowerCase();_[R]&&(ee=R),U&&(_[R]=U,ee=R);var se=K.split("-");if(!ee&&se.length>1)return j(se[0])}else{var ye=K.name;_[ye]=K,ee=ye}return!X&&ee&&(A=ee),ee||!X&&A},V=function(j,K){if(q(j))return j.clone();var U=typeof K=="object"?K:{};return U.date=j,U.args=arguments,new Z(U)},L=$;L.l=O,L.i=q,L.w=function(j,K){return V(j,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var Z=(function(){function j(U){this.$L=O(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[P]=!0}var K=j.prototype;return K.parse=function(U){this.$d=(function(X){var ee=X.date,R=X.utc;if(ee===null)return new Date(NaN);if(L.u(ee))return new Date;if(ee instanceof Date)return new Date(ee);if(typeof ee=="string"&&!/Z$/i.test(ee)){var se=ee.match(m);if(se){var ye=se[2]-1||0,Ce=(se[7]||"0").substring(0,3);return R?new Date(Date.UTC(se[1],ye,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ce)):new Date(se[1],ye,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ce)}}return new Date(ee)})(U),this.init()},K.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},K.$utils=function(){return L},K.isValid=function(){return this.$d.toString()!==C},K.isSame=function(U,X){var ee=V(U);return this.startOf(X)<=ee&&ee<=this.endOf(X)},K.isAfter=function(U,X){return V(U)<this.startOf(X)},K.isBefore=function(U,X){return this.endOf(X)<V(U)},K.$g=function(U,X,ee){return L.u(U)?this[X]:this.set(ee,U)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(U,X){var ee=this,R=!!L.u(X)||X,se=L.p(U),ye=function(re,he){var we=L.w(ee.$u?Date.UTC(ee.$y,he,re):new Date(ee.$y,he,re),ee);return R?we:we.endOf(d)},Ce=function(re,he){return L.w(ee.toDate()[re].apply(ee.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(he)),ee)},Se=this.$W,ue=this.$M,Fe=this.$D,G="set"+(this.$u?"UTC":"");switch(se){case x:return R?ye(1,0):ye(31,11);case v:return R?ye(1,ue):ye(0,ue+1);case p:var ve=this.$locale().weekStart||0,de=(Se<ve?Se+7:Se)-ve;return ye(R?Fe-de:Fe+(6-de),ue);case d:case w:return Ce(G+"Hours",0);case f:return Ce(G+"Minutes",1);case u:return Ce(G+"Seconds",2);case c:return Ce(G+"Milliseconds",3);default:return this.clone()}},K.endOf=function(U){return this.startOf(U,!1)},K.$set=function(U,X){var ee,R=L.p(U),se="set"+(this.$u?"UTC":""),ye=(ee={},ee[d]=se+"Date",ee[w]=se+"Date",ee[v]=se+"Month",ee[x]=se+"FullYear",ee[f]=se+"Hours",ee[u]=se+"Minutes",ee[c]=se+"Seconds",ee[a]=se+"Milliseconds",ee)[R],Ce=R===d?this.$D+(X-this.$W):X;if(R===v||R===x){var Se=this.clone().set(w,1);Se.$d[ye](Ce),Se.init(),this.$d=Se.set(w,Math.min(this.$D,Se.daysInMonth())).$d}else ye&&this.$d[ye](Ce);return this.init(),this},K.set=function(U,X){return this.clone().$set(U,X)},K.get=function(U){return this[L.p(U)]()},K.add=function(U,X){var ee,R=this;U=Number(U);var se=L.p(X),ye=function(ue){var Fe=V(R);return L.w(Fe.date(Fe.date()+Math.round(ue*U)),R)};if(se===v)return this.set(v,this.$M+U);if(se===x)return this.set(x,this.$y+U);if(se===d)return ye(1);if(se===p)return ye(7);var Ce=(ee={},ee[u]=n,ee[f]=o,ee[c]=r,ee)[se]||1,Se=this.$d.getTime()+U*Ce;return L.w(Se,this)},K.subtract=function(U,X){return this.add(-1*U,X)},K.format=function(U){var X=this,ee=this.$locale();if(!this.isValid())return ee.invalidDate||C;var R=U||"YYYY-MM-DDTHH:mm:ssZ",se=L.z(this),ye=this.$H,Ce=this.$m,Se=this.$M,ue=ee.weekdays,Fe=ee.months,G=ee.meridiem,ve=function(he,we,be,Ee){return he&&(he[we]||he(X,R))||be[we].slice(0,Ee)},de=function(he){return L.s(ye%12||12,he,"0")},re=G||function(he,we,be){var Ee=he<12?"AM":"PM";return be?Ee.toLowerCase():Ee};return R.replace(E,(function(he,we){return we||(function(be){switch(be){case"YY":return String(X.$y).slice(-2);case"YYYY":return L.s(X.$y,4,"0");case"M":return Se+1;case"MM":return L.s(Se+1,2,"0");case"MMM":return ve(ee.monthsShort,Se,Fe,3);case"MMMM":return ve(Fe,Se);case"D":return X.$D;case"DD":return L.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ve(ee.weekdaysMin,X.$W,ue,2);case"ddd":return ve(ee.weekdaysShort,X.$W,ue,3);case"dddd":return ue[X.$W];case"H":return String(ye);case"HH":return L.s(ye,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return re(ye,Ce,!0);case"A":return re(ye,Ce,!1);case"m":return String(Ce);case"mm":return L.s(Ce,2,"0");case"s":return String(X.$s);case"ss":return L.s(X.$s,2,"0");case"SSS":return L.s(X.$ms,3,"0");case"Z":return se}return null})(he)||se.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(U,X,ee){var R,se=this,ye=L.p(X),Ce=V(U),Se=(Ce.utcOffset()-this.utcOffset())*n,ue=this-Ce,Fe=function(){return L.m(se,Ce)};switch(ye){case x:R=Fe()/12;break;case v:R=Fe();break;case g:R=Fe()/3;break;case p:R=(ue-Se)/6048e5;break;case d:R=(ue-Se)/864e5;break;case f:R=ue/o;break;case u:R=ue/n;break;case c:R=ue/r;break;default:R=ue}return ee?R:L.a(R)},K.daysInMonth=function(){return this.endOf(v).$D},K.$locale=function(){return _[this.$L]},K.locale=function(U,X){if(!U)return this.$L;var ee=this.clone(),R=O(U,X,!0);return R&&(ee.$L=R),ee},K.clone=function(){return L.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},j})(),Y=Z.prototype;return V.prototype=Y,[["$ms",a],["$s",c],["$m",u],["$H",f],["$W",d],["$M",v],["$y",x],["$D",w]].forEach((function(j){Y[j[1]]=function(K){return this.$g(K,j[0],j[1])}})),V.extend=function(j,K){return j.$i||(j(K,Z,V),j.$i=!0),V},V.locale=O,V.isDayjs=q,V.unix=function(j){return V(1e3*j)},V.en=_[A],V.Ls=_,V.p={},V}))})(q0)),q0.exports}var mw=pw();const gw=hs(mw);/**
782
+ * @license lucide-react v0.456.0 - ISC
783
+ *
784
+ * This source code is licensed under the ISC license.
785
+ * See the LICENSE file in the root directory of this source tree.
786
+ */const vw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dm=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
787
+ * @license lucide-react v0.456.0 - ISC
788
+ *
789
+ * This source code is licensed under the ISC license.
790
+ * See the LICENSE file in the root directory of this source tree.
791
+ */var bw={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"};/**
792
+ * @license lucide-react v0.456.0 - ISC
793
+ *
794
+ * This source code is licensed under the ISC license.
795
+ * See the LICENSE file in the root directory of this source tree.
796
+ */const yw=Xa(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:c,...u},f)=>Ki("svg",{ref:f,...bw,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Dm("lucide",o),...u},[...c.map(([d,p])=>Ki(d,p)),...Array.isArray(a)?a:[a]]));/**
797
+ * @license lucide-react v0.456.0 - ISC
798
+ *
799
+ * This source code is licensed under the ISC license.
800
+ * See the LICENSE file in the root directory of this source tree.
801
+ */const zr=(e,t)=>{const r=Xa(({className:n,...o},a)=>Ki(yw,{ref:a,iconNode:t,className:Dm(`lucide-${vw(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
802
+ * @license lucide-react v0.456.0 - ISC
803
+ *
804
+ * This source code is licensed under the ISC license.
805
+ * See the LICENSE file in the root directory of this source tree.
806
+ */const Ea=zr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
807
+ * @license lucide-react v0.456.0 - ISC
808
+ *
809
+ * This source code is licensed under the ISC license.
810
+ * See the LICENSE file in the root directory of this source tree.
811
+ */const xw=zr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
812
+ * @license lucide-react v0.456.0 - ISC
813
+ *
814
+ * This source code is licensed under the ISC license.
815
+ * See the LICENSE file in the root directory of this source tree.
816
+ */const Sa=zr("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
817
+ * @license lucide-react v0.456.0 - ISC
818
+ *
819
+ * This source code is licensed under the ISC license.
820
+ * See the LICENSE file in the root directory of this source tree.
821
+ */zr("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
822
+ * @license lucide-react v0.456.0 - ISC
823
+ *
824
+ * This source code is licensed under the ISC license.
825
+ * See the LICENSE file in the root directory of this source tree.
826
+ */const ww=zr("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"}]]);/**
827
+ * @license lucide-react v0.456.0 - ISC
828
+ *
829
+ * This source code is licensed under the ISC license.
830
+ * See the LICENSE file in the root directory of this source tree.
831
+ */const Cw=zr("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"}]]);/**
832
+ * @license lucide-react v0.456.0 - ISC
833
+ *
834
+ * This source code is licensed under the ISC license.
835
+ * See the LICENSE file in the root directory of this source tree.
836
+ */const Dw=zr("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"}]]);/**
837
+ * @license lucide-react v0.456.0 - ISC
838
+ *
839
+ * This source code is licensed under the ISC license.
840
+ * See the LICENSE file in the root directory of this source tree.
841
+ */const kw=zr("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"}]]);/**
842
+ * @license lucide-react v0.456.0 - ISC
843
+ *
844
+ * This source code is licensed under the ISC license.
845
+ * See the LICENSE file in the root directory of this source tree.
846
+ */const Ew=zr("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"}]]);/**
847
+ * @license lucide-react v0.456.0 - ISC
848
+ *
849
+ * This source code is licensed under the ISC license.
850
+ * See the LICENSE file in the root directory of this source tree.
851
+ */zr("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
852
+ * @license lucide-react v0.456.0 - ISC
853
+ *
854
+ * This source code is licensed under the ISC license.
855
+ * See the LICENSE file in the root directory of this source tree.
856
+ */const Sw=zr("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"}]]);/**
857
+ * @license lucide-react v0.456.0 - ISC
858
+ *
859
+ * This source code is licensed under the ISC license.
860
+ * See the LICENSE file in the root directory of this source tree.
861
+ */const Aw=zr("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
862
+ * @license lucide-react v0.456.0 - ISC
863
+ *
864
+ * This source code is licensed under the ISC license.
865
+ * See the LICENSE file in the root directory of this source tree.
866
+ */const Bw=zr("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"}]]);/**
867
+ * @license lucide-react v0.456.0 - ISC
868
+ *
869
+ * This source code is licensed under the ISC license.
870
+ * See the LICENSE file in the root directory of this source tree.
871
+ */zr("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
872
+ * @license lucide-react v0.456.0 - ISC
873
+ *
874
+ * This source code is licensed under the ISC license.
875
+ * See the LICENSE file in the root directory of this source tree.
876
+ */const Fw=zr("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"}]]);/**
877
+ * @license lucide-react v0.456.0 - ISC
878
+ *
879
+ * This source code is licensed under the ISC license.
880
+ * See the LICENSE file in the root directory of this source tree.
881
+ */const Nw=zr("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"}]]);/**
882
+ * @license lucide-react v0.456.0 - ISC
883
+ *
884
+ * This source code is licensed under the ISC license.
885
+ * See the LICENSE file in the root directory of this source tree.
886
+ */const Tw=zr("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"}]]);/**
887
+ * @license lucide-react v0.456.0 - ISC
888
+ *
889
+ * This source code is licensed under the ISC license.
890
+ * See the LICENSE file in the root directory of this source tree.
891
+ */const Mw=zr("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"}]]);/**
892
+ * @license lucide-react v0.456.0 - ISC
893
+ *
894
+ * This source code is licensed under the ISC license.
895
+ * See the LICENSE file in the root directory of this source tree.
896
+ */zr("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);const Yl=({src:e,index:t,token:r,url:n,eventsEmit:o,...a})=>{const[c,u]=At(""),f=async v=>{try{const g=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({convertedFilePath:v})});if(!g.ok)throw new Error(`Fetch failed: ${g.status}`);return{data:await g.arrayBuffer()}}catch{return null}},d=async v=>{const g=await f(v);if(!g)return;const x=new Blob([g.data]);return window.URL.createObjectURL(x)},p=async v=>{const g=await d(v);u(g||"")};return Jt(()=>{try{if(!r||!n){u(e);return}p(e)}catch{u(e)}},[e]),H.jsx(H.Fragment,{children:c&&H.jsx(b1,{src:c,...a,preview:!1,onClick:()=>o&&o("imageClick",c)},t||1)})},Ow=e=>S.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("g",{clipPath:"url(#clip0_5260_38039)"},S.createElement("path",{d:"M8.00004 14.6668C11.6819 14.6668 14.6667 11.6821 14.6667 8.00016C14.6667 4.31826 11.6819 1.3335 8.00004 1.3335C4.31814 1.3335 1.33337 4.31826 1.33337 8.00016C1.33337 11.6821 4.31814 14.6668 8.00004 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M6 7.99984L7.33333 9.33317L10 6.6665",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),S.createElement("defs",null,S.createElement("clipPath",{id:"clip0_5260_38039"},S.createElement("rect",{width:16,height:16,fill:"white"})))),Rw=e=>S.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M14.4867 12L9.15333 2.66665C9.03704 2.46146 8.8684 2.29078 8.66462 2.17203C8.46083 2.05329 8.22919 1.99072 7.99333 1.99072C7.75747 1.99072 7.52584 2.05329 7.32205 2.17203C7.11826 2.29078 6.94962 2.46146 6.83333 2.66665L1.5 12C1.38245 12.2036 1.32082 12.4346 1.32134 12.6697C1.32186 12.9047 1.38452 13.1355 1.50296 13.3385C1.62141 13.5416 1.79143 13.7097 1.9958 13.8259C2.20016 13.942 2.4316 14.0021 2.66667 14H13.3333C13.5673 13.9997 13.797 13.938 13.9995 13.8208C14.202 13.7037 14.3701 13.5354 14.487 13.3327C14.6039 13.1301 14.6654 12.9002 14.6653 12.6663C14.6652 12.4324 14.6036 12.2026 14.4867 12Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M8 6V8.66667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M8 11.3335H8.00667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),qh=e=>S.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("path",{d:"M14 7.99981C13.9999 9.26686 13.5988 10.5014 12.854 11.5264C12.1092 12.5515 11.059 13.3144 9.85392 13.7059C8.64886 14.0974 7.3508 14.0974 6.14576 13.7058C4.94073 13.3142 3.89059 12.5512 3.14584 11.5261C2.4011 10.5011 1.99999 9.26653 2 7.99947C2.00001 6.73241 2.40114 5.49788 3.14589 4.47281C3.89065 3.44773 4.9408 2.68474 6.14584 2.29319C7.35088 1.90164 8.64895 1.90162 9.854 2.29314",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),$w=e=>S.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},S.createElement("g",{clipPath:"url(#clip0_5260_38091)"},S.createElement("path",{d:"M7.99998 14.6668C11.6819 14.6668 14.6666 11.6821 14.6666 8.00016C14.6666 4.31826 11.6819 1.3335 7.99998 1.3335C4.31808 1.3335 1.33331 4.31826 1.33331 8.00016C1.33331 11.6821 4.31808 14.6668 7.99998 14.6668Z",fill:"#4E6EF2",stroke:"#4E6EF2",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M10 6L6 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),S.createElement("path",{d:"M6 6L10 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),S.createElement("defs",null,S.createElement("clipPath",{id:"clip0_5260_38091"},S.createElement("rect",{width:16,height:16,fill:"white"})))),Pw=Ke.div.attrs({className:"thought-chain-section-wrapper"})`
897
+ padding: 12px 0 8px 0;
898
+ `,zw=Ke.div.attrs({className:"thought-chain-section-title-row"})`
899
+ display: flex;
900
+ align-items: center;
901
+ gap: 8px;
902
+ margin-bottom: 8px;
903
+ padding-left: 20px;
904
+ `,Iw=vm`
905
+ from {
906
+ transform: rotate(0deg);
907
+ }
908
+ to {
909
+ transform: rotate(360deg);
910
+ }
911
+ `,jw=Ke.div.attrs({className:"thought-chain-section-icon"})`
912
+ width: 16px;
913
+ height: 16px;
914
+ flex-shrink: 0;
915
+ display: flex;
916
+ align-items: center;
917
+ justify-content: center;
918
+
919
+ svg {
920
+ width: 100%;
921
+ height: 100%;
922
+ ${({$isRotating:e})=>e?Ss`
923
+ animation: ${Iw} 2s linear infinite;
924
+ `:""}
925
+ }
926
+ `,_w=Ke.div.attrs({className:"thought-chain-section-title"})`
927
+ font-size: 14px;
928
+ font-weight: 600;
929
+ color: #111827;
930
+ display: flex;
931
+ align-items: center;
932
+ gap: 6px;
933
+ `;Ke.span.attrs({className:"thought-chain-section-time"})`
934
+ font-size: 12px;
935
+ font-weight: 400;
936
+ color: #6b7280;
937
+ `;const Lw=Ke.div.attrs({className:"thought-chain-vertical-line"})`
938
+ position: absolute;
939
+ left: 10px;
940
+ top: 0;
941
+ bottom: 0;
942
+ width: 2px;
943
+ background: #e5e7eb;
944
+ z-index: 0;
945
+ `,Kw=Ke.div.attrs({className:"thought-chain-content-container"})`
946
+ position: relative;
947
+ padding-left: 0px;
948
+ margin-left:18px
949
+ `,Hw=Ke.div.attrs({className:"thought-chain-node-item"})`
950
+ display: flex;
951
+ align-items: flex-start;
952
+ gap: 12px;
953
+ padding: 8px 0;
954
+ position: relative;
955
+ `,qw=Ke.div.attrs({className:"thought-chain-node-content-area"})`
956
+ flex: 1;
957
+ margin-left: 20px;
958
+ display: flex;
959
+ flex-direction: column;
960
+ gap: 4px;
961
+ `,Wh=Ke.div.attrs({className:"thought-chain-content-text-wrapper"})`
962
+ font-size: 13px;
963
+ line-height: 1.6;
964
+ color: #374151;
965
+ opacity: 0.7;
966
+ `,Ww=Ke.div.attrs({className:"thought-chain-loading-text"})`
967
+ font-size: 13px;
968
+ line-height: 1.6;
969
+ color: #9ca3af;
970
+ font-style: italic;
971
+ padding-left: 15px;
972
+ `;function Vw(e){switch(e){case 1:return{label:"\u8FD0\u884C\u4E2D",color:"#2563eb",icon:qh,isRotating:!0};case 2:return{label:"\u6267\u884C\u5B8C\u6210",color:"#16a34a",icon:Ow,isRotating:!1};case 3:return{label:"\u6267\u884C\u5931\u8D25",color:"#dc2626",icon:$w,isRotating:!1};case 4:return{label:"\u5F02\u5E38",color:"#f97316",icon:Rw,isRotating:!1};default:return{label:"\u672A\u77E5",color:"#9ca3af",icon:qh,isRotating:!1}}}const Gl=({title:e,content:t,nodes:r,mode:n="history"})=>{var f,d;if(!r||r.length===0)return null;const o=(f=r[0])==null?void 0:f.respTime;o&&o>0&&`${(o/1e3).toFixed(2)}`;const a=((d=r[0])==null?void 0:d.nodeStatus)??3,c=Vw(a),u=c.icon;return H.jsxs(Pw,{children:[H.jsxs(zw,{children:[H.jsx(jw,{$isRotating:c.isRotating,children:H.jsx(u,{})}),H.jsx(_w,{children:e})]}),H.jsxs(Kw,{children:[H.jsx(Lw,{}),r.map(p=>{var x,w,C,m;const v=((x=p==null?void 0:p.rawContent)==null?void 0:x.type)==="markdown"||(p==null?void 0:p.format)==="markdown"||((w=p.content)==null?void 0:w.includes("```"))||((C=p.content)==null?void 0:C.includes("**"))||((m=p.content)==null?void 0:m.includes("##")),g=p.nodeStatus===1&&!p.content;return H.jsx(Hw,{children:H.jsx(qw,{children:g?H.jsx(Ww,{children:"\u601D\u8003\u4E2D..."}):p.content&&(v?H.jsx(Wh,{children:H.jsx(As,{dataSource:{type:Ua.MARKDOWN,content:p.content},styles:{text:{fontSize:"14px",lineHeight:"1.6",color:"#374151"}},theme:{baseFontSize:14,minHeight:"auto"}})}):H.jsx(Wh,{className:"px-[15px]",children:p.content}))})},p.id)})]})]})};function Yo(e,t){const r={plan:{inProgress:"\u7406\u89E3\u89C4\u5212\u4E2D",completed:"\u7406\u89E3\u89C4\u5212\u5B8C\u6210"},retrieve:{inProgress:"\u53EC\u56DE\u4E2D",completed:"\u53EC\u56DE\u6210\u529F"},think:{inProgress:"\u6A21\u578B\u601D\u8003\u4E2D",completed:"\u6A21\u578B\u601D\u8003\u5B8C\u6210"},reason:{inProgress:"\u63A8\u7406\u4E2D",completed:"\u63A8\u7406\u5B8C\u6210"}}[e]||{inProgress:"",completed:""};switch(t){case 1:return r.inProgress;case 2:return r.completed;case 3:return`${r.completed}\uFF08\u5931\u8D25\uFF09`;case 4:return`${r.completed}\uFF08\u5F02\u5E38\uFF09`;default:return r.completed}}function Uw(e){return!Array.isArray(e)||e.length===0?[]:e.map((t,r)=>{var c;const n=t.businessType||"plan",o=t.nodeStatus||1,a=t.content||((c=t==null?void 0:t.reply)==null?void 0:c.content)||"";return{id:`${n}-${r}`,businessType:n,nodeStatus:o,title:Yo(n,o),content:a,rawContent:t,respTime:t.respTime??t.chainRespTime??void 0}})}function jC(e,t){var f,d,p;const r=t.businessType;if(!r)return e;const n=[...e],o=n.findIndex(v=>v.businessType===r),a=((f=t.reply)==null?void 0:f.content)??"",c=t.nodeStatus!==void 0&&t.nodeStatus!==null?t.nodeStatus:o!==-1?(d=n[o])==null?void 0:d.nodeStatus:1,u=t.respTime??t.chainRespTime??((p=n[o])==null?void 0:p.respTime);if(o===-1)n.push({id:`${r}-0`,businessType:r,nodeStatus:c,title:Yo(r,c),content:a,rawContent:t,respTime:u});else{const v=n[o];n[o]={...v,nodeStatus:c,title:Yo(r,c),content:v.content+a,respTime:u??v.respTime,rawContent:{...v.rawContent,lastChunk:t}}}return n}const Xw=Ke.div.attrs({className:"thought-chain-card-wrapper"})`
973
+ width: 100%;
974
+ border-radius: 8px;
975
+ background-color: #f9fafb;
976
+ padding: 12px 16px;
977
+ box-sizing: border-box;
978
+ `,Yw=Ke.div.attrs({className:"thought-chain-card-header"})`
979
+ display: flex;
980
+ align-items: center;
981
+ justify-content: space-between;
982
+ cursor: pointer;
983
+ padding: 4px 0;
984
+ `,Gw=Ke.div.attrs({className:"thought-chain-card-header-left"})`
985
+ display: flex;
986
+ align-items: center;
987
+ gap: 8px;
988
+ flex: 1;
989
+ `,Zw=vm`
990
+ from {
991
+ transform: rotate(0deg);
992
+ }
993
+ to {
994
+ transform: rotate(360deg);
995
+ }
996
+ `,Jw=Ke.div.attrs({className:"thought-chain-card-avatar"})`
997
+ width: 25px;
998
+ height: 25px;
999
+ border-radius: 9999px;
1000
+ display: flex;
1001
+ align-items: center;
1002
+ justify-content: center;
1003
+ flex-shrink: 0;
1004
+ overflow: hidden;
1005
+
1006
+ img {
1007
+ width: 80%;
1008
+ height: 80%;
1009
+ object-fit: contain;
1010
+ ${({$isRotating:e})=>e?Ss`
1011
+ animation: ${Zw} 2s linear infinite;
1012
+ `:""}
1013
+ }
1014
+ `,Qw=Ke.div.attrs({className:"thought-chain-card-header-title"})`
1015
+ display: flex;
1016
+ align-items: center;
1017
+ gap: 6px;
1018
+ `,eC=Ke.span.attrs({className:"thought-chain-card-header-main-text"})`
1019
+ font-size: 14px;
1020
+ font-weight: 600;
1021
+ color: #111827;
1022
+ `,tC=Ke.span.attrs({className:"thought-chain-card-header-sub-text"})`
1023
+ font-size: 14px;
1024
+ color: #6b7280;
1025
+ `,rC=Ke.div.attrs({className:"thought-chain-card-header-right"})`
1026
+ display: flex;
1027
+ align-items: center;
1028
+ flex-shrink: 0;
1029
+ `,nC=Ke.div.attrs({className:"thought-chain-card-body"})`
1030
+ margin-top: 12px;
1031
+ display: flex;
1032
+ flex-direction: column;
1033
+ gap: 0;
1034
+ `,oC=Ke.div.attrs({className:"thought-chain-card-empty-text"})`
1035
+ font-size: 12px;
1036
+ color: #9ca3af;
1037
+ `,aC=({nodes:e,mode:t="history",status:r,simpleThinkOnly:n=!1,chainRespTime:o})=>{const[a,c]=At(!1),u=vt(()=>{const x={};return(e||[]).forEach(w=>{x[w.businessType]||(x[w.businessType]=[]),x[w.businessType].push(w)}),x},[e]),f=vt(()=>typeof r=="number"?r===4:t==="live"?e.some(x=>x.nodeStatus===1):!1,[t,r,e]),d=vt(()=>!e||e.length===0?!1:t==="history"?e.every(x=>x.nodeStatus===2):e.every(x=>x.nodeStatus===2),[e,t]),p=vt(()=>f?"\u6B63\u5728\u601D\u8003\u4E2D":d?"\u601D\u8003\u5B8C\u6210":e&&e.length>0&&!d?"\u6B63\u5728\u601D\u8003\u4E2D":"",[f,d,e]);vt(()=>f?"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406":d?"\u672C\u6B21\u5BF9\u8BDD\u7684\u63A8\u7406\u8FC7\u7A0B\u56DE\u653E":"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406",[f,d]);const v=e&&e.length>0,g=vt(()=>!o||o<=0?"":`\xB7 ${(o/1e3).toFixed(2)} \u79D2`,[o]);return H.jsxs(Xw,{"data-mode":t,children:[H.jsxs(Yw,{onClick:()=>c(x=>!x),children:[H.jsxs(Gw,{children:[H.jsx(Jw,{$isRotating:f}),H.jsxs(Qw,{children:[H.jsx(eC,{children:p}),g&&d&&H.jsxs(tC,{children:["\u603B\u8BA1\u7528\u65F6",g]})]})]}),H.jsx(rC,{children:a?H.jsx(Ea,{size:18,color:"#6b7280"}):H.jsx(Sa,{size:18,color:"#6b7280"})})]}),!a&&H.jsxs(nC,{children:[!v&&H.jsx(oC,{children:"\u5F53\u524D\u4F1A\u8BDD\u672A\u8FD4\u56DE\u7ED3\u6784\u5316\u601D\u7EF4\u94FE\u6570\u636E\u3002"}),u.plan&&u.plan.length>0&&H.jsx(Gl,{title:Yo("plan",u.plan[0].nodeStatus),nodes:u.plan,mode:t}),u.retrieve&&u.retrieve.length>0&&H.jsx(Gl,{title:Yo("retrieve",u.retrieve[0].nodeStatus),nodes:u.retrieve,mode:t}),u.think&&u.think.length>0&&H.jsx(Gl,{title:Yo("think",u.think[0].nodeStatus),nodes:u.think,mode:t})]})]})},iC=({data:e,styles:t,onCategoryClick:r,onViewAllClick:n,className:o,style:a,showCategoryIcon:c=!0,renderCategoryIcon:u})=>{const f=(t==null?void 0:t.theme)||{},d=w=>{r==null||r(w)},p=()=>{e.viewAllPath&&(typeof e.viewAllPath=="function"?e.viewAllPath():window.open(e.viewAllPath,"_blank")),n==null||n()},v=w=>{const C=(w||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(C)?"rag/pic":C==="pdf"?"rag/pdf":["doc","docx"].includes(C)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(C)?"rag/excel":["ppt","pptx"].includes(C)?"rag/ppt":C==="txt"||C==="md"?"rag/txt":C==="csv"?"rag/csv":["zip","rar","7z"].includes(C)?"rag/zip":["odt","ods","odp","odf"].includes(C)?"rag/odf":C==="json"?"rag/json":"rag/file"},g=w=>{if(u)return u(w);if(c){if(w.itemType==="dir")return H.jsx(wo,{type:"rag/folder",size:16});if(w.itemType==="file"&&w.fileType){const C=v(w.fileType);return H.jsx(wo,{type:C,size:16})}return H.jsx(wo,{type:"rag/folder",size:16})}return null},x=e.categories.filter(w=>w.visible!==!1);return!x||x.length===0?null:H.jsxs(sC,{className:`knowledge-base-document-list ${o||""}`,style:a,$theme:f,children:[H.jsx(lC,{children:e.title}),e.subtitle&&H.jsxs(uC,{children:[e.subtitle," (\u5171",e.totalCount,"\u4E2A):"]}),H.jsx(cC,{children:x.map((w,C)=>H.jsxs(dC,{onClick:()=>d(w),$theme:f,children:[g(w),H.jsx(fC,{children:w.name}),w.itemType==="dir"&&H.jsxs(hC,{children:["(",w.documentCount,")"]})]},w.id||C))}),e.showViewAll!==!1&&H.jsx(pC,{onClick:p,$theme:f,children:e.viewAllText||"\u67E5\u770B\u5168\u90E8>>"})]})},sC=Ke.div.attrs({className:"knowledge-base-document-list-container"})`
1038
+ margin-bottom: 16px;
1039
+ padding: 16px;
1040
+ margin-left:25px;
1041
+
1042
+ background: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)||"#ffffff"}};
1043
+ border-radius: 8px;
1044
+ `,lC=Ke.h3.attrs({className:"knowledge-base-document-list-title"})`
1045
+ font-size: 18px;
1046
+ font-weight: 600;
1047
+ color: #1f2937;
1048
+ margin: 0 0 8px 0;
1049
+ `,uC=Ke.div.attrs({className:"knowledge-base-document-list-subtitle"})`
1050
+ font-size: 14px;
1051
+ color: #6b7280;
1052
+ margin-bottom: 12px;
1053
+ `,cC=Ke.div.attrs({className:"knowledge-base-document-list-category-list"})`
1054
+ display: flex;
1055
+ flex-direction: column;
1056
+ gap: 8px;
1057
+ margin-bottom: 12px;
1058
+ `,dC=Ke.div.attrs({className:"knowledge-base-document-list-category-item"})`
1059
+ display: flex;
1060
+ align-items: center;
1061
+ gap: 8px;
1062
+ padding: 8px 0;
1063
+ cursor: pointer;
1064
+ transition: all 0.2s ease;
1065
+
1066
+ &:hover {
1067
+ opacity: 0.8;
1068
+ }
1069
+ `,fC=Ke.span.attrs({className:"knowledge-base-document-list-category-name"})`
1070
+ font-size: 14px;
1071
+ color: #1f2937;
1072
+ `,hC=Ke.span.attrs({className:"knowledge-base-document-list-category-count"})`
1073
+ font-size: 14px;
1074
+ color: #6b7280;
1075
+ `,pC=Ke.a.attrs({className:"knowledge-base-document-list-view-all"})`
1076
+ display: inline-block;
1077
+ font-size: 14px;
1078
+ color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1079
+ text-decoration: none;
1080
+ cursor: pointer;
1081
+ transition: color 0.2s ease;
1082
+
1083
+ &:hover {
1084
+ color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#2563eb"}};
1085
+ text-decoration: underline;
1086
+ }
1087
+ `;function Zl(e,t,r=18){var c;const n=(e||"").toLowerCase(),o=((c=t==null?void 0:t.theme)==null?void 0:c.icons)||{},a=(u,f,d)=>{const p=[u,...d||[]];for(const v of p){const g=o[v];if(g){if(qe.isValidElement(g))return g;if(typeof g=="string")return H.jsx("img",{src:g,alt:v,style:{width:r,height:r}})}}return H.jsx(wo,{type:f,size:r})};return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(n)?a("image","rag/pic",["png","jpg","jpeg"]):n==="pdf"?a("pdf","rag/pdf"):["doc","docx"].includes(n)?a("docx","rag/word",["doc"]):["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(n)?a("sheets","rag/excel",["excel","xls","xlsx"]):n==="csv"?a("csv","rag/csv",["sheets","excel"]):["ppt","pptx"].includes(n)?a("pptx","rag/ppt",["ppt"]):n==="txt"||n==="md"?a("txt","rag/txt",["md"]):["zip","rar","7z"].includes(n)?a("archive","rag/zip",["zip","rar"]):["odt","ods","odp","odf"].includes(n)?a("odt","rag/odf"):["html","htm","url"].includes(n)?a("html","rag/url",["htm","url"]):n==="json"?a("json","rag/json"):H.jsx(wo,{type:"rag/file",size:r})}function jo(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(jo(r.children)));return t}function mC(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const a=n[1].split(";").map(c=>c.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(c=>c.trim()).filter(Boolean);t.push(...a)}return Array.from(new Set(t))}function Bi(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function gC(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 vC=Ke.div.attrs({className:"chat-message-container"})`
1088
+ display: flex;
1089
+ flex-direction: column;
1090
+ margin-bottom: 0.5rem;
1091
+ animation: fadeIn 0.3s ease-in-out;
1092
+ width: 100%;
1093
+ text-wrap: wrap;
1094
+
1095
+ ${e=>e.$align==="right"&&`
1096
+ align-items: flex-end;
1097
+ `}
1098
+
1099
+ ${e=>e.$align==="center"&&`
1100
+ align-items: center;
1101
+ `}
1102
+
1103
+ @keyframes fadeIn {
1104
+ from {
1105
+ opacity: 0;
1106
+ transform: translateY(10px);
1107
+ }
1108
+ to {
1109
+ opacity: 1;
1110
+ transform: translateY(0);
1111
+ }
1112
+ }
1113
+ `,bC=Ke.div.attrs({className:"chat-message-header"})`
1114
+ display: flex;
1115
+ align-items: center;
1116
+ gap: 0.25rem;
1117
+ margin-bottom: 0.5rem;
1118
+ width: 100%;
1119
+
1120
+ ${e=>e.$isUser&&`
1121
+ flex-direction: row-reverse;
1122
+ justify-content: end;
1123
+ `}
1124
+ `,yC=Ke.div.attrs({className:"chat-message-avatar"})`
1125
+ background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
1126
+ border-radius: 50%;
1127
+ width: 2rem;
1128
+ height: 2rem;
1129
+ flex-shrink: 0;
1130
+ display: flex;
1131
+ align-items: center;
1132
+ justify-content: center;
1133
+ font-size: 1rem;
1134
+ `,xC=Ke.div.attrs({className:"chat-message-content"})`
1135
+ width: 100%;
1136
+ .message-time {
1137
+ font-size: 0.75rem;
1138
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
1139
+ }
1140
+
1141
+ .message-card {
1142
+ background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
1143
+ border: 1px solid ${e=>(e.$isUser,"transparent")};
1144
+ border-radius: 0.5rem;
1145
+ padding-top: 12px;
1146
+ padding-bottom: 12px;
1147
+ overflow: hidden;
1148
+ max-width: ${e=>e.$isUser?"fit-content":"100%"};
1149
+ margin-left: ${e=>e.$isUser?"auto":"0"};
1150
+ margin-right: ${e=>e.$isUser?"40px":"0"};
1151
+ padding: 0.25rem 1.8rem;
1152
+ .message-text {
1153
+ width: 100%;
1154
+ line-height: 1.6;
1155
+ white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
1156
+ border-radius: 0.5rem;
1157
+ min-height: ${e=>e.$isUser?"auto":"40px"};
1158
+ font-size: 0.875rem;
1159
+
1160
+ /* 确保子元素也继承 white-space 属性 */
1161
+ & > * {
1162
+ white-space: pre-wrap !important;
1163
+ }
1164
+ }
1165
+ }
1166
+ `,wC=Ke.div.attrs({className:"chat-message-actions-container"})`
1167
+ margin-top: 0.5rem;
1168
+ display: flex;
1169
+ padding: 0.5rem;
1170
+ align-items: center;
1171
+
1172
+ gap: 0.75rem;
1173
+
1174
+ button {
1175
+ display: flex;
1176
+ align-items: center;
1177
+ gap: 0.25rem;
1178
+ font-size: 0.875rem;
1179
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
1180
+ background: none;
1181
+ border: none;
1182
+ cursor: pointer;
1183
+ transition: color 0.2s;
1184
+
1185
+ &:hover {
1186
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
1187
+ }
1188
+
1189
+ &.active {
1190
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
1191
+ }
1192
+ }
1193
+ `,CC=Ke.div.attrs({className:"chat-message-follow-up-container"})`
1194
+ margin-top: 1rem;
1195
+ padding: 0 2.9rem;
1196
+
1197
+ border-radius: 0.5rem;
1198
+
1199
+ @keyframes followUpIn {
1200
+ from {
1201
+ opacity: 0;
1202
+ transform: translateY(6px);
1203
+ }
1204
+ to {
1205
+ opacity: 1;
1206
+ transform: translateY(0);
1207
+ }
1208
+ }
1209
+
1210
+ .follow-up-title {
1211
+ font-size: 0.875rem;
1212
+ font-weight: 600;
1213
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
1214
+ margin-bottom: 0.75rem;
1215
+ }
1216
+
1217
+ .follow-up-list {
1218
+ display: flex;
1219
+ flex-direction: column;
1220
+ gap: 0.5rem;
1221
+ }
1222
+
1223
+ .follow-up-item {
1224
+ width: fit-content;
1225
+ background: #ffffff;
1226
+ border: 1px solid #e5e7eb;
1227
+ border-radius: 0.375rem;
1228
+ padding: 0.75rem 1rem;
1229
+ cursor: pointer;
1230
+ transition: all 0.2s ease;
1231
+ text-align: left;
1232
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
1233
+ font-size: 0.875rem;
1234
+ line-height: 1.4;
1235
+ opacity: 0;
1236
+ transform: translateY(6px);
1237
+ animation: followUpIn 280ms ease forwards;
1238
+ animation-play-state: running;
1239
+
1240
+ &:hover {
1241
+ background: #e5e7eb;
1242
+ border-color: #d1d5db;
1243
+ }
1244
+
1245
+ &:active {
1246
+ transform: translateY(1px);
1247
+ }
1248
+ }
1249
+ `,Fi=Ke.div.attrs({className:"chat-message-reference-container"})`
1250
+ padding: 1rem;
1251
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
1252
+
1253
+ border-radius: 0.5rem;
1254
+
1255
+ .reference-title {
1256
+ font-size: 0.875rem;
1257
+ font-weight: 600;
1258
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
1259
+ margin-bottom: 0.75rem;
1260
+ }
1261
+
1262
+ .reference-list {
1263
+ display: flex;
1264
+ flex-direction: column;
1265
+ gap: 0.5rem;
1266
+ }
1267
+
1268
+ .reference-item {
1269
+ background: #ffffff;
1270
+
1271
+ border-radius: 0.375rem;
1272
+ padding: 0.75rem 0;
1273
+ display: flex;
1274
+ align-items: center;
1275
+ gap: 0.5rem;
1276
+
1277
+ .file-icon {
1278
+ width: 2rem;
1279
+ height: 2rem;
1280
+ background: #e2e8f0;
1281
+ border-radius: 0.25rem;
1282
+ display: flex;
1283
+ align-items: center;
1284
+ justify-content: center;
1285
+ font-size: 0.75rem;
1286
+ color: #64748b;
1287
+ }
1288
+
1289
+ .file-info {
1290
+ flex: 1;
1291
+
1292
+ .file-name {
1293
+ font-size: 0.875rem;
1294
+ font-weight: 500;
1295
+ color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
1296
+ margin-bottom: 0.25rem;
1297
+ }
1298
+
1299
+ .file-meta {
1300
+ font-size: 0.75rem;
1301
+ color: #64748b;
1302
+ }
1303
+ }
1304
+
1305
+ .file-score {
1306
+ font-size: 0.75rem;
1307
+ color: #059669;
1308
+ font-weight: 500;
1309
+ }
1310
+ }
1311
+ `,DC=Ke.div.attrs({className:"chat-message-image-preview-modal"})`
1312
+ position: fixed;
1313
+ top: 0;
1314
+ left: 0;
1315
+ right: 0;
1316
+ bottom: 0;
1317
+ background: rgba(0, 0, 0, 0.8);
1318
+ display: ${e=>e.$show?"flex":"none"};
1319
+ align-items: center;
1320
+ justify-content: center;
1321
+ z-index: 1000;
1322
+ cursor: pointer;
1323
+
1324
+ .modal-content {
1325
+ max-width: 90vw;
1326
+ max-height: 90vh;
1327
+ position: relative;
1328
+ cursor: default;
1329
+ display: flex;
1330
+ flex-direction: column;
1331
+ align-items: center;
1332
+ }
1333
+
1334
+ .modal-image {
1335
+ max-width: 100%;
1336
+ max-height: calc(90vh - 60px);
1337
+ object-fit: contain;
1338
+ border-radius: 8px;
1339
+ }
1340
+
1341
+ .modal-close {
1342
+ margin-top: 16px;
1343
+ background: rgba(255, 255, 255, 0.3);
1344
+ border: none;
1345
+ border-radius: 20px;
1346
+ padding: 8px 20px;
1347
+ display: flex;
1348
+ align-items: center;
1349
+ justify-content: center;
1350
+ cursor: pointer;
1351
+ font-size: 14px;
1352
+ color: #333;
1353
+ font-weight: 500;
1354
+ transition: all 0.2s ease;
1355
+
1356
+ &:hover {
1357
+ background: rgba(255, 255, 255, 1);
1358
+ transform: translateY(-1px);
1359
+ }
1360
+ }
1361
+ `,Jl=Ke.div.attrs({className:"chat-message-image-gallery-container"})`
1362
+ padding: 0rem 0.5rem;
1363
+ background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
1364
+
1365
+ .gallery-grid {
1366
+ display: grid;
1367
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
1368
+ gap: 0.75rem;
1369
+ }
1370
+
1371
+ .gallery-item {
1372
+ position: relative;
1373
+ aspect-ratio: 1;
1374
+ border-radius: 0.375rem;
1375
+ overflow: hidden;
1376
+ cursor: pointer;
1377
+ transition:
1378
+ transform 0.2s ease,
1379
+ box-shadow 0.2s ease;
1380
+ border: 2px solid transparent;
1381
+
1382
+ &:hover {
1383
+ transform: translateY(-2px);
1384
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1385
+ border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
1386
+ }
1387
+
1388
+ .gallery-image {
1389
+ width: 100%;
1390
+ height: 100%;
1391
+ object-fit: cover;
1392
+ background: #f3f4f6;
1393
+ }
1394
+
1395
+ .gallery-overlay {
1396
+ position: absolute;
1397
+ bottom: 0;
1398
+ left: 0;
1399
+ right: 0;
1400
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
1401
+ color: white;
1402
+ padding: 0.5rem;
1403
+ font-size: 0.75rem;
1404
+ text-align: center;
1405
+ opacity: 0;
1406
+ transition: opacity 0.2s ease;
1407
+ }
1408
+
1409
+ &:hover .gallery-overlay {
1410
+ opacity: 1;
1411
+ }
1412
+ }
1413
+ `,_C=({token:e,streamUrl:t,is_download:r,content:n,contentType:o="plainText",align:a="left",displayStatus:c="ready",avatar:u,isUser:f=!1,userAvatar:d,aiAvatar:p,date:v,time:g,timestamp:x,showTime:w=!0,errorMessage:C,styles:m,reference:E,webReference:N,databaseReference:B,graphReference:$,filePaths:A,currentFiles:_,fileManagerData:P,audioUrl:q,feedbackResult:O,queryId:V,defaultAnswer:L,isWelcome:Z=!1,isLast:Y=!1,respTime:j,tokens:K,resultType:U,followUpQuestions:X=[],tools:ee={},eventsEmit:R,referenceMode:se="list",enableThoughtChain:ye=!1,thoughtChainVersionMode:Ce="auto",chain:Se,thoughtChainNodes:ue,knowledgeBases:Fe,enableCot:G,chainRespTime:ve,thoughtChainStatus:de})=>{Jt(()=>{console.log("isUser",f),console.log("isLast",Y)},[Y,f]);const re=us(),he=vt(()=>{var ie,Ne,ot,$e,ae,Ye,Ue,st,le,xe,me;return{colors:{primary:((ie=re==null?void 0:re.colors)==null?void 0:ie.primary)||"#3b82f6",background:((Ne=re==null?void 0:re.colors)==null?void 0:Ne.background)||"#ffffff",userBackground:((ot=re==null?void 0:re.colors)==null?void 0:ot.primary)||"#3b82f6",border:(($e=re==null?void 0:re.colors)==null?void 0:$e.border)||"#e5e7eb",text:((ae=re==null?void 0:re.colors)==null?void 0:ae.text)||"#374151",disabled:((Ye=re==null?void 0:re.colors)==null?void 0:Ye.disabled)||"#6b7280",info:((Ue=re==null?void 0:re.colors)==null?void 0:Ue.info)||"#3b82f6",warning:((st=re==null?void 0:re.colors)==null?void 0:st.warning)||"#f59e0b",error:((le=re==null?void 0:re.colors)==null?void 0:le.error)||"#ef4444",...(xe=m==null?void 0:m.theme)==null?void 0:xe.colors},icons:{aiAvatar:p||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(me=m==null?void 0:m.theme)==null?void 0:me.icons}}},[re,m,p,d]),we=vt(()=>{const ie=g||v||x;return!ie||!w?null:gw(ie).format("YY-MM-DD HH:mm:ss")},[g,v,x,w]),[be,Ee]=At([]),[De,Ae]=At(null),[Me,je]=At(!1),[Ve,ht]=At(!1),[it,Te]=At(!1),[Ie,Ze]=At(!1),[dt,at]=At(!1),et=(ie,Ne)=>{switch(console.log("handleImageClick",ie,Ne),ie){case"imageClick":Ae(Ne);break}},Tt=vt(()=>{if(!ye)return[];if(Ce==="v1")return[];if(Array.isArray(ue)&&ue.length)return ue;const ie=Se||(n==null?void 0:n.chain),Ne=Uw(ie);return G===0?Ne.filter(ot=>ot.businessType==="think"):Ne},[ye,Ce,ue,Se,n,G]),xt=()=>{if(ye&&Ce!=="v1")return null;const ie={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:C||"\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:H.jsx(wo,{type:"rag/think",size:16})}}[c]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},Ne=j?`(\u7528\u65F6 ${Math.round(j/1e3)} \u79D2)`:"";return H.jsx("div",{className:"think-header",children:H.jsx("div",{className:"think-header-left ml-[16px]",children:H.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-full",children:[H.jsx("div",{className:"think-icon",children:ie.icon}),H.jsx("div",{className:"think-title",children:ie.text}),Ne&&H.jsx("div",{className:"think-time",children:Ne}),Or&&H.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{at(!dt)},children:H.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:dt?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:H.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},yt=()=>{if(!ye||Ce==="v1"||f||!Tt.length)return null;const ie=de!==void 0?de===4?4:2:c==="ready"?2:1,Ne=G===0;return H.jsx("div",{className:"thought-chain-wrapper ml-[16px] mr-[16px] mt-2",children:H.jsx(aC,{mode:o==="stream"?"live":"history",nodes:Tt,status:ie,simpleThinkOnly:Ne,chainRespTime:ve})})},[pt,ze]=At([]),[ce,bt]=At(null),Pt=vt(()=>{try{if(!E)return[];let ie;if(typeof E=="string")ie=JSON.parse(E);else if(Array.isArray(E))ie=E;else if(typeof E=="object")ie=[E];else return[];return Array.isArray(ie)?ie:[]}catch(ie){return console.warn("\u89E3\u6790 rawReferenceList \u5931\u8D25:",ie,E),[]}},[E]),Vt=(ie,Ne)=>{var Ue,st,le;const ot=((Ue=ie==null?void 0:ie.metadata)==null?void 0:Ue.source)||(ie==null?void 0:ie.file_path)||(ie==null?void 0:ie.path)||(ie==null?void 0:ie.convertedFilePath)||(ie==null?void 0:ie.parsedFilePath)||"",$e=((st=ie==null?void 0:ie.metadata)==null?void 0:st.title)||(ie==null?void 0:ie.file_name)||"",ae=((le=ie==null?void 0:ie.metadata)==null?void 0:le.id)||(ie==null?void 0:ie.id)||(ie==null?void 0:ie.file_id)||"",Ye=Pt.find(xe=>{var Xt,Ot,ut;const me=((Xt=xe==null?void 0:xe.metadata)==null?void 0:Xt.source)||(xe==null?void 0:xe.file_path)||(xe==null?void 0:xe.path)||(xe==null?void 0:xe.convertedFilePath)||(xe==null?void 0:xe.parsedFilePath)||"",He=((Ot=xe==null?void 0:xe.metadata)==null?void 0:Ot.title)||(xe==null?void 0:xe.file_name)||"",lt=((ut=xe==null?void 0:xe.metadata)==null?void 0:ut.id)||(xe==null?void 0:xe.id)||"";return ae&&lt&&String(ae)===String(lt)||ot&&me&&me===ot||$e&&He&&He===$e});if(Ye){const xe=(Ye!=null&&Ye.references&&Array.isArray(Ye.references)?Ye.references:[Ye]).find(me=>String(me.order_num)===String(Ne)||String(me.id)===String(Ne));if(xe)return xe}for(const xe of Pt){if(xe!=null&&xe.references&&Array.isArray(xe.references)){const me=xe.references.find(He=>String(He.order_num)===String(Ne)||String(He.id)===String(Ne));if(me)return me}if(String(xe.order_num)===String(Ne)||String(xe.id)===String(Ne))return xe}return null},$t=(ie,Ne)=>{function ot(st,le){for(const xe of st){if(xe.references&&Array.isArray(xe.references)){const me=xe.references.find(He=>String(He.order_num)===String(le)||String(He.id)===String(le));if(me)return me}if(String(xe.order_num)===String(le)||String(xe.id)===String(le))return xe}return null}let $e=[];try{E&&($e=JSON.parse(E))}catch(st){console.error("Failed to parse reference:",st)}const ae=ot($e,ie.id),Ye=st=>{if(typeof n!="string")return;const le=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${st}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(le&&le[1]){const xe=Number(le[1]);return Number.isNaN(xe)?void 0:xe}},Ue={tagInfo:{id:ie==null?void 0:ie.id,index:Ye(String(ie==null?void 0:ie.id)),image_urls:(ie==null?void 0:ie.imageUrls)||(ie==null?void 0:ie.image_urls)||[]},fromtype:String((ie==null?void 0:ie.fromtype)??""),leaf:ie,attributes:Ne,referenceDoc:ae||void 0};if(String(ie==null?void 0:ie.fromtype)==="2"&&$)try{const st=JSON.parse($||"[]"),le=(Array.isArray(st)?st:[]).find(xe=>{if(Array.isArray(xe==null?void 0:xe.traceNodes))return xe.traceNodes.some(He=>String(He==null?void 0:He.id)===String(ie.id));const me=String(ie.id||"").split("_")[0];return String(xe==null?void 0:xe.id)===me});le&&(Ue.graph={id:le.id,graphName:le.graphName,fetchUrl:le.fetchUrl,cyphers:le.cyphers},Ue.traceNode=Array.isArray(le.traceNodes)?le.traceNodes.find(xe=>String(xe==null?void 0:xe.id)===String(ie.id)):void 0)}catch{}R==null||R("action_retrive_tag",Ue),R==null||R("retrive_tag:click",Ue)},ir=ie=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",ie),console.log("databaseReference available:",!!B),ie.id&&B){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",B);const Ne=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:ie.id,databaseReference:B}});console.log("Dispatching event:",Ne),window.dispatchEvent(Ne)}else console.log("Cannot send response - missing id or databaseReference")};qe.useEffect(()=>{const ie=Ne=>{ir(Ne.detail)};return window.addEventListener("retrieve-sql-data:request-data",ie),()=>{window.removeEventListener("retrieve-sql-data:request-data",ie)}},[B]),qe.useEffect(()=>{const ie=Ne=>{Ct(Ne.detail)};return window.addEventListener("rtext_pagination_click",ie),()=>{window.removeEventListener("rtext_pagination_click",ie)}},[ce]);const Ct=ie=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",ie),ie.replacePredataFunction&&ce){const Ne={...ce,rows:ce.rows};ie.replacePredataFunction(Ne)}R==null||R("rtext_pagination_click",ie)},Mt=Yt(new Map),nr=Yt(1),hr=Yt(""),Dt=Yt({0:1,1:1,2:1,3:1}),Kt=vt(()=>{if(typeof n=="string"){let ie=n;const Ne=[];return V&&V!==hr.current&&(Mt.current.clear(),nr.current=1,Dt.current={0:1,1:1,2:1,3:1},hr.current=V),o==="stream"&&(ie=ie.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(ot,$e)=>{const ae=$e.match(/id=['"]([^'"]+)['"]/),Ye=$e.match(/fromType=['"]([^'"]+)['"]/);if(ae){const Ue=ae[1],st=Ye?Ye[1]:"0";if(!Mt.current.has(Ue)){const xe=Dt.current,me=st==="1"?"1":st==="2"?"2":st==="3"?"3":"0",He=xe[me]??1;Mt.current.set(Ue,He),xe[me]=He+1,Dt.current=xe}const le=Mt.current.get(Ue);return`[retrive-tag${$e}][${le}][/retrive-tag]`}return ot})),ie=ie.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,ot=>{const $e=ot.match(/image_urls=['"]([^'"]+)['"]/);if($e){const ae=$e[1].split(";").map(Ye=>Ye.trim()).filter(Boolean);Ne.push(...ae)}return ot}),Ne.length>0&&Ee(Ne),ie}return n},[n,o,V]),Ut=vt(()=>{if(typeof Kt=="string")try{return Cm(Kt)}catch(ie){return console.error("Failed to deserialize markdown:",ie),[]}return[]},[Kt]),Fr=St(ie=>{if(!(!ie||typeof Kt!="string"))try{const Ne=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ie}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Kt);if(Ne&&Ne[1]){const ot=Number(Ne[1]);return Number.isNaN(ot)?Ne[1]:ot}}catch{}},[Kt]),Ir=vt(()=>gC(Ut||[]),[Ut]),jr=vt(()=>{const ie={};return Ir.forEach(Ne=>{Ne!=null&&Ne.id&&!ie[Ne.id]&&(ie[Ne.id]=Ne.index)}),ie},[Ir]);Jt(()=>{try{o==="stream"&&B&&(ie=>{try{const Ne=typeof ie=="string"?JSON.parse(ie):ie;return Ne?Array.isArray(Ne)?Ne:[Ne]:[]}catch{return[]}})(B).forEach(ie=>{const Ne=ie==null?void 0:ie.id;if(!Ne)return;const ot=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Ne,databaseReference:ie}});window.dispatchEvent(ot)})}catch{}},[o,B]);const Or=vt(()=>{if(!Array.isArray(Ut))return!1;const ie=ot=>{for(const $e of ot)if($e.type==="think"||Array.isArray($e.children)&&ie($e.children))return!0;return!1},Ne=ie(Ut);return console.log("Think detection:",{slateContent:Ut,hasThinkElement:Ne,displayStatus:c,isUser:f}),Ne},[Ut,c,f]),Rr=vt(()=>({databaseReference:B,...Or&&{isThinkCollapsed:dt}}),[B,Or,dt]),dr=vt(()=>u||(f?he.icons.userAvatar:he.icons.aiAvatar),[u,f,he.icons]),It=vt(()=>typeof n=="string"?n:Array.isArray(n)?n.map(ie=>typeof ie=="string"?ie:ie.text||"").join(""):L||"",[n,L]),y=()=>{if(Z)return null;const ie=[{key:"copy",show:ee.copy!==!1,icon:ww,label:"\u590D\u5236",onClick:()=>R==null?void 0:R("chatbox:copy",{content:It})},{key:"like",show:ee.like!==!1,icon:Tw,label:"\u8D5E",onClick:()=>R==null?void 0:R("chatbox:like",{result:O,queryId:V}),active:O===1},{key:"dislike",show:ee.dislike!==!1,icon:Nw,label:"\u8E29",onClick:()=>R==null?void 0:R("chatbox:dislike",{result:O,queryId:V}),active:O===0},{key:"repeat",show:!f&&Y,icon:Bw,label:"\u91CD\u590D",onClick:()=>R==null?void 0:R("chatbox:repeat",{content:n,queryId:V,filePaths:A,audioUrl:q})},{key:"forward",show:ee.forward,icon:Fw,label:"\u8F6C\u53D1",onClick:()=>R==null?void 0:R("chatbox:forward",{content:It,queryId:V})},{key:"delete",show:ee.delete,icon:Mw,label:"\u5220\u9664",onClick:()=>R==null?void 0:R("chatbox:delete",{queryId:V})},{key:"edit",show:ee.edit,icon:Sw,label:"\u7F16\u8F91",onClick:()=>R==null?void 0:R("chatbox:edit",{content:It,queryId:V})}];return H.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[H.jsx(wC,{$theme:he,children:ie.filter(Ne=>Ne.show).map(Ne=>{const ot=Ne.icon;return H.jsx(t0,{title:Ne.label,placement:"top",children:H.jsx("button",{className:Ne.active?"active":"",onClick:Ne.onClick,children:H.jsx(ot,{size:18})})},Ne.key)})}),!f&&c=="ready"&&!Z&&H.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017 ",H.jsx("span",{style:{color:he.colors.primary},children:K||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",H.jsx("span",{style:{color:he.colors.primary},children:Math.round((j||0)/1e3)}),"\u79D2"]})]})},D=vt(()=>{if(!E)return[];let ie=[];try{let ae;if(typeof E=="string")ae=JSON.parse(E);else if(Array.isArray(E))ae=E;else if(typeof E=="object")ae=[E];else return[];ie=Array.isArray(ae)?ae:[]}catch(ae){return console.warn("\u89E3\u6790 reference \u6570\u636E\u5931\u8D25:",ae,E),[]}let Ne=ie.map(ae=>{var Ye;try{const Ue=ae.metadata||{};let st="";Ue.type==="video"&&Ue.source_name&&typeof Ue.source_name=="string"?st=Ue.source_name:ae.name&&typeof ae.name=="string"?st=ae.name:ae.file_name&&typeof ae.file_name=="string"?st=ae.file_name:Ue.title&&typeof Ue.title=="string"?st=Ue.title:Ue.source&&typeof Ue.source=="string"?st=Ue.source.split("/").pop()||"":ae.order_num?st=String(ae.order_num):st="\u672A\u77E5\u6587\u6863";let le="pdf";if(Ue.type&&typeof Ue.type=="string")le=Ue.type.toLowerCase();else if(ae.name&&typeof ae.name=="string"){const Ot=ae.name.split(".").pop();Ot&&(le=Ot.toLowerCase())}else if(Ue.source&&typeof Ue.source=="string"){const Ot=Ue.source.split(".").pop();Ot&&(le=Ot.toLowerCase())}else if(ae.file_path&&typeof ae.file_path=="string"){const Ot=ae.file_path.split(".").pop();Ot&&(le=Ot.toLowerCase())}const xe=ae.parsedFilePath||Ue.file_path||ae.file_path||ae.convertedFilePath||Ue.link||Ue.source_link||"",{metadata:me,...He}=ae,lt=Ue.source||"",Xt=Bi(ae.score??Ue.score);return{file_id:Ue.id||ae.uid||"",file_name:st,file_type:le,path:xe,score:Xt,tags:[],parsedFilePath:ae.parsedFilePath,source:lt,...He}}catch(Ue){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Ue,ae);const{metadata:st,...le}=ae,xe=((Ye=ae.metadata)==null?void 0:Ye.source)||ae.file_path||ae.convertedFilePath||"",me=Bi(ae.score);return{file_id:ae.uid||"",file_name:ae.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:ae.convertedFilePath||ae.file_path||"",score:me,tags:[],parsedFilePath:ae.parsedFilePath,source:xe,...le}}});const ot=jo(Ut||[]);if(ot&&ot.length){const ae=ot.filter(Ue=>Ue.fromtype==="0"),Ye=ot.filter(Ue=>Ue.fromtype==="3");Ne=Ne.map(Ue=>{const st=ae.map(xe=>{var Xt;const me=ie.find(Ot=>String(Ot.order_num)===String(xe.id));if(!me||!((Xt=me==null?void 0:me.metadata)!=null&&Xt.source))return null;const He=Ue.source||"",lt=me.metadata.source||"";return He&&lt&&He!==lt?null:{id:xe.id||"",index:Fr(String(xe.id))||xe.indexId||"",image_urls:xe.imageUrls?Array.isArray(xe.imageUrls)?xe.imageUrls:[xe.imageUrls]:xe.image_urls?xe.image_urls.split(";").map(Ot=>Ot.trim()).filter(Boolean):[],metadata:me.metadata||{},order_num:me.order_num,parsedFilePath:me.parsedFilePath}}).filter(xe=>xe!==null),le=Ye.map(xe=>{var Xt;const me=ie.find(Ot=>String(Ot.order_num)===String(xe.id));if(!me||!((Xt=me==null?void 0:me.metadata)!=null&&Xt.source))return null;const He=Ue.source||"",lt=me.metadata.source||"";return He&&lt&&He!==lt?null:{id:xe.id||"",index:Fr(String(xe.id))||xe.indexId||"",image_urls:xe.imageUrls?Array.isArray(xe.imageUrls)?xe.imageUrls:[xe.imageUrls]:xe.image_urls?xe.image_urls.split(";").map(Ot=>Ot.trim()).filter(Boolean):[],metadata:me.metadata||{},order_num:me.order_num,parsedFilePath:me.parsedFilePath}}).filter(xe=>xe!==null);return{...Ue,tags:[...st,...le]}})}const $e=new Map;return Ne.filter(ae=>{const Ye=(ae==null?void 0:ae.source)||ae.file_name;return Ye?$e.has(Ye)?!1:($e.set(Ye,!0),!0):!0}).sort((ae,Ye)=>Number((Ye==null?void 0:Ye.score)??0)-Number((ae==null?void 0:ae.score)??0))},[E,Ut,Kt,Fr]),Re=vt(()=>{if(!N)return[];let ie=[];try{let $e;if(typeof N=="string")$e=JSON.parse(N);else if(Array.isArray(N))$e=N;else if(typeof N=="object")$e=[N];else return[];ie=Array.isArray($e)?$e:[]}catch($e){return console.warn("\u89E3\u6790 webReference \u6570\u636E\u5931\u8D25:",$e,N),[]}if(!(ie!=null&&ie.length))return[];let Ne=ie.map($e=>{var Ye,Ue,st;const ae=($e==null?void 0:$e.score)??((Ye=$e==null?void 0:$e.metadata)==null?void 0:Ye.score);return{link:(Ue=$e==null?void 0:$e.metadata)==null?void 0:Ue.link,file_name:(st=$e==null?void 0:$e.metadata)==null?void 0:st.title,score:Bi(ae),tags:[]}});const ot=jo(Ut||[]);if(ot&&ot.length){const $e=ot.filter(ae=>ae.fromtype==="1");Ne=Ne.map(ae=>{const Ye=$e.map(Ue=>{var le;const st=ie.find(xe=>String(xe.order_num)===String(Ue.id));return!st||!((le=st==null?void 0:st.metadata)!=null&&le.title)||st.metadata.title!==ae.file_name?null:{id:Ue.id||"",index:Fr(String(Ue.id))||Ue.indexId||"",image_urls:Ue.imageUrls?Array.isArray(Ue.imageUrls)?Ue.imageUrls:[Ue.imageUrls]:Ue.image_urls?Ue.image_urls.split(";").map(xe=>xe.trim()).filter(Boolean):[],metadata:st.metadata||{},order_num:st.order_num}}).filter(Ue=>Ue!==null);return{...ae,tags:Ye}})}return Ne.sort(($e,ae)=>Number((ae==null?void 0:ae.score)??0)-Number(($e==null?void 0:$e.score)??0))},[N,Ut,Kt,Fr]),T=vt(()=>{if(console.log("[ChatMessageAdapter] parseGraphReferenceData - graphReference:",$,"type:",typeof $),!$)return console.log("[ChatMessageAdapter] graphReference \u4E3A\u7A7A\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];let ie=[];try{if(typeof $=="string"){if($==="[]"||$==="null"||$.trim()==="")return console.log("[ChatMessageAdapter] graphReference \u662F\u7A7A\u5B57\u7B26\u4E32\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];const $e=JSON.parse($);ie=Array.isArray($e)?$e:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",ie.length)}else if(Array.isArray($))ie=$,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",ie.length);else if(typeof $=="object"&&$!==null)ie=[$],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",ie.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof $,$),[]}catch($e){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",$e,$),[]}let Ne=ie.map(($e,ae)=>{const{metadata:Ye,...Ue}=$e;return{id:$e.id||`graph-${ae}`,graphName:$e.graphName||`\u56FE\u8C31${ae+1}`,tags:[],...Ue}});const ot=jo(Ut||[]);if(ot&&ot.length){const $e=ot.filter(ae=>ae.fromtype==="2");Ne=Ne.map(ae=>{let Ye=[];Array.isArray(ae.traceNodes)&&ae.traceNodes.length>0?Ye=ae.traceNodes.map((le,xe)=>({id:le.id,index:Fr(String(le.id))??xe+1,image_urls:[],metadata:le.metadata||{},...le})):Ye=$e.filter(le=>String(le.id)===String(ae.id)).map(le=>({id:le.id||"",index:Fr(String(le.id))||le.indexId||"",image_urls:le.imageUrls?Array.isArray(le.imageUrls)?le.imageUrls:[le.imageUrls]:le.image_urls?le.image_urls.split(";").map(xe=>xe.trim()).filter(Boolean):[],metadata:{}}));const Ue=new Set,st=Ye.filter(le=>Ue.has(String(le.id))?!1:(Ue.add(String(le.id)),!0)).sort((le,xe)=>Number(le.index)-Number(xe.index));return{...ae,tags:st}})}return Ne},[$,Ut,Kt,Fr]),J=vt(()=>{const ie=[...jo(Ut||[]).filter(Ne=>Ne.imageUrls&&Array.isArray(Ne.imageUrls)).flatMap(Ne=>Ne.imageUrls),...be];return Array.from(new Set(ie))},[Ut,be]),or=vt(()=>typeof n!="string"?[]:mC(n),[n]),tt=vt(()=>Array.from(new Set([...J||[],...or||[]])),[J,or]),_e=vt(()=>{var ie,Ne,ot,$e,ae,Ye,Ue,st;if(!B)return null;try{const le=typeof B=="string"?JSON.parse(B):B;if(Array.isArray(le)&&le.length>0){const xe=le[0];if(xe.retrieveSqlData)return{dataFetchUrl:xe.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:xe.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:xe.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:xe.retrieveSqlData.total||0,type:xe.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ne=(ie=xe.retrieveSqlData.preData)==null?void 0:ie[0])==null?void 0:Ne.columns)||[],rows:(($e=(ot=xe.retrieveSqlData.preData)==null?void 0:ot[0])==null?void 0:$e.data)||[]}}}return le.retrieveSqlData?{dataFetchUrl:le.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:le.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:le.retrieveSqlData.total||0,type:le.retrieveSqlData.type||"COLLECTION",preData:{columns:((Ye=(ae=le.retrieveSqlData.preData)==null?void 0:ae[0])==null?void 0:Ye.columns)||[],rows:((st=(Ue=le.retrieveSqlData.preData)==null?void 0:Ue[0])==null?void 0:st.data)||[]}}:{dataFetchUrl:le.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.databaseName||"\u6570\u636E\u5E93",tableName:le.tableName||"\u6570\u636E\u8868",total:le.total||0,type:le.type||"COLLECTION",preData:le.preData||{columns:[],rows:[]}}}catch(le){return console.error("Failed to parse databaseReference:",le),null}},[B]),wt=ie=>{const{dataSourceType:Ne,databaseName:ot,businessTableName:$e,tableName:ae}=ie;return Ne==="DataTable"?`${ot||"\u6570\u636E\u5E93"} - ${$e||"\u6570\u636E\u8868"}`:Ne==="DirectDB"?`${ot||"\u6570\u636E\u5E93"} - ${ae||"\u6570\u636E\u8868"}`:ot||$e||ae||"\u6570\u636E\u5E93"};qe.useEffect(()=>{bt(null),Ee([])},[V]),qe.useEffect(()=>{var ot;const ie=$e=>{try{const ae=typeof $e=="string"?JSON.parse($e):$e;return ae?Array.isArray(ae)?ae:[ae]:[]}catch(ae){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",ae),[]}},Ne=($e,ae)=>{if(!Array.isArray($e))return[];const Ye=ae!=null&&ae.id?String(ae.id):void 0,Ue=Ye?Fr(Ye):void 0,st=Ye?jr[Ye]:void 0,le=Ue??st??(ae==null?void 0:ae.referenceIndex)??void 0,xe=Ye&&le!==void 0?[{id:Ye,index:le}]:[];return $e.map(me=>{var He,lt,Xt,Ot;return{...me,id:me.id||Ye||me.tableName,referenceId:Ye,referenceIndex:le,tags:xe,fetchUrl:me.fetchUrl||((He=ae==null?void 0:ae.retrieveSqlData)==null?void 0:He.fetchUrl)||(_e==null?void 0:_e.dataFetchUrl)||"",databaseName:me.databaseName||((lt=ae==null?void 0:ae.retrieveSqlData)==null?void 0:lt.databaseName)||(_e==null?void 0:_e.databaseName)||"",tableName:me.tableName||((Xt=ae==null?void 0:ae.retrieveSqlData)==null?void 0:Xt.tableName)||(_e==null?void 0:_e.tableName)||"",dataSourceType:me.dataSourceType||((Ot=ae==null?void 0:ae.retrieveSqlData)==null?void 0:Ot.type)||(_e==null?void 0:_e.type)||"DataTable"}})};if(B){const $e=ie(B),ae=[];if($e.forEach(Ye=>{var Ue,st,le;if(Array.isArray(Ye==null?void 0:Ye.retrieveTableDataList)&&Ye.retrieveTableDataList.length)ae.push(...Ne(Ye.retrieveTableDataList,Ye));else if(Array.isArray((le=(st=(Ue=Ye==null?void 0:Ye.retrieveSqlData)==null?void 0:Ue.preData)==null?void 0:st[0])==null?void 0:le.data)&&Ye.retrieveSqlData.preData[0].data.length){const xe={businessTableName:Ye.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:Ye.retrieveSqlData.databaseName||(_e==null?void 0:_e.databaseName)||"\u6570\u636E\u5E93",tableName:Ye.retrieveSqlData.tableName||(_e==null?void 0:_e.tableName)||"\u6570\u636E\u8868",fetchUrl:Ye.retrieveSqlData.fetchUrl||(_e==null?void 0:_e.dataFetchUrl)||"",dataSourceType:Ye.retrieveSqlData.type||"DirectDB",total:Ye.retrieveSqlData.total};ae.push(...Ne([xe],Ye))}}),ae.length>0){ze(ae);return}if((ot=_e==null?void 0:_e.preData)!=null&&ot.rows){const Ye=Ne(_e.preData.rows,{});ze(Ye);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");ze([])},[B,_e,V,jr,Fr]);const rt=St(()=>{try{const ie=Array.isArray(D)?D:[],Ne=Array.isArray(Re)?Re:[],ot=Array.isArray(T)?T:[],$e=tt,ae=jo(Ut||[]),Ye=He=>typeof Kt!="string"?!1:new RegExp(`\\[retrive-tag[^\\]]*id=['"]${He}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").test(Kt),Ue=He=>{const lt=new Map;return He.forEach(Xt=>{if(Xt.id){const Ot=String(Xt.id);if(!lt.has(Ot))lt.set(Ot,Xt);else{const ut=lt.get(Ot),Ht=Number(Xt.index)||0,rn=Number(ut.index)||0;(Ht<rn||Ht===rn&&!ut.index)&&lt.set(Ot,Xt)}}}),Array.from(lt.values())},st=ie.map(He=>({...He,tags:Ue((He.tags||[]).filter(lt=>lt.id&&Ye(String(lt.id))))})),le=Ne.map(He=>({...He,tags:Ue((He.tags||[]).filter(lt=>lt.id&&Ye(String(lt.id))))})),xe=ot.map(He=>({...He,tags:Ue((He.tags||[]).filter(lt=>lt.id&&Ye(String(lt.id))))})),me=pt&&pt.length>0?pt.map(He=>({id:He.id||He.tableName||He.referenceId||"",databaseName:He.databaseName||(_e==null?void 0:_e.databaseName)||"",tableName:He.tableName||(_e==null?void 0:_e.tableName)||"",fetchUrl:He.fetchUrl||(_e==null?void 0:_e.dataFetchUrl)||"",score:Bi(He.score),tags:He.tags||[],referenceIndex:He.referenceIndex,metadata:He.metadata?{...He.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})):[];return{queryId:V,knowledgeRefs:st,webRefs:le,graphRefs:xe,databaseRefs:me,images:$e,raw:{reference:E,webReference:N,graphReference:$,databaseReference:B,retriveNodes:ae}}}catch{return{queryId:V,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:E,webReference:N,graphReference:$,databaseReference:B,retriveNodes:[]}}}},[D,Re,T,_e,pt,tt,Ut,V,E,N,$,B,Kt]),Nt=vt(()=>{if(!f)return[];if(Array.isArray(_))return _;if(typeof _=="string"&&_)try{return JSON.parse(_)}catch{return[]}return[]},[f,_]),sr=()=>{if(!f||Nt.length===0)return null;const ie=le=>{if(!le)return"";if(typeof le=="string"&&(le.includes("KB")||le.includes("MB")||le.includes("GB")||le.includes("B")))return le;const xe=typeof le=="string"?parseFloat(le)||0:le;return xe<1024?`${xe}B`:xe<1024*1024?`${(xe/1024).toFixed(1)}KB`:`${(xe/1024/1024).toFixed(1)}MB`},Ne=le=>le!=null&&le.status&&(String(le.status).toLowerCase()==="uploading"||String(le.status).toLowerCase()==="parsing")?!1:!!(le!=null&&le.url||le!=null&&le.filePath||le!=null&&le.convertedFilePath),ot=Nt.filter(le=>{const xe=(le.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(xe.toLowerCase())}),$e=Nt.filter(le=>{const xe=(le.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(xe.toLowerCase())}),ae=ot.filter(Ne),Ye=ot.filter(le=>!Ne(le)),Ue=$e.filter(Ne),st=$e.filter(le=>!Ne(le));return Ue.length+st.length,H.jsxs("div",{className:"mt-4 mb-4",style:{width:"100%",paddingLeft:f?"0":"1.8rem",paddingRight:f?"1.8rem":"0",display:"flex",flexDirection:"column",alignItems:f?"flex-end":"flex-start"},children:[(ae.length>0||Ye.length>0)&&H.jsx(Jl,{$theme:he,children:H.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Ye.map((le,xe)=>{var me;return H.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:H.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((me=he.colors)==null?void 0:me.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${xe}`)}),ae.map(le=>H.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{...le,file:le.name,file_type:le.file_type||"image",url:le.url||le.filePath,parse_url:le.parseUrl||le.convertedFilePath,retrieve_tags:le.retrieveTags||[],file_id:le.uid||le.file_id,parsed_file_type:le.parsed_file_type||"image",references:le,type:le.type||"image",isUploadFile:!0,pdfPages:le.pdfPages||0})},children:[H.jsx(Yl,{src:le.url||le.filePath,alt:le.name,className:"gallery-image",token:e,url:t,eventsEmit:et}),H.jsx("div",{className:"gallery-overlay",children:le.name})]},le.uid||le.name))]})}),(Ue.length>0||st.length>0)&&H.jsx("div",{style:{display:"flex",flexDirection:"column",marginTop:"6px",alignItems:f?"flex-end":"flex-start",width:"100%"},children:H.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"flex-end",direction:"ltr",paddingLeft:f?"0":"0.5rem",paddingRight:f?"0.5rem":"0",justifyContent:"flex-end",width:"100%",maxWidth:"100%"},children:[st.map((le,xe)=>{const me=(le.name||"").split(".").pop()||"",He=Zl(me,m,18);return H.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all",children:[H.jsx("div",{className:"pt-0.5 flex-shrink-0",style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:H.jsx("div",{style:{transform:"scale(1.2)",transformOrigin:"center"},children:He})}),H.jsx("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:H.jsxs("div",{className:"flex items-center justify-between gap-1.5",children:[H.jsx("div",{style:{height:"13px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"140px"}}),H.jsx("div",{style:{height:"12px",borderRadius:"4px",backgroundColor:"#d1d5db",width:"40px"}})]})})]},`pending-doc-${le.uid||xe}`)}),Ue.map(le=>{var Xt;const xe=(le.name||"").split(".").pop()||"",me=le.size??((Xt=le.file)==null?void 0:Xt.size)??le.fileSize,He=ie(me),lt=Zl(xe,m,18);return H.jsxs("div",{className:"group gap-x-3 items-center file-display-card relative flex w-[240px] min-h-[56px] bg-white border border-gray-200 rounded-lg shadow-sm px-3 py-2.5 transition-all hover:shadow-md hover:border-blue-300",style:{cursor:"pointer"},title:le.name,onClick:()=>{R==null||R("reference_file:click",{...le,file:le.name,file_type:le.file_type||xe,url:le.url||le.filePath,parse_url:le.parseUrl||le.convertedFilePath,retrieve_tags:le.retrieveTags||[],file_id:le.uid||le.file_id,parsed_file_type:le.parsed_file_type||xe,references:le,type:le.type||"file",isUploadFile:!0,pdfPages:le.pdfPages||0})},children:[H.jsx("div",{style:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:H.jsx("div",{style:{transform:"scale(1.65)",marginBottom:"4px",transformOrigin:"center"},children:lt})}),H.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[H.jsx("div",{className:"flex",children:H.jsx("div",{className:"flex items-center justify-between gap-1.5",children:H.jsx("span",{className:"text-[13px] font-medium truncate max-w-[140px]",title:le.name,children:le.name})})}),H.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:He})]})]},le.uid||le.name)})]})})]})},Nr=()=>{if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases:",Fe),!Fe||!Array.isArray(Fe)||Fe.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases \u4E3A\u7A7A\u6216\u4E0D\u662F\u6570\u7EC4"),null;const ie=[];let Ne=0;if(Fe.forEach((me,He)=>{me&&me.treeData&&Array.isArray(me.treeData)&&(me.treeData.forEach(lt=>{ie.push({...lt,_kbIndex:He,_kbName:me.knowledgeBaseName||""})}),Ne+=me.totalFileCount||0)}),ie.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u6709\u6548\u7684 treeData"),null;console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u5408\u5E76\u540E\u7684 allTreeData \u957F\u5EA6:",ie.length);const ot=ie.filter(me=>me.type==="dir"),$e=ie.filter(me=>me.type==="file");console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - dirItems:",ot.length,"fileItems:",$e.length);let ae=[],Ye="\u6309\u76EE\u5F55\u5206\u7C7B";if(ot.length>0){const me=ot.map((He,lt)=>({id:`${He._kbIndex}-${He.name||lt}`||lt,name:He.name||"",documentCount:He.fileCount||0,visible:!0,itemType:"dir"}));ae.push(...me)}if($e.length>0){const me=$e.map((He,lt)=>({id:`${He._kbIndex}-${He.name||lt}`||lt,name:He.name||"\u672A\u77E5\u6587\u4EF6",documentCount:0,visible:!0,itemType:"file",fileType:He.fileType||""}));ae.push(...me)}if(ot.length===0&&$e.length>0&&(Ye="\u77E5\u8BC6\u5E93\u6587\u6863"),console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - categories:",ae),ae.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - \u6CA1\u6709\u53EF\u7528\u7684\u5206\u7C7B"),null;const Ue=Ne>0?Ne:$e.length,st=ae.slice(0,5),le=ae.length>5,xe={title:"\u77E5\u8BC6\u5E93\u6587\u6863\u5217\u8868",subtitle:Ye,totalCount:Ue,categories:st,showViewAll:le,viewAllText:"\u67E5\u770B\u5168\u90E8>>"};return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - result:",xe),xe},Q=()=>{if(f)return null;const ie=Nr();return ie?H.jsx(iC,{data:ie,styles:m,onCategoryClick:Ne=>{R==null||R("knowledge_base_category:click",{category:Ne,knowledgeBase:Fe==null?void 0:Fe[0]})},onViewAllClick:()=>{R==null||R("knowledge_base_view_all:click",{knowledgeBases:Fe})}}):null},gr=()=>{var xe;if(f)return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",se),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",$),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",T);const ie=Array.isArray(D)?D:[],Ne=Array.isArray(Re)?Re:[],ot=Array.isArray(T)?T:[];console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",ie.length,"webList:",Ne.length,"graphList:",ot.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",ot);const $e=ie.length>0&&U!==5,ae=Ne.length>0,Ye=ot.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",$e,"hasWebRefs:",ae,"hasGraphRefs:",Ye);const Ue=tt.length>0,st=pt&&pt.length>0,le=$e||ae||Ye||Ue||st;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",le),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",B),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",pt),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",pt==null?void 0:pt.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",st),se==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",le),!le)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const me=$e&&(ie==null?void 0:ie.length)||0,He=ae&&(Ne==null?void 0:Ne.length)||0,lt=Ye&&(ot==null?void 0:ot.length)||0,Xt=st&&(pt==null?void 0:pt.length)||0;let Ot=me+He+lt+Xt;return Ot===0&&Ue&&(Ot=1),H.jsxs(H.Fragment,{children:[Ue&&H.jsx(Jl,{$theme:he,children:H.jsx("div",{className:"gallery-grid",children:tt.map((ut,Ht)=>H.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{file:`\u56FE${Ht+1}`,file_type:"image",url:ut,parse_url:ut,retrieve_tags:[],references:{url:ut},type:"image",isUploadFile:!1})},children:[H.jsx(Yl,{src:ut,alt:`\u56FE${Ht+1}`,className:"gallery-image",token:e,url:t,eventsEmit:et}),H.jsxs("div",{className:"gallery-overlay",children:["\u56FE",Ht+1]})]},ut+Ht))})}),H.jsx("div",{style:{padding:"6px 2.9rem"},children:H.jsxs("button",{style:{cursor:"pointer",color:((xe=he.colors)==null?void 0:xe.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 ut=rt();R==null||R("references:click",ut)},onMouseEnter:ut=>{var Ht;ut.currentTarget.style.color=((Ht=he.colors)==null?void 0:Ht.primary)||"#3b82f6"},onMouseLeave:ut=>{var Ht;ut.currentTarget.style.color=((Ht=he.colors)==null?void 0:Ht.textDisabled)||"#86909C"},children:[H.jsx(kw,{size:16}),H.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",Ot?` ${Ot}`:""]}),H.jsx(xw,{size:16})]})})]})}return le?H.jsxs(H.Fragment,{children:[Ue&&H.jsx(Jl,{$theme:he,children:H.jsx("div",{className:"gallery-grid",children:tt.map((me,He)=>H.jsxs("div",{className:"gallery-item",onClick:()=>{R==null||R("reference_file:click",{file:`\u56FE${He+1}`,file_type:"image",url:me,parse_url:me,retrieve_tags:[],references:{url:me},type:"image",isUploadFile:!1})},children:[H.jsx(Yl,{src:me,alt:`\u56FE${He+1}`,className:"gallery-image",token:e,url:t,eventsEmit:et}),H.jsxs("div",{className:"gallery-overlay",children:["\u56FE",He+1]})]},me+He))})}),$e&&H.jsxs(Fi,{$theme:he,children:[H.jsx("div",{className:"reference-title justify-between items-center flex",children:H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),H.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${ie.length})`}),ie.length>2&&H.jsx("div",{onClick:()=>je(!Me),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Me?H.jsx(Sa,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ea,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(Me?ie:ie.slice(0,2)).map((me,He)=>me&&H.jsx("div",{className:"reference-item",children:H.jsxs("div",{className:"file-info flex items-end gap-2",children:[H.jsx("div",{className:"flex-shrink-0",children:(()=>{const lt=me.file_type||(me.file_name||"").split(".").pop()||"pdf",Xt=(me.file_name||"").split(".").pop()||"file";return lt==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(lt)?H.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:H.jsx(Aw,{size:16,className:"text-red-600"})}):H.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:Zl(Xt,m,16)})})()}),H.jsx("div",{className:"flex-1 min-w-0",children:H.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:lt=>{lt.stopPropagation(),R==null||R("knowledge_referenceFile_title:click",{data:{...me,file_type:me.file_type,file_name:me.file_name,metadata:me.metadata,parsedFilePath:me.parsedFilePath}})},children:me.file_name})}),H.jsx("div",{className:"flex items-center gap-1",children:(()=>{const lt=new Set,Xt=(me.tags||[]).filter(ut=>lt.has(ut.id)?!1:(lt.add(ut.id),!0)).sort((ut,Ht)=>Number(ut.index)-Number(Ht.index)),Ot=ut=>{if(typeof Kt!="string")return ut;const Ht=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Kt);return Ht?Ht[1]:ut};return Xt.slice(0,10).map(ut=>H.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:Ht=>{Ht.stopPropagation();const rn=Vt(me,ut.id),Sr=me.file_type==="video"?"3":"0";R==null||R("retrive_tag:click",{tagInfo:rn||me,fromtype:Sr,leaf:{id:ut.id,fromtype:Sr},attributes:{}})},children:Ot(ut.id)},ut.id))})()}),typeof me.score=="number"&&H.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(me.score).toFixed(2)]}),me.file_type!=="video"&&H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsx(Dw,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:lt=>{r&&(lt.stopPropagation(),R==null||R("referenceFile_download",{data:{...me,file_type:me.file_type,file_name:me.file_name,metadata:me.metadata,parsedFilePath:me.parsedFilePath}}))}}),H.jsx("div",{className:"w-px h-4 bg-gray-300"}),H.jsx(Ew,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:lt=>{lt.stopPropagation(),R==null||R("referenceFile_filechat",{data:{...me,file_type:me.file_type,file_name:me.file_name,metadata:me.metadata,parsedFilePath:me.parsedFilePath}})}})]})]})},me.file_id||He))})]}),st&&H.jsxs(Fi,{$theme:he,children:[H.jsx("div",{className:"reference-title justify-between items-center flex",children:H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),H.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${pt.length||0})`}),pt.length>2&&H.jsx("div",{onClick:()=>Te(!it),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:it?H.jsx(Sa,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ea,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(it?pt:pt.slice(0,2)).map((me,He)=>H.jsx("div",{className:"reference-item",children:H.jsxs("div",{className:"file-info flex items-end gap-2",children:[H.jsx("div",{className:"flex-shrink-0",children:H.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:H.jsx(Cw,{size:20,className:"text-blue-600"})})}),H.jsx("div",{className:"flex-1 min-w-0",children:H.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:lt=>{lt.stopPropagation(),R==null||R("database_referenceFile_title:click",{data:{...me,file_type:"database",file_name:wt(me),metadata:me,parsedFilePath:me.fetchUrl||(_e==null?void 0:_e.dataFetchUrl)||"",file:me.databaseName||"database",url:me.fetchUrl||(_e==null?void 0:_e.dataFetchUrl)||"",parse_url:me.fetchUrl||(_e==null?void 0:_e.dataFetchUrl)||"",retrieve_tags:me.tags||[],references:me,type:"database",isUploadFile:!1}})},children:wt(me)})}),H.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(me.tags)&&me.tags.length?me.tags:[{id:me.referenceId||`database-${He}`,index:me.referenceIndex??He+1}]).map(lt=>H.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:lt.index??He+1},`${lt.id||"database"}-${lt.index}`))}),typeof me.score=="number"&&H.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(me.score).toFixed(2)]})]})},me.tableName||He))})]}),ae&&H.jsxs(Fi,{$theme:he,children:[H.jsx("div",{className:"reference-title justify-between items-center flex",children:H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),H.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Ne.length})`}),Ne.length>2&&H.jsx("div",{onClick:()=>ht(!Ve),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ve?H.jsx(Sa,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ea,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(Ve?Ne:Ne.slice(0,2)).map((me,He)=>H.jsx("div",{className:"reference-item",children:H.jsxs("div",{className:"file-info flex items-end gap-2",children:[H.jsx("div",{className:"flex-shrink-0",children:H.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:H.jsx(wo,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),H.jsx("div",{className:"flex-1 min-w-0",children:H.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:lt=>{lt.stopPropagation(),R==null||R("web_referenceFile_title:click",{data:{...me,file_type:me.file_type,file_name:me.file_name,metadata:me.metadata,parsedFilePath:me.parsedFilePath,file:me.file_name,url:me.link,parse_url:me.link,retrieve_tags:me.tags||[],references:me,type:"file",isUploadFile:!1}})},children:me.file_name})}),H.jsx("div",{className:"flex items-center gap-1",children:(()=>{const lt=new Set,Xt=(me.tags||[]).filter(ut=>lt.has(ut.id)?!1:(lt.add(ut.id),!0)).sort((ut,Ht)=>Number(ut.index)-Number(Ht.index)),Ot=ut=>{if(typeof Kt!="string")return ut;const Ht=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Kt);return Ht?Ht[1]:ut};return Xt.slice(0,1).map(ut=>H.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:Ht=>{Ht.stopPropagation();const rn=Vt(me,ut.id);R==null||R("retrive_tag:click",{tagInfo:rn||me,fromtype:"1",leaf:{id:ut.id,fromtype:"1"},attributes:{}})},children:Ot(ut.id)},ut.id))})()}),typeof me.score=="number"&&H.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(me.score).toFixed(2)]})]})},(me.link||"")+He))})]}),Ye&&H.jsxs(Fi,{$theme:he,children:[H.jsx("div",{className:"reference-title justify-between items-center flex",children:H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsx("span",{className:"text-[#374151]",children:"\u56FE\u8C31\u5F15\u7528"}),H.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${ot.length})`}),ot.length>2&&H.jsx("div",{onClick:()=>Ze(!Ie),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ie?H.jsx(Sa,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ea,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(Ie?ot:ot.slice(0,2)).map((me,He)=>H.jsx("div",{className:"reference-item",children:H.jsxs("div",{className:"file-info flex items-end gap-2",children:[H.jsx("div",{className:"flex-shrink-0",children:H.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:H.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"})})}),H.jsx("div",{className:"flex-1 min-w-0",children:H.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate",children:me.graphName||`\u56FE\u8C31${He+1}`})}),H.jsx("div",{className:"flex items-center gap-1",children:(()=>{const lt=new Set,Xt=(me.tags||[]).filter(ut=>lt.has(ut.id)?!1:(lt.add(ut.id),!0)).sort((ut,Ht)=>Number(ut.index)-Number(Ht.index)),Ot=ut=>{if(typeof Kt!="string")return null;const Ht=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${ut}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Kt);return Ht?Ht[1]??null:null};return Xt.map(ut=>({tag:ut,num:Ot(ut.id)})).filter(ut=>ut.num!==null&&ut.num!==void 0&&ut.num!=="").slice(0,10).map(({tag:ut,num:Ht})=>H.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:rn=>{rn.stopPropagation();const Sr=Array.isArray(me.traceNodes)?me.traceNodes.find(hn=>String(hn==null?void 0:hn.id)===String(ut.id)):void 0;R==null||R("retrive_tag:click",{tagInfo:{id:ut.id,index:ut.index,image_urls:ut.image_urls||[]},fromtype:"2",graph:{id:me.id,graphName:me.graphName,fetchUrl:me.fetchUrl,cyphers:me.cyphers},traceNode:Sr})},children:Ht},ut.id))})()})]})},me.id||He))})]})]}):null},oe=()=>f||!Y||!X||X.length===0?null:H.jsx(CC,{$theme:he,children:H.jsx("div",{className:"follow-up-list",children:X.map((ie,Ne)=>H.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Ne*260}ms`},onClick:()=>{R==null||R("chatbox:follow_up_question_click",{question:ie,queryId:V})},children:ie},`${String(ie)}-${Ne}`))})});return H.jsxs(vC,{$align:a,$isUser:f,children:[H.jsxs(bC,{$isUser:f,children:[H.jsx(yC,{$src:dr,$isUser:f}),we&&H.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:we})]}),sr(),H.jsx(xC,{$isUser:f,$theme:he,children:H.jsx("div",{className:"message-card",children:H.jsx("div",{className:"message-text",children:o==="stream"?H.jsxs(H.Fragment,{children:[!f&&xt(),yt(),H.jsx(As,{dataSource:{type:Ua.MARKDOWN,content:Kt},styles:{letterSpacing:m==null?void 0:m.letterSpacing,lineHeight:m==null?void 0:m.lineHeight,templateField:m==null?void 0:m.templateField,text:m==null?void 0:m.text},theme:{...m==null?void 0:m.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:$t,eventsEmit:R,extraProps:Rr},`md-${(Kt||"").length}-think-${dt}`)]}):H.jsx("div",{style:{whiteSpace:"pre-wrap"},children:It})})})}),Q(),gr(),!f&&y(),oe(),typeof document<"u"&&Eg(H.jsx(DC,{$show:De!==null,onClick:()=>Ae(null),children:De&&H.jsxs("div",{className:"modal-content",onClick:ie=>ie.stopPropagation(),children:[H.jsx("img",{src:De,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),H.jsx("button",{className:"modal-close",onClick:()=>Ae(null),children:"\u5173\u95ED"})]})}),document.body)]})};Ke.div.attrs({className:"retrive-chat-message-container"})`
1414
+ display: flex;
1415
+ flex-direction: column;
1416
+ width: 100%;
1417
+ margin-bottom: 16px;
1418
+ `;Ke.div.attrs({className:"retrive-chat-message-header"})`
1419
+ display: flex;
1420
+ align-items: flex-start;
1421
+ gap: 12px;
1422
+ margin-bottom: 12px;
1423
+ `;Ke.div.attrs({className:"retrive-chat-avatar-wrapper"})`
1424
+ width: 40px;
1425
+ height: 40px;
1426
+ border-radius: 50%;
1427
+ overflow: hidden;
1428
+ flex-shrink: 0;
1429
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
1430
+
1431
+ img {
1432
+ width: 100%;
1433
+ height: 100%;
1434
+ object-fit: cover;
1435
+ }
1436
+ `;Ke.div.attrs({className:"retrive-chat-content-wrapper"})`
1437
+ flex: 1;
1438
+ display: flex;
1439
+ flex-direction: column;
1440
+ align-items: ${({isUser:e})=>e?"flex-end":"flex-start"};
1441
+ `;Ke.div.attrs({className:"retrive-chat-timestamp"})`
1442
+ font-size: 12px;
1443
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
1444
+ margin-bottom: 8px;
1445
+ `;Ke.div.attrs({className:"retrive-chat-user-bubble"})`
1446
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.userBackground)||"#3b82f6"}};
1447
+ color: white;
1448
+ padding: 12px 16px;
1449
+ border-radius: 12px;
1450
+ max-width: 80%;
1451
+ word-wrap: break-word;
1452
+ `;Ke.div.attrs({className:"retrive-chat-ai-message-card"})`
1453
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
1454
+ border-radius: 12px;
1455
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
1456
+ padding: 0;
1457
+ width: 100%;
1458
+ max-width: 100%;
1459
+ overflow: hidden;
1460
+ `;Ke.div.attrs({className:"retrive-chat-tabs-container"})`
1461
+ display: flex;
1462
+ border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1463
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
1464
+ `;Ke.button.attrs({className:"retrive-chat-tab-button"})`
1465
+ display: flex;
1466
+ position: relative;
1467
+ align-items: center;
1468
+ gap: 6px;
1469
+ padding: 12px 20px;
1470
+ background: transparent;
1471
+ border: none;
1472
+ border-bottom: 2px solid ${({active:e,theme:t})=>{var r;return e?((r=t.colors)==null?void 0:r.primary)||"#3b82f6":"transparent"}};
1473
+ color: ${({active:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.text)||"#374151":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
1474
+ font-size: 14px;
1475
+ font-weight: ${({active:e})=>e?500:400};
1476
+ cursor: pointer;
1477
+ transition: all 0.2s ease;
1478
+
1479
+ &:hover {
1480
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1481
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
1482
+ }
1483
+
1484
+ svg {
1485
+ width: 16px;
1486
+ height: 16px;
1487
+ }
1488
+ `;Ke.span.attrs({className:"retrive-chat-tab-badge"})`
1489
+ position: absolute;
1490
+ top: 4px;
1491
+ right: 10px;
1492
+ display: inline-flex;
1493
+ align-items: center;
1494
+ justify-content: center;
1495
+ min-width: 16px;
1496
+ height: 16px;
1497
+ padding: 0 4px;
1498
+ border-radius: 999px;
1499
+ font-size: 11px;
1500
+ font-weight: 500;
1501
+ background: #ef4444;
1502
+ color: #ffffff;
1503
+ line-height: 1;
1504
+ `;Ke.div.attrs({className:"retrive-chat-tab-content"})`
1505
+ padding: 20px;
1506
+ `;Ke.div.attrs({className:"retrive-chat-llm-config-container"})`
1507
+ margin-bottom: 20px;
1508
+ `;Ke.div.attrs({className:"retrive-chat-llm-config-title"})`
1509
+ display: flex;
1510
+ align-items: center;
1511
+ gap: 8px;
1512
+ font-size: 14px;
1513
+ font-weight: 500;
1514
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1515
+ margin-bottom: 12px;
1516
+
1517
+ .dot {
1518
+ width: 8px;
1519
+ height: 8px;
1520
+ border-radius: 50%;
1521
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1522
+ }
1523
+ `;Ke.div.attrs({className:"retrive-chat-llm-config-grid"})`
1524
+ display: grid;
1525
+ grid-template-columns: repeat(2, 1fr);
1526
+ gap: 12px;
1527
+ `;Ke.div.attrs({className:"retrive-chat-llm-config-item"})`
1528
+ display: flex;
1529
+ align-items: center;
1530
+ gap: 8px;
1531
+ font-size: 13px;
1532
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1533
+
1534
+ .dot {
1535
+ width: 6px;
1536
+ height: 6px;
1537
+ border-radius: 50%;
1538
+ flex-shrink: 0;
1539
+ }
1540
+
1541
+ .dot-green {
1542
+ background: #10b981;
1543
+ }
1544
+
1545
+ .dot-blue {
1546
+ background: #3b82f6;
1547
+ }
1548
+
1549
+ .dot-purple {
1550
+ background: #8b5cf6;
1551
+ }
1552
+
1553
+ .dot-yellow {
1554
+ background: #f59e0b;
1555
+ }
1556
+ `;Ke.div.attrs({className:"retrive-chat-semantic-content"})`
1557
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1558
+ line-height: 1.6;
1559
+ font-size: 14px;
1560
+ `;Ke.div.attrs({className:"retrive-chat-stats-container"})`
1561
+ display: flex;
1562
+ gap: 16px;
1563
+ padding: 12px 20px;
1564
+ border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1565
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
1566
+ font-size: 12px;
1567
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
1568
+ `;Ke.div.attrs({className:"retrive-chat-empty-state"})`
1569
+ padding: 24px 16px;
1570
+ text-align: center;
1571
+ font-size: 13px;
1572
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
1573
+ `;Ke.div.attrs({className:"retrive-chat-tools-container"})`
1574
+ display: flex;
1575
+ gap: 8px;
1576
+ padding: 12px 20px;
1577
+ border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1578
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
1579
+ `;Ke.button.attrs({className:"retrive-chat-tool-button"})`
1580
+ display: flex;
1581
+ align-items: center;
1582
+ justify-content: center;
1583
+ width: 32px;
1584
+ height: 32px;
1585
+ border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1586
+ border-radius: 6px;
1587
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
1588
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1589
+ cursor: pointer;
1590
+ transition: all 0.2s ease;
1591
+
1592
+ &:hover {
1593
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
1594
+ border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1595
+ }
1596
+
1597
+ svg {
1598
+ width: 16px;
1599
+ height: 16px;
1600
+ }
1601
+ `;Ke.div.attrs({className:"retrive-chat-prompt-content"})`
1602
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
1603
+ font-size: 13px;
1604
+ line-height: 1.6;
1605
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1606
+ white-space: pre-wrap;
1607
+ word-break: break-word;
1608
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
1609
+ padding: 16px;
1610
+ border-radius: 8px;
1611
+ border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1612
+ `;Ke.div.attrs({className:"retrive-chat-config-container"})`
1613
+ display: grid;
1614
+ grid-template-columns: 1fr 1fr;
1615
+ gap: 24px;
1616
+ `;Ke.div.attrs({className:"retrive-chat-config-section"})`
1617
+ display: flex;
1618
+ flex-direction: column;
1619
+ `;Ke.div.attrs({className:"retrive-chat-config-section-title"})`
1620
+ display: flex;
1621
+ align-items: center;
1622
+ gap: 8px;
1623
+ font-size: 14px;
1624
+ font-weight: 500;
1625
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1626
+ margin-bottom: 16px;
1627
+
1628
+ .dot {
1629
+ width: 8px;
1630
+ height: 8px;
1631
+ border-radius: 50%;
1632
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1633
+ }
1634
+ `;Ke.div.attrs({className:"retrive-chat-config-item-list"})`
1635
+ display: flex;
1636
+ flex-direction: column;
1637
+ gap: 12px;
1638
+ `;Ke.div.attrs({className:"retrive-chat-config-item"})`
1639
+ display: flex;
1640
+ justify-content: space-between;
1641
+ align-items: center;
1642
+ padding: 8px 0;
1643
+ border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1644
+
1645
+ &:last-child {
1646
+ border-bottom: none;
1647
+ }
1648
+ `;Ke.span.attrs({className:"retrive-chat-config-item-label"})`
1649
+ font-size: 13px;
1650
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
1651
+ `;Ke.span.attrs({className:"retrive-chat-config-item-value"})`
1652
+ font-size: 13px;
1653
+ font-weight: 500;
1654
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1655
+ `;Ke.span.attrs({className:"retrive-chat-switch-status"})`
1656
+ font-size: 13px;
1657
+ font-weight: 500;
1658
+ color: ${({enabled:e,theme:t})=>{var r,n;return e?((r=t.colors)==null?void 0:r.success)||"#10b981":((n=t.colors)==null?void 0:n.disabled)||"#9ca3af"}};
1659
+ `;Ke.div.attrs({className:"retrive-chat-retrieve-container"})`
1660
+ display: flex;
1661
+ flex-direction: column;
1662
+ gap: 4px;
1663
+ `;Ke.div.attrs({className:"retrive-chat-retrieve-chunk"})`
1664
+ display: flex;
1665
+ flex-direction: column;
1666
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
1667
+ border-radius: 12px;
1668
+ border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1669
+ overflow: hidden;
1670
+ transition: all 0.3s ease;
1671
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
1672
+
1673
+ &:hover {
1674
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
1675
+ border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1676
+ }
1677
+ `;Ke.div.attrs({className:"retrive-chat-retrieve-chunk-header"})`
1678
+ display: flex;
1679
+ align-items: center;
1680
+ justify-content: space-between;
1681
+ padding: 5px 10px;
1682
+ cursor: pointer;
1683
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#fafafa"}};
1684
+ border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
1685
+ transition: background-color 0.2s ease;
1686
+
1687
+ &:hover {
1688
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f5f5f5"}};
1689
+ }
1690
+ `;Ke.div.attrs({className:"retrive-chat-retrieve-chunk-title"})`
1691
+ display: flex;
1692
+ align-items: center;
1693
+ gap: 10px;
1694
+ font-size: 15px;
1695
+ font-weight: 600;
1696
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
1697
+
1698
+ .dot {
1699
+ width: 10px;
1700
+ height: 10px;
1701
+ border-radius: 50%;
1702
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1703
+ flex-shrink: 0;
1704
+ }
1705
+ `;Ke.div.attrs({className:"retrive-chat-retrieve-chunk-expand-icon"})`
1706
+ display: flex;
1707
+ align-items: center;
1708
+ gap: 4px;
1709
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
1710
+ font-size: 13px;
1711
+ cursor: pointer;
1712
+ transition: all 0.3s ease;
1713
+
1714
+ svg {
1715
+ transition: transform 0.3s ease;
1716
+ transform: ${({$isExpanded:e})=>e?"rotate(180deg)":"rotate(0deg)"};
1717
+ }
1718
+
1719
+ &:hover {
1720
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
1721
+ }
1722
+ `;Ke.div.attrs({className:"retrive-chat-retrieve-chunk-content"})`
1723
+ display: ${({$isExpanded:e})=>e?"flex":"none"};
1724
+ flex-direction: column;
1725
+ gap: 20px;
1726
+ padding: 6px;
1727
+ animation: ${({$isExpanded:e})=>e?"fadeIn":"none"} 0.3s ease;
1728
+ `;Ke.div.attrs({className:"retrive-chat-chunk-info-container"})`
1729
+ padding: 12px 20px;
1730
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
1731
+ display: flex;
1732
+ align-items: center;
1733
+ flex-wrap: nowrap;
1734
+ gap: 4px;
1735
+ font-size: 13px;
1736
+ overflow-x: auto;
1737
+ `;Ke.div.attrs({className:"retrive-chat-chunk-info-item"})`
1738
+ display: flex;
1739
+ align-items: center;
1740
+ gap: 6px;
1741
+ white-space: nowrap;
1742
+ flex-shrink: 0;
1743
+ `;Ke.span.attrs({className:"retrive-chat-chunk-info-label"})`
1744
+ font-size: 13px;
1745
+ font-weight: 400;
1746
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
1747
+ `;Ke.span.attrs({className:"retrive-chat-chunk-info-value"})`
1748
+ font-size: 13px;
1749
+ font-weight: 600;
1750
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
1751
+ padding: 2px 8px;
1752
+ background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
1753
+ border-radius: 4px;
1754
+ `;Ke.div.attrs({className:"retrive-chat-chunk-content-section"})`
1755
+ display: flex;
1756
+ flex-direction: column;
1757
+ gap: 4px;
1758
+ `;Ke.div.attrs({className:"retrive-chat-chunk-section-title"})`
1759
+ font-size: 14px;
1760
+ font-weight: 600;
1761
+ color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
1762
+ margin-bottom: 4px;
1763
+ `;Ke.div.attrs({className:"retrive-chat-chunk-content-wrapper"})`
1764
+ padding: 12px;
1765
+ background: #f5f5f5;
1766
+ border-radius: 8px;
1767
+
1768
+ `;Ke.div.attrs({className:"retrive-chat-chunk-file-source-section"})`
1769
+ display: flex;
1770
+ flex-direction: column;
1771
+ gap: 5px;
1772
+ padding: 15px;
1773
+ `;Ke.div.attrs({className:"retrive-chat-file-source"})`
1774
+ display: flex;
1775
+ align-items: flex-end;
1776
+ gap: 8px;
1777
+ `;const kC=Ke.div`
1778
+ position: relative;
1779
+ width: 100%;
1780
+ height: 100%;
1781
+ overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
1782
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
1783
+ border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
1784
+
1785
+ /* 自定义滚动条 */
1786
+ &::-webkit-scrollbar {
1787
+ width: 8px;
1788
+ }
1789
+
1790
+ &::-webkit-scrollbar-track {
1791
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
1792
+ border-radius: 4px;
1793
+ }
1794
+
1795
+ &::-webkit-scrollbar-thumb {
1796
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
1797
+ border-radius: 4px;
1798
+
1799
+ &:hover {
1800
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
1801
+ }
1802
+ }
1803
+ `,EC=Ke.div`
1804
+ position: relative;
1805
+ width: 100%;
1806
+ height: 100%;
1807
+ overflow: auto;
1808
+ background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
1809
+
1810
+ /* 自定义滚动条 */
1811
+ &::-webkit-scrollbar {
1812
+ width: 8px;
1813
+ }
1814
+
1815
+ &::-webkit-scrollbar-track {
1816
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
1817
+ border-radius: 4px;
1818
+ }
1819
+
1820
+ &::-webkit-scrollbar-thumb {
1821
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
1822
+ border-radius: 4px;
1823
+
1824
+ &:hover {
1825
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
1826
+ }
1827
+ }
1828
+ `,Vh=Ke.div`
1829
+ padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
1830
+ min-height: ${e=>e.height||"auto"};
1831
+
1832
+ /* 富文本内容样式增强 */
1833
+ & h1, & h2, & h3, & h4, & h5, & h6 {
1834
+ scroll-margin-top: 2rem;
1835
+ }
1836
+
1837
+ & img {
1838
+ max-width: 100%;
1839
+ height: auto;
1840
+ border-radius: 0.5rem;
1841
+ margin: 1rem 0;
1842
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
1843
+ transition: transform 0.2s ease-in-out;
1844
+
1845
+ &:hover {
1846
+ transform: scale(1.02);
1847
+ }
1848
+ }
1849
+
1850
+ /* 表格样式 - 主题感知 */
1851
+ & .table-container {
1852
+ overflow: auto;
1853
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
1854
+ border-radius: 6px;
1855
+ margin: 1rem 0;
1856
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
1857
+ }
1858
+
1859
+ & .table-container table {
1860
+ width: 100%;
1861
+ border-collapse: collapse;
1862
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
1863
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1864
+ }
1865
+
1866
+ & .table-container th,
1867
+ & .table-container td {
1868
+ border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
1869
+ padding: 8px 12px;
1870
+ text-align: left;
1871
+ }
1872
+
1873
+ & .table-container th {
1874
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
1875
+ font-weight: 600;
1876
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1877
+ }
1878
+
1879
+ & .table-container td {
1880
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
1881
+ }
1882
+
1883
+ & .table-container tr:nth-child(even) {
1884
+ background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
1885
+ }
1886
+
1887
+ & pre {
1888
+ position: relative;
1889
+
1890
+ &::before {
1891
+ content: '';
1892
+ position: absolute;
1893
+ top: 0;
1894
+ left: 0;
1895
+ right: 0;
1896
+ height: 2px;
1897
+ background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
1898
+ border-radius: 2px 2px 0 0;
1899
+ }
1900
+ }
1901
+
1902
+ & blockquote {
1903
+ position: relative;
1904
+
1905
+ &::before {
1906
+ content: '"';
1907
+ position: absolute;
1908
+ top: -0.5rem;
1909
+ left: -1rem;
1910
+ font-size: 3rem;
1911
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1912
+ opacity: 0.3;
1913
+ }
1914
+ }
1915
+
1916
+
1917
+ `,SC=Ke.div`
1918
+ display: flex;
1919
+ align-items: center;
1920
+ justify-content: center;
1921
+ padding: 2rem;
1922
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1923
+ font-size: 0.875rem;
1924
+
1925
+ &::before {
1926
+ content: '';
1927
+ width: 20px;
1928
+ height: 20px;
1929
+ border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
1930
+ border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
1931
+ border-radius: 50%;
1932
+ animation: spin 1s linear infinite;
1933
+ margin-right: 0.5rem;
1934
+ }
1935
+
1936
+ @keyframes spin {
1937
+ 0% { transform: rotate(0deg); }
1938
+ 100% { transform: rotate(360deg); }
1939
+ }
1940
+ `,AC=Ke.div`
1941
+ display: flex;
1942
+ flex-direction: column;
1943
+ align-items: center;
1944
+ justify-content: center;
1945
+ padding: 3rem;
1946
+ color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
1947
+ text-align: center;
1948
+
1949
+ &::before {
1950
+ content: '📄';
1951
+ font-size: 3rem;
1952
+ margin-bottom: 1rem;
1953
+ }
1954
+ `,BC=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:c=!1,size:u="sm",basePath:f,theme:d={},onChange:p,onScroll:v,onScrollToTop:g,onScrollToBottom:x,onSegmentClick:w,className:C,style:m,height:E="100%"})=>{const N=us(),B=vt(()=>{var he,we,be,Ee,De,Ae,Me,je,Ve;return{primaryColor:(d==null?void 0:d.primaryColor)||((he=N==null?void 0:N.colors)==null?void 0:he.primary)||"#007bff",secondaryColor:(d==null?void 0:d.secondaryColor)||((we=N==null?void 0:N.colors)==null?void 0:we.secondary)||"#6c757d",backgroundColor:(d==null?void 0:d.backgroundColor)||((be=N==null?void 0:N.colors)==null?void 0:be.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((Ee=N==null?void 0:N.colors)==null?void 0:Ee.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((De=N==null?void 0:N.colors)==null?void 0:De.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((Ae=N==null?void 0:N.colors)==null?void 0:Ae.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||((Me=N==null?void 0:N.colors)==null?void 0:Me.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||((je=N==null?void 0:N.space)==null?void 0:je.radius)||"8px",padding:(d==null?void 0:d.padding)||((Ve=N==null?void 0:N.space)==null?void 0:Ve.padding)||"1rem",scrollbarTrack:(d==null?void 0:d.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(d==null?void 0:d.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(d==null?void 0:d.scrollbarThumbHover)||"#a8a8a8",...d}},[N,d]),$=Yt(0);$.current+=1,console.log("[Markdownit] render count:",$.current);const[A,_]=At([]),[P,q]=At({start:0,end:10}),[O,V]=At(0),[L,Z]=At(0),[Y,j]=At(!1),[K,U]=At(!1),[X,ee]=At(!1),R=Yt(null),se=Yt(null),ye=Yt(null),Ce=vt(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Jt(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(Ce)?Ce.length:"n/a"),_(Ce)},[Ce]);const Se=vt(()=>t?`${A.length*r}px`:"auto",[A.length,r,t]),ue=vt(()=>{if(!t)return A;const he=Math.max(0,P.start-n),we=Math.min(A.length,P.end+n);return A.slice(he,we).map((be,Ee)=>({...be,virtualIndex:he+Ee}))},[A,P,t,n]),Fe=St(he=>{const{scrollTop:we,scrollHeight:be,clientHeight:Ee}=he.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:we,scrollHeight:be,clientHeight:Ee});const De=!t&&!v&&!g&&!x&&!o;if(console.log("[Markdownit] passiveOnly:",De),De||V(Ae=>Ae!==we?(console.log("[Markdownit] setScrollTop:",we),we):Ae),t&&!De){const Ae=Math.floor(we/r),Me=Math.min(A.length,Ae+Math.ceil(L/r)+1);q(je=>je.start!==Ae||je.end!==Me?(console.log("[Markdownit] setVisibleRange:",{start:Ae,end:Me}),{start:Ae,end:Me}):je)}if(!De){const Ae=we<=10;Ae!==K&&(console.log("[Markdownit] isAtTop ->",Ae),U(Ae),Ae&&g&&(console.log("[Markdownit] onScrollToTop callback"),g()))}if(!De){const Ae=we+Ee>=be-10;Ae!==X&&(console.log("[Markdownit] isAtBottom ->",Ae),ee(Ae),Ae&&x&&(console.log("[Markdownit] onScrollToBottom callback"),x()))}v&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:we,scrollHeight:be}),v(we,be)),o&&a&&!Y&&!c&&be-we-L<100&&G()},[t,r,A.length,L,o,a,Y,c,K,X,g,x,v]),G=St(async()=>{if(!(!a||Y||c)){j(!0);try{const he=A[A.length-1],we=await a(he.id);_(be=>[...be,...we])}catch(he){console.error("Failed to load more segments:",he)}finally{j(!1)}}},[a,A,Y,c]);Jt(()=>{const he=()=>{R.current&&Z(R.current.clientHeight)};return he(),window.addEventListener("resize",he),()=>window.removeEventListener("resize",he)},[]);const ve=St((he,we)=>{const be={type:he.type,content:he.content},Ee=t?{position:"absolute",top:`${(he.virtualIndex||we)*r}px`,left:0,right:0,height:`${r}px`}:{};return H.jsx("div",{style:Ee,onClick:()=>w==null?void 0:w(he.id,he),className:w?"cursor-pointer hover:bg-gray-50":"",children:H.jsx(As,{dataSource:be,isEditing:!1,size:u,basePath:f,theme:B,onChange:p,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},he.id)},[t,r,B,p,w]),de=()=>(console.log("[Markdownit] renderContent segments.len:",A.length,"enableVirtualScroll:",t),A.length===0?H.jsxs(AC,{theme:B,children:[H.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),H.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?H.jsx("div",{ref:ye,style:{height:Se,position:"relative"},children:ue.map(ve)}):H.jsx("div",{ref:ye,children:A.map(ve)})),re=()=>!Y&&!c?null:H.jsx(SC,{theme:B,children:c?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return H.jsx(kC,{ref:R,theme:B,$isVirtualized:t,className:C,style:{height:E,...m},children:t?H.jsx(EC,{ref:se,theme:B,onScroll:Fe,children:H.jsx(Vh,{theme:B,height:Se,children:de()})}):H.jsxs(Vh,{theme:B,onScroll:Fe,children:[de(),re()]})})},LC=e=>{const{onRendered:t}=e;return Jt(()=>{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]),H.jsx("div",{"data-markdownit-root":"1",children:H.jsx(BC,{...e})})};Ke.div`
1955
+ background: #f6f8fa;
1956
+ border: 1px solid #d0d7de;
1957
+ border-radius: 6px;
1958
+ padding: 16px;
1959
+ margin-bottom: 20px;
1960
+ `;Ke.p`
1961
+ margin: 0 0 16px 0;
1962
+ color: #656d76;
1963
+ font-size: 14px;
1964
+ line-height: 1.5;
1965
+ `;const Uh=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 c=o[0],u=o[1]||"",f=(o[2]||"").trim(),d=o.index,p=d+c.length;if(d>n){const E=e.slice(n,d);E.trim()!==""&&(r.push({text:E}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:E}))}const v=E=>{const N=new RegExp(`${E}\\s*=\\s*(["'])((?:\\\\.|[^\\
1966
+ ])*?)\\1`,"i"),B=u.match(N);return B?B[2]:void 0},g=/\S/.test(u),x=v("key"),w=v("placeholder"),C=x||`template-${Date.now()}-${a++}`,m={type:"template",key:C,placeholder:g?w||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":f||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:g?f:"",style:"blue",fieldId:C,children:[{text:""}],inline:!0};r.push(m),console.log("\u6DFB\u52A0template\u5143\u7D20:",m),n=p}if(n<e.length){const c=e.slice(n);c.trim()!==""&&(r.push({text:c}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:c}))}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)},Ql=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||"",c=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",u=o.value||"",f=` key="${String(a)}" placeholder="${String(c)}"`;r+=`<template${f}>${u}</template>`,n=u||c}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},FC=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},NC=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\`\`\`
1967
+ ${n.value||n.placeholder}\`\`\`
1968
+ \`\`\`
1969
+ `)}),r},TC=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",c=n.value||"",u=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${u}>${c}</template>`}}),r},KC=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var x,w,C,m,E,N,B,$,A,_,P,q,O,V,L,Z,Y,j,K,U,X,ee,R,se,ye,Ce,Se,ue,Fe,G,ve,de,re,he,we,be,Ee,De,Ae,Me,je,Ve,ht,it,Te,Ie,Ze,dt,at,et,Tt,xt;const a=us(),c={theme:{colors:{primary:((x=a==null?void 0:a.colors)==null?void 0:x.primary)||"#055AFF",secondary:((w=a==null?void 0:a.colors)==null?void 0:w.secondary)||"#84ADFF",background:((C=a==null?void 0:a.colors)==null?void 0:C.background)||"#E5EEFF",text:((m=a==null?void 0:a.colors)==null?void 0:m.text)||"#055AFF",border:((E=a==null?void 0:a.colors)==null?void 0:E.border)||"#84ADFF",success:((N=a==null?void 0:a.colors)==null?void 0:N.success)||"#008000",warning:((B=a==null?void 0:a.colors)==null?void 0:B.warning)||"#FFA500",error:(($=a==null?void 0:a.colors)==null?void 0:$.error)||"#FF0000",info:((A=a==null?void 0:a.colors)==null?void 0:A.info)||"#0000FF",disabled:((_=a==null?void 0:a.colors)==null?void 0:_.disabled)||"#808080",disabledBackground:((P=a==null?void 0:a.colors)==null?void 0:P.disabledBackground)||"#F5F5F5",disabledText:((q=a==null?void 0:a.colors)==null?void 0:q.disabledText)||"#808080",shadow:((O=a==null?void 0:a.colors)==null?void 0:O.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((V=a==null?void 0:a.colors)==null?void 0:V.appBackground)||"transparent",listBackground:((L=a==null?void 0:a.colors)==null?void 0:L.listBackground)||"#f9f9f9",dashboardBackground:((Z=a==null?void 0:a.colors)==null?void 0:Z.dashboardBackground)||"#ffffff",textSecondary:((Y=a==null?void 0:a.colors)==null?void 0:Y.textSecondary)||"#6b7280"},space:{sidebar:((j=a==null?void 0:a.space)==null?void 0:j.sidebar)||"260px",size:((K=a==null?void 0:a.space)==null?void 0:K.size)||"12px",radius:((U=a==null?void 0:a.space)==null?void 0:U.radius)||"6px",padding:((X=a==null?void 0:a.space)==null?void 0:X.padding)||"16px",margin:((ee=a==null?void 0:a.space)==null?void 0:ee.margin)||"20px",shadow:((R=a==null?void 0:a.space)==null?void 0:R.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((se=a==null?void 0:a.space)==null?void 0:se.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((Ce=(ye=a==null?void 0:a.fonts)==null?void 0:ye.body)==null?void 0:Ce.size)||"14px",weight:((ue=(Se=a==null?void 0:a.fonts)==null?void 0:Se.body)==null?void 0:ue.weight)||"normal",family:((G=(Fe=a==null?void 0:a.fonts)==null?void 0:Fe.body)==null?void 0:G.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((de=(ve=a==null?void 0:a.fonts)==null?void 0:ve.heading)==null?void 0:de.size)||"16px",weight:((he=(re=a==null?void 0:a.fonts)==null?void 0:re.heading)==null?void 0:he.weight)||"600",family:((be=(we=a==null?void 0:a.fonts)==null?void 0:we.heading)==null?void 0:be.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((Ee=a==null?void 0:a.others)==null?void 0:Ee.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},u={backgroundColor:((De=a==null?void 0:a.colors)==null?void 0:De.background)||"#E5EEFF",borderColor:((Ae=a==null?void 0:a.colors)==null?void 0:Ae.border)||"#84ADFF",borderRadius:((Me=a==null?void 0:a.space)==null?void 0:Me.radius)||"6px",padding:((je=a==null?void 0:a.space)==null?void 0:je.padding)||"8px 12px",margin:"2px",fontSize:((ht=(Ve=a==null?void 0:a.fonts)==null?void 0:Ve.body)==null?void 0:ht.size)||"14px",fontWeight:((Te=(it=a==null?void 0:a.fonts)==null?void 0:it.body)==null?void 0:Te.weight)||"500",minWidth:"30px",textColor:((Ie=a==null?void 0:a.colors)==null?void 0:Ie.text)||"#84ADFF"},f={...c,...n,theme:{...c.theme,...n==null?void 0:n.theme,colors:{...(Ze=c.theme)==null?void 0:Ze.colors,...(dt=n==null?void 0:n.theme)==null?void 0:dt.colors},space:{...(at=c.theme)==null?void 0:at.space,...(et=n==null?void 0:n.theme)==null?void 0:et.space},fonts:{...(Tt=c.theme)==null?void 0:Tt.fonts,...(xt=n==null?void 0:n.theme)==null?void 0:xt.fonts}},templateField:{...u,...n==null?void 0:n.templateField}},[d,p]=At(()=>Uh(e));Jt(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const yt=Uh(e);console.log("\u65B0\u7684Slate\u6570\u636E:",yt),p(yt)},[e]),Jt(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",d)},[d]);const v=St((yt,pt)=>{if(pt===Ua.SLATE&&yt){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",yt),p(yt);const ze=Ql(yt);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",ze),t==null||t(ze)}},[t]),g=St(yt=>{if(!d||d.length===0)return"";switch(yt){case"pure_string":return FC(d);case"string":return Ql(d);case"markdown":return NC(d);case"html":return TC(d);default:return Ql(d)}},[d]);return Jt(()=>{o==null||o(g)},[g,o]),H.jsx(As,{dataSource:{type:Ua.SLATE,content:d},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:v,size:"md",styles:f,enableTemplateInput:!0})};export{Yn as F,KC as N,LC as O,uu as T,jC as U,_C as a,Ua as e};