pygpt-net 2.7.5__py3-none-any.whl → 2.7.7__py3-none-any.whl

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 (82) hide show
  1. pygpt_net/CHANGELOG.txt +14 -0
  2. pygpt_net/__init__.py +4 -4
  3. pygpt_net/controller/chat/remote_tools.py +3 -9
  4. pygpt_net/controller/chat/stream.py +2 -2
  5. pygpt_net/controller/chat/{handler/worker.py → stream_worker.py} +20 -64
  6. pygpt_net/controller/debug/fixtures.py +3 -2
  7. pygpt_net/controller/files/files.py +65 -4
  8. pygpt_net/core/debug/models.py +2 -2
  9. pygpt_net/core/filesystem/url.py +4 -1
  10. pygpt_net/core/render/web/body.py +3 -2
  11. pygpt_net/core/types/chunk.py +27 -0
  12. pygpt_net/data/config/config.json +14 -4
  13. pygpt_net/data/config/models.json +192 -4
  14. pygpt_net/data/config/settings.json +126 -36
  15. pygpt_net/data/js/app/template.js +1 -1
  16. pygpt_net/data/js/app.min.js +2 -2
  17. pygpt_net/data/locale/locale.de.ini +5 -0
  18. pygpt_net/data/locale/locale.en.ini +35 -8
  19. pygpt_net/data/locale/locale.es.ini +5 -0
  20. pygpt_net/data/locale/locale.fr.ini +5 -0
  21. pygpt_net/data/locale/locale.it.ini +5 -0
  22. pygpt_net/data/locale/locale.pl.ini +5 -0
  23. pygpt_net/data/locale/locale.uk.ini +5 -0
  24. pygpt_net/data/locale/locale.zh.ini +5 -0
  25. pygpt_net/data/locale/plugin.cmd_mouse_control.en.ini +2 -2
  26. pygpt_net/item/ctx.py +3 -5
  27. pygpt_net/js_rc.py +2449 -2447
  28. pygpt_net/plugin/cmd_mouse_control/config.py +8 -7
  29. pygpt_net/plugin/cmd_mouse_control/plugin.py +3 -4
  30. pygpt_net/plugin/cmd_mouse_control/worker.py +2 -1
  31. pygpt_net/plugin/cmd_mouse_control/worker_sandbox.py +2 -1
  32. pygpt_net/provider/api/anthropic/__init__.py +16 -9
  33. pygpt_net/provider/api/anthropic/chat.py +259 -11
  34. pygpt_net/provider/api/anthropic/computer.py +844 -0
  35. pygpt_net/provider/api/anthropic/remote_tools.py +172 -0
  36. pygpt_net/{controller/chat/handler/anthropic_stream.py → provider/api/anthropic/stream.py} +24 -10
  37. pygpt_net/provider/api/anthropic/tools.py +32 -77
  38. pygpt_net/provider/api/anthropic/utils.py +30 -0
  39. pygpt_net/provider/api/google/__init__.py +6 -5
  40. pygpt_net/provider/api/google/chat.py +3 -8
  41. pygpt_net/{controller/chat/handler/google_stream.py → provider/api/google/stream.py} +1 -1
  42. pygpt_net/provider/api/google/utils.py +185 -0
  43. pygpt_net/{controller/chat/handler → provider/api/langchain}/__init__.py +0 -0
  44. pygpt_net/{controller/chat/handler/langchain_stream.py → provider/api/langchain/stream.py} +1 -1
  45. pygpt_net/provider/api/llama_index/__init__.py +0 -0
  46. pygpt_net/{controller/chat/handler/llamaindex_stream.py → provider/api/llama_index/stream.py} +1 -1
  47. pygpt_net/provider/api/openai/__init__.py +7 -3
  48. pygpt_net/provider/api/openai/image.py +2 -2
  49. pygpt_net/provider/api/openai/responses.py +0 -0
  50. pygpt_net/{controller/chat/handler/openai_stream.py → provider/api/openai/stream.py} +1 -1
  51. pygpt_net/provider/api/openai/utils.py +69 -3
  52. pygpt_net/provider/api/x_ai/__init__.py +117 -17
  53. pygpt_net/provider/api/x_ai/chat.py +272 -102
  54. pygpt_net/provider/api/x_ai/image.py +149 -47
  55. pygpt_net/provider/api/x_ai/{remote.py → remote_tools.py} +165 -70
  56. pygpt_net/provider/api/x_ai/responses.py +507 -0
  57. pygpt_net/provider/api/x_ai/stream.py +715 -0
  58. pygpt_net/provider/api/x_ai/tools.py +59 -8
  59. pygpt_net/{controller/chat/handler → provider/api/x_ai}/utils.py +1 -2
  60. pygpt_net/provider/api/x_ai/vision.py +1 -4
  61. pygpt_net/provider/core/config/patch.py +22 -1
  62. pygpt_net/provider/core/model/patch.py +26 -1
  63. pygpt_net/tools/image_viewer/ui/dialogs.py +300 -13
  64. pygpt_net/tools/text_editor/ui/dialogs.py +3 -2
  65. pygpt_net/tools/text_editor/ui/widgets.py +5 -1
  66. pygpt_net/ui/base/context_menu.py +44 -1
  67. pygpt_net/ui/layout/toolbox/indexes.py +22 -19
  68. pygpt_net/ui/layout/toolbox/model.py +28 -5
  69. pygpt_net/ui/widget/dialog/base.py +16 -5
  70. pygpt_net/ui/widget/image/display.py +25 -8
  71. pygpt_net/ui/widget/tabs/output.py +9 -1
  72. pygpt_net/ui/widget/textarea/editor.py +14 -1
  73. pygpt_net/ui/widget/textarea/input.py +20 -7
  74. pygpt_net/ui/widget/textarea/notepad.py +24 -1
  75. pygpt_net/ui/widget/textarea/output.py +23 -1
  76. pygpt_net/ui/widget/textarea/web.py +16 -1
  77. {pygpt_net-2.7.5.dist-info → pygpt_net-2.7.7.dist-info}/METADATA +16 -2
  78. {pygpt_net-2.7.5.dist-info → pygpt_net-2.7.7.dist-info}/RECORD +80 -73
  79. pygpt_net/controller/chat/handler/xai_stream.py +0 -135
  80. {pygpt_net-2.7.5.dist-info → pygpt_net-2.7.7.dist-info}/LICENSE +0 -0
  81. {pygpt_net-2.7.5.dist-info → pygpt_net-2.7.7.dist-info}/WHEEL +0 -0
  82. {pygpt_net-2.7.5.dist-info → pygpt_net-2.7.7.dist-info}/entry_points.txt +0 -0
pygpt_net/js_rc.py CHANGED
@@ -77295,7 +77295,7 @@ lear();\x0a\x09\x09} catc\
77295
77295
  h (_) {}\x0a\x09\x09this.\
77296
77296
  _pendingDoc = fa\
77297
77297
  lse;\x0a\x09}\x0a}\
77298
- \x00\x00)\xe5\
77298
+ \x00\x00)\xfa\
77299
77299
  /\
77300
77300
  / ==============\
77301
77301
  ================\
@@ -77516,458 +77516,459 @@ ${url}\x22>` +\x0a\x09\x09\x09\x09\
77516
77516
  \x09\x09`<div class=\x22i\
77517
77517
  mg-outer\x22><div c\
77518
77518
  lass=\x22img-wrappe\
