markdown-flow-ui 0.1.92 → 0.1.93-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js +1 -1
  2. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js.map +1 -1
  3. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
  4. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +1 -1
  5. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +1 -1
  6. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/diff@5.2.0/node_modules/diff/lib/index.cjs.js +6 -0
  7. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/diff@5.2.0/node_modules/diff/lib/index.cjs.js.map +1 -0
  8. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/diff@5.2.0/node_modules/diff/lib/index.es.js +350 -0
  9. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/diff@5.2.0/node_modules/diff/lib/index.es.js.map +1 -0
  10. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.cjs.js +1 -1
  11. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.es.js +1 -1
  12. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.cjs.js +1 -1
  13. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.es.js +1 -1
  14. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.cjs.js +1 -1
  15. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.es.js +1 -1
  16. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.cjs.js +1 -1
  17. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.es.js +1 -1
  18. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.cjs.js +1 -1
  19. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.es.js +1 -1
  20. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.cjs.js +1 -1
  21. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.es.js +1 -1
  22. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.cjs.js +1 -1
  23. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
  24. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.cjs.js +1 -1
  25. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.es.js +1 -1
  26. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.cjs.js +1 -1
  27. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.es.js +1 -1
  28. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/index.cjs.js +1 -1
  29. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/index.es.js +1 -1
  30. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-custom-variable.cjs.js +1 -1
  31. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-custom-variable.es.js +1 -1
  32. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-interaction.cjs.js +1 -1
  33. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-flow@0.1.6/node_modules/remark-flow/dist/remark-interaction.es.js +1 -1
  34. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.cjs.js +1 -1
  35. package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.es.js +1 -1
  36. package/dist/_virtual/index.cjs10.js +1 -1
  37. package/dist/_virtual/index.cjs2.js +1 -1
  38. package/dist/_virtual/index.cjs3.js +1 -1
  39. package/dist/_virtual/index.cjs4.js +1 -1
  40. package/dist/_virtual/index.cjs7.js +1 -1
  41. package/dist/_virtual/index.cjs8.js +1 -1
  42. package/dist/_virtual/index.es10.js +2 -2
  43. package/dist/_virtual/index.es2.js +5 -2
  44. package/dist/_virtual/index.es2.js.map +1 -1
  45. package/dist/_virtual/index.es3.js +2 -4
  46. package/dist/_virtual/index.es3.js.map +1 -1
  47. package/dist/_virtual/index.es4.js +4 -5
  48. package/dist/_virtual/index.es4.js.map +1 -1
  49. package/dist/_virtual/index.es7.js +2 -3
  50. package/dist/_virtual/index.es7.js.map +1 -1
  51. package/dist/_virtual/index.es8.js +3 -2
  52. package/dist/_virtual/index.es8.js.map +1 -1
  53. package/dist/components/ContentRender/ContentRender.cjs.js +2 -2
  54. package/dist/components/ContentRender/ContentRender.cjs.js.map +1 -1
  55. package/dist/components/ContentRender/ContentRender.es.js +111 -104
  56. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  57. package/dist/components/ContentRender/ContentRender.stories.d.ts +1 -0
  58. package/dist/components/ContentRender/IframeSandbox.cjs.js +6 -5
  59. package/dist/components/ContentRender/IframeSandbox.cjs.js.map +1 -1
  60. package/dist/components/ContentRender/IframeSandbox.es.js +104 -98
  61. package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
  62. package/dist/components/ContentRender/SandboxApp.cjs.js +3 -2
  63. package/dist/components/ContentRender/SandboxApp.cjs.js.map +1 -1
  64. package/dist/components/ContentRender/SandboxApp.es.js +92 -84
  65. package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
  66. package/dist/components/ContentRender/blackboard/blackboard-runtime.cjs.js +5 -0
  67. package/dist/components/ContentRender/blackboard/blackboard-runtime.cjs.js.map +1 -0
  68. package/dist/components/ContentRender/blackboard/blackboard-runtime.d.ts +18 -0
  69. package/dist/components/ContentRender/blackboard/blackboard-runtime.es.js +137 -0
  70. package/dist/components/ContentRender/blackboard/blackboard-runtime.es.js.map +1 -0
  71. package/dist/components/ContentRender/blackboard/diff-parser.cjs.js +2 -0
  72. package/dist/components/ContentRender/blackboard/diff-parser.cjs.js.map +1 -0
  73. package/dist/components/ContentRender/blackboard/diff-parser.d.ts +8 -0
  74. package/dist/components/ContentRender/blackboard/diff-parser.es.js +132 -0
  75. package/dist/components/ContentRender/blackboard/diff-parser.es.js.map +1 -0
  76. package/dist/components/ContentRender/blackboard/diff-parser.test.d.ts +1 -0
  77. package/dist/components/ContentRender/blackboard-vendor.cjs.js +2 -0
  78. package/dist/components/ContentRender/blackboard-vendor.cjs.js.map +1 -0
  79. package/dist/components/ContentRender/blackboard-vendor.d.ts +5 -0
  80. package/dist/components/ContentRender/blackboard-vendor.es.js +15 -0
  81. package/dist/components/ContentRender/blackboard-vendor.es.js.map +1 -0
  82. package/dist/components/ContentRender/index.cjs.js +1 -1
  83. package/dist/components/ContentRender/index.es.js +1 -0
  84. package/dist/components/ContentRender/index.es.js.map +1 -1
  85. package/dist/components/ContentRender/utils/split-content.cjs.js +2 -2
  86. package/dist/components/ContentRender/utils/split-content.cjs.js.map +1 -1
  87. package/dist/components/ContentRender/utils/split-content.es.js +118 -109
  88. package/dist/components/ContentRender/utils/split-content.es.js.map +1 -1
  89. package/dist/components/ContentRender/vendor/daisyui-v4.min.css.cjs.js +22 -0
  90. package/dist/components/ContentRender/vendor/daisyui-v4.min.css.cjs.js.map +1 -0
  91. package/dist/components/ContentRender/vendor/daisyui-v4.min.css.es.js +25 -0
  92. package/dist/components/ContentRender/vendor/daisyui-v4.min.css.es.js.map +1 -0
  93. package/dist/components/ContentRender/vendor/gsap-v3.min.cjs.js +12 -0
  94. package/dist/components/ContentRender/vendor/gsap-v3.min.cjs.js.map +1 -0
  95. package/dist/components/ContentRender/vendor/gsap-v3.min.es.js +15 -0
  96. package/dist/components/ContentRender/vendor/gsap-v3.min.es.js.map +1 -0
  97. package/dist/components/ContentRender/vendor/tailwindcss-v3.min.cjs.js +2 -0
  98. package/dist/components/ContentRender/vendor/tailwindcss-v3.min.cjs.js.map +1 -0
  99. package/dist/components/ContentRender/vendor/tailwindcss-v3.min.es.js +5 -0
  100. package/dist/components/ContentRender/vendor/tailwindcss-v3.min.es.js.map +1 -0
  101. package/dist/components/MarkdownFlow/MarkdownFlow.cjs.js +1 -1
  102. package/dist/components/MarkdownFlow/MarkdownFlow.cjs.js.map +1 -1
  103. package/dist/components/MarkdownFlow/MarkdownFlow.es.js +3 -2
  104. package/dist/components/MarkdownFlow/MarkdownFlow.es.js.map +1 -1
  105. package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
  106. package/dist/components/ui/inputGroup/textarea.es.js +1 -1
  107. package/dist/markdown-flow-ui-lib.css +1 -1
  108. package/package.json +4 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Y=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.cjs.js"),F=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.cjs.js"),N=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectSpread2.cjs.js"),J=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.cjs.js"),f=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.cjs.js"),K=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.cjs.js"),Q=require("../../../../../../../../../_virtual/index.cjs4.js"),ee=require("../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.cjs.js"),j=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.cjs.js"),te=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.cjs.js"),w=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/raf.cjs.js"),ae=require("react"),re=require("./calculateNodeHeight.cjs.js");function ne(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(o,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return o.default=n,Object.freeze(o)}const t=ne(ae);var ue=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],g=0,m=1,_=2,le=t.forwardRef(function(n,o){var e=n,s=e.prefixCls,O=e.defaultValue,p=e.value,a=e.autoSize,i=e.onResize,T=e.className,$=e.style,b=e.disabled,c=e.onChange,d=e.onInternalAutoSize,P=K.default(e,ue),V=te.default(O,{value:p,postState:function(r){return r??""}}),y=f.default(V,2),D=y[0],Z=y[1],H=function(r){Z(r.target.value),c?.(r)},S=t.useRef();t.useImperativeHandle(o,function(){return{textArea:S.current}});var L=t.useMemo(function(){return a&&J.default(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),E=f.default(L,2),q=E[0],x=E[1],R=!!a,k=t.useState(_),A=f.default(k,2),u=A[0],v=A[1],B=t.useState(),I=f.default(B,2),G=I[0],U=I[1],M=function(){v(g),process.env.NODE_ENV==="test"&&d?.()};j.default(function(){R&&M()},[p,q,x,R]),j.default(function(){if(u===g)v(m);else if(u===m){var l=re.default(S.current,!1,q,x);v(_),U(l)}},[u]);var h=t.useRef(),C=function(){w.default.cancel(h.current)},W=function(r){u===_&&(i?.(r),a&&(C(),h.current=w.default(function(){M()})))};t.useEffect(function(){return C},[]);var X=R?G:null,z=N.default(N.default({},$),X);return(u===g||u===m)&&(z.overflowY="hidden",z.overflowX="hidden"),t.createElement(ee.default,{onResize:W,disabled:!(a||i)},t.createElement("textarea",Y.default({},P,{ref:S,style:z,className:Q.default(s,T,F.default({},"".concat(s,"-disabled"),b)),disabled:b,value:D,onChange:H})))});exports.default=le;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Y=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.cjs.js"),F=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.cjs.js"),N=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectSpread2.cjs.js"),J=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.cjs.js"),f=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.cjs.js"),K=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.cjs.js"),Q=require("../../../../../../../../../_virtual/index.cjs2.js"),ee=require("../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.cjs.js"),j=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.cjs.js"),te=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.cjs.js"),w=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/raf.cjs.js"),ae=require("react"),re=require("./calculateNodeHeight.cjs.js");function ne(n){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(o,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return o.default=n,Object.freeze(o)}const t=ne(ae);var ue=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],g=0,m=1,_=2,le=t.forwardRef(function(n,o){var e=n,s=e.prefixCls,O=e.defaultValue,p=e.value,a=e.autoSize,i=e.onResize,T=e.className,$=e.style,b=e.disabled,c=e.onChange,d=e.onInternalAutoSize,P=K.default(e,ue),V=te.default(O,{value:p,postState:function(r){return r??""}}),y=f.default(V,2),D=y[0],Z=y[1],H=function(r){Z(r.target.value),c?.(r)},S=t.useRef();t.useImperativeHandle(o,function(){return{textArea:S.current}});var L=t.useMemo(function(){return a&&J.default(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),E=f.default(L,2),q=E[0],x=E[1],R=!!a,k=t.useState(_),A=f.default(k,2),u=A[0],v=A[1],B=t.useState(),I=f.default(B,2),G=I[0],U=I[1],M=function(){v(g),process.env.NODE_ENV==="test"&&d?.()};j.default(function(){R&&M()},[p,q,x,R]),j.default(function(){if(u===g)v(m);else if(u===m){var l=re.default(S.current,!1,q,x);v(_),U(l)}},[u]);var h=t.useRef(),C=function(){w.default.cancel(h.current)},W=function(r){u===_&&(i?.(r),a&&(C(),h.current=w.default(function(){M()})))};t.useEffect(function(){return C},[]);var X=R?G:null,z=N.default(N.default({},$),X);return(u===g||u===m)&&(z.overflowY="hidden",z.overflowX="hidden"),t.createElement(ee.default,{onResize:W,disabled:!(a||i)},t.createElement("textarea",Y.default({},P,{ref:S,style:z,className:Q.default(s,T,F.default({},"".concat(s,"-disabled"),b)),disabled:b,value:D,onChange:H})))});exports.default=le;
2
2
  //# sourceMappingURL=ResizableTextArea.cjs.js.map
@@ -4,7 +4,7 @@ import w from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
4
4
  import J from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/typeof.es.js";
5
5
  import s from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.es.js";
6
6
  import K from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.es.js";
7
- import Q from "../../../../../../../../../_virtual/index.es4.js";
7
+ import Q from "../../../../../../../../../_virtual/index.es2.js";
8
8
  import ee from "../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.es.js";
9
9
  import M from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.es.js";
10
10
  import te from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.es.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const be=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.cjs.js"),X=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.cjs.js"),d=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectSpread2.cjs.js"),ze=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toConsumableArray.cjs.js"),x=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.cjs.js"),qe=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.cjs.js"),g=require("../../../../../../../../../_virtual/index.cjs4.js"),Te=require("../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.cjs.js"),Ae=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.cjs.js"),n=require("react"),Fe=require("../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/hooks/useCount.cjs.js"),Y=require("../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/utils/commonUtils.cjs.js"),Ne=require("./ResizableTextArea.cjs.js");var Oe=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],$e=n.forwardRef(function(t,Z){var C,B=t.defaultValue,_=t.value,p=t.onFocus,y=t.onBlur,L=t.onChange,R=t.allowClear,M=t.maxLength,S=t.onCompositionStart,w=t.onCompositionEnd,ee=t.suffix,P=t.prefixCls,s=P===void 0?"rc-textarea":P,E=t.showCount,te=t.count,ae=t.className,v=t.style,m=t.disabled,ne=t.hidden,l=t.classNames,i=t.styles,b=t.onResize,oe=t.onClear,D=t.onPressEnter,K=t.readOnly,V=t.autoSize,z=t.onKeyDown,le=qe.default(t,Oe),re=Ae.default(B,{value:_,defaultValue:B}),W=x.default(re,2),q=W[0],j=W[1],T=q==null?"":String(q),ue=n.useState(!1),k=x.default(ue,2),se=k[0],A=k[1],F=n.useRef(!1),ie=n.useState(null),H=x.default(ie,2),de=H[0],ce=H[1],U=n.useRef(null),N=n.useRef(null),r=function(){var e;return(e=N.current)===null||e===void 0?void 0:e.textArea},G=function(){r().focus()};n.useImperativeHandle(Z,function(){var a;return{resizableTextArea:N.current,focus:G,blur:function(){r().blur()},nativeElement:((a=U.current)===null||a===void 0?void 0:a.nativeElement)||r()}}),n.useEffect(function(){A(function(a){return!m&&a})},[m]);var fe=n.useState(null),J=x.default(fe,2),O=J[0],ve=J[1];n.useEffect(function(){if(O){var a;(a=r()).setSelectionRange.apply(a,ze.default(O))}},[O]);var o=Fe.default(te,E),c=(C=o.max)!==null&&C!==void 0?C:M,me=Number(c)>0,$=o.strategy(T),he=!!c&&$>c,Q=function(e,u){var h=u;!F.current&&o.exceedFormatter&&o.max&&o.strategy(u)>o.max&&(h=o.exceedFormatter(u,{max:o.max}),u!==h&&ve([r().selectionStart||0,r().selectionEnd||0])),j(h),Y.resolveOnChange(e.currentTarget,e,L,h)},xe=function(e){F.current=!0,S?.(e)},ge=function(e){F.current=!1,Q(e,e.currentTarget.value),w?.(e)},Ce=function(e){Q(e,e.target.value)},pe=function(e){e.key==="Enter"&&D&&D(e),z?.(e)},ye=function(e){A(!0),p?.(e)},Re=function(e){A(!1),y?.(e)},Se=function(e){j(""),G(),Y.resolveOnChange(r(),e,L)},I=ee,f;o.show&&(o.showFormatter?f=o.showFormatter({value:T,count:$,maxLength:c}):f="".concat($).concat(me?" / ".concat(c):""),I=n.createElement(n.Fragment,null,I,n.createElement("span",{className:g.default("".concat(s,"-data-count"),l?.count),style:i?.count},f)));var we=function(e){var u;b?.(e),(u=r())!==null&&u!==void 0&&u.style.height&&ce(!0)},Ee=!V&&!E&&!R;return n.createElement(Te.default,{ref:U,value:T,allowClear:R,handleReset:Se,suffix:I,prefixCls:s,classNames:d.default(d.default({},l),{},{affixWrapper:g.default(l?.affixWrapper,X.default(X.default({},"".concat(s,"-show-count"),E),"".concat(s,"-textarea-allow-clear"),R))}),disabled:m,focused:se,className:g.default(ae,he&&"".concat(s,"-out-of-range")),style:d.default(d.default({},v),de&&!Ee?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof f=="string"?f:void 0}},hidden:ne,readOnly:K,onClear:oe},n.createElement(Ne.default,be.default({},le,{autoSize:V,maxLength:M,onKeyDown:pe,onChange:Ce,onFocus:ye,onBlur:Re,onCompositionStart:xe,onCompositionEnd:ge,className:g.default(l?.textarea),style:d.default(d.default({},i?.textarea),{},{resize:v?.resize}),disabled:m,prefixCls:s,onResize:we,ref:N,readOnly:K})))});exports.default=$e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const be=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/extends.cjs.js"),X=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/defineProperty.cjs.js"),d=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectSpread2.cjs.js"),ze=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toConsumableArray.cjs.js"),x=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.cjs.js"),qe=require("../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.cjs.js"),g=require("../../../../../../../../../_virtual/index.cjs2.js"),Te=require("../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.cjs.js"),Ae=require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.cjs.js"),n=require("react"),Fe=require("../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/hooks/useCount.cjs.js"),Y=require("../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/utils/commonUtils.cjs.js"),Ne=require("./ResizableTextArea.cjs.js");var Oe=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],$e=n.forwardRef(function(t,Z){var C,B=t.defaultValue,_=t.value,p=t.onFocus,y=t.onBlur,L=t.onChange,R=t.allowClear,M=t.maxLength,S=t.onCompositionStart,w=t.onCompositionEnd,ee=t.suffix,P=t.prefixCls,s=P===void 0?"rc-textarea":P,E=t.showCount,te=t.count,ae=t.className,v=t.style,m=t.disabled,ne=t.hidden,l=t.classNames,i=t.styles,b=t.onResize,oe=t.onClear,D=t.onPressEnter,K=t.readOnly,V=t.autoSize,z=t.onKeyDown,le=qe.default(t,Oe),re=Ae.default(B,{value:_,defaultValue:B}),W=x.default(re,2),q=W[0],j=W[1],T=q==null?"":String(q),ue=n.useState(!1),k=x.default(ue,2),se=k[0],A=k[1],F=n.useRef(!1),ie=n.useState(null),H=x.default(ie,2),de=H[0],ce=H[1],U=n.useRef(null),N=n.useRef(null),r=function(){var e;return(e=N.current)===null||e===void 0?void 0:e.textArea},G=function(){r().focus()};n.useImperativeHandle(Z,function(){var a;return{resizableTextArea:N.current,focus:G,blur:function(){r().blur()},nativeElement:((a=U.current)===null||a===void 0?void 0:a.nativeElement)||r()}}),n.useEffect(function(){A(function(a){return!m&&a})},[m]);var fe=n.useState(null),J=x.default(fe,2),O=J[0],ve=J[1];n.useEffect(function(){if(O){var a;(a=r()).setSelectionRange.apply(a,ze.default(O))}},[O]);var o=Fe.default(te,E),c=(C=o.max)!==null&&C!==void 0?C:M,me=Number(c)>0,$=o.strategy(T),he=!!c&&$>c,Q=function(e,u){var h=u;!F.current&&o.exceedFormatter&&o.max&&o.strategy(u)>o.max&&(h=o.exceedFormatter(u,{max:o.max}),u!==h&&ve([r().selectionStart||0,r().selectionEnd||0])),j(h),Y.resolveOnChange(e.currentTarget,e,L,h)},xe=function(e){F.current=!0,S?.(e)},ge=function(e){F.current=!1,Q(e,e.currentTarget.value),w?.(e)},Ce=function(e){Q(e,e.target.value)},pe=function(e){e.key==="Enter"&&D&&D(e),z?.(e)},ye=function(e){A(!0),p?.(e)},Re=function(e){A(!1),y?.(e)},Se=function(e){j(""),G(),Y.resolveOnChange(r(),e,L)},I=ee,f;o.show&&(o.showFormatter?f=o.showFormatter({value:T,count:$,maxLength:c}):f="".concat($).concat(me?" / ".concat(c):""),I=n.createElement(n.Fragment,null,I,n.createElement("span",{className:g.default("".concat(s,"-data-count"),l?.count),style:i?.count},f)));var we=function(e){var u;b?.(e),(u=r())!==null&&u!==void 0&&u.style.height&&ce(!0)},Ee=!V&&!E&&!R;return n.createElement(Te.default,{ref:U,value:T,allowClear:R,handleReset:Se,suffix:I,prefixCls:s,classNames:d.default(d.default({},l),{},{affixWrapper:g.default(l?.affixWrapper,X.default(X.default({},"".concat(s,"-show-count"),E),"".concat(s,"-textarea-allow-clear"),R))}),disabled:m,focused:se,className:g.default(ae,he&&"".concat(s,"-out-of-range")),style:d.default(d.default({},v),de&&!Ee?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof f=="string"?f:void 0}},hidden:ne,readOnly:K,onClear:oe},n.createElement(Ne.default,be.default({},le,{autoSize:V,maxLength:M,onKeyDown:pe,onChange:Ce,onFocus:ye,onBlur:Re,onCompositionStart:xe,onCompositionEnd:ge,className:g.default(l?.textarea),style:d.default(d.default({},i?.textarea),{},{resize:v?.resize}),disabled:m,prefixCls:s,onResize:we,ref:N,readOnly:K})))});exports.default=$e;
