@feathery/react 2.35.5 → 2.35.6

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 (85) hide show
  1. package/cjs/elements/fields/PhoneField/index.d.ts.map +1 -1
  2. package/cjs/{fthry_FormControl.DaUt6Q4A.js → fthry_FormControl.BW2luf6b.js} +1 -1
  3. package/cjs/{fthry_InlineTooltip.BN_5n1Zr.js → fthry_InlineTooltip.Mlxca5FA.js} +2 -2
  4. package/cjs/{fthry_Overlay.CdiRPpYM.js → fthry_Overlay.Cg0QpODv.js} +1 -1
  5. package/cjs/{fthry_PaymentMethodField.ME77grq0.js → fthry_PaymentMethodField.Cgh4x3j6.js} +4 -4
  6. package/cjs/{fthry_Placeholder.BZVd1Nse.js → fthry_Placeholder.08FOWEfL.js} +1 -1
  7. package/cjs/{fthry_ShowEyeIcon.-mKKzVU1.js → fthry_ShowEyeIcon.CYBbYbAt.js} +1 -1
  8. package/cjs/{fthry_highlighted-body-TPN3WLV5.Dcm6OeXB.js → fthry_highlighted-body-TPN3WLV5.CSvojbmB.js} +1 -1
  9. package/cjs/{fthry_index.DzbsRASm.js → fthry_index.BAYNVQiV.js} +5 -5
  10. package/cjs/{fthry_index.y27mbCX7.js → fthry_index.BJlO-_Xi.js} +1 -1
  11. package/cjs/{fthry_index.C2hSwIqd.js → fthry_index.BZIHWjzW.js} +9 -9
  12. package/cjs/{fthry_index.BVx800vr.js → fthry_index.CE0YPV31.js} +2 -2
  13. package/cjs/{fthry_index.BCULJvTO.js → fthry_index.CP1NeOpo.js} +1 -1
  14. package/cjs/{fthry_index.BYWah930.js → fthry_index.CPMwCBN8.js} +7 -7
  15. package/cjs/{fthry_index.5dAr6d4M.js → fthry_index.CZ0LQMV3.js} +1 -1
  16. package/cjs/{fthry_index.CRnr22Hx.js → fthry_index.CZFgptws.js} +5 -5
  17. package/cjs/{fthry_index.C9qQDKks.js → fthry_index.D4RcUbOZ.js} +1 -1
  18. package/cjs/{fthry_index.DrfVU31N.js → fthry_index.DDBLrM3U.js} +6 -6
  19. package/cjs/{fthry_index.CCVO6wav.js → fthry_index.DD_ZnWLL.js} +4 -4
  20. package/cjs/{fthry_index.DdpsJ9HS.js → fthry_index.DUtZbdge.js} +3 -3
  21. package/cjs/{fthry_index.CQOVJ7hE.js → fthry_index.Dh3r1jzX.js} +4 -4
  22. package/cjs/{fthry_index.DpVMtSJd.js → fthry_index.DmtoidRP.js} +7 -7
  23. package/cjs/{fthry_index.B7OKah82.js → fthry_index.Dol8axAs.js} +3 -3
  24. package/cjs/{fthry_index.CDlQur2w.js → fthry_index.DrM__7Oq.js} +8 -8
  25. package/cjs/{fthry_index.EClWoA3c.js → fthry_index.I1kV4Q0Y.js} +1 -1
  26. package/cjs/{fthry_index.CQVYmlhy.js → fthry_index.PCjx1z_0.js} +4 -4
  27. package/cjs/{fthry_index.BntwhX-s.js → fthry_index.WqNbQww4.js} +1 -1
  28. package/cjs/{fthry_index.Dw5zorpo.js → fthry_index.bfRn18cE.js} +1 -1
  29. package/cjs/{fthry_index.Dw6Bs9gU.js → fthry_index.gq1lrV1W.js} +5 -5
  30. package/cjs/{fthry_index.BIur9PbS.js → fthry_index.rZ4JHizo.js} +1 -1
  31. package/cjs/{fthry_index.Bjrl7VEP.js → fthry_index.wRKUPUSx.js} +28 -28
  32. package/cjs/{fthry_index.DC6Rmg6e.js → fthry_index.z-KxVTcc.js} +2 -2
  33. package/cjs/{fthry_input.BVQ4TlVH.js → fthry_input.C27vMNQZ.js} +1 -1
  34. package/cjs/{fthry_mermaid-O7DHMXV3.BTM-X_An.js → fthry_mermaid-O7DHMXV3.DvAzu2YX.js} +1 -1
  35. package/cjs/{fthry_script.EnDcxIwQ.js → fthry_script.CtBj75pv.js} +1 -1
  36. package/cjs/{fthry_styles.C5vEfLaH.js → fthry_styles.BC68mDTZ.js} +1 -1
  37. package/cjs/{fthry_useElementSize.C9TpCKyQ.js → fthry_useElementSize.CDZ5u0Ws.js} +1 -1
  38. package/cjs/{fthry_useSalesforceSync.PMjknvjQ.js → fthry_useSalesforceSync.DsBX65nq.js} +1 -1
  39. package/cjs/{fthry_webfontloader.B9THUinO.js → fthry_webfontloader.B6fIWjJZ.js} +1 -1
  40. package/cjs/index.js +1 -1
  41. package/dist/elements/fields/PhoneField/index.d.ts.map +1 -1
  42. package/dist/{fthry_FormControl.sclfxA3b.js → fthry_FormControl.O085JX67.js} +1 -1
  43. package/dist/{fthry_InlineTooltip.BeMKWEam.js → fthry_InlineTooltip.C_2dIWoX.js} +2 -2
  44. package/dist/{fthry_Overlay.B1Iy0Eqa.js → fthry_Overlay.DESl63t4.js} +1 -1
  45. package/dist/{fthry_PaymentMethodField.C2myMCWu.js → fthry_PaymentMethodField.DaEqRTCF.js} +4 -4
  46. package/dist/{fthry_Placeholder.Dd-G3KUQ.js → fthry_Placeholder.9GNd6PBk.js} +1 -1
  47. package/dist/{fthry_ShowEyeIcon.DLGKc1W7.js → fthry_ShowEyeIcon.e8d4ZVYe.js} +1 -1
  48. package/dist/{fthry_highlighted-body-TPN3WLV5.Bqf1vli5.js → fthry_highlighted-body-TPN3WLV5.DAFyR3tM.js} +1 -1
  49. package/dist/{fthry_index.CS5ModvZ.js → fthry_index.2bI0CaGI.js} +9 -9
  50. package/dist/{fthry_index.BGwC0Em6.js → fthry_index.B0jBp5Bo.js} +2 -2
  51. package/dist/{fthry_index.Ce9yVjqo.js → fthry_index.BOoyNLfg.js} +8 -8
  52. package/dist/{fthry_index.CV80Hzf0.js → fthry_index.BQ01-HRE.js} +3 -3
  53. package/dist/{fthry_index.Dd0nw2-a.js → fthry_index.BfuZKkLo.js} +4 -4
  54. package/dist/{fthry_index.DUH-FYR7.js → fthry_index.BlvqpHcq.js} +7 -7
  55. package/dist/{fthry_index.DHmIJOtc.js → fthry_index.BzghbbE-.js} +1 -1
  56. package/dist/{fthry_index.D8esnC2B.js → fthry_index.CHIhizii.js} +7 -7
  57. package/dist/{fthry_index.Dw_baEzq.js → fthry_index.CZ_KQITm.js} +5 -5
  58. package/dist/{fthry_index.j5UsuIB0.js → fthry_index.Cg4OeNbv.js} +5 -5
  59. package/dist/{fthry_index.CY266UOR.js → fthry_index.ChMdhNnW.js} +5 -5
  60. package/dist/{fthry_index.BolvDZmi.js → fthry_index.CuAjoWfX.js} +1 -1
  61. package/dist/{fthry_index.CnUrdf4Z.js → fthry_index.Cw7KGY0y.js} +1 -1
  62. package/dist/{fthry_index.WNJ90rIu.js → fthry_index.DFOzitvF.js} +1 -1
  63. package/dist/{fthry_index.CgzYgkXi.js → fthry_index.DIKg6OQ8.js} +1 -1
  64. package/dist/{fthry_index.CyNE1RwG.js → fthry_index.DPQkfUFN.js} +4 -4
  65. package/dist/{fthry_index.Bs_G9aXj.js → fthry_index.DcphWRmc.js} +4 -4
  66. package/dist/{fthry_index.BTyRciLF.js → fthry_index.DzsmDsuN.js} +3 -3
  67. package/dist/{fthry_index.CaVUx29U.js → fthry_index.G3vSsC0d.js} +1 -1
  68. package/dist/{fthry_index.Be158R4k.js → fthry_index.dSi_qHfW.js} +6 -6
  69. package/dist/{fthry_index.B_0FuSje.js → fthry_index.hE4f6a1Z.js} +2 -2
  70. package/dist/{fthry_index.Bc_z1_gX.js → fthry_index.oselwrOk.js} +1 -1
  71. package/dist/{fthry_index.1eu5oYla.js → fthry_index.ywrc3PlZ.js} +1 -1
  72. package/dist/{fthry_index.BvhUrwDK.js → fthry_index.zXD9Mmpj.js} +28 -28
  73. package/dist/{fthry_input.BjJuwbFd.js → fthry_input.CNoqGeXu.js} +1 -1
  74. package/dist/{fthry_mermaid-O7DHMXV3.DSafYX1V.js → fthry_mermaid-O7DHMXV3.DUefPHZV.js} +1 -1
  75. package/dist/{fthry_script.CKhXC3Rp.js → fthry_script.DOLGnV9C.js} +1 -1
  76. package/dist/{fthry_styles.B1tg4MQT.js → fthry_styles.OrULk99R.js} +1 -1
  77. package/dist/{fthry_useElementSize.2EB6zNhJ.js → fthry_useElementSize.SMyFX4zP.js} +1 -1
  78. package/dist/{fthry_useSalesforceSync.BvRQJ4UC.js → fthry_useSalesforceSync.o4vXIMTZ.js} +1 -1
  79. package/dist/{fthry_webfontloader.Bw152_Jk.js → fthry_webfontloader.C6hev9y1.js} +1 -1
  80. package/dist/index.js +1 -1
  81. package/package.json +1 -1
  82. package/umd/{CheckboxGroupField.b15705b46268e1142782.js → CheckboxGroupField.18b80da05b582f411aba.js} +1 -1
  83. package/umd/{PhoneField.19c987f04cfcb60ab07c.js → PhoneField.6b9ad2d0d9387ef78a1f.js} +1 -1
  84. package/umd/{RadioButtonGroupField.38d62523106149c48f2e.js → RadioButtonGroupField.3e94f00868ba5b71ba55.js} +1 -1
  85. package/umd/index.js +1 -1
@@ -46149,9 +46149,9 @@ function init(sdkKey, options) {
46149
46149
  if (runningInClient()) {
46150
46150
  // Dynamically load libraries that must be client side
46151
46151
  global.scriptjsLoadPromise = import(
46152
- /* webpackChunkName: "scriptjs" */ './fthry_script.CKhXC3Rp.js').then(function (n) { return n.s; });
46152
+ /* webpackChunkName: "scriptjs" */ './fthry_script.DOLGnV9C.js').then(function (n) { return n.s; });
46153
46153
  global.webfontloaderPromise = import(
46154
- /* webpackChunkName: "webfontloader" */ './fthry_webfontloader.Bw152_Jk.js').then(function (n) { return n.w; });
46154
+ /* webpackChunkName: "webfontloader" */ './fthry_webfontloader.C6hev9y1.js').then(function (n) { return n.w; });
46155
46155
  // Client-side tracking logic
