research-copilot 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +190 -0
- package/app/build/icon.icns +0 -0
- package/app/build/icon.ico +0 -0
- package/app/build/icon.png +0 -0
- package/app/out/main/index.mjs +6719 -0
- package/app/out/preload/index.js +141 -0
- package/app/out/renderer/assets/Inter-Variable-Latin-8kRkwJBP.woff2 +0 -0
- package/app/out/renderer/assets/Inter-Variable-LatinExt-B_-bZUTo.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/app/out/renderer/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/app/out/renderer/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/app/out/renderer/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/app/out/renderer/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-bLPxrCVb.js +89821 -0
- package/app/out/renderer/assets/MilkdownMarkdownEditor-tTNRIB2K.css +2555 -0
- package/app/out/renderer/assets/Tableau10-BqnYsPR6.js +9 -0
- package/app/out/renderer/assets/apl-fqmucPXA.js +140 -0
- package/app/out/renderer/assets/arc-J47ePHZ2.js +132 -0
- package/app/out/renderer/assets/array-DgktLKBx.js +6 -0
- package/app/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
- package/app/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
- package/app/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
- package/app/out/renderer/assets/blockDiagram-c4efeb88-5uRQXgQJ.js +1817 -0
- package/app/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
- package/app/out/renderer/assets/c4Diagram-c83219d4-C4iCTPEL.js +2464 -0
- package/app/out/renderer/assets/channel-ZAmhHE3g.js +7 -0
- package/app/out/renderer/assets/classDiagram-beda092f-7NOZxq_W.js +357 -0
- package/app/out/renderer/assets/classDiagram-v2-2358418a-5fPT-cUH.js +291 -0
- package/app/out/renderer/assets/clike-xqXYL6ge.js +805 -0
- package/app/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
- package/app/out/renderer/assets/clone-CsnzsYXQ.js +8 -0
- package/app/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
- package/app/out/renderer/assets/cobol-4yqQntpt.js +120 -0
- package/app/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
- package/app/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
- package/app/out/renderer/assets/createText-1719965b-Cji7KN4K.js +4904 -0
- package/app/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
- package/app/out/renderer/assets/css-c-jst79C.js +1783 -0
- package/app/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
- package/app/out/renderer/assets/d-UURgV0Ux.js +179 -0
- package/app/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
- package/app/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
- package/app/out/renderer/assets/dtd-Dy74G54E.js +114 -0
- package/app/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
- package/app/out/renderer/assets/ebnf-DAomQUbD.js +139 -0
- package/app/out/renderer/assets/ecl-B59qGGVg.js +178 -0
- package/app/out/renderer/assets/edges-96097737-CD0EvAZQ.js +1844 -0
- package/app/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
- package/app/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
- package/app/out/renderer/assets/erDiagram-0228fc6a-DRYXBpi7.js +1321 -0
- package/app/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
- package/app/out/renderer/assets/factor-CMxFHDqz.js +65 -0
- package/app/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
- package/app/out/renderer/assets/flowDb-c6c81e3f-CuoIN-Cy.js +1713 -0
- package/app/out/renderer/assets/flowDiagram-50d868cf-CPWPLOml.js +1272 -0
- package/app/out/renderer/assets/flowDiagram-v2-4f6560a1-C_R12s4S.js +33 -0
- package/app/out/renderer/assets/flowchart-elk-definition-6af322e1-BdKUSFpi.js +92921 -0
- package/app/out/renderer/assets/forth-B9D2JCeE.js +116 -0
- package/app/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
- package/app/out/renderer/assets/ganttDiagram-a2739b55-ygqT5HlG.js +3399 -0
- package/app/out/renderer/assets/gas-d3KEcW3x.js +294 -0
- package/app/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
- package/app/out/renderer/assets/gitGraphDiagram-82fe8481-D97GT4iA.js +1791 -0
- package/app/out/renderer/assets/graph-DpC13d95.js +1237 -0
- package/app/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
- package/app/out/renderer/assets/haskell-BlGBCCe3.js +459 -0
- package/app/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
- package/app/out/renderer/assets/http-BqypyemW.js +79 -0
- package/app/out/renderer/assets/idl-4HIGJlDI.js +985 -0
- package/app/out/renderer/assets/index-4-ziknCv.js +292 -0
- package/app/out/renderer/assets/index-5325376f-Bbs7Fbqr.js +663 -0
- package/app/out/renderer/assets/index-B2jip-rk.js +2489 -0
- package/app/out/renderer/assets/index-BKTVfokE.js +312 -0
- package/app/out/renderer/assets/index-BiJbFgVG.js +118 -0
- package/app/out/renderer/assets/index-Bn433Fat.js +83 -0
- package/app/out/renderer/assets/index-BqDyyRCx.js +39679 -0
- package/app/out/renderer/assets/index-BzFMeMPn.js +158 -0
- package/app/out/renderer/assets/index-C-_uCjZJ.css +2701 -0
- package/app/out/renderer/assets/index-C1ithNW1.js +1765 -0
- package/app/out/renderer/assets/index-CAJkRYkO.js +407 -0
- package/app/out/renderer/assets/index-CleO0-yj.js +690 -0
- package/app/out/renderer/assets/index-Cq4MH3sY.js +1020 -0
- package/app/out/renderer/assets/index-CtA0Xj22.js +705 -0
- package/app/out/renderer/assets/index-CvAZkqBZ.js +83 -0
- package/app/out/renderer/assets/index-D3UDN-5c.js +152 -0
- package/app/out/renderer/assets/index-D4F9R5ao.js +179 -0
- package/app/out/renderer/assets/index-D6RguhZ5.js +328 -0
- package/app/out/renderer/assets/index-DnEowqXv.js +386 -0
- package/app/out/renderer/assets/index-K8c8Mqdy.js +98 -0
- package/app/out/renderer/assets/index-Kh14gO6K.js +62 -0
- package/app/out/renderer/assets/index-WFd2jRnA.js +333 -0
- package/app/out/renderer/assets/index-WgMfkRFp.js +313 -0
- package/app/out/renderer/assets/index-Y4lKyF6t.js +1042 -0
- package/app/out/renderer/assets/index-fx307_f1.js +643 -0
- package/app/out/renderer/assets/infoDiagram-8eee0895-ptaVSwzq.js +511 -0
- package/app/out/renderer/assets/init-ZxktEp_H.js +16 -0
- package/app/out/renderer/assets/javascript-C3MnDRiU.js +994 -0
- package/app/out/renderer/assets/journeyDiagram-c64418c1-aloEGOQp.js +1184 -0
- package/app/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
- package/app/out/renderer/assets/layout-ZeuHE_aY.js +2217 -0
- package/app/out/renderer/assets/line-CAgaGl-S.js +45 -0
- package/app/out/renderer/assets/linear-DIg7lTe1.js +539 -0
- package/app/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
- package/app/out/renderer/assets/lua-8cJgIlqe.js +256 -0
- package/app/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
- package/app/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
- package/app/out/renderer/assets/mindmap-definition-8da855dc-B8XVoUxz.js +36054 -0
- package/app/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
- package/app/out/renderer/assets/mllike-DHn7xckP.js +334 -0
- package/app/out/renderer/assets/modelica-0d55jYY0.js +147 -0
- package/app/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
- package/app/out/renderer/assets/mumps-Btr8VblO.js +93 -0
- package/app/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
- package/app/out/renderer/assets/nsis-3zG7tgur.js +62 -0
- package/app/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
- package/app/out/renderer/assets/octave-DYBj3-tl.js +200 -0
- package/app/out/renderer/assets/ordinal-DSZU4PqD.js +76 -0
- package/app/out/renderer/assets/oz-R_e8WMIi.js +231 -0
- package/app/out/renderer/assets/pascal-GD8iposT.js +105 -0
- package/app/out/renderer/assets/path-Cp2qmpkd.js +109 -0
- package/app/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
- package/app/out/renderer/assets/pieDiagram-a8764435-DlwoeBU2.js +770 -0
- package/app/out/renderer/assets/pig-C_4T4YIV.js +101 -0
- package/app/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
- package/app/out/renderer/assets/properties-BR-vP1aU.js +58 -0
- package/app/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
- package/app/out/renderer/assets/pug-By0kVCfm.js +405 -0
- package/app/out/renderer/assets/puppet-Bdao66PW.js +137 -0
- package/app/out/renderer/assets/python-CvWbmiX4.js +427 -0
- package/app/out/renderer/assets/q-CrbCVq4a.js +131 -0
- package/app/out/renderer/assets/quadrantDiagram-1e28029f-BaSi1XB4.js +1200 -0
- package/app/out/renderer/assets/r-V7nswm59.js +170 -0
- package/app/out/renderer/assets/requirementDiagram-08caed73-D3EFyegZ.js +1092 -0
- package/app/out/renderer/assets/rpm-C-DLY-If.js +109 -0
- package/app/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
- package/app/out/renderer/assets/sankeyDiagram-a04cb91d-Cv44AsnM.js +1174 -0
- package/app/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
- package/app/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
- package/app/out/renderer/assets/sequenceDiagram-c5b8d532-CuUBu-x4.js +3337 -0
- package/app/out/renderer/assets/shell-BlsXDxCn.js +222 -0
- package/app/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
- package/app/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
- package/app/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
- package/app/out/renderer/assets/solr-CwD7U71z.js +69 -0
- package/app/out/renderer/assets/sparql-DYskk2vE.js +249 -0
- package/app/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
- package/app/out/renderer/assets/sql-BSrOzCRI.js +354 -0
- package/app/out/renderer/assets/stateDiagram-1ecb1508-BOU34Zp4.js +454 -0
- package/app/out/renderer/assets/stateDiagram-v2-c2b004d7-BgRoffou.js +326 -0
- package/app/out/renderer/assets/stex-B6LNC55o.js +231 -0
- package/app/out/renderer/assets/styles-b4e223ce-BMr9TPuj.js +1483 -0
- package/app/out/renderer/assets/styles-ca3715f6-DgbNw99p.js +1363 -0
- package/app/out/renderer/assets/styles-d45a18b0-DtRYKYKf.js +574 -0
- package/app/out/renderer/assets/stylus-BkS-boTH.js +565 -0
- package/app/out/renderer/assets/svgDrawCommon-b86b1483-Bein03PD.js +100 -0
- package/app/out/renderer/assets/swift-FRZi1uvB.js +291 -0
- package/app/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
- package/app/out/renderer/assets/textile-BnFpjsrl.js +414 -0
- package/app/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
- package/app/out/renderer/assets/tiki-B4EPSQ1G.js +265 -0
- package/app/out/renderer/assets/timeline-definition-faaaa080-BlWpLE_4.js +1212 -0
- package/app/out/renderer/assets/toml-BOuWGMcf.js +76 -0
- package/app/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
- package/app/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
- package/app/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
- package/app/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
- package/app/out/renderer/assets/vb-Dp90gtsv.js +196 -0
- package/app/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
- package/app/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
- package/app/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
- package/app/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
- package/app/out/renderer/assets/webidl-BTLTThCm.js +204 -0
- package/app/out/renderer/assets/xquery-BgiOC5Ce.js +525 -0
- package/app/out/renderer/assets/xychartDiagram-f5964ef8-Bhga-YXm.js +1799 -0
- package/app/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
- package/app/out/renderer/assets/z80-BZV19vqv.js +93 -0
- package/app/out/renderer/index.html +13 -0
- package/app/out/skills/community-builtin/README.md +29 -0
- package/app/out/skills/community-builtin/document-docx/SKILL.md +44 -0
- package/app/out/skills/community-builtin/document-docx/scripts/docx-to-markdown.sh +20 -0
- package/app/out/skills/community-builtin/document-docx/scripts/extract-docx-text.sh +28 -0
- package/app/out/skills/community-builtin/document-docx/scripts/init-docx-template.sh +32 -0
- package/app/out/skills/community-builtin/document-docx/scripts/setup-docx-tools.sh +10 -0
- package/app/out/skills/community-builtin/markitdown/SKILL.md +105 -0
- package/app/out/skills/community-builtin/markitdown/scripts/batch-convert.sh +40 -0
- package/app/out/skills/community-builtin/markitdown/scripts/convert-file.sh +24 -0
- package/app/out/skills/community-builtin/markitdown/scripts/setup-markitdown.sh +10 -0
- package/app/out/skills/community-builtin/repo-quick-audit/SKILL.md +27 -0
- package/app/out/skills/community-builtin/repo-quick-audit/scripts/audit-basics.sh +19 -0
- package/app/out/skills/research-pilot-default-project-skills/README.md +23 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/SKILL.md +39 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/doi-to-bibtex.sh +25 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/normalize-bibtex-keys.sh +51 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/setup-citation-tools.sh +10 -0
- package/app/out/skills/research-pilot-default-project-skills/citation-management/scripts/validate-bib.sh +31 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/SKILL.md +34 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/api_reference.md +412 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/common_issues.md +563 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/plot_types.md +476 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/styling_guide.md +589 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/references/subagent_quickstart.md +30 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/plot_template.py +401 -0
- package/app/out/skills/research-pilot-default-project-skills/matplotlib/scripts/style_configurator.py +409 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/SKILL.md +38 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/check-grant-compliance.sh +40 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/grant-summary-card.sh +32 -0
- package/app/out/skills/research-pilot-default-project-skills/research-grants/scripts/init-grant-structure.sh +70 -0
- package/app/package.json +77 -0
- package/bin/cli.mjs +56 -0
- package/lib/README.md +145 -0
- package/lib/skills/_generated.ts +13 -0
- package/lib/skills/builtin/brainstorming-research-ideas/SKILL.md +280 -0
- package/lib/skills/builtin/coding/SKILL.md +114 -0
- package/lib/skills/builtin/creative-thinking-for-research/SKILL.md +273 -0
- package/lib/skills/builtin/matplotlib/SKILL.md +361 -0
- package/lib/skills/builtin/matplotlib/references/api_reference.md +412 -0
- package/lib/skills/builtin/matplotlib/references/common_issues.md +563 -0
- package/lib/skills/builtin/matplotlib/references/plot_types.md +476 -0
- package/lib/skills/builtin/matplotlib/references/styling_guide.md +589 -0
- package/lib/skills/builtin/matplotlib/scripts/plot_template.py +401 -0
- package/lib/skills/builtin/matplotlib/scripts/style_configurator.py +409 -0
- package/lib/skills/builtin/paper-writing/SKILL.md +554 -0
- package/lib/skills/builtin/paper-writing/references/checklists.md +524 -0
- package/lib/skills/builtin/paper-writing/references/citation-workflow.md +562 -0
- package/lib/skills/builtin/paper-writing/references/reviewer-guidelines.md +462 -0
- package/lib/skills/builtin/paper-writing/references/sources.md +189 -0
- package/lib/skills/builtin/paper-writing/references/systems-conferences.md +260 -0
- package/lib/skills/builtin/paper-writing/references/writing-guide.md +476 -0
- package/lib/skills/builtin/paper-writing/templates/README.md +408 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/README.md +534 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-supp.tex +144 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026-unified-template.tex +952 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bib +111 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.bst +1493 -0
- package/lib/skills/builtin/paper-writing/templates/aaai2026/aaai2026.sty +315 -0
- package/lib/skills/builtin/paper-writing/templates/acl/README.md +50 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl.sty +312 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_latex.tex +377 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_lualatex.tex +101 -0
- package/lib/skills/builtin/paper-writing/templates/acl/acl_natbib.bst +1940 -0
- package/lib/skills/builtin/paper-writing/templates/acl/anthology.bib.txt +26 -0
- package/lib/skills/builtin/paper-writing/templates/acl/custom.bib +70 -0
- package/lib/skills/builtin/paper-writing/templates/acl/formatting.md +326 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/main.tex +459 -0
- package/lib/skills/builtin/paper-writing/templates/asplos2027/references.bib +135 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/README.md +3 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bib +11 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.sty +218 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/colm2025_conference.tex +305 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/colm2025/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/fancyhdr.sty +485 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bib +24 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.bst +1440 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.sty +246 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/iclr2026_conference.tex +414 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/math_commands.tex +508 -0
- package/lib/skills/builtin/paper-writing/templates/iclr2026/natbib.sty +1246 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithm.sty +79 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/algorithmic.sty +201 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.bib +75 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/example_paper.tex +662 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/fancyhdr.sty +864 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.bst +1443 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml2026.sty +767 -0
- package/lib/skills/builtin/paper-writing/templates/icml2026/icml_numpapers.pdf +0 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/Makefile +36 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/extra_pkgs.tex +53 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/main.tex +38 -0
- package/lib/skills/builtin/paper-writing/templates/neurips2025/neurips.sty +382 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/main.tex +426 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/references.bib +151 -0
- package/lib/skills/builtin/paper-writing/templates/nsdi2027/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/main.tex +429 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/references.bib +150 -0
- package/lib/skills/builtin/paper-writing/templates/osdi2026/usenix-2020-09.sty +83 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/main.tex +532 -0
- package/lib/skills/builtin/paper-writing/templates/sosp2026/references.bib +148 -0
- package/lib/skills/builtin/research-grants/SKILL.md +958 -0
- package/lib/skills/builtin/research-grants/assets/budget_justification_template.md +453 -0
- package/lib/skills/builtin/research-grants/assets/nih_specific_aims_template.md +166 -0
- package/lib/skills/builtin/research-grants/assets/nsf_project_summary_template.md +92 -0
- package/lib/skills/builtin/research-grants/references/README.md +285 -0
- package/lib/skills/builtin/research-grants/references/broader_impacts.md +392 -0
- package/lib/skills/builtin/research-grants/references/darpa_guidelines.md +636 -0
- package/lib/skills/builtin/research-grants/references/doe_guidelines.md +586 -0
- package/lib/skills/builtin/research-grants/references/nih_guidelines.md +851 -0
- package/lib/skills/builtin/research-grants/references/nsf_guidelines.md +570 -0
- package/lib/skills/builtin/research-grants/references/nstc_guidelines.md +733 -0
- package/lib/skills/builtin/research-grants/references/specific_aims_guide.md +458 -0
- package/lib/skills/builtin/rewrite-humanize/SKILL.md +116 -0
- package/lib/skills/builtin/rewrite-humanize/references/cs-venue-tone.md +57 -0
- package/lib/skills/builtin/rewrite-humanize/references/lexicon.md +50 -0
- package/lib/skills/builtin/scholar-evaluation/SKILL.md +300 -0
- package/lib/skills/builtin/scholar-evaluation/references/evaluation_framework.md +663 -0
- package/lib/skills/builtin/scholar-evaluation/scripts/calculate_scores.py +379 -0
- package/lib/skills/builtin/scientific-schematics/SKILL.md +603 -0
- package/lib/skills/builtin/scientific-schematics/references/QUICK_REFERENCE.md +182 -0
- package/lib/skills/builtin/scientific-schematics/references/README.md +292 -0
- package/lib/skills/builtin/scientific-schematics/references/best_practices.md +560 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/__pycache__/generate_schematic_ai.cpython-312.pyc +0 -0
- package/lib/skills/builtin/scientific-schematics/scripts/example_usage.sh +85 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic.py +141 -0
- package/lib/skills/builtin/scientific-schematics/scripts/generate_schematic_ai.py +910 -0
- package/lib/skills/builtin/scientific-visualization/SKILL.md +749 -0
- package/lib/skills/builtin/scientific-visualization/assets/color_palettes.py +197 -0
- package/lib/skills/builtin/scientific-visualization/assets/nature.mplstyle +63 -0
- package/lib/skills/builtin/scientific-visualization/assets/presentation.mplstyle +61 -0
- package/lib/skills/builtin/scientific-visualization/assets/publication.mplstyle +68 -0
- package/lib/skills/builtin/scientific-visualization/references/color_palettes.md +348 -0
- package/lib/skills/builtin/scientific-visualization/references/journal_requirements.md +320 -0
- package/lib/skills/builtin/scientific-visualization/references/matplotlib_examples.md +620 -0
- package/lib/skills/builtin/scientific-visualization/references/publication_guidelines.md +205 -0
- package/lib/skills/builtin/scientific-visualization/scripts/figure_export.py +343 -0
- package/lib/skills/builtin/scientific-visualization/scripts/style_presets.py +416 -0
- package/lib/skills/builtin/scientific-writing/SKILL.md +745 -0
- package/lib/skills/builtin/scientific-writing/assets/REPORT_FORMATTING_GUIDE.md +574 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report.sty +606 -0
- package/lib/skills/builtin/scientific-writing/assets/scientific_report_template.tex +449 -0
- package/lib/skills/builtin/scientific-writing/references/citation_styles.md +720 -0
- package/lib/skills/builtin/scientific-writing/references/figures_tables.md +806 -0
- package/lib/skills/builtin/scientific-writing/references/imrad_structure.md +686 -0
- package/lib/skills/builtin/scientific-writing/references/professional_report_formatting.md +664 -0
- package/lib/skills/builtin/scientific-writing/references/reporting_guidelines.md +748 -0
- package/lib/skills/builtin/scientific-writing/references/writing_principles.md +824 -0
- package/lib/skills/builtin/seaborn/SKILL.md +674 -0
- package/lib/skills/builtin/seaborn/references/examples.md +822 -0
- package/lib/skills/builtin/seaborn/references/function_reference.md +770 -0
- package/lib/skills/builtin/seaborn/references/objects_interface.md +964 -0
- package/lib/skills/data-analysis/SKILL.md +285 -0
- package/lib/skills/generate-skill-content.mjs +58 -0
- package/lib/skills/index.ts +34 -0
- package/lib/skills/loader.ts +452 -0
- package/package.json +62 -0
|
@@ -0,0 +1,1200 @@
|
|
|
1
|
+
import { m as setAccDescription, n as getAccDescription, H as getDiagramTitle, J as setDiagramTitle, o as getAccTitle, q as setAccTitle, r as getConfig, v as log$1, u as select, w as configureSvgSize, M as clear$1, ab as defaultConfig$2, z as sanitizeText$2, ac as getThemeVariables$2 } from "./MilkdownMarkdownEditor-bLPxrCVb.js";
|
|
2
|
+
import { l as linear } from "./linear-DIg7lTe1.js";
|
|
3
|
+
import "./index-BqDyyRCx.js";
|
|
4
|
+
import "./init-ZxktEp_H.js";
|
|
5
|
+
var parser = function() {
|
|
6
|
+
var o = function(k, v, o2, l) {
|
|
7
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
|
8
|
+
;
|
|
9
|
+
return o2;
|
|
10
|
+
}, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [1, 7], $V5 = [1, 5, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V6 = [1, 5, 6, 13, 15, 17, 19, 20, 25, 27, 28, 29, 30, 31, 32, 33, 34, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], $V7 = [32, 33, 34], $V8 = [2, 7], $V9 = [1, 13], $Va = [1, 17], $Vb = [1, 18], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 21], $Vf = [1, 22], $Vg = [1, 23], $Vh = [1, 24], $Vi = [1, 25], $Vj = [1, 26], $Vk = [1, 27], $Vl = [1, 30], $Vm = [1, 31], $Vn = [1, 32], $Vo = [1, 33], $Vp = [1, 34], $Vq = [1, 35], $Vr = [1, 36], $Vs = [1, 37], $Vt = [1, 38], $Vu = [1, 39], $Vv = [1, 40], $Vw = [1, 41], $Vx = [1, 42], $Vy = [1, 57], $Vz = [1, 58], $VA = [5, 22, 26, 32, 33, 34, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
|
|
11
|
+
var parser2 = {
|
|
12
|
+
trace: function trace() {
|
|
13
|
+
},
|
|
14
|
+
yy: {},
|
|
15
|
+
symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "QUADRANT": 6, "document": 7, "line": 8, "statement": 9, "axisDetails": 10, "quadrantDetails": 11, "points": 12, "title": 13, "title_value": 14, "acc_title": 15, "acc_title_value": 16, "acc_descr": 17, "acc_descr_value": 18, "acc_descr_multiline_value": 19, "section": 20, "text": 21, "point_start": 22, "point_x": 23, "point_y": 24, "X-AXIS": 25, "AXIS-TEXT-DELIMITER": 26, "Y-AXIS": 27, "QUADRANT_1": 28, "QUADRANT_2": 29, "QUADRANT_3": 30, "QUADRANT_4": 31, "NEWLINE": 32, "SEMI": 33, "EOF": 34, "alphaNumToken": 35, "textNoTagsToken": 36, "STR": 37, "MD_STR": 38, "alphaNum": 39, "PUNCTUATION": 40, "AMP": 41, "NUM": 42, "ALPHA": 43, "COMMA": 44, "PLUS": 45, "EQUALS": 46, "MULT": 47, "DOT": 48, "BRKT": 49, "UNDERSCORE": 50, "MINUS": 51, "$accept": 0, "$end": 1 },
|
|
16
|
+
terminals_: { 2: "error", 5: "SPACE", 6: "QUADRANT", 13: "title", 14: "title_value", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 22: "point_start", 23: "point_x", 24: "point_y", 25: "X-AXIS", 26: "AXIS-TEXT-DELIMITER", 27: "Y-AXIS", 28: "QUADRANT_1", 29: "QUADRANT_2", 30: "QUADRANT_3", 31: "QUADRANT_4", 32: "NEWLINE", 33: "SEMI", 34: "EOF", 37: "STR", 38: "MD_STR", 40: "PUNCTUATION", 41: "AMP", 42: "NUM", 43: "ALPHA", 44: "COMMA", 45: "PLUS", 46: "EQUALS", 47: "MULT", 48: "DOT", 49: "BRKT", 50: "UNDERSCORE", 51: "MINUS" },
|
|
17
|
+
productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [9, 0], [9, 2], [9, 1], [9, 1], [9, 1], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [12, 4], [10, 4], [10, 3], [10, 2], [10, 4], [10, 3], [10, 2], [11, 2], [11, 2], [11, 2], [11, 2], [4, 1], [4, 1], [4, 1], [21, 1], [21, 2], [21, 1], [21, 1], [39, 1], [39, 2], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [35, 1], [36, 1], [36, 1], [36, 1]],
|
|
18
|
+
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
19
|
+
var $0 = $$.length - 1;
|
|
20
|
+
switch (yystate) {
|
|
21
|
+
case 12:
|
|
22
|
+
this.$ = $$[$0].trim();
|
|
23
|
+
yy.setDiagramTitle(this.$);
|
|
24
|
+
break;
|
|
25
|
+
case 13:
|
|
26
|
+
this.$ = $$[$0].trim();
|
|
27
|
+
yy.setAccTitle(this.$);
|
|
28
|
+
break;
|
|
29
|
+
case 14:
|
|
30
|
+
case 15:
|
|
31
|
+
this.$ = $$[$0].trim();
|
|
32
|
+
yy.setAccDescription(this.$);
|
|
33
|
+
break;
|
|
34
|
+
case 16:
|
|
35
|
+
yy.addSection($$[$0].substr(8));
|
|
36
|
+
this.$ = $$[$0].substr(8);
|
|
37
|
+
break;
|
|
38
|
+
case 17:
|
|
39
|
+
yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]);
|
|
40
|
+
break;
|
|
41
|
+
case 18:
|
|
42
|
+
yy.setXAxisLeftText($$[$0 - 2]);
|
|
43
|
+
yy.setXAxisRightText($$[$0]);
|
|
44
|
+
break;
|
|
45
|
+
case 19:
|
|
46
|
+
$$[$0 - 1].text += " ⟶ ";
|
|
47
|
+
yy.setXAxisLeftText($$[$0 - 1]);
|
|
48
|
+
break;
|
|
49
|
+
case 20:
|
|
50
|
+
yy.setXAxisLeftText($$[$0]);
|
|
51
|
+
break;
|
|
52
|
+
case 21:
|
|
53
|
+
yy.setYAxisBottomText($$[$0 - 2]);
|
|
54
|
+
yy.setYAxisTopText($$[$0]);
|
|
55
|
+
break;
|
|
56
|
+
case 22:
|
|
57
|
+
$$[$0 - 1].text += " ⟶ ";
|
|
58
|
+
yy.setYAxisBottomText($$[$0 - 1]);
|
|
59
|
+
break;
|
|
60
|
+
case 23:
|
|
61
|
+
yy.setYAxisBottomText($$[$0]);
|
|
62
|
+
break;
|
|
63
|
+
case 24:
|
|
64
|
+
yy.setQuadrant1Text($$[$0]);
|
|
65
|
+
break;
|
|
66
|
+
case 25:
|
|
67
|
+
yy.setQuadrant2Text($$[$0]);
|
|
68
|
+
break;
|
|
69
|
+
case 26:
|
|
70
|
+
yy.setQuadrant3Text($$[$0]);
|
|
71
|
+
break;
|
|
72
|
+
case 27:
|
|
73
|
+
yy.setQuadrant4Text($$[$0]);
|
|
74
|
+
break;
|
|
75
|
+
case 31:
|
|
76
|
+
this.$ = { text: $$[$0], type: "text" };
|
|
77
|
+
break;
|
|
78
|
+
case 32:
|
|
79
|
+
this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
|
|
80
|
+
break;
|
|
81
|
+
case 33:
|
|
82
|
+
this.$ = { text: $$[$0], type: "text" };
|
|
83
|
+
break;
|
|
84
|
+
case 34:
|
|
85
|
+
this.$ = { text: $$[$0], type: "markdown" };
|
|
86
|
+
break;
|
|
87
|
+
case 35:
|
|
88
|
+
this.$ = $$[$0];
|
|
89
|
+
break;
|
|
90
|
+
case 36:
|
|
91
|
+
this.$ = $$[$0 - 1] + "" + $$[$0];
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
table: [{ 3: 1, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 1: [3] }, { 3: 8, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, { 3: 9, 4: 2, 5: $V0, 6: $V1, 32: $V2, 33: $V3, 34: $V4 }, o($V5, [2, 4], { 7: 10 }), o($V6, [2, 28]), o($V6, [2, 29]), o($V6, [2, 30]), { 1: [2, 1] }, { 1: [2, 2] }, o($V7, $V8, { 8: 11, 9: 12, 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 1: [2, 3], 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V5, [2, 5]), { 4: 43, 32: $V2, 33: $V3, 34: $V4 }, o($V7, $V8, { 10: 14, 11: 15, 12: 16, 21: 28, 35: 29, 9: 44, 5: $V9, 13: $Va, 15: $Vb, 17: $Vc, 19: $Vd, 20: $Ve, 25: $Vf, 27: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 9]), o($V7, [2, 10]), o($V7, [2, 11]), { 14: [1, 45] }, { 16: [1, 46] }, { 18: [1, 47] }, o($V7, [2, 15]), o($V7, [2, 16]), { 21: 48, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 49, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 50, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 51, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 52, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 21: 53, 35: 29, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }, { 5: $Vy, 22: [1, 54], 35: 56, 36: 55, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }, o($VA, [2, 31]), o($VA, [2, 33]), o($VA, [2, 34]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), o($VA, [2, 41]), o($VA, [2, 42]), o($VA, [2, 43]), o($VA, [2, 44]), o($VA, [2, 45]), o($VA, [2, 46]), o($VA, [2, 47]), o($V5, [2, 6]), o($V7, [2, 8]), o($V7, [2, 12]), o($V7, [2, 13]), o($V7, [2, 14]), o($V7, [2, 20], { 36: 55, 35: 56, 5: $Vy, 26: [1, 59], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 23], { 36: 55, 35: 56, 5: $Vy, 26: [1, 60], 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 24], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 25], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 26], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 27], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), { 23: [1, 61] }, o($VA, [2, 32]), o($VA, [2, 48]), o($VA, [2, 49]), o($VA, [2, 50]), o($V7, [2, 19], { 35: 29, 21: 62, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), o($V7, [2, 22], { 35: 29, 21: 63, 37: $Vl, 38: $Vm, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx }), { 24: [1, 64] }, o($V7, [2, 18], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 21], { 36: 55, 35: 56, 5: $Vy, 40: $Vn, 41: $Vo, 42: $Vp, 43: $Vq, 44: $Vr, 45: $Vs, 46: $Vt, 47: $Vu, 48: $Vv, 49: $Vw, 50: $Vx, 51: $Vz }), o($V7, [2, 17])],
|
|
96
|
+
defaultActions: { 8: [2, 1], 9: [2, 2] },
|
|
97
|
+
parseError: function parseError(str, hash) {
|
|
98
|
+
if (hash.recoverable) {
|
|
99
|
+
this.trace(str);
|
|
100
|
+
} else {
|
|
101
|
+
var error = new Error(str);
|
|
102
|
+
error.hash = hash;
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
parse: function parse(input) {
|
|
107
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
|
108
|
+
var args = lstack.slice.call(arguments, 1);
|
|
109
|
+
var lexer2 = Object.create(this.lexer);
|
|
110
|
+
var sharedState = { yy: {} };
|
|
111
|
+
for (var k in this.yy) {
|
|
112
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
113
|
+
sharedState.yy[k] = this.yy[k];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
lexer2.setInput(input, sharedState.yy);
|
|
117
|
+
sharedState.yy.lexer = lexer2;
|
|
118
|
+
sharedState.yy.parser = this;
|
|
119
|
+
if (typeof lexer2.yylloc == "undefined") {
|
|
120
|
+
lexer2.yylloc = {};
|
|
121
|
+
}
|
|
122
|
+
var yyloc = lexer2.yylloc;
|
|
123
|
+
lstack.push(yyloc);
|
|
124
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
|
125
|
+
if (typeof sharedState.yy.parseError === "function") {
|
|
126
|
+
this.parseError = sharedState.yy.parseError;
|
|
127
|
+
} else {
|
|
128
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
129
|
+
}
|
|
130
|
+
function lex() {
|
|
131
|
+
var token;
|
|
132
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
|
133
|
+
if (typeof token !== "number") {
|
|
134
|
+
if (token instanceof Array) {
|
|
135
|
+
tstack = token;
|
|
136
|
+
token = tstack.pop();
|
|
137
|
+
}
|
|
138
|
+
token = self.symbols_[token] || token;
|
|
139
|
+
}
|
|
140
|
+
return token;
|
|
141
|
+
}
|
|
142
|
+
var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
|
143
|
+
while (true) {
|
|
144
|
+
state = stack[stack.length - 1];
|
|
145
|
+
if (this.defaultActions[state]) {
|
|
146
|
+
action = this.defaultActions[state];
|
|
147
|
+
} else {
|
|
148
|
+
if (symbol === null || typeof symbol == "undefined") {
|
|
149
|
+
symbol = lex();
|
|
150
|
+
}
|
|
151
|
+
action = table[state] && table[state][symbol];
|
|
152
|
+
}
|
|
153
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
154
|
+
var errStr = "";
|
|
155
|
+
expected = [];
|
|
156
|
+
for (p in table[state]) {
|
|
157
|
+
if (this.terminals_[p] && p > TERROR) {
|
|
158
|
+
expected.push("'" + this.terminals_[p] + "'");
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (lexer2.showPosition) {
|
|
162
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
163
|
+
} else {
|
|
164
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
165
|
+
}
|
|
166
|
+
this.parseError(errStr, {
|
|
167
|
+
text: lexer2.match,
|
|
168
|
+
token: this.terminals_[symbol] || symbol,
|
|
169
|
+
line: lexer2.yylineno,
|
|
170
|
+
loc: yyloc,
|
|
171
|
+
expected
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
175
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
176
|
+
}
|
|
177
|
+
switch (action[0]) {
|
|
178
|
+
case 1:
|
|
179
|
+
stack.push(symbol);
|
|
180
|
+
vstack.push(lexer2.yytext);
|
|
181
|
+
lstack.push(lexer2.yylloc);
|
|
182
|
+
stack.push(action[1]);
|
|
183
|
+
symbol = null;
|
|
184
|
+
{
|
|
185
|
+
yyleng = lexer2.yyleng;
|
|
186
|
+
yytext = lexer2.yytext;
|
|
187
|
+
yylineno = lexer2.yylineno;
|
|
188
|
+
yyloc = lexer2.yylloc;
|
|
189
|
+
}
|
|
190
|
+
break;
|
|
191
|
+
case 2:
|
|
192
|
+
len = this.productions_[action[1]][1];
|
|
193
|
+
yyval.$ = vstack[vstack.length - len];
|
|
194
|
+
yyval._$ = {
|
|
195
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
196
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
197
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
198
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
199
|
+
};
|
|
200
|
+
if (ranges) {
|
|
201
|
+
yyval._$.range = [
|
|
202
|
+
lstack[lstack.length - (len || 1)].range[0],
|
|
203
|
+
lstack[lstack.length - 1].range[1]
|
|
204
|
+
];
|
|
205
|
+
}
|
|
206
|
+
r = this.performAction.apply(yyval, [
|
|
207
|
+
yytext,
|
|
208
|
+
yyleng,
|
|
209
|
+
yylineno,
|
|
210
|
+
sharedState.yy,
|
|
211
|
+
action[1],
|
|
212
|
+
vstack,
|
|
213
|
+
lstack
|
|
214
|
+
].concat(args));
|
|
215
|
+
if (typeof r !== "undefined") {
|
|
216
|
+
return r;
|
|
217
|
+
}
|
|
218
|
+
if (len) {
|
|
219
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
220
|
+
vstack = vstack.slice(0, -1 * len);
|
|
221
|
+
lstack = lstack.slice(0, -1 * len);
|
|
222
|
+
}
|
|
223
|
+
stack.push(this.productions_[action[1]][0]);
|
|
224
|
+
vstack.push(yyval.$);
|
|
225
|
+
lstack.push(yyval._$);
|
|
226
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
227
|
+
stack.push(newState);
|
|
228
|
+
break;
|
|
229
|
+
case 3:
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return true;
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
var lexer = /* @__PURE__ */ function() {
|
|
237
|
+
var lexer2 = {
|
|
238
|
+
EOF: 1,
|
|
239
|
+
parseError: function parseError(str, hash) {
|
|
240
|
+
if (this.yy.parser) {
|
|
241
|
+
this.yy.parser.parseError(str, hash);
|
|
242
|
+
} else {
|
|
243
|
+
throw new Error(str);
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
// resets the lexer, sets new input
|
|
247
|
+
setInput: function(input, yy) {
|
|
248
|
+
this.yy = yy || this.yy || {};
|
|
249
|
+
this._input = input;
|
|
250
|
+
this._more = this._backtrack = this.done = false;
|
|
251
|
+
this.yylineno = this.yyleng = 0;
|
|
252
|
+
this.yytext = this.matched = this.match = "";
|
|
253
|
+
this.conditionStack = ["INITIAL"];
|
|
254
|
+
this.yylloc = {
|
|
255
|
+
first_line: 1,
|
|
256
|
+
first_column: 0,
|
|
257
|
+
last_line: 1,
|
|
258
|
+
last_column: 0
|
|
259
|
+
};
|
|
260
|
+
if (this.options.ranges) {
|
|
261
|
+
this.yylloc.range = [0, 0];
|
|
262
|
+
}
|
|
263
|
+
this.offset = 0;
|
|
264
|
+
return this;
|
|
265
|
+
},
|
|
266
|
+
// consumes and returns one char from the input
|
|
267
|
+
input: function() {
|
|
268
|
+
var ch = this._input[0];
|
|
269
|
+
this.yytext += ch;
|
|
270
|
+
this.yyleng++;
|
|
271
|
+
this.offset++;
|
|
272
|
+
this.match += ch;
|
|
273
|
+
this.matched += ch;
|
|
274
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
275
|
+
if (lines) {
|
|
276
|
+
this.yylineno++;
|
|
277
|
+
this.yylloc.last_line++;
|
|
278
|
+
} else {
|
|
279
|
+
this.yylloc.last_column++;
|
|
280
|
+
}
|
|
281
|
+
if (this.options.ranges) {
|
|
282
|
+
this.yylloc.range[1]++;
|
|
283
|
+
}
|
|
284
|
+
this._input = this._input.slice(1);
|
|
285
|
+
return ch;
|
|
286
|
+
},
|
|
287
|
+
// unshifts one char (or a string) into the input
|
|
288
|
+
unput: function(ch) {
|
|
289
|
+
var len = ch.length;
|
|
290
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
291
|
+
this._input = ch + this._input;
|
|
292
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
293
|
+
this.offset -= len;
|
|
294
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
295
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
296
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
297
|
+
if (lines.length - 1) {
|
|
298
|
+
this.yylineno -= lines.length - 1;
|
|
299
|
+
}
|
|
300
|
+
var r = this.yylloc.range;
|
|
301
|
+
this.yylloc = {
|
|
302
|
+
first_line: this.yylloc.first_line,
|
|
303
|
+
last_line: this.yylineno + 1,
|
|
304
|
+
first_column: this.yylloc.first_column,
|
|
305
|
+
last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
|
306
|
+
};
|
|
307
|
+
if (this.options.ranges) {
|
|
308
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
309
|
+
}
|
|
310
|
+
this.yyleng = this.yytext.length;
|
|
311
|
+
return this;
|
|
312
|
+
},
|
|
313
|
+
// When called from action, caches matched text and appends it on next action
|
|
314
|
+
more: function() {
|
|
315
|
+
this._more = true;
|
|
316
|
+
return this;
|
|
317
|
+
},
|
|
318
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
319
|
+
reject: function() {
|
|
320
|
+
if (this.options.backtrack_lexer) {
|
|
321
|
+
this._backtrack = true;
|
|
322
|
+
} else {
|
|
323
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
|
|
324
|
+
text: "",
|
|
325
|
+
token: null,
|
|
326
|
+
line: this.yylineno
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
return this;
|
|
330
|
+
},
|
|
331
|
+
// retain first n characters of the match
|
|
332
|
+
less: function(n) {
|
|
333
|
+
this.unput(this.match.slice(n));
|
|
334
|
+
},
|
|
335
|
+
// displays already matched input, i.e. for error messages
|
|
336
|
+
pastInput: function() {
|
|
337
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
338
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
339
|
+
},
|
|
340
|
+
// displays upcoming input, i.e. for error messages
|
|
341
|
+
upcomingInput: function() {
|
|
342
|
+
var next = this.match;
|
|
343
|
+
if (next.length < 20) {
|
|
344
|
+
next += this._input.substr(0, 20 - next.length);
|
|
345
|
+
}
|
|
346
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
347
|
+
},
|
|
348
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
349
|
+
showPosition: function() {
|
|
350
|
+
var pre = this.pastInput();
|
|
351
|
+
var c = new Array(pre.length + 1).join("-");
|
|
352
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
353
|
+
},
|
|
354
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
355
|
+
test_match: function(match, indexed_rule) {
|
|
356
|
+
var token, lines, backup;
|
|
357
|
+
if (this.options.backtrack_lexer) {
|
|
358
|
+
backup = {
|
|
359
|
+
yylineno: this.yylineno,
|
|
360
|
+
yylloc: {
|
|
361
|
+
first_line: this.yylloc.first_line,
|
|
362
|
+
last_line: this.last_line,
|
|
363
|
+
first_column: this.yylloc.first_column,
|
|
364
|
+
last_column: this.yylloc.last_column
|
|
365
|
+
},
|
|
366
|
+
yytext: this.yytext,
|
|
367
|
+
match: this.match,
|
|
368
|
+
matches: this.matches,
|
|
369
|
+
matched: this.matched,
|
|
370
|
+
yyleng: this.yyleng,
|
|
371
|
+
offset: this.offset,
|
|
372
|
+
_more: this._more,
|
|
373
|
+
_input: this._input,
|
|
374
|
+
yy: this.yy,
|
|
375
|
+
conditionStack: this.conditionStack.slice(0),
|
|
376
|
+
done: this.done
|
|
377
|
+
};
|
|
378
|
+
if (this.options.ranges) {
|
|
379
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
383
|
+
if (lines) {
|
|
384
|
+
this.yylineno += lines.length;
|
|
385
|
+
}
|
|
386
|
+
this.yylloc = {
|
|
387
|
+
first_line: this.yylloc.last_line,
|
|
388
|
+
last_line: this.yylineno + 1,
|
|
389
|
+
first_column: this.yylloc.last_column,
|
|
390
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
391
|
+
};
|
|
392
|
+
this.yytext += match[0];
|
|
393
|
+
this.match += match[0];
|
|
394
|
+
this.matches = match;
|
|
395
|
+
this.yyleng = this.yytext.length;
|
|
396
|
+
if (this.options.ranges) {
|
|
397
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
398
|
+
}
|
|
399
|
+
this._more = false;
|
|
400
|
+
this._backtrack = false;
|
|
401
|
+
this._input = this._input.slice(match[0].length);
|
|
402
|
+
this.matched += match[0];
|
|
403
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
404
|
+
if (this.done && this._input) {
|
|
405
|
+
this.done = false;
|
|
406
|
+
}
|
|
407
|
+
if (token) {
|
|
408
|
+
return token;
|
|
409
|
+
} else if (this._backtrack) {
|
|
410
|
+
for (var k in backup) {
|
|
411
|
+
this[k] = backup[k];
|
|
412
|
+
}
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
return false;
|
|
416
|
+
},
|
|
417
|
+
// return next match in input
|
|
418
|
+
next: function() {
|
|
419
|
+
if (this.done) {
|
|
420
|
+
return this.EOF;
|
|
421
|
+
}
|
|
422
|
+
if (!this._input) {
|
|
423
|
+
this.done = true;
|
|
424
|
+
}
|
|
425
|
+
var token, match, tempMatch, index;
|
|
426
|
+
if (!this._more) {
|
|
427
|
+
this.yytext = "";
|
|
428
|
+
this.match = "";
|
|
429
|
+
}
|
|
430
|
+
var rules = this._currentRules();
|
|
431
|
+
for (var i = 0; i < rules.length; i++) {
|
|
432
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
433
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
434
|
+
match = tempMatch;
|
|
435
|
+
index = i;
|
|
436
|
+
if (this.options.backtrack_lexer) {
|
|
437
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
438
|
+
if (token !== false) {
|
|
439
|
+
return token;
|
|
440
|
+
} else if (this._backtrack) {
|
|
441
|
+
match = false;
|
|
442
|
+
continue;
|
|
443
|
+
} else {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
} else if (!this.options.flex) {
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
if (match) {
|
|
452
|
+
token = this.test_match(match, rules[index]);
|
|
453
|
+
if (token !== false) {
|
|
454
|
+
return token;
|
|
455
|
+
}
|
|
456
|
+
return false;
|
|
457
|
+
}
|
|
458
|
+
if (this._input === "") {
|
|
459
|
+
return this.EOF;
|
|
460
|
+
} else {
|
|
461
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
462
|
+
text: "",
|
|
463
|
+
token: null,
|
|
464
|
+
line: this.yylineno
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
// return next match that has a token
|
|
469
|
+
lex: function lex() {
|
|
470
|
+
var r = this.next();
|
|
471
|
+
if (r) {
|
|
472
|
+
return r;
|
|
473
|
+
} else {
|
|
474
|
+
return this.lex();
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
478
|
+
begin: function begin(condition) {
|
|
479
|
+
this.conditionStack.push(condition);
|
|
480
|
+
},
|
|
481
|
+
// pop the previously active lexer condition state off the condition stack
|
|
482
|
+
popState: function popState() {
|
|
483
|
+
var n = this.conditionStack.length - 1;
|
|
484
|
+
if (n > 0) {
|
|
485
|
+
return this.conditionStack.pop();
|
|
486
|
+
} else {
|
|
487
|
+
return this.conditionStack[0];
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
491
|
+
_currentRules: function _currentRules() {
|
|
492
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
493
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
494
|
+
} else {
|
|
495
|
+
return this.conditions["INITIAL"].rules;
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
499
|
+
topState: function topState(n) {
|
|
500
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
501
|
+
if (n >= 0) {
|
|
502
|
+
return this.conditionStack[n];
|
|
503
|
+
} else {
|
|
504
|
+
return "INITIAL";
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
// alias for begin(condition)
|
|
508
|
+
pushState: function pushState(condition) {
|
|
509
|
+
this.begin(condition);
|
|
510
|
+
},
|
|
511
|
+
// return the number of states currently on the stack
|
|
512
|
+
stateStackSize: function stateStackSize() {
|
|
513
|
+
return this.conditionStack.length;
|
|
514
|
+
},
|
|
515
|
+
options: { "case-insensitive": true },
|
|
516
|
+
performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
517
|
+
switch ($avoiding_name_collisions) {
|
|
518
|
+
case 0:
|
|
519
|
+
break;
|
|
520
|
+
case 1:
|
|
521
|
+
break;
|
|
522
|
+
case 2:
|
|
523
|
+
return 32;
|
|
524
|
+
case 3:
|
|
525
|
+
break;
|
|
526
|
+
case 4:
|
|
527
|
+
this.begin("title");
|
|
528
|
+
return 13;
|
|
529
|
+
case 5:
|
|
530
|
+
this.popState();
|
|
531
|
+
return "title_value";
|
|
532
|
+
case 6:
|
|
533
|
+
this.begin("acc_title");
|
|
534
|
+
return 15;
|
|
535
|
+
case 7:
|
|
536
|
+
this.popState();
|
|
537
|
+
return "acc_title_value";
|
|
538
|
+
case 8:
|
|
539
|
+
this.begin("acc_descr");
|
|
540
|
+
return 17;
|
|
541
|
+
case 9:
|
|
542
|
+
this.popState();
|
|
543
|
+
return "acc_descr_value";
|
|
544
|
+
case 10:
|
|
545
|
+
this.begin("acc_descr_multiline");
|
|
546
|
+
break;
|
|
547
|
+
case 11:
|
|
548
|
+
this.popState();
|
|
549
|
+
break;
|
|
550
|
+
case 12:
|
|
551
|
+
return "acc_descr_multiline_value";
|
|
552
|
+
case 13:
|
|
553
|
+
return 25;
|
|
554
|
+
case 14:
|
|
555
|
+
return 27;
|
|
556
|
+
case 15:
|
|
557
|
+
return 26;
|
|
558
|
+
case 16:
|
|
559
|
+
return 28;
|
|
560
|
+
case 17:
|
|
561
|
+
return 29;
|
|
562
|
+
case 18:
|
|
563
|
+
return 30;
|
|
564
|
+
case 19:
|
|
565
|
+
return 31;
|
|
566
|
+
case 20:
|
|
567
|
+
this.begin("md_string");
|
|
568
|
+
break;
|
|
569
|
+
case 21:
|
|
570
|
+
return "MD_STR";
|
|
571
|
+
case 22:
|
|
572
|
+
this.popState();
|
|
573
|
+
break;
|
|
574
|
+
case 23:
|
|
575
|
+
this.begin("string");
|
|
576
|
+
break;
|
|
577
|
+
case 24:
|
|
578
|
+
this.popState();
|
|
579
|
+
break;
|
|
580
|
+
case 25:
|
|
581
|
+
return "STR";
|
|
582
|
+
case 26:
|
|
583
|
+
this.begin("point_start");
|
|
584
|
+
return 22;
|
|
585
|
+
case 27:
|
|
586
|
+
this.begin("point_x");
|
|
587
|
+
return 23;
|
|
588
|
+
case 28:
|
|
589
|
+
this.popState();
|
|
590
|
+
break;
|
|
591
|
+
case 29:
|
|
592
|
+
this.popState();
|
|
593
|
+
this.begin("point_y");
|
|
594
|
+
break;
|
|
595
|
+
case 30:
|
|
596
|
+
this.popState();
|
|
597
|
+
return 24;
|
|
598
|
+
case 31:
|
|
599
|
+
return 6;
|
|
600
|
+
case 32:
|
|
601
|
+
return 43;
|
|
602
|
+
case 33:
|
|
603
|
+
return "COLON";
|
|
604
|
+
case 34:
|
|
605
|
+
return 45;
|
|
606
|
+
case 35:
|
|
607
|
+
return 44;
|
|
608
|
+
case 36:
|
|
609
|
+
return 46;
|
|
610
|
+
case 37:
|
|
611
|
+
return 46;
|
|
612
|
+
case 38:
|
|
613
|
+
return 47;
|
|
614
|
+
case 39:
|
|
615
|
+
return 49;
|
|
616
|
+
case 40:
|
|
617
|
+
return 50;
|
|
618
|
+
case 41:
|
|
619
|
+
return 48;
|
|
620
|
+
case 42:
|
|
621
|
+
return 41;
|
|
622
|
+
case 43:
|
|
623
|
+
return 51;
|
|
624
|
+
case 44:
|
|
625
|
+
return 42;
|
|
626
|
+
case 45:
|
|
627
|
+
return 5;
|
|
628
|
+
case 46:
|
|
629
|
+
return 33;
|
|
630
|
+
case 47:
|
|
631
|
+
return 40;
|
|
632
|
+
case 48:
|
|
633
|
+
return 34;
|
|
634
|
+
}
|
|
635
|
+
},
|
|
636
|
+
rules: [/^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n\r]+)/i, /^(?:%%[^\n]*)/i, /^(?:title\b)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?: *x-axis *)/i, /^(?: *y-axis *)/i, /^(?: *--+> *)/i, /^(?: *quadrant-1 *)/i, /^(?: *quadrant-2 *)/i, /^(?: *quadrant-3 *)/i, /^(?: *quadrant-4 *)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\s*:\s*\[\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?:\s*\] *)/i, /^(?:\s*,\s*)/i, /^(?:(1)|(0(.\d+)?))/i, /^(?: *quadrantChart *)/i, /^(?:[A-Za-z]+)/i, /^(?::)/i, /^(?:\+)/i, /^(?:,)/i, /^(?:=)/i, /^(?:=)/i, /^(?:\*)/i, /^(?:#)/i, /^(?:[\_])/i, /^(?:\.)/i, /^(?:&)/i, /^(?:-)/i, /^(?:[0-9]+)/i, /^(?:\s)/i, /^(?:;)/i, /^(?:[!"#$%&'*+,-.`?\\_/])/i, /^(?:$)/i],
|
|
637
|
+
conditions: { "point_y": { "rules": [30], "inclusive": false }, "point_x": { "rules": [29], "inclusive": false }, "point_start": { "rules": [27, 28], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "title": { "rules": [5], "inclusive": false }, "md_string": { "rules": [21, 22], "inclusive": false }, "string": { "rules": [24, 25], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "inclusive": true } }
|
|
638
|
+
};
|
|
639
|
+
return lexer2;
|
|
640
|
+
}();
|
|
641
|
+
parser2.lexer = lexer;
|
|
642
|
+
function Parser() {
|
|
643
|
+
this.yy = {};
|
|
644
|
+
}
|
|
645
|
+
Parser.prototype = parser2;
|
|
646
|
+
parser2.Parser = Parser;
|
|
647
|
+
return new Parser();
|
|
648
|
+
}();
|
|
649
|
+
parser.parser = parser;
|
|
650
|
+
const parser$1 = parser;
|
|
651
|
+
const defaultThemeVariables = getThemeVariables$2();
|
|
652
|
+
class QuadrantBuilder {
|
|
653
|
+
constructor() {
|
|
654
|
+
this.config = this.getDefaultConfig();
|
|
655
|
+
this.themeConfig = this.getDefaultThemeConfig();
|
|
656
|
+
this.data = this.getDefaultData();
|
|
657
|
+
}
|
|
658
|
+
getDefaultData() {
|
|
659
|
+
return {
|
|
660
|
+
titleText: "",
|
|
661
|
+
quadrant1Text: "",
|
|
662
|
+
quadrant2Text: "",
|
|
663
|
+
quadrant3Text: "",
|
|
664
|
+
quadrant4Text: "",
|
|
665
|
+
xAxisLeftText: "",
|
|
666
|
+
xAxisRightText: "",
|
|
667
|
+
yAxisBottomText: "",
|
|
668
|
+
yAxisTopText: "",
|
|
669
|
+
points: []
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
getDefaultConfig() {
|
|
673
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
674
|
+
return {
|
|
675
|
+
showXAxis: true,
|
|
676
|
+
showYAxis: true,
|
|
677
|
+
showTitle: true,
|
|
678
|
+
chartHeight: ((_a = defaultConfig$2.quadrantChart) == null ? void 0 : _a.chartWidth) || 500,
|
|
679
|
+
chartWidth: ((_b = defaultConfig$2.quadrantChart) == null ? void 0 : _b.chartHeight) || 500,
|
|
680
|
+
titlePadding: ((_c = defaultConfig$2.quadrantChart) == null ? void 0 : _c.titlePadding) || 10,
|
|
681
|
+
titleFontSize: ((_d = defaultConfig$2.quadrantChart) == null ? void 0 : _d.titleFontSize) || 20,
|
|
682
|
+
quadrantPadding: ((_e = defaultConfig$2.quadrantChart) == null ? void 0 : _e.quadrantPadding) || 5,
|
|
683
|
+
xAxisLabelPadding: ((_f = defaultConfig$2.quadrantChart) == null ? void 0 : _f.xAxisLabelPadding) || 5,
|
|
684
|
+
yAxisLabelPadding: ((_g = defaultConfig$2.quadrantChart) == null ? void 0 : _g.yAxisLabelPadding) || 5,
|
|
685
|
+
xAxisLabelFontSize: ((_h = defaultConfig$2.quadrantChart) == null ? void 0 : _h.xAxisLabelFontSize) || 16,
|
|
686
|
+
yAxisLabelFontSize: ((_i = defaultConfig$2.quadrantChart) == null ? void 0 : _i.yAxisLabelFontSize) || 16,
|
|
687
|
+
quadrantLabelFontSize: ((_j = defaultConfig$2.quadrantChart) == null ? void 0 : _j.quadrantLabelFontSize) || 16,
|
|
688
|
+
quadrantTextTopPadding: ((_k = defaultConfig$2.quadrantChart) == null ? void 0 : _k.quadrantTextTopPadding) || 5,
|
|
689
|
+
pointTextPadding: ((_l = defaultConfig$2.quadrantChart) == null ? void 0 : _l.pointTextPadding) || 5,
|
|
690
|
+
pointLabelFontSize: ((_m = defaultConfig$2.quadrantChart) == null ? void 0 : _m.pointLabelFontSize) || 12,
|
|
691
|
+
pointRadius: ((_n = defaultConfig$2.quadrantChart) == null ? void 0 : _n.pointRadius) || 5,
|
|
692
|
+
xAxisPosition: ((_o = defaultConfig$2.quadrantChart) == null ? void 0 : _o.xAxisPosition) || "top",
|
|
693
|
+
yAxisPosition: ((_p = defaultConfig$2.quadrantChart) == null ? void 0 : _p.yAxisPosition) || "left",
|
|
694
|
+
quadrantInternalBorderStrokeWidth: ((_q = defaultConfig$2.quadrantChart) == null ? void 0 : _q.quadrantInternalBorderStrokeWidth) || 1,
|
|
695
|
+
quadrantExternalBorderStrokeWidth: ((_r = defaultConfig$2.quadrantChart) == null ? void 0 : _r.quadrantExternalBorderStrokeWidth) || 2
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
getDefaultThemeConfig() {
|
|
699
|
+
return {
|
|
700
|
+
quadrant1Fill: defaultThemeVariables.quadrant1Fill,
|
|
701
|
+
quadrant2Fill: defaultThemeVariables.quadrant2Fill,
|
|
702
|
+
quadrant3Fill: defaultThemeVariables.quadrant3Fill,
|
|
703
|
+
quadrant4Fill: defaultThemeVariables.quadrant4Fill,
|
|
704
|
+
quadrant1TextFill: defaultThemeVariables.quadrant1TextFill,
|
|
705
|
+
quadrant2TextFill: defaultThemeVariables.quadrant2TextFill,
|
|
706
|
+
quadrant3TextFill: defaultThemeVariables.quadrant3TextFill,
|
|
707
|
+
quadrant4TextFill: defaultThemeVariables.quadrant4TextFill,
|
|
708
|
+
quadrantPointFill: defaultThemeVariables.quadrantPointFill,
|
|
709
|
+
quadrantPointTextFill: defaultThemeVariables.quadrantPointTextFill,
|
|
710
|
+
quadrantXAxisTextFill: defaultThemeVariables.quadrantXAxisTextFill,
|
|
711
|
+
quadrantYAxisTextFill: defaultThemeVariables.quadrantYAxisTextFill,
|
|
712
|
+
quadrantTitleFill: defaultThemeVariables.quadrantTitleFill,
|
|
713
|
+
quadrantInternalBorderStrokeFill: defaultThemeVariables.quadrantInternalBorderStrokeFill,
|
|
714
|
+
quadrantExternalBorderStrokeFill: defaultThemeVariables.quadrantExternalBorderStrokeFill
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
clear() {
|
|
718
|
+
this.config = this.getDefaultConfig();
|
|
719
|
+
this.themeConfig = this.getDefaultThemeConfig();
|
|
720
|
+
this.data = this.getDefaultData();
|
|
721
|
+
log$1.info("clear called");
|
|
722
|
+
}
|
|
723
|
+
setData(data) {
|
|
724
|
+
this.data = { ...this.data, ...data };
|
|
725
|
+
}
|
|
726
|
+
addPoints(points) {
|
|
727
|
+
this.data.points = [...points, ...this.data.points];
|
|
728
|
+
}
|
|
729
|
+
setConfig(config2) {
|
|
730
|
+
log$1.trace("setConfig called with: ", config2);
|
|
731
|
+
this.config = { ...this.config, ...config2 };
|
|
732
|
+
}
|
|
733
|
+
setThemeConfig(themeConfig) {
|
|
734
|
+
log$1.trace("setThemeConfig called with: ", themeConfig);
|
|
735
|
+
this.themeConfig = { ...this.themeConfig, ...themeConfig };
|
|
736
|
+
}
|
|
737
|
+
calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle) {
|
|
738
|
+
const xAxisSpaceCalculation = this.config.xAxisLabelPadding * 2 + this.config.xAxisLabelFontSize;
|
|
739
|
+
const xAxisSpace = {
|
|
740
|
+
top: xAxisPosition === "top" && showXAxis ? xAxisSpaceCalculation : 0,
|
|
741
|
+
bottom: xAxisPosition === "bottom" && showXAxis ? xAxisSpaceCalculation : 0
|
|
742
|
+
};
|
|
743
|
+
const yAxisSpaceCalculation = this.config.yAxisLabelPadding * 2 + this.config.yAxisLabelFontSize;
|
|
744
|
+
const yAxisSpace = {
|
|
745
|
+
left: this.config.yAxisPosition === "left" && showYAxis ? yAxisSpaceCalculation : 0,
|
|
746
|
+
right: this.config.yAxisPosition === "right" && showYAxis ? yAxisSpaceCalculation : 0
|
|
747
|
+
};
|
|
748
|
+
const titleSpaceCalculation = this.config.titleFontSize + this.config.titlePadding * 2;
|
|
749
|
+
const titleSpace = {
|
|
750
|
+
top: showTitle ? titleSpaceCalculation : 0
|
|
751
|
+
};
|
|
752
|
+
const quadrantLeft = this.config.quadrantPadding + yAxisSpace.left;
|
|
753
|
+
const quadrantTop = this.config.quadrantPadding + xAxisSpace.top + titleSpace.top;
|
|
754
|
+
const quadrantWidth = this.config.chartWidth - this.config.quadrantPadding * 2 - yAxisSpace.left - yAxisSpace.right;
|
|
755
|
+
const quadrantHeight = this.config.chartHeight - this.config.quadrantPadding * 2 - xAxisSpace.top - xAxisSpace.bottom - titleSpace.top;
|
|
756
|
+
const quadrantHalfWidth = quadrantWidth / 2;
|
|
757
|
+
const quadrantHalfHeight = quadrantHeight / 2;
|
|
758
|
+
const quadrantSpace = {
|
|
759
|
+
quadrantLeft,
|
|
760
|
+
quadrantTop,
|
|
761
|
+
quadrantWidth,
|
|
762
|
+
quadrantHalfWidth,
|
|
763
|
+
quadrantHeight,
|
|
764
|
+
quadrantHalfHeight
|
|
765
|
+
};
|
|
766
|
+
return {
|
|
767
|
+
xAxisSpace,
|
|
768
|
+
yAxisSpace,
|
|
769
|
+
titleSpace,
|
|
770
|
+
quadrantSpace
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
getAxisLabels(xAxisPosition, showXAxis, showYAxis, spaceData) {
|
|
774
|
+
const { quadrantSpace, titleSpace } = spaceData;
|
|
775
|
+
const {
|
|
776
|
+
quadrantHalfHeight,
|
|
777
|
+
quadrantHeight,
|
|
778
|
+
quadrantLeft,
|
|
779
|
+
quadrantHalfWidth,
|
|
780
|
+
quadrantTop,
|
|
781
|
+
quadrantWidth
|
|
782
|
+
} = quadrantSpace;
|
|
783
|
+
const drawXAxisLabelsInMiddle = Boolean(this.data.xAxisRightText);
|
|
784
|
+
const drawYAxisLabelsInMiddle = Boolean(this.data.yAxisTopText);
|
|
785
|
+
const axisLabels = [];
|
|
786
|
+
if (this.data.xAxisLeftText && showXAxis) {
|
|
787
|
+
axisLabels.push({
|
|
788
|
+
text: this.data.xAxisLeftText,
|
|
789
|
+
fill: this.themeConfig.quadrantXAxisTextFill,
|
|
790
|
+
x: quadrantLeft + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),
|
|
791
|
+
y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding,
|
|
792
|
+
fontSize: this.config.xAxisLabelFontSize,
|
|
793
|
+
verticalPos: drawXAxisLabelsInMiddle ? "center" : "left",
|
|
794
|
+
horizontalPos: "top",
|
|
795
|
+
rotation: 0
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
if (this.data.xAxisRightText && showXAxis) {
|
|
799
|
+
axisLabels.push({
|
|
800
|
+
text: this.data.xAxisRightText,
|
|
801
|
+
fill: this.themeConfig.quadrantXAxisTextFill,
|
|
802
|
+
x: quadrantLeft + quadrantHalfWidth + (drawXAxisLabelsInMiddle ? quadrantHalfWidth / 2 : 0),
|
|
803
|
+
y: xAxisPosition === "top" ? this.config.xAxisLabelPadding + titleSpace.top : this.config.xAxisLabelPadding + quadrantTop + quadrantHeight + this.config.quadrantPadding,
|
|
804
|
+
fontSize: this.config.xAxisLabelFontSize,
|
|
805
|
+
verticalPos: drawXAxisLabelsInMiddle ? "center" : "left",
|
|
806
|
+
horizontalPos: "top",
|
|
807
|
+
rotation: 0
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
if (this.data.yAxisBottomText && showYAxis) {
|
|
811
|
+
axisLabels.push({
|
|
812
|
+
text: this.data.yAxisBottomText,
|
|
813
|
+
fill: this.themeConfig.quadrantYAxisTextFill,
|
|
814
|
+
x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding,
|
|
815
|
+
y: quadrantTop + quadrantHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),
|
|
816
|
+
fontSize: this.config.yAxisLabelFontSize,
|
|
817
|
+
verticalPos: drawYAxisLabelsInMiddle ? "center" : "left",
|
|
818
|
+
horizontalPos: "top",
|
|
819
|
+
rotation: -90
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
if (this.data.yAxisTopText && showYAxis) {
|
|
823
|
+
axisLabels.push({
|
|
824
|
+
text: this.data.yAxisTopText,
|
|
825
|
+
fill: this.themeConfig.quadrantYAxisTextFill,
|
|
826
|
+
x: this.config.yAxisPosition === "left" ? this.config.yAxisLabelPadding : this.config.yAxisLabelPadding + quadrantLeft + quadrantWidth + this.config.quadrantPadding,
|
|
827
|
+
y: quadrantTop + quadrantHalfHeight - (drawYAxisLabelsInMiddle ? quadrantHalfHeight / 2 : 0),
|
|
828
|
+
fontSize: this.config.yAxisLabelFontSize,
|
|
829
|
+
verticalPos: drawYAxisLabelsInMiddle ? "center" : "left",
|
|
830
|
+
horizontalPos: "top",
|
|
831
|
+
rotation: -90
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
return axisLabels;
|
|
835
|
+
}
|
|
836
|
+
getQuadrants(spaceData) {
|
|
837
|
+
const { quadrantSpace } = spaceData;
|
|
838
|
+
const { quadrantHalfHeight, quadrantLeft, quadrantHalfWidth, quadrantTop } = quadrantSpace;
|
|
839
|
+
const quadrants = [
|
|
840
|
+
{
|
|
841
|
+
text: {
|
|
842
|
+
text: this.data.quadrant1Text,
|
|
843
|
+
fill: this.themeConfig.quadrant1TextFill,
|
|
844
|
+
x: 0,
|
|
845
|
+
y: 0,
|
|
846
|
+
fontSize: this.config.quadrantLabelFontSize,
|
|
847
|
+
verticalPos: "center",
|
|
848
|
+
horizontalPos: "middle",
|
|
849
|
+
rotation: 0
|
|
850
|
+
},
|
|
851
|
+
x: quadrantLeft + quadrantHalfWidth,
|
|
852
|
+
y: quadrantTop,
|
|
853
|
+
width: quadrantHalfWidth,
|
|
854
|
+
height: quadrantHalfHeight,
|
|
855
|
+
fill: this.themeConfig.quadrant1Fill
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
text: {
|
|
859
|
+
text: this.data.quadrant2Text,
|
|
860
|
+
fill: this.themeConfig.quadrant2TextFill,
|
|
861
|
+
x: 0,
|
|
862
|
+
y: 0,
|
|
863
|
+
fontSize: this.config.quadrantLabelFontSize,
|
|
864
|
+
verticalPos: "center",
|
|
865
|
+
horizontalPos: "middle",
|
|
866
|
+
rotation: 0
|
|
867
|
+
},
|
|
868
|
+
x: quadrantLeft,
|
|
869
|
+
y: quadrantTop,
|
|
870
|
+
width: quadrantHalfWidth,
|
|
871
|
+
height: quadrantHalfHeight,
|
|
872
|
+
fill: this.themeConfig.quadrant2Fill
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
text: {
|
|
876
|
+
text: this.data.quadrant3Text,
|
|
877
|
+
fill: this.themeConfig.quadrant3TextFill,
|
|
878
|
+
x: 0,
|
|
879
|
+
y: 0,
|
|
880
|
+
fontSize: this.config.quadrantLabelFontSize,
|
|
881
|
+
verticalPos: "center",
|
|
882
|
+
horizontalPos: "middle",
|
|
883
|
+
rotation: 0
|
|
884
|
+
},
|
|
885
|
+
x: quadrantLeft,
|
|
886
|
+
y: quadrantTop + quadrantHalfHeight,
|
|
887
|
+
width: quadrantHalfWidth,
|
|
888
|
+
height: quadrantHalfHeight,
|
|
889
|
+
fill: this.themeConfig.quadrant3Fill
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
text: {
|
|
893
|
+
text: this.data.quadrant4Text,
|
|
894
|
+
fill: this.themeConfig.quadrant4TextFill,
|
|
895
|
+
x: 0,
|
|
896
|
+
y: 0,
|
|
897
|
+
fontSize: this.config.quadrantLabelFontSize,
|
|
898
|
+
verticalPos: "center",
|
|
899
|
+
horizontalPos: "middle",
|
|
900
|
+
rotation: 0
|
|
901
|
+
},
|
|
902
|
+
x: quadrantLeft + quadrantHalfWidth,
|
|
903
|
+
y: quadrantTop + quadrantHalfHeight,
|
|
904
|
+
width: quadrantHalfWidth,
|
|
905
|
+
height: quadrantHalfHeight,
|
|
906
|
+
fill: this.themeConfig.quadrant4Fill
|
|
907
|
+
}
|
|
908
|
+
];
|
|
909
|
+
for (const quadrant of quadrants) {
|
|
910
|
+
quadrant.text.x = quadrant.x + quadrant.width / 2;
|
|
911
|
+
if (this.data.points.length === 0) {
|
|
912
|
+
quadrant.text.y = quadrant.y + quadrant.height / 2;
|
|
913
|
+
quadrant.text.horizontalPos = "middle";
|
|
914
|
+
} else {
|
|
915
|
+
quadrant.text.y = quadrant.y + this.config.quadrantTextTopPadding;
|
|
916
|
+
quadrant.text.horizontalPos = "top";
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
return quadrants;
|
|
920
|
+
}
|
|
921
|
+
getQuadrantPoints(spaceData) {
|
|
922
|
+
const { quadrantSpace } = spaceData;
|
|
923
|
+
const { quadrantHeight, quadrantLeft, quadrantTop, quadrantWidth } = quadrantSpace;
|
|
924
|
+
const xAxis = linear().domain([0, 1]).range([quadrantLeft, quadrantWidth + quadrantLeft]);
|
|
925
|
+
const yAxis = linear().domain([0, 1]).range([quadrantHeight + quadrantTop, quadrantTop]);
|
|
926
|
+
const points = this.data.points.map((point) => {
|
|
927
|
+
const props = {
|
|
928
|
+
x: xAxis(point.x),
|
|
929
|
+
y: yAxis(point.y),
|
|
930
|
+
fill: this.themeConfig.quadrantPointFill,
|
|
931
|
+
radius: this.config.pointRadius,
|
|
932
|
+
text: {
|
|
933
|
+
text: point.text,
|
|
934
|
+
fill: this.themeConfig.quadrantPointTextFill,
|
|
935
|
+
x: xAxis(point.x),
|
|
936
|
+
y: yAxis(point.y) + this.config.pointTextPadding,
|
|
937
|
+
verticalPos: "center",
|
|
938
|
+
horizontalPos: "top",
|
|
939
|
+
fontSize: this.config.pointLabelFontSize,
|
|
940
|
+
rotation: 0
|
|
941
|
+
}
|
|
942
|
+
};
|
|
943
|
+
return props;
|
|
944
|
+
});
|
|
945
|
+
return points;
|
|
946
|
+
}
|
|
947
|
+
getBorders(spaceData) {
|
|
948
|
+
const halfExternalBorderWidth = this.config.quadrantExternalBorderStrokeWidth / 2;
|
|
949
|
+
const { quadrantSpace } = spaceData;
|
|
950
|
+
const {
|
|
951
|
+
quadrantHalfHeight,
|
|
952
|
+
quadrantHeight,
|
|
953
|
+
quadrantLeft,
|
|
954
|
+
quadrantHalfWidth,
|
|
955
|
+
quadrantTop,
|
|
956
|
+
quadrantWidth
|
|
957
|
+
} = quadrantSpace;
|
|
958
|
+
const borderLines = [
|
|
959
|
+
// top border
|
|
960
|
+
{
|
|
961
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
962
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
963
|
+
x1: quadrantLeft - halfExternalBorderWidth,
|
|
964
|
+
y1: quadrantTop,
|
|
965
|
+
x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,
|
|
966
|
+
y2: quadrantTop
|
|
967
|
+
},
|
|
968
|
+
// right border
|
|
969
|
+
{
|
|
970
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
971
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
972
|
+
x1: quadrantLeft + quadrantWidth,
|
|
973
|
+
y1: quadrantTop + halfExternalBorderWidth,
|
|
974
|
+
x2: quadrantLeft + quadrantWidth,
|
|
975
|
+
y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
|
|
976
|
+
},
|
|
977
|
+
// bottom border
|
|
978
|
+
{
|
|
979
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
980
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
981
|
+
x1: quadrantLeft - halfExternalBorderWidth,
|
|
982
|
+
y1: quadrantTop + quadrantHeight,
|
|
983
|
+
x2: quadrantLeft + quadrantWidth + halfExternalBorderWidth,
|
|
984
|
+
y2: quadrantTop + quadrantHeight
|
|
985
|
+
},
|
|
986
|
+
// left border
|
|
987
|
+
{
|
|
988
|
+
strokeFill: this.themeConfig.quadrantExternalBorderStrokeFill,
|
|
989
|
+
strokeWidth: this.config.quadrantExternalBorderStrokeWidth,
|
|
990
|
+
x1: quadrantLeft,
|
|
991
|
+
y1: quadrantTop + halfExternalBorderWidth,
|
|
992
|
+
x2: quadrantLeft,
|
|
993
|
+
y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
|
|
994
|
+
},
|
|
995
|
+
// vertical inner border
|
|
996
|
+
{
|
|
997
|
+
strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
|
|
998
|
+
strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
|
|
999
|
+
x1: quadrantLeft + quadrantHalfWidth,
|
|
1000
|
+
y1: quadrantTop + halfExternalBorderWidth,
|
|
1001
|
+
x2: quadrantLeft + quadrantHalfWidth,
|
|
1002
|
+
y2: quadrantTop + quadrantHeight - halfExternalBorderWidth
|
|
1003
|
+
},
|
|
1004
|
+
// horizontal inner border
|
|
1005
|
+
{
|
|
1006
|
+
strokeFill: this.themeConfig.quadrantInternalBorderStrokeFill,
|
|
1007
|
+
strokeWidth: this.config.quadrantInternalBorderStrokeWidth,
|
|
1008
|
+
x1: quadrantLeft + halfExternalBorderWidth,
|
|
1009
|
+
y1: quadrantTop + quadrantHalfHeight,
|
|
1010
|
+
x2: quadrantLeft + quadrantWidth - halfExternalBorderWidth,
|
|
1011
|
+
y2: quadrantTop + quadrantHalfHeight
|
|
1012
|
+
}
|
|
1013
|
+
];
|
|
1014
|
+
return borderLines;
|
|
1015
|
+
}
|
|
1016
|
+
getTitle(showTitle) {
|
|
1017
|
+
if (showTitle) {
|
|
1018
|
+
return {
|
|
1019
|
+
text: this.data.titleText,
|
|
1020
|
+
fill: this.themeConfig.quadrantTitleFill,
|
|
1021
|
+
fontSize: this.config.titleFontSize,
|
|
1022
|
+
horizontalPos: "top",
|
|
1023
|
+
verticalPos: "center",
|
|
1024
|
+
rotation: 0,
|
|
1025
|
+
y: this.config.titlePadding,
|
|
1026
|
+
x: this.config.chartWidth / 2
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
build() {
|
|
1032
|
+
const showXAxis = this.config.showXAxis && !!(this.data.xAxisLeftText || this.data.xAxisRightText);
|
|
1033
|
+
const showYAxis = this.config.showYAxis && !!(this.data.yAxisTopText || this.data.yAxisBottomText);
|
|
1034
|
+
const showTitle = this.config.showTitle && !!this.data.titleText;
|
|
1035
|
+
const xAxisPosition = this.data.points.length > 0 ? "bottom" : this.config.xAxisPosition;
|
|
1036
|
+
const calculatedSpace = this.calculateSpace(xAxisPosition, showXAxis, showYAxis, showTitle);
|
|
1037
|
+
return {
|
|
1038
|
+
points: this.getQuadrantPoints(calculatedSpace),
|
|
1039
|
+
quadrants: this.getQuadrants(calculatedSpace),
|
|
1040
|
+
axisLabels: this.getAxisLabels(xAxisPosition, showXAxis, showYAxis, calculatedSpace),
|
|
1041
|
+
borderLines: this.getBorders(calculatedSpace),
|
|
1042
|
+
title: this.getTitle(showTitle)
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
const config = getConfig();
|
|
1047
|
+
function textSanitizer(text) {
|
|
1048
|
+
return sanitizeText$2(text.trim(), config);
|
|
1049
|
+
}
|
|
1050
|
+
const quadrantBuilder = new QuadrantBuilder();
|
|
1051
|
+
function setQuadrant1Text(textObj) {
|
|
1052
|
+
quadrantBuilder.setData({ quadrant1Text: textSanitizer(textObj.text) });
|
|
1053
|
+
}
|
|
1054
|
+
function setQuadrant2Text(textObj) {
|
|
1055
|
+
quadrantBuilder.setData({ quadrant2Text: textSanitizer(textObj.text) });
|
|
1056
|
+
}
|
|
1057
|
+
function setQuadrant3Text(textObj) {
|
|
1058
|
+
quadrantBuilder.setData({ quadrant3Text: textSanitizer(textObj.text) });
|
|
1059
|
+
}
|
|
1060
|
+
function setQuadrant4Text(textObj) {
|
|
1061
|
+
quadrantBuilder.setData({ quadrant4Text: textSanitizer(textObj.text) });
|
|
1062
|
+
}
|
|
1063
|
+
function setXAxisLeftText(textObj) {
|
|
1064
|
+
quadrantBuilder.setData({ xAxisLeftText: textSanitizer(textObj.text) });
|
|
1065
|
+
}
|
|
1066
|
+
function setXAxisRightText(textObj) {
|
|
1067
|
+
quadrantBuilder.setData({ xAxisRightText: textSanitizer(textObj.text) });
|
|
1068
|
+
}
|
|
1069
|
+
function setYAxisTopText(textObj) {
|
|
1070
|
+
quadrantBuilder.setData({ yAxisTopText: textSanitizer(textObj.text) });
|
|
1071
|
+
}
|
|
1072
|
+
function setYAxisBottomText(textObj) {
|
|
1073
|
+
quadrantBuilder.setData({ yAxisBottomText: textSanitizer(textObj.text) });
|
|
1074
|
+
}
|
|
1075
|
+
function addPoint(textObj, x, y) {
|
|
1076
|
+
quadrantBuilder.addPoints([{ x, y, text: textSanitizer(textObj.text) }]);
|
|
1077
|
+
}
|
|
1078
|
+
function setWidth(width) {
|
|
1079
|
+
quadrantBuilder.setConfig({ chartWidth: width });
|
|
1080
|
+
}
|
|
1081
|
+
function setHeight(height) {
|
|
1082
|
+
quadrantBuilder.setConfig({ chartHeight: height });
|
|
1083
|
+
}
|
|
1084
|
+
function getQuadrantData() {
|
|
1085
|
+
const config2 = getConfig();
|
|
1086
|
+
const { themeVariables, quadrantChart: quadrantChartConfig } = config2;
|
|
1087
|
+
if (quadrantChartConfig) {
|
|
1088
|
+
quadrantBuilder.setConfig(quadrantChartConfig);
|
|
1089
|
+
}
|
|
1090
|
+
quadrantBuilder.setThemeConfig({
|
|
1091
|
+
quadrant1Fill: themeVariables.quadrant1Fill,
|
|
1092
|
+
quadrant2Fill: themeVariables.quadrant2Fill,
|
|
1093
|
+
quadrant3Fill: themeVariables.quadrant3Fill,
|
|
1094
|
+
quadrant4Fill: themeVariables.quadrant4Fill,
|
|
1095
|
+
quadrant1TextFill: themeVariables.quadrant1TextFill,
|
|
1096
|
+
quadrant2TextFill: themeVariables.quadrant2TextFill,
|
|
1097
|
+
quadrant3TextFill: themeVariables.quadrant3TextFill,
|
|
1098
|
+
quadrant4TextFill: themeVariables.quadrant4TextFill,
|
|
1099
|
+
quadrantPointFill: themeVariables.quadrantPointFill,
|
|
1100
|
+
quadrantPointTextFill: themeVariables.quadrantPointTextFill,
|
|
1101
|
+
quadrantXAxisTextFill: themeVariables.quadrantXAxisTextFill,
|
|
1102
|
+
quadrantYAxisTextFill: themeVariables.quadrantYAxisTextFill,
|
|
1103
|
+
quadrantExternalBorderStrokeFill: themeVariables.quadrantExternalBorderStrokeFill,
|
|
1104
|
+
quadrantInternalBorderStrokeFill: themeVariables.quadrantInternalBorderStrokeFill,
|
|
1105
|
+
quadrantTitleFill: themeVariables.quadrantTitleFill
|
|
1106
|
+
});
|
|
1107
|
+
quadrantBuilder.setData({ titleText: getDiagramTitle() });
|
|
1108
|
+
return quadrantBuilder.build();
|
|
1109
|
+
}
|
|
1110
|
+
const clear = function() {
|
|
1111
|
+
quadrantBuilder.clear();
|
|
1112
|
+
clear$1();
|
|
1113
|
+
};
|
|
1114
|
+
const db = {
|
|
1115
|
+
setWidth,
|
|
1116
|
+
setHeight,
|
|
1117
|
+
setQuadrant1Text,
|
|
1118
|
+
setQuadrant2Text,
|
|
1119
|
+
setQuadrant3Text,
|
|
1120
|
+
setQuadrant4Text,
|
|
1121
|
+
setXAxisLeftText,
|
|
1122
|
+
setXAxisRightText,
|
|
1123
|
+
setYAxisTopText,
|
|
1124
|
+
setYAxisBottomText,
|
|
1125
|
+
addPoint,
|
|
1126
|
+
getQuadrantData,
|
|
1127
|
+
clear,
|
|
1128
|
+
setAccTitle,
|
|
1129
|
+
getAccTitle,
|
|
1130
|
+
setDiagramTitle,
|
|
1131
|
+
getDiagramTitle,
|
|
1132
|
+
getAccDescription,
|
|
1133
|
+
setAccDescription
|
|
1134
|
+
};
|
|
1135
|
+
const draw = (txt, id, _version, diagObj) => {
|
|
1136
|
+
var _a, _b, _c;
|
|
1137
|
+
function getDominantBaseLine(horizontalPos) {
|
|
1138
|
+
return horizontalPos === "top" ? "hanging" : "middle";
|
|
1139
|
+
}
|
|
1140
|
+
function getTextAnchor(verticalPos) {
|
|
1141
|
+
return verticalPos === "left" ? "start" : "middle";
|
|
1142
|
+
}
|
|
1143
|
+
function getTransformation(data) {
|
|
1144
|
+
return `translate(${data.x}, ${data.y}) rotate(${data.rotation || 0})`;
|
|
1145
|
+
}
|
|
1146
|
+
const conf = getConfig();
|
|
1147
|
+
log$1.debug("Rendering quadrant chart\n" + txt);
|
|
1148
|
+
const securityLevel = conf.securityLevel;
|
|
1149
|
+
let sandboxElement;
|
|
1150
|
+
if (securityLevel === "sandbox") {
|
|
1151
|
+
sandboxElement = select("#i" + id);
|
|
1152
|
+
}
|
|
1153
|
+
const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body");
|
|
1154
|
+
const svg = root.select(`[id="${id}"]`);
|
|
1155
|
+
const group = svg.append("g").attr("class", "main");
|
|
1156
|
+
const width = ((_a = conf.quadrantChart) == null ? void 0 : _a.chartWidth) || 500;
|
|
1157
|
+
const height = ((_b = conf.quadrantChart) == null ? void 0 : _b.chartHeight) || 500;
|
|
1158
|
+
configureSvgSize(svg, height, width, ((_c = conf.quadrantChart) == null ? void 0 : _c.useMaxWidth) || true);
|
|
1159
|
+
svg.attr("viewBox", "0 0 " + width + " " + height);
|
|
1160
|
+
diagObj.db.setHeight(height);
|
|
1161
|
+
diagObj.db.setWidth(width);
|
|
1162
|
+
const quadrantData = diagObj.db.getQuadrantData();
|
|
1163
|
+
const quadrantsGroup = group.append("g").attr("class", "quadrants");
|
|
1164
|
+
const borderGroup = group.append("g").attr("class", "border");
|
|
1165
|
+
const dataPointGroup = group.append("g").attr("class", "data-points");
|
|
1166
|
+
const labelGroup = group.append("g").attr("class", "labels");
|
|
1167
|
+
const titleGroup = group.append("g").attr("class", "title");
|
|
1168
|
+
if (quadrantData.title) {
|
|
1169
|
+
titleGroup.append("text").attr("x", 0).attr("y", 0).attr("fill", quadrantData.title.fill).attr("font-size", quadrantData.title.fontSize).attr("dominant-baseline", getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor", getTextAnchor(quadrantData.title.verticalPos)).attr("transform", getTransformation(quadrantData.title)).text(quadrantData.title.text);
|
|
1170
|
+
}
|
|
1171
|
+
if (quadrantData.borderLines) {
|
|
1172
|
+
borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1", (data) => data.x1).attr("y1", (data) => data.y1).attr("x2", (data) => data.x2).attr("y2", (data) => data.y2).style("stroke", (data) => data.strokeFill).style("stroke-width", (data) => data.strokeWidth);
|
|
1173
|
+
}
|
|
1174
|
+
const quadrants = quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class", "quadrant");
|
|
1175
|
+
quadrants.append("rect").attr("x", (data) => data.x).attr("y", (data) => data.y).attr("width", (data) => data.width).attr("height", (data) => data.height).attr("fill", (data) => data.fill);
|
|
1176
|
+
quadrants.append("text").attr("x", 0).attr("y", 0).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr(
|
|
1177
|
+
"dominant-baseline",
|
|
1178
|
+
(data) => getDominantBaseLine(data.text.horizontalPos)
|
|
1179
|
+
).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text)).text((data) => data.text.text);
|
|
1180
|
+
const labels = labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class", "label");
|
|
1181
|
+
labels.append("text").attr("x", 0).attr("y", 0).text((data) => data.text).attr("fill", (data) => data.fill).attr("font-size", (data) => data.fontSize).attr("dominant-baseline", (data) => getDominantBaseLine(data.horizontalPos)).attr("text-anchor", (data) => getTextAnchor(data.verticalPos)).attr("transform", (data) => getTransformation(data));
|
|
1182
|
+
const dataPoints = dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class", "data-point");
|
|
1183
|
+
dataPoints.append("circle").attr("cx", (data) => data.x).attr("cy", (data) => data.y).attr("r", (data) => data.radius).attr("fill", (data) => data.fill);
|
|
1184
|
+
dataPoints.append("text").attr("x", 0).attr("y", 0).text((data) => data.text.text).attr("fill", (data) => data.text.fill).attr("font-size", (data) => data.text.fontSize).attr(
|
|
1185
|
+
"dominant-baseline",
|
|
1186
|
+
(data) => getDominantBaseLine(data.text.horizontalPos)
|
|
1187
|
+
).attr("text-anchor", (data) => getTextAnchor(data.text.verticalPos)).attr("transform", (data) => getTransformation(data.text));
|
|
1188
|
+
};
|
|
1189
|
+
const renderer = {
|
|
1190
|
+
draw
|
|
1191
|
+
};
|
|
1192
|
+
const diagram = {
|
|
1193
|
+
parser: parser$1,
|
|
1194
|
+
db,
|
|
1195
|
+
renderer,
|
|
1196
|
+
styles: () => ""
|
|
1197
|
+
};
|
|
1198
|
+
export {
|
|
1199
|
+
diagram
|
|
1200
|
+
};
|