2
2
  //# sourceMappingURL=TextArea.cjs.js.map
@@ -4,7 +4,7 @@ import d from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/hel
4
4
  import Ae from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/toConsumableArray.es.js";
5
5
  import x from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/slicedToArray.es.js";
6
6
  import Fe from "../../../../@babel_runtime@7.28.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.es.js";
7
- import h from "../../../../../../../../../_virtual/index.es4.js";
7
+ import h from "../../../../../../../../../_virtual/index.es2.js";
8
8
  import Ne from "../../../../rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.es.js";
9
9
  import Te from "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useMergedState.es.js";
10
10
  import o, { useRef as Y, useImperativeHandle as $e, useEffect as Ie } from "react";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./TextArea.cjs.js");require("../../../../../../../../../_virtual/index.cjs4.js");require("../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.cjs.js");require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.cjs.js");require("react");require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/raf.cjs.js");exports.default=e.default;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./TextArea.cjs.js");require("../../../../../../../../../_virtual/index.cjs2.js");require("../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.cjs.js");require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.cjs.js");require("react");require("../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/raf.cjs.js");exports.default=e.default;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,5 +1,5 @@
1
1
  import t from "./TextArea.es.js";
2
- import "../../../../../../../../../_virtual/index.es4.js";
2
+ import "../../../../../../../../../_virtual/index.es2.js";
3
3
  import "../../../../rc-resize-observer@1.4.3_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-resize-observer/es/index.es.js";
4
4
  import "../../../../rc-util@5.44.4_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-util/es/hooks/useLayoutEffect.es.js";