77519
- r\x22><a href=\x22${ur\
77520
- l}\x22><img src=\x22${\
77521
- path}\x22 class=\x22im\
77522
- age\x22></a></div>`\
77523
- +\x0a\x09\x09\x09\x09\x09\x09`<a hre\
77524
- f=\x22${url}\x22 class\
77525
- =\x22title\x22>${this.\
77526
- _escapeHtml(bn)}\
77527
- </a></div>` +\x0a\x09\x09\
77528
- \x09\x09\x09\x09`</div><br/>\
77529
- `\x0a\x09\x09\x09\x09\x09);\x0a\x09\x09\x09\x09}\x0a\
77530
- \x09\x09\x09});\x0a\x09\x09}\x0a\x0a\x09\x09//\
77531
- files\x0a\x09\x09const f\
77532
- iles = block.fil\
77533
- es || {};\x0a\x09\x09cons\
77534
- t kF = Object.ke\
77535
- ys(files);\x0a\x09\x09if \
77536
- (kF.length) {\x0a\x09\x09\
77537
- \x09const rows = []\
77538
- ;\x0a\x09\x09\x09kF.forEach(\
77539
- (k) => {\x0a\x09\x09\x09\x09con\
77540
- st it = files[k]\
77541
- ;\x0a\x09\x09\x09\x09if (!it) r\
77542
- eturn;\x0a\x09\x09\x09\x09const\
77543
- url = this._esc\
77544
- (it.url);\x0a\x09\x09\x09\x09co\
77545
- nst path = this.\
77546
- _esc(it.path);\x0a\x09\
77547
- \x09\x09\x09const icon = \
77548
- (typeof window !\
77549
- == 'undefined' &\
77550
- & window.ICON_AT\
77551
- TACHMENTS) ? `<i\
77552
- mg src=\x22${window\
77553
- .ICON_ATTACHMENT\
77554
- S}\x22 class=\x22extra\
77555
- -src-icon\x22>` : '\
77556
- ';\x0a\x09\x09\x09\x09rows.push\
77557
- (`${icon} <b> [$\
77558
- {k}] </b> <a hre\
77559
- f=\x22${url}\x22>${pat\
77560
- h}</a>`);\x0a\x09\x09\x09});\
77561
- \x0a\x09\x09\x09if (rows.len\
77562
- gth) parts.push(\
77563
- `<div>${rows.joi\
77564
- n(\x22<br/><br/>\x22)}\
77565
- </div>`);\x0a\x09\x09}\x0a\x0a\x09\
77566
- \x09// urls\x0a\x09\x09const\
77567
- urls = block.ur\
77568
- ls || {};\x0a\x09\x09cons\
77569
- t kU = Object.ke\
77570
- ys(urls);\x0a\x09\x09if (\
77571
- kU.length) {\x0a\x09\x09\x09\
77572
- const rows = [];\
77573
- \x0a\x09\x09\x09kU.forEach((\
77574
- k) => {\x0a\x09\x09\x09\x09cons\
77575
- t it = urls[k];\x0a\
77576
- \x09\x09\x09\x09if (!it) ret\
77577
- urn;\x0a\x09\x09\x09\x09const u\
77578
- rl = this._esc(i\
77579
- t.url);\x0a\x09\x09\x09\x09cons\
77580
- t icon = (typeof\
77581
- window !== 'und\
77582
- efined' && windo\
77583
- w.ICON_URL) ? `<\
77584
- img src=\x22${windo\
77585
- w.ICON_URL}\x22 cla\
77586
- ss=\x22extra-src-ic\
77587
- on\x22>` : '';\x0a\x09\x09\x09\x09\
77588
- rows.push(`${ico\
77589
- n}<a href=\x22${url\
77590
- }\x22 title=\x22${url}\
77591
- \x22>${url}</a> <sm\
77592
- all> [${k}] </sm\
77593
- all>`);\x0a\x09\x09\x09});\x0a\x09\
77594
- \x09\x09if (rows.lengt\
77595
- h) parts.push(`<\
77596
- div>${rows.join(\
77597
- \x22<br/><br/>\x22)}</\
77598
- div>`);\x0a\x09\x09}\x0a\x0a\x09\x09/\
77599
- / docs (render o\
77600
- n JS) or fallbac\
77601
- k to docs_html\x0a\x09\
77602
- \x09const extra = b\
77603
- lock.extra || {}\
77604
- ;\x0a\x09\x09const docsRa\
77605
- w = Array.isArra\
77606
- y(extra.docs) ? \
77607
- extra.docs : nul\
77608
- l;\x0a\x0a\x09\x09if (docsRa\
77609
- w && docsRaw.len\
77610
- gth) {\x0a\x09\x09\x09const \
77611
- icon = (typeof w\
77612
- indow !== 'undef\
77613
- ined' && window.\
77614
- ICON_DB) ? `<img\
77615
- src=\x22${window.I\
77616
- CON_DB}\x22 class=\x22\
77617
- extra-src-icon\x22>\
77618
- ` : '';\x0a\x09\x09\x09const\
77619
- prefix = (typeo\
77620
- f window !== 'un\
77621
- defined' && wind\
77622
- ow.LOCALE_DOC_PR\
77623
- EFIX) ? String(w\
77624
- indow.LOCALE_DOC\
77625
- _PREFIX) : 'Doc:\
77626
- ';\x0a\x09\x09\x09const limi\
77627
- t = 3;\x0a\x0a\x09\x09\x09// no\
77628
- rmalize: [{uuid,\
77629
- meta}] OR [{ uu\
77630
- id: {...} }]\x0a\x09\x09\x09\
77631
- const normalized\
77632
- = [];\x0a\x09\x09\x09docsRa\
77633
- w.forEach((it) =\
77634
- > {\x0a\x09\x09\x09\x09if (!it \
77635
- || typeof it !==\
77636
- 'object') retur\
77637
- n;\x0a\x09\x09\x09\x09if ('uuid\
77638
- ' in it && 'meta\
77639
- ' in it && typeo\
77640
- f it.meta === 'o\
77641
- bject') {\x0a\x09\x09\x09\x09\x09n\
77642
- ormalized.push({\
77643
- \x0a\x09\x09\x09\x09\x09\x09uuid: Str\
77644
- ing(it.uuid),\x0a\x09\x09\
77645
- \x09\x09\x09\x09meta: it.met\
77646
- a || {}\x0a\x09\x09\x09\x09\x09});\
77647
- \x0a\x09\x09\x09\x09} else {\x0a\x09\x09\
77648
- \x09\x09\x09const keys = \
77649
- Object.keys(it);\
77650
- \x0a\x09\x09\x09\x09\x09if (keys.l\
77651
- ength === 1) {\x0a\x09\
77652
- \x09\x09\x09\x09\x09const uuid \
77653
- = keys[0];\x0a\x09\x09\x09\x09\x09\
77654
- \x09const meta = it\
77655
- [uuid];\x0a\x09\x09\x09\x09\x09\x09if\
77656
- (meta && typeof\
77657
- meta === 'objec\
77658
- t') {\x0a\x09\x09\x09\x09\x09\x09\x09nor\
77659
- malized.push({\x0a\x09\
77660
- \x09\x09\x09\x09\x09\x09\x09uuid: Str\
77661
- ing(uuid),\x0a\x09\x09\x09\x09\x09\
77662
- \x09\x09\x09meta\x0a\x09\x09\x09\x09\x09\x09\x09}\
77663
- );\x0a\x09\x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09\x09\
77664
- }\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09});\x0a\x0a\
77665
- \x09\x09\x09const rows = \
77666
- [];\x0a\x09\x09\x09for (let \
77667
- i = 0; i < Math.\
77668
- min(limit, norma\
77669
- lized.length); i\
77670
- ++) {\x0a\x09\x09\x09\x09const \
77671
- d = normalized[i\
77672
- ];\x0a\x09\x09\x09\x09const met\
77673
- a = d.meta || {}\
77674
- ;\x0a\x09\x09\x09\x09const entr\
77675
- ies = Object.key\
77676
- s(meta).map(k =>\
77677
- `<b>${this._esc\
77678
- apeHtml(k)}:</b>\
77679
- ${this._escapeH\
77680
- tml(String(meta[\
77681
- k]))}`).join(', \
77682
- ');\x0a\x09\x09\x09\x09rows.pus\
77683
- h(`<p><small>[${\
77684
- i + 1}] ${this._\
77685
- escapeHtml(d.uui\
77686
- d)}: ${entries}<\
77687
- /small></p>`);\x0a\x09\
77688
- \x09\x09}\x0a\x09\x09\x09if (rows.\
77689
- length) {\x0a\x09\x09\x09\x09pa\
77690
- rts.push(`<p>${i\
77691
- con}<small><b>${\
77519
+ r\x22><a href=\x22brid\
77520
+ ge://open_image/\
77521
+ ${path}\x22><img sr\
77522
+ c=\x22${path}\x22 clas\
77523
+ s=\x22image\x22></a></\
77524
+ div>` +\x0a\x09\x09\x09\x09\x09\x09`<\
77525
+ a href=\x22${url}\x22 \
77526
+ class=\x22title\x22>${\
77692
77527
  this._escapeHtml\
77693
- (prefix)}:</b></\
77694
- small></p>`);\x0a\x09\x09\
77695
- \x09\x09parts.push(`<d\
77696
- iv class=\x22cmd\x22><\
77697
- p>${rows.join(''\
77698
- )}</p></div>`);\x0a\
77699
- \x09\x09\x09}\x0a\x09\x09} else {\x0a\
77700
- \x09\x09\x09// backward c\
77701
- ompat\x0a\x09\x09\x09const d\
77702
- ocs_html = extra\
77703
- && extra.docs_h\
77704
- tml ? String(ext\
77705
- ra.docs_html) : \
77706
- '';\x0a\x09\x09\x09if (docs_\
77707
- html) parts.push\
77708
- (docs_html);\x0a\x09\x09}\
77709
- \x0a\x0a\x09\x09// plugin-dr\
77710
- iven tool extra \
77711
- HTML\x0a\x09\x09const too\
77712
- l_extra_html = e\
77713
- xtra && extra.to\
77714
- ol_extra_html ? \
77715
- String(extra.too\
77716
- l_extra_html) : \
77717
- '';\x0a\x09\x09if (tool_e\
77718
- xtra_html) parts\
77719
- .push(`<div clas\
77720
- s=\x22msg-extra\x22>${\
77721
- tool_extra_html}\
77722
- </div>`);\x0a\x0a\x09\x09ret\
77723
- urn parts.join('\
77724
- ');\x0a\x09}\x0a\x0a\x09// Rend\
77725
- er message-level\
77726
- actions\x0a\x09_rende\
77727
- rActions(block) \
77728
- {\x0a\x09\x09const extra \
77729
- = block.extra ||\
77730
- {};\x0a\x09\x09const act\
77731
- ions = extra.act\
77732
- ions || [];\x0a\x09\x09if\
77733
- (!actions || !a\
77734
- ctions.length) r\
77735
- eturn '';\x0a\x09\x09cons\
77736
- t parts = action\
77737
- s.map((a) => {\x0a\x09\
77738
- \x09\x09const href = t\
77739
- his._esc(a.href \
77740
- || '#');\x0a\x09\x09\x09cons\
77741
- t title = this._\
77742
- esc(a.title || '\
77743
- ');\x0a\x09\x09\x09const ico\
77744
- n = this._esc(a.\
77745
- icon || '');\x0a\x09\x09\x09\
77746
- const id = this.\
77747
- _esc(a.id || blo\
77748
- ck.id);\x0a\x09\x09\x09retur\
77749
- n `<a href=\x22${hr\
77750
- ef}\x22 class=\x22acti\
77751
- on-icon\x22 data-id\
77752
- =\x22${id}\x22 role=\x22b\
77753
- utton\x22><span cla\
77754
- ss=\x22cmd\x22><img sr\
77755
- c=\x22${icon}\x22 clas\
77756
- s=\x22action-img\x22 t\
77757
- itle=\x22${title}\x22 \
77758
- alt=\x22${title}\x22 d\
77759
- ata-id=\x22${id}\x22><\
77760
- /span></a>`;\x0a\x09\x09}\
77761
- );\x0a\x09\x09return `<di\
77762
- v class=\x22action-\
77763
- icons\x22 data-id=\x22\
77764
- ${this._esc(bloc\
77765
- k.id)}\x22>${parts.\
77766
- join('')}</div>`\
77767
- ;\x0a\x09}\x0a\x0a\x09// Render\
77768
- tool output wra\
77769
- pper (always col\
77770
- lapsed by defaul\
77771
- t; wrapper visib\
77772
- ility depends on\
77773
- flag)\x0a\x09// Insid\
77774
- e class NodeTemp\
77775
- lateEngine\x0a\x09_ren\
77776
- derToolOutputWra\
77777
- pper(block) {\x0a\x09\x09\
77778
- const extra = bl\
77779
- ock.extra || {};\
77780
- \x0a\x0a\x09\x09// IMPORTANT\
77781
- : keep initial t\
77782
- ool output verba\
77783
- tim (HTML-ready)\
77784
- .\x0a\x09\x09// Do NOT HT\
77785
- ML-escape here \xe2\
77786
- \x80\x93 the host alre\
77787
- ady provides a s\
77788
- afe/HTML-ready s\
77789
- tring.\x0a\x09\x09// Esca\
77790
- ping again would\
77791
- double-encode e\
77792
- ntities (e.g. \x22 \
77793
- -> \x22), which\x0a\x09\x09/\
77794
- / caused visible\
77795
- \x22\x22\x22 in the UI i\
77796
- nstead of quotes\
77797
- .\x0a\x09\x09const tool_o\
77798
- utput_html = (ex\
77799
- tra.tool_output \
77800
- != null) ? Strin\
77801
- g(extra.tool_out\
77802
- put) : '';\x0a\x0a\x09\x09//\
77803
- Wrapper visibil\
77804
- ity: show/hide b\
77805
- ased on tool_out\
77806
- put_visible...\x0a\x09\
77807
- \x09const wrapperDi\
77808
- splay = (extra.t\
77809
- ool_output_visib\
77810
- le === true) ? '\
77811
- ' : 'display:non\
77812
- e';\x0a\x0a\x09\x09const tog\
77813
- gleTitle = (type\
77814
- of trans !== 'un\
77815
- defined' && tran\
77816
- s) ? trans('acti\
77817
- on.cmd.expand') \
77818
- : 'Expand';\x0a\x09\x09co\
77819
- nst expIcon = (t\
77528
+ (bn)}</a></div>`\
77529
+ +\x0a\x09\x09\x09\x09\x09\x09`</div>\
77530
+ <br/>`\x0a\x09\x09\x09\x09\x09);\x0a\x09\
77531
+ \x09\x09\x09}\x0a\x09\x09\x09});\x0a\x09\x09}\x0a\
77532
+ \x0a\x09\x09// files\x0a\x09\x09co\
77533
+ nst files = bloc\
77534
+ k.files || {};\x0a\x09\
77535
+ \x09const kF = Obje\
77536
+ ct.keys(files);\x0a\
77537
+ \x09\x09if (kF.length)\
77538
+ {\x0a\x09\x09\x09const rows\
77539
+ = [];\x0a\x09\x09\x09kF.for\
77540
+ Each((k) => {\x0a\x09\x09\
77541
+ \x09\x09const it = fil\
77542
+ es[k];\x0a\x09\x09\x09\x09if (!\
77543
+ it) return;\x0a\x09\x09\x09\x09\
77544
+ const url = this\
77545
+ ._esc(it.url);\x0a\x09\
77546
+ \x09\x09\x09const path = \
77547
+ this._esc(it.pat\
77548
+ h);\x0a\x09\x09\x09\x09const ic\
77549
+ on = (typeof win\
77550
+ dow !== 'undefin\
77551
+ ed' && window.IC\
77552
+ ON_ATTACHMENTS) \
77553
+ ? `<img src=\x22${w\
77554
+ indow.ICON_ATTAC\
77555
+ HMENTS}\x22 class=\x22\
77556
+ extra-src-icon\x22>\
77557
+ ` : '';\x0a\x09\x09\x09\x09rows\
77558
+ .push(`${icon} <\
77559
+ b> [${k}] </b> <\
77560
+ a href=\x22${url}\x22>\
77561
+ ${path}</a>`);\x0a\x09\
77562
+ \x09\x09});\x0a\x09\x09\x09if (row\
77563
+ s.length) parts.\
77564
+ push(`<div>${row\
77565
+ s.join(\x22<br/><br\
77566
+ />\x22)}</div>`);\x0a\x09\
77567
+ \x09}\x0a\x0a\x09\x09// urls\x0a\x09\x09\
77568
+ const urls = blo\
77569
+ ck.urls || {};\x0a\x09\
77570
+ \x09const kU = Obje\
77571
+ ct.keys(urls);\x0a\x09\
77572
+ \x09if (kU.length) \
77573
+ {\x0a\x09\x09\x09const rows \
77574
+ = [];\x0a\x09\x09\x09kU.forE\
77575
+ ach((k) => {\x0a\x09\x09\x09\
77576
+ \x09const it = urls\
77577
+ [k];\x0a\x09\x09\x09\x09if (!it\
77578
+ ) return;\x0a\x09\x09\x09\x09co\
77579
+ nst url = this._\
77580
+ esc(it.url);\x0a\x09\x09\x09\
77581
+ \x09const icon = (t\
77820
77582
  ypeof window !==\
77821
77583
  'undefined' && \
77822
- window.ICON_EXPA\
77823
- ND) ? window.ICO\
77824
- N_EXPAND : '';\x0a\x0a\
77825
- \x09\x09return (\x0a\x09\x09\x09`<\
77826
- div class='tool-\
77827
- output' style='$\
77828
- {wrapperDisplay}\
77829
- '>` +\x0a\x09\x09\x09`<span \
77830
- class='toggle-cm\
77831
- d-output' onclic\
77832
- k='toggleToolOut\
77833
- put(${this._esc(\
77834
- block.id)});' ` \
77835
- +\x0a\x09\x09\x09`title='${t\
77584
+ window.ICON_URL)\
77585
+ ? `<img src=\x22${\
77586
+ window.ICON_URL}\
77587
+ \x22 class=\x22extra-s\
77588
+ rc-icon\x22>` : '';\
77589
+ \x0a\x09\x09\x09\x09rows.push(`\
77590
+ ${icon}<a href=\x22\
77591
+ ${url}\x22 title=\x22$\
77592
+ {url}\x22>${url}</a\
77593
+ > <small> [${k}]\
77594
+ </small>`);\x0a\x09\x09\x09\
77595
+ });\x0a\x09\x09\x09if (rows.\
77596
+ length) parts.pu\
77597
+ sh(`<div>${rows.\
77598
+ join(\x22<br/><br/>\
77599
+ \x22)}</div>`);\x0a\x09\x09}\
77600
+ \x0a\x0a\x09\x09// docs (ren\
77601
+ der on JS) or fa\
77602
+ llback to docs_h\
77603
+ tml\x0a\x09\x09const extr\
77604
+ a = block.extra \
77605
+ || {};\x0a\x09\x09const d\
77606
+ ocsRaw = Array.i\
77607
+ sArray(extra.doc\
77608
+ s) ? extra.docs \
77609
+ : null;\x0a\x0a\x09\x09if (d\
77610
+ ocsRaw && docsRa\
77611
+ w.length) {\x0a\x09\x09\x09c\
77612
+ onst icon = (typ\
77613
+ eof window !== '\
77614
+ undefined' && wi\
77615
+ ndow.ICON_DB) ? \
77616
+ `<img src=\x22${win\
77617
+ dow.ICON_DB}\x22 cl\
77618
+ ass=\x22extra-src-i\
77619
+ con\x22>` : '';\x0a\x09\x09\x09\
77620
+ const prefix = (\
77621
+ typeof window !=\
77622
+ = 'undefined' &&\
77623
+ window.LOCALE_D\
77624
+ OC_PREFIX) ? Str\
77625
+ ing(window.LOCAL\
77626
+ E_DOC_PREFIX) : \
77627
+ 'Doc:';\x0a\x09\x09\x09const\
77628
+ limit = 3;\x0a\x0a\x09\x09\x09\
77629
+ // normalize: [{\
77630
+ uuid, meta}] OR \
77631
+ [{ uuid: {...} }\
77632
+ ]\x0a\x09\x09\x09const norma\
77633
+ lized = [];\x0a\x09\x09\x09d\
77634
+ ocsRaw.forEach((\
77635
+ it) => {\x0a\x09\x09\x09\x09if \
77636
+ (!it || typeof i\
77637
+ t !== 'object') \
77638
+ return;\x0a\x09\x09\x09\x09if (\
77639
+ 'uuid' in it && \
77640
+ 'meta' in it && \
77641
+ typeof it.meta =\
77642
+ == 'object') {\x0a\x09\
77643
+ \x09\x09\x09\x09normalized.p\
77644
+ ush({\x0a\x09\x09\x09\x09\x09\x09uuid\
77645
+ : String(it.uuid\
77646
+ ),\x0a\x09\x09\x09\x09\x09\x09meta: i\
77647
+ t.meta || {}\x0a\x09\x09\x09\
77648
+ \x09\x09});\x0a\x09\x09\x09\x09} else\
77649
+ {\x0a\x09\x09\x09\x09\x09const ke\
77650
+ ys = Object.keys\
77651
+ (it);\x0a\x09\x09\x09\x09\x09if (k\
77652
+ eys.length === 1\
77653
+ ) {\x0a\x09\x09\x09\x09\x09\x09const \
77654
+ uuid = keys[0];\x0a\
77655
+ \x09\x09\x09\x09\x09\x09const meta\
77656
+ = it[uuid];\x0a\x09\x09\x09\
77657
+ \x09\x09\x09if (meta && t\
77658
+ ypeof meta === '\
77659
+ object') {\x0a\x09\x09\x09\x09\x09\
77660
+ \x09\x09normalized.pus\
77661
+ h({\x0a\x09\x09\x09\x09\x09\x09\x09\x09uuid\
77662
+ : String(uuid),\x0a\
77663
+ \x09\x09\x09\x09\x09\x09\x09\x09meta\x0a\x09\x09\x09\
77664
+ \x09\x09\x09\x09});\x0a\x09\x09\x09\x09\x09\x09}\x0a\
77665
+ \x09\x09\x09\x09\x09}\x0a\x09\x09\x09\x09}\x0a\x09\x09\x09\
77666
+ });\x0a\x0a\x09\x09\x09const ro\
77667
+ ws = [];\x0a\x09\x09\x09for \
77668
+ (let i = 0; i < \
77669
+ Math.min(limit, \
77670
+ normalized.lengt\
77671
+ h); i++) {\x0a\x09\x09\x09\x09c\
77672
+ onst d = normali\
77673
+ zed[i];\x0a\x09\x09\x09\x09cons\
77674
+ t meta = d.meta \
77675
+ || {};\x0a\x09\x09\x09\x09const\
77676
+ entries = Objec\
77677
+ t.keys(meta).map\
77678
+ (k => `<b>${this\
77679
+ ._escapeHtml(k)}\
77680
+ :</b> ${this._es\
77681
+ capeHtml(String(\
77682
+ meta[k]))}`).joi\
77683
+ n(', ');\x0a\x09\x09\x09\x09row\
77684
+ s.push(`<p><smal\
77685
+ l>[${i + 1}] ${t\
77836
77686
  his._escapeHtml(\
77837
- toggleTitle)}' r\
77838
- ole='button'>` +\
77839
- \x0a\x09\x09\x09`<img src='$\
77840
- {this._esc(expIc\
77841
- on)}' width='25'\
77842
- height='25' val\
77843
- ign='middle'>` +\
77844
- \x0a\x09\x09\x09`</span>` +\x0a\
77845
- \x09\x09\x09// Content is\
77846
- initially colla\
77847
- psed. We intenti\
77848
- onally do NOT es\
77849
- cape here,\x0a\x09\x09\x09//\
77850
- to keep behavio\
77851
- r consistent wit\
77852
- h ToolOutput.app\
77853
- end/update (HTML\
77854
- -in).\x0a\x09\x09\x09`<div c\
77855
- lass='content' s\
77856
- tyle='display:no\
77857
- ne' data-trusted\
77858
- ='1'>${tool_outp\
77859
- ut_html}</div>` \
77860
- +\x0a\x09\x09\x09`</div>`\x0a\x09\x09\
77861
- );\x0a\x09}\x0a\x0a\x09// Rende\
77862
- r bot message bl\
77863
- ock (md-block-ma\
77864
- rkdown)\x0a\x09_render\
77865
- Bot(block) {\x0a\x09\x09c\
77866
- onst id = block.\
77867
- id;\x0a\x09\x09const out \
77868
- = block.output |\
77869
- | {};\x0a\x09\x09const ms\
77870
- gId = `msg-bot-$\
77871
- {id}`;\x0a\x0a\x09\x09// tim\
77872
- estamps intentio\
77873
- nally disabled o\
77874
- n frontend\x0a\x09\x09// \
77875
- let ts = '';\x0a\x09\x09/\
77876
- / if (out.timest\
77877
- amp) { ... }\x0a\x0a\x09\x09\
77878
- const personaliz\
77879
- e = !!(block && \
77880
- block.extra && b\
77881
- lock.extra.perso\
77882
- nalize === true)\
77883
- ;\x0a\x09\x09const nameHe\
77884
- ader = personali\
77885
- ze ? this._nameH\
77886
- eader('bot', out\
77887
- .name || '', out\
77888
- .avatar_img || n\
77889
- ull) : '';\x0a\x0a\x09\x09co\
77890
- nst mdText = thi\
77891
- s._escapeHtml(ou\
77892
- t.text || '');\x0a\x09\
77893
- \x09const toolWrap \
77894
- = this._renderTo\
77895
- olOutputWrapper(\
77896
- block);\x0a\x09\x09const \
77897
- extras = this._r\
77898
- enderExtras(bloc\
77899
- k);\x0a\x09\x09const acti\
77900
- ons = (block.ext\
77901
- ra && block.extr\
77902
- a.footer_icons) \
77903
- ? this._renderAc\
77904
- tions(block) : '\
77905
- ';\x0a\x09\x09const debug\
77906
- = (block.extra \
77907
- && block.extra.d\
77908
- ebug_html) ? Str\
77909
- ing(block.extra.\
77910
- debug_html) : ''\
77911
- ;\x0a\x0a\x09\x09return (\x0a\x09\x09\
77912
- \x09`<div class='ms\
77913
- g-box msg-bot' i\
77914
- d='${msgId}'>` +\
77915
- \x0a\x09\x09\x09`${nameHeade\
77916
- r}` +\x0a\x09\x09\x09`<div c\
77917
- lass='msg'>` +\x0a\x09\
77918
- \x09\x09`<div class='m\
77919
- d-block' md-bloc\
77920
- k-markdown='1'>$\
77921
- {mdText}</div>` \
77922
- +\x0a\x09\x09\x09`<div class\
77923
- ='msg-tool-extra\
77924
- '></div>` +\x0a\x09\x09\x09`\
77925
- ${toolWrap}` +\x0a\x09\
77926
- \x09\x09`<div class='m\
77927
- sg-extra'>${extr\
77928
- as}</div>` +\x0a\x09\x09\x09\
77929
- `${actions}${deb\
77930
- ug}` +\x0a\x09\x09\x09`</div\
77931
- >` +\x0a\x09\x09\x09`</div>`\
77932
- \x0a\x09\x09);\x0a\x09}\x0a\x0a\x09// Re\
77933
- nder one RenderB\
77934
- lock into HTML (\
77935
- may produce 1 or\
77936
- 2 messages \xe2\x80\x93 \
77937
- input and/or out\
77938
- put)\x0a\x09renderNode\
77939
- (block) {\x0a\x09\x09cons\
77940
- t parts = [];\x0a\x09\x09\
77941
- if (block && blo\
77942
- ck.input && bloc\
77943
- k.input.text) pa\
77944
- rts.push(this._r\
77945
- enderUser(block)\
77946
- );\x0a\x09\x09if (block &\
77947
- & block.output &\
77948
- & block.output.t\
77949
- ext) parts.push(\
77950
- this._renderBot(\
77951
- block));\x0a\x09\x09retur\
77952
- n parts.join('')\
77953
- ;\x0a\x09}\x0a\x0a\x09// Render\
77954
- array of blocks\
77955
- \x0a\x09renderNodes(bl\
77956
- ocks) {\x0a\x09\x09if (!A\
77957
- rray.isArray(blo\
77958
- cks)) return '';\
77959
- \x0a\x09\x09const out = [\
77960
- ];\x0a\x09\x09for (let i \
77961
- = 0; i < blocks.\
77962
- length; i++) {\x0a\x09\
77963
- \x09\x09const b = bloc\
77964
- ks[i] || null;\x0a\x09\
77965
- \x09\x09if (!b) contin\
77966
- ue;\x0a\x09\x09\x09out.push(\
77967
- this.renderNode(\
77968
- b));\x0a\x09\x09}\x0a\x09\x09retur\
77969
- n out.join('');\x0a\
77970
- \x09}\x0a}\
77687
+ d.uuid)}: ${entr\
77688
+ ies}</small></p>\
77689
+ `);\x0a\x09\x09\x09}\x0a\x09\x09\x09if (\
77690
+ rows.length) {\x0a\x09\
77691
+ \x09\x09\x09parts.push(`<\
77692
+ p>${icon}<small>\
77693
+ <b>${this._escap\
77694
+ eHtml(prefix)}:<\
77695
+ /b></small></p>`\
77696
+ );\x0a\x09\x09\x09\x09parts.pus\
77697
+ h(`<div class=\x22c\
77698
+ md\x22><p>${rows.jo\
77699
+ in('')}</p></div\
77700
+ >`);\x0a\x09\x09\x09}\x0a\x09\x09} el\
77701
+ se {\x0a\x09\x09\x09// backw\
77702
+ ard compat\x0a\x09\x09\x09co\
77703
+ nst docs_html = \
77704
+ extra && extra.d\
77705
+ ocs_html ? Strin\
77706
+ g(extra.docs_htm\
77707
+ l) : '';\x0a\x09\x09\x09if (\
77708
+ docs_html) parts\
77709
+ .push(docs_html)\
77710
+ ;\x0a\x09\x09}\x0a\x0a\x09\x09// plug\
77711
+ in-driven tool e\
77712
+ xtra HTML\x0a\x09\x09cons\
77713
+ t tool_extra_htm\
77714
+ l = extra && ext\
77715
+ ra.tool_extra_ht\
77716
+ ml ? String(extr\
77717
+ a.tool_extra_htm\
77718
+ l) : '';\x0a\x09\x09if (t\
77719
+ ool_extra_html) \
77720
+ parts.push(`<div\
77721
+ class=\x22msg-extr\
77722
+ a\x22>${tool_extra_\
77723
+ html}</div>`);\x0a\x0a\
77724
+ \x09\x09return parts.j\
77725
+ oin('');\x0a\x09}\x0a\x0a\x09//\
77726
+ Render message-\
77727
+ level actions\x0a\x09_\
77728
+ renderActions(bl\
77729
+ ock) {\x0a\x09\x09const e\
77730
+ xtra = block.ext\
77731
+ ra || {};\x0a\x09\x09cons\
77732
+ t actions = extr\
77733
+ a.actions || [];\
77734
+ \x0a\x09\x09if (!actions \
77735
+ || !actions.leng\
77736
+ th) return '';\x0a\x09\
77737
+ \x09const parts = a\
77738
+ ctions.map((a) =\
77739
+ > {\x0a\x09\x09\x09const hre\
77740
+ f = this._esc(a.\
77741
+ href || '#');\x0a\x09\x09\
77742
+ \x09const title = t\
77743
+ his._esc(a.title\
77744
+ || '');\x0a\x09\x09\x09cons\
77745
+ t icon = this._e\
77746
+ sc(a.icon || '')\
77747
+ ;\x0a\x09\x09\x09const id = \
77748
+ this._esc(a.id |\
77749
+ | block.id);\x0a\x09\x09\x09\
77750
+ return `<a href=\
77751
+ \x22${href}\x22 class=\
77752
+ \x22action-icon\x22 da\
77753
+ ta-id=\x22${id}\x22 ro\
77754
+ le=\x22button\x22><spa\
77755
+ n class=\x22cmd\x22><i\
77756
+ mg src=\x22${icon}\x22\
77757
+ class=\x22action-i\
77758
+ mg\x22 title=\x22${tit\
77759
+ le}\x22 alt=\x22${titl\
77760
+ e}\x22 data-id=\x22${i\
77761
+ d}\x22></span></a>`\
77762
+ ;\x0a\x09\x09});\x0a\x09\x09return\
77763
+ `<div class=\x22ac\
77764
+ tion-icons\x22 data\
77765
+ -id=\x22${this._esc\
77766
+ (block.id)}\x22>${p\
77767
+ arts.join('')}</\
77768
+ div>`;\x0a\x09}\x0a\x0a\x09// R\
77769
+ ender tool outpu\
77770
+ t wrapper (alway\
77771
+ s collapsed by d\
77772
+ efault; wrapper \
77773
+ visibility depen\
77774
+ ds on flag)\x0a\x09// \
77775
+ Inside class Nod\
77776
+ eTemplateEngine\x0a\
77777
+ \x09_renderToolOutp\
77778
+ utWrapper(block)\
77779
+ {\x0a\x09\x09const extra\
77780
+ = block.extra |\
77781
+ | {};\x0a\x0a\x09\x09// IMPO\
77782
+ RTANT: keep init\
77783
+ ial tool output \
77784
+ verbatim (HTML-r\
77785
+ eady).\x0a\x09\x09// Do N\
77786
+ OT HTML-escape h\
77787
+ ere \xe2\x80\x93 the host\
77788
+ already provide\
77789
+ s a safe/HTML-re\
77790
+ ady string.\x0a\x09\x09//\
77791
+ Escaping again \
77792
+ would double-enc\
77793
+ ode entities (e.\
77794
+ g. \x22 -> \x22), whic\
77795
+ h\x0a\x09\x09// caused vi\
77796
+ sible \x22\x22\x22 in the\
77797
+ UI instead of q\
77798
+ uotes.\x0a\x09\x09const t\
77799
+ ool_output_html \
77800
+ = (extra.tool_ou\
77801
+ tput != null) ? \
77802
+ String(extra.too\
77803
+ l_output) : '';\x0a\
77804
+ \x0a\x09\x09// Wrapper vi\
77805
+ sibility: show/h\
77806
+ ide based on too\
77807
+ l_output_visible\
77808
+ ...\x0a\x09\x09const wrap\
77809
+ perDisplay = (ex\
77810
+ tra.tool_output_\
77811
+ visible === true\
77812
+ ) ? '' : 'displa\
77813
+ y:none';\x0a\x0a\x09\x09cons\
77814
+ t toggleTitle = \
77815
+ (typeof trans !=\
77816
+ = 'undefined' &&\
77817
+ trans) ? trans(\
77818
+ 'action.cmd.expa\
77819
+ nd') : 'Expand';\
77820
+ \x0a\x09\x09const expIcon\
77821
+ = (typeof windo\
77822
+ w !== 'undefined\
77823
+ ' && window.ICON\
77824
+ _EXPAND) ? windo\
77825
+ w.ICON_EXPAND : \
77826
+ '';\x0a\x0a\x09\x09return (\x0a\
77827
+ \x09\x09\x09`<div class='\
77828
+ tool-output' sty\
77829
+ le='${wrapperDis\
77830
+ play}'>` +\x0a\x09\x09\x09`<\
77831
+ span class='togg\
77832
+ le-cmd-output' o\
77833
+ nclick='toggleTo\
77834
+ olOutput(${this.\
77835
+ _esc(block.id)})\
77836
+ ;' ` +\x0a\x09\x09\x09`title\
77837
+ ='${this._escape\
77838
+ Html(toggleTitle\
77839
+ )}' role='button\
77840
+ '>` +\x0a\x09\x09\x09`<img s\
77841
+ rc='${this._esc(\
77842
+ expIcon)}' width\
77843
+ ='25' height='25\
77844
+ ' valign='middle\
77845
+ '>` +\x0a\x09\x09\x09`</span\
77846
+ >` +\x0a\x09\x09\x09// Conte\
77847
+ nt is initially \
77848
+ collapsed. We in\
77849
+ tentionally do N\
77850
+ OT escape here,\x0a\
77851
+ \x09\x09\x09// to keep be\
77852
+ havior consisten\
77853
+ t with ToolOutpu\
77854
+ t.append/update \
77855
+ (HTML-in).\x0a\x09\x09\x09`<\
77856
+ div class='conte\
77857
+ nt' style='displ\
77858
+ ay:none' data-tr\
77859
+ usted='1'>${tool\
77860
+ _output_html}</d\
77861
+ iv>` +\x0a\x09\x09\x09`</div\
77862
+ >`\x0a\x09\x09);\x0a\x09}\x0a\x0a\x09// \
77863
+ Render bot messa\
77864
+ ge block (md-blo\
77865
+ ck-markdown)\x0a\x09_r\
77866
+ enderBot(block) \
77867
+ {\x0a\x09\x09const id = b\
77868
+ lock.id;\x0a\x09\x09const\
77869
+ out = block.out\
77870
+ put || {};\x0a\x09\x09con\
77871
+ st msgId = `msg-\
77872
+ bot-${id}`;\x0a\x0a\x09\x09/\
77873
+ / timestamps int\
77874
+ entionally disab\
77875
+ led on frontend\x0a\
77876
+ \x09\x09// let ts = ''\
77877
+ ;\x0a\x09\x09// if (out.t\
77878
+ imestamp) { ... \
77879
+ }\x0a\x0a\x09\x09const perso\
77880
+ nalize = !!(bloc\
77881
+ k && block.extra\
77882
+ && block.extra.\
77883
+ personalize === \
77884
+ true);\x0a\x09\x09const n\
77885
+ ameHeader = pers\
77886
+ onalize ? this._\
77887
+ nameHeader('bot'\
77888
+ , out.name || ''\
77889
+ , out.avatar_img\
77890
+ || null) : '';\x0a\
77891
+ \x0a\x09\x09const mdText \
77892
+ = this._escapeHt\
77893
+ ml(out.text || '\
77894
+ ');\x0a\x09\x09const tool\
77895
+ Wrap = this._ren\
77896
+ derToolOutputWra\
77897
+ pper(block);\x0a\x09\x09c\
77898
+ onst extras = th\
77899
+ is._renderExtras\
77900
+ (block);\x0a\x09\x09const\
77901
+ actions = (bloc\
77902
+ k.extra && block\
77903
+ .extra.footer_ic\
77904
+ ons) ? this._ren\
77905
+ derActions(block\
77906
+ ) : '';\x0a\x09\x09const \
77907
+ debug = (block.e\
77908
+ xtra && block.ex\
77909
+ tra.debug_html) \
77910
+ ? String(block.e\
77911
+ xtra.debug_html)\
77912
+ : '';\x0a\x0a\x09\x09return\
77913
+ (\x0a\x09\x09\x09`<div clas\
77914
+ s='msg-box msg-b\
77915
+ ot' id='${msgId}\
77916
+ '>` +\x0a\x09\x09\x09`${name\
77917
+ Header}` +\x0a\x09\x09\x09`<\
77918
+ div class='msg'>\
77919
+ ` +\x0a\x09\x09\x09`<div cla\
77920
+ ss='md-block' md\
77921
+ -block-markdown=\
77922
+ '1'>${mdText}</d\
77923
+ iv>` +\x0a\x09\x09\x09`<div \
77924
+ class='msg-tool-\
77925
+ extra'></div>` +\
77926
+ \x0a\x09\x09\x09`${toolWrap}\
77927
+ ` +\x0a\x09\x09\x09`<div cla\
77928
+ ss='msg-extra'>$\
77929
+ {extras}</div>` \
77930
+ +\x0a\x09\x09\x09`${actions}\
77931
+ ${debug}` +\x0a\x09\x09\x09`\
77932
+ </div>` +\x0a\x09\x09\x09`</\
77933
+ div>`\x0a\x09\x09);\x0a\x09}\x0a\x0a\x09\
77934
+ // Render one Re\
77935
+ nderBlock into H\
77936
+ TML (may produce\
77937
+ 1 or 2 messages\
77938
+ \xe2\x80\x93 input and/o\
77939
+ r output)\x0a\x09rende\
77940
+ rNode(block) {\x0a\x09\
77941
+ \x09const parts = [\
77942
+ ];\x0a\x09\x09if (block &\
77943
+ & block.input &&\
77944
+ block.input.tex\
77945
+ t) parts.push(th\
77946
+ is._renderUser(b\
77947
+ lock));\x0a\x09\x09if (bl\
77948
+ ock && block.out\
77949
+ put && block.out\
77950
+ put.text) parts.\
77951
+ push(this._rende\
77952
+ rBot(block));\x0a\x09\x09\
77953
+ return parts.joi\
77954
+ n('');\x0a\x09}\x0a\x0a\x09// R\
77955
+ ender array of b\
77956
+ locks\x0a\x09renderNod\
77957
+ es(blocks) {\x0a\x09\x09i\
77958
+ f (!Array.isArra\
77959
+ y(blocks)) retur\
77960
+ n '';\x0a\x09\x09const ou\
77961
+ t = [];\x0a\x09\x09for (l\
77962
+ et i = 0; i < bl\
77963
+ ocks.length; i++\
77964
+ ) {\x0a\x09\x09\x09const b =\
77965
+ blocks[i] || nu\
77966
+ ll;\x0a\x09\x09\x09if (!b) c\
77967
+ ontinue;\x0a\x09\x09\x09out.\
77968
+ push(this.render\
77969
+ Node(b));\x0a\x09\x09}\x0a\x09\x09\
77970
+ return out.join(\
77971
+ '');\x0a\x09}\x0a}\
77971
77972
  \x00\x00\x09J\
77972
77973
  /\
77973
77974
  / ==============\
@@ -113524,12 +113525,12 @@ r,r.macros=r.mac\
113524
113525
  ros||{},d(e,r)}}\
113525
113526
  (),i=i.default}(\
113526
113527
  )}));\
113527
- \x00\x03?\xc4\
113528
+ \x00\x03?\xd9\
113528
113529
  /\
113529
113530
  * app.min.js \xe2\x80\x94\
113530
113531
  generated on 20\
113531
- 25-09-28 09:12:3\
113532
- 3 by bin/minify_\
113532
+ 26-01-03 18:07:5\
113533
+ 0 by bin/minify_\
113533
113534
  js.py using rjsm\
