@gientech/modual 2.2.3-fix.10 → 2.2.3-fix.12
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.
- package/README.md +761 -761
- package/assets/{GientechStreamReader-r5ZTSZk2.js → GientechStreamReader-HkZu015m.js} +2 -2
- package/assets/database.svg +11 -11
- package/assets/database_add.svg +53 -53
- package/assets/database_connect.svg +66 -66
- package/assets/database_upload.svg +29 -29
- package/assets/databse.svg +6 -6
- package/assets/defaultWeLogo.svg +14 -14
- package/assets/graph.svg +4 -4
- package/assets/iconAi.svg +9 -9
- package/assets/index-BDSKWteb.js +2231 -0
- package/assets/{index-C-Hg4Bm-.js → index-vmRMPTny.js} +2 -2
- package/assets/knowledge.svg +4 -4
- package/assets/mysql.svg +14 -14
- package/assets/sensitive.svg +5 -5
- package/assets/style-DLzOHEYR.js +196 -0
- package/chat.js +1 -1
- package/chatCompare.js +1 -1
- package/database.js +2 -2
- package/databaseId.js +1 -1
- package/index.js +1 -1
- package/package.json +6 -6
- package/streamFilesReader.js +1 -1
- package/worker/pdf.worker.min.js +21 -21
- package/assets/index-BDc2zBbG.js +0 -2208
- package/assets/style-BN3Xlagx.js +0 -196
|
@@ -0,0 +1,2231 @@
|
|
|
1
|
+
import*as T from"react";import We,{useState as $t,useCallback as zt,useImperativeHandle as d4,useContext as Na,useRef as Zt,useEffect as sr,useMemo as xt,forwardRef as fi,createElement as is,createContext as Ta,useLayoutEffect as f4,useReducer as h4,Component as p4,memo as m4}from"react";import Du,{unstable_batchedUpdates as g4,createPortal as v4}from"react-dom";import{R as Rp,b as ta}from"./index-DPA1HCWQ.js";import{b3 as io,b0 as b4,ay as $p,a6 as Pn,U as Ue,O as Da,az as Pp,B as ir,bb as Ip,L as Qr,j as kt,V as He,v as _p,X as y4,K as Ln,Q as jt,b8 as ho,_ as Kt,aD as x4,l as ss,I as pn,a as v0,m as ls,aO as Tn,bU as w4,aY as C4,i as D4,aX as zp,s as Ct,av as k4,C as hi,ap as b0,a1 as jp,n as us,u as E4,ag as S4,a$ as A4,W as Sa,an as Aa,b5 as bd,b7 as Lp,bV as y0,bv as x0,b9 as B4,bW as yd,bX as w0,bY as xd,bZ as wd,N as cs,b_ as Hp,au as C0,aj as ds,b$ as F4,aS as N4,aT as T4,aU as O4,aV as rr,aW as M4,c0 as R4,a_ as $4,r as D0,q as P4,a8 as I4,aq as _4,o as Cd,b2 as z4,b1 as j4,af as Kp,c1 as L4,c2 as H4,J as Dd,A as qp,bp as kd,T as ku,c3 as K4,aG as q4,D as V4,aK as W4,z as U4,G as G4,aH as Y4,g as As}from"./index-DHK_n74G.js";import{S as Vp,P as Wp}from"./index-B4k3tK0f.js";import{D as Up,M as X4,O as Z4}from"./index-BIEKgWu0.js";import{a as Eu,R as Su}from"./LeftOutlined-DZMeGbKk.js";function Au(e){return e!=null&&e===e.window}const J4=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return Au(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!Au(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 Q4(e,t,r,n){const a=r-t;return e/=n/2,e<1?a/2*e*e*e+t:a/2*((e-=2)*e*e+2)+t}function e2(e,t={}){const{getContainer:r=()=>window,callback:n,duration:a=450}=t,i=r(),c=J4(i),u=Date.now(),f=()=>{const m=Date.now()-u,g=Q4(m>a?a:m,c,e,a);Au(i)?i.scrollTo(window.pageXOffset,g):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=g:i.scrollTop=g,m<a?io(f):typeof n=="function"&&n()};io(f)}const t2=e=>{const[t,r]=$t(null);return[zt((a,i,c)=>{const u=t??a,f=Math.min(u||0,a),d=Math.max(u||0,a),m=i.slice(f,d+1).map(e),g=m.some(w=>!c.has(w)),v=[];return m.forEach(w=>{g?(c.has(w)||v.push(w),c.add(w)):(c.delete(w),v.push(w))}),r(g?d:null),v},[t]),r]};function r2(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 n2=(e,t)=>d4(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(a,i){return r[i]?r[i]:Reflect.get(a,i)}}):r2(n,r)}),a2=e=>{const t=T.useRef(e),[,r]=b4();return[()=>t.current,n=>{t.current=n,r()}]};var Gp=function(t){if($p()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(a){return a in n.style})}return!1},o2=function(t,r){if(!Gp(t))return!1;var n=document.createElement("div"),a=n.style[t];return n.style[t]=r,n.style[t]!==a};function i2(e,t){return!Array.isArray(e)&&t!==void 0?o2(e,t):Gp(e)}function xn(e,t){return e[t]}var s2=["children"];function Yp(e,t){return"".concat(e,"-").concat(t)}function l2(e){return e&&e.type&&e.type.isTreeNode}function pi(e,t){return e??t}function po(e){var t=e||{},r=t.title,n=t._title,a=t.key,i=t.children,c=r||"title";return{title:c,_title:n||[c],key:a||"key",children:i||"children"}}function Xp(e){function t(r){var n=Ip(r);return n.map(function(a){if(!l2(a))return Da(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var i=a.key,c=a.props,u=c.children,f=Qr(c,s2),d=Ue({key:i},f),m=t(u);return m.length&&(d.children=m),d}).filter(function(a){return a})}return t(e)}function Dl(e,t,r){var n=po(r),a=n._title,i=n.key,c=n.children,u=new Set(t===!0?[]:t),f=[];function d(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return m.map(function(v,w){for(var x=Yp(g?g.pos:"0",w),C=pi(v[i],x),p,A=0;A<a.length;A+=1){var B=a[A];if(v[B]!==void 0){p=v[B];break}}var k=Object.assign(Pp(v,[].concat(ir(a),[i,c])),{title:p,key:C,parent:g,pos:x,children:null,data:v,isStart:[].concat(ir(g?g.isStart:[]),[w===0]),isEnd:[].concat(ir(g?g.isEnd:[]),[w===m.length-1])});return f.push(k),t===!0||u.has(C)?k.children=d(v[c]||[],k):k.children=[],k})}return d(e),f}function u2(e,t,r){var n={};Pn(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var a=n,i=a.childrenPropName,c=a.externalGetKey,u=a.fieldNames,f=po(u),d=f.key,m=f.children,g=i||m,v;c?typeof c=="string"?v=function(C){return C[c]}:typeof c=="function"&&(v=function(C){return c(C)}):v=function(C,p){return pi(C[d],p)};function w(x,C,p,A){var B=x?x[g]:e,k=x?Yp(p.pos,C):"0",N=x?[].concat(ir(A),[x]):[];if(x){var F=v(x,k),R={node:x,index:C,pos:k,key:F,parentPos:p.node?p.pos:null,level:p.level+1,nodes:N};t(R)}B&&B.forEach(function(S,z){w(S,z,{node:x,pos:k,level:p?p.level+1:-1},N)})}w(null)}function k0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,a=t.onProcessFinished,i=t.externalGetKey,c=t.childrenPropName,u=t.fieldNames,f=arguments.length>2?arguments[2]:void 0,d=i||f,m={},g={},v={posEntities:m,keyEntities:g};return r&&(v=r(v)||v),u2(e,function(w){var x=w.node,C=w.index,p=w.pos,A=w.key,B=w.parentPos,k=w.level,N=w.nodes,F={node:x,nodes:N,index:C,key:A,pos:p,level:k},R=pi(A,p);m[p]=F,g[R]=F,F.parent=m[B],F.parent&&(F.parent.children=F.parent.children||[],F.parent.children.push(F)),n&&n(F,v)},{externalGetKey:d,childrenPropName:c,fieldNames:u}),a&&a(v),v}function Vo(e,t){var r=t.expandedKeys,n=t.selectedKeys,a=t.loadedKeys,i=t.loadingKeys,c=t.checkedKeys,u=t.halfCheckedKeys,f=t.dragOverNodeKey,d=t.dropPosition,m=t.keyEntities,g=xn(m,e),v={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:a.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:c.indexOf(e)!==-1,halfChecked:u.indexOf(e)!==-1,pos:String(g?g.pos:""),dragOver:f===e&&d===0,dragOverGapTop:f===e&&d===-1,dragOverGapBottom:f===e&&d===1};return v}function Kr(e){var t=e.data,r=e.expanded,n=e.selected,a=e.checked,i=e.loaded,c=e.loading,u=e.halfChecked,f=e.dragOver,d=e.dragOverGapTop,m=e.dragOverGapBottom,g=e.pos,v=e.active,w=e.eventKey,x=Ue(Ue({},t),{},{expanded:r,selected:n,checked:a,loaded:i,loading:c,halfChecked:u,dragOver:f,dragOverGapTop:d,dragOverGapBottom:m,pos:g,active:v,key:w});return"props"in x||Object.defineProperty(x,"props",{get:function(){return Da(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),x}function Zp(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function c2(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,a=t.checkable;return!!(r||n)||a===!1}function d2(e,t,r,n){for(var a=new Set(e),i=new Set,c=0;c<=r;c+=1){var u=t.get(c)||new Set;u.forEach(function(g){var v=g.key,w=g.node,x=g.children,C=x===void 0?[]:x;a.has(v)&&!n(w)&&C.filter(function(p){return!n(p.node)}).forEach(function(p){a.add(p.key)})})}for(var f=new Set,d=r;d>=0;d-=1){var m=t.get(d)||new Set;m.forEach(function(g){var v=g.parent,w=g.node;if(!(n(w)||!g.parent||f.has(g.parent.key))){if(n(g.parent.node)){f.add(v.key);return}var x=!0,C=!1;(v.children||[]).filter(function(p){return!n(p.node)}).forEach(function(p){var A=p.key,B=a.has(A);x&&!B&&(x=!1),!C&&(B||i.has(A))&&(C=!0)}),x&&a.add(v.key),C&&i.add(v.key),f.add(v.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Zp(i,a))}}function f2(e,t,r,n,a){for(var i=new Set(e),c=new Set(t),u=0;u<=n;u+=1){var f=r.get(u)||new Set;f.forEach(function(v){var w=v.key,x=v.node,C=v.children,p=C===void 0?[]:C;!i.has(w)&&!c.has(w)&&!a(x)&&p.filter(function(A){return!a(A.node)}).forEach(function(A){i.delete(A.key)})})}c=new Set;for(var d=new Set,m=n;m>=0;m-=1){var g=r.get(m)||new Set;g.forEach(function(v){var w=v.parent,x=v.node;if(!(a(x)||!v.parent||d.has(v.parent.key))){if(a(v.parent.node)){d.add(w.key);return}var C=!0,p=!1;(w.children||[]).filter(function(A){return!a(A.node)}).forEach(function(A){var B=A.key,k=i.has(B);C&&!k&&(C=!1),!p&&(k||c.has(B))&&(p=!0)}),C||i.delete(w.key),p&&c.add(w.key),d.add(w.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(Zp(c,i))}}function so(e,t,r,n){var a=[],i;n?i=n:i=c2;var c=new Set(e.filter(function(m){var g=!!xn(r,m);return g||a.push(m),g})),u=new Map,f=0;Object.keys(r).forEach(function(m){var g=r[m],v=g.level,w=u.get(v);w||(w=new Set,u.set(v,w)),w.add(g),f=Math.max(f,v)}),Da(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(m){return"'".concat(m,"'")}).join(", ")));var d;return t===!0?d=d2(c,u,f,i):d=f2(c,t.halfCheckedKeys,u,f,i),d}function Jp(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function h2(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 ka(e,t,r,n){var a=Du.unstable_batchedUpdates?function(c){Du.unstable_batchedUpdates(r,c)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,a,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,a,n)}}}var mi=T.createContext(null),p2=function(t){var r=t.visible,n=t.maskTransitionName,a=t.getContainer,i=t.prefixCls,c=t.rootClassName,u=t.icons,f=t.countRender,d=t.showSwitch,m=t.showProgress,g=t.current,v=t.transform,w=t.count,x=t.scale,C=t.minScale,p=t.maxScale,A=t.closeIcon,B=t.onActive,k=t.onClose,N=t.onZoomIn,F=t.onZoomOut,R=t.onRotateRight,S=t.onRotateLeft,z=t.onFlipX,O=t.onFlipY,V=t.onReset,I=t.toolbarRender,X=t.zIndex,Z=t.image,L=Na(mi),K=u.rotateLeft,W=u.rotateRight,G=u.zoomIn,ne=u.zoomOut,q=u.close,J=u.left,me=u.right,Ce=u.flipX,we=u.flipY,Fe="".concat(i,"-operations-operation");T.useEffect(function(){var xe=function(ze){ze.keyCode===Ln.ESC&&k()};return r&&window.addEventListener("keydown",xe),function(){window.removeEventListener("keydown",xe)}},[r]);var Ie=function(Se,ze){Se.preventDefault(),Se.stopPropagation(),B(ze)},Q=T.useCallback(function(xe){var Se=xe.type,ze=xe.disabled,dt=xe.onClick,at=xe.icon;return T.createElement("div",{key:Se,className:kt(Fe,"".concat(i,"-operations-operation-").concat(Se),He({},"".concat(i,"-operations-operation-disabled"),!!ze)),onClick:dt},at)},[Fe,i]),le=d?Q({icon:J,onClick:function(Se){return Ie(Se,-1)},type:"prev",disabled:g===0}):void 0,ce=d?Q({icon:me,onClick:function(Se){return Ie(Se,1)},type:"next",disabled:g===w-1}):void 0,de=Q({icon:we,onClick:O,type:"flipY"}),Ee=Q({icon:Ce,onClick:z,type:"flipX"}),Ne=Q({icon:K,onClick:S,type:"rotateLeft"}),ge=Q({icon:W,onClick:R,type:"rotateRight"}),De=Q({icon:ne,onClick:F,type:"zoomOut",disabled:x<=C}),ke=Q({icon:G,onClick:N,type:"zoomIn",disabled:x===p}),Be=T.createElement("div",{className:"".concat(i,"-operations")},de,Ee,Ne,ge,De,ke);return T.createElement(_p,{visible:r,motionName:n},function(xe){var Se=xe.className,ze=xe.style;return T.createElement(y4,{open:!0,getContainer:a??document.body},T.createElement("div",{className:kt("".concat(i,"-operations-wrapper"),Se,c),style:Ue(Ue({},ze),{},{zIndex:X})},A===null?null:T.createElement("button",{className:"".concat(i,"-close"),onClick:k},A||q),d&&T.createElement(T.Fragment,null,T.createElement("div",{className:kt("".concat(i,"-switch-left"),He({},"".concat(i,"-switch-left-disabled"),g===0)),onClick:function(at){return Ie(at,-1)}},J),T.createElement("div",{className:kt("".concat(i,"-switch-right"),He({},"".concat(i,"-switch-right-disabled"),g===w-1)),onClick:function(at){return Ie(at,1)}},me)),T.createElement("div",{className:"".concat(i,"-footer")},m&&T.createElement("div",{className:"".concat(i,"-progress")},f?f(g+1,w):T.createElement("bdi",null,"".concat(g+1," / ").concat(w))),I?I(Be,Ue(Ue({icons:{prevIcon:le,nextIcon:ce,flipYIcon:de,flipXIcon:Ee,rotateLeftIcon:Ne,rotateRightIcon:ge,zoomOutIcon:De,zoomInIcon:ke},actions:{onActive:B,onFlipY:O,onFlipX:z,onRotateLeft:S,onRotateRight:R,onZoomOut:F,onZoomIn:N,onReset:V,onClose:k},transform:v},L?{current:g,total:w}:{}),{},{image:Z})):Be)))})},Ti={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function m2(e,t,r,n){var a=Zt(null),i=Zt([]),c=$t(Ti),u=jt(c,2),f=u[0],d=u[1],m=function(x){d(Ti),ho(Ti,f)||n==null||n({transform:Ti,action:x})},g=function(x,C){a.current===null&&(i.current=[],a.current=io(function(){d(function(p){var A=p;return i.current.forEach(function(B){A=Ue(Ue({},A),B)}),a.current=null,n==null||n({transform:A,action:C}),A})})),i.current.push(Ue(Ue({},f),x))},v=function(x,C,p,A,B){var k=e.current,N=k.width,F=k.height,R=k.offsetWidth,S=k.offsetHeight,z=k.offsetLeft,O=k.offsetTop,V=x,I=f.scale*x;I>r?(I=r,V=r/f.scale):I<t&&(I=B?I:t,V=I/f.scale);var X=p??innerWidth/2,Z=A??innerHeight/2,L=V-1,K=L*N*.5,W=L*F*.5,G=L*(X-f.x-z),ne=L*(Z-f.y-O),q=f.x-(G-K),J=f.y-(ne-W);if(x<1&&I===1){var me=R*I,Ce=S*I,we=Jp(),Fe=we.width,Ie=we.height;me<=Fe&&Ce<=Ie&&(q=0,J=0)}g({x:q,y:J,scale:I},C)};return{transform:f,resetTransform:m,updateTransform:g,dispatchZoomChange:v}}function Ed(e,t,r,n){var a=t+r,i=(r-n)/2;if(r>n){if(t>0)return He({},e,i);if(t<0&&a<n)return He({},e,-i)}else if(t<0||a>n)return He({},e,t<0?i:-i);return{}}function Qp(e,t,r,n){var a=Jp(),i=a.width,c=a.height,u=null;return e<=i&&t<=c?u={x:0,y:0}:(e>i||t>c)&&(u=Ue(Ue({},Ed("x",r,e,i)),Ed("y",n,t,c))),u}var to=1,g2=1;function v2(e,t,r,n,a,i,c){var u=a.rotate,f=a.scale,d=a.x,m=a.y,g=$t(!1),v=jt(g,2),w=v[0],x=v[1],C=Zt({diffX:0,diffY:0,transformX:0,transformY:0}),p=function(F){!t||F.button!==0||(F.preventDefault(),F.stopPropagation(),C.current={diffX:F.pageX-d,diffY:F.pageY-m,transformX:d,transformY:m},x(!0))},A=function(F){r&&w&&i({x:F.pageX-C.current.diffX,y:F.pageY-C.current.diffY},"move")},B=function(){if(r&&w){x(!1);var F=C.current,R=F.transformX,S=F.transformY,z=d!==R&&m!==S;if(!z)return;var O=e.current.offsetWidth*f,V=e.current.offsetHeight*f,I=e.current.getBoundingClientRect(),X=I.left,Z=I.top,L=u%180!==0,K=Qp(L?V:O,L?O:V,X,Z);K&&i(Ue({},K),"dragRebound")}},k=function(F){if(!(!r||F.deltaY==0)){var R=Math.abs(F.deltaY/100),S=Math.min(R,g2),z=to+S*n;F.deltaY>0&&(z=to/z),c(z,"wheel",F.clientX,F.clientY)}};return sr(function(){var N,F,R,S;if(t){R=ka(window,"mouseup",B,!1),S=ka(window,"mousemove",A,!1);try{window.top!==window.self&&(N=ka(window.top,"mouseup",B,!1),F=ka(window.top,"mousemove",A,!1))}catch{}}return function(){var z,O,V,I;(z=R)===null||z===void 0||z.remove(),(O=S)===null||O===void 0||O.remove(),(V=N)===null||V===void 0||V.remove(),(I=F)===null||I===void 0||I.remove()}},[r,w,d,m,u,t]),{isMoving:w,onMouseDown:p,onMouseMove:A,onMouseUp:B,onWheel:k}}function b2(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 e1(e){var t=e.src,r=e.isCustomPlaceholder,n=e.fallback,a=$t(r?"loading":"normal"),i=jt(a,2),c=i[0],u=i[1],f=Zt(!1),d=c==="error";sr(function(){var w=!0;return b2(t).then(function(x){!x&&w&&u("error")}),function(){w=!1}},[t]),sr(function(){r&&!f.current?u("loading"):d&&u("normal")},[t]);var m=function(){u("normal")},g=function(x){f.current=!1,c==="loading"&&x!==null&&x!==void 0&&x.complete&&(x.naturalWidth||x.naturalHeight)&&(f.current=!0,m())},v=d&&n?{src:n}:{onLoad:m,src:t};return[g,v,c]}function fs(e,t){var r=e.x-t.x,n=e.y-t.y;return Math.hypot(r,n)}function y2(e,t,r,n){var a=fs(e,r),i=fs(t,n);if(a===0&&i===0)return[e.x,e.y];var c=a/(a+i),u=e.x+c*(t.x-e.x),f=e.y+c*(t.y-e.y);return[u,f]}function x2(e,t,r,n,a,i,c){var u=a.rotate,f=a.scale,d=a.x,m=a.y,g=$t(!1),v=jt(g,2),w=v[0],x=v[1],C=Zt({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),p=function(F){C.current=Ue(Ue({},C.current),F)},A=function(F){if(t){F.stopPropagation(),x(!0);var R=F.touches,S=R===void 0?[]:R;S.length>1?p({point1:{x:S[0].clientX,y:S[0].clientY},point2:{x:S[1].clientX,y:S[1].clientY},eventType:"touchZoom"}):p({point1:{x:S[0].clientX-d,y:S[0].clientY-m},eventType:"move"})}},B=function(F){var R=F.touches,S=R===void 0?[]:R,z=C.current,O=z.point1,V=z.point2,I=z.eventType;if(S.length>1&&I==="touchZoom"){var X={x:S[0].clientX,y:S[0].clientY},Z={x:S[1].clientX,y:S[1].clientY},L=y2(O,V,X,Z),K=jt(L,2),W=K[0],G=K[1],ne=fs(X,Z)/fs(O,V);c(ne,"touchZoom",W,G,!0),p({point1:X,point2:Z,eventType:"touchZoom"})}else I==="move"&&(i({x:S[0].clientX-O.x,y:S[0].clientY-O.y},"move"),p({eventType:"move"}))},k=function(){if(r){if(w&&x(!1),p({eventType:"none"}),n>f)return i({x:0,y:0,scale:n},"touchZoom");var F=e.current.offsetWidth*f,R=e.current.offsetHeight*f,S=e.current.getBoundingClientRect(),z=S.left,O=S.top,V=u%180!==0,I=Qp(V?R:F,V?F:R,z,O);I&&i(Ue({},I),"dragRebound")}};return sr(function(){var N;return r&&t&&(N=ka(window,"touchmove",function(F){return F.preventDefault()},{passive:!1})),function(){var F;(F=N)===null||F===void 0||F.remove()}},[r,t]),{isTouching:w,onTouchStart:A,onTouchMove:B,onTouchEnd:k}}var w2=["fallback","src","imgRef"],C2=["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"],D2=function(t){var r=t.fallback,n=t.src,a=t.imgRef,i=Qr(t,w2),c=e1({src:n,fallback:r}),u=jt(c,2),f=u[0],d=u[1];return We.createElement("img",Kt({ref:function(g){a.current=g,f(g)}},i,d))},t1=function(t){var r=t.prefixCls,n=t.src,a=t.alt,i=t.imageInfo,c=t.fallback,u=t.movable,f=u===void 0?!0:u,d=t.onClose,m=t.visible,g=t.icons,v=g===void 0?{}:g,w=t.rootClassName,x=t.closeIcon,C=t.getContainer,p=t.current,A=p===void 0?0:p,B=t.count,k=B===void 0?1:B,N=t.countRender,F=t.scaleStep,R=F===void 0?.5:F,S=t.minScale,z=S===void 0?1:S,O=t.maxScale,V=O===void 0?50:O,I=t.transitionName,X=I===void 0?"zoom":I,Z=t.maskTransitionName,L=Z===void 0?"fade":Z,K=t.imageRender,W=t.imgCommonProps,G=t.toolbarRender,ne=t.onTransform,q=t.onChange,J=Qr(t,C2),me=Zt(),Ce=Na(mi),we=Ce&&k>1,Fe=Ce&&k>=1,Ie=$t(!0),Q=jt(Ie,2),le=Q[0],ce=Q[1],de=m2(me,z,V,ne),Ee=de.transform,Ne=de.resetTransform,ge=de.updateTransform,De=de.dispatchZoomChange,ke=v2(me,f,m,R,Ee,ge,De),Be=ke.isMoving,xe=ke.onMouseDown,Se=ke.onWheel,ze=x2(me,f,m,z,Ee,ge,De),dt=ze.isTouching,at=ze.onTouchStart,$e=ze.onTouchMove,Le=ze.onTouchEnd,Ge=Ee.rotate,ht=Ee.scale,et=kt(He({},"".concat(r,"-moving"),Be));sr(function(){le||ce(!0)},[le]);var nt=function(){Ne("close")},Ot=function(){De(to+R,"zoomIn")},At=function(){De(to/(to+R),"zoomOut")},Tt=function(){ge({rotate:Ge+90},"rotateRight")},Mt=function(){ge({rotate:Ge-90},"rotateLeft")},je=function(){ge({flipX:!Ee.flipX},"flipX")},he=function(){ge({flipY:!Ee.flipY},"flipY")},ut=function(){Ne("reset")},Lt=function(or){var mr=A+or;!Number.isInteger(mr)||mr<0||mr>k-1||(ce(!1),Ne(or<0?"prev":"next"),q==null||q(mr,A))},Pt=function(or){!m||!we||(or.keyCode===Ln.LEFT?Lt(-1):or.keyCode===Ln.RIGHT&&Lt(1))},Bt=function(or){m&&(ht!==1?ge({x:0,y:0,scale:1},"doubleClick"):De(to+R,"doubleClick",or.clientX,or.clientY))};sr(function(){var Ht=ka(window,"keydown",Pt,!1);return function(){Ht.remove()}},[m,we,A]);var Ft=We.createElement(D2,Kt({},W,{width:t.width,height:t.height,imgRef:me,className:"".concat(r,"-img"),alt:a,style:{transform:"translate3d(".concat(Ee.x,"px, ").concat(Ee.y,"px, 0) scale3d(").concat(Ee.flipX?"-":"").concat(ht,", ").concat(Ee.flipY?"-":"").concat(ht,", 1) rotate(").concat(Ge,"deg)"),transitionDuration:(!le||dt)&&"0s"},fallback:c,src:n,onWheel:Se,onMouseDown:xe,onDoubleClick:Bt,onTouchStart:at,onTouchMove:$e,onTouchEnd:Le,onTouchCancel:Le})),Dt=Ue({url:n,alt:a},i);return We.createElement(We.Fragment,null,We.createElement(x4,Kt({transitionName:X,maskTransitionName:L,closable:!1,keyboard:!0,prefixCls:r,onClose:d,visible:m,classNames:{wrapper:et},rootClassName:w,getContainer:C},J,{afterClose:nt}),We.createElement("div",{className:"".concat(r,"-img-wrapper")},K?K(Ft,Ue({transform:Ee,image:Dt},Ce?{current:A}:{})):Ft)),We.createElement(p2,{visible:m,transform:Ee,maskTransitionName:L,closeIcon:x,getContainer:C,prefixCls:r,rootClassName:w,icons:v,countRender:N,showSwitch:we,showProgress:Fe,current:A,count:k,scale:ht,minScale:z,maxScale:V,toolbarRender:G,onActive:Lt,onZoomIn:Ot,onZoomOut:At,onRotateRight:Tt,onRotateLeft:Mt,onFlipX:je,onFlipY:he,onClose:d,onReset:ut,zIndex:J.zIndex!==void 0?J.zIndex+1:void 0,image:Dt}))},Bu=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function k2(e){var t=T.useState({}),r=jt(t,2),n=r[0],a=r[1],i=T.useCallback(function(u,f){return a(function(d){return Ue(Ue({},d),{},He({},u,f))}),function(){a(function(d){var m=Ue({},d);return delete m[u],m})}},[]),c=T.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(ir(Bu)).includes(d)&&(f[d]=u[d])}),{data:f}}):Object.keys(n).reduce(function(u,f){var d=n[f],m=d.canPreview,g=d.data;return m&&u.push({data:g,id:f}),u},[])},[e,n]);return[c,i,!!e]}var E2=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],S2=["src"],A2=function(t){var r,n=t.previewPrefixCls,a=n===void 0?"rc-image-preview":n,i=t.children,c=t.icons,u=c===void 0?{}:c,f=t.items,d=t.preview,m=t.fallback,g=Pn(d)==="object"?d:{},v=g.visible,w=g.onVisibleChange,x=g.getContainer,C=g.current,p=g.movable,A=g.minScale,B=g.maxScale,k=g.countRender,N=g.closeIcon,F=g.onChange,R=g.onTransform,S=g.toolbarRender,z=g.imageRender,O=Qr(g,E2),V=k2(f),I=jt(V,3),X=I[0],Z=I[1],L=I[2],K=ss(0,{value:C}),W=jt(K,2),G=W[0],ne=W[1],q=$t(!1),J=jt(q,2),me=J[0],Ce=J[1],we=((r=X[G])===null||r===void 0?void 0:r.data)||{},Fe=we.src,Ie=Qr(we,S2),Q=ss(!!v,{value:v,onChange:function(dt,at){w==null||w(dt,at,G)}}),le=jt(Q,2),ce=le[0],de=le[1],Ee=$t(null),Ne=jt(Ee,2),ge=Ne[0],De=Ne[1],ke=T.useCallback(function(ze,dt,at,$e){var Le=L?X.findIndex(function(Ge){return Ge.data.src===dt}):X.findIndex(function(Ge){return Ge.id===ze});ne(Le<0?0:Le),de(!0),De({x:at,y:$e}),Ce(!0)},[X,L]);T.useEffect(function(){ce?me||ne(0):Ce(!1)},[ce]);var Be=function(dt,at){ne(dt),F==null||F(dt,at)},xe=function(){de(!1),De(null)},Se=T.useMemo(function(){return{register:Z,onPreview:ke}},[Z,ke]);return T.createElement(mi.Provider,{value:Se},i,T.createElement(t1,Kt({"aria-hidden":!ce,movable:p,visible:ce,prefixCls:a,closeIcon:N,onClose:xe,mousePosition:ge,imgCommonProps:Ie,src:Fe,fallback:m,icons:u,minScale:A,maxScale:B,getContainer:x,current:G,count:X.length,countRender:k,onTransform:R,toolbarRender:S,imageRender:z,onChange:Be},O)))},Sd=0;function B2(e,t){var r=T.useState(function(){return Sd+=1,String(Sd)}),n=jt(r,1),a=n[0],i=T.useContext(mi),c={data:t,canPreview:e};return T.useEffect(function(){if(i)return i.register(a,c)},[]),T.useEffect(function(){i&&i.register(a,c)},[e,t]),a}var F2=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],N2=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],E0=function(t){var r=t.src,n=t.alt,a=t.onPreviewClose,i=t.prefixCls,c=i===void 0?"rc-image":i,u=t.previewPrefixCls,f=u===void 0?"".concat(c,"-preview"):u,d=t.placeholder,m=t.fallback,g=t.width,v=t.height,w=t.style,x=t.preview,C=x===void 0?!0:x,p=t.className,A=t.onClick,B=t.onError,k=t.wrapperClassName,N=t.wrapperStyle,F=t.rootClassName,R=Qr(t,F2),S=d&&d!==!0,z=Pn(C)==="object"?C:{},O=z.src,V=z.visible,I=V===void 0?void 0:V,X=z.onVisibleChange,Z=X===void 0?a:X,L=z.getContainer,K=L===void 0?void 0:L,W=z.mask,G=z.maskClassName,ne=z.movable,q=z.icons,J=z.scaleStep,me=z.minScale,Ce=z.maxScale,we=z.imageRender,Fe=z.toolbarRender,Ie=Qr(z,N2),Q=O??r,le=ss(!!I,{value:I,onChange:Z}),ce=jt(le,2),de=ce[0],Ee=ce[1],Ne=e1({src:r,isCustomPlaceholder:S,fallback:m}),ge=jt(Ne,3),De=ge[0],ke=ge[1],Be=ge[2],xe=$t(null),Se=jt(xe,2),ze=Se[0],dt=Se[1],at=Na(mi),$e=!!C,Le=function(){Ee(!1),dt(null)},Ge=kt(c,k,F,He({},"".concat(c,"-error"),Be==="error")),ht=xt(function(){var At={};return Bu.forEach(function(Tt){t[Tt]!==void 0&&(At[Tt]=t[Tt])}),At},Bu.map(function(At){return t[At]})),et=xt(function(){return Ue(Ue({},ht),{},{src:Q})},[Q,ht]),nt=B2($e,et),Ot=function(Tt){var Mt=h2(Tt.target),je=Mt.left,he=Mt.top;at?at.onPreview(nt,Q,je,he):(dt({x:je,y:he}),Ee(!0)),A==null||A(Tt)};return T.createElement(T.Fragment,null,T.createElement("div",Kt({},R,{className:Ge,onClick:$e?Ot:A,style:Ue({width:g,height:v},N)}),T.createElement("img",Kt({},ht,{className:kt("".concat(c,"-img"),He({},"".concat(c,"-img-placeholder"),d===!0),p),style:Ue({height:v},w),ref:De},ke,{width:g,height:v,onError:B})),Be==="loading"&&T.createElement("div",{"aria-hidden":"true",className:"".concat(c,"-placeholder")},d),W&&$e&&T.createElement("div",{className:kt("".concat(c,"-mask"),G),style:{display:(w==null?void 0:w.display)==="none"?"none":void 0}},W)),!at&&$e&&T.createElement(t1,Kt({"aria-hidden":!de,visible:de,prefixCls:f,onClose:Le,mousePosition:ze,src:Q,alt:n,imageInfo:{width:g,height:v},fallback:m,getContainer:K,icons:q,movable:ne,scaleStep:J,minScale:me,maxScale:Ce,rootClassName:F,imageRender:we,imgCommonProps:ht,toolbarRender:Fe},Ie)))};E0.PreviewGroup=A2;var T2={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"},O2=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:T2}))},M2=T.forwardRef(O2),R2={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"},$2=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:R2}))},P2=T.forwardRef($2),I2={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"},_2=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:I2}))},Ad=T.forwardRef(_2),z2={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"},j2=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:z2}))},L2=T.forwardRef(j2),H2={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"},K2=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:H2}))},q2=T.forwardRef(K2);const Fu=e=>({position:e||"absolute",inset:0}),V2=e=>{const{iconCls:t,motionDurationSlow:r,paddingXXS:n,marginXXS:a,prefixCls:i,colorTextLightSolid:c}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:c,background:new Tn("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${i}-mask-info`]:Object.assign(Object.assign({},zp),{padding:`0 ${Ct(n)}`,[t]:{marginInlineEnd:a,svg:{verticalAlign:"baseline"}}})}},W2=e=>{const{previewCls:t,modalMaskBg:r,paddingSM:n,marginXL:a,margin:i,paddingLG:c,previewOperationColorDisabled:u,previewOperationHoverColor:f,motionDurationSlow:d,iconCls:m,colorTextLightSolid:g}=e,v=new Tn(r).setA(.1),w=v.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:a,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:i},[`${t}-close`]:{position:"fixed",top:a,right:{_skip_check_:!0,value:a},display:"flex",color:g,backgroundColor:v.toRgbString(),borderRadius:"50%",padding:n,outline:0,border:0,cursor:"pointer",transition:`all ${d}`,"&:hover":{backgroundColor:w.toRgbString()},[`& > ${m}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${Ct(c)}`,backgroundColor:v.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:n,padding:n,cursor:"pointer",transition:`all ${d}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${m}`]:{color:f},"&-disabled":{color:u,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${m}`]:{fontSize:e.previewOperationSize}}}}},U2=e=>{const{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:n,previewCls:a,zIndexPopup:i,motionDurationSlow:c}=e,u=new Tn(t).setA(.1),f=u.clone().setA(.2);return{[`${a}-switch-left, ${a}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(i).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}},[`${a}-switch-left`]:{insetInlineStart:e.marginSM},[`${a}-switch-right`]:{insetInlineEnd:e.marginSM}}},G2=e=>{const{motionEaseOut:t,previewCls:r,motionDurationSlow:n,componentCls:a}=e;return[{[`${a}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:Object.assign(Object.assign({},Fu()),{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({},Fu()),{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"}}}}},{[`${a}-preview-root`]:{[`${r}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${a}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[W2(e),U2(e)]}]},Y2=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({},V2(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},Fu())}}},X2=e=>{const{previewCls:t}=e;return{[`${t}-root`]:D4(e,"zoom"),"&":C4(e,!0)}},Z2=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new Tn(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new Tn(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new Tn(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),r1=v0("Image",e=>{const t=`${e.componentCls}-preview`,r=ls(e,{previewCls:t,modalMaskBg:new Tn("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[Y2(r),G2(r),w4(ls(r,{componentCls:t})),X2(r)]},Z2);var J2=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const n1={rotateLeft:T.createElement(M2,null),rotateRight:T.createElement(P2,null),zoomIn:T.createElement(L2,null),zoomOut:T.createElement(q2,null),close:T.createElement(k4,null),left:T.createElement(Su,null),right:T.createElement(Eu,null),flipX:T.createElement(Ad,null),flipY:T.createElement(Ad,{rotate:90})},Q2=e=>{var{previewPrefixCls:t,preview:r}=e,n=J2(e,["previewPrefixCls","preview"]);const{getPrefixCls:a,direction:i}=T.useContext(hi),c=a("image",t),u=`${c}-preview`,f=a(),d=b0(c),[m,g,v]=r1(c,d),[w]=jp("ImagePreview",typeof r=="object"?r.zIndex:void 0),x=T.useMemo(()=>Object.assign(Object.assign({},n1),{left:i==="rtl"?T.createElement(Eu,null):T.createElement(Su,null),right:i==="rtl"?T.createElement(Su,null):T.createElement(Eu,null)}),[i]),C=T.useMemo(()=>{var p;if(r===!1)return r;const A=typeof r=="object"?r:{},B=kt(g,v,d,(p=A.rootClassName)!==null&&p!==void 0?p:"");return Object.assign(Object.assign({},A),{transitionName:us(f,"zoom",A.transitionName),maskTransitionName:us(f,"fade",A.maskTransitionName),rootClassName:B,zIndex:w})},[r,f,w,g,v,d]);return m(T.createElement(E0.PreviewGroup,Object.assign({preview:C,previewPrefixCls:u,icons:x},n)))};var Bd=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const a1=e=>{const{prefixCls:t,preview:r,className:n,rootClassName:a,style:i,fallback:c}=e,u=Bd(e,["prefixCls","preview","className","rootClassName","style","fallback"]),{getPrefixCls:f,getPopupContainer:d,className:m,style:g,preview:v,fallback:w}=E4("image"),[x]=S4("Image"),C=f("image",t),p=f(),A=b0(C),[B,k,N]=r1(C,A),F=kt(a,k,N,A),R=kt(n,k,m),[S]=jp("ImagePreview",typeof r=="object"?r.zIndex:void 0),z=T.useMemo(()=>{if(r===!1)return r;const I=typeof r=="object"?r:{},{getContainer:X,closeIcon:Z,rootClassName:L,destroyOnClose:K,destroyOnHidden:W}=I,G=Bd(I,["getContainer","closeIcon","rootClassName","destroyOnClose","destroyOnHidden"]);return Object.assign(Object.assign({mask:T.createElement("div",{className:`${C}-mask-info`},T.createElement(A4,null),x==null?void 0:x.preview),icons:n1},G),{destroyOnClose:W??K,rootClassName:kt(F,L),getContainer:X??d,transitionName:us(p,"zoom",I.transitionName),maskTransitionName:us(p,"fade",I.maskTransitionName),zIndex:S,closeIcon:Z??(v==null?void 0:v.closeIcon)})},[r,x,v==null?void 0:v.closeIcon]),O=Object.assign(Object.assign({},g),i),V=c??w;return B(T.createElement(E0,Object.assign({prefixCls:C,preview:z,rootClassName:F,className:R,style:O,fallback:V},u)))};a1.PreviewGroup=Q2;var xa={},gi="rc-table-internal-hook";function S0(e){var t=T.createContext(void 0),r=function(a){var i=a.value,c=a.children,u=T.useRef(i);u.current=i;var f=T.useState(function(){return{getValue:function(){return u.current},listeners:new Set}}),d=jt(f,1),m=d[0];return Sa(function(){g4(function(){m.listeners.forEach(function(g){g(i)})})},[i]),T.createElement(t.Provider,{value:m},c)};return{Context:t,Provider:r,defaultValue:e}}function Zr(e,t){var r=Aa(typeof t=="function"?t:function(g){if(t===void 0)return g;if(!Array.isArray(t))return g[t];var v={};return t.forEach(function(w){v[w]=g[w]}),v}),n=T.useContext(e==null?void 0:e.Context),a=n||{},i=a.listeners,c=a.getValue,u=T.useRef();u.current=r(n?c():e==null?void 0:e.defaultValue);var f=T.useState({}),d=jt(f,2),m=d[1];return Sa(function(){if(!n)return;function g(v){var w=r(v);ho(u.current,w,!0)||m({})}return i.add(g),function(){i.delete(g)}},[n]),u.current}function e3(){var e=T.createContext(null);function t(){return T.useContext(e)}function r(a,i){var c=bd(a),u=function(d,m){var g=c?{ref:m}:{},v=T.useRef(0),w=T.useRef(d),x=t();return x!==null?T.createElement(a,Kt({},d,g)):((!i||i(w.current,d))&&(v.current+=1),w.current=d,T.createElement(e.Provider,{value:v.current},T.createElement(a,Kt({},d,g))))};return c?T.forwardRef(u):u}function n(a,i){var c=bd(a),u=function(d,m){var g=c?{ref:m}:{};return t(),T.createElement(a,Kt({},d,g))};return c?T.memo(T.forwardRef(u),i):T.memo(u,i)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var A0=e3(),o1=A0.makeImmutable,Co=A0.responseImmutable,t3=A0.useImmutableMark,rn=S0(),i1=T.createContext({renderWithProps:!1}),r3="RC_TABLE_KEY";function n3(e){return e==null?[]:Array.isArray(e)?e:[e]}function Bs(e){var t=[],r={};return e.forEach(function(n){for(var a=n||{},i=a.key,c=a.dataIndex,u=i||n3(c).join("-")||r3;r[u];)u="".concat(u,"_next");r[u]=!0,t.push(u)}),t}function Nu(e){return e!=null}function a3(e){return typeof e=="number"&&!Number.isNaN(e)}function o3(e){return e&&Pn(e)==="object"&&!Array.isArray(e)&&!T.isValidElement(e)}function i3(e,t,r,n,a,i){var c=T.useContext(i1),u=t3(),f=Lp(function(){if(Nu(n))return[n];var d=t==null||t===""?[]:Array.isArray(t)?t:[t],m=y0(e,d),g=m,v=void 0;if(a){var w=a(m,e,r);o3(w)?(g=w.children,v=w.props,c.renderWithProps=!0):g=w}return[g,v]},[u,e,n,t,a,r],function(d,m){if(i){var g=jt(d,2),v=g[1],w=jt(m,2),x=w[1];return i(x,v)}return c.renderWithProps?!0:!ho(d,m,!0)});return f}function s3(e,t,r,n){var a=e+t-1;return e<=n&&a>=r}function l3(e,t){return Zr(rn,function(r){var n=s3(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var u3=function(t){var r=t.ellipsis,n=t.rowType,a=t.children,i,c=r===!0?{showTitle:!0}:r;return c&&(c.showTitle||n==="header")&&(typeof a=="string"||typeof a=="number"?i=a.toString():T.isValidElement(a)&&typeof a.props.children=="string"&&(i=a.props.children)),i};function c3(e){var t,r,n,a,i,c,u,f,d=e.component,m=e.children,g=e.ellipsis,v=e.scope,w=e.prefixCls,x=e.className,C=e.align,p=e.record,A=e.render,B=e.dataIndex,k=e.renderIndex,N=e.shouldCellUpdate,F=e.index,R=e.rowType,S=e.colSpan,z=e.rowSpan,O=e.fixLeft,V=e.fixRight,I=e.firstFixLeft,X=e.lastFixLeft,Z=e.firstFixRight,L=e.lastFixRight,K=e.appendNode,W=e.additionalProps,G=W===void 0?{}:W,ne=e.isSticky,q="".concat(w,"-cell"),J=Zr(rn,["supportSticky","allColumnsFixedLeft","rowHoverable"]),me=J.supportSticky,Ce=J.allColumnsFixedLeft,we=J.rowHoverable,Fe=i3(p,B,k,m,A,N),Ie=jt(Fe,2),Q=Ie[0],le=Ie[1],ce={},de=typeof O=="number"&&me,Ee=typeof V=="number"&&me;de&&(ce.position="sticky",ce.left=O),Ee&&(ce.position="sticky",ce.right=V);var Ne=(t=(r=(n=le==null?void 0:le.colSpan)!==null&&n!==void 0?n:G.colSpan)!==null&&r!==void 0?r:S)!==null&&t!==void 0?t:1,ge=(a=(i=(c=le==null?void 0:le.rowSpan)!==null&&c!==void 0?c:G.rowSpan)!==null&&i!==void 0?i:z)!==null&&a!==void 0?a:1,De=l3(F,ge),ke=jt(De,2),Be=ke[0],xe=ke[1],Se=Aa(function(ht){var et;p&&xe(F,F+ge-1),G==null||(et=G.onMouseEnter)===null||et===void 0||et.call(G,ht)}),ze=Aa(function(ht){var et;p&&xe(-1,-1),G==null||(et=G.onMouseLeave)===null||et===void 0||et.call(G,ht)});if(Ne===0||ge===0)return null;var dt=(u=G.title)!==null&&u!==void 0?u:u3({rowType:R,ellipsis:g,children:Q}),at=kt(q,x,(f={},He(He(He(He(He(He(He(He(He(He(f,"".concat(q,"-fix-left"),de&&me),"".concat(q,"-fix-left-first"),I&&me),"".concat(q,"-fix-left-last"),X&&me),"".concat(q,"-fix-left-all"),X&&Ce&&me),"".concat(q,"-fix-right"),Ee&&me),"".concat(q,"-fix-right-first"),Z&&me),"".concat(q,"-fix-right-last"),L&&me),"".concat(q,"-ellipsis"),g),"".concat(q,"-with-append"),K),"".concat(q,"-fix-sticky"),(de||Ee)&&ne&&me),He(f,"".concat(q,"-row-hover"),!le&&Be)),G.className,le==null?void 0:le.className),$e={};C&&($e.textAlign=C);var Le=Ue(Ue(Ue(Ue({},le==null?void 0:le.style),ce),$e),G.style),Ge=Q;return Pn(Ge)==="object"&&!Array.isArray(Ge)&&!T.isValidElement(Ge)&&(Ge=null),g&&(X||Z)&&(Ge=T.createElement("span",{className:"".concat(q,"-content")},Ge)),T.createElement(d,Kt({},le,G,{className:at,style:Le,title:dt,scope:v,onMouseEnter:we?Se:void 0,onMouseLeave:we?ze:void 0,colSpan:Ne!==1?Ne:null,rowSpan:ge!==1?ge:null}),K,Ge)}const Do=T.memo(c3);function B0(e,t,r,n,a){var i=r[e]||{},c=r[t]||{},u,f;i.fixed==="left"?u=n.left[a==="rtl"?t:e]:c.fixed==="right"&&(f=n.right[a==="rtl"?e:t]);var d=!1,m=!1,g=!1,v=!1,w=r[t+1],x=r[e-1],C=w&&!w.fixed||x&&!x.fixed||r.every(function(N){return N.fixed==="left"});if(a==="rtl"){if(u!==void 0){var p=x&&x.fixed==="left";v=!p&&C}else if(f!==void 0){var A=w&&w.fixed==="right";g=!A&&C}}else if(u!==void 0){var B=w&&w.fixed==="left";d=!B&&C}else if(f!==void 0){var k=x&&x.fixed==="right";m=!k&&C}return{fixLeft:u,fixRight:f,lastFixLeft:d,firstFixRight:m,lastFixRight:g,firstFixLeft:v,isSticky:n.isSticky}}var s1=T.createContext({});function d3(e){var t=e.className,r=e.index,n=e.children,a=e.colSpan,i=a===void 0?1:a,c=e.rowSpan,u=e.align,f=Zr(rn,["prefixCls","direction"]),d=f.prefixCls,m=f.direction,g=T.useContext(s1),v=g.scrollColumnIndex,w=g.stickyOffsets,x=g.flattenColumns,C=r+i-1,p=C+1===v?i+1:i,A=B0(r,r+p-1,x,w,m);return T.createElement(Do,Kt({className:t,index:r,component:"td",prefixCls:d,record:null,dataIndex:null,align:u,colSpan:p,rowSpan:c,render:function(){return n}},A))}var f3=["children"];function h3(e){var t=e.children,r=Qr(e,f3);return T.createElement("tr",r,t)}function Fs(e){var t=e.children;return t}Fs.Row=h3;Fs.Cell=d3;function p3(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,a=Zr(rn,"prefixCls"),i=n.length-1,c=n[i],u=T.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:c!=null&&c.scrollbar?i:null}},[c,n,i,r]);return T.createElement(s1.Provider,{value:u},T.createElement("tfoot",{className:"".concat(a,"-summary")},t))}const Oi=Co(p3);var l1=Fs;function m3(e){return null}function g3(e){return null}function u1(e,t,r,n,a,i,c){var u=i(t,c);e.push({record:t,indent:r,index:c,rowKey:u});var f=a==null?void 0:a.has(u);if(t&&Array.isArray(t[n])&&f)for(var d=0;d<t[n].length;d+=1)u1(e,t[n][d],r+1,n,a,i,d)}function c1(e,t,r,n){var a=T.useMemo(function(){if(r!=null&&r.size){for(var i=[],c=0;c<(e==null?void 0:e.length);c+=1){var u=e[c];u1(i,u,0,t,r,n,c)}return i}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 a}function d1(e,t,r,n){var a=Zr(rn,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),i=a.flattenColumns,c=a.expandableType,u=a.expandedKeys,f=a.childrenColumnName,d=a.onTriggerExpand,m=a.rowExpandable,g=a.onRow,v=a.expandRowByClick,w=a.rowClassName,x=c==="nest",C=c==="row"&&(!m||m(e)),p=C||x,A=u&&u.has(t),B=f&&e&&e[f],k=Aa(d),N=g==null?void 0:g(e,r),F=N==null?void 0:N.onClick,R=function(V){v&&p&&d(e,V);for(var I=arguments.length,X=new Array(I>1?I-1:0),Z=1;Z<I;Z++)X[Z-1]=arguments[Z];F==null||F.apply(void 0,[V].concat(X))},S;typeof w=="string"?S=w:typeof w=="function"&&(S=w(e,r,n));var z=Bs(i);return Ue(Ue({},a),{},{columnsKey:z,nestExpandable:x,expanded:A,hasNestChildren:B,record:e,onTriggerExpand:k,rowSupportExpand:C,expandable:p,rowProps:Ue(Ue({},N),{},{className:kt(S,N==null?void 0:N.className),onClick:R})})}function f1(e){var t=e.prefixCls,r=e.children,n=e.component,a=e.cellComponent,i=e.className,c=e.expanded,u=e.colSpan,f=e.isEmpty,d=e.stickyOffset,m=d===void 0?0:d,g=Zr(rn,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),v=g.scrollbarSize,w=g.fixHeader,x=g.fixColumn,C=g.componentWidth,p=g.horizonScroll,A=r;return(f?p&&C:x)&&(A=T.createElement("div",{style:{width:C-m-(w&&!f?v:0),position:"sticky",left:m,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},A)),T.createElement(n,{className:i,style:{display:c?null:"none"}},T.createElement(Do,{component:a,prefixCls:t,colSpan:u},A))}function v3(e){var t=e.prefixCls,r=e.record,n=e.onExpand,a=e.expanded,i=e.expandable,c="".concat(t,"-row-expand-icon");if(!i)return T.createElement("span",{className:kt(c,"".concat(t,"-row-spaced"))});var u=function(d){n(r,d),d.stopPropagation()};return T.createElement("span",{className:kt(c,He(He({},"".concat(t,"-row-expanded"),a),"".concat(t,"-row-collapsed"),!a)),onClick:u})}function b3(e,t,r){var n=[];function a(i){(i||[]).forEach(function(c,u){n.push(t(c,u)),a(c[r])})}return a(e),n}function h1(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function p1(e,t,r,n,a){var i,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,m=e.columnsKey,g=e.fixedInfoList,v=e.expandIconColumnIndex,w=e.nestExpandable,x=e.indentSize,C=e.expandIcon,p=e.expanded,A=e.hasNestChildren,B=e.onTriggerExpand,k=e.expandable,N=e.expandedKeys,F=m[r],R=g[r],S;r===(v||0)&&w&&(S=T.createElement(T.Fragment,null,T.createElement("span",{style:{paddingLeft:"".concat(x*n,"px")},className:"".concat(d,"-row-indent indent-level-").concat(n)}),C({prefixCls:d,expanded:p,expandable:A,record:f,onExpand:B})));var z=((i=t.onCell)===null||i===void 0?void 0:i.call(t,f,a))||{};if(u){var O=z.rowSpan,V=O===void 0?1:O;if(k&&V&&r<u){for(var I=V,X=a;X<a+V;X+=1){var Z=c[X];N.has(Z)&&(I+=1)}z.rowSpan=I}}return{key:F,fixedInfo:R,appendCellNode:S,additionalCellProps:z}}function y3(e){var t=e.className,r=e.style,n=e.record,a=e.index,i=e.renderIndex,c=e.rowKey,u=e.rowKeys,f=e.indent,d=f===void 0?0:f,m=e.rowComponent,g=e.cellComponent,v=e.scopeCellComponent,w=e.expandedRowInfo,x=d1(n,c,a,d),C=x.prefixCls,p=x.flattenColumns,A=x.expandedRowClassName,B=x.expandedRowRender,k=x.rowProps,N=x.expanded,F=x.rowSupportExpand,R=T.useRef(!1);R.current||(R.current=N);var S=h1(A,n,a,d),z=T.createElement(m,Kt({},k,{"data-row-key":c,className:kt(t,"".concat(C,"-row"),"".concat(C,"-row-level-").concat(d),k==null?void 0:k.className,He({},S,d>=1)),style:Ue(Ue({},r),k==null?void 0:k.style)}),p.map(function(I,X){var Z=I.render,L=I.dataIndex,K=I.className,W=p1(x,I,X,d,a,u,w==null?void 0:w.offset),G=W.key,ne=W.fixedInfo,q=W.appendCellNode,J=W.additionalCellProps;return T.createElement(Do,Kt({className:K,ellipsis:I.ellipsis,align:I.align,scope:I.rowScope,component:I.rowScope?v:g,prefixCls:C,key:G,record:n,index:a,renderIndex:i,dataIndex:L,render:Z,shouldCellUpdate:I.shouldCellUpdate},ne,{appendNode:q,additionalProps:J}))})),O;if(F&&(R.current||N)){var V=B(n,a,d+1,N);O=T.createElement(f1,{expanded:N,className:kt("".concat(C,"-expanded-row"),"".concat(C,"-expanded-row-level-").concat(d+1),S),prefixCls:C,component:m,cellComponent:g,colSpan:w?w.colSpan:p.length,stickyOffset:w==null?void 0:w.sticky,isEmpty:!1},V)}return T.createElement(T.Fragment,null,z,O)}const x3=Co(y3);function w3(e){var t=e.columnKey,r=e.onColumnResize,n=e.prefixCls,a=e.title,i=T.useRef();return Sa(function(){i.current&&r(t,i.current.offsetWidth)},[]),T.createElement(x0,{data:t},T.createElement("th",{ref:i,className:"".concat(n,"-measure-cell")},T.createElement("div",{className:"".concat(n,"-measure-cell-content")},a||"\xA0")))}function C3(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,a=e.columns,i=T.useRef(null),c=Zr(rn,["measureRowRender"]),u=c.measureRowRender,f=T.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),ref:i,tabIndex:-1},T.createElement(x0.Collection,{onBatchResize:function(m){B4(i.current)&&m.forEach(function(g){var v=g.data,w=g.size;n(v,w.offsetWidth)})}},r.map(function(d){var m=a.find(function(w){return w.key===d}),g=m==null?void 0:m.title,v=T.isValidElement(g)?T.cloneElement(g,{ref:null}):g;return T.createElement(w3,{prefixCls:t,key:d,columnKey:d,onColumnResize:n,title:v})})));return u?u(f):f}function D3(e){var t=e.data,r=e.measureColumnWidth,n=Zr(rn,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),a=n.prefixCls,i=n.getComponent,c=n.onColumnResize,u=n.flattenColumns,f=n.getRowKey,d=n.expandedKeys,m=n.childrenColumnName,g=n.emptyNode,v=n.expandedRowOffset,w=v===void 0?0:v,x=n.colWidths,C=c1(t,m,d,f),p=T.useMemo(function(){return C.map(function(O){return O.rowKey})},[C]),A=T.useRef({renderWithProps:!1}),B=T.useMemo(function(){for(var O=u.length-w,V=0,I=0;I<w;I+=1)V+=x[I]||0;return{offset:w,colSpan:O,sticky:V}},[u.length,w,x]),k=i(["body","wrapper"],"tbody"),N=i(["body","row"],"tr"),F=i(["body","cell"],"td"),R=i(["body","cell"],"th"),S;t.length?S=C.map(function(O,V){var I=O.record,X=O.indent,Z=O.index,L=O.rowKey;return T.createElement(x3,{key:L,rowKey:L,rowKeys:p,record:I,index:V,renderIndex:Z,rowComponent:N,cellComponent:F,scopeCellComponent:R,indent:X,expandedRowInfo:B})}):S=T.createElement(f1,{expanded:!0,className:"".concat(a,"-placeholder"),prefixCls:a,component:N,cellComponent:F,colSpan:u.length,isEmpty:!0},g);var z=Bs(u);return T.createElement(i1.Provider,{value:A.current},T.createElement(k,{className:"".concat(a,"-tbody")},r&&T.createElement(C3,{prefixCls:a,columnsKey:z,onColumnResize:c,columns:u}),S))}const k3=Co(D3);var E3=["expandable"],Wo="RC_TABLE_INTERNAL_COL_DEFINE";function S3(e){var t=e.expandable,r=Qr(e,E3),n;return"expandable"in e?n=Ue(Ue({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var A3=["columnType"];function m1(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,a=Zr(rn,["tableLayout"]),i=a.tableLayout,c=[],u=n||r.length,f=!1,d=u-1;d>=0;d-=1){var m=t[d],g=r&&r[d],v=void 0,w=void 0;if(g&&(v=g[Wo],i==="auto"&&(w=g.minWidth)),m||w||v||f){var x=v||{};x.columnType;var C=Qr(x,A3);c.unshift(T.createElement("col",Kt({key:d,style:{width:m,minWidth:w}},C))),f=!0}}return c.length>0?T.createElement("colgroup",null,c):null}var B3=["className","noData","columns","flattenColumns","colWidths","colGroup","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","scrollX","tableLayout","onScroll","children"];function F3(e,t){return xt(function(){for(var r=[],n=0;n<t;n+=1){var a=e[n];if(a!==void 0)r[n]=a;else return null}return r},[e.join("_"),t])}var N3=T.forwardRef(function(e,t){var r=e.className,n=e.noData,a=e.columns,i=e.flattenColumns,c=e.colWidths,u=e.colGroup,f=e.columCount,d=e.stickyOffsets,m=e.direction,g=e.fixHeader,v=e.stickyTopOffset,w=e.stickyBottomOffset,x=e.stickyClassName,C=e.scrollX,p=e.tableLayout,A=p===void 0?"fixed":p,B=e.onScroll,k=e.children,N=Qr(e,B3),F=Zr(rn,["prefixCls","scrollbarSize","isSticky","getComponent"]),R=F.prefixCls,S=F.scrollbarSize,z=F.isSticky,O=F.getComponent,V=O(["header","table"],"table"),I=z&&!g?0:S,X=T.useRef(null),Z=T.useCallback(function(me){yd(t,me),yd(X,me)},[]);T.useEffect(function(){function me(we){var Fe=we,Ie=Fe.currentTarget,Q=Fe.deltaX;Q&&(B({currentTarget:Ie,scrollLeft:Ie.scrollLeft+Q}),we.preventDefault())}var Ce=X.current;return Ce==null||Ce.addEventListener("wheel",me,{passive:!1}),function(){Ce==null||Ce.removeEventListener("wheel",me)}},[]);var L=i[i.length-1],K={fixed:L?L.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(R,"-cell-scrollbar")}}},W=xt(function(){return I?[].concat(ir(a),[K]):a},[I,a]),G=xt(function(){return I?[].concat(ir(i),[K]):i},[I,i]),ne=xt(function(){var me=d.right,Ce=d.left;return Ue(Ue({},d),{},{left:m==="rtl"?[].concat(ir(Ce.map(function(we){return we+I})),[0]):Ce,right:m==="rtl"?me:[].concat(ir(me.map(function(we){return we+I})),[0]),isSticky:z})},[I,d,z]),q=F3(c,f),J=xt(function(){var me=!q||!q.length||q.every(function(Ce){return!Ce});return n||me},[n,q]);return T.createElement("div",{style:Ue({overflow:"hidden"},z?{top:v,bottom:w}:{}),ref:Z,className:kt(r,He({},x,!!x))},T.createElement(V,{style:{tableLayout:A,minWidth:"100%",width:C}},J?u:T.createElement(m1,{colWidths:[].concat(ir(q),[I]),columCount:f+1,columns:G}),k(Ue(Ue({},N),{},{stickyOffsets:ne,columns:W,flattenColumns:G}))))});const Fd=T.memo(N3);var T3=function(t){var r=t.cells,n=t.stickyOffsets,a=t.flattenColumns,i=t.rowComponent,c=t.cellComponent,u=t.onHeaderRow,f=t.index,d=Zr(rn,["prefixCls","direction"]),m=d.prefixCls,g=d.direction,v;u&&(v=u(r.map(function(x){return x.column}),f));var w=Bs(r.map(function(x){return x.column}));return T.createElement(i,v,r.map(function(x,C){var p=x.column,A=B0(x.colStart,x.colEnd,a,n,g),B;return p&&p.onHeaderCell&&(B=x.column.onHeaderCell(p)),T.createElement(Do,Kt({},x,{scope:p.title?x.colSpan>1?"colgroup":"col":null,ellipsis:p.ellipsis,align:p.align,component:c,prefixCls:m,key:w[C]},A,{additionalProps:B,rowType:"header"}))}))};function O3(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,m=c.filter(Boolean).map(function(g){var v={key:g.key,className:g.className||"",children:g.title,column:g,colStart:d},w=1,x=g.children;return x&&x.length>0&&(w=r(x,d,f+1).reduce(function(C,p){return C+p},0),v.hasSubColumns=!0),"colSpan"in g&&(w=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=w,v.colEnd=v.colStart+w-1,t[f].push(v),d+=w,w});return m}r(e,0);for(var n=t.length,a=function(u){t[u].forEach(function(f){!("rowSpan"in f)&&!f.hasSubColumns&&(f.rowSpan=n-u)})},i=0;i<n;i+=1)a(i);return t}var M3=function(t){var r=t.stickyOffsets,n=t.columns,a=t.flattenColumns,i=t.onHeaderRow,c=Zr(rn,["prefixCls","getComponent"]),u=c.prefixCls,f=c.getComponent,d=T.useMemo(function(){return O3(n)},[n]),m=f(["header","wrapper"],"thead"),g=f(["header","row"],"tr"),v=f(["header","cell"],"th");return T.createElement(m,{className:"".concat(u,"-thead")},d.map(function(w,x){var C=T.createElement(T3,{key:x,flattenColumns:a,cells:w,stickyOffsets:r,rowComponent:g,cellComponent:v,onHeaderRow:i,index:x});return C}))};const Nd=Co(M3);function Td(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 R3(e,t,r){return T.useMemo(function(){if(t&&t>0){var n=0,a=0;e.forEach(function(v){var w=Td(t,v.width);w?n+=w:a+=1});var i=Math.max(t,r),c=Math.max(i-n,a),u=a,f=c/a,d=0,m=e.map(function(v){var w=Ue({},v),x=Td(t,w.width);if(x)w.width=x;else{var C=Math.floor(f);w.width=u===1?c:C,c-=C,u-=1}return d+=w.width,w});if(d<i){var g=i/d;c=i,m.forEach(function(v,w){var x=Math.floor(v.width*g);v.width=w===m.length-1?c:x,c-=x})}return[m,Math.max(d,i)]}return[e,t]},[e,t,r])}var $3=["children"],P3=["fixed"];function F0(e){return Ip(e).filter(function(t){return T.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,a=n.children,i=Qr(n,$3),c=Ue({key:r},i);return a&&(c.children=F0(a)),c})}function g1(e){return e.filter(function(t){return t&&Pn(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?Ue(Ue({},t),{},{children:g1(r)}):t})}function Tu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&Pn(r)==="object"}).reduce(function(r,n,a){var i=n.fixed,c=i===!0?"left":i,u="".concat(t,"-").concat(a),f=n.children;return f&&f.length>0?[].concat(ir(r),ir(Tu(f,u).map(function(d){var m;return Ue(Ue({},d),{},{fixed:(m=d.fixed)!==null&&m!==void 0?m:c})}))):[].concat(ir(r),[Ue(Ue({key:u},n),{},{fixed:c})])},[])}function I3(e){return e.map(function(t){var r=t.fixed,n=Qr(t,P3),a=r;return r==="left"?a="right":r==="right"&&(a="left"),Ue({fixed:a},n)})}function _3(e,t){var r=e.prefixCls,n=e.columns,a=e.children,i=e.expandable,c=e.expandedKeys,u=e.columnTitle,f=e.getRowKey,d=e.onTriggerExpand,m=e.expandIcon,g=e.rowExpandable,v=e.expandIconColumnIndex,w=e.expandedRowOffset,x=w===void 0?0:w,C=e.direction,p=e.expandRowByClick,A=e.columnWidth,B=e.fixed,k=e.scrollWidth,N=e.clientWidth,F=T.useMemo(function(){var L=n||F0(a)||[];return g1(L.slice())},[n,a]),R=T.useMemo(function(){if(i){var L=F.slice();if(!L.includes(xa)){var K=v||0,W=K===0&&B==="right"?F.length:K;W>=0&&L.splice(W,0,xa)}var G=L.indexOf(xa);L=L.filter(function(me,Ce){return me!==xa||Ce===G});var ne=F[G],q;B?q=B:q=ne?ne.fixed:null;var J=He(He(He(He(He(He({},Wo,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",u),"fixed",q),"className","".concat(r,"-row-expand-icon-cell")),"width",A),"render",function(Ce,we,Fe){var Ie=f(we,Fe),Q=c.has(Ie),le=g?g(we):!0,ce=m({prefixCls:r,expanded:Q,expandable:le,record:we,onExpand:d});return p?T.createElement("span",{onClick:function(Ee){return Ee.stopPropagation()}},ce):ce});return L.map(function(me,Ce){var we=me===xa?J:me;return Ce<x?Ue(Ue({},we),{},{fixed:we.fixed||"left"}):we})}return F.filter(function(me){return me!==xa})},[i,F,f,c,m,C,x]),S=T.useMemo(function(){var L=R;return t&&(L=t(L)),L.length||(L=[{render:function(){return null}}]),L},[t,R,C]),z=T.useMemo(function(){return C==="rtl"?I3(Tu(S)):Tu(S)},[S,C,k]),O=T.useMemo(function(){for(var L=-1,K=z.length-1;K>=0;K-=1){var W=z[K].fixed;if(W==="left"||W===!0){L=K;break}}if(L>=0)for(var G=0;G<=L;G+=1){var ne=z[G].fixed;if(ne!=="left"&&ne!==!0)return!0}var q=z.findIndex(function(Ce){var we=Ce.fixed;return we==="right"});if(q>=0)for(var J=q;J<z.length;J+=1){var me=z[J].fixed;if(me!=="right")return!0}return!1},[z]),V=R3(z,k,N),I=jt(V,2),X=I[0],Z=I[1];return[S,X,Z,O]}function z3(e,t,r){var n=S3(e),a=n.expandIcon,i=n.expandedRowKeys,c=n.defaultExpandedRowKeys,u=n.defaultExpandAllRows,f=n.expandedRowRender,d=n.onExpand,m=n.onExpandedRowsChange,g=n.childrenColumnName,v=a||v3,w=g||"children",x=T.useMemo(function(){return f?"row":e.expandable&&e.internalHooks===gi&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(F){return F&&Pn(F)==="object"&&F[w]})?"nest":!1},[!!f,t]),C=T.useState(function(){return c||(u?b3(t,r,w):[])}),p=jt(C,2),A=p[0],B=p[1],k=T.useMemo(function(){return new Set(i||A||[])},[i,A]),N=T.useCallback(function(F){var R=r(F,t.indexOf(F)),S,z=k.has(R);z?(k.delete(R),S=ir(k)):S=[].concat(ir(k),[R]),B(S),d&&d(!z,F),m&&m(S)},[r,k,t,d,m]);return[n,x,k,v,w,N]}function j3(e,t,r){var n=e.map(function(a,i){return B0(i,i,e,t,r)});return Lp(function(){return n},[n],function(a,i){return!ho(a,i)})}function L3(e){var t=Zt(e),r=$t({}),n=jt(r,2),a=n[1],i=Zt(null),c=Zt([]);function u(f){c.current.push(f);var d=Promise.resolve();i.current=d,d.then(function(){if(i.current===d){var m=c.current,g=t.current;c.current=[],m.forEach(function(v){t.current=v(t.current)}),i.current=null,g!==t.current&&a({})}})}return sr(function(){return function(){i.current=null}},[]),[t.current,u]}function H3(e){var t=Zt(null),r=Zt();function n(){window.clearTimeout(r.current)}function a(c){t.current=c,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function i(){return t.current}return sr(function(){return n},[]),[a,i]}function K3(){var e=T.useState(-1),t=jt(e,2),r=t[0],n=t[1],a=T.useState(-1),i=jt(a,2),c=i[0],u=i[1],f=T.useCallback(function(d,m){n(d),u(m)},[]);return[r,c,f]}var Od=$p()?window:null;function q3(e,t){var r=Pn(e)==="object"?e:{},n=r.offsetHeader,a=n===void 0?0:n,i=r.offsetSummary,c=i===void 0?0:i,u=r.offsetScroll,f=u===void 0?0:u,d=r.getContainer,m=d===void 0?function(){return Od}:d,g=m()||Od,v=!!e;return T.useMemo(function(){return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:a,offsetSummary:c,offsetScroll:f,container:g}},[v,f,a,c,t,g])}function V3(e,t,r){var n=xt(function(){var a=t.length,i=function(d,m,g){for(var v=[],w=0,x=d;x!==m;x+=g)v.push(w),t[x].fixed&&(w+=e[x]||0);return v},c=i(0,a,1),u=i(a-1,-1,-1).reverse();return r==="rtl"?{left:u,right:c}:{left:c,right:u}},[e,t,r]);return n}function Md(e){var t=e.className,r=e.children;return T.createElement("div",{className:t},r)}function Rd(e){var t=w0(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 W3=function(t,r){var n,a,i=t.scrollBodyRef,c=t.onScroll,u=t.offsetScroll,f=t.container,d=t.direction,m=Zr(rn,"prefixCls"),g=((n=i.current)===null||n===void 0?void 0:n.scrollWidth)||0,v=((a=i.current)===null||a===void 0?void 0:a.clientWidth)||0,w=g&&v*(v/g),x=T.useRef(),C=L3({scrollLeft:0,isHiddenScrollBar:!0}),p=jt(C,2),A=p[0],B=p[1],k=T.useRef({delta:0,x:0}),N=T.useState(!1),F=jt(N,2),R=F[0],S=F[1],z=T.useRef(null);T.useEffect(function(){return function(){io.cancel(z.current)}},[]);var O=function(){S(!1)},V=function(K){K.persist(),k.current.delta=K.pageX-A.scrollLeft,k.current.x=0,S(!0),K.preventDefault()},I=function(K){var W,G=K||((W=window)===null||W===void 0?void 0:W.event),ne=G.buttons;if(!R||ne===0){R&&S(!1);return}var q=k.current.x+K.pageX-k.current.x-k.current.delta,J=d==="rtl";q=Math.max(J?w-v:0,Math.min(J?0:v-w,q));var me=!J||Math.abs(q)+Math.abs(w)<v;me&&(c({scrollLeft:q/v*(g+2)}),k.current.x=K.pageX)},X=function(){io.cancel(z.current),z.current=io(function(){if(i.current){var K=Rd(i.current).top,W=K+i.current.offsetHeight,G=f===window?document.documentElement.scrollTop+window.innerHeight:Rd(f).top+f.clientHeight;B(function(ne){return Ue(Ue({},ne),{},{isHiddenScrollBar:W-xd()<=G||K>=G-u})})}})},Z=function(K){B(function(W){return Ue(Ue({},W),{},{scrollLeft:g?K/g*v:0})})};return T.useImperativeHandle(r,function(){return{setScrollLeft:Z,checkScrollBarVisible:X}}),T.useEffect(function(){var L=ka(document.body,"mouseup",O,!1),K=ka(document.body,"mousemove",I,!1);return X(),function(){L.remove(),K.remove()}},[w,R]),T.useEffect(function(){if(i.current){for(var L=[],K=w0(i.current);K;)L.push(K),K=K.parentElement;return L.forEach(function(W){return W.addEventListener("scroll",X,!1)}),window.addEventListener("resize",X,!1),window.addEventListener("scroll",X,!1),f.addEventListener("scroll",X,!1),function(){L.forEach(function(W){return W.removeEventListener("scroll",X)}),window.removeEventListener("resize",X),window.removeEventListener("scroll",X),f.removeEventListener("scroll",X)}}},[f]),T.useEffect(function(){A.isHiddenScrollBar||B(function(L){var K=i.current;return K?Ue(Ue({},L),{},{scrollLeft:K.scrollLeft/K.scrollWidth*K.clientWidth}):L})},[A.isHiddenScrollBar]),g<=v||!w||A.isHiddenScrollBar?null:T.createElement("div",{style:{height:xd(),width:v,bottom:u},className:"".concat(m,"-sticky-scroll")},T.createElement("div",{onMouseDown:V,ref:x,className:kt("".concat(m,"-sticky-scroll-bar"),He({},"".concat(m,"-sticky-scroll-bar-active"),R)),style:{width:"".concat(w,"px"),transform:"translate3d(".concat(A.scrollLeft,"px, 0, 0)")}}))};const U3=T.forwardRef(W3);var v1="rc-table",G3=[],Y3={};function X3(){return"No Data"}function Z3(e,t){var r=Ue({rowKey:"key",prefixCls:v1,emptyText:X3},e),n=r.prefixCls,a=r.className,i=r.rowClassName,c=r.style,u=r.data,f=r.rowKey,d=r.scroll,m=r.tableLayout,g=r.direction,v=r.title,w=r.footer,x=r.summary,C=r.caption,p=r.id,A=r.showHeader,B=r.components,k=r.emptyText,N=r.onRow,F=r.onHeaderRow,R=r.measureRowRender,S=r.onScroll,z=r.internalHooks,O=r.transformColumns,V=r.internalRefs,I=r.tailor,X=r.getContainerWidth,Z=r.sticky,L=r.rowHoverable,K=L===void 0?!0:L,W=u||G3,G=!!W.length,ne=z===gi,q=T.useCallback(function(Nt,Gt){return y0(B,Nt)||Gt},[B]),J=T.useMemo(function(){return typeof f=="function"?f:function(Nt){var Gt=Nt&&Nt[f];return Gt}},[f]),me=q(["body"]),Ce=K3(),we=jt(Ce,3),Fe=we[0],Ie=we[1],Q=we[2],le=z3(r,W,J),ce=jt(le,6),de=ce[0],Ee=ce[1],Ne=ce[2],ge=ce[3],De=ce[4],ke=ce[5],Be=d==null?void 0:d.x,xe=T.useState(0),Se=jt(xe,2),ze=Se[0],dt=Se[1],at=_3(Ue(Ue(Ue({},r),de),{},{expandable:!!de.expandedRowRender,columnTitle:de.columnTitle,expandedKeys:Ne,getRowKey:J,onTriggerExpand:ke,expandIcon:ge,expandIconColumnIndex:de.expandIconColumnIndex,direction:g,scrollWidth:ne&&I&&typeof Be=="number"?Be:null,clientWidth:ze}),ne?O:null),$e=jt(at,4),Le=$e[0],Ge=$e[1],ht=$e[2],et=$e[3],nt=ht??Be,Ot=T.useMemo(function(){return{columns:Le,flattenColumns:Ge}},[Le,Ge]),At=T.useRef(),Tt=T.useRef(),Mt=T.useRef(),je=T.useRef();T.useImperativeHandle(t,function(){return{nativeElement:At.current,scrollTo:function(Gt){var Vr;if(Mt.current instanceof HTMLElement){var an=Gt.index,_r=Gt.top,_n=Gt.key;if(a3(_r)){var it;(it=Mt.current)===null||it===void 0||it.scrollTo({top:_r})}else{var on,Vn=_n??J(W[an]);(on=Mt.current.querySelector('[data-row-key="'.concat(Vn,'"]')))===null||on===void 0||on.scrollIntoView()}}else(Vr=Mt.current)!==null&&Vr!==void 0&&Vr.scrollTo&&Mt.current.scrollTo(Gt)}}});var he=T.useRef(),ut=T.useState(!1),Lt=jt(ut,2),Pt=Lt[0],Bt=Lt[1],Ft=T.useState(!1),Dt=jt(Ft,2),Ht=Dt[0],or=Dt[1],mr=T.useState(new Map),Rt=jt(mr,2),Dr=Rt[0],Nr=Rt[1],gn=Bs(Ge),Jt=gn.map(function(Nt){return Dr.get(Nt)}),kr=T.useMemo(function(){return Jt},[Jt.join("_")]),Lr=V3(kr,Ge,g),Er=d&&Nu(d.y),cr=d&&Nu(nt)||!!de.fixed,Et=cr&&Ge.some(function(Nt){var Gt=Nt.fixed;return Gt}),y=T.useRef(),D=q3(Z,n),Pe=D.isSticky,$=D.offsetHeader,te=D.offsetSummary,lr=D.offsetScroll,st=D.stickyClassName,wt=D.container,vt=T.useMemo(function(){return x==null?void 0:x(W)},[x,W]),ot=(Er||Pe)&&T.isValidElement(vt)&&vt.type===Fs&&vt.props.fixed,qt,nr,xr;Er&&(nr={overflowY:G?"scroll":"auto",maxHeight:d.y}),cr&&(qt={overflowX:"auto"},Er||(nr={overflowY:"hidden"}),xr={width:nt===!0?"auto":nt,minWidth:"100%"});var ee=T.useCallback(function(Nt,Gt){Nr(function(Vr){if(Vr.get(Nt)!==Gt){var an=new Map(Vr);return an.set(Nt,Gt),an}return Vr})},[]),re=H3(),Y=jt(re,2),tt=Y[0],Ut=Y[1];function ft(Nt,Gt){Gt&&(typeof Gt=="function"?Gt(Nt):Gt.scrollLeft!==Nt&&(Gt.scrollLeft=Nt,Gt.scrollLeft!==Nt&&setTimeout(function(){Gt.scrollLeft=Nt},0)))}var It=Aa(function(Nt){var Gt=Nt.currentTarget,Vr=Nt.scrollLeft,an=g==="rtl",_r=typeof Vr=="number"?Vr:Gt.scrollLeft,_n=Gt||Y3;if(!Ut()||Ut()===_n){var it;tt(_n),ft(_r,Tt.current),ft(_r,Mt.current),ft(_r,he.current),ft(_r,(it=y.current)===null||it===void 0?void 0:it.setScrollLeft)}var on=Gt||Tt.current;if(on){var Vn=ne&&I&&typeof nt=="number"?nt:on.scrollWidth,Sr=on.clientWidth;if(Vn===Sr){Bt(!1),or(!1);return}an?(Bt(-_r<Vn-Sr),or(-_r>0)):(Bt(_r>0),or(_r<Vn-Sr))}}),bt=Aa(function(Nt){It(Nt),S==null||S(Nt)}),Ir=function(){if(cr&&Mt.current){var Gt;It({currentTarget:w0(Mt.current),scrollLeft:(Gt=Mt.current)===null||Gt===void 0?void 0:Gt.scrollLeft})}else Bt(!1),or(!1)},Hr=function(Gt){var Vr,an=Gt.width;(Vr=y.current)===null||Vr===void 0||Vr.checkScrollBarVisible();var _r=At.current?At.current.offsetWidth:an;ne&&X&&At.current&&(_r=X(At.current,_r)||_r),_r!==ze&&(Ir(),dt(_r))},In=T.useRef(!1);T.useEffect(function(){In.current&&Ir()},[cr,u,Le.length]),T.useEffect(function(){In.current=!0},[]);var Rr=T.useState(0),Cn=jt(Rr,2),Dn=Cn[0],oe=Cn[1],Re=T.useState(!0),pt=jt(Re,2),Xe=pt[0],ae=pt[1];Sa(function(){(!I||!ne)&&(Mt.current instanceof Element?oe(wd(Mt.current).width):oe(wd(je.current).width)),ae(i2("position","sticky"))},[]),T.useEffect(function(){ne&&V&&(V.body.current=Mt.current)});var Oe=T.useCallback(function(Nt){return T.createElement(T.Fragment,null,T.createElement(Nd,Nt),ot==="top"&&T.createElement(Oi,Nt,vt))},[ot,vt]),Me=T.useCallback(function(Nt){return T.createElement(Oi,Nt,vt)},[vt]),Ze=q(["table"],"table"),be=T.useMemo(function(){return m||(Et?nt==="max-content"?"auto":"fixed":Er||Pe||Ge.some(function(Nt){var Gt=Nt.ellipsis;return Gt})?"fixed":"auto")},[Er,Et,Ge,m,Pe]),pe,Ke={colWidths:kr,columCount:Ge.length,stickyOffsets:Lr,onHeaderRow:F,fixHeader:Er,scroll:d},ct=T.useMemo(function(){return G?null:typeof k=="function"?k():k},[G,k]),Vt=T.createElement(k3,{data:W,measureColumnWidth:Er||cr||Pe}),Qe=T.createElement(m1,{colWidths:Ge.map(function(Nt){var Gt=Nt.width;return Gt}),columns:Ge}),fe=C!=null?T.createElement("caption",{className:"".concat(n,"-caption")},C):void 0,mt=cs(r,{data:!0}),_t=cs(r,{aria:!0});if(Er||Pe){var Ur;typeof me=="function"?(Ur=me(W,{scrollbarSize:Dn,ref:Mt,onScroll:It}),Ke.colWidths=Ge.map(function(Nt,Gt){var Vr=Nt.width,an=Gt===Ge.length-1?Vr-Dn:Vr;return typeof an=="number"&&!Number.isNaN(an)?an:0})):Ur=T.createElement("div",{style:Ue(Ue({},qt),nr),onScroll:bt,ref:Mt,className:kt("".concat(n,"-body"))},T.createElement(Ze,Kt({style:Ue(Ue({},xr),{},{tableLayout:be})},_t),fe,Qe,Vt,!ot&&vt&&T.createElement(Oi,{stickyOffsets:Lr,flattenColumns:Ge},vt)));var en=Ue(Ue(Ue({noData:!W.length},Ke),Ot),{},{direction:g,stickyClassName:st,scrollX:nt,tableLayout:be,onScroll:It});pe=T.createElement(T.Fragment,null,A!==!1&&T.createElement(Fd,Kt({},en,{stickyTopOffset:$,className:"".concat(n,"-header"),ref:Tt,colGroup:Qe}),Oe),Ur,ot&&ot!=="top"&&T.createElement(Fd,Kt({},en,{stickyBottomOffset:te,className:"".concat(n,"-summary"),ref:he,colGroup:Qe}),Me),Pe&&Mt.current&&Mt.current instanceof Element&&T.createElement(U3,{ref:y,offsetScroll:lr,scrollBodyRef:Mt,onScroll:It,container:wt,direction:g}))}else pe=T.createElement("div",{style:Ue(Ue({},qt),nr),className:kt("".concat(n,"-content")),onScroll:It,ref:Mt},T.createElement(Ze,Kt({style:Ue(Ue({},xr),{},{tableLayout:be})},_t),fe,Qe,A!==!1&&T.createElement(Nd,Kt({},Ke,Ot)),Vt,vt&&T.createElement(Oi,{stickyOffsets:Lr,flattenColumns:Ge},vt)));var se=T.createElement("div",Kt({className:kt(n,a,He(He(He(He(He(He(He(He(He(He({},"".concat(n,"-rtl"),g==="rtl"),"".concat(n,"-ping-left"),Pt),"".concat(n,"-ping-right"),Ht),"".concat(n,"-layout-fixed"),m==="fixed"),"".concat(n,"-fixed-header"),Er),"".concat(n,"-fixed-column"),Et),"".concat(n,"-fixed-column-gapped"),Et&&et),"".concat(n,"-scroll-horizontal"),cr),"".concat(n,"-has-fix-left"),Ge[0]&&Ge[0].fixed),"".concat(n,"-has-fix-right"),Ge[Ge.length-1]&&Ge[Ge.length-1].fixed==="right")),style:c,id:p,ref:At},mt),v&&T.createElement(Md,{className:"".concat(n,"-title")},v(W)),T.createElement("div",{ref:je,className:"".concat(n,"-container")},pe),w&&T.createElement(Md,{className:"".concat(n,"-footer")},w(W)));cr&&(se=T.createElement(x0,{onResize:Hr},se));var St=j3(Ge,Lr,g),nn=T.useMemo(function(){return{scrollX:nt,prefixCls:n,getComponent:q,scrollbarSize:Dn,direction:g,fixedInfoList:St,isSticky:Pe,supportSticky:Xe,componentWidth:ze,fixHeader:Er,fixColumn:Et,horizonScroll:cr,tableLayout:be,rowClassName:i,expandedRowClassName:de.expandedRowClassName,expandIcon:ge,expandableType:Ee,expandRowByClick:de.expandRowByClick,expandedRowRender:de.expandedRowRender,expandedRowOffset:de.expandedRowOffset,onTriggerExpand:ke,expandIconColumnIndex:de.expandIconColumnIndex,indentSize:de.indentSize,allColumnsFixedLeft:Ge.every(function(Nt){return Nt.fixed==="left"}),emptyNode:ct,columns:Le,flattenColumns:Ge,onColumnResize:ee,colWidths:kr,hoverStartRow:Fe,hoverEndRow:Ie,onHover:Q,rowExpandable:de.rowExpandable,onRow:N,getRowKey:J,expandedKeys:Ne,childrenColumnName:De,rowHoverable:K,measureRowRender:R}},[nt,n,q,Dn,g,St,Pe,Xe,ze,Er,Et,cr,be,i,de.expandedRowClassName,ge,Ee,de.expandRowByClick,de.expandedRowRender,de.expandedRowOffset,ke,de.expandIconColumnIndex,de.indentSize,ct,Le,Ge,ee,kr,Fe,Ie,Q,de.rowExpandable,N,J,Ne,De,K,R]);return T.createElement(rn.Provider,{value:nn},se)}var J3=T.forwardRef(Z3);function b1(e){return o1(J3,e)}var ko=b1();ko.EXPAND_COLUMN=xa;ko.INTERNAL_HOOKS=gi;ko.Column=m3;ko.ColumnGroup=g3;ko.Summary=l1;var N0=S0(null),y1=S0(null);function Q3(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function e5(e){var t=e.rowInfo,r=e.column,n=e.colIndex,a=e.indent,i=e.index,c=e.component,u=e.renderIndex,f=e.record,d=e.style,m=e.className,g=e.inverse,v=e.getHeight,w=r.render,x=r.dataIndex,C=r.className,p=r.width,A=Zr(y1,["columnsOffset"]),B=A.columnsOffset,k=p1(t,r,n,a,i),N=k.key,F=k.fixedInfo,R=k.appendCellNode,S=k.additionalCellProps,z=S.style,O=S.colSpan,V=O===void 0?1:O,I=S.rowSpan,X=I===void 0?1:I,Z=n-1,L=Q3(Z,V,B),K=V>1?p-L:0,W=Ue(Ue(Ue({},z),d),{},{flex:"0 0 ".concat(L,"px"),width:"".concat(L,"px"),marginRight:K,pointerEvents:"auto"}),G=T.useMemo(function(){return g?X<=1:V===0||X===0||X>1},[X,V,g]);G?W.visibility="hidden":g&&(W.height=v==null?void 0:v(X));var ne=G?function(){return null}:w,q={};return(X===0||V===0)&&(q.rowSpan=1,q.colSpan=1),T.createElement(Do,Kt({className:kt(C,m),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:c,prefixCls:t.prefixCls,key:N,record:f,index:i,renderIndex:u,dataIndex:x,render:ne,shouldCellUpdate:r.shouldCellUpdate},F,{appendNode:R,additionalProps:Ue(Ue({},S),{},{style:W},q)}))}var t5=["data","index","className","rowKey","style","extra","getHeight"],r5=T.forwardRef(function(e,t){var r=e.data,n=e.index,a=e.className,i=e.rowKey,c=e.style,u=e.extra,f=e.getHeight,d=Qr(e,t5),m=r.record,g=r.indent,v=r.index,w=Zr(rn,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),x=w.scrollX,C=w.flattenColumns,p=w.prefixCls,A=w.fixColumn,B=w.componentWidth,k=Zr(N0,["getComponent"]),N=k.getComponent,F=d1(m,i,n,g),R=N(["body","row"],"div"),S=N(["body","cell"],"div"),z=F.rowSupportExpand,O=F.expanded,V=F.rowProps,I=F.expandedRowRender,X=F.expandedRowClassName,Z;if(z&&O){var L=I(m,n,g+1,O),K=h1(X,m,n,g),W={};A&&(W={style:He({},"--virtual-width","".concat(B,"px"))});var G="".concat(p,"-expanded-row-cell");Z=T.createElement(R,{className:kt("".concat(p,"-expanded-row"),"".concat(p,"-expanded-row-level-").concat(g+1),K)},T.createElement(Do,{component:S,prefixCls:p,className:kt(G,He({},"".concat(G,"-fixed"),A)),additionalProps:W},L))}var ne=Ue(Ue({},c),{},{width:x});u&&(ne.position="absolute",ne.pointerEvents="none");var q=T.createElement(R,Kt({},V,d,{"data-row-key":i,ref:z?null:t,className:kt(a,"".concat(p,"-row"),V==null?void 0:V.className,He({},"".concat(p,"-row-extra"),u)),style:Ue(Ue({},ne),V==null?void 0:V.style)}),C.map(function(J,me){return T.createElement(e5,{key:me,component:S,rowInfo:F,column:J,colIndex:me,indent:g,index:n,renderIndex:v,record:m,inverse:u,getHeight:f})}));return z?T.createElement("div",{ref:t},q,Z):q}),$d=Co(r5),n5=T.forwardRef(function(e,t){var r=e.data,n=e.onScroll,a=Zr(rn,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),i=a.flattenColumns,c=a.onColumnResize,u=a.getRowKey,f=a.expandedKeys,d=a.prefixCls,m=a.childrenColumnName,g=a.scrollX,v=a.direction,w=Zr(N0),x=w.sticky,C=w.scrollY,p=w.listItemHeight,A=w.getComponent,B=w.onScroll,k=T.useRef(),N=c1(r,m,f,u),F=T.useMemo(function(){var Z=0;return i.map(function(L){var K=L.width,W=L.minWidth,G=L.key,ne=Math.max(K||0,W||0);return Z+=ne,[G,ne,Z]})},[i]),R=T.useMemo(function(){return F.map(function(Z){return Z[2]})},[F]);T.useEffect(function(){F.forEach(function(Z){var L=jt(Z,2),K=L[0],W=L[1];c(K,W)})},[F]),T.useImperativeHandle(t,function(){var Z,L={scrollTo:function(W){var G;(G=k.current)===null||G===void 0||G.scrollTo(W)},nativeElement:(Z=k.current)===null||Z===void 0?void 0:Z.nativeElement};return Object.defineProperty(L,"scrollLeft",{get:function(){var W;return((W=k.current)===null||W===void 0?void 0:W.getScrollInfo().x)||0},set:function(W){var G;(G=k.current)===null||G===void 0||G.scrollTo({left:W})}}),Object.defineProperty(L,"scrollTop",{get:function(){var W;return((W=k.current)===null||W===void 0?void 0:W.getScrollInfo().y)||0},set:function(W){var G;(G=k.current)===null||G===void 0||G.scrollTo({top:W})}}),L});var S=function(L,K){var W,G=(W=N[K])===null||W===void 0?void 0:W.record,ne=L.onCell;if(ne){var q,J=ne(G,K);return(q=J==null?void 0:J.rowSpan)!==null&&q!==void 0?q:1}return 1},z=function(L){var K=L.start,W=L.end,G=L.getSize,ne=L.offsetY;if(W<0)return null;for(var q=i.filter(function(Ne){return S(Ne,K)===0}),J=K,me=function(ge){if(q=q.filter(function(De){return S(De,ge)===0}),!q.length)return J=ge,1},Ce=K;Ce>=0&&!me(Ce);Ce-=1);for(var we=i.filter(function(Ne){return S(Ne,W)!==1}),Fe=W,Ie=function(ge){if(we=we.filter(function(De){return S(De,ge)!==1}),!we.length)return Fe=Math.max(ge-1,W),1},Q=W;Q<N.length&&!Ie(Q);Q+=1);for(var le=[],ce=function(ge){var De=N[ge];if(!De)return 1;i.some(function(ke){return S(ke,ge)>1})&&le.push(ge)},de=J;de<=Fe;de+=1)ce(de);var Ee=le.map(function(Ne){var ge=N[Ne],De=u(ge.record,Ne),ke=function(Se){var ze=Ne+Se-1,dt=u(N[ze].record,ze),at=G(De,dt);return at.bottom-at.top},Be=G(De);return T.createElement($d,{key:Ne,data:ge,rowKey:De,index:Ne,style:{top:-ne+Be.top},extra:!0,getHeight:ke})});return Ee},O=T.useMemo(function(){return{columnsOffset:R}},[R]),V="".concat(d,"-tbody"),I=A(["body","wrapper"]),X={};return x&&(X.position="sticky",X.bottom=0,Pn(x)==="object"&&x.offsetScroll&&(X.bottom=x.offsetScroll)),T.createElement(y1.Provider,{value:O},T.createElement(Hp,{fullHeight:!1,ref:k,prefixCls:"".concat(V,"-virtual"),styles:{horizontalScrollBar:X},className:V,height:C,itemHeight:p||24,data:N,itemKey:function(L){return u(L.record)},component:I,scrollWidth:g,direction:v,onVirtualScroll:function(L){var K,W=L.x;n({currentTarget:(K=k.current)===null||K===void 0?void 0:K.nativeElement,scrollLeft:W})},onScroll:B,extraRender:z},function(Z,L,K){var W=u(Z.record,L);return T.createElement($d,{data:Z,rowKey:W,index:L,style:K.style})}))}),a5=Co(n5),o5=function(t,r){var n=r.ref,a=r.onScroll;return T.createElement(a5,{ref:n,data:t,onScroll:a})};function i5(e,t){var r=e.data,n=e.columns,a=e.scroll,i=e.sticky,c=e.prefixCls,u=c===void 0?v1:c,f=e.className,d=e.listItemHeight,m=e.components,g=e.onScroll,v=a||{},w=v.x,x=v.y;typeof w!="number"&&(w=1),typeof x!="number"&&(x=500);var C=Aa(function(B,k){return y0(m,B)||k}),p=Aa(g),A=T.useMemo(function(){return{sticky:i,scrollY:x,listItemHeight:d,getComponent:C,onScroll:p}},[i,x,d,C,p]);return T.createElement(N0.Provider,{value:A},T.createElement(ko,Kt({},e,{className:kt(f,"".concat(u,"-virtual")),scroll:Ue(Ue({},a),{},{x:w}),components:Ue(Ue({},m),{},{body:r!=null&&r.length?o5:void 0}),columns:n,internalHooks:gi,tailor:!0,ref:t})))}var s5=T.forwardRef(i5);function x1(e){return o1(s5,e)}x1();const l5=e=>null,u5=e=>null;var T0=T.createContext(null),c5=T.createContext({}),d5=function(t){for(var r=t.prefixCls,n=t.level,a=t.isStart,i=t.isEnd,c="".concat(r,"-indent-unit"),u=[],f=0;f<n;f+=1)u.push(T.createElement("span",{key:f,className:kt(c,He(He({},"".concat(c,"-start"),a[f]),"".concat(c,"-end"),i[f]))}));return T.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},u)};const f5=T.memo(d5);var h5=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Pd="open",Id="close",p5="---",Qo=function(t){var r,n,a,i=t.eventKey,c=t.className,u=t.style,f=t.dragOver,d=t.dragOverGapTop,m=t.dragOverGapBottom,g=t.isLeaf,v=t.isStart,w=t.isEnd,x=t.expanded,C=t.selected,p=t.checked,A=t.halfChecked,B=t.loading,k=t.domRef,N=t.active,F=t.data,R=t.onMouseMove,S=t.selectable,z=Qr(t,h5),O=We.useContext(T0),V=We.useContext(c5),I=We.useRef(null),X=We.useState(!1),Z=jt(X,2),L=Z[0],K=Z[1],W=!!(O.disabled||t.disabled||(r=V.nodeDisabled)!==null&&r!==void 0&&r.call(V,F)),G=We.useMemo(function(){return!O.checkable||t.checkable===!1?!1:O.checkable},[O.checkable,t.checkable]),ne=function(he){W||O.onNodeSelect(he,Kr(t))},q=function(he){W||!G||t.disableCheckbox||O.onNodeCheck(he,Kr(t),!p)},J=We.useMemo(function(){return typeof S=="boolean"?S:O.selectable},[S,O.selectable]),me=function(he){O.onNodeClick(he,Kr(t)),J?ne(he):q(he)},Ce=function(he){O.onNodeDoubleClick(he,Kr(t))},we=function(he){O.onNodeMouseEnter(he,Kr(t))},Fe=function(he){O.onNodeMouseLeave(he,Kr(t))},Ie=function(he){O.onNodeContextMenu(he,Kr(t))},Q=We.useMemo(function(){return!!(O.draggable&&(!O.draggable.nodeDraggable||O.draggable.nodeDraggable(F)))},[O.draggable,F]),le=function(he){he.stopPropagation(),K(!0),O.onNodeDragStart(he,t);try{he.dataTransfer.setData("text/plain","")}catch{}},ce=function(he){he.preventDefault(),he.stopPropagation(),O.onNodeDragEnter(he,t)},de=function(he){he.preventDefault(),he.stopPropagation(),O.onNodeDragOver(he,t)},Ee=function(he){he.stopPropagation(),O.onNodeDragLeave(he,t)},Ne=function(he){he.stopPropagation(),K(!1),O.onNodeDragEnd(he,t)},ge=function(he){he.preventDefault(),he.stopPropagation(),K(!1),O.onNodeDrop(he,t)},De=function(he){B||O.onNodeExpand(he,Kr(t))},ke=We.useMemo(function(){var je=xn(O.keyEntities,i)||{},he=je.children;return!!(he||[]).length},[O.keyEntities,i]),Be=We.useMemo(function(){return g===!1?!1:g||!O.loadData&&!ke||O.loadData&&t.loaded&&!ke},[g,O.loadData,ke,t.loaded]);We.useEffect(function(){B||typeof O.loadData=="function"&&x&&!Be&&!t.loaded&&O.onNodeLoad(Kr(t))},[B,O.loadData,O.onNodeLoad,x,Be,t]);var xe=We.useMemo(function(){var je;return(je=O.draggable)!==null&&je!==void 0&&je.icon?We.createElement("span",{className:"".concat(O.prefixCls,"-draggable-icon")},O.draggable.icon):null},[O.draggable]),Se=function(he){var ut=t.switcherIcon||O.switcherIcon;return typeof ut=="function"?ut(Ue(Ue({},t),{},{isLeaf:he})):ut},ze=function(){if(Be){var he=Se(!0);return he!==!1?We.createElement("span",{className:kt("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher-noop"))},he):null}var ut=Se(!1);return ut!==!1?We.createElement("span",{onClick:De,className:kt("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher_").concat(x?Pd:Id))},ut):null},dt=We.useMemo(function(){if(!G)return null;var je=typeof G!="boolean"?G:null;return We.createElement("span",{className:kt("".concat(O.prefixCls,"-checkbox"),He(He(He({},"".concat(O.prefixCls,"-checkbox-checked"),p),"".concat(O.prefixCls,"-checkbox-indeterminate"),!p&&A),"".concat(O.prefixCls,"-checkbox-disabled"),W||t.disableCheckbox)),onClick:q,role:"checkbox","aria-checked":A?"mixed":p,"aria-disabled":W||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},je)},[G,p,A,W,t.disableCheckbox,t.title]),at=We.useMemo(function(){return Be?null:x?Pd:Id},[Be,x]),$e=We.useMemo(function(){return We.createElement("span",{className:kt("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__").concat(at||"docu"),He({},"".concat(O.prefixCls,"-icon_loading"),B))})},[O.prefixCls,at,B]),Le=We.useMemo(function(){var je=!!O.draggable,he=!t.disabled&&je&&O.dragOverNodeKey===i;return he?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]),Ge=We.useMemo(function(){var je=t.title,he=je===void 0?p5:je,ut="".concat(O.prefixCls,"-node-content-wrapper"),Lt;if(O.showIcon){var Pt=t.icon||O.icon;Lt=Pt?We.createElement("span",{className:kt("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__customize"))},typeof Pt=="function"?Pt(t):Pt):$e}else O.loadData&&B&&(Lt=$e);var Bt;return typeof he=="function"?Bt=he(F):O.titleRender?Bt=O.titleRender(F):Bt=he,We.createElement("span",{ref:I,title:typeof he=="string"?he:"",className:kt(ut,"".concat(ut,"-").concat(at||"normal"),He({},"".concat(O.prefixCls,"-node-selected"),!W&&(C||L))),onMouseEnter:we,onMouseLeave:Fe,onContextMenu:Ie,onClick:me,onDoubleClick:Ce},Lt,We.createElement("span",{className:"".concat(O.prefixCls,"-title")},Bt),Le)},[O.prefixCls,O.showIcon,t,O.icon,$e,O.titleRender,F,at,we,Fe,Ie,me,Ce]),ht=cs(z,{aria:!0,data:!0}),et=xn(O.keyEntities,i)||{},nt=et.level,Ot=w[w.length-1],At=!W&&Q,Tt=O.draggingNodeKey===i,Mt=S!==void 0?{"aria-selected":!!S}:void 0;return We.createElement("div",Kt({ref:k,role:"treeitem","aria-expanded":g?void 0:x,className:kt(c,"".concat(O.prefixCls,"-treenode"),(a={},He(He(He(He(He(He(He(He(He(He(a,"".concat(O.prefixCls,"-treenode-disabled"),W),"".concat(O.prefixCls,"-treenode-switcher-").concat(x?"open":"close"),!g),"".concat(O.prefixCls,"-treenode-checkbox-checked"),p),"".concat(O.prefixCls,"-treenode-checkbox-indeterminate"),A),"".concat(O.prefixCls,"-treenode-selected"),C),"".concat(O.prefixCls,"-treenode-loading"),B),"".concat(O.prefixCls,"-treenode-active"),N),"".concat(O.prefixCls,"-treenode-leaf-last"),Ot),"".concat(O.prefixCls,"-treenode-draggable"),Q),"dragging",Tt),He(He(He(He(He(He(He(a,"drop-target",O.dropTargetKey===i),"drop-container",O.dropContainerKey===i),"drag-over",!W&&f),"drag-over-gap-top",!W&&d),"drag-over-gap-bottom",!W&&m),"filter-node",(n=O.filterTreeNode)===null||n===void 0?void 0:n.call(O,Kr(t))),"".concat(O.prefixCls,"-treenode-leaf"),Be))),style:u,draggable:At,onDragStart:At?le:void 0,onDragEnter:Q?ce:void 0,onDragOver:Q?de:void 0,onDragLeave:Q?Ee:void 0,onDrop:Q?ge:void 0,onDragEnd:Q?Ne:void 0,onMouseMove:R},Mt,ht),We.createElement(f5,{prefixCls:O.prefixCls,level:nt,isStart:v,isEnd:w}),xe,ze(),dt,Ge)};Qo.isTreeNode=1;function Zn(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function ia(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function O0(e){return e.split("-")}function m5(e,t){var r=[],n=xn(t,e);function a(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.forEach(function(c){var u=c.key,f=c.children;r.push(u),a(f)})}return a(n.children),r}function g5(e){if(e.parent){var t=O0(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function v5(e){var t=O0(e.pos);return Number(t[t.length-1])===0}function _d(e,t,r,n,a,i,c,u,f,d){var m,g=e.clientX,v=e.clientY,w=e.target.getBoundingClientRect(),x=w.top,C=w.height,p=(d==="rtl"?-1:1)*(((a==null?void 0:a.x)||0)-g),A=(p-12)/n,B=f.filter(function(W){var G;return(G=u[W])===null||G===void 0||(G=G.children)===null||G===void 0?void 0:G.length}),k=xn(u,r.eventKey);if(v<x+C/2){var N=c.findIndex(function(W){return W.key===k.key}),F=N<=0?0:N-1,R=c[F].key;k=xn(u,R)}var S=k.key,z=k,O=k.key,V=0,I=0;if(!B.includes(S))for(var X=0;X<A&&g5(k);X+=1)k=k.parent,I+=1;var Z=t.data,L=k.node,K=!0;return v5(k)&&k.level===0&&v<x+C/2&&i({dragNode:Z,dropNode:L,dropPosition:-1})&&k.key===r.eventKey?V=-1:(z.children||[]).length&&B.includes(O)?i({dragNode:Z,dropNode:L,dropPosition:0})?V=0:K=!1:I===0?A>-1.5?i({dragNode:Z,dropNode:L,dropPosition:1})?V=1:K=!1:i({dragNode:Z,dropNode:L,dropPosition:0})?V=0:i({dragNode:Z,dropNode:L,dropPosition:1})?V=1:K=!1:i({dragNode:Z,dropNode:L,dropPosition:1})?V=1:K=!1,{dropPosition:V,dropLevelOffset:I,dropTargetKey:k.key,dropTargetPos:k.pos,dragOverNodeKey:O,dropContainerKey:V===0?null:((m=k.parent)===null||m===void 0?void 0:m.key)||null,dropAllowed:K}}function zd(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function kl(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(Pn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Da(!1,"`checkedKeys` is not an array or an object"),null;return t}function Ou(e,t){var r=new Set;function n(a){if(!r.has(a)){var i=xn(t,a);if(i){r.add(a);var c=i.parent,u=i.node;u.disabled||c&&n(c.key)}}}return(e||[]).forEach(function(a){n(a)}),ir(r)}const ba={},Mu="SELECT_ALL",Ru="SELECT_INVERT",$u="SELECT_NONE",jd=[],w1=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&w1(e,n[e],r)}),r),b5=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:a,getCheckboxProps:i,getTitleCheckboxProps:c,onChange:u,onSelect:f,onSelectAll:d,onSelectInvert:m,onSelectNone:g,onSelectMultiple:v,columnWidth:w,type:x,selections:C,fixed:p,renderCell:A,hideSelectAll:B,checkStrictly:k=!0}=t||{},{prefixCls:N,data:F,pageData:R,getRecordByKey:S,getRowKey:z,expandType:O,childrenColumnName:V,locale:I,getPopupContainer:X}=e,Z=C0(),[L,K]=t2(ge=>ge),[W,G]=ss(n||a||jd,{value:n}),ne=T.useRef(new Map),q=zt(ge=>{if(r){const De=new Map;ge.forEach(ke=>{let Be=S(ke);!Be&&ne.current.has(ke)&&(Be=ne.current.get(ke)),De.set(ke,Be)}),ne.current=De}},[S,r]);T.useEffect(()=>{q(W)},[W]);const J=xt(()=>w1(V,R),[V,R]),{keyEntities:me}=xt(()=>{if(k)return{keyEntities:null};let ge=F;if(r){const De=new Set(J.map((Be,xe)=>z(Be,xe))),ke=Array.from(ne.current).reduce((Be,[xe,Se])=>De.has(xe)?Be:Be.concat(Se),[]);ge=[].concat(ir(ge),ir(ke))}return k0(ge,{externalGetKey:z,childrenPropName:V})},[F,z,k,V,r,J]),Ce=xt(()=>{const ge=new Map;return J.forEach((De,ke)=>{const Be=z(De,ke),xe=(i?i(De):null)||{};ge.set(Be,xe)}),ge},[J,z,i]),we=zt(ge=>{const De=z(ge);let ke;return Ce.has(De)?ke=Ce.get(z(ge)):ke=i?i(ge):void 0,!!(ke!=null&&ke.disabled)},[Ce,z]),[Fe,Ie]=xt(()=>{if(k)return[W||[],[]];const{checkedKeys:ge,halfCheckedKeys:De}=so(W,!0,me,we);return[ge||[],De]},[W,k,me,we]),Q=xt(()=>{const ge=x==="radio"?Fe.slice(0,1):Fe;return new Set(ge)},[Fe,x]),le=xt(()=>x==="radio"?new Set:new Set(Ie),[Ie,x]);T.useEffect(()=>{t||G(jd)},[!!t]);const ce=zt((ge,De)=>{let ke,Be;q(ge),r?(ke=ge,Be=ge.map(xe=>ne.current.get(xe))):(ke=[],Be=[],ge.forEach(xe=>{const Se=S(xe);Se!==void 0&&(ke.push(xe),Be.push(Se))})),G(ke),u==null||u(ke,Be,{type:De})},[G,S,u,r]),de=zt((ge,De,ke,Be)=>{if(f){const xe=ke.map(Se=>S(Se));f(S(ge),De,xe,Be)}ce(ke,"single")},[f,S,ce]),Ee=xt(()=>!C||B?null:(C===!0?[Mu,Ru,$u]:C).map(De=>De===Mu?{key:"all",text:I.selectionAll,onSelect(){ce(F.map((ke,Be)=>z(ke,Be)).filter(ke=>{const Be=Ce.get(ke);return!(Be!=null&&Be.disabled)||Q.has(ke)}),"all")}}:De===Ru?{key:"invert",text:I.selectInvert,onSelect(){const ke=new Set(Q);R.forEach((xe,Se)=>{const ze=z(xe,Se),dt=Ce.get(ze);dt!=null&&dt.disabled||(ke.has(ze)?ke.delete(ze):ke.add(ze))});const Be=Array.from(ke);m&&(Z.deprecated(!1,"onSelectInvert","onChange"),m(Be)),ce(Be,"invert")}}:De===$u?{key:"none",text:I.selectNone,onSelect(){g==null||g(),ce(Array.from(Q).filter(ke=>{const Be=Ce.get(ke);return Be==null?void 0:Be.disabled}),"none")}}:De).map(De=>Object.assign(Object.assign({},De),{onSelect:(...ke)=>{var Be,xe;(xe=De.onSelect)===null||xe===void 0||(Be=xe).call.apply(Be,[De].concat(ke)),K(null)}})),[C,Q,R,z,m,ce]);return[zt(ge=>{var De;if(!t)return ge.filter(je=>je!==ba);let ke=ir(ge);const Be=new Set(Q),xe=J.map(z).filter(je=>!Ce.get(je).disabled),Se=xe.every(je=>Be.has(je)),ze=xe.some(je=>Be.has(je)),dt=()=>{const je=[];Se?xe.forEach(ut=>{Be.delete(ut),je.push(ut)}):xe.forEach(ut=>{Be.has(ut)||(Be.add(ut),je.push(ut))});const he=Array.from(Be);d==null||d(!Se,he.map(ut=>S(ut)),je.map(ut=>S(ut))),ce(he,"all"),K(null)};let at,$e;if(x!=="radio"){let je;if(Ee){const Ht={getPopupContainer:X,items:Ee.map((or,mr)=>{const{key:Rt,text:Dr,onSelect:Nr}=or;return{key:Rt??mr,onClick:()=>{Nr==null||Nr(xe)},label:Dr}})};je=T.createElement("div",{className:`${N}-selection-extra`},T.createElement(Up,{menu:Ht,getPopupContainer:X},T.createElement("span",null,T.createElement(F4,null))))}const he=J.map((Ht,or)=>{const mr=z(Ht,or),Rt=Ce.get(mr)||{};return Object.assign({checked:Be.has(mr)},Rt)}).filter(({disabled:Ht})=>Ht),ut=!!he.length&&he.length===J.length,Lt=ut&&he.every(({checked:Ht})=>Ht),Pt=ut&&he.some(({checked:Ht})=>Ht),Bt=(c==null?void 0:c())||{},{onChange:Ft,disabled:Dt}=Bt;$e=T.createElement(ds,Object.assign({"aria-label":je?"Custom selection":"Select all"},Bt,{checked:ut?Lt:!!J.length&&Se,indeterminate:ut?!Lt&&Pt:!Se&&ze,onChange:Ht=>{dt(),Ft==null||Ft(Ht)},disabled:Dt??(J.length===0||ut),skipGroup:!0})),at=!B&&T.createElement("div",{className:`${N}-selection`},$e,je)}let Le;x==="radio"?Le=(je,he,ut)=>{const Lt=z(he,ut),Pt=Be.has(Lt),Bt=Ce.get(Lt);return{node:T.createElement(Rp,Object.assign({},Bt,{checked:Pt,onClick:Ft=>{var Dt;Ft.stopPropagation(),(Dt=Bt==null?void 0:Bt.onClick)===null||Dt===void 0||Dt.call(Bt,Ft)},onChange:Ft=>{var Dt;Be.has(Lt)||de(Lt,!0,[Lt],Ft.nativeEvent),(Dt=Bt==null?void 0:Bt.onChange)===null||Dt===void 0||Dt.call(Bt,Ft)}})),checked:Pt}}:Le=(je,he,ut)=>{var Lt;const Pt=z(he,ut),Bt=Be.has(Pt),Ft=le.has(Pt),Dt=Ce.get(Pt);let Ht;return O==="nest"?Ht=Ft:Ht=(Lt=Dt==null?void 0:Dt.indeterminate)!==null&&Lt!==void 0?Lt:Ft,{node:T.createElement(ds,Object.assign({},Dt,{indeterminate:Ht,checked:Bt,skipGroup:!0,onClick:or=>{var mr;or.stopPropagation(),(mr=Dt==null?void 0:Dt.onClick)===null||mr===void 0||mr.call(Dt,or)},onChange:or=>{var mr;const{nativeEvent:Rt}=or,{shiftKey:Dr}=Rt,Nr=xe.indexOf(Pt),gn=Fe.some(Jt=>xe.includes(Jt));if(Dr&&k&&gn){const Jt=L(Nr,xe,Be),kr=Array.from(Be);v==null||v(!Bt,kr.map(Lr=>S(Lr)),Jt.map(Lr=>S(Lr))),ce(kr,"multiple")}else{const Jt=Fe;if(k){const kr=Bt?Zn(Jt,Pt):ia(Jt,Pt);de(Pt,!Bt,kr,Rt)}else{const kr=so([].concat(ir(Jt),[Pt]),!0,me,we),{checkedKeys:Lr,halfCheckedKeys:Er}=kr;let cr=Lr;if(Bt){const Et=new Set(Lr);Et.delete(Pt),cr=so(Array.from(Et),{halfCheckedKeys:Er},me,we).checkedKeys}de(Pt,!Bt,cr,Rt)}}K(Bt?null:Nr),(mr=Dt==null?void 0:Dt.onChange)===null||mr===void 0||mr.call(Dt,or)}})),checked:Bt}};const Ge=(je,he,ut)=>{const{node:Lt,checked:Pt}=Le(je,he,ut);return A?A(Pt,he,ut,Lt):Lt};if(!ke.includes(ba))if(ke.findIndex(je=>{var he;return((he=je[Wo])===null||he===void 0?void 0:he.columnType)==="EXPAND_COLUMN"})===0){const[je,...he]=ke;ke=[je,ba].concat(ir(he))}else ke=[ba].concat(ir(ke));const ht=ke.indexOf(ba);ke=ke.filter((je,he)=>je!==ba||he===ht);const et=ke[ht-1],nt=ke[ht+1];let Ot=p;Ot===void 0&&((nt==null?void 0:nt.fixed)!==void 0?Ot=nt.fixed:(et==null?void 0:et.fixed)!==void 0&&(Ot=et.fixed)),Ot&&et&&((De=et[Wo])===null||De===void 0?void 0:De.columnType)==="EXPAND_COLUMN"&&et.fixed===void 0&&(et.fixed=Ot);const At=kt(`${N}-selection-col`,{[`${N}-selection-col-with-dropdown`]:C&&x==="checkbox"}),Tt=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle($e):t.columnTitle:at,Mt={fixed:Ot,width:w,className:`${N}-selection-column`,title:Tt(),render:Ge,onCell:t.onCell,align:t.align,[Wo]:{className:At}};return ke.map(je=>je===ba?Mt:je)},[z,J,t,Fe,Q,le,w,Ee,O,Ce,v,de,we]),Q]};function y5(e){return t=>{const{prefixCls:r,onExpand:n,record:a,expanded:i,expandable:c}=t,u=`${r}-row-expand-icon`;return T.createElement("button",{type:"button",onClick:f=>{n(a,f),f.stopPropagation()},className:kt(u,{[`${u}-spaced`]:!c,[`${u}-expanded`]:c&&i,[`${u}-collapsed`]:c&&!i}),"aria-label":i?e.collapse:e.expand,"aria-expanded":i})}}function x5(e){return(r,n)=>{const a=r.querySelector(`.${e}-container`);let i=n;if(a){const c=getComputedStyle(a),u=Number.parseInt(c.borderLeftWidth,10),f=Number.parseInt(c.borderRightWidth,10);i=n-u-f}return i}}const Ba=(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 Eo(e,t){return t?`${t}-${e}`:`${e}`}const Ns=(e,t)=>typeof e=="function"?e(t):e,w5=(e,t)=>{const r=Ns(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var C5={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"},D5=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:C5}))},k5=T.forwardRef(D5),E5=function(t){var r=t.dropPosition,n=t.dropLevelOffset,a=t.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:i.top=0,i.left=-n*a;break;case 1:i.bottom=0,i.left=-n*a;break;case 0:i.bottom=0,i.left=a;break}return We.createElement("div",{style:i})};function C1(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function S5(e,t){var r=T.useState(!1),n=jt(r,2),a=n[0],i=n[1];Sa(function(){if(a)return e(),function(){t()}},[a]),Sa(function(){return i(!0),function(){i(!1)}},[])}var A5=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],B5=T.forwardRef(function(e,t){var r=e.className,n=e.style,a=e.motion,i=e.motionNodes,c=e.motionType,u=e.onMotionStart,f=e.onMotionEnd,d=e.active,m=e.treeNodeRequiredProps,g=Qr(e,A5),v=T.useState(!0),w=jt(v,2),x=w[0],C=w[1],p=T.useContext(T0),A=p.prefixCls,B=i&&c!=="hide";Sa(function(){i&&B!==x&&C(B)},[i]);var k=function(){i&&u()},N=T.useRef(!1),F=function(){i&&!N.current&&(N.current=!0,f())};S5(k,F);var R=function(z){B===z&&F()};return i?T.createElement(_p,Kt({ref:t,visible:x},a,{motionAppear:c==="show",onVisibleChanged:R}),function(S,z){var O=S.className,V=S.style;return T.createElement("div",{ref:z,className:kt("".concat(A,"-treenode-motion"),O),style:V},i.map(function(I){var X=Object.assign({},(C1(I.data),I.data)),Z=I.title,L=I.key,K=I.isStart,W=I.isEnd;delete X.children;var G=Vo(L,m);return T.createElement(Qo,Kt({},X,G,{title:Z,active:d,data:I.data,key:L,isStart:K,isEnd:W}))}))}):T.createElement(Qo,Kt({domRef:t,className:r,style:n},g,{active:d}))});function F5(){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 a(i,c){var u=new Map;i.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:a(e,t)}:{add:!1,key:a(t,e)}}function Ld(e,t,r){var n=e.findIndex(function(u){return u.key===r}),a=e[n+1],i=t.findIndex(function(u){return u.key===r});if(a){var c=t.findIndex(function(u){return u.key===a.key});return t.slice(i+1,c)}return t.slice(i+1)}var N5=["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"],Hd={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},T5=function(){},qa="RC_TREE_MOTION_".concat(Math.random()),Pu={key:qa},D1={key:qa,level:0,index:0,pos:"0",node:Pu,nodes:[Pu]},Kd={parent:null,children:[],pos:D1.pos,data:Pu,title:null,key:qa,isStart:[],isEnd:[]};function qd(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function Vd(e){var t=e.key,r=e.pos;return pi(t,r)}function O5(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 M5=T.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var a=e.expandedKeys,i=e.selectedKeys,c=e.checkedKeys,u=e.loadedKeys,f=e.loadingKeys,d=e.halfCheckedKeys,m=e.keyEntities,g=e.disabled,v=e.dragging,w=e.dragOverNodeKey,x=e.dropPosition,C=e.motion,p=e.height,A=e.itemHeight,B=e.virtual,k=e.scrollWidth,N=e.focusable,F=e.activeItem,R=e.focused,S=e.tabIndex,z=e.onKeyDown,O=e.onFocus,V=e.onBlur,I=e.onActiveChange,X=e.onListChangeStart,Z=e.onListChangeEnd,L=Qr(e,N5),K=T.useRef(null),W=T.useRef(null);T.useImperativeHandle(t,function(){return{scrollTo:function(Le){K.current.scrollTo(Le)},getIndentWidth:function(){return W.current.offsetWidth}}});var G=T.useState(a),ne=jt(G,2),q=ne[0],J=ne[1],me=T.useState(n),Ce=jt(me,2),we=Ce[0],Fe=Ce[1],Ie=T.useState(n),Q=jt(Ie,2),le=Q[0],ce=Q[1],de=T.useState([]),Ee=jt(de,2),Ne=Ee[0],ge=Ee[1],De=T.useState(null),ke=jt(De,2),Be=ke[0],xe=ke[1],Se=T.useRef(n);Se.current=n;function ze(){var $e=Se.current;Fe($e),ce($e),ge([]),xe(null),Z()}Sa(function(){J(a);var $e=F5(q,a);if($e.key!==null)if($e.add){var Le=we.findIndex(function(At){var Tt=At.key;return Tt===$e.key}),Ge=qd(Ld(we,n,$e.key),B,p,A),ht=we.slice();ht.splice(Le+1,0,Kd),ce(ht),ge(Ge),xe("show")}else{var et=n.findIndex(function(At){var Tt=At.key;return Tt===$e.key}),nt=qd(Ld(n,we,$e.key),B,p,A),Ot=n.slice();Ot.splice(et+1,0,Kd),ce(Ot),ge(nt),xe("hide")}else we!==n&&(Fe(n),ce(n))},[a,n]),T.useEffect(function(){v||ze()},[v]);var dt=C?le:n,at={expandedKeys:a,selectedKeys:i,loadedKeys:u,loadingKeys:f,checkedKeys:c,halfCheckedKeys:d,dragOverNodeKey:w,dropPosition:x,keyEntities:m};return T.createElement(T.Fragment,null,R&&F&&T.createElement("span",{style:Hd,"aria-live":"assertive"},O5(F)),T.createElement("div",null,T.createElement("input",{style:Hd,disabled:N===!1||g,tabIndex:N!==!1?S:null,onKeyDown:z,onFocus:O,onBlur:V,value:"",onChange:T5,"aria-label":"for screen reader"})),T.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},T.createElement("div",{className:"".concat(r,"-indent")},T.createElement("div",{ref:W,className:"".concat(r,"-indent-unit")}))),T.createElement(Hp,Kt({},L,{data:dt,itemKey:Vd,height:p,fullHeight:!1,virtual:B,itemHeight:A,scrollWidth:k,prefixCls:"".concat(r,"-list"),ref:K,role:"tree",onVisibleChange:function(Le){Le.every(function(Ge){return Vd(Ge)!==qa})&&ze()}}),function($e){var Le=$e.pos,Ge=Object.assign({},(C1($e.data),$e.data)),ht=$e.title,et=$e.key,nt=$e.isStart,Ot=$e.isEnd,At=pi(et,Le);delete Ge.key,delete Ge.children;var Tt=Vo(At,at);return T.createElement(B5,Kt({},Ge,Tt,{title:ht,active:!!F&&et===F.key,pos:Le,data:$e.data,isStart:nt,isEnd:Ot,motion:C,motionNodes:et===qa?Ne:null,motionType:Be,onMotionStart:X,onMotionEnd:ze,treeNodeRequiredProps:at,onMouseMove:function(){I(null)}}))}))}),R5=10,M0=(function(e){N4(r,e);var t=T4(r);function r(){var n;O4(this,r);for(var a=arguments.length,i=new Array(a),c=0;c<a;c++)i[c]=arguments[c];return n=t.call.apply(t,[this].concat(i)),He(rr(n),"destroyed",!1),He(rr(n),"delayedDragEnterLogic",void 0),He(rr(n),"loadingRetryTimes",{}),He(rr(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:po()}),He(rr(n),"dragStartMousePosition",null),He(rr(n),"dragNodeProps",null),He(rr(n),"currentMouseOverDroppableNodeKey",null),He(rr(n),"listRef",T.createRef()),He(rr(n),"onNodeDragStart",function(u,f){var d=n.state,m=d.expandedKeys,g=d.keyEntities,v=n.props.onDragStart,w=f.eventKey;n.dragNodeProps=f,n.dragStartMousePosition={x:u.clientX,y:u.clientY};var x=Zn(m,w);n.setState({draggingNodeKey:w,dragChildrenKeys:m5(w,g),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(x),window.addEventListener("dragend",n.onWindowDragEnd),v==null||v({event:u,node:Kr(f)})}),He(rr(n),"onNodeDragEnter",function(u,f){var d=n.state,m=d.expandedKeys,g=d.keyEntities,v=d.dragChildrenKeys,w=d.flattenNodes,x=d.indent,C=n.props,p=C.onDragEnter,A=C.onExpand,B=C.allowDrop,k=C.direction,N=f.pos,F=f.eventKey;if(n.currentMouseOverDroppableNodeKey!==F&&(n.currentMouseOverDroppableNodeKey=F),!n.dragNodeProps){n.resetDragState();return}var R=_d(u,n.dragNodeProps,f,x,n.dragStartMousePosition,B,w,g,m,k),S=R.dropPosition,z=R.dropLevelOffset,O=R.dropTargetKey,V=R.dropContainerKey,I=R.dropTargetPos,X=R.dropAllowed,Z=R.dragOverNodeKey;if(v.includes(O)||!X){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(L){clearTimeout(n.delayedDragEnterLogic[L])}),n.dragNodeProps.eventKey!==f.eventKey&&(u.persist(),n.delayedDragEnterLogic[N]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var L=ir(m),K=xn(g,f.eventKey);K&&(K.children||[]).length&&(L=ia(m,f.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(L),A==null||A(L,{node:Kr(f),expanded:!0,nativeEvent:u.nativeEvent})}},800)),n.dragNodeProps.eventKey===O&&z===0){n.resetDragState();return}n.setState({dragOverNodeKey:Z,dropPosition:S,dropLevelOffset:z,dropTargetKey:O,dropContainerKey:V,dropTargetPos:I,dropAllowed:X}),p==null||p({event:u,node:Kr(f),expandedKeys:m})}),He(rr(n),"onNodeDragOver",function(u,f){var d=n.state,m=d.dragChildrenKeys,g=d.flattenNodes,v=d.keyEntities,w=d.expandedKeys,x=d.indent,C=n.props,p=C.onDragOver,A=C.allowDrop,B=C.direction;if(n.dragNodeProps){var k=_d(u,n.dragNodeProps,f,x,n.dragStartMousePosition,A,g,v,w,B),N=k.dropPosition,F=k.dropLevelOffset,R=k.dropTargetKey,S=k.dropContainerKey,z=k.dropTargetPos,O=k.dropAllowed,V=k.dragOverNodeKey;m.includes(R)||!O||(n.dragNodeProps.eventKey===R&&F===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===n.state.dropPosition&&F===n.state.dropLevelOffset&&R===n.state.dropTargetKey&&S===n.state.dropContainerKey&&z===n.state.dropTargetPos&&O===n.state.dropAllowed&&V===n.state.dragOverNodeKey||n.setState({dropPosition:N,dropLevelOffset:F,dropTargetKey:R,dropContainerKey:S,dropTargetPos:z,dropAllowed:O,dragOverNodeKey:V}),p==null||p({event:u,node:Kr(f)}))}}),He(rr(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:Kr(f)})}),He(rr(n),"onWindowDragEnd",function(u){n.onNodeDragEnd(u,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),He(rr(n),"onNodeDragEnd",function(u,f){var d=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),d==null||d({event:u,node:Kr(f)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),He(rr(n),"onNodeDrop",function(u,f){var d,m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,g=n.state,v=g.dragChildrenKeys,w=g.dropPosition,x=g.dropTargetKey,C=g.dropTargetPos,p=g.dropAllowed;if(p){var A=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),x!==null){var B=Ue(Ue({},Vo(x,n.getTreeNodeRequiredProps())),{},{active:((d=n.getActiveItem())===null||d===void 0?void 0:d.key)===x,data:xn(n.state.keyEntities,x).node}),k=v.includes(x);Da(!k,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var N=O0(C),F={event:u,node:Kr(B),dragNode:n.dragNodeProps?Kr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(v),dropToGap:w!==0,dropPosition:w+Number(N[N.length-1])};m||A==null||A(F),n.dragNodeProps=null}}}),He(rr(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}),He(rr(n),"triggerExpandActionExpand",function(u,f){var d=n.state,m=d.expandedKeys,g=d.flattenNodes,v=f.expanded,w=f.key,x=f.isLeaf;if(!(x||u.shiftKey||u.metaKey||u.ctrlKey)){var C=g.filter(function(A){return A.key===w})[0],p=Kr(Ue(Ue({},Vo(w,n.getTreeNodeRequiredProps())),{},{data:C.data}));n.setExpandedKeys(v?Zn(m,w):ia(m,w)),n.onNodeExpand(u,p)}}),He(rr(n),"onNodeClick",function(u,f){var d=n.props,m=d.onClick,g=d.expandAction;g==="click"&&n.triggerExpandActionExpand(u,f),m==null||m(u,f)}),He(rr(n),"onNodeDoubleClick",function(u,f){var d=n.props,m=d.onDoubleClick,g=d.expandAction;g==="doubleClick"&&n.triggerExpandActionExpand(u,f),m==null||m(u,f)}),He(rr(n),"onNodeSelect",function(u,f){var d=n.state.selectedKeys,m=n.state,g=m.keyEntities,v=m.fieldNames,w=n.props,x=w.onSelect,C=w.multiple,p=f.selected,A=f[v.key],B=!p;B?C?d=ia(d,A):d=[A]:d=Zn(d,A);var k=d.map(function(N){var F=xn(g,N);return F?F.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:d}),x==null||x(d,{event:"select",selected:B,node:f,selectedNodes:k,nativeEvent:u.nativeEvent})}),He(rr(n),"onNodeCheck",function(u,f,d){var m=n.state,g=m.keyEntities,v=m.checkedKeys,w=m.halfCheckedKeys,x=n.props,C=x.checkStrictly,p=x.onCheck,A=f.key,B,k={event:"check",node:f,checked:d,nativeEvent:u.nativeEvent};if(C){var N=d?ia(v,A):Zn(v,A),F=Zn(w,A);B={checked:N,halfChecked:F},k.checkedNodes=N.map(function(I){return xn(g,I)}).filter(Boolean).map(function(I){return I.node}),n.setUncontrolledState({checkedKeys:N})}else{var R=so([].concat(ir(v),[A]),!0,g),S=R.checkedKeys,z=R.halfCheckedKeys;if(!d){var O=new Set(S);O.delete(A);var V=so(Array.from(O),{halfCheckedKeys:z},g);S=V.checkedKeys,z=V.halfCheckedKeys}B=S,k.checkedNodes=[],k.checkedNodesPositions=[],k.halfCheckedKeys=z,S.forEach(function(I){var X=xn(g,I);if(X){var Z=X.node,L=X.pos;k.checkedNodes.push(Z),k.checkedNodesPositions.push({node:Z,pos:L})}}),n.setUncontrolledState({checkedKeys:S},!1,{halfCheckedKeys:z})}p==null||p(B,k)}),He(rr(n),"onNodeLoad",function(u){var f,d=u.key,m=n.state.keyEntities,g=xn(m,d);if(!(g!=null&&(f=g.children)!==null&&f!==void 0&&f.length)){var v=new Promise(function(w,x){n.setState(function(C){var p=C.loadedKeys,A=p===void 0?[]:p,B=C.loadingKeys,k=B===void 0?[]:B,N=n.props,F=N.loadData,R=N.onLoad;if(!F||A.includes(d)||k.includes(d))return null;var S=F(u);return S.then(function(){var z=n.state.loadedKeys,O=ia(z,d);R==null||R(O,{event:"load",node:u}),n.setUncontrolledState({loadedKeys:O}),n.setState(function(V){return{loadingKeys:Zn(V.loadingKeys,d)}}),w()}).catch(function(z){if(n.setState(function(V){return{loadingKeys:Zn(V.loadingKeys,d)}}),n.loadingRetryTimes[d]=(n.loadingRetryTimes[d]||0)+1,n.loadingRetryTimes[d]>=R5){var O=n.state.loadedKeys;Da(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:ia(O,d)}),w()}x(z)}),{loadingKeys:ia(k,d)}})});return v.catch(function(){}),v}}),He(rr(n),"onNodeMouseEnter",function(u,f){var d=n.props.onMouseEnter;d==null||d({event:u,node:f})}),He(rr(n),"onNodeMouseLeave",function(u,f){var d=n.props.onMouseLeave;d==null||d({event:u,node:f})}),He(rr(n),"onNodeContextMenu",function(u,f){var d=n.props.onRightClick;d&&(u.preventDefault(),d({event:u,node:f}))}),He(rr(n),"onFocus",function(){var u=n.props.onFocus;n.setState({focused:!0});for(var f=arguments.length,d=new Array(f),m=0;m<f;m++)d[m]=arguments[m];u==null||u.apply(void 0,d)}),He(rr(n),"onBlur",function(){var u=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var f=arguments.length,d=new Array(f),m=0;m<f;m++)d[m]=arguments[m];u==null||u.apply(void 0,d)}),He(rr(n),"getTreeNodeRequiredProps",function(){var u=n.state,f=u.expandedKeys,d=u.selectedKeys,m=u.loadedKeys,g=u.loadingKeys,v=u.checkedKeys,w=u.halfCheckedKeys,x=u.dragOverNodeKey,C=u.dropPosition,p=u.keyEntities;return{expandedKeys:f||[],selectedKeys:d||[],loadedKeys:m||[],loadingKeys:g||[],checkedKeys:v||[],halfCheckedKeys:w||[],dragOverNodeKey:x,dropPosition:C,keyEntities:p}}),He(rr(n),"setExpandedKeys",function(u){var f=n.state,d=f.treeData,m=f.fieldNames,g=Dl(d,u,m);n.setUncontrolledState({expandedKeys:u,flattenNodes:g},!0)}),He(rr(n),"onNodeExpand",function(u,f){var d=n.state.expandedKeys,m=n.state,g=m.listChanging,v=m.fieldNames,w=n.props,x=w.onExpand,C=w.loadData,p=f.expanded,A=f[v.key];if(!g){var B=d.includes(A),k=!p;if(Da(p&&B||!p&&!B,"Expand state not sync with index check"),d=k?ia(d,A):Zn(d,A),n.setExpandedKeys(d),x==null||x(d,{node:f,expanded:k,nativeEvent:u.nativeEvent}),k&&C){var N=n.onNodeLoad(f);N&&N.then(function(){var F=Dl(n.state.treeData,d,v);n.setUncontrolledState({flattenNodes:F})}).catch(function(){var F=n.state.expandedKeys,R=Zn(F,A);n.setExpandedKeys(R)})}}}),He(rr(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),He(rr(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),He(rr(n),"onActiveChange",function(u){var f=n.state.activeKey,d=n.props,m=d.onActiveChange,g=d.itemScrollOffset,v=g===void 0?0:g;f!==u&&(n.setState({activeKey:u}),u!==null&&n.scrollTo({key:u,offset:v}),m==null||m(u))}),He(rr(n),"getActiveItem",function(){var u=n.state,f=u.activeKey,d=u.flattenNodes;return f===null?null:d.find(function(m){var g=m.key;return g===f})||null}),He(rr(n),"offsetActiveKey",function(u){var f=n.state,d=f.flattenNodes,m=f.activeKey,g=d.findIndex(function(x){var C=x.key;return C===m});g===-1&&u<0&&(g=d.length),g=(g+u+d.length)%d.length;var v=d[g];if(v){var w=v.key;n.onActiveChange(w)}else n.onActiveChange(null)}),He(rr(n),"onKeyDown",function(u){var f=n.state,d=f.activeKey,m=f.expandedKeys,g=f.checkedKeys,v=f.fieldNames,w=n.props,x=w.onKeyDown,C=w.checkable,p=w.selectable;switch(u.which){case Ln.UP:{n.offsetActiveKey(-1),u.preventDefault();break}case Ln.DOWN:{n.offsetActiveKey(1),u.preventDefault();break}}var A=n.getActiveItem();if(A&&A.data){var B=n.getTreeNodeRequiredProps(),k=A.data.isLeaf===!1||!!(A.data[v.children]||[]).length,N=Kr(Ue(Ue({},Vo(d,B)),{},{data:A.data,active:!0}));switch(u.which){case Ln.LEFT:{k&&m.includes(d)?n.onNodeExpand({},N):A.parent&&n.onActiveChange(A.parent.key),u.preventDefault();break}case Ln.RIGHT:{k&&!m.includes(d)?n.onNodeExpand({},N):A.children&&A.children.length&&n.onActiveChange(A.children[0].key),u.preventDefault();break}case Ln.ENTER:case Ln.SPACE:{C&&!N.disabled&&N.checkable!==!1&&!N.disableCheckbox?n.onNodeCheck({},N,!g.includes(d)):!C&&p&&!N.disabled&&N.selectable!==!1&&n.onNodeSelect({},N);break}}}x==null||x(u)}),He(rr(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 m=!1,g=!0,v={};Object.keys(u).forEach(function(w){if(n.props.hasOwnProperty(w)){g=!1;return}m=!0,v[w]=u[w]}),m&&(!f||g)&&n.setState(Ue(Ue({},v),d))}}),He(rr(n),"scrollTo",function(u){n.listRef.current.scrollTo(u)}),n}return M4(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var a=this.props,i=a.activeKey,c=a.itemScrollOffset,u=c===void 0?0:c;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i,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 a=this.state,i=a.focused,c=a.flattenNodes,u=a.keyEntities,f=a.draggingNodeKey,d=a.activeKey,m=a.dropLevelOffset,g=a.dropContainerKey,v=a.dropTargetKey,w=a.dropPosition,x=a.dragOverNodeKey,C=a.indent,p=this.props,A=p.prefixCls,B=p.className,k=p.style,N=p.showLine,F=p.focusable,R=p.tabIndex,S=R===void 0?0:R,z=p.selectable,O=p.showIcon,V=p.icon,I=p.switcherIcon,X=p.draggable,Z=p.checkable,L=p.checkStrictly,K=p.disabled,W=p.motion,G=p.loadData,ne=p.filterTreeNode,q=p.height,J=p.itemHeight,me=p.scrollWidth,Ce=p.virtual,we=p.titleRender,Fe=p.dropIndicatorRender,Ie=p.onContextMenu,Q=p.onScroll,le=p.direction,ce=p.rootClassName,de=p.rootStyle,Ee=cs(this.props,{aria:!0,data:!0}),Ne;X&&(Pn(X)==="object"?Ne=X:typeof X=="function"?Ne={nodeDraggable:X}:Ne={});var ge={prefixCls:A,selectable:z,showIcon:O,icon:V,switcherIcon:I,draggable:Ne,draggingNodeKey:f,checkable:Z,checkStrictly:L,disabled:K,keyEntities:u,dropLevelOffset:m,dropContainerKey:g,dropTargetKey:v,dropPosition:w,dragOverNodeKey:x,indent:C,direction:le,dropIndicatorRender:Fe,loadData:G,filterTreeNode:ne,titleRender:we,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 T.createElement(T0.Provider,{value:ge},T.createElement("div",{className:kt(A,B,ce,He(He(He({},"".concat(A,"-show-line"),N),"".concat(A,"-focused"),i),"".concat(A,"-active-focused"),d!==null)),style:de},T.createElement(M5,Kt({ref:this.listRef,prefixCls:A,style:k,data:c,disabled:K,selectable:z,checkable:!!Z,motion:W,dragging:f!==null,height:q,itemHeight:J,virtual:Ce,focusable:F,focused:i,tabIndex:S,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ie,onScroll:Q,scrollWidth:me},this.getTreeNodeRequiredProps(),Ee))))}}],[{key:"getDerivedStateFromProps",value:function(a,i){var c=i.prevProps,u={prevProps:a};function f(S){return!c&&a.hasOwnProperty(S)||c&&c[S]!==a[S]}var d,m=i.fieldNames;if(f("fieldNames")&&(m=po(a.fieldNames),u.fieldNames=m),f("treeData")?d=a.treeData:f("children")&&(Da(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),d=Xp(a.children)),d){u.treeData=d;var g=k0(d,{fieldNames:m});u.keyEntities=Ue(He({},qa,D1),g.keyEntities)}var v=u.keyEntities||i.keyEntities;if(f("expandedKeys")||c&&f("autoExpandParent"))u.expandedKeys=a.autoExpandParent||!c&&a.defaultExpandParent?Ou(a.expandedKeys,v):a.expandedKeys;else if(!c&&a.defaultExpandAll){var w=Ue({},v);delete w[qa];var x=[];Object.keys(w).forEach(function(S){var z=w[S];z.children&&z.children.length&&x.push(z.key)}),u.expandedKeys=x}else!c&&a.defaultExpandedKeys&&(u.expandedKeys=a.autoExpandParent||a.defaultExpandParent?Ou(a.defaultExpandedKeys,v):a.defaultExpandedKeys);if(u.expandedKeys||delete u.expandedKeys,d||u.expandedKeys){var C=Dl(d||i.treeData,u.expandedKeys||i.expandedKeys,m);u.flattenNodes=C}if(a.selectable&&(f("selectedKeys")?u.selectedKeys=zd(a.selectedKeys,a):!c&&a.defaultSelectedKeys&&(u.selectedKeys=zd(a.defaultSelectedKeys,a))),a.checkable){var p;if(f("checkedKeys")?p=kl(a.checkedKeys)||{}:!c&&a.defaultCheckedKeys?p=kl(a.defaultCheckedKeys)||{}:d&&(p=kl(a.checkedKeys)||{checkedKeys:i.checkedKeys,halfCheckedKeys:i.halfCheckedKeys}),p){var A=p,B=A.checkedKeys,k=B===void 0?[]:B,N=A.halfCheckedKeys,F=N===void 0?[]:N;if(!a.checkStrictly){var R=so(k,!0,v);k=R.checkedKeys,F=R.halfCheckedKeys}u.checkedKeys=k,u.halfCheckedKeys=F}}return f("loadedKeys")&&(u.loadedKeys=a.loadedKeys),u}}]),r})(T.Component);He(M0,"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:E5,allowDrop:function(){return!0},expandAction:!1});He(M0,"TreeNode",Qo);var $5={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"},P5=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:$5}))},k1=T.forwardRef(P5),I5={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"},_5=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:I5}))},z5=T.forwardRef(_5),j5={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"},L5=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:j5}))},H5=T.forwardRef(L5),K5={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"},q5=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:K5}))},V5=T.forwardRef(q5);const W5=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:a,borderRadius:i,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 ${a}`,content:'""',borderRadius:i},"&:hover:before":{background:c}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:i,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),U5=new P4("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),G5=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),Y5=(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:`${Ct(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),X5=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:a,titleHeight:i,indentSize:c,nodeSelectedBg:u,nodeHoverBg:f,colorTextQuaternary:d,controlItemBgActiveDisabled:m}=t;return{[r]:Object.assign(Object.assign({},D0(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)`]:I4(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:U5,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:a,lineHeight:Ct(i),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:a},[`&-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:m},[`${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:i,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(i).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},G5(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:i,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:i,height:i,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(i).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:i,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},Y5(e,t)),{"&:hover":{backgroundColor:f},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:u},[`${r}-iconEle`]:{display:"inline-block",width:i,height:i,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(i).div(2).equal(),bottom:t.calc(a).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:`${Ct(t.calc(i).div(2).equal())} !important`}})}},Z5=(e,t,r=!0)=>{const n=`.${e}`,a=`${n}-treenode`,i=t.calc(t.paddingXS).div(2).equal(),c=ls(t,{treeCls:n,treeNodeCls:a,treeNodePadding:i});return[X5(e,c),r&&W5(c)].filter(Boolean)},J5=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,a=t;return{titleHeight:a,indentSize:a,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},Q5=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},J5(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},e6=v0("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:R4(`${t}-checkbox`,e)},Z5(t,e),$4(e)],Q5),Wd=4;function t6(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:a,direction:i="ltr"}=e,c=i==="ltr"?"left":"right",u=i==="ltr"?"right":"left",f={[c]:-r*a+Wd,[u]:0};switch(t){case-1:f.top=-3;break;case 1:f.bottom=-3;break;default:f.bottom=-3,f[c]=a+Wd;break}return We.createElement("div",{style:f,className:`${n}-drop-indicator`})}var r6={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"},n6=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:r6}))},a6=T.forwardRef(n6),o6={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"},i6=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:o6}))},s6=T.forwardRef(i6),l6={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"},u6=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:l6}))},c6=T.forwardRef(u6);const d6=e=>{var t,r;const{prefixCls:n,switcherIcon:a,treeNodeProps:i,showLine:c,switcherLoadingIcon:u}=e,{isLeaf:f,expanded:d,loading:m}=i;if(m)return T.isValidElement(u)?u:T.createElement(_4,{className:`${n}-switcher-loading-icon`});let g;if(c&&typeof c=="object"&&(g=c.showLeafIcon),f){if(!c)return null;if(typeof g!="boolean"&&g){const x=typeof g=="function"?g(i):g,C=`${n}-switcher-line-custom-icon`;return T.isValidElement(x)?Cd(x,{className:kt((t=x.props)===null||t===void 0?void 0:t.className,C)}):x}return g?T.createElement(k1,{className:`${n}-switcher-line-icon`}):T.createElement("span",{className:`${n}-switcher-leaf-line`})}const v=`${n}-switcher-icon`,w=typeof a=="function"?a(i):a;return T.isValidElement(w)?Cd(w,{className:kt((r=w.props)===null||r===void 0?void 0:r.className,v)}):w!==void 0?w:c?d?T.createElement(s6,{className:`${n}-switcher-line-icon`}):T.createElement(c6,{className:`${n}-switcher-line-icon`}):T.createElement(a6,{className:v})},E1=We.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:a,virtual:i,tree:c}=We.useContext(hi),{prefixCls:u,className:f,showIcon:d=!1,showLine:m,switcherIcon:g,switcherLoadingIcon:v,blockNode:w=!1,children:x,checkable:C=!1,selectable:p=!0,draggable:A,disabled:B,motion:k,style:N}=e,F=n("tree",u),R=n(),S=We.useContext(z4),z=B??S,O=k??Object.assign(Object.assign({},j4(R)),{motionAppear:!1}),V=Object.assign(Object.assign({},e),{checkable:C,selectable:p,showIcon:d,motion:O,blockNode:w,disabled:z,showLine:!!m,dropIndicatorRender:t6}),[I,X,Z]=e6(F),[,L]=Kp(),K=L.paddingXS/2+(((r=L.Tree)===null||r===void 0?void 0:r.titleHeight)||L.controlHeightSM),W=We.useMemo(()=>{if(!A)return!1;let ne={};switch(typeof A){case"function":ne.nodeDraggable=A;break;case"object":ne=Object.assign({},A);break}return ne.icon!==!1&&(ne.icon=ne.icon||We.createElement(V5,null)),ne},[A]),G=ne=>We.createElement(d6,{prefixCls:F,switcherIcon:g,switcherLoadingIcon:v,treeNodeProps:ne,showLine:m});return I(We.createElement(M0,Object.assign({itemHeight:K,ref:t,virtual:i},V,{style:Object.assign(Object.assign({},c==null?void 0:c.style),N),prefixCls:F,className:kt({[`${F}-icon-hide`]:!d,[`${F}-block-node`]:w,[`${F}-unselectable`]:!p,[`${F}-rtl`]:a==="rtl",[`${F}-disabled`]:z},c==null?void 0:c.className,f,X,Z),direction:a,checkable:C&&We.createElement("span",{className:`${F}-checkbox-inner`}),selectable:p,switcherIcon:G,draggable:W}),x))}),Ud=0,El=1,Gd=2;function R0(e,t,r){const{key:n,children:a}=r;function i(c){const u=c[n],f=c[a];t(u,c)!==!1&&R0(f||[],t,r)}e.forEach(i)}function f6({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:a}){const i=[];let c=Ud;if(r&&r===n)return[r];if(!r||!n)return[];function u(f){return f===r||f===n}return R0(e,f=>{if(c===Gd)return!1;if(u(f)){if(i.push(f),c===Ud)c=El;else if(c===El)return c=Gd,!1}else c===El&&i.push(f);return t.includes(f)},po(a)),i}function Sl(e,t,r){const n=ir(t),a=[];return R0(e,(i,c)=>{const u=n.indexOf(i);return u!==-1&&(a.push(c),n.splice(u,1)),!!n.length},po(r)),a}var Yd=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};function h6(e){const{isLeaf:t,expanded:r}=e;return t?T.createElement(k1,null):r?T.createElement(z5,null):T.createElement(H5,null)}function Xd({treeData:e,children:t}){return e||Xp(t)}const p6=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:a}=e,i=Yd(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const c=T.useRef(null),u=T.useRef(null),f=()=>{const{keyEntities:z}=k0(Xd(i),{fieldNames:i.fieldNames});let O;return r?O=Object.keys(z):n?O=Ou(i.expandedKeys||a||[],z):O=i.expandedKeys||a||[],O},[d,m]=T.useState(i.selectedKeys||i.defaultSelectedKeys||[]),[g,v]=T.useState(()=>f());T.useEffect(()=>{"selectedKeys"in i&&m(i.selectedKeys)},[i.selectedKeys]),T.useEffect(()=>{"expandedKeys"in i&&v(i.expandedKeys)},[i.expandedKeys]);const w=(z,O)=>{var V;return"expandedKeys"in i||v(z),(V=i.onExpand)===null||V===void 0?void 0:V.call(i,z,O)},x=(z,O)=>{var V;const{multiple:I,fieldNames:X}=i,{node:Z,nativeEvent:L}=O,{key:K=""}=Z,W=Xd(i),G=Object.assign(Object.assign({},O),{selected:!0}),ne=(L==null?void 0:L.ctrlKey)||(L==null?void 0:L.metaKey),q=L==null?void 0:L.shiftKey;let J;I&&ne?(J=z,c.current=K,u.current=J,G.selectedNodes=Sl(W,J,X)):I&&q?(J=Array.from(new Set([].concat(ir(u.current||[]),ir(f6({treeData:W,expandedKeys:g,startKey:K,endKey:c.current,fieldNames:X}))))),G.selectedNodes=Sl(W,J,X)):(J=[K],c.current=K,u.current=J,G.selectedNodes=Sl(W,J,X)),(V=i.onSelect)===null||V===void 0||V.call(i,J,G),"selectedKeys"in i||m(J)},{getPrefixCls:C,direction:p}=T.useContext(hi),{prefixCls:A,className:B,showIcon:k=!0,expandAction:N="click"}=i,F=Yd(i,["prefixCls","className","showIcon","expandAction"]),R=C("tree",A),S=kt(`${R}-directory`,{[`${R}-directory-rtl`]:p==="rtl"},B);return T.createElement(E1,Object.assign({icon:h6,ref:t,blockNode:!0},F,{showIcon:k,expandAction:N,prefixCls:R,className:S,expandedKeys:g,selectedKeys:d,onSelect:x,onExpand:w}))},m6=T.forwardRef(p6),$0=E1;$0.DirectoryTree=m6;$0.TreeNode=Qo;const Zd=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:a,onChange:i}=e;return r?T.createElement("div",{className:`${n}-filter-dropdown-search`},T.createElement(L4,{prefix:T.createElement(H4,null),placeholder:a.filterSearchPlaceholder,onChange:i,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},g6=e=>{const{keyCode:t}=e;t===Ln.ENTER&&e.stopPropagation()},v6=T.forwardRef((e,t)=>T.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:g6,ref:t},e.children));function lo(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(ir(t),ir(lo(n))))}),t}function b6(e){return e.some(({children:t})=>t)}function S1(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function A1({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:a,filterSearch:i}){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:A1({filters:c.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:a,filterSearch:i})};const d=n?ds:Rp,m={key:c.value!==void 0?f:u,label:T.createElement(T.Fragment,null,T.createElement(d,{checked:r.includes(f)}),T.createElement("span",null,c.text))};return a.trim()?typeof i=="function"?i(a,c)?m:null:S1(a,c.text)?m:null:m})}function Al(e){return e||[]}const y6=e=>{var t,r,n,a;const{tablePrefixCls:i,prefixCls:c,column:u,dropdownPrefixCls:f,columnKey:d,filterOnClose:m,filterMultiple:g,filterMode:v="menu",filterSearch:w=!1,filterState:x,triggerFilter:C,locale:p,children:A,getPopupContainer:B,rootClassName:k}=e,{filterResetToDefaultFilteredValue:N,defaultFilteredValue:F,filterDropdownProps:R={},filterDropdownOpen:S,filterDropdownVisible:z,onFilterDropdownVisibleChange:O,onFilterDropdownOpenChange:V}=u,[I,X]=T.useState(!1),Z=!!(x&&(!((t=x.filteredKeys)===null||t===void 0)&&t.length||x.forceFiltered)),L=$e=>{var Le;X($e),(Le=R.onOpenChange)===null||Le===void 0||Le.call(R,$e),V==null||V($e),O==null||O($e)},K=(a=(n=(r=R.open)!==null&&r!==void 0?r:S)!==null&&n!==void 0?n:z)!==null&&a!==void 0?a:I,W=x==null?void 0:x.filteredKeys,[G,ne]=a2(Al(W)),q=({selectedKeys:$e})=>{ne($e)},J=($e,{node:Le,checked:Ge})=>{q(g?{selectedKeys:$e}:{selectedKeys:Ge&&Le.key?[Le.key]:[]})};T.useEffect(()=>{I&&q({selectedKeys:Al(W)})},[W]);const[me,Ce]=T.useState([]),we=$e=>{Ce($e)},[Fe,Ie]=T.useState(""),Q=$e=>{const{value:Le}=$e.target;Ie(Le)};T.useEffect(()=>{I||Ie("")},[I]);const le=$e=>{const Le=$e!=null&&$e.length?$e:null;if(Le===null&&(!x||!x.filteredKeys)||ho(Le,x==null?void 0:x.filteredKeys,!0))return null;C({column:u,key:d,filteredKeys:Le})},ce=()=>{L(!1),le(G())},de=({confirm:$e,closeDropdown:Le}={confirm:!1,closeDropdown:!1})=>{$e&&le([]),Le&&L(!1),Ie(""),ne(N?(F||[]).map(Ge=>String(Ge)):[])},Ee=({closeDropdown:$e}={closeDropdown:!0})=>{$e&&L(!1),le(G())},Ne=($e,Le)=>{Le.source==="trigger"&&($e&&W!==void 0&&ne(Al(W)),L($e),!$e&&!u.filterDropdown&&m&&ce())},ge=kt({[`${f}-menu-without-submenu`]:!b6(u.filters||[])}),De=$e=>{if($e.target.checked){const Le=lo(u==null?void 0:u.filters).map(Ge=>String(Ge));ne(Le)}else ne([])},ke=({filters:$e})=>($e||[]).map((Le,Ge)=>{const ht=String(Le.value),et={title:Le.text,key:Le.value!==void 0?ht:String(Ge)};return Le.children&&(et.children=ke({filters:Le.children})),et}),Be=$e=>{var Le;return Object.assign(Object.assign({},$e),{text:$e.title,value:$e.key,children:((Le=$e.children)===null||Le===void 0?void 0:Le.map(Ge=>Be(Ge)))||[]})};let xe;const{direction:Se,renderEmpty:ze}=T.useContext(hi);if(typeof u.filterDropdown=="function")xe=u.filterDropdown({prefixCls:`${f}-custom`,setSelectedKeys:$e=>q({selectedKeys:$e}),selectedKeys:G(),confirm:Ee,clearFilters:de,filters:u.filters,visible:K,close:()=>{L(!1)}});else if(u.filterDropdown)xe=u.filterDropdown;else{const $e=G()||[],Le=()=>{var ht,et;const nt=(ht=ze==null?void 0:ze("Table.filter"))!==null&&ht!==void 0?ht:T.createElement(kd,{image:kd.PRESENTED_IMAGE_SIMPLE,description:p.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((u.filters||[]).length===0)return nt;if(v==="tree")return T.createElement(T.Fragment,null,T.createElement(Zd,{filterSearch:w,value:Fe,onChange:Q,tablePrefixCls:i,locale:p}),T.createElement("div",{className:`${i}-filter-dropdown-tree`},g?T.createElement(ds,{checked:$e.length===lo(u.filters).length,indeterminate:$e.length>0&&$e.length<lo(u.filters).length,className:`${i}-filter-dropdown-checkall`,onChange:De},(et=p==null?void 0:p.filterCheckall)!==null&&et!==void 0?et:p==null?void 0:p.filterCheckAll):null,T.createElement($0,{checkable:!0,selectable:!1,blockNode:!0,multiple:g,checkStrictly:!g,className:`${f}-menu`,onCheck:J,checkedKeys:$e,selectedKeys:$e,showIcon:!1,treeData:ke({filters:u.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Fe.trim()?Tt=>typeof w=="function"?w(Fe,Be(Tt)):S1(Fe,Tt.title):void 0})));const Ot=A1({filters:u.filters||[],filterSearch:w,prefixCls:c,filteredKeys:G(),filterMultiple:g,searchValue:Fe}),At=Ot.every(Tt=>Tt===null);return T.createElement(T.Fragment,null,T.createElement(Zd,{filterSearch:w,value:Fe,onChange:Q,tablePrefixCls:i,locale:p}),At?nt:T.createElement(X4,{selectable:!0,multiple:g,prefixCls:`${f}-menu`,className:ge,onSelect:q,onDeselect:q,selectedKeys:$e,getPopupContainer:B,openKeys:me,onOpenChange:we,items:Ot}))},Ge=()=>N?ho((F||[]).map(ht=>String(ht)),$e,!0):$e.length===0;xe=T.createElement(T.Fragment,null,Le(),T.createElement("div",{className:`${c}-dropdown-btns`},T.createElement(Dd,{type:"link",size:"small",disabled:Ge(),onClick:()=>de()},p.filterReset),T.createElement(Dd,{type:"primary",size:"small",onClick:ce},p.filterConfirm)))}u.filterDropdown&&(xe=T.createElement(Z4,{selectable:void 0},xe)),xe=T.createElement(v6,{className:`${c}-dropdown`},xe);const at=qp({trigger:["click"],placement:Se==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let $e;return typeof u.filterIcon=="function"?$e=u.filterIcon(Z):u.filterIcon?$e=u.filterIcon:$e=T.createElement(k5,null),T.createElement("span",{role:"button",tabIndex:-1,className:kt(`${c}-trigger`,{active:Z}),onClick:Le=>{Le.stopPropagation()}},$e)})(),getPopupContainer:B},Object.assign(Object.assign({},R),{rootClassName:kt(k,R.rootClassName),open:K,onOpenChange:Ne,popupRender:()=>typeof(R==null?void 0:R.dropdownRender)=="function"?R.dropdownRender(xe):xe}));return T.createElement("div",{className:`${c}-column`},T.createElement("span",{className:`${i}-column-title`},A),T.createElement(Up,Object.assign({},at)))},Iu=(e,t,r)=>{let n=[];return(e||[]).forEach((a,i)=>{var c;const u=Eo(i,r),f=a.filterDropdown!==void 0;if(a.filters||f||"onFilter"in a)if("filteredValue"in a){let d=a.filteredValue;f||(d=(c=d==null?void 0:d.map(String))!==null&&c!==void 0?c:d),n.push({column:a,key:Ba(a,u),filteredKeys:d,forceFiltered:a.filtered})}else n.push({column:a,key:Ba(a,u),filteredKeys:t&&a.defaultFilteredValue?a.defaultFilteredValue:void 0,forceFiltered:a.filtered});"children"in a&&(n=[].concat(ir(n),ir(Iu(a.children,t,u))))}),n};function B1(e,t,r,n,a,i,c,u,f){return r.map((d,m)=>{const g=Eo(m,u),{filterOnClose:v=!0,filterMultiple:w=!0,filterMode:x,filterSearch:C}=d;let p=d;if(p.filters||p.filterDropdown){const A=Ba(p,g),B=n.find(({key:k})=>A===k);p=Object.assign(Object.assign({},p),{title:k=>T.createElement(y6,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:p,columnKey:A,filterState:B,filterOnClose:v,filterMultiple:w,filterMode:x,filterSearch:C,triggerFilter:i,locale:a,getPopupContainer:c,rootClassName:f},Ns(d.title,k))})}return"children"in p&&(p=Object.assign(Object.assign({},p),{children:B1(e,t,p.children,n,a,i,c,g,f)})),p})}const Jd=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:a})=>{const i=r,{filters:c,filterDropdown:u}=a;if(u)t[i]=n||null;else if(Array.isArray(n)){const f=lo(c);t[i]=f.filter(d=>n.includes(String(d)))}else t[i]=null}),t},_u=(e,t,r)=>t.reduce((a,i)=>{const{column:{onFilter:c,filters:u},filteredKeys:f}=i;return c&&f&&f.length?a.map(d=>Object.assign({},d)).filter(d=>f.some(m=>{const g=lo(u),v=g.findIndex(x=>String(x)===String(m)),w=v!==-1?g[v]:m;return d[r]&&(d[r]=_u(d[r],t,r)),c(w,d)})):a},e),F1=e=>e.flatMap(t=>"children"in t?[t].concat(ir(F1(t.children||[]))):[t]),x6=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:a,getPopupContainer:i,locale:c,rootClassName:u}=e;C0();const f=T.useMemo(()=>F1(n||[]),[n]),[d,m]=T.useState(()=>Iu(f,!0)),g=T.useMemo(()=>{const C=Iu(f,!1);if(C.length===0)return C;let p=!0;if(C.forEach(({filteredKeys:A})=>{A!==void 0&&(p=!1)}),p){const A=(f||[]).map((B,k)=>Ba(B,Eo(k)));return d.filter(({key:B})=>A.includes(B)).map(B=>{const k=f[A.indexOf(B.key)];return Object.assign(Object.assign({},B),{column:Object.assign(Object.assign({},B.column),k),forceFiltered:k.filtered})})}return C},[f,d]),v=T.useMemo(()=>Jd(g),[g]),w=C=>{const p=g.filter(({key:A})=>A!==C.key);p.push(C),m(p),a(Jd(p),p)};return[C=>B1(t,r,C,g,c,w,i,void 0,u),g,v]},w6=(e,t,r)=>{const n=T.useRef({});function a(i){var c;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let f=function(d){d.forEach((m,g)=>{const v=r(m,g);u.set(v,m),m&&typeof m=="object"&&t in m&&f(m[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(i)}return[a]};var C6=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 a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r};const N1=10;function D6(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(a=>{const i=e[a];typeof i!="function"&&(r[a]=i)}),r}function k6(e,t,r){const n=r&&typeof r=="object"?r:{},{total:a=0}=n,i=C6(n,["total"]),[c,u]=$t(()=>({current:"defaultCurrent"in i?i.defaultCurrent:1,pageSize:"defaultPageSize"in i?i.defaultPageSize:N1})),f=qp(c,i,{total:a>0?a:e}),d=Math.ceil((a||e)/f.pageSize);f.current>d&&(f.current=d||1);const m=(v,w)=>{u({current:v??1,pageSize:w||f.pageSize})},g=(v,w)=>{var x;r&&((x=r.onChange)===null||x===void 0||x.call(r,v,w)),m(v,w),t(v,w||(f==null?void 0:f.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},f),{onChange:g}),m]}var E6={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"},S6=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:E6}))},A6=T.forwardRef(S6),B6={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"},F6=function(t,r){return T.createElement(pn,Kt({},t,{ref:r,icon:B6}))},N6=T.forwardRef(F6);const Ui="ascend",Bl="descend",hs=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,Qd=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,T6=(e,t)=>t?e[e.indexOf(t)+1]:e[0],zu=(e,t,r)=>{let n=[];const a=(i,c)=>{n.push({column:i,key:Ba(i,c),multiplePriority:hs(i),sortOrder:i.sortOrder})};return(e||[]).forEach((i,c)=>{const u=Eo(c,r);i.children?("sortOrder"in i&&a(i,u),n=[].concat(ir(n),ir(zu(i.children,t,u)))):i.sorter&&("sortOrder"in i?a(i,u):t&&i.defaultSortOrder&&n.push({column:i,key:Ba(i,u),multiplePriority:hs(i),sortOrder:i.defaultSortOrder}))}),n},T1=(e,t,r,n,a,i,c,u)=>(t||[]).map((d,m)=>{const g=Eo(m,u);let v=d;if(v.sorter){const w=v.sortDirections||a,x=v.showSorterTooltip===void 0?c:v.showSorterTooltip,C=Ba(v,g),p=r.find(({key:O})=>O===C),A=p?p.sortOrder:null,B=T6(w,A);let k;if(d.sortIcon)k=d.sortIcon({sortOrder:A});else{const O=w.includes(Ui)&&T.createElement(N6,{className:kt(`${e}-column-sorter-up`,{active:A===Ui})}),V=w.includes(Bl)&&T.createElement(A6,{className:kt(`${e}-column-sorter-down`,{active:A===Bl})});k=T.createElement("span",{className:kt(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(O&&V)})},T.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},O,V))}const{cancelSort:N,triggerAsc:F,triggerDesc:R}=i||{};let S=N;B===Bl?S=R:B===Ui&&(S=F);const z=typeof x=="object"?Object.assign({title:S},x):{title:S};v=Object.assign(Object.assign({},v),{className:kt(v.className,{[`${e}-column-sort`]:A}),title:O=>{const V=`${e}-column-sorters`,I=T.createElement("span",{className:`${e}-column-title`},Ns(d.title,O)),X=T.createElement("div",{className:V},I,k);return x?typeof x!="boolean"&&(x==null?void 0:x.target)==="sorter-icon"?T.createElement("div",{className:`${V} ${e}-column-sorters-tooltip-target-sorter`},I,T.createElement(ku,Object.assign({},z),k)):T.createElement(ku,Object.assign({},z),X):X},onHeaderCell:O=>{var V;const I=((V=d.onHeaderCell)===null||V===void 0?void 0:V.call(d,O))||{},X=I.onClick,Z=I.onKeyDown;I.onClick=W=>{n({column:d,key:C,sortOrder:B,multiplePriority:hs(d)}),X==null||X(W)},I.onKeyDown=W=>{W.keyCode===Ln.ENTER&&(n({column:d,key:C,sortOrder:B,multiplePriority:hs(d)}),Z==null||Z(W))};const L=w5(d.title,{}),K=L==null?void 0:L.toString();return A&&(I["aria-sort"]=A==="ascend"?"ascending":"descending"),I["aria-label"]=K||"",I.className=kt(I.className,`${e}-column-has-sorters`),I.tabIndex=0,d.ellipsis&&(I.title=(L??"").toString()),I}})}return"children"in v&&(v=Object.assign(Object.assign({},v),{children:T1(e,v.children,r,n,a,i,c,g)})),v}),ef=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},tf=e=>{const t=e.filter(({sortOrder:r})=>r).map(ef);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},ef(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},ju=(e,t,r)=>{const n=t.slice().sort((c,u)=>u.multiplePriority-c.multiplePriority),a=e.slice(),i=n.filter(({column:{sorter:c},sortOrder:u})=>Qd(c)&&u);return i.length?a.sort((c,u)=>{for(let f=0;f<i.length;f+=1){const d=i[f],{column:{sorter:m},sortOrder:g}=d,v=Qd(m);if(v&&g){const w=v(c,u,g);if(w!==0)return g===Ui?w:-w}}return 0}).map(c=>{const u=c[r];return u?Object.assign(Object.assign({},c),{[r]:ju(u,t,r)}):c}):a},O6=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:a,showSorterTooltip:i,onSorterChange:c}=e,[u,f]=T.useState(()=>zu(r,!0)),d=(C,p)=>{const A=[];return C.forEach((B,k)=>{const N=Eo(k,p);if(A.push(Ba(B,N)),Array.isArray(B.children)){const F=d(B.children,N);A.push.apply(A,ir(F))}}),A},m=T.useMemo(()=>{let C=!0;const p=zu(r,!1);if(!p.length){const N=d(r);return u.filter(({key:F})=>N.includes(F))}const A=[];function B(N){C?A.push(N):A.push(Object.assign(Object.assign({},N),{sortOrder:null}))}let k=null;return p.forEach(N=>{k===null?(B(N),N.sortOrder&&(N.multiplePriority===!1?C=!1:k=!0)):(k&&N.multiplePriority!==!1||(C=!1),B(N))}),A},[r,u]),g=T.useMemo(()=>{var C,p;const A=m.map(({column:B,sortOrder:k})=>({column:B,order:k}));return{sortColumns:A,sortColumn:(C=A[0])===null||C===void 0?void 0:C.column,sortOrder:(p=A[0])===null||p===void 0?void 0:p.order}},[m]),v=C=>{let p;C.multiplePriority===!1||!m.length||m[0].multiplePriority===!1?p=[C]:p=[].concat(ir(m.filter(({key:A})=>A!==C.key)),[C]),f(p),c(tf(p),p)};return[C=>T1(t,C,m,v,n,a,i),m,g,()=>tf(m)]},O1=(e,t)=>e.map(n=>{const a=Object.assign({},n);return a.title=Ns(n.title,t),"children"in a&&(a.children=O1(a.children,t)),a}),M6=e=>[T.useCallback(r=>O1(r,e),[e])],R6=b1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),$6=x1((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),P6=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:a,tableHeaderBg:i,tablePaddingVertical:c,tablePaddingHorizontal:u,calc:f}=e,d=`${Ct(r)} ${n} ${a}`,m=(g,v,w)=>({[`&${t}-${g}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${Ct(f(v).mul(-1).equal())}
|
|
2
|
+
${Ct(f(f(w).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:`${Ct(f(c).mul(-1).equal())} ${Ct(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}}}}}},m("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),m("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:d,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${Ct(r)} 0 ${Ct(r)} ${i}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:d}}}},I6=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},zp),{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"}})}}},_6=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}}}}},z6=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:a,paddingXS:i,lineType:c,tableBorderColor:u,tableExpandIconBg:f,tableExpandColumnWidth:d,borderRadius:m,tablePaddingVertical:g,tablePaddingHorizontal:v,tableExpandedRowBg:w,paddingXXS:x,expandIconMarginTop:C,expandIconSize:p,expandIconHalfInner:A,expandIconScale:B,calc:k}=e,N=`${Ct(a)} ${c} ${u}`,F=k(x).sub(a).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({},K4(e)),{position:"relative",float:"left",width:p,height:p,color:"inherit",lineHeight:Ct(p),background:f,border:N,borderRadius:m,transform:`scale(${B})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:A,insetInlineEnd:F,insetInlineStart:F,height:a},"&::after":{top:F,bottom:F,insetInlineStart:A,width:a,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:i},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:w}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${Ct(k(g).mul(-1).equal())} ${Ct(k(v).mul(-1).equal())}`,padding:`${Ct(g)} ${Ct(v)}`}}}},j6=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:a,tableFilterDropdownSearchWidth:i,paddingXXS:c,paddingXS:u,colorText:f,lineWidth:d,lineType:m,tableBorderColor:g,headerIconColor:v,fontSizeSM:w,tablePaddingHorizontal:x,borderRadius:C,motionDurationSlow:p,colorIcon:A,colorPrimary:B,tableHeaderFilterActiveBg:k,colorTextDisabled:N,tableFilterDropdownBg:F,tableFilterDropdownHeight:R,controlItemBgHover:S,controlItemBgActive:z,boxShadowSecondary:O,filterDropdownMenuBg:V,calc:I}=e,X=`${r}-dropdown`,Z=`${t}-filter-dropdown`,L=`${r}-tree`,K=`${Ct(d)} ${m} ${g}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:I(c).mul(-1).equal(),marginInline:`${Ct(c)} ${Ct(I(x).div(2).mul(-1).equal())}`,padding:`0 ${Ct(c)}`,color:v,fontSize:w,borderRadius:C,cursor:"pointer",transition:`all ${p}`,"&:hover":{color:A,background:k},"&.active":{color:B}}}},{[`${r}-dropdown`]:{[Z]:Object.assign(Object.assign({},D0(e)),{minWidth:a,backgroundColor:F,borderRadius:C,boxShadow:O,overflow:"hidden",[`${X}-menu`]:{maxHeight:R,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:V,"&:empty::after":{display:"block",padding:`${Ct(u)} 0`,color:N,fontSize:w,textAlign:"center",content:'"Not Found"'}},[`${Z}-tree`]:{paddingBlock:`${Ct(u)} 0`,paddingInline:u,[L]:{padding:0},[`${L}-treenode ${L}-node-content-wrapper:hover`]:{backgroundColor:S},[`${L}-treenode-checkbox-checked ${L}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:z}}},[`${Z}-search`]:{padding:u,borderBottom:K,"&-input":{input:{minWidth:i},[n]:{color:N}}},[`${Z}-checkall`]:{width:"100%",marginBottom:c,marginInlineStart:c},[`${Z}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${Ct(I(u).sub(d).equal())} ${Ct(u)}`,overflow:"hidden",borderTop:K}})}},{[`${r}-dropdown ${Z}, ${Z}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:u,color:f},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},L6=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:a,zIndexTableFixed:i,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:i,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 ${a}`,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 ${a}`,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 ${a}`,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"}}}}},H6=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper ${t}-pagination${r}-pagination`]:{margin:`${Ct(n)} 0`}}},K6=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${Ct(r)} ${Ct(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 ${Ct(r)} ${Ct(r)}`}}}}},q6=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"}}}}},V6=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:a,padding:i,paddingXS:c,headerIconColor:u,headerIconHoverColor:f,tableSelectionColumnWidth:d,tableSelectedRowBg:m,tableSelectedRowHoverBg:g,tableRowHoverBg:v,tablePaddingHorizontal:w,calc:x}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:d,[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(a).add(x(i).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:x(d).add(x(c).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:x(d).add(a).add(x(i).div(4)).add(x(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:x(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:Ct(x(w).div(4).equal()),[n]:{color:u,fontSize:a,verticalAlign:"baseline","&:hover":{color:f}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:m,"&-row-hover":{background:g}}},[`> ${t}-cell-row-hover`]:{background:v}}}}}},W6=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,a=(i,c,u,f)=>({[`${t}${t}-${i}`]:{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:`${Ct(c)} ${Ct(u)}`},[`${t}-filter-trigger`]:{marginInlineEnd:Ct(n(u).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${Ct(n(c).mul(-1).equal())} ${Ct(n(u).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:Ct(n(c).mul(-1).equal()),marginInline:`${Ct(n(r).sub(u).equal())} ${Ct(n(u).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:Ct(n(u).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},a("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),a("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},U6=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:a,headerIconHoverColor:i}=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:a,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:i}}}},G6=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:a,tableScrollThumbSize:i,tableScrollBg:c,zIndexTableSticky:u,stickyScrollBarBorderRadius:f,lineWidth:d,lineType:m,tableBorderColor:g}=e,v=`${Ct(d)} ${m} ${g}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:u,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${Ct(i)} !important`,zIndex:u,display:"flex",alignItems:"center",background:c,borderTop:v,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:n,borderRadius:f,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:a}}}}}}},rf=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:a}=e,i=`${Ct(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},[`div${t}-summary`]:{boxShadow:`0 ${Ct(a(r).mul(-1).equal())} 0 ${n}`}}}},Y6=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:a,tableBorderColor:i,calc:c}=e,u=`${Ct(n)} ${a} ${i}`,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) - ${Ct(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}}}}}},X6=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:a,tableExpandColumnWidth:i,lineWidth:c,lineType:u,tableBorderColor:f,tableFontSize:d,tableBg:m,tableRadius:g,tableHeaderTextColor:v,motionDurationMid:w,tableHeaderBg:x,tableHeaderCellSplitColor:C,tableFooterTextColor:p,tableFooterBg:A,calc:B}=e,k=`${Ct(c)} ${u} ${f}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},q4()),{[t]:Object.assign(Object.assign({},D0(e)),{fontSize:d,background:m,borderRadius:`${Ct(g)} ${Ct(g)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${Ct(g)} ${Ct(g)} 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:`${Ct(n)} ${Ct(a)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${Ct(n)} ${Ct(a)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:v,fontWeight:r,textAlign:"start",background:x,borderBottom:k,transition:`background ${w} 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 ${w}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${w}, border-color ${w}`,borderBottom:k,[`
|
|
60
|
+
> ${t}-wrapper:only-child,
|
|
61
|
+
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
62
|
+
`]:{[t]:{marginBlock:Ct(B(n).mul(-1).equal()),marginInline:`${Ct(B(i).sub(a).equal())}
|
|
63
|
+
${Ct(B(a).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:v,fontWeight:r,textAlign:"start",background:x,borderBottom:k,transition:`background ${w} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${Ct(n)} ${Ct(a)}`,color:p,background:A}})}},Z6=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:a,colorFillContent:i,controlItemBgActive:c,controlItemBgActiveHover:u,padding:f,paddingSM:d,paddingXS:m,colorBorderSecondary:g,borderRadiusLG:v,controlHeight:w,colorTextPlaceholder:x,fontSize:C,fontSizeSM:p,lineHeight:A,lineWidth:B,colorIcon:k,colorIconHover:N,opacityLoading:F,controlInteractiveSize:R}=e,S=new Tn(a).onBackground(r).toHexString(),z=new Tn(i).onBackground(r).toHexString(),O=new Tn(t).onBackground(r).toHexString(),V=new Tn(k),I=new Tn(N),X=R/2-B,Z=X*2+B*3;return{headerBg:O,headerColor:n,headerSortActiveBg:S,headerSortHoverBg:z,bodySortBg:O,rowHoverBg:O,rowSelectedBg:c,rowSelectedHoverBg:u,rowExpandedBg:t,cellPaddingBlock:f,cellPaddingInline:f,cellPaddingBlockMD:d,cellPaddingInlineMD:m,cellPaddingBlockSM:m,cellPaddingInlineSM:m,borderColor:g,headerBorderRadius:v,footerBg:O,footerColor:n,cellFontSize:C,cellFontSizeMD:C,cellFontSizeSM:C,headerSplitColor:g,fixedHeaderSortActiveBg:S,headerFilterHoverBg:i,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:w,stickyScrollBarBg:x,stickyScrollBarBorderRadius:100,expandIconMarginTop:(C*A-B*3)/2-Math.ceil((p*1.4-B*3)/2),headerIconColor:V.clone().setA(V.a*F).toRgbString(),headerIconHoverColor:I.clone().setA(I.a*F).toRgbString(),expandIconHalfInner:X,expandIconSize:Z,expandIconScale:R/Z}},nf=2,J6=v0("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:a,headerBg:i,headerColor:c,headerSortActiveBg:u,headerSortHoverBg:f,bodySortBg:d,rowHoverBg:m,rowSelectedBg:g,rowSelectedHoverBg:v,rowExpandedBg:w,cellPaddingBlock:x,cellPaddingInline:C,cellPaddingBlockMD:p,cellPaddingInlineMD:A,cellPaddingBlockSM:B,cellPaddingInlineSM:k,borderColor:N,footerBg:F,footerColor:R,headerBorderRadius:S,cellFontSize:z,cellFontSizeMD:O,cellFontSizeSM:V,headerSplitColor:I,fixedHeaderSortActiveBg:X,headerFilterHoverBg:Z,filterDropdownBg:L,expandIconBg:K,selectionColumnWidth:W,stickyScrollBarBg:G,calc:ne}=e,q=ls(e,{tableFontSize:z,tableBg:n,tableRadius:S,tablePaddingVertical:x,tablePaddingHorizontal:C,tablePaddingVerticalMiddle:p,tablePaddingHorizontalMiddle:A,tablePaddingVerticalSmall:B,tablePaddingHorizontalSmall:k,tableBorderColor:N,tableHeaderTextColor:c,tableHeaderBg:i,tableFooterTextColor:R,tableFooterBg:F,tableHeaderCellSplitColor:I,tableHeaderSortBg:u,tableHeaderSortHoverBg:f,tableBodySortBg:d,tableFixedHeaderSortActiveBg:X,tableHeaderFilterActiveBg:Z,tableFilterDropdownBg:L,tableRowHoverBg:m,tableSelectedRowBg:g,tableSelectedRowHoverBg:v,zIndexTableFixed:nf,zIndexTableSticky:ne(nf).add(1).equal({unit:!1}),tableFontSizeMiddle:O,tableFontSizeSmall:V,tableSelectionColumnWidth:W,tableExpandIconBg:K,tableExpandColumnWidth:ne(a).add(ne(e.padding).mul(2)).equal(),tableExpandedRowBg:w,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:G,tableScrollThumbBgHover:t,tableScrollBg:r});return[X6(q),H6(q),rf(q),U6(q),j6(q),P6(q),K6(q),z6(q),rf(q),_6(q),V6(q),L6(q),G6(q),I6(q),W6(q),q6(q),Y6(q)]},Z6,{unitless:{expandIconScale:!0}}),af=[],Q6=(e,t)=>{var r,n;const{prefixCls:a,className:i,rootClassName:c,style:u,size:f,bordered:d,dropdownPrefixCls:m,dataSource:g,pagination:v,rowSelection:w,rowKey:x="key",rowClassName:C,columns:p,children:A,childrenColumnName:B,onChange:k,getPopupContainer:N,loading:F,expandIcon:R,expandable:S,expandedRowRender:z,expandIconColumnIndex:O,indentSize:V,scroll:I,sortDirections:X,locale:Z,showSorterTooltip:L={target:"full-header"},virtual:K}=e;C0();const W=T.useMemo(()=>p||F0(A),[p,A]),G=T.useMemo(()=>W.some(wt=>wt.responsive),[W]),ne=V4(G),q=T.useMemo(()=>{const wt=new Set(Object.keys(ne).filter(vt=>ne[vt]));return W.filter(vt=>!vt.responsive||vt.responsive.some(ot=>wt.has(ot)))},[W,ne]),J=Pp(e,["className","style","columns"]),{locale:me=W4,direction:Ce,table:we,renderEmpty:Fe,getPrefixCls:Ie,getPopupContainer:Q}=T.useContext(hi),le=U4(f),ce=Object.assign(Object.assign({},me.Table),Z),de=g||af,Ee=Ie("table",a),Ne=Ie("dropdown",m),[,ge]=Kp(),De=b0(Ee),[ke,Be,xe]=J6(Ee,De),Se=Object.assign(Object.assign({childrenColumnName:B,expandIconColumnIndex:O},S),{expandIcon:(r=S==null?void 0:S.expandIcon)!==null&&r!==void 0?r:(n=we==null?void 0:we.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:ze="children"}=Se,dt=T.useMemo(()=>de.some(wt=>wt==null?void 0:wt[ze])?"nest":z||S!=null&&S.expandedRowRender?"row":null,[de]),at={body:T.useRef(null)},$e=x5(Ee),Le=T.useRef(null),Ge=T.useRef(null);n2(t,()=>Object.assign(Object.assign({},Ge.current),{nativeElement:Le.current}));const ht=T.useMemo(()=>typeof x=="function"?x:wt=>wt==null?void 0:wt[x],[x]),[et]=w6(de,ze,ht),nt={},Ot=(wt,vt,ot=!1)=>{var qt,nr,xr,ee;const re=Object.assign(Object.assign({},nt),wt);ot&&((qt=nt.resetPagination)===null||qt===void 0||qt.call(nt),!((nr=re.pagination)===null||nr===void 0)&&nr.current&&(re.pagination.current=1),v&&((xr=v.onChange)===null||xr===void 0||xr.call(v,1,(ee=re.pagination)===null||ee===void 0?void 0:ee.pageSize))),I&&I.scrollToFirstRowOnChange!==!1&&at.body.current&&e2(0,{getContainer:()=>at.body.current}),k==null||k(re.pagination,re.filters,re.sorter,{currentDataSource:_u(ju(de,re.sorterStates,ze),re.filterStates,ze),action:vt})},At=(wt,vt)=>{Ot({sorter:wt,sorterStates:vt},"sort",!1)},[Tt,Mt,je,he]=O6({prefixCls:Ee,mergedColumns:q,onSorterChange:At,sortDirections:X||["ascend","descend"],tableLocale:ce,showSorterTooltip:L}),ut=T.useMemo(()=>ju(de,Mt,ze),[de,Mt]);nt.sorter=he(),nt.sorterStates=Mt;const Lt=(wt,vt)=>{Ot({filters:wt,filterStates:vt},"filter",!0)},[Pt,Bt,Ft]=x6({prefixCls:Ee,locale:ce,dropdownPrefixCls:Ne,mergedColumns:q,onFilterChange:Lt,getPopupContainer:N||Q,rootClassName:kt(c,De)}),Dt=_u(ut,Bt,ze);nt.filters=Ft,nt.filterStates=Bt;const Ht=T.useMemo(()=>{const wt={};return Object.keys(Ft).forEach(vt=>{Ft[vt]!==null&&(wt[vt]=Ft[vt])}),Object.assign(Object.assign({},je),{filters:wt})},[je,Ft]),[or]=M6(Ht),mr=(wt,vt)=>{Ot({pagination:Object.assign(Object.assign({},nt.pagination),{current:wt,pageSize:vt})},"paginate")},[Rt,Dr]=k6(Dt.length,mr,v);nt.pagination=v===!1?{}:D6(Rt,v),nt.resetPagination=Dr;const Nr=T.useMemo(()=>{if(v===!1||!Rt.pageSize)return Dt;const{current:wt=1,total:vt,pageSize:ot=N1}=Rt;return Dt.length<vt?Dt.length>ot?Dt.slice((wt-1)*ot,wt*ot):Dt:Dt.slice((wt-1)*ot,wt*ot)},[!!v,Dt,Rt==null?void 0:Rt.current,Rt==null?void 0:Rt.pageSize,Rt==null?void 0:Rt.total]),[gn,Jt]=b5({prefixCls:Ee,data:Dt,pageData:Nr,getRowKey:ht,getRecordByKey:et,expandType:dt,childrenColumnName:ze,locale:ce,getPopupContainer:N||Q},w),kr=(wt,vt,ot)=>{let qt;return typeof C=="function"?qt=kt(C(wt,vt,ot)):qt=kt(C),kt({[`${Ee}-row-selected`]:Jt.has(ht(wt,vt))},qt)};Se.__PARENT_RENDER_ICON__=Se.expandIcon,Se.expandIcon=Se.expandIcon||R||y5(ce),dt==="nest"&&Se.expandIconColumnIndex===void 0?Se.expandIconColumnIndex=w?1:0:Se.expandIconColumnIndex>0&&w&&(Se.expandIconColumnIndex-=1),typeof Se.indentSize!="number"&&(Se.indentSize=typeof V=="number"?V:15);const Lr=T.useCallback(wt=>or(gn(Pt(Tt(wt)))),[Tt,Pt,gn]),Er=()=>{if(v===!1||!(Rt!=null&&Rt.total))return{};const wt=()=>Rt.size||(le==="small"||le==="middle"?"small":void 0),vt=It=>{const bt=It==="left"?"start":It==="right"?"end":It;return T.createElement(Wp,Object.assign({},Rt,{align:Rt.align||bt,className:kt(`${Ee}-pagination`,Rt.className),size:wt()}))},ot=Ce==="rtl"?"left":"right",qt=Rt.position;if(qt===null||!Array.isArray(qt))return{bottom:vt(ot)};const nr=qt.find(It=>typeof It=="string"&&It.toLowerCase().includes("top")),xr=qt.find(It=>typeof It=="string"&&It.toLowerCase().includes("bottom")),ee=qt.every(It=>`${It}`=="none"),re=nr?nr.toLowerCase().replace("top",""):"",Y=xr?xr.toLowerCase().replace("bottom",""):"",tt=!nr&&!xr&&!ee,Ut=()=>re?vt(re):void 0,ft=()=>{if(Y)return vt(Y);if(tt)return vt(ot)};return{top:Ut(),bottom:ft()}},cr=T.useMemo(()=>typeof F=="boolean"?{spinning:F}:typeof F=="object"&&F!==null?Object.assign({spinning:!0},F):void 0,[F]),Et=kt(xe,De,`${Ee}-wrapper`,we==null?void 0:we.className,{[`${Ee}-wrapper-rtl`]:Ce==="rtl"},i,c,Be),y=Object.assign(Object.assign({},we==null?void 0:we.style),u),D=T.useMemo(()=>cr!=null&&cr.spinning&&de===af?null:typeof(Z==null?void 0:Z.emptyText)<"u"?Z.emptyText:(Fe==null?void 0:Fe("Table"))||T.createElement(G4,{componentName:"Table"}),[cr==null?void 0:cr.spinning,de,Z==null?void 0:Z.emptyText,Fe]),Pe=K?$6:R6,$={},te=T.useMemo(()=>{const{fontSize:wt,lineHeight:vt,lineWidth:ot,padding:qt,paddingXS:nr,paddingSM:xr}=ge,ee=Math.floor(wt*vt);switch(le){case"middle":return xr*2+ee+ot;case"small":return nr*2+ee+ot;default:return qt*2+ee+ot}},[ge,le]);K&&($.listItemHeight=te);const{top:lr,bottom:st}=Er();return ke(T.createElement("div",{ref:Le,className:Et,style:y},T.createElement(Vp,Object.assign({spinning:!1},cr),lr,T.createElement(Pe,Object.assign({},$,J,{ref:Ge,columns:q,direction:Ce,expandable:Se,prefixCls:Ee,className:kt({[`${Ee}-middle`]:le==="middle",[`${Ee}-small`]:le==="small",[`${Ee}-bordered`]:d,[`${Ee}-empty`]:de.length===0},xe,De,Be),data:Nr,rowKey:ht,rowClassName:kr,emptyText:D,internalHooks:gi,internalRefs:at,transformColumns:Lr,getContainerWidth:$e,measureRowRender:wt=>T.createElement(Y4,{getPopupContainer:vt=>vt},wt)})),st)))},ev=T.forwardRef(Q6),tv=(e,t)=>{const r=T.useRef(0);return r.current+=1,T.createElement(ev,Object.assign({},e,{ref:t,_renderTimes:r.current}))},ha=T.forwardRef(tv);ha.SELECTION_COLUMN=ba;ha.EXPAND_COLUMN=xa;ha.SELECTION_ALL=Mu;ha.SELECTION_INVERT=Ru;ha.SELECTION_NONE=$u;ha.Column=l5;ha.ColumnGroup=u5;ha.Summary=l1;var Sn={},rv=Object.defineProperty,nv=(e,t,r)=>t in e?rv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Cr=(e,t,r)=>nv(e,typeof t!="symbol"?t+"":t,r),ro=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var of={exports:{}},Oo={};/**
|
|
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 sf;function av(){if(sf)return Oo;sf=1;var e=We,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(u,f,d){var m,g={},v=null,w=null;d!==void 0&&(v=""+d),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(w=f.ref);for(m in f)n.call(f,m)&&!i.hasOwnProperty(m)&&(g[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)g[m]===void 0&&(g[m]=f[m]);return{$$typeof:t,type:u,key:v,ref:w,props:g,_owner:a.current}}return Oo.Fragment=r,Oo.jsx=c,Oo.jsxs=c,Oo}var lf;function ov(){return lf||(lf=1,of.exports=av()),of.exports}var H=ov();/*!
|
|
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 uf(e){return Object.prototype.toString.call(e)==="[object Object]"}function tn(e){var t,r;return uf(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(uf(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var M1=Symbol.for("immer-nothing"),cf=Symbol.for("immer-draftable"),An=Symbol.for("immer-state");function Hn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ei=Object.getPrototypeOf;function Va(e){return!!e&&!!e[An]}function Wa(e){var t;return e?R1(e)||Array.isArray(e)||!!e[cf]||!!((t=e.constructor)!=null&&t[cf])||bi(e)||Os(e):!1}var iv=Object.prototype.constructor.toString(),df=new WeakMap;function R1(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=df.get(r);return n===void 0&&(n=Function.toString.call(r),df.set(r,n)),n===iv}function ps(e,t,r=!0){Ts(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,a)=>t(a,n,e))}function Ts(e){const t=e[An];return t?t.type_:Array.isArray(e)?1:bi(e)?2:Os(e)?3:0}function Lu(e,t){return Ts(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $1(e,t,r){const n=Ts(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function sv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bi(e){return e instanceof Map}function Os(e){return e instanceof Set}function Ra(e){return e.copy_||e.base_}function Hu(e,t){if(bi(e))return new Map(e);if(Os(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=R1(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[An];let a=Reflect.ownKeys(n);for(let i=0;i<a.length;i++){const c=a[i],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(ei(e),n)}else{const n=ei(e);if(n!==null&&r)return{...e};const a=Object.create(n);return Object.assign(a,e)}}function P0(e,t=!1){return Ms(e)||Va(e)||!Wa(e)||(Ts(e)>1&&Object.defineProperties(e,{set:Mi,add:Mi,clear:Mi,delete:Mi}),Object.freeze(e),t&&Object.values(e).forEach(r=>P0(r,!0))),e}function lv(){Hn(2)}var Mi={value:lv};function Ms(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var uv={};function Ua(e){const t=uv[e];return t||Hn(0,e),t}var ti;function P1(){return ti}function cv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ff(e,t){t&&(Ua("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ku(e){qu(e),e.drafts_.forEach(dv),e.drafts_=null}function qu(e){e===ti&&(ti=e.parent_)}function hf(e){return ti=cv(ti,e)}function dv(e){const t=e[An];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function pf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[An].modified_&&(Ku(t),Hn(4)),Wa(e)&&(e=ms(t,e),t.parent_||gs(t,e)),t.patches_&&Ua("Patches").generateReplacementPatches_(r[An].base_,e,t.patches_,t.inversePatches_)):e=ms(t,r,[]),Ku(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==M1?e:void 0}function ms(e,t,r){if(Ms(t))return t;const n=e.immer_.shouldUseStrictIteration(),a=t[An];if(!a)return ps(t,(i,c)=>mf(e,a,t,i,c,r),n),t;if(a.scope_!==e)return t;if(!a.modified_)return gs(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let c=i,u=!1;a.type_===3&&(c=new Set(i),i.clear(),u=!0),ps(c,(f,d)=>mf(e,a,i,f,d,r,u),n),gs(e,i,!1),r&&e.patches_&&Ua("Patches").generatePatches_(a,r,e.patches_,e.inversePatches_)}return a.copy_}function mf(e,t,r,n,a,i,c){if(a==null||typeof a!="object"&&!c)return;const u=Ms(a);if(!(u&&!c)){if(Va(a)){const f=i&&t&&t.type_!==3&&!Lu(t.assigned_,n)?i.concat(n):void 0,d=ms(e,a,f);if($1(r,n,d),Va(d))e.canAutoFreeze_=!1;else return}else c&&r.add(a);if(Wa(a)&&!u){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===a&&u)return;ms(e,a),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(bi(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&gs(e,a)}}}function gs(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&P0(t,r)}function fv(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:P1(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=n,i=I0;r&&(a=[n],i=ri);const{revoke:c,proxy:u}=Proxy.revocable(a,i);return n.draft_=u,n.revoke_=c,u}var I0={get(e,t){if(t===An)return e;const r=Ra(e);if(!Lu(r,t))return hv(e,r,t);const n=r[t];return e.finalized_||!Wa(n)?n:n===Fl(e.base_,t)?(Nl(e),e.copy_[t]=Wu(n,e)):n},has(e,t){return t in Ra(e)},ownKeys(e){return Reflect.ownKeys(Ra(e))},set(e,t,r){const n=I1(Ra(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const a=Fl(Ra(e),t),i=a==null?void 0:a[An];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(sv(r,a)&&(r!==void 0||Lu(e.base_,t)))return!0;Nl(e),Vu(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 Fl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Nl(e),Vu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ra(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Hn(11)},getPrototypeOf(e){return ei(e.base_)},setPrototypeOf(){Hn(12)}},ri={};ps(I0,(e,t)=>{ri[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ri.deleteProperty=function(e,t){return ri.set.call(this,e,t,void 0)};ri.set=function(e,t,r){return I0.set.call(this,e[0],t,r,e[0])};function Fl(e,t){const r=e[An];return(r?Ra(r):e)[t]}function hv(e,t,r){var a;const n=I1(t,r);return n?"value"in n?n.value:(a=n.get)==null?void 0:a.call(e.draft_):void 0}function I1(e,t){if(!(t in e))return;let r=ei(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ei(r)}}function Vu(e){e.modified_||(e.modified_=!0,e.parent_&&Vu(e.parent_))}function Nl(e){e.copy_||(e.copy_=Hu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pv=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 i=r;r=t;const c=this;return function(u=i,...f){return c.produce(u,d=>r.call(this,d,...f))}}typeof r!="function"&&Hn(6),n!==void 0&&typeof n!="function"&&Hn(7);let a;if(Wa(t)){const i=hf(this),c=Wu(t,void 0);let u=!0;try{a=r(c),u=!1}finally{u?Ku(i):qu(i)}return ff(i,n),pf(a,i)}else if(!t||typeof t!="object"){if(a=r(t),a===void 0&&(a=t),a===M1&&(a=void 0),this.autoFreeze_&&P0(a,!0),n){const i=[],c=[];Ua("Patches").generateReplacementPatches_(t,a,i,c),n(i,c)}return a}else Hn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let n,a;return[this.produce(t,r,(i,c)=>{n=i,a=c}),n,a]},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){Wa(e)||Hn(8),Va(e)&&(e=mv(e));const t=hf(this),r=Wu(e,void 0);return r[An].isManual_=!0,qu(t),r}finishDraft(e,t){const r=e&&e[An];(!r||!r.isManual_)&&Hn(9);const{scope_:n}=r;return ff(n,t),pf(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 a=t[r];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}r>-1&&(t=t.slice(r+1));const n=Ua("Patches").applyPatches_;return Va(e)?n(e,t):this.produce(e,a=>n(a,t))}};function Wu(e,t){const r=bi(e)?Ua("MapSet").proxyMap_(e,t):Os(e)?Ua("MapSet").proxySet_(e,t):fv(e,t);return(t?t.scope_:P1()).drafts_.push(r),r}function mv(e){return Va(e)||Hn(10,e),_1(e)}function _1(e){if(!Wa(e)||Ms(e))return e;const t=e[An];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Hu(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Hu(e,!0);return ps(r,(a,i)=>{$1(r,a,_1(i))},n),t&&(t.finalized_=!1),r}var ni=new pv,_0=ni.produce,gf=ni.createDraft.bind(ni),vf=ni.finishDraft.bind(ni),gv={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var a=ue.transform(r,t,{affinity:n});e.current=a,a==null&&e.unref()}}},vv={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var a=er.transform(r,t,{affinity:n});e.current=a,a==null&&e.unref()}}},bv={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var a=Te.transform(r,t,{affinity:n});e.current=a,a==null&&e.unref()}}},vs=new WeakMap,bs=new WeakMap,Uo=new WeakMap,z1=new WeakMap,bf=new WeakMap,yf=new WeakMap,xf=new WeakMap,ue={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=ue.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 a=e[n],i=t[n];if(a!==i)break;r.push(a)}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),a=t.slice(0,r),i=e[r],c=t[r];return ue.equals(n,a)&&i>c},endsAt(e,t){var r=e.length,n=e.slice(0,r),a=t.slice(0,r);return ue.equals(n,a)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),a=t.slice(0,r),i=e[r],c=t[r];return ue.equals(n,a)&&i<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 ue.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&ue.compare(e,t)===0},isBefore(e,t){return ue.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&ue.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&ue.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&ue.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&ue.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),a=e[e.length-1],i=t[t.length-1];return a!==i&&ue.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],a=0;a<=e.length;a++)n.push(e.slice(0,a));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(!ue.isAncestor(t,e)&&!ue.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:a="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:i}=t;(ue.equals(i,n)||ue.endsBefore(i,n)||ue.isAncestor(i,n))&&(n[i.length-1]+=1);break}case"remove_node":{var{path:c}=t;if(ue.equals(c,n)||ue.isAncestor(c,n))return null;ue.endsBefore(c,n)&&(n[c.length-1]-=1);break}case"merge_node":{var{path:u,position:f}=t;ue.equals(u,n)||ue.endsBefore(u,n)?n[u.length-1]-=1:ue.isAncestor(u,n)&&(n[u.length-1]-=1,n[u.length]+=f);break}case"split_node":{var{path:d,position:m}=t;if(ue.equals(d,n)){if(a==="forward")n[n.length-1]+=1;else if(a!=="backward")return null}else ue.endsBefore(d,n)?n[d.length-1]+=1:ue.isAncestor(d,n)&&e[d.length]>=m&&(n[d.length-1]+=1,n[d.length]-=m);break}case"move_node":{var{path:g,newPath:v}=t;if(ue.equals(g,v))return n;if(ue.isAncestor(g,n)||ue.equals(g,n)){var w=v.slice();return ue.endsBefore(g,v)&&g.length<v.length&&(w[g.length-1]-=1),w.concat(n.slice(g.length))}else ue.isSibling(g,v)&&(ue.isAncestor(v,n)||ue.equals(v,n))?ue.endsBefore(g,n)?n[g.length-1]-=1:n[g.length-1]+=1:ue.endsBefore(v,n)||ue.equals(v,n)||ue.isAncestor(v,n)?(ue.endsBefore(g,n)&&(n[g.length-1]-=1),n[v.length-1]+=1):ue.endsBefore(g,n)&&(ue.equals(v,n)&&(n[v.length-1]+=1),n[g.length-1]-=1);break}}return n}};function ai(e){"@babel/helpers - typeof";return ai=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},ai(e)}function yv(e,t){if(ai(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ai(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xv(e){var t=yv(e,"string");return ai(t)==="symbol"?t:String(t)}function mn(e,t,r){return t=xv(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Mo(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){mn(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 wv=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:a}=r,i=rt.parent(e,n),c=n[n.length-1];if(c>i.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(i.children.splice(c,0,a),t)for(var[u,f]of Te.points(t))t[f]=er.transform(u,r);break}case"insert_text":{var{path:d,offset:m,text:g}=r;if(g.length===0)break;var v=rt.leaf(e,d),w=v.text.slice(0,m),x=v.text.slice(m);if(v.text=w+g+x,t)for(var[C,p]of Te.points(t))t[p]=er.transform(C,r);break}case"merge_node":{var{path:A}=r,B=rt.get(e,A),k=ue.previous(A),N=rt.get(e,k),F=rt.parent(e,A),R=A[A.length-1];if(gt.isText(B)&>.isText(N))N.text+=B.text;else if(!gt.isText(B)&&!gt.isText(N))N.children.push(...B.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(A,"] to nodes of different interfaces: ").concat(Xr.stringify(B)," ").concat(Xr.stringify(N)));if(F.children.splice(R,1),t)for(var[S,z]of Te.points(t))t[z]=er.transform(S,r);break}case"move_node":{var{path:O,newPath:V}=r;if(ue.isAncestor(O,V))throw new Error("Cannot move a path [".concat(O,"] to new path [").concat(V,"] because the destination is inside itself."));var I=rt.get(e,O),X=rt.parent(e,O),Z=O[O.length-1];X.children.splice(Z,1);var L=ue.transform(O,r),K=rt.get(e,ue.parent(L)),W=L[L.length-1];if(K.children.splice(W,0,I),t)for(var[G,ne]of Te.points(t))t[ne]=er.transform(G,r);break}case"remove_node":{var{path:q}=r,J=q[q.length-1],me=rt.parent(e,q);if(me.children.splice(J,1),t)for(var[Ce,we]of Te.points(t)){var Fe=er.transform(Ce,r);if(t!=null&&Fe!=null)t[we]=Fe;else{var Ie=void 0,Q=void 0;for(var[le,ce]of rt.texts(e))if(ue.compare(ce,q)===-1)Ie=[le,ce];else{Q=[le,ce];break}var de=!1;Ie&&Q&&(ue.equals(Q[1],q)?de=!ue.hasPrevious(Q[1]):de=ue.common(Ie[1],q).length<ue.common(Q[1],q).length),Ie&&!de?(Ce.path=Ie[1],Ce.offset=Ie[0].text.length):Q?(Ce.path=Q[1],Ce.offset=0):t=null}}break}case"remove_text":{var{path:Ee,offset:Ne,text:ge}=r;if(ge.length===0)break;var De=rt.leaf(e,Ee),ke=De.text.slice(0,Ne),Be=De.text.slice(Ne+ge.length);if(De.text=ke+Be,t)for(var[xe,Se]of Te.points(t))t[Se]=er.transform(xe,r);break}case"set_node":{var{path:ze,properties:dt,newProperties:at}=r;if(ze.length===0)throw new Error("Cannot set properties on the root node!");var $e=rt.get(e,ze);for(var Le in at){if(Le==="children"||Le==="text")throw new Error('Cannot set the "'.concat(Le,'" property of nodes!'));var Ge=at[Le];Ge==null?delete $e[Le]:$e[Le]=Ge}for(var ht in dt)at.hasOwnProperty(ht)||delete $e[ht];break}case"set_selection":{var{newProperties:et}=r;if(et==null)t=et;else{if(t==null){if(!Te.isRange(et))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Xr.stringify(et)," when there is no current selection."));t=Mo({},et)}for(var nt in et){var Ot=et[nt];if(Ot==null){if(nt==="anchor"||nt==="focus")throw new Error('Cannot remove the "'.concat(nt,'" selection property'));delete t[nt]}else t[nt]=Ot}}break}case"split_node":{var{path:At,position:Tt,properties:Mt}=r;if(At.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(At,"] because the root node cannot be split."));var je=rt.get(e,At),he=rt.parent(e,At),ut=At[At.length-1],Lt;if(gt.isText(je)){var Pt=je.text.slice(0,Tt),Bt=je.text.slice(Tt);je.text=Pt,Lt=Mo(Mo({},Mt),{},{text:Bt})}else{var Ft=je.children.slice(0,Tt),Dt=je.children.slice(Tt);je.children=Ft,Lt=Mo(Mo({},Mt),{},{children:Dt})}if(he.children.splice(ut+1,0,Lt),t)for(var[Ht,or]of Te.points(t))t[or]=er.transform(Ht,r);break}}return t},Cv={transform(e,t){e.children=gf(e.children);var r=e.selection&&gf(e.selection);try{r=wv(e,r,t)}finally{e.children=vf(e.children),r?e.selection=Va(r)?vf(r):r:e.selection=null}}},Dv={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)}},kv={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)}},j1=(e,t)=>{for(var r in e){var n=e[r],a=t[r];if(tn(n)&&tn(a)){if(!j1(n,a))return!1}else if(Array.isArray(n)&&Array.isArray(a)){if(n.length!==a.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==a[i])return!1}else if(n!==a)return!1}for(var c in t)if(e[c]===void 0&&t[c]!==void 0)return!1;return!0};function Ev(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function fa(e,t){if(e==null)return{};var r=Ev(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Sv=["anchor","focus"];function Cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Av(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cf(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Te={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:a}=e;return Te.isBackward(e)===r?[n,a]:[a,n]},end(e){var[,t]=Te.edges(e);return t},equals(e,t){return er.equals(e.anchor,t.anchor)&&er.equals(e.focus,t.focus)},includes(e,t){if(Te.isRange(t)){if(Te.includes(e,t.anchor)||Te.includes(e,t.focus))return!0;var[r,n]=Te.edges(e),[a,i]=Te.edges(t);return er.isBefore(r,a)&&er.isAfter(n,i)}var[c,u]=Te.edges(e),f=!1,d=!1;return er.isPoint(t)?(f=er.compare(t,c)>=0,d=er.compare(t,u)<=0):(f=ue.compare(t,c.path)>=0,d=ue.compare(t,u.path)<=0),f&&d},intersection(e,t){var r=fa(e,Sv),[n,a]=Te.edges(e),[i,c]=Te.edges(t),u=er.isBefore(n,i)?i:n,f=er.isBefore(a,c)?a:c;return er.isBefore(f,u)?null:Av({anchor:u,focus:f},r)},isBackward(e){var{anchor:t,focus:r}=e;return er.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return er.equals(t,r)},isExpanded(e){return!Te.isCollapsed(e)},isForward(e){return!Te.isBackward(e)},isRange(e){return tn(e)&&er.isPoint(e.anchor)&&er.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Te.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return _0(e,n=>{if(n===null)return null;var{affinity:a="inward"}=r,i,c;if(a==="inward"){var u=Te.isCollapsed(n);Te.isForward(n)?(i="forward",c=u?i:"backward"):(i="backward",c=u?i:"forward")}else a==="outward"?Te.isForward(n)?(i="backward",c="forward"):(i="forward",c="backward"):(i=a,c=a);var f=er.transform(n.anchor,t,{affinity:i}),d=er.transform(n.focus,t,{affinity:c});if(!f||!d)return null;n.anchor=f,n.focus=d})}},Df=e=>tn(e)&&rt.isNodeList(e.children)&&!P.isEditor(e),yt={isAncestor(e){return tn(e)&&rt.isNodeList(e.children)},isElement:Df,isElementList(e){return Array.isArray(e)&&e.every(t=>yt.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 Df(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},Bv=["children"],Fv=["text"],kf=new WeakMap,rt={ancestor(e,t){var r=rt.get(e,t);if(gt.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Xr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ue.ancestors(t,r)){var a=rt.ancestor(e,n),i=[a,n];yield i}})()},child(e,t){if(gt.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Xr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Xr.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,a=rt.ancestor(e,t),{children:i}=a,c=n?i.length-1:0;n?c>=0:c<i.length;){var u=rt.child(a,c),f=t.concat(c);yield[u,f],c=n?c-1:c+1}})()},common(e,t,r){var n=ue.common(t,r),a=rt.get(e,n);return[a,n]},descendant(e,t){var r=rt.get(e,t);if(P.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Xr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of rt.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 rt.nodes(e,t))yt.isElement(r)&&(yield[r,n])})()},extractProps(e){if(yt.isAncestor(e)){var t=fa(e,Bv);return t}else{var t=fa(e,Fv);return t}},first(e,t){for(var r=t.slice(),n=rt.get(e,r);n&&!(gt.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(gt.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Xr.stringify(e)));var r=_0({children:e.children},n=>{var[a,i]=Te.edges(t),c=rt.nodes(n,{reverse:!0,pass:v=>{var[,w]=v;return!Te.includes(t,w)}});for(var[,u]of c){if(!Te.includes(t,u)){var f=rt.parent(n,u),d=u[u.length-1];f.children.splice(d,1)}if(ue.equals(u,i.path)){var m=rt.leaf(n,u);m.text=m.text.slice(0,i.offset)}if(ue.equals(u,a.path)){var g=rt.leaf(n,u);g.text=g.text.slice(a.offset)}}P.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var a=t[n];if(gt.isText(r)||!r.children[a])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Xr.stringify(e)));r=r.children[a]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var a=t[n];if(gt.isText(r)||!r.children[a])return!1;r=r.children[a]}return!0},isNode(e){return gt.isText(e)||yt.isElement(e)||P.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=kf.get(e);if(t!==void 0)return t;var r=e.every(n=>rt.isNode(n));return kf.set(e,r),r},last(e,t){for(var r=t.slice(),n=rt.get(e,r);n&&!(gt.isText(n)||n.children.length===0);){var a=n.children.length-1;n=n.children[a],r.push(a)}return[n,r]},leaf(e,t){var r=rt.get(e,t);if(!gt.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Xr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of ue.levels(t,r)){var a=rt.get(e,n);yield[a,n]}})()},matches(e,t){return yt.isElement(e)&&yt.isElementProps(t)&&yt.matches(e,t)||gt.isText(e)&>.isTextProps(t)&>.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:a=[],to:i}=t,c=new Set,u=[],f=e;!(i&&(n?ue.isBefore(u,i):ue.isAfter(u,i)));){if(c.has(f)||(yield[f,u]),!c.has(f)&&!gt.isText(f)&&f.children.length!==0&&(r==null||r([f,u])===!1)){c.add(f);var d=n?f.children.length-1:0;ue.isAncestor(u,a)&&(d=a[u.length]),u=u.concat(d),f=rt.get(e,u);continue}if(u.length===0)break;if(!n){var m=ue.next(u);if(rt.has(e,m)){u=m,f=rt.get(e,u);continue}}if(n&&u[u.length-1]!==0){var g=ue.previous(u);u=g,f=rt.get(e,u);continue}u=ue.parent(u),f=rt.get(e,u),c.add(f)}})()},parent(e,t){var r=ue.parent(t),n=rt.get(e,r);if(gt.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 gt.isText(e)?e.text:e.children.map(rt.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of rt.nodes(e,t))gt.isText(r)&&(yield[r,n])})()}};function Ef(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Or(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){mn(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 Lo={isNodeOperation(e){return Lo.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!tn(e))return!1;switch(e.type){case"insert_node":return ue.isPath(e.path)&&rt.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ue.isPath(e.path);case"merge_node":return typeof e.position=="number"&&ue.isPath(e.path)&&tn(e.properties);case"move_node":return ue.isPath(e.path)&&ue.isPath(e.newPath);case"remove_node":return ue.isPath(e.path)&&rt.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&ue.isPath(e.path);case"set_node":return ue.isPath(e.path)&&tn(e.properties)&&tn(e.newProperties);case"set_selection":return e.properties===null&&Te.isRange(e.newProperties)||e.newProperties===null&&Te.isRange(e.properties)||tn(e.properties)&&tn(e.newProperties);case"split_node":return ue.isPath(e.path)&&typeof e.position=="number"&&tn(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Lo.isOperation(t))},isSelectionOperation(e){return Lo.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Lo.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return Or(Or({},e),{},{type:"remove_node"});case"insert_text":return Or(Or({},e),{},{type:"remove_text"});case"merge_node":return Or(Or({},e),{},{type:"split_node",path:ue.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(ue.equals(t,r))return e;if(ue.isSibling(r,t))return Or(Or({},e),{},{path:t,newPath:r});var n=ue.transform(r,e),a=ue.transform(ue.next(r),e);return Or(Or({},e),{},{path:n,newPath:a})}case"remove_node":return Or(Or({},e),{},{type:"insert_node"});case"remove_text":return Or(Or({},e),{},{type:"insert_text"});case"set_node":{var{properties:i,newProperties:c}=e;return Or(Or({},e),{},{properties:c,newProperties:i})}case"set_selection":{var{properties:u,newProperties:f}=e;return u==null?Or(Or({},e),{},{properties:f,newProperties:null}):f==null?Or(Or({},e),{},{properties:null,newProperties:u}):Or(Or({},e),{},{properties:f,newProperties:u})}case"split_node":return Or(Or({},e),{},{type:"merge_node",path:ue.next(e.path)})}}},Sf=new WeakMap,Nv=e=>{var t=Sf.get(e);if(t!==void 0)return t;if(!tn(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||tn(e.marks))&&(e.selection===null||Te.isRange(e.selection))&&rt.isNodeList(e.children)&&Lo.isOperationList(e.operations);return Sf.set(e,r),r},P={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 Nv(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)},Tv={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(ue.isPath)}};function Af(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Bf(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){mn(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 er={compare(e,t){var r=ue.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return er.compare(e,t)===1},isBefore(e,t){return er.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&ue.equals(e.path,t.path)},isPoint(e){return tn(e)&&typeof e.offset=="number"&&ue.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return _0(e,n=>{if(n===null)return null;var{affinity:a="forward"}=r,{path:i,offset:c}=n;switch(t.type){case"insert_node":case"move_node":{n.path=ue.transform(i,t,r);break}case"insert_text":{ue.equals(t.path,i)&&(t.offset<c||t.offset===c&&a==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{ue.equals(t.path,i)&&(n.offset+=t.position),n.path=ue.transform(i,t,r);break}case"remove_text":{ue.equals(t.path,i)&&t.offset<=c&&(n.offset-=Math.min(c-t.offset,t.text.length));break}case"remove_node":{if(ue.equals(t.path,i)||ue.isAncestor(t.path,i))return null;n.path=ue.transform(i,t,r);break}case"split_node":{if(ue.equals(t.path,i)){if(t.position===c&&a==null)return null;(t.position<c||t.position===c&&a==="forward")&&(n.offset-=t.position,n.path=ue.transform(i,t,Bf(Bf({},r),{},{affinity:"forward"})))}else n.path=ue.transform(i,t,r);break}}})}},Ff=void 0,Xr={setScrubber(e){Ff=e},stringify(e){return JSON.stringify(e,Ff)}},Ov=["text"],Mv=["anchor","focus"];function Nf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function oa(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){mn(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 gt={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function a(i){var c=fa(i,Ov);return c}return j1(n?a(e):e,n?a(t):t)},isText(e){return tn(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>gt.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=[oa({},e)];for(var n of t){var a=fa(n,Mv),[i,c]=Te.edges(n),u=[],f=0,d=i.offset,m=c.offset;for(var g of r){var{length:v}=g.text,w=f;if(f+=v,d<=w&&f<=m){Object.assign(g,a),u.push(g);continue}if(d!==m&&(d===f||m===w)||d>f||m<w||m===w&&w!==0){u.push(g);continue}var x=g,C=void 0,p=void 0;if(m<f){var A=m-w;p=oa(oa({},x),{},{text:x.text.slice(A)}),x=oa(oa({},x),{},{text:x.text.slice(0,A)})}if(d>w){var B=d-w;C=oa(oa({},x),{},{text:x.text.slice(0,B)}),x=oa(oa({},x),{},{text:x.text.slice(B)})}Object.assign(x,a),C&&u.push(C),u.push(x),p&&u.push(p)}r=u}return r}},z0=e=>e.selection?e.selection:e.children.length>0?P.end(e,[]):[0],So=(e,t)=>{var[r]=P.node(e,t);return n=>n===r},j0=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?zv(e):e,a=Wt.None,i=Wt.None,c=0,u=null,f=null;for(var d of n){var m=d.codePointAt(0);if(!m)break;var g=Zv(d,m);if([a,i]=r?[i,g]:[g,a],no(a,Wt.ZWJ)&&no(i,Wt.ExtPict)&&(r?u=Tf(e.substring(0,c)):u=Tf(e.substring(0,e.length-c)),!u)||no(a,Wt.RI)&&no(i,Wt.RI)&&(f!==null?f=!f:r?f=!0:f=r7(e.substring(0,e.length-c)),!f)||a!==Wt.None&&i!==Wt.None&&Qv(a,i))break;c+=d.length}return c||1},Rv=/\s/,$v=/[\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]/,Pv=/['\u2018\u2019]/,Iv=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var a=j0(e,t),[i,c]=L0(e,a,t);if(_v(i,c,t))n=!0,r+=a;else if(!n)r+=a;else break;e=c}return r},L0=(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)]},_v=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(Rv.test(t))return!1;if(Pv.test(t)){var a=j0(r,n),[i,c]=L0(r,a,n);if(e(i,c,n))return!0}return!$v.test(t)},zv=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(Lv(n.charCodeAt(0))){var a=e.charAt(t-r-1);if(jv(a.charCodeAt(0))){yield a+n,r++;continue}}yield n}},jv=e=>e>=55296&&e<=56319,Lv=e=>e>=56320&&e<=57343,Wt;(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"})(Wt||(Wt={}));var Hv=/^(?:[\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])$/,Kv=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,qv=/^(?:[\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])$/,Vv=/^[\u1100-\u115F\uA960-\uA97C]$/,Wv=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Uv=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Gv=/^[\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]$/,Yv=/^[\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]$/,Xv=/^(?:[\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])$/,Zv=(e,t)=>{var r=Wt.Any;return e.search(Hv)!==-1&&(r|=Wt.Extend),t===8205&&(r|=Wt.ZWJ),t>=127462&&t<=127487&&(r|=Wt.RI),e.search(Kv)!==-1&&(r|=Wt.Prepend),e.search(qv)!==-1&&(r|=Wt.SpacingMark),e.search(Vv)!==-1&&(r|=Wt.L),e.search(Wv)!==-1&&(r|=Wt.V),e.search(Uv)!==-1&&(r|=Wt.T),e.search(Gv)!==-1&&(r|=Wt.LV),e.search(Yv)!==-1&&(r|=Wt.LVT),e.search(Xv)!==-1&&(r|=Wt.ExtPict),r};function no(e,t){return(e&t)!==0}var Jv=[[Wt.L,Wt.L|Wt.V|Wt.LV|Wt.LVT],[Wt.LV|Wt.V,Wt.V|Wt.T],[Wt.LVT|Wt.T,Wt.T],[Wt.Any,Wt.Extend|Wt.ZWJ],[Wt.Any,Wt.SpacingMark],[Wt.Prepend,Wt.Any],[Wt.ZWJ,Wt.ExtPict],[Wt.RI,Wt.RI]];function Qv(e,t){return Jv.findIndex(r=>no(e,r[0])&&no(t,r[1]))===-1}var e7=/(?:[\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$/,Tf=e=>e.search(e7)!==-1,t7=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,r7=e=>{var t=e.match(t7);if(t===null)return!1;var r=t[0].length/2;return r%2===1},n7={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]:{};P.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:a=z0(e)}=r;if(ue.isPath(a)&&(a=P.range(e,a)),Te.isRange(a))if(Te.isCollapsed(a))a=a.anchor;else{var i=Te.end(a);if(!n&&P.void(e,{at:i}))return;var c=Te.start(a),u=P.pointRef(e,c),f=P.pointRef(e,i);Ve.delete(e,{at:a,voids:n});var d=u.unref(),m=f.unref();a=d||m,Ve.setSelection(e,{anchor:a,focus:a})}if(!(!n&&P.void(e,{at:a})||P.elementReadOnly(e,{at:a}))){var{path:g,offset:v}=a;t.length>0&&e.apply({type:"insert_text",path:g,offset:v,text:t})}})}};function Of(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ri(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Of(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Of(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ve=Ri(Ri(Ri(Ri({},Cv),Dv),kv),n7),Gi=new WeakMap,a7=e=>Gi.get(e)||!1,o7=(e,t,r)=>{var n=Gi.get(e)||!1;Gi.set(e,!0);try{t(),r()}finally{Gi.set(e,n)}};function L1(e,t,r){var n=vs.get(e)||[],a=bs.get(e)||new Set,i,c,u=g=>{if(g){var v=g.join(",");c.has(v)||(c.add(v),i.push(g))}};if(r){i=[],c=new Set;for(var f of n){var d=r(f);u(d)}}else i=n,c=a;for(var m of t)u(m);vs.set(e,i),bs.set(e,c)}var i7=(e,t)=>{for(var r of P.pathRefs(e))gv.transform(r,t);for(var n of P.pointRefs(e))vv.transform(n,t);for(var a of P.rangeRefs(e))bv.transform(a,t);if(!a7(e)){var i=ue.operationCanTransformPath(t)?c=>ue.transform(c,t):void 0;L1(e,e.getDirtyPaths(t),i)}Ve.transform(e,t),e.operations.push(t),P.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Uo.get(e)||(Uo.set(e,!0),Promise.resolve().then(()=>{Uo.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},s7=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return ue.levels(r)}case"insert_node":{var{node:n,path:a}=t,i=ue.levels(a),c=gt.isText(n)?[]:Array.from(rt.nodes(n),V=>{var[,I]=V;return a.concat(I)});return[...i,...c]}case"merge_node":{var{path:u}=t,f=ue.ancestors(u),d=ue.previous(u);return[...f,d]}case"move_node":{var{path:m,newPath:g}=t;if(ue.equals(m,g))return[];var v=[],w=[];for(var x of ue.ancestors(m)){var C=ue.transform(x,t);v.push(C)}for(var p of ue.ancestors(g)){var A=ue.transform(p,t);w.push(A)}var B=w[w.length-1],k=g[g.length-1],N=B.concat(k);return[...v,...w,N]}case"remove_node":{var{path:F}=t,R=ue.ancestors(F);return[...R]}case"split_node":{var{path:S}=t,z=ue.levels(S),O=ue.next(S);return[...z,O]}default:return[]}},l7=e=>{var{selection:t}=e;return t?rt.fragment(e,t):[]},u7=(e,t)=>{var[r,n]=t;if(!gt.isText(r)){if(yt.isElement(r)&&r.children.length===0){var a={text:""};Ve.insertNodes(e,a,{at:n.concat(0),voids:!0});return}for(var i=P.isEditor(r)?!1:yt.isElement(r)&&(e.isInline(r)||r.children.length===0||gt.isText(r.children[0])||e.isInline(r.children[0])),c=0,u=0;u<r.children.length;u++,c++){var f=rt.get(e,n);if(!gt.isText(f)){var d=f.children[c],m=f.children[c-1],g=u===r.children.length-1,v=gt.isText(d)||yt.isElement(d)&&e.isInline(d);if(v!==i)Ve.removeNodes(e,{at:n.concat(c),voids:!0}),c--;else if(yt.isElement(d)){if(e.isInline(d)){if(m==null||!gt.isText(m)){var w={text:""};Ve.insertNodes(e,w,{at:n.concat(c),voids:!0}),c++}else if(g){var x={text:""};Ve.insertNodes(e,x,{at:n.concat(c+1),voids:!0}),c++}}}else{if(!gt.isText(d)&&!("children"in d)){var C=d;C.children=[]}m!=null&>.isText(m)&&(gt.equals(d,m,{loose:!0})?(Ve.mergeNodes(e,{at:n.concat(c),voids:!0}),c--):m.text===""?(Ve.removeNodes(e,{at:n.concat(c-1),voids:!0}),c--):d.text===""&&(Ve.removeNodes(e,{at:n.concat(c),voids:!0}),c--))}}}}},c7=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,a=n*42;if(r>a)throw new Error("Could not completely normalize the editor after ".concat(a," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},d7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:a=e.selection,match:i}=t;if(a){var c=P.path(e,a),u=n==="lowest";for(var[f,d]of P.levels(e,{at:c,voids:r,match:i,reverse:u}))if(!gt.isText(f)){if(Te.isRange(a)){if(ue.isAncestor(d,a.anchor.path)&&ue.isAncestor(d,a.focus.path))return[f,d]}else if(!ue.equals(c,d))return[f,d]}}};function Mf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Rf(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){mn(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 f7=(e,t,r)=>{var{selection:n}=e;if(n){var a=(g,v)=>{if(!gt.isText(g))return!1;var[w,x]=P.parent(e,v);return!e.isVoid(w)||e.markableVoid(w)},i=Te.isExpanded(n),c=!1;if(!i){var[u,f]=P.node(e,n);if(u&&a(u,f)){var[d]=P.parent(e,f);c=d&&e.markableVoid(d)}}if(i||c)Ve.setNodes(e,{[t]:r},{match:a,split:!0,voids:!0});else{var m=Rf(Rf({},P.marks(e)||{}),{},{[t]:r});e.marks=m,Uo.get(e)||e.onChange()}}};function $f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?$f(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$f(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]:{},n=P.point(e,t,{edge:"end"}),a=P.end(e,[]),i={anchor:n,focus:a},{distance:c=1}=r,u=0,f;for(var d of P.positions(e,Pf(Pf({},r),{},{at:i}))){if(u>c)break;u!==0&&(f=d),u++}return f};function If(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?If(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):If(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var p7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.start(e,[]),a=P.point(e,t,{edge:"start"}),i={anchor:n,focus:a},{distance:c=1}=r,u=0,f;for(var d of P.positions(e,_f(_f({},r),{},{at:i,reverse:!0}))){if(u>c)break;u!==0&&(f=d),u++}return f},m7=(e,t)=>{var{selection:r}=e;r&&Te.isCollapsed(r)&&Ve.delete(e,{unit:t,reverse:!0})},g7=(e,t)=>{var{selection:r}=e;r&&Te.isCollapsed(r)&&Ve.delete(e,{unit:t})},v7=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Te.isExpanded(r)&&Ve.delete(e,{reverse:t==="backward"})},b7=(e,t)=>[P.start(e,t),P.end(e,t)];function zf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zf(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var y7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return P.above(e,jf(jf({},t),{},{match:r=>yt.isElement(r)&&P.isElementReadOnly(e,r)}))},x7=(e,t)=>P.point(e,t,{edge:"end"}),w7=(e,t)=>{var r=P.path(e,t,{edge:"start"});return P.node(e,r)},C7=(e,t)=>{var r=P.range(e,t);return rt.fragment(e,r)};function Lf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lf(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var D7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return P.above(e,Hf(Hf({},t),{},{match:r=>yt.isElement(r)&&P.isVoid(e,r)}))},k7=(e,t)=>t.children.some(r=>yt.isElement(r)&&P.isBlock(e,r)),E7=(e,t)=>t.children.some(r=>gt.isText(r)||P.isInline(e,r)),S7=(e,t)=>rt.has(e,t),A7=(e,t)=>t.children.every(r=>gt.isText(r)),B7=e=>{Ve.splitNodes(e,{always:!0})},F7=(e,t,r)=>{Ve.insertNodes(e,t,r)},N7=e=>{Ve.splitNodes(e,{always:!0})};function Kf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function T7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kf(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:a}=e;if(n){if(a){var i=T7({text:t},a);Ve.insertNodes(e,i,{at:r.at,voids:r.voids})}else Ve.insertText(e,t,r);e.marks=null}},M7=(e,t)=>!e.isInline(t),R7=(e,t,r)=>P.isStart(e,t,r)||P.isEnd(e,t,r),$7=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&>.isText(n)&&n.text===""&&!e.isVoid(t)},P7=(e,t,r)=>{var n=P.end(e,r);return er.equals(t,n)},I7=e=>{var t=z1.get(e);return t===void 0?!0:t},_7=(e,t,r)=>{if(t.offset!==0)return!1;var n=P.start(e,r);return er.equals(t,n)},z7=(e,t)=>{var r=P.path(e,t,{edge:"end"});return P.node(e,r)},j7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.path(e,t,r),a=rt.leaf(e,n);return[a,n]};function L7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:a=!1}=t,{match:i}=t;if(i==null&&(i=()=>!0),!!r){var c=[],u=P.path(e,r);for(var[f,d]of rt.levels(e,u))if(i(f,d)&&(c.push([f,d]),!a&&yt.isElement(f)&&P.isVoid(e,f)))break;n&&c.reverse(),yield*c}})()}var H7=["text"],K7=["text"],q7=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:a}=r;if(t)return t;if(Te.isExpanded(r)){var i=P.isEnd(e,n,n.path);if(i){var c=P.after(e,n);c&&(n=c)}var[u]=P.nodes(e,{match:gt.isText,at:{anchor:n,focus:a}});if(u){var[f]=u,d=fa(f,H7);return d}else return{}}var{path:m}=n,[g]=P.leaf(e,m);if(n.offset===0){var v=P.previous(e,{at:m,match:gt.isText}),w=P.above(e,{match:k=>yt.isElement(k)&&P.isVoid(e,k)&&e.markableVoid(k)});if(!w){var x=P.above(e,{match:k=>yt.isElement(k)&&P.isBlock(e,k)});if(v&&x){var[C,p]=v,[,A]=x;ue.isAncestor(A,p)&&(g=C)}}}var B=fa(g,K7);return B},V7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:a,at:i=e.selection}=t;if(i){var c=P.after(e,i,{voids:n});if(c){var[,u]=P.last(e,[]),f=[c.path,u];if(ue.isPath(i)&&i.length===0)throw new Error("Cannot get the next node from the root node!");if(a==null)if(ue.isPath(i)){var[d]=P.parent(e,i);a=g=>d.children.includes(g)}else a=()=>!0;var[m]=P.nodes(e,{at:f,match:a,mode:r,voids:n});return m}}},W7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.path(e,t,r),a=rt.get(e,n);return[a,n]};function U7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:a=!1,reverse:i=!1,voids:c=!1,ignoreNonSelectable:u=!1}=t,{match:f}=t;if(f||(f=()=>!0),!!r){var d,m;if(Tv.isSpan(r))d=r[0],m=r[1];else{var g=P.path(e,r,{edge:"start"}),v=P.path(e,r,{edge:"end"});d=i?v:g,m=i?g:v}var w=rt.nodes(e,{reverse:i,from:d,to:m,pass:N=>{var[F]=N;return yt.isElement(F)?!!(!c&&(P.isVoid(e,F)||P.isElementReadOnly(e,F))||u&&!P.isSelectable(e,F)):!1}}),x=[],C;for(var[p,A]of w)if(!(u&&yt.isElement(p)&&!P.isSelectable(e,p))){var B=C&&ue.compare(A,C[1])===0;if(!(n==="highest"&&B)){if(!f(p,A)){if(a&&!B&>.isText(p))return;continue}if(n==="lowest"&&B){C=[p,A];continue}var k=n==="lowest"?C:[p,A];k&&(a?x.push(k):yield k),C=[p,A]}}n==="lowest"&&C&&(a?x.push(C):yield C),a&&(yield*x)}})()}var G7=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,a=d=>vs.get(d)||[],i=d=>bs.get(d)||new Set,c=d=>{var m=a(d).pop(),g=m.join(",");return i(d).delete(g),m};if(P.isNormalizing(e)){if(r){var u=Array.from(rt.nodes(e),d=>{var[,m]=d;return m}),f=new Set(u.map(d=>d.join(",")));vs.set(e,u),bs.set(e,f)}a(e).length!==0&&P.withoutNormalizing(e,()=>{for(var d of a(e))if(rt.has(e,d)){var m=P.node(e,d),[g,v]=m;yt.isElement(g)&&g.children.length===0&&e.normalizeNode(m,{operation:n})}for(var w=a(e),x=w.length,C=0;w.length!==0;){if(!e.shouldNormalize({dirtyPaths:w,iteration:C,initialDirtyPathsLength:x,operation:n}))return;var p=c(e);if(rt.has(e,p)){var A=P.node(e,p);e.normalizeNode(A,{operation:n})}C++,w=a(e)}})}},Y7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=P.path(e,t,r),a=ue.parent(n),i=P.node(e,a);return i},X7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,a={current:t,affinity:n,unref(){var{current:c}=a,u=P.pathRefs(e);return u.delete(a),a.current=null,c}},i=P.pathRefs(e);return i.add(a),a},Z7=e=>{var t=bf.get(e);return t||(t=new Set,bf.set(e,t)),t},J7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:a}=r;if(ue.isPath(t)){if(a==="start"){var[,i]=rt.first(e,t);t=i}else if(a==="end"){var[,c]=rt.last(e,t);t=c}}return Te.isRange(t)&&(a==="start"?t=Te.start(t):a==="end"?t=Te.end(t):t=ue.common(t.anchor.path,t.focus.path)),er.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},Q7=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,a={current:t,affinity:n,unref(){var{current:c}=a,u=P.pointRefs(e);return u.delete(a),a.current=null,c}},i=P.pointRefs(e);return i.add(a),a},e8=e=>{var t=yf.get(e);return t||(t=new Set,yf.set(e,t)),t},t8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(ue.isPath(t)){var a;if(n==="end"){var[,i]=rt.last(e,t);a=i}else{var[,c]=rt.first(e,t);a=c}var u=rt.get(e,a);if(!gt.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:a,offset:n==="end"?u.text.length:0}}if(Te.isRange(t)){var[f,d]=Te.edges(t);return n==="start"?f:d}return t};function r8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:a=!1,voids:i=!1,ignoreNonSelectable:c=!1}=t;if(!r)return;var u=P.range(e,r),[f,d]=Te.edges(u),m=a?d:f,g=!1,v="",w=0,x=0,C=0;for(var[p,A]of P.nodes(e,{at:r,reverse:a,voids:i,ignoreNonSelectable:c})){if(yt.isElement(p)){if(!i&&(e.isVoid(p)||e.isElementReadOnly(p))){yield P.start(e,A);continue}if(e.isInline(p))continue;if(P.hasInlines(e,p)){var B=ue.isAncestor(A,d.path)?d:P.end(e,A),k=ue.isAncestor(A,f.path)?f:P.start(e,A);v=P.string(e,{anchor:k,focus:B},{voids:i}),g=!0}}if(gt.isText(p)){var N=ue.equals(A,m.path);for(N?(x=a?m.offset:p.text.length-m.offset,C=m.offset):(x=p.text.length,C=a?x:0),(N||g||n==="offset")&&(yield{path:A,offset:C},g=!1);;){if(w===0){if(v==="")break;w=F(v,n,a),v=L0(v,w,a)[1]}if(C=a?C-w:C+w,x=x-w,x<0){w=-x;break}w=0,yield{path:A,offset:C}}}}function F(R,S,z){return S==="character"?j0(R,z):S==="word"?Iv(R,z):S==="line"||S==="block"?R.length:1}})()}var n8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:a,at:i=e.selection}=t;if(i){var c=P.before(e,i,{voids:n});if(c){var[,u]=P.first(e,[]),f=[c.path,u];if(ue.isPath(i)&&i.length===0)throw new Error("Cannot get the previous node from the root node!");if(a==null)if(ue.isPath(i)){var[d]=P.parent(e,i);a=g=>d.children.includes(g)}else a=()=>!0;var[m]=P.nodes(e,{reverse:!0,at:f,match:a,mode:r,voids:n});return m}}},a8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,a={current:t,affinity:n,unref(){var{current:c}=a,u=P.rangeRefs(e);return u.delete(a),a.current=null,c}},i=P.rangeRefs(e);return i.add(a),a},o8=e=>{var t=xf.get(e);return t||(t=new Set,xf.set(e,t)),t},i8=(e,t,r)=>{if(Te.isRange(t)&&!r)return t;var n=P.start(e,t),a=P.end(e,r||t);return{anchor:n,focus:a}};function qf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function s8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qf(Object(r),!0).forEach(function(n){mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var l8=(e,t)=>{var{selection:r}=e;if(r){var n=(m,g)=>{if(!gt.isText(m))return!1;var[v,w]=P.parent(e,g);return!e.isVoid(v)||e.markableVoid(v)},a=Te.isExpanded(r),i=!1;if(!a){var[c,u]=P.node(e,r);if(c&&n(c,u)){var[f]=P.parent(e,u);i=f&&e.markableVoid(f)}}if(a||i)Ve.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var d=s8({},P.marks(e)||{});delete d[t],e.marks=d,Uo.get(e)||e.onChange()}}},u8=(e,t)=>{z1.set(e,t)},c8=(e,t)=>P.point(e,t,{edge:"start"}),d8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,a=P.range(e,t),[i,c]=Te.edges(a),u="";for(var[f,d]of P.nodes(e,{at:a,match:gt.isText,voids:n})){var m=f.text;ue.equals(d,c.path)&&(m=m.slice(0,c.offset)),ue.equals(d,i.path)&&(m=m.slice(i.offset)),u+=m}return u},f8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[a,i]=Te.edges(t);if(a.offset!==0||i.offset!==0||Te.isCollapsed(t)||ue.hasPrevious(i.path))return t;var c=P.above(e,{at:i,match:w=>yt.isElement(w)&&P.isBlock(e,w),voids:n}),u=c?c[1]:[],f=P.start(e,a),d={anchor:f,focus:i},m=!0;for(var[g,v]of P.nodes(e,{at:d,match:gt.isText,reverse:!0,voids:n})){if(m){m=!1;continue}if(g.text!==""||ue.isBefore(v,u)){i={path:v,offset:g.text.length};break}}return{anchor:a,focus:i}},h8=(e,t)=>{var r=P.isNormalizing(e);P.setNormalizing(e,!1);try{t()}finally{P.setNormalizing(e,r)}P.normalize(e)},p8=(e,t,r)=>{var[n,a]=t;return yt.isElement(n)&&P.isEmpty(e,n)||gt.isText(n)&&n.text===""&&a[a.length-1]!==0},m8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var r,n,{reverse:a=!1,unit:i="character",distance:c=1,voids:u=!1}=t,{at:f=e.selection,hanging:d=!1}=t;if(f){var m=!1;if(Te.isRange(f)&&Te.isCollapsed(f)&&(m=!0,f=f.anchor),er.isPoint(f)){var g=P.void(e,{at:f,mode:"highest"});if(!u&&g){var[,v]=g;f=v}else{var w={unit:i,distance:c},x=a?P.before(e,f,w)||P.start(e,[]):P.after(e,f,w)||P.end(e,[]);f={anchor:f,focus:x},d=!0}}if(ue.isPath(f)){Ve.removeNodes(e,{at:f,voids:u});return}if(!Te.isCollapsed(f)){if(!d){var[,C]=Te.edges(f),p=P.end(e,[]);er.equals(C,p)||(f=P.unhangRange(e,f,{voids:u}))}var[A,B]=Te.edges(f),k=P.above(e,{match:De=>yt.isElement(De)&&P.isBlock(e,De),at:A,voids:u}),N=P.above(e,{match:De=>yt.isElement(De)&&P.isBlock(e,De),at:B,voids:u}),F=k&&N&&!ue.equals(k[1],N[1]),R=ue.equals(A.path,B.path),S=u?null:(r=P.void(e,{at:A,mode:"highest"}))!==null&&r!==void 0?r:P.elementReadOnly(e,{at:A,mode:"highest"}),z=u?null:(n=P.void(e,{at:B,mode:"highest"}))!==null&&n!==void 0?n:P.elementReadOnly(e,{at:B,mode:"highest"});if(S){var O=P.before(e,A);O&&k&&ue.isAncestor(k[1],O.path)&&(A=O)}if(z){var V=P.after(e,B);V&&N&&ue.isAncestor(N[1],V.path)&&(B=V)}var I=[],X;for(var Z of P.nodes(e,{at:f,voids:u})){var[L,K]=Z;X&&ue.compare(K,X)===0||(!u&&yt.isElement(L)&&(P.isVoid(e,L)||P.isElementReadOnly(e,L))||!ue.isCommon(K,A.path)&&!ue.isCommon(K,B.path))&&(I.push(Z),X=K)}var W=Array.from(I,De=>{var[,ke]=De;return P.pathRef(e,ke)}),G=P.pointRef(e,A),ne=P.pointRef(e,B),q="";if(!R&&!S){var J=G.current,[me]=P.leaf(e,J),{path:Ce}=J,{offset:we}=A,Fe=me.text.slice(we);Fe.length>0&&(e.apply({type:"remove_text",path:Ce,offset:we,text:Fe}),q=Fe)}if(W.reverse().map(De=>De.unref()).filter(De=>De!==null).forEach(De=>Ve.removeNodes(e,{at:De,voids:u})),!z){var Ie=ne.current,[Q]=P.leaf(e,Ie),{path:le}=Ie,ce=R?A.offset:0,de=Q.text.slice(ce,B.offset);de.length>0&&(e.apply({type:"remove_text",path:le,offset:ce,text:de}),q=de)}!R&&F&&ne.current&&G.current&&Ve.mergeNodes(e,{at:ne.current,hanging:!0,voids:u}),m&&a&&i==="character"&&q.length>1&&q.match(/[\u0E00-\u0E7F]+/)&&Ve.insertText(e,q.slice(0,q.length-c));var Ee=G.unref(),Ne=ne.unref(),ge=a?Ee||Ne:Ne||Ee;t.at==null&&ge&&Ve.select(e,ge)}}})},g8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:a=!1}=r,{at:i=z0(e),batchDirty:c=!0}=r;if(t.length){if(Te.isRange(i))if(n||(i=P.unhangRange(e,i,{voids:a})),Te.isCollapsed(i))i=i.anchor;else{var[,u]=Te.edges(i);if(!a&&P.void(e,{at:u}))return;var f=P.pointRef(e,u);Ve.delete(e,{at:i}),i=f.unref()}else ue.isPath(i)&&(i=P.start(e,i));if(!(!a&&P.void(e,{at:i}))){var d=P.above(e,{at:i,match:Fe=>yt.isElement(Fe)&&P.isInline(e,Fe),mode:"highest",voids:a});if(d){var[,m]=d;if(P.isEnd(e,i,m)){var g=P.after(e,m);i=g}else if(P.isStart(e,i,m)){var v=P.before(e,m);i=v}}var w=P.above(e,{match:Fe=>yt.isElement(Fe)&&P.isBlock(e,Fe),at:i,voids:a}),[,x]=w,C=P.isStart(e,i,x),p=P.isEnd(e,i,x),A=C&&p,B=!C||C&&p,k=!p,[,N]=rt.first({children:t},[]),[,F]=rt.last({children:t},[]),R=[],S=Fe=>{var[Ie,Q]=Fe,le=Q.length===0;return le?!1:A?!0:!(B&&ue.isAncestor(Q,N)&&yt.isElement(Ie)&&!e.isVoid(Ie)&&!e.isInline(Ie)||k&&ue.isAncestor(Q,F)&&yt.isElement(Ie)&&!e.isVoid(Ie)&&!e.isInline(Ie))};for(var z of rt.nodes({children:t},{pass:S}))S(z)&&R.push(z);var O=[],V=[],I=[],X=!0,Z=!1;for(var[L]of R)yt.isElement(L)&&!e.isInline(L)?(X=!1,Z=!0,V.push(L)):X?O.push(L):I.push(L);var[K]=P.nodes(e,{at:i,match:Fe=>gt.isText(Fe)||P.isInline(e,Fe),mode:"highest",voids:a}),[,W]=K,G=P.isStart(e,i,W),ne=P.isEnd(e,i,W),q=P.pathRef(e,p&&!I.length?ue.next(x):x),J=P.pathRef(e,ne?ue.next(W):W);Ve.splitNodes(e,{at:i,match:Fe=>Z?yt.isElement(Fe)&&P.isBlock(e,Fe):gt.isText(Fe)||P.isInline(e,Fe),mode:Z?"lowest":"highest",always:Z&&(!C||O.length>0)&&(!p||I.length>0),voids:a});var me=P.pathRef(e,!G||G&&ne?ue.next(W):W);if(Ve.insertNodes(e,O,{at:me.current,match:Fe=>gt.isText(Fe)||P.isInline(e,Fe),mode:"highest",voids:a,batchDirty:c}),A&&!O.length&&V.length&&!I.length&&Ve.delete(e,{at:x,voids:a}),Ve.insertNodes(e,V,{at:q.current,match:Fe=>yt.isElement(Fe)&&P.isBlock(e,Fe),mode:"lowest",voids:a,batchDirty:c}),Ve.insertNodes(e,I,{at:J.current,match:Fe=>gt.isText(Fe)||P.isInline(e,Fe),mode:"highest",voids:a,batchDirty:c}),!r.at){var Ce;if(I.length>0&&J.current?Ce=ue.previous(J.current):V.length>0&&q.current?Ce=ue.previous(q.current):me.current&&(Ce=ue.previous(me.current)),Ce){var we=P.end(e,Ce);Ve.select(e,we)}}me.unref(),q.unref(),J.unref()}}})},v8=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")Ve.select(e,n.anchor);else if(r==="focus")Ve.select(e,n.focus);else if(r==="start"){var[a]=Te.edges(n);Ve.select(e,a)}else if(r==="end"){var[,i]=Te.edges(n);Ve.select(e,i)}}else return},b8=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},y8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:a="character",reverse:i=!1}=t,{edge:c=null}=t;if(r){c==="start"&&(c=Te.isBackward(r)?"focus":"anchor"),c==="end"&&(c=Te.isBackward(r)?"anchor":"focus");var{anchor:u,focus:f}=r,d={distance:n,unit:a,ignoreNonSelectable:!0},m={};if(c==null||c==="anchor"){var g=i?P.before(e,u,d):P.after(e,u,d);g&&(m.anchor=g)}if(c==null||c==="focus"){var v=i?P.before(e,f,d):P.after(e,f,d);v&&(m.focus=v)}Ve.setSelection(e,m)}},x8=(e,t)=>{var{selection:r}=e;if(t=P.range(e,t),r){Ve.setSelection(e,t);return}if(!Te.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(Xr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function Vf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wf(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){mn(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 w8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:a="both"}=r;if(n){a==="start"&&(a=Te.isBackward(n)?"focus":"anchor"),a==="end"&&(a=Te.isBackward(n)?"anchor":"focus");var{anchor:i,focus:c}=n,u=a==="anchor"?i:c;Ve.setSelection(e,{[a==="anchor"?"anchor":"focus"]:Wf(Wf({},u),t)})}},C8=(e,t)=>{var{selection:r}=e,n={},a={};if(r){for(var i in t)(i==="anchor"&&t.anchor!=null&&!er.equals(t.anchor,r.anchor)||i==="focus"&&t.focus!=null&&!er.equals(t.focus,r.focus)||i!=="anchor"&&i!=="focus"&&t[i]!==r[i])&&(n[i]=r[i],a[i]=t[i]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:a})}},D8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:a=!1,mode:i="lowest",batchDirty:c=!0}=r,{at:u,match:f,select:d}=r;if(rt.isNode(t)&&(t=[t]),t.length!==0){var[m]=t;if(u||(u=z0(e),d!==!1&&(d=!0)),d==null&&(d=!1),Te.isRange(u))if(n||(u=P.unhangRange(e,u,{voids:a})),Te.isCollapsed(u))u=u.anchor;else{var[,g]=Te.edges(u),v=P.pointRef(e,g);Ve.delete(e,{at:u}),u=v.unref()}if(er.isPoint(u)){f==null&&(gt.isText(m)?f=O=>gt.isText(O):e.isInline(m)?f=O=>gt.isText(O)||P.isInline(e,O):f=O=>yt.isElement(O)&&P.isBlock(e,O));var[w]=P.nodes(e,{at:u.path,match:f,mode:i,voids:a});if(w){var[,x]=w,C=P.pathRef(e,x),p=P.isEnd(e,u,x);Ve.splitNodes(e,{at:u,match:f,mode:i,voids:a});var A=C.unref();u=p?ue.next(A):A}else return}var B=ue.parent(u),k=u[u.length-1];if(!(!a&&P.void(e,{at:B}))){if(c){var N=[],F=ue.levels(B);o7(e,()=>{var O=function(){var I=B.concat(k);k++;var X={type:"insert_node",path:I,node:V};e.apply(X),u=ue.next(u),N.push(X),gt.isText?F.push(...Array.from(rt.nodes(V),Z=>{var[,L]=Z;return I.concat(L)})):F.push(I)};for(var V of t)O()},()=>{L1(e,F,O=>{var V=O;for(var I of N)if(ue.operationCanTransformPath(I)&&(V=ue.transform(V,I),!V))return null;return V})})}else for(var R of t){var S=B.concat(k);k++,e.apply({type:"insert_node",path:S,node:R}),u=ue.next(u)}if(u=ue.previous(u),d){var z=P.end(e,u);z&&Ve.select(e,z)}}}})},k8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:a=!1}=t,{match:i}=t;if(i==null&&(i=ue.isPath(r)?So(e,r):k=>yt.isElement(k)&&P.isBlock(e,k)),!!r){var c=P.nodes(e,{at:r,match:i,mode:n,voids:a}),u=Array.from(c,k=>{var[,N]=k;return P.pathRef(e,N)});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 m=P.node(e,ue.parent(d)),[g,v]=m,w=d[d.length-1],{length:x}=g.children;if(x===1){var C=ue.next(v);Ve.moveNodes(e,{at:d,to:C,voids:a}),Ve.removeNodes(e,{at:v,voids:a})}else if(w===0)Ve.moveNodes(e,{at:d,to:v,voids:a});else if(w===x-1){var p=ue.next(v);Ve.moveNodes(e,{at:d,to:p,voids:a})}else{var A=ue.next(d),B=ue.next(v);Ve.splitNodes(e,{at:A,voids:a}),Ve.moveNodes(e,{at:d,to:B,voids:a})}}}})},E8=["text"],S8=["children"],H1=(e,t)=>{if(yt.isElement(t)){var r=t;return P.isVoid(e,t)?!0:r.children.length===1?H1(e,r.children[0]):!1}else return!P.isEditor(t)},A8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:a=!1,voids:i=!1,mode:c="lowest"}=t;if(n){if(r==null)if(ue.isPath(n)){var[u]=P.parent(e,n);r=O=>u.children.includes(O)}else r=O=>yt.isElement(O)&&P.isBlock(e,O);if(!a&&Te.isRange(n)&&(n=P.unhangRange(e,n,{voids:i})),Te.isRange(n))if(Te.isCollapsed(n))n=n.anchor;else{var[,f]=Te.edges(n),d=P.pointRef(e,f);Ve.delete(e,{at:n}),n=d.unref(),t.at==null&&Ve.select(e,n)}var[m]=P.nodes(e,{at:n,match:r,voids:i,mode:c}),g=P.previous(e,{at:n,match:r,voids:i,mode:c});if(!(!m||!g)){var[v,w]=m,[x,C]=g;if(!(w.length===0||C.length===0)){var p=ue.next(C),A=ue.common(w,C),B=ue.isSibling(w,C),k=Array.from(P.levels(e,{at:w}),O=>{var[V]=O;return V}).slice(A.length).slice(0,-1),N=P.above(e,{at:w,mode:"highest",match:O=>k.includes(O)&&H1(e,O)}),F=N&&P.pathRef(e,N[1]),R,S;if(gt.isText(v)&>.isText(x)){var z=fa(v,E8);S=x.text.length,R=z}else if(yt.isElement(v)&&yt.isElement(x)){var z=fa(v,S8);S=x.children.length,R=z}else throw new Error("Cannot merge the node at path [".concat(w,"] with the previous sibling because it is not the same kind: ").concat(Xr.stringify(v)," ").concat(Xr.stringify(x)));B||Ve.moveNodes(e,{at:w,to:p,voids:i}),F&&Ve.removeNodes(e,{at:F.current,voids:i}),P.shouldMergeNodesRemovePrevNode(e,g,m)?Ve.removeNodes(e,{at:C,voids:i}):e.apply({type:"merge_node",path:p,position:S,properties:R}),F&&F.unref()}}}})},B8=(e,t)=>{P.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:a="lowest",voids:i=!1}=t,{match:c}=t;if(n){c==null&&(c=ue.isPath(n)?So(e,n):w=>yt.isElement(w)&&P.isBlock(e,w));var u=P.pathRef(e,r),f=P.nodes(e,{at:n,match:c,mode:a,voids:i}),d=Array.from(f,w=>{var[,x]=w;return P.pathRef(e,x)});for(var m of d){var g=m.unref(),v=u.current;g.length!==0&&e.apply({type:"move_node",path:g,newPath:v}),u.current&&ue.isSibling(v,g)&&ue.isAfter(v,g)&&(u.current=ue.next(u.current))}u.unref()}})},F8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:a="lowest"}=t,{at:i=e.selection,match:c}=t;if(i){c==null&&(c=ue.isPath(i)?So(e,i):v=>yt.isElement(v)&&P.isBlock(e,v)),!r&&Te.isRange(i)&&(i=P.unhangRange(e,i,{voids:n}));var u=P.nodes(e,{at:i,match:c,mode:a,voids:n}),f=Array.from(u,v=>{var[,w]=v;return P.pathRef(e,w)});for(var d of f){var m=d.unref();if(m){var[g]=P.node(e,m);e.apply({type:"remove_node",path:m,node:g})}}}})},N8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{match:n,at:a=e.selection,compare:i,merge:c}=r,{hanging:u=!1,mode:f="lowest",split:d=!1,voids:m=!1}=r;if(a){if(n==null&&(n=ue.isPath(a)?So(e,a):S=>yt.isElement(S)&&P.isBlock(e,S)),!u&&Te.isRange(a)&&(a=P.unhangRange(e,a,{voids:m})),d&&Te.isRange(a)){if(Te.isCollapsed(a)&&P.leaf(e,a.anchor)[0].text.length>0)return;var g=P.rangeRef(e,a,{affinity:"inward"}),[v,w]=Te.edges(a),x=f==="lowest"?"lowest":"highest",C=P.isEnd(e,w,w.path);Ve.splitNodes(e,{at:w,match:n,mode:x,voids:m,always:!C});var p=P.isStart(e,v,v.path);Ve.splitNodes(e,{at:v,match:n,mode:x,voids:m,always:!p}),a=g.unref(),r.at==null&&Ve.select(e,a)}i||(i=(S,z)=>S!==z);for(var[A,B]of P.nodes(e,{at:a,match:n,mode:f,voids:m})){var k={},N={};if(B.length!==0){var F=!1;for(var R in t)R==="children"||R==="text"||i(t[R],A[R])&&(F=!0,A.hasOwnProperty(R)&&(k[R]=A[R]),c?t[R]!=null&&(N[R]=c(A[R],t[R])):t[R]!=null&&(N[R]=t[R]));F&&e.apply({type:"set_node",path:B,properties:k,newProperties:N})}}}})},T8=(e,t)=>{if(Te.isCollapsed(t))return t.anchor;var[,r]=Te.edges(t),n=P.pointRef(e,r);return Ve.delete(e,{at:t}),n.unref()},O8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:a,at:i=e.selection,height:c=0,always:u=!1}=t;if(a==null&&(a=ne=>yt.isElement(ne)&&P.isBlock(e,ne)),Te.isRange(i)&&(i=T8(e,i)),ue.isPath(i)){var f=i,d=P.point(e,f),[m]=P.parent(e,f);a=ne=>ne===m,c=d.path.length-f.length+1,i=d,u=!0}if(i){var g=P.pointRef(e,i,{affinity:"backward"}),v;try{var[w]=P.nodes(e,{at:i,match:a,mode:r,voids:n});if(!w)return;var x=P.void(e,{at:i,mode:"highest"}),C=0;if(!n&&x){var[p,A]=x;if(yt.isElement(p)&&e.isInline(p)){var B=P.after(e,A);if(!B){var k={text:""},N=ue.next(A);Ve.insertNodes(e,k,{at:N,voids:n}),B=P.point(e,N)}i=B,u=!0}var F=i.path.length-A.length;c=F+1,u=!0}v=P.pointRef(e,i);var R=i.path.length-c,[,S]=w,z=i.path.slice(0,R),O=c===0?i.offset:i.path[R]+C;for(var[V,I]of P.levels(e,{at:z,reverse:!0,voids:n})){var X=!1;if(I.length<S.length||I.length===0||!n&&yt.isElement(V)&&P.isVoid(e,V))break;var Z=g.current,L=P.isEnd(e,Z,I);if(u||!g||!P.isEdge(e,Z,I)){X=!0;var K=rt.extractProps(V);e.apply({type:"split_node",path:I,position:O,properties:K})}O=I[I.length-1]+(X||L?1:0)}if(t.at==null){var W=v.current||P.end(e,[]);Ve.select(e,W)}}finally{var G;g.unref(),(G=v)===null||G===void 0||G.unref()}}})},M8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var a of t)n[a]=null;Ve.setNodes(e,n,r)},R8=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};P.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:a=!1}=t,{at:i=e.selection,match:c}=t;if(i){c==null&&(c=ue.isPath(i)?So(e,i):v=>yt.isElement(v)&&P.isBlock(e,v)),ue.isPath(i)&&(i=P.range(e,i));var u=Te.isRange(i)?P.rangeRef(e,i):null,f=P.nodes(e,{at:i,match:c,mode:r,voids:a}),d=Array.from(f,v=>{var[,w]=v;return P.pathRef(e,w)}).reverse(),m=function(){var v=g.unref(),[w]=P.node(e,v),x=P.range(e,v);n&&u&&(x=Te.intersection(u.current,x)),Ve.liftNodes(e,{at:x,match:C=>yt.isAncestor(w)&&w.children.includes(C),voids:a})};for(var g of d)m();u&&u.unref()}})};function Uf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?Uf(Object(r),!0).forEach(function(n){mn(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 $8=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};P.withoutNormalizing(e,()=>{var{mode:n="lowest",split:a=!1,voids:i=!1}=r,{match:c,at:u=e.selection}=r;if(u){if(c==null&&(ue.isPath(u)?c=So(e,u):e.isInline(t)?c=x=>yt.isElement(x)&&P.isInline(e,x)||gt.isText(x):c=x=>yt.isElement(x)&&P.isBlock(e,x)),a&&Te.isRange(u)){var[f,d]=Te.edges(u),m=P.rangeRef(e,u,{affinity:"inward"});Ve.splitNodes(e,{at:d,match:c,voids:i}),Ve.splitNodes(e,{at:f,match:c,voids:i}),u=m.unref(),r.at==null&&Ve.select(e,u)}var g=Array.from(P.nodes(e,{at:u,match:e.isInline(t)?x=>yt.isElement(x)&&P.isBlock(e,x):x=>P.isEditor(x),mode:"lowest",voids:i})),v=function(){var x=Te.isRange(u)?Te.intersection(u,P.range(e,w)):u;if(!x)return 0;var C=Array.from(P.nodes(e,{at:x,match:c,mode:n,voids:i}));if(C.length>0){var[p]=C,A=C[C.length-1],[,B]=p,[,k]=A;if(B.length===0&&k.length===0)return 0;var N=ue.equals(B,k)?ue.parent(B):ue.common(B,k),F=P.range(e,B,k),R=P.node(e,N),[S]=R,z=N.length+1,O=ue.next(k.slice(0,z)),V=Gf(Gf({},t),{},{children:[]});Ve.insertNodes(e,V,{at:O,voids:i}),Ve.moveNodes(e,{at:F,match:I=>yt.isAncestor(S)&&S.children.includes(I),to:O.concat(0),voids:i})}};for(var[,w]of g)v()}})},P8=()=>{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 i7(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f7(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m7(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g7(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v7(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l7(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B7(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N7(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return g8(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F7(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O7(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return u7(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return l8(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s7(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c7(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d7(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h7(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p7(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v8(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m8(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b8(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return b7(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y7(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x7(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w7(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C7(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return q7(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k7(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E7(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S7(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A7(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D8(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M7(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return R7(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $7(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return P7(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return I7(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _7(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return z7(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return j7(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return L7(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return k8(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return A8(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y8(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return B8(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return V7(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return W7(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return U7(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return G7(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Y7(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return J7(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return X7(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Z7(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return t8(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Q7(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e8(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r8(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return n8(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return i8(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return a8(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return o8(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return F8(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return x8(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N8(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return u8(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return w8(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C8(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return O8(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c8(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return d8(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return f8(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return M8(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return R8(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return D7(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h8(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $8(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return p8(e,...r)}};return e},Tl,Yf;function I8(){if(Yf)return Tl;Yf=1,Tl=a;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 a(i){return i=String(i||""),r.test(i)?"rtl":n.test(i)?"ltr":"neutral"}return Tl}var _8=I8();const K1=vi(_8);var Ol,Xf;function H0(){if(Xf)return Ol;Xf=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Ol=e,Ol}var Ml,Zf;function z8(){if(Zf)return Ml;Zf=1;var e=typeof ro=="object"&&ro&&ro.Object===Object&&ro;return Ml=e,Ml}var Rl,Jf;function q1(){if(Jf)return Rl;Jf=1;var e=z8(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Rl=r,Rl}var $l,Qf;function j8(){if(Qf)return $l;Qf=1;var e=q1(),t=function(){return e.Date.now()};return $l=t,$l}var Pl,eh;function L8(){if(eh)return Pl;eh=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Pl=t,Pl}var Il,th;function H8(){if(th)return Il;th=1;var e=L8(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Il=r,Il}var _l,rh;function V1(){if(rh)return _l;rh=1;var e=q1(),t=e.Symbol;return _l=t,_l}var zl,nh;function K8(){if(nh)return zl;nh=1;var e=V1(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,a=e?e.toStringTag:void 0;function i(c){var u=r.call(c,a),f=c[a];try{c[a]=void 0;var d=!0}catch{}var m=n.call(c);return d&&(u?c[a]=f:delete c[a]),m}return zl=i,zl}var jl,ah;function q8(){if(ah)return jl;ah=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return jl=r,jl}var Ll,oh;function V8(){if(oh)return Ll;oh=1;var e=V1(),t=K8(),r=q8(),n="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function c(u){return u==null?u===void 0?a:n:i&&i in Object(u)?t(u):r(u)}return Ll=c,Ll}var Hl,ih;function W8(){if(ih)return Hl;ih=1;function e(t){return t!=null&&typeof t=="object"}return Hl=e,Hl}var Kl,sh;function U8(){if(sh)return Kl;sh=1;var e=V8(),t=W8(),r="[object Symbol]";function n(a){return typeof a=="symbol"||t(a)&&e(a)==r}return Kl=n,Kl}var ql,lh;function G8(){if(lh)return ql;lh=1;var e=H8(),t=H0(),r=U8(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^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 m=typeof d.valueOf=="function"?d.valueOf():d;d=t(m)?m+"":m}if(typeof d!="string")return d===0?d:+d;d=e(d);var g=i.test(d);return g||c.test(d)?u(d.slice(2),g?2:8):a.test(d)?n:+d}return ql=f,ql}var Vl,uh;function W1(){if(uh)return Vl;uh=1;var e=H0(),t=j8(),r=G8(),n="Expected a function",a=Math.max,i=Math.min;function c(u,f,d){var m,g,v,w,x,C,p=0,A=!1,B=!1,k=!0;if(typeof u!="function")throw new TypeError(n);f=r(f)||0,e(d)&&(A=!!d.leading,B="maxWait"in d,v=B?a(r(d.maxWait)||0,f):v,k="trailing"in d?!!d.trailing:k);function N(Z){var L=m,K=g;return m=g=void 0,p=Z,w=u.apply(K,L),w}function F(Z){return p=Z,x=setTimeout(z,f),A?N(Z):w}function R(Z){var L=Z-C,K=Z-p,W=f-L;return B?i(W,v-K):W}function S(Z){var L=Z-C,K=Z-p;return C===void 0||L>=f||L<0||B&&K>=v}function z(){var Z=t();if(S(Z))return O(Z);x=setTimeout(z,R(Z))}function O(Z){return x=void 0,k&&m?N(Z):(m=g=void 0,w)}function V(){x!==void 0&&clearTimeout(x),p=0,m=C=g=x=void 0}function I(){return x===void 0?w:O(t())}function X(){var Z=t(),L=S(Z);if(m=arguments,g=this,C=Z,L){if(x===void 0)return F(C);if(B)return clearTimeout(x),x=setTimeout(z,f),N(C)}return x===void 0&&(x=setTimeout(z,f)),w}return X.cancel=V,X.flush=I,X}return Vl=c,Vl}var Y8=W1();const X8=vi(Y8);var Wl,ch;function Z8(){if(ch)return Wl;ch=1;var e=W1(),t=H0(),r="Expected a function";function n(a,i,c){var u=!0,f=!0;if(typeof a!="function")throw new TypeError(r);return t(c)&&(u="leading"in c?!!c.leading:u,f="trailing"in c?!!c.trailing:f),e(a,i,{leading:u,maxWait:i,trailing:f})}return Wl=n,Wl}var J8=Z8();const Q8=vi(J8),dh=e=>typeof e=="object"&&e!=null&&e.nodeType===1,fh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",$i=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return fh(r.overflowY,t)||fh(r.overflowX,t)||(n=>{const a=(i=>{if(!i.ownerDocument||!i.ownerDocument.defaultView)return null;try{return i.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!a&&(a.clientHeight<n.scrollHeight||a.clientWidth<n.scrollWidth)})(e)}return!1},Pi=(e,t,r,n,a,i,c,u)=>i<e&&c>t||i>e&&c<t?0:i<=e&&u<=r||c>=t&&u>=r?i-e-n:c>t&&u<r||i<e&&u>r?c-t+a:0,eb=e=>e.parentElement??(e.getRootNode().host||null),hh=(e,t)=>{var r,n,a,i;if(typeof document>"u")return[];const{scrollMode:c,block:u,inline:f,boundary:d,skipOverflowHiddenElements:m}=t,g=typeof d=="function"?d:W=>W!==d;if(!dh(e))throw new TypeError("Invalid target");const v=document.scrollingElement||document.documentElement,w=[];let x=e;for(;dh(x)&&g(x);){if(x=eb(x),x===v){w.push(x);break}x!=null&&x===document.body&&$i(x)&&!$i(document.documentElement)||x!=null&&$i(x,m)&&w.push(x)}const C=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,p=(i=(a=window.visualViewport)==null?void 0:a.height)!=null?i:innerHeight,{scrollX:A,scrollY:B}=window,{height:k,width:N,top:F,right:R,bottom:S,left:z}=e.getBoundingClientRect(),{top:O,right:V,bottom:I,left:X}=(W=>{const G=window.getComputedStyle(W);return{top:parseFloat(G.scrollMarginTop)||0,right:parseFloat(G.scrollMarginRight)||0,bottom:parseFloat(G.scrollMarginBottom)||0,left:parseFloat(G.scrollMarginLeft)||0}})(e);let Z=u==="start"||u==="nearest"?F-O:u==="end"?S+I:F+k/2-O+I,L=f==="center"?z+N/2-X+V:f==="end"?R+V:z-X;const K=[];for(let W=0;W<w.length;W++){const G=w[W],{height:ne,width:q,top:J,right:me,bottom:Ce,left:we}=G.getBoundingClientRect();if(c==="if-needed"&&F>=0&&z>=0&&S<=p&&R<=C&&(G===v&&!$i(G)||F>=J&&S<=Ce&&z>=we&&R<=me))return K;const Fe=getComputedStyle(G),Ie=parseInt(Fe.borderLeftWidth,10),Q=parseInt(Fe.borderTopWidth,10),le=parseInt(Fe.borderRightWidth,10),ce=parseInt(Fe.borderBottomWidth,10);let de=0,Ee=0;const Ne="offsetWidth"in G?G.offsetWidth-G.clientWidth-Ie-le:0,ge="offsetHeight"in G?G.offsetHeight-G.clientHeight-Q-ce:0,De="offsetWidth"in G?G.offsetWidth===0?0:q/G.offsetWidth:0,ke="offsetHeight"in G?G.offsetHeight===0?0:ne/G.offsetHeight:0;if(v===G)de=u==="start"?Z:u==="end"?Z-p:u==="nearest"?Pi(B,B+p,p,Q,ce,B+Z,B+Z+k,k):Z-p/2,Ee=f==="start"?L:f==="center"?L-C/2:f==="end"?L-C:Pi(A,A+C,C,Ie,le,A+L,A+L+N,N),de=Math.max(0,de+B),Ee=Math.max(0,Ee+A);else{de=u==="start"?Z-J-Q:u==="end"?Z-Ce+ce+ge:u==="nearest"?Pi(J,Ce,ne,Q,ce+ge,Z,Z+k,k):Z-(J+ne/2)+ge/2,Ee=f==="start"?L-we-Ie:f==="center"?L-(we+q/2)+Ne/2:f==="end"?L-me+le+Ne:Pi(we,me,q,Ie,le+Ne,L,L+N,N);const{scrollLeft:Be,scrollTop:xe}=G;de=ke===0?0:Math.max(0,Math.min(xe+de/ke,G.scrollHeight-ne/ke+ge)),Ee=De===0?0:Math.max(0,Math.min(Be+Ee/De,G.scrollWidth-q/De+Ne)),Z+=xe-de,L+=Be-Ee}K.push({el:G,top:de,left:Ee})}return K},tb=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function rb(e,t){if(!e.isConnected||!(a=>{let i=a;for(;i&&i.parentNode;){if(i.parentNode===document)return!0;i=i.parentNode instanceof ShadowRoot?i.parentNode.host:i.parentNode}return!1})(e))return;const r=(a=>{const i=window.getComputedStyle(a);return{top:parseFloat(i.scrollMarginTop)||0,right:parseFloat(i.scrollMarginRight)||0,bottom:parseFloat(i.scrollMarginBottom)||0,left:parseFloat(i.scrollMarginLeft)||0}})(e);if((a=>typeof a=="object"&&typeof a.behavior=="function")(t))return t.behavior(hh(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:a,top:i,left:c}of hh(e,tb(t))){const u=i-r.top+r.bottom,f=c-r.left+r.right;a.scroll({top:u,left:f,behavior:n})}}var za=[],nb=function(){return za.some(function(e){return e.activeTargets.length>0})},ab=function(){return za.some(function(e){return e.skippedTargets.length>0})},ph="ResizeObserver loop completed with undelivered notifications.",ob=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:ph}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=ph),window.dispatchEvent(e)},oi;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(oi||(oi={}));var ja=function(e){return Object.freeze(e)},ib=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,ja(this)}return e})(),U1=(function(){function e(t,r,n,a){return this.x=t,this.y=r,this.width=n,this.height=a,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ja(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,a=t.top,i=t.right,c=t.bottom,u=t.left,f=t.width,d=t.height;return{x:r,y:n,top:a,right:i,bottom:c,left:u,width:f,height:d}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),K0=function(e){return e instanceof SVGElement&&"getBBox"in e},G1=function(e){if(K0(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var a=e,i=a.offsetWidth,c=a.offsetHeight;return!(i||c||e.getClientRects().length)},mh=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)},sb=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},Go=typeof window<"u"?window:{},Ii=new WeakMap,gh=/auto|scroll/,lb=/^tb|vertical/,ub=/msie|trident/i.test(Go.navigator&&Go.navigator.userAgent),Xn=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 ib((r?t:e)||0,(r?e:t)||0)},vh=ja({devicePixelContentBoxSize:uo(),borderBoxSize:uo(),contentBoxSize:uo(),contentRect:new U1(0,0,0,0)}),Y1=function(e,t){if(t===void 0&&(t=!1),Ii.has(e)&&!t)return Ii.get(e);if(G1(e))return Ii.set(e,vh),vh;var r=getComputedStyle(e),n=K0(e)&&e.ownerSVGElement&&e.getBBox(),a=!ub&&r.boxSizing==="border-box",i=lb.test(r.writingMode||""),c=!n&&gh.test(r.overflowY||""),u=!n&&gh.test(r.overflowX||""),f=n?0:Xn(r.paddingTop),d=n?0:Xn(r.paddingRight),m=n?0:Xn(r.paddingBottom),g=n?0:Xn(r.paddingLeft),v=n?0:Xn(r.borderTopWidth),w=n?0:Xn(r.borderRightWidth),x=n?0:Xn(r.borderBottomWidth),C=n?0:Xn(r.borderLeftWidth),p=g+d,A=f+m,B=C+w,k=v+x,N=u?e.offsetHeight-k-e.clientHeight:0,F=c?e.offsetWidth-B-e.clientWidth:0,R=a?p+B:0,S=a?A+k:0,z=n?n.width:Xn(r.width)-R-F,O=n?n.height:Xn(r.height)-S-N,V=z+p+F+B,I=O+A+N+k,X=ja({devicePixelContentBoxSize:uo(Math.round(z*devicePixelRatio),Math.round(O*devicePixelRatio),i),borderBoxSize:uo(V,I,i),contentBoxSize:uo(z,O,i),contentRect:new U1(g,f,z,O)});return Ii.set(e,X),X},X1=function(e,t,r){var n=Y1(e,r),a=n.borderBoxSize,i=n.contentBoxSize,c=n.devicePixelContentBoxSize;switch(t){case oi.DEVICE_PIXEL_CONTENT_BOX:return c;case oi.BORDER_BOX:return a;default:return i}},cb=(function(){function e(t){var r=Y1(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=ja([r.borderBoxSize]),this.contentBoxSize=ja([r.contentBoxSize]),this.devicePixelContentBoxSize=ja([r.devicePixelContentBoxSize])}return e})(),Z1=function(e){if(G1(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},db=function(){var e=1/0,t=[];za.forEach(function(i){if(i.activeTargets.length!==0){var c=[];i.activeTargets.forEach(function(u){var f=new cb(u.target),d=Z1(u.target);c.push(f),u.lastReportedSize=X1(u.target,u.observedBox),d<e&&(e=d)}),t.push(function(){i.callback.call(i.observer,c,i.observer)}),i.activeTargets.splice(0,i.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var a=n[r];a()}return e},bh=function(e){za.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(Z1(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},fb=function(){var e=0;for(bh(e);nb();)e=db(),bh(e);return ab()&&ob(),e>0},Ul,J1=[],hb=function(){return J1.splice(0).forEach(function(e){return e()})},pb=function(e){if(!Ul){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return hb()}).observe(r,n),Ul=function(){r.textContent="".concat(t?t--:t++)}}J1.push(e),Ul()},mb=function(e){pb(function(){requestAnimationFrame(e)})},Yi=0,gb=function(){return!!Yi},vb=250,bb={attributes:!0,characterData:!0,childList:!0,subtree:!0},yh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],xh=function(e){return e===void 0&&(e=0),Date.now()+e},Gl=!1,yb=(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=vb),!Gl){Gl=!0;var n=xh(t);mb(function(){var a=!1;try{a=fb()}finally{if(Gl=!1,t=n-xh(),!gb())return;a?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,bb)};document.body?r():Go.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),yh.forEach(function(r){return Go.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),yh.forEach(function(r){return Go.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),Uu=new yb,wh=function(e){!Yi&&e>0&&Uu.start(),Yi+=e,!Yi&&Uu.stop()},xb=function(e){return!K0(e)&&!sb(e)&&getComputedStyle(e).display==="inline"},wb=(function(){function e(t,r){this.target=t,this.observedBox=r||oi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=X1(this.target,this.observedBox,!0);return xb(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Cb=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),_i=new WeakMap,Ch=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},zi=(function(){function e(){}return e.connect=function(t,r){var n=new Cb(t,r);_i.set(t,n)},e.observe=function(t,r,n){var a=_i.get(t),i=a.observationTargets.length===0;Ch(a.observationTargets,r)<0&&(i&&za.push(a),a.observationTargets.push(new wb(r,n&&n.box)),wh(1),Uu.schedule())},e.unobserve=function(t,r){var n=_i.get(t),a=Ch(n.observationTargets,r),i=n.observationTargets.length===1;a>=0&&(i&&za.splice(za.indexOf(n),1),n.observationTargets.splice(a,1),wh(-1))},e.disconnect=function(t){var r=this,n=_i.get(t);n.observationTargets.slice().forEach(function(a){return r.unobserve(t,a.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),Db=(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.");zi.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(!mh(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zi.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(!mh(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zi.unobserve(this,t)},e.prototype.disconnect=function(){zi.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),zn={},Dh;function kb(){if(Dh)return zn;Dh=1,Object.defineProperty(zn,"__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},a=1;a<20;a++)n["f"+a]=111+a;function i(v,w,x){w&&!("byKey"in w)&&(x=w,w=null),Array.isArray(v)||(v=[v]);var C=v.map(function(B){return f(B,w)}),p=function(B){return C.some(function(k){return d(k,B)})},A=x==null?p:p(x);return A}function c(v,w){return i(v,w)}function u(v,w){return i(v,{byKey:!0},w)}function f(v,w){var x=w&&w.byKey,C={};v=v.replace("++","+add");var p=v.split("+"),A=p.length;for(var B in t)C[t[B]]=!1;var k=!0,N=!1,F=void 0;try{for(var R=p[Symbol.iterator](),S;!(k=(S=R.next()).done);k=!0){var z=S.value,O=z.endsWith("?")&&z.length>1;O&&(z=z.slice(0,-1));var V=g(z),I=t[V];if(z.length>1&&!I&&!r[z]&&!n[V])throw new TypeError('Unknown modifier: "'+z+'"');(A===1||!I)&&(x?C.key=V:C.which=m(z)),I&&(C[I]=O?null:!0)}}catch(X){N=!0,F=X}finally{try{!k&&R.return&&R.return()}finally{if(N)throw F}}return C}function d(v,w){for(var x in v){var C=v[x],p=void 0;if(C!=null&&(x==="key"&&w.key!=null?p=w.key.toLowerCase():x==="which"?p=C===91&&w.which===93?91:w.which:p=w[x],!(p==null&&C===!1)&&p!==C))return!1}return!0}function m(v){v=g(v);var w=n[v]||v.toUpperCase().charCodeAt(0);return w}function g(v){return v=v.toLowerCase(),v=r[v]||v,v}return zn.default=i,zn.isHotkey=i,zn.isCodeHotkey=c,zn.isKeyHotkey=u,zn.parseHotkey=f,zn.compareHotkey=d,zn.toKeyCode=m,zn.toKeyName=g,zn}var Yl=kb();function Eb(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function mo(e,t){if(e==null)return{};var r=Eb(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ii(e){"@babel/helpers - typeof";return ii=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},ii(e)}function Sb(e,t){if(ii(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ii(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ab(e){var t=Sb(e,"string");return ii(t)==="symbol"?t:String(t)}function Mn(e,t,r){return t=Ab(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var q0=Ta(null),Oa=()=>{var e=Na(q0);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},Xl,Zl,Q1=parseInt(We.version.split(".")[0],10),em=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,kh=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),cn=typeof navigator<"u"&&/Android/.test(navigator.userAgent),ao=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),$a=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),Bb=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),tm=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),Fb=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Nb=cn&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),Tb=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),Ob=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),Mb=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),Xi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(Xl=navigator.userAgent.match(/Version\/(\d+)/))!==null&&Xl!==void 0&&Xl[1]&&parseInt((Zl=navigator.userAgent.match(/Version\/(\d+)/))===null||Zl===void 0?void 0:Zl[1],10)<17;var va=(!Fb||!Nb)&&!Bb&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",co=new WeakMap,V0=new WeakMap,W0=new WeakMap,rm=new WeakMap,Zi=new WeakMap,Gu=new WeakMap,si=new WeakMap,La=new WeakMap,ys=new WeakMap,Rs=new WeakMap,Yu=new WeakMap,Ea=new WeakMap,Ia=new WeakMap,Yo=new WeakMap,Xu=new WeakMap,U0=new WeakMap,Kn=new WeakMap,ua=new WeakMap,yn=new WeakMap,wa=new WeakMap,Ca=new WeakMap,nm=new WeakMap,go=Symbol("placeholder"),am=Symbol("mark-placeholder"),om=globalThis.Node,Rb=globalThis.Text,G0=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,$b=e=>Fa(e)&&e.nodeType===8,On=e=>Fa(e)&&e.nodeType===1,Fa=e=>{var t=G0(e);return!!t&&e instanceof t.Node},Zu=e=>{var t=e&&e.anchorNode&&G0(e.anchorNode);return!!t&&e instanceof t.Selection},im=e=>Fa(e)&&e.nodeType===3,Pb=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,Ib=e=>{var[t,r]=e;if(On(t)&&t.childNodes.length){var n=r===t.childNodes.length,a=n?r-1:r;for([t,a]=sm(t,a,n?"backward":"forward"),n=a<r;On(t)&&t.childNodes.length;){var i=n?t.childNodes.length-1:0;t=zb(t,i,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},_b=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},sm=(e,t,r)=>{for(var{childNodes:n}=e,a=n[t],i=t,c=!1,u=!1;($b(a)||On(a)&&a.childNodes.length===0||On(a)&&a.getAttribute("contenteditable")==="false")&&!(c&&u);){if(i>=n.length){c=!0,i=t-1,r="backward";continue}if(i<0){u=!0,i=t+1,r="forward";continue}a=n[i],t=i,i+=r==="forward"?1:-1}return[a,t]},zb=(e,t,r)=>{var[n]=sm(e,t,r);return n},lm=e=>{var t="";if(im(e)&&e.nodeValue)return e.nodeValue;if(On(e)){for(var r of Array.from(e.childNodes))t+=lm(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
77
|
+
`)}return t},jb=/data-slate-fragment="(.+?)"/m,Lb=e=>{var t=e.getData("text/html"),[,r]=t.match(jb)||[];return r},Xo=e=>e.getSelection!=null?e.getSelection():document.getSelection(),Y0=(e,t,r)=>{var{target:n}=t;if(On(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:a}=_e.getWindow(e);if(a.contains(n))return _e.hasDOMNode(e,n,{editable:!0});var i=r.find(c=>{var{addedNodes:u,removedNodes:f}=c;for(var d of u)if(d===n||d.contains(n))return!0;for(var m of f)if(m===n||m.contains(n))return!0});return!i||i===t?!1:Y0(e,i,r)},Hb=()=>{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},Eh=(e,t)=>!!(e.compareDocumentPosition(t)&om.DOCUMENT_POSITION_PRECEDING),Kb=(e,t)=>!!(e.compareDocumentPosition(t)&om.DOCUMENT_POSITION_FOLLOWING),qb=0;class Vb{constructor(){Mn(this,"id",void 0),this.id="".concat(qb++)}}var _e={androidPendingDiffs:e=>yn.get(e),androidScheduleFlush:e=>{var t;(t=U0.get(e))===null||t===void 0||t()},blur:e=>{var t=_e.toDOMNode(e,e),r=_e.findDocumentOrShadowRoot(e);Ea.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=_e.findDocumentOrShadowRoot(e),n=Xo(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Ve.deselect(e)},findDocumentOrShadowRoot:e=>{var t=_e.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:a}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i=_e.toSlateNode(e,t.target),c=_e.findPath(e,i);if(yt.isElement(i)&&P.isVoid(e,i)){var u=a.getBoundingClientRect(),f=e.isInline(i)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,d=P.point(e,c,{edge:f?"start":"end"}),m=f?P.before(e,d):P.after(e,d);if(m){var g=P.range(e,m);return g}}var v,{document:w}=_e.getWindow(e);if(w.caretRangeFromPoint)v=w.caretRangeFromPoint(r,n);else{var x=w.caretPositionFromPoint(r,n);x&&(v=w.createRange(),v.setStart(x.offsetNode,x.offset),v.setEnd(x.offsetNode,x.offset))}if(!v)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var C=_e.toSlateRange(e,v,{exactMatch:!1,suppressThrow:!1});return C},findKey:(e,t)=>{var r=ys.get(t);return r||(r=new Vb,ys.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var a=W0.get(n);if(a==null){if(P.isEditor(n))return r;break}var i=V0.get(n);if(i==null)break;r.unshift(i),n=a}throw new Error("Unable to find the path for Slate node: ".concat(Xr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!Ea.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(()=>{_e.focus(e,{retries:t.retries-1})},10);return}var r=_e.toDOMNode(e,e),n=_e.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var a=Xo(n),i=_e.toDOMRange(e,e.selection);a==null||a.removeAllRanges(),a==null||a.addRange(i)}e.selection||Ve.select(e,P.start(e,[])),Ea.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=rm.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,a=_e.toDOMNode(e,e),i;try{i=On(t)?t:t.parentElement}catch(c){if(c instanceof Error&&!c.message.includes('Permission denied to access property "nodeType"'))throw c}return i?i.closest("[data-slate-editor]")===a&&(!n||i.isContentEditable?!0:typeof i.isContentEditable=="boolean"&&i.closest('[contenteditable="false"]')===a||!!i.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>Fa(t)&&_e.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return P.hasPath(e,r.path)&&P.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>_e.hasEditableTarget(e,t)||_e.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Fa(t)&&_e.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Ia.get(e),isFocused:e=>!!Ea.get(e),isReadOnly:e=>!!Yu.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(Yu.get(e))return!1;var r=_e.hasTarget(e,t)&&_e.toSlateNode(e,t);return yt.isElement(r)&&P.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=Rs.get(e),n=P.isEditor(t)?Zi.get(e):r==null?void 0:r.get(_e.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Xr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=P.node(e,t.path),n=_e.toDOMNode(e,r),a;P.void(e,{at:t})&&(t={path:t.path,offset:0});for(var i="[data-slate-string], [data-slate-zero-width]",c=Array.from(n.querySelectorAll(i)),u=0,f=0;f<c.length;f++){var d=c[f],m=d.childNodes[0];if(!(m==null||m.textContent==null)){var{length:g}=m.textContent,v=d.getAttribute("data-slate-length"),w=v==null?g:parseInt(v,10),x=u+w,C=c[f+1];if(t.offset===x&&C!==null&&C!==void 0&&C.hasAttribute("data-slate-mark-placeholder")){var p,A=C.childNodes[0];a=[A instanceof Rb?A:C,(p=C.textContent)!==null&&p!==void 0&&p.startsWith("\uFEFF")?1:0];break}if(t.offset<=x){var B=Math.min(g,Math.max(0,t.offset-u));a=[m,B];break}u=x}}if(!a)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Xr.stringify(t)));return a},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,a=Te.isBackward(t),i=_e.toDOMPoint(e,r),c=Te.isCollapsed(t)?i:_e.toDOMPoint(e,n),u=_e.getWindow(e),f=u.document.createRange(),[d,m]=a?c:i,[g,v]=a?i:c,w=On(d)?d:d.parentElement,x=!!w.getAttribute("data-slate-zero-width"),C=On(g)?g:g.parentElement,p=!!C.getAttribute("data-slate-zero-width");return f.setStart(d,x?1:m),f.setEnd(g,p?1:v),f},toSlateNode:(e,t)=>{var r=On(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?si.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:a,searchDirection:i="backward"}=r,[c,u]=n?t:Ib(t),f=c.parentNode,d=null,m=0;if(f){var g,v,w=_e.toDOMNode(e,e),x=f.closest('[data-slate-void="true"]'),C=x&&w.contains(x)?x:null,p=f.closest('[contenteditable="false"]'),A=p&&w.contains(p)?p:null,B=f.closest("[data-slate-leaf]"),k=null;if(B){if(d=B.closest('[data-slate-node="text"]'),d){var N=_e.getWindow(e),F=N.document.createRange();F.setStart(d,0),F.setEnd(c,u);var R=F.cloneContents(),S=[...Array.prototype.slice.call(R.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(R.querySelectorAll("[contenteditable=false]"))];S.forEach(we=>{if(cn&&!n&&we.hasAttribute("data-slate-zero-width")&&we.textContent.length>0&&we.textContext!=="\uFEFF"){we.textContent.startsWith("\uFEFF")&&(we.textContent=we.textContent.slice(1));return}we.parentNode.removeChild(we)}),m=R.textContent.length,k=d}}else if(C){for(var z=C.querySelectorAll("[data-slate-leaf]"),O=0;O<z.length;O++){var V=z[O];if(_e.hasDOMNode(e,V)){B=V;break}}B?(d=B.closest('[data-slate-node="text"]'),k=B,m=k.textContent.length,k.querySelectorAll("[data-slate-zero-width]").forEach(we=>{m-=we.textContent.length})):m=1}else if(A){var I=we=>we?we.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],X=A.closest('[data-slate-node="element"]');if(i==="forward"){var Z,L=[...I(X),...I(X==null?void 0:X.nextElementSibling)];B=(Z=L.find(we=>Kb(A,we)))!==null&&Z!==void 0?Z:null}else{var K,W=[...I(X==null?void 0:X.previousElementSibling),...I(X)];B=(K=W.findLast(we=>Eh(A,we)))!==null&&K!==void 0?K:null}B&&(d=B.closest('[data-slate-node="text"]'),k=B,i==="forward"?m=0:(m=k.textContent.length,k.querySelectorAll("[data-slate-zero-width]").forEach(we=>{m-=we.textContent.length})))}k&&m===k.textContent.length&&cn&&k.getAttribute("data-slate-zero-width")==="z"&&(g=k.textContent)!==null&&g!==void 0&&g.startsWith("\uFEFF")&&(f.hasAttribute("data-slate-zero-width")||ao&&(v=k.textContent)!==null&&v!==void 0&&v.endsWith(`
|
|
78
|
+
|
|
79
|
+
`))&&m--}if(cn&&!d&&!n){var G=f.hasAttribute("data-slate-node")?f:f.closest("[data-slate-node]");if(G&&_e.hasDOMNode(e,G,{editable:!0})){var ne=_e.toSlateNode(e,G),{path:q,offset:J}=P.start(e,_e.findPath(e,ne));return G.querySelector("[data-slate-leaf]")||(J=u),{path:q,offset:J}}}if(!d){if(a)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var me=_e.toSlateNode(e,d),Ce=_e.findPath(e,me);return{path:Ce,offset:m}},toSlateRange:(e,t,r)=>{var n,{exactMatch:a,suppressThrow:i}=r,c=Zu(t)?t.anchorNode:t.startContainer,u,f,d,m,g;if(c)if(Zu(t)){if(ao&&t.rangeCount>1){d=t.focusNode;var v=t.getRangeAt(0),w=t.getRangeAt(t.rangeCount-1);if(d instanceof HTMLTableRowElement&&v.startContainer instanceof HTMLTableRowElement&&w.startContainer instanceof HTMLTableRowElement){let R=function(S){return S.childElementCount>0?R(S.children[0]):S};var x=v.startContainer,C=w.startContainer,p=R(x.children[v.startOffset]),A=R(C.children[w.startOffset]);m=0,A.childNodes.length>0?u=A.childNodes[0]:u=A,p.childNodes.length>0?d=p.childNodes[0]:d=p,A instanceof HTMLElement?f=A.innerHTML.length:f=0}else v.startContainer===d?(u=w.endContainer,f=w.endOffset,m=v.startOffset):(u=v.startContainer,f=v.endOffset,m=w.startOffset)}else u=t.anchorNode,f=t.anchorOffset,d=t.focusNode,m=t.focusOffset;tm&&_b(u)||ao?g=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:g=t.isCollapsed}else u=t.startContainer,f=t.startOffset,d=t.endContainer,m=t.endOffset,g=t.collapsed;if(u==null||d==null||f==null||m==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));ao&&(n=d.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
80
|
+
|
|
81
|
+
`)&&m===d.textContent.length&&m--;var B=_e.toSlatePoint(e,[u,f],{exactMatch:a,suppressThrow:i});if(!B)return null;var k=Eh(u,d)||u===d&&m<f,N=g?B:_e.toSlatePoint(e,[d,m],{exactMatch:a,suppressThrow:i,searchDirection:k?"forward":"backward"});if(!N)return null;var F={anchor:B,focus:N};return Te.isExpanded(F)&&Te.isForward(F)&&On(d)&&P.void(e,{at:F.focus,mode:"highest"})&&(F=P.unhangRange(e,F,{voids:!0})),F}};function Wb(e,t){var{path:r,diff:n}=t;if(!P.hasPath(e,r))return!1;var a=rt.get(e,r);if(!gt.isText(a))return!1;if(n.start!==a.text.length||n.text.length===0)return a.text.slice(n.start,n.start+n.text.length)===n.text;var i=ue.next(r);if(!P.hasPath(e,i))return!1;var c=rt.get(e,i);return gt.isText(c)&&c.text.startsWith(n.text)}function um(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((a,i)=>a.slice(0,i.start)+i.text+a.slice(i.end),e)}function Ub(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 Gb(e,t,r){for(var n=Math.min(e.length,t.length,r),a=0;a<n;a++)if(e.charAt(e.length-a-1)!==t.charAt(t.length-a-1))return a;return n}function cm(e,t){var{start:r,end:n,text:a}=t,i=e.slice(r,n),c=Ub(i,a),u=Math.min(i.length-c,a.length-c),f=Gb(i,a,u),d={start:r+c,end:n-f,text:a.slice(c,a.length-f)};return d.start===d.end&&d.text.length===0?null:d}function Yb(e,t,r){var n=Math.min(t.start,r.start),a=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),i=um(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)-a),u=i.slice(n,c),f=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return cm(e,{start:n,end:f,text:u})}function Xb(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function Ju(e,t){var{path:r,offset:n}=t;if(!P.hasPath(e,r))return null;var a=rt.get(e,r);if(!gt.isText(a))return null;var i=P.above(e,{match:u=>yt.isElement(u)&&P.isBlock(e,u),at:r});if(!i)return null;for(;n>a.text.length;){var c=P.next(e,{at:r,match:gt.isText});if(!c||!ue.isDescendant(c[1],i[1]))return null;n-=a.text.length,a=c[0],r=c[1]}return{path:r,offset:n}}function Sh(e,t){var r=Ju(e,t.anchor);if(!r)return null;if(Te.isCollapsed(t))return{anchor:r,focus:r};var n=Ju(e,t.focus);return n?{anchor:r,focus:n}:null}function Qu(e,t,r){var n=yn.get(e),a=n==null?void 0:n.find(m=>{var{path:g}=m;return ue.equals(g,t.path)});if(!a||t.offset<=a.diff.start)return er.transform(t,r,{affinity:"backward"});var{diff:i}=a;if(t.offset<=i.start+i.text.length){var c={path:t.path,offset:i.start},u=er.transform(c,r,{affinity:"backward"});return u?{path:u.path,offset:u.offset+t.offset-i.start}:null}var f={path:t.path,offset:t.offset-i.text.length+i.end-i.start},d=er.transform(f,r,{affinity:"backward"});return d?r.type==="split_node"&&ue.equals(r.path,t.path)&&f.offset<r.position&&i.start<r.position?d:{path:d.path,offset:d.offset+i.text.length-i.end+i.start}:null}function Ah(e,t,r){var n=Qu(e,t.anchor,r);if(!n)return null;if(Te.isCollapsed(t))return{anchor:n,focus:n};var a=Qu(e,t.focus,r);return a?{anchor:n,focus:a}:null}function Zb(e,t){var{path:r,diff:n,id:a}=e;switch(t.type){case"insert_text":return!ue.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:a,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:a,path:r};case"remove_text":return!ue.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:a,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:a,path:r};case"split_node":return!ue.equals(t.path,r)||t.position>=n.end?{diff:n,id:a,path:ue.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:a,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:a,path:ue.transform(r,t,{affinity:"forward"})};case"merge_node":return ue.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:a,path:ue.transform(r,t)}:{diff:n,id:a,path:ue.transform(r,t)}}var i=ue.transform(r,t);return i?{diff:n,path:i,id:a}:null}function Bh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ji(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bh(Object(r),!0).forEach(function(n){Mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Jb=25,Qb=200,ey=function(){},ty=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function ry(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,a=!1,i=null,c=null,u=null,f=0,d=!1,m=()=>{var X=Ca.get(t);if(Ca.delete(t),X){var{selection:Z}=t,L=Sh(t,X);L&&(!Z||!Te.equals(L,Z))&&Ve.select(t,L)}},g=()=>{var X=wa.get(t);if(wa.delete(t),!!X){if(X.at){var Z=er.isPoint(X.at)?Ju(t,X.at):Sh(t,X.at);if(!Z)return;var L=P.range(t,Z);(!t.selection||!Te.equals(t.selection,L))&&Ve.select(t,Z)}X.run()}},v=()=>{if(c&&(clearTimeout(c),c=null),u&&(clearTimeout(u),u=null),!N()&&!k()){m();return}a||(a=!0,setTimeout(()=>a=!1)),k()&&(a="action");var X=t.selection&&P.rangeRef(t,t.selection,{affinity:"forward"});ua.set(t,t.marks),ey("flush",wa.get(t),yn.get(t));for(var Z=N(),L;L=(K=yn.get(t))===null||K===void 0?void 0:K[0];){var K,W,G=Kn.get(t);G!==void 0&&(Kn.delete(t),t.marks=G),G&&d===!1&&(d=null);var ne=Xb(L);(!t.selection||!Te.equals(t.selection,ne))&&Ve.select(t,ne),L.diff.text?P.insertText(t,L.diff.text):P.deleteFragment(t),yn.set(t,(W=yn.get(t))===null||W===void 0?void 0:W.filter(me=>{var{id:Ce}=me;return Ce!==L.id})),Wb(t,L)||(Z=!1,wa.delete(t),ua.delete(t),a="action",Ca.delete(t),r.cancel(),n.cancel(),X==null||X.unref())}var q=X==null?void 0:X.unref();if(q&&!Ca.get(t)&&(!t.selection||!Te.equals(q,t.selection))&&Ve.select(t,q),k()){g();return}Z&&r(),r.flush(),n.flush(),m();var J=ua.get(t);ua.delete(t),J!==void 0&&(t.marks=J,t.onChange())},w=X=>{i&&clearTimeout(i),i=setTimeout(()=>{Ia.set(t,!1),v()},Jb)},x=X=>{Ia.set(t,!0),i&&(clearTimeout(i),i=null)},C=function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Z=Gu.get(t);if(Z){if(N()||X){Z.style.display="none";return}Z.style.removeProperty("display")}},p=(X,Z)=>{var L,K=(L=yn.get(t))!==null&&L!==void 0?L:[];yn.set(t,K);var W=rt.leaf(t,X),G=K.findIndex(J=>ue.equals(J.path,X));if(G<0){var ne=cm(W.text,Z);ne&&K.push({path:X,diff:Z,id:f++}),C();return}var q=Yb(W.text,K[G].diff,Z);if(!q){K.splice(G,1),C();return}K[G]=ji(ji({},K[G]),{},{diff:q})},A=function(X){var{at:Z}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};d=!1,Ca.delete(t),r.cancel(),n.cancel(),k()&&v(),wa.set(t,{at:Z,run:X}),u=setTimeout(v)},B=X=>{var Z;if(c&&(clearTimeout(c),c=null),!co.get(t)){var{inputType:L}=X,K=null,W=X.dataTransfer||X.data||void 0;d!==!1&&L!=="insertText"&&L!=="insertCompositionText"&&(d=!1);var[G]=X.getTargetRanges();G&&(K=_e.toSlateRange(t,G,{exactMatch:!1,suppressThrow:!0}));var ne=_e.getWindow(t),q=ne.getSelection();if(!K&&q&&(G=q,K=_e.toSlateRange(t,q,{exactMatch:!1,suppressThrow:!0})),K=(Z=K)!==null&&Z!==void 0?Z:t.selection,!!K){var J=!0;if(L.startsWith("delete")){if(Te.isExpanded(K)){var[me,Ce]=Te.edges(K),we=rt.leaf(t,me.path);if(we.text.length===me.offset&&Ce.offset===0){var Fe=P.next(t,{at:me.path,match:gt.isText});Fe&&ue.equals(Fe[1],Ce.path)&&(K={anchor:Ce,focus:Ce})}}var Ie=L.endsWith("Backward")?"backward":"forward",[Q,le]=Te.edges(K),[ce,de]=P.leaf(t,Q.path),Ee={text:"",start:Q.offset,end:le.offset},Ne=yn.get(t),ge=Ne==null?void 0:Ne.find(At=>ue.equals(At.path,de)),De=ge?[ge.diff,Ee]:[Ee],ke=um(ce.text,...De);if(ke.length===0&&(J=!1),Te.isExpanded(K)){if(J&&ue.equals(K.anchor.path,K.focus.path)){var Be={path:K.anchor.path,offset:Q.offset},xe=P.range(t,Be,Be);return S(xe),p(K.anchor.path,{text:"",end:le.offset,start:Q.offset})}return A(()=>P.deleteFragment(t,{direction:Ie}),{at:K})}}switch(L){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return A(()=>P.deleteFragment(t),{at:K});case"deleteContent":case"deleteContentForward":{var{anchor:Se}=K;if(J&&Te.isCollapsed(K)){var ze=rt.leaf(t,Se.path);if(Se.offset<ze.text.length)return p(Se.path,{text:"",start:Se.offset,end:Se.offset+1})}return A(()=>P.deleteForward(t),{at:K})}case"deleteContentBackward":{var dt,{anchor:at}=K,$e=Zu(G)?G.isCollapsed:!!((dt=G)!==null&&dt!==void 0&&dt.collapsed);return J&&$e&&Te.isCollapsed(K)&&at.offset>0?p(at.path,{text:"",start:at.offset-1,end:at.offset}):A(()=>P.deleteBackward(t),{at:K})}case"deleteEntireSoftLine":return A(()=>{P.deleteBackward(t,{unit:"line"}),P.deleteForward(t,{unit:"line"})},{at:K});case"deleteHardLineBackward":return A(()=>P.deleteBackward(t,{unit:"block"}),{at:K});case"deleteSoftLineBackward":return A(()=>P.deleteBackward(t,{unit:"line"}),{at:K});case"deleteHardLineForward":return A(()=>P.deleteForward(t,{unit:"block"}),{at:K});case"deleteSoftLineForward":return A(()=>P.deleteForward(t,{unit:"line"}),{at:K});case"deleteWordBackward":return A(()=>P.deleteBackward(t,{unit:"word"}),{at:K});case"deleteWordForward":return A(()=>P.deleteForward(t,{unit:"word"}),{at:K});case"insertLineBreak":return A(()=>P.insertSoftBreak(t),{at:K});case"insertParagraph":return A(()=>P.insertBreak(t),{at:K});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(ty(W))return A(()=>_e.insertData(t,W),{at:K});var Le=W??"";if(Kn.get(t)&&(Le=Le.replace("\uFEFF","")),L==="insertText"&&/.*\n.*\n$/.test(Le)&&(Le=Le.slice(0,-1)),Le.includes(`
|
|
82
|
+
`))return A(()=>{var At=Le.split(`
|
|
83
|
+
`);At.forEach((Tt,Mt)=>{Tt&&P.insertText(t,Tt),Mt!==At.length-1&&P.insertSoftBreak(t)})},{at:K});if(ue.equals(K.anchor.path,K.focus.path)){var[Ge,ht]=Te.edges(K),et={start:Ge.offset,end:ht.offset,text:Le};if(Le&&d&&L==="insertCompositionText"){var nt=d.start+d.text.search(/\S|$/),Ot=et.start+et.text.search(/\S|$/);Ot===nt+1&&et.end===d.start+d.text.length?(et.start-=1,d=null,V()):d=!1}else L==="insertText"?d===null?d=et:d&&Te.isCollapsed(K)&&d.end+d.text.length===Ge.offset?d=ji(ji({},d),{},{text:d.text+Le}):d=!1:d=!1;if(J){p(Ge.path,et);return}}return A(()=>P.insertText(t,Le),{at:K})}}}}},k=()=>!!wa.get(t),N=()=>{var X;return!!((X=yn.get(t))!==null&&X!==void 0&&X.length)},F=()=>k()||N(),R=()=>a,S=X=>{Ca.set(t,X),c&&(clearTimeout(c),c=null);var{selection:Z}=t;if(X){var L=!Z||!ue.equals(Z.anchor.path,X.anchor.path),K=!Z||!ue.equals(Z.anchor.path.slice(0,-1),X.anchor.path.slice(0,-1));(L&&d||K)&&(d=!1),(L||N())&&(c=setTimeout(v,Qb))}},z=()=>{(k()||!N())&&v()},O=X=>{N()||(C(!0),setTimeout(C))},V=()=>{k()||(u=setTimeout(v))},I=X=>{if(!(N()||k())&&X.some(L=>Y0(t,L,X))){var Z;(Z=nm.get(t))===null||Z===void 0||Z()}};return{flush:v,scheduleFlush:V,hasPendingDiffs:N,hasPendingAction:k,hasPendingChanges:F,isFlushing:R,handleUserSelect:S,handleCompositionEnd:w,handleCompositionStart:x,handleDOMBeforeInput:B,handleKeyDown:O,handleDomMutations:I,handleInput:z}}function ny(){var e=Zt(!1);return sr(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var li=Xi?f4:sr;function ay(e,t,r){var[n]=$t(()=>new MutationObserver(t));li(()=>{n.takeRecords()}),sr(()=>{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 oy=["node"];function Fh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function iy(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fh(Object(r),!0).forEach(function(n){Mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var sy={subtree:!0,childList:!0,characterData:!0},ly=cn?e=>{var{node:t}=e,r=mo(e,oy);if(!cn)return null;var n=Oa(),a=ny(),[i]=$t(()=>ry(iy({editor:n},r)));return ay(t,i.handleDomMutations,sy),U0.set(n,i.scheduleFlush),a&&i.flush(),i}:()=>null,uy=["anchor","focus"],cy=["anchor","focus"],dy=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),dm=(e,t)=>{var r=mo(e,uy),n=mo(t,cy);return e[go]===t[go]&&dy(r,n)},fy=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],a=t[r];if(!Te.equals(n,a)||!dm(n,a))return!1}return!0},hy=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],a=t[r];if(n.anchor.offset!==a.anchor.offset||n.focus.offset!==a.focus.offset||!dm(n,a))return!1}return!0};function Nh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function py(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){Mn(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 my=e=>{var{isLast:t,leaf:r,parent:n,text:a}=e,i=Oa(),c=_e.findPath(i,a),u=ue.parent(c),f=!!r[am];return i.isVoid(n)?We.createElement(Jl,{length:rt.string(n).length}):r.text===""&&n.children[n.children.length-1]===a&&!i.isInline(n)&&P.string(i,u)===""?We.createElement(Jl,{isLineBreak:!0,isMarkPlaceholder:f}):r.text===""?We.createElement(Jl,{isMarkPlaceholder:f}):t&&r.text.slice(-1)===`
|
|
84
|
+
`?We.createElement(Th,{isTrailing:!0,text:r.text}):We.createElement(Th,{text:r.text})},Th=e=>{var{text:t,isTrailing:r=!1}=e,n=Zt(null),a=()=>"".concat(t??"").concat(r?`
|
|
85
|
+
`:""),[i]=$t(a);return li(()=>{var c=a();n.current&&n.current.textContent!==c&&(n.current.textContent=c)}),We.createElement(gy,{ref:n},i)},gy=m4(fi((e,t)=>We.createElement("span",{"data-slate-string":!0,ref:t},e.children))),Jl=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,a={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(a["data-slate-mark-placeholder"]=!0),We.createElement("span",py({},a),!(cn||em)||!r?"\uFEFF":null,r?We.createElement("br",null):null)};function Oh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fm(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){Mn(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 vy=cn?300:0;function by(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function Mh(e){e.current&&(clearTimeout(e.current),e.current=null)}var yy=e=>{var{leaf:t,isLast:r,text:n,parent:a,renderPlaceholder:i,renderLeaf:c=B=>We.createElement(wy,fm({},B))}=e,u=Oa(),f=Zt(null),d=Zt(null),[m,g]=$t(!1),v=Zt(null),w=zt(B=>{if(by(f,B==null),B==null){var k;Gu.delete(u),(k=t.onPlaceholderResize)===null||k===void 0||k.call(t,null)}else{if(Gu.set(u,B),!f.current){var N=window.ResizeObserver||Db;f.current=new N(()=>{var F;(F=t.onPlaceholderResize)===null||F===void 0||F.call(t,B)})}f.current.observe(B),d.current=B}},[d,t,u]),x=We.createElement(my,{isLast:r,leaf:t,parent:a,text:n}),C=!!t[go];if(sr(()=>(C?v.current||(v.current=setTimeout(()=>{g(!0),v.current=null},vy)):(Mh(v),g(!1)),()=>Mh(v)),[C,g]),C&&m){var p={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:$a?"inherit":void 0},contentEditable:!1,ref:w}};x=We.createElement(We.Fragment,null,i(p),x)}var A={"data-slate-leaf":!0};return c({attributes:A,children:x,leaf:t,text:n})},xy=We.memo(yy,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&>.equals(t.leaf,e.leaf)&&t.leaf[go]===e.leaf[go]),wy=e=>{var{attributes:t,children:r}=e;return We.createElement("span",fm({},t),r)},Cy=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:a,renderLeaf:i,text:c}=e,u=Oa(),f=Zt(null),d=gt.decorations(c,t),m=_e.findKey(u,c),g=[],v=0;v<d.length;v++){var w=d[v];g.push(We.createElement(xy,{isLast:r&&v===d.length-1,key:"".concat(m.id,"-").concat(v),renderPlaceholder:a,leaf:w,text:c,parent:n,renderLeaf:i}))}var x=zt(C=>{var p=Rs.get(u);C?(p==null||p.set(m,C),La.set(c,C),si.set(C,c)):(p==null||p.delete(m),La.delete(c),f.current&&si.delete(f.current)),f.current=C},[f,u,m,c]);return We.createElement("span",{"data-slate-node":"text",ref:x},g)},hm=We.memo(Cy,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&hy(t.decorations,e.decorations));function Rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function e0(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){Mn(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 Dy=e=>{var{decorations:t,element:r,renderElement:n=B=>We.createElement(Ey,e0({},B)),renderPlaceholder:a,renderLeaf:i,selection:c}=e,u=Oa(),f=By(),d=u.isInline(r),m=_e.findKey(u,r),g=zt(B=>{var k=Rs.get(u);B?(k==null||k.set(m,B),La.set(r,B),si.set(B,r)):(k==null||k.delete(m),La.delete(r))},[u,m,r]),v=mm({decorations:t,node:r,renderElement:n,renderPlaceholder:a,renderLeaf:i,selection:c}),w={"data-slate-node":"element",ref:g};if(d&&(w["data-slate-inline"]=!0),!d&&P.hasInlines(u,r)){var x=rt.string(r),C=K1(x);C==="rtl"&&(w.dir=C)}if(P.isVoid(u,r)){w["data-slate-void"]=!0,!f&&d&&(w.contentEditable=!1);var p=d?"span":"div",[[A]]=rt.texts(r);v=We.createElement(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},We.createElement(hm,{renderPlaceholder:a,decorations:[],isLast:!1,parent:r,text:A})),V0.set(A,0),W0.set(A,r)}return n({attributes:w,children:v,element:r})},ky=We.memo(Dy,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&fy(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Te.equals(e.selection,t.selection))),Ey=e=>{var{attributes:t,children:r,element:n}=e,a=Oa(),i=a.isInline(n)?"span":"div";return We.createElement(i,e0(e0({},t),{},{style:{position:"relative"}}),r)},pm=Ta(()=>[]),Sy=()=>Na(pm),Ay=Ta(!1),mm=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:a,renderLeaf:i,selection:c}=e,u=Sy(),f=Oa();co.set(f,!1);for(var d=_e.findPath(f,r),m=[],g=yt.isElement(r)&&!f.isInline(r)&&P.hasInlines(f,r),v=0;v<r.children.length;v++){var w=d.concat(v),x=r.children[v],C=_e.findKey(f,x),p=P.range(f,w),A=c&&Te.intersection(p,c),B=u([x,w]);for(var k of t){var N=Te.intersection(k,p);N&&B.push(N)}yt.isElement(x)?m.push(We.createElement(Ay.Provider,{key:"provider-".concat(C.id),value:!!A},We.createElement(ky,{decorations:B,element:x,key:C.id,renderElement:n,renderPlaceholder:a,renderLeaf:i,selection:A}))):m.push(We.createElement(hm,{decorations:B,key:C.id,isLast:g&&v===r.children.length-1,parent:r,renderPlaceholder:a,renderLeaf:i,text:x})),V0.set(x,v),W0.set(x,r)}return m},gm=Ta(!1),By=()=>Na(gm),vm=Ta(null),bm=()=>{var e=Na(vm);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function Fy(){var e=Oa(),t=Zt(!1),r=Zt(0),n=zt(()=>{if(!t.current){t.current=!0;var a=_e.getWindow(e);a.cancelAnimationFrame(r.current),r.current=a.requestAnimationFrame(()=>{t.current=!1})}},[e]);return sr(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var Ny=3,Ty={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"},Oy={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"},My={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Mr=e=>{var t=Ty[e],r=Oy[e],n=My[e],a=t&&Yl.isHotkey(t),i=r&&Yl.isHotkey(r),c=n&&Yl.isHotkey(n);return u=>!!(a&&a(u)||kh&&i&&i(u)||!kh&&c&&c(u))},Pr={isBold:Mr("bold"),isCompose:Mr("compose"),isMoveBackward:Mr("moveBackward"),isMoveForward:Mr("moveForward"),isDeleteBackward:Mr("deleteBackward"),isDeleteForward:Mr("deleteForward"),isDeleteLineBackward:Mr("deleteLineBackward"),isDeleteLineForward:Mr("deleteLineForward"),isDeleteWordBackward:Mr("deleteWordBackward"),isDeleteWordForward:Mr("deleteWordForward"),isExtendBackward:Mr("extendBackward"),isExtendForward:Mr("extendForward"),isExtendLineBackward:Mr("extendLineBackward"),isExtendLineForward:Mr("extendLineForward"),isItalic:Mr("italic"),isMoveLineBackward:Mr("moveLineBackward"),isMoveLineForward:Mr("moveLineForward"),isMoveWordBackward:Mr("moveWordBackward"),isMoveWordForward:Mr("moveWordForward"),isRedo:Mr("redo"),isSoftBreak:Mr("insertSoftBreak"),isSplitBlock:Mr("splitBlock"),isTransposeCharacter:Mr("transposeCharacter"),isUndo:Mr("undo")},Ry=(e,t)=>{var r=[],n=()=>{r=[]},a=c=>{if(t.current){var u=c.filter(f=>Y0(e,f,c));r.push(...u)}};function i(){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:a,restoreDOM:i,clear:n}},$y={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class ym extends p4{constructor(){super(...arguments),Mn(this,"context",null),Mn(this,"manager",null),Mn(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,$y)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=Ry(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,a=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(a!=null&&a.length){var i;(i=this.manager)===null||i===void 0||i.registerMutations(a)}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}}Mn(ym,"contextType",q0);var Py=cn?ym:e=>{var{children:t}=e;return We.createElement(We.Fragment,null,t)},Iy=Ta(!1),_y=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],zy=["text"];function $h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$h(Object(r),!0).forEach(function(n){Mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var jy=e=>We.createElement(We.Fragment,null,mm(e)),Ql=fi((e,t)=>{var r=zt(Q=>We.createElement(Ly,Jn({},Q)),[]),{autoFocus:n,decorate:a=Hy,onDOMBeforeInput:i,placeholder:c,readOnly:u=!1,renderElement:f,renderLeaf:d,renderPlaceholder:m=r,scrollSelectionIntoView:g=Ky,style:v={},as:w="div",disableDefaultStyles:x=!1}=e,C=mo(e,_y),p=bm(),[A,B]=$t(!1),k=Zt(null),N=Zt([]),[F,R]=$t(),S=Zt(!1),{onUserInput:z,receivedUserInput:O}=Fy(),[,V]=h4(Q=>Q+1,0);nm.set(p,V),Yu.set(p,u);var I=xt(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);sr(()=>{k.current&&n&&k.current.focus()},[n]);var X=Zt(),Z=xt(()=>Q8(()=>{if(co.get(p)){Z();return}var Q=_e.toDOMNode(p,p),le=Q.getRootNode();if(!S.current&&$a&&le instanceof ShadowRoot){S.current=!0;var ce=Hb();ce?document.execCommand("indent"):Ve.deselect(p),S.current=!1;return}var de=X.current;if((cn||!_e.isComposing(p))&&(!I.isUpdatingSelection||de!=null&&de.isFlushing())&&!I.isDraggingInternally){var Ee=_e.findDocumentOrShadowRoot(p),{activeElement:Ne}=Ee,ge=_e.toDOMNode(p,p),De=Xo(Ee);if(Ne===ge?(I.latestElement=Ne,Ea.set(p,!0)):Ea.delete(p),!De)return Ve.deselect(p);var{anchorNode:ke,focusNode:Be}=De,xe=_e.hasEditableTarget(p,ke)||_e.isTargetInsideNonReadonlyVoid(p,ke),Se=_e.hasTarget(p,Be);if(xe&&Se){var ze=_e.toSlateRange(p,De,{exactMatch:!1,suppressThrow:!0});ze&&(!_e.isComposing(p)&&!(de!=null&&de.hasPendingChanges())&&!(de!=null&&de.isFlushing())?Ve.select(p,ze):de==null||de.handleUserSelect(ze))}u&&(!xe||!Se)&&Ve.deselect(p)}},100),[p,u,I]),L=xt(()=>X8(Z,0),[Z]);X.current=ly({node:k,onDOMSelectionChange:Z,scheduleOnDOMSelectionChange:L}),li(()=>{var Q,le,ce;k.current&&(ce=G0(k.current))?(rm.set(p,ce),Zi.set(p,k.current),La.set(p,k.current),si.set(k.current,p)):La.delete(p);var{selection:de}=p,Ee=_e.findDocumentOrShadowRoot(p),Ne=Xo(Ee);if(!(!Ne||!_e.isFocused(p)||(Q=X.current)!==null&&Q!==void 0&&Q.hasPendingAction())){var ge=xe=>{var Se=Ne.type!=="None";if(!(!de&&!Se)){var ze=Ne.focusNode,dt;if(ao&&Ne.rangeCount>1){var at=Ne.getRangeAt(0),$e=Ne.getRangeAt(Ne.rangeCount-1);at.startContainer===ze?dt=$e.endContainer:dt=at.startContainer}else dt=Ne.anchorNode;var Le=Zi.get(p),Ge=!1;if(Le.contains(dt)&&Le.contains(ze)&&(Ge=!0),Se&&Ge&&de&&!xe){var ht=_e.toSlateRange(p,Ne,{exactMatch:!0,suppressThrow:!0});if(ht&&Te.equals(ht,de)){var et;if(!I.hasMarkPlaceholder||(et=dt)!==null&&et!==void 0&&(et=et.parentElement)!==null&&et!==void 0&&et.hasAttribute("data-slate-mark-placeholder"))return}}if(de&&!_e.hasRange(p,de)){p.selection=_e.toSlateRange(p,Ne,{exactMatch:!1,suppressThrow:!0});return}I.isUpdatingSelection=!0;var nt=de&&_e.toDOMRange(p,de);return nt?(_e.isComposing(p)&&!cn?Ne.collapseToEnd():Te.isBackward(de)?Ne.setBaseAndExtent(nt.endContainer,nt.endOffset,nt.startContainer,nt.startOffset):Ne.setBaseAndExtent(nt.startContainer,nt.startOffset,nt.endContainer,nt.endOffset),g(p,nt)):Ne.removeAllRanges(),nt}};Ne.rangeCount<=1&&ge();var De=((le=X.current)===null||le===void 0?void 0:le.isFlushing())==="action";if(!cn||!De){setTimeout(()=>{I.isUpdatingSelection=!1});return}var ke=null,Be=requestAnimationFrame(()=>{if(De){var xe=Se=>{try{var ze=_e.toDOMNode(p,p);ze.focus(),ge(Se)}catch{}};xe(),ke=setTimeout(()=>{xe(!0),I.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(Be),ke&&clearTimeout(ke)}}});var K=zt(Q=>{var le=_e.toDOMNode(p,p),ce=le.getRootNode();if(S!=null&&S.current&&$a&&ce instanceof ShadowRoot){var de=Q.getTargetRanges(),Ee=de[0],Ne=new window.Range;Ne.setStart(Ee.startContainer,Ee.startOffset),Ne.setEnd(Ee.endContainer,Ee.endOffset);var ge=_e.toSlateRange(p,Ne,{exactMatch:!1,suppressThrow:!1});Ve.select(p,ge),Q.preventDefault(),Q.stopImmediatePropagation();return}if(z(),!u&&_e.hasEditableTarget(p,Q.target)&&!qy(Q,i)){var De;if(X.current)return X.current.handleDOMBeforeInput(Q);L.flush(),Z.flush();var{selection:ke}=p,{inputType:Be}=Q,xe=Q.dataTransfer||Q.data||void 0,Se=Be==="insertCompositionText"||Be==="deleteCompositionText";if(Se&&_e.isComposing(p))return;var ze=!1;if(Be==="insertText"&&ke&&Te.isCollapsed(ke)&&Q.data&&Q.data.length===1&&/[a-z ]/i.test(Q.data)&&ke.anchor.offset!==0&&(ze=!0,p.marks&&(ze=!1),!co.get(p))){var dt,at,{anchor:$e}=ke,[Le,Ge]=_e.toDOMPoint(p,$e),ht=(dt=Le.parentElement)===null||dt===void 0?void 0:dt.closest("a"),et=_e.getWindow(p);if(ze&&ht&&_e.hasDOMNode(p,ht)){var nt,Ot=et==null?void 0:et.document.createTreeWalker(ht,NodeFilter.SHOW_TEXT).lastChild();Ot===Le&&((nt=Ot.textContent)===null||nt===void 0?void 0:nt.length)===Ge&&(ze=!1)}if(ze&&Le.parentElement&&(et==null||(at=et.getComputedStyle(Le.parentElement))===null||at===void 0?void 0:at.whiteSpace)==="pre"){var At=P.above(p,{at:$e.path,match:Lt=>yt.isElement(Lt)&&P.isBlock(p,Lt)});At&&rt.string(At[0]).includes(" ")&&(ze=!1)}}if((!Be.startsWith("delete")||Be.startsWith("deleteBy"))&&!co.get(p)){var[Tt]=Q.getTargetRanges();if(Tt){var Mt=_e.toSlateRange(p,Tt,{exactMatch:!1,suppressThrow:!1});if(!ke||!Te.equals(ke,Mt)){ze=!1;var je=!Se&&p.selection&&P.rangeRef(p,p.selection);Ve.select(p,Mt),je&&Yo.set(p,je)}}}if(Se)return;if(ze||Q.preventDefault(),ke&&Te.isExpanded(ke)&&Be.startsWith("delete")){var he=Be.endsWith("Backward")?"backward":"forward";P.deleteFragment(p,{direction:he});return}switch(Be){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{P.deleteFragment(p);break}case"deleteContent":case"deleteContentForward":{P.deleteForward(p);break}case"deleteContentBackward":{P.deleteBackward(p);break}case"deleteEntireSoftLine":{P.deleteBackward(p,{unit:"line"}),P.deleteForward(p,{unit:"line"});break}case"deleteHardLineBackward":{P.deleteBackward(p,{unit:"block"});break}case"deleteSoftLineBackward":{P.deleteBackward(p,{unit:"line"});break}case"deleteHardLineForward":{P.deleteForward(p,{unit:"block"});break}case"deleteSoftLineForward":{P.deleteForward(p,{unit:"line"});break}case"deleteWordBackward":{P.deleteBackward(p,{unit:"word"});break}case"deleteWordForward":{P.deleteForward(p,{unit:"word"});break}case"insertLineBreak":P.insertSoftBreak(p);break;case"insertParagraph":{P.insertBreak(p);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{Be==="insertFromComposition"&&_e.isComposing(p)&&(B(!1),Ia.set(p,!1)),(xe==null?void 0:xe.constructor.name)==="DataTransfer"?_e.insertData(p,xe):typeof xe=="string"&&(ze?N.current.push(()=>P.insertText(p,xe)):P.insertText(p,xe));break}}var ut=(De=Yo.get(p))===null||De===void 0?void 0:De.unref();Yo.delete(p),ut&&(!p.selection||!Te.equals(p.selection,ut))&&Ve.select(p,ut)}},[p,Z,z,i,u,L]),W=zt(Q=>{Q==null?(Z.cancel(),L.cancel(),Zi.delete(p),La.delete(p),k.current&&va&&k.current.removeEventListener("beforeinput",K)):va&&Q.addEventListener("beforeinput",K),k.current=Q,typeof t=="function"?t(Q):t&&(t.current=Q)},[Z,L,p,K,t]);li(()=>{var Q=_e.getWindow(p);Q.document.addEventListener("selectionchange",L);var le=()=>{I.isDraggingInternally=!1};return Q.document.addEventListener("dragend",le),Q.document.addEventListener("drop",le),()=>{Q.document.removeEventListener("selectionchange",L),Q.document.removeEventListener("dragend",le),Q.document.removeEventListener("drop",le)}},[L,I]);var G=a([p,[]]),ne=c&&p.children.length===1&&Array.from(rt.texts(p)).length===1&&rt.string(p)===""&&!A,q=zt(Q=>{if(Q&&ne){var le;R((le=Q.getBoundingClientRect())===null||le===void 0?void 0:le.height)}else R(void 0)},[ne]);if(ne){var J=P.start(p,[]);G.push({[go]:!0,placeholder:c,onPlaceholderResize:q,anchor:J,focus:J})}var{marks:me}=p;if(I.hasMarkPlaceholder=!1,p.selection&&Te.isCollapsed(p.selection)&&me){var{anchor:Ce}=p.selection,we=rt.leaf(p,Ce.path),Fe=mo(we,zy);if(!gt.equals(we,me,{loose:!0})){I.hasMarkPlaceholder=!0;var Ie=Object.fromEntries(Object.keys(Fe).map(Q=>[Q,null]));G.push(Jn(Jn(Jn({[am]:!0},Ie),me),{},{anchor:Ce,focus:Ce}))}}return sr(()=>{setTimeout(()=>{var{selection:Q}=p;if(Q){var{anchor:le}=Q,ce=rt.leaf(p,le.path);if(me&&!gt.equals(ce,me,{loose:!0})){Kn.set(p,me);return}}Kn.delete(p)})}),We.createElement(gm.Provider,{value:u},We.createElement(Iy.Provider,{value:A},We.createElement(pm.Provider,{value:a},We.createElement(Py,{node:k,receivedUserInput:O},We.createElement(w,Jn(Jn({role:u?void 0:"textbox","aria-multiline":u?void 0:!0},C),{},{spellCheck:va||!Xi?C.spellCheck:!1,autoCorrect:va||!Xi?C.autoCorrect:"false",autoCapitalize:va||!Xi?C.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!u,zindex:-1,suppressContentEditableWarning:!0,ref:W,style:Jn(Jn({},x?{}:Jn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},F?{minHeight:F}:{})),v),onBeforeInput:zt(Q=>{if(!va&&!u&&!ln(Q,C.onBeforeInput)&&_e.hasSelectableTarget(p,Q.target)&&(Q.preventDefault(),!_e.isComposing(p))){var le=Q.data;P.insertText(p,le)}},[C.onBeforeInput,p,u]),onInput:zt(Q=>{if(!ln(Q,C.onInput)){if(X.current){X.current.handleInput();return}for(var le of N.current)le();if(N.current=[],!_e.isFocused(p)){var ce=Q.nativeEvent,de=p;if(ce.inputType==="historyUndo"&&typeof de.undo=="function"){de.undo();return}if(ce.inputType==="historyRedo"&&typeof de.redo=="function"){de.redo();return}}}},[C.onInput,p]),onBlur:zt(Q=>{if(!(u||I.isUpdatingSelection||!_e.hasSelectableTarget(p,Q.target)||ln(Q,C.onBlur))){var le=_e.findDocumentOrShadowRoot(p);if(I.latestElement!==le.activeElement){var{relatedTarget:ce}=Q,de=_e.toDOMNode(p,p);if(ce!==de&&!(On(ce)&&ce.hasAttribute("data-slate-spacer"))){if(ce!=null&&Fa(ce)&&_e.hasDOMNode(p,ce)){var Ee=_e.toSlateNode(p,ce);if(yt.isElement(Ee)&&!p.isVoid(Ee))return}if($a){var Ne=Xo(le);Ne==null||Ne.removeAllRanges()}Ea.delete(p)}}}},[u,I.isUpdatingSelection,I.latestElement,p,C.onBlur]),onClick:zt(Q=>{if(_e.hasTarget(p,Q.target)&&!ln(Q,C.onClick)&&Fa(Q.target)){var le=_e.toSlateNode(p,Q.target),ce=_e.findPath(p,le);if(!P.hasPath(p,ce)||rt.get(p,ce)!==le)return;if(Q.detail===Ny&&ce.length>=1){var de=ce;if(!(yt.isElement(le)&&P.isBlock(p,le))){var Ee,Ne=P.above(p,{match:ze=>yt.isElement(ze)&&P.isBlock(p,ze),at:ce});de=(Ee=Ne==null?void 0:Ne[1])!==null&&Ee!==void 0?Ee:ce.slice(0,1)}var ge=P.range(p,de);Ve.select(p,ge);return}if(u)return;var De=P.start(p,ce),ke=P.end(p,ce),Be=P.void(p,{at:De}),xe=P.void(p,{at:ke});if(Be&&xe&&ue.equals(Be[1],xe[1])){var Se=P.range(p,De);Ve.select(p,Se)}}},[p,C.onClick,u]),onCompositionEnd:zt(Q=>{if(_e.hasSelectableTarget(p,Q.target)){var le;if(_e.isComposing(p)&&Promise.resolve().then(()=>{B(!1),Ia.set(p,!1)}),(le=X.current)===null||le===void 0||le.handleCompositionEnd(Q),ln(Q,C.onCompositionEnd)||cn)return;if(!$a&&!Tb&&!em&&!Mb&&!Ob&&Q.data){var ce=Kn.get(p);Kn.delete(p),ce!==void 0&&(ua.set(p,p.marks),p.marks=ce),P.insertText(p,Q.data);var de=ua.get(p);ua.delete(p),de!==void 0&&(p.marks=de)}}},[C.onCompositionEnd,p]),onCompositionUpdate:zt(Q=>{_e.hasSelectableTarget(p,Q.target)&&!ln(Q,C.onCompositionUpdate)&&(_e.isComposing(p)||(B(!0),Ia.set(p,!0)))},[C.onCompositionUpdate,p]),onCompositionStart:zt(Q=>{if(_e.hasSelectableTarget(p,Q.target)){var le;if((le=X.current)===null||le===void 0||le.handleCompositionStart(Q),ln(Q,C.onCompositionStart)||cn)return;B(!0);var{selection:ce}=p;if(ce&&Te.isExpanded(ce)){P.deleteFragment(p);return}}},[C.onCompositionStart,p]),onCopy:zt(Q=>{_e.hasSelectableTarget(p,Q.target)&&!ln(Q,C.onCopy)&&!Ph(Q)&&(Q.preventDefault(),_e.setFragmentData(p,Q.clipboardData,"copy"))},[C.onCopy,p]),onCut:zt(Q=>{if(!u&&_e.hasSelectableTarget(p,Q.target)&&!ln(Q,C.onCut)&&!Ph(Q)){Q.preventDefault(),_e.setFragmentData(p,Q.clipboardData,"cut");var{selection:le}=p;if(le)if(Te.isExpanded(le))P.deleteFragment(p);else{var ce=rt.parent(p,le.anchor.path);P.isVoid(p,ce)&&Ve.delete(p)}}},[u,p,C.onCut]),onDragOver:zt(Q=>{if(_e.hasTarget(p,Q.target)&&!ln(Q,C.onDragOver)){var le=_e.toSlateNode(p,Q.target);yt.isElement(le)&&P.isVoid(p,le)&&Q.preventDefault()}},[C.onDragOver,p]),onDragStart:zt(Q=>{if(!u&&_e.hasTarget(p,Q.target)&&!ln(Q,C.onDragStart)){var le=_e.toSlateNode(p,Q.target),ce=_e.findPath(p,le),de=yt.isElement(le)&&P.isVoid(p,le)||P.void(p,{at:ce,voids:!0});if(de){var Ee=P.range(p,ce);Ve.select(p,Ee)}I.isDraggingInternally=!0,_e.setFragmentData(p,Q.dataTransfer,"drag")}},[u,p,C.onDragStart,I]),onDrop:zt(Q=>{if(!u&&_e.hasTarget(p,Q.target)&&!ln(Q,C.onDrop)){Q.preventDefault();var le=p.selection,ce=_e.findEventRange(p,Q),de=Q.dataTransfer;Ve.select(p,ce),I.isDraggingInternally&&le&&!Te.equals(le,ce)&&!P.void(p,{at:ce,voids:!0})&&Ve.delete(p,{at:le}),_e.insertData(p,de),_e.isFocused(p)||_e.focus(p)}},[u,p,C.onDrop,I]),onDragEnd:zt(Q=>{!u&&I.isDraggingInternally&&C.onDragEnd&&_e.hasTarget(p,Q.target)&&C.onDragEnd(Q)},[u,I,C,p]),onFocus:zt(Q=>{if(!u&&!I.isUpdatingSelection&&_e.hasEditableTarget(p,Q.target)&&!ln(Q,C.onFocus)){var le=_e.toDOMNode(p,p),ce=_e.findDocumentOrShadowRoot(p);if(I.latestElement=ce.activeElement,ao&&Q.target!==le){le.focus();return}Ea.set(p,!0)}},[u,I,p,C.onFocus]),onKeyDown:zt(Q=>{if(!u&&_e.hasEditableTarget(p,Q.target)){var le;(le=X.current)===null||le===void 0||le.handleKeyDown(Q);var{nativeEvent:ce}=Q;if(_e.isComposing(p)&&ce.isComposing===!1&&(Ia.set(p,!1),B(!1)),ln(Q,C.onKeyDown)||_e.isComposing(p))return;var{selection:de}=p,Ee=p.children[de!==null?de.focus.path[0]:0],Ne=K1(rt.string(Ee))==="rtl";if(Pr.isRedo(ce)){Q.preventDefault();var ge=p;typeof ge.redo=="function"&&ge.redo();return}if(Pr.isUndo(ce)){Q.preventDefault();var De=p;typeof De.undo=="function"&&De.undo();return}if(Pr.isMoveLineBackward(ce)){Q.preventDefault(),Ve.move(p,{unit:"line",reverse:!0});return}if(Pr.isMoveLineForward(ce)){Q.preventDefault(),Ve.move(p,{unit:"line"});return}if(Pr.isExtendLineBackward(ce)){Q.preventDefault(),Ve.move(p,{unit:"line",edge:"focus",reverse:!0});return}if(Pr.isExtendLineForward(ce)){Q.preventDefault(),Ve.move(p,{unit:"line",edge:"focus"});return}if(Pr.isMoveBackward(ce)){Q.preventDefault(),de&&Te.isCollapsed(de)?Ve.move(p,{reverse:!Ne}):Ve.collapse(p,{edge:Ne?"end":"start"});return}if(Pr.isMoveForward(ce)){Q.preventDefault(),de&&Te.isCollapsed(de)?Ve.move(p,{reverse:Ne}):Ve.collapse(p,{edge:Ne?"start":"end"});return}if(Pr.isMoveWordBackward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)&&Ve.collapse(p,{edge:"focus"}),Ve.move(p,{unit:"word",reverse:!Ne});return}if(Pr.isMoveWordForward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)&&Ve.collapse(p,{edge:"focus"}),Ve.move(p,{unit:"word",reverse:Ne});return}if(va){if((tm||$a)&&de&&(Pr.isDeleteBackward(ce)||Pr.isDeleteForward(ce))&&Te.isCollapsed(de)){var ke=rt.parent(p,de.anchor.path);if(yt.isElement(ke)&&P.isVoid(p,ke)&&(P.isInline(p,ke)||P.isBlock(p,ke))){Q.preventDefault(),P.deleteBackward(p,{unit:"block"});return}}}else{if(Pr.isBold(ce)||Pr.isItalic(ce)||Pr.isTransposeCharacter(ce)){Q.preventDefault();return}if(Pr.isSoftBreak(ce)){Q.preventDefault(),P.insertSoftBreak(p);return}if(Pr.isSplitBlock(ce)){Q.preventDefault(),P.insertBreak(p);return}if(Pr.isDeleteBackward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)?P.deleteFragment(p,{direction:"backward"}):P.deleteBackward(p);return}if(Pr.isDeleteForward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)?P.deleteFragment(p,{direction:"forward"}):P.deleteForward(p);return}if(Pr.isDeleteLineBackward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)?P.deleteFragment(p,{direction:"backward"}):P.deleteBackward(p,{unit:"line"});return}if(Pr.isDeleteLineForward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)?P.deleteFragment(p,{direction:"forward"}):P.deleteForward(p,{unit:"line"});return}if(Pr.isDeleteWordBackward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)?P.deleteFragment(p,{direction:"backward"}):P.deleteBackward(p,{unit:"word"});return}if(Pr.isDeleteWordForward(ce)){Q.preventDefault(),de&&Te.isExpanded(de)?P.deleteFragment(p,{direction:"forward"}):P.deleteForward(p,{unit:"word"});return}}}},[u,p,C.onKeyDown]),onPaste:zt(Q=>{!u&&_e.hasEditableTarget(p,Q.target)&&!ln(Q,C.onPaste)&&(!va||Pb(Q.nativeEvent)||$a)&&(Q.preventDefault(),_e.insertData(p,Q.clipboardData))},[u,p,C.onPaste])}),We.createElement(jy,{decorations:G,node:p,renderElement:f,renderPlaceholder:m,renderLeaf:d,selection:p.selection}))))))}),Ly=e=>{var{attributes:t,children:r}=e;return We.createElement("span",Jn({},t),r,cn&&We.createElement("br",null))},Hy=()=>[],Ky=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Te.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),rb(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},ln=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},Ph=e=>Fa(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),qy=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},Vy=Ta(!1),Wy=Ta({});function Uy(e){var t=Zt([]).current,r=Zt({editor:e}).current,n=zt(i=>{r.editor=i,t.forEach(c=>c(i))},[t,r]),a=xt(()=>({getSlate:()=>r.editor,addEventListener:i=>(t.push(i),()=>{t.splice(t.indexOf(i),1)})}),[t,r]);return{selectorContext:a,onChange:n}}var Gy=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],eu=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:a,onValueChange:i,initialValue:c}=e,u=mo(e,Gy),[f,d]=We.useState(()=>{if(!rt.isNodeList(c))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Xr.stringify(c)));if(!P.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Xr.stringify(t)));return t.children=c,Object.assign(t,u),{v:0,editor:t}}),{selectorContext:m,onChange:g}=Uy(t),v=zt(C=>{var p;switch(n&&n(t.children),C==null||(p=C.operation)===null||p===void 0?void 0:p.type){case"set_selection":a==null||a(t.selection);break;default:i==null||i(t.children)}d(A=>({v:A.v+1,editor:t})),g(t)},[t,g,n,a,i]);sr(()=>(Xu.set(t,v),()=>{Xu.set(t,()=>{})}),[t,v]);var[w,x]=$t(_e.isFocused(t));return sr(()=>{x(_e.isFocused(t))},[t]),li(()=>{var C=()=>x(_e.isFocused(t));return Q1>=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)})},[]),We.createElement(Wy.Provider,{value:m},We.createElement(vm.Provider,{value:f},We.createElement(q0.Provider,{value:f.editor},We.createElement(Vy.Provider,{value:w},r))))},Ih=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},_h=(e,t,r)=>{var n=_e.toDOMRange(e,t).getBoundingClientRect(),a=_e.toDOMRange(e,r).getBoundingClientRect();return Ih(n,a)&&Ih(a,n)},Yy=(e,t)=>{var r=P.range(e,Te.end(t)),n=Array.from(P.positions(e,{at:t})),a=0,i=n.length,c=Math.floor(i/2);if(_h(e,P.range(e,n[a]),r))return P.range(e,n[a],r);if(n.length<2)return P.range(e,n[n.length-1],r);for(;c!==n.length&&c!==a;)_h(e,P.range(e,n[c]),r)?i=c:a=c,c=Math.floor((a+i)/2);return P.range(e,n[i],r)};function zh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function jh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zh(Object(r),!0).forEach(function(n){Mn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Xy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:a,deleteBackward:i,addMark:c,removeMark:u}=r;return Rs.set(r,new WeakMap),r.addMark=(f,d)=>{var m,g;(m=U0.get(r))===null||m===void 0||m(),!Kn.get(r)&&(g=yn.get(r))!==null&&g!==void 0&&g.length&&Kn.set(r,null),ua.delete(r),c(f,d)},r.removeMark=f=>{var d;!Kn.get(r)&&(d=yn.get(r))!==null&&d!==void 0&&d.length&&Kn.set(r,null),ua.delete(r),u(f)},r.deleteBackward=f=>{if(f!=="line")return i(f);if(r.selection&&Te.isCollapsed(r.selection)){var d=P.above(r,{match:w=>yt.isElement(w)&&P.isBlock(r,w),at:r.selection});if(d){var[,m]=d,g=P.range(r,m,r.selection.anchor),v=Yy(r,g);Te.isCollapsed(v)||Ve.delete(r,{at:v})}}},r.apply=f=>{var d=[],m=[],g=yn.get(r);if(g!=null&&g.length){var v=g.map(Z=>Zb(Z,f)).filter(Boolean);yn.set(r,v)}var w=Ca.get(r);w&&Ca.set(r,Ah(r,w,f));var x=wa.get(r);if(x!=null&&x.at){var C=er.isPoint(x==null?void 0:x.at)?Qu(r,x.at,f):Ah(r,x.at,f);wa.set(r,C?jh(jh({},x),{},{at:C}):null)}switch(f.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{d.push(...Ja(r,f.path));break}case"set_selection":{var p;(p=Yo.get(r))===null||p===void 0||p.unref(),Yo.delete(r);break}case"insert_node":case"remove_node":{d.push(...Ja(r,ue.parent(f.path)));break}case"merge_node":{var A=ue.previous(f.path);d.push(...Ja(r,A));break}case"move_node":{var B=ue.common(ue.parent(f.path),ue.parent(f.newPath));d.push(...Ja(r,B));var k;ue.isBefore(f.path,f.newPath)?(d.push(...Ja(r,ue.parent(f.path))),k=f.newPath):(d.push(...Ja(r,ue.parent(f.newPath))),k=f.path);var N=rt.get(e,ue.parent(k)),F=_e.findKey(r,N),R=P.pathRef(r,ue.parent(k));m.push([R,F]);break}}switch(n(f),f.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":co.set(r,!0)}for(var[S,z]of d){var[O]=P.node(r,S);ys.set(O,z)}for(var[V,I]of m){if(V.current){var[X]=P.node(r,V.current);ys.set(X,I)}V.unref()}},r.setFragmentData=f=>{var{selection:d}=r;if(d){var[m,g]=Te.edges(d),v=P.void(r,{at:m.path}),w=P.void(r,{at:g.path});if(!(Te.isCollapsed(d)&&!v)){var x=_e.toDOMRange(r,d),C=x.cloneContents(),p=C.childNodes[0];if(C.childNodes.forEach(O=>{O.textContent&&O.textContent.trim()!==""&&(p=O)}),w){var[A]=w,B=x.cloneRange(),k=_e.toDOMNode(r,A);B.setEndAfter(k),C=B.cloneContents()}if(v&&(p=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
|
+
`:""}),im(p)){var N=p.ownerDocument.createElement("span");N.style.whiteSpace="pre",N.appendChild(p),C.appendChild(N),p=N}var F=r.getFragment(),R=JSON.stringify(F),S=window.btoa(encodeURIComponent(R));p.setAttribute("data-slate-fragment",S),f.setData("application/".concat(t),S);var z=C.ownerDocument.createElement("div");return z.appendChild(C),z.setAttribute("hidden","true"),C.ownerDocument.body.appendChild(z),f.setData("text/html",z.innerHTML),f.setData("text/plain",lm(z)),C.ownerDocument.body.removeChild(z),f}}},r.insertData=f=>{r.insertFragmentData(f)||r.insertTextData(f)},r.insertFragmentData=f=>{var d=f.getData("application/".concat(t))||Lb(f);if(d){var m=decodeURIComponent(window.atob(d)),g=JSON.parse(m);return r.insertFragment(g),!0}return!1},r.insertTextData=f=>{var d=f.getData("text/plain");if(d){var m=d.split(/\r\n|\r|\n/),g=!1;for(var v of m)g&&Ve.splitNodes(r,{always:!0}),r.insertText(v),g=!0;return!0}return!1},r.onChange=f=>{var d=Q1<18?Du.unstable_batchedUpdates:m=>m();d(()=>{var m=Xu.get(r);m&&m(f),a(f)})},r},Ja=(e,t)=>{var r=[];for(var[n,a]of P.levels(e,{at:t})){var i=_e.findKey(e,n);r.push([a,i])}return r};function X0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ya=X0();function xm(e){Ya=e}var Zo={exec:()=>null};function br(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(a,i)=>{let c=typeof i=="string"?i:i.source;return c=c.replace(dn.caret,"$1"),r=r.replace(a,c),n},getRegex:()=>new RegExp(r,t)};return n}var dn={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")},Zy=/^(?:[ \t]*(?:\n|$))+/,Jy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Qy=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ex=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Z0=/(?:[*+-]|\d{1,9}[.)])/,wm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Cm=br(wm).replace(/bull/g,Z0).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(),tx=br(wm).replace(/bull/g,Z0).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(),J0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rx=/^[^\n]+/,Q0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,nx=br(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Q0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ax=br(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Z0).getRegex(),$s="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",ec=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ox=br("^ {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",ec).replace("tag",$s).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Dm=br(J0).replace("hr",yi).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",$s).getRegex(),ix=br(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Dm).getRegex(),tc={blockquote:ix,code:Jy,def:nx,fences:Qy,heading:ex,hr:yi,html:ox,lheading:Cm,list:ax,newline:Zy,paragraph:Dm,table:Zo,text:rx},Lh=br("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yi).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",$s).getRegex(),sx={...tc,lheading:tx,table:Lh,paragraph:br(J0).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lh).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",$s).getRegex()},lx={...tc,html:br(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ec).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:Zo,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:br(J0).replace("hr",yi).replace("heading",` *#{1,6} *[^
|
|
87
|
+
]`).replace("lheading",Cm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ux=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,km=/^( {2,}|\\)\n(?!\s*$)/,dx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ps=/[\p{P}\p{S}]/u,rc=/[\s\p{P}\p{S}]/u,Em=/[^\s\p{P}\p{S}]/u,fx=br(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rc).getRegex(),Sm=/(?!~)[\p{P}\p{S}]/u,hx=/(?!~)[\s\p{P}\p{S}]/u,px=/(?:[^\s\p{P}\p{S}]|~)/u,mx=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Am=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,gx=br(Am,"u").replace(/punct/g,Ps).getRegex(),vx=br(Am,"u").replace(/punct/g,Sm).getRegex(),Bm="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bx=br(Bm,"gu").replace(/notPunctSpace/g,Em).replace(/punctSpace/g,rc).replace(/punct/g,Ps).getRegex(),yx=br(Bm,"gu").replace(/notPunctSpace/g,px).replace(/punctSpace/g,hx).replace(/punct/g,Sm).getRegex(),xx=br("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Em).replace(/punctSpace/g,rc).replace(/punct/g,Ps).getRegex(),wx=br(/\\(punct)/,"gu").replace(/punct/g,Ps).getRegex(),Cx=br(/^<(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(),Dx=br(ec).replace("(?:-->|$)","-->").getRegex(),kx=br("^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",Dx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ex=br(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",xs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fm=br(/^!?\[(label)\]\[(ref)\]/).replace("label",xs).replace("ref",Q0).getRegex(),Nm=br(/^!?\[(ref)\](?:\[\])?/).replace("ref",Q0).getRegex(),Sx=br("reflink|nolink(?!\\()","g").replace("reflink",Fm).replace("nolink",Nm).getRegex(),nc={_backpedal:Zo,anyPunctuation:wx,autolink:Cx,blockSkip:mx,br:km,code:cx,del:Zo,emStrongLDelim:gx,emStrongRDelimAst:bx,emStrongRDelimUnd:xx,escape:ux,link:Ex,nolink:Nm,punctuation:fx,reflink:Fm,reflinkSearch:Sx,tag:kx,text:dx,url:Zo},Ax={...nc,link:br(/^!?\[(label)\]\((.*?)\)/).replace("label",xs).getRegex(),reflink:br(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xs).getRegex()},t0={...nc,emStrongRDelimAst:yx,emStrongLDelim:vx,url:br(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Bx={...t0,br:br(km).replace("{2,}","*").getRegex(),text:br(t0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Li={normal:tc,gfm:sx,pedantic:lx},Ro={normal:nc,gfm:t0,breaks:Bx,pedantic:Ax},Fx={"&":"&","<":"<",">":">",'"':""","'":"'"},Hh=e=>Fx[e];function Qn(e,t){if(t){if(dn.escapeTest.test(e))return e.replace(dn.escapeReplace,Hh)}else if(dn.escapeTestNoEncode.test(e))return e.replace(dn.escapeReplaceNoEncode,Hh);return e}function Kh(e){try{e=encodeURI(e).replace(dn.percentDecode,"%")}catch{return null}return e}function qh(e,t){var i;const r=e.replace(dn.findPipe,(c,u,f)=>{let d=!1,m=u;for(;--m>=0&&f[m]==="\\";)d=!d;return d?"|":" |"}),n=r.split(dn.splitPipe);let a=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(dn.slashPipe,"|");return n}function $o(e,t,r){const n=e.length;if(n===0)return"";let a=0;for(;a<n&&e.charAt(n-a-1)===t;)a++;return e.slice(0,n-a)}function Nx(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 Vh(e,t,r,n,a){const i=t.href,c=t.title||null,u=e[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;const f={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:c,text:u,tokens:n.inlineTokens(u)};return n.state.inLink=!1,f}function Tx(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const a=n[1];return t.split(`
|
|
88
|
+
`).map(i=>{const c=i.match(r.other.beginningSpace);if(c===null)return i;const[u]=c;return u.length>=a.length?i.slice(a.length):i}).join(`
|
|
89
|
+
`)}var ws=class{constructor(e){Cr(this,"options"),Cr(this,"rules"),Cr(this,"lexer"),this.options=e||Ya}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:$o(r,`
|
|
90
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=Tx(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=$o(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:$o(t[0],`
|
|
91
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=$o(t[0],`
|
|
92
|
+
`).split(`
|
|
93
|
+
`),n="",a="";const i=[];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
|
+
`),m=d.replace(this.rules.other.blockquoteSetextReplace,`
|
|
95
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
96
|
+
${d}`:d,a=a?`${a}
|
|
97
|
+
${m}`:m;const g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,i,!0),this.lexer.state.top=g,r.length===0)break;const v=i.at(-1);if((v==null?void 0:v.type)==="code")break;if((v==null?void 0:v.type)==="blockquote"){const w=v,x=w.raw+`
|
|
98
|
+
`+r.join(`
|
|
99
|
+
`),C=this.blockquote(x);i[i.length-1]=C,n=n.substring(0,n.length-w.raw.length)+C.raw,a=a.substring(0,a.length-w.text.length)+C.text;break}else if((v==null?void 0:v.type)==="list"){const w=v,x=w.raw+`
|
|
100
|
+
`+r.join(`
|
|
101
|
+
`),C=this.list(x);i[i.length-1]=C,n=n.substring(0,n.length-v.raw.length)+C.raw,a=a.substring(0,a.length-w.raw.length)+C.raw,r=x.substring(i.at(-1).raw.length).split(`
|
|
102
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:a}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,a={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 i=this.rules.other.listItemRegex(r);let c=!1;for(;e;){let f=!1,d="",m="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let g=t[2].split(`
|
|
103
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,A=>" ".repeat(3*A.length)),v=e.split(`
|
|
104
|
+
`,1)[0],w=!g.trim(),x=0;if(this.options.pedantic?(x=2,m=g.trimStart()):w?x=t[1].length+1:(x=t[2].search(this.rules.other.nonSpaceChar),x=x>4?1:x,m=g.slice(x),x+=t[1].length),w&&this.rules.other.blankLine.test(v)&&(d+=v+`
|
|
105
|
+
`,e=e.substring(v.length+1),f=!0),!f){const A=this.rules.other.nextBulletRegex(x),B=this.rules.other.hrRegex(x),k=this.rules.other.fencesBeginRegex(x),N=this.rules.other.headingBeginRegex(x),F=this.rules.other.htmlBeginRegex(x);for(;e;){const R=e.split(`
|
|
106
|
+
`,1)[0];let S;if(v=R,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),S=v):S=v.replace(this.rules.other.tabCharGlobal," "),k.test(v)||N.test(v)||F.test(v)||A.test(v)||B.test(v))break;if(S.search(this.rules.other.nonSpaceChar)>=x||!v.trim())m+=`
|
|
107
|
+
`+S.slice(x);else{if(w||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(g)||N.test(g)||B.test(g))break;m+=`
|
|
108
|
+
`+v}!w&&!v.trim()&&(w=!0),d+=R+`
|
|
109
|
+
`,e=e.substring(R.length+1),g=S.slice(x)}}a.loose||(c?a.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0));let C=null,p;this.options.gfm&&(C=this.rules.other.listIsTask.exec(m),C&&(p=C[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:d,task:!!C,checked:p,loose:!1,text:m,tokens:[]}),a.raw+=d}const u=a.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let f=0;f<a.items.length;f++)if(this.lexer.state.top=!1,a.items[f].tokens=this.lexer.blockTokens(a.items[f].text,[]),!a.loose){const d=a.items[f].tokens.filter(g=>g.type==="space"),m=d.length>0&&d.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=m}if(a.loose)for(let f=0;f<a.items.length;f++)a.items[f].loose=!0;return a}}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"):"",a=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:a}}}table(e){var c;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=qh(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
110
|
+
`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const u of n)this.rules.other.tableAlignRight.test(u)?i.align.push("right"):this.rules.other.tableAlignCenter.test(u)?i.align.push("center"):this.rules.other.tableAlignLeft.test(u)?i.align.push("left"):i.align.push(null);for(let u=0;u<r.length;u++)i.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:i.align[u]});for(const u of a)i.rows.push(qh(u,i.header.length).map((f,d)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:i.align[d]})));return i}}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 i=$o(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{const i=Nx(t[2],"()");if(i===-2)return;if(i>-1){const c=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let n=t[2],a="";if(this.options.pedantic){const i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],a=i[3])}else a=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)),Vh(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.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," "),a=t[n.toLowerCase()];if(!a){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Vh(r,a,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 a=[...n[0]].length-1;let i,c,u=a,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+a);(n=d.exec(t))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(c=[...i].length,n[3]||n[4]){u+=c;continue}else if((n[5]||n[6])&&a%3&&!((a+c)%3)){f+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+f);const m=[...n[0]][0].length,g=e.slice(0,a+n.index+m+c);if(Math.min(a,c)%2){const w=g.slice(1,-1);return{type:"em",raw:g,text:w,tokens:this.lexer.inlineTokens(w)}}const v=g.slice(2,-2);return{type:"strong",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}}}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),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&a&&(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,a;if(t[2]==="@")n=t[0],a="mailto:"+n;else{let i;do i=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(i!==t[0]);n=t[0],t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:n,href:a,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}}}},ca=class r0{constructor(t){Cr(this,"tokens"),Cr(this,"options"),Cr(this,"state"),Cr(this,"tokenizer"),Cr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ya,this.options.tokenizer=this.options.tokenizer||new ws,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:dn,block:Li.normal,inline:Ro.normal};this.options.pedantic?(r.block=Li.pedantic,r.inline=Ro.pedantic):this.options.gfm&&(r.block=Li.gfm,this.options.breaks?r.inline=Ro.breaks:r.inline=Ro.gfm),this.tokenizer.rules=r}static get rules(){return{block:Li,inline:Ro}}static lex(t,r){return new r0(r).lex(t)}static lexInline(t,r){return new r0(r).inlineTokens(t)}lex(t){t=t.replace(dn.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 a,i,c;for(this.options.pedantic&&(t=t.replace(dn.tabCharGlobal," ").replace(dn.spaceLine,""));t;){let u;if((i=(a=this.options.extensions)==null?void 0:a.block)!=null&&i.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 m=t.slice(1);let g;this.options.extensions.startBlock.forEach(v=>{g=v.call({lexer:this},m),typeof g=="number"&&g>=0&&(d=Math.min(d,g))}),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,a=null;if(this.tokens.links){const m=Object.keys(this.tokens.links);if(m.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)m.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,c="";for(;t;){i||(c=""),i=!1;let m;if((f=(u=this.options.extensions)==null?void 0:u.inline)!=null&&f.some(v=>(m=v.call({lexer:this},t,r))?(t=t.substring(m.raw.length),r.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);const v=r.at(-1);m.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=m.raw,v.text+=m.text):r.push(m);continue}if(m=this.tokenizer.emStrong(t,n,c)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.del(t)){t=t.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),r.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),r.push(m);continue}let g=t;if((d=this.options.extensions)!=null&&d.startInline){let v=1/0;const w=t.slice(1);let x;this.options.extensions.startInline.forEach(C=>{x=C.call({lexer:this},w),typeof x=="number"&&x>=0&&(v=Math.min(v,x))}),v<1/0&&v>=0&&(g=t.substring(0,v+1))}if(m=this.tokenizer.inlineText(g)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(c=m.raw.slice(-1)),i=!0;const v=r.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=m.raw,v.text+=m.text):r.push(m);continue}if(t){const v="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return r}},Cs=class{constructor(e){Cr(this,"options"),Cr(this,"parser"),this.options=e||Ya}space(e){return""}code({text:e,lang:t,escaped:r}){var i;const n=(i=(t||"").match(dn.notSpaceStart))==null?void 0:i[0],a=e.replace(dn.endingNewline,"")+`
|
|
122
|
+
`;return n?'<pre><code class="language-'+Qn(n)+'">'+(r?a:Qn(a,!0))+`</code></pre>
|
|
123
|
+
`:"<pre><code>"+(r?a:Qn(a,!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 a=t?"ol":"ul",i=t&&r!==1?' start="'+r+'"':"";return"<"+a+i+`>
|
|
129
|
+
`+n+"</"+a+`>
|
|
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+" "+Qn(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 a=0;a<e.header.length;a++)r+=this.tablecell(e.header[a]);t+=this.tablerow({text:r});let n="";for(let a=0;a<e.rows.length;a++){const i=e.rows[a];r="";for(let c=0;c<i.length;c++)r+=this.tablecell(i[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>${Qn(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),a=Kh(e);if(a===null)return n;e=a;let i='<a href="'+e+'"';return t&&(i+=' title="'+Qn(t)+'"'),i+=">"+n+"</a>",i}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const a=Kh(e);if(a===null)return Qn(r);e=a;let i=`<img src="${e}" alt="${r}"`;return t&&(i+=` title="${Qn(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Qn(e.text)}},ac=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""}},da=class n0{constructor(t){Cr(this,"options"),Cr(this,"renderer"),Cr(this,"textRenderer"),this.options=t||Ya,this.options.renderer=this.options.renderer||new Cs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ac}static parse(t,r){return new n0(r).parse(t)}static parseInline(t,r){return new n0(r).parseInline(t)}parse(t,r=!0){var a,i;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[u.type]){const d=u,m=this.options.extensions.renderers[d.type].call({parser:this},d);if(m!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){n+=m||"";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,m=this.renderer.text(d);for(;c+1<t.length&&t[c+1].type==="text";)d=t[++c],m+=`
|
|
140
|
+
`+this.renderer.text(d);r?n+=this.renderer.paragraph({type:"paragraph",raw:m,text:m,tokens:[{type:"text",raw:m,text:m,escaped:!0}]}):n+=m;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 a,i;let n="";for(let c=0;c<t.length;c++){const u=t[c];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[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}},tu,Ji=(tu=class{constructor(e){Cr(this,"options"),Cr(this,"block"),this.options=e||Ya}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ca.lex:ca.lexInline}provideParser(){return this.block?da.parse:da.parseInline}},Cr(tu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),tu),Ox=class{constructor(...e){Cr(this,"defaults",X0()),Cr(this,"options",this.setOptions),Cr(this,"parse",this.parseMarkdown(!0)),Cr(this,"parseInline",this.parseMarkdown(!1)),Cr(this,"Parser",da),Cr(this,"Renderer",Cs),Cr(this,"TextRenderer",ac),Cr(this,"Lexer",ca),Cr(this,"Tokenizer",ws),Cr(this,"Hooks",Ji),this.use(...e)}walkTokens(e,t){var n,a;let r=[];for(const i of e)switch(r=r.concat(t.call(this,i)),i.type){case"table":{const c=i;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=i;r=r.concat(this.walkTokens(c.items,t));break}default:{const c=i;(a=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&a[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(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const i=t.renderers[a.name];i?t.renderers[a.name]=function(...c){let u=a.renderer.apply(this,c);return u===!1&&(u=i.apply(this,c)),u}:t.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const i=t[a.level];i?i.unshift(a.tokenizer):t[a.level]=[a.tokenizer],a.start&&(a.level==="block"?t.startBlock?t.startBlock.push(a.start):t.startBlock=[a.start]:a.level==="inline"&&(t.startInline?t.startInline.push(a.start):t.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(t.childTokens[a.name]=a.childTokens)}),n.extensions=t),r.renderer){const a=this.defaults.renderer||new Cs(this.defaults);for(const i in r.renderer){if(!(i in a))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const c=i,u=r.renderer[c],f=a[c];a[c]=(...d)=>{let m=u.apply(a,d);return m===!1&&(m=f.apply(a,d)),m||""}}n.renderer=a}if(r.tokenizer){const a=this.defaults.tokenizer||new ws(this.defaults);for(const i in r.tokenizer){if(!(i in a))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const c=i,u=r.tokenizer[c],f=a[c];a[c]=(...d)=>{let m=u.apply(a,d);return m===!1&&(m=f.apply(a,d)),m}}n.tokenizer=a}if(r.hooks){const a=this.defaults.hooks||new Ji;for(const i in r.hooks){if(!(i in a))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;const c=i,u=r.hooks[c],f=a[c];Ji.passThroughHooks.has(i)?a[c]=d=>{if(this.defaults.async)return Promise.resolve(u.call(a,d)).then(g=>f.call(a,g));const m=u.call(a,d);return f.call(a,m)}:a[c]=(...d)=>{let m=u.apply(a,d);return m===!1&&(m=f.apply(a,d)),m}}n.hooks=a}if(r.walkTokens){const a=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(c){let u=[];return u.push(i.call(this,c)),a&&(u=u.concat(a.call(this,c))),u}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ca.lex(e,t??this.defaults)}parser(e,t){return da.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},a={...this.defaults,...n},i=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return i(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 i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));a.hooks&&(a.hooks.options=a,a.hooks.block=e);const c=a.hooks?a.hooks.provideLexer():e?ca.lex:ca.lexInline,u=a.hooks?a.hooks.provideParser():e?da.parse:da.parseInline;if(a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(t):t).then(f=>c(f,a)).then(f=>a.hooks?a.hooks.processAllTokens(f):f).then(f=>a.walkTokens?Promise.all(this.walkTokens(f,a.walkTokens)).then(()=>f):f).then(f=>u(f,a)).then(f=>a.hooks?a.hooks.postprocess(f):f).catch(i);try{a.hooks&&(t=a.hooks.preprocess(t));let f=c(t,a);a.hooks&&(f=a.hooks.processAllTokens(f)),a.walkTokens&&this.walkTokens(f,a.walkTokens);let d=u(f,a);return a.hooks&&(d=a.hooks.postprocess(d)),d}catch(f){return i(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>"+Qn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Ga=new Ox;function gr(e,t){return Ga.parse(e,t)}gr.options=gr.setOptions=function(e){return Ga.setOptions(e),gr.defaults=Ga.defaults,xm(gr.defaults),gr};gr.getDefaults=X0;gr.defaults=Ya;gr.use=function(...e){return Ga.use(...e),gr.defaults=Ga.defaults,xm(gr.defaults),gr};gr.walkTokens=function(e,t){return Ga.walkTokens(e,t)};gr.parseInline=Ga.parseInline;gr.Parser=da;gr.parser=da.parse;gr.Renderer=Cs;gr.TextRenderer=ac;gr.Lexer=ca;gr.lexer=ca.lex;gr.Tokenizer=ws;gr.Hooks=Ji;gr.parse=gr;gr.options;gr.setOptions;gr.use;gr.walkTokens;gr.parseInline;da.parse;ca.lex;var wn=function(){return wn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},wn.apply(this,arguments)};function ui(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n<a;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var Fr="-ms-",Jo="-moz-",vr="-webkit-",Tm="comm",Is="rule",oc="decl",Mx="@import",Om="@keyframes",Rx="@layer",Mm=Math.abs,ic=String.fromCharCode,a0=Object.assign;function $x(e,t){return Yr(e,0)^45?(((t<<2^Yr(e,0))<<2^Yr(e,1))<<2^Yr(e,2))<<2^Yr(e,3):0}function Rm(e){return e.trim()}function la(e,t){return(e=t.exec(e))?e[0]:e}function Qt(e,t,r){return e.replace(t,r)}function Qi(e,t,r){return e.indexOf(t,r)}function Yr(e,t){return e.charCodeAt(t)|0}function vo(e,t,r){return e.slice(t,r)}function ea(e){return e.length}function $m(e){return e.length}function Ho(e,t){return t.push(e),e}function Px(e,t){return e.map(t).join("")}function Wh(e,t){return e.filter(function(r){return!la(r,t)})}var _s=1,bo=1,Pm=0,Rn=0,qr=0,Ao="";function zs(e,t,r,n,a,i,c,u){return{value:e,root:t,parent:r,type:n,props:a,children:i,line:_s,column:bo,length:c,return:"",siblings:u}}function ya(e,t){return a0(zs("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Qa(e){for(;e.root;)e=ya(e.root,{children:[e]});Ho(e,e.siblings)}function Ix(){return qr}function _x(){return qr=Rn>0?Yr(Ao,--Rn):0,bo--,qr===10&&(bo=1,_s--),qr}function qn(){return qr=Rn<Pm?Yr(Ao,Rn++):0,bo++,qr===10&&(bo=1,_s++),qr}function Ha(){return Yr(Ao,Rn)}function es(){return Rn}function js(e,t){return vo(Ao,e,t)}function o0(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 zx(e){return _s=bo=1,Pm=ea(Ao=e),Rn=0,[]}function jx(e){return Ao="",e}function ru(e){return Rm(js(Rn-1,i0(e===91?e+2:e===40?e+1:e)))}function Lx(e){for(;(qr=Ha())&&qr<33;)qn();return o0(e)>2||o0(qr)>3?"":" "}function Hx(e,t){for(;--t&&qn()&&!(qr<48||qr>102||qr>57&&qr<65||qr>70&&qr<97););return js(e,es()+(t<6&&Ha()==32&&qn()==32))}function i0(e){for(;qn();)switch(qr){case e:return Rn;case 34:case 39:e!==34&&e!==39&&i0(qr);break;case 40:e===41&&i0(e);break;case 92:qn();break}return Rn}function Kx(e,t){for(;qn()&&e+qr!==57&&!(e+qr===84&&Ha()===47););return"/*"+js(t,Rn-1)+"*"+ic(e===47?e:qn())}function qx(e){for(;!o0(Ha());)qn();return js(e,Rn)}function Vx(e){return jx(ts("",null,null,null,[""],e=zx(e),0,[0],e))}function ts(e,t,r,n,a,i,c,u,f){for(var d=0,m=0,g=c,v=0,w=0,x=0,C=1,p=1,A=1,B=0,k="",N=a,F=i,R=n,S=k;p;)switch(x=B,B=qn()){case 40:if(x!=108&&Yr(S,g-1)==58){Qi(S+=Qt(ru(B),"&","&\f"),"&\f",Mm(d?u[d-1]:0))!=-1&&(A=-1);break}case 34:case 39:case 91:S+=ru(B);break;case 9:case 10:case 13:case 32:S+=Lx(x);break;case 92:S+=Hx(es()-1,7);continue;case 47:switch(Ha()){case 42:case 47:Ho(Wx(Kx(qn(),es()),t,r,f),f);break;default:S+="/"}break;case 123*C:u[d++]=ea(S)*A;case 125*C:case 59:case 0:switch(B){case 0:case 125:p=0;case 59+m:A==-1&&(S=Qt(S,/\f/g,"")),w>0&&ea(S)-g&&Ho(w>32?Gh(S+";",n,r,g-1,f):Gh(Qt(S," ","")+";",n,r,g-2,f),f);break;case 59:S+=";";default:if(Ho(R=Uh(S,t,r,d,m,a,u,k,N=[],F=[],g,i),i),B===123)if(m===0)ts(S,t,R,R,N,i,g,u,F);else switch(v===99&&Yr(S,3)===110?100:v){case 100:case 108:case 109:case 115:ts(e,R,R,n&&Ho(Uh(e,R,R,0,0,a,u,k,a,N=[],g,F),F),a,F,g,u,n?N:F);break;default:ts(S,R,R,R,[""],F,0,u,F)}}d=m=w=0,C=A=1,k=S="",g=c;break;case 58:g=1+ea(S),w=x;default:if(C<1){if(B==123)--C;else if(B==125&&C++==0&&_x()==125)continue}switch(S+=ic(B),B*C){case 38:A=m>0?1:(S+="\f",-1);break;case 44:u[d++]=(ea(S)-1)*A,A=1;break;case 64:Ha()===45&&(S+=ru(qn())),v=Ha(),m=g=ea(k=S+=qx(es())),B++;break;case 45:x===45&&ea(S)==2&&(C=0)}}return i}function Uh(e,t,r,n,a,i,c,u,f,d,m,g){for(var v=a-1,w=a===0?i:[""],x=$m(w),C=0,p=0,A=0;C<n;++C)for(var B=0,k=vo(e,v+1,v=Mm(p=c[C])),N=e;B<x;++B)(N=Rm(p>0?w[B]+" "+k:Qt(k,/&\f/g,w[B])))&&(f[A++]=N);return zs(e,t,r,a===0?Is:u,f,d,m,g)}function Wx(e,t,r,n){return zs(e,t,r,Tm,ic(Ix()),vo(e,2,-2),0,n)}function Gh(e,t,r,n,a){return zs(e,t,r,oc,vo(e,0,n),vo(e,n+1,-1),n,a)}function Im(e,t,r){switch($x(e,t)){case 5103:return vr+"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 vr+e+e;case 4789:return Jo+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return vr+e+Jo+e+Fr+e+e;case 5936:switch(Yr(e,t+11)){case 114:return vr+e+Fr+Qt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return vr+e+Fr+Qt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return vr+e+Fr+Qt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return vr+e+Fr+e+e;case 6165:return vr+e+Fr+"flex-"+e+e;case 5187:return vr+e+Qt(e,/(\w+).+(:[^]+)/,vr+"box-$1$2"+Fr+"flex-$1$2")+e;case 5443:return vr+e+Fr+"flex-item-"+Qt(e,/flex-|-self/g,"")+(la(e,/flex-|baseline/)?"":Fr+"grid-row-"+Qt(e,/flex-|-self/g,""))+e;case 4675:return vr+e+Fr+"flex-line-pack"+Qt(e,/align-content|flex-|-self/g,"")+e;case 5548:return vr+e+Fr+Qt(e,"shrink","negative")+e;case 5292:return vr+e+Fr+Qt(e,"basis","preferred-size")+e;case 6060:return vr+"box-"+Qt(e,"-grow","")+vr+e+Fr+Qt(e,"grow","positive")+e;case 4554:return vr+Qt(e,/([^-])(transform)/g,"$1"+vr+"$2")+e;case 6187:return Qt(Qt(Qt(e,/(zoom-|grab)/,vr+"$1"),/(image-set)/,vr+"$1"),e,"")+e;case 5495:case 3959:return Qt(e,/(image-set\([^]*)/,vr+"$1$`$1");case 4968:return Qt(Qt(e,/(.+:)(flex-)?(.*)/,vr+"box-pack:$3"+Fr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+vr+e+e;case 4200:if(!la(e,/flex-|baseline/))return Fr+"grid-column-align"+vo(e,t)+e;break;case 2592:case 3360:return Fr+Qt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,a){return t=a,la(n.props,/grid-\w+-end/)})?~Qi(e+(r=r[t].value),"span",0)?e:Fr+Qt(e,"-start","")+e+Fr+"grid-row-span:"+(~Qi(r,"span",0)?la(r,/\d+/):+la(r,/\d+/)-+la(e,/\d+/))+";":Fr+Qt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return la(n.props,/grid-\w+-start/)})?e:Fr+Qt(Qt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Qt(e,/(.+)-inline(.+)/,vr+"$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(ea(e)-1-t>6)switch(Yr(e,t+1)){case 109:if(Yr(e,t+4)!==45)break;case 102:return Qt(e,/(.+:)(.+)-([^]+)/,"$1"+vr+"$2-$3$1"+Jo+(Yr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Qi(e,"stretch",0)?Im(Qt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Qt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,a,i,c,u,f,d){return Fr+a+":"+i+d+(c?Fr+a+"-span:"+(u?f:+f-+i)+d:"")+e});case 4949:if(Yr(e,t+6)===121)return Qt(e,":",":"+vr)+e;break;case 6444:switch(Yr(e,Yr(e,14)===45?18:11)){case 120:return Qt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+vr+(Yr(e,14)===45?"inline-":"")+"box$3$1"+vr+"$2$3$1"+Fr+"$2box$3")+e;case 100:return Qt(e,":",":"+Fr)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Qt(e,"scroll-","scroll-snap-")+e}return e}function Ds(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function Ux(e,t,r,n){switch(e.type){case Rx:if(e.children.length)break;case Mx:case oc:return e.return=e.return||e.value;case Tm:return"";case Om:return e.return=e.value+"{"+Ds(e.children,n)+"}";case Is:if(!ea(e.value=e.props.join(",")))return""}return ea(r=Ds(e.children,n))?e.return=e.value+"{"+r+"}":""}function Gx(e){var t=$m(e);return function(r,n,a,i){for(var c="",u=0;u<t;u++)c+=e[u](r,n,a,i)||"";return c}}function Yx(e){return function(t){t.root||(t=t.return)&&e(t)}}function Xx(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case oc:e.return=Im(e.value,e.length,r);return;case Om:return Ds([ya(e,{value:Qt(e.value,"@","@"+vr)})],n);case Is:if(e.length)return Px(r=e.props,function(a){switch(la(a,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Qa(ya(e,{props:[Qt(a,/:(read-\w+)/,":"+Jo+"$1")]})),Qa(ya(e,{props:[a]})),a0(e,{props:Wh(r,n)});break;case"::placeholder":Qa(ya(e,{props:[Qt(a,/:(plac\w+)/,":"+vr+"input-$1")]})),Qa(ya(e,{props:[Qt(a,/:(plac\w+)/,":"+Jo+"$1")]})),Qa(ya(e,{props:[Qt(a,/:(plac\w+)/,Fr+"input-$1")]})),Qa(ya(e,{props:[a]})),a0(e,{props:Wh(r,n)});break}return""})}}var Zx={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},yo=typeof process<"u"&&Sn!==void 0&&(Sn.REACT_APP_SC_ATTR||Sn.SC_ATTR)||"data-styled",_m="active",zm="data-styled-version",Ls="6.1.19",sc=`/*!sc*/
|
|
142
|
+
`,ks=typeof window<"u"&&typeof document<"u",Jx=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&Sn!==void 0&&Sn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&Sn.REACT_APP_SC_DISABLE_SPEEDY!==""?Sn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&Sn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&Sn!==void 0&&Sn.SC_DISABLE_SPEEDY!==void 0&&Sn.SC_DISABLE_SPEEDY!==""&&Sn.SC_DISABLE_SPEEDY!=="false"&&Sn.SC_DISABLE_SPEEDY),Hs=Object.freeze([]),xo=Object.freeze({});function Qx(e,t,r){return r===void 0&&(r=xo),e.theme!==r.theme&&e.theme||t||r.theme}var jm=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"]),ew=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,tw=/(^-|-$)/g;function Yh(e){return e.replace(ew,"-").replace(tw,"")}var rw=/(a)(d)/gi,Hi=52,Xh=function(e){return String.fromCharCode(e+(e>25?39:97))};function s0(e){var t,r="";for(t=Math.abs(e);t>Hi;t=t/Hi|0)r=Xh(t%Hi)+r;return(Xh(t%Hi)+r).replace(rw,"$1-$2")}var nu,Lm=5381,oo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Hm=function(e){return oo(Lm,e)};function Km(e){return s0(Hm(e)>>>0)}function nw(e){return e.displayName||e.name||"Component"}function au(e){return typeof e=="string"&&!0}var qm=typeof Symbol=="function"&&Symbol.for,Vm=qm?Symbol.for("react.memo"):60115,aw=qm?Symbol.for("react.forward_ref"):60112,ow={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},iw={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Wm={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},sw=((nu={})[aw]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},nu[Vm]=Wm,nu);function Zh(e){return("type"in(t=e)&&t.type.$$typeof)===Vm?Wm:"$$typeof"in e?sw[e.$$typeof]:ow;var t}var lw=Object.defineProperty,uw=Object.getOwnPropertyNames,Jh=Object.getOwnPropertySymbols,cw=Object.getOwnPropertyDescriptor,dw=Object.getPrototypeOf,Qh=Object.prototype;function Um(e,t,r){if(typeof t!="string"){if(Qh){var n=dw(t);n&&n!==Qh&&Um(e,n,r)}var a=uw(t);Jh&&(a=a.concat(Jh(t)));for(var i=Zh(e),c=Zh(t),u=0;u<a.length;++u){var f=a[u];if(!(f in iw||r&&r[f]||c&&f in c||i&&f in i)){var d=cw(t,f);try{lw(e,f,d)}catch{}}}}return e}function wo(e){return typeof e=="function"}function lc(e){return typeof e=="object"&&"styledComponentId"in e}function _a(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function l0(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function ci(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function u0(e,t,r){if(r===void 0&&(r=!1),!r&&!ci(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=u0(e[n],t[n]);else if(ci(t))for(var n in t)e[n]=u0(e[n],t[n]);return e}function uc(e,t){Object.defineProperty(e,"toString",{value:t})}function xi(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 fw=(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,a=n.length,i=a;t>=i;)if((i<<=1)<0)throw xi(16,"".concat(t));this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var c=a;c<i;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),a=n+r;this.groupSizes[t]=0;for(var i=n;i<a;i++)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],a=this.indexOfGroup(t),i=a+n,c=a;c<i;c++)r+="".concat(this.tag.getRule(c)).concat(sc);return r},e})(),rs=new Map,Es=new Map,ns=1,Ki=function(e){if(rs.has(e))return rs.get(e);for(;Es.has(ns);)ns++;var t=ns++;return rs.set(e,t),Es.set(t,e),t},hw=function(e,t){ns=t+1,rs.set(e,t),Es.set(t,e)},pw="style[".concat(yo,"][").concat(zm,'="').concat(Ls,'"]'),mw=new RegExp("^".concat(yo,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),gw=function(e,t,r){for(var n,a=r.split(","),i=0,c=a.length;i<c;i++)(n=a[i])&&e.registerName(t,n)},vw=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(sc),a=[],i=0,c=n.length;i<c;i++){var u=n[i].trim();if(u){var f=u.match(mw);if(f){var d=0|parseInt(f[1],10),m=f[2];d!==0&&(hw(m,d),gw(e,m,f[3]),e.getTag().insertRules(d,a)),a.length=0}else a.push(u)}}},ep=function(e){for(var t=document.querySelectorAll(pw),r=0,n=t.length;r<n;r++){var a=t[r];a&&a.getAttribute(yo)!==_m&&(vw(e,a),a.parentNode&&a.parentNode.removeChild(a))}};function bw(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Gm=function(e){var t=document.head,r=e||t,n=document.createElement("style"),a=(function(u){var f=Array.from(u.querySelectorAll("style[".concat(yo,"]")));return f[f.length-1]})(r),i=a!==void 0?a.nextSibling:null;n.setAttribute(yo,_m),n.setAttribute(zm,Ls);var c=bw();return c&&n.setAttribute("nonce",c),r.insertBefore(n,i),n},yw=(function(){function e(t){this.element=Gm(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,a=0,i=n.length;a<i;a++){var c=n[a];if(c.ownerNode===r)return c}throw xi(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})(),xw=(function(){function e(t){this.element=Gm(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})(),ww=(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})(),tp=ks,Cw={isServer:!ks,useCSSOMInjection:!Jx},Ym=(function(){function e(t,r,n){t===void 0&&(t=xo),r===void 0&&(r={});var a=this;this.options=wn(wn({},Cw),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&ks&&tp&&(tp=!1,ep(this)),uc(this,function(){return(function(i){for(var c=i.getTag(),u=c.length,f="",d=function(g){var v=(function(A){return Es.get(A)})(g);if(v===void 0)return"continue";var w=i.names.get(v),x=c.getGroup(g);if(w===void 0||!w.size||x.length===0)return"continue";var C="".concat(yo,".g").concat(g,'[id="').concat(v,'"]'),p="";w!==void 0&&w.forEach(function(A){A.length>0&&(p+="".concat(A,","))}),f+="".concat(x).concat(C,'{content:"').concat(p,'"}').concat(sc)},m=0;m<u;m++)d(m);return f})(a)})}return e.registerId=function(t){return Ki(t)},e.prototype.rehydrate=function(){!this.server&&ks&&ep(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(wn(wn({},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,a=r.target;return r.isServer?new ww(a):n?new yw(a):new xw(a)})(this.options),new fw(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(Ki(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(Ki(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Ki(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),Dw=/&/g,kw=/^\s*\/\/.*$/gm;function Xm(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=Xm(r.children,t)),r})}function Ew(e){var t,r,n,a=xo,i=a.options,c=i===void 0?xo:i,u=a.plugins,f=u===void 0?Hs:u,d=function(v,w,x){return x.startsWith(r)&&x.endsWith(r)&&x.replaceAll(r,"").length>0?".".concat(t):v},m=f.slice();m.push(function(v){v.type===Is&&v.value.includes("&")&&(v.props[0]=v.props[0].replace(Dw,r).replace(n,d))}),c.prefix&&m.push(Xx),m.push(Ux);var g=function(v,w,x,C){w===void 0&&(w=""),x===void 0&&(x=""),C===void 0&&(C="&"),t=C,r=w,n=new RegExp("\\".concat(r,"\\b"),"g");var p=v.replace(kw,""),A=Vx(x||w?"".concat(x," ").concat(w," { ").concat(p," }"):p);c.namespace&&(A=Xm(A,c.namespace));var B=[];return Ds(A,Gx(m.concat(Yx(function(k){return B.push(k)})))),B};return g.hash=f.length?f.reduce(function(v,w){return w.name||xi(15),oo(v,w.name)},Lm).toString():"",g}var Sw=new Ym,c0=Ew(),Zm=We.createContext({shouldForwardProp:void 0,styleSheet:Sw,stylis:c0});Zm.Consumer;We.createContext(void 0);function rp(){return Na(Zm)}var Jm=(function(){function e(t,r){var n=this;this.inject=function(a,i){i===void 0&&(i=c0);var c=n.name+i.hash;a.hasNameForId(n.id,c)||a.insertRules(n.id,c,i(n.rules,c,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,uc(this,function(){throw xi(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=c0),this.name+t.hash},e})(),Aw=function(e){return e>="A"&&e<="Z"};function np(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;Aw(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Qm=function(e){return e==null||e===!1||e===""},eg=function(e){var t,r,n=[];for(var a in e){var i=e[a];e.hasOwnProperty(a)&&!Qm(i)&&(Array.isArray(i)&&i.isCss||wo(i)?n.push("".concat(np(a),":"),i,";"):ci(i)?n.push.apply(n,ui(ui(["".concat(a," {")],eg(i),!1),["}"],!1)):n.push("".concat(np(a),": ").concat((t=a,(r=i)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in Zx||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Ka(e,t,r,n){if(Qm(e))return[];if(lc(e))return[".".concat(e.styledComponentId)];if(wo(e)){if(!wo(i=e)||i.prototype&&i.prototype.isReactComponent||!t)return[e];var a=e(t);return Ka(a,t,r,n)}var i;return e instanceof Jm?r?(e.inject(r,n),[e.getName(n)]):[e]:ci(e)?eg(e):Array.isArray(e)?Array.prototype.concat.apply(Hs,e.map(function(c){return Ka(c,t,r,n)})):[e.toString()]}function Bw(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(wo(r)&&!lc(r))return!1}return!0}var Fw=Hm(Ls),Nw=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&Bw(t),this.componentId=r,this.baseHash=oo(Fw,r),this.baseStyle=n,Ym.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var a=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))a=_a(a,this.staticRulesId);else{var i=l0(Ka(this.rules,t,r,n)),c=s0(oo(this.baseHash,i)>>>0);if(!r.hasNameForId(this.componentId,c)){var u=n(i,".".concat(c),void 0,this.componentId);r.insertRules(this.componentId,c,u)}a=_a(a,c),this.staticRulesId=c}else{for(var f=oo(this.baseHash,n.hash),d="",m=0;m<this.rules.length;m++){var g=this.rules[m];if(typeof g=="string")d+=g;else if(g){var v=l0(Ka(g,t,r,n));f=oo(f,v+m),d+=v}}if(d){var w=s0(f>>>0);r.hasNameForId(this.componentId,w)||r.insertRules(this.componentId,w,n(d,".".concat(w),void 0,this.componentId)),a=_a(a,w)}}return a},e})(),tg=We.createContext(void 0);tg.Consumer;var ou={};function Tw(e,t,r){var n=lc(e),a=e,i=!au(e),c=t.attrs,u=c===void 0?Hs:c,f=t.componentId,d=f===void 0?(function(N,F){var R=typeof N!="string"?"sc":Yh(N);ou[R]=(ou[R]||0)+1;var S="".concat(R,"-").concat(Km(Ls+R+ou[R]));return F?"".concat(F,"-").concat(S):S})(t.displayName,t.parentComponentId):f,m=t.displayName,g=m===void 0?(function(N){return au(N)?"styled.".concat(N):"Styled(".concat(nw(N),")")})(e):m,v=t.displayName&&t.componentId?"".concat(Yh(t.displayName),"-").concat(t.componentId):t.componentId||d,w=n&&a.attrs?a.attrs.concat(u).filter(Boolean):u,x=t.shouldForwardProp;if(n&&a.shouldForwardProp){var C=a.shouldForwardProp;if(t.shouldForwardProp){var p=t.shouldForwardProp;x=function(N,F){return C(N,F)&&p(N,F)}}else x=C}var A=new Nw(r,v,n?a.componentStyle:void 0);function B(N,F){return(function(R,S,z){var O=R.attrs,V=R.componentStyle,I=R.defaultProps,X=R.foldedComponentIds,Z=R.styledComponentId,L=R.target,K=We.useContext(tg),W=rp(),G=R.shouldForwardProp||W.shouldForwardProp,ne=Qx(S,K,I)||xo,q=(function(Ie,Q,le){for(var ce,de=wn(wn({},Q),{className:void 0,theme:le}),Ee=0;Ee<Ie.length;Ee+=1){var Ne=wo(ce=Ie[Ee])?ce(de):ce;for(var ge in Ne)de[ge]=ge==="className"?_a(de[ge],Ne[ge]):ge==="style"?wn(wn({},de[ge]),Ne[ge]):Ne[ge]}return Q.className&&(de.className=_a(de.className,Q.className)),de})(O,S,ne),J=q.as||L,me={};for(var Ce in q)q[Ce]===void 0||Ce[0]==="$"||Ce==="as"||Ce==="theme"&&q.theme===ne||(Ce==="forwardedAs"?me.as=q.forwardedAs:G&&!G(Ce,J)||(me[Ce]=q[Ce]));var we=(function(Ie,Q){var le=rp(),ce=Ie.generateAndInjectStyles(Q,le.styleSheet,le.stylis);return ce})(V,q),Fe=_a(X,Z);return we&&(Fe+=" "+we),q.className&&(Fe+=" "+q.className),me[au(J)&&!jm.has(J)?"class":"className"]=Fe,z&&(me.ref=z),is(J,me)})(k,N,F)}B.displayName=g;var k=We.forwardRef(B);return k.attrs=w,k.componentStyle=A,k.displayName=g,k.shouldForwardProp=x,k.foldedComponentIds=n?_a(a.foldedComponentIds,a.styledComponentId):"",k.styledComponentId=v,k.target=n?a.target:e,Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(N){this._foldedDefaultProps=n?(function(F){for(var R=[],S=1;S<arguments.length;S++)R[S-1]=arguments[S];for(var z=0,O=R;z<O.length;z++)u0(F,O[z],!0);return F})({},a.defaultProps,N):N}}),uc(k,function(){return".".concat(k.styledComponentId)}),i&&Um(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),k}function ap(e,t){for(var r=[e[0]],n=0,a=t.length;n<a;n+=1)r.push(t[n],e[n+1]);return r}var op=function(e){return Object.assign(e,{isCss:!0})};function Ks(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(wo(e)||ci(e))return op(Ka(ap(Hs,ui([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Ka(n):op(Ka(ap(n,t)))}function d0(e,t,r){if(r===void 0&&(r=xo),!t)throw xi(1,t);var n=function(a){for(var i=[],c=1;c<arguments.length;c++)i[c-1]=arguments[c];return e(t,r,Ks.apply(void 0,ui([a],i,!1)))};return n.attrs=function(a){return d0(e,t,wn(wn({},r),{attrs:Array.prototype.concat(r.attrs,a).filter(Boolean)}))},n.withConfig=function(a){return d0(e,t,wn(wn({},r),a))},n}var rg=function(e){return d0(Tw,e)},qe=rg;jm.forEach(function(e){qe[e]=rg(e)});function ng(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=l0(Ks.apply(void 0,ui([e],t,!1))),a=Km(n);return new Jm(a,n)}var ip={exports:{}},sp;function Ow(){return sp||(sp=1,(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
|
|
143
|
+
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
144
|
+
*
|
|
145
|
+
* @license MIT <https://opensource.org/licenses/MIT>
|
|
146
|
+
* @author Lea Verou <https://lea.verou.me>
|
|
147
|
+
* @namespace
|
|
148
|
+
* @public
|
|
149
|
+
*/var r=(function(n){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,c={},u={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function B(k){return k instanceof f?new f(k.type,B(k.content),k.alias):Array.isArray(k)?k.map(B):k.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(B){return Object.prototype.toString.call(B).slice(8,-1)},objId:function(B){return B.__id||Object.defineProperty(B,"__id",{value:++i}),B.__id},clone:function B(k,N){N=N||{};var F,R;switch(u.util.type(k)){case"Object":if(R=u.util.objId(k),N[R])return N[R];F={},N[R]=F;for(var S in k)k.hasOwnProperty(S)&&(F[S]=B(k[S],N));return F;case"Array":return R=u.util.objId(k),N[R]?N[R]:(F=[],N[R]=F,k.forEach(function(z,O){F[O]=B(z,N)}),F);default:return k}},getLanguage:function(B){for(;B;){var k=a.exec(B.className);if(k)return k[1].toLowerCase();B=B.parentElement}return"none"},setLanguage:function(B,k){B.className=B.className.replace(RegExp(a,"gi"),""),B.classList.add("language-"+k)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(F){var B=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(F.stack)||[])[1];if(B){var k=document.getElementsByTagName("script");for(var N in k)if(k[N].src==B)return k[N]}return null}},isActive:function(B,k,N){for(var F="no-"+k;B;){var R=B.classList;if(R.contains(k))return!0;if(R.contains(F))return!1;B=B.parentElement}return!!N}},languages:{plain:c,plaintext:c,text:c,txt:c,extend:function(B,k){var N=u.util.clone(u.languages[B]);for(var F in k)N[F]=k[F];return N},insertBefore:function(B,k,N,F){F=F||u.languages;var R=F[B],S={};for(var z in R)if(R.hasOwnProperty(z)){if(z==k)for(var O in N)N.hasOwnProperty(O)&&(S[O]=N[O]);N.hasOwnProperty(z)||(S[z]=R[z])}var V=F[B];return F[B]=S,u.languages.DFS(u.languages,function(I,X){X===V&&I!=B&&(this[I]=S)}),S},DFS:function B(k,N,F,R){R=R||{};var S=u.util.objId;for(var z in k)if(k.hasOwnProperty(z)){N.call(k,z,k[z],F||z);var O=k[z],V=u.util.type(O);V==="Object"&&!R[S(O)]?(R[S(O)]=!0,B(O,N,null,R)):V==="Array"&&!R[S(O)]&&(R[S(O)]=!0,B(O,N,z,R))}}},plugins:{},highlightAll:function(B,k){u.highlightAllUnder(document,B,k)},highlightAllUnder:function(B,k,N){var F={callback:N,container:B,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",F),F.elements=Array.prototype.slice.apply(F.container.querySelectorAll(F.selector)),u.hooks.run("before-all-elements-highlight",F);for(var R=0,S;S=F.elements[R++];)u.highlightElement(S,k===!0,F.callback)},highlightElement:function(B,k,N){var F=u.util.getLanguage(B),R=u.languages[F];u.util.setLanguage(B,F);var S=B.parentElement;S&&S.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(S,F);var z=B.textContent,O={element:B,language:F,grammar:R,code:z};function V(X){O.highlightedCode=X,u.hooks.run("before-insert",O),O.element.innerHTML=O.highlightedCode,u.hooks.run("after-highlight",O),u.hooks.run("complete",O),N&&N.call(O.element)}if(u.hooks.run("before-sanity-check",O),S=O.element.parentElement,S&&S.nodeName.toLowerCase()==="pre"&&!S.hasAttribute("tabindex")&&S.setAttribute("tabindex","0"),!O.code){u.hooks.run("complete",O),N&&N.call(O.element);return}if(u.hooks.run("before-highlight",O),!O.grammar){V(u.util.encode(O.code));return}if(k&&n.Worker){var I=new Worker(u.filename);I.onmessage=function(X){V(X.data)},I.postMessage(JSON.stringify({language:O.language,code:O.code,immediateClose:!0}))}else V(u.highlight(O.code,O.grammar,O.language))},highlight:function(B,k,N){var F={code:B,grammar:k,language:N};if(u.hooks.run("before-tokenize",F),!F.grammar)throw new Error('The language "'+F.language+'" has no grammar.');return F.tokens=u.tokenize(F.code,F.grammar),u.hooks.run("after-tokenize",F),f.stringify(u.util.encode(F.tokens),F.language)},tokenize:function(B,k){var N=k.rest;if(N){for(var F in N)k[F]=N[F];delete k.rest}var R=new g;return v(R,R.head,B),m(B,R,k,R.head,0),x(R)},hooks:{all:{},add:function(B,k){var N=u.hooks.all;N[B]=N[B]||[],N[B].push(k)},run:function(B,k){var N=u.hooks.all[B];if(!(!N||!N.length))for(var F=0,R;R=N[F++];)R(k)}},Token:f};n.Prism=u;function f(B,k,N,F){this.type=B,this.content=k,this.alias=N,this.length=(F||"").length|0}f.stringify=function B(k,N){if(typeof k=="string")return k;if(Array.isArray(k)){var F="";return k.forEach(function(V){F+=B(V,N)}),F}var R={type:k.type,content:B(k.content,N),tag:"span",classes:["token",k.type],attributes:{},language:N},S=k.alias;S&&(Array.isArray(S)?Array.prototype.push.apply(R.classes,S):R.classes.push(S)),u.hooks.run("wrap",R);var z="";for(var O in R.attributes)z+=" "+O+'="'+(R.attributes[O]||"").replace(/"/g,""")+'"';return"<"+R.tag+' class="'+R.classes.join(" ")+'"'+z+">"+R.content+"</"+R.tag+">"};function d(B,k,N,F){B.lastIndex=k;var R=B.exec(N);if(R&&F&&R[1]){var S=R[1].length;R.index+=S,R[0]=R[0].slice(S)}return R}function m(B,k,N,F,R,S){for(var z in N)if(!(!N.hasOwnProperty(z)||!N[z])){var O=N[z];O=Array.isArray(O)?O:[O];for(var V=0;V<O.length;++V){if(S&&S.cause==z+","+V)return;var I=O[V],X=I.inside,Z=!!I.lookbehind,L=!!I.greedy,K=I.alias;if(L&&!I.pattern.global){var W=I.pattern.toString().match(/[imsuy]*$/)[0];I.pattern=RegExp(I.pattern.source,W+"g")}for(var G=I.pattern||I,ne=F.next,q=R;ne!==k.tail&&!(S&&q>=S.reach);q+=ne.value.length,ne=ne.next){var J=ne.value;if(k.length>B.length)return;if(!(J instanceof f)){var me=1,Ce;if(L){if(Ce=d(G,q,B,Z),!Ce||Ce.index>=B.length)break;var Q=Ce.index,we=Ce.index+Ce[0].length,Fe=q;for(Fe+=ne.value.length;Q>=Fe;)ne=ne.next,Fe+=ne.value.length;if(Fe-=ne.value.length,q=Fe,ne.value instanceof f)continue;for(var Ie=ne;Ie!==k.tail&&(Fe<we||typeof Ie.value=="string");Ie=Ie.next)me++,Fe+=Ie.value.length;me--,J=B.slice(q,Fe),Ce.index-=q}else if(Ce=d(G,0,J,Z),!Ce)continue;var Q=Ce.index,le=Ce[0],ce=J.slice(0,Q),de=J.slice(Q+le.length),Ee=q+J.length;S&&Ee>S.reach&&(S.reach=Ee);var Ne=ne.prev;ce&&(Ne=v(k,Ne,ce),q+=ce.length),w(k,Ne,me);var ge=new f(z,X?u.tokenize(le,X):le,K,le);if(ne=v(k,Ne,ge),de&&v(k,ne,de),me>1){var De={cause:z+","+V,reach:Ee};m(B,k,N,ne.prev,q,De),S&&De.reach>S.reach&&(S.reach=De.reach)}}}}}}function g(){var B={value:null,prev:null,next:null},k={value:null,prev:B,next:null};B.next=k,this.head=B,this.tail=k,this.length=0}function v(B,k,N){var F=k.next,R={value:N,prev:k,next:F};return k.next=R,F.prev=R,B.length++,R}function w(B,k,N){for(var F=k.next,R=0;R<N&&F!==B.tail;R++)F=F.next;k.next=F,F.prev=k,B.length-=R}function x(B){for(var k=[],N=B.head.next;N!==B.tail;)k.push(N.value),N=N.next;return k}if(!n.document)return n.addEventListener&&(u.disableWorkerMessageHandler||n.addEventListener("message",function(B){var k=JSON.parse(B.data),N=k.language,F=k.code,R=k.immediateClose;n.postMessage(u.highlight(F,u.languages[N],N)),R&&n.close()},!1)),u;var C=u.util.currentScript();C&&(u.filename=C.src,C.hasAttribute("data-manual")&&(u.manual=!0));function p(){u.manual||u.highlightAll()}if(!u.manual){var A=document.readyState;A==="loading"||A==="interactive"&&C&&C.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return u})(t);e.exports&&(e.exports=r),typeof ro<"u"&&(ro.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(n,a){var i={};i["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[a]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var c={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};c["language-"+a]={pattern:/[\s\S]+/,inside:r.languages[a]};var u={};u[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:c},r.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,a){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[a,"language-"+a],inside:r.languages[a]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,(function(n){var a=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+a.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+a.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+a.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+a.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:a,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))})(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,(function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading\u2026",a=function(C,p){return"\u2716 Error "+C+" while fetching file: "+p},i="\u2716 Error: File does not exist or is empty",c={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="data-src-status",f="loading",d="loaded",m="failed",g="pre[data-src]:not(["+u+'="'+d+'"]):not(['+u+'="'+f+'"])';function v(C,p,A){var B=new XMLHttpRequest;B.open("GET",C,!0),B.onreadystatechange=function(){B.readyState==4&&(B.status<400&&B.responseText?p(B.responseText):B.status>=400?A(a(B.status,B.statusText)):A(i))},B.send(null)}function w(C){var p=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(C||"");if(p){var A=Number(p[1]),B=p[2],k=p[3];return B?k?[A,Number(k)]:[A,void 0]:[A,A]}}r.hooks.add("before-highlightall",function(C){C.selector+=", "+g}),r.hooks.add("before-sanity-check",function(C){var p=C.element;if(p.matches(g)){C.code="",p.setAttribute(u,f);var A=p.appendChild(document.createElement("CODE"));A.textContent=n;var B=p.getAttribute("data-src"),k=C.language;if(k==="none"){var N=(/\.(\w+)$/.exec(B)||[,"none"])[1];k=c[N]||N}r.util.setLanguage(A,k),r.util.setLanguage(p,k);var F=r.plugins.autoloader;F&&F.loadLanguages(k),v(B,function(R){p.setAttribute(u,d);var S=w(p.getAttribute("data-range"));if(S){var z=R.split(/\r\n?|\n/g),O=S[0],V=S[1]==null?z.length:S[1];O<0&&(O+=z.length),O=Math.max(0,Math.min(O-1,z.length)),V<0&&(V+=z.length),V=Math.max(0,Math.min(V,z.length)),R=z.slice(O,V).join(`
|
|
150
|
+
`),p.hasAttribute("data-start")||p.setAttribute("data-start",String(O+1))}A.textContent=R,r.highlightElement(A)},function(R){p.setAttribute(u,m),A.textContent=R})}}),r.plugins.fileHighlight={highlight:function(C){for(var p=(C||document).querySelectorAll(g),A=0,B;B=p[A++];)r.highlightElement(B)}};var x=!1;r.fileHighlight=function(){x||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),x=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}})()})(ip)),ip.exports}var Mw=Ow();const iu=vi(Mw),Rw=qe.span.attrs({className:"unified-rich-text-template-container"})`
|
|
151
|
+
display: inline-block;
|
|
152
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
153
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
154
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
155
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
156
|
+
border: none !important;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
transition: all 0.2s;
|
|
159
|
+
font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
|
|
160
|
+
user-select: none;
|
|
161
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
162
|
+
line-height: 2;
|
|
163
|
+
width: auto; /* 让宽度根据内容自动调整 */
|
|
164
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
165
|
+
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(m=>parseInt(m)),a=(n.length,n[0]),i=parseInt(r);return a*2+i*1.4+"px"}};
|
|
166
|
+
|
|
167
|
+
/* 高度自适应 */
|
|
168
|
+
height: auto; /* 允许高度根据内容自动调整 */
|
|
169
|
+
white-space: normal; /* 允许换行 */
|
|
170
|
+
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
|
|
171
|
+
overflow: visible; /* 确保内容不被隐藏 */
|
|
172
|
+
word-wrap: break-word; /* 允许长单词换行 */
|
|
173
|
+
max-width: 100%; /* 限制在容器宽度内 */
|
|
174
|
+
|
|
175
|
+
/* 使用传入的样式配置 */
|
|
176
|
+
background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
|
|
177
|
+
color: #055AFF;
|
|
178
|
+
border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
179
|
+
|
|
180
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
181
|
+
background-color: white !important;
|
|
182
|
+
color: #055AFF !important;
|
|
183
|
+
border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
|
|
184
|
+
outline: none;
|
|
185
|
+
min-width: 30px;
|
|
186
|
+
`}}
|
|
187
|
+
|
|
188
|
+
&:hover {
|
|
189
|
+
opacity: 0.8;
|
|
190
|
+
}
|
|
191
|
+
`,$w=qe.input.attrs({className:"unified-rich-text-template-input"})`
|
|
192
|
+
background: white;
|
|
193
|
+
border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
194
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
195
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
196
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
197
|
+
min-width: ${"30px"};
|
|
198
|
+
width: ${e=>{var d,m,g,v;const t=e.$value.length;if(t===0)return((m=(d=e.$styles)==null?void 0:d.templateField)==null?void 0:m.minWidth)||"120px";const r=((v=(g=e.$styles)==null?void 0:g.templateField)==null?void 0:v.padding)||"2px 6.2px",n=r.split(" ").map(w=>parseInt(w)),a=n.length===2?n[1]:n[0],i=12.5,c=20,u=t*i+a*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:a,charWidth:i,bufferSpace:c,calculatedWidth:u,maxWidth:e.$maxWidth,finalWidth:f,inputValue:e.$value}),f+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
199
|
+
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(m=>parseInt(m)),a=(n.length,n[0]),i=parseInt(r);return a*2+i*1.4+"px"}};
|
|
200
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
201
|
+
font-family: inherit;
|
|
202
|
+
outline: none;
|
|
203
|
+
color: #055AFF;
|
|
204
|
+
line-height: 2;
|
|
205
|
+
box-sizing: border-box;
|
|
206
|
+
white-space: nowrap; /* 防止内部换行 */
|
|
207
|
+
overflow: hidden; /* 隐藏超出部分 */
|
|
208
|
+
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
209
|
+
|
|
210
|
+
&:focus {
|
|
211
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
212
|
+
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;
|
|
213
|
+
}
|
|
214
|
+
`,ag=fi(({element:e,attributes:t,children:r,styles:n,onTemplateChange:a},i)=>{var R,S,z,O,V,I,X,Z,L,K,W,G;const c=bm(),[u,f]=$t(!1),[d,m]=$t(e.value||""),[g,v]=$t(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[w,x]=$t(600),C=Zt(null),p=zt(()=>{try{const ne=document.querySelector('[data-slate-editor="true"]');if(ne){const q=ne.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||ne.parentElement;if(q){const J=q.clientWidth,me=J-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",J,"\u53EF\u7528\u5BBD\u5EA6:",me),Math.max(me,200)}}return 600}catch(ne){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",ne),600}},[]);sr(()=>{v(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const ne=p();x(ne)},[e.value,e.placeholder,p]);const A=zt(()=>{f(!0),m(e.value||""),setTimeout(()=>{C.current&&(C.current.focus(),C.current.select())},0)},[e.value]),B=zt(ne=>{const q=ne.target.value;m(q)},[]),k=zt(()=>{const ne=_e.findPath(c,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",ne),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",d),Ve.setNodes(c,{value:d},{at:ne});const q=d.trim()!==""?d:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";v(q);const J=c.children[ne[0]];if(J&&"children"in J){const me=J.children[ne[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",me)}f(!1)},[c,e,d]),N=zt(()=>{k()},[k]),F=zt(ne=>{ne.key==="Enter"?(ne.preventDefault(),k()):ne.key==="Escape"&&(ne.preventDefault(),m(e.value||""),f(!1))},[k,e.value]);return u?H.jsxs("span",{...t,children:[H.jsx("span",{contentEditable:!1,children:H.jsx($w,{ref:C,value:d,onChange:B,onBlur:N,onKeyDown:F,placeholder:"",$styles:n,$value:d,$maxWidth:w,style:{backgroundColor:"white",color:((R=n==null?void 0:n.templateField)==null?void 0:R.textColor)||"#055AFF",border:`2px solid ${((S=n==null?void 0:n.templateField)==null?void 0:S.borderColor)||"#84ADFF"}`,minWidth:((z=n==null?void 0:n.templateField)==null?void 0:z.minWidth)||"120px"}})}),r]}):H.jsxs("span",{...t,children:[H.jsx("span",{contentEditable:!1,children:H.jsxs(Rw,{ref:i,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:g.length,onClick:A,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:(I=n==null?void 0:n.templateField)==null?void 0:I.borderRadius,padding:(X=n==null?void 0:n.templateField)==null?void 0:X.padding,margin:(Z=n==null?void 0:n.templateField)==null?void 0:Z.margin,fontSize:(L=n==null?void 0:n.templateField)==null?void 0:L.fontSize,fontWeight:(K=n==null?void 0:n.templateField)==null?void 0:K.fontWeight,minWidth:(W=n==null?void 0:n.templateField)==null?void 0:W.minWidth,color:(G=n==null?void 0:n.templateField)==null?void 0:G.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:g,displayValueLength:g.length,contentLength:g.length}),null),g]})}),r]})});ag.displayName="TemplateField";const Pw=({children:e,attributes:t,styles:r,extraProps:n})=>{var i;const a=!!(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:`${(i=r==null?void 0:r.text)==null?void 0:i.color} !important`,display:a?"none":"block"},children:e})})]})},og=We.forwardRef(({attributes:e,element:t,eventsEmit:r,dataSource:n,tagIndex:a},i)=>{var N;const[c,u]=$t(null),[f,d]=$t(!0),[m,g]=$t(1),[v,w]=$t(10);sr(()=>{if(!c){if(!n){d(!0);try{const F=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(F)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const F=(n==null?void 0:n.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",F);let R=null,S=null,z;for(const I of F){const X=I==null?void 0:I.reply;if(!(X!=null&&X.databaseReference))continue;const Z=X.databaseReference;console.log(Z,"123123123jk123lk12j3l12jl3"),Z!=null&&Z.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",Z.retrieveSqlData.filePath),z=Z.retrieveSqlData.filePath);let L=Z;if(typeof Z=="string")try{L=JSON.parse(Z)}catch{}if(!L)continue;const K=Array.isArray(L)?L:[L],W=K.findIndex(q=>(q==null?void 0:q.id)===t.id),G=W>=0?K[W]:null;if(console.log("~~~~~~~~~~~~~~~",G),G){R=G,S=G.retrieveSqlData||G.retrieve_table_data||G.retrieveTableData;break}const ne=K.find(q=>{var J,me;return(((me=(J=q==null?void 0:q.retrieveSqlData)==null?void 0:J.preData)==null?void 0:me.length)||0)>0});!R&&ne&&(R=ne,S=ne.retrieveSqlData||ne.retrieve_table_data||ne.retrieveTableData)}if(!R||!S){console.warn("No databaseReference with preData found for id:",t.id),d(!1);return}const O=Array.isArray(S==null?void 0:S.preData)?S.preData[0]:null;if(!O){console.warn("Matched item has no preData"),d(!1);return}const V={columns:(O.columns||[]).map(I=>({key:I.key,title:I.title})),rows:O.data||O.rows||[],total:(S==null?void 0:S.total)||0,fetchUrl:(S==null?void 0:S.fetchUrl)||"/index/knowledgeBase/file/stream",source:z||(S==null?void 0:S.source)||(R==null?void 0:R.source)};u(V),d(!1)}catch(F){console.error("Init preData parsing failed:",F),d(!1)}}},[t.id,c,n]),sr(()=>{const F=R=>{try{const S=(R==null?void 0:R.detail)||{},z=S==null?void 0:S.id;if(!z||String(z)!==String(t.id))return;const O=S.databaseReference;if(!O)return;let V=O;if(typeof O=="string")try{V=JSON.parse(O)}catch{}if(!V)return;const I=Array.isArray(V)?V:[V],X=I.findIndex(G=>String(G==null?void 0:G.id)===String(t.id)),Z=X>=0?I[X]:null;if(!Z)return;const L=(Z==null?void 0:Z.retrieveSqlData)||(Z==null?void 0:Z.retrieve_table_data)||(Z==null?void 0:Z.retrieveTableData),K=Array.isArray(L==null?void 0:L.preData)?L.preData[0]:null;if(!K)return;const W={columns:(K.columns||[]).map(G=>({key:G.key,title:G.title})),rows:K.data||K.rows||[],total:(L==null?void 0:L.total)||0,fetchUrl:(L==null?void 0:L.fetchUrl)||"/index/knowledgeBase/file/stream",source:(Z==null?void 0:Z.source)||(L==null?void 0:L.source)};u(W),d(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",F),()=>{window.removeEventListener("retrieve-sql-data:data-response",F)}},[t.id]);const x=F=>{if(!F||F.length===0)return[];const R=F.find(S=>S&&typeof S=="object")||{};return Object.keys(R).map(S=>({key:S,title:S}))},C=(F,R)=>{g(F),R&&w(R);const S=z=>{let O=null;if(z&&Array.isArray(z.columns)&&Array.isArray(z.rows))O={columns:z.columns,rows:z.rows,total:Number(z.total)||0,fetchUrl:z.fetchUrl||(c==null?void 0:c.fetchUrl)||"",source:z.source||(c==null?void 0:c.source)};else if(z&&Array.isArray(z.data)){const V=z.data;O={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:x(V),rows:V,total:Number(z.totalCount??z.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 z.currentPage=="number"&&g(z.currentPage),typeof z.pageSize=="number"&&w(z.pageSize)}else if(Array.isArray(z)){const V=z;O={columns:c!=null&&c.columns&&c.columns.length>0?c.columns:x(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:",z);return}console.log("Replacing table data with:",O),u(O)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:F,pageSize:R||v,fetchUrl:c==null?void 0:c.fetchUrl,total:c==null?void 0:c.total,source:c==null?void 0:c.source,replacePredataFunction:S})},p=F=>c!=null&&c.rows?Math.max(...c.rows.map(R=>{const S=R[F];return S?String(S).length:0})):0,A=(((N=c==null?void 0:c.columns)==null?void 0:N.length)||0)===1,B=(c==null?void 0:c.columns.map((F,R)=>({title:F.title||F.key,dataIndex:F.key,key:F.key,render:S=>{const z=S==null||S===""?"-":S;return A?H.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(z)}):z},...A?{width:void 0}:{}})))||[],k=(c==null?void 0:c.rows.map((F,R)=>({key:R,...F})))||[];return H.jsx("div",{...e,ref:i,className:"retrieve-sql-data-container my-4",children:f?H.jsxs("div",{className:"flex items-center justify-center py-8",children:[H.jsx(Vp,{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:[a!==null&&(()=>{const F=String(a).length;let R="12px",S="24px",z="24px";return F===2?(R="9px",S="22px",z="24px"):F===3?(R="8px",S="24px",z="24px"):F>=4&&(R="8px",S="24px",z="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:S,height:S,minWidth:z,fontSize:R,lineHeight:1},children:a}),H.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]})})(),H.jsx("div",{className:"table-container max-w-full overflow-x-auto",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative",WebkitOverflowScrolling:"touch"},children:H.jsx(ha,{columns:B.map((F,R)=>({...F,...A?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:R===0?160:void 0,minWidth:120,maxWidth:R===0?180:300,fixed:R===0?"left":void 0,ellipsis:{showTitle:!0}},render:S=>{if(S==null)return"-";const z=String(S);if(A)return H.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:z,children:z});const O=p(F.key);let V="200px";return R===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:z,children:z})}})),dataSource:k,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:A?"100%":"1000px"},scroll:{x:A?void 0:"max-content",y:400}})}),c.total>v&&H.jsx("div",{className:"flex justify-center mt-3",children:H.jsx(Wp,{current:m,pageSize:v,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"})})});og.displayName="RetrieveSqlDataElement";var as={exports:{}},su={exports:{}},lu,lp;function Iw(){if(lp)return lu;lp=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lu=e,lu}var uu,up;function _w(){if(up)return uu;up=1;var e=Iw();function t(){}function r(){}return r.resetWarningCache=t,uu=function(){function n(c,u,f,d,m,g){if(g!==e){var v=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 v.name="Invariant Violation",v}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},uu}var cp;function zw(){return cp||(cp=1,su.exports=_w()()),su.exports}var f0={exports:{}},jw=f0.exports,dp;function Lw(){return dp||(dp=1,(function(e,t){(function(r,n){e.exports=n()})(typeof self<"u"?self:jw,function(){return(function(){var r={};(function(){r.d=function(s,o){for(var l in o)r.o(o,l)&&!r.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:o[l]})}})(),(function(){r.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)}})();var n={};r.d(n,{default:function(){return l4}});class a{constructor(o,l){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let h="KaTeX parse error: "+o,b,E;const M=l&&l.loc;if(M&&M.start<=M.end){const U=M.lexer.input;b=M.start,E=M.end,b===U.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const ie=U.slice(b,E).replace(/[^]/g,"$&\u0332");let ve;b>15?ve="\u2026"+U.slice(b-15,b):ve=U.slice(0,b);let ye;E+15<U.length?ye=U.slice(E,E+15)+"\u2026":ye=U.slice(E),h+=ve+ie+ye}const _=new Error(h);return _.name="ParseError",_.__proto__=a.prototype,_.position=b,b!=null&&E!=null&&(_.length=E-b),_.rawMessage=o,_}}a.prototype.__proto__=Error.prototype;var i=a;const c=function(s,o){return s===void 0?o:s},u=/([A-Z])/g,f=function(s){return s.replace(u,"-$1").toLowerCase()},d={"&":"&",">":">","<":"<",'"':""","'":"'"},m=/[&><"']/g;function g(s){return String(s).replace(m,o=>d[o])}const v=function(s){return s.type==="ordgroup"||s.type==="color"?s.body.length===1?v(s.body[0]):s:s.type==="font"?v(s.body):s},w=function(s){const o=v(s);return o.type==="mathord"||o.type==="textord"||o.type==="atom"},x=function(s){if(!s)throw new Error("Expected non-null, but got "+String(s));return s};var C={deflt:c,escape:g,hyphenate:f,getBaseElem:v,isCharacterBox:w,protocolFromUrl:function(s){const o=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(s);return o?o[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(o[1])?null:o[1].toLowerCase():"_relative"}};const p={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,o)=>(o.push(s),o)},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 A(s){if(s.default)return s.default;const o=s.type,l=Array.isArray(o)?o[0]:o;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 B{constructor(o){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,o=o||{};for(const l in p)if(p.hasOwnProperty(l)){const h=p[l];this[l]=o[l]!==void 0?h.processor?h.processor(o[l]):o[l]:A(h)}}reportNonstrict(o,l,h){let b=this.strict;if(typeof b=="function"&&(b=b(o,l,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new i("LaTeX-incompatible input and strict mode is set to 'error': "+(l+" ["+o+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+o+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+o+"]"))}}useStrictBehavior(o,l,h){let b=this.strict;if(typeof b=="function")try{b=b(o,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+" ["+o+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+o+"]")),!1)}isTrusted(o){if(o.url&&!o.protocol){const l=C.protocolFromUrl(o.url);if(l==null)return!1;o.protocol=l}return!!(typeof this.trust=="function"?this.trust(o):this.trust)}}class k{constructor(o,l,h){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=o,this.size=l,this.cramped=h}sup(){return X[Z[this.id]]}sub(){return X[L[this.id]]}fracNum(){return X[K[this.id]]}fracDen(){return X[W[this.id]]}cramp(){return X[G[this.id]]}text(){return X[ne[this.id]]}isTight(){return this.size>=2}}const N=0,F=1,R=2,S=3,z=4,O=5,V=6,I=7,X=[new k(N,0,!1),new k(F,0,!0),new k(R,1,!1),new k(S,1,!0),new k(z,2,!1),new k(O,2,!0),new k(V,3,!1),new k(I,3,!0)],Z=[z,O,z,O,V,I,V,I],L=[O,O,O,O,I,I,I,I],K=[R,S,z,O,V,I,V,I],W=[S,S,O,O,I,I,I,I],G=[F,F,S,S,O,O,I,I],ne=[N,F,R,S,R,S,R,S];var q={DISPLAY:X[N],TEXT:X[R],SCRIPT:X[z],SCRIPTSCRIPT:X[V]};const J=[{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 me(s){for(let o=0;o<J.length;o++){const l=J[o];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=[];J.forEach(s=>s.blocks.forEach(o=>Ce.push(...o)));function we(s){for(let o=0;o<Ce.length;o+=2)if(s>=Ce[o]&&s<=Ce[o+1])return!0;return!1}const Fe=80,Ie=function(s,o){return"M95,"+(622+s+o)+`
|
|
215
|
+
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
216
|
+
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
217
|
+
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
|
|
218
|
+
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
|
219
|
+
c69,-144,104.5,-217.7,106.5,-221
|
|
220
|
+
l`+s/2.075+" -"+s+`
|
|
221
|
+
c5.3,-9.3,12,-14,20,-14
|
|
222
|
+
H400000v`+(40+s)+`H845.2724
|
|
223
|
+
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
|
224
|
+
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
|
225
|
+
M`+(834+s)+" "+o+"h400000v"+(40+s)+"h-400000z"},Q=function(s,o){return"M263,"+(601+s+o)+`c0.7,0,18,39.7,52,119
|
|
226
|
+
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
|
227
|
+
c340,-704.7,510.7,-1060.3,512,-1067
|
|
228
|
+
l`+s/2.084+" -"+s+`
|
|
229
|
+
c4.7,-7.3,11,-11,19,-11
|
|
230
|
+
H40000v`+(40+s)+`H1012.3
|
|
231
|
+
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
|
232
|
+
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
|
|
233
|
+
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
|
234
|
+
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
|
235
|
+
M`+(1001+s)+" "+o+"h400000v"+(40+s)+"h-400000z"},le=function(s,o){return"M983 "+(10+s+o)+`
|
|
236
|
+
l`+s/3.13+" -"+s+`
|
|
237
|
+
c4,-6.7,10,-10,18,-10 H400000v`+(40+s)+`
|
|
238
|
+
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
|
|
239
|
+
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
|
|
240
|
+
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
241
|
+
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
242
|
+
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
243
|
+
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
244
|
+
M`+(1001+s)+" "+o+"h400000v"+(40+s)+"h-400000z"},ce=function(s,o){return"M424,"+(2398+s+o)+`
|
|
245
|
+
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
246
|
+
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
|
|
247
|
+
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
248
|
+
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
|
249
|
+
l`+s/4.223+" -"+s+`c4,-6.7,10,-10,18,-10 H400000
|
|
250
|
+
v`+(40+s)+`H1014.6
|
|
251
|
+
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
|
252
|
+
c-2,6,-10,9,-24,9
|
|
253
|
+
c-8,0,-12,-0.7,-12,-2z M`+(1001+s)+" "+o+`
|
|
254
|
+
h400000v`+(40+s)+"h-400000z"},de=function(s,o){return"M473,"+(2713+s+o)+`
|
|
255
|
+
c339.3,-1799.3,509.3,-2700,510,-2702 l`+s/5.298+" -"+s+`
|
|
256
|
+
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+s)+`H1017.7
|
|
257
|
+
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
|
258
|
+
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
|
|
259
|
+
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
|
|
260
|
+
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
|
261
|
+
606zM`+(1001+s)+" "+o+"h400000v"+(40+s)+"H1017.7z"},Ee=function(s){const o=s/2;return"M400000 "+s+" H0 L"+o+" 0 l65 45 L145 "+(s-80)+" H400000z"},Ne=function(s,o,l){const h=l-54-o-s;return"M702 "+(s+o)+"H400000"+(40+s)+`
|
|
262
|
+
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
|
|
263
|
+
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
264
|
+
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
265
|
+
219 661 l218 661zM702 `+o+"H400000v"+(40+s)+"H742z"},ge=function(s,o,l){o=1e3*o;let h="";switch(s){case"sqrtMain":h=Ie(o,Fe);break;case"sqrtSize1":h=Q(o,Fe);break;case"sqrtSize2":h=le(o,Fe);break;case"sqrtSize3":h=ce(o,Fe);break;case"sqrtSize4":h=de(o,Fe);break;case"sqrtTall":h=Ne(o,Fe,l)}return h},De=function(s,o){switch(s){case"\u239C":return"M291 0 H417 V"+o+" H291z M291 0 H417 V"+o+" H291z";case"\u2223":return"M145 0 H188 V"+o+" H145z M145 0 H188 V"+o+" H145z";case"\u2225":return"M145 0 H188 V"+o+" H145z M145 0 H188 V"+o+" H145z"+("M367 0 H410 V"+o+" H367z M367 0 H410 V"+o+" H367z");case"\u239F":return"M457 0 H583 V"+o+" H457z M457 0 H583 V"+o+" H457z";case"\u23A2":return"M319 0 H403 V"+o+" H319z M319 0 H403 V"+o+" H319z";case"\u23A5":return"M263 0 H347 V"+o+" H263z M263 0 H347 V"+o+" H263z";case"\u23AA":return"M384 0 H504 V"+o+" H384z M384 0 H504 V"+o+" H384z";case"\u23D0":return"M312 0 H355 V"+o+" H312z M312 0 H355 V"+o+" H312z";case"\u2016":return"M257 0 H300 V"+o+" H257z M257 0 H300 V"+o+" H257z"+("M478 0 H521 V"+o+" H478z M478 0 H521 V"+o+" H478z");default:return""}},ke={doubleleftarrow:`M262 157
|
|
266
|
+
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
|
|
267
|
+
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
|
|
268
|
+
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
|
|
269
|
+
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
|
|
270
|
+
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
|
|
271
|
+
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
|
272
|
+
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
|
273
|
+
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
|
274
|
+
-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
|
|
275
|
+
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
|
|
276
|
+
-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
|
|
277
|
+
-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
|
|
278
|
+
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
|
279
|
+
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
|
|
280
|
+
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
|
281
|
+
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
|
|
282
|
+
-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
|
|
283
|
+
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
|
|
284
|
+
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
|
|
285
|
+
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
|
|
286
|
+
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
|
287
|
+
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
|
288
|
+
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
|
|
289
|
+
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
|
|
290
|
+
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
|
291
|
+
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
|
292
|
+
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
|
|
293
|
+
435 0h399565z`,leftgroupunder:`M400000 262
|
|
294
|
+
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
|
|
295
|
+
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
|
296
|
+
-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
|
|
297
|
+
-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
|
|
298
|
+
-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
|
|
299
|
+
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
|
|
300
|
+
-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
|
|
301
|
+
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
|
302
|
+
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
|
303
|
+
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
|
304
|
+
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
|
|
305
|
+
-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
|
|
306
|
+
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
|
|
307
|
+
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
|
308
|
+
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
|
|
309
|
+
-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
|
|
310
|
+
-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
|
|
311
|
+
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
|
|
312
|
+
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
|
|
313
|
+
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
|
314
|
+
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
|
315
|
+
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
|
|
316
|
+
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
|
|
317
|
+
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
|
|
318
|
+
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
|
|
319
|
+
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
|
320
|
+
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
|
|
321
|
+
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
|
322
|
+
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
|
|
323
|
+
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
|
324
|
+
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
|
|
325
|
+
-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
|
|
326
|
+
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
|
327
|
+
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
|
|
328
|
+
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
|
|
329
|
+
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
|
330
|
+
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
|
331
|
+
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
|
|
332
|
+
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
|
333
|
+
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
|
|
334
|
+
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
|
|
335
|
+
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
|
336
|
+
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
|
337
|
+
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
|
|
338
|
+
-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
|
|
339
|
+
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
|
|
340
|
+
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
|
|
341
|
+
-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
|
|
342
|
+
-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
|
|
343
|
+
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
|
344
|
+
-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
|
|
345
|
+
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
|
|
346
|
+
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
|
|
347
|
+
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
|
348
|
+
-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
|
|
349
|
+
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
|
|
350
|
+
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
|
|
351
|
+
-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
|
|
352
|
+
-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
|
|
353
|
+
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
|
|
354
|
+
-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
|
|
355
|
+
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
|
|
356
|
+
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
|
|
357
|
+
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
|
|
358
|
+
-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
|
|
359
|
+
-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
|
|
360
|
+
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
|
|
361
|
+
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
|
|
362
|
+
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
|
363
|
+
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
|
|
364
|
+
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
|
|
365
|
+
-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
|
|
366
|
+
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
|
|
367
|
+
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
|
|
368
|
+
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
|
369
|
+
-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
|
|
370
|
+
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
|
371
|
+
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
|
|
372
|
+
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
|
373
|
+
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
|
374
|
+
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
|
375
|
+
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
|
|
376
|
+
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
|
|
377
|
+
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
|
|
378
|
+
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
|
379
|
+
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
|
380
|
+
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
|
|
381
|
+
-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
|
|
382
|
+
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
|
|
383
|
+
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
|
384
|
+
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
|
385
|
+
-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
|
|
386
|
+
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
|
387
|
+
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
|
|
388
|
+
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
|
|
389
|
+
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
|
390
|
+
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
|
391
|
+
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
|
392
|
+
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
|
393
|
+
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
|
394
|
+
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
|
395
|
+
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
|
396
|
+
-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
|
|
397
|
+
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
|
398
|
+
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
|
|
399
|
+
-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
|
|
400
|
+
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
|
401
|
+
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
|
402
|
+
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
|
|
403
|
+
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
|
|
404
|
+
-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
|
|
405
|
+
-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
|
|
406
|
+
-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,
|
|
407
|
+
-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,
|
|
408
|
+
-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,
|
|
409
|
+
-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,
|
|
410
|
+
-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
|
|
411
|
+
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
|
412
|
+
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
|
|
413
|
+
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
|
|
414
|
+
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
|
|
415
|
+
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
|
|
416
|
+
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
|
417
|
+
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
|
418
|
+
-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
|
|
419
|
+
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
|
|
420
|
+
-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
|
|
421
|
+
-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
|
|
422
|
+
-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
|
|
423
|
+
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
|
424
|
+
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
|
425
|
+
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
|
|
426
|
+
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
|
427
|
+
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
|
428
|
+
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,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
|
+
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
|
|
433
|
+
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,
|
|
434
|
+
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,
|
|
435
|
+
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
|
436
|
+
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
|
|
437
|
+
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,
|
|
438
|
+
-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
|
|
439
|
+
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
|
|
440
|
+
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Be=function(s,o){switch(s){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+o+` v1759 h347 v-84
|
|
441
|
+
H403z M403 1759 V0 H319 V1759 v`+o+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+o+` v1759 H0 v84 H347z
|
|
442
|
+
M347 1759 V0 H263 V1759 v`+o+" v1759 h84z";case"vert":return"M145 15 v585 v"+o+` v585 c2.667,10,9.667,15,21,15
|
|
443
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-o+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
444
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+o+" v585 h43z";case"doublevert":return"M145 15 v585 v"+o+` v585 c2.667,10,9.667,15,21,15
|
|
445
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-o+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
446
|
+
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+o+` v585 h43z
|
|
447
|
+
M367 15 v585 v`+o+` v585 c2.667,10,9.667,15,21,15
|
|
448
|
+
c10,0,16.667,-5,20,-15 v-585 v`+-o+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
|
449
|
+
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+o+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+o+` v1715 h263 v84 H319z
|
|
450
|
+
MM319 602 V0 H403 V602 v`+o+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+o+` v1799 H0 v-84 H319z
|
|
451
|
+
MM319 602 V0 H403 V602 v`+o+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+o+` v602 h84z
|
|
452
|
+
M403 1759 V0 H319 V1759 v`+o+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+o+` v602 h84z
|
|
453
|
+
M347 1759 V0 h-84 V1759 v`+o+" 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
|
|
454
|
+
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,
|
|
455
|
+
-36,557 l0,`+(o+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
|
456
|
+
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
|
|
457
|
+
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,
|
|
458
|
+
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
|
459
|
+
l0,-`+(o+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
|
460
|
+
-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,
|
|
461
|
+
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
|
462
|
+
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(o+9)+`
|
|
463
|
+
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
|
|
464
|
+
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
|
|
465
|
+
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
|
|
466
|
+
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
467
|
+
l0,-`+(o+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
468
|
+
-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 xe={"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 Se={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]},ze={\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 dt(s,o){xe[s]=o}function at(s,o,l){if(!xe[o])throw new Error("Font metrics not found for font: "+o+".");let h=s.charCodeAt(0),b=xe[o][h];if(!b&&s[0]in ze&&(h=ze[s[0]].charCodeAt(0),b=xe[o][h]),!b&&l==="text"&&we(h)&&(b=xe[o][77]),b)return{depth:b[0],height:b[1],italic:b[2],skew:b[3],width:b[4]}}const $e={};function Le(s){let o;if(s>=5?o=0:s>=3?o=1:o=2,!$e[o]){const l=$e[o]={cssEmPerMu:Se.quad[o]/18};for(const h in Se)Se.hasOwnProperty(h)&&(l[h]=Se[h][o])}return $e[o]}const Ge=[[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]],ht=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],et=function(s,o){return o.size<2?s:Ge[s-1][o.size-1]};class nt{constructor(o){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=o.style,this.color=o.color,this.size=o.size||nt.BASESIZE,this.textSize=o.textSize||this.size,this.phantom=!!o.phantom,this.font=o.font||"",this.fontFamily=o.fontFamily||"",this.fontWeight=o.fontWeight||"",this.fontShape=o.fontShape||"",this.sizeMultiplier=ht[this.size-1],this.maxSize=o.maxSize,this.minRuleThickness=o.minRuleThickness,this._fontMetrics=void 0}extend(o){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 o)o.hasOwnProperty(h)&&(l[h]=o[h]);return new nt(l)}havingStyle(o){return this.style===o?this:this.extend({style:o,size:et(this.textSize,o)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(o){return this.size===o&&this.textSize===o?this:this.extend({style:this.style.text(),size:o,textSize:o,sizeMultiplier:ht[o-1]})}havingBaseStyle(o){o=o||this.style.text();const l=et(nt.BASESIZE,o);return this.size===l&&this.textSize===nt.BASESIZE&&this.style===o?this:this.extend({style:o,size:l})}havingBaseSizing(){let o;switch(this.style.id){case 4:case 5:o=3;break;case 6:case 7:o=1;break;default:o=6}return this.extend({style:this.style.text(),size:o})}withColor(o){return this.extend({color:o})}withPhantom(){return this.extend({phantom:!0})}withFont(o){return this.extend({font:o})}withTextFontFamily(o){return this.extend({fontFamily:o,font:""})}withTextFontWeight(o){return this.extend({fontWeight:o,font:""})}withTextFontShape(o){return this.extend({fontShape:o,font:""})}sizingClasses(o){return o.size!==this.size?["sizing","reset-size"+o.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==nt.BASESIZE?["sizing","reset-size"+this.size,"size"+nt.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Le(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}nt.BASESIZE=6;var Ot=nt;const At={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},Tt={ex:!0,em:!0,mu:!0},Mt=function(s){return typeof s!="string"&&(s=s.unit),s in At||s in Tt||s==="ex"},je=function(s,o){let l;if(s.unit in At)l=At[s.unit]/o.fontMetrics().ptPerEm/o.sizeMultiplier;else if(s.unit==="mu")l=o.fontMetrics().cssEmPerMu;else{let h;if(o.style.isTight()?h=o.havingStyle(o.style.text()):h=o,s.unit==="ex")l=h.fontMetrics().xHeight;else if(s.unit==="em")l=h.fontMetrics().quad;else throw new i("Invalid unit: '"+s.unit+"'");h!==o&&(l*=h.sizeMultiplier/o.sizeMultiplier)}return Math.min(s.number*l,o.maxSize)},he=function(s){return+s.toFixed(4)+"em"},ut=function(s){return s.filter(o=>o).join(" ")},Lt=function(s,o,l){if(this.classes=s||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=l||{},o){o.style.isTight()&&this.classes.push("mtight");const h=o.getColor();h&&(this.style.color=h)}},Pt=function(s){const o=document.createElement(s);o.className=ut(this.classes);for(const l in this.style)this.style.hasOwnProperty(l)&&(o.style[l]=this.style[l]);for(const l in this.attributes)this.attributes.hasOwnProperty(l)&&o.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)o.appendChild(this.children[l].toNode());return o},Bt=/[\s"'>/=\x00-\x1f]/,Ft=function(s){let o="<"+s;this.classes.length&&(o+=' class="'+C.escape(ut(this.classes))+'"');let l="";for(const h in this.style)this.style.hasOwnProperty(h)&&(l+=C.hyphenate(h)+":"+this.style[h]+";");l&&(o+=' style="'+C.escape(l)+'"');for(const h in this.attributes)if(this.attributes.hasOwnProperty(h)){if(Bt.test(h))throw new i("Invalid attribute name '"+h+"'");o+=" "+h+'="'+C.escape(this.attributes[h])+'"'}o+=">";for(let h=0;h<this.children.length;h++)o+=this.children[h].toMarkup();return o+="</"+s+">",o};class Dt{constructor(o,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,Lt.call(this,o,h,b),this.children=l||[]}setAttribute(o,l){this.attributes[o]=l}hasClass(o){return this.classes.includes(o)}toNode(){return Pt.call(this,"span")}toMarkup(){return Ft.call(this,"span")}}class Ht{constructor(o,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,Lt.call(this,l,b),this.children=h||[],this.setAttribute("href",o)}setAttribute(o,l){this.attributes[o]=l}hasClass(o){return this.classes.includes(o)}toNode(){return Pt.call(this,"a")}toMarkup(){return Ft.call(this,"a")}}class or{constructor(o,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=o,this.classes=["mord"],this.style=h}hasClass(o){return this.classes.includes(o)}toNode(){const o=document.createElement("img");o.src=this.src,o.alt=this.alt,o.className="mord";for(const l in this.style)this.style.hasOwnProperty(l)&&(o.style[l]=this.style[l]);return o}toMarkup(){let o='<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&&(o+=' style="'+C.escape(l)+'"'),o+="'/>",o}}const mr={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"};class Rt{constructor(o,l,h,b,E,M,_,U){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=o,this.height=l||0,this.depth=h||0,this.italic=b||0,this.skew=E||0,this.width=M||0,this.classes=_||[],this.style=U||{},this.maxFontSize=0;const ie=me(this.text.charCodeAt(0));ie&&this.classes.push(ie+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=mr[this.text])}hasClass(o){return this.classes.includes(o)}toNode(){const o=document.createTextNode(this.text);let l=null;this.italic>0&&(l=document.createElement("span"),l.style.marginRight=he(this.italic)),this.classes.length>0&&(l=l||document.createElement("span"),l.className=ut(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(o),l):o}toMarkup(){let o=!1,l="<span";this.classes.length&&(o=!0,l+=' class="',l+=C.escape(ut(this.classes)),l+='"');let h="";this.italic>0&&(h+="margin-right:"+this.italic+"em;");for(const E in this.style)this.style.hasOwnProperty(E)&&(h+=C.hyphenate(E)+":"+this.style[E]+";");h&&(o=!0,l+=' style="'+C.escape(h)+'"');const b=C.escape(this.text);return o?(l+=">",l+=b,l+="</span>",l):b}}class Dr{constructor(o,l){this.children=void 0,this.attributes=void 0,this.children=o||[],this.attributes=l||{}}toNode(){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&o.setAttribute(l,this.attributes[l]);for(let l=0;l<this.children.length;l++)o.appendChild(this.children[l].toNode());return o}toMarkup(){let o='<svg xmlns="http://www.w3.org/2000/svg"';for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(o+=" "+l+'="'+C.escape(this.attributes[l])+'"');o+=">";for(let l=0;l<this.children.length;l++)o+=this.children[l].toMarkup();return o+="</svg>",o}}class Nr{constructor(o,l){this.pathName=void 0,this.alternate=void 0,this.pathName=o,this.alternate=l}toNode(){const o=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?o.setAttribute("d",this.alternate):o.setAttribute("d",ke[this.pathName]),o}toMarkup(){return this.alternate?'<path d="'+C.escape(this.alternate)+'"/>':'<path d="'+C.escape(ke[this.pathName])+'"/>'}}class gn{constructor(o){this.attributes=void 0,this.attributes=o||{}}toNode(){const o=document.createElementNS("http://www.w3.org/2000/svg","line");for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&o.setAttribute(l,this.attributes[l]);return o}toMarkup(){let o="<line";for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(o+=" "+l+'="'+C.escape(this.attributes[l])+'"');return o+="/>",o}}function Jt(s){if(s instanceof Rt)return s;throw new Error("Expected symbolNode but got "+String(s)+".")}function kr(s){if(s instanceof Dt)return s;throw new Error("Expected span<HtmlDomNode> but got "+String(s)+".")}const Lr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Er={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},cr={math:{},text:{}};var Et=cr;function y(s,o,l,h,b,E){cr[s][b]={font:o,group:l,replace:h},E&&h&&(cr[s][h]=cr[s][b])}const D="math",Pe="text",$="main",te="ams",lr="accent-token",st="bin",wt="close",vt="inner",ot="mathord",qt="op-token",nr="open",xr="punct",ee="rel",re="spacing",Y="textord";y(D,$,ee,"\u2261","\\equiv",!0),y(D,$,ee,"\u227A","\\prec",!0),y(D,$,ee,"\u227B","\\succ",!0),y(D,$,ee,"\u223C","\\sim",!0),y(D,$,ee,"\u22A5","\\perp"),y(D,$,ee,"\u2AAF","\\preceq",!0),y(D,$,ee,"\u2AB0","\\succeq",!0),y(D,$,ee,"\u2243","\\simeq",!0),y(D,$,ee,"\u2223","\\mid",!0),y(D,$,ee,"\u226A","\\ll",!0),y(D,$,ee,"\u226B","\\gg",!0),y(D,$,ee,"\u224D","\\asymp",!0),y(D,$,ee,"\u2225","\\parallel"),y(D,$,ee,"\u22C8","\\bowtie",!0),y(D,$,ee,"\u2323","\\smile",!0),y(D,$,ee,"\u2291","\\sqsubseteq",!0),y(D,$,ee,"\u2292","\\sqsupseteq",!0),y(D,$,ee,"\u2250","\\doteq",!0),y(D,$,ee,"\u2322","\\frown",!0),y(D,$,ee,"\u220B","\\ni",!0),y(D,$,ee,"\u221D","\\propto",!0),y(D,$,ee,"\u22A2","\\vdash",!0),y(D,$,ee,"\u22A3","\\dashv",!0),y(D,$,ee,"\u220B","\\owns"),y(D,$,xr,".","\\ldotp"),y(D,$,xr,"\u22C5","\\cdotp"),y(D,$,Y,"#","\\#"),y(Pe,$,Y,"#","\\#"),y(D,$,Y,"&","\\&"),y(Pe,$,Y,"&","\\&"),y(D,$,Y,"\u2135","\\aleph",!0),y(D,$,Y,"\u2200","\\forall",!0),y(D,$,Y,"\u210F","\\hbar",!0),y(D,$,Y,"\u2203","\\exists",!0),y(D,$,Y,"\u2207","\\nabla",!0),y(D,$,Y,"\u266D","\\flat",!0),y(D,$,Y,"\u2113","\\ell",!0),y(D,$,Y,"\u266E","\\natural",!0),y(D,$,Y,"\u2663","\\clubsuit",!0),y(D,$,Y,"\u2118","\\wp",!0),y(D,$,Y,"\u266F","\\sharp",!0),y(D,$,Y,"\u2662","\\diamondsuit",!0),y(D,$,Y,"\u211C","\\Re",!0),y(D,$,Y,"\u2661","\\heartsuit",!0),y(D,$,Y,"\u2111","\\Im",!0),y(D,$,Y,"\u2660","\\spadesuit",!0),y(D,$,Y,"\xA7","\\S",!0),y(Pe,$,Y,"\xA7","\\S"),y(D,$,Y,"\xB6","\\P",!0),y(Pe,$,Y,"\xB6","\\P"),y(D,$,Y,"\u2020","\\dag"),y(Pe,$,Y,"\u2020","\\dag"),y(Pe,$,Y,"\u2020","\\textdagger"),y(D,$,Y,"\u2021","\\ddag"),y(Pe,$,Y,"\u2021","\\ddag"),y(Pe,$,Y,"\u2021","\\textdaggerdbl"),y(D,$,wt,"\u23B1","\\rmoustache",!0),y(D,$,nr,"\u23B0","\\lmoustache",!0),y(D,$,wt,"\u27EF","\\rgroup",!0),y(D,$,nr,"\u27EE","\\lgroup",!0),y(D,$,st,"\u2213","\\mp",!0),y(D,$,st,"\u2296","\\ominus",!0),y(D,$,st,"\u228E","\\uplus",!0),y(D,$,st,"\u2293","\\sqcap",!0),y(D,$,st,"\u2217","\\ast"),y(D,$,st,"\u2294","\\sqcup",!0),y(D,$,st,"\u25EF","\\bigcirc",!0),y(D,$,st,"\u2219","\\bullet",!0),y(D,$,st,"\u2021","\\ddagger"),y(D,$,st,"\u2240","\\wr",!0),y(D,$,st,"\u2A3F","\\amalg"),y(D,$,st,"&","\\And"),y(D,$,ee,"\u27F5","\\longleftarrow",!0),y(D,$,ee,"\u21D0","\\Leftarrow",!0),y(D,$,ee,"\u27F8","\\Longleftarrow",!0),y(D,$,ee,"\u27F6","\\longrightarrow",!0),y(D,$,ee,"\u21D2","\\Rightarrow",!0),y(D,$,ee,"\u27F9","\\Longrightarrow",!0),y(D,$,ee,"\u2194","\\leftrightarrow",!0),y(D,$,ee,"\u27F7","\\longleftrightarrow",!0),y(D,$,ee,"\u21D4","\\Leftrightarrow",!0),y(D,$,ee,"\u27FA","\\Longleftrightarrow",!0),y(D,$,ee,"\u21A6","\\mapsto",!0),y(D,$,ee,"\u27FC","\\longmapsto",!0),y(D,$,ee,"\u2197","\\nearrow",!0),y(D,$,ee,"\u21A9","\\hookleftarrow",!0),y(D,$,ee,"\u21AA","\\hookrightarrow",!0),y(D,$,ee,"\u2198","\\searrow",!0),y(D,$,ee,"\u21BC","\\leftharpoonup",!0),y(D,$,ee,"\u21C0","\\rightharpoonup",!0),y(D,$,ee,"\u2199","\\swarrow",!0),y(D,$,ee,"\u21BD","\\leftharpoondown",!0),y(D,$,ee,"\u21C1","\\rightharpoondown",!0),y(D,$,ee,"\u2196","\\nwarrow",!0),y(D,$,ee,"\u21CC","\\rightleftharpoons",!0),y(D,te,ee,"\u226E","\\nless",!0),y(D,te,ee,"\uE010","\\@nleqslant"),y(D,te,ee,"\uE011","\\@nleqq"),y(D,te,ee,"\u2A87","\\lneq",!0),y(D,te,ee,"\u2268","\\lneqq",!0),y(D,te,ee,"\uE00C","\\@lvertneqq"),y(D,te,ee,"\u22E6","\\lnsim",!0),y(D,te,ee,"\u2A89","\\lnapprox",!0),y(D,te,ee,"\u2280","\\nprec",!0),y(D,te,ee,"\u22E0","\\npreceq",!0),y(D,te,ee,"\u22E8","\\precnsim",!0),y(D,te,ee,"\u2AB9","\\precnapprox",!0),y(D,te,ee,"\u2241","\\nsim",!0),y(D,te,ee,"\uE006","\\@nshortmid"),y(D,te,ee,"\u2224","\\nmid",!0),y(D,te,ee,"\u22AC","\\nvdash",!0),y(D,te,ee,"\u22AD","\\nvDash",!0),y(D,te,ee,"\u22EA","\\ntriangleleft"),y(D,te,ee,"\u22EC","\\ntrianglelefteq",!0),y(D,te,ee,"\u228A","\\subsetneq",!0),y(D,te,ee,"\uE01A","\\@varsubsetneq"),y(D,te,ee,"\u2ACB","\\subsetneqq",!0),y(D,te,ee,"\uE017","\\@varsubsetneqq"),y(D,te,ee,"\u226F","\\ngtr",!0),y(D,te,ee,"\uE00F","\\@ngeqslant"),y(D,te,ee,"\uE00E","\\@ngeqq"),y(D,te,ee,"\u2A88","\\gneq",!0),y(D,te,ee,"\u2269","\\gneqq",!0),y(D,te,ee,"\uE00D","\\@gvertneqq"),y(D,te,ee,"\u22E7","\\gnsim",!0),y(D,te,ee,"\u2A8A","\\gnapprox",!0),y(D,te,ee,"\u2281","\\nsucc",!0),y(D,te,ee,"\u22E1","\\nsucceq",!0),y(D,te,ee,"\u22E9","\\succnsim",!0),y(D,te,ee,"\u2ABA","\\succnapprox",!0),y(D,te,ee,"\u2246","\\ncong",!0),y(D,te,ee,"\uE007","\\@nshortparallel"),y(D,te,ee,"\u2226","\\nparallel",!0),y(D,te,ee,"\u22AF","\\nVDash",!0),y(D,te,ee,"\u22EB","\\ntriangleright"),y(D,te,ee,"\u22ED","\\ntrianglerighteq",!0),y(D,te,ee,"\uE018","\\@nsupseteqq"),y(D,te,ee,"\u228B","\\supsetneq",!0),y(D,te,ee,"\uE01B","\\@varsupsetneq"),y(D,te,ee,"\u2ACC","\\supsetneqq",!0),y(D,te,ee,"\uE019","\\@varsupsetneqq"),y(D,te,ee,"\u22AE","\\nVdash",!0),y(D,te,ee,"\u2AB5","\\precneqq",!0),y(D,te,ee,"\u2AB6","\\succneqq",!0),y(D,te,ee,"\uE016","\\@nsubseteqq"),y(D,te,st,"\u22B4","\\unlhd"),y(D,te,st,"\u22B5","\\unrhd"),y(D,te,ee,"\u219A","\\nleftarrow",!0),y(D,te,ee,"\u219B","\\nrightarrow",!0),y(D,te,ee,"\u21CD","\\nLeftarrow",!0),y(D,te,ee,"\u21CF","\\nRightarrow",!0),y(D,te,ee,"\u21AE","\\nleftrightarrow",!0),y(D,te,ee,"\u21CE","\\nLeftrightarrow",!0),y(D,te,ee,"\u25B3","\\vartriangle"),y(D,te,Y,"\u210F","\\hslash"),y(D,te,Y,"\u25BD","\\triangledown"),y(D,te,Y,"\u25CA","\\lozenge"),y(D,te,Y,"\u24C8","\\circledS"),y(D,te,Y,"\xAE","\\circledR"),y(Pe,te,Y,"\xAE","\\circledR"),y(D,te,Y,"\u2221","\\measuredangle",!0),y(D,te,Y,"\u2204","\\nexists"),y(D,te,Y,"\u2127","\\mho"),y(D,te,Y,"\u2132","\\Finv",!0),y(D,te,Y,"\u2141","\\Game",!0),y(D,te,Y,"\u2035","\\backprime"),y(D,te,Y,"\u25B2","\\blacktriangle"),y(D,te,Y,"\u25BC","\\blacktriangledown"),y(D,te,Y,"\u25A0","\\blacksquare"),y(D,te,Y,"\u29EB","\\blacklozenge"),y(D,te,Y,"\u2605","\\bigstar"),y(D,te,Y,"\u2222","\\sphericalangle",!0),y(D,te,Y,"\u2201","\\complement",!0),y(D,te,Y,"\xF0","\\eth",!0),y(Pe,$,Y,"\xF0","\xF0"),y(D,te,Y,"\u2571","\\diagup"),y(D,te,Y,"\u2572","\\diagdown"),y(D,te,Y,"\u25A1","\\square"),y(D,te,Y,"\u25A1","\\Box"),y(D,te,Y,"\u25CA","\\Diamond"),y(D,te,Y,"\xA5","\\yen",!0),y(Pe,te,Y,"\xA5","\\yen",!0),y(D,te,Y,"\u2713","\\checkmark",!0),y(Pe,te,Y,"\u2713","\\checkmark"),y(D,te,Y,"\u2136","\\beth",!0),y(D,te,Y,"\u2138","\\daleth",!0),y(D,te,Y,"\u2137","\\gimel",!0),y(D,te,Y,"\u03DD","\\digamma",!0),y(D,te,Y,"\u03F0","\\varkappa"),y(D,te,nr,"\u250C","\\@ulcorner",!0),y(D,te,wt,"\u2510","\\@urcorner",!0),y(D,te,nr,"\u2514","\\@llcorner",!0),y(D,te,wt,"\u2518","\\@lrcorner",!0),y(D,te,ee,"\u2266","\\leqq",!0),y(D,te,ee,"\u2A7D","\\leqslant",!0),y(D,te,ee,"\u2A95","\\eqslantless",!0),y(D,te,ee,"\u2272","\\lesssim",!0),y(D,te,ee,"\u2A85","\\lessapprox",!0),y(D,te,ee,"\u224A","\\approxeq",!0),y(D,te,st,"\u22D6","\\lessdot"),y(D,te,ee,"\u22D8","\\lll",!0),y(D,te,ee,"\u2276","\\lessgtr",!0),y(D,te,ee,"\u22DA","\\lesseqgtr",!0),y(D,te,ee,"\u2A8B","\\lesseqqgtr",!0),y(D,te,ee,"\u2251","\\doteqdot"),y(D,te,ee,"\u2253","\\risingdotseq",!0),y(D,te,ee,"\u2252","\\fallingdotseq",!0),y(D,te,ee,"\u223D","\\backsim",!0),y(D,te,ee,"\u22CD","\\backsimeq",!0),y(D,te,ee,"\u2AC5","\\subseteqq",!0),y(D,te,ee,"\u22D0","\\Subset",!0),y(D,te,ee,"\u228F","\\sqsubset",!0),y(D,te,ee,"\u227C","\\preccurlyeq",!0),y(D,te,ee,"\u22DE","\\curlyeqprec",!0),y(D,te,ee,"\u227E","\\precsim",!0),y(D,te,ee,"\u2AB7","\\precapprox",!0),y(D,te,ee,"\u22B2","\\vartriangleleft"),y(D,te,ee,"\u22B4","\\trianglelefteq"),y(D,te,ee,"\u22A8","\\vDash",!0),y(D,te,ee,"\u22AA","\\Vvdash",!0),y(D,te,ee,"\u2323","\\smallsmile"),y(D,te,ee,"\u2322","\\smallfrown"),y(D,te,ee,"\u224F","\\bumpeq",!0),y(D,te,ee,"\u224E","\\Bumpeq",!0),y(D,te,ee,"\u2267","\\geqq",!0),y(D,te,ee,"\u2A7E","\\geqslant",!0),y(D,te,ee,"\u2A96","\\eqslantgtr",!0),y(D,te,ee,"\u2273","\\gtrsim",!0),y(D,te,ee,"\u2A86","\\gtrapprox",!0),y(D,te,st,"\u22D7","\\gtrdot"),y(D,te,ee,"\u22D9","\\ggg",!0),y(D,te,ee,"\u2277","\\gtrless",!0),y(D,te,ee,"\u22DB","\\gtreqless",!0),y(D,te,ee,"\u2A8C","\\gtreqqless",!0),y(D,te,ee,"\u2256","\\eqcirc",!0),y(D,te,ee,"\u2257","\\circeq",!0),y(D,te,ee,"\u225C","\\triangleq",!0),y(D,te,ee,"\u223C","\\thicksim"),y(D,te,ee,"\u2248","\\thickapprox"),y(D,te,ee,"\u2AC6","\\supseteqq",!0),y(D,te,ee,"\u22D1","\\Supset",!0),y(D,te,ee,"\u2290","\\sqsupset",!0),y(D,te,ee,"\u227D","\\succcurlyeq",!0),y(D,te,ee,"\u22DF","\\curlyeqsucc",!0),y(D,te,ee,"\u227F","\\succsim",!0),y(D,te,ee,"\u2AB8","\\succapprox",!0),y(D,te,ee,"\u22B3","\\vartriangleright"),y(D,te,ee,"\u22B5","\\trianglerighteq"),y(D,te,ee,"\u22A9","\\Vdash",!0),y(D,te,ee,"\u2223","\\shortmid"),y(D,te,ee,"\u2225","\\shortparallel"),y(D,te,ee,"\u226C","\\between",!0),y(D,te,ee,"\u22D4","\\pitchfork",!0),y(D,te,ee,"\u221D","\\varpropto"),y(D,te,ee,"\u25C0","\\blacktriangleleft"),y(D,te,ee,"\u2234","\\therefore",!0),y(D,te,ee,"\u220D","\\backepsilon"),y(D,te,ee,"\u25B6","\\blacktriangleright"),y(D,te,ee,"\u2235","\\because",!0),y(D,te,ee,"\u22D8","\\llless"),y(D,te,ee,"\u22D9","\\gggtr"),y(D,te,st,"\u22B2","\\lhd"),y(D,te,st,"\u22B3","\\rhd"),y(D,te,ee,"\u2242","\\eqsim",!0),y(D,$,ee,"\u22C8","\\Join"),y(D,te,ee,"\u2251","\\Doteq",!0),y(D,te,st,"\u2214","\\dotplus",!0),y(D,te,st,"\u2216","\\smallsetminus"),y(D,te,st,"\u22D2","\\Cap",!0),y(D,te,st,"\u22D3","\\Cup",!0),y(D,te,st,"\u2A5E","\\doublebarwedge",!0),y(D,te,st,"\u229F","\\boxminus",!0),y(D,te,st,"\u229E","\\boxplus",!0),y(D,te,st,"\u22C7","\\divideontimes",!0),y(D,te,st,"\u22C9","\\ltimes",!0),y(D,te,st,"\u22CA","\\rtimes",!0),y(D,te,st,"\u22CB","\\leftthreetimes",!0),y(D,te,st,"\u22CC","\\rightthreetimes",!0),y(D,te,st,"\u22CF","\\curlywedge",!0),y(D,te,st,"\u22CE","\\curlyvee",!0),y(D,te,st,"\u229D","\\circleddash",!0),y(D,te,st,"\u229B","\\circledast",!0),y(D,te,st,"\u22C5","\\centerdot"),y(D,te,st,"\u22BA","\\intercal",!0),y(D,te,st,"\u22D2","\\doublecap"),y(D,te,st,"\u22D3","\\doublecup"),y(D,te,st,"\u22A0","\\boxtimes",!0),y(D,te,ee,"\u21E2","\\dashrightarrow",!0),y(D,te,ee,"\u21E0","\\dashleftarrow",!0),y(D,te,ee,"\u21C7","\\leftleftarrows",!0),y(D,te,ee,"\u21C6","\\leftrightarrows",!0),y(D,te,ee,"\u21DA","\\Lleftarrow",!0),y(D,te,ee,"\u219E","\\twoheadleftarrow",!0),y(D,te,ee,"\u21A2","\\leftarrowtail",!0),y(D,te,ee,"\u21AB","\\looparrowleft",!0),y(D,te,ee,"\u21CB","\\leftrightharpoons",!0),y(D,te,ee,"\u21B6","\\curvearrowleft",!0),y(D,te,ee,"\u21BA","\\circlearrowleft",!0),y(D,te,ee,"\u21B0","\\Lsh",!0),y(D,te,ee,"\u21C8","\\upuparrows",!0),y(D,te,ee,"\u21BF","\\upharpoonleft",!0),y(D,te,ee,"\u21C3","\\downharpoonleft",!0),y(D,$,ee,"\u22B6","\\origof",!0),y(D,$,ee,"\u22B7","\\imageof",!0),y(D,te,ee,"\u22B8","\\multimap",!0),y(D,te,ee,"\u21AD","\\leftrightsquigarrow",!0),y(D,te,ee,"\u21C9","\\rightrightarrows",!0),y(D,te,ee,"\u21C4","\\rightleftarrows",!0),y(D,te,ee,"\u21A0","\\twoheadrightarrow",!0),y(D,te,ee,"\u21A3","\\rightarrowtail",!0),y(D,te,ee,"\u21AC","\\looparrowright",!0),y(D,te,ee,"\u21B7","\\curvearrowright",!0),y(D,te,ee,"\u21BB","\\circlearrowright",!0),y(D,te,ee,"\u21B1","\\Rsh",!0),y(D,te,ee,"\u21CA","\\downdownarrows",!0),y(D,te,ee,"\u21BE","\\upharpoonright",!0),y(D,te,ee,"\u21C2","\\downharpoonright",!0),y(D,te,ee,"\u21DD","\\rightsquigarrow",!0),y(D,te,ee,"\u21DD","\\leadsto"),y(D,te,ee,"\u21DB","\\Rrightarrow",!0),y(D,te,ee,"\u21BE","\\restriction"),y(D,$,Y,"\u2018","`"),y(D,$,Y,"$","\\$"),y(Pe,$,Y,"$","\\$"),y(Pe,$,Y,"$","\\textdollar"),y(D,$,Y,"%","\\%"),y(Pe,$,Y,"%","\\%"),y(D,$,Y,"_","\\_"),y(Pe,$,Y,"_","\\_"),y(Pe,$,Y,"_","\\textunderscore"),y(D,$,Y,"\u2220","\\angle",!0),y(D,$,Y,"\u221E","\\infty",!0),y(D,$,Y,"\u2032","\\prime"),y(D,$,Y,"\u25B3","\\triangle"),y(D,$,Y,"\u0393","\\Gamma",!0),y(D,$,Y,"\u0394","\\Delta",!0),y(D,$,Y,"\u0398","\\Theta",!0),y(D,$,Y,"\u039B","\\Lambda",!0),y(D,$,Y,"\u039E","\\Xi",!0),y(D,$,Y,"\u03A0","\\Pi",!0),y(D,$,Y,"\u03A3","\\Sigma",!0),y(D,$,Y,"\u03A5","\\Upsilon",!0),y(D,$,Y,"\u03A6","\\Phi",!0),y(D,$,Y,"\u03A8","\\Psi",!0),y(D,$,Y,"\u03A9","\\Omega",!0),y(D,$,Y,"A","\u0391"),y(D,$,Y,"B","\u0392"),y(D,$,Y,"E","\u0395"),y(D,$,Y,"Z","\u0396"),y(D,$,Y,"H","\u0397"),y(D,$,Y,"I","\u0399"),y(D,$,Y,"K","\u039A"),y(D,$,Y,"M","\u039C"),y(D,$,Y,"N","\u039D"),y(D,$,Y,"O","\u039F"),y(D,$,Y,"P","\u03A1"),y(D,$,Y,"T","\u03A4"),y(D,$,Y,"X","\u03A7"),y(D,$,Y,"\xAC","\\neg",!0),y(D,$,Y,"\xAC","\\lnot"),y(D,$,Y,"\u22A4","\\top"),y(D,$,Y,"\u22A5","\\bot"),y(D,$,Y,"\u2205","\\emptyset"),y(D,te,Y,"\u2205","\\varnothing"),y(D,$,ot,"\u03B1","\\alpha",!0),y(D,$,ot,"\u03B2","\\beta",!0),y(D,$,ot,"\u03B3","\\gamma",!0),y(D,$,ot,"\u03B4","\\delta",!0),y(D,$,ot,"\u03F5","\\epsilon",!0),y(D,$,ot,"\u03B6","\\zeta",!0),y(D,$,ot,"\u03B7","\\eta",!0),y(D,$,ot,"\u03B8","\\theta",!0),y(D,$,ot,"\u03B9","\\iota",!0),y(D,$,ot,"\u03BA","\\kappa",!0),y(D,$,ot,"\u03BB","\\lambda",!0),y(D,$,ot,"\u03BC","\\mu",!0),y(D,$,ot,"\u03BD","\\nu",!0),y(D,$,ot,"\u03BE","\\xi",!0),y(D,$,ot,"\u03BF","\\omicron",!0),y(D,$,ot,"\u03C0","\\pi",!0),y(D,$,ot,"\u03C1","\\rho",!0),y(D,$,ot,"\u03C3","\\sigma",!0),y(D,$,ot,"\u03C4","\\tau",!0),y(D,$,ot,"\u03C5","\\upsilon",!0),y(D,$,ot,"\u03D5","\\phi",!0),y(D,$,ot,"\u03C7","\\chi",!0),y(D,$,ot,"\u03C8","\\psi",!0),y(D,$,ot,"\u03C9","\\omega",!0),y(D,$,ot,"\u03B5","\\varepsilon",!0),y(D,$,ot,"\u03D1","\\vartheta",!0),y(D,$,ot,"\u03D6","\\varpi",!0),y(D,$,ot,"\u03F1","\\varrho",!0),y(D,$,ot,"\u03C2","\\varsigma",!0),y(D,$,ot,"\u03C6","\\varphi",!0),y(D,$,st,"\u2217","*",!0),y(D,$,st,"+","+"),y(D,$,st,"\u2212","-",!0),y(D,$,st,"\u22C5","\\cdot",!0),y(D,$,st,"\u2218","\\circ",!0),y(D,$,st,"\xF7","\\div",!0),y(D,$,st,"\xB1","\\pm",!0),y(D,$,st,"\xD7","\\times",!0),y(D,$,st,"\u2229","\\cap",!0),y(D,$,st,"\u222A","\\cup",!0),y(D,$,st,"\u2216","\\setminus",!0),y(D,$,st,"\u2227","\\land"),y(D,$,st,"\u2228","\\lor"),y(D,$,st,"\u2227","\\wedge",!0),y(D,$,st,"\u2228","\\vee",!0),y(D,$,Y,"\u221A","\\surd"),y(D,$,nr,"\u27E8","\\langle",!0),y(D,$,nr,"\u2223","\\lvert"),y(D,$,nr,"\u2225","\\lVert"),y(D,$,wt,"?","?"),y(D,$,wt,"!","!"),y(D,$,wt,"\u27E9","\\rangle",!0),y(D,$,wt,"\u2223","\\rvert"),y(D,$,wt,"\u2225","\\rVert"),y(D,$,ee,"=","="),y(D,$,ee,":",":"),y(D,$,ee,"\u2248","\\approx",!0),y(D,$,ee,"\u2245","\\cong",!0),y(D,$,ee,"\u2265","\\ge"),y(D,$,ee,"\u2265","\\geq",!0),y(D,$,ee,"\u2190","\\gets"),y(D,$,ee,">","\\gt",!0),y(D,$,ee,"\u2208","\\in",!0),y(D,$,ee,"\uE020","\\@not"),y(D,$,ee,"\u2282","\\subset",!0),y(D,$,ee,"\u2283","\\supset",!0),y(D,$,ee,"\u2286","\\subseteq",!0),y(D,$,ee,"\u2287","\\supseteq",!0),y(D,te,ee,"\u2288","\\nsubseteq",!0),y(D,te,ee,"\u2289","\\nsupseteq",!0),y(D,$,ee,"\u22A8","\\models"),y(D,$,ee,"\u2190","\\leftarrow",!0),y(D,$,ee,"\u2264","\\le"),y(D,$,ee,"\u2264","\\leq",!0),y(D,$,ee,"<","\\lt",!0),y(D,$,ee,"\u2192","\\rightarrow",!0),y(D,$,ee,"\u2192","\\to"),y(D,te,ee,"\u2271","\\ngeq",!0),y(D,te,ee,"\u2270","\\nleq",!0),y(D,$,re,"\xA0","\\ "),y(D,$,re,"\xA0","\\space"),y(D,$,re,"\xA0","\\nobreakspace"),y(Pe,$,re,"\xA0","\\ "),y(Pe,$,re,"\xA0"," "),y(Pe,$,re,"\xA0","\\space"),y(Pe,$,re,"\xA0","\\nobreakspace"),y(D,$,re,null,"\\nobreak"),y(D,$,re,null,"\\allowbreak"),y(D,$,xr,",",","),y(D,$,xr,";",";"),y(D,te,st,"\u22BC","\\barwedge",!0),y(D,te,st,"\u22BB","\\veebar",!0),y(D,$,st,"\u2299","\\odot",!0),y(D,$,st,"\u2295","\\oplus",!0),y(D,$,st,"\u2297","\\otimes",!0),y(D,$,Y,"\u2202","\\partial",!0),y(D,$,st,"\u2298","\\oslash",!0),y(D,te,st,"\u229A","\\circledcirc",!0),y(D,te,st,"\u22A1","\\boxdot",!0),y(D,$,st,"\u25B3","\\bigtriangleup"),y(D,$,st,"\u25BD","\\bigtriangledown"),y(D,$,st,"\u2020","\\dagger"),y(D,$,st,"\u22C4","\\diamond"),y(D,$,st,"\u22C6","\\star"),y(D,$,st,"\u25C3","\\triangleleft"),y(D,$,st,"\u25B9","\\triangleright"),y(D,$,nr,"{","\\{"),y(Pe,$,Y,"{","\\{"),y(Pe,$,Y,"{","\\textbraceleft"),y(D,$,wt,"}","\\}"),y(Pe,$,Y,"}","\\}"),y(Pe,$,Y,"}","\\textbraceright"),y(D,$,nr,"{","\\lbrace"),y(D,$,wt,"}","\\rbrace"),y(D,$,nr,"[","\\lbrack",!0),y(Pe,$,Y,"[","\\lbrack",!0),y(D,$,wt,"]","\\rbrack",!0),y(Pe,$,Y,"]","\\rbrack",!0),y(D,$,nr,"(","\\lparen",!0),y(D,$,wt,")","\\rparen",!0),y(Pe,$,Y,"<","\\textless",!0),y(Pe,$,Y,">","\\textgreater",!0),y(D,$,nr,"\u230A","\\lfloor",!0),y(D,$,wt,"\u230B","\\rfloor",!0),y(D,$,nr,"\u2308","\\lceil",!0),y(D,$,wt,"\u2309","\\rceil",!0),y(D,$,Y,"\\","\\backslash"),y(D,$,Y,"\u2223","|"),y(D,$,Y,"\u2223","\\vert"),y(Pe,$,Y,"|","\\textbar",!0),y(D,$,Y,"\u2225","\\|"),y(D,$,Y,"\u2225","\\Vert"),y(Pe,$,Y,"\u2225","\\textbardbl"),y(Pe,$,Y,"~","\\textasciitilde"),y(Pe,$,Y,"\\","\\textbackslash"),y(Pe,$,Y,"^","\\textasciicircum"),y(D,$,ee,"\u2191","\\uparrow",!0),y(D,$,ee,"\u21D1","\\Uparrow",!0),y(D,$,ee,"\u2193","\\downarrow",!0),y(D,$,ee,"\u21D3","\\Downarrow",!0),y(D,$,ee,"\u2195","\\updownarrow",!0),y(D,$,ee,"\u21D5","\\Updownarrow",!0),y(D,$,qt,"\u2210","\\coprod"),y(D,$,qt,"\u22C1","\\bigvee"),y(D,$,qt,"\u22C0","\\bigwedge"),y(D,$,qt,"\u2A04","\\biguplus"),y(D,$,qt,"\u22C2","\\bigcap"),y(D,$,qt,"\u22C3","\\bigcup"),y(D,$,qt,"\u222B","\\int"),y(D,$,qt,"\u222B","\\intop"),y(D,$,qt,"\u222C","\\iint"),y(D,$,qt,"\u222D","\\iiint"),y(D,$,qt,"\u220F","\\prod"),y(D,$,qt,"\u2211","\\sum"),y(D,$,qt,"\u2A02","\\bigotimes"),y(D,$,qt,"\u2A01","\\bigoplus"),y(D,$,qt,"\u2A00","\\bigodot"),y(D,$,qt,"\u222E","\\oint"),y(D,$,qt,"\u222F","\\oiint"),y(D,$,qt,"\u2230","\\oiiint"),y(D,$,qt,"\u2A06","\\bigsqcup"),y(D,$,qt,"\u222B","\\smallint"),y(Pe,$,vt,"\u2026","\\textellipsis"),y(D,$,vt,"\u2026","\\mathellipsis"),y(Pe,$,vt,"\u2026","\\ldots",!0),y(D,$,vt,"\u2026","\\ldots",!0),y(D,$,vt,"\u22EF","\\@cdots",!0),y(D,$,vt,"\u22F1","\\ddots",!0),y(D,$,Y,"\u22EE","\\varvdots"),y(Pe,$,Y,"\u22EE","\\varvdots"),y(D,$,lr,"\u02CA","\\acute"),y(D,$,lr,"\u02CB","\\grave"),y(D,$,lr,"\xA8","\\ddot"),y(D,$,lr,"~","\\tilde"),y(D,$,lr,"\u02C9","\\bar"),y(D,$,lr,"\u02D8","\\breve"),y(D,$,lr,"\u02C7","\\check"),y(D,$,lr,"^","\\hat"),y(D,$,lr,"\u20D7","\\vec"),y(D,$,lr,"\u02D9","\\dot"),y(D,$,lr,"\u02DA","\\mathring"),y(D,$,ot,"\uE131","\\@imath"),y(D,$,ot,"\uE237","\\@jmath"),y(D,$,Y,"\u0131","\u0131"),y(D,$,Y,"\u0237","\u0237"),y(Pe,$,Y,"\u0131","\\i",!0),y(Pe,$,Y,"\u0237","\\j",!0),y(Pe,$,Y,"\xDF","\\ss",!0),y(Pe,$,Y,"\xE6","\\ae",!0),y(Pe,$,Y,"\u0153","\\oe",!0),y(Pe,$,Y,"\xF8","\\o",!0),y(Pe,$,Y,"\xC6","\\AE",!0),y(Pe,$,Y,"\u0152","\\OE",!0),y(Pe,$,Y,"\xD8","\\O",!0),y(Pe,$,lr,"\u02CA","\\'"),y(Pe,$,lr,"\u02CB","\\`"),y(Pe,$,lr,"\u02C6","\\^"),y(Pe,$,lr,"\u02DC","\\~"),y(Pe,$,lr,"\u02C9","\\="),y(Pe,$,lr,"\u02D8","\\u"),y(Pe,$,lr,"\u02D9","\\."),y(Pe,$,lr,"\xB8","\\c"),y(Pe,$,lr,"\u02DA","\\r"),y(Pe,$,lr,"\u02C7","\\v"),y(Pe,$,lr,"\xA8",'\\"'),y(Pe,$,lr,"\u02DD","\\H"),y(Pe,$,lr,"\u25EF","\\textcircled");const tt={"--":!0,"---":!0,"``":!0,"''":!0};y(Pe,$,Y,"\u2013","--",!0),y(Pe,$,Y,"\u2013","\\textendash"),y(Pe,$,Y,"\u2014","---",!0),y(Pe,$,Y,"\u2014","\\textemdash"),y(Pe,$,Y,"\u2018","`",!0),y(Pe,$,Y,"\u2018","\\textquoteleft"),y(Pe,$,Y,"\u2019","'",!0),y(Pe,$,Y,"\u2019","\\textquoteright"),y(Pe,$,Y,"\u201C","``",!0),y(Pe,$,Y,"\u201C","\\textquotedblleft"),y(Pe,$,Y,"\u201D","''",!0),y(Pe,$,Y,"\u201D","\\textquotedblright"),y(D,$,Y,"\xB0","\\degree",!0),y(Pe,$,Y,"\xB0","\\degree"),y(Pe,$,Y,"\xB0","\\textdegree",!0),y(D,$,Y,"\xA3","\\pounds"),y(D,$,Y,"\xA3","\\mathsterling",!0),y(Pe,$,Y,"\xA3","\\pounds"),y(Pe,$,Y,"\xA3","\\textsterling",!0),y(D,te,Y,"\u2720","\\maltese"),y(Pe,te,Y,"\u2720","\\maltese");const Ut='0123456789/@."';for(let s=0;s<Ut.length;s++){const o=Ut.charAt(s);y(D,$,Y,o,o)}const ft='0123456789!@*()-=+";:?/.,';for(let s=0;s<ft.length;s++){const o=ft.charAt(s);y(Pe,$,Y,o,o)}const It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let s=0;s<It.length;s++){const o=It.charAt(s);y(D,$,ot,o,o),y(Pe,$,Y,o,o)}y(D,te,Y,"C","\u2102"),y(Pe,te,Y,"C","\u2102"),y(D,te,Y,"H","\u210D"),y(Pe,te,Y,"H","\u210D"),y(D,te,Y,"N","\u2115"),y(Pe,te,Y,"N","\u2115"),y(D,te,Y,"P","\u2119"),y(Pe,te,Y,"P","\u2119"),y(D,te,Y,"Q","\u211A"),y(Pe,te,Y,"Q","\u211A"),y(D,te,Y,"R","\u211D"),y(Pe,te,Y,"R","\u211D"),y(D,te,Y,"Z","\u2124"),y(Pe,te,Y,"Z","\u2124"),y(D,$,ot,"h","\u210E"),y(Pe,$,ot,"h","\u210E");let bt="";for(let s=0;s<It.length;s++){const o=It.charAt(s);bt=String.fromCharCode(55349,56320+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56372+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56424+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56580+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56684+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56736+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56788+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56840+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56944+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),s<26&&(bt=String.fromCharCode(55349,56632+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,56476+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt))}bt="\u{1D55C}",y(D,$,ot,"k",bt),y(Pe,$,Y,"k",bt);for(let s=0;s<10;s++){const o=s.toString();bt=String.fromCharCode(55349,57294+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,57314+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,57324+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt),bt=String.fromCharCode(55349,57334+s),y(D,$,ot,o,bt),y(Pe,$,Y,o,bt)}const Ir="\xD0\xDE\xFE";for(let s=0;s<Ir.length;s++){const o=Ir.charAt(s);y(D,$,ot,o,o),y(Pe,$,Y,o,o)}const Hr=[["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"]],In=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Rr=function(s,o){const l=s.charCodeAt(0),h=s.charCodeAt(1),b=(l-55296)*1024+(h-56320)+65536,E=o==="math"?0:1;if(119808<=b&&b<120484){const M=Math.floor((b-119808)/26);return[Hr[M][2],Hr[M][E]]}else if(120782<=b&&b<=120831){const M=Math.floor((b-120782)/10);return[In[M][2],In[M][E]]}else{if(b===120485||b===120486)return[Hr[0][2],Hr[0][E]];if(120486<b&&b<120782)return["",""];throw new i("Unsupported character: "+s)}};class Cn{constructor(o){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=o,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(o){return this.classes.includes(o)}toNode(){const o=document.createDocumentFragment();for(let l=0;l<this.children.length;l++)o.appendChild(this.children[l].toNode());return o}toMarkup(){let o="";for(let l=0;l<this.children.length;l++)o+=this.children[l].toMarkup();return o}toText(){const o=l=>l.toText();return this.children.map(o).join("")}}const Dn=function(s,o,l){return Et[l][s]&&Et[l][s].replace&&(s=Et[l][s].replace),{value:s,metrics:at(s,o,l)}},oe=function(s,o,l,h,b){const E=Dn(s,o,l),M=E.metrics;s=E.value;let _;if(M){let U=M.italic;(l==="text"||h&&h.font==="mathit")&&(U=0),_=new Rt(s,M.height,M.depth,U,M.skew,M.width,b)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+s+"' in style '"+o+"' and mode '"+l+"'")),_=new Rt(s,0,0,0,0,0,b);if(h){_.maxFontSize=h.sizeMultiplier,h.style.isTight()&&_.classes.push("mtight");const U=h.getColor();U&&(_.style.color=U)}return _},Re=function(s,o,l,h){return h===void 0&&(h=[]),l.font==="boldsymbol"&&Dn(s,"Main-Bold",o).metrics?oe(s,"Main-Bold",o,l,h.concat(["mathbf"])):s==="\\"||Et[o][s].font==="main"?oe(s,"Main-Regular",o,l,h):oe(s,"AMS-Regular",o,l,h.concat(["amsrm"]))},pt=function(s,o,l,h,b){return b!=="textord"&&Dn(s,"Math-BoldItalic",o).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Xe=function(s,o,l){const h=s.mode,b=s.text,E=["mord"],M=h==="math"||h==="text"&&o.font,_=M?o.font:o.fontFamily;let U="",ie="";if(b.charCodeAt(0)===55349&&([U,ie]=Rr(b,h)),U.length>0)return oe(b,U,h,o,E.concat(ie));if(_){let ve,ye;if(_==="boldsymbol"){const Ae=pt(b,h,o,E,l);ve=Ae.fontName,ye=[Ae.fontClass]}else M?(ve=Ur[_].fontName,ye=[_]):(ve=_t(_,o.fontWeight,o.fontShape),ye=[_,o.fontWeight,o.fontShape]);if(Dn(b,ve,h).metrics)return oe(b,ve,h,o,E.concat(ye));if(tt.hasOwnProperty(b)&&ve.slice(0,10)==="Typewriter"){const Ae=[];for(let Je=0;Je<b.length;Je++)Ae.push(oe(b[Je],ve,h,o,E.concat(ye)));return ct(Ae)}}if(l==="mathord")return oe(b,"Math-Italic",h,o,E.concat(["mathnormal"]));if(l==="textord"){const ve=Et[h][b]&&Et[h][b].font;if(ve==="ams"){const ye=_t("amsrm",o.fontWeight,o.fontShape);return oe(b,ye,h,o,E.concat("amsrm",o.fontWeight,o.fontShape))}else if(ve==="main"||!ve){const ye=_t("textrm",o.fontWeight,o.fontShape);return oe(b,ye,h,o,E.concat(o.fontWeight,o.fontShape))}else{const ye=_t(ve,o.fontWeight,o.fontShape);return oe(b,ye,h,o,E.concat(ye,o.fontWeight,o.fontShape))}}else throw new Error("unexpected type: "+l+" in makeOrd")},ae=(s,o)=>{if(ut(s.classes)!==ut(o.classes)||s.skew!==o.skew||s.maxFontSize!==o.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]!==o.style[l])return!1;for(const l in o.style)if(o.style.hasOwnProperty(l)&&s.style[l]!==o.style[l])return!1;return!0},Oe=s=>{for(let o=0;o<s.length-1;o++){const l=s[o],h=s[o+1];l instanceof Rt&&h instanceof Rt&&ae(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(o+1,1),o--)}return s},Me=function(s){let o=0,l=0,h=0;for(let b=0;b<s.children.length;b++){const E=s.children[b];E.height>o&&(o=E.height),E.depth>l&&(l=E.depth),E.maxFontSize>h&&(h=E.maxFontSize)}s.height=o,s.depth=l,s.maxFontSize=h},Ze=function(s,o,l,h){const b=new Dt(s,o,l,h);return Me(b),b},be=(s,o,l,h)=>new Dt(s,o,l,h),pe=function(s,o,l){const h=Ze([s],[],o);return h.height=Math.max(l||o.fontMetrics().defaultRuleThickness,o.minRuleThickness),h.style.borderBottomWidth=he(h.height),h.maxFontSize=1,h},Ke=function(s,o,l,h){const b=new Ht(s,o,l,h);return Me(b),b},ct=function(s){const o=new Cn(s);return Me(o),o},Vt=function(s,o){return s instanceof Cn?Ze([],[s],o):s},Qe=function(s){if(s.positionType==="individualShift"){const l=s.children,h=[l[0]],b=-l[0].shift-l[0].elem.depth;let E=b;for(let M=1;M<l.length;M++){const _=-l[M].shift-E-l[M].elem.depth,U=_-(l[M-1].elem.height+l[M-1].elem.depth);E=E+_,h.push({type:"kern",size:U}),h.push(l[M])}return{children:h,depth:b}}let o;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}o=l}else if(s.positionType==="bottom")o=-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")o=-l.elem.depth-s.positionData;else if(s.positionType==="firstBaseline")o=-l.elem.depth;else throw new Error("Invalid positionType "+s.positionType+".")}return{children:s.children,depth:o}},fe=function(s,o){const{children:l,depth:h}=Qe(s);let b=0;for(let Je=0;Je<l.length;Je++){const lt=l[Je];if(lt.type==="elem"){const Yt=lt.elem;b=Math.max(b,Yt.maxFontSize,Yt.height)}}b+=2;const E=Ze(["pstrut"],[]);E.style.height=he(b);const M=[];let _=h,U=h,ie=h;for(let Je=0;Je<l.length;Je++){const lt=l[Je];if(lt.type==="kern")ie+=lt.size;else{const Yt=lt.elem,ur=lt.wrapperClasses||[],tr=lt.wrapperStyle||{},hr=Ze(ur,[E,Yt],void 0,tr);hr.style.top=he(-b-ie-Yt.depth),lt.marginLeft&&(hr.style.marginLeft=lt.marginLeft),lt.marginRight&&(hr.style.marginRight=lt.marginRight),M.push(hr),ie+=Yt.height+Yt.depth}_=Math.min(_,ie),U=Math.max(U,ie)}const ve=Ze(["vlist"],M);ve.style.height=he(U);let ye;if(_<0){const Je=Ze([],[]),lt=Ze(["vlist"],[Je]);lt.style.height=he(-_);const Yt=Ze(["vlist-s"],[new Rt("\u200B")]);ye=[Ze(["vlist-r"],[ve,Yt]),Ze(["vlist-r"],[lt])]}else ye=[Ze(["vlist-r"],[ve])];const Ae=Ze(["vlist-t"],ye);return ye.length===2&&Ae.classes.push("vlist-t2"),Ae.height=U,Ae.depth=-_,Ae},mt=(s,o)=>{const l=Ze(["mspace"],[],o),h=je(s,o);return l.style.marginRight=he(h),l},_t=function(s,o,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 o==="textbf"&&l==="textit"?b="BoldItalic":o==="textbf"?b="Bold":o==="textit"?b="Italic":b="Regular",h+"-"+b},Ur={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"}},en={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var se={fontMap:Ur,makeSymbol:oe,mathsym:Re,makeSpan:Ze,makeSvgSpan:be,makeLineSpan:pe,makeAnchor:Ke,makeFragment:ct,wrapFragment:Vt,makeVList:fe,makeOrd:Xe,makeGlue:mt,staticSvg:function(s,o){const[l,h,b]=en[s],E=new Nr(l),M=new Dr([E],{width:he(h),height:he(b),style:"width:"+he(h),viewBox:"0 0 "+1e3*h+" "+1e3*b,preserveAspectRatio:"xMinYMin"}),_=be(["overlay"],[M],o);return _.height=b,_.style.height=he(b),_.style.width=he(h),_},svgData:en,tryCombineChars:Oe};const St={number:3,unit:"mu"},nn={number:4,unit:"mu"},Nt={number:5,unit:"mu"},Gt={mord:{mop:St,mbin:nn,mrel:Nt,minner:St},mop:{mord:St,mop:St,mrel:Nt,minner:St},mbin:{mord:nn,mop:nn,mopen:nn,minner:nn},mrel:{mord:Nt,mop:Nt,mopen:Nt,minner:Nt},mopen:{},mclose:{mop:St,mbin:nn,mrel:Nt,minner:St},mpunct:{mord:St,mop:St,mrel:Nt,mopen:St,mclose:St,mpunct:St,minner:St},minner:{mord:St,mop:St,mbin:nn,mrel:Nt,mopen:St,mpunct:St,minner:St}},Vr={mord:{mop:St},mop:{mord:St,mop:St},mbin:{},mrel:{},mopen:{},mclose:{mop:St},mpunct:{},minner:{mop:St}},an={},_r={},_n={};function it(s){let{type:o,names:l,props:h,handler:b,htmlBuilder:E,mathmlBuilder:M}=s;const _={type:o,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 U=0;U<l.length;++U)an[l[U]]=_;o&&(E&&(_r[o]=E),M&&(_n[o]=M))}function on(s){let{type:o,htmlBuilder:l,mathmlBuilder:h}=s;it({type:o,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:l,mathmlBuilder:h})}const Vn=function(s){return s.type==="ordgroup"&&s.body.length===1?s.body[0]:s},Sr=function(s){return s.type==="ordgroup"?s.body:[s]},ra=se.makeSpan,gg=["leftmost","mbin","mopen","mrel","mop","mpunct"],vg=["rightmost","mrel","mclose","mpunct"],bg={display:q.DISPLAY,text:q.TEXT,script:q.SCRIPT,scriptscript:q.SCRIPTSCRIPT},yg={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Wr=function(s,o,l,h){h===void 0&&(h=[null,null]);const b=[];for(let ie=0;ie<s.length;ie++){const ve=dr(s[ie],o);if(ve instanceof Cn){const ye=ve.children;b.push(...ye)}else b.push(ve)}if(se.tryCombineChars(b),!l)return b;let E=o;if(s.length===1){const ie=s[0];ie.type==="sizing"?E=o.havingSize(ie.size):ie.type==="styling"&&(E=o.havingStyle(bg[ie.style]))}const M=ra([h[0]||"leftmost"],[],o),_=ra([h[1]||"rightmost"],[],o),U=l==="root";return Vs(b,(ie,ve)=>{const ye=ve.classes[0],Ae=ie.classes[0];ye==="mbin"&&vg.includes(Ae)?ve.classes[0]="mord":Ae==="mbin"&&gg.includes(ye)&&(ie.classes[0]="mord")},{node:M},_,U),Vs(b,(ie,ve)=>{const ye=Us(ve),Ae=Us(ie),Je=ye&&Ae?ie.hasClass("mtight")?Vr[ye][Ae]:Gt[ye][Ae]:null;if(Je)return se.makeGlue(Je,E)},{node:M},_,U),b},Vs=function(s,o,l,h,b){h&&s.push(h);let E=0;for(;E<s.length;E++){const M=s[E],_=cc(M);if(_){Vs(_.children,o,l,null,b);continue}const U=!M.hasClass("mspace");if(U){const ie=o(M,l.node);ie&&(l.insertAfter?l.insertAfter(ie):(s.unshift(ie),E++))}U?l.node=M:b&&M.hasClass("newline")&&(l.node=ra(["leftmost"])),l.insertAfter=(ie=>ve=>{s.splice(ie+1,0,ve),E++})(E)}h&&s.pop()},cc=function(s){return s instanceof Cn||s instanceof Ht||s instanceof Dt&&s.hasClass("enclosing")?s:null},Ws=function(s,o){const l=cc(s);if(l){const h=l.children;if(h.length){if(o==="right")return Ws(h[h.length-1],"right");if(o==="left")return Ws(h[0],"left")}}return s},Us=function(s,o){return s?(o&&(s=Ws(s,o)),yg[s.classes[0]]||null):null},Bo=function(s,o){const l=["nulldelimiter"].concat(s.baseSizingClasses());return ra(o.concat(l))},dr=function(s,o,l){if(!s)return ra();if(_r[s.type]){let h=_r[s.type](s,o);if(l&&o.size!==l.size){h=ra(o.sizingClasses(l),[h],o);const b=o.sizeMultiplier/l.sizeMultiplier;h.height*=b,h.depth*=b}return h}else throw new i("Got group of unknown type: '"+s.type+"'")};function wi(s,o){const l=ra(["base"],s,o),h=ra(["strut"]);return h.style.height=he(l.height+l.depth),l.depth&&(h.style.verticalAlign=he(-l.depth)),l.children.unshift(h),l}function Gs(s,o){let l=null;s.length===1&&s[0].type==="tag"&&(l=s[0].tag,s=s[0].body);const h=Wr(s,o,"root");let b;h.length===2&&h[1].hasClass("tag")&&(b=h.pop());const E=[];let M=[];for(let ie=0;ie<h.length;ie++)if(M.push(h[ie]),h[ie].hasClass("mbin")||h[ie].hasClass("mrel")||h[ie].hasClass("allowbreak")){let ve=!1;for(;ie<h.length-1&&h[ie+1].hasClass("mspace")&&!h[ie+1].hasClass("newline");)ie++,M.push(h[ie]),h[ie].hasClass("nobreak")&&(ve=!0);ve||(E.push(wi(M,o)),M=[])}else h[ie].hasClass("newline")&&(M.pop(),M.length>0&&(E.push(wi(M,o)),M=[]),E.push(h[ie]));M.length>0&&E.push(wi(M,o));let _;l?(_=wi(Wr(l,o,!0)),_.classes=["tag"],E.push(_)):b&&E.push(b);const U=ra(["katex-html"],E);if(U.setAttribute("aria-hidden","true"),_){const ie=_.children[0];ie.style.height=he(U.height+U.depth),U.depth&&(ie.style.verticalAlign=he(-U.depth))}return U}function dc(s){return new Cn(s)}class kn{constructor(o,l,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=o,this.attributes={},this.children=l||[],this.classes=h||[]}setAttribute(o,l){this.attributes[o]=l}getAttribute(o){return this.attributes[o]}toNode(){const o=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&o.setAttribute(l,this.attributes[l]);this.classes.length>0&&(o.className=ut(this.classes));for(let l=0;l<this.children.length;l++)if(this.children[l]instanceof Wn&&this.children[l+1]instanceof Wn){let h=this.children[l].toText()+this.children[++l].toText();for(;this.children[l+1]instanceof Wn;)h+=this.children[++l].toText();o.appendChild(new Wn(h).toNode())}else o.appendChild(this.children[l].toNode());return o}toMarkup(){let o="<"+this.type;for(const l in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,l)&&(o+=" "+l+'="',o+=C.escape(this.attributes[l]),o+='"');this.classes.length>0&&(o+=' class ="'+C.escape(ut(this.classes))+'"'),o+=">";for(let l=0;l<this.children.length;l++)o+=this.children[l].toMarkup();return o+="</"+this.type+">",o}toText(){return this.children.map(o=>o.toText()).join("")}}class Wn{constructor(o){this.text=void 0,this.text=o}toNode(){return document.createTextNode(this.text)}toMarkup(){return C.escape(this.toText())}toText(){return this.text}}class xg{constructor(o){this.width=void 0,this.character=void 0,this.width=o,o>=.05555&&o<=.05556?this.character="\u200A":o>=.1666&&o<=.1667?this.character="\u2009":o>=.2222&&o<=.2223?this.character="\u2005":o>=.2777&&o<=.2778?this.character="\u2005\u200A":o>=-.05556&&o<=-.05555?this.character="\u200A\u2063":o>=-.1667&&o<=-.1666?this.character="\u2009\u2063":o>=-.2223&&o<=-.2222?this.character="\u205F\u2063":o>=-.2778&&o<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);{const o=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return o.setAttribute("width",he(this.width)),o}}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+he(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var Ye={MathNode:kn,TextNode:Wn,SpaceNode:xg,newDocumentFragment:dc};const Bn=function(s,o,l){return Et[o][s]&&Et[o][s].replace&&s.charCodeAt(0)!==55349&&!(tt.hasOwnProperty(s)&&l&&(l.fontFamily&&l.fontFamily.slice(4,6)==="tt"||l.font&&l.font.slice(4,6)==="tt"))&&(s=Et[o][s].replace),new Ye.TextNode(s)},Ys=function(s){return s.length===1?s[0]:new Ye.MathNode("mrow",s)},Xs=function(s,o){if(o.fontFamily==="texttt")return"monospace";if(o.fontFamily==="textsf")return o.fontShape==="textit"&&o.fontWeight==="textbf"?"sans-serif-bold-italic":o.fontShape==="textit"?"sans-serif-italic":o.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(o.fontShape==="textit"&&o.fontWeight==="textbf")return"bold-italic";if(o.fontShape==="textit")return"italic";if(o.fontWeight==="textbf")return"bold";const l=o.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;Et[h][b]&&Et[h][b].replace&&(b=Et[h][b].replace);const E=se.fontMap[l].fontName;return at(b,E,h)?se.fontMap[l].variant:null};function Zs(s){if(!s)return!1;if(s.type==="mi"&&s.children.length===1){const o=s.children[0];return o instanceof Wn&&o.text==="."}else if(s.type==="mo"&&s.children.length===1&&s.getAttribute("separator")==="true"&&s.getAttribute("lspace")==="0em"&&s.getAttribute("rspace")==="0em"){const o=s.children[0];return o instanceof Wn&&o.text===","}else return!1}const vn=function(s,o,l){if(s.length===1){const E=wr(s[0],o);return l&&E instanceof kn&&E.type==="mo"&&(E.setAttribute("lspace","0em"),E.setAttribute("rspace","0em")),[E]}const h=[];let b;for(let E=0;E<s.length;E++){const M=wr(s[E],o);if(M instanceof kn&&b instanceof kn){if(M.type==="mtext"&&b.type==="mtext"&&M.getAttribute("mathvariant")===b.getAttribute("mathvariant")){b.children.push(...M.children);continue}else if(M.type==="mn"&&b.type==="mn"){b.children.push(...M.children);continue}else if(Zs(M)&&b.type==="mn"){b.children.push(...M.children);continue}else if(M.type==="mn"&&Zs(b))M.children=[...b.children,...M.children],h.pop();else if((M.type==="msup"||M.type==="msub")&&M.children.length>=1&&(b.type==="mn"||Zs(b))){const _=M.children[0];_ instanceof kn&&_.type==="mn"&&(_.children=[...b.children,..._.children],h.pop())}else if(b.type==="mi"&&b.children.length===1){const _=b.children[0];if(_ instanceof Wn&&_.text==="\u0338"&&(M.type==="mo"||M.type==="mi"||M.type==="mn")){const U=M.children[0];U instanceof Wn&&U.text.length>0&&(U.text=U.text.slice(0,1)+"\u0338"+U.text.slice(1),h.pop())}}}h.push(M),b=M}return h},pa=function(s,o,l){return Ys(vn(s,o,l))},wr=function(s,o){if(!s)return new Ye.MathNode("mrow");if(_n[s.type])return _n[s.type](s,o);throw new i("Got group of unknown type: '"+s.type+"'")};function fc(s,o,l,h,b){const E=vn(s,l);let M;E.length===1&&E[0]instanceof kn&&["mrow","mtable"].includes(E[0].type)?M=E[0]:M=new Ye.MathNode("mrow",E);const _=new Ye.MathNode("annotation",[new Ye.TextNode(o)]);_.setAttribute("encoding","application/x-tex");const U=new Ye.MathNode("semantics",[M,_]),ie=new Ye.MathNode("math",[U]);ie.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),h&&ie.setAttribute("display","block");const ve=b?"katex":"katex-mathml";return se.makeSpan([ve],[ie])}const hc=function(s){return new Ot({style:s.displayMode?q.DISPLAY:q.TEXT,maxSize:s.maxSize,minRuleThickness:s.minRuleThickness})},pc=function(s,o){if(o.displayMode){const l=["katex-display"];o.leqno&&l.push("leqno"),o.fleqn&&l.push("fleqn"),s=se.makeSpan(l,[s])}return s},wg=function(s,o,l){const h=hc(l);let b;if(l.output==="mathml")return fc(s,o,h,l.displayMode,!0);if(l.output==="html"){const E=Gs(s,h);b=se.makeSpan(["katex"],[E])}else{const E=fc(s,o,h,l.displayMode,!1),M=Gs(s,h);b=se.makeSpan(["katex"],[E,M])}return pc(b,l)},Cg=function(s,o,l){const h=hc(l),b=Gs(s,h),E=se.makeSpan(["katex"],[b]);return pc(E,l)},Dg={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":"="},kg=function(s){const o=new Ye.MathNode("mo",[new Ye.TextNode(Dg[s.replace(/^\\/,"")])]);return o.setAttribute("stretchy","true"),o},Eg={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]},Sg=function(s){return s.type==="ordgroup"?s.body.length:1};var na={encloseSpan:function(s,o,l,h,b){let E;const M=s.height+s.depth+l+h;if(/fbox|color|angl/.test(o)){if(E=se.makeSpan(["stretchy",o],[],b),o==="fbox"){const _=b.color&&b.getColor();_&&(E.style.borderColor=_)}}else{const _=[];/^[bx]cancel$/.test(o)&&_.push(new gn({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(o)&&_.push(new gn({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));const U=new Dr(_,{width:"100%",height:he(M)});E=se.makeSvgSpan([],[U],b)}return E.height=M,E.style.height=he(M),E},mathMLnode:kg,svgSpan:function(s,o){function l(){let M=4e5;const _=s.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(_)){const U=Sg(s.base);let ie,ve,ye;if(U>5)_==="widehat"||_==="widecheck"?(ie=420,M=2364,ye=.42,ve=_+"4"):(ie=312,M=2340,ye=.34,ve="tilde4");else{const lt=[1,1,2,2,3,3][U];_==="widehat"||_==="widecheck"?(M=[0,1062,2364,2364,2364][lt],ie=[0,239,300,360,420][lt],ye=[0,.24,.3,.3,.36,.42][lt],ve=_+lt):(M=[0,600,1033,2339,2340][lt],ie=[0,260,286,306,312][lt],ye=[0,.26,.286,.3,.306,.34][lt],ve="tilde"+lt)}const Ae=new Nr(ve),Je=new Dr([Ae],{width:"100%",height:he(ye),viewBox:"0 0 "+M+" "+ie,preserveAspectRatio:"none"});return{span:se.makeSvgSpan([],[Je],o),minWidth:0,height:ye}}else{const U=[],ie=Eg[_],[ve,ye,Ae]=ie,Je=Ae/1e3,lt=ve.length;let Yt,ur;if(lt===1){const tr=ie[3];Yt=["hide-tail"],ur=[tr]}else if(lt===2)Yt=["halfarrow-left","halfarrow-right"],ur=["xMinYMin","xMaxYMin"];else if(lt===3)Yt=["brace-left","brace-center","brace-right"],ur=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
469
|
+
`+lt+" children.");for(let tr=0;tr<lt;tr++){const hr=new Nr(ve[tr]),fr=new Dr([hr],{width:"400em",height:he(Je),viewBox:"0 0 "+M+" "+Ae,preserveAspectRatio:ur[tr]+" slice"}),Ar=se.makeSvgSpan([Yt[tr]],[fr],o);if(lt===1)return{span:Ar,minWidth:ye,height:Je};Ar.style.height=he(Je),U.push(Ar)}return{span:se.makeSpan(["stretchy"],U,o),minWidth:ye,height:Je}}}const{span:h,minWidth:b,height:E}=l();return h.height=E,h.style.height=he(E),b>0&&(h.style.minWidth=he(b)),h}};function Xt(s,o){if(!s||s.type!==o)throw new Error("Expected node of type "+o+", but got "+(s?"node of type "+s.type:String(s)));return s}function Js(s){const o=Ci(s);if(!o)throw new Error("Expected node of symbol group type, but got "+(s?"node of type "+s.type:String(s)));return o}function Ci(s){return s&&(s.type==="atom"||Er.hasOwnProperty(s.type))?s:null}const Qs=(s,o)=>{let l,h,b;s&&s.type==="supsub"?(h=Xt(s.base,"accent"),l=h.base,s.base=l,b=kr(dr(s,o)),s.base=h):(h=Xt(s,"accent"),l=h.base);const E=dr(l,o.havingCrampedStyle()),M=h.isShifty&&C.isCharacterBox(l);let _=0;if(M){const Ae=C.getBaseElem(l),Je=dr(Ae,o.havingCrampedStyle());_=Jt(Je).skew}const U=h.label==="\\c";let ie=U?E.height+E.depth:Math.min(E.height,o.fontMetrics().xHeight),ve;if(h.isStretchy)ve=na.svgSpan(h,o),ve=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:E},{type:"elem",elem:ve,wrapperClasses:["svg-align"],wrapperStyle:_>0?{width:"calc(100% - "+he(2*_)+")",marginLeft:he(2*_)}:void 0}]},o);else{let Ae,Je;h.label==="\\vec"?(Ae=se.staticSvg("vec",o),Je=se.svgData.vec[1]):(Ae=se.makeOrd({mode:h.mode,text:h.label},o,"textord"),Ae=Jt(Ae),Ae.italic=0,Je=Ae.width,U&&(ie+=Ae.depth)),ve=se.makeSpan(["accent-body"],[Ae]);const lt=h.label==="\\textcircled";lt&&(ve.classes.push("accent-full"),ie=E.height);let Yt=_;lt||(Yt-=Je/2),ve.style.left=he(Yt),h.label==="\\textcircled"&&(ve.style.top=".2em"),ve=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:E},{type:"kern",size:-ie},{type:"elem",elem:ve}]},o)}const ye=se.makeSpan(["mord","accent"],[ve],o);return b?(b.children[0]=ye,b.height=Math.max(ye.height,b.height),b.classes[0]="mord",b):ye},mc=(s,o)=>{const l=s.isStretchy?na.mathMLnode(s.label):new Ye.MathNode("mo",[Bn(s.label,s.mode)]),h=new Ye.MathNode("mover",[wr(s.base,o),l]);return h.setAttribute("accent","true"),h},Ag=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(s=>"\\"+s).join("|"));it({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,o)=>{const l=Vn(o[0]),h=!Ag.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:Qs,mathmlBuilder:mc}),it({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(s,o)=>{const l=o[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:Qs,mathmlBuilder:mc}),it({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0];return{type:"accentUnder",mode:l.mode,label:h,base:b}},htmlBuilder:(s,o)=>{const l=dr(s.base,o),h=na.svgSpan(s,o),b=s.label==="\\utilde"?.12:0,E=se.makeVList({positionType:"top",positionData:l.height,children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:l}]},o);return se.makeSpan(["mord","accentunder"],[E],o)},mathmlBuilder:(s,o)=>{const l=na.mathMLnode(s.label),h=new Ye.MathNode("munder",[wr(s.base,o),l]);return h.setAttribute("accentunder","true"),h}});const Di=s=>{const o=new Ye.MathNode("mpadded",s?[s]:[]);return o.setAttribute("width","+0.6em"),o.setAttribute("lspace","0.3em"),o};it({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,o,l){let{parser:h,funcName:b}=s;return{type:"xArrow",mode:h.mode,label:b,body:o[0],below:l[0]}},htmlBuilder(s,o){const l=o.style;let h=o.havingStyle(l.sup());const b=se.wrapFragment(dr(s.body,h,o),o),E=s.label.slice(0,2)==="\\x"?"x":"cd";b.classes.push(E+"-arrow-pad");let M;s.below&&(h=o.havingStyle(l.sub()),M=se.wrapFragment(dr(s.below,h,o),o),M.classes.push(E+"-arrow-pad"));const _=na.svgSpan(s,o),U=-o.fontMetrics().axisHeight+.5*_.height;let ie=-o.fontMetrics().axisHeight-.5*_.height-.111;(b.depth>.25||s.label==="\\xleftequilibrium")&&(ie-=b.depth);let ve;if(M){const ye=-o.fontMetrics().axisHeight+M.height+.5*_.height+.111;ve=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:ie},{type:"elem",elem:_,shift:U},{type:"elem",elem:M,shift:ye}]},o)}else ve=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:ie},{type:"elem",elem:_,shift:U}]},o);return ve.children[0].children[0].children[1].classes.push("svg-align"),se.makeSpan(["mrel","x-arrow"],[ve],o)},mathmlBuilder(s,o){const l=na.mathMLnode(s.label);l.setAttribute("minsize",s.label.charAt(0)==="x"?"1.75em":"3.0em");let h;if(s.body){const b=Di(wr(s.body,o));if(s.below){const E=Di(wr(s.below,o));h=new Ye.MathNode("munderover",[l,E,b])}else h=new Ye.MathNode("mover",[l,b])}else if(s.below){const b=Di(wr(s.below,o));h=new Ye.MathNode("munder",[l,b])}else h=Di(),h=new Ye.MathNode("mover",[l,h]);return h}});const Bg=se.makeSpan;function gc(s,o){const l=Wr(s.body,o,!0);return Bg([s.mclass],l,o)}function vc(s,o){let l;const h=vn(s.body,o);return s.mclass==="minner"?l=new Ye.MathNode("mpadded",h):s.mclass==="mord"?s.isCharacterBox?(l=h[0],l.type="mi"):l=new Ye.MathNode("mi",h):(s.isCharacterBox?(l=h[0],l.type="mo"):l=new Ye.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}it({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(s,o){let{parser:l,funcName:h}=s;const b=o[0];return{type:"mclass",mode:l.mode,mclass:"m"+h.slice(5),body:Sr(b),isCharacterBox:C.isCharacterBox(b)}},htmlBuilder:gc,mathmlBuilder:vc});const ki=s=>{const o=s.type==="ordgroup"&&s.body.length?s.body[0]:s;return o.type==="atom"&&(o.family==="bin"||o.family==="rel")?"m"+o.family:"mord"};it({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(s,o){let{parser:l}=s;return{type:"mclass",mode:l.mode,mclass:ki(o[0]),body:Sr(o[1]),isCharacterBox:C.isCharacterBox(o[1])}}}),it({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(s,o){let{parser:l,funcName:h}=s;const b=o[1],E=o[0];let M;h!=="\\stackrel"?M=ki(b):M="mrel";const _={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:h!=="\\stackrel",body:Sr(b)},U={type:"supsub",mode:E.mode,base:_,sup:h==="\\underset"?null:E,sub:h==="\\underset"?E:null};return{type:"mclass",mode:l.mode,mclass:M,body:[U],isCharacterBox:C.isCharacterBox(U)}},htmlBuilder:gc,mathmlBuilder:vc}),it({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(s,o){let{parser:l}=s;return{type:"pmb",mode:l.mode,mclass:ki(o[0]),body:Sr(o[0])}},htmlBuilder(s,o){const l=Wr(s.body,o,!0),h=se.makeSpan([s.mclass],l,o);return h.style.textShadow="0.02em 0.01em 0.04px",h},mathmlBuilder(s,o){const l=vn(s.body,o),h=new Ye.MathNode("mstyle",l);return h.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),h}});const Fg={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},bc=()=>({type:"styling",body:[],mode:"math",style:"display"}),yc=s=>s.type==="textord"&&s.text==="@",Ng=(s,o)=>(s.type==="mathord"||s.type==="atom")&&s.text===o;function Tg(s,o,l){const h=Fg[s];switch(h){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return l.callFunction(h,[o[0]],[o[1]]);case"\\uparrow":case"\\downarrow":{const b=l.callFunction("\\\\cdleft",[o[0]],[]),E={type:"atom",text:h,mode:"math",family:"rel"},M=l.callFunction("\\Big",[E],[]),_=l.callFunction("\\\\cdright",[o[1]],[]),U={type:"ordgroup",mode:"math",body:[b,M,_]};return l.callFunction("\\\\cdparent",[U],[])}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 Og(s){const o=[];for(s.gullet.beginGroup(),s.gullet.macros.set("\\cr","\\\\\\relax"),s.gullet.beginGroup();;){o.push(s.parseExpression(!1,"\\\\")),s.gullet.endGroup(),s.gullet.beginGroup();const E=s.fetch().text;if(E==="&"||E==="\\\\")s.consume();else if(E==="\\end"){o[o.length-1].length===0&&o.pop();break}else throw new i("Expected \\\\ or \\cr or \\end",s.nextToken)}let l=[];const h=[l];for(let E=0;E<o.length;E++){const M=o[E];let _=bc();for(let U=0;U<M.length;U++)if(!yc(M[U]))_.body.push(M[U]);else{l.push(_),U+=1;const ie=Js(M[U]).text,ve=new Array(2);if(ve[0]={type:"ordgroup",mode:"math",body:[]},ve[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(ie)>-1))if("<>AV".indexOf(ie)>-1)for(let Ae=0;Ae<2;Ae++){let Je=!0;for(let lt=U+1;lt<M.length;lt++){if(Ng(M[lt],ie)){Je=!1,U=lt;break}if(yc(M[lt]))throw new i("Missing a "+ie+" character to complete a CD arrow.",M[lt]);ve[Ae].body.push(M[lt])}if(Je)throw new i("Missing a "+ie+" character to complete a CD arrow.",M[U])}else throw new i('Expected one of "<>AV=|." after @',M[U]);const ye={type:"styling",body:[Tg(ie,ve,s)],mode:"math",style:"display"};l.push(ye),_=bc()}E%2===0?l.push(_):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([])}}it({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(s,o){let{parser:l,funcName:h}=s;return{type:"cdlabel",mode:l.mode,side:h.slice(4),label:o[0]}},htmlBuilder(s,o){const l=o.havingStyle(o.style.sup()),h=se.wrapFragment(dr(s.label,l,o),o);return h.classes.push("cd-label-"+s.side),h.style.bottom=he(.8-h.depth),h.height=0,h.depth=0,h},mathmlBuilder(s,o){let l=new Ye.MathNode("mrow",[wr(s.label,o)]);return l=new Ye.MathNode("mpadded",[l]),l.setAttribute("width","0"),s.side==="left"&&l.setAttribute("lspace","-1width"),l.setAttribute("voffset","0.7em"),l=new Ye.MathNode("mstyle",[l]),l.setAttribute("displaystyle","false"),l.setAttribute("scriptlevel","1"),l}}),it({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(s,o){let{parser:l}=s;return{type:"cdlabelparent",mode:l.mode,fragment:o[0]}},htmlBuilder(s,o){const l=se.wrapFragment(dr(s.fragment,o),o);return l.classes.push("cd-vert-arrow"),l},mathmlBuilder(s,o){return new Ye.MathNode("mrow",[wr(s.fragment,o)])}}),it({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(s,o){let{parser:l}=s;const h=Xt(o[0],"ordgroup").body;let b="";for(let _=0;_<h.length;_++){const U=Xt(h[_],"textord");b+=U.text}let E=parseInt(b),M;if(isNaN(E))throw new i("\\@char has non-numeric argument "+b);if(E<0||E>=1114111)throw new i("\\@char with invalid code point "+b);return E<=65535?M=String.fromCharCode(E):(E-=65536,M=String.fromCharCode((E>>10)+55296,(E&1023)+56320)),{type:"textord",mode:l.mode,text:M}}});const xc=(s,o)=>{const l=Wr(s.body,o.withColor(s.color),!1);return se.makeFragment(l)},wc=(s,o)=>{const l=vn(s.body,o.withColor(s.color)),h=new Ye.MathNode("mstyle",l);return h.setAttribute("mathcolor",s.color),h};it({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(s,o){let{parser:l}=s;const h=Xt(o[0],"color-token").color,b=o[1];return{type:"color",mode:l.mode,color:h,body:Sr(b)}},htmlBuilder:xc,mathmlBuilder:wc}),it({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(s,o){let{parser:l,breakOnTokenText:h}=s;const b=Xt(o[0],"color-token").color;l.gullet.macros.set("\\current@color",b);const E=l.parseExpression(!0,h);return{type:"color",mode:l.mode,color:b,body:E}},htmlBuilder:xc,mathmlBuilder:wc}),it({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(s,o,l){let{parser:h}=s;const b=h.gullet.future().text==="["?h.parseSizeGroup(!0):null,E=!h.settings.displayMode||!h.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:h.mode,newLine:E,size:b&&Xt(b,"size").value}},htmlBuilder(s,o){const l=se.makeSpan(["mspace"],[],o);return s.newLine&&(l.classes.push("newline"),s.size&&(l.style.marginTop=he(je(s.size,o)))),l},mathmlBuilder(s,o){const l=new Ye.MathNode("mspace");return s.newLine&&(l.setAttribute("linebreak","newline"),s.size&&l.setAttribute("height",he(je(s.size,o)))),l}});const el={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Cc=s=>{const o=s.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(o))throw new i("Expected a control sequence",s);return o},Mg=s=>{let o=s.gullet.popToken();return o.text==="="&&(o=s.gullet.popToken(),o.text===" "&&(o=s.gullet.popToken())),o},Dc=(s,o,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(o,b,h)};it({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(s){let{parser:o,funcName:l}=s;o.consumeSpaces();const h=o.fetch();if(el[h.text])return(l==="\\global"||l==="\\\\globallong")&&(h.text=el[h.text]),Xt(o.parseFunction(),"internal");throw new i("Invalid token after macro prefix",h)}}),it({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:o,funcName:l}=s,h=o.gullet.popToken();const b=h.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(b))throw new i("Expected a control sequence",h);let E=0,M;const _=[[]];for(;o.gullet.future().text!=="{";)if(h=o.gullet.popToken(),h.text==="#"){if(o.gullet.future().text==="{"){M=o.gullet.future(),_[E].push("{");break}if(h=o.gullet.popToken(),!/^[1-9]$/.test(h.text))throw new i('Invalid argument number "'+h.text+'"');if(parseInt(h.text)!==E+1)throw new i('Argument number "'+h.text+'" out of order');E++,_.push([])}else{if(h.text==="EOF")throw new i("Expected a macro definition");_[E].push(h.text)}let{tokens:U}=o.gullet.consumeArg();return M&&U.unshift(M),(l==="\\edef"||l==="\\xdef")&&(U=o.gullet.expandTokens(U),U.reverse()),o.gullet.macros.set(b,{tokens:U,numArgs:E,delimiters:_},l===el[l]),{type:"internal",mode:o.mode}}}),it({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:o,funcName:l}=s;const h=Cc(o.gullet.popToken());o.gullet.consumeSpaces();const b=Mg(o);return Dc(o,h,b,l==="\\\\globallet"),{type:"internal",mode:o.mode}}}),it({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s){let{parser:o,funcName:l}=s;const h=Cc(o.gullet.popToken()),b=o.gullet.popToken(),E=o.gullet.popToken();return Dc(o,h,E,l==="\\\\globalfuture"),o.gullet.pushToken(E),o.gullet.pushToken(b),{type:"internal",mode:o.mode}}});const Fo=function(s,o,l){const h=Et.math[s]&&Et.math[s].replace,b=at(h||s,o,l);if(!b)throw new Error("Unsupported symbol "+s+" and font size "+o+".");return b},tl=function(s,o,l,h){const b=l.havingBaseStyle(o),E=se.makeSpan(h.concat(b.sizingClasses(l)),[s],l),M=b.sizeMultiplier/l.sizeMultiplier;return E.height*=M,E.depth*=M,E.maxFontSize=b.sizeMultiplier,E},kc=function(s,o,l){const h=o.havingBaseStyle(l),b=(1-o.sizeMultiplier/h.sizeMultiplier)*o.fontMetrics().axisHeight;s.classes.push("delimcenter"),s.style.top=he(b),s.height-=b,s.depth+=b},Rg=function(s,o,l,h,b,E){const M=se.makeSymbol(s,"Main-Regular",b,h),_=tl(M,o,h,E);return l&&kc(_,h,o),_},$g=function(s,o,l,h){return se.makeSymbol(s,"Size"+o+"-Regular",l,h)},Ec=function(s,o,l,h,b,E){const M=$g(s,o,b,h),_=tl(se.makeSpan(["delimsizing","size"+o],[M],h),q.TEXT,h,E);return l&&kc(_,h,q.TEXT),_},rl=function(s,o,l){let h;return o==="Size1-Regular"?h="delim-size1":h="delim-size4",{type:"elem",elem:se.makeSpan(["delimsizinginner",h],[se.makeSpan([],[se.makeSymbol(s,o,l)])])}},nl=function(s,o,l){const h=xe["Size4-Regular"][s.charCodeAt(0)]?xe["Size4-Regular"][s.charCodeAt(0)][4]:xe["Size1-Regular"][s.charCodeAt(0)][4],b=new Nr("inner",De(s,Math.round(1e3*o))),E=new Dr([b],{width:he(h),height:he(o),style:"width:"+he(h),viewBox:"0 0 "+1e3*h+" "+Math.round(1e3*o),preserveAspectRatio:"xMinYMin"}),M=se.makeSvgSpan([],[E],l);return M.height=o,M.style.height=he(o),M.style.width=he(h),{type:"elem",elem:M}},al=.008,Ei={type:"kern",size:-1*al},Pg=["|","\\lvert","\\rvert","\\vert"],Ig=["\\|","\\lVert","\\rVert","\\Vert"],Sc=function(s,o,l,h,b,E){let M,_,U,ie,ve="",ye=0;M=U=ie=s,_=null;let Ae="Size1-Regular";s==="\\uparrow"?U=ie="\u23D0":s==="\\Uparrow"?U=ie="\u2016":s==="\\downarrow"?M=U="\u23D0":s==="\\Downarrow"?M=U="\u2016":s==="\\updownarrow"?(M="\\uparrow",U="\u23D0",ie="\\downarrow"):s==="\\Updownarrow"?(M="\\Uparrow",U="\u2016",ie="\\Downarrow"):Pg.includes(s)?(U="\u2223",ve="vert",ye=333):Ig.includes(s)?(U="\u2225",ve="doublevert",ye=556):s==="["||s==="\\lbrack"?(M="\u23A1",U="\u23A2",ie="\u23A3",Ae="Size4-Regular",ve="lbrack",ye=667):s==="]"||s==="\\rbrack"?(M="\u23A4",U="\u23A5",ie="\u23A6",Ae="Size4-Regular",ve="rbrack",ye=667):s==="\\lfloor"||s==="\u230A"?(U=M="\u23A2",ie="\u23A3",Ae="Size4-Regular",ve="lfloor",ye=667):s==="\\lceil"||s==="\u2308"?(M="\u23A1",U=ie="\u23A2",Ae="Size4-Regular",ve="lceil",ye=667):s==="\\rfloor"||s==="\u230B"?(U=M="\u23A5",ie="\u23A6",Ae="Size4-Regular",ve="rfloor",ye=667):s==="\\rceil"||s==="\u2309"?(M="\u23A4",U=ie="\u23A5",Ae="Size4-Regular",ve="rceil",ye=667):s==="("||s==="\\lparen"?(M="\u239B",U="\u239C",ie="\u239D",Ae="Size4-Regular",ve="lparen",ye=875):s===")"||s==="\\rparen"?(M="\u239E",U="\u239F",ie="\u23A0",Ae="Size4-Regular",ve="rparen",ye=875):s==="\\{"||s==="\\lbrace"?(M="\u23A7",_="\u23A8",ie="\u23A9",U="\u23AA",Ae="Size4-Regular"):s==="\\}"||s==="\\rbrace"?(M="\u23AB",_="\u23AC",ie="\u23AD",U="\u23AA",Ae="Size4-Regular"):s==="\\lgroup"||s==="\u27EE"?(M="\u23A7",ie="\u23A9",U="\u23AA",Ae="Size4-Regular"):s==="\\rgroup"||s==="\u27EF"?(M="\u23AB",ie="\u23AD",U="\u23AA",Ae="Size4-Regular"):s==="\\lmoustache"||s==="\u23B0"?(M="\u23A7",ie="\u23AD",U="\u23AA",Ae="Size4-Regular"):(s==="\\rmoustache"||s==="\u23B1")&&(M="\u23AB",ie="\u23A9",U="\u23AA",Ae="Size4-Regular");const Je=Fo(M,Ae,b),lt=Je.height+Je.depth,Yt=Fo(U,Ae,b),ur=Yt.height+Yt.depth,tr=Fo(ie,Ae,b),hr=tr.height+tr.depth;let fr=0,Ar=1;if(_!==null){const zr=Fo(_,Ae,b);fr=zr.height+zr.depth,Ar=2}const Jr=lt+hr+fr,sn=Math.max(0,Math.ceil((o-Jr)/(Ar*ur))),Fn=Jr+sn*Ar*ur;let Za=h.fontMetrics().axisHeight;l&&(Za*=h.sizeMultiplier);const pr=Fn/2-Za,yr=[];if(ve.length>0){const zr=Fn-lt-hr,$r=Math.round(Fn*1e3),Nn=Be(ve,Math.round(zr*1e3)),u4=new Nr(ve,Nn),gd=(ye/1e3).toFixed(3)+"em",vd=($r/1e3).toFixed(3)+"em",c4=new Dr([u4],{width:gd,height:vd,viewBox:"0 0 "+ye+" "+$r}),Ni=se.makeSvgSpan([],[c4],h);Ni.height=$r/1e3,Ni.style.width=gd,Ni.style.height=vd,yr.push({type:"elem",elem:Ni})}else{if(yr.push(rl(ie,Ae,b)),yr.push(Ei),_===null){const zr=Fn-lt-hr+2*al;yr.push(nl(U,zr,h))}else{const zr=(Fn-lt-hr-fr)/2+2*al;yr.push(nl(U,zr,h)),yr.push(Ei),yr.push(rl(_,Ae,b)),yr.push(Ei),yr.push(nl(U,zr,h))}yr.push(Ei),yr.push(rl(M,Ae,b))}const Br=h.havingBaseStyle(q.TEXT),Tr=se.makeVList({positionType:"bottom",positionData:pr,children:yr},Br);return tl(se.makeSpan(["delimsizing","mult"],[Tr],Br),q.TEXT,h,E)},ol=80,il=.08,sl=function(s,o,l,h,b){const E=ge(s,h,l),M=new Nr(s,E),_=new Dr([M],{width:"400em",height:he(o),viewBox:"0 0 400000 "+l,preserveAspectRatio:"xMinYMin slice"});return se.makeSvgSpan(["hide-tail"],[_],b)},_g=function(s,o){const l=o.havingBaseSizing(),h=Nc("\\surd",s*l.sizeMultiplier,Fc,l);let b=l.sizeMultiplier;const E=Math.max(0,o.minRuleThickness-o.fontMetrics().sqrtRuleThickness);let M,_=0,U=0,ie=0,ve;return h.type==="small"?(ie=1e3+1e3*E+ol,s<1?b=1:s<1.4&&(b=.7),_=(1+E+il)/b,U=(1+E)/b,M=sl("sqrtMain",_,ie,E,o),M.style.minWidth="0.853em",ve=.833/b):h.type==="large"?(ie=(1e3+ol)*No[h.size],U=(No[h.size]+E)/b,_=(No[h.size]+E+il)/b,M=sl("sqrtSize"+h.size,_,ie,E,o),M.style.minWidth="1.02em",ve=1/b):(_=s+E+il,U=s+E,ie=Math.floor(1e3*s+E)+ol,M=sl("sqrtTall",_,ie,E,o),M.style.minWidth="0.742em",ve=1.056),M.height=U,M.style.height=he(_),{span:M,advanceWidth:ve,ruleWidth:(o.fontMetrics().sqrtRuleThickness+E)*b}},Ac=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],zg=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Bc=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],No=[0,1.2,1.8,2.4,3],jg=function(s,o,l,h,b){if(s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle"),Ac.includes(s)||Bc.includes(s))return Ec(s,o,!1,l,h,b);if(zg.includes(s))return Sc(s,No[o],!1,l,h,b);throw new i("Illegal delimiter: '"+s+"'")},Lg=[{type:"small",style:q.SCRIPTSCRIPT},{type:"small",style:q.SCRIPT},{type:"small",style:q.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Hg=[{type:"small",style:q.SCRIPTSCRIPT},{type:"small",style:q.SCRIPT},{type:"small",style:q.TEXT},{type:"stack"}],Fc=[{type:"small",style:q.SCRIPTSCRIPT},{type:"small",style:q.SCRIPT},{type:"small",style:q.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Kg=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.")},Nc=function(s,o,l,h){const b=Math.min(2,3-h.style.size);for(let E=b;E<l.length&&l[E].type!=="stack";E++){const M=Fo(s,Kg(l[E]),"math");let _=M.height+M.depth;if(l[E].type==="small"){const U=h.havingBaseStyle(l[E].style);_*=U.sizeMultiplier}if(_>o)return l[E]}return l[l.length-1]},Tc=function(s,o,l,h,b,E){s==="<"||s==="\\lt"||s==="\u27E8"?s="\\langle":(s===">"||s==="\\gt"||s==="\u27E9")&&(s="\\rangle");let M;Bc.includes(s)?M=Lg:Ac.includes(s)?M=Fc:M=Hg;const _=Nc(s,o,M,h);return _.type==="small"?Rg(s,_.style,l,h,b,E):_.type==="large"?Ec(s,_.size,l,h,b,E):Sc(s,o,l,h,b,E)};var aa={sqrtImage:_g,sizedDelim:jg,sizeToMaxHeight:No,customSizedDelim:Tc,leftRightDelim:function(s,o,l,h,b,E){const M=h.fontMetrics().axisHeight*h.sizeMultiplier,_=901,U=5/h.fontMetrics().ptPerEm,ie=Math.max(o-M,l+M),ve=Math.max(ie/500*_,2*ie-U);return Tc(s,ve,!0,h,b,E)}};const Oc={"\\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}},qg=["(","\\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 Si(s,o){const l=Ci(s);if(l&&qg.includes(l.text))return l;throw l?new i("Invalid delimiter '"+l.text+"' after '"+o.funcName+"'",s):new i("Invalid delimiter type '"+s.type+"'",s)}it({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,o)=>{const l=Si(o[0],s);return{type:"delimsizing",mode:s.parser.mode,size:Oc[s.funcName].size,mclass:Oc[s.funcName].mclass,delim:l.text}},htmlBuilder:(s,o)=>s.delim==="."?se.makeSpan([s.mclass]):aa.sizedDelim(s.delim,s.size,o,s.mode,[s.mclass]),mathmlBuilder:s=>{const o=[];s.delim!=="."&&o.push(Bn(s.delim,s.mode));const l=new Ye.MathNode("mo",o);s.mclass==="mopen"||s.mclass==="mclose"?l.setAttribute("fence","true"):l.setAttribute("fence","false"),l.setAttribute("stretchy","true");const h=he(aa.sizeToMaxHeight[s.size]);return l.setAttribute("minsize",h),l.setAttribute("maxsize",h),l}});function Mc(s){if(!s.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}it({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(s,o)=>{const l=s.parser.gullet.macros.get("\\current@color");if(l&&typeof l!="string")throw new i("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:s.parser.mode,delim:Si(o[0],s).text,color:l}}}),it({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(s,o)=>{const l=Si(o[0],s),h=s.parser;++h.leftrightDepth;const b=h.parseExpression(!1);--h.leftrightDepth,h.expect("\\right",!1);const E=Xt(h.parseFunction(),"leftright-right");return{type:"leftright",mode:h.mode,body:b,left:l.text,right:E.delim,rightColor:E.color}},htmlBuilder:(s,o)=>{Mc(s);const l=Wr(s.body,o,!0,["mopen","mclose"]);let h=0,b=0,E=!1;for(let U=0;U<l.length;U++)l[U].isMiddle?E=!0:(h=Math.max(l[U].height,h),b=Math.max(l[U].depth,b));h*=o.sizeMultiplier,b*=o.sizeMultiplier;let M;if(s.left==="."?M=Bo(o,["mopen"]):M=aa.leftRightDelim(s.left,h,b,o,s.mode,["mopen"]),l.unshift(M),E)for(let U=1;U<l.length;U++){const ie=l[U].isMiddle;ie&&(l[U]=aa.leftRightDelim(ie.delim,h,b,ie.options,s.mode,[]))}let _;if(s.right===".")_=Bo(o,["mclose"]);else{const U=s.rightColor?o.withColor(s.rightColor):o;_=aa.leftRightDelim(s.right,h,b,U,s.mode,["mclose"])}return l.push(_),se.makeSpan(["minner"],l,o)},mathmlBuilder:(s,o)=>{Mc(s);const l=vn(s.body,o);if(s.left!=="."){const h=new Ye.MathNode("mo",[Bn(s.left,s.mode)]);h.setAttribute("fence","true"),l.unshift(h)}if(s.right!=="."){const h=new Ye.MathNode("mo",[Bn(s.right,s.mode)]);h.setAttribute("fence","true"),s.rightColor&&h.setAttribute("mathcolor",s.rightColor),l.push(h)}return Ys(l)}}),it({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(s,o)=>{const l=Si(o[0],s);if(!s.parser.leftrightDepth)throw new i("\\middle without preceding \\left",l);return{type:"middle",mode:s.parser.mode,delim:l.text}},htmlBuilder:(s,o)=>{let l;if(s.delim===".")l=Bo(o,[]);else{l=aa.sizedDelim(s.delim,1,o,s.mode,[]);const h={delim:s.delim,options:o};l.isMiddle=h}return l},mathmlBuilder:(s,o)=>{const l=s.delim==="\\vert"||s.delim==="|"?Bn("|","text"):Bn(s.delim,s.mode),h=new Ye.MathNode("mo",[l]);return h.setAttribute("fence","true"),h.setAttribute("lspace","0.05em"),h.setAttribute("rspace","0.05em"),h}});const ll=(s,o)=>{const l=se.wrapFragment(dr(s.body,o),o),h=s.label.slice(1);let b=o.sizeMultiplier,E,M=0;const _=C.isCharacterBox(s.body);if(h==="sout")E=se.makeSpan(["stretchy","sout"]),E.height=o.fontMetrics().defaultRuleThickness/b,M=-.5*o.fontMetrics().xHeight;else if(h==="phase"){const ie=je({number:.6,unit:"pt"},o),ve=je({number:.35,unit:"ex"},o),ye=o.havingBaseSizing();b=b/ye.sizeMultiplier;const Ae=l.height+l.depth+ie+ve;l.style.paddingLeft=he(Ae/2+ie);const Je=Math.floor(1e3*Ae*b),lt=Ee(Je),Yt=new Dr([new Nr("phase",lt)],{width:"400em",height:he(Je/1e3),viewBox:"0 0 400000 "+Je,preserveAspectRatio:"xMinYMin slice"});E=se.makeSvgSpan(["hide-tail"],[Yt],o),E.style.height=he(Ae),M=l.depth+ie+ve}else{/cancel/.test(h)?_||l.classes.push("cancel-pad"):h==="angl"?l.classes.push("anglpad"):l.classes.push("boxpad");let ie=0,ve=0,ye=0;/box/.test(h)?(ye=Math.max(o.fontMetrics().fboxrule,o.minRuleThickness),ie=o.fontMetrics().fboxsep+(h==="colorbox"?0:ye),ve=ie):h==="angl"?(ye=Math.max(o.fontMetrics().defaultRuleThickness,o.minRuleThickness),ie=4*ye,ve=Math.max(0,.25-l.depth)):(ie=_?.2:0,ve=ie),E=na.encloseSpan(l,h,ie,ve,o),/fbox|boxed|fcolorbox/.test(h)?(E.style.borderStyle="solid",E.style.borderWidth=he(ye)):h==="angl"&&ye!==.049&&(E.style.borderTopWidth=he(ye),E.style.borderRightWidth=he(ye)),M=l.depth+ve,s.backgroundColor&&(E.style.backgroundColor=s.backgroundColor,s.borderColor&&(E.style.borderColor=s.borderColor))}let U;if(s.backgroundColor)U=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:E,shift:M},{type:"elem",elem:l,shift:0}]},o);else{const ie=/cancel|phase/.test(h)?["svg-align"]:[];U=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:E,shift:M,wrapperClasses:ie}]},o)}return/cancel/.test(h)&&(U.height=l.height,U.depth=l.depth),/cancel/.test(h)&&!_?se.makeSpan(["mord","cancel-lap"],[U],o):se.makeSpan(["mord"],[U],o)},ul=(s,o)=>{let l=0;const h=new Ye.MathNode(s.label.indexOf("colorbox")>-1?"mpadded":"menclose",[wr(s.body,o)]);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=o.fontMetrics().fboxsep*o.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(o.fontMetrics().fboxrule,o.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};it({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(s,o,l){let{parser:h,funcName:b}=s;const E=Xt(o[0],"color-token").color,M=o[1];return{type:"enclose",mode:h.mode,label:b,backgroundColor:E,body:M}},htmlBuilder:ll,mathmlBuilder:ul}),it({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(s,o,l){let{parser:h,funcName:b}=s;const E=Xt(o[0],"color-token").color,M=Xt(o[1],"color-token").color,_=o[2];return{type:"enclose",mode:h.mode,label:b,backgroundColor:M,borderColor:E,body:_}},htmlBuilder:ll,mathmlBuilder:ul}),it({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(s,o){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\fbox",body:o[0]}}}),it({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(s,o){let{parser:l,funcName:h}=s;const b=o[0];return{type:"enclose",mode:l.mode,label:h,body:b}},htmlBuilder:ll,mathmlBuilder:ul}),it({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(s,o){let{parser:l}=s;return{type:"enclose",mode:l.mode,label:"\\angl",body:o[0]}}});const Rc={};function Un(s){let{type:o,names:l,props:h,handler:b,htmlBuilder:E,mathmlBuilder:M}=s;const _={type:o,numArgs:h.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:b};for(let U=0;U<l.length;++U)Rc[l[U]]=_;E&&(_r[o]=E),M&&(_n[o]=M)}const $c={};function j(s,o){$c[s]=o}class bn{constructor(o,l,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=o,this.start=l,this.end=h}static range(o,l){return l?!o||!o.loc||!l.loc||o.loc.lexer!==l.loc.lexer?null:new bn(o.loc.lexer,o.loc.start,l.loc.end):o&&o.loc}}class En{constructor(o,l){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=o,this.loc=l}range(o,l){return new En(l,bn.range(this,o))}}function Pc(s){const o=[];s.consumeSpaces();let l=s.fetch().text;for(l==="\\relax"&&(s.consume(),s.consumeSpaces(),l=s.fetch().text);l==="\\hline"||l==="\\hdashline";)s.consume(),o.push(l==="\\hdashline"),s.consumeSpaces(),l=s.fetch().text;return o}const Ai=s=>{if(!s.parser.settings.displayMode)throw new i("{"+s.envName+"} can be used only in display mode.")};function cl(s){if(s.indexOf("ed")===-1)return s.indexOf("*")===-1}function ma(s,o,l){let{hskipBeforeAndAfter:h,addJot:b,cols:E,arraystretch:M,colSeparationType:_,autoTag:U,singleRow:ie,emptySingleRow:ve,maxNumCols:ye,leqno:Ae}=o;if(s.gullet.beginGroup(),ie||s.gullet.macros.set("\\cr","\\\\\\relax"),!M){const Ar=s.gullet.expandMacroAsText("\\arraystretch");if(Ar==null)M=1;else if(M=parseFloat(Ar),!M||M<0)throw new i("Invalid \\arraystretch: "+Ar)}s.gullet.beginGroup();let Je=[];const lt=[Je],Yt=[],ur=[],tr=U!=null?[]:void 0;function hr(){U&&s.gullet.macros.set("\\@eqnsw","1",!0)}function fr(){tr&&(s.gullet.macros.get("\\df@tag")?(tr.push(s.subparse([new En("\\df@tag")])),s.gullet.macros.set("\\df@tag",void 0,!0)):tr.push(!!U&&s.gullet.macros.get("\\@eqnsw")==="1"))}for(hr(),ur.push(Pc(s));;){let Ar=s.parseExpression(!1,ie?"\\end":"\\\\");s.gullet.endGroup(),s.gullet.beginGroup(),Ar={type:"ordgroup",mode:s.mode,body:Ar},l&&(Ar={type:"styling",mode:s.mode,style:l,body:[Ar]}),Je.push(Ar);const Jr=s.fetch().text;if(Jr==="&"){if(ye&&Je.length===ye){if(ie||_)throw new i("Too many tab characters: &",s.nextToken);s.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}s.consume()}else if(Jr==="\\end"){fr(),Je.length===1&&Ar.type==="styling"&&Ar.body[0].body.length===0&&(lt.length>1||!ve)&<.pop(),ur.length<lt.length+1&&ur.push([]);break}else if(Jr==="\\\\"){s.consume();let sn;s.gullet.future().text!==" "&&(sn=s.parseSizeGroup(!0)),Yt.push(sn?sn.value:null),fr(),ur.push(Pc(s)),Je=[],lt.push(Je),hr()}else throw new i("Expected & or \\\\ or \\cr or \\end",s.nextToken)}return s.gullet.endGroup(),s.gullet.endGroup(),{type:"array",mode:s.mode,addJot:b,arraystretch:M,body:lt,cols:E,rowGaps:Yt,hskipBeforeAndAfter:h,hLinesBeforeRow:ur,colSeparationType:_,tags:tr,leqno:Ae}}function dl(s){return s.slice(0,1)==="d"?"display":"text"}const Gn=function(s,o){let l,h;const b=s.body.length,E=s.hLinesBeforeRow;let M=0,_=new Array(b);const U=[],ie=Math.max(o.fontMetrics().arrayRuleWidth,o.minRuleThickness),ve=1/o.fontMetrics().ptPerEm;let ye=5*ve;s.colSeparationType&&s.colSeparationType==="small"&&(ye=.2778*(o.havingStyle(q.SCRIPT).sizeMultiplier/o.sizeMultiplier));const Ae=s.colSeparationType==="CD"?je({number:3,unit:"ex"},o):12*ve,Je=3*ve,lt=s.arraystretch*Ae,Yt=.7*lt,ur=.3*lt;let tr=0;function hr(pr){for(let yr=0;yr<pr.length;++yr)yr>0&&(tr+=.25),U.push({pos:tr,isDashed:pr[yr]})}for(hr(E[0]),l=0;l<s.body.length;++l){const pr=s.body[l];let yr=Yt,Br=ur;M<pr.length&&(M=pr.length);const Tr=new Array(pr.length);for(h=0;h<pr.length;++h){const Nn=dr(pr[h],o);Br<Nn.depth&&(Br=Nn.depth),yr<Nn.height&&(yr=Nn.height),Tr[h]=Nn}const zr=s.rowGaps[l];let $r=0;zr&&($r=je(zr,o),$r>0&&($r+=ur,Br<$r&&(Br=$r),$r=0)),s.addJot&&(Br+=Je),Tr.height=yr,Tr.depth=Br,tr+=yr,Tr.pos=tr,tr+=Br+$r,_[l]=Tr,hr(E[l+1])}const fr=tr/2+o.fontMetrics().axisHeight,Ar=s.cols||[],Jr=[];let sn,Fn;const Za=[];if(s.tags&&s.tags.some(pr=>pr))for(l=0;l<b;++l){const pr=_[l],yr=pr.pos-fr,Br=s.tags[l];let Tr;Br===!0?Tr=se.makeSpan(["eqn-num"],[],o):Br===!1?Tr=se.makeSpan([],[],o):Tr=se.makeSpan([],Wr(Br,o,!0),o),Tr.depth=pr.depth,Tr.height=pr.height,Za.push({type:"elem",elem:Tr,shift:yr})}for(h=0,Fn=0;h<M||Fn<Ar.length;++h,++Fn){let pr=Ar[Fn]||{},yr=!0;for(;pr.type==="separator";){if(yr||(sn=se.makeSpan(["arraycolsep"],[]),sn.style.width=he(o.fontMetrics().doubleRuleSep),Jr.push(sn)),pr.separator==="|"||pr.separator===":"){const zr=pr.separator==="|"?"solid":"dashed",$r=se.makeSpan(["vertical-separator"],[],o);$r.style.height=he(tr),$r.style.borderRightWidth=he(ie),$r.style.borderRightStyle=zr,$r.style.margin="0 "+he(-ie/2);const Nn=tr-fr;Nn&&($r.style.verticalAlign=he(-Nn)),Jr.push($r)}else throw new i("Invalid separator type: "+pr.separator);Fn++,pr=Ar[Fn]||{},yr=!1}if(h>=M)continue;let Br;(h>0||s.hskipBeforeAndAfter)&&(Br=C.deflt(pr.pregap,ye),Br!==0&&(sn=se.makeSpan(["arraycolsep"],[]),sn.style.width=he(Br),Jr.push(sn)));let Tr=[];for(l=0;l<b;++l){const zr=_[l],$r=zr[h];if(!$r)continue;const Nn=zr.pos-fr;$r.depth=zr.depth,$r.height=zr.height,Tr.push({type:"elem",elem:$r,shift:Nn})}Tr=se.makeVList({positionType:"individualShift",children:Tr},o),Tr=se.makeSpan(["col-align-"+(pr.align||"c")],[Tr]),Jr.push(Tr),(h<M-1||s.hskipBeforeAndAfter)&&(Br=C.deflt(pr.postgap,ye),Br!==0&&(sn=se.makeSpan(["arraycolsep"],[]),sn.style.width=he(Br),Jr.push(sn)))}if(_=se.makeSpan(["mtable"],Jr),U.length>0){const pr=se.makeLineSpan("hline",o,ie),yr=se.makeLineSpan("hdashline",o,ie),Br=[{type:"elem",elem:_,shift:0}];for(;U.length>0;){const Tr=U.pop(),zr=Tr.pos-fr;Tr.isDashed?Br.push({type:"elem",elem:yr,shift:zr}):Br.push({type:"elem",elem:pr,shift:zr})}_=se.makeVList({positionType:"individualShift",children:Br},o)}if(Za.length===0)return se.makeSpan(["mord"],[_],o);{let pr=se.makeVList({positionType:"individualShift",children:Za},o);return pr=se.makeSpan(["tag"],[pr],o),se.makeFragment([_,pr])}},Vg={c:"center ",l:"left ",r:"right "},Yn=function(s,o){const l=[],h=new Ye.MathNode("mtd",[],["mtr-glue"]),b=new Ye.MathNode("mtd",[],["mml-eqn-num"]);for(let ye=0;ye<s.body.length;ye++){const Ae=s.body[ye],Je=[];for(let lt=0;lt<Ae.length;lt++)Je.push(new Ye.MathNode("mtd",[wr(Ae[lt],o)]));s.tags&&s.tags[ye]&&(Je.unshift(h),Je.push(h),s.leqno?Je.unshift(b):Je.push(b)),l.push(new Ye.MathNode("mtr",Je))}let E=new Ye.MathNode("mtable",l);const M=s.arraystretch===.5?.1:.16+s.arraystretch-1+(s.addJot?.09:0);E.setAttribute("rowspacing",he(M));let _="",U="";if(s.cols&&s.cols.length>0){const ye=s.cols;let Ae="",Je=!1,lt=0,Yt=ye.length;ye[0].type==="separator"&&(_+="top ",lt=1),ye[ye.length-1].type==="separator"&&(_+="bottom ",Yt-=1);for(let ur=lt;ur<Yt;ur++)ye[ur].type==="align"?(U+=Vg[ye[ur].align],Je&&(Ae+="none "),Je=!0):ye[ur].type==="separator"&&Je&&(Ae+=ye[ur].separator==="|"?"solid ":"dashed ",Je=!1);E.setAttribute("columnalign",U.trim()),/[sd]/.test(Ae)&&E.setAttribute("columnlines",Ae.trim())}if(s.colSeparationType==="align"){const ye=s.cols||[];let Ae="";for(let Je=1;Je<ye.length;Je++)Ae+=Je%2?"0em ":"1em ";E.setAttribute("columnspacing",Ae.trim())}else s.colSeparationType==="alignat"||s.colSeparationType==="gather"?E.setAttribute("columnspacing","0em"):s.colSeparationType==="small"?E.setAttribute("columnspacing","0.2778em"):s.colSeparationType==="CD"?E.setAttribute("columnspacing","0.5em"):E.setAttribute("columnspacing","1em");let ie="";const ve=s.hLinesBeforeRow;_+=ve[0].length>0?"left ":"",_+=ve[ve.length-1].length>0?"right ":"";for(let ye=1;ye<ve.length-1;ye++)ie+=ve[ye].length===0?"none ":ve[ye][0]?"dashed ":"solid ";return/[sd]/.test(ie)&&E.setAttribute("rowlines",ie.trim()),_!==""&&(E=new Ye.MathNode("menclose",[E]),E.setAttribute("notation",_.trim())),s.arraystretch&&s.arraystretch<1&&(E=new Ye.MathNode("mstyle",[E]),E.setAttribute("scriptlevel","1")),E},Ic=function(s,o){s.envName.indexOf("ed")===-1&&Ai(s);const l=[],h=s.envName.indexOf("at")>-1?"alignat":"align",b=s.envName==="split",E=ma(s.parser,{cols:l,addJot:!0,autoTag:b?void 0:cl(s.envName),emptySingleRow:!0,colSeparationType:h,maxNumCols:b?2:void 0,leqno:s.parser.settings.leqno},"display");let M,_=0;const U={type:"ordgroup",mode:s.mode,body:[]};if(o[0]&&o[0].type==="ordgroup"){let ve="";for(let ye=0;ye<o[0].body.length;ye++){const Ae=Xt(o[0].body[ye],"textord");ve+=Ae.text}M=Number(ve),_=M*2}const ie=!_;E.body.forEach(function(ve){for(let ye=1;ye<ve.length;ye+=2){const Ae=Xt(ve[ye],"styling");Xt(Ae.body[0],"ordgroup").body.unshift(U)}if(ie)_<ve.length&&(_=ve.length);else{const ye=ve.length/2;if(M<ye)throw new i("Too many math in a row: "+("expected "+M+", but got "+ye),ve[0])}});for(let ve=0;ve<_;++ve){let ye="r",Ae=0;ve%2===1?ye="l":ve>0&&ie&&(Ae=1),l[ve]={type:"align",align:ye,pregap:Ae,postgap:0}}return E.colSeparationType=ie?"align":"alignat",E};Un({type:"array",names:["array","darray"],props:{numArgs:1},handler(s,o){const l=(Ci(o[0])?[o[0]]:Xt(o[0],"ordgroup").body).map(function(b){const E=Js(b).text;if("lcr".indexOf(E)!==-1)return{type:"align",align:E};if(E==="|")return{type:"separator",separator:"|"};if(E===":")return{type:"separator",separator:":"};throw new i("Unknown column alignment: "+E,b)}),h={cols:l,hskipBeforeAndAfter:!0,maxNumCols:l.length};return ma(s.parser,h,dl(s.envName))},htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(s){const o={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 M=s.parser;if(M.consumeSpaces(),M.fetch().text==="["){if(M.consume(),M.consumeSpaces(),l=M.fetch().text,"lcr".indexOf(l)===-1)throw new i("Expected l or c or r",M.nextToken);M.consume(),M.consumeSpaces(),M.expect("]"),M.consume(),h.cols=[{type:"align",align:l}]}}const b=ma(s.parser,h,dl(s.envName)),E=Math.max(0,...b.body.map(M=>M.length));return b.cols=new Array(E).fill({type:"align",align:l}),o?{type:"leftright",mode:s.mode,body:[b],left:o[0],right:o[1],rightColor:void 0}:b},htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(s){const o={arraystretch:.5},l=ma(s.parser,o,"script");return l.colSeparationType="small",l},htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["subarray"],props:{numArgs:1},handler(s,o){const l=(Ci(o[0])?[o[0]]:Xt(o[0],"ordgroup").body).map(function(b){const E=Js(b).text;if("lc".indexOf(E)!==-1)return{type:"align",align:E};throw new i("Unknown column alignment: "+E,b)});if(l.length>1)throw new i("{subarray} can contain only one column");let h={cols:l,hskipBeforeAndAfter:!1,arraystretch:.5};if(h=ma(s.parser,h,"script"),h.body.length>0&&h.body[0].length>1)throw new i("{subarray} can contain only one column");return h},htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(s){const o={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},l=ma(s.parser,o,dl(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:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Ic,htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(s){["gather","gather*"].includes(s.envName)&&Ai(s);const o={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:cl(s.envName),emptySingleRow:!0,leqno:s.parser.settings.leqno};return ma(s.parser,o,"display")},htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Ic,htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(s){Ai(s);const o={autoTag:cl(s.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:s.parser.settings.leqno};return ma(s.parser,o,"display")},htmlBuilder:Gn,mathmlBuilder:Yn}),Un({type:"array",names:["CD"],props:{numArgs:0},handler(s){return Ai(s),Og(s.parser)},htmlBuilder:Gn,mathmlBuilder:Yn}),j("\\nonumber","\\gdef\\@eqnsw{0}"),j("\\notag","\\nonumber"),it({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(s,o){throw new i(s.funcName+" valid only within array environment")}});var _c=Rc;it({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(s,o){let{parser:l,funcName:h}=s;const b=o[0];if(b.type!=="ordgroup")throw new i("Invalid environment name",b);let E="";for(let M=0;M<b.body.length;++M)E+=Xt(b.body[M],"textord").text;if(h==="\\begin"){if(!_c.hasOwnProperty(E))throw new i("No such environment: "+E,b);const M=_c[E],{args:_,optArgs:U}=l.parseArguments("\\begin{"+E+"}",M),ie={mode:l.mode,envName:E,parser:l},ve=M.handler(ie,_,U);l.expect("\\end",!1);const ye=l.nextToken,Ae=Xt(l.parseFunction(),"environment");if(Ae.name!==E)throw new i("Mismatch: \\begin{"+E+"} matched by \\end{"+Ae.name+"}",ye);return ve}return{type:"environment",mode:l.mode,name:E,nameGroup:b}}});const zc=(s,o)=>{const l=s.font,h=o.withFont(l);return dr(s.body,h)},jc=(s,o)=>{const l=s.font,h=o.withFont(l);return wr(s.body,h)},Lc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};it({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=Vn(o[0]);let E=h;return E in Lc&&(E=Lc[E]),{type:"font",mode:l.mode,font:E.slice(1),body:b}},htmlBuilder:zc,mathmlBuilder:jc}),it({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(s,o)=>{let{parser:l}=s;const h=o[0],b=C.isCharacterBox(h);return{type:"mclass",mode:l.mode,mclass:ki(h),body:[{type:"font",mode:l.mode,font:"boldsymbol",body:h}],isCharacterBox:b}}}),it({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(s,o)=>{let{parser:l,funcName:h,breakOnTokenText:b}=s;const{mode:E}=l,M=l.parseExpression(!0,b),_="math"+h.slice(1);return{type:"font",mode:E,font:_,body:{type:"ordgroup",mode:l.mode,body:M}}},htmlBuilder:zc,mathmlBuilder:jc});const Hc=(s,o)=>{let l=o;return s==="display"?l=l.id>=q.SCRIPT.id?l.text():q.DISPLAY:s==="text"&&l.size===q.DISPLAY.size?l=q.TEXT:s==="script"?l=q.SCRIPT:s==="scriptscript"&&(l=q.SCRIPTSCRIPT),l},fl=(s,o)=>{const l=Hc(s.size,o.style),h=l.fracNum(),b=l.fracDen();let E;E=o.havingStyle(h);const M=dr(s.numer,E,o);if(s.continued){const hr=8.5/o.fontMetrics().ptPerEm,fr=3.5/o.fontMetrics().ptPerEm;M.height=M.height<hr?hr:M.height,M.depth=M.depth<fr?fr:M.depth}E=o.havingStyle(b);const _=dr(s.denom,E,o);let U,ie,ve;s.hasBarLine?(s.barSize?(ie=je(s.barSize,o),U=se.makeLineSpan("frac-line",o,ie)):U=se.makeLineSpan("frac-line",o),ie=U.height,ve=U.height):(U=null,ie=0,ve=o.fontMetrics().defaultRuleThickness);let ye,Ae,Je;l.size===q.DISPLAY.size||s.size==="display"?(ye=o.fontMetrics().num1,ie>0?Ae=3*ve:Ae=7*ve,Je=o.fontMetrics().denom1):(ie>0?(ye=o.fontMetrics().num2,Ae=ve):(ye=o.fontMetrics().num3,Ae=3*ve),Je=o.fontMetrics().denom2);let lt;if(U){const hr=o.fontMetrics().axisHeight;ye-M.depth-(hr+.5*ie)<Ae&&(ye+=Ae-(ye-M.depth-(hr+.5*ie))),hr-.5*ie-(_.height-Je)<Ae&&(Je+=Ae-(hr-.5*ie-(_.height-Je)));const fr=-(hr-.5*ie);lt=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:_,shift:Je},{type:"elem",elem:U,shift:fr},{type:"elem",elem:M,shift:-ye}]},o)}else{const hr=ye-M.depth-(_.height-Je);hr<Ae&&(ye+=.5*(Ae-hr),Je+=.5*(Ae-hr)),lt=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:_,shift:Je},{type:"elem",elem:M,shift:-ye}]},o)}E=o.havingStyle(l),lt.height*=E.sizeMultiplier/o.sizeMultiplier,lt.depth*=E.sizeMultiplier/o.sizeMultiplier;let Yt;l.size===q.DISPLAY.size?Yt=o.fontMetrics().delim1:l.size===q.SCRIPTSCRIPT.size?Yt=o.havingStyle(q.SCRIPT).fontMetrics().delim2:Yt=o.fontMetrics().delim2;let ur,tr;return s.leftDelim==null?ur=Bo(o,["mopen"]):ur=aa.customSizedDelim(s.leftDelim,Yt,!0,o.havingStyle(l),s.mode,["mopen"]),s.continued?tr=se.makeSpan([]):s.rightDelim==null?tr=Bo(o,["mclose"]):tr=aa.customSizedDelim(s.rightDelim,Yt,!0,o.havingStyle(l),s.mode,["mclose"]),se.makeSpan(["mord"].concat(E.sizingClasses(o)),[ur,se.makeSpan(["mfrac"],[lt]),tr],o)},hl=(s,o)=>{let l=new Ye.MathNode("mfrac",[wr(s.numer,o),wr(s.denom,o)]);if(!s.hasBarLine)l.setAttribute("linethickness","0px");else if(s.barSize){const b=je(s.barSize,o);l.setAttribute("linethickness",he(b))}const h=Hc(s.size,o.style);if(h.size!==o.style.size){l=new Ye.MathNode("mstyle",[l]);const b=h.size===q.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 E=new Ye.MathNode("mo",[new Ye.TextNode(s.leftDelim.replace("\\",""))]);E.setAttribute("fence","true"),b.push(E)}if(b.push(l),s.rightDelim!=null){const E=new Ye.MathNode("mo",[new Ye.TextNode(s.rightDelim.replace("\\",""))]);E.setAttribute("fence","true"),b.push(E)}return Ys(b)}return l};it({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0],E=o[1];let M,_=null,U=null,ie="auto";switch(h){case"\\dfrac":case"\\frac":case"\\tfrac":M=!0;break;case"\\\\atopfrac":M=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":M=!1,_="(",U=")";break;case"\\\\bracefrac":M=!1,_="\\{",U="\\}";break;case"\\\\brackfrac":M=!1,_="[",U="]";break;default:throw new Error("Unrecognized genfrac command")}switch(h){case"\\dfrac":case"\\dbinom":ie="display";break;case"\\tfrac":case"\\tbinom":ie="text";break}return{type:"genfrac",mode:l.mode,continued:!1,numer:b,denom:E,hasBarLine:M,leftDelim:_,rightDelim:U,size:ie,barSize:null}},htmlBuilder:fl,mathmlBuilder:hl}),it({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0],E=o[1];return{type:"genfrac",mode:l.mode,continued:!0,numer:b,denom:E,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),it({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(s){let{parser:o,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:o.mode,replaceWith:b,token:h}}});const Kc=["display","text","script","scriptscript"],qc=function(s){let o=null;return s.length>0&&(o=s,o=o==="."?null:o),o};it({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(s,o){let{parser:l}=s;const h=o[4],b=o[5],E=Vn(o[0]),M=E.type==="atom"&&E.family==="open"?qc(E.text):null,_=Vn(o[1]),U=_.type==="atom"&&_.family==="close"?qc(_.text):null,ie=Xt(o[2],"size");let ve,ye=null;ie.isBlank?ve=!0:(ye=ie.value,ve=ye.number>0);let Ae="auto",Je=o[3];if(Je.type==="ordgroup"){if(Je.body.length>0){const lt=Xt(Je.body[0],"textord");Ae=Kc[Number(lt.text)]}}else Je=Xt(Je,"textord"),Ae=Kc[Number(Je.text)];return{type:"genfrac",mode:l.mode,numer:h,denom:b,continued:!1,hasBarLine:ve,barSize:ye,leftDelim:M,rightDelim:U,size:Ae}},htmlBuilder:fl,mathmlBuilder:hl}),it({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(s,o){let{parser:l,funcName:h,token:b}=s;return{type:"infix",mode:l.mode,replaceWith:"\\\\abovefrac",size:Xt(o[0],"size").value,token:b}}}),it({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0],E=x(Xt(o[1],"infix").size),M=o[2],_=E.number>0;return{type:"genfrac",mode:l.mode,numer:b,denom:M,continued:!1,hasBarLine:_,barSize:E,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:fl,mathmlBuilder:hl});const Vc=(s,o)=>{const l=o.style;let h,b;s.type==="supsub"?(h=s.sup?dr(s.sup,o.havingStyle(l.sup()),o):dr(s.sub,o.havingStyle(l.sub()),o),b=Xt(s.base,"horizBrace")):b=Xt(s,"horizBrace");const E=dr(b.base,o.havingBaseStyle(q.DISPLAY)),M=na.svgSpan(b,o);let _;if(b.isOver?(_=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:E},{type:"kern",size:.1},{type:"elem",elem:M}]},o),_.children[0].children[0].children[1].classes.push("svg-align")):(_=se.makeVList({positionType:"bottom",positionData:E.depth+.1+M.height,children:[{type:"elem",elem:M},{type:"kern",size:.1},{type:"elem",elem:E}]},o),_.children[0].children[0].children[0].classes.push("svg-align")),h){const U=se.makeSpan(["mord",b.isOver?"mover":"munder"],[_],o);b.isOver?_=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:U},{type:"kern",size:.2},{type:"elem",elem:h}]},o):_=se.makeVList({positionType:"bottom",positionData:U.depth+.2+h.height+h.depth,children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:U}]},o)}return se.makeSpan(["mord",b.isOver?"mover":"munder"],[_],o)};it({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(s,o){let{parser:l,funcName:h}=s;return{type:"horizBrace",mode:l.mode,label:h,isOver:/^\\over/.test(h),base:o[0]}},htmlBuilder:Vc,mathmlBuilder:(s,o)=>{const l=na.mathMLnode(s.label);return new Ye.MathNode(s.isOver?"mover":"munder",[wr(s.base,o),l])}}),it({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[1],b=Xt(o[0],"url").url;return l.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:l.mode,href:b,body:Sr(h)}:l.formatUnsupportedCmd("\\href")},htmlBuilder:(s,o)=>{const l=Wr(s.body,o,!1);return se.makeAnchor(s.href,[],l,o)},mathmlBuilder:(s,o)=>{let l=pa(s.body,o);return l instanceof kn||(l=new kn("mrow",[l])),l.setAttribute("href",s.href),l}}),it({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=Xt(o[0],"url").url;if(!l.settings.isTrusted({command:"\\url",url:h}))return l.formatUnsupportedCmd("\\url");const b=[];for(let M=0;M<h.length;M++){let _=h[M];_==="~"&&(_="\\textasciitilde"),b.push({type:"textord",mode:"text",text:_})}const E={type:"text",mode:l.mode,font:"\\texttt",body:b};return{type:"href",mode:l.mode,href:h,body:Sr(E)}}}),it({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(s,o){let{parser:l}=s;return{type:"hbox",mode:l.mode,body:Sr(o[0])}},htmlBuilder(s,o){const l=Wr(s.body,o,!1);return se.makeFragment(l)},mathmlBuilder(s,o){return new Ye.MathNode("mrow",vn(s.body,o))}}),it({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(s,o)=>{let{parser:l,funcName:h,token:b}=s;const E=Xt(o[0],"raw").string,M=o[1];l.settings.strict&&l.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");let _;const U={};switch(h){case"\\htmlClass":U.class=E,_={command:"\\htmlClass",class:E};break;case"\\htmlId":U.id=E,_={command:"\\htmlId",id:E};break;case"\\htmlStyle":U.style=E,_={command:"\\htmlStyle",style:E};break;case"\\htmlData":{const ie=E.split(",");for(let ve=0;ve<ie.length;ve++){const ye=ie[ve].split("=");if(ye.length!==2)throw new i("Error parsing key-value for \\htmlData");U["data-"+ye[0].trim()]=ye[1].trim()}_={command:"\\htmlData",attributes:U};break}default:throw new Error("Unrecognized html command")}return l.settings.isTrusted(_)?{type:"html",mode:l.mode,attributes:U,body:Sr(M)}:l.formatUnsupportedCmd(h)},htmlBuilder:(s,o)=>{const l=Wr(s.body,o,!1),h=["enclosing"];s.attributes.class&&h.push(...s.attributes.class.trim().split(/\s+/));const b=se.makeSpan(h,l,o);for(const E in s.attributes)E!=="class"&&s.attributes.hasOwnProperty(E)&&b.setAttribute(E,s.attributes[E]);return b},mathmlBuilder:(s,o)=>pa(s.body,o)}),it({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;return{type:"htmlmathml",mode:l.mode,html:Sr(o[0]),mathml:Sr(o[1])}},htmlBuilder:(s,o)=>{const l=Wr(s.html,o,!1);return se.makeFragment(l)},mathmlBuilder:(s,o)=>pa(s.mathml,o)});const pl=function(s){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(s))return{number:+s,unit:"bp"};{const o=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(s);if(!o)throw new i("Invalid size: '"+s+"' in \\includegraphics");const l={number:+(o[1]+o[2]),unit:o[3]};if(!Mt(l))throw new i("Invalid unit: '"+l.unit+"' in \\includegraphics.");return l}};it({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(s,o,l)=>{let{parser:h}=s,b={number:0,unit:"em"},E={number:.9,unit:"em"},M={number:0,unit:"em"},_="";if(l[0]){const ie=Xt(l[0],"raw").string.split(",");for(let ve=0;ve<ie.length;ve++){const ye=ie[ve].split("=");if(ye.length===2){const Ae=ye[1].trim();switch(ye[0].trim()){case"alt":_=Ae;break;case"width":b=pl(Ae);break;case"height":E=pl(Ae);break;case"totalheight":M=pl(Ae);break;default:throw new i("Invalid key: '"+ye[0]+"' in \\includegraphics.")}}}}const U=Xt(o[0],"url").url;return _===""&&(_=U,_=_.replace(/^.*[\\/]/,""),_=_.substring(0,_.lastIndexOf("."))),h.settings.isTrusted({command:"\\includegraphics",url:U})?{type:"includegraphics",mode:h.mode,alt:_,width:b,height:E,totalheight:M,src:U}:h.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(s,o)=>{const l=je(s.height,o);let h=0;s.totalheight.number>0&&(h=je(s.totalheight,o)-l);let b=0;s.width.number>0&&(b=je(s.width,o));const E={height:he(l+h)};b>0&&(E.width=he(b)),h>0&&(E.verticalAlign=he(-h));const M=new or(s.src,s.alt,E);return M.height=l,M.depth=h,M},mathmlBuilder:(s,o)=>{const l=new Ye.MathNode("mglyph",[]);l.setAttribute("alt",s.alt);const h=je(s.height,o);let b=0;if(s.totalheight.number>0&&(b=je(s.totalheight,o)-h,l.setAttribute("valign",he(-b))),l.setAttribute("height",he(h+b)),s.width.number>0){const E=je(s.width,o);l.setAttribute("width",he(E))}return l.setAttribute("src",s.src),l}}),it({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(s,o){let{parser:l,funcName:h}=s;const b=Xt(o[0],"size");if(l.settings.strict){const E=h[1]==="m",M=b.value.unit==="mu";E?(M||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")):M&&l.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+h+" doesn't support mu units")}return{type:"kern",mode:l.mode,dimension:b.value}},htmlBuilder(s,o){return se.makeGlue(s.dimension,o)},mathmlBuilder(s,o){const l=je(s.dimension,o);return new Ye.SpaceNode(l)}}),it({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0];return{type:"lap",mode:l.mode,alignment:h.slice(5),body:b}},htmlBuilder:(s,o)=>{let l;s.alignment==="clap"?(l=se.makeSpan([],[dr(s.body,o)]),l=se.makeSpan(["inner"],[l],o)):l=se.makeSpan(["inner"],[dr(s.body,o)]);const h=se.makeSpan(["fix"],[]);let b=se.makeSpan([s.alignment],[l,h],o);const E=se.makeSpan(["strut"]);return E.style.height=he(b.height+b.depth),b.depth&&(E.style.verticalAlign=he(-b.depth)),b.children.unshift(E),b=se.makeSpan(["thinbox"],[b],o),se.makeSpan(["mord","vbox"],[b],o)},mathmlBuilder:(s,o)=>{const l=new Ye.MathNode("mpadded",[wr(s.body,o)]);if(s.alignment!=="rlap"){const h=s.alignment==="llap"?"-1":"-0.5";l.setAttribute("lspace",h+"width")}return l.setAttribute("width","0px"),l}}),it({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,o){let{funcName:l,parser:h}=s;const b=h.mode;h.switchMode("math");const E=l==="\\("?"\\)":"$",M=h.parseExpression(!1,E);return h.expect(E),h.switchMode(b),{type:"styling",mode:h.mode,style:"text",body:M}}}),it({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(s,o){throw new i("Mismatched "+s.funcName)}});const Wc=(s,o)=>{switch(o.style.size){case q.DISPLAY.size:return s.display;case q.TEXT.size:return s.text;case q.SCRIPT.size:return s.script;case q.SCRIPTSCRIPT.size:return s.scriptscript;default:return s.text}};it({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(s,o)=>{let{parser:l}=s;return{type:"mathchoice",mode:l.mode,display:Sr(o[0]),text:Sr(o[1]),script:Sr(o[2]),scriptscript:Sr(o[3])}},htmlBuilder:(s,o)=>{const l=Wc(s,o),h=Wr(l,o,!1);return se.makeFragment(h)},mathmlBuilder:(s,o)=>{const l=Wc(s,o);return pa(l,o)}});const Uc=(s,o,l,h,b,E,M)=>{s=se.makeSpan([],[s]);const _=l&&C.isCharacterBox(l);let U,ie;if(o){const Ae=dr(o,h.havingStyle(b.sup()),h);ie={elem:Ae,kern:Math.max(h.fontMetrics().bigOpSpacing1,h.fontMetrics().bigOpSpacing3-Ae.depth)}}if(l){const Ae=dr(l,h.havingStyle(b.sub()),h);U={elem:Ae,kern:Math.max(h.fontMetrics().bigOpSpacing2,h.fontMetrics().bigOpSpacing4-Ae.height)}}let ve;if(ie&&U){const Ae=h.fontMetrics().bigOpSpacing5+U.elem.height+U.elem.depth+U.kern+s.depth+M;ve=se.makeVList({positionType:"bottom",positionData:Ae,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:U.elem,marginLeft:he(-E)},{type:"kern",size:U.kern},{type:"elem",elem:s},{type:"kern",size:ie.kern},{type:"elem",elem:ie.elem,marginLeft:he(E)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else if(U){const Ae=s.height-M;ve=se.makeVList({positionType:"top",positionData:Ae,children:[{type:"kern",size:h.fontMetrics().bigOpSpacing5},{type:"elem",elem:U.elem,marginLeft:he(-E)},{type:"kern",size:U.kern},{type:"elem",elem:s}]},h)}else if(ie){const Ae=s.depth+M;ve=se.makeVList({positionType:"bottom",positionData:Ae,children:[{type:"elem",elem:s},{type:"kern",size:ie.kern},{type:"elem",elem:ie.elem,marginLeft:he(E)},{type:"kern",size:h.fontMetrics().bigOpSpacing5}]},h)}else return s;const ye=[ve];if(U&&E!==0&&!_){const Ae=se.makeSpan(["mspace"],[],h);Ae.style.marginRight=he(E),ye.unshift(Ae)}return se.makeSpan(["mop","op-limits"],ye,h)},Gc=["\\smallint"],Xa=(s,o)=>{let l,h,b=!1,E;s.type==="supsub"?(l=s.sup,h=s.sub,E=Xt(s.base,"op"),b=!0):E=Xt(s,"op");const M=o.style;let _=!1;M.size===q.DISPLAY.size&&E.symbol&&!Gc.includes(E.name)&&(_=!0);let U;if(E.symbol){const ye=_?"Size2-Regular":"Size1-Regular";let Ae="";if((E.name==="\\oiint"||E.name==="\\oiiint")&&(Ae=E.name.slice(1),E.name=Ae==="oiint"?"\\iint":"\\iiint"),U=se.makeSymbol(E.name,ye,"math",o,["mop","op-symbol",_?"large-op":"small-op"]),Ae.length>0){const Je=U.italic,lt=se.staticSvg(Ae+"Size"+(_?"2":"1"),o);U=se.makeVList({positionType:"individualShift",children:[{type:"elem",elem:U,shift:0},{type:"elem",elem:lt,shift:_?.08:0}]},o),E.name="\\"+Ae,U.classes.unshift("mop"),U.italic=Je}}else if(E.body){const ye=Wr(E.body,o,!0);ye.length===1&&ye[0]instanceof Rt?(U=ye[0],U.classes[0]="mop"):U=se.makeSpan(["mop"],ye,o)}else{const ye=[];for(let Ae=1;Ae<E.name.length;Ae++)ye.push(se.mathsym(E.name[Ae],E.mode,o));U=se.makeSpan(["mop"],ye,o)}let ie=0,ve=0;return(U instanceof Rt||E.name==="\\oiint"||E.name==="\\oiiint")&&!E.suppressBaseShift&&(ie=(U.height-U.depth)/2-o.fontMetrics().axisHeight,ve=U.italic),b?Uc(U,l,h,o,M,ve,ie):(ie&&(U.style.position="relative",U.style.top=he(ie)),U)},To=(s,o)=>{let l;if(s.symbol)l=new kn("mo",[Bn(s.name,s.mode)]),Gc.includes(s.name)&&l.setAttribute("largeop","false");else if(s.body)l=new kn("mo",vn(s.body,o));else{l=new kn("mi",[new Wn(s.name.slice(1))]);const h=new kn("mo",[Bn("\u2061","text")]);s.parentIsSupSub?l=new kn("mrow",[l,h]):l=dc([l,h])}return l},Wg={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};it({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,o)=>{let{parser:l,funcName:h}=s,b=h;return b.length===1&&(b=Wg[b]),{type:"op",mode:l.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},htmlBuilder:Xa,mathmlBuilder:To}),it({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[0];return{type:"op",mode:l.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Sr(h)}},htmlBuilder:Xa,mathmlBuilder:To});const Ug={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};it({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:o,funcName:l}=s;return{type:"op",mode:o.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:Xa,mathmlBuilder:To}),it({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(s){let{parser:o,funcName:l}=s;return{type:"op",mode:o.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:l}},htmlBuilder:Xa,mathmlBuilder:To}),it({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler(s){let{parser:o,funcName:l}=s,h=l;return h.length===1&&(h=Ug[h]),{type:"op",mode:o.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:h}},htmlBuilder:Xa,mathmlBuilder:To});const Yc=(s,o)=>{let l,h,b=!1,E;s.type==="supsub"?(l=s.sup,h=s.sub,E=Xt(s.base,"operatorname"),b=!0):E=Xt(s,"operatorname");let M;if(E.body.length>0){const _=E.body.map(ie=>{const ve=ie.text;return typeof ve=="string"?{type:"textord",mode:ie.mode,text:ve}:ie}),U=Wr(_,o.withFont("mathrm"),!0);for(let ie=0;ie<U.length;ie++){const ve=U[ie];ve instanceof Rt&&(ve.text=ve.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}M=se.makeSpan(["mop"],U,o)}else M=se.makeSpan(["mop"],[],o);return b?Uc(M,l,h,o,o.style,0,0):M};it({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(s,o)=>{let{parser:l,funcName:h}=s;const b=o[0];return{type:"operatorname",mode:l.mode,body:Sr(b),alwaysHandleSupSub:h==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Yc,mathmlBuilder:(s,o)=>{let l=vn(s.body,o.withFont("mathrm")),h=!0;for(let M=0;M<l.length;M++){const _=l[M];if(!(_ instanceof Ye.SpaceNode))if(_ instanceof Ye.MathNode)switch(_.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const U=_.children[0];_.children.length===1&&U instanceof Ye.TextNode?U.text=U.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):h=!1;break}default:h=!1}else h=!1}if(h){const M=l.map(_=>_.toText()).join("");l=[new Ye.TextNode(M)]}const b=new Ye.MathNode("mi",l);b.setAttribute("mathvariant","normal");const E=new Ye.MathNode("mo",[Bn("\u2061","text")]);return s.parentIsSupSub?new Ye.MathNode("mrow",[b,E]):Ye.newDocumentFragment([b,E])}}),j("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),on({type:"ordgroup",htmlBuilder(s,o){return s.semisimple?se.makeFragment(Wr(s.body,o,!1)):se.makeSpan(["mord"],Wr(s.body,o,!0),o)},mathmlBuilder(s,o){return pa(s.body,o,!0)}}),it({type:"overline",names:["\\overline"],props:{numArgs:1},handler(s,o){let{parser:l}=s;const h=o[0];return{type:"overline",mode:l.mode,body:h}},htmlBuilder(s,o){const l=dr(s.body,o.havingCrampedStyle()),h=se.makeLineSpan("overline-line",o),b=o.fontMetrics().defaultRuleThickness,E=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:3*b},{type:"elem",elem:h},{type:"kern",size:b}]},o);return se.makeSpan(["mord","overline"],[E],o)},mathmlBuilder(s,o){const l=new Ye.MathNode("mo",[new Ye.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Ye.MathNode("mover",[wr(s.body,o),l]);return h.setAttribute("accent","true"),h}}),it({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[0];return{type:"phantom",mode:l.mode,body:Sr(h)}},htmlBuilder:(s,o)=>{const l=Wr(s.body,o.withPhantom(),!1);return se.makeFragment(l)},mathmlBuilder:(s,o)=>{const l=vn(s.body,o);return new Ye.MathNode("mphantom",l)}}),it({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[0];return{type:"hphantom",mode:l.mode,body:h}},htmlBuilder:(s,o)=>{let l=se.makeSpan([],[dr(s.body,o.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=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},o),se.makeSpan(["mord"],[l],o)},mathmlBuilder:(s,o)=>{const l=vn(Sr(s.body),o),h=new Ye.MathNode("mphantom",l),b=new Ye.MathNode("mpadded",[h]);return b.setAttribute("height","0px"),b.setAttribute("depth","0px"),b}}),it({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(s,o)=>{let{parser:l}=s;const h=o[0];return{type:"vphantom",mode:l.mode,body:h}},htmlBuilder:(s,o)=>{const l=se.makeSpan(["inner"],[dr(s.body,o.withPhantom())]),h=se.makeSpan(["fix"],[]);return se.makeSpan(["mord","rlap"],[l,h],o)},mathmlBuilder:(s,o)=>{const l=vn(Sr(s.body),o),h=new Ye.MathNode("mphantom",l),b=new Ye.MathNode("mpadded",[h]);return b.setAttribute("width","0px"),b}}),it({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(s,o){let{parser:l}=s;const h=Xt(o[0],"size").value,b=o[1];return{type:"raisebox",mode:l.mode,dy:h,body:b}},htmlBuilder(s,o){const l=dr(s.body,o),h=je(s.dy,o);return se.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:l}]},o)},mathmlBuilder(s,o){const l=new Ye.MathNode("mpadded",[wr(s.body,o)]),h=s.dy.number+s.dy.unit;return l.setAttribute("voffset",h),l}}),it({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(s){let{parser:o}=s;return{type:"internal",mode:o.mode}}}),it({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(s,o,l){let{parser:h}=s;const b=l[0],E=Xt(o[0],"size"),M=Xt(o[1],"size");return{type:"rule",mode:h.mode,shift:b&&Xt(b,"size").value,width:E.value,height:M.value}},htmlBuilder(s,o){const l=se.makeSpan(["mord","rule"],[],o),h=je(s.width,o),b=je(s.height,o),E=s.shift?je(s.shift,o):0;return l.style.borderRightWidth=he(h),l.style.borderTopWidth=he(b),l.style.bottom=he(E),l.width=h,l.height=b+E,l.depth=-E,l.maxFontSize=b*1.125*o.sizeMultiplier,l},mathmlBuilder(s,o){const l=je(s.width,o),h=je(s.height,o),b=s.shift?je(s.shift,o):0,E=o.color&&o.getColor()||"black",M=new Ye.MathNode("mspace");M.setAttribute("mathbackground",E),M.setAttribute("width",he(l)),M.setAttribute("height",he(h));const _=new Ye.MathNode("mpadded",[M]);return b>=0?_.setAttribute("height",he(b)):(_.setAttribute("height",he(b)),_.setAttribute("depth",he(-b))),_.setAttribute("voffset",he(b)),_}});function Xc(s,o,l){const h=Wr(s,o,!1),b=o.sizeMultiplier/l.sizeMultiplier;for(let E=0;E<h.length;E++){const M=h[E].classes.indexOf("sizing");M<0?Array.prototype.push.apply(h[E].classes,o.sizingClasses(l)):h[E].classes[M+1]==="reset-size"+o.size&&(h[E].classes[M+1]="reset-size"+l.size),h[E].height*=b,h[E].depth*=b}return se.makeFragment(h)}const Zc=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];it({type:"sizing",names:Zc,props:{numArgs:0,allowedInText:!0},handler:(s,o)=>{let{breakOnTokenText:l,funcName:h,parser:b}=s;const E=b.parseExpression(!1,l);return{type:"sizing",mode:b.mode,size:Zc.indexOf(h)+1,body:E}},htmlBuilder:(s,o)=>{const l=o.havingSize(s.size);return Xc(s.body,l,o)},mathmlBuilder:(s,o)=>{const l=o.havingSize(s.size),h=vn(s.body,l),b=new Ye.MathNode("mstyle",h);return b.setAttribute("mathsize",he(l.sizeMultiplier)),b}}),it({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(s,o,l)=>{let{parser:h}=s,b=!1,E=!1;const M=l[0]&&Xt(l[0],"ordgroup");if(M){let U="";for(let ie=0;ie<M.body.length;++ie)if(U=M.body[ie].text,U==="t")b=!0;else if(U==="b")E=!0;else{b=!1,E=!1;break}}else b=!0,E=!0;const _=o[0];return{type:"smash",mode:h.mode,body:_,smashHeight:b,smashDepth:E}},htmlBuilder:(s,o)=>{const l=se.makeSpan([],[dr(s.body,o)]);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=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l}]},o);return se.makeSpan(["mord"],[h],o)},mathmlBuilder:(s,o)=>{const l=new Ye.MathNode("mpadded",[wr(s.body,o)]);return s.smashHeight&&l.setAttribute("height","0px"),s.smashDepth&&l.setAttribute("depth","0px"),l}}),it({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(s,o,l){let{parser:h}=s;const b=l[0],E=o[0];return{type:"sqrt",mode:h.mode,body:E,index:b}},htmlBuilder(s,o){let l=dr(s.body,o.havingCrampedStyle());l.height===0&&(l.height=o.fontMetrics().xHeight),l=se.wrapFragment(l,o);const h=o.fontMetrics().defaultRuleThickness;let b=h;o.style.id<q.TEXT.id&&(b=o.fontMetrics().xHeight);let E=h+b/4;const M=l.height+l.depth+E+h,{span:_,ruleWidth:U,advanceWidth:ie}=aa.sqrtImage(M,o),ve=_.height-U;ve>l.height+l.depth+E&&(E=(E+ve-l.height-l.depth)/2);const ye=_.height-l.height-E-U;l.style.paddingLeft=he(ie);const Ae=se.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l,wrapperClasses:["svg-align"]},{type:"kern",size:-(l.height+ye)},{type:"elem",elem:_},{type:"kern",size:U}]},o);if(s.index){const Je=o.havingStyle(q.SCRIPTSCRIPT),lt=dr(s.index,Je,o),Yt=.6*(Ae.height-Ae.depth),ur=se.makeVList({positionType:"shift",positionData:-Yt,children:[{type:"elem",elem:lt}]},o),tr=se.makeSpan(["root"],[ur]);return se.makeSpan(["mord","sqrt"],[tr,Ae],o)}else return se.makeSpan(["mord","sqrt"],[Ae],o)},mathmlBuilder(s,o){const{body:l,index:h}=s;return h?new Ye.MathNode("mroot",[wr(l,o),wr(h,o)]):new Ye.MathNode("msqrt",[wr(l,o)])}});const Jc={display:q.DISPLAY,text:q.TEXT,script:q.SCRIPT,scriptscript:q.SCRIPTSCRIPT};it({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(s,o){let{breakOnTokenText:l,funcName:h,parser:b}=s;const E=b.parseExpression(!0,l),M=h.slice(1,h.length-5);return{type:"styling",mode:b.mode,style:M,body:E}},htmlBuilder(s,o){const l=Jc[s.style],h=o.havingStyle(l).withFont("");return Xc(s.body,h,o)},mathmlBuilder(s,o){const l=Jc[s.style],h=o.havingStyle(l),b=vn(s.body,h),E=new Ye.MathNode("mstyle",b),M={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[s.style];return E.setAttribute("scriptlevel",M[0]),E.setAttribute("displaystyle",M[1]),E}});const Gg=function(s,o){const l=s.base;return l?l.type==="op"?l.limits&&(o.style.size===q.DISPLAY.size||l.alwaysHandleSupSub)?Xa:null:l.type==="operatorname"?l.alwaysHandleSupSub&&(o.style.size===q.DISPLAY.size||l.limits)?Yc:null:l.type==="accent"?C.isCharacterBox(l.base)?Qs:null:l.type==="horizBrace"&&!s.sub===l.isOver?Vc:null:null};on({type:"supsub",htmlBuilder(s,o){const l=Gg(s,o);if(l)return l(s,o);const{base:h,sup:b,sub:E}=s,M=dr(h,o);let _,U;const ie=o.fontMetrics();let ve=0,ye=0;const Ae=h&&C.isCharacterBox(h);if(b){const fr=o.havingStyle(o.style.sup());_=dr(b,fr,o),Ae||(ve=M.height-fr.fontMetrics().supDrop*fr.sizeMultiplier/o.sizeMultiplier)}if(E){const fr=o.havingStyle(o.style.sub());U=dr(E,fr,o),Ae||(ye=M.depth+fr.fontMetrics().subDrop*fr.sizeMultiplier/o.sizeMultiplier)}let Je;o.style===q.DISPLAY?Je=ie.sup1:o.style.cramped?Je=ie.sup3:Je=ie.sup2;const lt=o.sizeMultiplier,Yt=he(.5/ie.ptPerEm/lt);let ur=null;if(U){const fr=s.base&&s.base.type==="op"&&s.base.name&&(s.base.name==="\\oiint"||s.base.name==="\\oiiint");(M instanceof Rt||fr)&&(ur=he(-M.italic))}let tr;if(_&&U){ve=Math.max(ve,Je,_.depth+.25*ie.xHeight),ye=Math.max(ye,ie.sub2);const fr=4*ie.defaultRuleThickness;if(ve-_.depth-(U.height-ye)<fr){ye=fr-(ve-_.depth)+U.height;const Jr=.8*ie.xHeight-(ve-_.depth);Jr>0&&(ve+=Jr,ye-=Jr)}const Ar=[{type:"elem",elem:U,shift:ye,marginRight:Yt,marginLeft:ur},{type:"elem",elem:_,shift:-ve,marginRight:Yt}];tr=se.makeVList({positionType:"individualShift",children:Ar},o)}else if(U){ye=Math.max(ye,ie.sub1,U.height-.8*ie.xHeight);const fr=[{type:"elem",elem:U,marginLeft:ur,marginRight:Yt}];tr=se.makeVList({positionType:"shift",positionData:ye,children:fr},o)}else if(_)ve=Math.max(ve,Je,_.depth+.25*ie.xHeight),tr=se.makeVList({positionType:"shift",positionData:-ve,children:[{type:"elem",elem:_,marginRight:Yt}]},o);else throw new Error("supsub must have either sup or sub.");const hr=Us(M,"right")||"mord";return se.makeSpan([hr],[M,se.makeSpan(["msupsub"],[tr])],o)},mathmlBuilder(s,o){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 E=[wr(s.base,o)];s.sub&&E.push(wr(s.sub,o)),s.sup&&E.push(wr(s.sup,o));let M;if(l)M=h?"mover":"munder";else if(s.sub)if(s.sup){const _=s.base;_&&_.type==="op"&&_.limits&&o.style===q.DISPLAY||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(o.style===q.DISPLAY||_.limits)?M="munderover":M="msubsup"}else{const _=s.base;_&&_.type==="op"&&_.limits&&(o.style===q.DISPLAY||_.alwaysHandleSupSub)||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(_.limits||o.style===q.DISPLAY)?M="munder":M="msub"}else{const _=s.base;_&&_.type==="op"&&_.limits&&(o.style===q.DISPLAY||_.alwaysHandleSupSub)||_&&_.type==="operatorname"&&_.alwaysHandleSupSub&&(_.limits||o.style===q.DISPLAY)?M="mover":M="msup"}return new Ye.MathNode(M,E)}}),on({type:"atom",htmlBuilder(s,o){return se.mathsym(s.text,s.mode,o,["m"+s.family])},mathmlBuilder(s,o){const l=new Ye.MathNode("mo",[Bn(s.text,s.mode)]);if(s.family==="bin"){const h=Xs(s,o);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 Qc={mi:"italic",mn:"normal",mtext:"normal"};on({type:"mathord",htmlBuilder(s,o){return se.makeOrd(s,o,"mathord")},mathmlBuilder(s,o){const l=new Ye.MathNode("mi",[Bn(s.text,s.mode,o)]),h=Xs(s,o)||"italic";return h!==Qc[l.type]&&l.setAttribute("mathvariant",h),l}}),on({type:"textord",htmlBuilder(s,o){return se.makeOrd(s,o,"textord")},mathmlBuilder(s,o){const l=Bn(s.text,s.mode,o),h=Xs(s,o)||"normal";let b;return s.mode==="text"?b=new Ye.MathNode("mtext",[l]):/[0-9]/.test(s.text)?b=new Ye.MathNode("mn",[l]):s.text==="\\prime"?b=new Ye.MathNode("mo",[l]):b=new Ye.MathNode("mi",[l]),h!==Qc[b.type]&&b.setAttribute("mathvariant",h),b}});const ml={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},gl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};on({type:"spacing",htmlBuilder(s,o){if(gl.hasOwnProperty(s.text)){const l=gl[s.text].className||"";if(s.mode==="text"){const h=se.makeOrd(s,o,"textord");return h.classes.push(l),h}else return se.makeSpan(["mspace",l],[se.mathsym(s.text,s.mode,o)],o)}else{if(ml.hasOwnProperty(s.text))return se.makeSpan(["mspace",ml[s.text]],[],o);throw new i('Unknown type of space "'+s.text+'"')}},mathmlBuilder(s,o){let l;if(gl.hasOwnProperty(s.text))l=new Ye.MathNode("mtext",[new Ye.TextNode("\xA0")]);else{if(ml.hasOwnProperty(s.text))return new Ye.MathNode("mspace");throw new i('Unknown type of space "'+s.text+'"')}return l}});const ed=()=>{const s=new Ye.MathNode("mtd",[]);return s.setAttribute("width","50%"),s};on({type:"tag",mathmlBuilder(s,o){const l=new Ye.MathNode("mtable",[new Ye.MathNode("mtr",[ed(),new Ye.MathNode("mtd",[pa(s.body,o)]),ed(),new Ye.MathNode("mtd",[pa(s.tag,o)])])]);return l.setAttribute("width","100%"),l}});const td={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},rd={"\\textbf":"textbf","\\textmd":"textmd"},Yg={"\\textit":"textit","\\textup":"textup"},nd=(s,o)=>{const l=s.font;if(l){if(td[l])return o.withTextFontFamily(td[l]);if(rd[l])return o.withTextFontWeight(rd[l]);if(l==="\\emph")return o.fontShape==="textit"?o.withTextFontShape("textup"):o.withTextFontShape("textit")}else return o;return o.withTextFontShape(Yg[l])};it({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(s,o){let{parser:l,funcName:h}=s;const b=o[0];return{type:"text",mode:l.mode,body:Sr(b),font:h}},htmlBuilder(s,o){const l=nd(s,o),h=Wr(s.body,l,!0);return se.makeSpan(["mord","text"],h,l)},mathmlBuilder(s,o){const l=nd(s,o);return pa(s.body,l)}}),it({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(s,o){let{parser:l}=s;return{type:"underline",mode:l.mode,body:o[0]}},htmlBuilder(s,o){const l=dr(s.body,o),h=se.makeLineSpan("underline-line",o),b=o.fontMetrics().defaultRuleThickness,E=se.makeVList({positionType:"top",positionData:l.height,children:[{type:"kern",size:b},{type:"elem",elem:h},{type:"kern",size:3*b},{type:"elem",elem:l}]},o);return se.makeSpan(["mord","underline"],[E],o)},mathmlBuilder(s,o){const l=new Ye.MathNode("mo",[new Ye.TextNode("\u203E")]);l.setAttribute("stretchy","true");const h=new Ye.MathNode("munder",[wr(s.body,o),l]);return h.setAttribute("accentunder","true"),h}}),it({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(s,o){let{parser:l}=s;return{type:"vcenter",mode:l.mode,body:o[0]}},htmlBuilder(s,o){const l=dr(s.body,o),h=o.fontMetrics().axisHeight,b=.5*(l.height-h-(l.depth+h));return se.makeVList({positionType:"shift",positionData:b,children:[{type:"elem",elem:l}]},o)},mathmlBuilder(s,o){return new Ye.MathNode("mpadded",[wr(s.body,o)],["vcenter"])}}),it({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(s,o,l){throw new i("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(s,o){const l=ad(s),h=[],b=o.havingStyle(o.style.text());for(let E=0;E<l.length;E++){let M=l[E];M==="~"&&(M="\\textasciitilde"),h.push(se.makeSymbol(M,"Typewriter-Regular",s.mode,b,["mord","texttt"]))}return se.makeSpan(["mord","text"].concat(b.sizingClasses(o)),se.tryCombineChars(h),b)},mathmlBuilder(s,o){const l=new Ye.TextNode(ad(s)),h=new Ye.MathNode("mtext",[l]);return h.setAttribute("mathvariant","monospace"),h}});const ad=s=>s.body.replace(/ /g,s.star?"\u2423":"\xA0");var ga=an;const od=`[ \r
|
|
470
|
+
]`,Xg="\\\\[a-zA-Z@]+",Zg="\\\\[^\uD800-\uDFFF]",Jg="("+Xg+")"+od+"*",Qg=`\\\\(
|
|
471
|
+
|[ \r ]+
|
|
472
|
+
?)[ \r ]*`,vl="[\u0300-\u036F]",e4=new RegExp(vl+"+$"),t4="("+od+"+)|"+(Qg+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(vl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(vl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Jg)+("|"+Zg+")");class id{constructor(o,l){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=o,this.settings=l,this.tokenRegex=new RegExp(t4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(o,l){this.catcodes[o]=l}lex(){const o=this.input,l=this.tokenRegex.lastIndex;if(l===o.length)return new En("EOF",new bn(this,l,l));const h=this.tokenRegex.exec(o);if(h===null||h.index!==l)throw new i("Unexpected character: '"+o[l]+"'",new En(o[l],new bn(this,l,l+1)));const b=h[6]||h[3]||(h[2]?"\\ ":" ");if(this.catcodes[b]===14){const E=o.indexOf(`
|
|
473
|
+
`,this.tokenRegex.lastIndex);return E===-1?(this.tokenRegex.lastIndex=o.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=E+1,this.lex()}return new En(b,new bn(this,l,this.tokenRegex.lastIndex))}}class r4{constructor(o,l){o===void 0&&(o={}),l===void 0&&(l={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=l,this.builtins=o,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new i("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");const o=this.undefStack.pop();for(const l in o)o.hasOwnProperty(l)&&(o[l]==null?delete this.current[l]:this.current[l]=o[l])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(o){return this.current.hasOwnProperty(o)||this.builtins.hasOwnProperty(o)}get(o){return this.current.hasOwnProperty(o)?this.current[o]:this.builtins[o]}set(o,l,h){if(h===void 0&&(h=!1),h){for(let b=0;b<this.undefStack.length;b++)delete this.undefStack[b][o];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][o]=l)}else{const b=this.undefStack[this.undefStack.length-1];b&&!b.hasOwnProperty(o)&&(b[o]=this.current[o])}l==null?delete this.current[o]:this.current[o]=l}}var n4=$c;j("\\noexpand",function(s){const o=s.popToken();return s.isExpandable(o.text)&&(o.noexpand=!0,o.treatAsRelax=!0),{tokens:[o],numArgs:0}}),j("\\expandafter",function(s){const o=s.popToken();return s.expandOnce(!0),{tokens:[o],numArgs:0}}),j("\\@firstoftwo",function(s){return{tokens:s.consumeArgs(2)[0],numArgs:0}}),j("\\@secondoftwo",function(s){return{tokens:s.consumeArgs(2)[1],numArgs:0}}),j("\\@ifnextchar",function(s){const o=s.consumeArgs(3);s.consumeSpaces();const l=s.future();return o[0].length===1&&o[0][0].text===l.text?{tokens:o[1],numArgs:0}:{tokens:o[2],numArgs:0}}),j("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),j("\\TextOrMath",function(s){const o=s.consumeArgs(2);return s.mode==="text"?{tokens:o[0],numArgs:0}:{tokens:o[1],numArgs:0}});const sd={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};j("\\char",function(s){let o=s.popToken(),l,h="";if(o.text==="'")l=8,o=s.popToken();else if(o.text==='"')l=16,o=s.popToken();else if(o.text==="`")if(o=s.popToken(),o.text[0]==="\\")h=o.text.charCodeAt(1);else{if(o.text==="EOF")throw new i("\\char` missing argument");h=o.text.charCodeAt(0)}else l=10;if(l){if(h=sd[o.text],h==null||h>=l)throw new i("Invalid base-"+l+" digit "+o.text);let b;for(;(b=sd[s.future().text])!=null&&b<l;)h*=l,h+=b,s.popToken()}return"\\@char{"+h+"}"});const bl=(s,o,l,h)=>{let b=s.consumeArg().tokens;if(b.length!==1)throw new i("\\newcommand's first argument must be a macro name");const E=b[0].text,M=s.isDefined(E);if(M&&!o)throw new i("\\newcommand{"+E+"} attempting to redefine "+(E+"; use \\renewcommand"));if(!M&&!l)throw new i("\\renewcommand{"+E+"} when command "+E+" does not yet exist; use \\newcommand");let _=0;if(b=s.consumeArg().tokens,b.length===1&&b[0].text==="["){let U="",ie=s.expandNextToken();for(;ie.text!=="]"&&ie.text!=="EOF";)U+=ie.text,ie=s.expandNextToken();if(!U.match(/^\s*[0-9]+\s*$/))throw new i("Invalid number of arguments: "+U);_=parseInt(U),b=s.consumeArg().tokens}return M&&h||s.macros.set(E,{tokens:b,numArgs:_}),""};j("\\newcommand",s=>bl(s,!1,!0,!1)),j("\\renewcommand",s=>bl(s,!0,!1,!1)),j("\\providecommand",s=>bl(s,!0,!0,!0)),j("\\message",s=>{const o=s.consumeArgs(1)[0];return console.log(o.reverse().map(l=>l.text).join("")),""}),j("\\errmessage",s=>{const o=s.consumeArgs(1)[0];return console.error(o.reverse().map(l=>l.text).join("")),""}),j("\\show",s=>{const o=s.popToken(),l=o.text;return console.log(o,s.macros.get(l),ga[l],Et.math[l],Et.text[l]),""}),j("\\bgroup","{"),j("\\egroup","}"),j("~","\\nobreakspace"),j("\\lq","`"),j("\\rq","'"),j("\\aa","\\r a"),j("\\AA","\\r A"),j("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),j("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),j("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),j("\u212C","\\mathscr{B}"),j("\u2130","\\mathscr{E}"),j("\u2131","\\mathscr{F}"),j("\u210B","\\mathscr{H}"),j("\u2110","\\mathscr{I}"),j("\u2112","\\mathscr{L}"),j("\u2133","\\mathscr{M}"),j("\u211B","\\mathscr{R}"),j("\u212D","\\mathfrak{C}"),j("\u210C","\\mathfrak{H}"),j("\u2128","\\mathfrak{Z}"),j("\\Bbbk","\\Bbb{k}"),j("\xB7","\\cdotp"),j("\\llap","\\mathllap{\\textrm{#1}}"),j("\\rlap","\\mathrlap{\\textrm{#1}}"),j("\\clap","\\mathclap{\\textrm{#1}}"),j("\\mathstrut","\\vphantom{(}"),j("\\underbar","\\underline{\\text{#1}}"),j("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),j("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),j("\\ne","\\neq"),j("\u2260","\\neq"),j("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),j("\u2209","\\notin"),j("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),j("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),j("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),j("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),j("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),j("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),j("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),j("\u27C2","\\perp"),j("\u203C","\\mathclose{!\\mkern-0.8mu!}"),j("\u220C","\\notni"),j("\u231C","\\ulcorner"),j("\u231D","\\urcorner"),j("\u231E","\\llcorner"),j("\u231F","\\lrcorner"),j("\xA9","\\copyright"),j("\xAE","\\textregistered"),j("\uFE0F","\\textregistered"),j("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),j("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),j("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),j("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),j("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),j("\u22EE","\\vdots"),j("\\varGamma","\\mathit{\\Gamma}"),j("\\varDelta","\\mathit{\\Delta}"),j("\\varTheta","\\mathit{\\Theta}"),j("\\varLambda","\\mathit{\\Lambda}"),j("\\varXi","\\mathit{\\Xi}"),j("\\varPi","\\mathit{\\Pi}"),j("\\varSigma","\\mathit{\\Sigma}"),j("\\varUpsilon","\\mathit{\\Upsilon}"),j("\\varPhi","\\mathit{\\Phi}"),j("\\varPsi","\\mathit{\\Psi}"),j("\\varOmega","\\mathit{\\Omega}"),j("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),j("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),j("\\boxed","\\fbox{$\\displaystyle{#1}$}"),j("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),j("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),j("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),j("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),j("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");const ld={",":"\\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"};j("\\dots",function(s){let o="\\dotso";const l=s.expandAfterFuture().text;return l in ld?o=ld[l]:(l.slice(0,4)==="\\not"||l in Et.math&&["bin","rel"].includes(Et.math[l].group))&&(o="\\dotsb"),o});const yl={")":!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};j("\\dotso",function(s){return s.future().text in yl?"\\ldots\\,":"\\ldots"}),j("\\dotsc",function(s){const o=s.future().text;return o in yl&&o!==","?"\\ldots\\,":"\\ldots"}),j("\\cdots",function(s){return s.future().text in yl?"\\@cdots\\,":"\\@cdots"}),j("\\dotsb","\\cdots"),j("\\dotsm","\\cdots"),j("\\dotsi","\\!\\cdots"),j("\\dotsx","\\ldots\\,"),j("\\DOTSI","\\relax"),j("\\DOTSB","\\relax"),j("\\DOTSX","\\relax"),j("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),j("\\,","\\tmspace+{3mu}{.1667em}"),j("\\thinspace","\\,"),j("\\>","\\mskip{4mu}"),j("\\:","\\tmspace+{4mu}{.2222em}"),j("\\medspace","\\:"),j("\\;","\\tmspace+{5mu}{.2777em}"),j("\\thickspace","\\;"),j("\\!","\\tmspace-{3mu}{.1667em}"),j("\\negthinspace","\\!"),j("\\negmedspace","\\tmspace-{4mu}{.2222em}"),j("\\negthickspace","\\tmspace-{5mu}{.277em}"),j("\\enspace","\\kern.5em "),j("\\enskip","\\hskip.5em\\relax"),j("\\quad","\\hskip1em\\relax"),j("\\qquad","\\hskip2em\\relax"),j("\\tag","\\@ifstar\\tag@literal\\tag@paren"),j("\\tag@paren","\\tag@literal{({#1})}"),j("\\tag@literal",s=>{if(s.macros.get("\\df@tag"))throw new i("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),j("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),j("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),j("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),j("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),j("\\newline","\\\\\\relax"),j("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");const ud=he(xe["Main-Regular"][84][1]-.7*xe["Main-Regular"][65][1]);j("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ud+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),j("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ud+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),j("\\hspace","\\@ifstar\\@hspacer\\@hspace"),j("\\@hspace","\\hskip #1\\relax"),j("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),j("\\ordinarycolon",":"),j("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),j("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),j("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),j("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),j("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),j("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),j("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),j("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),j("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),j("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),j("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),j("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),j("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),j("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),j("\u2237","\\dblcolon"),j("\u2239","\\eqcolon"),j("\u2254","\\coloneqq"),j("\u2255","\\eqqcolon"),j("\u2A74","\\Coloneqq"),j("\\ratio","\\vcentcolon"),j("\\coloncolon","\\dblcolon"),j("\\colonequals","\\coloneqq"),j("\\coloncolonequals","\\Coloneqq"),j("\\equalscolon","\\eqqcolon"),j("\\equalscoloncolon","\\Eqqcolon"),j("\\colonminus","\\coloneq"),j("\\coloncolonminus","\\Coloneq"),j("\\minuscolon","\\eqcolon"),j("\\minuscoloncolon","\\Eqcolon"),j("\\coloncolonapprox","\\Colonapprox"),j("\\coloncolonsim","\\Colonsim"),j("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),j("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),j("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),j("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),j("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),j("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),j("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),j("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),j("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),j("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),j("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),j("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),j("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),j("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),j("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),j("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),j("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),j("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),j("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),j("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),j("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),j("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),j("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),j("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),j("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),j("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),j("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),j("\\imath","\\html@mathml{\\@imath}{\u0131}"),j("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),j("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),j("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),j("\u27E6","\\llbracket"),j("\u27E7","\\rrbracket"),j("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),j("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),j("\u2983","\\lBrace"),j("\u2984","\\rBrace"),j("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}"),j("\u29B5","\\minuso"),j("\\darr","\\downarrow"),j("\\dArr","\\Downarrow"),j("\\Darr","\\Downarrow"),j("\\lang","\\langle"),j("\\rang","\\rangle"),j("\\uarr","\\uparrow"),j("\\uArr","\\Uparrow"),j("\\Uarr","\\Uparrow"),j("\\N","\\mathbb{N}"),j("\\R","\\mathbb{R}"),j("\\Z","\\mathbb{Z}"),j("\\alef","\\aleph"),j("\\alefsym","\\aleph"),j("\\Alpha","\\mathrm{A}"),j("\\Beta","\\mathrm{B}"),j("\\bull","\\bullet"),j("\\Chi","\\mathrm{X}"),j("\\clubs","\\clubsuit"),j("\\cnums","\\mathbb{C}"),j("\\Complex","\\mathbb{C}"),j("\\Dagger","\\ddagger"),j("\\diamonds","\\diamondsuit"),j("\\empty","\\emptyset"),j("\\Epsilon","\\mathrm{E}"),j("\\Eta","\\mathrm{H}"),j("\\exist","\\exists"),j("\\harr","\\leftrightarrow"),j("\\hArr","\\Leftrightarrow"),j("\\Harr","\\Leftrightarrow"),j("\\hearts","\\heartsuit"),j("\\image","\\Im"),j("\\infin","\\infty"),j("\\Iota","\\mathrm{I}"),j("\\isin","\\in"),j("\\Kappa","\\mathrm{K}"),j("\\larr","\\leftarrow"),j("\\lArr","\\Leftarrow"),j("\\Larr","\\Leftarrow"),j("\\lrarr","\\leftrightarrow"),j("\\lrArr","\\Leftrightarrow"),j("\\Lrarr","\\Leftrightarrow"),j("\\Mu","\\mathrm{M}"),j("\\natnums","\\mathbb{N}"),j("\\Nu","\\mathrm{N}"),j("\\Omicron","\\mathrm{O}"),j("\\plusmn","\\pm"),j("\\rarr","\\rightarrow"),j("\\rArr","\\Rightarrow"),j("\\Rarr","\\Rightarrow"),j("\\real","\\Re"),j("\\reals","\\mathbb{R}"),j("\\Reals","\\mathbb{R}"),j("\\Rho","\\mathrm{P}"),j("\\sdot","\\cdot"),j("\\sect","\\S"),j("\\spades","\\spadesuit"),j("\\sub","\\subset"),j("\\sube","\\subseteq"),j("\\supe","\\supseteq"),j("\\Tau","\\mathrm{T}"),j("\\thetasym","\\vartheta"),j("\\weierp","\\wp"),j("\\Zeta","\\mathrm{Z}"),j("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),j("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),j("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),j("\\bra","\\mathinner{\\langle{#1}|}"),j("\\ket","\\mathinner{|{#1}\\rangle}"),j("\\braket","\\mathinner{\\langle{#1}\\rangle}"),j("\\Bra","\\left\\langle#1\\right|"),j("\\Ket","\\left|#1\\right\\rangle");const cd=s=>o=>{const l=o.consumeArg().tokens,h=o.consumeArg().tokens,b=o.consumeArg().tokens,E=o.consumeArg().tokens,M=o.macros.get("|"),_=o.macros.get("\\|");o.macros.beginGroup();const U=ye=>Ae=>{s&&(Ae.macros.set("|",M),b.length&&Ae.macros.set("\\|",_));let Je=ye;return!ye&&b.length&&Ae.future().text==="|"&&(Ae.popToken(),Je=!0),{tokens:Je?b:h,numArgs:0}};o.macros.set("|",U(!1)),b.length&&o.macros.set("\\|",U(!0));const ie=o.consumeArg().tokens,ve=o.expandTokens([...E,...ie,...l]);return o.macros.endGroup(),{tokens:ve.reverse(),numArgs:0}};j("\\bra@ket",cd(!1)),j("\\bra@set",cd(!0)),j("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),j("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),j("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),j("\\angln","{\\angl n}"),j("\\blue","\\textcolor{##6495ed}{#1}"),j("\\orange","\\textcolor{##ffa500}{#1}"),j("\\pink","\\textcolor{##ff00af}{#1}"),j("\\red","\\textcolor{##df0030}{#1}"),j("\\green","\\textcolor{##28ae7b}{#1}"),j("\\gray","\\textcolor{gray}{#1}"),j("\\purple","\\textcolor{##9d38bd}{#1}"),j("\\blueA","\\textcolor{##ccfaff}{#1}"),j("\\blueB","\\textcolor{##80f6ff}{#1}"),j("\\blueC","\\textcolor{##63d9ea}{#1}"),j("\\blueD","\\textcolor{##11accd}{#1}"),j("\\blueE","\\textcolor{##0c7f99}{#1}"),j("\\tealA","\\textcolor{##94fff5}{#1}"),j("\\tealB","\\textcolor{##26edd5}{#1}"),j("\\tealC","\\textcolor{##01d1c1}{#1}"),j("\\tealD","\\textcolor{##01a995}{#1}"),j("\\tealE","\\textcolor{##208170}{#1}"),j("\\greenA","\\textcolor{##b6ffb0}{#1}"),j("\\greenB","\\textcolor{##8af281}{#1}"),j("\\greenC","\\textcolor{##74cf70}{#1}"),j("\\greenD","\\textcolor{##1fab54}{#1}"),j("\\greenE","\\textcolor{##0d923f}{#1}"),j("\\goldA","\\textcolor{##ffd0a9}{#1}"),j("\\goldB","\\textcolor{##ffbb71}{#1}"),j("\\goldC","\\textcolor{##ff9c39}{#1}"),j("\\goldD","\\textcolor{##e07d10}{#1}"),j("\\goldE","\\textcolor{##a75a05}{#1}"),j("\\redA","\\textcolor{##fca9a9}{#1}"),j("\\redB","\\textcolor{##ff8482}{#1}"),j("\\redC","\\textcolor{##f9685d}{#1}"),j("\\redD","\\textcolor{##e84d39}{#1}"),j("\\redE","\\textcolor{##bc2612}{#1}"),j("\\maroonA","\\textcolor{##ffbde0}{#1}"),j("\\maroonB","\\textcolor{##ff92c6}{#1}"),j("\\maroonC","\\textcolor{##ed5fa6}{#1}"),j("\\maroonD","\\textcolor{##ca337c}{#1}"),j("\\maroonE","\\textcolor{##9e034e}{#1}"),j("\\purpleA","\\textcolor{##ddd7ff}{#1}"),j("\\purpleB","\\textcolor{##c6b9fc}{#1}"),j("\\purpleC","\\textcolor{##aa87ff}{#1}"),j("\\purpleD","\\textcolor{##7854ab}{#1}"),j("\\purpleE","\\textcolor{##543b78}{#1}"),j("\\mintA","\\textcolor{##f5f9e8}{#1}"),j("\\mintB","\\textcolor{##edf2df}{#1}"),j("\\mintC","\\textcolor{##e0e5cc}{#1}"),j("\\grayA","\\textcolor{##f6f7f7}{#1}"),j("\\grayB","\\textcolor{##f0f1f2}{#1}"),j("\\grayC","\\textcolor{##e3e5e6}{#1}"),j("\\grayD","\\textcolor{##d6d8da}{#1}"),j("\\grayE","\\textcolor{##babec2}{#1}"),j("\\grayF","\\textcolor{##888d93}{#1}"),j("\\grayG","\\textcolor{##626569}{#1}"),j("\\grayH","\\textcolor{##3b3e40}{#1}"),j("\\grayI","\\textcolor{##21242c}{#1}"),j("\\kaBlue","\\textcolor{##314453}{#1}"),j("\\kaGreen","\\textcolor{##71B307}{#1}");const dd={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class a4{constructor(o,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(o),this.macros=new r4(n4,l.macros),this.mode=h,this.stack=[]}feed(o){this.lexer=new id(o,this.settings)}switchMode(o){this.mode=o}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(o){this.stack.push(o)}pushTokens(o){this.stack.push(...o)}scanArgument(o){let l,h,b;if(o){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 En("EOF",h.loc)),this.pushTokens(b),new En("",bn.range(l,h))}consumeSpaces(){for(;this.future().text===" ";)this.stack.pop()}consumeArg(o){const l=[],h=o&&o.length>0;h||this.consumeSpaces();const b=this.future();let E,M=0,_=0;do{if(E=this.popToken(),l.push(E),E.text==="{")++M;else if(E.text==="}"){if(--M,M===-1)throw new i("Extra }",E)}else if(E.text==="EOF")throw new i("Unexpected end of input in a macro argument, expected '"+(o&&h?o[_]:"}")+"'",E);if(o&&h)if((M===0||M===1&&o[_]==="{")&&E.text===o[_]){if(++_,_===o.length){l.splice(-_,_);break}}else _=0}while(M!==0||h);return b.text==="{"&&l[l.length-1].text==="}"&&(l.pop(),l.shift()),l.reverse(),{tokens:l,start:b,end:E}}consumeArgs(o,l){if(l){if(l.length!==o+1)throw new i("The length of delimiters doesn't match the number of args!");const b=l[0];for(let E=0;E<b.length;E++){const M=this.popToken();if(b[E]!==M.text)throw new i("Use of the macro doesn't match its definition",M)}}const h=[];for(let b=0;b<o;b++)h.push(this.consumeArg(l&&l[b+1]).tokens);return h}countExpansion(o){if(this.expansionCount+=o,this.expansionCount>this.settings.maxExpand)throw new i("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(o){const l=this.popToken(),h=l.text,b=l.noexpand?null:this._getExpansion(h);if(b==null||o&&b.unexpandable){if(o&&b==null&&h[0]==="\\"&&!this.isDefined(h))throw new i("Undefined control sequence: "+h);return this.pushToken(l),!1}this.countExpansion(1);let E=b.tokens;const M=this.consumeArgs(b.numArgs,b.delimiters);if(b.numArgs){E=E.slice();for(let _=E.length-1;_>=0;--_){let U=E[_];if(U.text==="#"){if(_===0)throw new i("Incomplete placeholder at end of macro body",U);if(U=E[--_],U.text==="#")E.splice(_+1,1);else if(/^[1-9]$/.test(U.text))E.splice(_,2,...M[+U.text-1]);else throw new i("Not a valid argument number",U)}}}return this.pushTokens(E),E.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){const o=this.stack.pop();return o.treatAsRelax&&(o.text="\\relax"),o}throw new Error}expandMacro(o){return this.macros.has(o)?this.expandTokens([new En(o)]):void 0}expandTokens(o){const l=[],h=this.stack.length;for(this.pushTokens(o);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(o){const l=this.expandMacro(o);return l&&l.map(h=>h.text).join("")}_getExpansion(o){const l=this.macros.get(o);if(l==null)return l;if(o.length===1){const b=this.lexer.catcodes[o];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 U=h.replace(/##/g,"");for(;U.indexOf("#"+(b+1))!==-1;)++b}const E=new id(h,this.settings),M=[];let _=E.lex();for(;_.text!=="EOF";)M.push(_),_=E.lex();return M.reverse(),{tokens:M,numArgs:b}}return h}isDefined(o){return this.macros.has(o)||ga.hasOwnProperty(o)||Et.math.hasOwnProperty(o)||Et.text.hasOwnProperty(o)||dd.hasOwnProperty(o)}isExpandable(o){const l=this.macros.get(o);return l!=null?typeof l=="string"||typeof l=="function"||!l.unexpandable:ga.hasOwnProperty(o)&&!ga[o].primitive}}const fd=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Bi=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"}),xl={"\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"}},hd={\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(o,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 a4(o,l,this.mode),this.settings=l,this.leftrightDepth=0}expect(o,l){if(l===void 0&&(l=!0),this.fetch().text!==o)throw new i("Expected '"+o+"', 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(o){this.mode=o,this.gullet.switchMode(o)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{const o=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),o}finally{this.gullet.endGroups()}}subparse(o){const l=this.nextToken;this.consume(),this.gullet.pushToken(new En("}")),this.gullet.pushTokens(o);const h=this.parseExpression(!1);return this.expect("}"),this.nextToken=l,h}parseExpression(o,l){const h=[];for(;;){this.mode==="math"&&this.consumeSpaces();const b=this.fetch();if(Fi.endOfExpression.indexOf(b.text)!==-1||l&&b.text===l||o&&ga[b.text]&&ga[b.text].infix)break;const E=this.parseAtom(l);if(E){if(E.type==="internal")continue}else break;h.push(E)}return this.mode==="text"&&this.formLigatures(h),this.handleInfixNodes(h)}handleInfixNodes(o){let l=-1,h;for(let b=0;b<o.length;b++)if(o[b].type==="infix"){if(l!==-1)throw new i("only one infix operator per group",o[b].token);l=b,h=o[b].replaceWith}if(l!==-1&&h){let b,E;const M=o.slice(0,l),_=o.slice(l+1);M.length===1&&M[0].type==="ordgroup"?b=M[0]:b={type:"ordgroup",mode:this.mode,body:M},_.length===1&&_[0].type==="ordgroup"?E=_[0]:E={type:"ordgroup",mode:this.mode,body:_};let U;return h==="\\\\abovefrac"?U=this.callFunction(h,[b,o[l],E],[]):U=this.callFunction(h,[b,E],[]),[U]}else return o}handleSupSubscript(o){const l=this.fetch(),h=l.text;this.consume(),this.consumeSpaces();let b;do{var E;b=this.parseGroup(o)}while(((E=b)==null?void 0:E.type)==="internal");if(!b)throw new i("Expected group after '"+h+"'",l);return b}formatUnsupportedCmd(o){const l=[];for(let b=0;b<o.length;b++)l.push({type:"textord",mode:"text",text:o[b]});const h={type:"text",mode:this.mode,body:l};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[h]}}parseAtom(o){const l=this.parseGroup("atom",o);if((l==null?void 0:l.type)==="internal"||this.mode==="text")return l;let h,b;for(;;){this.consumeSpaces();const E=this.fetch();if(E.text==="\\limits"||E.text==="\\nolimits"){if(l&&l.type==="op"){const M=E.text==="\\limits";l.limits=M,l.alwaysHandleSupSub=!0}else if(l&&l.type==="operatorname")l.alwaysHandleSupSub&&(l.limits=E.text==="\\limits");else throw new i("Limit controls must follow a math operator",E);this.consume()}else if(E.text==="^"){if(h)throw new i("Double superscript",E);h=this.handleSupSubscript("superscript")}else if(E.text==="_"){if(b)throw new i("Double subscript",E);b=this.handleSupSubscript("subscript")}else if(E.text==="'"){if(h)throw new i("Double superscript",E);const M={type:"textord",mode:this.mode,text:"\\prime"},_=[M];for(this.consume();this.fetch().text==="'";)_.push(M),this.consume();this.fetch().text==="^"&&_.push(this.handleSupSubscript("superscript")),h={type:"ordgroup",mode:this.mode,body:_}}else if(Bi[E.text]){const M=fd.test(E.text),_=[];for(_.push(new En(Bi[E.text])),this.consume();;){const ie=this.fetch().text;if(!Bi[ie]||fd.test(ie)!==M)break;_.unshift(new En(Bi[ie])),this.consume()}const U=this.subparse(_);M?b={type:"ordgroup",mode:"math",body:U}:h={type:"ordgroup",mode:"math",body:U}}else break}return h||b?{type:"supsub",mode:this.mode,base:l,sup:h,sub:b}:l}parseFunction(o,l){const h=this.fetch(),b=h.text,E=ga[b];if(!E)return null;if(this.consume(),l&&l!=="atom"&&!E.allowedInArgument)throw new i("Got function '"+b+"' with no arguments"+(l?" as "+l:""),h);if(this.mode==="text"&&!E.allowedInText)throw new i("Can't use function '"+b+"' in text mode",h);if(this.mode==="math"&&E.allowedInMath===!1)throw new i("Can't use function '"+b+"' in math mode",h);const{args:M,optArgs:_}=this.parseArguments(b,E);return this.callFunction(b,M,_,h,o)}callFunction(o,l,h,b,E){const M={funcName:o,parser:this,token:b,breakOnTokenText:E},_=ga[o];if(_&&_.handler)return _.handler(M,l,h);throw new i("No function handler for "+o)}parseArguments(o,l){const h=l.numArgs+l.numOptionalArgs;if(h===0)return{args:[],optArgs:[]};const b=[],E=[];for(let M=0;M<h;M++){let _=l.argTypes&&l.argTypes[M];const U=M<l.numOptionalArgs;(l.primitive&&_==null||l.type==="sqrt"&&M===1&&E[0]==null)&&(_="primitive");const ie=this.parseGroupOfType("argument to '"+o+"'",_,U);if(U)E.push(ie);else if(ie!=null)b.push(ie);else throw new i("Null argument, please report this as a bug")}return{args:b,optArgs:E}}parseGroupOfType(o,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 i("A primitive argument cannot be optional");const b=this.parseGroup(o);if(b==null)throw new i("Expected group as "+o,this.fetch());return b}case"original":case null:case void 0:return this.parseArgumentGroup(h);default:throw new i("Unknown group type as "+o,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(o,l){const h=this.gullet.scanArgument(l);if(h==null)return null;let b="",E;for(;(E=this.fetch()).text!=="EOF";)b+=E.text,this.consume();return this.consume(),h.text=b,h}parseRegexGroup(o,l){const h=this.fetch();let b=h,E="",M;for(;(M=this.fetch()).text!=="EOF"&&o.test(E+M.text);)b=M,E+=b.text,this.consume();if(E==="")throw new i("Invalid "+l+": '"+h.text+"'",h);return h.range(b,E)}parseColorGroup(o){const l=this.parseStringGroup("color",o);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 i("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(o){let l,h=!1;if(this.gullet.consumeSpaces(),!o&&this.gullet.future().text!=="{"?l=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):l=this.parseStringGroup("size",o),!l)return null;!o&&l.text.length===0&&(l.text="0pt",h=!0);const b=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(l.text);if(!b)throw new i("Invalid size: '"+l.text+"'",l);const E={number:+(b[1]+b[2]),unit:b[3]};if(!Mt(E))throw new i("Invalid unit: '"+E.unit+"'",l);return{type:"size",mode:this.mode,value:E,isBlank:h}}parseUrlGroup(o){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);const l=this.parseStringGroup("url",o);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(o,l){const h=this.gullet.scanArgument(o);if(h==null)return null;const b=this.mode;l&&this.switchMode(l),this.gullet.beginGroup();const E=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();const M={type:"ordgroup",mode:this.mode,loc:h.loc,body:E};return l&&this.switchMode(b),M}parseGroup(o,l){const h=this.fetch(),b=h.text;let E;if(b==="{"||b==="\\begingroup"){this.consume();const M=b==="{"?"}":"\\endgroup";this.gullet.beginGroup();const _=this.parseExpression(!1,M),U=this.fetch();this.expect(M),this.gullet.endGroup(),E={type:"ordgroup",mode:this.mode,loc:bn.range(h,U),body:_,semisimple:b==="\\begingroup"||void 0}}else if(E=this.parseFunction(l,o)||this.parseSymbol(),E==null&&b[0]==="\\"&&!dd.hasOwnProperty(b)){if(this.settings.throwOnError)throw new i("Undefined control sequence: "+b,h);E=this.formatUnsupportedCmd(b),this.consume()}return E}formLigatures(o){let l=o.length-1;for(let h=0;h<l;++h){const b=o[h],E=b.text;E==="-"&&o[h+1].text==="-"&&(h+1<l&&o[h+2].text==="-"?(o.splice(h,3,{type:"textord",mode:"text",loc:bn.range(b,o[h+2]),text:"---"}),l-=2):(o.splice(h,2,{type:"textord",mode:"text",loc:bn.range(b,o[h+1]),text:"--"}),l-=1)),(E==="'"||E==="`")&&o[h+1].text===E&&(o.splice(h,2,{type:"textord",mode:"text",loc:bn.range(b,o[h+1]),text:E+E}),l-=1)}}parseSymbol(){const o=this.fetch();let l=o.text;if(/^\\verb[^a-zA-Z]/.test(l)){this.consume();let E=l.slice(5);const M=E.charAt(0)==="*";if(M&&(E=E.slice(1)),E.length<2||E.charAt(0)!==E.slice(-1))throw new i(`\\verb assertion failed --
|
|
474
|
+
please report what input caused this bug`);return E=E.slice(1,-1),{type:"verb",mode:"text",body:E,star:M}}hd.hasOwnProperty(l[0])&&!Et[this.mode][l[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+l[0]+'" used in math mode',o),l=hd[l[0]]+l.slice(1));const h=e4.exec(l);h&&(l=l.substring(0,h.index),l==="i"?l="\u0131":l==="j"&&(l="\u0237"));let b;if(Et[this.mode][l]){this.settings.strict&&this.mode==="math"&&Ir.indexOf(l)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+l[0]+'" used in math mode',o);const E=Et[this.mode][l].group,M=bn.range(o);let _;if(Lr.hasOwnProperty(E)){const U=E;_={type:"atom",mode:this.mode,family:U,loc:M,text:l}}else _={type:E,mode:this.mode,loc:M,text:l};b=_}else if(l.charCodeAt(0)>=128)this.settings.strict&&(we(l.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+l[0]+'" used in math mode',o):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+l[0]+'"'+(" ("+l.charCodeAt(0)+")"),o)),b={type:"textord",mode:"text",loc:bn.range(o),text:l};else return null;if(this.consume(),h)for(let E=0;E<h[0].length;E++){const M=h[0][E];if(!xl[M])throw new i("Unknown accent ' "+M+"'",o);const _=xl[M][this.mode]||xl[M].text;if(!_)throw new i("Accent "+M+" unsupported in "+this.mode+" mode",o);b={type:"accent",mode:this.mode,loc:bn.range(o),label:_,isStretchy:!1,isShifty:!0,base:b}}return b}}Fi.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var wl=function(s,o){if(!(typeof s=="string"||s instanceof String))throw new TypeError("KaTeX can only parse string typed expression");const l=new Fi(s,o);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(!o.displayMode)throw new i("\\tag works only in display equations");h=[{type:"tag",mode:"text",body:h,tag:l.subparse([new En("\\df@tag")])}]}return h};let pd=function(s,o,l){o.textContent="";const h=Cl(s,l).toNode();o.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."),pd=function(){throw new i("KaTeX doesn't work in quirks mode.")});const o4=function(s,o){return Cl(s,o).toMarkup()},i4=function(s,o){const l=new B(o);return wl(s,l)},md=function(s,o,l){if(l.throwOnError||!(s instanceof i))throw s;const h=se.makeSpan(["katex-error"],[new Rt(o)]);return h.setAttribute("title",s.toString()),h.setAttribute("style","color:"+l.errorColor),h},Cl=function(s,o){const l=new B(o);try{const h=wl(s,l);return wg(h,s,l)}catch(h){return md(h,s,l)}};var s4={version:"0.16.25",render:pd,renderToString:o4,ParseError:i,SETTINGS_SCHEMA:p,__parse:i4,__renderToDomTree:Cl,__renderToHTMLTree:function(s,o){const l=new B(o);try{const h=wl(s,l);return Cg(h,s,l)}catch(h){return md(h,s,l)}},__setFontMetrics:dt,__defineSymbol:y,__defineFunction:it,__defineMacro:j,__domTree:{Span:Dt,Anchor:Ht,SymbolNode:Rt,SvgNode:Dr,PathNode:Nr,LineNode:gn}},l4=s4;return n=n.default,n})()})})(f0)),f0.exports}var Hw=as.exports,fp;function Kw(){return fp||(fp=1,(function(e,t){(function(r,n){n(t,We,zw(),Lw())})(Hw,function(r,n,a,i){Object.defineProperty(r,"__esModule",{value:!0});function c(p,A){for(var B in A)Object.defineProperty(p,B,{enumerable:!0,get:A[B]})}c(r,{BlockMath:()=>x,InlineMath:()=>C}),n=d(n),a=u(a),i=u(i);function u(p){return p&&p.__esModule?p:{default:p}}function f(p){if(typeof WeakMap!="function")return null;var A=new WeakMap,B=new WeakMap;return(f=function(k){return k?B:A})(p)}function d(p,A){if(p&&p.__esModule)return p;if(p===null||typeof p!="object"&&typeof p!="function")return{default:p};var B=f(A);if(B&&B.has(p))return B.get(p);var k={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in p)if(F!=="default"&&Object.prototype.hasOwnProperty.call(p,F)){var R=N?Object.getOwnPropertyDescriptor(p,F):null;R&&(R.get||R.set)?Object.defineProperty(k,F,R):k[F]=p[F]}return k.default=p,B&&B.set(p,k),k}const m=(p,{displayMode:A})=>{const B=({children:k,errorColor:N,math:F,renderError:R})=>{const S=F??k,{html:z,error:O}=(0,n.useMemo)(()=>{try{return{html:i.default.renderToString(S,{displayMode:A,errorColor:N,throwOnError:!!R}),error:void 0}}catch(V){if(V instanceof i.default.ParseError||V instanceof TypeError)return{error:V};throw V}},[S,N,R]);return O?R?R(O):n.default.createElement(p,{html:`${O.message}`}):n.default.createElement(p,{html:z})};return B.propTypes={children:a.default.string,errorColor:a.default.string,math:a.default.string,renderError:a.default.func},B},g={html:a.default.string.isRequired},v=({html:p})=>n.default.createElement("div",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:p}});v.propTypes=g;const w=({html:p})=>n.default.createElement("span",{"data-testid":"react-katex",dangerouslySetInnerHTML:{__html:p}});w.propTypes=g;const x=m(v,{displayMode:!0}),C=m(w,{displayMode:!1})})})(as,as.exports)),as.exports}var ig=Kw();function sg(e){const t=(e??"").trim();if(!t)return"";let r=t;return r=r.replace(/\f(?=rac\b)/g,"\\f"),r=r.replace(/\t(?=ext\b)/g,"\\t"),r=r.replace(/\t(?=imes\b)/g,"\\t"),r=r.replace(/\r(?=ho\b)/g,"\\r"),r.includes("\\frac")||(r=r.replace(/(^|[^\\])rac(?=\s*\{)/g,"$1\\frac")),r.includes("\\text")||(r=r.replace(/(^|[^\\])ext(?=\s*\{)/g,"$1\\text")),r.includes("\\times")||(r=r.replace(/(^|[^\\])imes(?=\s*(?:\b|[^a-zA-Z]))/g,"$1\\times")),r}const qw=qe.span.attrs({className:"latex-inline-wrapper"})`
|
|
475
|
+
display: inline-flex;
|
|
476
|
+
align-items: baseline;
|
|
477
|
+
column-gap: 4px;
|
|
478
|
+
line-height: 1.2;
|
|
479
|
+
color: ${({$color:e})=>e||"inherit"};
|
|
480
|
+
`,Vw=qe.span.attrs({className:"latex-inline-error"})`
|
|
481
|
+
display: inline-flex;
|
|
482
|
+
align-items: center;
|
|
483
|
+
column-gap: 6px;
|
|
484
|
+
padding: 2px 4px;
|
|
485
|
+
border-radius: 4px;
|
|
486
|
+
background: rgba(215, 58, 73, 0.08);
|
|
487
|
+
color: #d73a49;
|
|
488
|
+
font-size: 0.85em;
|
|
489
|
+
`,Ww=qe.span.attrs({className:"latex-inline-error-message"})`
|
|
490
|
+
font-size: 0.75em;
|
|
491
|
+
color: #d73a49;
|
|
492
|
+
`,Uw=({attributes:e,formula:t,styles:r})=>{var i;const n=xt(()=>sg(t),[t]),a=(i=r==null?void 0:r.text)==null?void 0:i.color;return n?H.jsx(qw,{...e,$color:a,children:H.jsx(ig.InlineMath,{math:n,errorColor:"#d73a49",renderError:c=>H.jsxs(Vw,{children:[H.jsx("span",{children:n}),H.jsx(Ww,{children:c==null?void 0:c.message})]})})}):null},Gw=qe.div.attrs({className:"latex-block-wrapper"})`
|
|
493
|
+
width: 100%;
|
|
494
|
+
display: flex;
|
|
495
|
+
justify-content: center;
|
|
496
|
+
align-items: center;
|
|
497
|
+
margin: 1.25rem 0;
|
|
498
|
+
padding: 0.75rem;
|
|
499
|
+
border-radius: 8px;
|
|
500
|
+
background: rgba(2, 132, 199, 0.05);
|
|
501
|
+
color: ${({$textColor:e})=>e||"inherit"};
|
|
502
|
+
`,Yw=qe.div.attrs({className:"latex-block-error"})`
|
|
503
|
+
display: flex;
|
|
504
|
+
flex-direction: column;
|
|
505
|
+
width: 100%;
|
|
506
|
+
gap: 6px;
|
|
507
|
+
padding: 0.75rem;
|
|
508
|
+
background: rgba(215, 58, 73, 0.08);
|
|
509
|
+
border: 1px dashed #d73a49;
|
|
510
|
+
border-radius: 8px;
|
|
511
|
+
font-size: 0.9rem;
|
|
512
|
+
color: #d73a49;
|
|
513
|
+
`,Xw=qe.span.attrs({className:"latex-block-error-title"})`
|
|
514
|
+
font-weight: 600;
|
|
515
|
+
`,Zw=qe.code.attrs({className:"latex-block-error-formula"})`
|
|
516
|
+
font-size: 0.85rem;
|
|
517
|
+
color: #d73a49;
|
|
518
|
+
overflow-x: auto;
|
|
519
|
+
`,Jw=({attributes:e,formula:t,styles:r})=>{var i;const n=xt(()=>sg(t),[t]),a=(i=r==null?void 0:r.text)==null?void 0:i.color;return n?H.jsx(Gw,{...e,$textColor:a,children:H.jsx(ig.BlockMath,{math:n,errorColor:"#d73a49",renderError:c=>H.jsxs(Yw,{children:[H.jsx(Xw,{children:"\u516C\u5F0F\u6E32\u67D3\u5931\u8D25"}),H.jsx(Zw,{children:n}),H.jsx("span",{children:c==null?void 0:c.message})]})})}):null};/**
|
|
520
|
+
* @license lucide-react v0.456.0 - ISC
|
|
521
|
+
*
|
|
522
|
+
* This source code is licensed under the ISC license.
|
|
523
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
524
|
+
*/const Qw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lg=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
525
|
+
* @license lucide-react v0.456.0 - ISC
|
|
526
|
+
*
|
|
527
|
+
* This source code is licensed under the ISC license.
|
|
528
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
529
|
+
*/var eC={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"};/**
|
|
530
|
+
* @license lucide-react v0.456.0 - ISC
|
|
531
|
+
*
|
|
532
|
+
* This source code is licensed under the ISC license.
|
|
533
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
534
|
+
*/const tC=fi(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:c,...u},f)=>is("svg",{ref:f,...eC,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:lg("lucide",a),...u},[...c.map(([d,m])=>is(d,m)),...Array.isArray(i)?i:[i]]));/**
|
|
535
|
+
* @license lucide-react v0.456.0 - ISC
|
|
536
|
+
*
|
|
537
|
+
* This source code is licensed under the ISC license.
|
|
538
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
539
|
+
*/const jr=(e,t)=>{const r=fi(({className:n,...a},i)=>is(tC,{ref:i,iconNode:t,className:lg(`lucide-${Qw(e)}`,n),...a}));return r.displayName=`${e}`,r};/**
|
|
540
|
+
* @license lucide-react v0.456.0 - ISC
|
|
541
|
+
*
|
|
542
|
+
* This source code is licensed under the ISC license.
|
|
543
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
544
|
+
*/const rC=jr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
545
|
+
* @license lucide-react v0.456.0 - ISC
|
|
546
|
+
*
|
|
547
|
+
* This source code is licensed under the ISC license.
|
|
548
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
549
|
+
*/const Ko=jr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
550
|
+
* @license lucide-react v0.456.0 - ISC
|
|
551
|
+
*
|
|
552
|
+
* This source code is licensed under the ISC license.
|
|
553
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
554
|
+
*/const nC=jr("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
555
|
+
* @license lucide-react v0.456.0 - ISC
|
|
556
|
+
*
|
|
557
|
+
* This source code is licensed under the ISC license.
|
|
558
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
559
|
+
*/const qo=jr("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
560
|
+
* @license lucide-react v0.456.0 - ISC
|
|
561
|
+
*
|
|
562
|
+
* This source code is licensed under the ISC license.
|
|
563
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
564
|
+
*/jr("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
565
|
+
* @license lucide-react v0.456.0 - ISC
|
|
566
|
+
*
|
|
567
|
+
* This source code is licensed under the ISC license.
|
|
568
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
569
|
+
*/const ug=jr("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"}]]);/**
|
|
570
|
+
* @license lucide-react v0.456.0 - ISC
|
|
571
|
+
*
|
|
572
|
+
* This source code is licensed under the ISC license.
|
|
573
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
574
|
+
*/const aC=jr("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"}]]);/**
|
|
575
|
+
* @license lucide-react v0.456.0 - ISC
|
|
576
|
+
*
|
|
577
|
+
* This source code is licensed under the ISC license.
|
|
578
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
579
|
+
*/const oC=jr("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"}]]);/**
|
|
580
|
+
* @license lucide-react v0.456.0 - ISC
|
|
581
|
+
*
|
|
582
|
+
* This source code is licensed under the ISC license.
|
|
583
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
584
|
+
*/const iC=jr("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"}]]);/**
|
|
585
|
+
* @license lucide-react v0.456.0 - ISC
|
|
586
|
+
*
|
|
587
|
+
* This source code is licensed under the ISC license.
|
|
588
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
589
|
+
*/const sC=jr("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"}]]);/**
|
|
590
|
+
* @license lucide-react v0.456.0 - ISC
|
|
591
|
+
*
|
|
592
|
+
* This source code is licensed under the ISC license.
|
|
593
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
594
|
+
*/jr("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"}]]);/**
|
|
595
|
+
* @license lucide-react v0.456.0 - ISC
|
|
596
|
+
*
|
|
597
|
+
* This source code is licensed under the ISC license.
|
|
598
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
599
|
+
*/const lC=jr("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"}]]);/**
|
|
600
|
+
* @license lucide-react v0.456.0 - ISC
|
|
601
|
+
*
|
|
602
|
+
* This source code is licensed under the ISC license.
|
|
603
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
604
|
+
*/const uC=jr("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
605
|
+
* @license lucide-react v0.456.0 - ISC
|
|
606
|
+
*
|
|
607
|
+
* This source code is licensed under the ISC license.
|
|
608
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
609
|
+
*/const cC=jr("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"}]]);/**
|
|
610
|
+
* @license lucide-react v0.456.0 - ISC
|
|
611
|
+
*
|
|
612
|
+
* This source code is licensed under the ISC license.
|
|
613
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
614
|
+
*/jr("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"}]]);/**
|
|
615
|
+
* @license lucide-react v0.456.0 - ISC
|
|
616
|
+
*
|
|
617
|
+
* This source code is licensed under the ISC license.
|
|
618
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
619
|
+
*/const dC=jr("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"}]]);/**
|
|
620
|
+
* @license lucide-react v0.456.0 - ISC
|
|
621
|
+
*
|
|
622
|
+
* This source code is licensed under the ISC license.
|
|
623
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
624
|
+
*/const fC=jr("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"}]]);/**
|
|
625
|
+
* @license lucide-react v0.456.0 - ISC
|
|
626
|
+
*
|
|
627
|
+
* This source code is licensed under the ISC license.
|
|
628
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
629
|
+
*/const hC=jr("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"}]]);/**
|
|
630
|
+
* @license lucide-react v0.456.0 - ISC
|
|
631
|
+
*
|
|
632
|
+
* This source code is licensed under the ISC license.
|
|
633
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
634
|
+
*/const pC=jr("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"}]]);/**
|
|
635
|
+
* @license lucide-react v0.456.0 - ISC
|
|
636
|
+
*
|
|
637
|
+
* This source code is licensed under the ISC license.
|
|
638
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
639
|
+
*/const mC=jr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
640
|
+
* @license lucide-react v0.456.0 - ISC
|
|
641
|
+
*
|
|
642
|
+
* This source code is licensed under the ISC license.
|
|
643
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
644
|
+
*/jr("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 gC=qe.div.attrs({className:"rtext-code-block-wrapper"})`
|
|
645
|
+
position: relative;
|
|
646
|
+
margin: 20px 0;
|
|
647
|
+
border-radius: 8px;
|
|
648
|
+
overflow: hidden;
|
|
649
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
650
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
651
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
652
|
+
transition: box-shadow 0.2s ease;
|
|
653
|
+
|
|
654
|
+
&:hover {
|
|
655
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
656
|
+
}
|
|
657
|
+
`,vC=qe.div.attrs({className:"rtext-code-block-language"})`
|
|
658
|
+
display: flex;
|
|
659
|
+
align-items: center;
|
|
660
|
+
justify-content: space-between;
|
|
661
|
+
padding: 10px 16px;
|
|
662
|
+
background: ${e=>{var r;const t=((r=e.theme)==null?void 0:r.disabledBackground)||"#f6f8fa";return t==="#f6f8fa"||t.includes("f6f8fa")?"#f0f2f5":t==="#ffffff"||t.includes("ffffff")?"#f6f8fa":t}};
|
|
663
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
664
|
+
font-size: 11px;
|
|
665
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#656d76"}};
|
|
666
|
+
font-weight: 600;
|
|
667
|
+
letter-spacing: 0.5px;
|
|
668
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
669
|
+
|
|
670
|
+
span:first-child {
|
|
671
|
+
opacity: 0.85;
|
|
672
|
+
font-variant: small-caps;
|
|
673
|
+
}
|
|
674
|
+
`,bC=qe.pre.attrs({className:"rtext-simple-code-block"})`
|
|
675
|
+
margin: 16px 0;
|
|
676
|
+
padding: 12px 16px;
|
|
677
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
678
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e1e4e8"}};
|
|
679
|
+
border-radius: 6px;
|
|
680
|
+
overflow-x: auto;
|
|
681
|
+
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
|
|
682
|
+
font-size: 13px;
|
|
683
|
+
line-height: 1.6;
|
|
684
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
685
|
+
|
|
686
|
+
code {
|
|
687
|
+
background: transparent;
|
|
688
|
+
padding: 0;
|
|
689
|
+
color: inherit;
|
|
690
|
+
font-size: inherit;
|
|
691
|
+
font-family: inherit;
|
|
692
|
+
white-space: pre;
|
|
693
|
+
}
|
|
694
|
+
`,yC=qe.pre.attrs({className:"rtext-code-block-container"})`
|
|
695
|
+
margin: 0 !important;
|
|
696
|
+
border: none !important;
|
|
697
|
+
padding: 16px 20px;
|
|
698
|
+
overflow-x: auto;
|
|
699
|
+
background: ${e=>{var r;const t=((r=e.theme)==null?void 0:r.disabledBackground)||"#f6f8fa";return t==="#f6f8fa"||t.includes("f6f8fa")||t.includes("f0f2f5")||t==="#ffffff"||t.includes("ffffff")?"#ffffff":t}};
|
|
700
|
+
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
|
|
701
|
+
font-size: 13px;
|
|
702
|
+
line-height: 1.7;
|
|
703
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
704
|
+
tab-size: 2;
|
|
705
|
+
-webkit-font-smoothing: antialiased;
|
|
706
|
+
-moz-osx-font-smoothing: grayscale;
|
|
707
|
+
|
|
708
|
+
/* 美化滚动条 */
|
|
709
|
+
&::-webkit-scrollbar {
|
|
710
|
+
height: 8px;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
&::-webkit-scrollbar-track {
|
|
714
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
&::-webkit-scrollbar-thumb {
|
|
718
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#c1c7cd"}};
|
|
719
|
+
border-radius: 4px;
|
|
720
|
+
|
|
721
|
+
&:hover {
|
|
722
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#8b949e"}};
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
code {
|
|
727
|
+
background: transparent;
|
|
728
|
+
padding: 0;
|
|
729
|
+
color: inherit;
|
|
730
|
+
font-size: inherit;
|
|
731
|
+
font-family: inherit;
|
|
732
|
+
white-space: pre;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/* 优化 PrismJS 高亮样式 - 参考 DeepSeek/飞书设计 */
|
|
736
|
+
.token.comment,
|
|
737
|
+
.token.prolog,
|
|
738
|
+
.token.doctype,
|
|
739
|
+
.token.cdata {
|
|
740
|
+
color: #6a737d;
|
|
741
|
+
font-style: italic;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.token.punctuation {
|
|
745
|
+
color: #24292f;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.token.property,
|
|
749
|
+
.token.tag,
|
|
750
|
+
.token.boolean,
|
|
751
|
+
.token.number,
|
|
752
|
+
.token.constant,
|
|
753
|
+
.token.symbol,
|
|
754
|
+
.token.deleted {
|
|
755
|
+
color: #005cc5;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.token.selector,
|
|
759
|
+
.token.attr-name,
|
|
760
|
+
.token.string,
|
|
761
|
+
.token.char,
|
|
762
|
+
.token.builtin,
|
|
763
|
+
.token.inserted {
|
|
764
|
+
color: #032f62;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.token.operator,
|
|
768
|
+
.token.entity,
|
|
769
|
+
.token.url,
|
|
770
|
+
.language-css .token.string,
|
|
771
|
+
.style .token.string {
|
|
772
|
+
color: #d73a49;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.token.atrule,
|
|
776
|
+
.token.attr-value,
|
|
777
|
+
.token.keyword {
|
|
778
|
+
color: #d73a49;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.token.function,
|
|
782
|
+
.token.class-name {
|
|
783
|
+
color: #6f42c1;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
.token.regex,
|
|
787
|
+
.token.important,
|
|
788
|
+
.token.variable {
|
|
789
|
+
color: #e36209;
|
|
790
|
+
}
|
|
791
|
+
`,xC=qe.button.attrs({className:"rtext-code-block-copy-btn"})`
|
|
792
|
+
display: inline-flex;
|
|
793
|
+
align-items: center;
|
|
794
|
+
justify-content: center;
|
|
795
|
+
gap: 5px;
|
|
796
|
+
padding: 5px 10px;
|
|
797
|
+
background: ${e=>e.$error?"#d73a49":e.$copied?"#2da44e":"transparent"};
|
|
798
|
+
border: 1px solid ${e=>{var t;return e.$error?"#d73a49":e.$copied?"#2da44e":((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
799
|
+
border-radius: 5px;
|
|
800
|
+
color: ${e=>{var t;return e.$error||e.$copied?"#ffffff":((t=e.theme)==null?void 0:t.textColor)||"#57606a"}};
|
|
801
|
+
cursor: pointer;
|
|
802
|
+
font-size: 12px;
|
|
803
|
+
font-weight: 500;
|
|
804
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
805
|
+
min-width: 64px;
|
|
806
|
+
height: 28px;
|
|
807
|
+
user-select: none;
|
|
808
|
+
|
|
809
|
+
&:hover {
|
|
810
|
+
background: ${e=>{var t;return e.$error?"#b6232f":e.$copied?"#28a745":((t=e.theme)==null?void 0:t.hoverBackground)||"rgba(0, 0, 0, 0.05)"}};
|
|
811
|
+
border-color: ${e=>{var t;return e.$error?"#b6232f":e.$copied?"#28a745":((t=e.theme)==null?void 0:t.textColor)||"#8b949e"}};
|
|
812
|
+
transform: translateY(-1px);
|
|
813
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
&:active {
|
|
817
|
+
transform: translateY(0);
|
|
818
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
svg {
|
|
822
|
+
width: 14px;
|
|
823
|
+
height: 14px;
|
|
824
|
+
flex-shrink: 0;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
span {
|
|
828
|
+
white-space: nowrap;
|
|
829
|
+
}
|
|
830
|
+
`,wC=({attributes:e,language:t,children:r,styles:n,codeText:a,enablePrism:i=!1})=>{const c=Zt(null),[u,f]=$t(!1),[d,m]=$t(!1),g=xt(()=>{if(a)return a;const C=A=>typeof A=="string"?A:typeof A=="number"?String(A):A==null?"":Array.isArray(A)?A.map(C).join(""):typeof A=="object"&&A!==null?"text"in A?String(A.text||""):We.isValidElement(A)?A.props&&A.props.children?C(A.props.children):"":"textContent"in A?String(A.textContent||""):"":"";return C(r)},[r,a]),v=xt(()=>{if(!t)return;const C=t.toLowerCase();return C.startsWith("language-")?C.replace("language-",""):C},[t]);sr(()=>{c.current&&g&&(c.current.textContent=g)},[g]);const w=async()=>{if(g)try{await navigator.clipboard.writeText(g),f(!0),m(!1),setTimeout(()=>{f(!1)},2e3)}catch(C){console.error("Failed to copy code:",C),m(!0),f(!1),setTimeout(()=>{m(!1)},2e3)}},x=xt(()=>(n==null?void 0:n.theme)||{},[n]);return i?H.jsxs(gC,{...e,theme:x,children:[H.jsxs(vC,{theme:x,children:[H.jsx("span",{children:v?v.toUpperCase():"CODE"}),H.jsx(xC,{theme:x,$copied:u,$error:d,onClick:w,title:u?"\u5DF2\u590D\u5236":d?"\u590D\u5236\u5931\u8D25":"\u590D\u5236\u4EE3\u7801",children:d?H.jsxs(H.Fragment,{children:[H.jsx(mC,{size:14}),H.jsx("span",{children:"\u5931\u8D25"})]}):u?H.jsxs(H.Fragment,{children:[H.jsx(rC,{size:14}),H.jsx("span",{children:"\u5DF2\u590D\u5236"})]}):H.jsxs(H.Fragment,{children:[H.jsx(ug,{size:14}),H.jsx("span",{children:"\u590D\u5236"})]})})]}),H.jsx(yC,{theme:x,children:H.jsx("code",{ref:c,className:v?`language-${v}`:"",children:g})})]}):H.jsx(bC,{...e,theme:x,children:H.jsx("code",{ref:c,children:g})})},CC=e=>{var i,c,u,f,d,m,g,v;const{styles:t}=e,{element:r,children:n,attributes:a}=e;switch(r.type){case"paragraph":return H.jsx("div",{...a,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return H.jsx("h1",{...a,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",{...a,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",{...a,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",{...a,children:n});case"numbered-list":return H.jsx("ol",{...a,children:n});case"list-item":return H.jsx("li",{...a,children:n});case"table":return H.jsx("div",{className:"table-container",children:H.jsx("table",{...a,children:H.jsx("tbody",{children:n})})});case"table-row":return H.jsx("tr",{...a,children:n});case"table-cell":return r.header?H.jsx("th",{...a,children:n}):H.jsx("td",{...a,children:n});case"block-quote":return H.jsx("blockquote",{...a,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":const w=((m=r.children)==null?void 0:m.map(k=>k.text||"").join(""))||"",x=e&&typeof e.enablePrism=="boolean"?e.enablePrism:!1;return H.jsx(wC,{attributes:a,language:r.language,styles:t,codeText:w,enablePrism:x,children:n});case"think":const C=e.extraProps||{},p=C.isCollapsed!==void 0?C.isCollapsed:Object.values(C)[1]===!0,A={...C,isCollapsed:p};return H.jsx(Pw,{attributes:a,styles:t,extraProps:A,children:n});case"template":return H.jsx(ag,{...a,element:r,children:n,styles:t});case"latex-inline":return H.jsx(Uw,{attributes:a,formula:r.formula,styles:t});case"latex-block":return H.jsx(Jw,{attributes:a,formula:r.formula,styles:t});case"retrieve-sql-data":const B=(k=>{if(!k)return null;try{const N=typeof k=="string"?JSON.parse(k):k;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(N)?N[0]:N}}]}}catch(N){return console.error("Failed to parse databaseReference:",N),null}})(((g=e.extraProps)==null?void 0:g.databaseReference)||e.databaseReference);return H.jsx(og,{...a,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:B||void 0,tagIndex:1});case"image":return console.log("\u6E32\u67D3\u56FE\u7247\u5143\u7D20:",{url:r.url,alt:r.alt}),H.jsx("img",{...a,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:k=>{const N=k.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",{...a,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:k=>{const N=k.target;N.style.display="none",console.warn("iframe\u52A0\u8F7D\u5931\u8D25:",r.src)}});default:return H.jsx("div",{...a,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(v=t==null?void 0:t.text)==null?void 0:v.color} !important`},children:n})}},DC=e=>{var c,u,f,d,m,g;const{attributes:t,children:r,leaf:n,styles:a}=e;(c=a==null?void 0:a.text)!=null&&c.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",a.text.color);let i=r;if(n.retrive){const v=n.fromtype==="0",w=n.fromtype==="1",x=n.fromtype==="2",C=n.fromtype==="10",p=n.text||"";let A=p,B="#e6f7ff",k="#1890ff",N="#bae7ff";return v?(A=`${p}`,B="#e6f7ff",k="#1890ff",N="#bae7ff"):w?(A=`${p}`,B="#f6ffed",k="#52c41a",N="#d9f7be"):x?(A=`${p}`,B="#E7F8FB",k="#10BBD9",N="#E7F8FB"):C&&(A=`${p}`,B="#e6f7ff",k="#1890ff",N="#bae7ff"),i=H.jsx("span",{...t,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:B,color:k,minWidth:24,height:24,borderRadius:4,padding:"0 6px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"20px",cursor:"pointer",verticalAlign:"middle",boxSizing:"border-box"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:F=>F.currentTarget.style.background=N,onMouseLeave:F=>F.currentTarget.style.background=B,children:A}),i}if(n.code)i=H.jsx("code",{...t,style:{color:`${(u=a==null?void 0:a.text)==null?void 0:u.color} !important`},children:i});else{const v=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),w={color:`${(f=a==null?void 0:a.text)==null?void 0:f.color} !important`,fontSize:(d=a==null?void 0:a.text)==null?void 0:d.fontSize,lineHeight:(m=a==null?void 0:a.text)==null?void 0:m.lineHeight,letterSpacing:a==null?void 0:a.letterSpacing};i=H.jsx("span",{...t,className:v,style:w,children:i})}return n.link&&(i=H.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(g=a==null?void 0:a.text)==null?void 0:g.color} !important`},children:i})),i},cu=qe.div.attrs({className:"unified-rich-text-container"})`
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
& > * + * {
|
|
834
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/* 标题样式 */
|
|
838
|
+
& h1 {
|
|
839
|
+
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
840
|
+
font-weight: 600;
|
|
841
|
+
margin: 24px 0 16px 0;
|
|
842
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
843
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
844
|
+
padding-bottom: 8px;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
& h2 {
|
|
848
|
+
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
849
|
+
font-weight: 600;
|
|
850
|
+
margin: 24px 0 16px 0;
|
|
851
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
852
|
+
border-bottom: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
853
|
+
padding-bottom: 6px;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
& h3 {
|
|
857
|
+
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
858
|
+
font-weight: 600;
|
|
859
|
+
margin: 24px 0 16px 0;
|
|
860
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/* 段落样式 */
|
|
864
|
+
& p {
|
|
865
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
866
|
+
margin: 16px 0;
|
|
867
|
+
line-height: 1.6;
|
|
868
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/* 列表样式 - GitHub 风格简约设计 */
|
|
872
|
+
& ul, & ol {
|
|
873
|
+
margin: 16px 0;
|
|
874
|
+
padding-left: 24px;
|
|
875
|
+
line-height: 1.6;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
& ul {
|
|
879
|
+
list-style-type: disc;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
& ol {
|
|
883
|
+
list-style-type: decimal;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
& li {
|
|
887
|
+
margin: 4px 0;
|
|
888
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/* 嵌套列表 */
|
|
892
|
+
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
893
|
+
margin: 8px 0;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/* 引用块样式 */
|
|
897
|
+
& blockquote {
|
|
898
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
899
|
+
border-left: 4px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
900
|
+
padding: 0 16px;
|
|
901
|
+
margin: 16px 0;
|
|
902
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textSecondary)||"#656d76"}};
|
|
903
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
/* 行内代码样式 */
|
|
907
|
+
& code {
|
|
908
|
+
font-size: 0.875em;
|
|
909
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
910
|
+
padding: 0.125em 0.25em;
|
|
911
|
+
border-radius: 6px;
|
|
912
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
913
|
+
color: #d73a49;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/* 代码块样式 */
|
|
917
|
+
& pre {
|
|
918
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
919
|
+
padding: 16px;
|
|
920
|
+
border-radius: 6px;
|
|
921
|
+
overflow-x: auto;
|
|
922
|
+
margin: 16px 0;
|
|
923
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#d0d7de"}};
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
& pre code {
|
|
927
|
+
background-color: transparent;
|
|
928
|
+
padding: 0;
|
|
929
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
/* 表格容器样式 */
|
|
933
|
+
& .table-container {
|
|
934
|
+
overflow: auto;
|
|
935
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
936
|
+
border-radius: 6px;
|
|
937
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
938
|
+
margin: 16px 0;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/* 表格样式 */
|
|
942
|
+
& .table-container table,
|
|
943
|
+
& table {
|
|
944
|
+
width: 100%;
|
|
945
|
+
border-collapse: collapse;
|
|
946
|
+
border: none;
|
|
947
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
948
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
& .table-container th,
|
|
952
|
+
& .table-container td,
|
|
953
|
+
& th, & td {
|
|
954
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
955
|
+
padding: 8px 12px;
|
|
956
|
+
text-align: left;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
& .table-container th,
|
|
960
|
+
& th {
|
|
961
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
962
|
+
font-weight: 600;
|
|
963
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
& .table-container tr:nth-child(even) td,
|
|
967
|
+
& tr:nth-child(even) {
|
|
968
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
& .table-container td,
|
|
972
|
+
& td {
|
|
973
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
974
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/* 图片样式 */
|
|
978
|
+
& img {
|
|
979
|
+
max-width: 100%;
|
|
980
|
+
height: auto;
|
|
981
|
+
border-radius: 6px;
|
|
982
|
+
margin: 16px 0;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
/* 链接样式 */
|
|
986
|
+
& a {
|
|
987
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#0969da"}};
|
|
988
|
+
text-decoration: none;
|
|
989
|
+
|
|
990
|
+
&:hover {
|
|
991
|
+
text-decoration: underline;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
/* 文本样式 */
|
|
996
|
+
& strong {
|
|
997
|
+
font-weight: 600;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
& em {
|
|
1001
|
+
font-style: italic;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
& u {
|
|
1005
|
+
text-decoration: underline;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
& s {
|
|
1009
|
+
text-decoration: line-through;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/* 分割线样式 */
|
|
1013
|
+
& hr {
|
|
1014
|
+
border: none;
|
|
1015
|
+
border-top: 1px solid #d0d7de;
|
|
1016
|
+
margin: 24px 0;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/* 思考容器样式 */
|
|
1020
|
+
& .think-container {
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
& .think-header {
|
|
1026
|
+
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
& .think-icon {
|
|
1030
|
+
display: inline-flex;
|
|
1031
|
+
align-items: center;
|
|
1032
|
+
justify-content: center;
|
|
1033
|
+
|
|
1034
|
+
&.is-spinning {
|
|
1035
|
+
animation: rtext-think-spin 1s linear infinite;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
@keyframes rtext-think-spin {
|
|
1040
|
+
from {
|
|
1041
|
+
transform: rotate(0deg);
|
|
1042
|
+
}
|
|
1043
|
+
to {
|
|
1044
|
+
transform: rotate(360deg);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
& .think-title {
|
|
1049
|
+
font-weight: 600;
|
|
1050
|
+
color: #24292f;
|
|
1051
|
+
font-size: 14px;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
& .think-text {
|
|
1055
|
+
color: #86909C;
|
|
1056
|
+
font-size: 14px;
|
|
1057
|
+
line-height: 1.6;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
/* 召回标签样式 */
|
|
1061
|
+
& .retrive-tag {
|
|
1062
|
+
display: inline-block;
|
|
1063
|
+
background: #e6f7ff;
|
|
1064
|
+
color: #1890ff;
|
|
1065
|
+
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
1066
|
+
border-radius: 6px;
|
|
1067
|
+
padding: 2px 6px;
|
|
1068
|
+
margin: 0 2px;
|
|
1069
|
+
font-weight: 500;
|
|
1070
|
+
font-size: 12px;
|
|
1071
|
+
line-height: 1.4;
|
|
1072
|
+
cursor: pointer;
|
|
1073
|
+
vertical-align: middle;
|
|
1074
|
+
transition: background-color 0.2s ease;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
& .retrive-tag:hover {
|
|
1078
|
+
background: #bae7ff;
|
|
1079
|
+
}
|
|
1080
|
+
`;/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:cg,setPrototypeOf:hp,isFrozen:kC,getPrototypeOf:EC,getOwnPropertyDescriptor:SC}=Object;let{freeze:fn,seal:$n,create:h0}=Object,{apply:p0,construct:m0}=typeof Reflect<"u"&&Reflect;fn||(fn=function(e){return e});$n||($n=function(e){return e});p0||(p0=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];return e.apply(t,n)});m0||(m0=function(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 new e(...r)});const qi=hn(Array.prototype.forEach),AC=hn(Array.prototype.lastIndexOf),pp=hn(Array.prototype.pop),Po=hn(Array.prototype.push),BC=hn(Array.prototype.splice),os=hn(String.prototype.toLowerCase),du=hn(String.prototype.toString),fu=hn(String.prototype.match),Io=hn(String.prototype.replace),FC=hn(String.prototype.indexOf),NC=hn(String.prototype.trim),jn=hn(Object.prototype.hasOwnProperty),un=hn(RegExp.prototype.test),_o=TC(TypeError);function hn(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return p0(e,t,n)}}function TC(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m0(e,r)}}function ar(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:os;hp&&hp(e,null);let n=t.length;for(;n--;){let a=t[n];if(typeof a=="string"){const i=r(a);i!==a&&(kC(t)||(t[n]=i),a=i)}e[a]=!0}return e}function OC(e){for(let t=0;t<e.length;t++)jn(e,t)||(e[t]=null);return e}function sa(e){const t=h0(null);for(const[r,n]of cg(e))jn(e,r)&&(Array.isArray(n)?t[r]=OC(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=sa(n):t[r]=n);return t}function zo(e,t){for(;e!==null;){const n=SC(e,t);if(n){if(n.get)return hn(n.get);if(typeof n.value=="function")return hn(n.value)}e=EC(e)}function r(){return null}return r}const mp=fn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),hu=fn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),pu=fn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),MC=fn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mu=fn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),RC=fn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),gp=fn(["#text"]),vp=fn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),gu=fn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),bp=fn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Vi=fn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$C=$n(/\{\{[\w\W]*|[\w\W]*\}\}/gm),PC=$n(/<%[\w\W]*|[\w\W]*%>/gm),IC=$n(/\$\{[\w\W]*/gm),_C=$n(/^data-[\-\w.\u00B7-\uFFFF]+$/),zC=$n(/^aria-[\-\w]+$/),dg=$n(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jC=$n(/^(?:\w+script|data):/i),LC=$n(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fg=$n(/^html$/i),HC=$n(/^[a-z][.\w]*(-[.\w]+)+$/i);var yp=Object.freeze({__proto__:null,ARIA_ATTR:zC,ATTR_WHITESPACE:LC,CUSTOM_ELEMENT:HC,DATA_ATTR:_C,DOCTYPE_NAME:fg,ERB_EXPR:PC,IS_ALLOWED_URI:dg,IS_SCRIPT_OR_DATA:jC,MUSTACHE_EXPR:$C,TMPLIT_EXPR:IC});const jo={element:1,text:3,progressingInstruction:7,comment:8,document:9},KC=function(){return typeof window>"u"?null:window},qC=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},xp=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function hg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KC();const t=re=>hg(re);if(t.version="3.3.0",t.removed=[],!e||!e.document||e.document.nodeType!==jo.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,a=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:c,Node:u,Element:f,NodeFilter:d,NamedNodeMap:m=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:v,trustedTypes:w}=e,x=f.prototype,C=zo(x,"cloneNode"),p=zo(x,"remove"),A=zo(x,"nextSibling"),B=zo(x,"childNodes"),k=zo(x,"parentNode");if(typeof c=="function"){const re=r.createElement("template");re.content&&re.content.ownerDocument&&(r=re.content.ownerDocument)}let N,F="";const{implementation:R,createNodeIterator:S,createDocumentFragment:z,getElementsByTagName:O}=r,{importNode:V}=n;let I=xp();t.isSupported=typeof cg=="function"&&typeof k=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:X,ERB_EXPR:Z,TMPLIT_EXPR:L,DATA_ATTR:K,ARIA_ATTR:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:q}=yp;let{IS_ALLOWED_URI:J}=yp,me=null;const Ce=ar({},[...mp,...hu,...pu,...mu,...gp]);let we=null;const Fe=ar({},[...vp,...gu,...bp,...Vi]);let Ie=Object.seal(h0(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Q=null,le=null;const ce=Object.seal(h0(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let de=!0,Ee=!0,Ne=!1,ge=!0,De=!1,ke=!0,Be=!1,xe=!1,Se=!1,ze=!1,dt=!1,at=!1,$e=!0,Le=!1;const Ge="user-content-";let ht=!0,et=!1,nt={},Ot=null;const At=ar({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Tt=null;const Mt=ar({},["audio","video","img","source","image","track"]);let je=null;const he=ar({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ut="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",Pt="http://www.w3.org/1999/xhtml";let Bt=Pt,Ft=!1,Dt=null;const Ht=ar({},[ut,Lt,Pt],du);let or=ar({},["mi","mo","mn","ms","mtext"]),mr=ar({},["annotation-xml"]);const Rt=ar({},["title","style","font","a","script"]);let Dr=null;const Nr=["application/xhtml+xml","text/html"],gn="text/html";let Jt=null,kr=null;const Lr=r.createElement("form"),Er=function(re){return re instanceof RegExp||re instanceof Function},cr=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kr&&kr===re)){if((!re||typeof re!="object")&&(re={}),re=sa(re),Dr=Nr.indexOf(re.PARSER_MEDIA_TYPE)===-1?gn:re.PARSER_MEDIA_TYPE,Jt=Dr==="application/xhtml+xml"?du:os,me=jn(re,"ALLOWED_TAGS")?ar({},re.ALLOWED_TAGS,Jt):Ce,we=jn(re,"ALLOWED_ATTR")?ar({},re.ALLOWED_ATTR,Jt):Fe,Dt=jn(re,"ALLOWED_NAMESPACES")?ar({},re.ALLOWED_NAMESPACES,du):Ht,je=jn(re,"ADD_URI_SAFE_ATTR")?ar(sa(he),re.ADD_URI_SAFE_ATTR,Jt):he,Tt=jn(re,"ADD_DATA_URI_TAGS")?ar(sa(Mt),re.ADD_DATA_URI_TAGS,Jt):Mt,Ot=jn(re,"FORBID_CONTENTS")?ar({},re.FORBID_CONTENTS,Jt):At,Q=jn(re,"FORBID_TAGS")?ar({},re.FORBID_TAGS,Jt):sa({}),le=jn(re,"FORBID_ATTR")?ar({},re.FORBID_ATTR,Jt):sa({}),nt=jn(re,"USE_PROFILES")?re.USE_PROFILES:!1,de=re.ALLOW_ARIA_ATTR!==!1,Ee=re.ALLOW_DATA_ATTR!==!1,Ne=re.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=re.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=re.SAFE_FOR_TEMPLATES||!1,ke=re.SAFE_FOR_XML!==!1,Be=re.WHOLE_DOCUMENT||!1,ze=re.RETURN_DOM||!1,dt=re.RETURN_DOM_FRAGMENT||!1,at=re.RETURN_TRUSTED_TYPE||!1,Se=re.FORCE_BODY||!1,$e=re.SANITIZE_DOM!==!1,Le=re.SANITIZE_NAMED_PROPS||!1,ht=re.KEEP_CONTENT!==!1,et=re.IN_PLACE||!1,J=re.ALLOWED_URI_REGEXP||dg,Bt=re.NAMESPACE||Pt,or=re.MATHML_TEXT_INTEGRATION_POINTS||or,mr=re.HTML_INTEGRATION_POINTS||mr,Ie=re.CUSTOM_ELEMENT_HANDLING||{},re.CUSTOM_ELEMENT_HANDLING&&Er(re.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ie.tagNameCheck=re.CUSTOM_ELEMENT_HANDLING.tagNameCheck),re.CUSTOM_ELEMENT_HANDLING&&Er(re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ie.attributeNameCheck=re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),re.CUSTOM_ELEMENT_HANDLING&&typeof re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ie.allowCustomizedBuiltInElements=re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(Ee=!1),dt&&(ze=!0),nt&&(me=ar({},gp),we=[],nt.html===!0&&(ar(me,mp),ar(we,vp)),nt.svg===!0&&(ar(me,hu),ar(we,gu),ar(we,Vi)),nt.svgFilters===!0&&(ar(me,pu),ar(we,gu),ar(we,Vi)),nt.mathMl===!0&&(ar(me,mu),ar(we,bp),ar(we,Vi))),re.ADD_TAGS&&(typeof re.ADD_TAGS=="function"?ce.tagCheck=re.ADD_TAGS:(me===Ce&&(me=sa(me)),ar(me,re.ADD_TAGS,Jt))),re.ADD_ATTR&&(typeof re.ADD_ATTR=="function"?ce.attributeCheck=re.ADD_ATTR:(we===Fe&&(we=sa(we)),ar(we,re.ADD_ATTR,Jt))),re.ADD_URI_SAFE_ATTR&&ar(je,re.ADD_URI_SAFE_ATTR,Jt),re.FORBID_CONTENTS&&(Ot===At&&(Ot=sa(Ot)),ar(Ot,re.FORBID_CONTENTS,Jt)),ht&&(me["#text"]=!0),Be&&ar(me,["html","head","body"]),me.table&&(ar(me,["tbody"]),delete Q.tbody),re.TRUSTED_TYPES_POLICY){if(typeof re.TRUSTED_TYPES_POLICY.createHTML!="function")throw _o('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof re.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _o('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=re.TRUSTED_TYPES_POLICY,F=N.createHTML("")}else N===void 0&&(N=qC(w,a)),N!==null&&typeof F=="string"&&(F=N.createHTML(""));fn&&fn(re),kr=re}},Et=ar({},[...hu,...pu,...MC]),y=ar({},[...mu,...RC]),D=function(re){let Y=k(re);(!Y||!Y.tagName)&&(Y={namespaceURI:Bt,tagName:"template"});const tt=os(re.tagName),Ut=os(Y.tagName);return Dt[re.namespaceURI]?re.namespaceURI===Lt?Y.namespaceURI===Pt?tt==="svg":Y.namespaceURI===ut?tt==="svg"&&(Ut==="annotation-xml"||or[Ut]):!!Et[tt]:re.namespaceURI===ut?Y.namespaceURI===Pt?tt==="math":Y.namespaceURI===Lt?tt==="math"&&mr[Ut]:!!y[tt]:re.namespaceURI===Pt?Y.namespaceURI===Lt&&!mr[Ut]||Y.namespaceURI===ut&&!or[Ut]?!1:!y[tt]&&(Rt[tt]||!Et[tt]):!!(Dr==="application/xhtml+xml"&&Dt[re.namespaceURI]):!1},Pe=function(re){Po(t.removed,{element:re});try{k(re).removeChild(re)}catch{p(re)}},$=function(re,Y){try{Po(t.removed,{attribute:Y.getAttributeNode(re),from:Y})}catch{Po(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(re),re==="is")if(ze||dt)try{Pe(Y)}catch{}else try{Y.setAttribute(re,"")}catch{}},te=function(re){let Y=null,tt=null;if(Se)re="<remove></remove>"+re;else{const It=fu(re,/^[\r\n\t ]+/);tt=It&&It[0]}Dr==="application/xhtml+xml"&&Bt===Pt&&(re='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+re+"</body></html>");const Ut=N?N.createHTML(re):re;if(Bt===Pt)try{Y=new v().parseFromString(Ut,Dr)}catch{}if(!Y||!Y.documentElement){Y=R.createDocument(Bt,"template",null);try{Y.documentElement.innerHTML=Ft?F:Ut}catch{}}const ft=Y.body||Y.documentElement;return re&&tt&&ft.insertBefore(r.createTextNode(tt),ft.childNodes[0]||null),Bt===Pt?O.call(Y,Be?"html":"body")[0]:Be?Y.documentElement:ft},lr=function(re){return S.call(re.ownerDocument||re,re,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},st=function(re){return re instanceof g&&(typeof re.nodeName!="string"||typeof re.textContent!="string"||typeof re.removeChild!="function"||!(re.attributes instanceof m)||typeof re.removeAttribute!="function"||typeof re.setAttribute!="function"||typeof re.namespaceURI!="string"||typeof re.insertBefore!="function"||typeof re.hasChildNodes!="function")},wt=function(re){return typeof u=="function"&&re instanceof u};function vt(re,Y,tt){qi(re,Ut=>{Ut.call(t,Y,tt,kr)})}const ot=function(re){let Y=null;if(vt(I.beforeSanitizeElements,re,null),st(re))return Pe(re),!0;const tt=Jt(re.nodeName);if(vt(I.uponSanitizeElement,re,{tagName:tt,allowedTags:me}),ke&&re.hasChildNodes()&&!wt(re.firstElementChild)&&un(/<[/\w!]/g,re.innerHTML)&&un(/<[/\w!]/g,re.textContent)||re.nodeType===jo.progressingInstruction||ke&&re.nodeType===jo.comment&&un(/<[/\w]/g,re.data))return Pe(re),!0;if(!(ce.tagCheck instanceof Function&&ce.tagCheck(tt))&&(!me[tt]||Q[tt])){if(!Q[tt]&&nr(tt)&&(Ie.tagNameCheck instanceof RegExp&&un(Ie.tagNameCheck,tt)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(tt)))return!1;if(ht&&!Ot[tt]){const Ut=k(re)||re.parentNode,ft=B(re)||re.childNodes;if(ft&&Ut){const It=ft.length;for(let bt=It-1;bt>=0;--bt){const Ir=C(ft[bt],!0);Ir.__removalCount=(re.__removalCount||0)+1,Ut.insertBefore(Ir,A(re))}}}return Pe(re),!0}return re instanceof f&&!D(re)||(tt==="noscript"||tt==="noembed"||tt==="noframes")&&un(/<\/no(script|embed|frames)/i,re.innerHTML)?(Pe(re),!0):(De&&re.nodeType===jo.text&&(Y=re.textContent,qi([X,Z,L],Ut=>{Y=Io(Y,Ut," ")}),re.textContent!==Y&&(Po(t.removed,{element:re.cloneNode()}),re.textContent=Y)),vt(I.afterSanitizeElements,re,null),!1)},qt=function(re,Y,tt){if($e&&(Y==="id"||Y==="name")&&(tt in r||tt in Lr))return!1;if(!(Ee&&!le[Y]&&un(K,Y))&&!(de&&un(W,Y))&&!(ce.attributeCheck instanceof Function&&ce.attributeCheck(Y,re))){if(!we[Y]||le[Y]){if(!(nr(re)&&(Ie.tagNameCheck instanceof RegExp&&un(Ie.tagNameCheck,re)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(re))&&(Ie.attributeNameCheck instanceof RegExp&&un(Ie.attributeNameCheck,Y)||Ie.attributeNameCheck instanceof Function&&Ie.attributeNameCheck(Y,re))||Y==="is"&&Ie.allowCustomizedBuiltInElements&&(Ie.tagNameCheck instanceof RegExp&&un(Ie.tagNameCheck,tt)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(tt))))return!1}else if(!je[Y]&&!un(J,Io(tt,ne,""))&&!((Y==="src"||Y==="xlink:href"||Y==="href")&&re!=="script"&&FC(tt,"data:")===0&&Tt[re])&&!(Ne&&!un(G,Io(tt,ne,"")))&&tt)return!1}return!0},nr=function(re){return re!=="annotation-xml"&&fu(re,q)},xr=function(re){vt(I.beforeSanitizeAttributes,re,null);const{attributes:Y}=re;if(!Y||st(re))return;const tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let Ut=Y.length;for(;Ut--;){const ft=Y[Ut],{name:It,namespaceURI:bt,value:Ir}=ft,Hr=Jt(It),In=Ir;let Rr=It==="value"?In:NC(In);if(tt.attrName=Hr,tt.attrValue=Rr,tt.keepAttr=!0,tt.forceKeepAttr=void 0,vt(I.uponSanitizeAttribute,re,tt),Rr=tt.attrValue,Le&&(Hr==="id"||Hr==="name")&&($(It,re),Rr=Ge+Rr),ke&&un(/((--!?|])>)|<\/(style|title|textarea)/i,Rr)){$(It,re);continue}if(Hr==="attributename"&&fu(Rr,"href")){$(It,re);continue}if(tt.forceKeepAttr)continue;if(!tt.keepAttr){$(It,re);continue}if(!ge&&un(/\/>/i,Rr)){$(It,re);continue}De&&qi([X,Z,L],Dn=>{Rr=Io(Rr,Dn," ")});const Cn=Jt(re.nodeName);if(!qt(Cn,Hr,Rr)){$(It,re);continue}if(N&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!bt)switch(w.getAttributeType(Cn,Hr)){case"TrustedHTML":{Rr=N.createHTML(Rr);break}case"TrustedScriptURL":{Rr=N.createScriptURL(Rr);break}}if(Rr!==In)try{bt?re.setAttributeNS(bt,It,Rr):re.setAttribute(It,Rr),st(re)?Pe(re):pp(t.removed)}catch{$(It,re)}}vt(I.afterSanitizeAttributes,re,null)},ee=function re(Y){let tt=null;const Ut=lr(Y);for(vt(I.beforeSanitizeShadowDOM,Y,null);tt=Ut.nextNode();)vt(I.uponSanitizeShadowNode,tt,null),ot(tt),xr(tt),tt.content instanceof i&&re(tt.content);vt(I.afterSanitizeShadowDOM,Y,null)};return t.sanitize=function(re){let Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=null,Ut=null,ft=null,It=null;if(Ft=!re,Ft&&(re="<!-->"),typeof re!="string"&&!wt(re))if(typeof re.toString=="function"){if(re=re.toString(),typeof re!="string")throw _o("dirty is not a string, aborting")}else throw _o("toString is not a function");if(!t.isSupported)return re;if(xe||cr(Y),t.removed=[],typeof re=="string"&&(et=!1),et){if(re.nodeName){const Hr=Jt(re.nodeName);if(!me[Hr]||Q[Hr])throw _o("root node is forbidden and cannot be sanitized in-place")}}else if(re instanceof u)tt=te("<!---->"),Ut=tt.ownerDocument.importNode(re,!0),Ut.nodeType===jo.element&&Ut.nodeName==="BODY"||Ut.nodeName==="HTML"?tt=Ut:tt.appendChild(Ut);else{if(!ze&&!De&&!Be&&re.indexOf("<")===-1)return N&&at?N.createHTML(re):re;if(tt=te(re),!tt)return ze?null:at?F:""}tt&&Se&&Pe(tt.firstChild);const bt=lr(et?re:tt);for(;ft=bt.nextNode();)ot(ft),xr(ft),ft.content instanceof i&&ee(ft.content);if(et)return re;if(ze){if(dt)for(It=z.call(tt.ownerDocument);tt.firstChild;)It.appendChild(tt.firstChild);else It=tt;return(we.shadowroot||we.shadowrootmode)&&(It=V.call(n,It,!0)),It}let Ir=Be?tt.outerHTML:tt.innerHTML;return Be&&me["!doctype"]&&tt.ownerDocument&&tt.ownerDocument.doctype&&tt.ownerDocument.doctype.name&&un(fg,tt.ownerDocument.doctype.name)&&(Ir="<!DOCTYPE "+tt.ownerDocument.doctype.name+`>
|
|
1081
|
+
`+Ir),De&&qi([X,Z,L],Hr=>{Ir=Io(Ir,Hr," ")}),N&&at?N.createHTML(Ir):Ir},t.setConfig=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};cr(re),xe=!0},t.clearConfig=function(){kr=null,xe=!1},t.isValidAttribute=function(re,Y,tt){kr||cr({});const Ut=Jt(re),ft=Jt(Y);return qt(Ut,ft,tt)},t.addHook=function(re,Y){typeof Y=="function"&&Po(I[re],Y)},t.removeHook=function(re,Y){if(Y!==void 0){const tt=AC(I[re],Y);return tt===-1?void 0:BC(I[re],tt,1)[0]}return pp(I[re])},t.removeHooks=function(re){I[re]=[]},t.removeAllHooks=function(){I=xp()},t}var VC=hg();function pg(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?pg([r])[0]:r)})}const wp="__rtext_escaped_dollar__",WC=2e3;function Ss(e){if(!e)return"";try{return decodeURIComponent(e)}catch(t){return console.warn("Failed to decode LaTeX formula:",e,t),e}}function UC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cp(e){return VC.sanitize(e,{ADD_TAGS:["retrive-tag","retrieve-sql-data","latex-inline","latex-block","think-block"],ADD_ATTR:["id","image_urls","fromType","data-formula","src","alt","width","height","frameborder","title","class","href"]})}function Dp(e,t){const r=(e||"").trim();return!(!r||r.length>WC||t==="inline"&&/[\r\n]/.test(r)||/[<>]/.test(r)||/\[\/?retrive-tag/i.test(r)||/\*\*|__/.test(r)||!(/\\[a-zA-Z]+/.test(r)||/[_^]/.test(r)||/[{}]/.test(r)||/[=+\-*/]/.test(r)||/[0-9]/.test(r)))}function GC(e){const t=new Map;let r=e||"";if(!r)return{content:r,placeholders:t};let n=0;r=r.replace(/\\\$/g,wp);const a=(u,f)=>{const d=`RTEXT_LATEX_PLACEHOLDER_${n++}_${u.toUpperCase()}`;return t.set(d,{type:u,formula:(f||"").trim()}),d},i=/\$\$([\s\S]+?)\$\$/g;r=r.replace(i,(u,f)=>Dp(f,"block")?a("block",f):u);const c=new RegExp("(?<!\\\\)\\$(?!\\$)([^\\n\\r$]+?)(?<!\\\\)\\$(?!\\$)","g");return r=r.replace(c,(u,f)=>Dp(f,"inline")?a("inline",f):u),r=r.replace(new RegExp(wp,"g"),"\\$"),{content:r,placeholders:t}}function YC(e,t){if(!e||t.size===0)return e;let r=e;return t.forEach((n,a)=>{const i=n.type==="block"?"latex-block":"latex-inline",c=encodeURIComponent(n.formula),u=`<${i} data-formula="${c}"></${i}>`;r=r.replace(new RegExp(UC(a),"g"),u)}),r}function mg(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 m;if(d.indexOf("<think>")>-1)if(d.indexOf("</think>")>-1){const g=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,v=d.match(g);return v?{thinkContent:v[1],content:v[2],finish:!0}:{thinkContent:"",content:d,finish:!0}}else{const g=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((m=d.match(g))==null?void 0:m[1])||"",content:""}}else return{thinkContent:"",content:d}}const{thinkContent:a,content:i,finish:c}=n(e||"");let u=[],f=0;if(!r.includes("think")&&a){const d=a.split(/\n+/).map(m=>m.trim()).filter(Boolean).flatMap(m=>{if(/<retrive-tag/i.test(m)){const g=document.createElement("div");return g.innerHTML=Cp(m),kp(g,t==null?void 0:t.basePath)}else return[{type:"paragraph",children:[{text:m}]}]});u.push({type:"think",id:`think-${f++}`,thinkContent:a,finish:c,children:d})}if(i){const{content:d,placeholders:m}=GC(i);let g=d;r.includes("retrive")||(g=g.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(x,C,p)=>`<retrive-tag${C?" "+C.trim():""}>${p}</retrive-tag>`)),r.includes("retrieve-sql-data")||(g=g.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(x,C)=>`<retrieve-sql-data id="${C}"></retrieve-sql-data>`)),gr.setOptions({gfm:!0,breaks:!0,pedantic:!1});const v=gr(g);let w=typeof v=="string"?v:"";if(w=YC(w,m),console.log("\u{1F4DD} marked \u89E3\u6790\u540E\u7684 HTML:",{htmlLength:w.length,hasImgTags:w.includes("<img"),basePath:t==null?void 0:t.basePath,htmlContent:w}),typeof v=="string"){const x=document.createElement("div");x.innerHTML=Cp(w),console.log("\u{1F527} \u521B\u5EFA DOM \u5143\u7D20\uFF0C\u51C6\u5907\u89E3\u6790:",{childNodesCount:x.childNodes.length,basePath:t==null?void 0:t.basePath,allElements:Array.from(x.querySelectorAll("*")).map(p=>p.tagName),imgElements:Array.from(x.querySelectorAll("img")).map(p=>({src:p.src,alt:p.alt}))});const C=kp(x,t==null?void 0:t.basePath);console.log("\u2705 deserializeHtmlNode \u89E3\u6790\u7ED3\u679C:",{partLength:C.length,hasImageElements:C.some(p=>p.type==="image")}),C&&C.length>0&&(u=u.concat(C))}}return!u||u.length===0?[{type:"paragraph",children:[{text:""}]}]:pg(u)}function kp(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,a)=>(a.forEach(i=>{var c;if(i.nodeType===Node.ELEMENT_NODE){const u=i;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:Gr(u,t)});break;case"h1":n.push({type:"heading-one",children:Gr(u,t)});break;case"h2":n.push({type:"heading-two",children:Gr(u,t)});break;case"h3":n.push({type:"heading-three",children:Gr(u,t)});break;case"ul":n.push({type:"bulleted-list",children:Array.from(u.children).map(d=>({type:"list-item",children:Gr(d)}))});break;case"ol":const f={type:"numbered-list",children:Array.from(u.children).map(d=>({type:"list-item",children:Gr(d)}))};n.push(f);break;case"li":n.push({type:"list-item",children:Gr(u,t)});break;case"pre":{const d=u.querySelector("code");let m;if(d){const g=(d.getAttribute("class")||"").match(/language-(\w+)/);g&&(m=g[1]),n.push({type:"code-block",language:m,children:Gr(d)})}else n.push({type:"code-block",language:m,children:Gr(u,t)});break}case"code":{u.closest("pre")||n.push({type:"paragraph",children:Gr(u,t)});break}case"retrive-tag":{const d=Gr(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:Gr(u,t)});break;case"table":n.push(XC(u));break;case"img":{const d=u.getAttribute("src")||"",m=u.getAttribute("alt")||"";let g=d;if(t)if(d.startsWith("./"))g=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const v=t.substring(0,t.lastIndexOf("/"));g=d.replace(/^\.\.\//,v+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(g=`${t}/${d}`);console.log("\u56FE\u7247\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:g}),n.push({type:"image",url:g,alt:m,children:[{text:""}]});break}case"iframe":{const d=u.getAttribute("src")||"",m=u.getAttribute("width")||"100%",g=u.getAttribute("height")||"400",v=u.getAttribute("frameborder")||"0",w=u.getAttribute("title")||"";let x=d;if(t)if(d.startsWith("./"))x=d.replace(/^\.\//,t+"/");else if(d.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));x=d.replace(/^\.\.\//,C+"/")}else!d.startsWith("/")&&!d.startsWith("http")&&(x=`${t}/${d}`);console.log("iframe\u8DEF\u5F84\u5904\u7406:",{src:d,basePath:t,processedSrc:x}),n.push({type:"iframe",src:x,width:m,height:g,frameborder:v,title:w,children:[{text:""}]});break}case"latex-inline":{const d=Ss(u.getAttribute("data-formula"));n.push({type:"latex-inline",formula:d,children:[{text:""}]});break}case"latex-block":{const d=Ss(u.getAttribute("data-formula"));n.push({type:"latex-block",formula:d,children:[{text:""}]});break}case"think-block":n.push({type:"think",children:Gr(u)});break;default:n.push({type:"paragraph",children:Gr(u,t)});break}}else i.nodeType===Node.TEXT_NODE&&((c=i.textContent)!=null&&c.trim())&&n.push({type:"paragraph",children:[{text:i.textContent}]})}),n))(r,e.childNodes),r}function Gr(e,t){const r=[];function n(i){const c=[];let u="",f=!1,d=!1,m=0;for(;m<i.length;)i.startsWith("**",m)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),f=!f,m+=2):i.startsWith("*",m)?(u&&(c.push({text:u,code:!0,bold:f,italic:d}),u=""),d=!d,m+=1):(u+=i[m],m+=1);return u&&c.push({text:u,code:!0,bold:f,italic:d}),c}function a(i,c={}){var u,f;if(i.nodeType===Node.TEXT_NODE){const d=(u=i.textContent)==null?void 0:u.trim();return d?c.code?n(d):[{text:d,...c}]:[]}if(i.nodeType===Node.ELEMENT_NODE){const d=i,m={...c};switch(d.tagName.toLowerCase()){case"em":case"i":m.italic=!0;break;case"strong":case"b":m.bold=!0;break;case"code":d.closest("pre")||(m.code=!0);break;case"del":case"s":m.strikethrough=!0;break;case"u":m.underline=!0;break;case"a":m.link=d.getAttribute("href")||void 0;break;case"br":return[{text:`
|
|
1082
|
+
`,...m}];case"retrive-tag":{const v={};for(const{name:C,value:p}of Array.from(d.attributes))v[C]=p;const w=d.textContent||""||"[0]",x=v.fromtype||v.fromType||"";return[{text:w,retrive:!0,...v,fromtype:x}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:d.getAttribute("id")||"",children:[{text:""}]}];case"img":{const v=d.getAttribute("src")||"",w=d.getAttribute("alt")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957\u56FE\u7247:",{src:v,alt:w,basePath:t});let x=v;if(t)if(v.startsWith("./"))x=v.replace(/^\.\//,t+"/");else if(v.startsWith("../")){const C=t.substring(0,t.lastIndexOf("/"));x=v.replace(/^\.\.\//,C+"/")}else!v.startsWith("/")&&!v.startsWith("http")&&(x=`${t}/${v}`);return console.log("\u{1F50D} deserializeChildren \u56FE\u7247\u8DEF\u5F84\u8F6C\u6362:",{src:v,processedSrc:x}),[{type:"image",url:x,alt:w,children:[{text:""}]}]}case"iframe":{const v=d.getAttribute("src")||"",w=d.getAttribute("width")||"100%",x=d.getAttribute("height")||"400",C=d.getAttribute("frameborder")||"0",p=d.getAttribute("title")||"";console.log("\u{1F50D} deserializeChildren \u5904\u7406\u5D4C\u5957iframe:",{src:v,width:w,height:x,basePath:t});let A=v;if(t)if(v.startsWith("./"))A=v.replace(/^\.\//,t+"/");else if(v.startsWith("../")){const B=t.substring(0,t.lastIndexOf("/"));A=v.replace(/^\.\.\//,B+"/")}else!v.startsWith("/")&&!v.startsWith("http")&&(A=`${t}/${v}`);return console.log("\u{1F50D} deserializeChildren iframe\u8DEF\u5F84\u8F6C\u6362:",{src:v,processedSrc:A}),[{type:"iframe",src:A,width:w,height:x,frameborder:C,title:p,children:[{text:""}]}]}case"latex-inline":return[{type:"latex-inline",formula:Ss(d.getAttribute("data-formula")),children:[{text:""}]}];case"latex-block":return[{type:"latex-block",formula:Ss(d.getAttribute("data-formula")),children:[{text:""}]}]}if(d.childNodes.length===0&&((f=d.textContent)!=null&&f.trim()))return m.code?n(d.textContent):[{text:d.textContent,...m}];let g=[];for(const v of Array.from(d.childNodes))g=g.concat(a(v,m));return g}return[]}for(const i of Array.from(e.childNodes))r.push(...a(i));return r}function XC(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const a=Array.from(e.querySelectorAll("tr"));a.length>0&&(t.push({type:"table-row",children:Array.from(a[0].children).map(i=>({type:"table-cell",header:!0,children:Gr(i)}))}),a.slice(1).forEach(i=>{t.push({type:"table-row",children:Array.from(i.children).map(c=>({type:"table-cell",header:!1,children:Gr(c)}))})}))}else{if(r){const a=r.querySelector("tr");a&&t.push({type:"table-row",children:Array.from(a.querySelectorAll("th")).map(i=>({type:"table-cell",header:!0,children:Gr(i)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(a=>{t.push({type:"table-row",children:Array.from(a.querySelectorAll("td")).map(i=>({type:"table-cell",header:!1,children:Gr(i)}))})})}return{type:"table",children:t}}const ZC=qe.div.attrs({className:"unified-rich-text-container"})`
|
|
1083
|
+
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
1084
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
1085
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
1086
|
+
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
1087
|
+
overflow: hidden;
|
|
1088
|
+
transition: all 0.2s ease-in-out;
|
|
1089
|
+
padding-top: 14px;
|
|
1090
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
1091
|
+
&:focus-within {
|
|
1092
|
+
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
1093
|
+
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
1094
|
+
}
|
|
1095
|
+
`}}
|
|
1096
|
+
`,vu=qe.div.attrs({className:"unified-rich-text-editable-container"})`
|
|
1097
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
1098
|
+
min-height: inherit;
|
|
1099
|
+
outline: none;
|
|
1100
|
+
|
|
1101
|
+
& > * + * {
|
|
1102
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
1103
|
+
}
|
|
1104
|
+
`,Ep=(e,t)=>t<0?e:`${e.slice(0,t)}\\${e.slice(t)}`,Sp=(e,t)=>{if(!e)return-1;const r=t.length;let n=-1;for(let a=0;a<e.length;a++){if(e[a]==="\\"){a+=1;continue}if(r===2){if(e.startsWith("$$",a)){n===-1?n=a:n=-1,a+=1;continue}}else if(r===1&&e[a]==="$"){if(e[a+1]==="$"){a+=1;continue}n===-1?n=a:n=-1}}return n},JC=e=>{const t=e||"";if(!t)return{content:"",hasPendingLatex:!1};let r=t,n=!1;const a=[],i=Sp(t,"$$");i!==-1&&(r=Ep(r,i),a.push(i),n=!0);const c=Sp(t,"$");if(c!==-1){const u=a.filter(f=>f<=c).length;r=Ep(r,c+u),n=!0}return{content:r,hasPendingLatex:n}};var di=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(di||{});const qs=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",basePath:n,size:a="sm",theme:i={},onChange:c,onFocus:u,onBlur:f,renderElement:d,renderLeaf:m,onRetriveTagClick:g,eventsEmit:v,onEditorReady:w,extraProps:x={},className:C,style:p,styles:A,enableTemplateInput:B=!1,disabledTags:k=[],enablePrism:N=!1,enableTemplateAutocomplete:F=!1})=>{const R=As(),S=xt(()=>{var le,ce,de,Ee,Ne,ge,De,ke,Be;return{primaryColor:((le=R==null?void 0:R.colors)==null?void 0:le.primary)||(i==null?void 0:i.primaryColor)||"#007bff",secondaryColor:((ce=R==null?void 0:R.colors)==null?void 0:ce.secondary)||(i==null?void 0:i.secondaryColor)||"#6c757d",backgroundColor:((de=R==null?void 0:R.colors)==null?void 0:de.background)||(i==null?void 0:i.backgroundColor)||"transparent",textColor:((Ee=R==null?void 0:R.colors)==null?void 0:Ee.text)||(i==null?void 0:i.textColor)||"#24292f",borderColor:((Ne=R==null?void 0:R.colors)==null?void 0:Ne.border)||(i==null?void 0:i.borderColor)||"#dee2e6",disabledBackground:((ge=R==null?void 0:R.colors)==null?void 0:ge.disabledBackground)||(i==null?void 0:i.disabledBackground)||"#f8f9fa",hoverBackground:(i==null?void 0:i.hoverBackground)||"rgba(0,0,0,0.06)",borderRadius:((De=R==null?void 0:R.space)==null?void 0:De.radius)||(i==null?void 0:i.borderRadius)||"4px",padding:((ke=R==null?void 0:R.space)==null?void 0:ke.padding)||(i==null?void 0:i.padding)||"0rem 1rem",margin:((Be=R==null?void 0:R.space)==null?void 0:Be.margin)||(i==null?void 0:i.margin)||"0.5rem",minHeight:(i==null?void 0:i.minHeight)||"200px",baseFontSize:(i==null?void 0:i.baseFontSize)||(a==="md"?14:12),...i}},[R,i,a]),z=Zt();if(!z.current){const le=P8(),ce=Xy(le),{isInline:de}=ce;ce.isInline=ge=>!k.includes("template")&&ge.type==="template"?!0:de(ge);const{isVoid:Ee}=ce;ce.isVoid=ge=>!k.includes("template")&&ge.type==="template"?!0:Ee(ge);const Ne=ge=>{if(!(B&&!k.includes("template")))return ge;const{insertText:De,insertData:ke}=ge,Be=()=>{const xe=/<template\b[^>]*>([\s\S]*?)<\/template>/g,Se=Array.from(P.nodes(ge,{match:ze=>gt.isText(ze)&&xe.test(ze.text)}));if(Se.length!==0)for(const ze of Se){const[dt,at]=ze,$e=dt.text||"",Le=[];let Ge=0,ht;for(xe.lastIndex=0;(ht=xe.exec($e))!==null;){if(ht.index>Ge){const et=$e.slice(Ge,ht.index);et&&Le.push({text:et})}Le.push({type:"template",placeholder:(ht[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),Ge=ht.index+ht[0].length}if(Ge<$e.length){const et=$e.slice(Ge);et&&Le.push({text:et})}Ve.removeNodes(ge,{at}),Ve.insertNodes(ge,Le,{at})}};return ge.insertText=xe=>{De(xe),Be()},ge.insertData=xe=>{const Se=xe.getData("text/plain");if(Se&&/<template\b[\s\S]*?<\/template>/.test(Se)){De(Se),Be();return}return ke(xe)},ge};z.current=Ne(ce)}const O=z.current;sr(()=>{O&&w&&t&&w(O)},[O,w,t]);const[V,I]=$t(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]);Zt(null);const[X,Z]=$t(0);sr(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const le=e.content||[{type:"paragraph",children:[{text:""}]}];if(console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",le),le===V)return;I(le),Z(ce=>ce+1)}},[e.type,e.content,V]);const L=Zt(void 0),K=xt(()=>{if(e.type!=="markdown")return{content:"",hasPendingLatex:!1};const le=typeof e.content=="string"?e.content:JSON.stringify(e.content||"");return JC(le)},[e.type,e.content]);sr(()=>{if(e.type!=="markdown")return;const le=K.content;L.current!==le&&(L.current=le,Z(ce=>ce+1))},[e.type,K.content]);const W=xt(()=>e.type!=="markdown"?x:{...x||{},hasPendingLatex:K.hasPendingLatex},[x,e.type,K.hasPendingLatex]),G=Zt("");sr(()=>{if(e.type!=="markdown")return;const le=JSON.stringify(W||{});le!==G.current&&(G.current=le,Z(ce=>ce+1))},[W,e.type]);const ne=zt(le=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",le),le&&Array.isArray(le)?(I(le),c==null||c(le,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",le)},[c]),q=xt(()=>{const le=S==null?void 0:S.baseFontSize;return typeof le=="number"&&!Number.isNaN(le)?le:a==="md"?14:12},[S,a]),J=typeof N=="boolean"?N:!1,me=zt(le=>{const ce={...le,size:a,styles:A,eventsEmit:v,extraProps:W,enablePrism:J};return d?d(ce):CC(ce)},[d,a,A,v,W,J]),Ce=zt(le=>{const ce={...le,styles:A,onRetriveTagClick:g};return m?m(ce):DC(ce)},[m,A,g]);sr(()=>(window.copyCodeFromData=le=>{const ce=le.getAttribute("data-code");if(!ce){console.error("No code content found");return}const de=ce.replace(/\\n/g,`
|
|
1105
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(de).then(()=>{const Ee=le.innerHTML;le.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>',le.classList.add("copied"),setTimeout(()=>{le.innerHTML=Ee,le.classList.remove("copied")},2e3)}).catch(Ee=>{console.error("\u590D\u5236\u5931\u8D25:",Ee);const Ne=le.innerHTML;le.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>',le.style.background="#d73a49",le.style.borderColor="#d73a49",le.style.color="white",setTimeout(()=>{le.innerHTML=Ne,le.style.background="",le.style.borderColor="",le.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const we=xt(()=>{var le,ce;if(e.type!=="markdown")return null;try{console.log("\u{1F50D} UnifiedRichText processing Markdown content:",{contentLength:(le=K.content)==null?void 0:le.length,basePath:n,hasImages:(ce=K.content)==null?void 0:ce.includes("![")});const de=mg(K.content||"",{basePath:n});if(console.log("\u{1F3AF} Deserialized Slate content:",{slateLength:de.length,hasImageElements:de.some(Be=>Be.type==="image"),imageElements:de.filter(Be=>Be.type==="image")}),de&&de.length>0)return H.jsx(cu,{theme:S,$size:a,children:H.jsx(eu,{editor:O,initialValue:de,onChange:()=>{},children:H.jsx(vu,{theme:S,children:H.jsx(Ql,{renderElement:me,renderLeaf:Ce,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${q}px`}})})},X)});const Ee={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let Ne=gr(K.content||"",Ee);Ne=Ne.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),Ne=Ne.replace(/<\/table>/g,"</table></div>"),Ne=Ne.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(Be,xe,Se)=>{let ze;const dt=xe.match(/class=["']([^"']+)["']/);if(dt){const Le=dt[1].match(/language-(\w+)/);Le&&(ze=Le[1])}let at=Se;if(ze&&iu.languages[ze])try{at=iu.highlight(Se,iu.languages[ze],ze)}catch(Le){console.warn("Failed to highlight code:",Le),at=Se}const $e=Se.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<div class="code-block-wrapper">${ze?`<div class="code-block-language">${ze}</div>`:""}<pre><code${xe}>${at}</code><button class="code-copy-btn" data-code="${$e}" 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></div>`});const ge=(S==null?void 0:S.disabledBackground)||(S==null?void 0:S.backgroundColor)||"#ffffff",De=(Be,xe)=>Be.startsWith("#")?`${Be}${Math.round(xe*255).toString(16).padStart(2,"0")}`:Be,ke=`
|
|
1106
|
+
<style>
|
|
1107
|
+
.table-container{ overflow:auto; border:1px solid ${(S==null?void 0:S.borderColor)||"#e5e7eb"}; border-radius: 6px; background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; }
|
|
1108
|
+
.table-container table{ background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; color:${(S==null?void 0:S.textColor)||"#24292f"} !important; }
|
|
1109
|
+
.table-container th{ background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"} !important; color:${(S==null?void 0:S.textColor)||"#24292f"} !important; }
|
|
1110
|
+
.table-container td{ color:${(S==null?void 0:S.textColor)||"#24292f"} !important; background:${(S==null?void 0:S.backgroundColor)||"transparent"} !important; }
|
|
1111
|
+
.table-container tr:nth-child(even) td{ background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"} !important; }
|
|
1112
|
+
.code-block-wrapper{ position:relative; margin:16px 0; border-radius:6px; overflow:hidden; border:1px solid ${(S==null?void 0:S.borderColor)||"#d0d7de"}; background:${ge}; }
|
|
1113
|
+
.code-block-language{ display:flex; align-items:center; justify-content:space-between; padding:8px 12px; background:${(S==null?void 0:S.disabledBackground)||"#f6f8fa"}; border-bottom:1px solid ${(S==null?void 0:S.borderColor)||"#d0d7de"}; font-size:12px; color:${(S==null?void 0:S.textColor)||"#656d76"}; font-weight:500; }
|
|
1114
|
+
.code-block-wrapper pre{ position:relative; margin:0; padding:16px; overflow-x:auto; background:${ge}; border:none; border-radius:0; color:${(S==null?void 0:S.textColor)||"#24292f"}; font-family:'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size:13px; line-height:1.6; }
|
|
1115
|
+
.code-block-wrapper pre code{ background:transparent; padding:0; color:inherit; font-size:inherit; font-family:inherit; }
|
|
1116
|
+
.code-block-wrapper pre .code-copy-btn{ position:absolute; top:8px; right:8px; background:transparent; border:1px solid ${(S==null?void 0:S.borderColor)||"#e5e7eb"}; color:${(S==null?void 0:S.textColor)||"#24292f"}; border-radius:4px; padding:4px 8px; cursor:pointer; font-size:12px; transition:all 0.2s ease; }
|
|
1117
|
+
.code-block-wrapper pre .code-copy-btn:hover{ background:${(S==null?void 0:S.hoverBackground)||"rgba(0,0,0,0.06)"}; }
|
|
1118
|
+
.code-block-wrapper pre .code-copy-btn.copied{ background:#2da44e; border-color:#2da44e; color:#ffffff; }
|
|
1119
|
+
</style>
|
|
1120
|
+
`;return H.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${q}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},"data-pending-latex":K.hasPendingLatex||void 0,dangerouslySetInnerHTML:{__html:ke+Ne}})}catch(de){return console.error("Markdown parsing error:",de),H.jsx("div",{children:e.content})}},[e,S,O,X,me,Ce,q,K]),Fe=xt(()=>e.type!=="html"?null:H.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${q}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,S,q]),Ie=xt(()=>e.type!=="text"?null:H.jsx("div",{style:{padding:(S==null?void 0:S.padding)||"1rem",fontSize:`${q}px`,lineHeight:1.6,color:(S==null?void 0:S.textColor)||"#24292f"},children:H.jsx("span",{children:e.content||""})}),[e,S,q]),Q=()=>{switch(e.type){case"markdown":return we;case"html":return Fe;case"text":return Ie;case"slate":default:return t?H.jsx(cu,{theme:S,$size:a,children:H.jsx(eu,{editor:O,initialValue:V,onChange:ne,children:H.jsx(vu,{theme:S,children:H.jsx(Ql,{renderElement:me,renderLeaf:Ce,placeholder:r,readOnly:!1,onFocus:u,onBlur:f,onKeyDown:le=>{if(!F||le.key!=="Tab"||!O.selection||!Te.isCollapsed(O.selection))return;const{focus:ce}=O.selection,de=P.before(O,ce,{unit:"character",distance:2});if(!de)return;const Ee=P.range(O,de,ce);P.string(O,Ee)==="<t"&&(le.preventDefault(),Ve.delete(O,{at:Ee}),Ve.insertText(O,"<template "))},style:{minHeight:"inherit",outline:"none",fontSize:`${q}px`}})})},X)}):H.jsx(cu,{theme:S,$size:a,children:H.jsx(eu,{editor:O,initialValue:V,onChange:()=>{},children:H.jsx(vu,{theme:S,children:H.jsx(Ql,{renderElement:me,renderLeaf:Ce,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${q}px`}})})},X)})}};return H.jsx(ZC,{theme:S,$isEditing:t,className:C,style:p,children:Q()})};var g0={exports:{}},QC=g0.exports,Ap;function e9(){return Ap||(Ap=1,(function(e,t){(function(r,n){e.exports=n()})(QC,(function(){var r=1e3,n=6e4,a=36e5,i="millisecond",c="second",u="minute",f="hour",d="day",m="week",g="month",v="quarter",w="year",x="date",C="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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,B={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(L){var K=["th","st","nd","rd"],W=L%100;return"["+L+(K[(W-20)%10]||K[W]||K[0])+"]"}},k=function(L,K,W){var G=String(L);return!G||G.length>=K?L:""+Array(K+1-G.length).join(W)+L},N={s:k,z:function(L){var K=-L.utcOffset(),W=Math.abs(K),G=Math.floor(W/60),ne=W%60;return(K<=0?"+":"-")+k(G,2,"0")+":"+k(ne,2,"0")},m:function L(K,W){if(K.date()<W.date())return-L(W,K);var G=12*(W.year()-K.year())+(W.month()-K.month()),ne=K.clone().add(G,g),q=W-ne<0,J=K.clone().add(G+(q?-1:1),g);return+(-(G+(W-ne)/(q?ne-J:J-ne))||0)},a:function(L){return L<0?Math.ceil(L)||0:Math.floor(L)},p:function(L){return{M:g,y:w,w:m,d,D:x,h:f,m:u,s:c,ms:i,Q:v}[L]||String(L||"").toLowerCase().replace(/s$/,"")},u:function(L){return L===void 0}},F="en",R={};R[F]=B;var S="$isDayjsObject",z=function(L){return L instanceof X||!(!L||!L[S])},O=function L(K,W,G){var ne;if(!K)return F;if(typeof K=="string"){var q=K.toLowerCase();R[q]&&(ne=q),W&&(R[q]=W,ne=q);var J=K.split("-");if(!ne&&J.length>1)return L(J[0])}else{var me=K.name;R[me]=K,ne=me}return!G&&ne&&(F=ne),ne||!G&&F},V=function(L,K){if(z(L))return L.clone();var W=typeof K=="object"?K:{};return W.date=L,W.args=arguments,new X(W)},I=N;I.l=O,I.i=z,I.w=function(L,K){return V(L,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var X=(function(){function L(W){this.$L=O(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[S]=!0}var K=L.prototype;return K.parse=function(W){this.$d=(function(G){var ne=G.date,q=G.utc;if(ne===null)return new Date(NaN);if(I.u(ne))return new Date;if(ne instanceof Date)return new Date(ne);if(typeof ne=="string"&&!/Z$/i.test(ne)){var J=ne.match(p);if(J){var me=J[2]-1||0,Ce=(J[7]||"0").substring(0,3);return q?new Date(Date.UTC(J[1],me,J[3]||1,J[4]||0,J[5]||0,J[6]||0,Ce)):new Date(J[1],me,J[3]||1,J[4]||0,J[5]||0,J[6]||0,Ce)}}return new Date(ne)})(W),this.init()},K.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},K.$utils=function(){return I},K.isValid=function(){return this.$d.toString()!==C},K.isSame=function(W,G){var ne=V(W);return this.startOf(G)<=ne&&ne<=this.endOf(G)},K.isAfter=function(W,G){return V(W)<this.startOf(G)},K.isBefore=function(W,G){return this.endOf(G)<V(W)},K.$g=function(W,G,ne){return I.u(W)?this[G]:this.set(ne,W)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(W,G){var ne=this,q=!!I.u(G)||G,J=I.p(W),me=function(de,Ee){var Ne=I.w(ne.$u?Date.UTC(ne.$y,Ee,de):new Date(ne.$y,Ee,de),ne);return q?Ne:Ne.endOf(d)},Ce=function(de,Ee){return I.w(ne.toDate()[de].apply(ne.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(Ee)),ne)},we=this.$W,Fe=this.$M,Ie=this.$D,Q="set"+(this.$u?"UTC":"");switch(J){case w:return q?me(1,0):me(31,11);case g:return q?me(1,Fe):me(0,Fe+1);case m:var le=this.$locale().weekStart||0,ce=(we<le?we+7:we)-le;return me(q?Ie-ce:Ie+(6-ce),Fe);case d:case x:return Ce(Q+"Hours",0);case f:return Ce(Q+"Minutes",1);case u:return Ce(Q+"Seconds",2);case c:return Ce(Q+"Milliseconds",3);default:return this.clone()}},K.endOf=function(W){return this.startOf(W,!1)},K.$set=function(W,G){var ne,q=I.p(W),J="set"+(this.$u?"UTC":""),me=(ne={},ne[d]=J+"Date",ne[x]=J+"Date",ne[g]=J+"Month",ne[w]=J+"FullYear",ne[f]=J+"Hours",ne[u]=J+"Minutes",ne[c]=J+"Seconds",ne[i]=J+"Milliseconds",ne)[q],Ce=q===d?this.$D+(G-this.$W):G;if(q===g||q===w){var we=this.clone().set(x,1);we.$d[me](Ce),we.init(),this.$d=we.set(x,Math.min(this.$D,we.daysInMonth())).$d}else me&&this.$d[me](Ce);return this.init(),this},K.set=function(W,G){return this.clone().$set(W,G)},K.get=function(W){return this[I.p(W)]()},K.add=function(W,G){var ne,q=this;W=Number(W);var J=I.p(G),me=function(Fe){var Ie=V(q);return I.w(Ie.date(Ie.date()+Math.round(Fe*W)),q)};if(J===g)return this.set(g,this.$M+W);if(J===w)return this.set(w,this.$y+W);if(J===d)return me(1);if(J===m)return me(7);var Ce=(ne={},ne[u]=n,ne[f]=a,ne[c]=r,ne)[J]||1,we=this.$d.getTime()+W*Ce;return I.w(we,this)},K.subtract=function(W,G){return this.add(-1*W,G)},K.format=function(W){var G=this,ne=this.$locale();if(!this.isValid())return ne.invalidDate||C;var q=W||"YYYY-MM-DDTHH:mm:ssZ",J=I.z(this),me=this.$H,Ce=this.$m,we=this.$M,Fe=ne.weekdays,Ie=ne.months,Q=ne.meridiem,le=function(Ee,Ne,ge,De){return Ee&&(Ee[Ne]||Ee(G,q))||ge[Ne].slice(0,De)},ce=function(Ee){return I.s(me%12||12,Ee,"0")},de=Q||function(Ee,Ne,ge){var De=Ee<12?"AM":"PM";return ge?De.toLowerCase():De};return q.replace(A,(function(Ee,Ne){return Ne||(function(ge){switch(ge){case"YY":return String(G.$y).slice(-2);case"YYYY":return I.s(G.$y,4,"0");case"M":return we+1;case"MM":return I.s(we+1,2,"0");case"MMM":return le(ne.monthsShort,we,Ie,3);case"MMMM":return le(Ie,we);case"D":return G.$D;case"DD":return I.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return le(ne.weekdaysMin,G.$W,Fe,2);case"ddd":return le(ne.weekdaysShort,G.$W,Fe,3);case"dddd":return Fe[G.$W];case"H":return String(me);case"HH":return I.s(me,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return de(me,Ce,!0);case"A":return de(me,Ce,!1);case"m":return String(Ce);case"mm":return I.s(Ce,2,"0");case"s":return String(G.$s);case"ss":return I.s(G.$s,2,"0");case"SSS":return I.s(G.$ms,3,"0");case"Z":return J}return null})(Ee)||J.replace(":","")}))},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(W,G,ne){var q,J=this,me=I.p(G),Ce=V(W),we=(Ce.utcOffset()-this.utcOffset())*n,Fe=this-Ce,Ie=function(){return I.m(J,Ce)};switch(me){case w:q=Ie()/12;break;case g:q=Ie();break;case v:q=Ie()/3;break;case m:q=(Fe-we)/6048e5;break;case d:q=(Fe-we)/864e5;break;case f:q=Fe/a;break;case u:q=Fe/n;break;case c:q=Fe/r;break;default:q=Fe}return ne?q:I.a(q)},K.daysInMonth=function(){return this.endOf(g).$D},K.$locale=function(){return R[this.$L]},K.locale=function(W,G){if(!W)return this.$L;var ne=this.clone(),q=O(W,G,!0);return q&&(ne.$L=q),ne},K.clone=function(){return I.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()},L})(),Z=X.prototype;return V.prototype=Z,[["$ms",i],["$s",c],["$m",u],["$H",f],["$W",d],["$M",g],["$y",w],["$D",x]].forEach((function(L){Z[L[1]]=function(K){return this.$g(K,L[0],L[1])}})),V.extend=function(L,K){return L.$i||(L(K,X,V),L.$i=!0),V},V.locale=O,V.isDayjs=z,V.unix=function(L){return V(1e3*L)},V.en=R[F],V.Ls=R,V.p={},V}))})(g0)),g0.exports}var t9=e9();const r9=vi(t9),bu=({src:e,index:t,token:r,url:n,eventsEmit:a,...i})=>{const[c,u]=$t(""),f=async g=>{try{const v=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify({convertedFilePath:g})});if(!v.ok)throw new Error(`Fetch failed: ${v.status}`);return{data:await v.arrayBuffer()}}catch{return null}},d=async g=>{const v=await f(g);if(!v)return;const w=new Blob([v.data]);return window.URL.createObjectURL(w)},m=async g=>{const v=await d(g);u(v||"")};return sr(()=>{try{if(!r||!n){u(e);return}m(e)}catch{u(e)}},[e]),H.jsx(H.Fragment,{children:c&&H.jsx(a1,{src:c,...i,preview:!1,onClick:()=>a&&a("imageClick",c)},t||1)})},n9=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_5260_38039)"},T.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"}),T.createElement("path",{d:"M6 7.99984L7.33333 9.33317L10 6.6665",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_5260_38039"},T.createElement("rect",{width:16,height:16,fill:"white"})))),a9=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.createElement("path",{d:"M8 6V8.66667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M8 11.3335H8.00667",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),Bp=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),o9=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_5260_38091)"},T.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"}),T.createElement("path",{d:"M10 6L6 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M6 6L10 10",stroke:"white",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_5260_38091"},T.createElement("rect",{width:16,height:16,fill:"white"})))),i9=qe.div.attrs({className:"thought-chain-section-wrapper"})`
|
|
1121
|
+
padding: 12px 0 8px 0;
|
|
1122
|
+
`,s9=qe.div.attrs({className:"thought-chain-section-title-row"})`
|
|
1123
|
+
display: flex;
|
|
1124
|
+
align-items: center;
|
|
1125
|
+
gap: 8px;
|
|
1126
|
+
margin-bottom: 8px;
|
|
1127
|
+
padding-left: 20px;
|
|
1128
|
+
`,l9=ng`
|
|
1129
|
+
from {
|
|
1130
|
+
transform: rotate(0deg);
|
|
1131
|
+
}
|
|
1132
|
+
to {
|
|
1133
|
+
transform: rotate(360deg);
|
|
1134
|
+
}
|
|
1135
|
+
`,u9=qe.div.attrs({className:"thought-chain-section-icon"})`
|
|
1136
|
+
width: 16px;
|
|
1137
|
+
height: 16px;
|
|
1138
|
+
flex-shrink: 0;
|
|
1139
|
+
display: flex;
|
|
1140
|
+
align-items: center;
|
|
1141
|
+
justify-content: center;
|
|
1142
|
+
|
|
1143
|
+
svg {
|
|
1144
|
+
width: 100%;
|
|
1145
|
+
height: 100%;
|
|
1146
|
+
${({$isRotating:e})=>e?Ks`
|
|
1147
|
+
animation: ${l9} 2s linear infinite;
|
|
1148
|
+
`:""}
|
|
1149
|
+
}
|
|
1150
|
+
`,c9=qe.div.attrs({className:"thought-chain-section-title"})`
|
|
1151
|
+
font-size: 14px;
|
|
1152
|
+
font-weight: 600;
|
|
1153
|
+
color: #111827;
|
|
1154
|
+
display: flex;
|
|
1155
|
+
align-items: center;
|
|
1156
|
+
gap: 6px;
|
|
1157
|
+
`,d9=qe.span.attrs({className:"thought-chain-section-time"})`
|
|
1158
|
+
font-size: 12px;
|
|
1159
|
+
font-weight: 400;
|
|
1160
|
+
color: #6b7280;
|
|
1161
|
+
`,f9=qe.span.attrs({className:"thought-chain-node-step-time"})`
|
|
1162
|
+
font-size: 12px;
|
|
1163
|
+
font-weight: 400;
|
|
1164
|
+
color: #6b7280;
|
|
1165
|
+
flex-shrink: 0;
|
|
1166
|
+
align-self: flex-start;
|
|
1167
|
+
padding-top: 2px;
|
|
1168
|
+
`,h9=qe.div.attrs({className:"thought-chain-vertical-line"})`
|
|
1169
|
+
position: absolute;
|
|
1170
|
+
left: 10px;
|
|
1171
|
+
top: 0;
|
|
1172
|
+
bottom: 0;
|
|
1173
|
+
width: 2px;
|
|
1174
|
+
background: #e5e7eb;
|
|
1175
|
+
z-index: 0;
|
|
1176
|
+
`,p9=qe.div.attrs({className:"thought-chain-content-container"})`
|
|
1177
|
+
position: relative;
|
|
1178
|
+
padding-left: 0px;
|
|
1179
|
+
margin-left:18px
|
|
1180
|
+
`,m9=qe.div.attrs({className:"thought-chain-node-item"})`
|
|
1181
|
+
display: flex;
|
|
1182
|
+
align-items: flex-start;
|
|
1183
|
+
gap: 12px;
|
|
1184
|
+
padding: 8px 0;
|
|
1185
|
+
position: relative;
|
|
1186
|
+
`,g9=qe.div.attrs({className:"thought-chain-node-content-area"})`
|
|
1187
|
+
flex: 1;
|
|
1188
|
+
margin-left: 20px;
|
|
1189
|
+
display: flex;
|
|
1190
|
+
flex-direction: column;
|
|
1191
|
+
gap: 4px;
|
|
1192
|
+
`,Fp=qe.div.attrs({className:"thought-chain-content-text-wrapper"})`
|
|
1193
|
+
font-size: 13px;
|
|
1194
|
+
line-height: 1.6;
|
|
1195
|
+
color: #374151;
|
|
1196
|
+
opacity: 0.7;
|
|
1197
|
+
`,v9=qe.div.attrs({className:"thought-chain-loading-text"})`
|
|
1198
|
+
font-size: 13px;
|
|
1199
|
+
line-height: 1.6;
|
|
1200
|
+
color: #9ca3af;
|
|
1201
|
+
font-style: italic;
|
|
1202
|
+
padding-left: 15px;
|
|
1203
|
+
`;function b9(e){switch(e){case 1:return{label:"\u8FD0\u884C\u4E2D",color:"#2563eb",icon:Bp,isRotating:!0};case 2:return{label:"\u6267\u884C\u5B8C\u6210",color:"#16a34a",icon:n9,isRotating:!1};case 3:return{label:"\u6267\u884C\u5931\u8D25",color:"#dc2626",icon:o9,isRotating:!1};case 4:return{label:"\u5F02\u5E38",color:"#f97316",icon:a9,isRotating:!1};default:return{label:"\u672A\u77E5",color:"#9ca3af",icon:Bp,isRotating:!1}}}const yu=({title:e,content:t,nodes:r,mode:n="history"})=>{var m;if(!r||r.length===0)return null;const a=r.reduce((g,v)=>{const w=v.respTime;return g+(typeof w=="number"&&w>0?w:0)},0),i=a>0?`\xB7 ${(a/1e3).toFixed(2)} \u79D2`:"",c=g=>typeof g!="number"||g<=0?"":`${(g/1e3).toFixed(2)} \u79D2`,u=((m=r[0])==null?void 0:m.nodeStatus)??3,f=b9(u),d=f.icon;return H.jsxs(i9,{children:[H.jsxs(s9,{children:[H.jsx(u9,{$isRotating:f.isRotating,children:H.jsx(d,{})}),H.jsxs(c9,{children:[e,i&&H.jsx(d9,{children:i})]})]}),H.jsxs(p9,{children:[H.jsx(h9,{}),r.map(g=>{var x,C,p,A,B,k;const v=((x=g==null?void 0:g.rawContent)==null?void 0:x.type)==="markdown"||((p=(C=g==null?void 0:g.rawContent)==null?void 0:C.reply)==null?void 0:p.type)==="markdown"||(g==null?void 0:g.format)==="markdown"||((A=g.content)==null?void 0:A.includes("```"))||((B=g.content)==null?void 0:B.includes("**"))||((k=g.content)==null?void 0:k.includes("##")),w=g.nodeStatus===1&&!g.content;return H.jsx(m9,{children:H.jsxs(g9,{children:[r.length>1&&c(g.respTime)&&H.jsxs(f9,{children:["\u7528\u65F6 ",c(g.respTime)]}),w?H.jsx(v9,{children:"\u601D\u8003\u4E2D..."}):g.content&&(v?H.jsx(Fp,{children:H.jsx(qs,{dataSource:{type:di.MARKDOWN,content:g.content},styles:{text:{fontSize:"14px",lineHeight:"1.6",color:"#374151"}},theme:{baseFontSize:14,minHeight:"auto"}})}):H.jsx(Fp,{className:"px-[15px]",children:g.content}))]})},g.id)})]})]})};function fo(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 y9(e){return!Array.isArray(e)||e.length===0?[]:e.map((t,r)=>{var u,f;const n=t.businessType||"plan",a=t.nodeStatus||1,i=t.content||((u=t==null?void 0:t.reply)==null?void 0:u.content)||"",c=(t==null?void 0:t.type)||((f=t==null?void 0:t.reply)==null?void 0:f.type);return{id:`${n}-${r}`,businessType:n,nodeStatus:a,title:fo(n,a),content:i,...c?{format:c}:{},rawContent:t,respTime:t.respTime??t.chainRespTime??void 0}})}function pD(e,t){var f,d,m;const r=t.businessType;if(!r)return e;const n=[...e],a=n.findIndex(g=>g.businessType===r),i=((f=t.reply)==null?void 0:f.content)??"",c=t.nodeStatus!==void 0&&t.nodeStatus!==null?t.nodeStatus:a!==-1?(d=n[a])==null?void 0:d.nodeStatus:1,u=t.respTime??t.chainRespTime??((m=n[a])==null?void 0:m.respTime);if(a===-1)n.push({id:`${r}-0`,businessType:r,nodeStatus:c,title:fo(r,c),content:i,rawContent:t,respTime:u});else{const g=n[a];n[a]={...g,nodeStatus:c,title:fo(r,c),content:g.content+i,respTime:u??g.respTime,rawContent:{...g.rawContent,lastChunk:t}}}return n}const x9="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAABCcAAAQnAEmzTo0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANzSURBVHgBlVbtUeMwEN2Vk5m7HwemgjMVwFVwUAAQKiAUcBAqwKmArwIIFRCgAKACoALcASEwcz/A2ntrSY5InB+nGU9sabX79PT0FKaodXrjjght4TXFM7KW7pOkfTc8/l5QQ+v0JC3LcdcYXtE5QlyIlaebs4VBiGEX+Dez8nlJIqtNiZhpwNzuh0IaL/JxCDBdam6FMe11ja8KbO2PLxHcYZLCGu4nQEIkqbXSQfodP2kkIv2EE7Fkc0WM+BGqDy1jpW4OCgsKcwZQd1cnC+vc6b2vWmsfNDkbi6pLxVcaXjJrTR4V8k1OjLE54kdT8anY5FkAANStGyrLtSqc6Go6uTbtuz5d7CqiiLIh+nrTyX38SEgu9L0sJTPR2ExwaJt7b8r3mlLCFVXU2fjz2qP5beSAoECZsP/gn02RuqFYX17FCB9YQwc+/kjpbZqDMVUVgaJHk1A51A9FpfxNB0Mt5+Edm3nOls4nY/aoqQDo9oXLR6OceX6hGtObIH9bg7pulZoJNCmqpy5Aa5t742e3Stc2euMuKlQq0v3jkAySvMXryJhymWx7B1I8rvNWCjO7w+Mfdy7+BXI0tyrHiJjcmNaFlY9bLaAK0ngOw+EskNug1CXGhnq5heTxCj2ouBV4FP0AZ2BXO2oVMZe7HCXXpMJBWZ+PNNPqvkJj/XumAJGrH6LqAiUlHfHJHb+yz1J/p7MF2lkcGw0gtpV9KaCbhGSHPrwP/RZKVyhopbU/nR70bAXUwWb0dPuxy6DIluv4VBvw3C3mGBwQJee1gkR62KMUMr2qUMFxgbobiqlimO3uFVSDuBWd5xWZV5u8uT9+djtfLsd2AfvuwtmOpJEiry7h/jCy51iR16cLSxw6QMsj0P+aTrK595oj1aFHqodyNLFp6cOT8uk54fxUZlfCYh0LdN+EUhNocf8J2XprAfqm5C6XPOmvml0rKeH7XDE11+zA7zZJ8uCQCwVrp/mt0ex+z4//RsJ6oXiE1fn4RvMBTcyO4wsCSzu4OVusLULvXGvfIVFRRaSVFFkp4Myh5GO1h/jO3t573ynJDsIqnRfB20GTc0bwzeAZl0YKqJEduxuMnCnmX264yZyMvD8FsDxBC0n6+7SehwsGK7swxgxnvchdpUiwhV1J4zlWqB+Y4Gn+3CUietyLeX9X/mfOP1bpFRs68mWiAAAAAElFTkSuQmCC",w9=qe.div.attrs({className:"thought-chain-card-wrapper"})`
|
|
1204
|
+
width: 100%;
|
|
1205
|
+
border-radius: 8px;
|
|
1206
|
+
background-color: #f9fafb;
|
|
1207
|
+
padding: 12px 16px;
|
|
1208
|
+
box-sizing: border-box;
|
|
1209
|
+
`,C9=qe.div.attrs({className:"thought-chain-card-header"})`
|
|
1210
|
+
display: flex;
|
|
1211
|
+
align-items: center;
|
|
1212
|
+
justify-content: space-between;
|
|
1213
|
+
cursor: pointer;
|
|
1214
|
+
padding: 4px 0;
|
|
1215
|
+
`,D9=qe.div.attrs({className:"thought-chain-card-header-left"})`
|
|
1216
|
+
display: flex;
|
|
1217
|
+
align-items: center;
|
|
1218
|
+
gap: 8px;
|
|
1219
|
+
flex: 1;
|
|
1220
|
+
`,k9=ng`
|
|
1221
|
+
from {
|
|
1222
|
+
transform: rotate(0deg);
|
|
1223
|
+
}
|
|
1224
|
+
to {
|
|
1225
|
+
transform: rotate(360deg);
|
|
1226
|
+
}
|
|
1227
|
+
`,E9=qe.div.attrs({className:"thought-chain-card-avatar"})`
|
|
1228
|
+
width: 25px;
|
|
1229
|
+
height: 25px;
|
|
1230
|
+
border-radius: 9999px;
|
|
1231
|
+
display: flex;
|
|
1232
|
+
align-items: center;
|
|
1233
|
+
justify-content: center;
|
|
1234
|
+
flex-shrink: 0;
|
|
1235
|
+
overflow: hidden;
|
|
1236
|
+
|
|
1237
|
+
img {
|
|
1238
|
+
width: 80%;
|
|
1239
|
+
height: 80%;
|
|
1240
|
+
object-fit: contain;
|
|
1241
|
+
${({$isRotating:e})=>e?Ks`
|
|
1242
|
+
animation: ${k9} 2s linear infinite;
|
|
1243
|
+
`:""}
|
|
1244
|
+
}
|
|
1245
|
+
`,S9=qe.div.attrs({className:"thought-chain-card-header-title"})`
|
|
1246
|
+
display: flex;
|
|
1247
|
+
align-items: center;
|
|
1248
|
+
gap: 6px;
|
|
1249
|
+
`,A9=qe.span.attrs({className:"thought-chain-card-header-main-text"})`
|
|
1250
|
+
font-size: 14px;
|
|
1251
|
+
font-weight: 600;
|
|
1252
|
+
color: #111827;
|
|
1253
|
+
`,Np=qe.span.attrs({className:"thought-chain-card-header-sub-text"})`
|
|
1254
|
+
font-size: 14px;
|
|
1255
|
+
color: #6b7280;
|
|
1256
|
+
`,B9=qe.div.attrs({className:"thought-chain-card-header-right"})`
|
|
1257
|
+
display: flex;
|
|
1258
|
+
align-items: center;
|
|
1259
|
+
flex-shrink: 0;
|
|
1260
|
+
`,F9=qe.div.attrs({className:"thought-chain-card-body"})`
|
|
1261
|
+
margin-top: 12px;
|
|
1262
|
+
display: flex;
|
|
1263
|
+
flex-direction: column;
|
|
1264
|
+
gap: 0;
|
|
1265
|
+
`,N9=qe.div.attrs({className:"thought-chain-card-empty-text"})`
|
|
1266
|
+
font-size: 12px;
|
|
1267
|
+
color: #9ca3af;
|
|
1268
|
+
`,T9=({nodes:e,mode:t="history",status:r,simpleThinkOnly:n=!1,chainRespTime:a})=>{const[i,c]=$t(!1),u=xt(()=>{const x={};return(e||[]).forEach(C=>{x[C.businessType]||(x[C.businessType]=[]),x[C.businessType].push(C)}),x},[e]),f=xt(()=>typeof r=="number"?r===4:t==="live"?e.some(x=>x.nodeStatus===1):!1,[t,r,e]),d=xt(()=>!e||e.length===0?!1:t==="history"?e.every(x=>x.nodeStatus===2):e.every(x=>x.nodeStatus===2),[e,t]),m=xt(()=>f?"\u6B63\u5728\u601D\u8003\u4E2D":d?"\u601D\u8003\u5B8C\u6210":e&&e.length>0&&!d?"\u6B63\u5728\u601D\u8003\u4E2D":"",[f,d,e]),g=xt(()=>f?"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406":d?"":"\u6A21\u578B\u6B63\u5728\u8FDB\u884C\u5206\u6B65\u63A8\u7406",[f,d]),v=e&&e.length>0,w=xt(()=>!a||a<=0?"":`\xB7 ${(a/1e3).toFixed(2)} \u79D2`,[a]);return H.jsxs(w9,{"data-mode":t,children:[H.jsxs(C9,{onClick:()=>c(x=>!x),children:[H.jsxs(D9,{children:[H.jsx(E9,{$isRotating:f,children:H.jsx("img",{src:x9,alt:"thinking"})}),H.jsxs(S9,{children:[H.jsx(A9,{children:m}),w&&d&&H.jsxs(Np,{children:["\u603B\u8BA1\u7528\u65F6",w]}),g&&H.jsxs(Np,{children:["\xB7 ",g]})]})]}),H.jsx(B9,{children:i?H.jsx(Ko,{size:18,color:"#6b7280"}):H.jsx(qo,{size:18,color:"#6b7280"})})]}),!i&&H.jsxs(F9,{children:[!v&&H.jsx(N9,{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(yu,{title:fo("plan",u.plan[0].nodeStatus),nodes:u.plan,mode:t}),u.retrieve&&u.retrieve.length>0&&H.jsx(yu,{title:fo("retrieve",u.retrieve[0].nodeStatus),nodes:u.retrieve,mode:t}),u.think&&u.think.length>0&&H.jsx(yu,{title:fo("think",u.think[0].nodeStatus),nodes:u.think,mode:t})]})]})},O9=({data:e,styles:t,onCategoryClick:r,onViewAllClick:n,className:a,style:i,showCategoryIcon:c=!0,renderCategoryIcon:u})=>{const f=(t==null?void 0:t.theme)||{},d=x=>{r==null||r(x)},m=()=>{e.viewAllPath&&(typeof e.viewAllPath=="function"?e.viewAllPath():window.open(e.viewAllPath,"_blank")),n==null||n()},g=x=>{const C=(x||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(C)?"rag/pic":C==="pdf"?"rag/pdf":C==="ofd"?"rag/ofd":["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"},v=x=>{if(u)return u(x);if(c){if(x.itemType==="dir")return H.jsx(ta,{type:"rag/folder",size:16});if(x.itemType==="file"&&x.fileType){const C=g(x.fileType);return H.jsx(ta,{type:C,size:16})}return H.jsx(ta,{type:"rag/folder",size:16})}return null},w=e.categories.filter(x=>x.visible!==!1);return!w||w.length===0?null:H.jsxs(M9,{className:`knowledge-base-document-list ${a||""}`,style:i,$theme:f,children:[H.jsx(R9,{children:e.title}),e.subtitle&&H.jsxs($9,{children:[e.subtitle," (\u5171",e.totalCount,"\u4E2A):"]}),H.jsx(P9,{children:w.map((x,C)=>H.jsxs(I9,{onClick:()=>d(x),$theme:f,children:[v(x),H.jsx(_9,{children:x.name}),x.itemType==="dir"&&H.jsxs(z9,{children:["(",x.documentCount,")"]})]},x.id||C))}),e.showViewAll!==!1&&H.jsx(j9,{onClick:m,$theme:f,children:e.viewAllText||"\u67E5\u770B\u5168\u90E8>>"})]})},M9=qe.div.attrs({className:"knowledge-base-document-list-container"})`
|
|
1269
|
+
margin-bottom: 16px;
|
|
1270
|
+
padding: 16px;
|
|
1271
|
+
margin-left:25px;
|
|
1272
|
+
|
|
1273
|
+
background: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1274
|
+
border-radius: 8px;
|
|
1275
|
+
`,R9=qe.h3.attrs({className:"knowledge-base-document-list-title"})`
|
|
1276
|
+
font-size: 18px;
|
|
1277
|
+
font-weight: 600;
|
|
1278
|
+
color: #1f2937;
|
|
1279
|
+
margin: 0 0 8px 0;
|
|
1280
|
+
`,$9=qe.div.attrs({className:"knowledge-base-document-list-subtitle"})`
|
|
1281
|
+
font-size: 14px;
|
|
1282
|
+
color: #6b7280;
|
|
1283
|
+
margin-bottom: 12px;
|
|
1284
|
+
`,P9=qe.div.attrs({className:"knowledge-base-document-list-category-list"})`
|
|
1285
|
+
display: flex;
|
|
1286
|
+
flex-direction: column;
|
|
1287
|
+
gap: 8px;
|
|
1288
|
+
margin-bottom: 12px;
|
|
1289
|
+
`,I9=qe.div.attrs({className:"knowledge-base-document-list-category-item"})`
|
|
1290
|
+
display: flex;
|
|
1291
|
+
align-items: center;
|
|
1292
|
+
gap: 8px;
|
|
1293
|
+
padding: 8px 0;
|
|
1294
|
+
cursor: pointer;
|
|
1295
|
+
transition: all 0.2s ease;
|
|
1296
|
+
|
|
1297
|
+
&:hover {
|
|
1298
|
+
opacity: 0.8;
|
|
1299
|
+
}
|
|
1300
|
+
`,_9=qe.span.attrs({className:"knowledge-base-document-list-category-name"})`
|
|
1301
|
+
font-size: 14px;
|
|
1302
|
+
color: #1f2937;
|
|
1303
|
+
`,z9=qe.span.attrs({className:"knowledge-base-document-list-category-count"})`
|
|
1304
|
+
font-size: 14px;
|
|
1305
|
+
color: #6b7280;
|
|
1306
|
+
`,j9=qe.a.attrs({className:"knowledge-base-document-list-view-all"})`
|
|
1307
|
+
display: inline-block;
|
|
1308
|
+
font-size: 14px;
|
|
1309
|
+
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1310
|
+
text-decoration: none;
|
|
1311
|
+
cursor: pointer;
|
|
1312
|
+
transition: color 0.2s ease;
|
|
1313
|
+
|
|
1314
|
+
&:hover {
|
|
1315
|
+
color: ${({$theme:e})=>{var t;return((t=e==null?void 0:e.colors)==null?void 0:t.primary)||"#2563eb"}};
|
|
1316
|
+
text-decoration: underline;
|
|
1317
|
+
}
|
|
1318
|
+
`;function L9(e,t){const[r,n]=$t(()=>H9(e,t));return sr(()=>{if(e==="desktop"){n(!1);return}if(e==="mobile"){n(!0);return}if(typeof window>"u")return;const a=window.matchMedia(`(max-width: ${Math.max(0,t-1)}px)`),i=()=>n(a.matches);return i(),a.addEventListener("change",i),()=>a.removeEventListener("change",i)},[e,t]),r}function H9(e,t){return e==="desktop"?!1:e==="mobile"?!0:typeof window>"u"?!1:window.matchMedia(`(max-width: ${Math.max(0,t-1)}px)`).matches}function xu(e,t,r=18){var c;const n=(e||"").toLowerCase(),a=((c=t==null?void 0:t.theme)==null?void 0:c.icons)||{},i=(u,f,d)=>{const m=[u,...d||[]];for(const g of m){const v=a[g];if(v){if(We.isValidElement(v))return v;if(typeof v=="string")return H.jsx("img",{src:v,alt:g,style:{width:r,height:r}})}}return H.jsx(ta,{type:f,size:r})};return["png","jpg","jpeg","gif","bmp","webp","svg","ico"].includes(n)?i("image","rag/pic",["png","jpg","jpeg"]):n==="pdf"?i("pdf","rag/pdf"):n==="ofd"?i("ofd","rag/ofd"):["doc","docx"].includes(n)?i("docx","rag/word",["doc"]):["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(n)?i("sheets","rag/excel",["excel","xls","xlsx"]):n==="csv"?i("csv","rag/csv",["sheets","excel"]):["ppt","pptx"].includes(n)?i("pptx","rag/ppt",["ppt"]):n==="txt"||n==="md"?i("txt","rag/txt",["md"]):["zip","rar","7z"].includes(n)?i("archive","rag/zip",["zip","rar"]):["odt","ods","odp","odf"].includes(n)?i("odt","rag/odf"):["html","htm","url"].includes(n)?i("html","rag/url",["htm","url"]):n==="json"?i("json","rag/json"):H.jsx(ta,{type:"rag/file",size:r})}function Tp(e){const t=e.replace(/"pk":\s*(\d+)/g,'"pk":"$1"').replace(/"order_num":\s*(\d+)/g,'"order_num":"$1"').replace(/"related_pk":\s*(\d+)/g,'"related_pk":"$1"');return JSON.parse(t)}function Pa(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Pa(r.children)));return t}function K9(e){const t=[],r=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g;let n;for(;n=r.exec(e);){const i=n[1].split(";").map(c=>c.trim()).filter(Boolean);t.push(...i)}const a=/\[retrive-tag[^\]]*image_urls=['"]([^'"]+)['"][^\]]*\]\[[^\]]+\]\[\/retrive-tag\]/g;for(;n=a.exec(e);){const i=n[1].split(";").map(c=>c.trim()).filter(Boolean);t.push(...i)}return Array.from(new Set(t))}function eo(e){if(e==null)return null;const t=Number(e);return Number.isNaN(t)?null:t}function q9(e){return t=>{if(!t||typeof e!="string")return!1;try{return new RegExp(`\\[retrive-tag[^\\]]*id=['"]${String(t)}['"][^\\]]*\\]\\[[^\\]]+\\]\\[\\/retrive-tag\\]`,"g").test(e)}catch{return!1}}}function Ma(e){const t=new Map;return(e||[]).forEach(r=>{if(!(r!=null&&r.id))return;const n=String(r.id);if(!t.has(n)){t.set(n,r);return}const a=t.get(n),i=Number(r==null?void 0:r.index)||0,c=Number(a==null?void 0:a.index)||0;(i<c||i===c&&!(a!=null&&a.index))&&t.set(n,r)}),Array.from(t.values())}function V9(e){const t=[];let r=1;const n=a=>{a.forEach(i=>{(i==null?void 0:i.type)==="retrieve-sql-data"&&(i!=null&&i.id)&&t.push({id:String(i.id),index:r++}),Array.isArray(i==null?void 0:i.children)&&i.children.length&&n(i.children)})};return Array.isArray(e)&&e.length&&n(e),t}const W9=qe.div.attrs({className:"chat-message-container"})`
|
|
1319
|
+
display: flex;
|
|
1320
|
+
flex-direction: column;
|
|
1321
|
+
margin-bottom: 0.5rem;
|
|
1322
|
+
animation: fadeIn 0.3s ease-in-out;
|
|
1323
|
+
width: 100%;
|
|
1324
|
+
text-wrap: wrap;
|
|
1325
|
+
|
|
1326
|
+
${e=>e.$isMobile&&`
|
|
1327
|
+
word-break: break-word;
|
|
1328
|
+
overflow-wrap: anywhere;
|
|
1329
|
+
& pre,
|
|
1330
|
+
& code,
|
|
1331
|
+
& table {
|
|
1332
|
+
max-width: 100%;
|
|
1333
|
+
overflow-x: auto;
|
|
1334
|
+
}
|
|
1335
|
+
`}
|
|
1336
|
+
|
|
1337
|
+
${e=>e.$align==="right"&&`
|
|
1338
|
+
align-items: flex-end;
|
|
1339
|
+
`}
|
|
1340
|
+
|
|
1341
|
+
${e=>e.$align==="center"&&`
|
|
1342
|
+
align-items: center;
|
|
1343
|
+
`}
|
|
1344
|
+
|
|
1345
|
+
@keyframes fadeIn {
|
|
1346
|
+
from {
|
|
1347
|
+
opacity: 0;
|
|
1348
|
+
transform: translateY(10px);
|
|
1349
|
+
}
|
|
1350
|
+
to {
|
|
1351
|
+
opacity: 1;
|
|
1352
|
+
transform: translateY(0);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
`,U9=qe.div.attrs({className:"chat-message-header"})`
|
|
1356
|
+
display: flex;
|
|
1357
|
+
align-items: center;
|
|
1358
|
+
gap: 0.25rem;
|
|
1359
|
+
margin-bottom: 0.5rem;
|
|
1360
|
+
width: 100%;
|
|
1361
|
+
|
|
1362
|
+
${e=>e.$isUser&&`
|
|
1363
|
+
flex-direction: row-reverse;
|
|
1364
|
+
justify-content: end;
|
|
1365
|
+
`}
|
|
1366
|
+
`,G9=qe.div.attrs({className:"chat-message-avatar"})`
|
|
1367
|
+
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
1368
|
+
border-radius: 50%;
|
|
1369
|
+
width: 2rem;
|
|
1370
|
+
height: 2rem;
|
|
1371
|
+
flex-shrink: 0;
|
|
1372
|
+
display: flex;
|
|
1373
|
+
align-items: center;
|
|
1374
|
+
justify-content: center;
|
|
1375
|
+
font-size: 1rem;
|
|
1376
|
+
`,Y9=qe.div.attrs({className:"chat-message-content"})`
|
|
1377
|
+
width: 100%;
|
|
1378
|
+
|
|
1379
|
+
/* 思考状态图标旋转动画:不要依赖宿主是否引入 Tailwind 的 keyframes(headless 场景容易缺失) */
|
|
1380
|
+
@keyframes rtext-think-spin {
|
|
1381
|
+
from {
|
|
1382
|
+
transform: rotate(0deg);
|
|
1383
|
+
}
|
|
1384
|
+
to {
|
|
1385
|
+
transform: rotate(360deg);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
.think-icon.is-spinning {
|
|
1390
|
+
display: inline-flex;
|
|
1391
|
+
align-items: center;
|
|
1392
|
+
justify-content: center;
|
|
1393
|
+
}
|
|
1394
|
+
.think-icon.is-spinning svg,
|
|
1395
|
+
.think-icon.is-spinning > * {
|
|
1396
|
+
animation: rtext-think-spin 1.2s linear infinite;
|
|
1397
|
+
transform-origin: 50% 50%;
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
.message-time {
|
|
1401
|
+
font-size: 0.75rem;
|
|
1402
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
.message-card {
|
|
1406
|
+
background: ${e=>e.$isUser?"linear-gradient(180deg, #E3ECFF 0%, #EEEBFF 100%)":"#ffffff"};
|
|
1407
|
+
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
1408
|
+
border-radius: 0.5rem;
|
|
1409
|
+
padding-top: 12px;
|
|
1410
|
+
padding-bottom: 12px;
|
|
1411
|
+
overflow: hidden;
|
|
1412
|
+
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
1413
|
+
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
1414
|
+
margin-right: ${e=>e.$isUser?e.$compact?"10px":"40px":"0"};
|
|
1415
|
+
padding: ${e=>e.$compact?"0.25rem 0.75rem":"0.25rem 1.8rem"};
|
|
1416
|
+
.message-text {
|
|
1417
|
+
width: 100%;
|
|
1418
|
+
line-height: 1.6;
|
|
1419
|
+
white-space: pre-wrap !important; /* 保留换行和空格格式,使用 !important 确保优先级 */
|
|
1420
|
+
border-radius: 0.5rem;
|
|
1421
|
+
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
1422
|
+
font-size: 0.875rem;
|
|
1423
|
+
|
|
1424
|
+
/* 确保子元素也继承 white-space 属性 */
|
|
1425
|
+
& > * {
|
|
1426
|
+
white-space: pre-wrap !important;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
`,X9=qe.div.attrs({className:"chat-message-actions-container"})`
|
|
1431
|
+
margin-top: 0.5rem;
|
|
1432
|
+
display: flex;
|
|
1433
|
+
padding: 0.5rem;
|
|
1434
|
+
align-items: center;
|
|
1435
|
+
flex-wrap: ${e=>e.$touchFriendly?"wrap":"nowrap"};
|
|
1436
|
+
|
|
1437
|
+
gap: 0.75rem;
|
|
1438
|
+
|
|
1439
|
+
button {
|
|
1440
|
+
display: flex;
|
|
1441
|
+
align-items: center;
|
|
1442
|
+
gap: 0.25rem;
|
|
1443
|
+
font-size: 0.875rem;
|
|
1444
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
1445
|
+
background: none;
|
|
1446
|
+
border: none;
|
|
1447
|
+
cursor: pointer;
|
|
1448
|
+
transition: color 0.2s;
|
|
1449
|
+
${e=>e.$touchFriendly&&`
|
|
1450
|
+
min-width: 44px;
|
|
1451
|
+
min-height: 44px;
|
|
1452
|
+
justify-content: center;
|
|
1453
|
+
`}
|
|
1454
|
+
|
|
1455
|
+
&:hover {
|
|
1456
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
&.active {
|
|
1460
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
`,Z9=qe.div.attrs({className:"chat-message-follow-up-container"})`
|
|
1464
|
+
margin-top: 1rem;
|
|
1465
|
+
padding: ${e=>e.$compact?"0 0.5rem":"0 2.9rem"};
|
|
1466
|
+
|
|
1467
|
+
border-radius: 0.5rem;
|
|
1468
|
+
|
|
1469
|
+
@keyframes followUpIn {
|
|
1470
|
+
from {
|
|
1471
|
+
opacity: 0;
|
|
1472
|
+
transform: translateY(6px);
|
|
1473
|
+
}
|
|
1474
|
+
to {
|
|
1475
|
+
opacity: 1;
|
|
1476
|
+
transform: translateY(0);
|
|
1477
|
+
}
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
.follow-up-title {
|
|
1481
|
+
font-size: 0.875rem;
|
|
1482
|
+
font-weight: 600;
|
|
1483
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1484
|
+
margin-bottom: 0.75rem;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
.follow-up-list {
|
|
1488
|
+
display: flex;
|
|
1489
|
+
flex-direction: column;
|
|
1490
|
+
gap: 0.5rem;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
.follow-up-item {
|
|
1494
|
+
width: fit-content;
|
|
1495
|
+
background: #ffffff;
|
|
1496
|
+
border: 1px solid #e5e7eb;
|
|
1497
|
+
border-radius: 0.375rem;
|
|
1498
|
+
padding: 0.75rem 1rem;
|
|
1499
|
+
cursor: pointer;
|
|
1500
|
+
transition: all 0.2s ease;
|
|
1501
|
+
text-align: left;
|
|
1502
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1503
|
+
font-size: 0.875rem;
|
|
1504
|
+
line-height: 1.4;
|
|
1505
|
+
opacity: 0;
|
|
1506
|
+
transform: translateY(6px);
|
|
1507
|
+
animation: followUpIn 280ms ease forwards;
|
|
1508
|
+
animation-play-state: running;
|
|
1509
|
+
|
|
1510
|
+
&:hover {
|
|
1511
|
+
background: #e5e7eb;
|
|
1512
|
+
border-color: #d1d5db;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
&:active {
|
|
1516
|
+
transform: translateY(1px);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
`,Wi=qe.div.attrs({className:"chat-message-reference-container"})`
|
|
1520
|
+
padding: 1rem;
|
|
1521
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1522
|
+
|
|
1523
|
+
border-radius: 0.5rem;
|
|
1524
|
+
|
|
1525
|
+
.reference-title {
|
|
1526
|
+
font-size: 0.875rem;
|
|
1527
|
+
font-weight: 600;
|
|
1528
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1529
|
+
margin-bottom: 0.75rem;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
.reference-list {
|
|
1533
|
+
display: flex;
|
|
1534
|
+
flex-direction: column;
|
|
1535
|
+
gap: 0.5rem;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
.reference-item {
|
|
1539
|
+
background: #ffffff;
|
|
1540
|
+
|
|
1541
|
+
border-radius: 0.375rem;
|
|
1542
|
+
padding: 0.75rem 0;
|
|
1543
|
+
display: flex;
|
|
1544
|
+
align-items: center;
|
|
1545
|
+
gap: 0.5rem;
|
|
1546
|
+
|
|
1547
|
+
.file-icon {
|
|
1548
|
+
width: 2rem;
|
|
1549
|
+
height: 2rem;
|
|
1550
|
+
background: #e2e8f0;
|
|
1551
|
+
border-radius: 0.25rem;
|
|
1552
|
+
display: flex;
|
|
1553
|
+
align-items: center;
|
|
1554
|
+
justify-content: center;
|
|
1555
|
+
font-size: 0.75rem;
|
|
1556
|
+
color: #64748b;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
.file-info {
|
|
1560
|
+
flex: 1;
|
|
1561
|
+
|
|
1562
|
+
.file-name {
|
|
1563
|
+
font-size: 0.875rem;
|
|
1564
|
+
font-weight: 500;
|
|
1565
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
1566
|
+
margin-bottom: 0.25rem;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
.file-meta {
|
|
1570
|
+
font-size: 0.75rem;
|
|
1571
|
+
color: #64748b;
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
.file-score {
|
|
1576
|
+
font-size: 0.75rem;
|
|
1577
|
+
color: #059669;
|
|
1578
|
+
font-weight: 500;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
`,J9=qe.div.attrs({className:"chat-message-image-preview-modal"})`
|
|
1582
|
+
position: fixed;
|
|
1583
|
+
top: 0;
|
|
1584
|
+
left: 0;
|
|
1585
|
+
right: 0;
|
|
1586
|
+
bottom: 0;
|
|
1587
|
+
background: rgba(0, 0, 0, 0.8);
|
|
1588
|
+
display: ${e=>e.$show?"flex":"none"};
|
|
1589
|
+
align-items: center;
|
|
1590
|
+
justify-content: center;
|
|
1591
|
+
z-index: 1000;
|
|
1592
|
+
cursor: pointer;
|
|
1593
|
+
|
|
1594
|
+
.modal-content {
|
|
1595
|
+
max-width: 90vw;
|
|
1596
|
+
max-height: 90vh;
|
|
1597
|
+
position: relative;
|
|
1598
|
+
cursor: default;
|
|
1599
|
+
display: flex;
|
|
1600
|
+
flex-direction: column;
|
|
1601
|
+
align-items: center;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
.modal-image {
|
|
1605
|
+
max-width: 100%;
|
|
1606
|
+
max-height: calc(90vh - 60px);
|
|
1607
|
+
object-fit: contain;
|
|
1608
|
+
border-radius: 8px;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
.modal-close {
|
|
1612
|
+
margin-top: 16px;
|
|
1613
|
+
background: rgba(255, 255, 255, 0.3);
|
|
1614
|
+
border: none;
|
|
1615
|
+
border-radius: 20px;
|
|
1616
|
+
padding: 8px 20px;
|
|
1617
|
+
display: flex;
|
|
1618
|
+
align-items: center;
|
|
1619
|
+
justify-content: center;
|
|
1620
|
+
cursor: pointer;
|
|
1621
|
+
font-size: 14px;
|
|
1622
|
+
color: #333;
|
|
1623
|
+
font-weight: 500;
|
|
1624
|
+
transition: all 0.2s ease;
|
|
1625
|
+
|
|
1626
|
+
&:hover {
|
|
1627
|
+
background: rgba(255, 255, 255, 1);
|
|
1628
|
+
transform: translateY(-1px);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
`,wu=qe.div.attrs({className:"chat-message-image-gallery-container"})`
|
|
1632
|
+
padding: 0rem 0.5rem;
|
|
1633
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1634
|
+
|
|
1635
|
+
.gallery-grid {
|
|
1636
|
+
display: grid;
|
|
1637
|
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1638
|
+
gap: 0.75rem;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
.gallery-item {
|
|
1642
|
+
position: relative;
|
|
1643
|
+
aspect-ratio: 1;
|
|
1644
|
+
border-radius: 0.375rem;
|
|
1645
|
+
overflow: hidden;
|
|
1646
|
+
cursor: pointer;
|
|
1647
|
+
transition:
|
|
1648
|
+
transform 0.2s ease,
|
|
1649
|
+
box-shadow 0.2s ease;
|
|
1650
|
+
border: 2px solid transparent;
|
|
1651
|
+
|
|
1652
|
+
&:hover {
|
|
1653
|
+
transform: translateY(-2px);
|
|
1654
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1655
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
.gallery-image {
|
|
1659
|
+
width: 100%;
|
|
1660
|
+
height: 100%;
|
|
1661
|
+
object-fit: cover;
|
|
1662
|
+
background: #f3f4f6;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
.gallery-overlay {
|
|
1666
|
+
position: absolute;
|
|
1667
|
+
bottom: 0;
|
|
1668
|
+
left: 0;
|
|
1669
|
+
right: 0;
|
|
1670
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1671
|
+
color: white;
|
|
1672
|
+
padding: 0.5rem;
|
|
1673
|
+
font-size: 0.75rem;
|
|
1674
|
+
text-align: center;
|
|
1675
|
+
opacity: 0;
|
|
1676
|
+
transition: opacity 0.2s ease;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
&:hover .gallery-overlay {
|
|
1680
|
+
opacity: 1;
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
`,mD=({token:e,streamUrl:t,is_download:r,content:n,contentType:a="plainText",align:i="left",displayStatus:c="ready",avatar:u,isUser:f=!1,userAvatar:d,aiAvatar:m,date:g,time:v,timestamp:w,showTime:x=!0,errorMessage:C,styles:p,reference:A,webReference:B,faqReference:k,databaseReference:N,graphReference:F,filePaths:R,currentFiles:S,fileManagerData:z,audioUrl:O,feedbackResult:V,queryId:I,defaultAnswer:X,isWelcome:Z=!1,isLast:L=!1,respTime:K,tokens:W,resultType:G,followUpQuestions:ne=[],tools:q={},eventsEmit:J,referenceMode:me="list",enableThoughtChain:Ce=!1,thoughtChainVersionMode:we="auto",chain:Fe,thoughtChainNodes:Ie,knowledgeBases:Q,enableCot:le,chainRespTime:ce,thoughtChainStatus:de,enablePrism:Ee=!1,renderMode:Ne="desktop",breakpoint:ge=768,dense:De=!1})=>{sr(()=>{console.log("isUser",f),console.log("isLast",L)},[L,f]);const ke=L9(Ne,ge),Be=ke||!!De,xe=As(),Se=xt(()=>{var oe,Re,pt,Xe,ae,Oe,Me,Ze,be,pe,Ke;return{colors:{primary:((oe=xe==null?void 0:xe.colors)==null?void 0:oe.primary)||"#3b82f6",background:((Re=xe==null?void 0:xe.colors)==null?void 0:Re.background)||"#ffffff",userBackground:((pt=xe==null?void 0:xe.colors)==null?void 0:pt.primary)||"#3b82f6",border:((Xe=xe==null?void 0:xe.colors)==null?void 0:Xe.border)||"#e5e7eb",text:((ae=xe==null?void 0:xe.colors)==null?void 0:ae.text)||"#374151",disabled:((Oe=xe==null?void 0:xe.colors)==null?void 0:Oe.disabled)||"#6b7280",info:((Me=xe==null?void 0:xe.colors)==null?void 0:Me.info)||"#3b82f6",warning:((Ze=xe==null?void 0:xe.colors)==null?void 0:Ze.warning)||"#f59e0b",error:((be=xe==null?void 0:xe.colors)==null?void 0:be.error)||"#ef4444",...(pe=p==null?void 0:p.theme)==null?void 0:pe.colors},icons:{aiAvatar:m||"/vite.svg",userAvatar:d||"/default-user-avatar.png",...(Ke=p==null?void 0:p.theme)==null?void 0:Ke.icons}}},[xe,p,m,d]),ze=xt(()=>{const oe=v||g||w;return!oe||!x?null:r9(oe).format("YY-MM-DD HH:mm:ss")},[v,g,w,x]),[dt,at]=$t([]),[$e,Le]=$t(null),[Ge,ht]=$t(!1),[et,nt]=$t(!1),[Ot,At]=$t(!1),[Tt,Mt]=$t(!1),[je,he]=$t(!1),ut=(oe,Re)=>{switch(console.log("handleImageClick",oe,Re),oe){case"imageClick":Le(Re);break}},Lt=xt(()=>{if(!Ce)return[];if(we==="v1")return[];if(Array.isArray(Ie)&&Ie.length)return Ie;const oe=Fe||(n==null?void 0:n.chain),Re=y9(oe);return le===0?Re.filter(pt=>pt.businessType==="think"):Re},[Ce,we,Ie,Fe,n,le]),Pt=()=>{if(Ce&&we!=="v1")return null;const oe={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:H.jsx(ta,{type:"rag/think",size:16}),spinning:!0},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:H.jsx(ta,{type:"rag/think",size:16}),spinning:!0},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(ta,{type:"rag/think",size:16}),spinning:!1}}[c]||{text:"\u5904\u7406\u4E2D...",icon:H.jsx(ta,{type:"rag/think",size:16}),spinning:!0},Re=K?`(\u7528\u65F6 ${Math.round(K/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${oe.spinning?" is-spinning":""}`,children:oe.icon}),H.jsx("div",{className:"think-title",children:oe.text}),Re&&H.jsx("div",{className:"think-time",children:Re}),lr&&H.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{he(!je)},children:H.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:je?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:H.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},Bt=()=>{if(!Ce||we==="v1"||f||!Lt.length)return null;const oe=de!==void 0?de===4?4:2:c==="ready"?2:1,Re=le===0;return H.jsx("div",{className:"thought-chain-wrapper ml-[16px] mr-[16px] mt-2",children:H.jsx(T9,{mode:a==="stream"?"live":"history",nodes:Lt,status:oe,simpleThinkOnly:Re,chainRespTime:ce})})},[Ft,Dt]=$t([]),[Ht,or]=$t(null),mr=xt(()=>{try{if(!A)return[];let oe;if(typeof A=="string")oe=JSON.parse(A);else if(Array.isArray(A))oe=A;else if(typeof A=="object")oe=[A];else return[];return Array.isArray(oe)?oe:[]}catch(oe){return console.warn("\u89E3\u6790 rawReferenceList \u5931\u8D25:",oe,A),[]}},[A]),Rt=(oe,Re)=>{var Me,Ze,be;const pt=((Me=oe==null?void 0:oe.metadata)==null?void 0:Me.source)||(oe==null?void 0:oe.file_path)||(oe==null?void 0:oe.path)||(oe==null?void 0:oe.convertedFilePath)||(oe==null?void 0:oe.parsedFilePath)||"",Xe=((Ze=oe==null?void 0:oe.metadata)==null?void 0:Ze.title)||(oe==null?void 0:oe.file_name)||"",ae=((be=oe==null?void 0:oe.metadata)==null?void 0:be.id)||(oe==null?void 0:oe.id)||(oe==null?void 0:oe.file_id)||"",Oe=mr.find(pe=>{var Qe,fe,mt;const Ke=((Qe=pe==null?void 0:pe.metadata)==null?void 0:Qe.source)||(pe==null?void 0:pe.file_path)||(pe==null?void 0:pe.path)||(pe==null?void 0:pe.convertedFilePath)||(pe==null?void 0:pe.parsedFilePath)||"",ct=((fe=pe==null?void 0:pe.metadata)==null?void 0:fe.title)||(pe==null?void 0:pe.file_name)||"",Vt=((mt=pe==null?void 0:pe.metadata)==null?void 0:mt.id)||(pe==null?void 0:pe.id)||"";return ae&&Vt&&String(ae)===String(Vt)||pt&&Ke&&Ke===pt||Xe&&ct&&ct===Xe});if(Oe){const pe=(Oe!=null&&Oe.references&&Array.isArray(Oe.references)?Oe.references:[Oe]).find(Ke=>String(Ke.order_num)===String(Re)||String(Ke.id)===String(Re));if(pe)return pe}for(const pe of mr){if(pe!=null&&pe.references&&Array.isArray(pe.references)){const Ke=pe.references.find(ct=>String(ct.order_num)===String(Re)||String(ct.id)===String(Re));if(Ke)return Ke}if(String(pe.order_num)===String(Re)||String(pe.id)===String(Re))return pe}return null},Dr=(oe,Re)=>{function pt(pe,Ke){for(const ct of pe){if(ct.references&&Array.isArray(ct.references)){const Vt=ct.references.find(Qe=>String(Qe.order_num)===String(Ke)||String(Qe.id)===String(Ke));if(Vt)return Vt}if(String(ct.order_num)===String(Ke)||String(ct.id)===String(Ke))return ct}return null}let Xe=[];try{if(A){const pe=JSON.parse(A);Xe=Array.isArray(pe)?pe:pe&&Array.isArray(pe.knowledgeRefs)?pe.knowledgeRefs:[]}}catch(pe){console.error("Failed to parse reference:",pe)}let ae=pt(Xe,oe.id),Oe=-1;if(!ae&&String(oe==null?void 0:oe.fromtype)==="10"&&k){let pe=[];try{pe=typeof k=="string"?Tp(k):k,Array.isArray(pe)||(pe=[pe])}catch{}const Ke=pe.findIndex(ct=>String((ct==null?void 0:ct.pk)??(ct==null?void 0:ct.order_num)??(ct==null?void 0:ct.id))===String(oe==null?void 0:oe.id));if(Ke>=0)ae=pe[Ke],Oe=Ke;else{const ct=Number(oe==null?void 0:oe.id);Number.isInteger(ct)&&ct>=1&&ct<=pe.length&&(ae=pe[ct-1],Oe=ct-1)}}const Me=pe=>{if(typeof n!="string")return;const Ke=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${pe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\\\/retrive-tag\\]`,"g").exec(n);if(Ke&&Ke[1]){const ct=Number(Ke[1]);return Number.isNaN(ct)?void 0:ct}};let Ze;if(String(oe==null?void 0:oe.fromtype)==="10"&&ae){const pe=Oe>=0?Oe+1:Me(String(oe==null?void 0:oe.id))??1,Ke=qt(ae,pe);Ke.tags=[{id:oe==null?void 0:oe.id,index:pe,image_urls:(oe==null?void 0:oe.imageUrls)||(oe==null?void 0:oe.image_urls)||[],metadata:(ae==null?void 0:ae.metadata)||{}}],Ze={queryId:I,knowledgeRefs:[Ke],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{faqReference:k,retriveNodes:[]}}}const be={tagInfo:{id:oe==null?void 0:oe.id,index:Me(String(oe==null?void 0:oe.id)),image_urls:(oe==null?void 0:oe.imageUrls)||(oe==null?void 0:oe.image_urls)||[]},fromtype:String((oe==null?void 0:oe.fromtype)??""),leaf:oe,attributes:Re,referenceDoc:ae||void 0,referencesPayloadSingle:Ze};if(String(oe==null?void 0:oe.fromtype)==="2"&&F){const pe=String((oe==null?void 0:oe.id)??""),Ke=Array.isArray(re)?re:[],ct=fe=>(Array.isArray(fe==null?void 0:fe.traceNodes)?fe.traceNodes:[]).find(mt=>String(mt==null?void 0:mt.id)===pe),Vt=fe=>(Array.isArray(fe==null?void 0:fe.tags)?fe.tags:[]).find(mt=>String(mt==null?void 0:mt.id)===pe);let Qe=Ke.find(fe=>!!ct(fe)||!!Vt(fe));if(!Qe){const fe=String(pe||"").split("_")[0];Qe=Ke.find(mt=>String(mt==null?void 0:mt.id)===fe)}Qe&&(be.graph={id:Qe.id,graphName:Qe.graphName,fetchUrl:Qe.fetchUrl,cyphers:Qe.cyphers},be.traceNode=ct(Qe),be.graphReference=Qe)}J==null||J("action_retrive_tag",be),J==null||J("retrive_tag:click",be)},Nr=oe=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",oe),console.log("databaseReference available:",!!N),oe.id&&N){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",N);const Re=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:oe.id,databaseReference:N}});console.log("Dispatching event:",Re),window.dispatchEvent(Re)}else console.log("Cannot send response - missing id or databaseReference")};We.useEffect(()=>{const oe=Re=>{Nr(Re.detail)};return window.addEventListener("retrieve-sql-data:request-data",oe),()=>{window.removeEventListener("retrieve-sql-data:request-data",oe)}},[N]),We.useEffect(()=>{const oe=Re=>{gn(Re.detail)};return window.addEventListener("rtext_pagination_click",oe),()=>{window.removeEventListener("rtext_pagination_click",oe)}},[Ht]);const gn=oe=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",oe),oe.replacePredataFunction&&Ht){const Re={...Ht,rows:Ht.rows};oe.replacePredataFunction(Re)}J==null||J("rtext_pagination_click",oe)},Jt=Zt(new Map),kr=Zt(1),Lr=Zt(""),Er=Zt({0:1,1:1,2:1,3:1,10:1}),cr=Zt(!1),Et=xt(()=>{if(typeof n=="string"){let oe=n;const Re=[];I&&I!==Lr.current&&(Jt.current.clear(),kr.current=1,Er.current={0:1,1:1,2:1,3:1,10:1},Lr.current=I,cr.current=!1);const pt=A===""||A==="[]"||Array.isArray(A)&&A.length===0||A==null;return a==="stream"&&pt?cr.current||(Jt.current.clear(),kr.current=1,Er.current={0:1,1:1,2:1,3:1,10:1},cr.current=!0):pt||(cr.current=!1),a==="stream"&&(oe=oe.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(Xe,ae)=>{const Oe=ae.match(/id=['"]([^'"]+)['"]/),Me=ae.match(/fromType=['"]([^'"]+)['"]/);if(Oe){const Ze=Oe[1],be=Me?Me[1]:"0";if(!Jt.current.has(Ze)){const Ke=Er.current,ct=be==="1"?"1":be==="2"?"2":be==="3"?"3":be==="10"?"10":"0",Vt=Ke[ct]??1;Jt.current.set(Ze,Vt),Ke[ct]=Vt+1,Er.current=Ke}const pe=Jt.current.get(Ze);return`[retrive-tag${ae}][${pe}][/retrive-tag]`}return Xe})),oe=oe.replace(/\[retrive-tag[^\]]*fromType=['"](?:0|10)['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,Xe=>{const ae=Xe.match(/image_urls=['"]([^'"]+)['"]/);if(ae){const Oe=ae[1].split(";").map(Me=>Me.trim()).filter(Boolean);Re.push(...Oe)}return Xe}),Re.length>0&&at(Re),oe}return n},[n,a,I,A]),y=xt(()=>{if(typeof Et=="string")try{return mg(Et)}catch(oe){return console.error("Failed to deserialize markdown:",oe),[]}return[]},[Et]),D=zt(oe=>{if(!(!oe||typeof Et!="string"))try{const Re=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${oe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Et);if(Re&&Re[1]){const pt=Number(Re[1]);return Number.isNaN(pt)?Re[1]:pt}}catch{}},[Et]),Pe=xt(()=>q9(Et),[Et]),$=xt(()=>V9(y||[]),[y]),te=xt(()=>{const oe={};return $.forEach(Re=>{Re!=null&&Re.id&&!oe[Re.id]&&(oe[Re.id]=Re.index)}),oe},[$]);sr(()=>{try{a==="stream"&&N&&(oe=>{try{const Re=typeof oe=="string"?JSON.parse(oe):oe;return Re?Array.isArray(Re)?Re:[Re]:[]}catch{return[]}})(N).forEach(oe=>{const Re=oe==null?void 0:oe.id;if(!Re)return;const pt=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:Re,databaseReference:oe}});window.dispatchEvent(pt)})}catch{}},[a,N]);const lr=xt(()=>{if(!Array.isArray(y))return!1;const oe=pt=>{for(const Xe of pt)if(Xe.type==="think"||Array.isArray(Xe.children)&&oe(Xe.children))return!0;return!1},Re=oe(y);return console.log("Think detection:",{slateContent:y,hasThinkElement:Re,displayStatus:c,isUser:f}),Re},[y,c,f]),st=xt(()=>({databaseReference:N,...lr&&{isThinkCollapsed:je}}),[N,lr,je]),wt=xt(()=>u||(f?Se.icons.userAvatar:Se.icons.aiAvatar),[u,f,Se.icons]),vt=xt(()=>typeof n=="string"?n:Array.isArray(n)?n.map(oe=>typeof oe=="string"?oe:oe.text||"").join(""):X||"",[n,X]),ot=()=>{if(Z)return null;const oe=[{key:"copy",show:q.copy!==!1,icon:ug,label:"\u590D\u5236",onClick:()=>J==null?void 0:J("chatbox:copy",{content:vt})},{key:"like",show:q.like!==!1,icon:hC,label:"\u8D5E",onClick:()=>J==null?void 0:J("chatbox:like",{result:V,queryId:I}),active:V===1},{key:"dislike",show:q.dislike!==!1,icon:fC,label:"\u8E29",onClick:()=>J==null?void 0:J("chatbox:dislike",{result:V,queryId:I}),active:V===0},{key:"repeat",show:!f&&L,icon:cC,label:"\u91CD\u590D",onClick:()=>J==null?void 0:J("chatbox:repeat",{content:n,queryId:I,filePaths:R,audioUrl:O})},{key:"forward",show:q.forward,icon:dC,label:"\u8F6C\u53D1",onClick:()=>J==null?void 0:J("chatbox:forward",{content:vt,queryId:I})},{key:"delete",show:q.delete,icon:pC,label:"\u5220\u9664",onClick:()=>J==null?void 0:J("chatbox:delete",{queryId:I})},{key:"edit",show:q.edit,icon:lC,label:"\u7F16\u8F91",onClick:()=>J==null?void 0:J("chatbox:edit",{content:vt,queryId:I})}];return H.jsxs("div",{style:{padding:"0 2.9rem"},className:"flex justify-between items-center",children:[H.jsx(X9,{$theme:Se,$touchFriendly:ke,children:oe.filter(Re=>Re.show).map(Re=>{const pt=Re.icon;return H.jsx(ku,{title:Re.label,placement:"top",children:H.jsx("button",{className:Re.active?"active":"",onClick:Re.onClick,children:H.jsx(pt,{size:18})})},Re.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:Se.colors.primary},children:W||0})," ","tokens"]})]})},qt=zt((oe,Re)=>{var pe;const pt=oe.metadata||{},Xe=oe.faq_question||pt.sourceFileName||((pe=pt.source)==null?void 0:pe.split("/").pop())||"FAQ",ae=oe.folder_path||pt.folder_path||pt.knowledge_base_name||"",Oe=ae?`${ae} - ${Xe}`:Xe,Me=`\u77E5\u8BC6\u5E93${Re}\u540D\uFF1A${Oe}`,Ze=String(oe.pk??oe.order_num??oe.id??""),be=eo(oe.score??pt.score);return{id:Ze,file_id:Ze,file_name:Me,file_type:"faq",type:"faq",path:"",score:be,rrf_score:be,tags:[],source:oe.folder_path||"",order_num:Ze,pk:Ze,faq_question:oe.faq_question,faq_answer:oe.faq_answer,folder_path:oe.folder_path,metadata:pt,faqIndex:Re,...oe}},[]),nr=xt(()=>{if(!k)return[];let oe=[];try{const Re=typeof k=="string"?Tp(k):k;oe=Array.isArray(Re)?Re:[Re]}catch{return[]}return oe.map((Re,pt)=>{var Ke;const Xe=Re.metadata||{},ae=Re.faq_question||Xe.sourceFileName||((Ke=Xe.source)==null?void 0:Ke.split("/").pop())||"FAQ",Oe=Re.folder_path||Xe.folder_path||Xe.knowledge_base_name||"",Me=Oe?`${Oe} - ${ae}`:ae,Ze=`\u77E5\u8BC6\u5E93${pt+1}\u540D\uFF1A${Me}`,be=String(Re.pk??Re.order_num??Re.id??""),pe=eo(Re.score??Xe.score);return{id:be,file_id:be,file_name:Ze,file_type:"faq",type:"faq",path:"",score:pe,rrf_score:pe,tags:[],source:Re.folder_path||"",order_num:be,pk:be,faq_question:Re.faq_question,faq_answer:Re.faq_answer,folder_path:Re.folder_path,metadata:Xe,faqIndex:pt+1,...Re}})},[k]),xr=xt(()=>{if(!A)return[];let oe=[];try{let ae;if(typeof A=="string")ae=JSON.parse(A);else if(Array.isArray(A))ae=A;else if(typeof A=="object")ae=[A];else return[];oe=Array.isArray(ae)?ae:[]}catch(ae){return console.warn("\u89E3\u6790 reference \u6570\u636E\u5931\u8D25:",ae,A),[]}let Re=oe.map(ae=>{var Oe;try{const Me=ae.metadata||{};let Ze="";Me.type==="video"&&Me.source_name&&typeof Me.source_name=="string"?Ze=Me.source_name:ae.name&&typeof ae.name=="string"?Ze=ae.name:ae.file_name&&typeof ae.file_name=="string"?Ze=ae.file_name:Me.title&&typeof Me.title=="string"?Ze=Me.title:Me.source&&typeof Me.source=="string"?Ze=Me.source.split("/").pop()||"":ae.order_num?Ze=String(ae.order_num):Ze="\u672A\u77E5\u6587\u6863";let be="pdf";if(Me.type&&typeof Me.type=="string")be=Me.type.toLowerCase();else if(ae.name&&typeof ae.name=="string"){const fe=ae.name.split(".").pop();fe&&(be=fe.toLowerCase())}else if(Me.source&&typeof Me.source=="string"){const fe=Me.source.split(".").pop();fe&&(be=fe.toLowerCase())}else if(ae.file_path&&typeof ae.file_path=="string"){const fe=ae.file_path.split(".").pop();fe&&(be=fe.toLowerCase())}const pe=ae.parsedFilePath||Me.file_path||ae.file_path||ae.convertedFilePath||Me.link||Me.source_link||"",{metadata:Ke,...ct}=ae,Vt=Me.source||"",Qe=eo(ae.score??Me.score);return{file_id:Me.id||ae.uid||"",file_name:Ze,file_type:be,path:pe,score:Qe,tags:[],parsedFilePath:ae.parsedFilePath,source:Vt,...ct}}catch(Me){console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Me,ae);const{metadata:Ze,...be}=ae,pe=((Oe=ae.metadata)==null?void 0:Oe.source)||ae.file_path||ae.convertedFilePath||"",Ke=eo(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:Ke,tags:[],parsedFilePath:ae.parsedFilePath,source:pe,...be}}});const pt=Pa(y||[]);if(pt&&pt.length){const ae=pt.filter(Me=>Me.fromtype==="0"),Oe=pt.filter(Me=>Me.fromtype==="3");Re=Re.map(Me=>{const Ze=ae.map(pe=>{var Qe;const Ke=oe.find(fe=>String(fe.order_num)===String(pe.id));if(!Ke||!((Qe=Ke==null?void 0:Ke.metadata)!=null&&Qe.source))return null;const ct=Me.source||"",Vt=Ke.metadata.source||"";return ct&&Vt&&ct!==Vt?null:{id:pe.id||"",index:D(String(pe.id))||pe.indexId||"",image_urls:pe.imageUrls?Array.isArray(pe.imageUrls)?pe.imageUrls:[pe.imageUrls]:pe.image_urls?pe.image_urls.split(";").map(fe=>fe.trim()).filter(Boolean):[],metadata:Ke.metadata||{},order_num:Ke.order_num,parsedFilePath:Ke.parsedFilePath}}).filter(pe=>pe!==null),be=Oe.map(pe=>{var Qe;const Ke=oe.find(fe=>String(fe.order_num)===String(pe.id));if(!Ke||!((Qe=Ke==null?void 0:Ke.metadata)!=null&&Qe.source))return null;const ct=Me.source||"",Vt=Ke.metadata.source||"";return ct&&Vt&&ct!==Vt?null:{id:pe.id||"",index:D(String(pe.id))||pe.indexId||"",image_urls:pe.imageUrls?Array.isArray(pe.imageUrls)?pe.imageUrls:[pe.imageUrls]:pe.image_urls?pe.image_urls.split(";").map(fe=>fe.trim()).filter(Boolean):[],metadata:Ke.metadata||{},order_num:Ke.order_num,parsedFilePath:Ke.parsedFilePath}}).filter(pe=>pe!==null);return{...Me,tags:[...Ze,...be]}})}const Xe=new Map;return Re.filter(ae=>{const Oe=(ae==null?void 0:ae.source)||ae.file_name;return Oe?Xe.has(Oe)?!1:(Xe.set(Oe,!0),!0):!0}).sort((ae,Oe)=>Number((Oe==null?void 0:Oe.score)??0)-Number((ae==null?void 0:ae.score)??0))},[A,y,Et,D]),ee=xt(()=>{if(!B)return[];let oe=[];try{let Xe;if(typeof B=="string")Xe=JSON.parse(B);else if(Array.isArray(B))Xe=B;else if(typeof B=="object")Xe=[B];else return[];oe=Array.isArray(Xe)?Xe:[]}catch(Xe){return console.warn("\u89E3\u6790 webReference \u6570\u636E\u5931\u8D25:",Xe,B),[]}if(!(oe!=null&&oe.length))return[];let Re=oe.map(Xe=>{var Oe,Me,Ze;const ae=(Xe==null?void 0:Xe.score)??((Oe=Xe==null?void 0:Xe.metadata)==null?void 0:Oe.score);return{link:(Me=Xe==null?void 0:Xe.metadata)==null?void 0:Me.link,file_name:(Ze=Xe==null?void 0:Xe.metadata)==null?void 0:Ze.title,score:eo(ae),tags:[]}});const pt=Pa(y||[]);if(pt&&pt.length){const Xe=pt.filter(ae=>ae.fromtype==="1");Re=Re.map(ae=>{const Oe=Xe.map(Me=>{var be;const Ze=oe.find(pe=>String(pe.order_num)===String(Me.id));return!Ze||!((be=Ze==null?void 0:Ze.metadata)!=null&&be.title)||Ze.metadata.title!==ae.file_name?null:{id:Me.id||"",index:D(String(Me.id))||Me.indexId||"",image_urls:Me.imageUrls?Array.isArray(Me.imageUrls)?Me.imageUrls:[Me.imageUrls]:Me.image_urls?Me.image_urls.split(";").map(pe=>pe.trim()).filter(Boolean):[],metadata:Ze.metadata||{},order_num:Ze.order_num}}).filter(Me=>Me!==null);return{...ae,tags:Oe}})}return Re.sort((Xe,ae)=>Number((ae==null?void 0:ae.score)??0)-Number((Xe==null?void 0:Xe.score)??0))},[B,y,Et,D]),re=xt(()=>{if(console.log("[ChatMessageAdapter] parseGraphReferenceData - graphReference:",F,"type:",typeof F),!F)return console.log("[ChatMessageAdapter] graphReference \u4E3A\u7A7A\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];let oe=[];try{if(typeof F=="string"){if(F==="[]"||F==="null"||F.trim()==="")return console.log("[ChatMessageAdapter] graphReference \u662F\u7A7A\u5B57\u7B26\u4E32\uFF0C\u8FD4\u56DE\u7A7A\u6570\u7EC4"),[];const ae=JSON.parse(F);oe=Array.isArray(ae)?ae:[],console.log("[ChatMessageAdapter] \u89E3\u6790\u5B57\u7B26\u4E32\u683C\u5F0F\u6210\u529F\uFF0Crefs.length:",oe.length)}else if(Array.isArray(F))oe=F,console.log("[ChatMessageAdapter] graphReference \u662F\u6570\u7EC4\u683C\u5F0F\uFF0Crefs.length:",oe.length);else if(typeof F=="object"&&F!==null)oe=[F],console.log("[ChatMessageAdapter] graphReference \u662F\u5BF9\u8C61\u683C\u5F0F\uFF0C\u8F6C\u6362\u4E3A\u6570\u7EC4\uFF0Crefs.length:",oe.length);else return console.warn("[ChatMessageAdapter] graphReference \u683C\u5F0F\u4E0D\u652F\u6301:",typeof F,F),[]}catch(ae){return console.error("[ChatMessageAdapter] Failed to parse graphReference:",ae,F),[]}const Re=(ae,Oe)=>{const Me=(ae==null?void 0:ae.metadata)??{},Ze=(ae==null?void 0:ae.graphName)??(ae==null?void 0:ae.graph_name)??(Me==null?void 0:Me.index_name)??`\u56FE\u8C31${Oe+1}`,be=(ae==null?void 0:ae.fetchUrl)??(ae==null?void 0:ae.fetch_url)??(Me==null?void 0:Me.fetchUrl)??(Me==null?void 0:Me.fetch_url),pe=Array.isArray(ae==null?void 0:ae.cyphers)&&ae.cyphers.length?ae.cyphers:typeof(ae==null?void 0:ae.cypher)=="string"&&ae.cypher.trim()?[ae.cypher]:[];let Ke=[];if(Array.isArray(ae==null?void 0:ae.traceNodes)&&ae.traceNodes.length)Ke=ae.traceNodes;else if(Array.isArray(Me==null?void 0:Me.trace_nodes)&&Me.trace_nodes.length){const Qe=(ae==null?void 0:ae.order_num)??(ae==null?void 0:ae.orderNum)??(Me==null?void 0:Me.order_num);Ke=Me.trace_nodes.map((fe,mt)=>({...fe,id:String(Qe??(fe==null?void 0:fe.id)??(fe==null?void 0:fe.vid)??`${(ae==null?void 0:ae.id)??`graph-${Oe}`}_${mt}`),metadata:(fe==null?void 0:fe.metadata)??{}}))}else(ae!=null&&ae.order_num||ae!=null&&ae.orderNum)&&(Ke=[{id:String((ae==null?void 0:ae.order_num)??(ae==null?void 0:ae.orderNum)),name:(ae==null?void 0:ae.name)??Ze,nodeType:"graph",metadata:{}}]);const{metadata:ct,...Vt}=ae||{};return{id:(ae==null?void 0:ae.id)||`graph-${Oe}`,graphName:Ze,fetchUrl:be,cyphers:pe,traceNodes:Ke,tags:[],...Vt}};let pt=oe.map((ae,Oe)=>Re(ae,Oe));const Xe=Pa(y||[]);if(Xe&&Xe.length){const ae=Xe.filter(Oe=>Oe.fromtype==="2");pt=pt.map(Oe=>{let Me=[];Array.isArray(Oe.traceNodes)&&Oe.traceNodes.length>0?Me=Oe.traceNodes.map((pe,Ke)=>({id:pe.id,index:D(String(pe.id))??Ke+1,image_urls:[],metadata:pe.metadata||{},...pe})):Me=ae.filter(pe=>String(pe.id)===String(Oe.id)).map(pe=>({id:pe.id||"",index:D(String(pe.id))||pe.indexId||"",image_urls:pe.imageUrls?Array.isArray(pe.imageUrls)?pe.imageUrls:[pe.imageUrls]:pe.image_urls?pe.image_urls.split(";").map(Ke=>Ke.trim()).filter(Boolean):[],metadata:{}}));const Ze=new Set,be=Me.filter(pe=>Ze.has(String(pe.id))?!1:(Ze.add(String(pe.id)),!0)).sort((pe,Ke)=>Number(pe.index)-Number(Ke.index));return{...Oe,tags:be}})}return Object.values((pt||[]).reduce((ae,Oe)=>{var be;const Me=Oe.graphName||Oe.name||`__unknown__${Oe.id}`,Ze={...(Oe.tags||[])[0]||{},cypher:Oe.cypher||((be=Oe==null?void 0:Oe.cyphers)==null?void 0:be[0]),fetchUrl:Oe.fetchUrl,id:Oe.id,traceNodes:Oe.traceNodes,order_num:Oe.order_num,name:Me};return ae[Me]?(ae[Me].tags=(ae[Me].tags||[]).concat(Ze?[Ze]:[]),Oe.traceNodes&&Array.isArray(Oe.traceNodes)&&(ae[Me].traceNodes=Array.isArray(ae[Me].traceNodes)?ae[Me].traceNodes.concat(Oe.traceNodes):Oe.traceNodes)):ae[Me]={...Oe,name:Me,tags:Ze?[Ze]:[]},ae},{})).map(ae=>(ae.tags=(ae.tags||[]).slice().sort((Oe,Me)=>{const Ze=Number((Oe==null?void 0:Oe.index)??0),be=Number((Me==null?void 0:Me.index)??0);return Ze-be}),ae)).sort((ae,Oe)=>(Oe.score||0)-(ae.score||0))},[F,y,Et,D]),Y=xt(()=>{const oe=[...Pa(y||[]).filter(Re=>Re.imageUrls&&Array.isArray(Re.imageUrls)).flatMap(Re=>Re.imageUrls),...dt];return Array.from(new Set(oe))},[y,dt]),tt=xt(()=>typeof n!="string"?[]:K9(n),[n]),Ut=xt(()=>Array.from(new Set([...Y||[],...tt||[]])),[Y,tt]),ft=xt(()=>{var oe,Re,pt,Xe,ae,Oe,Me,Ze;if(!N)return null;try{const be=typeof N=="string"?JSON.parse(N):N;if(Array.isArray(be)&&be.length>0){const pe=be[0];if(pe.retrieveSqlData)return{dataFetchUrl:pe.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:pe.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:pe.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:pe.retrieveSqlData.total||0,type:pe.retrieveSqlData.type||"COLLECTION",preData:{columns:((Re=(oe=pe.retrieveSqlData.preData)==null?void 0:oe[0])==null?void 0:Re.columns)||[],rows:((Xe=(pt=pe.retrieveSqlData.preData)==null?void 0:pt[0])==null?void 0:Xe.data)||[]}}}return be.retrieveSqlData?{dataFetchUrl:be.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:be.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:be.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:be.retrieveSqlData.total||0,type:be.retrieveSqlData.type||"COLLECTION",preData:{columns:((Oe=(ae=be.retrieveSqlData.preData)==null?void 0:ae[0])==null?void 0:Oe.columns)||[],rows:((Ze=(Me=be.retrieveSqlData.preData)==null?void 0:Me[0])==null?void 0:Ze.data)||[]}}:{dataFetchUrl:be.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:be.databaseName||"\u6570\u636E\u5E93",tableName:be.tableName||"\u6570\u636E\u8868",total:be.total||0,type:be.type||"COLLECTION",preData:be.preData||{columns:[],rows:[]}}}catch(be){return console.error("Failed to parse databaseReference:",be),null}},[N]),It=oe=>{const{dataSourceType:Re,databaseName:pt,businessTableName:Xe,tableName:ae}=oe;return Re==="DataTable"?`${pt||"\u6570\u636E\u5E93"} - ${Xe||"\u6570\u636E\u8868"}`:Re==="DirectDB"?`${pt||"\u6570\u636E\u5E93"} - ${ae||"\u6570\u636E\u8868"}`:pt||Xe||ae||"\u6570\u636E\u5E93"};We.useEffect(()=>{or(null),at([])},[I]),We.useEffect(()=>{var pt;const oe=Xe=>{try{const ae=typeof Xe=="string"?JSON.parse(Xe):Xe;return ae?Array.isArray(ae)?ae:[ae]:[]}catch(ae){return console.error("[\u6570\u636E\u5E93\u5F15\u7528\u89E3\u6790] normalizeDbReferenceList \u5931\u8D25:",ae),[]}},Re=(Xe,ae)=>{if(!Array.isArray(Xe))return[];const Oe=ae!=null&&ae.id?String(ae.id):void 0,Me=Oe?D(Oe):void 0,Ze=Oe?te[Oe]:void 0,be=Me??Ze??(ae==null?void 0:ae.referenceIndex)??void 0,pe=Oe&&be!==void 0?[{id:Oe,index:be}]:[];return Xe.map(Ke=>{var ct,Vt,Qe,fe;return{...Ke,id:Ke.id||Oe||Ke.tableName,referenceId:Oe,referenceIndex:be,tags:pe,fetchUrl:Ke.fetchUrl||((ct=ae==null?void 0:ae.retrieveSqlData)==null?void 0:ct.fetchUrl)||(ft==null?void 0:ft.dataFetchUrl)||"",databaseName:Ke.databaseName||((Vt=ae==null?void 0:ae.retrieveSqlData)==null?void 0:Vt.databaseName)||(ft==null?void 0:ft.databaseName)||"",tableName:Ke.tableName||((Qe=ae==null?void 0:ae.retrieveSqlData)==null?void 0:Qe.tableName)||(ft==null?void 0:ft.tableName)||"",dataSourceType:Ke.dataSourceType||((fe=ae==null?void 0:ae.retrieveSqlData)==null?void 0:fe.type)||(ft==null?void 0:ft.type)||"DataTable"}})};if(N){const Xe=oe(N),ae=[];if(Xe.forEach(Oe=>{var Me,Ze,be;if(Array.isArray(Oe==null?void 0:Oe.retrieveTableDataList)&&Oe.retrieveTableDataList.length)ae.push(...Re(Oe.retrieveTableDataList,Oe));else if(Array.isArray((be=(Ze=(Me=Oe==null?void 0:Oe.retrieveSqlData)==null?void 0:Me.preData)==null?void 0:Ze[0])==null?void 0:be.data)&&Oe.retrieveSqlData.preData[0].data.length){const pe={businessTableName:Oe.retrieveSqlData.tableName||"\u6570\u636E\u8868",databaseName:Oe.retrieveSqlData.databaseName||(ft==null?void 0:ft.databaseName)||"\u6570\u636E\u5E93",tableName:Oe.retrieveSqlData.tableName||(ft==null?void 0:ft.tableName)||"\u6570\u636E\u8868",fetchUrl:Oe.retrieveSqlData.fetchUrl||(ft==null?void 0:ft.dataFetchUrl)||"",dataSourceType:Oe.retrieveSqlData.type||"DirectDB",total:Oe.retrieveSqlData.total};ae.push(...Re([pe],Oe))}}),ae.length>0){Dt(ae);return}if((pt=ft==null?void 0:ft.preData)!=null&&pt.rows){const Oe=Re(ft.preData.rows,{});Dt(Oe);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");Dt([])},[N,ft,I,te,D]);const bt=zt(()=>{try{const oe=Array.isArray(xr)?xr:[],Re=Array.isArray(nr)?nr:[],pt=Pa(y||[]),Xe=pt.filter(Qe=>Qe.fromtype==="10"),ae=Re.map(Qe=>{const fe=Xe.filter(mt=>String(mt.id)===String(Qe.pk||Qe.order_num)).map(mt=>({id:mt.id||"",index:D(String(mt.id))??mt.indexId??"",image_urls:mt.imageUrls?Array.isArray(mt.imageUrls)?mt.imageUrls:[mt.imageUrls]:mt.image_urls?mt.image_urls.split(";").map(_t=>_t.trim()).filter(Boolean):[],metadata:Qe.metadata||{}}));return{...Qe,tags:fe}}),Oe=[...oe,...ae],Me=Array.isArray(ee)?ee:[],Ze=Array.isArray(re)?re:[],be=Ut,pe=Oe.map(Qe=>({...Qe,tags:Ma((Qe.tags||[]).filter(fe=>(fe==null?void 0:fe.id)&&Pe(String(fe.id))))})).filter(Qe=>Array.isArray(Qe==null?void 0:Qe.tags)&&Qe.tags.length>0),Ke=Me.map(Qe=>({...Qe,tags:Ma((Qe.tags||[]).filter(fe=>(fe==null?void 0:fe.id)&&Pe(String(fe.id))))})).filter(Qe=>Array.isArray(Qe==null?void 0:Qe.tags)&&Qe.tags.length>0),ct=Ze.map(Qe=>({...Qe,tags:Ma((Qe.tags||[]).filter(fe=>(fe==null?void 0:fe.id)&&Pe(String(fe.id))))})).filter(Qe=>Array.isArray(Qe==null?void 0:Qe.tags)&&Qe.tags.length>0),Vt=Ft&&Ft.length>0?Ft.map(Qe=>({id:Qe.id||Qe.tableName||Qe.referenceId||"",databaseName:Qe.databaseName||(ft==null?void 0:ft.databaseName)||"",tableName:Qe.tableName||(ft==null?void 0:ft.tableName)||"",fetchUrl:Qe.fetchUrl||(ft==null?void 0:ft.dataFetchUrl)||"",score:eo(Qe.score),tags:Qe.tags||[],referenceIndex:Qe.referenceIndex,metadata:Qe.metadata?{...Qe.metadata,data:void 0,dataList:void 0,rows:void 0,preData:void 0}:{}})).map(Qe=>({...Qe,tags:Ma((Qe.tags||[]).filter(fe=>(fe==null?void 0:fe.id)&&Pe(String(fe.id))))})).filter(Qe=>Array.isArray(Qe==null?void 0:Qe.tags)&&Qe.tags.length>0):[];return{queryId:I,knowledgeRefs:pe,webRefs:Ke,graphRefs:ct,databaseRefs:Vt,images:be,raw:{reference:A,webReference:B,faqReference:k,graphReference:F,databaseReference:N,retriveNodes:pt}}}catch{return{queryId:I,knowledgeRefs:[],webRefs:[],graphRefs:[],databaseRefs:[],images:[],raw:{reference:A,webReference:B,faqReference:k,graphReference:F,databaseReference:N,retriveNodes:[]}}}},[xr,nr,ee,re,ft,Ft,Ut,y,I,A,B,k,F,N,Pe,D]),Ir=xt(()=>{if(!f)return[];if(Array.isArray(S))return S;if(typeof S=="string"&&S)try{return JSON.parse(S)}catch{return[]}return[]},[f,S]),Hr=()=>{if(!f||Ir.length===0)return null;const oe=be=>{if(!be)return"";if(typeof be=="string"&&(be.includes("KB")||be.includes("MB")||be.includes("GB")||be.includes("B")))return be;const pe=typeof be=="string"?parseFloat(be)||0:be;return pe<1024?`${pe}B`:pe<1024*1024?`${(pe/1024).toFixed(1)}KB`:`${(pe/1024/1024).toFixed(1)}MB`},Re=be=>be!=null&&be.status&&(String(be.status).toLowerCase()==="uploading"||String(be.status).toLowerCase()==="parsing")?!1:!!(be!=null&&be.url||be!=null&&be.filePath||be!=null&&be.convertedFilePath),pt=Ir.filter(be=>{const pe=(be.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(pe.toLowerCase())}),Xe=Ir.filter(be=>{const pe=(be.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(pe.toLowerCase())}),ae=pt.filter(Re),Oe=pt.filter(be=>!Re(be)),Me=Xe.filter(Re),Ze=Xe.filter(be=>!Re(be));return Me.length+Ze.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||Oe.length>0)&&H.jsx(wu,{$theme:Se,children:H.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Oe.map((be,pe)=>{var Ke;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:((Ke=Se.colors)==null?void 0:Ke.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${pe}`)}),ae.map(be=>H.jsxs("div",{className:"gallery-item",onClick:()=>{J==null||J("reference_file:click",{...be,file:be.name,file_type:be.file_type||"image",url:be.url||be.filePath,parse_url:be.parseUrl||be.convertedFilePath,retrieve_tags:be.retrieveTags||[],file_id:be.uid||be.file_id,parsed_file_type:be.parsed_file_type||"image",references:be,type:be.type||"image",isUploadFile:!0,pdfPages:be.pdfPages||0})},children:[H.jsx(bu,{src:be.url||be.filePath,alt:be.name,className:"gallery-image",token:e,url:t,eventsEmit:ut}),H.jsx("div",{className:"gallery-overlay",children:be.name})]},be.uid||be.name))]})}),(Me.length>0||Ze.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:[Ze.map((be,pe)=>{const Ke=(be.name||"").split(".").pop()||"",ct=xu(Ke,p,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:ct})}),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-${be.uid||pe}`)}),Me.map(be=>{var Qe;const pe=(be.name||"").split(".").pop()||"",Ke=be.size??((Qe=be.file)==null?void 0:Qe.size)??be.fileSize,ct=oe(Ke),Vt=xu(pe,p,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:be.name,onClick:()=>{J==null||J("reference_file:click",{...be,file:be.name,file_type:be.file_type||pe,url:be.url||be.filePath,parse_url:be.parseUrl||be.convertedFilePath,retrieve_tags:be.retrieveTags||[],file_id:be.uid||be.file_id,parsed_file_type:be.parsed_file_type||pe,references:be,type:be.type||"file",isUploadFile:!0,pdfPages:be.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:Vt})}),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:be.name,children:be.name})})}),H.jsx("div",{className:" text-[12px] text-gray-400 whitespace-nowrap",children:ct})]})]},be.uid||be.name)})]})})]})},In=()=>{if(console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases:",Q),!Q||!Array.isArray(Q)||Q.length===0)return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - knowledgeBases \u4E3A\u7A7A\u6216\u4E0D\u662F\u6570\u7EC4"),null;const oe=[];let Re=0;if(Q.forEach((Ke,ct)=>{Ke&&Ke.treeData&&Array.isArray(Ke.treeData)&&(Ke.treeData.forEach(Vt=>{oe.push({...Vt,_kbIndex:ct,_kbName:Ke.knowledgeBaseName||""})}),Re+=Ke.totalFileCount||0)}),oe.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:",oe.length);const pt=oe.filter(Ke=>Ke.type==="dir"),Xe=oe.filter(Ke=>Ke.type==="file");console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - dirItems:",pt.length,"fileItems:",Xe.length);let ae=[],Oe="\u6309\u76EE\u5F55\u5206\u7C7B";if(pt.length>0){const Ke=pt.map((ct,Vt)=>({id:`${ct._kbIndex}-${ct.name||Vt}`||Vt,name:ct.name||"",documentCount:ct.fileCount||0,visible:!0,itemType:"dir"}));ae.push(...Ke)}if(Xe.length>0){const Ke=Xe.map((ct,Vt)=>({id:`${ct._kbIndex}-${ct.name||Vt}`||Vt,name:ct.name||"\u672A\u77E5\u6587\u4EF6",documentCount:0,visible:!0,itemType:"file",fileType:ct.fileType||""}));ae.push(...Ke)}if(pt.length===0&&Xe.length>0&&(Oe="\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 Me=Re>0?Re:Xe.length,Ze=ae.slice(0,5),be=ae.length>5,pe={title:"\u77E5\u8BC6\u5E93\u6587\u6863\u5217\u8868",subtitle:Oe,totalCount:Me,categories:Ze,showViewAll:be,viewAllText:"\u67E5\u770B\u5168\u90E8>>"};return console.log("[ChatMessageAdapter] convertKnowledgeBasesToDocumentList - result:",pe),pe},Rr=()=>{if(f)return null;const oe=In();return oe?H.jsx(O9,{data:oe,styles:p,onCategoryClick:Re=>{J==null||J("knowledge_base_category:click",{category:Re,knowledgeBase:Q==null?void 0:Q[0]})},onViewAllClick:()=>{J==null||J("knowledge_base_view_all:click",{knowledgeBases:Q})}}):null},Cn=()=>{var Qe;if(f)return null;console.log("[ChatMessageAdapter] renderReferences \u5F00\u59CB - referenceMode:",me),console.log("[ChatMessageAdapter] renderReferences - graphReference \u539F\u59CB\u503C:",F),console.log("[ChatMessageAdapter] renderReferences - parseGraphReferenceData:",re);const oe=Array.isArray(xr)?xr:[],Re=Array.isArray(nr)?nr:[],pt=Pa(y||[]).filter(fe=>fe.fromtype==="10"),Xe=Re.map(fe=>{const mt=pt.filter(_t=>String(_t.id)===String(fe.pk||fe.order_num)).map(_t=>({id:_t.id||"",index:D(String(_t.id))??_t.indexId??"",image_urls:_t.imageUrls?Array.isArray(_t.imageUrls)?_t.imageUrls:[_t.imageUrls]:_t.image_urls?_t.image_urls.split(";").map(Ur=>Ur.trim()).filter(Boolean):[],metadata:fe.metadata||{}}));return{...fe,tags:mt}}),ae=[...oe,...Xe].map(fe=>({...fe,tags:Ma((fe.tags||[]).filter(mt=>(mt==null?void 0:mt.id)&&Pe(String(mt.id))))})).filter(fe=>Array.isArray(fe==null?void 0:fe.tags)&&fe.tags.length>0),Oe=(Array.isArray(ee)?ee:[]).map(fe=>({...fe,tags:Ma((fe.tags||[]).filter(mt=>(mt==null?void 0:mt.id)&&Pe(String(mt.id))))})).filter(fe=>Array.isArray(fe==null?void 0:fe.tags)&&fe.tags.length>0),Me=(Array.isArray(re)?re:[]).map(fe=>({...fe,tags:Ma((fe.tags||[]).filter(mt=>(mt==null?void 0:mt.id)&&Pe(String(mt.id))))})).filter(fe=>Array.isArray(fe==null?void 0:fe.tags)&&fe.tags.length>0);console.log("[ChatMessageAdapter] renderReferences - knowledgeList:",ae.length,"webList:",Oe.length,"graphList:",Me.length),console.log("[ChatMessageAdapter] renderReferences - graphList \u8BE6\u60C5:",Me);const Ze=ae.length>0&&G!==5,be=Oe.length>0,pe=Me.length>0;console.log("[ChatMessageAdapter] renderReferences - hasKnowledgeRefs:",Ze,"hasWebRefs:",be,"hasGraphRefs:",pe);const Ke=Ut.length>0,ct=Ft&&Ft.length>0,Vt=Ze||be||pe||Ke||ct;if(console.log("[ChatMessageAdapter] renderReferences - hasAny:",Vt),console.log("[\u5F15\u7528\u6E32\u67D3] databaseReference:",N),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData:",Ft),console.log("[\u5F15\u7528\u6E32\u67D3] databaseData.length:",Ft==null?void 0:Ft.length),console.log("[\u5F15\u7528\u6E32\u67D3] hasDatabaseRefs:",ct),me==="button"){if(console.log("[ChatMessageAdapter] referenceMode === button, hasAny:",Vt),!Vt)return console.log("[ChatMessageAdapter] hasAny \u4E3A false\uFF0C\u4E0D\u6E32\u67D3\u5F15\u7528"),null;const fe=Ze&&(ae==null?void 0:ae.length)||0,mt=be&&(Oe==null?void 0:Oe.length)||0,_t=pe&&(Me==null?void 0:Me.length)||0,Ur=ct&&(Ft==null?void 0:Ft.length)||0;let en=fe+mt+_t+Ur;return en===0&&Ke&&(en=1),H.jsxs(H.Fragment,{children:[Ke&&H.jsx(wu,{$theme:Se,children:H.jsx("div",{className:"gallery-grid",children:Ut.map((se,St)=>H.jsxs("div",{className:"gallery-item",onClick:()=>{J==null||J("reference_file:click",{file:`\u56FE${St+1}`,file_type:"image",url:se,parse_url:se,retrieve_tags:[],references:{url:se},type:"image",isUploadFile:!1})},children:[H.jsx(bu,{src:se,alt:`\u56FE${St+1}`,className:"gallery-image",token:e,url:t,eventsEmit:ut}),H.jsxs("div",{className:"gallery-overlay",children:["\u56FE",St+1]})]},se+St))})}),H.jsx("div",{style:{padding:"6px 2.9rem"},children:H.jsxs("button",{style:{cursor:"pointer",color:((Qe=Se.colors)==null?void 0:Qe.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 se=bt();J==null||J("references:click",se)},onMouseEnter:se=>{var St;se.currentTarget.style.color=((St=Se.colors)==null?void 0:St.primary)||"#3b82f6"},onMouseLeave:se=>{var St;se.currentTarget.style.color=((St=Se.colors)==null?void 0:St.textDisabled)||"#86909C"},children:[H.jsx(iC,{size:16}),H.jsxs("span",{children:["\u77E5\u8BC6\u6EAF\u6E90",en?` ${en}`:""]}),H.jsx(nC,{size:16})]})})]})}return Vt?H.jsxs(H.Fragment,{children:[Ke&&H.jsx(wu,{$theme:Se,children:H.jsx("div",{className:"gallery-grid",children:Ut.map((fe,mt)=>H.jsxs("div",{className:"gallery-item",onClick:()=>{J==null||J("reference_file:click",{file:`\u56FE${mt+1}`,file_type:"image",url:fe,parse_url:fe,retrieve_tags:[],references:{url:fe},type:"image",isUploadFile:!1})},children:[H.jsx(bu,{src:fe,alt:`\u56FE${mt+1}`,className:"gallery-image",token:e,url:t,eventsEmit:ut}),H.jsxs("div",{className:"gallery-overlay",children:["\u56FE",mt+1]})]},fe+mt))})}),Ze&&H.jsxs(Wi,{$theme:Se,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:` (${ae.length})`}),ae.length>2&&H.jsx("div",{onClick:()=>ht(!Ge),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ge?H.jsx(qo,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ko,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(Ge?ae:ae.slice(0,2)).map((fe,mt)=>fe&&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 _t=fe.file_type||(fe.file_name||"").split(".").pop()||"pdf",Ur=(fe.file_name||"").split(".").pop()||"file";return _t==="video"||["mp4","avi","mov","wmv","flv","webm","mkv"].includes(_t)?H.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center bg-red-100",children:H.jsx(uC,{size:16,className:"text-red-600"})}):H.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:xu(Ur,p,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:_t=>{_t.stopPropagation(),J==null||J("knowledge_referenceFile_title:click",{data:{...fe,file_type:fe.file_type,file_name:fe.file_name,metadata:fe.metadata,parsedFilePath:fe.parsedFilePath}})},children:fe.file_name})}),H.jsx("div",{className:"flex items-center gap-1",children:(()=>{const _t=new Set,Ur=(fe.tags||[]).filter(se=>_t.has(se.id)?!1:(_t.add(se.id),!0)).sort((se,St)=>Number(se.index)-Number(St.index)),en=se=>{if(typeof Et!="string")return se;const St=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${se}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Et);return St?St[1]:se};return Ur.slice(0,10).map(se=>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:St=>{St.stopPropagation();const nn=Rt(fe,se.id),Nt=fe.file_type==="video"?"3":"0";J==null||J("retrive_tag:click",{tagInfo:nn||fe,fromtype:Nt,leaf:{id:se.id,fromtype:Nt},attributes:{}})},children:en(se.id)},se.id))})()}),typeof fe.score=="number"&&H.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(fe.score).toFixed(2)]}),fe.file_type!=="video"&&H.jsxs("div",{className:"flex items-center gap-2",children:[H.jsx(oC,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:r?"pointer":"not-allowed"},onClick:_t=>{r&&(_t.stopPropagation(),J==null||J("referenceFile_download",{data:{...fe,file_type:fe.file_type,file_name:fe.file_name,metadata:fe.metadata,parsedFilePath:fe.parsedFilePath}}))}}),H.jsx("div",{className:"w-px h-4 bg-gray-300"}),H.jsx(sC,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",onClick:_t=>{_t.stopPropagation(),J==null||J("referenceFile_filechat",{data:{...fe,file_type:fe.file_type,file_name:fe.file_name,metadata:fe.metadata,parsedFilePath:fe.parsedFilePath}})}})]})]})},fe.file_id||mt))})]}),ct&&H.jsxs(Wi,{$theme:Se,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:` (${Ft.length||0})`}),Ft.length>2&&H.jsx("div",{onClick:()=>At(!Ot),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Ot?H.jsx(qo,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ko,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(Ot?Ft:Ft.slice(0,2)).map((fe,mt)=>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(aC,{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:_t=>{_t.stopPropagation(),J==null||J("database_referenceFile_title:click",{data:{...fe,file_type:"database",file_name:It(fe),metadata:fe,parsedFilePath:fe.fetchUrl||(ft==null?void 0:ft.dataFetchUrl)||"",file:fe.databaseName||"database",url:fe.fetchUrl||(ft==null?void 0:ft.dataFetchUrl)||"",parse_url:fe.fetchUrl||(ft==null?void 0:ft.dataFetchUrl)||"",retrieve_tags:fe.tags||[],references:fe,type:"database",isUploadFile:!1}})},children:It(fe)})}),H.jsx("div",{className:"flex items-center gap-1",children:(Array.isArray(fe.tags)&&fe.tags.length?fe.tags:[{id:fe.referenceId||`database-${mt}`,index:fe.referenceIndex??mt+1}]).map(_t=>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:_t.index??mt+1},`${_t.id||"database"}-${_t.index}`))}),typeof fe.score=="number"&&H.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(fe.score).toFixed(2)]})]})},fe.tableName||mt))})]}),be&&H.jsxs(Wi,{$theme:Se,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:` (${Oe.length})`}),Oe.length>2&&H.jsx("div",{onClick:()=>nt(!et),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:et?H.jsx(qo,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ko,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(et?Oe:Oe.slice(0,2)).map((fe,mt)=>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(ta,{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:_t=>{_t.stopPropagation(),J==null||J("web_referenceFile_title:click",{data:{...fe,file_type:fe.file_type,file_name:fe.file_name,metadata:fe.metadata,parsedFilePath:fe.parsedFilePath,file:fe.file_name,url:fe.link,parse_url:fe.link,retrieve_tags:fe.tags||[],references:fe,type:"file",isUploadFile:!1}})},children:fe.file_name})}),H.jsx("div",{className:"flex items-center gap-1",children:(()=>{const _t=new Set,Ur=(fe.tags||[]).filter(se=>_t.has(se.id)?!1:(_t.add(se.id),!0)).sort((se,St)=>Number(se.index)-Number(St.index)),en=se=>{if(typeof Et!="string")return se;const St=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${se}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Et);return St?St[1]:se};return Ur.slice(0,1).map(se=>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:St=>{St.stopPropagation();const nn=Rt(fe,se.id);J==null||J("retrive_tag:click",{tagInfo:nn||fe,fromtype:"1",leaf:{id:se.id,fromtype:"1"},attributes:{}})},children:en(se.id)},se.id))})()}),typeof fe.score=="number"&&H.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",Number(fe.score).toFixed(2)]})]})},(fe.link||"")+mt))})]}),pe&&H.jsxs(Wi,{$theme:Se,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:` (${Me.length})`}),Me.length>2&&H.jsx("div",{onClick:()=>Mt(!Tt),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Tt?H.jsx(qo,{size:16,className:"text-[#b4b4b4]"}):H.jsx(Ko,{size:16,className:"text-[#b4b4b4]"})})]})}),H.jsx("div",{className:"reference-list",children:(Tt?Me:Me.slice(0,2)).map((fe,mt)=>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:fe.graphName||`\u56FE\u8C31${mt+1}`})}),H.jsx("div",{className:"flex items-center gap-1",children:(()=>{const _t=new Set,Ur=(fe.tags||[]).filter(se=>_t.has(se.id)?!1:(_t.add(se.id),!0)).sort((se,St)=>Number(se.index)-Number(St.index)),en=se=>{if(typeof Et!="string")return null;const St=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${se}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(Et);return St?St[1]??null:null};return Ur.map(se=>({tag:se,num:en(se.id)})).filter(se=>se.num!==null&&se.num!==void 0&&se.num!=="").slice(0,10).map(({tag:se,num:St})=>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:nn=>{nn.stopPropagation();const Nt=Array.isArray(fe.traceNodes)?fe.traceNodes.find(Gt=>String(Gt==null?void 0:Gt.id)===String(se.id)):void 0;J==null||J("retrive_tag:click",{tagInfo:{id:se.id,index:se.index,image_urls:se.image_urls||[]},fromtype:"2",graph:{id:fe.id,graphName:fe.graphName,fetchUrl:fe.fetchUrl,cyphers:fe.cyphers},traceNode:Nt})},children:St},se.id))})()})]})},fe.id||mt))})]})]}):null},Dn=()=>f||!L||!ne||ne.length===0?null:H.jsx(Z9,{$theme:Se,$compact:Be,children:H.jsx("div",{className:"follow-up-list",children:ne.map((oe,Re)=>H.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Re*260}ms`},onClick:()=>{J==null||J("chatbox:follow_up_question_click",{question:oe,queryId:I})},children:oe},`${String(oe)}-${Re}`))})});return H.jsxs(W9,{$align:i,$isUser:f,$isMobile:Be,children:[H.jsxs(U9,{$isUser:f,children:[H.jsx(G9,{$src:wt,$isUser:f}),ze&&H.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:ze})]}),Hr(),H.jsx(Y9,{$isUser:f,$theme:Se,$compact:Be,children:H.jsx("div",{className:"message-card",children:H.jsx("div",{className:"message-text",children:a==="stream"?H.jsxs(H.Fragment,{children:[!f&&Pt(),Bt(),H.jsx(qs,{dataSource:{type:di.MARKDOWN,content:Et},styles:{letterSpacing:p==null?void 0:p.letterSpacing,lineHeight:p==null?void 0:p.lineHeight,templateField:p==null?void 0:p.templateField,text:p==null?void 0:p.text},theme:{...p==null?void 0:p.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:Dr,eventsEmit:J,extraProps:st,enablePrism:Ee},`md-${(Et||"").length}-think-${je}`)]}):H.jsx("div",{style:{whiteSpace:"pre-wrap"},children:vt})})})}),Rr(),Cn(),!f&&ot(),Dn(),typeof document<"u"&&v4(H.jsx(J9,{$show:$e!==null,onClick:()=>Le(null),children:$e&&H.jsxs("div",{className:"modal-content",onClick:oe=>oe.stopPropagation(),children:[H.jsx("img",{src:$e,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),H.jsx("button",{className:"modal-close",onClick:()=>Le(null),children:"\u5173\u95ED"})]})}),document.body)]})};qe.div.attrs({className:"retrive-chat-message-container"})`
|
|
1684
|
+
display: flex;
|
|
1685
|
+
flex-direction: column;
|
|
1686
|
+
width: 100%;
|
|
1687
|
+
margin-bottom: 16px;
|
|
1688
|
+
`;qe.div.attrs({className:"retrive-chat-message-header"})`
|
|
1689
|
+
display: flex;
|
|
1690
|
+
align-items: flex-start;
|
|
1691
|
+
gap: 12px;
|
|
1692
|
+
margin-bottom: 12px;
|
|
1693
|
+
`;qe.div.attrs({className:"retrive-chat-avatar-wrapper"})`
|
|
1694
|
+
width: 40px;
|
|
1695
|
+
height: 40px;
|
|
1696
|
+
border-radius: 50%;
|
|
1697
|
+
overflow: hidden;
|
|
1698
|
+
flex-shrink: 0;
|
|
1699
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1700
|
+
|
|
1701
|
+
img {
|
|
1702
|
+
width: 100%;
|
|
1703
|
+
height: 100%;
|
|
1704
|
+
object-fit: cover;
|
|
1705
|
+
}
|
|
1706
|
+
`;qe.div.attrs({className:"retrive-chat-content-wrapper"})`
|
|
1707
|
+
flex: 1;
|
|
1708
|
+
display: flex;
|
|
1709
|
+
flex-direction: column;
|
|
1710
|
+
align-items: ${({isUser:e})=>e?"flex-end":"flex-start"};
|
|
1711
|
+
`;qe.div.attrs({className:"retrive-chat-timestamp"})`
|
|
1712
|
+
font-size: 12px;
|
|
1713
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1714
|
+
margin-bottom: 8px;
|
|
1715
|
+
`;qe.div.attrs({className:"retrive-chat-user-bubble"})`
|
|
1716
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.userBackground)||"#3b82f6"}};
|
|
1717
|
+
color: white;
|
|
1718
|
+
padding: 12px 16px;
|
|
1719
|
+
border-radius: 12px;
|
|
1720
|
+
max-width: 80%;
|
|
1721
|
+
word-wrap: break-word;
|
|
1722
|
+
`;qe.div.attrs({className:"retrive-chat-ai-message-card"})`
|
|
1723
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1724
|
+
border-radius: 12px;
|
|
1725
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
1726
|
+
padding: 0;
|
|
1727
|
+
width: 100%;
|
|
1728
|
+
max-width: 100%;
|
|
1729
|
+
overflow: hidden;
|
|
1730
|
+
`;qe.div.attrs({className:"retrive-chat-tabs-container"})`
|
|
1731
|
+
display: flex;
|
|
1732
|
+
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1733
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1734
|
+
`;qe.button.attrs({className:"retrive-chat-tab-button"})`
|
|
1735
|
+
display: flex;
|
|
1736
|
+
position: relative;
|
|
1737
|
+
align-items: center;
|
|
1738
|
+
gap: 6px;
|
|
1739
|
+
padding: 12px 20px;
|
|
1740
|
+
background: transparent;
|
|
1741
|
+
border: none;
|
|
1742
|
+
border-bottom: 2px solid ${({active:e,theme:t})=>{var r;return e?((r=t.colors)==null?void 0:r.primary)||"#3b82f6":"transparent"}};
|
|
1743
|
+
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"}};
|
|
1744
|
+
font-size: 14px;
|
|
1745
|
+
font-weight: ${({active:e})=>e?500:400};
|
|
1746
|
+
cursor: pointer;
|
|
1747
|
+
transition: all 0.2s ease;
|
|
1748
|
+
|
|
1749
|
+
&:hover {
|
|
1750
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1751
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
svg {
|
|
1755
|
+
width: 16px;
|
|
1756
|
+
height: 16px;
|
|
1757
|
+
}
|
|
1758
|
+
`;qe.span.attrs({className:"retrive-chat-tab-badge"})`
|
|
1759
|
+
position: absolute;
|
|
1760
|
+
top: 4px;
|
|
1761
|
+
right: 10px;
|
|
1762
|
+
display: inline-flex;
|
|
1763
|
+
align-items: center;
|
|
1764
|
+
justify-content: center;
|
|
1765
|
+
min-width: 16px;
|
|
1766
|
+
height: 16px;
|
|
1767
|
+
padding: 0 4px;
|
|
1768
|
+
border-radius: 999px;
|
|
1769
|
+
font-size: 11px;
|
|
1770
|
+
font-weight: 500;
|
|
1771
|
+
background: #ef4444;
|
|
1772
|
+
color: #ffffff;
|
|
1773
|
+
line-height: 1;
|
|
1774
|
+
`;qe.div.attrs({className:"retrive-chat-tab-content"})`
|
|
1775
|
+
padding: 20px;
|
|
1776
|
+
`;qe.div.attrs({className:"retrive-chat-llm-config-container"})`
|
|
1777
|
+
margin-bottom: 20px;
|
|
1778
|
+
`;qe.div.attrs({className:"retrive-chat-llm-config-title"})`
|
|
1779
|
+
display: flex;
|
|
1780
|
+
align-items: center;
|
|
1781
|
+
gap: 8px;
|
|
1782
|
+
font-size: 14px;
|
|
1783
|
+
font-weight: 500;
|
|
1784
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1785
|
+
margin-bottom: 12px;
|
|
1786
|
+
|
|
1787
|
+
.dot {
|
|
1788
|
+
width: 8px;
|
|
1789
|
+
height: 8px;
|
|
1790
|
+
border-radius: 50%;
|
|
1791
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1792
|
+
}
|
|
1793
|
+
`;qe.div.attrs({className:"retrive-chat-llm-config-grid"})`
|
|
1794
|
+
display: grid;
|
|
1795
|
+
grid-template-columns: repeat(2, 1fr);
|
|
1796
|
+
gap: 12px;
|
|
1797
|
+
`;qe.div.attrs({className:"retrive-chat-llm-config-item"})`
|
|
1798
|
+
display: flex;
|
|
1799
|
+
align-items: center;
|
|
1800
|
+
gap: 8px;
|
|
1801
|
+
font-size: 13px;
|
|
1802
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1803
|
+
|
|
1804
|
+
.dot {
|
|
1805
|
+
width: 6px;
|
|
1806
|
+
height: 6px;
|
|
1807
|
+
border-radius: 50%;
|
|
1808
|
+
flex-shrink: 0;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
.dot-green {
|
|
1812
|
+
background: #10b981;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
.dot-blue {
|
|
1816
|
+
background: #3b82f6;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1819
|
+
.dot-purple {
|
|
1820
|
+
background: #8b5cf6;
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.dot-yellow {
|
|
1824
|
+
background: #f59e0b;
|
|
1825
|
+
}
|
|
1826
|
+
`;qe.div.attrs({className:"retrive-chat-semantic-content"})`
|
|
1827
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1828
|
+
line-height: 1.6;
|
|
1829
|
+
font-size: 14px;
|
|
1830
|
+
`;qe.div.attrs({className:"retrive-chat-stats-container"})`
|
|
1831
|
+
display: flex;
|
|
1832
|
+
gap: 16px;
|
|
1833
|
+
padding: 12px 20px;
|
|
1834
|
+
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1835
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1836
|
+
font-size: 12px;
|
|
1837
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1838
|
+
`;qe.div.attrs({className:"retrive-chat-empty-state"})`
|
|
1839
|
+
padding: 24px 16px;
|
|
1840
|
+
text-align: center;
|
|
1841
|
+
font-size: 13px;
|
|
1842
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#9ca3af"}};
|
|
1843
|
+
`;qe.div.attrs({className:"retrive-chat-tools-container"})`
|
|
1844
|
+
display: flex;
|
|
1845
|
+
gap: 8px;
|
|
1846
|
+
padding: 12px 20px;
|
|
1847
|
+
border-top: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1848
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1849
|
+
`;qe.button.attrs({className:"retrive-chat-tool-button"})`
|
|
1850
|
+
display: flex;
|
|
1851
|
+
align-items: center;
|
|
1852
|
+
justify-content: center;
|
|
1853
|
+
width: 32px;
|
|
1854
|
+
height: 32px;
|
|
1855
|
+
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1856
|
+
border-radius: 6px;
|
|
1857
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1858
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1859
|
+
cursor: pointer;
|
|
1860
|
+
transition: all 0.2s ease;
|
|
1861
|
+
|
|
1862
|
+
&:hover {
|
|
1863
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
1864
|
+
border-color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
svg {
|
|
1868
|
+
width: 16px;
|
|
1869
|
+
height: 16px;
|
|
1870
|
+
}
|
|
1871
|
+
`;qe.div.attrs({className:"retrive-chat-prompt-content"})`
|
|
1872
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
1873
|
+
font-size: 13px;
|
|
1874
|
+
line-height: 1.6;
|
|
1875
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1876
|
+
white-space: pre-wrap;
|
|
1877
|
+
word-break: break-word;
|
|
1878
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f9fafb"}};
|
|
1879
|
+
padding: 16px;
|
|
1880
|
+
border-radius: 8px;
|
|
1881
|
+
border: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1882
|
+
`;qe.div.attrs({className:"retrive-chat-config-container"})`
|
|
1883
|
+
display: grid;
|
|
1884
|
+
grid-template-columns: 1fr 1fr;
|
|
1885
|
+
gap: 24px;
|
|
1886
|
+
`;qe.div.attrs({className:"retrive-chat-config-section"})`
|
|
1887
|
+
display: flex;
|
|
1888
|
+
flex-direction: column;
|
|
1889
|
+
`;qe.div.attrs({className:"retrive-chat-config-section-title"})`
|
|
1890
|
+
display: flex;
|
|
1891
|
+
align-items: center;
|
|
1892
|
+
gap: 8px;
|
|
1893
|
+
font-size: 14px;
|
|
1894
|
+
font-weight: 500;
|
|
1895
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1896
|
+
margin-bottom: 16px;
|
|
1897
|
+
|
|
1898
|
+
.dot {
|
|
1899
|
+
width: 8px;
|
|
1900
|
+
height: 8px;
|
|
1901
|
+
border-radius: 50%;
|
|
1902
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1903
|
+
}
|
|
1904
|
+
`;qe.div.attrs({className:"retrive-chat-config-item-list"})`
|
|
1905
|
+
display: flex;
|
|
1906
|
+
flex-direction: column;
|
|
1907
|
+
gap: 12px;
|
|
1908
|
+
`;qe.div.attrs({className:"retrive-chat-config-item"})`
|
|
1909
|
+
display: flex;
|
|
1910
|
+
justify-content: space-between;
|
|
1911
|
+
align-items: center;
|
|
1912
|
+
padding: 8px 0;
|
|
1913
|
+
border-bottom: 1px solid ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.border)||"#e5e7eb"}};
|
|
1914
|
+
|
|
1915
|
+
&:last-child {
|
|
1916
|
+
border-bottom: none;
|
|
1917
|
+
}
|
|
1918
|
+
`;qe.span.attrs({className:"retrive-chat-config-item-label"})`
|
|
1919
|
+
font-size: 13px;
|
|
1920
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#374151"}};
|
|
1921
|
+
`;qe.span.attrs({className:"retrive-chat-config-item-value"})`
|
|
1922
|
+
font-size: 13px;
|
|
1923
|
+
font-weight: 500;
|
|
1924
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1925
|
+
`;qe.span.attrs({className:"retrive-chat-switch-status"})`
|
|
1926
|
+
font-size: 13px;
|
|
1927
|
+
font-weight: 500;
|
|
1928
|
+
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"}};
|
|
1929
|
+
`;qe.div.attrs({className:"retrive-chat-retrieve-container"})`
|
|
1930
|
+
display: flex;
|
|
1931
|
+
flex-direction: column;
|
|
1932
|
+
gap: 4px;
|
|
1933
|
+
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk"})`
|
|
1934
|
+
display: flex;
|
|
1935
|
+
flex-direction: column;
|
|
1936
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1937
|
+
border-radius: 12px;
|
|
1938
|
+
border: 1px solid #f7f7f7;
|
|
1939
|
+
overflow: hidden;
|
|
1940
|
+
transition: all 0.3s ease;
|
|
1941
|
+
|
|
1942
|
+
&:hover {
|
|
1943
|
+
|
|
1944
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
|
|
1945
|
+
|
|
1946
|
+
}
|
|
1947
|
+
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk-header"})`
|
|
1948
|
+
display: flex;
|
|
1949
|
+
align-items: center;
|
|
1950
|
+
justify-content: space-between;
|
|
1951
|
+
padding: 5px 10px;
|
|
1952
|
+
cursor: pointer;
|
|
1953
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#fafafa"}};
|
|
1954
|
+
border-bottom: 1px solid #f7f7f7;
|
|
1955
|
+
transition: background-color 0.2s ease;
|
|
1956
|
+
|
|
1957
|
+
&:hover {
|
|
1958
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f5f5f5"}};
|
|
1959
|
+
}
|
|
1960
|
+
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk-title"})`
|
|
1961
|
+
display: flex;
|
|
1962
|
+
align-items: center;
|
|
1963
|
+
gap: 10px;
|
|
1964
|
+
font-size: 15px;
|
|
1965
|
+
font-weight: 600;
|
|
1966
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
1967
|
+
|
|
1968
|
+
.dot {
|
|
1969
|
+
width: 10px;
|
|
1970
|
+
height: 10px;
|
|
1971
|
+
border-radius: 50%;
|
|
1972
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.primary)||"#3b82f6"}};
|
|
1973
|
+
flex-shrink: 0;
|
|
1974
|
+
}
|
|
1975
|
+
`;qe.div.attrs({className:"retrive-chat-retrieve-chunk-content"})`
|
|
1976
|
+
display: ${({$isExpanded:e})=>e?"flex":"none"};
|
|
1977
|
+
flex-direction: column;
|
|
1978
|
+
gap: 20px;
|
|
1979
|
+
padding: 6px;
|
|
1980
|
+
animation: ${({$isExpanded:e})=>e?"fadeIn":"none"} 0.3s ease;
|
|
1981
|
+
`;qe.div.attrs({className:"retrive-chat-chunk-info-container"})`
|
|
1982
|
+
padding: 12px 0px;
|
|
1983
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#ffffff"}};
|
|
1984
|
+
display: flex;
|
|
1985
|
+
align-items: center;
|
|
1986
|
+
flex-wrap: nowrap;
|
|
1987
|
+
gap: 4px;
|
|
1988
|
+
font-size: 13px;
|
|
1989
|
+
overflow-x: auto;
|
|
1990
|
+
`;qe.div.attrs({className:"retrive-chat-chunk-info-item"})`
|
|
1991
|
+
display: flex;
|
|
1992
|
+
align-items: center;
|
|
1993
|
+
gap: 6px;
|
|
1994
|
+
white-space: nowrap;
|
|
1995
|
+
flex-shrink: 0;
|
|
1996
|
+
`;qe.span.attrs({className:"retrive-chat-chunk-info-label"})`
|
|
1997
|
+
font-size: 13px;
|
|
1998
|
+
font-weight: 400;
|
|
1999
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.disabled)||"#6b7280"}};
|
|
2000
|
+
`;qe.span.attrs({className:"retrive-chat-chunk-info-value"})`
|
|
2001
|
+
font-size: 13px;
|
|
2002
|
+
font-weight: 600;
|
|
2003
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
2004
|
+
padding: 2px 8px;
|
|
2005
|
+
background: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.background)||"#f3f4f6"}};
|
|
2006
|
+
border-radius: 4px;
|
|
2007
|
+
`;qe.div.attrs({className:"retrive-chat-chunk-content-section"})`
|
|
2008
|
+
display: flex;
|
|
2009
|
+
flex-direction: column;
|
|
2010
|
+
gap: 4px;
|
|
2011
|
+
`;qe.div.attrs({className:"retrive-chat-chunk-section-title"})`
|
|
2012
|
+
font-size: 14px;
|
|
2013
|
+
font-weight: 600;
|
|
2014
|
+
color: ${({theme:e})=>{var t;return((t=e.colors)==null?void 0:t.text)||"#111827"}};
|
|
2015
|
+
margin-bottom: 4px;
|
|
2016
|
+
`;qe.div.attrs({className:"retrive-chat-chunk-content-wrapper"})`
|
|
2017
|
+
padding: 12px;
|
|
2018
|
+
background: #f5f5f5;
|
|
2019
|
+
border-radius: 8px;
|
|
2020
|
+
|
|
2021
|
+
`;qe.div.attrs({className:"retrive-chat-chunk-file-source-section"})`
|
|
2022
|
+
display: flex;
|
|
2023
|
+
flex-direction: column;
|
|
2024
|
+
gap: 5px;
|
|
2025
|
+
padding: 15px;
|
|
2026
|
+
`;qe.div.attrs({className:"retrive-chat-file-source"})`
|
|
2027
|
+
display: flex;
|
|
2028
|
+
align-items: flex-end;
|
|
2029
|
+
gap: 8px;
|
|
2030
|
+
`;const Q9=qe.div`
|
|
2031
|
+
position: relative;
|
|
2032
|
+
width: 100%;
|
|
2033
|
+
height: 100%;
|
|
2034
|
+
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
2035
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
2036
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
2037
|
+
|
|
2038
|
+
/* 自定义滚动条 */
|
|
2039
|
+
&::-webkit-scrollbar {
|
|
2040
|
+
width: 8px;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
&::-webkit-scrollbar-track {
|
|
2044
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
2045
|
+
border-radius: 4px;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
&::-webkit-scrollbar-thumb {
|
|
2049
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
2050
|
+
border-radius: 4px;
|
|
2051
|
+
|
|
2052
|
+
&:hover {
|
|
2053
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
`,eD=qe.div`
|
|
2057
|
+
position: relative;
|
|
2058
|
+
width: 100%;
|
|
2059
|
+
height: 100%;
|
|
2060
|
+
overflow: auto;
|
|
2061
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
2062
|
+
|
|
2063
|
+
/* 自定义滚动条 */
|
|
2064
|
+
&::-webkit-scrollbar {
|
|
2065
|
+
width: 8px;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
&::-webkit-scrollbar-track {
|
|
2069
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
2070
|
+
border-radius: 4px;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
&::-webkit-scrollbar-thumb {
|
|
2074
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
2075
|
+
border-radius: 4px;
|
|
2076
|
+
|
|
2077
|
+
&:hover {
|
|
2078
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
`,Op=qe.div`
|
|
2082
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
2083
|
+
min-height: ${e=>e.height||"auto"};
|
|
2084
|
+
|
|
2085
|
+
/* 富文本内容样式增强 */
|
|
2086
|
+
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
2087
|
+
scroll-margin-top: 2rem;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
& img {
|
|
2091
|
+
max-width: 100%;
|
|
2092
|
+
height: auto;
|
|
2093
|
+
border-radius: 0.5rem;
|
|
2094
|
+
margin: 1rem 0;
|
|
2095
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
2096
|
+
transition: transform 0.2s ease-in-out;
|
|
2097
|
+
|
|
2098
|
+
&:hover {
|
|
2099
|
+
transform: scale(1.02);
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
/* 表格样式 - 主题感知 */
|
|
2104
|
+
& .table-container {
|
|
2105
|
+
overflow: auto;
|
|
2106
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
2107
|
+
border-radius: 6px;
|
|
2108
|
+
margin: 1rem 0;
|
|
2109
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
& .table-container table {
|
|
2113
|
+
width: 100%;
|
|
2114
|
+
border-collapse: collapse;
|
|
2115
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
2116
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
& .table-container th,
|
|
2120
|
+
& .table-container td {
|
|
2121
|
+
border: 1px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#e5e7eb"}};
|
|
2122
|
+
padding: 8px 12px;
|
|
2123
|
+
text-align: left;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
& .table-container th {
|
|
2127
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
2128
|
+
font-weight: 600;
|
|
2129
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
& .table-container td {
|
|
2133
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
& .table-container tr:nth-child(even) {
|
|
2137
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.disabledBackground)||"#f6f8fa"}};
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
& pre {
|
|
2141
|
+
position: relative;
|
|
2142
|
+
|
|
2143
|
+
&::before {
|
|
2144
|
+
content: '';
|
|
2145
|
+
position: absolute;
|
|
2146
|
+
top: 0;
|
|
2147
|
+
left: 0;
|
|
2148
|
+
right: 0;
|
|
2149
|
+
height: 2px;
|
|
2150
|
+
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
2151
|
+
border-radius: 2px 2px 0 0;
|
|
2152
|
+
}
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
& blockquote {
|
|
2156
|
+
position: relative;
|
|
2157
|
+
|
|
2158
|
+
&::before {
|
|
2159
|
+
content: '"';
|
|
2160
|
+
position: absolute;
|
|
2161
|
+
top: -0.5rem;
|
|
2162
|
+
left: -1rem;
|
|
2163
|
+
font-size: 3rem;
|
|
2164
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
2165
|
+
opacity: 0.3;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
|
|
2170
|
+
`,tD=qe.div`
|
|
2171
|
+
display: flex;
|
|
2172
|
+
align-items: center;
|
|
2173
|
+
justify-content: center;
|
|
2174
|
+
padding: 2rem;
|
|
2175
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
2176
|
+
font-size: 0.875rem;
|
|
2177
|
+
|
|
2178
|
+
&::before {
|
|
2179
|
+
content: '';
|
|
2180
|
+
width: 20px;
|
|
2181
|
+
height: 20px;
|
|
2182
|
+
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
2183
|
+
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
2184
|
+
border-radius: 50%;
|
|
2185
|
+
animation: spin 1s linear infinite;
|
|
2186
|
+
margin-right: 0.5rem;
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
@keyframes spin {
|
|
2190
|
+
0% { transform: rotate(0deg); }
|
|
2191
|
+
100% { transform: rotate(360deg); }
|
|
2192
|
+
}
|
|
2193
|
+
`,rD=qe.div`
|
|
2194
|
+
display: flex;
|
|
2195
|
+
flex-direction: column;
|
|
2196
|
+
align-items: center;
|
|
2197
|
+
justify-content: center;
|
|
2198
|
+
padding: 3rem;
|
|
2199
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
2200
|
+
text-align: center;
|
|
2201
|
+
|
|
2202
|
+
&::before {
|
|
2203
|
+
content: '📄';
|
|
2204
|
+
font-size: 3rem;
|
|
2205
|
+
margin-bottom: 1rem;
|
|
2206
|
+
}
|
|
2207
|
+
`,nD=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:a=!1,onLoadMore:i,isLoadingMore:c=!1,size:u="sm",basePath:f,theme:d={},onChange:m,onScroll:g,onScrollToTop:v,onScrollToBottom:w,onSegmentClick:x,className:C,style:p,height:A="100%",enablePrism:B=!1})=>{const k=typeof B=="boolean"?B:!1,N=As(),F=xt(()=>{var ge,De,ke,Be,xe,Se,ze,dt,at;return{primaryColor:(d==null?void 0:d.primaryColor)||((ge=N==null?void 0:N.colors)==null?void 0:ge.primary)||"#007bff",secondaryColor:(d==null?void 0:d.secondaryColor)||((De=N==null?void 0:N.colors)==null?void 0:De.secondary)||"#6c757d",backgroundColor:(d==null?void 0:d.backgroundColor)||((ke=N==null?void 0:N.colors)==null?void 0:ke.background)||"#ffffff",textColor:(d==null?void 0:d.textColor)||((Be=N==null?void 0:N.colors)==null?void 0:Be.text)||"#24292f",borderColor:(d==null?void 0:d.borderColor)||((xe=N==null?void 0:N.colors)==null?void 0:xe.border)||"#dee2e6",disabledBackground:(d==null?void 0:d.disabledBackground)||((Se=N==null?void 0:N.colors)==null?void 0:Se.disabledBackground)||"#f8f9fa",hoverBackground:(d==null?void 0:d.hoverBackground)||((ze=N==null?void 0:N.colors)==null?void 0:ze.hoverBackground)||"#e9ecef",borderRadius:(d==null?void 0:d.borderRadius)||((dt=N==null?void 0:N.space)==null?void 0:dt.radius)||"8px",padding:(d==null?void 0:d.padding)||((at=N==null?void 0:N.space)==null?void 0:at.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]),R=Zt(0);R.current+=1,console.log("[Markdownit] render count:",R.current);const[S,z]=$t([]),[O,V]=$t({start:0,end:10}),[I,X]=$t(0),[Z,L]=$t(0),[K,W]=$t(!1),[G,ne]=$t(!1),[q,J]=$t(!1),me=Zt(null),Ce=Zt(null),we=Zt(null),Fe=xt(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);sr(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(Fe)?Fe.length:"n/a"),z(Fe)},[Fe]);const Ie=xt(()=>t?`${S.length*r}px`:"auto",[S.length,r,t]),Q=xt(()=>{if(!t)return S;const ge=Math.max(0,O.start-n),De=Math.min(S.length,O.end+n);return S.slice(ge,De).map((ke,Be)=>({...ke,virtualIndex:ge+Be}))},[S,O,t,n]),le=zt(ge=>{const{scrollTop:De,scrollHeight:ke,clientHeight:Be}=ge.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:De,scrollHeight:ke,clientHeight:Be});const xe=!t&&!g&&!v&&!w&&!a;if(console.log("[Markdownit] passiveOnly:",xe),xe||X(Se=>Se!==De?(console.log("[Markdownit] setScrollTop:",De),De):Se),t&&!xe){const Se=Math.floor(De/r),ze=Math.min(S.length,Se+Math.ceil(Z/r)+1);V(dt=>dt.start!==Se||dt.end!==ze?(console.log("[Markdownit] setVisibleRange:",{start:Se,end:ze}),{start:Se,end:ze}):dt)}if(!xe){const Se=De<=10;Se!==G&&(console.log("[Markdownit] isAtTop ->",Se),ne(Se),Se&&v&&(console.log("[Markdownit] onScrollToTop callback"),v()))}if(!xe){const Se=De+Be>=ke-10;Se!==q&&(console.log("[Markdownit] isAtBottom ->",Se),J(Se),Se&&w&&(console.log("[Markdownit] onScrollToBottom callback"),w()))}g&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:De,scrollHeight:ke}),g(De,ke)),a&&i&&!K&&!c&&ke-De-Z<100&&ce()},[t,r,S.length,Z,a,i,K,c,G,q,v,w,g]),ce=zt(async()=>{if(!(!i||K||c)){W(!0);try{const ge=S[S.length-1],De=await i(ge.id);z(ke=>[...ke,...De])}catch(ge){console.error("Failed to load more segments:",ge)}finally{W(!1)}}},[i,S,K,c]);sr(()=>{const ge=()=>{me.current&&L(me.current.clientHeight)};return ge(),window.addEventListener("resize",ge),()=>window.removeEventListener("resize",ge)},[]);const de=zt((ge,De)=>{const ke={type:ge.type,content:ge.content},Be=t?{position:"absolute",top:`${(ge.virtualIndex||De)*r}px`,left:0,right:0,height:`${r}px`}:{};return H.jsx("div",{style:Be,onClick:()=>x==null?void 0:x(ge.id,ge),className:x?"cursor-pointer hover:bg-gray-50":"",children:H.jsx(qs,{dataSource:ke,isEditing:!1,size:u,basePath:f,theme:F,onChange:m,enablePrism:k,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},ge.id)},[t,r,F,m,x,k]),Ee=()=>(console.log("[Markdownit] renderContent segments.len:",S.length,"enableVirtualScroll:",t),S.length===0?H.jsxs(rD,{theme:F,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:we,style:{height:Ie,position:"relative"},children:Q.map(de)}):H.jsx("div",{ref:we,children:S.map(de)})),Ne=()=>!K&&!c?null:H.jsx(tD,{theme:F,children:c?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return H.jsx(Q9,{ref:me,theme:F,$isVirtualized:t,className:C,style:{height:A,...p},children:t?H.jsx(eD,{ref:Ce,theme:F,onScroll:le,children:H.jsx(Op,{theme:F,height:Ie,children:Ee()})}):H.jsxs(Op,{theme:F,onScroll:le,children:[Ee(),Ne()]})})},gD=e=>{const{onRendered:t}=e;return sr(()=>{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(nD,{...e})})};qe.div.attrs({className:"prompt-temp-designer-editor-wrapper"})`
|
|
2208
|
+
position: relative;
|
|
2209
|
+
`;qe.div.attrs({className:"prompt-temp-designer-template-suggest-hint"})`
|
|
2210
|
+
position: absolute;
|
|
2211
|
+
right: 12px;
|
|
2212
|
+
bottom: 8px;
|
|
2213
|
+
padding: 2px 8px;
|
|
2214
|
+
border-radius: 12px;
|
|
2215
|
+
background: rgba(5, 90, 255, 0.06);
|
|
2216
|
+
color: #055aff;
|
|
2217
|
+
font-size: 12px;
|
|
2218
|
+
display: flex;
|
|
2219
|
+
align-items: center;
|
|
2220
|
+
gap: 4px;
|
|
2221
|
+
pointer-events: none;
|
|
2222
|
+
user-select: none;
|
|
2223
|
+
`;const Mp=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,a,i=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(a=t.exec(e))!==null;){const c=a[0],u=a[1]||"",f=(a[2]||"").trim(),d=a.index,m=d+c.length;if(d>n){const A=e.slice(n,d);A.trim()!==""&&(r.push({text:A}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:A}))}const g=A=>{const B=new RegExp(`${A}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
2224
|
+
])*?)\\1`,"i"),k=u.match(B);return k?k[2]:void 0},v=/\S/.test(u),w=g("key"),x=g("placeholder"),C=w||`template-${Date.now()}-${i++}`,p={type:"template",key:C,placeholder:v?x||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":f||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:v?f:"",style:"blue",fieldId:C,children:[{text:""}],inline:!0};r.push(p),console.log("\u6DFB\u52A0template\u5143\u7D20:",p),n=m}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)},Cu=e=>{if(!e||e.length===0)return"";const t=n=>{let a="",i="";return n.forEach(c=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",c),(c==null?void 0:c.type)==="template"){const f=c.key||c.fieldId||"",d=c.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",m=c.value||"",g=` key="${String(f)}" placeholder="${String(d)}"`;a+=`<template${g}>${m}</template>`,i=m||d;return}if((c==null?void 0:c.text)!==void 0){const f=c.text||"";if(f.trim()===""){console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20");return}if(f===i){console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20");return}console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${f}`),a+=f,i=f;return}console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",c);const u=(c==null?void 0:c.text)||"";u.trim()!==""&&u!==i&&(a+=u,i=u)}),a};console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2));const r=(Array.isArray(e)?e:[]).map(n=>n?n.children?t(n.children):n.text||"":"").join(`
|
|
2225
|
+
`);return console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},aD=e=>!e||e.length===0?"":(Array.isArray(e)?e:[]).map(t=>{if(!t)return"";if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{(n==null?void 0:n.text)!==void 0?r+=n.text:(n==null?void 0:n.type)==="template"&&(r+=n.value||n.placeholder||"")}),r}).join(`
|
|
2226
|
+
`),oD=e=>!e||e.length===0?"":(Array.isArray(e)?e:[]).map(t=>{if(!t)return"";if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{(n==null?void 0:n.text)!==void 0?r+=n.text:(n==null?void 0:n.type)==="template"&&(r+=`\`\`\`template\`\`\`
|
|
2227
|
+
${n.value||n.placeholder}\`\`\`
|
|
2228
|
+
\`\`\`
|
|
2229
|
+
`)}),r}).join(`
|
|
2230
|
+
`),iD=e=>!e||e.length===0?"":(Array.isArray(e)?e:[]).map(t=>{if(!t)return"";if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if((n==null?void 0:n.text)!==void 0)r+=n.text;else if((n==null?void 0:n.type)==="template"){const a=n.key||n.fieldId||"",i=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",c=n.value||"",u=` key="${String(a)}" placeholder="${String(i)}"`;r+=`<template${u}>${c}</template>`}}),r}).join(`
|
|
2231
|
+
`),vD=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:a,enablePrism:i=!1})=>{var A,B,k,N,F,R,S,z,O,V,I,X,Z,L,K,W,G,ne,q,J,me,Ce,we,Fe,Ie,Q,le,ce,de,Ee,Ne,ge,De,ke,Be,xe,Se,ze,dt,at,$e,Le,Ge,ht,et,nt,Ot,At,Tt,Mt,je,he;const c=As(),u={theme:{colors:{primary:((A=c==null?void 0:c.colors)==null?void 0:A.primary)||"#055AFF",secondary:((B=c==null?void 0:c.colors)==null?void 0:B.secondary)||"#84ADFF",background:((k=c==null?void 0:c.colors)==null?void 0:k.background)||"#E5EEFF",text:((N=c==null?void 0:c.colors)==null?void 0:N.text)||"#055AFF",border:((F=c==null?void 0:c.colors)==null?void 0:F.border)||"#84ADFF",success:((R=c==null?void 0:c.colors)==null?void 0:R.success)||"#008000",warning:((S=c==null?void 0:c.colors)==null?void 0:S.warning)||"#FFA500",error:((z=c==null?void 0:c.colors)==null?void 0:z.error)||"#FF0000",info:((O=c==null?void 0:c.colors)==null?void 0:O.info)||"#0000FF",disabled:((V=c==null?void 0:c.colors)==null?void 0:V.disabled)||"#808080",disabledBackground:((I=c==null?void 0:c.colors)==null?void 0:I.disabledBackground)||"#F5F5F5",disabledText:((X=c==null?void 0:c.colors)==null?void 0:X.disabledText)||"#808080",shadow:((Z=c==null?void 0:c.colors)==null?void 0:Z.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((L=c==null?void 0:c.colors)==null?void 0:L.appBackground)||"transparent",listBackground:((K=c==null?void 0:c.colors)==null?void 0:K.listBackground)||"#f9f9f9",dashboardBackground:((W=c==null?void 0:c.colors)==null?void 0:W.dashboardBackground)||"#ffffff",textSecondary:((G=c==null?void 0:c.colors)==null?void 0:G.textSecondary)||"#6b7280"},space:{sidebar:((ne=c==null?void 0:c.space)==null?void 0:ne.sidebar)||"260px",size:((q=c==null?void 0:c.space)==null?void 0:q.size)||"12px",radius:((J=c==null?void 0:c.space)==null?void 0:J.radius)||"6px",padding:((me=c==null?void 0:c.space)==null?void 0:me.padding)||"16px",margin:((Ce=c==null?void 0:c.space)==null?void 0:Ce.margin)||"20px",shadow:((we=c==null?void 0:c.space)==null?void 0:we.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((Fe=c==null?void 0:c.space)==null?void 0:Fe.lineHeight)||"1.6"},icons:(c==null?void 0:c.icons)||{},fonts:{body:{size:((Q=(Ie=c==null?void 0:c.fonts)==null?void 0:Ie.body)==null?void 0:Q.size)||"14px",weight:((ce=(le=c==null?void 0:c.fonts)==null?void 0:le.body)==null?void 0:ce.weight)||"normal",family:((Ee=(de=c==null?void 0:c.fonts)==null?void 0:de.body)==null?void 0:Ee.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((ge=(Ne=c==null?void 0:c.fonts)==null?void 0:Ne.heading)==null?void 0:ge.size)||"16px",weight:((ke=(De=c==null?void 0:c.fonts)==null?void 0:De.heading)==null?void 0:ke.weight)||"600",family:((xe=(Be=c==null?void 0:c.fonts)==null?void 0:Be.heading)==null?void 0:xe.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((Se=c==null?void 0:c.others)==null?void 0:Se.baseFontWeight)||"normal"}},mode:(c==null?void 0:c.mode)||"light"},f={backgroundColor:((ze=c==null?void 0:c.colors)==null?void 0:ze.background)||"#E5EEFF",borderColor:((dt=c==null?void 0:c.colors)==null?void 0:dt.border)||"#84ADFF",borderRadius:((at=c==null?void 0:c.space)==null?void 0:at.radius)||"6px",padding:(($e=c==null?void 0:c.space)==null?void 0:$e.padding)||"8px 12px",margin:"2px",fontSize:((Ge=(Le=c==null?void 0:c.fonts)==null?void 0:Le.body)==null?void 0:Ge.size)||"14px",fontWeight:((et=(ht=c==null?void 0:c.fonts)==null?void 0:ht.body)==null?void 0:et.weight)||"500",minWidth:"30px",textColor:((nt=c==null?void 0:c.colors)==null?void 0:nt.text)||"#84ADFF"},d={...u,...n,theme:{...u.theme,...n==null?void 0:n.theme,colors:{...(Ot=u.theme)==null?void 0:Ot.colors,...(At=n==null?void 0:n.theme)==null?void 0:At.colors},space:{...(Tt=u.theme)==null?void 0:Tt.space,...(Mt=n==null?void 0:n.theme)==null?void 0:Mt.space},fonts:{...(je=u.theme)==null?void 0:je.fonts,...(he=n==null?void 0:n.theme)==null?void 0:he.fonts}},templateField:{...f,...n==null?void 0:n.templateField}},[m,g]=$t(()=>Mp(e)),[v,w]=$t(!1),x=Zt(e);sr(()=>{if(e===x.current)return;console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const ut=Mp(e);console.log("\u65B0\u7684Slate\u6570\u636E:",ut),g(ut)},[e]),sr(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",m)},[m]);const C=zt((ut,Lt)=>{if(Lt===di.SLATE&&ut){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",ut),g(ut);try{const Bt=Array.isArray(ut)&&ut.length>0?ut[ut.length-1]:null,Ft=Bt&&Array.isArray(Bt.children)?Bt.children:[],Dt=Ft.length>0?Ft[Ft.length-1]:null,Ht=(Dt&&typeof Dt.text=="string"?Dt.text:"").endsWith("<t");w(Ht)}catch(Bt){console.warn("PromptTempDesigner: \u65E0\u6CD5\u5224\u65AD\u6A21\u677F\u63D0\u793A\u89E6\u53D1\u72B6\u6001:",Bt),w(!1)}const Pt=Cu(ut);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Pt),x.current=Pt,t==null||t(Pt)}},[t]),p=zt(ut=>{if(!m||m.length===0)return"";switch(ut){case"pure_string":return aD(m);case"string":return Cu(m);case"markdown":return oD(m);case"html":return iD(m);default:return Cu(m)}},[m]);return sr(()=>{a==null||a(p)},[p,a]),H.jsx(qs,{dataSource:{type:di.SLATE,content:m},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:C,size:"md",styles:d,enableTemplateInput:!0,enablePrism:i,enableTemplateAutocomplete:!0})};export{di as C,ha as F,$0 as T,pD as b,vD as i,mD as n,gD as s};
|