5
5
  import "react";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../../../../../_virtual/index.cjs2.js"),_=require("./remark-custom-variable.cjs.js"),l=require("./remark-flow.cjs.js"),f=require("./remark-interaction.cjs.js"),m=require("./interaction-parser.cjs.js");var u;function s(){return u||(u=1,(function(e){var n=r.__exports&&r.__exports.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.remarkInteraction=e.remarkFlow=e.remarkCustomVariable=e.InteractionType=e.InteractionParser=e.createInteractionParser=void 0;const c=n(_.__require());e.remarkCustomVariable=c.default;const o=n(l.__require());e.remarkFlow=o.default;const i=n(f.__require());e.remarkInteraction=i.default;var a=m.__require();Object.defineProperty(e,"createInteractionParser",{enumerable:!0,get:function(){return a.createInteractionParser}}),Object.defineProperty(e,"InteractionParser",{enumerable:!0,get:function(){return a.InteractionParser}}),Object.defineProperty(e,"InteractionType",{enumerable:!0,get:function(){return a.InteractionType}}),e.default=i.default})(r.__exports)),r.__exports}exports.__require=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../../../../../_virtual/index.cjs3.js"),_=require("./remark-custom-variable.cjs.js"),l=require("./remark-flow.cjs.js"),f=require("./remark-interaction.cjs.js"),m=require("./interaction-parser.cjs.js");var u;function s(){return u||(u=1,(function(e){var n=r.__exports&&r.__exports.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.remarkInteraction=e.remarkFlow=e.remarkCustomVariable=e.InteractionType=e.InteractionParser=e.createInteractionParser=void 0;const c=n(_.__require());e.remarkCustomVariable=c.default;const o=n(l.__require());e.remarkFlow=o.default;const i=n(f.__require());e.remarkInteraction=i.default;var a=m.__require();Object.defineProperty(e,"createInteractionParser",{enumerable:!0,get:function(){return a.createInteractionParser}}),Object.defineProperty(e,"InteractionParser",{enumerable:!0,get:function(){return a.InteractionParser}}),Object.defineProperty(e,"InteractionType",{enumerable:!0,get:function(){return a.InteractionType}}),e.default=i.default})(r.__exports)),r.__exports}exports.__require=s;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,4 +1,4 @@
1
- import { __exports as e } from "../../../../../../../../../_virtual/index.es2.js";
1
+ import { __exports as e } from "../../../../../../../../../_virtual/index.es3.js";
2
2
  import { __require as _ } from "./remark-custom-variable.es.js";
3
3
  import { __require as m } from "./remark-flow.es.js";