113534
113535
  in */\x0a\x0a/* data/j\
113535
113536
  s/app/async.js *\
@@ -124813,2028 +124814,2029 @@ x\x22 title=\x22${url}\
124813
124814
  \x22>`+`<div class=\
124814
124815
  \x22img-outer\x22><div\
124815
124816
  class=\x22img-wrap\
124816
- per\x22><a href=\x22${\
124817
- url}\x22><img src=\x22\
124818
- ${path}\x22 class=\x22\
124819
- image\x22></a></div\
124820
- >`+`<a href=\x22${u\
124821
- rl}\x22 class=\x22titl\
124822
- e\x22>${this._escap\
124823
- eHtml(bn)}</a></\
124824
- div>`+`</div><br\
124825
- />`);}});}\x0aconst\
124826
- files=block.fil\
124827
- es||{};const kF=\
124828
- Object.keys(file\
124829
- s);if(kF.length)\
124817
+ per\x22><a href=\x22br\
124818
+ idge://open_imag\
124819
+ e/${path}\x22><img \
124820
+ src=\x22${path}\x22 cl\
124821
+ ass=\x22image\x22></a>\
124822
+ </div>`+`<a href\
124823
+ =\x22${url}\x22 class=\
124824
+ \x22title\x22>${this._\
124825
+ escapeHtml(bn)}<\
124826
+ /a></div>`+`</di\
124827
+ v><br/>`);}});}\x0a\
124828
+ const files=bloc\
124829
+ k.files||{};cons\
124830
+ t kF=Object.keys\
124831
+ (files);if(kF.le\
124832
+ ngth){const rows\
124833
+ =[];kF.forEach((\
124834
+ k)=>{const it=fi\
124835
+ les[k];if(!it)re\
124836
+ turn;const url=t\
124837
+ his._esc(it.url)\
124838
+ ;const path=this\
124839
+ ._esc(it.path);c\
124840
+ onst icon=(typeo\
124841
+ f window!=='unde\
124842
+ fined'&&window.I\
124843
+ CON_ATTACHMENTS)\
124844
+ ?`<img src=\x22${wi\
124845
+ ndow.ICON_ATTACH\
124846
+ MENTS}\x22 class=\x22e\
124847
+ xtra-src-icon\x22>`\
124848
+ :'';rows.push(`$\
124849
+ {icon} <b> [${k}\
124850
+ ] </b> <a href=\x22\
124851
+ ${url}\x22>${path}<\
124852
+ /a>`);});if(rows\
124853
+ .length)parts.pu\
124854
+ sh(`<div>${rows.\
124855
+ join(\x22<br/><br/>\
124856
+ \x22)}</div>`);}\x0aco\
124857
+ nst urls=block.u\
124858
+ rls||{};const kU\
124859
+ =Object.keys(url\
124860
+ s);if(kU.length)\
124830
124861
  {const rows=[];k\
124831
- F.forEach((k)=>{\
124832
- const it=files[k\
124833
- ];if(!it)return;\
124834
- const url=this._\
124835
- esc(it.url);cons\
124836
- t path=this._esc\
124837
- (it.path);const \
124838
- icon=(typeof win\
124839
- dow!=='undefined\
124840
- '&&window.ICON_A\
124841
- TTACHMENTS)?`<im\
124842
- g src=\x22${window.\
124843
- ICON_ATTACHMENTS\
124844
- }\x22 class=\x22extra-\
124845
- src-icon\x22>`:'';r\
124846
- ows.push(`${icon\
124847
- } <b> [${k}] </b\
124848
- > <a href=\x22${url\
124849
- }\x22>${path}</a>`)\
124850
- ;});if(rows.leng\
124851
- th)parts.push(`<\
124852
- div>${rows.join(\
124853
- \x22<br/><br/>\x22)}</\
124854
- div>`);}\x0aconst u\
124855
- rls=block.urls||\
124856
- {};const kU=Obje\
124857
- ct.keys(urls);if\
124858
- (kU.length){cons\
124859
- t rows=[];kU.for\
124860
- Each((k)=>{const\
124861
- it=urls[k];if(!\
124862
- it)return;const \
124863
- url=this._esc(it\
124864
- .url);const icon\
124865
- =(typeof window!\
124866
- =='undefined'&&w\
124867
- indow.ICON_URL)?\
124868
- `<img src=\x22${win\
124869
- dow.ICON_URL}\x22 c\
124870
- lass=\x22extra-src-\
124871
- icon\x22>`:'';rows.\
124872
- push(`${icon}<a \
124873
- href=\x22${url}\x22 ti\
124874
- tle=\x22${url}\x22>${u\
124875
- rl}</a> <small> \
124876
- [${k}] </small>`\
124877
- );});if(rows.len\
124878
- gth)parts.push(`\
124879
- <div>${rows.join\
124880
- (\x22<br/><br/>\x22)}<\
124881
- /div>`);}\x0aconst \
124882
- extra=block.extr\
124883
- a||{};const docs\
124884
- Raw=Array.isArra\
124885
- y(extra.docs)?ex\
124886
- tra.docs:null;if\
124887
- (docsRaw&&docsRa\
124888
- w.length){const \
124889
- icon=(typeof win\
124890
- dow!=='undefined\
124891
- '&&window.ICON_D\
124892
- B)?`<img src=\x22${\
124893
- window.ICON_DB}\x22\
124894
- class=\x22extra-sr\
124895
- c-icon\x22>`:'';con\
124896
- st prefix=(typeo\
124862
+ U.forEach((k)=>{\
124863
+ const it=urls[k]\
124864
+ ;if(!it)return;c\
124865
+ onst url=this._e\
124866
+ sc(it.url);const\
124867
+ icon=(typeof wi\
124868
+ ndow!=='undefine\
124869
+ d'&&window.ICON_\
124870
+ URL)?`<img src=\x22\
124871
+ ${window.ICON_UR\
124872
+ L}\x22 class=\x22extra\
124873
+ -src-icon\x22>`:'';\
124874
+ rows.push(`${ico\
124875
+ n}<a href=\x22${url\
124876
+ }\x22 title=\x22${url}\
124877
+ \x22>${url}</a> <sm\
124878
+ all> [${k}] </sm\
124879
+ all>`);});if(row\
124880
+ s.length)parts.p\
124881
+ ush(`<div>${rows\
124882
+ .join(\x22<br/><br/\
124883
+ >\x22)}</div>`);}\x0ac\
124884
+ onst extra=block\
124885
+ .extra||{};const\
124886
+ docsRaw=Array.i\
124887
+ sArray(extra.doc\
124888
+ s)?extra.docs:nu\
124889
+ ll;if(docsRaw&&d\
124890
+ ocsRaw.length){c\
124891
+ onst icon=(typeo\
124897
124892
  f window!=='unde\
124898
- fined'&&window.L\
124899
- OCALE_DOC_PREFIX\
124900
- )?String(window.\
124901
- LOCALE_DOC_PREFI\
124902
- X):'Doc:';const \
124903
- limit=3;const no\
124904
- rmalized=[];docs\
124905
- Raw.forEach((it)\
124906
- =>{if(!it||typeo\
124907
- f it!=='object')\
124908
- return;if('uuid'\
124909
- in it&&'meta'in \
124910
- it&&typeof it.me\
124911
- ta==='object'){n\
124912
- ormalized.push({\
124913
- uuid:String(it.u\
124914
- uid),meta:it.met\
124915
- a||{}});}else{co\
124916
- nst keys=Object.\
124917
- keys(it);if(keys\
124918
- .length===1){con\
124919
- st uuid=keys[0];\
124920
- const meta=it[uu\
124921
- id];if(meta&&typ\
124922
- eof meta==='obje\
124923
- ct'){normalized.\
124924
- push({uuid:Strin\
124925
- g(uuid),meta});}\
124926
- }}});const rows=\
124927
- [];for(let i=0;i\
124928
- <Math.min(limit,\
124929
- normalized.lengt\
124930
- h);i++){const d=\
124931
- normalized[i];co\
124932
- nst meta=d.meta|\
124933
- |{};const entrie\
124934
- s=Object.keys(me\
124935
- ta).map(k=>`<b>$\
124936
- {this._escapeHtm\
124937
- l(k)}:</b> ${thi\
124938
- s._escapeHtml(St\
124939
- ring(meta[k]))}`\
124940
- ).join(', ');row\
124941
- s.push(`<p><smal\
124942
- l>[${i + 1}] ${t\
124943
- his._escapeHtml(\
124944
- d.uuid)}: ${entr\
124945
- ies}</small></p>\
124946
- `);}\x0aif(rows.len\
124947
- gth){parts.push(\
124948
- `<p>${icon}<smal\
124949
- l><b>${this._esc\
124950
- apeHtml(prefix)}\
124951
- :</b></small></p\
124952
- >`);parts.push(`\
124953
- <div class=\x22cmd\x22\
124954
- ><p>${rows.join(\
124955
- '')}</p></div>`)\
124956
- ;}}else{const do\
124957
- cs_html=extra&&e\
124958
- xtra.docs_html?S\
124959
- tring(extra.docs\
124960
- _html):'';if(doc\
124961
- s_html)parts.pus\
124962
- h(docs_html);}\x0ac\
124963
- onst tool_extra_\
124964
- html=extra&&extr\
124965
- a.tool_extra_htm\
124966
- l?String(extra.t\
124967
- ool_extra_html):\
124968
- '';if(tool_extra\
124969
- _html)parts.push\
124970
- (`<div class=\x22ms\
124971
- g-extra\x22>${tool_\
124972
- extra_html}</div\
124973
- >`);return parts\
124974
- .join('');}\x0a_ren\
124975
- derActions(block\
124976
- ){const extra=bl\
124977
- ock.extra||{};co\
124978
- nst actions=extr\
124979
- a.actions||[];if\
124980
- (!actions||!acti\
124981
- ons.length)retur\
124982
- n'';const parts=\
124983
- actions.map((a)=\
124984
- >{const href=thi\
124985
- s._esc(a.href||'\
124986
- #');const title=\
124987
- this._esc(a.titl\
124988
- e||'');const ico\
124989
- n=this._esc(a.ic\
124990
- on||'');const id\
124991
- =this._esc(a.id|\
124992
- |block.id);retur\
124993
- n`<a href=\x22${hre\
124994
- f}\x22 class=\x22actio\
124995
- n-icon\x22 data-id=\
124996
- \x22${id}\x22 role=\x22bu\
124997
- tton\x22><span clas\
124998
- s=\x22cmd\x22><img src\
124999
- =\x22${icon}\x22 class\
125000
- =\x22action-img\x22 ti\
125001
- tle=\x22${title}\x22 a\
125002
- lt=\x22${title}\x22 da\
125003
- ta-id=\x22${id}\x22></\
125004
- span></a>`;});re\
125005
- turn`<div class=\
125006
- \x22action-icons\x22 d\
125007
- ata-id=\x22${this._\
125008
- esc(block.id)}\x22>\
125009
- ${parts.join('')\
125010
- }</div>`;}\x0a_rend\
125011
- erToolOutputWrap\
125012
- per(block){const\
125013
- extra=block.ext\
125014
- ra||{};const too\
125015
- l_output_html=(e\
125016
- xtra.tool_output\
125017
- !=null)?String(e\
125018
- xtra.tool_output\
125019
- ):'';const wrapp\
125020
- erDisplay=(extra\
125021
- .tool_output_vis\
125022
- ible===true)?'':\
125023
- 'display:none';c\
125024
- onst toggleTitle\
125025
- =(typeof trans!=\
125026
- ='undefined'&&tr\
125027
- ans)?trans('acti\
125028
- on.cmd.expand'):\
125029
- 'Expand';const e\
125030
- xpIcon=(typeof w\
125031
- indow!=='undefin\
125032
- ed'&&window.ICON\
125033
- _EXPAND)?window.\
125034
- ICON_EXPAND:'';r\
125035
- eturn(`<div clas\
125036
- s='tool-output' \
125037
- style='${wrapper\
125038
- Display}'>`+`<sp\
125039
- an class='toggle\
125040
- -cmd-output' onc\
125041
- lick='toggleTool\
125042
- Output(${this._e\
125043
- sc(block.id)});'\
125044
- `+`title='${thi\
125045
- s._escapeHtml(to\
125046
- ggleTitle)}' rol\
125047
- e='button'>`+`<i\
125048
- mg src='${this._\
125049
- esc(expIcon)}' w\
125050
- idth='25' height\
125051
- ='25' valign='mi\
125052
- ddle'>`+`</span>\
125053
- `+`<div class='c\
125054
- ontent' style='d\
125055
- isplay:none' dat\
125056
- a-trusted='1'>${\
125057
- tool_output_html\
125058
- }</div>`+`</div>\
125059
- `);}\x0a_renderBot(\
125060
- block){const id=\
125061
- block.id;const o\
125062
- ut=block.output|\
125063
- |{};const msgId=\
125064
- `msg-bot-${id}`;\
125065
- const personaliz\
125066
- e=!!(block&&bloc\
125067
- k.extra&&block.e\
125068
- xtra.personalize\
125069
- ===true);const n\
125070
- ameHeader=person\
125071
- alize?this._name\
125072
- Header('bot',out\
125073
- .name||'',out.av\
125074
- atar_img||null):\
125075
- '';const mdText=\
125076
- this._escapeHtml\
125077
- (out.text||'');c\
125078
- onst toolWrap=th\
125079
- is._renderToolOu\
125080
- tputWrapper(bloc\
125081
- k);const extras=\
125082
- this._renderExtr\
125083
- as(block);const \
125084
- actions=(block.e\
125085
- xtra&&block.extr\
125086
- a.footer_icons)?\
125087
- this._renderActi\
125088
- ons(block):'';co\
125089
- nst debug=(block\
125090
- .extra&&block.ex\
125091
- tra.debug_html)?\
125092
- String(block.ext\
125093
- ra.debug_html):'\
125094
- ';return(`<div c\
125095
- lass='msg-box ms\
125096
- g-bot' id='${msg\
125097
- Id}'>`+`${nameHe\
125098
- ader}`+`<div cla\
125099
- ss='msg'>`+`<div\
125100
- class='md-block\
125101
- ' md-block-markd\
125102
- own='1'>${mdText\
125103
- }</div>`+`<div c\
125104
- lass='msg-tool-e\
125105
- xtra'></div>`+`$\
125106
- {toolWrap}`+`<di\
125107
- v class='msg-ext\
125108
- ra'>${extras}</d\
125109
- iv>`+`${actions}\
125110
- ${debug}`+`</div\
125111
- >`+`</div>`);}\x0ar\
125112
- enderNode(block)\
125113
- {const parts=[];\
125114
- if(block&&block.\
125115
- input&&block.inp\
125116
- ut.text)parts.pu\
125117
- sh(this._renderU\
125118
- ser(block));if(b\
125119
- lock&&block.outp\
125120
- ut&&block.output\
125121
- .text)parts.push\
125122
- (this._renderBot\
125123
- (block));return \
124893
+ fined'&&window.I\
124894
+ CON_DB)?`<img sr\
124895
+ c=\x22${window.ICON\
124896
+ _DB}\x22 class=\x22ext\
124897
+ ra-src-icon\x22>`:'\
124898
+ ';const prefix=(\
124899
+ typeof window!==\
124900
+ 'undefined'&&win\
124901
+ dow.LOCALE_DOC_P\
124902
+ REFIX)?String(wi\
124903
+ ndow.LOCALE_DOC_\
124904
+ PREFIX):'Doc:';c\
124905
+ onst limit=3;con\
124906
+ st normalized=[]\
124907
+ ;docsRaw.forEach\
124908
+ ((it)=>{if(!it||\
124909
+ typeof it!=='obj\
124910
+ ect')return;if('\
124911
+ uuid'in it&&'met\
124912
+ a'in it&&typeof \
124913
+ it.meta==='objec\
124914
+ t'){normalized.p\
124915
+ ush({uuid:String\
124916
+ (it.uuid),meta:i\
124917
+ t.meta||{}});}el\
124918
+ se{const keys=Ob\
124919
+ ject.keys(it);if\
124920
+ (keys.length===1\
124921
+ ){const uuid=key\
124922
+ s[0];const meta=\
124923
+ it[uuid];if(meta\
124924
+ &&typeof meta===\
124925
+ 'object'){normal\
124926
+ ized.push({uuid:\
124927
+ String(uuid),met\
124928
+ a});}}}});const \
124929
+ rows=[];for(let \
124930
+ i=0;i<Math.min(l\
124931
+ imit,normalized.\
124932
+ length);i++){con\
124933
+ st d=normalized[\
124934
+ i];const meta=d.\
124935
+ meta||{};const e\
124936
+ ntries=Object.ke\
124937
+ ys(meta).map(k=>\
124938
+ `<b>${this._esca\
124939
+ peHtml(k)}:</b> \
124940
+ ${this._escapeHt\
124941
+ ml(String(meta[k\
124942
+ ]))}`).join(', '\
124943
+ );rows.push(`<p>\
124944
+ <small>[${i + 1}\
124945
+ ] ${this._escape\
124946
+ Html(d.uuid)}: $\
124947
+ {entries}</small\
124948
+ ></p>`);}\x0aif(row\
124949
+ s.length){parts.\
124950
+ push(`<p>${icon}\
124951
+ <small><b>${this\
124952
+ ._escapeHtml(pre\
124953
+ fix)}:</b></smal\
124954
+ l></p>`);parts.p\
124955
+ ush(`<div class=\
124956
+ \x22cmd\x22><p>${rows.\
124957
+ join('')}</p></d\
124958
+ iv>`);}}else{con\
124959
+ st docs_html=ext\
124960
+ ra&&extra.docs_h\
124961
+ tml?String(extra\
124962
+ .docs_html):'';i\
124963
+ f(docs_html)part\
124964
+ s.push(docs_html\
124965
+ );}\x0aconst tool_e\
124966
+ xtra_html=extra&\
124967
+ &extra.tool_extr\
124968
+ a_html?String(ex\
124969
+ tra.tool_extra_h\
124970
+ tml):'';if(tool_\
124971
+ extra_html)parts\
124972
+ .push(`<div clas\
124973
+ s=\x22msg-extra\x22>${\
124974
+ tool_extra_html}\
124975
+ </div>`);return \
125124
124976
  parts.join('');}\
125125
- \x0arenderNodes(blo\
125126
- cks){if(!Array.i\
125127
- sArray(blocks))r\
125128
- eturn'';const ou\
125129
- t=[];for(let i=0\
125130
- ;i<blocks.length\
125131
- ;i++){const b=bl\
125132
- ocks[i]||null;if\
125133
- (!b)continue;out\
125134
- .push(this.rende\
125135
- rNode(b));}\x0aretu\
125136
- rn out.join('');\
125137
- }};\x0a\x0a/* data/js/\
125138
- app/tool.js */\x0ac\
125139
- lass ToolOutput{\
125140
- showLoader(){ret\
125141
- urn;}\x0ahideLoader\
125142
- (){const element\
125143
- s=document.query\
125144
- SelectorAll('.ms\
125145
- g-bot');if(eleme\
125146
- nts.length>0)ele\
125147
- ments.forEach(el\
125148
- =>{const s=el.qu\
125149
- erySelector('.sp\
125150
- inner');if(s)s.s\
125151
- tyle.display='no\
125152
- ne';});}\x0abegin()\
125153
- {this.showLoader\
125154
- ();}\x0aend(){this.\
125155
- hideLoader();}\x0ae\
125156
- nable(){const el\
125157
- s=document.query\
125158
- SelectorAll('.to\
125159
- ol-output');if(e\
125160
- ls.length)els[el\
125161
- s.length-1].styl\
125162
- e.display='block\
125163
- ';}\x0adisable(){co\
124977
+ \x0a_renderActions(\
124978
+ block){const ext\
124979
+ ra=block.extra||\
124980
+ {};const actions\
124981
+ =extra.actions||\
124982
+ [];if(!actions||\
124983
+ !actions.length)\
124984
+ return'';const p\
124985
+ arts=actions.map\
124986
+ ((a)=>{const hre\
124987
+ f=this._esc(a.hr\
124988
+ ef||'#');const t\
124989
+ itle=this._esc(a\
124990
+ .title||'');cons\
124991
+ t icon=this._esc\
124992
+ (a.icon||'');con\
124993
+ st id=this._esc(\
124994
+ a.id||block.id);\
124995
+ return`<a href=\x22\
124996
+ ${href}\x22 class=\x22\
124997
+ action-icon\x22 dat\
124998
+ a-id=\x22${id}\x22 rol\
124999
+ e=\x22button\x22><span\
125000
+ class=\x22cmd\x22><im\
125001
+ g src=\x22${icon}\x22 \
125002
+ class=\x22action-im\
125003
+ g\x22 title=\x22${titl\
125004
+ e}\x22 alt=\x22${title\
125005
+ }\x22 data-id=\x22${id\
125006
+ }\x22></span></a>`;\
125007
+ });return`<div c\
125008
+ lass=\x22action-ico\
125009
+ ns\x22 data-id=\x22${t\
125010
+ his._esc(block.i\
125011
+ d)}\x22>${parts.joi\
125012
+ n('')}</div>`;}\x0a\
125013
+ _renderToolOutpu\
125014
+ tWrapper(block){\
125015
+ const extra=bloc\
125016
+ k.extra||{};cons\
125017
+ t tool_output_ht\
125018
+ ml=(extra.tool_o\
125019
+ utput!=null)?Str\
125020
+ ing(extra.tool_o\
125021
+ utput):'';const \
125022
+ wrapperDisplay=(\
125023
+ extra.tool_outpu\
125024
+ t_visible===true\
125025
+ )?'':'display:no\
125026
+ ne';const toggle\
125027
+ Title=(typeof tr\
125028
+ ans!=='undefined\
125029
+ '&&trans)?trans(\
125030
+ 'action.cmd.expa\
125031
+ nd'):'Expand';co\
125032
+ nst expIcon=(typ\
125033
+ eof window!=='un\
125034
+ defined'&&window\
125035
+ .ICON_EXPAND)?wi\
125036
+ ndow.ICON_EXPAND\
125037
+ :'';return(`<div\
125038
+ class='tool-out\
125039
+ put' style='${wr\
125040
+ apperDisplay}'>`\
125041
+ +`<span class='t\
125042
+ oggle-cmd-output\
125043
+ ' onclick='toggl\
125044
+ eToolOutput(${th\
125045
+ is._esc(block.id\
125046
+ )});' `+`title='\
125047
+ ${this._escapeHt\
125048
+ ml(toggleTitle)}\
125049
+ ' role='button'>\
125050
+ `+`<img src='${t\
125051
+ his._esc(expIcon\
125052
+ )}' width='25' h\
125053
+ eight='25' valig\
125054
+ n='middle'>`+`</\
125055
+ span>`+`<div cla\
125056
+ ss='content' sty\
125057
+ le='display:none\
125058
+ ' data-trusted='\
125059
+ 1'>${tool_output\
125060
+ _html}</div>`+`<\
125061
+ /div>`);}\x0a_rende\
125062
+ rBot(block){cons\
125063
+ t id=block.id;co\
125064
+ nst out=block.ou\
125065
+ tput||{};const m\
125066
+ sgId=`msg-bot-${\
125067
+ id}`;const perso\
125068
+ nalize=!!(block&\
125069
+ &block.extra&&bl\
125070
+ ock.extra.person\
125071
+ alize===true);co\
125072
+ nst nameHeader=p\
125073
+ ersonalize?this.\
125074
+ _nameHeader('bot\
125075
+ ',out.name||'',o\
125076
+ ut.avatar_img||n\
125077
+ ull):'';const md\
125078
+ Text=this._escap\
125079
+ eHtml(out.text||\
125080
+ '');const toolWr\
125081
+ ap=this._renderT\
125082
+ oolOutputWrapper\
125083
+ (block);const ex\
125084
+ tras=this._rende\
125085
+ rExtras(block);c\
125086
+ onst actions=(bl\
125087
+ ock.extra&&block\
125088
+ .extra.footer_ic\
125089
+ ons)?this._rende\
125090
+ rActions(block):\
125091
+ '';const debug=(\
125092
+ block.extra&&blo\
125093
+ ck.extra.debug_h\
125094
+ tml)?String(bloc\
125095
+ k.extra.debug_ht\
125096
+ ml):'';return(`<\
125097
+ div class='msg-b\
125098
+ ox msg-bot' id='\
125099
+ ${msgId}'>`+`${n\
125100
+ ameHeader}`+`<di\
125101
+ v class='msg'>`+\
125102
+ `<div class='md-\
125103
+ block' md-block-\
125104
+ markdown='1'>${m\
125105
+ dText}</div>`+`<\
125106
+ div class='msg-t\
125107
+ ool-extra'></div\
125108
+ >`+`${toolWrap}`\
125109
+ +`<div class='ms\
125110
+ g-extra'>${extra\
125111
+ s}</div>`+`${act\
125112
+ ions}${debug}`+`\
125113
+ </div>`+`</div>`\
125114
+ );}\x0arenderNode(b\
125115
+ lock){const part\
125116
+ s=[];if(block&&b\
125117
+ lock.input&&bloc\
125118
+ k.input.text)par\
125119
+ ts.push(this._re\
125120
+ nderUser(block))\
125121
+ ;if(block&&block\
125122
+ .output&&block.o\
125123
+ utput.text)parts\
125124
+ .push(this._rend\
125125
+ erBot(block));re\
125126
+ turn parts.join(\
125127
+ '');}\x0arenderNode\
125128
+ s(blocks){if(!Ar\
125129
+ ray.isArray(bloc\
125130
+ ks))return'';con\
125131
+ st out=[];for(le\
125132
+ t i=0;i<blocks.l\
125133
+ ength;i++){const\
125134
+ b=blocks[i]||nu\
125135
+ ll;if(!b)continu\
125136
+ e;out.push(this.\
125137
+ renderNode(b));}\
125138
+ \x0areturn out.join\
125139
+ ('');}};\x0a\x0a/* dat\
125140
+ a/js/app/tool.js\
125141
+ */\x0aclass ToolOu\
125142
+ tput{showLoader(\
125143
+ ){return;}\x0ahideL\
125144
+ oader(){const el\
125145
+ ements=document.\
125146
+ querySelectorAll\
125147
+ ('.msg-bot');if(\
125148
+ elements.length>\
125149
+ 0)elements.forEa\
125150
+ ch(el=>{const s=\
125151
+ el.querySelector\
125152
+ ('.spinner');if(\
125153
+ s)s.style.displa\
125154
+ y='none';});}\x0abe\
125155
+ gin(){this.showL\
125156
+ oader();}\x0aend(){\
125157
+ this.hideLoader(\
125158
+ );}\x0aenable(){con\
125159
+ st els=document.\
125160
+ querySelectorAll\
125161
+ ('.tool-output')\
125162
+ ;if(els.length)e\
125163
+ ls[els.length-1]\
125164
+ .style.display='\
125165
+ block';}\x0adisable\
125166
+ (){const els=doc\
125167
+ ument.querySelec\
125168
+ torAll('.tool-ou\
125169
+ tput');if(els.le\
125170
+ ngth)els[els.len\
125171
+ gth-1].style.dis\
125172
+ play='none';}\x0aap\
125173
+ pend(content){th\
125174
+ is.hideLoader();\
125175
+ this.enable();co\
125164
125176
  nst els=document\
125165
125177
  .querySelectorAl\
125166
125178
  l('.tool-output'\
125167
125179
  );if(els.length)\
125168
- els[els.length-1\
125169
- ].style.display=\
125170
- 'none';}\x0aappend(\
125171
- content){this.hi\
125172
- deLoader();this.\
125173
- enable();const e\
125174
- ls=document.quer\
125175
- ySelectorAll('.t\
125176
- ool-output');if(\
125177
- els.length){cons\
125178
- t contentEl=els[\
125179
- els.length-1].qu\
125180
- erySelector('.co\
125181
- ntent');if(conte\
125182
- ntEl)contentEl.i\
125183
- nsertAdjacentHTM\
125184
- L('beforeend',co\
125185
- ntent);}}\x0aupdate\
125186
- (content){this.h\
125187
- ideLoader();this\
125188
- .enable();const \
125189
- els=document.que\
125190
- rySelectorAll('.\
125191
- tool-output');if\
125192
- (els.length){con\
125193
- st contentEl=els\
125194
- [els.length-1].q\
125195
- uerySelector('.c\
125196
- ontent');if(cont\
125197
- entEl)contentEl.\
125198
- innerHTML=conten\
125199
- t;}}\x0aclear(){thi\
125200
- s.hideLoader();t\
125201
- his.enable();con\
125202
- st els=document.\
125203
- querySelectorAll\
125204
- ('.tool-output')\
125205
- ;if(els.length){\
125206
- const contentEl=\
125207
- els[els.length-1\
125208
- ].querySelector(\
125209
- '.content');if(c\
125210
- ontentEl)content\
125211
- El.replaceChildr\
125212
- en();}}\x0atoggle(i\
125213
- d){const el=docu\
125214
- ment.getElementB\
125215
- yId('msg-bot-'+i\
125216
- d);if(!el)return\
125217
- ;const outputEl=\
125218
- el.querySelector\
125219
- ('.tool-output')\
125220
- ;if(!outputEl)re\
125221
- turn;const conte\
125222
- ntEl=outputEl.qu\
125223
- erySelector('.co\
125224
- ntent');if(conte\
125225
- ntEl)contentEl.s\
125226
- tyle.display=(co\
125227
- ntentEl.style.di\
125228
- splay==='none')?\
125229
- 'block':'none';c\
125230
- onst toggleEl=ou\
125231
- tputEl.querySele\
125232
- ctor('.toggle-cm\
125233
- d-output img');i\
125234
- f(toggleEl)toggl\
125235
- eEl.classList.to\
125236
- ggle('toggle-exp\
125237
- anded');}};\x0a\x0a/* \
125238
- data/js/app/ui.j\
125239
- s */\x0aclass UIMan\
125240
- ager{updateCSS(s\
125241
- tyles){let style\
125180
+ {const contentEl\
125181
+ =els[els.length-\
125182
+ 1].querySelector\
125183
+ ('.content');if(\
125184
+ contentEl)conten\
125185
+ tEl.insertAdjace\
125186
+ ntHTML('beforeen\
125187
+ d',content);}}\x0au\
125188
+ pdate(content){t\
125189
+ his.hideLoader()\
125190
+ ;this.enable();c\
125191
+ onst els=documen\
125192
+ t.querySelectorA\
125193
+ ll('.tool-output\
125194
+ ');if(els.length\
125195
+ ){const contentE\
125196
+ l=els[els.length\
125197
+ -1].querySelecto\
125198
+ r('.content');if\
125199
+ (contentEl)conte\
125200
+ ntEl.innerHTML=c\
125201
+ ontent;}}\x0aclear(\
125202
+ ){this.hideLoade\
125203
+ r();this.enable(\
125204
+ );const els=docu\
125205
+ ment.querySelect\
125206
+ orAll('.tool-out\
125207
+ put');if(els.len\
125208
+ gth){const conte\
125209
+ ntEl=els[els.len\
125210
+ gth-1].querySele\
125211
+ ctor('.content')\
125212
+ ;if(contentEl)co\
125213
+ ntentEl.replaceC\
125214
+ hildren();}}\x0atog\
125215
+ gle(id){const el\
125242
125216
  =document.getEle\
125243
- mentById('app-st\
125244
- yle');if(!style)\
125245
- {style=document.\
125246
- createElement('s\
125247
- tyle');style.id=\
125248
- 'app-style';docu\
125249
- ment.head.append\
125250
- Child(style);}\x0as\
125251
- tyle.textContent\
125252
- =styles;}\x0aensure\
125253
- StickyHeaderStyl\
125254
- e(){let style=do\
125255
- cument.getElemen\
125256
- tById('code-stic\
125257
- ky-style');if(st\
125258
- yle)return;style\
125259
- =document.create\
125260
- Element('style')\
125261
- ;style.id='code-\
125262
- sticky-style';st\
125263
- yle.textContent=\
125264
- ['.code-wrapper \
125265
- { position: rela\
125266
- tive; }','.code-\
125267
- wrapper .code-he\
125268
- ader-wrapper { p\
125269
- osition: sticky;\
125270
- top: var(--code\
125271
- -header-sticky-t\
125272
- op, -2px); z-ind\
125273
- ex: 2; box-shado\
125274
- w: 0 1px 0 rgba(\
125275
- 0,0,0,.06); }','\
125276
- .code-wrapper pr\
125277
- e { overflow: vi\
125278
- sible; margin-to\
125279
- p: 0; }','.code-\
125280
- wrapper pre code\
125281
- { display: bloc\
125282
- k; white-space: \
125283
- pre; max-height:\
125284
- 100dvh; overflo\
125285
- w: auto;',' ove\
125286
- rscroll-behavior\
125287
- : contain; -webk\
125288
- it-overflow-scro\
125289
- lling: touch; ov\
125290
- erflow-anchor: n\
125291
- one; scrollbar-g\
125292
- utter: stable bo\
125293
- th-edges; scroll\
125294
- -behavior: auto;\
125295
- }','#_loader_.h\
125296
- idden { display:\
125297
- none !important\
125298
- ; visibility: hi\
125299
- dden !important;\
125300
- }','#_loader_.v\
125301
- isible { display\
125302
- : block; visibil\
125303
- ity: visible; }'\
125217
+ mentById('msg-bo\
125218
+ t-'+id);if(!el)r\
125219
+ eturn;const outp\
125220
+ utEl=el.querySel\
125221
+ ector('.tool-out\
125222
+ put');if(!output\
125223
+ El)return;const \
125224
+ contentEl=output\
125225
+ El.querySelector\
125226
+ ('.content');if(\
125227
+ contentEl)conten\
125228
+ tEl.style.displa\
125229
+ y=(contentEl.sty\
125230
+ le.display==='no\
125231
+ ne')?'block':'no\
125232
+ ne';const toggle\
125233
+ El=outputEl.quer\
125234
+ ySelector('.togg\
125235
+ le-cmd-output im\
125236
+ g');if(toggleEl)\
125237
+ toggleEl.classLi\
125238
+ st.toggle('toggl\
125239
+ e-expanded');}};\
125240
+ \x0a\x0a/* data/js/app\
125241
+ /ui.js */\x0aclass \
125242
+ UIManager{update\
125243
+ CSS(styles){let \
125244
+ style=document.g\
125245
+ etElementById('a\
125246
+ pp-style');if(!s\
125247
+ tyle){style=docu\
125248
+ ment.createEleme\
125249
+ nt('style');styl\
125250
+ e.id='app-style'\
125251
+ ;document.head.a\
125252
+ ppendChild(style\
125253
+ );}\x0astyle.textCo\
125254
+ ntent=styles;}\x0ae\
125255
+ nsureStickyHeade\
125256
+ rStyle(){let sty\
125257
+ le=document.getE\
125258
+ lementById('code\
125259
+ -sticky-style');\
125260
+ if(style)return;\
125261
+ style=document.c\
125262
+ reateElement('st\
125263
+ yle');style.id='\
125264
+ code-sticky-styl\
125265
+ e';style.textCon\
125266
+ tent=['.code-wra\
125267
+ pper { position:\
125268
+ relative; }','.\
125269
+ code-wrapper .co\
125270
+ de-header-wrappe\
125271
+ r { position: st\
125272
+ icky; top: var(-\
125273
+ -code-header-sti\
125274
+ cky-top, -2px); \
125275
+ z-index: 2; box-\
125276
+ shadow: 0 1px 0 \
125277
+ rgba(0,0,0,.06);\
125278
+ }','.code-wrapp\
125279
+ er pre { overflo\
125280
+ w: visible; marg\
125281
+ in-top: 0; }','.\
125282
+ code-wrapper pre\
125283
+ code { display:\
125284
+ block; white-sp\
125285
+ ace: pre; max-he\
125286
+ ight: 100dvh; ov\
125287
+ erflow: auto;','\
125288
+ overscroll-beh\
125289
+ avior: contain; \
125290
+ -webkit-overflow\
125291
+ -scrolling: touc\
125292
+ h; overflow-anch\
125293
+ or: none; scroll\
125294
+ bar-gutter: stab\
125295
+ le both-edges; s\
125296
+ croll-behavior: \
125297
+ auto; }','#_load\
125298
+ er_.hidden { dis\
125299
+ play: none !impo\
125300
+ rtant; visibilit\
125301
+ y: hidden !impor\
125302
+ tant; }','#_load\
125303
+ er_.visible { di\
125304
+ splay: block; vi\
125305
+ sibility: visibl\
125306
+ e; }','.msg-box.\
125307
+ msg-user .msg { \
125308
+ position: relati\
125309
+ ve; }','.msg-box\
125310
+ .msg-user .msg >\
125311
+ .uc-content { d\
125312
+ isplay: block; o\
125313
+ verflow: visible\
125314
+ ; }','.msg-box.m\
125315
+ sg-user .msg > .\
125316
+ uc-content.uc-co\
125317
+ llapsed {',' ma\
125318
+ x-height: var(--\
125319
+ user-msg-collaps\
125320
+ e-max-h, 1000px)\
125321
+ ;',' overflow: \
125322
+ hidden;',' -web\
125323
+ kit-mask-image: \
125324
+ linear-gradient(\
125325
+ to bottom, rgba(\
125326
+ 0,0,0,1) calc(10\
125327
+ 0% - var(--uc-fa\
125328
+ de-height, 64px)\
125329
+ ), rgba(0,0,0,0)\
125330
+ 100%);',' mask\
125331
+ -image: linear-g\
125332
+ radient(to botto\
125333
+ m, rgba(0,0,0,1)\
125334
+ calc(100% - var\
125335
+ (--uc-fade-heigh\
125336
+ t, 64px)), rgba(\
125337
+ 0,0,0,0) 100%);'\
125338
+ ,' -webkit-mask\
125339
+ -size: 100% 100%\
125340
+ ;',' mask-size:\
125341
+ 100% 100%;',' \
125342
+ -webkit-mask-rep\
125343
+ eat: no-repeat;'\
125344
+ ,' mask-repeat:\
125345
+ no-repeat;','}'\
125304
125346
  ,'.msg-box.msg-u\
125305
- ser .msg { posit\
125306
- ion: relative; }\
125347
+ ser .msg > .uc-c\
125348
+ ontent.uc-expand\
125349
+ ed {',' -webkit\
125350
+ -mask-image: non\
125351
+ e;',' mask-imag\
125352
+ e: none;','}','.\
125353
+ msg-box.msg-user\
125354
+ .msg > .uc-togg\
125355
+ le { display: no\
125356
+ ne; margin-top: \
125357
+ 8px; text-align:\
125358
+ center; cursor:\
125359
+ pointer; user-s\
125360
+ elect: none; }',\
125361
+ '.msg-box.msg-us\
125362
+ er .msg > .uc-to\
125363
+ ggle.visible { d\
125364
+ isplay: block; }\
125307
125365
  ','.msg-box.msg-\
125308
125366
  user .msg > .uc-\
125309
- content { displa\
125310
- y: block; overfl\
125311
- ow: visible; }',\
125367
+ toggle img { wid\
125368
+ th: var(--uc-tog\
125369
+ gle-icon-size, 2\
125370
+ 6px); height: va\
125371
+ r(--uc-toggle-ic\
125372
+ on-size, 26px); \
125373
+ opacity: .8; }',\
125312
125374
  '.msg-box.msg-us\
125313
- er .msg > .uc-co\
125314
- ntent.uc-collaps\
125315
- ed {',' max-hei\
125316
- ght: var(--user-\
125317
- msg-collapse-max\
125318
- -h, 1000px);',' \
125319
- overflow: hidde\
125320
- n;',' -webkit-m\
125321
- ask-image: linea\
125322
- r-gradient(to bo\
125323
- ttom, rgba(0,0,0\
125324
- ,1) calc(100% - \
125325
- var(--uc-fade-he\
125326
- ight, 64px)), rg\
125327
- ba(0,0,0,0) 100%\
125328
- );',' mask-imag\
125329
- e: linear-gradie\
125330
- nt(to bottom, rg\
125331
- ba(0,0,0,1) calc\
125332
- (100% - var(--uc\
125333
- -fade-height, 64\
125334
- px)), rgba(0,0,0\
125335
- ,0) 100%);',' -\
125336
- webkit-mask-size\
125337
- : 100% 100%;',' \
125338
- mask-size: 100%\
125339
- 100%;',' -webk\
125340
- it-mask-repeat: \
125341
- no-repeat;',' m\
125342
- ask-repeat: no-r\
125343
- epeat;','}','.ms\
125344
- g-box.msg-user .\
125345
- msg > .uc-conten\
125346
- t.uc-expanded {'\
125347
- ,' -webkit-mask\
125348
- -image: none;','\
125349
- mask-image: no\
125350
- ne;','}','.msg-b\
125351
- ox.msg-user .msg\
125352
- > .uc-toggle { \
125353
- display: none; m\
125354
- argin-top: 8px; \
125355
- text-align: cent\
125356
- er; cursor: poin\
125357
- ter; user-select\
125358
- : none; }','.msg\
125359
- -box.msg-user .m\
125360
- sg > .uc-toggle.\
125361
- visible { displa\
125362
- y: block; }','.m\
125375
+ er .msg > .uc-to\
125376
+ ggle:hover img {\
125377
+ opacity: 1; }',\
125378
+ '.msg-box.msg-us\
125379
+ er .msg .msg-cop\
125380
+ y-btn { position\
125381
+ : absolute; top:\
125382
+ 2px; right: 0px\
125383
+ ; z-index: 3;','\
125384
+ opacity: 0; po\
125385
+ inter-events: no\
125386
+ ne; transition: \
125387
+ opacity .15s eas\
125388
+ e, transform .15\
125389
+ s ease, backgrou\
125390
+ nd-color .15s ea\
125391
+ se, border-color\
125392
+ .15s ease;',' \
125393
+ border-radius: 6\
125394
+ px; padding: 4px\
125395
+ ; line-height: 0\
125396
+ ; border: 1px so\
125397
+ lid transparent;\
125398
+ background: tra\
125399
+ nsparent; }','.m\
125363
125400
  sg-box.msg-user \
125364
- .msg > .uc-toggl\
125365
- e img { width: v\
125366
- ar(--uc-toggle-i\
125367
- con-size, 26px);\
125368
- height: var(--u\
125369
- c-toggle-icon-si\
125370
- ze, 26px); opaci\
125371
- ty: .8; }','.msg\
125372
- -box.msg-user .m\
125373
- sg > .uc-toggle:\
125374
- hover img { opac\
125375
- ity: 1; }','.msg\
125376
- -box.msg-user .m\
125377
- sg .msg-copy-btn\
125378
- { position: abs\
125379
- olute; top: 2px;\
125380
- right: 0px; z-i\
125381
- ndex: 3;',' opa\
125382
- city: 0; pointer\
125383
- -events: none; t\
125384
- ransition: opaci\
125385
- ty .15s ease, tr\
125386
- ansform .15s eas\
125387
- e, background-co\
125388
- lor .15s ease, b\
125389
- order-color .15s\
125390
- ease;',' borde\
125391
- r-radius: 6px; p\
125392
- adding: 4px; lin\
125393
- e-height: 0; bor\
125394
- der: 1px solid t\
125395
- ransparent; back\
125396
- ground: transpar\
125397
- ent; }','.msg-bo\
125398
- x.msg-user .msg:\
125399
- hover .msg-copy-\
125400
- btn, .msg-box.ms\
125401
- g-user .msg:focu\
125402
- s-within .msg-co\
125403
- py-btn { opacity\
125404
- : 1; pointer-eve\
125405
- nts: auto; }','.\
125406
- msg-box.msg-user\
125407
- .msg .msg-copy-\
125408
- btn:hover { tran\
125409
- sform: scale(1.0\
125410
- 6); background: \
125411
- var(--copy-btn-b\
125412
- g-hover, rgba(0,\
125413
- 0,0,.86)); borde\
125414
- r-color: var(--c\
125415
- opy-btn-border, \
125416
- rgba(0,0,0,.08))\
125417
- ; }','.msg-box.m\
125418
- sg-user .msg .ms\
125419
- g-copy-btn.copie\
125420
- d { background: \
125421
- var(--copy-btn-b\
125422
- g-copied, rgba(1\
125423
- 50,150,150,.12))\
125424
- ; border-color: \
125425
- var(--copy-btn-b\
125426
- order-copied, rg\
125427
- ba(150,150,150,.\
125428
- 35)); animation:\
125429
- msg-copy-pop .2\
125430
- 5s ease; }','.ms\
125431
- g-box.msg-user .\
125432
- msg .msg-copy-bt\
125433
- n img { display:\
125434
- block; width: 1\
125435
- 8px; height: 18p\
125436
- x; }','.code-wra\
125437
- pper .code-heade\
125438
- r-action.code-he\
125439
- ader-copy,','.co\
125440
- de-wrapper .code\
125441
- -header-action.c\
125442
- ode-header-colla\
125443
- pse { display: i\
125444
- nline-flex; alig\
125445
- n-items: center;\
125446
- border-radius: \
125447
- 6px; padding: 2p\
125448
- x; line-height: \
125449
- 0; border: 1px s\
125450
- olid transparent\
125451
- ; transition: tr\
125452
- ansform .15s eas\
125453
- e, background-co\
125454
- lor .15s ease, b\
125455
- order-color .15s\
125456
- ease; }','.code\
125457
- -wrapper .code-h\
125458
- eader-action.cod\
125459
- e-header-copy:ho\
125460
- ver,','.code-wra\
125461
- pper .code-heade\
125462
- r-action.code-he\
125463
- ader-collapse:ho\
125464
- ver { transform:\
125465
- scale(1.06); ba\
125466
- ckground: var(--\
125467
- copy-btn-bg-hove\
125468
- r, rgba(0,0,0,.7\
125469
- 6)); border-colo\
125470
- r: var(--copy-bt\
125471
- n-border, rgba(0\
125472
- ,0,0,.08)); }','\
125401
+ .msg:hover .msg-\
125402
+ copy-btn, .msg-b\
125403
+ ox.msg-user .msg\
125404
+ :focus-within .m\
125405
+ sg-copy-btn { op\
125406
+ acity: 1; pointe\
125407
+ r-events: auto; \
125408
+ }','.msg-box.msg\
125409
+ -user .msg .msg-\
125410
+ copy-btn:hover {\
125411
+ transform: scal\
125412
+ e(1.06); backgro\
125413
+ und: var(--copy-\
125414
+ btn-bg-hover, rg\
125415
+ ba(0,0,0,.86)); \
125416
+ border-color: va\
125417
+ r(--copy-btn-bor\
125418
+ der, rgba(0,0,0,\
125419
+ .08)); }','.msg-\
125420
+ box.msg-user .ms\
125421
+ g .msg-copy-btn.\
125422
+ copied { backgro\
125423
+ und: var(--copy-\
125424
+ btn-bg-copied, r\
125425
+ gba(150,150,150,\
125426
+ .12)); border-co\
125427
+ lor: var(--copy-\
125428
+ btn-border-copie\
125429
+ d, rgba(150,150,\
125430
+ 150,.35)); anima\
125431
+ tion: msg-copy-p\
125432
+ op .25s ease; }'\
125433
+ ,'.msg-box.msg-u\
125434
+ ser .msg .msg-co\
125435
+ py-btn img { dis\
125436
+ play: block; wid\
125437
+ th: 18px; height\
125438
+ : 18px; }','.cod\
125439
+ e-wrapper .code-\
125440
+ header-action.co\
125441
+ de-header-copy,'\
125442
+ ,'.code-wrapper \
125443
+ .code-header-act\
125444
+ ion.code-header-\
125445
+ collapse { displ\
125446
+ ay: inline-flex;\
125447
+ align-items: ce\
125448
+ nter; border-rad\
125449
+ ius: 6px; paddin\
125450
+ g: 2px; line-hei\
125451
+ ght: 0; border: \
125452
+ 1px solid transp\
125453
+ arent; transitio\
125454
+ n: transform .15\
125455
+ s ease, backgrou\
125456
+ nd-color .15s ea\
125457
+ se, border-color\
125458
+ .15s ease; }','\
125473
125459
  .code-wrapper .c\
125474
125460
  ode-header-actio\
125475
- n.copied { backg\
125476
- round: var(--cop\
125477
- y-btn-bg-copied,\
125478
- rgba(150,150,15\
125479
- 0,.12)); border-\
125480
- color: var(--cop\
125481
- y-btn-border-cop\
125482
- ied, rgba(150,15\
125483
- 0,150,.35)); ani\
125484
- mation: msg-copy\
125485
- -pop .25s ease; \
125486
- }','@keyframes m\
125487
- sg-copy-pop { 0%\
125461
+ n.code-header-co\
125462
+ py:hover,','.cod\
125463
+ e-wrapper .code-\
125464
+ header-action.co\
125465
+ de-header-collap\
125466
+ se:hover { trans\
125467
+ form: scale(1.06\
125468
+ ); background: v\
125469
+ ar(--copy-btn-bg\
125470
+ -hover, rgba(0,0\
125471
+ ,0,.76)); border\
125472
+ -color: var(--co\
125473
+ py-btn-border, r\
125474
+ gba(0,0,0,.08));\
125475
+ }','.code-wrapp\
125476
+ er .code-header-\
125477
+ action.copied { \
125478
+ background: var(\
125479
+ --copy-btn-bg-co\
125480
+ pied, rgba(150,1\
125481
+ 50,150,.12)); bo\
125482
+ rder-color: var(\
125483
+ --copy-btn-borde\
125484
+ r-copied, rgba(1\
125485
+ 50,150,150,.35))\
125486
+ ; animation: msg\
125487
+ -copy-pop .25s e\
125488
+ ase; }','@keyfra\
125489
+ mes msg-copy-pop\
125490
+ { 0%{ transform\
125491
+ : scale(1); } 60\
125492
+ %{ transform: sc\
125493
+ ale(1.1); } 100%\
125488
125494
  { transform: sca\
125489
- le(1); } 60%{ tr\
125490
- ansform: scale(1\
125491
- .1); } 100%{ tra\
125492
- nsform: scale(1)\
125493
- ; } }'].join('\x5cn\
125494
- ');document.head\
125495
- .appendChild(sty\
125496
- le);}\x0aenableEdit\
125497
- Icons(){document\
125498
- .body&&document.\
125499
- body.classList.a\
125500
- dd('display-edit\
125501
- -icons');}\x0adisab\
125502
- leEditIcons(){do\
125503
- cument.body&&doc\
125504
- ument.body.class\
125505
- List.remove('dis\
125506
- play-edit-icons'\
125507
- );}\x0aenableTimest\
125508
- amp(){document.b\
125509
- ody&&document.bo\
125510
- dy.classList.add\
125511
- ('display-timest\
125512
- amp');}\x0adisableT\
125495
+ le(1); } }'].joi\
125496
+ n('\x5cn');document\
125497
+ .head.appendChil\
125498
+ d(style);}\x0aenabl\
125499
+ eEditIcons(){doc\
125500
+ ument.body&&docu\
125501
+ ment.body.classL\
125502
+ ist.add('display\
125503
+ -edit-icons');}\x0a\
125504
+ disableEditIcons\
125505
+ (){document.body\
125506
+ &&document.body.\
125507
+ classList.remove\
125508
+ ('display-edit-i\
125509
+ cons');}\x0aenableT\
125513
125510
  imestamp(){docum\
125514
125511
  ent.body&&docume\
125515
125512
  nt.body.classLis\
125516
- t.remove('displa\
125517
- y-timestamp');}\x0a\
125518
- enableBlocks(){d\
125519
- ocument.body&&do\
125520
- cument.body.clas\
125521
- sList.add('displ\
125522
- ay-blocks');}\x0adi\
125523
- sableBlocks(){do\
125524
- cument.body&&doc\
125525
- ument.body.class\
125526
- List.remove('dis\
125527
- play-blocks');}}\
125528
- ;\x0a\x0a/* data/js/ap\
125529
- p/user.js */\x0acla\
125530
- ss UserCollapseM\
125531
- anager{construct\
125532
- or(cfg){this.cfg\
125533
- =cfg||{};this.th\
125534
- reshold=Utils.g(\
125535
- 'USER_MSG_COLLAP\
125536
- SE_HEIGHT_PX',10\
125537
- 00);this._proces\
125538
- sed=new Set();}\x0a\
125539
- _icons(){const I\
125540
- =(this.cfg&&this\
125541
- .cfg.ICONS)||{};\
125542
- return{expand:I.\
125543
- EXPAND||'',colla\
125544
- pse:I.COLLAPSE||\
125545
- ''};}\x0a_labels(){\
125546
- const L=(this.cf\
125547
- g&&this.cfg.LOCA\
125548
- LE)||{};return{e\
125549
- xpand:L.EXPAND||\
125550
- 'Expand',collaps\
125551
- e:L.COLLAPSE||'C\
125552
- ollapse'};}\x0a_aft\
125553
- erLayout(fn){try\
125554
- {if(typeof runti\
125555
- me!=='undefined'\
125556
- &&runtime.raf&&t\
125557
- ypeof runtime.ra\
125558
- f.schedule==='fu\
125559
- nction'){const k\
125560
- ey={t:'UC:afterL\
125561
- ayout',i:Math.ra\
125562
- ndom()};runtime.\
125563
- raf.schedule(key\
125564
- ,()=>{try{fn&&fn\
125565
- ();}catch(_){}},\
125566
- 'UserCollapse',0\
125567
- );return;}}catch\
125568
- (_){}\x0atry{reques\
125569
- tAnimationFrame(\
125570
- ()=>{try{fn&&fn(\
125571
- );}catch(_){}});\
125572
- }catch(_){setTim\
125573
- eout(()=>{try{fn\
125574
- &&fn();}catch(__\
125575
- ){}},0);}}\x0a_scro\
125576
- llToggleIntoView\
125577
- (toggleEl){if(!t\
125578
- oggleEl||!toggle\
125579
- El.isConnected)r\
125580
- eturn;try{if(run\
125581
- time&&runtime.sc\
125582
- rollMgr){runtime\
125583
- .scrollMgr.userI\
125584
- nteracted=true;r\
125585
- untime.scrollMgr\
125586
- .autoFollow=fals\
125587
- e;}}catch(_){}\x0at\
125588
- his._afterLayout\
125589
- (()=>{try{if(tog\
125590
- gleEl.scrollInto\
125591
- View){try{toggle\
125592
- El.scrollIntoVie\
125593
- w({block:'neares\
125594
- t',inline:'neare\
125595
- st',behavior:'in\
125596
- stant'});}catch(\
125597
- _){toggleEl.scro\
125598
- llIntoView(false\
125599
- );}}}catch(_){}}\
125600
- );}\x0a_ensureStruc\
125601
- ture(msg){if(!ms\
125602
- g||!msg.isConnec\
125603
- ted)return null;\
125604
- let content=msg.\
125605
- querySelector('.\
125606
- uc-content');if(\
125607
- !content){conten\
125608
- t=document.creat\
125609
- eElement('div');\
125610
- content.classNam\
125611
- e='uc-content';c\
125612
- onst frag=docume\
125613
- nt.createDocumen\
125614
- tFragment();whil\
125615
- e(msg.firstChild\
125616
- )frag.appendChil\
125617
- d(msg.firstChild\
125618
- );content.append\
125619
- Child(frag);msg.\
125620
- appendChild(cont\
125621
- ent);}\x0alet toggl\
125622
- e=msg.querySelec\
125623
- tor('.uc-toggle'\
125624
- );if(!toggle){co\
125625
- nst icons=this._\
125626
- icons();const la\
125627
- bels=this._label\
125628
- s();toggle=docum\
125629
- ent.createElemen\
125630
- t('div');toggle.\
125631
- className='uc-to\
125632
- ggle';toggle.tab\
125633
- Index=0;toggle.s\
125634
- etAttribute('rol\
125635
- e','button');tog\
125513
+ t.add('display-t\
125514
+ imestamp');}\x0adis\
125515
+ ableTimestamp(){\
125516
+ document.body&&d\
125517
+ ocument.body.cla\
125518
+ ssList.remove('d\
125519
+ isplay-timestamp\
125520
+ ');}\x0aenableBlock\
125521
+ s(){document.bod\
125522
+ y&&document.body\
125523
+ .classList.add('\
125524
+ display-blocks')\
125525
+ ;}\x0adisableBlocks\
125526
+ (){document.body\
125527
+ &&document.body.\
125528
+ classList.remove\
125529
+ ('display-blocks\
125530
+ ');}};\x0a\x0a/* data/\
125531
+ js/app/user.js *\
125532
+ /\x0aclass UserColl\
125533
+ apseManager{cons\
125534
+ tructor(cfg){thi\
125535
+ s.cfg=cfg||{};th\
125536
+ is.threshold=Uti\
125537
+ ls.g('USER_MSG_C\
125538
+ OLLAPSE_HEIGHT_P\
125539
+ X',1000);this._p\
125540
+ rocessed=new Set\
125541
+ ();}\x0a_icons(){co\
125542
+ nst I=(this.cfg&\
125543
+ &this.cfg.ICONS)\
125544
+ ||{};return{expa\
125545
+ nd:I.EXPAND||'',\
125546
+ collapse:I.COLLA\
125547
+ PSE||''};}\x0a_labe\
125548
+ ls(){const L=(th\
125549
+ is.cfg&&this.cfg\
125550
+ .LOCALE)||{};ret\
125551
+ urn{expand:L.EXP\
125552
+ AND||'Expand',co\
125553
+ llapse:L.COLLAPS\
125554
+ E||'Collapse'};}\
125555
+ \x0a_afterLayout(fn\
125556
+ ){try{if(typeof \
125557
+ runtime!=='undef\
125558
+ ined'&&runtime.r\
125559
+ af&&typeof runti\
125560
+ me.raf.schedule=\
125561
+ =='function'){co\
125562
+ nst key={t:'UC:a\
125563
+ fterLayout',i:Ma\
125564
+ th.random()};run\
125565
+ time.raf.schedul\
125566
+ e(key,()=>{try{f\
125567
+ n&&fn();}catch(_\
125568
+ ){}},'UserCollap\
125569
+ se',0);return;}}\
125570
+ catch(_){}\x0atry{r\
125571
+ equestAnimationF\
125572
+ rame(()=>{try{fn\
125573
+ &&fn();}catch(_)\
125574
+ {}});}catch(_){s\
125575
+ etTimeout(()=>{t\
125576
+ ry{fn&&fn();}cat\
125577
+ ch(__){}},0);}}\x0a\
125578
+ _scrollToggleInt\
125579
+ oView(toggleEl){\
125580
+ if(!toggleEl||!t\
125581
+ oggleEl.isConnec\
125582
+ ted)return;try{i\
125583
+ f(runtime&&runti\
125584
+ me.scrollMgr){ru\
125585
+ ntime.scrollMgr.\
125586
+ userInteracted=t\
125587
+ rue;runtime.scro\
125588
+ llMgr.autoFollow\
125589
+ =false;}}catch(_\
125590
+ ){}\x0athis._afterL\
125591
+ ayout(()=>{try{i\
125592
+ f(toggleEl.scrol\
125593
+ lIntoView){try{t\
125594
+ oggleEl.scrollIn\
125595
+ toView({block:'n\
125596
+ earest',inline:'\
125597
+ nearest',behavio\
125598
+ r:'instant'});}c\
125599
+ atch(_){toggleEl\
125600
+ .scrollIntoView(\
125601
+ false);}}}catch(\
125602
+ _){}});}\x0a_ensure\
125603
+ Structure(msg){i\
125604
+ f(!msg||!msg.isC\
125605
+ onnected)return \
125606
+ null;let content\
125607
+ =msg.querySelect\
125608
+ or('.uc-content'\
125609
+ );if(!content){c\
125610
+ ontent=document.\
125611
+ createElement('d\
125612
+ iv');content.cla\
125613
+ ssName='uc-conte\
125614
+ nt';const frag=d\
125615
+ ocument.createDo\
125616
+ cumentFragment()\
125617
+ ;while(msg.first\
125618
+ Child)frag.appen\
125619
+ dChild(msg.first\
125620
+ Child);content.a\
125621
+ ppendChild(frag)\
125622
+ ;msg.appendChild\
125623
+ (content);}\x0alet \
125624
+ toggle=msg.query\
125625
+ Selector('.uc-to\
125626
+ ggle');if(!toggl\
125627
+ e){const icons=t\
125628
+ his._icons();con\
125629
+ st labels=this._\
125630
+ labels();toggle=\
125631
+ document.createE\
125632
+ lement('div');to\
125633
+ ggle.className='\
125634
+ uc-toggle';toggl\
125635
+ e.tabIndex=0;tog\
125636
125636
  gle.setAttribute\
125637
- ('aria-expanded'\
125638
- ,'false');toggle\
125639
- .title=labels.ex\
125640
- pand;const img=d\
125641
- ocument.createEl\
125642
- ement('img');img\
125643
- .className='uc-t\
125644
- oggle-icon';img.\
125645
- alt=labels.expan\
125646
- d;img.src=icons.\
125647
- expand;img.width\
125648
- =26;img.height=2\
125649
- 6;toggle.appendC\
125650
- hild(img);toggle\
125651
- .addEventListene\
125652
- r('click',(ev)=>\
125653
- {ev.preventDefau\
125654
- lt();ev.stopProp\
125655
- agation();this.t\
125656
- oggleFromToggle(\
125657
- toggle);});toggl\
125658
- e.addEventListen\
125659
- er('keydown',(ev\
125660
- )=>{if(ev.key===\
125661
- 'Enter'||ev.key=\
125662
- ==' '){ev.preven\
125663
- tDefault();ev.st\
125664
- opPropagation();\
125665
- this.toggleFromT\
125666
- oggle(toggle);}}\
125667
- ,{passive:false}\
125668
- );msg.appendChil\
125669
- d(toggle);}\x0athis\
125670
- ._processed.add(\
125671
- msg);msg.dataset\
125672
- .ucInit='1';retu\
125673
- rn{content,toggl\
125674
- e};}\x0a_ensureElli\
125675
- psisEl(msg,conte\
125676
- ntEl){const cont\
125677
- ent=contentEl||(\
125637
+ ('role','button'\
125638
+ );toggle.setAttr\
125639
+ ibute('aria-expa\
125640
+ nded','false');t\
125641
+ oggle.title=labe\
125642
+ ls.expand;const \
125643
+ img=document.cre\
125644
+ ateElement('img'\
125645
+ );img.className=\
125646
+ 'uc-toggle-icon'\
125647
+ ;img.alt=labels.\
125648
+ expand;img.src=i\
125649
+ cons.expand;img.\
125650
+ width=26;img.hei\
125651
+ ght=26;toggle.ap\
125652
+ pendChild(img);t\
125653
+ oggle.addEventLi\
125654
+ stener('click',(\
125655
+ ev)=>{ev.prevent\
125656
+ Default();ev.sto\
125657
+ pPropagation();t\
125658
+ his.toggleFromTo\
125659
+ ggle(toggle);});\
125660
+ toggle.addEventL\
125661
+ istener('keydown\
125662
+ ',(ev)=>{if(ev.k\
125663
+ ey==='Enter'||ev\
125664
+ .key===' '){ev.p\
125665
+ reventDefault();\
125666
+ ev.stopPropagati\
125667
+ on();this.toggle\
125668
+ FromToggle(toggl\
125669
+ e);}},{passive:f\
125670
+ alse});msg.appen\
125671
+ dChild(toggle);}\
125672
+ \x0athis._processed\
125673
+ .add(msg);msg.da\
125674
+ taset.ucInit='1'\
125675
+ ;return{content,\
125676
+ toggle};}\x0a_ensur\
125677
+ eEllipsisEl(msg,\
125678
+ contentEl){const\
125679
+ content=content\
125680
+ El||(msg&&msg.qu\
125681
+ erySelector('.uc\
125682
+ -content'));if(!\
125683
+ content)return n\
125684
+ ull;try{const le\
125685
+ gacy=content.que\
125686
+ rySelector('.uc-\
125687
+ ellipsis');if(le\
125688
+ gacy&&legacy.par\
125689
+ entNode){legacy.\
125690
+ parentNode.remov\
125691
+ eChild(legacy);}\
125692
+ }catch(_){}\x0aretu\
125693
+ rn null;}\x0a_showE\
125694
+ llipsis(msg,cont\
125695
+ entEl){this._ens\
125696
+ ureEllipsisEl(ms\
125697
+ g,contentEl);}\x0a_\
125698
+ hideEllipsis(msg\
125699
+ ){this._ensureEl\
125700
+ lipsisEl(msg,nul\
125701
+ l);}\x0aapply(root)\
125702
+ {const scope=roo\
125703
+ t||document;let \
125704
+ list;if(scope.no\
125705
+ deType===1)list=\
125706
+ scope.querySelec\
125707
+ torAll('.msg-box\
125708
+ .msg-user .msg')\
125709
+ ;else list=docum\
125710
+ ent.querySelecto\
125711
+ rAll('.msg-box.m\
125712
+ sg-user .msg');i\
125713
+ f(!list||!list.l\
125714
+ ength)return;for\
125715
+ (let i=0;i<list.\
125716
+ length;i++){cons\
125717
+ t msg=list[i];co\
125718
+ nst st=this._ens\
125719
+ ureStructure(msg\
125720
+ );if(!st)continu\
125721
+ e;this._update(m\
125722
+ sg,st.content,st\
125723
+ .toggle);}}\x0a_upd\
125724
+ ate(msg,contentE\
125725
+ l,toggleEl){cons\
125726
+ t c=contentEl||(\
125678
125727
  msg&&msg.querySe\
125679
125728
  lector('.uc-cont\
125680
- ent'));if(!conte\
125681
- nt)return null;t\
125682
- ry{const legacy=\
125683
- content.querySel\
125684
- ector('.uc-ellip\
125685
- sis');if(legacy&\
125686
- &legacy.parentNo\
125687
- de){legacy.paren\
125688
- tNode.removeChil\
125689
- d(legacy);}}catc\
125690
- h(_){}\x0areturn nu\
125691
- ll;}\x0a_showEllips\
125692
- is(msg,contentEl\
125693
- ){this._ensureEl\
125694
- lipsisEl(msg,con\
125695
- tentEl);}\x0a_hideE\
125696
- llipsis(msg){thi\
125697
- s._ensureEllipsi\
125698
- sEl(msg,null);}\x0a\
125699
- apply(root){cons\
125700
- t scope=root||do\
125701
- cument;let list;\
125702
- if(scope.nodeTyp\
125703
- e===1)list=scope\
125704
- .querySelectorAl\
125705
- l('.msg-box.msg-\
125706
- user .msg');else\
125707
- list=document.q\
125708
- uerySelectorAll(\
125709
- '.msg-box.msg-us\
125710
- er .msg');if(!li\
125711
- st||!list.length\
125712
- )return;for(let \
125713
- i=0;i<list.lengt\
125714
- h;i++){const msg\
125715
- =list[i];const s\
125716
- t=this._ensureSt\
125717
- ructure(msg);if(\
125718
- !st)continue;thi\
125719
- s._update(msg,st\
125720
- .content,st.togg\
125721
- le);}}\x0a_update(m\
125722
- sg,contentEl,tog\
125723
- gleEl){const c=c\
125724
- ontentEl||(msg&&\
125725
- msg.querySelecto\
125726
- r('.uc-content')\
125727
- );if(!msg||!c)re\
125728
- turn;if(this.thr\
125729
- eshold===0||this\
125730
- .threshold==='0'\
125731
- ){const t=toggle\
125732
- El||msg.querySel\
125733
- ector('.uc-toggl\
125734
- e');const labels\
125735
- =this._labels();\
125736
- c.classList.remo\
125737
- ve('uc-collapsed\
125738
- ');c.classList.r\
125739
- emove('uc-expand\
125740
- ed');msg.dataset\
125741
- .ucState='expand\
125742
- ed';this._hideEl\
125743
- lipsis(msg);if(t\
125744
- ){t.classList.re\
125745
- move('visible');\
125746
- t.setAttribute('\
125747
- aria-expanded','\
125748
- false');t.title=\
125749
- labels.expand;co\
125750
- nst img=t.queryS\
125751
- elector('img');i\
125752
- f(img){img.alt=l\
125753
- abels.expand;}}\x0a\
125754
- return;}\x0ac.class\
125755
- List.remove('uc-\
125756
- collapsed');c.cl\
125757
- assList.remove('\
125758
- uc-expanded');co\
125759
- nst fullHeight=M\
125760
- ath.ceil(c.scrol\
125761
- lHeight);const l\
125729
+ ent'));if(!msg||\
125730
+ !c)return;if(thi\
125731
+ s.threshold===0|\
125732
+ |this.threshold=\
125733
+ =='0'){const t=t\
125734
+ oggleEl||msg.que\
125735
+ rySelector('.uc-\
125736
+ toggle');const l\
125762
125737
  abels=this._labe\
125763
- ls();const icons\
125764
- =this._icons();c\
125765
- onst t=toggleEl|\
125766
- |msg.querySelect\
125738
+ ls();c.classList\
125739
+ .remove('uc-coll\
125740
+ apsed');c.classL\
125741
+ ist.remove('uc-e\
125742
+ xpanded');msg.da\
125743
+ taset.ucState='e\
125744
+ xpanded';this._h\
125745
+ ideEllipsis(msg)\
125746
+ ;if(t){t.classLi\
125747
+ st.remove('visib\
125748
+ le');t.setAttrib\
125749
+ ute('aria-expand\
125750
+ ed','false');t.t\
125751
+ itle=labels.expa\
125752
+ nd;const img=t.q\
125753
+ uerySelector('im\
125754
+ g');if(img){img.\
125755
+ alt=labels.expan\
125756
+ d;}}\x0areturn;}\x0ac.\
125757
+ classList.remove\
125758
+ ('uc-collapsed')\
125759
+ ;c.classList.rem\
125760
+ ove('uc-expanded\
125761
+ ');const fullHei\
125762
+ ght=Math.ceil(c.\
125763
+ scrollHeight);co\
125764
+ nst labels=this.\
125765
+ _labels();const \
125766
+ icons=this._icon\
125767
+ s();const t=togg\
125768
+ leEl||msg.queryS\
125769
+ elector('.uc-tog\
125770
+ gle');if(fullHei\
125771
+ ght>this.thresho\
125772
+ ld){if(t)t.class\
125773
+ List.add('visibl\
125774
+ e');const desire\
125775
+ d=msg.dataset.uc\
125776
+ State||'collapse\
125777
+ d';const expand=\
125778
+ (desired==='expa\
125779
+ nded');if(expand\
125780
+ ){c.classList.ad\
125781
+ d('uc-expanded')\
125782
+ ;this._hideEllip\
125783
+ sis(msg);}else{c\
125784
+ .classList.add('\
125785
+ uc-collapsed');t\
125786
+ his._showEllipsi\
125787
+ s(msg,c);}\x0aif(t)\
125788
+ {const img=t.que\
125789
+ rySelector('img'\
125790
+ );if(img){if(exp\
125791
+ and){img.src=ico\
125792
+ ns.collapse;img.\
125793
+ alt=labels.colla\
125794
+ pse;}else{img.sr\
125795
+ c=icons.expand;i\
125796
+ mg.alt=labels.ex\
125797
+ pand;}}\x0at.setAtt\
125798
+ ribute('aria-exp\
125799
+ anded',expand?'t\
125800
+ rue':'false');t.\
125801
+ title=expand?lab\
125802
+ els.collapse:lab\
125803
+ els.expand;}}els\
125804
+ e{c.classList.re\
125805
+ move('uc-collaps\
125806
+ ed');c.classList\
125807
+ .remove('uc-expa\
125808
+ nded');msg.datas\
125809
+ et.ucState='expa\
125810
+ nded';this._hide\
125811
+ Ellipsis(msg);if\
125812
+ (t){t.classList.\
125813
+ remove('visible'\
125814
+ );t.setAttribute\
125815
+ ('aria-expanded'\
125816
+ ,'false');t.titl\
125817
+ e=labels.expand;\
125818
+ }}}\x0atoggleFromTo\
125819
+ ggle(toggleEl){c\
125820
+ onst msg=toggleE\
125821
+ l&&toggleEl.clos\
125822
+ est?toggleEl.clo\
125823
+ sest('.msg-box.m\
125824
+ sg-user .msg'):n\
125825
+ ull;if(!msg)retu\
125826
+ rn;this.toggle(m\
125827
+ sg);}\x0atoggle(msg\
125828
+ ){if(!msg||!msg.\
125829
+ isConnected)retu\
125830
+ rn;const c=msg.q\
125831
+ uerySelector('.u\
125832
+ c-content');if(!\
125833
+ c)return;const t\
125834
+ =msg.querySelect\
125767
125835
  or('.uc-toggle')\
125768
- ;if(fullHeight>t\
125769
- his.threshold){i\
125770
- f(t)t.classList.\
125771
- add('visible');c\
125772
- onst desired=msg\
125773
- .dataset.ucState\
125774
- ||'collapsed';co\
125775
- nst expand=(desi\
125776
- red==='expanded'\
125777
- );if(expand){c.c\
125778
- lassList.add('uc\
125779
- -expanded');this\
125780
- ._hideEllipsis(m\
125781
- sg);}else{c.clas\
125782
- sList.add('uc-co\
125783
- llapsed');this._\
125784
- showEllipsis(msg\
125785
- ,c);}\x0aif(t){cons\
125836
+ ;const labels=th\
125837
+ is._labels();con\
125838
+ st icons=this._i\
125839
+ cons();const isC\
125840
+ ollapsed=c.class\
125841
+ List.contains('u\
125842
+ c-collapsed');if\
125843
+ (isCollapsed){c.\
125844
+ classList.remove\
125845
+ ('uc-collapsed')\
125846
+ ;c.classList.add\
125847
+ ('uc-expanded');\
125848
+ msg.dataset.ucSt\
125849
+ ate='expanded';t\
125850
+ his._hideEllipsi\
125851
+ s(msg);if(t){t.s\
125852
+ etAttribute('ari\
125853
+ a-expanded','tru\
125854
+ e');t.title=labe\
125855
+ ls.collapse;cons\
125786
125856
  t img=t.querySel\
125787
125857
  ector('img');if(\
125788
- img){if(expand){\
125789
- img.src=icons.co\
125790
- llapse;img.alt=l\
125791
- abels.collapse;}\
125792
- else{img.src=ico\
125858
+ img){img.src=ico\
125859
+ ns.collapse;img.\
125860
+ alt=labels.colla\
125861
+ pse;}}}else{c.cl\
125862
+ assList.remove('\
125863
+ uc-expanded');c.\
125864
+ classList.add('u\
125865
+ c-collapsed');ms\
125866
+ g.dataset.ucStat\
125867
+ e='collapsed';th\
125868
+ is._showEllipsis\
125869
+ (msg,c);if(t){t.\
125870
+ setAttribute('ar\
125871
+ ia-expanded','fa\
125872
+ lse');t.title=la\
125873
+ bels.expand;cons\
125874
+ t img=t.querySel\
125875
+ ector('img');if(\
125876
+ img){img.src=ico\
125793
125877
  ns.expand;img.al\
125794
125878
  t=labels.expand;\
125795
- }}\x0at.setAttribut\
125796
- e('aria-expanded\
125797
- ',expand?'true':\
125798
- 'false');t.title\
125799
- =expand?labels.c\
125800
- ollapse:labels.e\
125801
- xpand;}}else{c.c\
125802
- lassList.remove(\
125803
- 'uc-collapsed');\
125804
- c.classList.remo\
125805
- ve('uc-expanded'\
125806
- );msg.dataset.uc\
125807
- State='expanded'\
125808
- ;this._hideEllip\
125809
- sis(msg);if(t){t\
125810
- .classList.remov\
125811
- e('visible');t.s\
125812
- etAttribute('ari\
125813
- a-expanded','fal\
125814
- se');t.title=lab\
125815
- els.expand;}}}\x0at\
125816
- oggleFromToggle(\
125817
- toggleEl){const \
125818
- msg=toggleEl&&to\
125819
- ggleEl.closest?t\
125820
- oggleEl.closest(\
125821
- '.msg-box.msg-us\
125822
- er .msg'):null;i\
125823
- f(!msg)return;th\
125824
- is.toggle(msg);}\
125825
- \x0atoggle(msg){if(\
125826
- !msg||!msg.isCon\
125827
- nected)return;co\
125828
- nst c=msg.queryS\
125829
- elector('.uc-con\
125830
- tent');if(!c)ret\
125831
- urn;const t=msg.\
125832
- querySelector('.\
125833
- uc-toggle');cons\
125834
- t labels=this._l\
125835
- abels();const ic\
125836
- ons=this._icons(\
125837
- );const isCollap\
125838
- sed=c.classList.\
125839
- contains('uc-col\
125840
- lapsed');if(isCo\
125841
- llapsed){c.class\
125842
- List.remove('uc-\
125843
- collapsed');c.cl\
125844
- assList.add('uc-\
125845
- expanded');msg.d\
125846
- ataset.ucState='\
125847
- expanded';this._\
125848
- hideEllipsis(msg\
125849
- );if(t){t.setAtt\
125850
- ribute('aria-exp\
125851
- anded','true');t\
125852
- .title=labels.co\
125853
- llapse;const img\
125854
- =t.querySelector\
125855
- ('img');if(img){\
125856
- img.src=icons.co\
125857
- llapse;img.alt=l\
125858
- abels.collapse;}\
125859
- }}else{c.classLi\
125860
- st.remove('uc-ex\
125861
- panded');c.class\
125862
- List.add('uc-col\
125863
- lapsed');msg.dat\
125864
- aset.ucState='co\
125865
- llapsed';this._s\
125866
- howEllipsis(msg,\
125867
- c);if(t){t.setAt\
125868
- tribute('aria-ex\
125869
- panded','false')\
125870
- ;t.title=labels.\
125871
- expand;const img\
125872
- =t.querySelector\
125873
- ('img');if(img){\
125874
- img.src=icons.ex\
125875
- pand;img.alt=lab\
125876
- els.expand;}\x0athi\
125877
- s._scrollToggleI\
125878
- ntoView(t);}}}\x0ar\
125879
- emeasureAll(){co\
125880
- nst arr=Array.fr\
125881
- om(this._process\
125882
- ed||[]);for(let \
125883
- i=0;i<arr.length\
125884
- ;i++){const msg=\
125885
- arr[i];if(!msg||\
125886
- !msg.isConnected\
125887
- ){this._processe\
125888
- d.delete(msg);co\
125889
- ntinue;}\x0athis._u\
125890
- pdate(msg);}}};\x0a\
125891
- \x0a/* data/js/app/\
125892
- utils.js */\x0aclas\
125893
- s Utils{static g\
125894
- (name,dflt){retu\
125895
- rn(typeof window\
125896
- [name]!=='undefi\
125897
- ned')?window[nam\
125898
- e]:dflt;}\x0astatic\
125899
- now(){return(ty\
125900
- peof performance\
125901
- !=='undefined'&&\
125902
- performance.now)\
125903
- ?performance.now\
125904
- ():Date.now();}\x0a\
125905
- static escapeHtm\
125906
- l(s){const d=Uti\
125907
- ls._escDiv||(Uti\
125908
- ls._escDiv=docum\
125909
- ent.createElemen\
125910
- t('div'));d.text\
125911
- Content=String(s\
125912
- ??'');return d.i\
125913
- nnerHTML;}\x0astati\
125914
- c countNewlines(\
125915
- s){if(!s)return \
125916
- 0;let c=0,i=-1;w\
125917
- hile((i=s.indexO\
125918
- f('\x5cn',i+1))!==-\
125919
- 1)c++;return c;}\
125920
- \x0astatic reEscape\
125921
- (s){return Strin\
125922
- g(s).replace(/[.\
125923
- *+?^${}()|[\x5c]\x5c\x5c]\
125924
- /g,'\x5c\x5c$&');}\x0asta\
125925
- tic idle(fn,time\
125926
- out){if('request\
125927
- IdleCallback'in \
125928
- window)return re\
125879
+ }\x0athis._scrollTo\
125880
+ ggleIntoView(t);\
125881
+ }}}\x0aremeasureAll\
125882
+ (){const arr=Arr\
125883
+ ay.from(this._pr\
125884
+ ocessed||[]);for\
125885
+ (let i=0;i<arr.l\
125886
+ ength;i++){const\
125887
+ msg=arr[i];if(!\
125888
+ msg||!msg.isConn\
125889
+ ected){this._pro\
125890
+ cessed.delete(ms\
125891
+ g);continue;}\x0ath\
125892
+ is._update(msg);\
125893
+ }}};\x0a\x0a/* data/js\
125894
+ /app/utils.js */\
125895
+ \x0aclass Utils{sta\
125896
+ tic g(name,dflt)\
125897
+ {return(typeof w\
125898
+ indow[name]!=='u\
125899
+ ndefined')?windo\
125900
+ w[name]:dflt;}\x0as\
125901
+ tatic now(){retu\
125902
+ rn(typeof perfor\
125903
+ mance!=='undefin\
125904
+ ed'&&performance\
125905
+ .now)?performanc\
125906
+ e.now():Date.now\
125907
+ ();}\x0astatic esca\
125908
+ peHtml(s){const \
125909
+ d=Utils._escDiv|\
125910
+ |(Utils._escDiv=\
125911
+ document.createE\
125912
+ lement('div'));d\
125913
+ .textContent=Str\
125914
+ ing(s??'');retur\
125915
+ n d.innerHTML;}\x0a\
125916
+ static countNewl\
125917
+ ines(s){if(!s)re\
125918
+ turn 0;let c=0,i\
125919
+ =-1;while((i=s.i\
125920
+ ndexOf('\x5cn',i+1)\
125921
+ )!==-1)c++;retur\
125922
+ n c;}\x0astatic reE\
125923
+ scape(s){return \
125924
+ String(s).replac\
125925
+ e(/[.*+?^${}()|[\
125926
+ \x5c]\x5c\x5c]/g,'\x5c\x5c$&');\
125927
+ }\x0astatic idle(fn\
125928
+ ,timeout){if('re\
125929
125929
  questIdleCallbac\
125930
- k(fn,{timeout:ti\
125931
- meout||800});ret\
125932
- urn setTimeout(f\
125933
- n,50);}\x0astatic c\
125934
- ancelIdle(id){tr\
125935
- y{if('cancelIdle\
125936
- Callback'in wind\
125937
- ow)cancelIdleCal\
125938
- lback(id);else c\
125939
- learTimeout(id);\
125940
- }catch(_){}}\x0asta\
125941
- tic get SE(){ret\
125942
- urn document.scr\
125943
- ollingElement||d\
125944
- ocument.document\
125945
- Element;}\x0astatic\
125946
- utf8Decode(byte\
125947
- s){if(!Utils._td\
125948
- )Utils._td=new T\
125949
- extDecoder('utf-\
125950
- 8');return Utils\
125951
- ._td.decode(byte\
125952
- s);}};\x0a\x0a/* data/\
125953
- js/app/runtime.j\
125954
- s */\x0aclass Runti\
125955
- me{constructor()\
125956
- {this.cfg=new Co\
125957
- nfig();this.logg\
125958
- er=new Logger(th\
125959
- is.cfg);this.dom\
125960
- =new DOMRefs();t\
125961
- his.customMarkup\
125962
- =new CustomMarku\
125963
- p(this.cfg,this.\
125964
- logger);this.raf\
125965
- =new RafManager(\
125966
- this.cfg);try{th\
125967
- is.logger.bindRa\
125968
- f(this.raf);}cat\
125969
- ch(_){}\x0athis.asy\
125970
- nc=new AsyncRunn\
125971
- er(this.cfg,this\
125972
- .raf);this.rende\
125973
- rer=new Markdown\
125974
- Renderer(this.cf\
125975
- g,this.customMar\
125976
- kup,this.logger,\
125977
- this.async,this.\
125978
- raf);this.math=n\
125979
- ew MathRenderer(\
125980
- this.cfg,this.ra\
125981
- f,this.async);th\
125982
- is.codeScroll=ne\
125983
- w CodeScrollStat\
125984
- e(this.cfg,this.\
125985
- raf);this.highli\
125986
- ghter=new Highli\
125987
- ghter(this.cfg,t\
125988
- his.codeScroll,t\
125989
- his.raf);this.sc\
125990
- rollMgr=new Scro\
125991
- llManager(this.c\
125992
- fg,this.dom,this\
125993
- .raf);this.toolO\
125994
- utput=new ToolOu\
125995
- tput();this.load\
125996
- ing=new Loading(\
125997
- this.dom);this.n\
125998
- odes=new NodesMa\
125999
- nager(this.dom,t\
126000
- his.renderer,thi\
126001
- s.highlighter,th\
126002
- is.math);this.br\
126003
- idge=new BridgeM\
126004
- anager(this.cfg,\
125930
+ k'in window)retu\
125931
+ rn requestIdleCa\
125932
+ llback(fn,{timeo\
125933
+ ut:timeout||800}\
125934
+ );return setTime\
125935
+ out(fn,50);}\x0asta\
125936
+ tic cancelIdle(i\
125937
+ d){try{if('cance\
125938
+ lIdleCallback'in\
125939
+ window)cancelId\
125940
+ leCallback(id);e\
125941
+ lse clearTimeout\
125942
+ (id);}catch(_){}\
125943
+ }\x0astatic get SE(\
125944
+ ){return documen\
125945
+ t.scrollingEleme\
125946
+ nt||document.doc\
125947
+ umentElement;}\x0as\
125948
+ tatic utf8Decode\
125949
+ (bytes){if(!Util\
125950
+ s._td)Utils._td=\
125951
+ new TextDecoder(\
125952
+ 'utf-8');return \
125953
+ Utils._td.decode\
125954
+ (bytes);}};\x0a\x0a/* \
125955
+ data/js/app/runt\
125956
+ ime.js */\x0aclass \
125957
+ Runtime{construc\
125958
+ tor(){this.cfg=n\
125959
+ ew Config();this\
125960
+ .logger=new Logg\
125961
+ er(this.cfg);thi\
125962
+ s.dom=new DOMRef\
125963
+ s();this.customM\
125964
+ arkup=new Custom\
125965
+ Markup(this.cfg,\
126005
125966
  this.logger);thi\
126006
- s.ui=new UIManag\
126007
- er();this.stream\
126008
- =new StreamEngin\
126009
- e(this.cfg,this.\
126010
- dom,this.rendere\
126011
- r,this.math,this\
126012
- .highlighter,thi\
126013
- s.codeScroll,thi\
126014
- s.scrollMgr,this\
126015
- .raf,this.async,\
126016
- this.logger);thi\
126017
- s.streamQ=new St\
126018
- reamQueue(this.c\
126019
- fg,this.stream,t\
126020
- his.scrollMgr,th\
126021
- is.raf);this.eve\
126022
- nts=new EventMan\
126023
- ager(this.cfg,th\
126024
- is.dom,this.scro\
126025
- llMgr,this.highl\
126026
- ighter,this.code\
126027
- Scroll,this.tool\
126028
- Output,this.brid\
126029
- ge);try{this.str\
126030
- eam.setCustomFen\
126031
- ceSpecs(this.cus\
126032
- tomMarkup.getSou\
126033
- rceFenceSpecs())\
125967
+ s.raf=new RafMan\
125968
+ ager(this.cfg);t\
125969
+ ry{this.logger.b\
125970
+ indRaf(this.raf)\
126034
125971
  ;}catch(_){}\x0athi\
126035
- s.templates=new \
126036
- NodeTemplateEngi\
126037
- ne(this.cfg,this\
126038
- .logger);this.da\
126039
- ta=new DataRecei\
126040
- ver(this.cfg,thi\
126041
- s.templates,this\
126042
- .nodes,this.scro\
126043
- llMgr);this.tips\
126044
- =null;this._last\
126045
- HeavyResetMs=0;t\
126046
- his.renderer.hoo\
126047
- ks.observeNewCod\
126048
- e=(root,opts)=>t\
126049
- his.highlighter.\
126050
- observeNewCode(r\
126051
- oot,opts,this.st\
126052
- ream.activeCode)\
126053
- ;this.renderer.h\
126054
- ooks.observeMsgB\
126055
- oxes=(root)=>thi\
126056
- s.highlighter.ob\
126057
- serveMsgBoxes(ro\
126058
- ot,(box)=>{this.\
126059
- highlighter.obse\
126060
- rveNewCode(box,{\
126061
- deferLastIfStrea\
126062
- ming:true,minLin\
126063
- esForLast:this.c\
126064
- fg.PROFILE_CODE.\
126065
- minLinesForHL,mi\
126066
- nCharsForLast:th\
126067
- is.cfg.PROFILE_C\
126068
- ODE.minCharsForH\
126069
- L},this.stream.a\
126070
- ctiveCode);this.\
126071
- codeScroll.initS\
126072
- crollableBlocks(\
126073
- box);});this.ren\
126074
- derer.hooks.sche\
126075
- duleMathRender=(\
126076
- root)=>{const mm\
126077
- =getMathMode();i\
126078
- f(mm==='idle')th\
126079
- is.math.schedule\
126080
- (root);else if(m\
126081
- m==='always')thi\
126082
- s.math.schedule(\
126083
- root,0,true);};t\
126084
- his.renderer.hoo\
126085
- ks.codeScrollIni\
126086
- t=(root)=>this.c\
126087
- odeScroll.initSc\
126088
- rollableBlocks(r\
126089
- oot);}\x0aresetStre\
126090
- amState(origin,o\
126091
- pts){try{this.st\
126092
- reamQ.clear();}c\
126093
- atch(_){}\x0aconst \
126094
- def=Object.assig\
126095
- n({finalizeActiv\
126096
- e:true,clearBuff\
126097
- er:true,clearMsg\
126098
- :false,defuseOrp\
126099
- hans:true,forceH\
126100
- eavy:false,reaso\
126101
- n:String(origin|\
126102
- |'external-op')}\
126103
- ,(opts||{}));con\
126104
- st now=Utils.now\
126105
- ();const withinD\
126106
- ebounce=(now-(th\
126107
- is._lastHeavyRes\
126108
- etMs||0))<=(this\
126109
- .cfg.RESET.HEAVY\
126110
- _DEBOUNCE_MS||24\
126111
- );const mustHeav\
126112
- yByOrigin=def.fo\
126113
- rceHeavy===true|\
126114
- |def.clearMsg===\
126115
- true||origin==='\
126116
- beginStream'||or\
126117
- igin==='nextStre\
126118
- am'||origin==='c\
126119
- learStream'||ori\
126120
- gin==='replaceNo\
126121
- des'||origin==='\
126122
- clearNodes'||ori\
126123
- gin==='clearOutp\
126124
- ut'||origin==='c\
126125
- learLive'||origi\
126126
- n==='clearInput'\
126127
- ;const shouldHea\
126128
- vy=mustHeavyByOr\
126129
- igin||!withinDeb\
126130
- ounce;const supp\
126131
- ressLog=withinDe\
126132
- bounce&&origin!=\
126133
- ='beginStream';t\
126134
- ry{this.stream.a\
126135
- bortAndReset({..\
126136
- .def,suppressLog\
126137
- });}catch(_){}\x0ai\
126138
- f(shouldHeavy){t\
126139
- ry{this.highligh\
126140
- ter.cleanup();}c\
126141
- atch(_){}\x0atry{th\
126142
- is.math.cleanup(\
126143
- );}catch(_){}\x0atr\
126144
- y{this.codeScrol\
126145
- l.cancelAllScrol\
126146
- ls();}catch(_){}\
126147
- \x0atry{this.scroll\
126148
- Mgr.cancelPendin\
126149
- gScroll();}catch\
126150
- (_){}\x0atry{this.r\
126151
- af.cancelAll();}\
126152
- catch(_){}\x0athis.\
125972
+ s.async=new Asyn\
125973
+ cRunner(this.cfg\
125974
+ ,this.raf);this.\
125975
+ renderer=new Mar\
125976
+ kdownRenderer(th\
125977
+ is.cfg,this.cust\
125978
+ omMarkup,this.lo\
125979
+ gger,this.async,\
125980
+ this.raf);this.m\
125981
+ ath=new MathRend\
125982
+ erer(this.cfg,th\
125983
+ is.raf,this.asyn\
125984
+ c);this.codeScro\
125985
+ ll=new CodeScrol\
125986
+ lState(this.cfg,\
125987
+ this.raf);this.h\
125988
+ ighlighter=new H\
125989
+ ighlighter(this.\
125990
+ cfg,this.codeScr\
125991
+ oll,this.raf);th\
125992
+ is.scrollMgr=new\
125993
+ ScrollManager(t\
125994
+ his.cfg,this.dom\
125995
+ ,this.raf);this.\
125996
+ toolOutput=new T\
125997
+ oolOutput();this\
125998
+ .loading=new Loa\
125999
+ ding(this.dom);t\
126000
+ his.nodes=new No\
126001
+ desManager(this.\
126002
+ dom,this.rendere\
126003
+ r,this.highlight\
126004
+ er,this.math);th\
126005
+ is.bridge=new Br\
126006
+ idgeManager(this\
126007
+ .cfg,this.logger\
126008
+ );this.ui=new UI\
126009
+ Manager();this.s\
126010
+ tream=new Stream\
126011
+ Engine(this.cfg,\
126012
+ this.dom,this.re\
126013
+ nderer,this.math\
126014
+ ,this.highlighte\
126015
+ r,this.codeScrol\
126016
+ l,this.scrollMgr\
126017
+ ,this.raf,this.a\
126018
+ sync,this.logger\
126019
+ );this.streamQ=n\
126020
+ ew StreamQueue(t\
126021
+ his.cfg,this.str\
126022
+ eam,this.scrollM\
126023
+ gr,this.raf);thi\
126024
+ s.events=new Eve\
126025
+ ntManager(this.c\
126026
+ fg,this.dom,this\
126027
+ .scrollMgr,this.\
126028
+ highlighter,this\
126029
+ .codeScroll,this\
126030
+ .toolOutput,this\
126031
+ .bridge);try{thi\
126032
+ s.stream.setCust\
126033
+ omFenceSpecs(thi\
126034
+ s.customMarkup.g\
126035
+ etSourceFenceSpe\
126036
+ cs());}catch(_){\
126037
+ }\x0athis.templates\
126038
+ =new NodeTemplat\
126039
+ eEngine(this.cfg\
126040
+ ,this.logger);th\
126041
+ is.data=new Data\
126042
+ Receiver(this.cf\
126043
+ g,this.templates\
126044
+ ,this.nodes,this\
126045
+ .scrollMgr);this\
126046
+ .tips=null;this.\
126153
126047
  _lastHeavyResetM\
126154
- s=now;}else{try{\
126155
- this.raf.cancelG\
126156
- roup('StreamQueu\
126157
- e');}catch(_){}}\
126158
- \x0atry{this.tips&&\
126159
- this.tips.hide()\
126160
- ;}catch(_){}}\x0aap\
126161
- i_onChunk=(name,\
126162
- chunk,type)=>{co\
126163
- nst t=String(typ\
126164
- e||'text_delta')\
126165
- ;if(t==='text_de\
126166
- lta'){this.api_a\
126167
- ppendStream(name\
126168
- ,chunk);return;}\
126169
- \x0athis.logger.deb\
126170
- ug('STREAM','IGN\
126171
- ORED_NON_TEXT_CH\
126172
- UNK',{type:t,len\
126173
- :(chunk?String(c\
126174
- hunk).length:0)}\
126175
- );};api_beginStr\
126176
- eam=(chunk=false\
126177
- )=>{this.tips&&t\
126178
- his.tips.hide();\
126179
- this.resetStream\
126180
- State('beginStre\
126048
+ s=0;this.rendere\
126049
+ r.hooks.observeN\
126050
+ ewCode=(root,opt\
126051
+ s)=>this.highlig\
126052
+ hter.observeNewC\
126053
+ ode(root,opts,th\
126054
+ is.stream.active\
126055
+ Code);this.rende\
126056
+ rer.hooks.observ\
126057
+ eMsgBoxes=(root)\
126058
+ =>this.highlight\
126059
+ er.observeMsgBox\
126060
+ es(root,(box)=>{\
126061
+ this.highlighter\
126062
+ .observeNewCode(\
126063
+ box,{deferLastIf\
126064
+ Streaming:true,m\
126065
+ inLinesForLast:t\
126066
+ his.cfg.PROFILE_\
126067
+ CODE.minLinesFor\
126068
+ HL,minCharsForLa\
126069
+ st:this.cfg.PROF\
126070
+ ILE_CODE.minChar\
126071
+ sForHL},this.str\
126072
+ eam.activeCode);\
126073
+ this.codeScroll.\
126074
+ initScrollableBl\
126075
+ ocks(box);});thi\
126076
+ s.renderer.hooks\
126077
+ .scheduleMathRen\
126078
+ der=(root)=>{con\
126079
+ st mm=getMathMod\
126080
+ e();if(mm==='idl\
126081
+ e')this.math.sch\
126082
+ edule(root);else\
126083
+ if(mm==='always\
126084
+ ')this.math.sche\
126085
+ dule(root,0,true\
126086
+ );};this.rendere\
126087
+ r.hooks.codeScro\
126088
+ llInit=(root)=>t\
126089
+ his.codeScroll.i\
126090
+ nitScrollableBlo\
126091
+ cks(root);}\x0arese\
126092
+ tStreamState(ori\
126093
+ gin,opts){try{th\
126094
+ is.streamQ.clear\
126095
+ ();}catch(_){}\x0ac\
126096
+ onst def=Object.\
126097
+ assign({finalize\
126098
+ Active:true,clea\
126099
+ rBuffer:true,cle\
126100
+ arMsg:false,defu\
126101
+ seOrphans:true,f\
126102
+ orceHeavy:false,\
126103
+ reason:String(or\
126104
+ igin||'external-\
126105
+ op')},(opts||{})\
126106
+ );const now=Util\
126107
+ s.now();const wi\
126108
+ thinDebounce=(no\
126109
+ w-(this._lastHea\
126110
+ vyResetMs||0))<=\
126111
+ (this.cfg.RESET.\
126112
+ HEAVY_DEBOUNCE_M\
126113
+ S||24);const mus\
126114
+ tHeavyByOrigin=d\
126115
+ ef.forceHeavy===\
126116
+ true||def.clearM\
126117
+ sg===true||origi\
126118
+ n==='beginStream\
126119
+ '||origin==='nex\
126120
+ tStream'||origin\
126121
+ ==='clearStream'\
126122
+ ||origin==='repl\
126123
+ aceNodes'||origi\
126124
+ n==='clearNodes'\
126125
+ ||origin==='clea\
126126
+ rOutput'||origin\
126127
+ ==='clearLive'||\
126128
+ origin==='clearI\
126129
+ nput';const shou\
126130
+ ldHeavy=mustHeav\
126131
+ yByOrigin||!with\
126132
+ inDebounce;const\
126133
+ suppressLog=wit\
126134
+ hinDebounce&&ori\
126135
+ gin!=='beginStre\
126136
+ am';try{this.str\
126137
+ eam.abortAndRese\
126138
+ t({...def,suppre\
126139
+ ssLog});}catch(_\
126140
+ ){}\x0aif(shouldHea\
126141
+ vy){try{this.hig\
126142
+ hlighter.cleanup\
126143
+ ();}catch(_){}\x0at\
126144
+ ry{this.math.cle\
126145
+ anup();}catch(_)\
126146
+ {}\x0atry{this.code\
126147
+ Scroll.cancelAll\
126148
+ Scrolls();}catch\
126149
+ (_){}\x0atry{this.s\
126150
+ crollMgr.cancelP\
126151
+ endingScroll();}\
126152
+ catch(_){}\x0atry{t\
126153
+ his.raf.cancelAl\
126154
+ l();}catch(_){}\x0a\
126155
+ this._lastHeavyR\
126156
+ esetMs=now;}else\
126157
+ {try{this.raf.ca\
126158
+ ncelGroup('Strea\
126159
+ mQueue');}catch(\
126160
+ _){}}\x0atry{this.t\
126161
+ ips&&this.tips.h\
126162
+ ide();}catch(_){\
126163
+ }}\x0aapi_onChunk=(\
126164
+ name,chunk,type)\
126165
+ =>{const t=Strin\
126166
+ g(type||'text_de\
126167
+ lta');if(t==='te\
126168
+ xt_delta'){this.\
126169
+ api_appendStream\
126170
+ (name,chunk);ret\
126171
+ urn;}\x0athis.logge\
126172
+ r.debug('STREAM'\
126173
+ ,'IGNORED_NON_TE\
126174
+ XT_CHUNK',{type:\
126175
+ t,len:(chunk?Str\
126176
+ ing(chunk).lengt\
126177
+ h:0)});};api_beg\
126178
+ inStream=(chunk=\
126179
+ false)=>{this.ti\
126180
+ ps&&this.tips.hi\
126181
+ de();this.resetS\
126182
+ treamState('begi\
126183
+ nStream',{clearM\
126184
+ sg:true,finalize\
126185
+ Active:false,for\
126186
+ ceHeavy:true});t\
126187
+ his.stream.begin\
126188
+ Stream(chunk);};\
126189
+ api_endStream=()\
126190
+ =>{this.stream.e\
126191
+ ndStream();};api\
126192
+ _applyStream=(na\
126193
+ me,chunk)=>{this\
126194
+ .stream.applyStr\
126195
+ eam(name,chunk);\
126196
+ };api_appendStre\
126197
+ am=(name,chunk)=\
126198
+ >{this.streamQ.e\
126199
+ nqueue(name,chun\
126200
+ k);};api_nextStr\
126201
+ eam=()=>{this.ti\
126202
+ ps&&this.tips.hi\
126203
+ de();const eleme\
126204
+ nt=this.dom.get(\
126205
+ '_append_output_\
126206
+ ');const before=\
126207
+ this.dom.get('_a\
126208
+ ppend_output_bef\
126209
+ ore_');if(elemen\
126210
+ t&&before){const\
126211
+ frag=document.c\
126212
+ reateDocumentFra\
126213
+ gment();while(el\
126214
+ ement.firstChild\
126215
+ )frag.appendChil\
126216
+ d(element.firstC\
126217
+ hild);before.app\
126218
+ endChild(frag);}\
126219
+ \x0athis.resetStrea\
126220
+ mState('nextStre\
126181
126221
  am',{clearMsg:tr\
126182
126222
  ue,finalizeActiv\
126183
126223
  e:false,forceHea\
126184
126224
  vy:true});this.s\
126185
- tream.beginStrea\
126186
- m(chunk);};api_e\
126187
- ndStream=()=>{th\
126188
- is.stream.endStr\
126189
- eam();};api_appl\
126190
- yStream=(name,ch\
126191
- unk)=>{this.stre\
126192
- am.applyStream(n\
126193
- ame,chunk);};api\
126194
- _appendStream=(n\
126195
- ame,chunk)=>{thi\
126196
- s.streamQ.enqueu\
126197
- e(name,chunk);};\
126198
- api_nextStream=(\
126199
- )=>{this.tips&&t\
126200
- his.tips.hide();\
126201
- const element=th\
126202
- is.dom.get('_app\
126203
- end_output_');co\
126204
- nst before=this.\
126205
- dom.get('_append\
126206
- _output_before_'\
126207
- );if(element&&be\
126208
- fore){const frag\
126209
- =document.create\
126210
- DocumentFragment\
126211
- ();while(element\
126212
- .firstChild)frag\
126213
- .appendChild(ele\
126214
- ment.firstChild)\
126215
- ;before.appendCh\
126216
- ild(frag);}\x0athis\
126217
- .resetStreamStat\
126218
- e('nextStream',{\
126219
- clearMsg:true,fi\
126220
- nalizeActive:fal\
126221
- se,forceHeavy:tr\
126222
- ue});this.scroll\
126223
- Mgr.scheduleScro\
126224
- ll();};api_clear\
126225
- Stream=()=>{this\
126226
- .tips&&this.tips\
126227
- .hide();this.res\
126228
- etStreamState('c\
126229
- learStream',{cle\
126230
- arMsg:true,force\
126231
- Heavy:true});con\
126232
- st el=this.dom.g\
126233
- etStreamContaine\
126234
- r();if(!el)retur\
126235
- n;el.replaceChil\
126236
- dren();};api_app\
126237
- endNode=(payload\
126238
- )=>{this.resetSt\
126239
- reamState('appen\
126240
- dNode');this.dat\
126241
- a.append(payload\
126242
- );this.scrollMgr\
126243
- .scheduleScroll(\
126244
- );};api_replaceN\
126245
- odes=(payload)=>\
126246
- {this.resetStrea\
126247
- mState('replaceN\
126248
- odes',{clearMsg:\
126249
- true,forceHeavy:\
126250
- true});this.dom.\
126251
- clearNodes();thi\
126252
- s.data.replace(p\
126253
- ayload);};api_ap\
126254
- pendToInput=(pay\
126255
- load)=>{this.nod\
126256
- es.appendToInput\
126257
- (payload);this.s\
126258
- crollMgr.autoFol\
126259
- low=true;this.sc\
126260
- rollMgr.userInte\
126261
- racted=false;try\
126262
- {this.scrollMgr.\
126263
- lastScrollTop=Ut\
126264
- ils.SE.scrollTop\
126265
- |0;}catch(_){}\x0at\
126266
- his.scrollMgr.sc\
126267
- heduleScroll();}\
126268
- ;api_clearNodes=\
126269
- ()=>{this.dom.cl\
126270
- earNodes();this.\
126271
- resetStreamState\
126272
- ('clearNodes',{c\
126273
- learMsg:true,for\
126274
- ceHeavy:true});}\
126275
- ;api_clearInput=\
126276
- ()=>{this.resetS\
126277
- treamState('clea\
126278
- rInput',{forceHe\
126279
- avy:true});this.\
126280
- dom.clearInput()\
126281
- ;};api_clearOutp\
126282
- ut=()=>{this.dom\
126283
- .clearOutput();t\
126284
- his.resetStreamS\
126285
- tate('clearOutpu\
126286
- t',{clearMsg:tru\
126225
+ crollMgr.schedul\
126226
+ eScroll();};api_\
126227
+ clearStream=()=>\
126228
+ {this.tips&&this\
126229
+ .tips.hide();thi\
126230
+ s.resetStreamSta\
126231
+ te('clearStream'\
126232
+ ,{clearMsg:true,\
126233
+ forceHeavy:true}\
126234
+ );const el=this.\
126235
+ dom.getStreamCon\
126236
+ tainer();if(!el)\
126237
+ return;el.replac\
126238
+ eChildren();};ap\
126239
+ i_appendNode=(pa\
126240
+ yload)=>{this.re\
126241
+ setStreamState('\
126242
+ appendNode');thi\
126243
+ s.data.append(pa\
126244
+ yload);this.scro\
126245
+ llMgr.scheduleSc\
126246
+ roll();};api_rep\
126247
+ laceNodes=(paylo\
126248
+ ad)=>{this.reset\
126249
+ StreamState('rep\
126250
+ laceNodes',{clea\
126251
+ rMsg:true,forceH\
126252
+ eavy:true});this\
126253
+ .dom.clearNodes(\
126254
+ );this.data.repl\
126255
+ ace(payload);};a\
126256
+ pi_appendToInput\
126257
+ =(payload)=>{thi\
126258
+ s.nodes.appendTo\
126259
+ Input(payload);t\
126260
+ his.scrollMgr.au\
126261
+ toFollow=true;th\
126262
+ is.scrollMgr.use\
126263
+ rInteracted=fals\
126264
+ e;try{this.scrol\
126265
+ lMgr.lastScrollT\
126266
+ op=Utils.SE.scro\
126267
+ llTop|0;}catch(_\
126268
+ ){}\x0athis.scrollM\
126269
+ gr.scheduleScrol\
126270
+ l();};api_clearN\
126271
+ odes=()=>{this.d\
126272
+ om.clearNodes();\
126273
+ this.resetStream\
126274
+ State('clearNode\
126275
+ s',{clearMsg:tru\
126287
126276
  e,forceHeavy:tru\
126288
- e});};api_clearL\
126289
- ive=()=>{this.do\
126290
- m.clearLive();th\
126291
- is.resetStreamSt\
126292
- ate('clearLive',\
126293
- {forceHeavy:true\
126294
- });};api_appendT\
126295
- oolOutput=(c)=>t\
126296
- his.toolOutput.a\
126297
- ppend(c);api_upd\
126298
- ateToolOutput=(c\
126299
- )=>this.toolOutp\
126300
- ut.update(c);api\
126301
- _clearToolOutput\
126302
- =()=>this.toolOu\
126303
- tput.clear();api\
126304
- _beginToolOutput\
126305
- =()=>this.toolOu\
126306
- tput.begin();api\
126307
- _endToolOutput=(\
126308
- )=>this.toolOutp\
126309
- ut.end();api_ena\
126310
- bleToolOutput=()\
126311
- =>this.toolOutpu\
126312
- t.enable();api_d\
126313
- isableToolOutput\
126314
- =()=>this.toolOu\
126315
- tput.disable();a\
126316
- pi_toggleToolOut\
126317
- put=(id)=>this.t\
126318
- oolOutput.toggle\
126319
- (id);api_appendE\
126320
- xtra=(id,c)=>thi\
126321
- s.nodes.appendEx\
126322
- tra(id,c,this.sc\
126323
- rollMgr);api_rem\
126324
- oveNode=(id)=>th\
126325
- is.nodes.removeN\
126326
- ode(id,this.scro\
126327
- llMgr);api_remov\
126328
- eNodesFromId=(id\
126277
+ e});};api_clearI\
126278
+ nput=()=>{this.r\
126279
+ esetStreamState(\
126280
+ 'clearInput',{fo\
126281
+ rceHeavy:true});\
126282
+ this.dom.clearIn\
126283
+ put();};api_clea\
126284
+ rOutput=()=>{thi\
126285
+ s.dom.clearOutpu\
126286
+ t();this.resetSt\
126287
+ reamState('clear\
126288
+ Output',{clearMs\
126289
+ g:true,forceHeav\
126290
+ y:true});};api_c\
126291
+ learLive=()=>{th\
126292
+ is.dom.clearLive\
126293
+ ();this.resetStr\
126294
+ eamState('clearL\
126295
+ ive',{forceHeavy\
126296
+ :true});};api_ap\
126297
+ pendToolOutput=(\
126298
+ c)=>this.toolOut\
126299
+ put.append(c);ap\
126300
+ i_updateToolOutp\
126301
+ ut=(c)=>this.too\
126302
+ lOutput.update(c\
126303
+ );api_clearToolO\
126304
+ utput=()=>this.t\
126305
+ oolOutput.clear(\
126306
+ );api_beginToolO\
126307
+ utput=()=>this.t\
126308
+ oolOutput.begin(\
126309
+ );api_endToolOut\
126310
+ put=()=>this.too\
126311
+ lOutput.end();ap\
126312
+ i_enableToolOutp\
126313
+ ut=()=>this.tool\
126314
+ Output.enable();\
126315
+ api_disableToolO\
126316
+ utput=()=>this.t\
126317
+ oolOutput.disabl\
126318
+ e();api_toggleTo\
126319
+ olOutput=(id)=>t\
126320
+ his.toolOutput.t\
126321
+ oggle(id);api_ap\
126322
+ pendExtra=(id,c)\
126323
+ =>this.nodes.app\
126324
+ endExtra(id,c,th\
126325
+ is.scrollMgr);ap\
126326
+ i_removeNode=(id\
126329
126327
  )=>this.nodes.re\
126330
- moveNodesFromId(\
126331
- id,this.scrollMg\
126332
- r);api_replaceLi\
126333
- ve=(content)=>{c\
126334
- onst el=this.dom\
126335
- .get('_append_li\
126336
- ve_');if(!el)ret\
126337
- urn;if(el.classL\
126338
- ist.contains('hi\
126339
- dden')){el.class\
126340
- List.remove('hid\
126341
- den');el.classLi\
126342
- st.add('visible'\
126343
- );}\x0ael.innerHTML\
126344
- =content;try{con\
126345
- st maybePromise=\
126346
- this.renderer.re\
126347
- nderPendingMarkd\
126348
- own(el);const po\
126349
- st=()=>{try{this\
126350
- .highlighter.obs\
126351
- erveNewCode(el,{\
126352
- deferLastIfStrea\
126353
- ming:true,minLin\
126354
- esForLast:this.c\
126355
- fg.PROFILE_CODE.\
126356
- minLinesForHL,mi\
126357
- nCharsForLast:th\
126358
- is.cfg.PROFILE_C\
126359
- ODE.minCharsForH\
126360
- L},this.stream.a\
126361
- ctiveCode);this.\
126362
- highlighter.obse\
126363
- rveMsgBoxes(el,(\
126364
- box)=>{this.high\
126365
- lighter.observeN\
126366
- ewCode(box,{defe\
126367
- rLastIfStreaming\
126368
- :true,minLinesFo\
126369
- rLast:this.cfg.P\
126370
- ROFILE_CODE.minL\
126371
- inesForHL,minCha\
126372
- rsForLast:this.c\
126373
- fg.PROFILE_CODE.\
126374
- minCharsForHL},t\
126375
- his.stream.activ\
126376
- eCode);this.code\
126377
- Scroll.initScrol\
126378
- lableBlocks(box)\
126379
- ;});}catch(_){}\x0a\
126380
- try{const mm=get\
126381
- MathMode();if(mm\
126382
- ==='finalize-onl\
126383
- y')this.math.sch\
126384
- edule(el,0,true)\
126385
- ;else this.math.\
126386
- schedule(el);}ca\
126387
- tch(_){}\x0athis.sc\
126388
- rollMgr.schedule\
126389
- Scroll();};if(ma\
126390
- ybePromise&&type\
126391
- of maybePromise.\
126392
- then==='function\
126393
- '){maybePromise.\
126394
- then(post);}else\
126395
- {post();}}catch(\
126396
- _){this.scrollMg\
126397
- r.scheduleScroll\
126398
- ();}};api_update\
126399
- Footer=(html)=>{\
126400
- const el=this.do\
126401
- m.get('_footer_'\
126402
- );if(el)el.inner\
126403
- HTML=html;};api_\
126404
- enableEditIcons=\
126405
- ()=>this.ui.enab\
126406
- leEditIcons();ap\
126407
- i_disableEditIco\
126408
- ns=()=>this.ui.d\
126409
- isableEditIcons(\
126410
- );api_enableTime\
126411
- stamp=()=>this.u\
126412
- i.enableTimestam\
126413
- p();api_disableT\
126414
- imestamp=()=>thi\
126415
- s.ui.disableTime\
126416
- stamp();api_enab\
126417
- leBlocks=()=>thi\
126418
- s.ui.enableBlock\
126419
- s();api_disableB\
126420
- locks=()=>this.u\
126421
- i.disableBlocks(\
126422
- );api_updateCSS=\
126423
- (styles)=>this.u\
126424
- i.updateCSS(styl\
126425
- es);api_getScrol\
126426
- lPosition=()=>{t\
126427
- his.bridge.updat\
126428
- eScrollPosition(\
126429
- window.scrollY);\
126430
- };api_setScrollP\
126431
- osition=(pos)=>{\
126432
- try{window.scrol\
126433
- lTo(0,pos);this.\
126434
- scrollMgr.prevSc\
126435
- roll=parseInt(po\
126436
- s);}catch(_){}};\
126437
- api_showLoading=\
126438
- ()=>this.loading\
126439
- .show();api_hide\
126440
- Loading=()=>this\
126441
- .loading.hide();\
126442
- api_restoreColla\
126443
- psedCode=(root)=\
126444
- >this.renderer.r\
126445
- estoreCollapsedC\
126446
- ode(root);api_sc\
126447
- rollToTopUser=()\
126448
- =>this.scrollMgr\
126449
- .scrollToTopUser\
126450
- ();api_scrollToB\
126451
- ottomUser=()=>th\
126452
- is.scrollMgr.scr\
126453
- ollToBottomUser(\
126454
- );api_showTips=(\
126455
- )=>this.tips.sho\
126456
- w();api_hideTips\
126457
- =()=>this.tips.h\
126458
- ide();api_begin=\
126459
- ()=>{};api_end=(\
126460
- )=>{this.scrollM\
126461
- gr.forceScrollTo\
126462
- BottomImmediateA\
126463
- tEnd();}\x0aapi_get\
126464
- CustomMarkupRule\
126465
- s=()=>this.custo\
126466
- mMarkup.getRules\
126467
- ();api_setCustom\
126468
- MarkupRules=(rul\
126469
- es)=>{this.custo\
126470
- mMarkup.setRules\
126471
- (rules);try{this\
126472
- .stream.setCusto\
126473
- mFenceSpecs(this\
126474
- .customMarkup.ge\
126475
- tSourceFenceSpec\
126476
- s());}catch(_){}\
126477
- };init(){this.hi\
126478
- ghlighter.initHL\
126479
- JS();this.dom.in\
126480
- it();this.ui.ens\
126481
- ureStickyHeaderS\
126482
- tyle();this.tips\
126483
- =new TipsManager\
126484
- (this.dom);this.\
126485
- events.install()\
126486
- ;this.bridge.ini\
126487
- tQWebChannel(thi\
126488
- s.cfg.PID,(bridg\
126489
- e)=>{const onChu\
126490
- nk=(name,chunk,t\
126491
- ype)=>this.api_o\
126492
- nChunk(name,chun\
126493
- k,type);const on\
126494
- Node=(payload)=>\
126495
- this.api_appendN\
126496
- ode(payload);con\
126497
- st onNodeReplace\
126498
- =(payload)=>this\
126499
- .api_replaceNode\
126500
- s(payload);const\
126501
- onNodeInput=(ht\
126502
- ml)=>this.api_ap\
126503
- pendToInput(html\
126504
- );this.bridge.co\
126505
- nnect(onChunk,on\
126506
- Node,onNodeRepla\
126507
- ce,onNodeInput);\
126508
- try{this.logger.\
126509
- bindBridge(this.\
126510
- bridge.bridge||t\
126511
- his.bridge);}cat\
126512
- ch(_){}});this.r\
126513
- enderer.init();t\
126514
- ry{this.renderer\
126515
- .renderPendingMa\
126516
- rkdown(document)\
126517
- ;}catch(_){}\x0athi\
126518
- s.highlighter.ob\
126519
- serveMsgBoxes(do\
126520
- cument,(box)=>{t\
126521
- his.highlighter.\
126522
- observeNewCode(b\
126523
- ox,{deferLastIfS\
126524
- treaming:true,mi\
126525
- nLinesForLast:th\
126526
- is.cfg.PROFILE_C\
126527
- ODE.minLinesForH\
126528
- L,minCharsForLas\
126529
- t:this.cfg.PROFI\
126530
- LE_CODE.minChars\
126531
- ForHL},this.stre\
126532
- am.activeCode);t\
126533
- his.codeScroll.i\
126534
- nitScrollableBlo\
126535
- cks(box);});this\
126328
+ moveNode(id,this\
126329
+ .scrollMgr);api_\
126330
+ removeNodesFromI\
126331
+ d=(id)=>this.nod\
126332
+ es.removeNodesFr\
126333
+ omId(id,this.scr\
126334
+ ollMgr);api_repl\
126335
+ aceLive=(content\
126336
+ )=>{const el=thi\
126337
+ s.dom.get('_appe\
126338
+ nd_live_');if(!e\
126339
+ l)return;if(el.c\
126340
+ lassList.contain\
126341
+ s('hidden')){el.\
126342
+ classList.remove\
126343
+ ('hidden');el.cl\
126344
+ assList.add('vis\
126345
+ ible');}\x0ael.inne\
126346
+ rHTML=content;tr\
126347
+ y{const maybePro\
126348
+ mise=this.render\
126349
+ er.renderPending\
126350
+ Markdown(el);con\
126351
+ st post=()=>{try\
126352
+ {this.highlighte\
126353
+ r.observeNewCode\
126354
+ (el,{deferLastIf\
126355
+ Streaming:true,m\
126356
+ inLinesForLast:t\
126357
+ his.cfg.PROFILE_\
126358
+ CODE.minLinesFor\
126359
+ HL,minCharsForLa\
126360
+ st:this.cfg.PROF\
126361
+ ILE_CODE.minChar\
126362
+ sForHL},this.str\
126363
+ eam.activeCode);\
126364
+ this.highlighter\
126365
+ .observeMsgBoxes\
126366
+ (el,(box)=>{this\
126536
126367
  .highlighter.obs\
126537
- erveNewCode(docu\
126538
- ment,{deferLastI\
126539
- fStreaming:true,\
126540
- minLinesForLast:\
126541
- this.cfg.PROFILE\
126542
- _CODE.minLinesFo\
126543
- rHL,minCharsForL\
126544
- ast:this.cfg.PRO\
126545
- FILE_CODE.minCha\
126546
- rsForHL},this.st\
126547
- ream.activeCode)\
126368
+ erveNewCode(box,\
126369
+ {deferLastIfStre\
126370
+ aming:true,minLi\
126371
+ nesForLast:this.\
126372
+ cfg.PROFILE_CODE\
126373
+ .minLinesForHL,m\
126374
+ inCharsForLast:t\
126375
+ his.cfg.PROFILE_\
126376
+ CODE.minCharsFor\
126377
+ HL},this.stream.\
126378
+ activeCode);this\
126379
+ .codeScroll.init\
126380
+ ScrollableBlocks\
126381
+ (box);});}catch(\
126382
+ _){}\x0atry{const m\
126383
+ m=getMathMode();\
126384
+ if(mm==='finaliz\
126385
+ e-only')this.mat\
126386
+ h.schedule(el,0,\
126387
+ true);else this.\
126388
+ math.schedule(el\
126389
+ );}catch(_){}\x0ath\
126390
+ is.scrollMgr.sch\
126391
+ eduleScroll();};\
126392
+ if(maybePromise&\
126393
+ &typeof maybePro\
126394
+ mise.then==='fun\
126395
+ ction'){maybePro\
126396
+ mise.then(post);\
126397
+ }else{post();}}c\
126398
+ atch(_){this.scr\
126399
+ ollMgr.scheduleS\
126400
+ croll();}};api_u\
126401
+ pdateFooter=(htm\
126402
+ l)=>{const el=th\
126403
+ is.dom.get('_foo\
126404
+ ter_');if(el)el.\
126405
+ innerHTML=html;}\
126406
+ ;api_enableEditI\
126407
+ cons=()=>this.ui\
126408
+ .enableEditIcons\
126409
+ ();api_disableEd\
126410
+ itIcons=()=>this\
126411
+ .ui.disableEditI\
126412
+ cons();api_enabl\
126413
+ eTimestamp=()=>t\
126414
+ his.ui.enableTim\
126415
+ estamp();api_dis\
126416
+ ableTimestamp=()\
126417
+ =>this.ui.disabl\
126418
+ eTimestamp();api\
126419
+ _enableBlocks=()\
126420
+ =>this.ui.enable\
126421
+ Blocks();api_dis\
126422
+ ableBlocks=()=>t\
126423
+ his.ui.disableBl\
126424
+ ocks();api_updat\
126425
+ eCSS=(styles)=>t\
126426
+ his.ui.updateCSS\
126427
+ (styles);api_get\
126428
+ ScrollPosition=(\
126429
+ )=>{this.bridge.\
126430
+ updateScrollPosi\
126431
+ tion(window.scro\
126432
+ llY);};api_setSc\
126433
+ rollPosition=(po\
126434
+ s)=>{try{window.\
126435
+ scrollTo(0,pos);\
126436
+ this.scrollMgr.p\
126437
+ revScroll=parseI\
126438
+ nt(pos);}catch(_\
126439
+ ){}};api_showLoa\
126440
+ ding=()=>this.lo\
126441
+ ading.show();api\
126442
+ _hideLoading=()=\
126443
+ >this.loading.hi\
126444
+ de();api_restore\
126445
+ CollapsedCode=(r\
126446
+ oot)=>this.rende\
126447
+ rer.restoreColla\
126448
+ psedCode(root);a\
126449
+ pi_scrollToTopUs\
126450
+ er=()=>this.scro\
126451
+ llMgr.scrollToTo\
126452
+ pUser();api_scro\
126453
+ llToBottomUser=(\
126454
+ )=>this.scrollMg\
126455
+ r.scrollToBottom\
126456
+ User();api_showT\
126457
+ ips=()=>this.tip\
126458
+ s.show();api_hid\
126459
+ eTips=()=>this.t\
126460
+ ips.hide();api_b\
126461
+ egin=()=>{};api_\
126462
+ end=()=>{this.sc\
126463
+ rollMgr.forceScr\
126464
+ ollToBottomImmed\
126465
+ iateAtEnd();}\x0aap\
126466
+ i_getCustomMarku\
126467
+ pRules=()=>this.\
126468
+ customMarkup.get\
126469
+ Rules();api_setC\
126470
+ ustomMarkupRules\
126471
+ =(rules)=>{this.\
126472
+ customMarkup.set\
126473
+ Rules(rules);try\
126474
+ {this.stream.set\
126475
+ CustomFenceSpecs\
126476
+ (this.customMark\
126477
+ up.getSourceFenc\
126478
+ eSpecs());}catch\
126479
+ (_){}};init(){th\
126480
+ is.highlighter.i\
126481
+ nitHLJS();this.d\
126482
+ om.init();this.u\
126483
+ i.ensureStickyHe\
126484
+ aderStyle();this\
126485
+ .tips=new TipsMa\
126486
+ nager(this.dom);\
126487
+ this.events.inst\
126488
+ all();this.bridg\
126489
+ e.initQWebChanne\
126490
+ l(this.cfg.PID,(\
126491
+ bridge)=>{const \
126492
+ onChunk=(name,ch\
126493
+ unk,type)=>this.\
126494
+ api_onChunk(name\
126495
+ ,chunk,type);con\
126496
+ st onNode=(paylo\
126497
+ ad)=>this.api_ap\
126498
+ pendNode(payload\
126499
+ );const onNodeRe\
126500
+ place=(payload)=\
126501
+ >this.api_replac\
126502
+ eNodes(payload);\
126503
+ const onNodeInpu\
126504
+ t=(html)=>this.a\
126505
+ pi_appendToInput\
126506
+ (html);this.brid\
126507
+ ge.connect(onChu\
126508
+ nk,onNode,onNode\
126509
+ Replace,onNodeIn\
126510
+ put);try{this.lo\
126511
+ gger.bindBridge(\
126512
+ this.bridge.brid\
126513
+ ge||this.bridge)\
126514
+ ;}catch(_){}});t\
126515
+ his.renderer.ini\
126516
+ t();try{this.ren\
126517
+ derer.renderPend\
126518
+ ingMarkdown(docu\
126519
+ ment);}catch(_){\
126520
+ }\x0athis.highlight\
126521
+ er.observeMsgBox\
126522
+ es(document,(box\
126523
+ )=>{this.highlig\
126524
+ hter.observeNewC\
126525
+ ode(box,{deferLa\
126526
+ stIfStreaming:tr\
126527
+ ue,minLinesForLa\
126528
+ st:this.cfg.PROF\
126529
+ ILE_CODE.minLine\
126530
+ sForHL,minCharsF\
126531
+ orLast:this.cfg.\
126532
+ PROFILE_CODE.min\
126533
+ CharsForHL},this\
126534
+ .stream.activeCo\
126535
+ de);this.codeScr\
126536
+ oll.initScrollab\
126537
+ leBlocks(box);})\
126548
126538
  ;this.highlighte\
126549
- r.scheduleScanVi\
126550
- sibleCodes(this.\
126551
- stream.activeCod\
126552
- e);this.tips.cyc\
126553
- le();this.scroll\
126554
- Mgr.updateScroll\
126555
- Fab(true);}\x0aclea\
126556
- nup(){this.tips.\
126557
- cleanup();try{th\
126558
- is.bridge.discon\
126559
- nect();}catch(_)\
126560
- {}\x0athis.events.c\
126561
- leanup();this.hi\
126562
- ghlighter.cleanu\
126563
- p();this.math.cl\
126564
- eanup();this.str\
126565
- eamQ.clear();thi\
126566
- s.dom.cleanup();\
126567
- }}\x0aif(typeof Raf\
126568
- Manager!=='undef\
126569
- ined'&&RafManage\
126570
- r.prototype&&typ\
126571
- eof RafManager.p\
126572
- rototype.cancel=\
126573
- =='function'){Ra\
126574
- fManager.prototy\
126575
- pe.cancel=functi\
126576
- on(key){const t=\
126577
- this.tasks.get(k\
126578
- ey);if(!t)return\
126579
- ;this.tasks.dele\
126580
- te(key);if(t.gro\
126581
- up){const set=th\
126582
- is.groups.get(t.\
126583
- group);if(set){s\
126584
- et.delete(key);i\
126585
- f(set.size===0)t\
126586
- his.groups.delet\
126587
- e(t.group);}}};}\
126588
- \x0awindow.__collap\
126589
- sed_idx=window._\
126590
- _collapsed_idx||\
126591
- [];const runtime\
126592
- =new Runtime();d\
126593
- ocument.addEvent\
126594
- Listener('DOMCon\
126595
- tentLoaded',()=>\
126596
- runtime.init());\
126597
- Object.definePro\
126598
- perty(window,'SE\
126599
- ',{get(){return \
126600
- Utils.SE;}});win\
126601
- dow.beginStream=\
126602
- (chunk)=>runtime\
126603
- .api_beginStream\
126604
- (chunk);window.e\
126605
- ndStream=()=>run\
126606
- time.api_endStre\
126607
- am();window.appl\
126608
- yStream=(name,ch\
126609
- unk)=>runtime.ap\
126610
- i_applyStream(na\
126611
- me,chunk);window\
126612
- .appendStream=(n\
126613
- ame,chunk)=>runt\
126614
- ime.api_appendSt\
126615
- ream(name,chunk)\
126616
- ;window.appendSt\
126617
- reamTyped=(type,\
126618
- name,chunk)=>run\
126619
- time.api_onChunk\
126620
- (name,chunk,type\
126621
- );window.nextStr\
126622
- eam=()=>runtime.\
126623
- api_nextStream()\
126624
- ;window.clearStr\
126625
- eam=()=>runtime.\
126626
- api_clearStream(\
126627
- );window.begin=(\
126628
- )=>runtime.api_b\
126629
- egin();window.en\
126630
- d=()=>runtime.ap\
126631
- i_end();window.a\
126632
- ppendNode=(paylo\
126633
- ad)=>runtime.api\
126634
- _appendNode(payl\
126635
- oad);window.repl\
126636
- aceNodes=(payloa\
126637
- d)=>runtime.api_\
126638
- replaceNodes(pay\
126639
- load);window.app\
126640
- endToInput=(html\
126641
- )=>runtime.api_a\
126642
- ppendToInput(htm\
126643
- l);window.clearN\
126644
- odes=()=>runtime\
126645
- .api_clearNodes(\
126646
- );window.clearIn\
126647
- put=()=>runtime.\
126648
- api_clearInput()\
126649
- ;window.clearOut\
126650
- put=()=>runtime.\
126651
- api_clearOutput(\
126652
- );window.clearLi\
126653
- ve=()=>runtime.a\
126654
- pi_clearLive();w\
126655
- indow.appendTool\
126656
- Output=(c)=>runt\
126657
- ime.api_appendTo\
126658
- olOutput(c);wind\
126659
- ow.updateToolOut\
126660
- put=(c)=>runtime\
126661
- .api_updateToolO\
126662
- utput(c);window.\
126663
- clearToolOutput=\
126664
- ()=>runtime.api_\
126665
- clearToolOutput(\
126666
- );window.beginTo\
126539
+ r.observeNewCode\
126540
+ (document,{defer\
126541
+ LastIfStreaming:\
126542
+ true,minLinesFor\
126543
+ Last:this.cfg.PR\
126544
+ OFILE_CODE.minLi\
126545
+ nesForHL,minChar\
126546
+ sForLast:this.cf\
126547
+ g.PROFILE_CODE.m\
126548
+ inCharsForHL},th\
126549
+ is.stream.active\
126550
+ Code);this.highl\
126551
+ ighter.scheduleS\
126552
+ canVisibleCodes(\
126553
+ this.stream.acti\
126554
+ veCode);this.tip\
126555
+ s.cycle();this.s\
126556
+ crollMgr.updateS\
126557
+ crollFab(true);}\
126558
+ \x0acleanup(){this.\
126559
+ tips.cleanup();t\
126560
+ ry{this.bridge.d\
126561
+ isconnect();}cat\
126562
+ ch(_){}\x0athis.eve\
126563
+ nts.cleanup();th\
126564
+ is.highlighter.c\
126565
+ leanup();this.ma\
126566
+ th.cleanup();thi\
126567
+ s.streamQ.clear(\
126568
+ );this.dom.clean\
126569
+ up();}}\x0aif(typeo\
126570
+ f RafManager!=='\
126571
+ undefined'&&RafM\
126572
+ anager.prototype\
126573
+ &&typeof RafMana\
126574
+ ger.prototype.ca\
126575
+ ncel==='function\
126576
+ '){RafManager.pr\
126577
+ ototype.cancel=f\
126578
+ unction(key){con\
126579
+ st t=this.tasks.\
126580
+ get(key);if(!t)r\
126581
+ eturn;this.tasks\
126582
+ .delete(key);if(\
126583
+ t.group){const s\
126584
+ et=this.groups.g\
126585
+ et(t.group);if(s\
126586
+ et){set.delete(k\
126587
+ ey);if(set.size=\
126588
+ ==0)this.groups.\
126589
+ delete(t.group);\
126590
+ }}};}\x0awindow.__c\
126591
+ ollapsed_idx=win\
126592
+ dow.__collapsed_\
126593
+ idx||[];const ru\
126594
+ ntime=new Runtim\
126595
+ e();document.add\
126596
+ EventListener('D\
126597
+ OMContentLoaded'\
126598
+ ,()=>runtime.ini\
126599
+ t());Object.defi\
126600
+ neProperty(windo\
126601
+ w,'SE',{get(){re\
126602
+ turn Utils.SE;}}\
126603
+ );window.beginSt\
126604
+ ream=(chunk)=>ru\
126605
+ ntime.api_beginS\
126606
+ tream(chunk);win\
126607
+ dow.endStream=()\
126608
+ =>runtime.api_en\
126609
+ dStream();window\
126610
+ .applyStream=(na\
126611
+ me,chunk)=>runti\
126612
+ me.api_applyStre\
126613
+ am(name,chunk);w\
126614
+ indow.appendStre\
126615
+ am=(name,chunk)=\
126616
+ >runtime.api_app\
126617
+ endStream(name,c\
126618
+ hunk);window.app\
126619
+ endStreamTyped=(\
126620
+ type,name,chunk)\
126621
+ =>runtime.api_on\
126622
+ Chunk(name,chunk\
126623
+ ,type);window.ne\
126624
+ xtStream=()=>run\
126625
+ time.api_nextStr\
126626
+ eam();window.cle\
126627
+ arStream=()=>run\
126628
+ time.api_clearSt\
126629
+ ream();window.be\
126630
+ gin=()=>runtime.\
126631
+ api_begin();wind\
126632
+ ow.end=()=>runti\
126633
+ me.api_end();win\
126634
+ dow.appendNode=(\
126635
+ payload)=>runtim\
126636
+ e.api_appendNode\
126637
+ (payload);window\
126638
+ .replaceNodes=(p\
126639
+ ayload)=>runtime\
126640
+ .api_replaceNode\
126641
+ s(payload);windo\
126642
+ w.appendToInput=\
126643
+ (html)=>runtime.\
126644
+ api_appendToInpu\
126645
+ t(html);window.c\
126646
+ learNodes=()=>ru\
126647
+ ntime.api_clearN\
126648
+ odes();window.cl\
126649
+ earInput=()=>run\
126650
+ time.api_clearIn\
126651
+ put();window.cle\
126652
+ arOutput=()=>run\
126653
+ time.api_clearOu\
126654
+ tput();window.cl\
126655
+ earLive=()=>runt\
126656
+ ime.api_clearLiv\
126657
+ e();window.appen\
126658
+ dToolOutput=(c)=\
126659
+ >runtime.api_app\
126660
+ endToolOutput(c)\
126661
+ ;window.updateTo\
126662
+ olOutput=(c)=>ru\
126663
+ ntime.api_update\
126664
+ ToolOutput(c);wi\
126665
+ ndow.clearToolOu\
126666
+ tput=()=>runtime\
126667
+ .api_clearToolOu\
126668
+ tput();window.be\
126669
+ ginToolOutput=()\
126670
+ =>runtime.api_be\
126671
+ ginToolOutput();\
126672
+ window.endToolOu\
126673
+ tput=()=>runtime\
126674
+ .api_endToolOutp\
126675
+ ut();window.enab\
126676
+ leToolOutput=()=\
126677
+ >runtime.api_ena\
126678
+ bleToolOutput();\
126679
+ window.disableTo\
126667
126680
  olOutput=()=>run\
126668
- time.api_beginTo\
126669
- olOutput();windo\
126670
- w.endToolOutput=\
126671
- ()=>runtime.api_\
126672
- endToolOutput();\
126673
- window.enableToo\
126674
- lOutput=()=>runt\
126675
- ime.api_enableTo\
126676
- olOutput();windo\
126677
- w.disableToolOut\
126678
- put=()=>runtime.\
126679
- api_disableToolO\
126680
- utput();window.t\
126681
- oggleToolOutput=\
126682
- (id)=>runtime.ap\
126683
- i_toggleToolOutp\
126684
- ut(id);window.ap\
126685
- pendExtra=(id,c)\
126686
- =>runtime.api_ap\
126687
- pendExtra(id,c);\
126688
- window.removeNod\
126689
- e=(id)=>runtime.\
126690
- api_removeNode(i\
126691
- d);window.remove\
126692
- NodesFromId=(id)\
126693
- =>runtime.api_re\
126694
- moveNodesFromId(\
126695
- id);window.repla\
126696
- ceLive=(c)=>runt\
126697
- ime.api_replaceL\
126698
- ive(c);window.up\
126699
- dateFooter=(c)=>\
126700
- runtime.api_upda\
126701
- teFooter(c);wind\
126702
- ow.enableEditIco\
126703
- ns=()=>runtime.a\
126704
- pi_enableEditIco\
126705
- ns();window.disa\
126706
- bleEditIcons=()=\
126707
- >runtime.api_dis\
126708
- ableEditIcons();\
126709
- window.enableTim\
126710
- estamp=()=>runti\
126711
- me.api_enableTim\
126681
+ time.api_disable\
126682
+ ToolOutput();win\
126683
+ dow.toggleToolOu\
126684
+ tput=(id)=>runti\
126685
+ me.api_toggleToo\
126686
+ lOutput(id);wind\
126687
+ ow.appendExtra=(\
126688
+ id,c)=>runtime.a\
126689
+ pi_appendExtra(i\
126690
+ d,c);window.remo\
126691
+ veNode=(id)=>run\
126692
+ time.api_removeN\
126693
+ ode(id);window.r\
126694
+ emoveNodesFromId\
126695
+ =(id)=>runtime.a\
126696
+ pi_removeNodesFr\
126697
+ omId(id);window.\
126698
+ replaceLive=(c)=\
126699
+ >runtime.api_rep\
126700
+ laceLive(c);wind\
126701
+ ow.updateFooter=\
126702
+ (c)=>runtime.api\
126703
+ _updateFooter(c)\
126704
+ ;window.enableEd\
126705
+ itIcons=()=>runt\
126706
+ ime.api_enableEd\
126707
+ itIcons();window\
126708
+ .disableEditIcon\
126709
+ s=()=>runtime.ap\
126710
+ i_disableEditIco\
126711
+ ns();window.enab\
126712
+ leTimestamp=()=>\
126713
+ runtime.api_enab\
126714
+ leTimestamp();wi\
126715
+ ndow.disableTime\
126716
+ stamp=()=>runtim\
126717
+ e.api_disableTim\
126712
126718
  estamp();window.\
126713
- disableTimestamp\
126714
- =()=>runtime.api\
126715
- _disableTimestam\
126716
- p();window.enabl\
126717
- eBlocks=()=>runt\
126718
- ime.api_enableBl\
126719
- ocks();window.di\
126720
- sableBlocks=()=>\
126721
- runtime.api_disa\
126719
+ enableBlocks=()=\
126720
+ >runtime.api_ena\
126722
126721
  bleBlocks();wind\
126723
- ow.updateCSS=(s)\
126724
- =>runtime.api_up\
126725
- dateCSS(s);windo\
126726
- w.getScrollPosit\
126727
- ion=()=>runtime.\
126728
- api_getScrollPos\
126729
- ition();window.s\
126730
- etScrollPosition\
126731
- =(pos)=>runtime.\
126732
- api_setScrollPos\
126733
- ition(pos);windo\
126734
- w.showLoading=()\
126735
- =>runtime.api_sh\
126736
- owLoading();wind\
126737
- ow.hideLoading=(\
126738
- )=>runtime.api_h\
126739
- ideLoading();win\
126740
- dow.restoreColla\
126741
- psedCode=(root)=\
126742
- >runtime.api_res\
126743
- toreCollapsedCod\
126744
- e(root);window.s\
126745
- crollToTopUser=(\
126746
- )=>runtime.api_s\
126747
- crollToTopUser()\
126748
- ;window.scrollTo\
126749
- BottomUser=()=>r\
126750
- untime.api_scrol\
126751
- lToBottomUser();\
126752
- window.showTips=\
126722
+ ow.disableBlocks\
126723
+ =()=>runtime.api\
126724
+ _disableBlocks()\
126725
+ ;window.updateCS\
126726
+ S=(s)=>runtime.a\
126727
+ pi_updateCSS(s);\
126728
+ window.getScroll\
126729
+ Position=()=>run\
126730
+ time.api_getScro\
126731
+ llPosition();win\
126732
+ dow.setScrollPos\
126733
+ ition=(pos)=>run\
126734
+ time.api_setScro\
126735
+ llPosition(pos);\
126736
+ window.showLoadi\
126737
+ ng=()=>runtime.a\
126738
+ pi_showLoading()\
126739
+ ;window.hideLoad\
126740
+ ing=()=>runtime.\
126741
+ api_hideLoading(\
126742
+ );window.restore\
126743
+ CollapsedCode=(r\
126744
+ oot)=>runtime.ap\
126745
+ i_restoreCollaps\
126746
+ edCode(root);win\
126747
+ dow.scrollToTopU\
126748
+ ser=()=>runtime.\
126749
+ api_scrollToTopU\
126750
+ ser();window.scr\
126751
+ ollToBottomUser=\
126753
126752
  ()=>runtime.api_\
126754
- showTips();windo\
126755
- w.hideTips=()=>r\
126756
- untime.api_hideT\
126757
- ips();window.get\
126758
- CustomMarkupRule\
126759
- s=()=>runtime.ap\
126760
- i_getCustomMarku\
126761
- pRules();window.\
126762
- setCustomMarkupR\
126763
- ules=(rules)=>ru\
126764
- ntime.api_setCus\
126765
- tomMarkupRules(r\
126766
- ules);window.__p\
126767
- ygpt_cleanup=()=\
126768
- >runtime.cleanup\
126769
- ();RafManager.pr\
126770
- ototype.stats=fu\
126771
- nction(){const b\
126772
- yGroup=new Map()\
126773
- ;for(const[key,t\
126774
- ]of this.tasks){\
126775
- const g=t.group|\
126776
- |'default';byGro\
126777
- up.set(g,(byGrou\
126778
- p.get(g)||0)+1);\
126779
- }\x0areturn{tasks:t\
126780
- his.tasks.size,g\
126781
- roups:Array.from\
126782
- (byGroup,([group\
126783
- ,count])=>({grou\
126784
- p,count})).sort(\
126785
- (a,b)=>b.count-a\
126786
- .count)};};RafMa\
126787
- nager.prototype.\
126788
- dumpHotGroups=fu\
126789
- nction(label='')\
126790
- {const s=this.st\
126791
- ats();console.lo\
126792
- g('[RAF]',label,\
126793
- 'tasks=',s.tasks\
126794
- ,'byGroup=',s.gr\
126795
- oups.slice(0,8))\
126796
- ;};RafManager.pr\
126797
- ototype.findDomT\
126798
- asks=function(){\
126799
- const out=[];for\
126800
- (const[key,t]of \
126801
- this.tasks){let \
126802
- el=null;if(key&&\
126803
- key.nodeType===1\
126804
- )el=key;else if(\
126805
- key&&key.el&&key\
126806
- .el.nodeType===1\
126807
- )el=key.el;if(el\
126808
- )out.push({group\
126809
- :t.group,tag:el.\
126810
- tagName,connecte\
126811
- d:el.isConnected\
126812
- });}\x0areturn out;\
126813
- };function gauge\
126814
- SE(se){const rop\
126815
- eLen=(se.streamB\
126816
- uf.length+se._sb\
126817
- Len);const ac=se\
126818
- .activeCode;cons\
126819
- t domFrozen=ac?.\
126820
- frozenEl?.textCo\
126821
- ntent?.length||0\
126822
- ;const domTail=a\
126823
- c?.tailEl?.textC\
126824
- ontent?.length||\
126825
- 0;const domLen=d\
126826
- omFrozen+domTail\
126827
- ;return{ropeLen,\
126828
- domLen,totalChar\
126829
- s:ropeLen+domLen\
126830
- ,ratioRopeToDom:\
126831
- (domLen?(ropeLen\
126832
- /domLen).toFixed\
126833
- (2):'n/a'),fence\
126834
- Open:se.fenceOpe\
126835
- n,codeOpen:se.co\
126836
- deStream?.open};\
126837
- };\x0a\
126753
+ scrollToBottomUs\
126754
+ er();window.show\
126755
+ Tips=()=>runtime\
126756
+ .api_showTips();\
126757
+ window.hideTips=\
126758
+ ()=>runtime.api_\
126759
+ hideTips();windo\
126760
+ w.getCustomMarku\
126761
+ pRules=()=>runti\
126762
+ me.api_getCustom\
126763
+ MarkupRules();wi\
126764
+ ndow.setCustomMa\
126765
+ rkupRules=(rules\
126766
+ )=>runtime.api_s\
126767
+ etCustomMarkupRu\
126768
+ les(rules);windo\
126769
+ w.__pygpt_cleanu\
126770
+ p=()=>runtime.cl\
126771
+ eanup();RafManag\
126772
+ er.prototype.sta\
126773
+ ts=function(){co\
126774
+ nst byGroup=new \
126775
+ Map();for(const[\
126776
+ key,t]of this.ta\
126777
+ sks){const g=t.g\
126778
+ roup||'default';\
126779
+ byGroup.set(g,(b\
126780
+ yGroup.get(g)||0\
126781
+ )+1);}\x0areturn{ta\
126782
+ sks:this.tasks.s\
126783
+ ize,groups:Array\
126784
+ .from(byGroup,([\
126785
+ group,count])=>(\
126786
+ {group,count})).\
126787
+ sort((a,b)=>b.co\
126788
+ unt-a.count)};};\
126789
+ RafManager.proto\
126790
+ type.dumpHotGrou\
126791
+ ps=function(labe\
126792
+ l=''){const s=th\
126793
+ is.stats();conso\
126794
+ le.log('[RAF]',l\
126795
+ abel,'tasks=',s.\
126796
+ tasks,'byGroup='\
126797
+ ,s.groups.slice(\
126798
+ 0,8));};RafManag\
126799
+ er.prototype.fin\
126800
+ dDomTasks=functi\
126801
+ on(){const out=[\
126802
+ ];for(const[key,\
126803
+ t]of this.tasks)\
126804
+ {let el=null;if(\
126805
+ key&&key.nodeTyp\
126806
+ e===1)el=key;els\
126807
+ e if(key&&key.el\
126808
+ &&key.el.nodeTyp\
126809
+ e===1)el=key.el;\
126810
+ if(el)out.push({\
126811
+ group:t.group,ta\
126812
+ g:el.tagName,con\
126813
+ nected:el.isConn\
126814
+ ected});}\x0areturn\
126815
+ out;};function \
126816
+ gaugeSE(se){cons\
126817
+ t ropeLen=(se.st\
126818
+ reamBuf.length+s\
126819
+ e._sbLen);const \
126820
+ ac=se.activeCode\
126821
+ ;const domFrozen\
126822
+ =ac?.frozenEl?.t\
126823
+ extContent?.leng\
126824
+ th||0;const domT\
126825
+ ail=ac?.tailEl?.\
126826
+ textContent?.len\
126827
+ gth||0;const dom\
126828
+ Len=domFrozen+do\
126829
+ mTail;return{rop\
126830
+ eLen,domLen,tota\
126831
+ lChars:ropeLen+d\
126832
+ omLen,ratioRopeT\
126833
+ oDom:(domLen?(ro\
126834
+ peLen/domLen).to\
126835
+ Fixed(2):'n/a'),\
126836
+ fenceOpen:se.fen\
126837
+ ceOpen,codeOpen:\
126838
+ se.codeStream?.o\
126839
+ pen};};\x0a\
126838
126840
  "
126839
126841
 
126840
126842
  qt_resource_name = b"\
@@ -126970,30 +126972,30 @@ qt_resource_struct = b"\
126970
126972
  \x00\x00\x01V\x00\x00\x00\x00\x00\x01\x00\x12\xc7D\
126971
126973
  \x00\x00\x00p\x00\x00\x00\x00\x00\x01\x00\x10\xde9\
126972
126974
  \x00\x00\x01r\x00\x00\x00\x00\x00\x01\x00\x12\xdd\x12\
126973
- \x00\x00\x02h\x00\x00\x00\x00\x00\x01\x00\x17\xe6\xb5\
126975
+ \x00\x00\x02h\x00\x00\x00\x00\x00\x01\x00\x17\xe6\xca\
126974
126976
  \x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x10s\xea\
126975
- \x00\x00\x02\x88\x00\x00\x00\x00\x00\x01\x00\x18\x01\x94\
126976
- \x00\x00\x030\x00\x00\x00\x00\x00\x01\x00\x1b)\xd0\
126977
- \x00\x00\x02\x0e\x00\x00\x00\x00\x00\x01\x00\x13n4\
126978
- \x00\x00\x03\x9c\x00\x00\x00\x00\x00\x01\x00\x1b\xb2\xf6\
126979
- \x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x13\x10I\
126977
+ \x00\x00\x02\x88\x00\x00\x00\x00\x00\x01\x00\x18\x01\xa9\
126978
+ \x00\x00\x030\x00\x00\x00\x00\x00\x01\x00\x1b)\xe5\
126979
+ \x00\x00\x02\x0e\x00\x00\x00\x00\x00\x01\x00\x13nI\
126980
+ \x00\x00\x03\x9c\x00\x00\x00\x00\x00\x01\x00\x1b\xb3\x0b\
126981
+ \x00\x00\x01\xb2\x00\x00\x00\x00\x00\x01\x00\x13\x10^\
126980
126982
  \x00\x00\x00\xf8\x00\x00\x00\x00\x00\x01\x00\x11K\xe7\
126981
- \x00\x00\x01\xf0\x00\x00\x00\x00\x00\x01\x00\x13g.\
126983
+ \x00\x00\x01\xf0\x00\x00\x00\x00\x00\x01\x00\x13gC\
126982
126984
  \x00\x00\x00J\x00\x00\x00\x00\x00\x01\x00\x10\x8c-\
126983
126985
  \x00\x00\x016\x00\x00\x00\x00\x00\x01\x00\x11m\xca\
126984
- \x00\x00\x02\xb2\x00\x00\x00\x00\x00\x01\x00\x19\xe4z\
126985
- \x00\x00\x03R\x00\x00\x00\x00\x00\x01\x00\x1bu \
126986
- \x00\x00\x02\xd0\x00\x00\x00\x00\x00\x01\x00\x1a\x13\xe6\
126987
- \x00\x00\x01\x96\x00\x00\x00\x00\x00\x01\x00\x13\x06\xfb\
126988
- \x00\x00\x02.\x00\x00\x00\x00\x00\x01\x00\x13\x85J\
126986
+ \x00\x00\x02\xb2\x00\x00\x00\x00\x00\x01\x00\x19\xe4\x8f\
126987
+ \x00\x00\x03R\x00\x00\x00\x00\x00\x01\x00\x1bu5\
126988
+ \x00\x00\x02\xd0\x00\x00\x00\x00\x00\x01\x00\x1a\x13\xfb\
126989
+ \x00\x00\x01\x96\x00\x00\x00\x00\x00\x01\x00\x13\x07\x10\
126990
+ \x00\x00\x02.\x00\x00\x00\x00\x00\x01\x00\x13\x85_\
126989
126991
  \x00\x00\x00\x0a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
126990
- \x00\x00\x03\x14\x00\x00\x00\x00\x00\x01\x00\x1b\x1f\xf9\
126991
- \x00\x00\x02L\x00\x00\x00\x00\x00\x01\x00\x17\xbec\
126992
- \x00\x00\x01\xd0\x00\x00\x00\x00\x00\x01\x00\x13-\xb0\
126992
+ \x00\x00\x03\x14\x00\x00\x00\x00\x00\x01\x00\x1b \x0e\
126993
+ \x00\x00\x02L\x00\x00\x00\x00\x00\x01\x00\x17\xbex\
126994
+ \x00\x00\x01\xd0\x00\x00\x00\x00\x00\x01\x00\x13-\xc5\
126993
126995
  \x00\x00\x00\x8a\x00\x00\x00\x00\x00\x01\x00\x11\x07\xcf\
126994
- \x00\x00\x02\xf0\x00\x00\x00\x00\x00\x01\x00\x1a\x8b\xb8\
126996
+ \x00\x00\x02\xf0\x00\x00\x00\x00\x00\x01\x00\x1a\x8b\xcd\
126995
126997
  \x00\x00\x00\xc2\x00\x00\x00\x00\x00\x01\x00\x11E]\
126996
- \x00\x00\x03r\x00\x00\x00\x00\x00\x01\x00\x1b\xa5\x5c\
126998
+ \x00\x00\x03r\x00\x00\x00\x00\x00\x01\x00\x1b\xa5q\
126997
126999
  \x00\x00\x01\x16\x00\x00\x00\x00\x00\x01\x00\x11d\x16\
126998
127000
  "
126999
127001