46156
46156
  if (initState.userTracking === 'cookie') {
46157
46157
  var cookieKey = "feathery-user-id-".concat(sdkKey);
@@ -46297,7 +46297,7 @@ function getFieldValues() {
46297
46297
  return __assign({}, fieldValues);
46298
46298
  }
46299
46299
  function logFeatheryBadge() {
46300
- console.log('%c Feathery %c v' + "2.35.5" + ' ', // replaced with real version during build
46300
+ console.log('%c Feathery %c v' + "2.35.6" + ' ', // replaced with real version during build
46301
46301
  'background: #e2626e; color: white; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;', 'background: #fce7e9; color: #c5495a; padding: 2px 6px; border-radius: 0 3px 3px 0;');
46302
46302
  }
46303
46303
 
@@ -47781,39 +47781,39 @@ breakpoint) {
47781
47781
  return styles.getTarget('inner-container', undefined, viewport === 'mobile');
47782
47782
  };
47783
47783
 
47784
- var AddressLine1 = lazy$1(function () { return import(/* webpackChunkName: "AddressField" */ './fthry_index.CY266UOR.js'); });
47785
- var ButtonGroupField = lazy$1(function () { return import(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.Bs_G9aXj.js'); });
47786
- var CheckboxField = lazy$1(function () { return import(/* webpackChunkName: "CheckboxField" */ './fthry_index.DHmIJOtc.js'); });
47784
+ var AddressLine1 = lazy$1(function () { return import(/* webpackChunkName: "AddressField" */ './fthry_index.ChMdhNnW.js'); });
47785
+ var ButtonGroupField = lazy$1(function () { return import(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.DcphWRmc.js'); });
47786
+ var CheckboxField = lazy$1(function () { return import(/* webpackChunkName: "CheckboxField" */ './fthry_index.BzghbbE-.js'); });
47787
47787
  var CheckboxGroupField = lazy$1(function () {
47788
- return import(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.D8esnC2B.js');
47788
+ return import(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.CHIhizii.js');
47789
47789
  });
47790
- var ColorPickerField = lazy$1(function () { return import(/* webpackChunkName: "ColorPickerField" */ './fthry_index.CgzYgkXi.js'); });
47791
- var CustomField = lazy$1(function () { return import(/* webpackChunkName: "CustomField" */ './fthry_index.Bc_z1_gX.js'); });
47790
+ var ColorPickerField = lazy$1(function () { return import(/* webpackChunkName: "ColorPickerField" */ './fthry_index.DIKg6OQ8.js'); });
47791
+ var CustomField = lazy$1(function () { return import(/* webpackChunkName: "CustomField" */ './fthry_index.oselwrOk.js'); });
47792
47792
  var DateSelectorField = lazy$1(function () {
47793
- return import(/* webpackChunkName: "DateSelectorField" */ './fthry_index.Be158R4k.js');
47793
+ return import(/* webpackChunkName: "DateSelectorField" */ './fthry_index.dSi_qHfW.js');
47794
47794
  });
47795
- var DropdownField = lazy$1(function () { return import(/* webpackChunkName: "DropdownField" */ './fthry_index.Dd0nw2-a.js'); });
47795
+ var DropdownField = lazy$1(function () { return import(/* webpackChunkName: "DropdownField" */ './fthry_index.BfuZKkLo.js'); });
47796
47796
  var DropdownMultiField = lazy$1(function () {
47797
- return import(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.j5UsuIB0.js');
47797
+ return import(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.Cg4OeNbv.js');
47798
47798
  });
47799
- var FileUploadField = lazy$1(function () { return import(/* webpackChunkName: "FileUploadField" */ './fthry_index.WNJ90rIu.js'); });
47800
- var MatrixField = lazy$1(function () { return import(/* webpackChunkName: "MatrixField" */ './fthry_index.CV80Hzf0.js'); });
47801
- var PasswordField = lazy$1(function () { return import(/* webpackChunkName: "PasswordField" */ './fthry_index.Dw_baEzq.js'); });
47799
+ var FileUploadField = lazy$1(function () { return import(/* webpackChunkName: "FileUploadField" */ './fthry_index.DFOzitvF.js'); });
47800
+ var MatrixField = lazy$1(function () { return import(/* webpackChunkName: "MatrixField" */ './fthry_index.BQ01-HRE.js'); });
47801
+ var PasswordField = lazy$1(function () { return import(/* webpackChunkName: "PasswordField" */ './fthry_index.CZ_KQITm.js'); });
47802
47802
  var PaymentMethodField = lazy$1(function () {
47803
- return import(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.C2myMCWu.js');
47803
+ return import(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.DaEqRTCF.js');
47804
47804
  });
47805
- var PhoneField = lazy$1(function () { return import(/* webpackChunkName: "PhoneField" */ './fthry_index.CS5ModvZ.js'); });
47806
- var PinInputField = lazy$1(function () { return import(/* webpackChunkName: "PinInputField" */ './fthry_index.1eu5oYla.js'); });
47807
- var QRScanner = lazy$1(function () { return import(/* webpackChunkName: "QRScanner" */ './fthry_index.BGwC0Em6.js'); });
47805
+ var PhoneField = lazy$1(function () { return import(/* webpackChunkName: "PhoneField" */ './fthry_index.2bI0CaGI.js'); });
47806
+ var PinInputField = lazy$1(function () { return import(/* webpackChunkName: "PinInputField" */ './fthry_index.ywrc3PlZ.js'); });
47807
+ var QRScanner = lazy$1(function () { return import(/* webpackChunkName: "QRScanner" */ './fthry_index.B0jBp5Bo.js'); });
47808
47808
  var RadioButtonGroupField = lazy$1(function () {
47809
47809
  return import(
47810
- /* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.DUH-FYR7.js');
47810
+ /* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.BlvqpHcq.js');
47811
47811
  });
47812
- var RatingField = lazy$1(function () { return import(/* webpackChunkName: "RatingField" */ './fthry_index.CaVUx29U.js'); });
47813
- var SignatureField = lazy$1(function () { return import(/* webpackChunkName: "SignatureField" */ './fthry_index.BTyRciLF.js'); });
47814
- var SliderField = lazy$1(function () { return import(/* webpackChunkName: "SliderField" */ './fthry_index.B_0FuSje.js'); });
47815
- var TextField = lazy$1(function () { return import(/* webpackChunkName: "TextField" */ './fthry_index.Ce9yVjqo.js'); });
47816
- var TextArea = lazy$1(function () { return import(/* webpackChunkName: "TextArea" */ './fthry_index.CyNE1RwG.js'); });
47812
+ var RatingField = lazy$1(function () { return import(/* webpackChunkName: "RatingField" */ './fthry_index.G3vSsC0d.js'); });
47813
+ var SignatureField = lazy$1(function () { return import(/* webpackChunkName: "SignatureField" */ './fthry_index.DzsmDsuN.js'); });
47814
+ var SliderField = lazy$1(function () { return import(/* webpackChunkName: "SliderField" */ './fthry_index.hE4f6a1Z.js'); });
47815
+ var TextField = lazy$1(function () { return import(/* webpackChunkName: "TextField" */ './fthry_index.BOoyNLfg.js'); });
47816
+ var TextArea = lazy$1(function () { return import(/* webpackChunkName: "TextArea" */ './fthry_index.DPQkfUFN.js'); });
47817
47817
  var Fields = {
47818
47818
  AddressLine1: AddressLine1,
47819
47819
  ButtonGroupField: ButtonGroupField,
@@ -48763,7 +48763,7 @@ function ElementSkeleton(_a) {
48763
48763
  }
48764
48764
  var templateObject_1;
48765
48765
 
48766
- var TableElement = lazy$1(function () { return import(/* webpackChunkName: "TableElement" */ './fthry_index.CnUrdf4Z.js'); });
48766
+ var TableElement = lazy$1(function () { return import(/* webpackChunkName: "TableElement" */ './fthry_index.Cw7KGY0y.js'); });
48767
48767
  var Basic = {
48768
48768
  ImageElement: ImageElement,
48769
48769
  VideoElement: VideoElement,
@@ -99852,14 +99852,14 @@ ${e}</tr>
99852
99852
  Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+T(n.message+"",true)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}};var L$1=new D;function g(u,e){return L$1.parse(u,e)}g.options=g.setOptions=function(u){return L$1.setOptions(u),g.defaults=L$1.defaults,G(g.defaults),g};g.getDefaults=M;g.defaults=O;g.use=function(...u){return L$1.use(...u),g.defaults=L$1.defaults,G(g.defaults),g};g.walkTokens=function(u,e){return L$1.walkTokens(u,e)};g.parseInline=L$1.parseInline;g.Parser=b;g.parser=b.parse;g.Renderer=y$1;g.TextRenderer=$;g.Lexer=x;g.lexer=x.lex;g.Tokenizer=w;g.Hooks=P;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;b.parse;x.lex;
99853
99853
 
99854
99854
  var En=300,Hn="300px",Dn=500;function Lt(e={}){let{immediate:t=false,debounceDelay:o=En,rootMargin:n=Hn,idleTimeout:r=Dn}=e,[s,a]=useState(false),l=useRef(null),i=useRef(null),c=useRef(null),d=useMemo(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:false,timeRemaining:()=>Math.max(0,50-(Date.now()-g))});},1)},[]),u=useMemo(()=>typeof window!="undefined"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):d,[d]),m=useMemo(()=>typeof window!="undefined"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p);},[]);return useEffect(()=>{if(t){a(true);return}let p=l.current;if(!p)return;i.current&&(clearTimeout(i.current),i.current=null),c.current&&(m(c.current),c.current=null);let g=()=>{i.current&&(clearTimeout(i.current),i.current=null),c.current&&(m(c.current),c.current=null);},h=x=>{c.current=u(w=>{w.timeRemaining()>0||w.didTimeout?(a(true),x.disconnect()):c.current=u(()=>{a(true),x.disconnect();},{timeout:r/2});},{timeout:r});},b=x=>{g(),i.current=window.setTimeout(()=>{var I,H;let w=x.takeRecords();(w.length===0||(H=(I=w.at(-1))==null?void 0:I.isIntersecting)!=null&&H)&&h(x);},o);},f=(x,w)=>{x.isIntersecting?b(w):g();},T=new IntersectionObserver(x=>{for(let w of x)f(w,T);},{rootMargin:n,threshold:0});return T.observe(p),()=>{i.current&&clearTimeout(i.current),c.current&&m(c.current),T.disconnect();}},[t,o,n,r,m,u]),{shouldRender:s,containerRef:l}}var Rt=/\s/,On=/^\s+$/,Vn=new Set(["code","pre","svg","math","annotation"]),jn=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",Fn=e=>e.some(t=>jn(t)&&Vn.has(t.tagName)),zn=e=>{let t=[],o="",n=false;for(let r of e){let s=Rt.test(r);s!==n&&o&&(t.push(o),o=""),o+=r,n=s;}return o&&t.push(o),t},_n=e=>{let t=[],o="";for(let n of e)Rt.test(n)?o+=n:(o&&(t.push(o),o=""),t.push(n));return o&&t.push(o),t},qn=(e,t,o,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":true,style:r?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${n}`:`--sd-animation:sd-${t};--sd-duration:${o}ms;--sd-easing:${n}`},children:[{type:"text",value:e}]}),$n=(e,t,o,n,r)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(Fn(t))return SKIP;let a=s,l=a.children.indexOf(e);if(l===-1)return;let i=e.value;if(!i.trim()){r.count+=i.length;return}let c=o.sep==="char"?_n(i):zn(i),d=n.prevContentLength,u=c.map(m=>{let p=r.count;if(r.count+=m.length,On.test(m))return {type:"text",value:m};let g=d>0&&p<d;return qn(m,o.animation,o.duration,o.easing,g)});return a.children.splice(l,1,...u),l+u.length},Wn=0;function be(e){var s,a,l,i;let t={animation:(s=e==null?void 0:e.animation)!=null?s:"fadeIn",duration:(a=e==null?void 0:e.duration)!=null?a:150,easing:(l=e==null?void 0:e.easing)!=null?l:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word"},o={prevContentLength:0,lastRenderCharCount:0},n=Wn++,r=()=>c=>{let d={count:0};visitParents(c,"text",(u,m)=>$n(u,m,t,o,d)),o.lastRenderCharCount=d.count,o.prevContentLength=0;};return Object.defineProperty(r,"name",{value:`rehypeAnimate$${n}`}),{name:"animate",type:"animate",rehypePlugin:r,setPrevContentLength(c){o.prevContentLength=c;},getLastRenderCharCount(){let c=o.lastRenderCharCount;return o.lastRenderCharCount=0,c}}}be();var Qe=createContext(false),et=()=>useContext(Qe);var he=(...e)=>twMerge(clsx(e)),Jn=(e,t)=>{if(!e||!t)return t;let o=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(o)?n:`${e}:${n}`).join(" ")},Ht=e=>e?(...t)=>Jn(e,twMerge(clsx(t))):he,J=(e,t,o)=>{let n=typeof t=="string"?new Blob([t],{type:o}):t,r=URL.createObjectURL(n),s=document.createElement("a");s.href=r,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(r);};var Se=createContext(he),y=()=>useContext(Se);var Yn=he("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Qn=e=>{let t={};for(let o of e.split(";")){let n=o.indexOf(":");if(n>0){let r=o.slice(0,n).trim(),s=o.slice(n+1).trim();r&&s&&(t[r]=s);}}return t},Bt=memo(({children:e,result:t,language:o,className:n,startLine:r,...s})=>{let a=y(),l=useMemo(()=>a(Yn),[a]),i=useMemo(()=>{let c={};return t.bg&&(c["--sdm-bg"]=t.bg),t.fg&&(c["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(c,Qn(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return jsx$2("div",{className:a(n,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":o,"data-streamdown":"code-block-body",...s,children:jsx$2("pre",{className:a(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:i,children:jsx$2("code",{className:a("[counter-increment:line_0] [counter-reset:line]"),style:r&&r>1?{counterReset:`line ${r-1}`}:void 0,children:t.tokens.map((c,d)=>jsx$2("span",{className:l,children:c.length===0||c.length===1&&c[0].content===""?`
99855
- `:c.map((u,m)=>{let p={},g=!!u.bgColor;if(u.color&&(p["--sdm-c"]=u.color),u.bgColor&&(p["--sdm-tbg"]=u.bgColor),u.htmlStyle)for(let[h,b]of Object.entries(u.htmlStyle))h==="color"?p["--sdm-c"]=b:h==="background-color"?(p["--sdm-tbg"]=b,g=true):p[h]=b;return jsx$2("span",{className:a("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",g&&"bg-[var(--sdm-tbg)]",g&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:p,...u.htmlAttrs,children:u.content},m)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine);var tt=({className:e,language:t,style:o,isIncomplete:n,...r})=>{let s=y();return jsx$2("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...o},...r})};var ot=createContext({code:""}),Ee=()=>useContext(ot);var nt=({language:e})=>{let t=y();return jsx$2("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:jsx$2("span",{className:t("ml-1 font-mono lowercase"),children:e})})};var sr=/\n+$/,ar=lazy$1(()=>import('./fthry_highlighted-body-TPN3WLV5.Bqf1vli5.js').then(e=>({default:e.HighlightedCodeBlockBody}))),rt=({code:e,language:t,className:o,children:n,isIncomplete:r=false,startLine:s,...a})=>{let l=y(),i=useMemo(()=>e.replace(sr,""),[e]),c=useMemo(()=>({bg:"transparent",fg:"inherit",tokens:i.split(`
99855
+ `:c.map((u,m)=>{let p={},g=!!u.bgColor;if(u.color&&(p["--sdm-c"]=u.color),u.bgColor&&(p["--sdm-tbg"]=u.bgColor),u.htmlStyle)for(let[h,b]of Object.entries(u.htmlStyle))h==="color"?p["--sdm-c"]=b:h==="background-color"?(p["--sdm-tbg"]=b,g=true):p[h]=b;return jsx$2("span",{className:a("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",g&&"bg-[var(--sdm-tbg)]",g&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:p,...u.htmlAttrs,children:u.content},m)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine);var tt=({className:e,language:t,style:o,isIncomplete:n,...r})=>{let s=y();return jsx$2("div",{className:s("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...o},...r})};var ot=createContext({code:""}),Ee=()=>useContext(ot);var nt=({language:e})=>{let t=y();return jsx$2("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:jsx$2("span",{className:t("ml-1 font-mono lowercase"),children:e})})};var sr=/\n+$/,ar=lazy$1(()=>import('./fthry_highlighted-body-TPN3WLV5.DAFyR3tM.js').then(e=>({default:e.HighlightedCodeBlockBody}))),rt=({code:e,language:t,className:o,children:n,isIncomplete:r=false,startLine:s,...a})=>{let l=y(),i=useMemo(()=>e.replace(sr,""),[e]),c=useMemo(()=>({bg:"transparent",fg:"inherit",tokens:i.split(`
99856
99856
  `).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[i]);return jsx$2(ot.Provider,{value:{code:e},children:jsxs$1(tt,{isIncomplete:r,language:t,children:[jsx$2(nt,{language:t}),n?jsx$2("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:jsx$2("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,jsx$2(Suspense,{fallback:jsx$2(Bt,{className:o,language:t,result:c,startLine:s,...a}),children:jsx$2(ar,{className:o,code:i,language:t,raw:c,startLine:s,...a})})]})})};var Vt=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),jt=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),Ft=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),zt=e=>jsxs$1("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[jsx$2("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),jsx$2("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),_t=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),qt=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),$t=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Wt=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Zt=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Xt=e=>jsx$2("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:jsx$2("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})});var we={CheckIcon:Vt,CopyIcon:jt,DownloadIcon:Ft,ExternalLinkIcon:Wt,Loader2Icon:zt,Maximize2Icon:_t,RotateCcwIcon:qt,XIcon:$t,ZoomInIcon:Zt,ZoomOutIcon:Xt},Kt=createContext(we),mr=(e,t)=>{if(e===t)return true;if(!(e&&t))return e===t;let o=Object.keys(e),n=Object.keys(t);return o.length!==n.length?false:o.every(r=>e[r]===t[r])},st=({icons:e,children:t})=>{let o=useRef(e),n=useRef(e?{...we,...e}:we);mr(o.current,e)||(o.current=e,n.current=e?{...we,...e}:we);let r=n.current;return jsx$2(Kt.Provider,{value:r,children:t})},L=()=>useContext(Kt);var He={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},De=createContext(He),B=()=>useContext(De);var Be=({onCopy:e,onError:t,timeout:o=2e3,children:n,className:r,code:s,...a})=>{let l=y(),[i,c]=useState(false),d=useRef(0),{code:u}=Ee(),{isAnimating:m}=useContext(R),p=B(),g=s!=null?s:u,h=async()=>{var T;if(typeof window=="undefined"||!((T=navigator==null?void 0:navigator.clipboard)!=null&&T.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{i||(await navigator.clipboard.writeText(g),c(!0),e==null||e(),d.current=window.setTimeout(()=>c(!1),o));}catch(x){t==null||t(x);}};useEffect(()=>()=>{window.clearTimeout(d.current);},[]);let b=L(),f=i?b.CheckIcon:b.CopyIcon;return jsx$2("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),"data-streamdown":"code-block-copy-button",disabled:m,onClick:h,title:p.copyCode,type:"button",...a,children:n!=null?n:jsx$2(f,{size:14})})};var Gt={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",\u6587\u8A00:"wy"},at=({onDownload:e,onError:t,language:o,children:n,className:r,code:s,...a})=>{let l=y(),{code:i}=Ee(),{isAnimating:c}=useContext(R),d=B(),u=L(),m=s!=null?s:i,g=`file.${o&&o in Gt?Gt[o]:"txt"}`,h="text/plain",b=()=>{try{J(g,m,h),e==null||e();}catch(f){t==null||t(f);}};return jsx$2("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),"data-streamdown":"code-block-download-button",disabled:c,onClick:b,title:d.downloadFile,type:"button",...a,children:n!=null?n:jsx$2(u.DownloadIcon,{size:14})})};var Ae=()=>{let{Loader2Icon:e}=L(),t=y();return jsxs$1("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[jsx$2("div",{className:t("h-[46px] w-full bg-muted/80")}),jsx$2("div",{className:t("flex w-full items-center justify-center p-4"),children:jsx$2(e,{className:t("size-4 animate-spin")})})]})};var xr=/\.[^/.]+$/,to=({node:e,className:t,src:o,alt:n,onLoad:r,onError:s,...a})=>{let{DownloadIcon:l}=L(),i=y(),c=useRef(null),[d,u]=useState(false),[m,p]=useState(false),g=B(),h=a.width!=null||a.height!=null,b=(d||h)&&!m,f=m&&!h;useEffect(()=>{let k=c.current;if(k!=null&&k.complete){let I=k.naturalWidth>0;u(I),p(!I);}},[]);let T=useCallback(k=>{u(true),p(false),r==null||r(k);},[r]),x=useCallback(k=>{u(false),p(true),s==null||s(k);},[s]),w=async()=>{if(o)try{let I=await(await fetch(o)).blob(),S=new URL(o,window.location.origin).pathname.split("/").pop()||"",F=S.split(".").pop(),z=S.includes(".")&&F!==void 0&&F.length<=4,q="";if(z)q=S;else {let A=I.type,K="png";A.includes("jpeg")||A.includes("jpg")?K="jpg":A.includes("png")?K="png":A.includes("svg")?K="svg":A.includes("gif")?K="gif":A.includes("webp")&&(K="webp"),q=`${(n||S||"image").replace(xr,"")}.${K}`;}J(q,I,I.type);}catch(k){window.open(o,"_blank");}};return o?jsxs$1("div",{className:i("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[jsx$2("img",{alt:n,className:i("max-w-full rounded-lg",f&&"hidden",t),"data-streamdown":"image",onError:x,onLoad:T,ref:c,src:o,...a}),f&&jsx$2("span",{className:i("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:g.imageNotAvailable}),jsx$2("div",{className:i("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),b&&jsx$2("button",{className:i("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:g.downloadImage,type:"button",children:jsx$2(l,{size:14})})]}):null};var ke=0,le=()=>{ke+=1,ke===1&&(document.body.style.overflow="hidden");},ce=()=>{ke=Math.max(0,ke-1),ke===0&&(document.body.style.overflow="");};var ro=({url:e,isOpen:t,onClose:o,onConfirm:n})=>{let{CheckIcon:r,CopyIcon:s,ExternalLinkIcon:a,XIcon:l}=L(),i=y(),[c,d]=useState(false),u=B(),m=useCallback(async()=>{try{await navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3);}catch(g){}},[e]),p=useCallback(()=>{n(),o();},[n,o]);return useEffect(()=>{if(t){le();let g=h=>{h.key==="Escape"&&o();};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),ce();}}},[t,o]),t?jsx$2("div",{className:i("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:o,onKeyDown:g=>{g.key==="Escape"&&o();},role:"button",tabIndex:0,children:jsxs$1("div",{className:i("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[jsx$2("button",{className:i("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:o,title:u.close,type:"button",children:jsx$2(l,{size:16})}),jsxs$1("div",{className:i("flex flex-col gap-2"),children:[jsxs$1("div",{className:i("flex items-center gap-2 font-semibold text-lg"),children:[jsx$2(a,{size:20}),jsx$2("span",{children:u.openExternalLink})]}),jsx$2("p",{className:i("text-muted-foreground text-sm"),children:u.externalLinkWarning})]}),jsx$2("div",{className:i("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),jsxs$1("div",{className:i("flex gap-2"),children:[jsx$2("button",{className:i("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:m,type:"button",children:c?jsxs$1(Fragment$1,{children:[jsx$2(r,{size:14}),jsx$2("span",{children:u.copied})]}):jsxs$1(Fragment$1,{children:[jsx$2(s,{size:14}),jsx$2("span",{children:u.copyLink})]})}),jsxs$1("button",{className:i("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:p,type:"button",children:[jsx$2(a,{size:14}),jsx$2("span",{children:u.openLink})]})]})]})}):null};var Oe=createContext(null),lt=()=>useContext(Oe),Mi=()=>{var t;let e=lt();return (t=e==null?void 0:e.code)!=null?t:null},de=()=>{var t;let e=lt();return (t=e==null?void 0:e.mermaid)!=null?t:null};var so=e=>{var o;let t=lt();return t!=null&&t.renderers&&e&&(o=t.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?o:null};var ao=(e,t)=>{var n;let o=(n=void 0)!=null?n:5;return new Promise((r,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let i=document.createElement("canvas"),c=l.width*o,d=l.height*o;i.width=c,i.height=d;let u=i.getContext("2d");if(!u){s(new Error("Failed to create 2D canvas context for PNG export"));return}u.drawImage(l,0,0,c,d),i.toBlob(m=>{if(!m){s(new Error("Failed to create PNG blob"));return}r(m);},"image/png");},l.onerror=()=>s(new Error("Failed to load SVG image")),l.src=a;})};var lo=({chart:e,children:t,className:o,onDownload:n,config:r,onError:s})=>{let a=y(),[l,i]=useState(false),c=useRef(null),{isAnimating:d}=useContext(R),u=L(),m=de(),p=B(),g=async h=>{try{if(h==="mmd"){J("diagram.mmd",e,"text/plain"),i(!1),n==null||n(h);return}if(!m){s==null||s(new Error("Mermaid plugin not available"));return}let b=m.getMermaid(r),f=e.split("").reduce((w,k)=>(w<<5)-w+k.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(f)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:x}=await b.render(T,e);if(!x){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}if(h==="svg"){J("diagram.svg",x,"image/svg+xml"),i(!1),n==null||n(h);return}if(h==="png"){let w=await ao(x);J("diagram.png",w,"image/png"),n==null||n(h),i(!1);return}}catch(b){s==null||s(b);}};return useEffect(()=>{let h=b=>{let f=b.composedPath();c.current&&!f.includes(c.current)&&i(false);};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h);}},[]),jsxs$1("div",{className:a("relative"),ref:c,children:[jsx$2("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",o),disabled:d,onClick:()=>i(!l),title:p.downloadDiagram,type:"button",children:t!=null?t:jsx$2(u.DownloadIcon,{size:14})}),l?jsxs$1("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[jsx$2("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("svg"),title:p.downloadDiagramAsSvg,type:"button",children:p.mermaidFormatSvg}),jsx$2("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("png"),title:p.downloadDiagramAsPng,type:"button",children:p.mermaidFormatPng}),jsx$2("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("mmd"),title:p.downloadDiagramAsMmd,type:"button",children:p.mermaidFormatMmd})]}):null]})};var po=({chart:e,config:t,onFullscreen:o,onExit:n,className:r,...s})=>{let{Maximize2Icon:a,XIcon:l}=L(),i=y(),[c,d]=useState(false),{isAnimating:u,controls:m}=useContext(R),p=B(),g=(()=>{if(typeof m=="boolean")return m;let b=m.mermaid;return b===false?false:b===true||b===void 0?true:b.panZoom!==false})(),h=()=>{d(!c);};return useEffect(()=>{if(c){le();let b=f=>{f.key==="Escape"&&d(false);};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b),ce();}}},[c]),useEffect(()=>{c?o==null||o():n&&n();},[c,o,n]),jsxs$1(Fragment$1,{children:[jsx$2("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:u,onClick:h,title:p.viewFullscreen,type:"button",...s,children:jsx$2(a,{size:14})}),c?createPortal(jsxs$1("div",{className:i("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:h,onKeyDown:b=>{b.key==="Escape"&&h();},role:"button",tabIndex:0,children:[jsx$2("button",{className:i("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:h,title:p.exitFullscreen,type:"button",children:jsx$2(l,{size:20})}),jsx$2("div",{className:i("flex size-full items-center justify-center p-4"),onClick:b=>b.stopPropagation(),onKeyDown:b=>b.stopPropagation(),role:"presentation",children:jsx$2(uo,{chart:e,className:i("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:true,showControls:g})})]}),document.body):null]})};var ue=e=>{var s,a;let t=[],o=[],n=e.querySelectorAll("thead th");for(let l of n)t.push(((s=l.textContent)==null?void 0:s.trim())||"");let r=e.querySelectorAll("tbody tr");for(let l of r){let i=[],c=l.querySelectorAll("td");for(let d of c)i.push(((a=d.textContent)==null?void 0:a.trim())||"");o.push(i);}return {headers:t,rows:o}},oe=e=>{let{headers:t,rows:o}=e,n=l=>{let i=false,c=false;for(let d of l){if(d==='"'){i=true,c=true;break}(d===","||d===`
99857
99857
  `)&&(i=true);}return i?c?`"${l.replace(/"/g,'""')}"`:`"${l}"`:l},r=t.length>0?o.length+1:o.length,s=new Array(r),a=0;t.length>0&&(s[a]=t.map(n).join(","),a+=1);for(let l of o)s[a]=l.map(n).join(","),a+=1;return s.join(`
99858
99858
  `)},ct=e=>{let{headers:t,rows:o}=e,n=l=>{let i=false;for(let d of l)if(d===" "||d===`
99859
99859
  `||d==="\r"){i=true;break}if(!i)return l;let c=[];for(let d of l)d===" "?c.push("\\t"):d===`
99860
99860
  `?c.push("\\n"):d==="\r"?c.push("\\r"):c.push(d);return c.join("")},r=t.length>0?o.length+1:o.length,s=new Array(r),a=0;t.length>0&&(s[a]=t.map(n).join(" "),a+=1);for(let l of o)s[a]=l.map(n).join(" "),a+=1;return s.join(`
99861
99861
  `)},Ve=e=>{let t=false;for(let n of e)if(n==="\\"||n==="|"){t=true;break}if(!t)return e;let o=[];for(let n of e)n==="\\"?o.push("\\\\"):n==="|"?o.push("\\|"):o.push(n);return o.join("")},ne=e=>{let{headers:t,rows:o}=e;if(t.length===0)return "";let n=new Array(o.length+2),r=0,s=t.map(l=>Ve(l));n[r]=`| ${s.join(" | ")} |`,r+=1;let a=new Array(t.length);for(let l=0;l<t.length;l+=1)a[l]="---";n[r]=`| ${a.join(" | ")} |`,r+=1;for(let l of o)if(l.length<t.length){let i=new Array(t.length);for(let c=0;c<t.length;c+=1)i[c]=c<l.length?Ve(l[c]):"";n[r]=`| ${i.join(" | ")} |`,r+=1;}else {let i=l.map(c=>Ve(c));n[r]=`| ${i.join(" | ")} |`,r+=1;}return n.join(`
99862
- `)};var Te=({children:e,className:t,onCopy:o,onError:n,timeout:r=2e3})=>{let s=y(),[a,l]=useState(false),[i,c]=useState(false),d=useRef(null),u=useRef(0),{isAnimating:m}=useContext(R),p=B(),g=async f=>{var T,x;if(typeof window=="undefined"||!((T=navigator==null?void 0:navigator.clipboard)!=null&&T.write)){n==null||n(new Error("Clipboard API not available"));return}try{let w=(x=d.current)==null?void 0:x.closest('[data-streamdown="table-wrapper"]'),k=w==null?void 0:w.querySelector("table");if(!k){n==null||n(new Error("Table not found"));return}let I=ue(k),F=({csv:oe,tsv:ct,md:ne}[f]||ne)(I),z=new ClipboardItem({"text/plain":new Blob([F],{type:"text/plain"}),"text/html":new Blob([k.outerHTML],{type:"text/html"})});await navigator.clipboard.write([z]),c(!0),l(!1),o==null||o(f),u.current=window.setTimeout(()=>c(!1),r);}catch(w){n==null||n(w);}};useEffect(()=>{let f=T=>{let x=T.composedPath();d.current&&!x.includes(d.current)&&l(false);};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f),window.clearTimeout(u.current);}},[]);let h=L(),b=i?h.CheckIcon:h.CopyIcon;return jsxs$1("div",{className:s("relative"),ref:d,children:[jsx$2("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:m,onClick:()=>l(!a),title:p.copyTable,type:"button",children:e!=null?e:jsx$2(b,{height:14,width:14})}),a?jsxs$1("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[jsx$2("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:p.copyTableAsMarkdown,type:"button",children:p.tableFormatMarkdown}),jsx$2("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:p.copyTableAsCsv,type:"button",children:p.tableFormatCsv}),jsx$2("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:p.copyTableAsTsv,type:"button",children:p.tableFormatTsv})]}):null]})};var Pe=({children:e,className:t,onDownload:o,onError:n})=>{let r=y(),[s,a]=useState(false),l=useRef(null),{isAnimating:i}=useContext(R),c=B(),d=L(),u=m=>{var p;try{let g=(p=l.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),h=g==null?void 0:g.querySelector("table");if(!h){n==null||n(new Error("Table not found"));return}let b=ue(h),f=m==="csv"?oe(b):ne(b);J(`table.${m==="csv"?"csv":"md"}`,f,m==="csv"?"text/csv":"text/markdown"),a(!1),o==null||o(m);}catch(g){n==null||n(g);}};return useEffect(()=>{let m=p=>{let g=p.composedPath();l.current&&!g.includes(l.current)&&a(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}},[]),jsxs$1("div",{className:r("relative"),ref:l,children:[jsx$2("button",{className:r("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:i,onClick:()=>a(!s),title:c.downloadTable,type:"button",children:e!=null?e:jsx$2(d.DownloadIcon,{size:14})}),s?jsxs$1("div",{className:r("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[jsx$2("button",{className:r("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>u("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),jsx$2("button",{className:r("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>u("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})};var wo=({children:e,className:t,showCopy:o=true,showDownload:n=true})=>{let{Maximize2Icon:r,XIcon:s}=L(),a=y(),[l,i]=useState(false),{isAnimating:c}=useContext(R),d=B(),u=()=>{i(true);},m=()=>{i(false);};return useEffect(()=>{if(l){le();let p=g=>{g.key==="Escape"&&i(false);};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),ce();}}},[l]),jsxs$1(Fragment$1,{children:[jsx$2("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:u,title:d.viewFullscreen,type:"button",children:jsx$2(r,{size:14})}),l?createPortal(jsx$2("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:m,onKeyDown:p=>{p.key==="Escape"&&m();},role:"dialog",children:jsxs$1("div",{className:a("flex h-full flex-col"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[jsxs$1("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[o?jsx$2(Te,{}):null,n?jsx$2(Pe,{}):null,jsx$2("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:m,title:d.exitFullscreen,type:"button",children:jsx$2(s,{size:20})})]}),jsx$2("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:jsx$2("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})};var ko=({children:e,className:t,showControls:o,showCopy:n=true,showDownload:r=true,showFullscreen:s=true,...a})=>{let l=y(),i=o&&n,c=o&&r,d=o&&s,u=i||c||d;return jsxs$1("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[u?jsxs$1("div",{className:l("flex items-center justify-end gap-1"),children:[i?jsx$2(Te,{}):null,c?jsx$2(Pe,{}):null,d?jsx$2(wo,{showCopy:i,showDownload:c,children:e}):null]}):null,jsx$2("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:jsx$2("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})};var Gr=/startLine=(\d+)/,Yr=lazy$1(()=>import('./fthry_mermaid-O7DHMXV3.DSafYX1V.js').then(e=>({default:e.Mermaid}))),Qr=/language-([^\s]+)/;function _e(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return true;if(!(e!=null&&e.position&&(t!=null&&t.position)))return false;let o=e.position.start,n=t.position.start,r=e.position.end,s=t.position.end;return (o==null?void 0:o.line)===(n==null?void 0:n.line)&&(o==null?void 0:o.column)===(n==null?void 0:n.column)&&(r==null?void 0:r.line)===(s==null?void 0:s.line)&&(r==null?void 0:r.column)===(s==null?void 0:s.column)}function E(e,t){return e.className===t.className&&_e(e.node,t.node)}var pt=(e,t)=>typeof e=="boolean"?e:e[t]!==false,ut=(e,t)=>{if(typeof e=="boolean")return e;let o=e.table;return o===false?false:o===true||o===void 0?true:o[t]!==false},xo=(e,t)=>{if(typeof e=="boolean")return e;let o=e.code;return o===false?false:o===true||o===void 0?true:o[t]!==false},je=(e,t)=>{if(typeof e=="boolean")return e;let o=e.mermaid;return o===false?false:o===true||o===void 0?true:o[t]!==false},gt=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("ol",{className:r("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>E(e,t));gt.displayName="MarkdownOl";var To=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("li",{className:r("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&_e(e.node,t.node));To.displayName="MarkdownLi";var Po=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("ul",{className:r("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>E(e,t));Po.displayName="MarkdownUl";var Mo=memo(({className:e,node:t,...o})=>{let n=y();return jsx$2("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...o})},(e,t)=>E(e,t));Mo.displayName="MarkdownHr";var Io=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("span",{className:r("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>E(e,t));Io.displayName="MarkdownStrong";var es=({children:e,className:t,href:o,node:n,...r})=>{let s=y(),{linkSafety:a}=useContext(R),[l,i]=useState(false),c=o==="streamdown:incomplete-link",d=useCallback(async g=>{if(!(!(a!=null&&a.enabled&&o)||c)){if(g.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(o)){window.open(o,"_blank","noreferrer");return}i(true);}},[a,o,c]),u=useCallback(()=>{o&&window.open(o,"_blank","noreferrer");},[o]),m=useCallback(()=>{i(false);},[]),p={url:o!=null?o:"",isOpen:l,onClose:m,onConfirm:u};return a!=null&&a.enabled&&o?jsxs$1(Fragment$1,{children:[jsx$2("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",onClick:d,type:"button",children:e}),a.renderModal?a.renderModal(p):jsx$2(ro,{...p})]}):jsx$2("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",href:o,rel:"noreferrer",target:"_blank",...r,children:e})},No=memo(es,(e,t)=>E(e,t)&&e.href===t.href);No.displayName="MarkdownA";var Lo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h1",{className:r("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>E(e,t));Lo.displayName="MarkdownH1";var Ro=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h2",{className:r("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>E(e,t));Ro.displayName="MarkdownH2";var So=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h3",{className:r("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>E(e,t));So.displayName="MarkdownH3";var Eo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h4",{className:r("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>E(e,t));Eo.displayName="MarkdownH4";var Ho=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h5",{className:r("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>E(e,t));Ho.displayName="MarkdownH5";var Do=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h6",{className:r("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>E(e,t));Do.displayName="MarkdownH6";var Bo=memo(({children:e,className:t,node:o,...n})=>{let{controls:r}=useContext(R),s=pt(r,"table"),a=ut(r,"copy"),l=ut(r,"download"),i=ut(r,"fullscreen");return jsx$2(ko,{className:t,showControls:s,showCopy:a,showDownload:l,showFullscreen:i,...n,children:e})},(e,t)=>E(e,t));Bo.displayName="MarkdownTable";var Ao=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("thead",{className:r("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>E(e,t));Ao.displayName="MarkdownThead";var Oo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("tbody",{className:r("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>E(e,t));Oo.displayName="MarkdownTbody";var Vo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("tr",{className:r("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>E(e,t));Vo.displayName="MarkdownTr";var jo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("th",{className:r("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>E(e,t));jo.displayName="MarkdownTh";var Fo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("td",{className:r("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>E(e,t));Fo.displayName="MarkdownTd";var zo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("blockquote",{className:r("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>E(e,t));zo.displayName="MarkdownBlockquote";var _o=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("sup",{className:r("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>E(e,t));_o.displayName="MarkdownSup";var qo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("sub",{className:r("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>E(e,t));qo.displayName="MarkdownSub";var $o=memo(({children:e,className:t,node:o,...n})=>{if("data-footnotes"in n){let s=i=>{var m,p;if(!isValidElement(i))return false;let c=Array.isArray(i.props.children)?i.props.children:[i.props.children],d=false,u=false;for(let g of c)if(g){if(typeof g=="string")g.trim()!==""&&(d=true);else if(isValidElement(g))if(((m=g.props)==null?void 0:m["data-footnote-backref"])!==void 0)u=true;else {let h=Array.isArray(g.props.children)?g.props.children:[g.props.children];for(let b of h){if(typeof b=="string"&&b.trim()!==""){d=true;break}if(isValidElement(b)&&((p=b.props)==null?void 0:p["data-footnote-backref"])===void 0){d=true;break}}}}return u&&!d},a=Array.isArray(e)?e.map(i=>{if(!isValidElement(i))return i;if(i.type===gt){let d=(Array.isArray(i.props.children)?i.props.children:[i.props.children]).filter(u=>!s(u));return d.length===0?null:{...i,props:{...i.props,children:d}}}return i}):e;return (Array.isArray(a)?a.some(i=>i!==null):a!==null)?jsx$2("section",{className:t,...n,children:a}):null}return jsx$2("section",{className:t,...n,children:e})},(e,t)=>E(e,t));$o.displayName="MarkdownSection";var ts=({node:e,className:t,children:o,...n})=>{var k,I;let r=y(),s=!("data-block"in n),{mermaid:a,controls:l}=useContext(R),i=de(),c=et(),d=t==null?void 0:t.match(Qr),u=(k=d==null?void 0:d.at(1))!=null?k:"",m=so(u);if(s)return jsx$2("code",{className:r("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:o});let p=(I=e==null?void 0:e.properties)==null?void 0:I.metastring,g=p==null?void 0:p.match(Gr),h=g?Number.parseInt(g[1],10):void 0,b=h!==void 0&&h>=1?h:void 0,f="";if(isValidElement(o)&&o.props&&typeof o.props=="object"&&"children"in o.props&&typeof o.props.children=="string"?f=o.props.children:typeof o=="string"&&(f=o),m){let H=m.component;return jsx$2(Suspense,{fallback:jsx$2(Ae,{}),children:jsx$2(H,{code:f,isIncomplete:c,language:u})})}if(u==="mermaid"&&i){let H=pt(l,"mermaid"),S=je(l,"download"),F=je(l,"copy"),z=je(l,"fullscreen"),q=je(l,"panZoom"),A=H&&(S||F||z);return jsx$2(Suspense,{fallback:jsx$2(Ae,{}),children:jsxs$1("div",{className:r("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[jsx$2("div",{className:r("flex h-8 items-center text-muted-foreground text-xs"),children:jsx$2("span",{className:r("ml-1 font-mono lowercase"),children:"mermaid"})}),A?jsx$2("div",{className:r("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:jsxs$1("div",{className:r("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[S?jsx$2(lo,{chart:f,config:a==null?void 0:a.config}):null,F?jsx$2(Be,{code:f}):null,z?jsx$2(po,{chart:f,config:a==null?void 0:a.config}):null]})}):null,jsx$2("div",{className:r("rounded-md border border-border bg-background"),children:jsx$2(Yr,{chart:f,config:a==null?void 0:a.config,showControls:q})})]})})}let T=pt(l,"code"),x=xo(l,"download"),w=xo(l,"copy");return jsx$2(rt,{className:t,code:f,isIncomplete:c,language:u,startLine:b,children:T?jsxs$1(Fragment$1,{children:[x?jsx$2(at,{code:f,language:u}):null,w?jsx$2(Be,{}):null]}):null})},Wo=memo(ts,(e,t)=>e.className===t.className&&_e(e.node,t.node));Wo.displayName="MarkdownCode";var Zo=memo(to,(e,t)=>e.className===t.className&&_e(e.node,t.node));Zo.displayName="MarkdownImg";var Xo=memo(({children:e,node:t,...o})=>{let r=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(r.length===1&&isValidElement(r[0])){let s=r[0].props.node,a=s==null?void 0:s.tagName;if(a==="img")return jsx$2(Fragment$1,{children:e});if(a==="code"&&"data-block"in r[0].props)return jsx$2(Fragment$1,{children:e})}return jsx$2("p",{...o,children:e})},(e,t)=>E(e,t));Xo.displayName="MarkdownParagraph";var Jo={ol:gt,li:To,ul:Po,hr:Mo,strong:Io,a:No,h1:Lo,h2:Ro,h3:So,h4:Eo,h5:Ho,h6:Do,table:Bo,thead:Ao,tbody:Oo,tr:Vo,th:jo,td:Fo,blockquote:zo,code:Wo,img:Zo,pre:({children:e})=>isValidElement(e)?cloneElement(e,{"data-block":"true"}):e,sup:_o,sub:qo,p:Xo,section:$o};var os=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,ns=/\p{L}/u;function qe(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let o of t){if(os.test(o))return "rtl";if(ns.test(o))return "ltr"}return "ltr"}var rs=/^[ \t]{0,3}(`{3,}|~{3,})/,ss=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,bt=e=>{let t=e.split(`
99862
+ `)};var Te=({children:e,className:t,onCopy:o,onError:n,timeout:r=2e3})=>{let s=y(),[a,l]=useState(false),[i,c]=useState(false),d=useRef(null),u=useRef(0),{isAnimating:m}=useContext(R),p=B(),g=async f=>{var T,x;if(typeof window=="undefined"||!((T=navigator==null?void 0:navigator.clipboard)!=null&&T.write)){n==null||n(new Error("Clipboard API not available"));return}try{let w=(x=d.current)==null?void 0:x.closest('[data-streamdown="table-wrapper"]'),k=w==null?void 0:w.querySelector("table");if(!k){n==null||n(new Error("Table not found"));return}let I=ue(k),F=({csv:oe,tsv:ct,md:ne}[f]||ne)(I),z=new ClipboardItem({"text/plain":new Blob([F],{type:"text/plain"}),"text/html":new Blob([k.outerHTML],{type:"text/html"})});await navigator.clipboard.write([z]),c(!0),l(!1),o==null||o(f),u.current=window.setTimeout(()=>c(!1),r);}catch(w){n==null||n(w);}};useEffect(()=>{let f=T=>{let x=T.composedPath();d.current&&!x.includes(d.current)&&l(false);};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f),window.clearTimeout(u.current);}},[]);let h=L(),b=i?h.CheckIcon:h.CopyIcon;return jsxs$1("div",{className:s("relative"),ref:d,children:[jsx$2("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:m,onClick:()=>l(!a),title:p.copyTable,type:"button",children:e!=null?e:jsx$2(b,{height:14,width:14})}),a?jsxs$1("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[jsx$2("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("md"),title:p.copyTableAsMarkdown,type:"button",children:p.tableFormatMarkdown}),jsx$2("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:p.copyTableAsCsv,type:"button",children:p.tableFormatCsv}),jsx$2("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("tsv"),title:p.copyTableAsTsv,type:"button",children:p.tableFormatTsv})]}):null]})};var Pe=({children:e,className:t,onDownload:o,onError:n})=>{let r=y(),[s,a]=useState(false),l=useRef(null),{isAnimating:i}=useContext(R),c=B(),d=L(),u=m=>{var p;try{let g=(p=l.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),h=g==null?void 0:g.querySelector("table");if(!h){n==null||n(new Error("Table not found"));return}let b=ue(h),f=m==="csv"?oe(b):ne(b);J(`table.${m==="csv"?"csv":"md"}`,f,m==="csv"?"text/csv":"text/markdown"),a(!1),o==null||o(m);}catch(g){n==null||n(g);}};return useEffect(()=>{let m=p=>{let g=p.composedPath();l.current&&!g.includes(l.current)&&a(false);};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m);}},[]),jsxs$1("div",{className:r("relative"),ref:l,children:[jsx$2("button",{className:r("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:i,onClick:()=>a(!s),title:c.downloadTable,type:"button",children:e!=null?e:jsx$2(d.DownloadIcon,{size:14})}),s?jsxs$1("div",{className:r("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[jsx$2("button",{className:r("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>u("csv"),title:c.downloadTableAsCsv,type:"button",children:c.tableFormatCsv}),jsx$2("button",{className:r("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>u("markdown"),title:c.downloadTableAsMarkdown,type:"button",children:c.tableFormatMarkdown})]}):null]})};var wo=({children:e,className:t,showCopy:o=true,showDownload:n=true})=>{let{Maximize2Icon:r,XIcon:s}=L(),a=y(),[l,i]=useState(false),{isAnimating:c}=useContext(R),d=B(),u=()=>{i(true);},m=()=>{i(false);};return useEffect(()=>{if(l){le();let p=g=>{g.key==="Escape"&&i(false);};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),ce();}}},[l]),jsxs$1(Fragment$1,{children:[jsx$2("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:u,title:d.viewFullscreen,type:"button",children:jsx$2(r,{size:14})}),l?createPortal(jsx$2("div",{"aria-label":d.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:m,onKeyDown:p=>{p.key==="Escape"&&m();},role:"dialog",children:jsxs$1("div",{className:a("flex h-full flex-col"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[jsxs$1("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[o?jsx$2(Te,{}):null,n?jsx$2(Pe,{}):null,jsx$2("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:m,title:d.exitFullscreen,type:"button",children:jsx$2(s,{size:20})})]}),jsx$2("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:jsx$2("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})};var ko=({children:e,className:t,showControls:o,showCopy:n=true,showDownload:r=true,showFullscreen:s=true,...a})=>{let l=y(),i=o&&n,c=o&&r,d=o&&s,u=i||c||d;return jsxs$1("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[u?jsxs$1("div",{className:l("flex items-center justify-end gap-1"),children:[i?jsx$2(Te,{}):null,c?jsx$2(Pe,{}):null,d?jsx$2(wo,{showCopy:i,showDownload:c,children:e}):null]}):null,jsx$2("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:jsx$2("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})};var Gr=/startLine=(\d+)/,Yr=lazy$1(()=>import('./fthry_mermaid-O7DHMXV3.DUefPHZV.js').then(e=>({default:e.Mermaid}))),Qr=/language-([^\s]+)/;function _e(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return true;if(!(e!=null&&e.position&&(t!=null&&t.position)))return false;let o=e.position.start,n=t.position.start,r=e.position.end,s=t.position.end;return (o==null?void 0:o.line)===(n==null?void 0:n.line)&&(o==null?void 0:o.column)===(n==null?void 0:n.column)&&(r==null?void 0:r.line)===(s==null?void 0:s.line)&&(r==null?void 0:r.column)===(s==null?void 0:s.column)}function E(e,t){return e.className===t.className&&_e(e.node,t.node)}var pt=(e,t)=>typeof e=="boolean"?e:e[t]!==false,ut=(e,t)=>{if(typeof e=="boolean")return e;let o=e.table;return o===false?false:o===true||o===void 0?true:o[t]!==false},xo=(e,t)=>{if(typeof e=="boolean")return e;let o=e.code;return o===false?false:o===true||o===void 0?true:o[t]!==false},je=(e,t)=>{if(typeof e=="boolean")return e;let o=e.mermaid;return o===false?false:o===true||o===void 0?true:o[t]!==false},gt=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("ol",{className:r("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>E(e,t));gt.displayName="MarkdownOl";var To=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("li",{className:r("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&_e(e.node,t.node));To.displayName="MarkdownLi";var Po=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("ul",{className:r("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>E(e,t));Po.displayName="MarkdownUl";var Mo=memo(({className:e,node:t,...o})=>{let n=y();return jsx$2("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...o})},(e,t)=>E(e,t));Mo.displayName="MarkdownHr";var Io=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("span",{className:r("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>E(e,t));Io.displayName="MarkdownStrong";var es=({children:e,className:t,href:o,node:n,...r})=>{let s=y(),{linkSafety:a}=useContext(R),[l,i]=useState(false),c=o==="streamdown:incomplete-link",d=useCallback(async g=>{if(!(!(a!=null&&a.enabled&&o)||c)){if(g.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(o)){window.open(o,"_blank","noreferrer");return}i(true);}},[a,o,c]),u=useCallback(()=>{o&&window.open(o,"_blank","noreferrer");},[o]),m=useCallback(()=>{i(false);},[]),p={url:o!=null?o:"",isOpen:l,onClose:m,onConfirm:u};return a!=null&&a.enabled&&o?jsxs$1(Fragment$1,{children:[jsx$2("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",onClick:d,type:"button",children:e}),a.renderModal?a.renderModal(p):jsx$2(ro,{...p})]}):jsx$2("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":c,"data-streamdown":"link",href:o,rel:"noreferrer",target:"_blank",...r,children:e})},No=memo(es,(e,t)=>E(e,t)&&e.href===t.href);No.displayName="MarkdownA";var Lo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h1",{className:r("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>E(e,t));Lo.displayName="MarkdownH1";var Ro=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h2",{className:r("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>E(e,t));Ro.displayName="MarkdownH2";var So=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h3",{className:r("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>E(e,t));So.displayName="MarkdownH3";var Eo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h4",{className:r("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>E(e,t));Eo.displayName="MarkdownH4";var Ho=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h5",{className:r("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>E(e,t));Ho.displayName="MarkdownH5";var Do=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("h6",{className:r("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>E(e,t));Do.displayName="MarkdownH6";var Bo=memo(({children:e,className:t,node:o,...n})=>{let{controls:r}=useContext(R),s=pt(r,"table"),a=ut(r,"copy"),l=ut(r,"download"),i=ut(r,"fullscreen");return jsx$2(ko,{className:t,showControls:s,showCopy:a,showDownload:l,showFullscreen:i,...n,children:e})},(e,t)=>E(e,t));Bo.displayName="MarkdownTable";var Ao=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("thead",{className:r("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>E(e,t));Ao.displayName="MarkdownThead";var Oo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("tbody",{className:r("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>E(e,t));Oo.displayName="MarkdownTbody";var Vo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("tr",{className:r("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>E(e,t));Vo.displayName="MarkdownTr";var jo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("th",{className:r("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>E(e,t));jo.displayName="MarkdownTh";var Fo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("td",{className:r("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>E(e,t));Fo.displayName="MarkdownTd";var zo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("blockquote",{className:r("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>E(e,t));zo.displayName="MarkdownBlockquote";var _o=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("sup",{className:r("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>E(e,t));_o.displayName="MarkdownSup";var qo=memo(({children:e,className:t,node:o,...n})=>{let r=y();return jsx$2("sub",{className:r("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>E(e,t));qo.displayName="MarkdownSub";var $o=memo(({children:e,className:t,node:o,...n})=>{if("data-footnotes"in n){let s=i=>{var m,p;if(!isValidElement(i))return false;let c=Array.isArray(i.props.children)?i.props.children:[i.props.children],d=false,u=false;for(let g of c)if(g){if(typeof g=="string")g.trim()!==""&&(d=true);else if(isValidElement(g))if(((m=g.props)==null?void 0:m["data-footnote-backref"])!==void 0)u=true;else {let h=Array.isArray(g.props.children)?g.props.children:[g.props.children];for(let b of h){if(typeof b=="string"&&b.trim()!==""){d=true;break}if(isValidElement(b)&&((p=b.props)==null?void 0:p["data-footnote-backref"])===void 0){d=true;break}}}}return u&&!d},a=Array.isArray(e)?e.map(i=>{if(!isValidElement(i))return i;if(i.type===gt){let d=(Array.isArray(i.props.children)?i.props.children:[i.props.children]).filter(u=>!s(u));return d.length===0?null:{...i,props:{...i.props,children:d}}}return i}):e;return (Array.isArray(a)?a.some(i=>i!==null):a!==null)?jsx$2("section",{className:t,...n,children:a}):null}return jsx$2("section",{className:t,...n,children:e})},(e,t)=>E(e,t));$o.displayName="MarkdownSection";var ts=({node:e,className:t,children:o,...n})=>{var k,I;let r=y(),s=!("data-block"in n),{mermaid:a,controls:l}=useContext(R),i=de(),c=et(),d=t==null?void 0:t.match(Qr),u=(k=d==null?void 0:d.at(1))!=null?k:"",m=so(u);if(s)return jsx$2("code",{className:r("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:o});let p=(I=e==null?void 0:e.properties)==null?void 0:I.metastring,g=p==null?void 0:p.match(Gr),h=g?Number.parseInt(g[1],10):void 0,b=h!==void 0&&h>=1?h:void 0,f="";if(isValidElement(o)&&o.props&&typeof o.props=="object"&&"children"in o.props&&typeof o.props.children=="string"?f=o.props.children:typeof o=="string"&&(f=o),m){let H=m.component;return jsx$2(Suspense,{fallback:jsx$2(Ae,{}),children:jsx$2(H,{code:f,isIncomplete:c,language:u})})}if(u==="mermaid"&&i){let H=pt(l,"mermaid"),S=je(l,"download"),F=je(l,"copy"),z=je(l,"fullscreen"),q=je(l,"panZoom"),A=H&&(S||F||z);return jsx$2(Suspense,{fallback:jsx$2(Ae,{}),children:jsxs$1("div",{className:r("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[jsx$2("div",{className:r("flex h-8 items-center text-muted-foreground text-xs"),children:jsx$2("span",{className:r("ml-1 font-mono lowercase"),children:"mermaid"})}),A?jsx$2("div",{className:r("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:jsxs$1("div",{className:r("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[S?jsx$2(lo,{chart:f,config:a==null?void 0:a.config}):null,F?jsx$2(Be,{code:f}):null,z?jsx$2(po,{chart:f,config:a==null?void 0:a.config}):null]})}):null,jsx$2("div",{className:r("rounded-md border border-border bg-background"),children:jsx$2(Yr,{chart:f,config:a==null?void 0:a.config,showControls:q})})]})})}let T=pt(l,"code"),x=xo(l,"download"),w=xo(l,"copy");return jsx$2(rt,{className:t,code:f,isIncomplete:c,language:u,startLine:b,children:T?jsxs$1(Fragment$1,{children:[x?jsx$2(at,{code:f,language:u}):null,w?jsx$2(Be,{}):null]}):null})},Wo=memo(ts,(e,t)=>e.className===t.className&&_e(e.node,t.node));Wo.displayName="MarkdownCode";var Zo=memo(to,(e,t)=>e.className===t.className&&_e(e.node,t.node));Zo.displayName="MarkdownImg";var Xo=memo(({children:e,node:t,...o})=>{let r=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(r.length===1&&isValidElement(r[0])){let s=r[0].props.node,a=s==null?void 0:s.tagName;if(a==="img")return jsx$2(Fragment$1,{children:e});if(a==="code"&&"data-block"in r[0].props)return jsx$2(Fragment$1,{children:e})}return jsx$2("p",{...o,children:e})},(e,t)=>E(e,t));Xo.displayName="MarkdownParagraph";var Jo={ol:gt,li:To,ul:Po,hr:Mo,strong:Io,a:No,h1:Lo,h2:Ro,h3:So,h4:Eo,h5:Ho,h6:Do,table:Bo,thead:Ao,tbody:Oo,tr:Vo,th:jo,td:Fo,blockquote:zo,code:Wo,img:Zo,pre:({children:e})=>isValidElement(e)?cloneElement(e,{"data-block":"true"}):e,sup:_o,sub:qo,p:Xo,section:$o};var os=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,ns=/\p{L}/u;function qe(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let o of t){if(os.test(o))return "rtl";if(ns.test(o))return "ltr"}return "ltr"}var rs=/^[ \t]{0,3}(`{3,}|~{3,})/,ss=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,bt=e=>{let t=e.split(`
99863
99863
  `),o=null,n=0;for(let r of t){let s=rs.exec(r);if(o===null){if(s){let a=s[1];o=a[0],n=a.length;}}else if(s){let a=s[1],l=a[0],i=a.length;l===o&&i>=n&&(o=null,n=0);}}return o!==null},Ko=e=>{let t=e.split(`
99864
99864
  `);for(let o of t){let n=o.trim();if(n.length>0&&n.includes("|")&&ss.test(n))return true}return false};var Uo=()=>e=>{visit(e,"html",(t,o,n)=>{!n||typeof o!="number"||(n.children[o]={type:"text",value:t.value});});};var Yo=[],Qo={allowDangerousHtml:true},$e=new WeakMap,yt=class{constructor(){this.cache=new Map;this.keyCache=new WeakMap;this.maxSize=100;}generateCacheKey(t){let o=this.keyCache.get(t);if(o)return o;let n=t.rehypePlugins,r=t.remarkPlugins,s=t.remarkRehypeOptions;if(!(n||r||s)){let u="default";return this.keyCache.set(t,u),u}let a=u=>{if(!u||u.length===0)return "";let m="";for(let p=0;p<u.length;p+=1){let g=u[p];if(p>0&&(m+=","),Array.isArray(g)){let[h,b]=g;if(typeof h=="function"){let f=$e.get(h);f||(f=h.name,$e.set(h,f)),m+=f;}else m+=String(h);m+=":",m+=JSON.stringify(b);}else if(typeof g=="function"){let h=$e.get(g);h||(h=g.name,$e.set(g,h)),m+=h;}else m+=String(g);}return m},l=a(n),i=a(r),c=s?JSON.stringify(s):"",d=`${i}::${l}::${c}`;return this.keyCache.set(t,d),d}get(t){let o=this.generateCacheKey(t),n=this.cache.get(o);return n&&(this.cache.delete(o),this.cache.set(o,n)),n}set(t,o){let n=this.generateCacheKey(t);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r);}this.cache.set(n,o);}clear(){this.cache.clear();}},en=new yt,wt=e=>{let t=gs(e),o=e.children||"",n=t.runSync(t.parse(o),o);return ks(n,e)},gs=e=>{let t=en.get(e);if(t)return t;let o=hs(e);return en.set(e,o),o},bs=e=>e.some(t=>Array.isArray(t)?t[0]===rehypeRaw:t===rehypeRaw),hs=e=>{let t=e.rehypePlugins||Yo,o=e.remarkPlugins||Yo,n=bs(t)?o:[...o,Uo],r=e.remarkRehypeOptions?{...Qo,...e.remarkRehypeOptions}:Qo;return unified().use(remarkParse).use(n).use(remarkRehype,r).use(t)},tn=e=>e,ys=(e,t,o,n)=>{o?e.children.splice(t,1):e.children[t]={type:"text",value:n};},ws=(e,t)=>{var o;for(let n in urlAttributes)if(Object.hasOwn(urlAttributes,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],s=urlAttributes[n];(s===null||s.includes(e.tagName))&&(e.properties[n]=(o=t(String(r||""),n,e))!=null?o:void 0);}},Cs=(e,t,o,n,r,s)=>{let a=false;return n?a=!n.includes(e.tagName):r&&(a=r.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,o)),a},ks=(e,t)=>{let{allowElement:o,allowedElements:n,disallowedElements:r,skipHtml:s,unwrapDisallowed:a,urlTransform:l}=t;if(o||n||r||s||l){let c=l||tn;visit(e,(d,u,m)=>{if(d.type==="raw"&&m&&typeof u=="number")return ys(m,u,s,d.value),u;if(d.type==="element"&&(ws(d,c),Cs(d,u,m,n,r,o)&&m&&typeof u=="number"))return a&&d.children?m.children.splice(u,1,...d.children):m.children.splice(u,1),u});}return toJsxRuntime(e,{Fragment:Fragment$1,components:t.components,ignoreInvalidStyle:true,jsx:jsx$2,jsxs:jsxs$1,passKeys:true,passNode:true})};var xs=/\[\^[\w-]{1,200}\](?!:)/,Ts=/\[\^[\w-]{1,200}\]:/;var Ps=/<(\w+)[\s>]/,Ms=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),on=new Map,nn=new Map,Is=e=>{let t=e.toLowerCase(),o=on.get(t);if(o)return o;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return on.set(t,n),n},Ns=e=>{let t=e.toLowerCase(),o=nn.get(t);if(o)return o;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return nn.set(t,n),n},rn=(e,t)=>{if(Ms.has(t.toLowerCase()))return 0;let o=e.match(Is(t));if(!o)return 0;let n=0;for(let r of o)r.trimEnd().endsWith("/>")||(n+=1);return n},sn=(e,t)=>{let o=e.match(Ns(t));return o?o.length:0},Ls=e=>{let t=0;for(let o=0;o<e.length-1;o+=1)e[o]==="$"&&e[o+1]==="$"&&(t+=1,o+=1);return t},Ct=e=>{let t=xs.test(e),o=Ts.test(e);if(t||o)return [e];let n=x.lex(e,{gfm:true}),r=[],s=[],a=false;for(let l of n){let i=l.raw,c=r.length;if(s.length>0){r[c-1]+=i;let d=s.at(-1),u=rn(i,d),m=sn(i,d);for(let p=0;p<u;p+=1)s.push(d);for(let p=0;p<m;p+=1)s.length>0&&s.at(-1)===d&&s.pop();continue}if(l.type==="html"&&l.block){let d=i.match(Ps);if(d){let u=d[1],m=rn(i,u),p=sn(i,u);m>p&&s.push(u);}}if(c>0&&!a){let d=r[c-1];if(Ls(d)%2===1){r[c-1]=d+i;continue}}r.push(i),l.type!=="space"&&(a=l.type==="code");}return r};var an=(e,t)=>{if(!t.length)return e;let o=e;for(let n of t){let r=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");o=o.replace(r,(s,a,l,i)=>{let c=l.replace(/\n\n/g,`
99865
99865
  <!---->
@@ -1,5 +1,5 @@
1
1
  import React__default from 'react';
2
- import { P as PropTypes } from './fthry_index.BolvDZmi.js';
2
+ import { P as PropTypes } from './fthry_index.CuAjoWfX.js';
3
3
 
4
4
  /** Checks if value is string */
5
5
  function isString(str) {
@@ -1,4 +1,4 @@
1
- export { u as Mermaid } from './fthry_index.BvhUrwDK.js';
1
+ export { u as Mermaid } from './fthry_index.zXD9Mmpj.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { z as getDefaultExportFromCjs } from './fthry_index.BvhUrwDK.js';
1
+ import { z as getDefaultExportFromCjs } from './fthry_index.zXD9Mmpj.js';
2
2
 
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useState, useMemo } from 'react';
3
- import { Z as cls, j as jsxs, m as Fragment, b as jsx, $ as Global, a0 as css, a1 as __makeTemplateObject } from './fthry_index.BvhUrwDK.js';
3
+ import { Z as cls, j as jsxs, m as Fragment, b as jsx, $ as Global, a0 as css, a1 as __makeTemplateObject } from './fthry_index.zXD9Mmpj.js';
4
4
  import { flushSync } from 'react-dom';
5
5
 
6
6
  function canUseDom() {
@@ -1,4 +1,4 @@
1
- import { d as __read, l as featheryWindow } from './fthry_index.BvhUrwDK.js';
1
+ import { d as __read, l as featheryWindow } from './fthry_index.zXD9Mmpj.js';
2
2
  import { useState, useLayoutEffect } from 'react';
3
3
 
4
4
  function useElementSize(anchorRef) {
@@ -1,4 +1,4 @@
1
- import { d as __read, f as __awaiter, g as __generator, k as FeatheryClient } from './fthry_index.BvhUrwDK.js';
1
+ import { d as __read, f as __awaiter, g as __generator, k as FeatheryClient } from './fthry_index.zXD9Mmpj.js';
2
2
  import { useState, useEffect } from 'react';
3
3
 
4
4
  function useSalesforceSync(salesforceSync, editMode) {
@@ -1,4 +1,4 @@
1
- import { z as getDefaultExportFromCjs } from './fthry_index.BvhUrwDK.js';
1
+ import { z as getDefaultExportFromCjs } from './fthry_index.zXD9Mmpj.js';
2
2
 
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { aL as AssistantChat, aC as Elements, aM as Feathery, aB as Form, aJ as LoginForm, aN as StyledContainer, aH as getFieldValues, aD as init, aI as renderAt, aG as setFieldValues, aF as updateTheme, aE as updateUserId, aK as useAuthClient } from './fthry_index.BvhUrwDK.js';
1
+ export { aL as AssistantChat, aC as Elements, aM as Feathery, aB as Form, aJ as LoginForm, aN as StyledContainer, aH as getFieldValues, aD as init, aI as renderAt, aG as setFieldValues, aF as updateTheme, aE as updateUserId, aK as useAuthClient } from './fthry_index.zXD9Mmpj.js';
2
2
  import 'react-dom/client';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feathery/react",
3
- "version": "2.35.5",
3
+ "version": "2.35.6",
4
4
  "description": "React library for Feathery",
5
5
  "author": "Boyang Dun",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[446,745],{5577:(e,t,o)=>{o.d(t,{N:()=>r});var n=o(5944),a=function(){return a=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},a.apply(this,arguments)};function r(e){var t=e.type,o=void 0===t?"text":t,r=e.htmlSize,c=e.css,i=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["type","htmlSize","css"]);return(0,n.tZ)("input",a({type:o,size:r,css:a({border:"1px solid #ced4da",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",fontSize:"1rem",lineHeight:"1.5",color:"#495057",backgroundColor:"#fff",backgroundClip:"padding-box",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"},"&:disabled":{backgroundColor:"#e9ecef",opacity:1}},c)},i))}},2788:(e,t,o)=>{o.r(t),o.d(t,{applyCheckableInputStyles:()=>h,applyHeightWidthMarginByFontSize:()=>p,composeCheckableInputStyle:()=>u,default:()=>b});var n=o(5944),a=o(7294),r=o(9479),c=function(){return c=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},c.apply(this,arguments)},i="polygon(40% 85%, 89% 23%, 76% 12%, 39% 59%, 23% 44%, 12% 55%)",l=function(e){return Math.max(e,13)},p=function(e,t,o){void 0===o&&(o=!1),e.apply(t,["font_size"],(function(e){var t=l(e),n="".concat(t,"px"),a={minHeight:n,height:n,minWidth:n,width:n},r=Math.max(t/2,10);return o||(a.marginRight="".concat(r,"px")),a}))},d=function(e,t,o,n){e.apply(t,["font_size",o],(function(e,t){var o=l(e);return n?function(e,t){return{height:e=Math.floor(e/1.7),width:e,minWidth:e,minHeight:e,border:0,boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),borderRadius:"50%"}}(o,t):function(e,t){return{boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),clipPath:i}}(o,t)}))},s=function(e,t,o){e.apply(t,["height","height_unit","width","width_unit",o],(function(e,t,o,n,a){return{boxShadow:"inset ".concat(o).concat(n," ").concat(e).concat(t," #").concat(a),clipPath:i}}))};function h(e,t){t.addTargets("checkbox","checkboxCheckmark","checkboxSelected","checkboxHover","checkboxCheckmarkHover","checkboxLabel");var o=e.servar,n=o.type,a=o.metadata.multiple,r="select"===n||"matrix"===n&&!a;return"multiselect"===n||"checkbox_group"===n||"matrix"===n&&a||r?(function(e,t){e.apply("checkboxLabel",["font_size","line_height"],(function(e,t){return t||(t=l(e)),{position:"relative",top:"-".concat((t-e)/2,"px"),lineHeight:"".concat(t,"px")}}))}(t),p(t,"checkbox",!0),p(t,"checkboxCheckmark",!0),p(t,"checkboxCheckmarkHover",!0),d(t,"checkboxCheckmark","selected_font_color",r),d(t,"checkboxCheckmarkHover","hover_font_color",r)):(t.applyHeight("checkbox"),t.applyWidth("checkbox"),t.applyHeight("checkboxCheckmark"),t.applyWidth("checkboxCheckmark"),t.applyHeight("checkboxCheckmarkHover"),t.applyWidth("checkboxCheckmarkHover"),s(t,"checkboxCheckmark","selected_font_color"),s(t,"checkboxCheckmarkHover","hover_font_color")),t.applyBorders({target:"checkbox"}),r||t.applyCorners("checkbox"),t.applyBoxShadow("checkbox"),t.applyColor("checkbox","background_color","backgroundColor",!0),t.applySelectorStyles("checkboxHover",{prefix:"hover_",important:!0}),t.applySelectorStyles("checkboxSelected",{prefix:"selected_",important:!0}),t}var u=function(e,t,o){return void 0===t&&(t=!1),void 0===o&&(o=!1),c(c({position:"static",marginLeft:5,marginRight:5,marginTop:0,marginBottom:0,appearance:"none",display:"grid",placeContent:"center",outline:"none",borderRadius:o?"50%":null},e.getTarget("checkbox")),{"&:hover":(0,r.wL)(t?{}:e.getTarget("checkboxHover")),"&::before":c({content:"''",transform:"scale(0)"},e.getTarget("checkboxCheckmark")),"&:hover::before":(0,r.wL)(c(c({},e.getTarget("checkboxCheckmark")),e.getTarget("checkboxCheckmarkHover"))),"&:checked":c({},e.getTarget("checkboxSelected")),"&:checked::before":{transform:"scale(1)"}})};const b=function(e){var t=e.element,o=e.responsiveStyles,i=e.fieldLabel,l=e.fieldVal,p=void 0===l||l,d=e.onChange,s=void 0===d?function(){}:d,b=e.elementProps,g=void 0===b?{}:b,f=e.disabled,k=void 0!==f&&f,y=e.children,m=(0,a.useMemo)((function(){return h(t,o)}),[o]),x=t.servar;return(0,n.BX)("div",c({css:c(c({},o.getTarget("fc")),{position:"relative",display:"flex"})},g,{children:[y,(0,n.tZ)("input",{id:x.key,name:x.key,type:"checkbox",checked:p,disabled:k,onChange:s,onFocus:r.ms,"aria-label":t.properties.aria_label,css:c(c(c({},u(m,k)),k?o.getTarget("disabled"):{}),{marginTop:"4px","&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})}),i]}))}},8250:(e,t,o)=>{o.r(t),o.d(t,{default:()=>h});var n=o(5944),a=o(7294),r=o(5577),c=o(1211),i=o(2788),l=o(1587),p=o(9479),d=o(5406),s=function(){return s=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)};const h=function(e){var t,o,h,u=e.element,b=e.responsiveStyles,g=e.fieldLabel,f=e.fieldVal,k=void 0===f?[]:f,y=e.otherVal,m=void 0===y?"":y,x=e.repeatIndex,v=void 0===x?null:x,C=e.editMode,w=e.onChange,S=void 0===w?function(){}:w,_=e.onOtherChange,T=void 0===_?function(){}:_,O=e.onEnter,H=void 0===O?function(){}:O,Z=e.elementProps,B=void 0===Z?{}:Z,L=e.disabled,j=void 0!==L&&L,z=e.children,P=u.servar,W=(0,d.Z)(P.metadata.salesforce_sync,C),F=W.dynamicOptions,M=W.loadingDynamicOptions,R=W.shouldSalesforceSync,I=k.includes(m),X=null!==(t=P.metadata.other_label)&&void 0!==t?t:"Other",E=(0,a.useRef)(null),G=(0,a.useMemo)((function(){return(0,i.applyCheckableInputStyles)(u,b),function(e,t){t.addTargets("checkboxGroup"),(0,i.applyHeightWidthMarginByFontSize)(t,"checkboxGroup")}(0,b),b.addTargets("row-container"),b.apply("row-container","row_separation",(function(e){return{gap:"".concat(e||5,"px")}})),b.apply("row-container","option_direction",(function(e){return{flexDirection:e||"column"}})),b}),[b]),D=P.metadata.option_labels,V=null!==(o=P.metadata.option_tooltips)&&void 0!==o?o:[],N=function(e){return j||M||P.max_length&&P.max_length<=k.length&&!e},q=N(I),K=!I||q;return h=R?F.map((function(e){return{value:e.value,label:e.label,tooltip:""}})):null!==v&&void 0!==P.metadata.repeat_options&&void 0!==P.metadata.repeat_options[v]?P.metadata.repeat_options[v]:P.metadata.options.map((function(e,t){return{value:e,label:D&&D[t]?D[t]:e,tooltip:V&&V[t]?V[t]:""}})),(0,n.BX)("div",s({ref:E,css:s({position:"relative",width:"100%"},b.getTarget("fc"))},B,{children:[z,g,(0,n.BX)("div",s({css:s({display:"flex",flexWrap:"wrap",width:"100%"},G.getTarget("row-container"))},{children:[h.map((function(e,t){var o,a,r,c=null!==(o=e.value)&&void 0!==o?o:e,d=null!==(a=e.label)&&void 0!==a?a:e,h=k.includes(c),g=N(h);return(0,n.BX)("div",s({css:{display:"flex",pointerEvents:g?"none":"auto"}},{children:[(0,n.BX)("label",s({style:{display:"contents"}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(P.key,"-").concat(t),name:c,checked:h,onChange:S,onFocus:p.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(G,g)),G.getTarget("checkboxGroup")),g?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}}),disabled:g,"aria-label":u.properties.aria_label}),(0,n.tZ)("span",s({css:s({whiteSpace:"pre-wrap",overflowWrap:"anywhere"},G.getTarget("checkboxLabel"))},{children:d}))]})),(0,n.tZ)(l.Z,{containerRef:E,id:"".concat(u.id,"-").concat(c),text:null!==(r=e.tooltip)&&void 0!==r?r:"",responsiveStyles:b,absolute:!1,repeat:u.repeat})]}),"".concat(P.key,"-").concat(t))})),P.metadata.other&&(0,n.BX)("div",s({style:{display:"flex"}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(P.key,"-"),name:m,checked:I,disabled:q,onChange:S,onFocus:p.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(G,q)),G.getTarget("checkboxGroup")),q?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})},"".concat(P.key,"-")),(0,n.tZ)("label",s({htmlFor:"".concat(P.key,"-"),css:G.getTarget("checkboxLabel")},{children:X})),(0,n.tZ)(r.N,{type:"text",htmlSize:1,css:s(s(s(s({marginLeft:"5px"},c.ET),{paddingLeft:"0.4rem",flexGrow:1}),b.getTarget("field")),K?b.getTarget("disabled"):{}),id:P.key,value:m||"",onChange:T,onKeyDown:function(e){"Enter"===e.key&&H(e)},required:I,disabled:K}),(0,n.tZ)(l.Z,{containerRef:E,id:"".concat(u.id,"-"),text:P.metadata.other_tooltip,responsiveStyles:b,absolute:!1,repeat:u.repeat})]}))]}))]}))}}}]);
1
+ "use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[446,745],{5577:(e,t,o)=>{o.d(t,{N:()=>r});var n=o(5944),a=function(){return a=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},a.apply(this,arguments)};function r(e){var t=e.type,o=void 0===t?"text":t,r=e.htmlSize,c=e.css,i=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["type","htmlSize","css"]);return(0,n.tZ)("input",a({type:o,size:r,css:a({border:"1px solid #ced4da",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",fontSize:"1rem",lineHeight:"1.5",color:"#495057",backgroundColor:"#fff",backgroundClip:"padding-box",transition:"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out","&:focus":{borderColor:"#80bdff",outline:0,boxShadow:"0 0 0 0.2rem rgba(0, 123, 255, 0.25)"},"&:disabled":{backgroundColor:"#e9ecef",opacity:1}},c)},i))}},2788:(e,t,o)=>{o.r(t),o.d(t,{applyCheckableInputStyles:()=>h,applyHeightWidthMarginByFontSize:()=>p,composeCheckableInputStyle:()=>u,default:()=>b});var n=o(5944),a=o(7294),r=o(9479),c=function(){return c=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},c.apply(this,arguments)},i="polygon(40% 85%, 89% 23%, 76% 12%, 39% 59%, 23% 44%, 12% 55%)",l=function(e){return Math.max(e,13)},p=function(e,t,o){void 0===o&&(o=!1),e.apply(t,["font_size"],(function(e){var t=l(e),n="".concat(t,"px"),a={minHeight:n,height:n,minWidth:n,width:n},r=Math.max(t/2,10);return o||(a.marginRight="".concat(r,"px")),a}))},d=function(e,t,o,n){e.apply(t,["font_size",o],(function(e,t){var o=l(e);return n?function(e,t){return{height:e=Math.floor(e/1.7),width:e,minWidth:e,minHeight:e,border:0,boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),borderRadius:"50%"}}(o,t):function(e,t){return{boxShadow:"inset ".concat(e,"px ").concat(e,"px #").concat(t),clipPath:i}}(o,t)}))},s=function(e,t,o){e.apply(t,["height","height_unit","width","width_unit",o],(function(e,t,o,n,a){return{boxShadow:"inset ".concat(o).concat(n," ").concat(e).concat(t," #").concat(a),clipPath:i}}))};function h(e,t){t.addTargets("checkbox","checkboxCheckmark","checkboxSelected","checkboxHover","checkboxCheckmarkHover","checkboxLabel");var o=e.servar,n=o.type,a=o.metadata.multiple,r="select"===n||"matrix"===n&&!a;return"multiselect"===n||"checkbox_group"===n||"matrix"===n&&a||r?(function(e,t){e.apply("checkboxLabel",["font_size","line_height"],(function(e,t){return t||(t=l(e)),{position:"relative",top:"-".concat((t-e)/2,"px"),lineHeight:"".concat(t,"px")}}))}(t),p(t,"checkbox",!0),p(t,"checkboxCheckmark",!0),p(t,"checkboxCheckmarkHover",!0),d(t,"checkboxCheckmark","selected_font_color",r),d(t,"checkboxCheckmarkHover","hover_font_color",r)):(t.applyHeight("checkbox"),t.applyWidth("checkbox"),t.applyHeight("checkboxCheckmark"),t.applyWidth("checkboxCheckmark"),t.applyHeight("checkboxCheckmarkHover"),t.applyWidth("checkboxCheckmarkHover"),s(t,"checkboxCheckmark","selected_font_color"),s(t,"checkboxCheckmarkHover","hover_font_color")),t.applyBorders({target:"checkbox"}),r||t.applyCorners("checkbox"),t.applyBoxShadow("checkbox"),t.applyColor("checkbox","background_color","backgroundColor",!0),t.applySelectorStyles("checkboxHover",{prefix:"hover_",important:!0}),t.applySelectorStyles("checkboxSelected",{prefix:"selected_",important:!0}),t}var u=function(e,t,o){return void 0===t&&(t=!1),void 0===o&&(o=!1),c(c({position:"static",marginLeft:5,marginRight:5,marginTop:0,marginBottom:0,appearance:"none",display:"grid",placeContent:"center",outline:"none",borderRadius:o?"50%":null},e.getTarget("checkbox")),{"&:hover":(0,r.wL)(t?{}:e.getTarget("checkboxHover")),"&::before":c({content:"''",transform:"scale(0)"},e.getTarget("checkboxCheckmark")),"&:hover::before":(0,r.wL)(c(c({},e.getTarget("checkboxCheckmark")),e.getTarget("checkboxCheckmarkHover"))),"&:checked":c({},e.getTarget("checkboxSelected")),"&:checked::before":{transform:"scale(1)"}})};const b=function(e){var t=e.element,o=e.responsiveStyles,i=e.fieldLabel,l=e.fieldVal,p=void 0===l||l,d=e.onChange,s=void 0===d?function(){}:d,b=e.elementProps,g=void 0===b?{}:b,f=e.disabled,k=void 0!==f&&f,y=e.children,x=(0,a.useMemo)((function(){return h(t,o)}),[o]),m=t.servar;return(0,n.BX)("div",c({css:c(c({},o.getTarget("fc")),{position:"relative",display:"flex"})},g,{children:[y,(0,n.tZ)("input",{id:m.key,name:m.key,type:"checkbox",checked:p,disabled:k,onChange:s,onFocus:r.ms,"aria-label":t.properties.aria_label,css:c(c(c({},u(x,k)),k?o.getTarget("disabled"):{}),{marginTop:"4px","&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})}),i]}))}},8250:(e,t,o)=>{o.r(t),o.d(t,{default:()=>h});var n=o(5944),a=o(7294),r=o(5577),c=o(1211),i=o(2788),l=o(1587),p=o(9479),d=o(5406),s=function(){return s=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var a in t=arguments[o])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)};const h=function(e){var t,o,h,u=e.element,b=e.responsiveStyles,g=e.fieldLabel,f=e.fieldVal,k=void 0===f?[]:f,y=e.otherVal,x=void 0===y?"":y,m=e.repeatIndex,v=void 0===m?null:m,C=e.editMode,w=e.onChange,S=void 0===w?function(){}:w,_=e.onOtherChange,T=void 0===_?function(){}:_,O=e.onEnter,H=void 0===O?function(){}:O,Z=e.elementProps,B=void 0===Z?{}:Z,L=e.disabled,j=void 0!==L&&L,z=e.children,P=u.servar,W=(0,d.Z)(P.metadata.salesforce_sync,C),F=W.dynamicOptions,M=W.loadingDynamicOptions,R=W.shouldSalesforceSync,I=k.includes(x),G=null!==(t=P.metadata.other_label)&&void 0!==t?t:"Other",X=(0,a.useRef)(null),E=(0,a.useMemo)((function(){return(0,i.applyCheckableInputStyles)(u,b),function(e,t){t.addTargets("checkboxGroup"),(0,i.applyHeightWidthMarginByFontSize)(t,"checkboxGroup")}(0,b),b.addTargets("row-container"),b.apply("row-container","row_separation",(function(e){return{gap:"".concat(e||5,"px")}})),b.apply("row-container","option_direction",(function(e){return{flexDirection:e||"column"}})),b}),[b]),D=P.metadata.option_labels,V=null!==(o=P.metadata.option_tooltips)&&void 0!==o?o:[],N=function(e){return j||M||P.max_length&&P.max_length<=k.length&&!e},q=N(I),K=!I||q;return h=R?F.map((function(e){return{value:e.value,label:e.label,tooltip:""}})):null!==v&&void 0!==P.metadata.repeat_options&&void 0!==P.metadata.repeat_options[v]?P.metadata.repeat_options[v]:P.metadata.options.map((function(e,t){return{value:e,label:D&&D[t]?D[t]:e,tooltip:V&&V[t]?V[t]:""}})),(0,n.BX)("div",s({ref:X,css:s({position:"relative",width:"100%"},b.getTarget("fc"))},B,{children:[z,g,(0,n.BX)("div",s({css:s({display:"flex",flexWrap:"wrap",width:"100%"},E.getTarget("row-container"))},{children:[h.map((function(e,t){var o,a,r,c=null!==(o=e.value)&&void 0!==o?o:e,d=null!==(a=e.label)&&void 0!==a?a:e,h=k.includes(c),g=N(h);return(0,n.BX)("div",s({css:{display:"flex",pointerEvents:g?"none":"auto"}},{children:[(0,n.BX)("label",s({style:{display:"contents"}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(P.key,"-").concat(t),name:c,checked:h,onChange:S,onFocus:p.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(E,g)),E.getTarget("checkboxGroup")),g?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}}),disabled:g,"aria-label":u.properties.aria_label}),(0,n.tZ)("span",s({css:s({whiteSpace:"pre-wrap",overflowWrap:"anywhere"},E.getTarget("checkboxLabel"))},{children:d}))]})),(0,n.tZ)(l.Z,{containerRef:X,id:"".concat(u.id,"-").concat(c),text:null!==(r=e.tooltip)&&void 0!==r?r:"",responsiveStyles:b,absolute:!1,repeat:u.repeat})]}),"".concat(P.key,"-").concat(t))})),P.metadata.other&&(0,n.BX)("div",s({style:{display:"flex",flexGrow:1}},{children:[(0,n.tZ)("input",{type:"checkbox",id:"".concat(P.key,"-"),name:x,checked:I,disabled:q,onChange:S,onFocus:p.ms,style:{padding:0,lineHeight:"normal"},css:s(s(s(s({},(0,i.composeCheckableInputStyle)(E,q)),E.getTarget("checkboxGroup")),q?b.getTarget("disabled"):{}),{"&:focus-visible":{border:"1px solid rgb(74, 144, 226)"}})},"".concat(P.key,"-")),(0,n.tZ)("label",s({htmlFor:"".concat(P.key,"-"),css:E.getTarget("checkboxLabel")},{children:G})),(0,n.tZ)(r.N,{type:"text",htmlSize:1,css:s(s(s(s({marginLeft:"5px"},c.ET),{paddingLeft:"0.4rem",flexGrow:1}),b.getTarget("field")),K?b.getTarget("disabled"):{}),id:P.key,value:x||"",onChange:T,onKeyDown:function(e){"Enter"===e.key&&H(e)},required:I,disabled:K}),(0,n.tZ)(l.Z,{containerRef:X,id:"".concat(u.id,"-"),text:P.metadata.other_tooltip,responsiveStyles:b,absolute:!1,repeat:u.repeat})]}))]}))]}))}}}]);