4
4
  import { __require as f } from "./remark-interaction.es.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../../../../../../../_virtual/remark-custom-variable.cjs.js"),g=require("../../../../../../../../../_virtual/index.cjs3.js"),y=require("./interaction-parser.cjs.js");var _;function h(){if(_)return s.__exports;_=1,Object.defineProperty(s.__exports,"__esModule",{value:!0}),s.__exports.default=f;const d=g.default,m=y.__require();function p(t,a,o,r,n){return[{type:"text",value:t.substring(0,a)},{type:"element",data:{hName:n,hProperties:r}},{type:"text",value:t.substring(o)}]}function f(){return t=>{const a=new m.InteractionParser;(0,d.visit)(t,"text",(o,r,n)=>{if(r===null||n===null)return;const u=o.value,i=/\?\[([^\]]*)\](?!\()/.exec(u);if(i){const c=i[0],l=i.index,x=l+c.length;try{const e=i[1];if(e.includes("%{")&&(!e.includes("%{{")||e.includes("%{{}}")))return;const b=a.parseToRemarkFormat(c),v=p(u,l,x,b,"custom-variable");n.children.splice(r,1,...v)}catch(e){console.warn("Failed to parse variable interaction syntax:",e)}}})}}return s.__exports}exports.__require=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../../../../../../../_virtual/remark-custom-variable.cjs.js"),g=require("../../../../../../../../../_virtual/index.cjs4.js"),y=require("./interaction-parser.cjs.js");var _;function h(){if(_)return s.__exports;_=1,Object.defineProperty(s.__exports,"__esModule",{value:!0}),s.__exports.default=f;const d=g.default,m=y.__require();function p(t,a,o,r,n){return[{type:"text",value:t.substring(0,a)},{type:"element",data:{hName:n,hProperties:r}},{type:"text",value:t.substring(o)}]}function f(){return t=>{const a=new m.InteractionParser;(0,d.visit)(t,"text",(o,r,n)=>{if(r===null||n===null)return;const u=o.value,i=/\?\[([^\]]*)\](?!\()/.exec(u);if(i){const c=i[0],l=i.index,x=l+c.length;try{const e=i[1];if(e.includes("%{")&&(!e.includes("%{{")||e.includes("%{{}}")))return;const b=a.parseToRemarkFormat(c),v=p(u,l,x,b,"custom-variable");n.children.splice(r,1,...v)}catch(e){console.warn("Failed to parse variable interaction syntax:",e)}}})}}return s.__exports}exports.__require=h;
2
2
  //# sourceMappingURL=remark-custom-variable.cjs.js.map
@@ -1,5 +1,5 @@
1
1
  import { __exports as a } from "../../../../../../../../../_virtual/remark-custom-variable.es.js";
2
- import g from "../../../../../../../../../_virtual/index.es3.js";
2
+ import g from "../../../../../../../../../_virtual/index.es4.js";
3
3
  import { __require as h } from "./interaction-parser.es.js";
4
4
  var m;
5
5
  function C() {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../../../../../../../_virtual/remark-interaction.cjs.js"),v=require("../../../../../../../../../_virtual/index.cjs3.js"),y=require("./interaction-parser.cjs.js");var _;function h(){if(_)return n.__exports;_=1,Object.defineProperty(n.__exports,"__esModule",{value:!0}),n.__exports.default=m;const d=v.default,p=y.__require();function x(e,i,s,t,r){return[{type:"text",value:e.substring(0,i)},{type:"element",data:{hName:r,hProperties:t}},{type:"text",value:e.substring(s)}]}function m(){return e=>{const i=new p.InteractionParser;(0,d.visit)(e,"text",(s,t,r)=>{if(t===null||r===null)return;const c=s.value,o=/\?\[([^\]]*)\](?!\()/.exec(c);if(o){const u=o[0],l=o.index,f=l+u.length;try{const a=i.parseToRemarkFormat(u),g=x(c,l,f,a,"custom-variable");r.children.splice(t,1,...g)}catch(a){console.warn("Failed to parse interaction syntax:",a)}}})}}return n.__exports}exports.__require=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../../../../../../../_virtual/remark-interaction.cjs.js"),v=require("../../../../../../../../../_virtual/index.cjs4.js"),y=require("./interaction-parser.cjs.js");var _;function h(){if(_)return n.__exports;_=1,Object.defineProperty(n.__exports,"__esModule",{value:!0}),n.__exports.default=m;const d=v.default,p=y.__require();function x(e,i,s,t,r){return[{type:"text",value:e.substring(0,i)},{type:"element",data:{hName:r,hProperties:t}},{type:"text",value:e.substring(s)}]}function m(){return e=>{const i=new p.InteractionParser;(0,d.visit)(e,"text",(s,t,r)=>{if(t===null||r===null)return;const c=s.value,o=/\?\[([^\]]*)\](?!\()/.exec(c);if(o){const u=o[0],l=o.index,f=l+u.length;try{const a=i.parseToRemarkFormat(u),g=x(c,l,f,a,"custom-variable");r.children.splice(t,1,...g)}catch(a){console.warn("Failed to parse interaction syntax:",a)}}})}}return n.__exports}exports.__require=h;
2
2
  //# sourceMappingURL=remark-interaction.cjs.js.map
@@ -1,5 +1,5 @@
1
1
  import { __exports as n } from "../../../../../../../../../_virtual/remark-interaction.es.js";
2
- import I from "../../../../../../../../../_virtual/index.es3.js";
2
+ import I from "../../../../../../../../../_virtual/index.es4.js";
3
3
  import { __require as g } from "./interaction-parser.es.js";
4
4
  var m;
5
5
  function k() {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../../../../../../_virtual/index.cjs8.js"),a=require("../../../../inline-style-parser@0.2.4/node_modules/inline-style-parser/index.cjs.js");var i;function d(){if(i)return t.__exports;i=1;var s=t.__exports&&t.__exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t.__exports,"__esModule",{value:!0}),t.__exports.default=l;const f=s(a.__require());function l(e,o){let r=null;if(!e||typeof e!="string")return r;const c=(0,f.default)(e),p=typeof o=="function";return c.forEach(u=>{if(u.type!=="declaration")return;const{property:_,value:n}=u;p?o(_,n,u):n&&(r=r||{},r[_]=n)}),r}return t.__exports}exports.__require=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../../../../../../../_virtual/index.cjs9.js"),a=require("../../../../inline-style-parser@0.2.4/node_modules/inline-style-parser/index.cjs.js");var i;function d(){if(i)return t.__exports;i=1;var s=t.__exports&&t.__exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t.__exports,"__esModule",{value:!0}),t.__exports.default=l;const f=s(a.__require());function l(e,o){let r=null;if(!e||typeof e!="string")return r;const c=(0,f.default)(e),p=typeof o=="function";return c.forEach(u=>{if(u.type!=="declaration")return;const{property:_,value:n}=u;p?o(_,n,u):n&&(r=r||{},r[_]=n)}),r}return t.__exports}exports.__require=d;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,4 +1,4 @@
1
- import { __exports as r } from "../../../../../../../../../_virtual/index.es8.js";
1
+ import { __exports as r } from "../../../../../../../../../_virtual/index.es9.js";
2
2
  import { __require as p } from "../../../../inline-style-parser@0.2.4/node_modules/inline-style-parser/index.es.js";
3
3
  var f;
4
4
  function q() {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
2
2
  //# sourceMappingURL=index.cjs10.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs.js"),r=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js");var s=r.__require();const t=e.getDefaultExportFromCjs(s);exports.default=t;
2
2
  //# sourceMappingURL=index.cjs2.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs.js"),t=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/index.cjs.js"),r=e.getAugmentedNamespace(t);exports.default=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
2
2
  //# sourceMappingURL=index.cjs3.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs.js"),r=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js");var s=r.__require();const t=e.getDefaultExportFromCjs(s);exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./_commonjsHelpers.cjs.js"),t=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/index.cjs.js"),r=e.getAugmentedNamespace(t);exports.default=r;
2
2
  //# sourceMappingURL=index.cjs4.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js");var r=e.__require();exports.distExports=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
2
2
  //# sourceMappingURL=index.cjs7.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js");var r=e.__require();exports.distExports=r;
2
2
  //# sourceMappingURL=index.cjs8.js.map
@@ -1,5 +1,5 @@
1
- var s = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- s as __module
3
+ r as __exports
4
4
  };
5
5
  //# sourceMappingURL=index.es10.js.map
@@ -1,5 +1,8 @@
1
- var r = {};
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.es.js";
2
+ import { __require as s } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js";
3
+ var e = s();
4
+ const t = /* @__PURE__ */ r(e);
2
5
  export {
3
- r as __exports
6
+ t as default
4
7
  };
5
8
  //# sourceMappingURL=index.es2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.es2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,7 +1,5 @@
1
- import { getAugmentedNamespace as e } from "./_commonjsHelpers.es.js";
2
- import * as r from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/index.es.js";
3
- const m = /* @__PURE__ */ e(r);
1
+ var r = {};
4
2
  export {
5
- m as default
3
+ r as __exports
6
4
  };
7
5
  //# sourceMappingURL=index.es3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"index.es3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,8 +1,7 @@
1
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.es.js";
2
- import { __require as s } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js";
3
- var e = s();
4
- const t = /* @__PURE__ */ r(e);
1
+ import { getAugmentedNamespace as e } from "./_commonjsHelpers.es.js";
2
+ import * as r from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unist-util-visit@5.0.0/node_modules/unist-util-visit/index.es.js";
3
+ const m = /* @__PURE__ */ e(r);
5
4
  export {
6
- t as default
5
+ m as default
7
6
  };
8
7
  //# sourceMappingURL=index.es4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.es4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,6 +1,5 @@
1
- import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.es.js";
2
- var i = r();
1
+ var s = { exports: {} };
3
2
  export {
4
- i as d
3
+ s as __module
5
4
  };
6
5
  //# sourceMappingURL=index.es7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index.es7.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +1,6 @@
1
- var r = {};
1
+ import { __require as r } from "../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.es.js";
2
+ var i = r();
2
3
  export {
3
- r as __exports
4
+ i as d
4
5
  };
5
6
  //# sourceMappingURL=index.es8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index.es8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../_virtual/jsx-runtime.cjs.js");;/* empty css */;/* empty css */const c=require("react"),G=require("../../_virtual/index.cjs.js"),J=require("./utils/sanitize-invalid-tag-name.cjs.js"),K=require("./utils/strip-svg-text-line-breaks.cjs.js");;/* empty css */;/* empty css */const Q=require("./CodeBlock.cjs.js"),X=require("./plugins/CustomVariable.cjs.js"),I=require("./plugins/MermaidChart.cjs.js"),Y=require("./useTypewriterStateMachine.cjs.js"),F=require("./utils/custom-variable-props.cjs.js"),_=require("./utils/highlight-languages.cjs.js"),A=require("./utils/mermaid-parse.cjs.js"),U=require("./utils/normalize-inline-html.cjs.js"),Z=require("./IframeSandbox.cjs.js"),ee=require("./utils/split-content.cjs.js"),te=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-markdown@10.1.0_@types_react@19.2.2_react@19.0.1/node_modules/react-markdown/lib/index.cjs.js"),ne=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.cjs.js"),se=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.cjs.js"),re=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.cjs.js"),oe=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.cjs.js"),ie=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.cjs.js"),ae=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.cjs.js"),O=({svg:r})=>{const o=c.useRef(null);return c.useEffect(()=>{const i=o.current;if(!i)return;const a=i.shadowRoot??i.attachShadow({mode:"open"}),w="content-render-svg-style";let m=a.getElementById(w);m||(m=document.createElement("style"),m.id=w,m.textContent=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../_virtual/jsx-runtime.cjs.js");;/* empty css */;/* empty css */const a=require("react"),G=require("../../_virtual/index.cjs.js"),J=require("./utils/sanitize-invalid-tag-name.cjs.js"),K=require("./utils/strip-svg-text-line-breaks.cjs.js");;/* empty css */;/* empty css */const Q=require("./CodeBlock.cjs.js"),X=require("./plugins/CustomVariable.cjs.js"),I=require("./plugins/MermaidChart.cjs.js"),Y=require("./useTypewriterStateMachine.cjs.js"),F=require("./utils/custom-variable-props.cjs.js"),_=require("./utils/highlight-languages.cjs.js"),A=require("./utils/mermaid-parse.cjs.js"),U=require("./utils/normalize-inline-html.cjs.js"),Z=require("./IframeSandbox.cjs.js"),ee=require("./utils/split-content.cjs.js"),te=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/react-markdown@10.1.0_@types_react@19.2.2_react@19.0.1/node_modules/react-markdown/lib/index.cjs.js"),ne=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-raw@7.0.0/node_modules/rehype-raw/lib/index.cjs.js"),se=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-highlight@7.0.2/node_modules/rehype-highlight/lib/index.cjs.js"),re=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rehype-katex@7.0.1/node_modules/rehype-katex/lib/index.cjs.js"),oe=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.cjs.js"),ie=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-math@6.0.0/node_modules/remark-math/lib/index.cjs.js"),ae=require("../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.cjs.js"),O=({svg:o})=>{const c=a.useRef(null);return a.useEffect(()=>{const r=c.current;if(!r)return;const i=r.shadowRoot??r.attachShadow({mode:"open"}),u="content-render-svg-style";let x=i.getElementById(u);x||(x=document.createElement("style"),x.id=u,x.textContent=`
2
2
  svg { height: auto; display: inline-block; }
3
3
  svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }
4
4
  svg.content-render-svg-el--fixed { max-width: none; }
5
- `,a.appendChild(m)),Array.from(a.childNodes).filter(s=>s!==m).forEach(s=>a.removeChild(s));const E=document.createElement("template"),z=K.stripSvgTextLineBreaks(r);E.innerHTML=z,a.append(E.content.cloneNode(!0));let R=!1,k=!1;a.querySelectorAll("svg").forEach(s=>{const S=s.getAttribute("viewBox");if(!S)return;const b=S.trim().split(/[\s,]+/).map(u=>Number(u));if(b.length!==4||b.some(Number.isNaN))return;const[,,h,x]=b,f=s.getAttribute("width"),j=s.getAttribute("height"),C=u=>{if(!u)return!1;const e=u.trim().toLowerCase();return e==="auto"||e.endsWith("%")},L=u=>{if(!u)return null;const e=u.trim().toLowerCase();if(e==="auto"||e.endsWith("%"))return null;const n=Number.parseFloat(e);return Number.isNaN(n)?null:n},$=C(f),y=C(j),N=!f||f==="0",g=!j||j==="0",p=L(f),T=L(j);if($||y||N&&g||p===h&&T===x){R=!0,s.classList.add("content-render-svg-el--responsive"),s.classList.remove("content-render-svg-el--fixed"),s.style.width="100%",s.style.height="auto",!s.style.aspectRatio&&x>0&&(s.style.aspectRatio=`${h} / ${x}`);return}k=!0,s.classList.add("content-render-svg-el--fixed"),s.classList.remove("content-render-svg-el--responsive"),N&&h>0&&s.setAttribute("width",`${h}`),g&&x>0&&s.setAttribute("height",`${x}`)});const q=R&&!k;i.classList.toggle("content-render-svg--responsive",q),i.classList.toggle("content-render-svg--fixed",!q)},[r]),t.jsxRuntimeExports.jsx("div",{className:"content-render-svg-scroll",children:t.jsxRuntimeExports.jsx("div",{className:"content-render-svg",ref:o})})},ce=[oe.default,ie.default,G.default,ae.default],ue=[F.preserveCustomVariableProperties,ne.default,J.sanitizeInvalidTagName,F.restoreCustomVariableProperties,[se.default,{languages:_.highlightLanguages,subset:_.subsetLanguages}],re.default],H=({content:r,components:o})=>t.jsxRuntimeExports.jsx("div",{className:"markdown-renderer",children:t.jsxRuntimeExports.jsx(te.Markdown,{remarkPlugins:ce,rehypePlugins:ue,components:o,children:r})}),le=r=>{if(r.length<=1)return r;const o=[];return r.forEach(i=>{if(i.type==="sandbox"){o.push(i);return}const a=o[o.length-1];if(a&&a.type!=="sandbox"){o[o.length-1]={type:"markdown",value:`${a.value}${i.value}`};return}o.push({type:"markdown",value:i.value})}),o},de=({content:r,customRenderBar:o,onSend:i,typingSpeed:a=30,enableTypewriter:w=!1,defaultButtonText:m,defaultInputText:P,defaultSelectedValues:E,readonly:z=!1,onTypeFinished:R,confirmButtonText:k,copyButtonText:q,copiedButtonText:s,sandboxLoadingText:S,sandboxStyleLoadingText:b,sandboxScriptLoadingText:h,sandboxFullscreenButtonText:x,sandboxMode:f="content",onClickCustomButtonAfterContent:j,beforeSend:C})=>{const L=c.useMemo(()=>U.normalizeInlineHtml(r),[r]),$={"custom-button-after-content":({children:e})=>t.jsxRuntimeExports.jsx("button",{className:"content-render-custom-button-after-content",onClick:j,children:t.jsxRuntimeExports.jsx("span",{className:"content-render-custom-button-after-content-inner",children:e})}),"custom-variable":e=>t.jsxRuntimeExports.jsx(X.default,{...e,readonly:z,defaultButtonText:m,defaultInputText:P,defaultSelectedValues:E,onSend:i,beforeSend:C,confirmButtonText:k}),code:e=>{const{className:n,children:l,...B}=e;if(/language-(\w+)/.exec(n||"")?.[1]==="mermaid"){const v=l?.toString().replace(/\n$/,"")||"",D=A.mermaidBlockIsComplete(r,v);return t.jsxRuntimeExports.jsx(I.default,{chart:v,frozen:D})}return t.jsxRuntimeExports.jsx("code",{className:n,...B,children:l})},table:({...e})=>t.jsxRuntimeExports.jsx("div",{className:"content-render-table-container",children:t.jsxRuntimeExports.jsx("table",{className:"content-render-table",...e})}),th:({...e})=>t.jsxRuntimeExports.jsx("th",{className:"content-render-th",...e}),td:({...e})=>t.jsxRuntimeExports.jsx("td",{className:"content-render-td",...e}),tr:({...e})=>t.jsxRuntimeExports.jsx("tr",{className:"content-render-tr",...e}),li:({node:e,...n})=>{const l=e?.properties?.className;return typeof l=="string"&&l.includes("task-list-item")||Array.isArray(l)&&l.includes("task-list-item")?t.jsxRuntimeExports.jsx("li",{className:"content-render-task-list-item",...n}):t.jsxRuntimeExports.jsx("li",{...n})},ol:({...e})=>t.jsxRuntimeExports.jsx("ol",{className:"content-render-ol",...e}),ul:({...e})=>t.jsxRuntimeExports.jsx("ul",{className:"content-render-ul",...e}),input:({...e})=>e.type==="checkbox"?t.jsxRuntimeExports.jsx("input",{type:"checkbox",className:"content-render-checkbox",disabled:!0,...e}):t.jsxRuntimeExports.jsx("input",{...e}),a:({children:e,...n})=>t.jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",...n,children:e}),pre:e=>t.jsxRuntimeExports.jsx(Q.default,{...e,copyButtonText:q,copiedButtonText:s})},{displayContent:y,isComplete:N}=Y.default({content:L,typingSpeed:a,disabled:!w}),g=c.useMemo(()=>ee.splitContentSegments(r,!0),[r]),p=g.some(e=>e.type==="sandbox"),T=c.useMemo(()=>le(g),[g]),V=c.useMemo(()=>A.parseMarkdownSegments(y),[y]),M=c.useRef(!1);c.useEffect(()=>{p||N&&!M.current&&(M.current=!0,R?.())},[p,N,R]),c.useEffect(()=>{p||(M.current=!1)},[p,r]);const u=(e,n)=>{const l=U.normalizeInlineHtml(e);return A.parseMarkdownSegments(l).map((d,W)=>{const v=`${n}-${d.type}-${W}`;return d.type==="text"?t.jsxRuntimeExports.jsx(H,{components:$,content:d.value},v):d.type==="mermaid"?t.jsxRuntimeExports.jsx(I.default,{chart:d.value,frozen:!d.complete},v):d.type==="svg"?t.jsxRuntimeExports.jsx(O,{svg:d.value},v):null})};return p?t.jsxRuntimeExports.jsx("div",{className:"content-render markdown-body",children:T.map((e,n)=>e.type==="sandbox"?t.jsxRuntimeExports.jsx(Z.default,{hideFullScreen:!0,content:e.value,className:"content-render-iframe",loadingText:S,styleLoadingText:b,scriptLoadingText:h,fullScreenButtonText:x,mode:f},`sandbox-${n}`):t.jsxRuntimeExports.jsx(c.Fragment,{children:u(e.value,`md-${n}`)},`md-${n}`))}):t.jsxRuntimeExports.jsxs("div",{className:"content-render markdown-body",children:[V.map((e,n)=>{if(e.type==="text")return t.jsxRuntimeExports.jsx(H,{components:$,content:e.value},n);if(e.type==="mermaid")return t.jsxRuntimeExports.jsx(I.default,{chart:e.value,frozen:!e.complete},n);if(e.type==="svg")return t.jsxRuntimeExports.jsx(O,{svg:e.value},n)}),o&&t.jsxRuntimeExports.jsx("div",{className:"content-render-custom-bar",children:c.createElement(o,{content:r,displayContent:y,onSend:i})})]})};exports.MarkdownRenderer=H;exports.default=de;
5
+ `,i.appendChild(x)),Array.from(i.childNodes).filter(s=>s!==x).forEach(s=>i.removeChild(s));const E=document.createElement("template"),z=K.stripSvgTextLineBreaks(o);E.innerHTML=z,i.append(E.content.cloneNode(!0));let b=!1,k=!1;i.querySelectorAll("svg").forEach(s=>{const S=s.getAttribute("viewBox");if(!S)return;const y=S.trim().split(/[\s,]+/).map(l=>Number(l));if(y.length!==4||y.some(Number.isNaN))return;const[,,j,h]=y,p=s.getAttribute("width"),v=s.getAttribute("height"),$=l=>{if(!l)return!1;const e=l.trim().toLowerCase();return e==="auto"||e.endsWith("%")},C=l=>{if(!l)return null;const e=l.trim().toLowerCase();if(e==="auto"||e.endsWith("%"))return null;const n=Number.parseFloat(e);return Number.isNaN(n)?null:n},L=$(p),N=$(v),w=!p||p==="0",g=!v||v==="0",f=C(p),T=C(v);if(L||N||w&&g||f===j&&T===h){b=!0,s.classList.add("content-render-svg-el--responsive"),s.classList.remove("content-render-svg-el--fixed"),s.style.width="100%",s.style.height="auto",!s.style.aspectRatio&&h>0&&(s.style.aspectRatio=`${j} / ${h}`);return}k=!0,s.classList.add("content-render-svg-el--fixed"),s.classList.remove("content-render-svg-el--responsive"),w&&j>0&&s.setAttribute("width",`${j}`),g&&h>0&&s.setAttribute("height",`${h}`)});const q=b&&!k;r.classList.toggle("content-render-svg--responsive",q),r.classList.toggle("content-render-svg--fixed",!q)},[o]),t.jsxRuntimeExports.jsx("div",{className:"content-render-svg-scroll",children:t.jsxRuntimeExports.jsx("div",{className:"content-render-svg",ref:c})})},ue=[oe.default,ie.default,G.default,ae.default],ce=[F.preserveCustomVariableProperties,ne.default,J.sanitizeInvalidTagName,F.restoreCustomVariableProperties,[se.default,{languages:_.highlightLanguages,subset:_.subsetLanguages}],re.default],H=({content:o,components:c})=>t.jsxRuntimeExports.jsx("div",{className:"markdown-renderer",children:t.jsxRuntimeExports.jsx(te.Markdown,{remarkPlugins:ue,rehypePlugins:ce,components:c,children:o})}),le=(o,c=!1)=>{if(o.length<=1)return o;const r=[];return o.forEach(i=>{const u=r[r.length-1];if(c&&i.type==="sandbox"&&u?.type==="sandbox"){r[r.length-1]={type:"sandbox",value:`${u.value}${i.value}`};return}if(i.type==="sandbox"){r.push(i);return}if(u&&u.type!=="sandbox"){r[r.length-1]={type:"markdown",value:`${u.value}${i.value}`};return}r.push({type:"markdown",value:i.value})}),r},de=({content:o,customRenderBar:c,onSend:r,typingSpeed:i=30,enableTypewriter:u=!1,defaultButtonText:x,defaultInputText:P,defaultSelectedValues:E,readonly:z=!1,onTypeFinished:b,confirmButtonText:k,copyButtonText:q,copiedButtonText:s,sandboxLoadingText:S,sandboxStyleLoadingText:y,sandboxScriptLoadingText:j,sandboxFullscreenButtonText:h,sandboxMode:p="content",onClickCustomButtonAfterContent:v,beforeSend:$})=>{const C=a.useMemo(()=>U.normalizeInlineHtml(o),[o]),L={"custom-button-after-content":({children:e})=>t.jsxRuntimeExports.jsx("button",{className:"content-render-custom-button-after-content",onClick:v,children:t.jsxRuntimeExports.jsx("span",{className:"content-render-custom-button-after-content-inner",children:e})}),"custom-variable":e=>t.jsxRuntimeExports.jsx(X.default,{...e,readonly:z,defaultButtonText:x,defaultInputText:P,defaultSelectedValues:E,onSend:r,beforeSend:$,confirmButtonText:k}),code:e=>{const{className:n,children:d,...B}=e;if(/language-(\w+)/.exec(n||"")?.[1]==="mermaid"){const R=d?.toString().replace(/\n$/,"")||"",D=A.mermaidBlockIsComplete(o,R);return t.jsxRuntimeExports.jsx(I.default,{chart:R,frozen:D})}return t.jsxRuntimeExports.jsx("code",{className:n,...B,children:d})},table:({...e})=>t.jsxRuntimeExports.jsx("div",{className:"content-render-table-container",children:t.jsxRuntimeExports.jsx("table",{className:"content-render-table",...e})}),th:({...e})=>t.jsxRuntimeExports.jsx("th",{className:"content-render-th",...e}),td:({...e})=>t.jsxRuntimeExports.jsx("td",{className:"content-render-td",...e}),tr:({...e})=>t.jsxRuntimeExports.jsx("tr",{className:"content-render-tr",...e}),li:({node:e,...n})=>{const d=e?.properties?.className;return typeof d=="string"&&d.includes("task-list-item")||Array.isArray(d)&&d.includes("task-list-item")?t.jsxRuntimeExports.jsx("li",{className:"content-render-task-list-item",...n}):t.jsxRuntimeExports.jsx("li",{...n})},ol:({...e})=>t.jsxRuntimeExports.jsx("ol",{className:"content-render-ol",...e}),ul:({...e})=>t.jsxRuntimeExports.jsx("ul",{className:"content-render-ul",...e}),input:({...e})=>e.type==="checkbox"?t.jsxRuntimeExports.jsx("input",{type:"checkbox",className:"content-render-checkbox",disabled:!0,...e}):t.jsxRuntimeExports.jsx("input",{...e}),a:({children:e,...n})=>t.jsxRuntimeExports.jsx("a",{target:"_blank",rel:"noopener noreferrer",...n,children:e}),pre:e=>t.jsxRuntimeExports.jsx(Q.default,{...e,copyButtonText:q,copiedButtonText:s})},{displayContent:N,isComplete:w}=Y.default({content:C,typingSpeed:i,disabled:!u}),g=a.useMemo(()=>ee.splitContentSegments(o,!0),[o]),f=g.some(e=>e.type==="sandbox"),T=a.useMemo(()=>le(g,p==="blackboard"),[g,p]),V=a.useMemo(()=>A.parseMarkdownSegments(N),[N]),M=a.useRef(!1);a.useEffect(()=>{f||w&&!M.current&&(M.current=!0,b?.())},[f,w,b]),a.useEffect(()=>{f||(M.current=!1)},[f,o]);const l=(e,n)=>{const d=U.normalizeInlineHtml(e);return A.parseMarkdownSegments(d).map((m,W)=>{const R=`${n}-${m.type}-${W}`;return m.type==="text"?t.jsxRuntimeExports.jsx(H,{components:L,content:m.value},R):m.type==="mermaid"?t.jsxRuntimeExports.jsx(I.default,{chart:m.value,frozen:!m.complete},R):m.type==="svg"?t.jsxRuntimeExports.jsx(O,{svg:m.value},R):null})};return f?t.jsxRuntimeExports.jsx("div",{className:"content-render markdown-body",children:T.map((e,n)=>e.type==="sandbox"?t.jsxRuntimeExports.jsx(Z.default,{hideFullScreen:!0,content:e.value,className:"content-render-iframe",loadingText:S,styleLoadingText:y,scriptLoadingText:j,fullScreenButtonText:h,mode:p},`sandbox-${n}`):t.jsxRuntimeExports.jsx(a.Fragment,{children:l(e.value,`md-${n}`)},`md-${n}`))}):t.jsxRuntimeExports.jsxs("div",{className:"content-render markdown-body",children:[V.map((e,n)=>{if(e.type==="text")return t.jsxRuntimeExports.jsx(H,{components:L,content:e.value},n);if(e.type==="mermaid")return t.jsxRuntimeExports.jsx(I.default,{chart:e.value,frozen:!e.complete},n);if(e.type==="svg")return t.jsxRuntimeExports.jsx(O,{svg:e.value},n)}),c&&t.jsxRuntimeExports.jsx("div",{className:"content-render-custom-bar",children:a.createElement(c,{content:o,displayContent:N,onSend:r})})]})};exports.MarkdownRenderer=H;exports.default=de;
6
6
  //# sourceMappingURL=ContentRender.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentRender.cjs.js","sources":["../../../src/components/ContentRender/ContentRender.tsx"],"sourcesContent":["import \"highlight.js/styles/github.css\";\nimport \"katex/dist/katex.min.css\";\nimport React, { useEffect, useMemo, useRef } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport rehypeKatex from \"rehype-katex\";\nimport rehypeRaw from \"rehype-raw\";\nimport remarkBreaks from \"remark-breaks\";\nimport remarkFlow from \"remark-flow\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\nimport { CustomRenderBarProps, OnSendContentParams } from \"../types\";\nimport { sanitizeInvalidTagName } from \"./utils/sanitize-invalid-tag-name\";\nimport { stripSvgTextLineBreaks } from \"./utils/strip-svg-text-line-breaks\";\nimport \"./contentRender.css\";\nimport \"./github-markdown-light.css\";\nimport CodeBlock from \"./CodeBlock\";\nimport CustomButtonInputVariable, {\n ComponentsWithCustomVariable,\n} from \"./plugins/CustomVariable\";\nimport MermaidChart from \"./plugins/MermaidChart\";\nimport useTypewriterStateMachine from \"./useTypewriterStateMachine\";\nimport {\n preserveCustomVariableProperties,\n restoreCustomVariableProperties,\n} from \"./utils/custom-variable-props\";\nimport {\n highlightLanguages,\n subsetLanguages,\n} from \"./utils/highlight-languages\";\n// import { processMarkdownText } from \"./utils/process-markdown\";\nimport {\n parseMarkdownSegments,\n mermaidBlockIsComplete,\n} from \"./utils/mermaid-parse\";\nimport { normalizeInlineHtml } from \"./utils/normalize-inline-html\";\nimport IframeSandbox from \"./IframeSandbox\";\nimport {\n splitContentSegments,\n type RenderSegment,\n} from \"./utils/split-content\";\n// Define component Props type\nexport interface ContentRenderProps {\n content: string;\n /**\n+ * Callback invoked when the custom button after content is clicked.\n+ * This button is rendered via the `<custom-button-after-content>` tag in markdown content.\n+ * @example\n+ * ```tsx\n+ * <ContentRender\n+ * content=\"Hello <custom-button-after-content>Ask</custom-button-after-content>\"\n+ * onClickCustomButtonAfterContent={() => console.log('Button clicked')}\n+ * />\n+ * ```\n+ */\n customRenderBar?: CustomRenderBarProps;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n typingSpeed?: number;\n enableTypewriter?: boolean;\n defaultButtonText?: string;\n defaultInputText?: string; // Text input by user\n defaultSelectedValues?: string[]; // Default selected values for multi-select\n readonly?: boolean;\n onTypeFinished?: () => void;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n // Copy button text (i18n support)\n copyButtonText?: string;\n // Copied state text (i18n support)\n copiedButtonText?: string;\n // Dynamic interaction format for multi-select support\n dynamicInteractionFormat?: string;\n // Loading text before first HTML block renders inside iframe (i18n support)\n sandboxLoadingText?: string;\n // Loading text while styles are being generated inside iframe\n sandboxStyleLoadingText?: string;\n // Loading text while scripts are being cached/executed inside iframe\n sandboxScriptLoadingText?: string;\n // Fullscreen button text for iframe sandbox\n sandboxFullscreenButtonText?: string;\n // Sandbox render mode\n sandboxMode?: \"content\" | \"blackboard\";\n beforeSend?: (param: OnSendContentParams) => boolean;\n // tooltipMinLength?: number; // Control minimum character length for tooltip display, default 10\n}\n\n// Render svg string via Shadow DOM to avoid markdown wrapping\nconst SvgBlockInShadow: React.FC<{ svg: string }> = ({ svg }) => {\n const hostRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const host = hostRef.current;\n if (!host) return;\n const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: \"open\" });\n const styleId = \"content-render-svg-style\";\n let styleEl = shadowRoot.getElementById(styleId) as HTMLStyleElement | null;\n\n if (!styleEl) {\n styleEl = document.createElement(\"style\");\n styleEl.id = styleId;\n // Keep intrinsic SVG width so the wrapper can scroll horizontally when needed\n styleEl.textContent = `\n svg { height: auto; display: inline-block; }\n svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }\n svg.content-render-svg-el--fixed { max-width: none; }\n `;\n shadowRoot.appendChild(styleEl);\n }\n\n const nodesToRemove = Array.from(shadowRoot.childNodes).filter(\n (node) => node !== styleEl\n );\n nodesToRemove.forEach((node) => shadowRoot.removeChild(node));\n\n const template = document.createElement(\"template\");\n const cleanedSvg = stripSvgTextLineBreaks(svg);\n template.innerHTML = cleanedSvg;\n shadowRoot.append(template.content.cloneNode(true));\n\n let hasResponsiveSvg = false;\n let hasFixedSvg = false;\n\n shadowRoot.querySelectorAll(\"svg\").forEach((svgEl) => {\n // Derive responsive sizing from viewBox so pure viewBox SVGs stay visible and fluid\n const viewBox = svgEl.getAttribute(\"viewBox\");\n if (!viewBox) return;\n\n const dimensions = viewBox\n .trim()\n .split(/[\\s,]+/)\n .map((value) => Number(value));\n\n if (dimensions.length !== 4 || dimensions.some(Number.isNaN)) return;\n\n const [, , viewBoxWidth, viewBoxHeight] = dimensions;\n const widthAttr = svgEl.getAttribute(\"width\");\n const heightAttr = svgEl.getAttribute(\"height\");\n const isRelativeLength = (value?: string | null) => {\n if (!value) return false;\n const normalized = value.trim().toLowerCase();\n return normalized === \"auto\" || normalized.endsWith(\"%\");\n };\n const toNumericLength = (value?: string | null) => {\n if (!value) return null;\n const normalized = value.trim().toLowerCase();\n if (normalized === \"auto\" || normalized.endsWith(\"%\")) {\n return null;\n }\n const parsed = Number.parseFloat(normalized);\n return Number.isNaN(parsed) ? null : parsed;\n };\n // Treat percentage/auto sizing as responsive so viewBox drives the layout\n const isWidthRelative = isRelativeLength(widthAttr);\n const isHeightRelative = isRelativeLength(heightAttr);\n const widthMissing = !widthAttr || widthAttr === \"0\";\n const heightMissing = !heightAttr || heightAttr === \"0\";\n const numericWidth = toNumericLength(widthAttr);\n const numericHeight = toNumericLength(heightAttr);\n const matchesViewBox =\n numericWidth === viewBoxWidth && numericHeight === viewBoxHeight;\n\n // Prefer responsive layout when sizing is relative or matches the viewBox\n const shouldUseResponsiveSize =\n isWidthRelative ||\n isHeightRelative ||\n (widthMissing && heightMissing) ||\n matchesViewBox;\n\n if (shouldUseResponsiveSize) {\n hasResponsiveSvg = true;\n svgEl.classList.add(\"content-render-svg-el--responsive\");\n svgEl.classList.remove(\"content-render-svg-el--fixed\");\n svgEl.style.width = \"100%\";\n svgEl.style.height = \"auto\";\n if (!svgEl.style.aspectRatio && viewBoxHeight > 0) {\n svgEl.style.aspectRatio = `${viewBoxWidth} / ${viewBoxHeight}`;\n }\n return;\n }\n\n hasFixedSvg = true;\n svgEl.classList.add(\"content-render-svg-el--fixed\");\n svgEl.classList.remove(\"content-render-svg-el--responsive\");\n if (widthMissing && viewBoxWidth > 0) {\n svgEl.setAttribute(\"width\", `${viewBoxWidth}`);\n }\n if (heightMissing && viewBoxHeight > 0) {\n svgEl.setAttribute(\"height\", `${viewBoxHeight}`);\n }\n });\n\n const hostResponsive = hasResponsiveSvg && !hasFixedSvg;\n host.classList.toggle(\"content-render-svg--responsive\", hostResponsive);\n host.classList.toggle(\"content-render-svg--fixed\", !hostResponsive);\n }, [svg]);\n\n return (\n <div className=\"content-render-svg-scroll\">\n <div className=\"content-render-svg\" ref={hostRef} />\n </div>\n );\n};\n\n// Extended component interface\ntype CustomComponents = ComponentsWithCustomVariable & {\n \"custom-button-after-content\"?: React.ComponentType<{\n children: React.ReactNode;\n }>;\n};\n\nconst remarkPlugins = [remarkGfm, remarkMath, remarkFlow, remarkBreaks];\n\nconst rehypePlugins = [\n preserveCustomVariableProperties,\n rehypeRaw,\n sanitizeInvalidTagName,\n restoreCustomVariableProperties,\n [rehypeHighlight, { languages: highlightLanguages, subset: subsetLanguages }],\n rehypeKatex,\n];\n\nexport const MarkdownRenderer: React.FC<{\n content: string;\n components: CustomComponents;\n}> = ({ content: markdownContent, components }) => (\n <div className=\"markdown-renderer\">\n <ReactMarkdown\n remarkPlugins={remarkPlugins}\n rehypePlugins={rehypePlugins}\n components={components}\n >\n {markdownContent}\n </ReactMarkdown>\n </div>\n);\n\nconst mergeNonSandboxSegments = (segments: RenderSegment[]) => {\n if (segments.length <= 1) return segments;\n const merged: RenderSegment[] = [];\n\n segments.forEach((segment) => {\n if (segment.type === \"sandbox\") {\n merged.push(segment);\n return;\n }\n\n const last = merged[merged.length - 1];\n if (last && last.type !== \"sandbox\") {\n merged[merged.length - 1] = {\n type: \"markdown\",\n value: `${last.value}${segment.value}`,\n };\n return;\n }\n\n merged.push({ type: \"markdown\", value: segment.value });\n });\n\n return merged;\n};\n\nconst ContentRender: React.FC<ContentRenderProps> = ({\n content,\n customRenderBar,\n onSend,\n typingSpeed = 30,\n enableTypewriter = false,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n readonly = false,\n onTypeFinished,\n confirmButtonText,\n copyButtonText,\n copiedButtonText,\n sandboxLoadingText,\n sandboxStyleLoadingText,\n sandboxScriptLoadingText,\n sandboxFullscreenButtonText,\n sandboxMode = \"content\",\n onClickCustomButtonAfterContent,\n beforeSend,\n // tooltipMinLength,\n}) => {\n const normalizedContent = useMemo(\n () => normalizeInlineHtml(content),\n [content]\n );\n\n // Use custom Hook to handle typewriter effect\n const components: CustomComponents = {\n \"custom-button-after-content\": ({\n children,\n }: {\n children: React.ReactNode;\n }) => {\n return (\n <button\n className=\"content-render-custom-button-after-content\"\n onClick={onClickCustomButtonAfterContent}\n >\n <span className=\"content-render-custom-button-after-content-inner\">\n {children}\n </span>\n </button>\n );\n },\n \"custom-variable\": (props) => (\n <CustomButtonInputVariable\n {...props}\n readonly={readonly}\n defaultButtonText={defaultButtonText}\n defaultInputText={defaultInputText}\n defaultSelectedValues={defaultSelectedValues}\n onSend={onSend}\n beforeSend={beforeSend}\n confirmButtonText={confirmButtonText}\n // tooltipMinLength={tooltipMinLength}\n />\n ),\n code: (props) => {\n const { className, children, ...rest } = props as {\n className?: string;\n children?: React.ReactNode;\n };\n const match = /language-(\\w+)/.exec(className || \"\");\n const language = match?.[1];\n if (language === \"mermaid\") {\n const chartContent = children?.toString().replace(/\\n$/, \"\") || \"\";\n const frozen = mermaidBlockIsComplete(content, chartContent);\n return <MermaidChart chart={chartContent} frozen={frozen} />;\n }\n\n return (\n <code className={className} {...rest}>\n {children}\n </code>\n );\n },\n table: ({ ...props }) => (\n <div className=\"content-render-table-container\">\n <table className=\"content-render-table\" {...props} />\n </div>\n ),\n th: ({ ...props }) => <th className=\"content-render-th\" {...props} />,\n td: ({ ...props }) => <td className=\"content-render-td\" {...props} />,\n tr: ({ ...props }) => <tr className=\"content-render-tr\" {...props} />,\n li: ({ node, ...props }) => {\n const className = node?.properties?.className;\n const hasTaskListItem =\n (typeof className === \"string\" &&\n className.includes(\"task-list-item\")) ||\n (Array.isArray(className) && className.includes(\"task-list-item\"));\n if (hasTaskListItem) {\n return <li className=\"content-render-task-list-item\" {...props} />;\n }\n return <li {...props} />;\n },\n ol: ({ ...props }) => <ol className=\"content-render-ol\" {...props} />,\n ul: ({ ...props }) => <ul className=\"content-render-ul\" {...props} />,\n input: ({ ...props }) => {\n if (props.type === \"checkbox\") {\n return (\n <input\n type=\"checkbox\"\n className=\"content-render-checkbox\"\n disabled\n {...props}\n />\n );\n }\n return <input {...props} />;\n },\n a: ({ children, ...props }) => (\n <a target=\"_blank\" rel=\"noopener noreferrer\" {...props}>\n {children}\n </a>\n ),\n pre: (props) => (\n <CodeBlock\n {...props}\n copyButtonText={copyButtonText}\n copiedButtonText={copiedButtonText}\n />\n ),\n };\n\n const { displayContent, isComplete } = useTypewriterStateMachine({\n // processMarkdownText will let code block printf(\"You win!\\n\") become printf(\"You win!<br/>\");\n // content: processMarkdownText(content),\n content: normalizedContent,\n typingSpeed,\n disabled: !enableTypewriter,\n });\n\n const renderSegments = useMemo(\n () => splitContentSegments(content, true),\n [content]\n );\n\n const hasSandbox = renderSegments.some(\n (segment) => segment.type === \"sandbox\"\n );\n const mergedRenderSegments = useMemo(\n () => mergeNonSandboxSegments(renderSegments),\n [renderSegments]\n );\n\n const segments = useMemo(\n () => parseMarkdownSegments(displayContent),\n [displayContent]\n );\n\n const hasCompleted = useRef(false);\n\n useEffect(() => {\n if (hasSandbox) return;\n if (isComplete && !hasCompleted.current) {\n hasCompleted.current = true; // Mark as completed\n onTypeFinished?.(); // Call the passed callback\n }\n }, [hasSandbox, isComplete, onTypeFinished]);\n\n useEffect(() => {\n if (hasSandbox) return;\n hasCompleted.current = false; // Reset completion status when content changes\n }, [hasSandbox, content]);\n\n const renderMarkdownSegments = (raw: string, keyPrefix: string) => {\n const normalized = normalizeInlineHtml(raw);\n const parsed = parseMarkdownSegments(normalized);\n\n return parsed.map((seg, index) => {\n const key = `${keyPrefix}-${seg.type}-${index}`;\n\n if (seg.type === \"text\") {\n return (\n <MarkdownRenderer\n key={key}\n components={components}\n content={seg.value}\n />\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart key={key} chart={seg.value} frozen={!seg.complete} />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={key} svg={seg.value} />;\n }\n\n return null;\n });\n };\n\n if (hasSandbox) {\n return (\n <div className=\"content-render markdown-body\">\n {mergedRenderSegments.map((segment, idx) =>\n segment.type === \"sandbox\" ? (\n <IframeSandbox\n key={`sandbox-${idx}`}\n hideFullScreen\n content={segment.value}\n className=\"content-render-iframe\"\n loadingText={sandboxLoadingText}\n styleLoadingText={sandboxStyleLoadingText}\n scriptLoadingText={sandboxScriptLoadingText}\n fullScreenButtonText={sandboxFullscreenButtonText}\n mode={sandboxMode}\n />\n ) : (\n <React.Fragment key={`md-${idx}`}>\n {renderMarkdownSegments(segment.value, `md-${idx}`)}\n </React.Fragment>\n )\n )}\n </div>\n );\n }\n\n return (\n <div className=\"content-render markdown-body\">\n {segments.map((seg, index) => {\n if (seg.type === \"text\") {\n return (\n <MarkdownRenderer\n key={index}\n components={components}\n content={seg.value}\n />\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={index}\n chart={seg.value}\n frozen={!seg.complete}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={index} svg={seg.value} />;\n }\n })}\n\n {customRenderBar && (\n <div className=\"content-render-custom-bar\">\n {React.createElement(customRenderBar, {\n content,\n displayContent,\n onSend,\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport default ContentRender;\n"],"names":["SvgBlockInShadow","svg","hostRef","useRef","useEffect","host","shadowRoot","styleId","styleEl","node","template","cleanedSvg","stripSvgTextLineBreaks","hasResponsiveSvg","hasFixedSvg","svgEl","viewBox","dimensions","value","viewBoxWidth","viewBoxHeight","widthAttr","heightAttr","isRelativeLength","normalized","toNumericLength","parsed","isWidthRelative","isHeightRelative","widthMissing","heightMissing","numericWidth","numericHeight","hostResponsive","jsx","remarkPlugins","remarkGfm","remarkMath","remarkFlow","remarkBreaks","rehypePlugins","preserveCustomVariableProperties","rehypeRaw","sanitizeInvalidTagName","restoreCustomVariableProperties","rehypeHighlight","highlightLanguages","subsetLanguages","rehypeKatex","MarkdownRenderer","markdownContent","components","ReactMarkdown","mergeNonSandboxSegments","segments","merged","segment","last","ContentRender","content","customRenderBar","onSend","typingSpeed","enableTypewriter","defaultButtonText","defaultInputText","defaultSelectedValues","readonly","onTypeFinished","confirmButtonText","copyButtonText","copiedButtonText","sandboxLoadingText","sandboxStyleLoadingText","sandboxScriptLoadingText","sandboxFullscreenButtonText","sandboxMode","onClickCustomButtonAfterContent","beforeSend","normalizedContent","useMemo","normalizeInlineHtml","children","props","CustomButtonInputVariable","className","rest","chartContent","frozen","mermaidBlockIsComplete","MermaidChart","CodeBlock","displayContent","isComplete","useTypewriterStateMachine","renderSegments","splitContentSegments","hasSandbox","mergedRenderSegments","parseMarkdownSegments","hasCompleted","renderMarkdownSegments","raw","keyPrefix","seg","index","key","idx","IframeSandbox","React","jsxs"],"mappings":"ulEAwFMA,EAA8C,CAAC,CAAE,IAAAC,KAAU,CAC/D,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EAE3CC,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAOH,EAAQ,QACrB,GAAI,CAACG,EAAM,OACX,MAAMC,EAAaD,EAAK,YAAcA,EAAK,aAAa,CAAE,KAAM,OAAQ,EAClEE,EAAU,2BAChB,IAAIC,EAAUF,EAAW,eAAeC,CAAO,EAE1CC,IACHA,EAAU,SAAS,cAAc,OAAO,EACxCA,EAAQ,GAAKD,EAEbC,EAAQ,YAAc;AAAA;AAAA;AAAA;AAAA,QAKtBF,EAAW,YAAYE,CAAO,GAGV,MAAM,KAAKF,EAAW,UAAU,EAAE,OACrDG,GAASA,IAASD,CAAA,EAEP,QAASC,GAASH,EAAW,YAAYG,CAAI,CAAC,EAE5D,MAAMC,EAAW,SAAS,cAA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I,CAACkD,EAAKC,IAAU,CAC5B,GAAID,EAAI,OAAS,OACf,OACEtE,EAAAA,kBAAAA,IAACe,EAAA,CAEC,WAAAE,EACA,QAASqD,EAAI,KAAA,EAFRC,CAAA,EAOX,GAAID,EAAI,OAAS,UACf,OACEtE,EAAAA,kBAAAA,IAACwD,EAAAA,QAAA,CAEC,MAAOc,EAAI,MACX,OAAQ,CAACA,EAAI,QAAA,EAFRC,CAAA,EAOX,GAAID,EAAI,OAAS,MACf,OAAOtE,EAAAA,kBAAAA,IAAClC,EAAA,CAA6B,IAAKwG,EAAI,OAAhBC,CAAuB,CAEzD,CAAC,EAEA7C,GACC1B,EAAAA,kBAAAA,IAAC,MAAA,CAAI,UAAU,4BACZ,SAAA2E,EAAM,cAAcjD,EAAiB,CACpC,QAAAD,EACA,eAAAiC,EACA,OAAA/B,CAAA,CACD,CAAA,CACH,CAAA,EAEJ,CAEJ"}
1
+ {"version":3,"file":"ContentRender.cjs.js","sources":["../../../src/components/ContentRender/ContentRender.tsx"],"sourcesContent":["import \"highlight.js/styles/github.css\";\nimport \"katex/dist/katex.min.css\";\nimport React, { useEffect, useMemo, useRef } from \"react\";\nimport ReactMarkdown from \"react-markdown\";\nimport rehypeHighlight from \"rehype-highlight\";\nimport rehypeKatex from \"rehype-katex\";\nimport rehypeRaw from \"rehype-raw\";\nimport remarkBreaks from \"remark-breaks\";\nimport remarkFlow from \"remark-flow\";\nimport remarkGfm from \"remark-gfm\";\nimport remarkMath from \"remark-math\";\nimport { CustomRenderBarProps, OnSendContentParams } from \"../types\";\nimport { sanitizeInvalidTagName } from \"./utils/sanitize-invalid-tag-name\";\nimport { stripSvgTextLineBreaks } from \"./utils/strip-svg-text-line-breaks\";\nimport \"./contentRender.css\";\nimport \"./github-markdown-light.css\";\nimport CodeBlock from \"./CodeBlock\";\nimport CustomButtonInputVariable, {\n ComponentsWithCustomVariable,\n} from \"./plugins/CustomVariable\";\nimport MermaidChart from \"./plugins/MermaidChart\";\nimport useTypewriterStateMachine from \"./useTypewriterStateMachine\";\nimport {\n preserveCustomVariableProperties,\n restoreCustomVariableProperties,\n} from \"./utils/custom-variable-props\";\nimport {\n highlightLanguages,\n subsetLanguages,\n} from \"./utils/highlight-languages\";\n// import { processMarkdownText } from \"./utils/process-markdown\";\nimport {\n parseMarkdownSegments,\n mermaidBlockIsComplete,\n} from \"./utils/mermaid-parse\";\nimport { normalizeInlineHtml } from \"./utils/normalize-inline-html\";\nimport IframeSandbox from \"./IframeSandbox\";\nimport {\n splitContentSegments,\n type RenderSegment,\n} from \"./utils/split-content\";\n// Define component Props type\nexport interface ContentRenderProps {\n content: string;\n /**\n+ * Callback invoked when the custom button after content is clicked.\n+ * This button is rendered via the `<custom-button-after-content>` tag in markdown content.\n+ * @example\n+ * ```tsx\n+ * <ContentRender\n+ * content=\"Hello <custom-button-after-content>Ask</custom-button-after-content>\"\n+ * onClickCustomButtonAfterContent={() => console.log('Button clicked')}\n+ * />\n+ * ```\n+ */\n customRenderBar?: CustomRenderBarProps;\n onClickCustomButtonAfterContent?: () => void;\n onSend?: (content: OnSendContentParams) => void;\n typingSpeed?: number;\n enableTypewriter?: boolean;\n defaultButtonText?: string;\n defaultInputText?: string; // Text input by user\n defaultSelectedValues?: string[]; // Default selected values for multi-select\n readonly?: boolean;\n onTypeFinished?: () => void;\n // Multi-select confirm button text (i18n support)\n confirmButtonText?: string;\n // Copy button text (i18n support)\n copyButtonText?: string;\n // Copied state text (i18n support)\n copiedButtonText?: string;\n // Dynamic interaction format for multi-select support\n dynamicInteractionFormat?: string;\n // Loading text before first HTML block renders inside iframe (i18n support)\n sandboxLoadingText?: string;\n // Loading text while styles are being generated inside iframe\n sandboxStyleLoadingText?: string;\n // Loading text while scripts are being cached/executed inside iframe\n sandboxScriptLoadingText?: string;\n // Fullscreen button text for iframe sandbox\n sandboxFullscreenButtonText?: string;\n // Sandbox render mode\n sandboxMode?: \"content\" | \"blackboard\";\n beforeSend?: (param: OnSendContentParams) => boolean;\n // tooltipMinLength?: number; // Control minimum character length for tooltip display, default 10\n}\n\n// Render svg string via Shadow DOM to avoid markdown wrapping\nconst SvgBlockInShadow: React.FC<{ svg: string }> = ({ svg }) => {\n const hostRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const host = hostRef.current;\n if (!host) return;\n const shadowRoot = host.shadowRoot ?? host.attachShadow({ mode: \"open\" });\n const styleId = \"content-render-svg-style\";\n let styleEl = shadowRoot.getElementById(styleId) as HTMLStyleElement | null;\n\n if (!styleEl) {\n styleEl = document.createElement(\"style\");\n styleEl.id = styleId;\n // Keep intrinsic SVG width so the wrapper can scroll horizontally when needed\n styleEl.textContent = `\n svg { height: auto; display: inline-block; }\n svg.content-render-svg-el--responsive { width: 100%; max-width: 100%; }\n svg.content-render-svg-el--fixed { max-width: none; }\n `;\n shadowRoot.appendChild(styleEl);\n }\n\n const nodesToRemove = Array.from(shadowRoot.childNodes).filter(\n (node) => node !== styleEl\n );\n nodesToRemove.forEach((node) => shadowRoot.removeChild(node));\n\n const template = document.createElement(\"template\");\n const cleanedSvg = stripSvgTextLineBreaks(svg);\n template.innerHTML = cleanedSvg;\n shadowRoot.append(template.content.cloneNode(true));\n\n let hasResponsiveSvg = false;\n let hasFixedSvg = false;\n\n shadowRoot.querySelectorAll(\"svg\").forEach((svgEl) => {\n // Derive responsive sizing from viewBox so pure viewBox SVGs stay visible and fluid\n const viewBox = svgEl.getAttribute(\"viewBox\");\n if (!viewBox) return;\n\n const dimensions = viewBox\n .trim()\n .split(/[\\s,]+/)\n .map((value) => Number(value));\n\n if (dimensions.length !== 4 || dimensions.some(Number.isNaN)) return;\n\n const [, , viewBoxWidth, viewBoxHeight] = dimensions;\n const widthAttr = svgEl.getAttribute(\"width\");\n const heightAttr = svgEl.getAttribute(\"height\");\n const isRelativeLength = (value?: string | null) => {\n if (!value) return false;\n const normalized = value.trim().toLowerCase();\n return normalized === \"auto\" || normalized.endsWith(\"%\");\n };\n const toNumericLength = (value?: string | null) => {\n if (!value) return null;\n const normalized = value.trim().toLowerCase();\n if (normalized === \"auto\" || normalized.endsWith(\"%\")) {\n return null;\n }\n const parsed = Number.parseFloat(normalized);\n return Number.isNaN(parsed) ? null : parsed;\n };\n // Treat percentage/auto sizing as responsive so viewBox drives the layout\n const isWidthRelative = isRelativeLength(widthAttr);\n const isHeightRelative = isRelativeLength(heightAttr);\n const widthMissing = !widthAttr || widthAttr === \"0\";\n const heightMissing = !heightAttr || heightAttr === \"0\";\n const numericWidth = toNumericLength(widthAttr);\n const numericHeight = toNumericLength(heightAttr);\n const matchesViewBox =\n numericWidth === viewBoxWidth && numericHeight === viewBoxHeight;\n\n // Prefer responsive layout when sizing is relative or matches the viewBox\n const shouldUseResponsiveSize =\n isWidthRelative ||\n isHeightRelative ||\n (widthMissing && heightMissing) ||\n matchesViewBox;\n\n if (shouldUseResponsiveSize) {\n hasResponsiveSvg = true;\n svgEl.classList.add(\"content-render-svg-el--responsive\");\n svgEl.classList.remove(\"content-render-svg-el--fixed\");\n svgEl.style.width = \"100%\";\n svgEl.style.height = \"auto\";\n if (!svgEl.style.aspectRatio && viewBoxHeight > 0) {\n svgEl.style.aspectRatio = `${viewBoxWidth} / ${viewBoxHeight}`;\n }\n return;\n }\n\n hasFixedSvg = true;\n svgEl.classList.add(\"content-render-svg-el--fixed\");\n svgEl.classList.remove(\"content-render-svg-el--responsive\");\n if (widthMissing && viewBoxWidth > 0) {\n svgEl.setAttribute(\"width\", `${viewBoxWidth}`);\n }\n if (heightMissing && viewBoxHeight > 0) {\n svgEl.setAttribute(\"height\", `${viewBoxHeight}`);\n }\n });\n\n const hostResponsive = hasResponsiveSvg && !hasFixedSvg;\n host.classList.toggle(\"content-render-svg--responsive\", hostResponsive);\n host.classList.toggle(\"content-render-svg--fixed\", !hostResponsive);\n }, [svg]);\n\n return (\n <div className=\"content-render-svg-scroll\">\n <div className=\"content-render-svg\" ref={hostRef} />\n </div>\n );\n};\n\n// Extended component interface\ntype CustomComponents = ComponentsWithCustomVariable & {\n \"custom-button-after-content\"?: React.ComponentType<{\n children: React.ReactNode;\n }>;\n};\n\nconst remarkPlugins = [remarkGfm, remarkMath, remarkFlow, remarkBreaks];\n\nconst rehypePlugins = [\n preserveCustomVariableProperties,\n rehypeRaw,\n sanitizeInvalidTagName,\n restoreCustomVariableProperties,\n [rehypeHighlight, { languages: highlightLanguages, subset: subsetLanguages }],\n rehypeKatex,\n];\n\nexport const MarkdownRenderer: React.FC<{\n content: string;\n components: CustomComponents;\n}> = ({ content: markdownContent, components }) => (\n <div className=\"markdown-renderer\">\n <ReactMarkdown\n remarkPlugins={remarkPlugins}\n rehypePlugins={rehypePlugins}\n components={components}\n >\n {markdownContent}\n </ReactMarkdown>\n </div>\n);\n\nconst mergeNonSandboxSegments = (\n segments: RenderSegment[],\n mergeSandboxSegments = false\n) => {\n if (segments.length <= 1) return segments;\n const merged: RenderSegment[] = [];\n\n segments.forEach((segment) => {\n const last = merged[merged.length - 1];\n\n if (\n mergeSandboxSegments &&\n segment.type === \"sandbox\" &&\n last?.type === \"sandbox\"\n ) {\n merged[merged.length - 1] = {\n type: \"sandbox\",\n value: `${last.value}${segment.value}`,\n };\n return;\n }\n\n if (segment.type === \"sandbox\") {\n merged.push(segment);\n return;\n }\n\n if (last && last.type !== \"sandbox\") {\n merged[merged.length - 1] = {\n type: \"markdown\",\n value: `${last.value}${segment.value}`,\n };\n return;\n }\n\n merged.push({ type: \"markdown\", value: segment.value });\n });\n\n return merged;\n};\n\nconst ContentRender: React.FC<ContentRenderProps> = ({\n content,\n customRenderBar,\n onSend,\n typingSpeed = 30,\n enableTypewriter = false,\n defaultButtonText,\n defaultInputText,\n defaultSelectedValues,\n readonly = false,\n onTypeFinished,\n confirmButtonText,\n copyButtonText,\n copiedButtonText,\n sandboxLoadingText,\n sandboxStyleLoadingText,\n sandboxScriptLoadingText,\n sandboxFullscreenButtonText,\n sandboxMode = \"content\",\n onClickCustomButtonAfterContent,\n beforeSend,\n // tooltipMinLength,\n}) => {\n const normalizedContent = useMemo(\n () => normalizeInlineHtml(content),\n [content]\n );\n\n // Use custom Hook to handle typewriter effect\n const components: CustomComponents = {\n \"custom-button-after-content\": ({\n children,\n }: {\n children: React.ReactNode;\n }) => {\n return (\n <button\n className=\"content-render-custom-button-after-content\"\n onClick={onClickCustomButtonAfterContent}\n >\n <span className=\"content-render-custom-button-after-content-inner\">\n {children}\n </span>\n </button>\n );\n },\n \"custom-variable\": (props) => (\n <CustomButtonInputVariable\n {...props}\n readonly={readonly}\n defaultButtonText={defaultButtonText}\n defaultInputText={defaultInputText}\n defaultSelectedValues={defaultSelectedValues}\n onSend={onSend}\n beforeSend={beforeSend}\n confirmButtonText={confirmButtonText}\n // tooltipMinLength={tooltipMinLength}\n />\n ),\n code: (props) => {\n const { className, children, ...rest } = props as {\n className?: string;\n children?: React.ReactNode;\n };\n const match = /language-(\\w+)/.exec(className || \"\");\n const language = match?.[1];\n if (language === \"mermaid\") {\n const chartContent = children?.toString().replace(/\\n$/, \"\") || \"\";\n const frozen = mermaidBlockIsComplete(content, chartContent);\n return <MermaidChart chart={chartContent} frozen={frozen} />;\n }\n\n return (\n <code className={className} {...rest}>\n {children}\n </code>\n );\n },\n table: ({ ...props }) => (\n <div className=\"content-render-table-container\">\n <table className=\"content-render-table\" {...props} />\n </div>\n ),\n th: ({ ...props }) => <th className=\"content-render-th\" {...props} />,\n td: ({ ...props }) => <td className=\"content-render-td\" {...props} />,\n tr: ({ ...props }) => <tr className=\"content-render-tr\" {...props} />,\n li: ({ node, ...props }) => {\n const className = node?.properties?.className;\n const hasTaskListItem =\n (typeof className === \"string\" &&\n className.includes(\"task-list-item\")) ||\n (Array.isArray(className) && className.includes(\"task-list-item\"));\n if (hasTaskListItem) {\n return <li className=\"content-render-task-list-item\" {...props} />;\n }\n return <li {...props} />;\n },\n ol: ({ ...props }) => <ol className=\"content-render-ol\" {...props} />,\n ul: ({ ...props }) => <ul className=\"content-render-ul\" {...props} />,\n input: ({ ...props }) => {\n if (props.type === \"checkbox\") {\n return (\n <input\n type=\"checkbox\"\n className=\"content-render-checkbox\"\n disabled\n {...props}\n />\n );\n }\n return <input {...props} />;\n },\n a: ({ children, ...props }) => (\n <a target=\"_blank\" rel=\"noopener noreferrer\" {...props}>\n {children}\n </a>\n ),\n pre: (props) => (\n <CodeBlock\n {...props}\n copyButtonText={copyButtonText}\n copiedButtonText={copiedButtonText}\n />\n ),\n };\n\n const { displayContent, isComplete } = useTypewriterStateMachine({\n // processMarkdownText will let code block printf(\"You win!\\n\") become printf(\"You win!<br/>\");\n // content: processMarkdownText(content),\n content: normalizedContent,\n typingSpeed,\n disabled: !enableTypewriter,\n });\n\n const renderSegments = useMemo(\n () => splitContentSegments(content, true),\n [content]\n );\n\n const hasSandbox = renderSegments.some(\n (segment) => segment.type === \"sandbox\"\n );\n const mergedRenderSegments = useMemo(\n () => mergeNonSandboxSegments(renderSegments, sandboxMode === \"blackboard\"),\n [renderSegments, sandboxMode]\n );\n\n const segments = useMemo(\n () => parseMarkdownSegments(displayContent),\n [displayContent]\n );\n\n const hasCompleted = useRef(false);\n\n useEffect(() => {\n if (hasSandbox) return;\n if (isComplete && !hasCompleted.current) {\n hasCompleted.current = true; // Mark as completed\n onTypeFinished?.(); // Call the passed callback\n }\n }, [hasSandbox, isComplete, onTypeFinished]);\n\n useEffect(() => {\n if (hasSandbox) return;\n hasCompleted.current = false; // Reset completion status when content changes\n }, [hasSandbox, content]);\n\n const renderMarkdownSegments = (raw: string, keyPrefix: string) => {\n const normalized = normalizeInlineHtml(raw);\n const parsed = parseMarkdownSegments(normalized);\n\n return parsed.map((seg, index) => {\n const key = `${keyPrefix}-${seg.type}-${index}`;\n\n if (seg.type === \"text\") {\n return (\n <MarkdownRenderer\n key={key}\n components={components}\n content={seg.value}\n />\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart key={key} chart={seg.value} frozen={!seg.complete} />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={key} svg={seg.value} />;\n }\n\n return null;\n });\n };\n\n if (hasSandbox) {\n return (\n <div className=\"content-render markdown-body\">\n {mergedRenderSegments.map((segment, idx) =>\n segment.type === \"sandbox\" ? (\n <IframeSandbox\n key={`sandbox-${idx}`}\n hideFullScreen\n content={segment.value}\n className=\"content-render-iframe\"\n loadingText={sandboxLoadingText}\n styleLoadingText={sandboxStyleLoadingText}\n scriptLoadingText={sandboxScriptLoadingText}\n fullScreenButtonText={sandboxFullscreenButtonText}\n mode={sandboxMode}\n />\n ) : (\n <React.Fragment key={`md-${idx}`}>\n {renderMarkdownSegments(segment.value, `md-${idx}`)}\n </React.Fragment>\n )\n )}\n </div>\n );\n }\n\n return (\n <div className=\"content-render markdown-body\">\n {segments.map((seg, index) => {\n if (seg.type === \"text\") {\n return (\n <MarkdownRenderer\n key={index}\n components={components}\n content={seg.value}\n />\n );\n }\n\n if (seg.type === \"mermaid\") {\n return (\n <MermaidChart\n key={index}\n chart={seg.value}\n frozen={!seg.complete}\n />\n );\n }\n\n if (seg.type === \"svg\") {\n return <SvgBlockInShadow key={index} svg={seg.value} />;\n }\n })}\n\n {customRenderBar && (\n <div className=\"content-render-custom-bar\">\n {React.createElement(customRenderBar, {\n content,\n displayContent,\n onSend,\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport default ContentRender;\n"],"names":["SvgBlockInShadow","svg","hostRef","useRef","useEffect","host","shadowRoot","styleId","styleEl","node","template","cleanedSvg","stripSvgTextLineBreaks","hasResponsiveSvg","hasFixedSvg","svgEl","viewBox","dimensions","value","viewBoxWidth","viewBoxHeight","widthAttr","heightAttr","isRelativeLength","normalized","toNumericLength","parsed","isWidthRelative","isHeightRelative","widthMissing","heightMissing","numericWidth","numericHeight","hostResponsive","jsx","remarkPlugins","remarkGfm","remarkMath","remarkFlow","remarkBreaks","rehypePlugins","preserveCustomVariableProperties","rehypeRaw","sanitizeInvalidTagName","restoreCustomVariableProperties","rehypeHighlight","highlightLanguages","subsetLanguages","rehypeKatex","MarkdownRenderer","markdownContent","components","ReactMarkdown","mergeNonSandboxSegments","segments","mergeSandboxSegments","merged","segment","last","ContentRender","content","customRenderBar","onSend","typingSpeed","enableTypewriter","defaultButtonText","defaultInputText","defaultSelectedValues","readonly","onTypeFinished","confirmButtonText","copyButtonText","copiedButtonText","sandboxLoadingText","sandboxStyleLoadingText","sandboxScriptLoadingText","sandboxFullscreenButtonText","sandboxMode","onClickCustomButtonAfterContent","beforeSend","normalizedContent","useMemo","normalizeInlineHtml","children","props","CustomButtonInputVariable","className","rest","chartContent","frozen","mermaidBlockIsComplete","MermaidChart","CodeBlock","displayContent","isComplete","useTypewriterStateMachine","renderSegments","splitContentSegments","hasSandbox","mergedRenderSegments","parseMarkdownSegments","hasCompleted","renderMarkdownSegments","raw","keyPrefix","seg","index","key","idx","IframeSandbox","React","jsxs"],"mappings":"ulEAwFMA,EAA8C,CAAC,CAAE,IAAAC,KAAU,CAC/D,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EAE3CC,OAAAA,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAOH,EAAQ,QACrB,GAAI,CAACG,EAAM,OACX,MAAMC,EAAaD,EAAK,YAAcA,EAAK,aAAa,CAAE,KAAM,OAAQ,EAClEE,EAAU,2BAChB,IAAIC,EAAUF,EAAW,eAAeC,CAAO,EAE1CC,IACHA,EAAU,SAAS,cAAc,OAAO,EACxCA,EAAQ,GAAKD,EAEbC,EAAQ,YAAc;AAAA;AAAA;AAAA;AAAA,QAKtBF,EAAW,YAAYE,CAAO,GAGV,MAAM,KAAKF,EAAW,UAAU,EAAE,OACrDG,GAASA,IAASD,CAAA,EAEP,QAASC,GAASH,EAAW,YAAYG,CAAI,CAAC,EAE5D,MAAMC,EAAW,SAAS,cAAc,UAAU,EAC5CC,EAAaC,EAAAA,uBAAuBX,CAAG,EAC7CS,EAAS,UAAYC,EACrBL,EAAW,OAAOI,EAAS,QAAQ,UAAU,EAAI,CAAC,EAElD,IAAIG,EAAmB,GACnBC,EAAc,GAElBR,E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