@oscloudlab/knowledge-card 0.1.12 → 0.1.14
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/dist/{abap-B3Ib2SaY.js → abap-CLG8Zlqf.js} +1 -1
- package/dist/{abnf-BpX8_LX0.js → abnf-MF0MBJKW.js} +1 -1
- package/dist/{actionscript-DUBJnLW-.js → actionscript-DBWMkd-M.js} +1 -1
- package/dist/{ada-DnURHY78.js → ada-DtYvY78s.js} +1 -1
- package/dist/{agda-DlnLSCkO.js → agda-iMImk6mE.js} +1 -1
- package/dist/{al-BNWcLH08.js → al-DU1c0Ttk.js} +1 -1
- package/dist/{antlr4-DQQ7zcZu.js → antlr4-DHPZeQQX.js} +1 -1
- package/dist/{apacheconf-De_dELiJ.js → apacheconf-B0mIE71M.js} +1 -1
- package/dist/{apex-CRaAq5m7.js → apex-DhaXeFNm.js} +1 -1
- package/dist/{apl-CXBcWPZC.js → apl-B5WeG0-s.js} +1 -1
- package/dist/{applescript-BJoM-fZH.js → applescript-B-fD5Otg.js} +1 -1
- package/dist/{aql-CHgTKLR5.js → aql-BcYehmp3.js} +1 -1
- package/dist/{arduino-BNh-fDuL.js → arduino-CLRznHJ4.js} +1 -1
- package/dist/{arff-DHk14Wqf.js → arff-CmeiZ-Rq.js} +1 -1
- package/dist/{asciidoc-7LmYhSv0.js → asciidoc-DOcEDk1K.js} +1 -1
- package/dist/{asm6502-UyGy9RLC.js → asm6502-DytFOUV7.js} +1 -1
- package/dist/{asmatmel-DNPNFGVx.js → asmatmel-Tl9QTQMX.js} +1 -1
- package/dist/{aspnet-DAeMGfMK.js → aspnet-C5GDh4_I.js} +1 -1
- package/dist/{autohotkey-Csy_TnN7.js → autohotkey-BKK9fr4w.js} +1 -1
- package/dist/autohotkey-BKK9fr4w.js.gz +0 -0
- package/dist/{autoit-D02KgEGg.js → autoit-B-nYcnvd.js} +1 -1
- package/dist/{avisynth-Oeao-flL.js → avisynth-L3dnAiIm.js} +1 -1
- package/dist/{avro-idl-CuxmpsCt.js → avro-idl-CyrAzT7D.js} +1 -1
- package/dist/{bash-DqFty1Q5.js → bash-DjCGZwut.js} +1 -1
- package/dist/{basic-Cjyh6YPb.js → basic--2hHdIzG.js} +1 -1
- package/dist/{batch-C-ecOQyh.js → batch-DPQYuyVs.js} +1 -1
- package/dist/{bbcode-yc5iBdG8.js → bbcode-Bs_iI88g.js} +1 -1
- package/dist/{bicep-BS6QA04y.js → bicep-Bu0vykcz.js} +1 -1
- package/dist/{birb-CKmskxiB.js → birb-DeF5JO8o.js} +1 -1
- package/dist/{bison-CRsadLR5.js → bison-BpnELHx6.js} +1 -1
- package/dist/{bnf-BqCpqYTr.js → bnf-CRy3Scbf.js} +1 -1
- package/dist/{brainfuck-Jy6wqy3b.js → brainfuck-xfFA48OK.js} +1 -1
- package/dist/{brightscript-Bi02wihY.js → brightscript-C_HFtiM1.js} +1 -1
- package/dist/{bro-EVFkzo0F.js → bro-BI0ophLW.js} +1 -1
- package/dist/{bsl-9jsJpJhz.js → bsl-CfxV_GzZ.js} +1 -1
- package/dist/{c-DRGg2kWa.js → c-ByGPg3qG.js} +1 -1
- package/dist/{cfscript-apwIu_Qg.js → cfscript-C7ih3doL.js} +1 -1
- package/dist/{chaiscript-BHwOTmee.js → chaiscript-BrwOe2pF.js} +1 -1
- package/dist/{cil-YiiR3Ay_.js → cil-D6HVC83X.js} +1 -1
- package/dist/{clike-BpTWQ1k1.js → clike-C3BR2Avl.js} +1 -1
- package/dist/{clojure-UU2CebkD.js → clojure-Bo7CkwZ6.js} +1 -1
- package/dist/{cmake-CFBmvS2Y.js → cmake-B1-ReOcj.js} +1 -1
- package/dist/cmake-B1-ReOcj.js.gz +0 -0
- package/dist/{cobol-DVaSBXw1.js → cobol-DJjN99BP.js} +1 -1
- package/dist/{coffeescript-WoeTa41U.js → coffeescript-C-fNsUje.js} +1 -1
- package/dist/{concurnas-CnR8ZXGK.js → concurnas-DFIBvtvw.js} +1 -1
- package/dist/{coq-CkHXZnXZ.js → coq-QtFjP9oF.js} +1 -1
- package/dist/{core-D8mBuybK.js → core-BN2x1GUp.js} +5 -5
- package/dist/core-BN2x1GUp.js.gz +0 -0
- package/dist/{cpp-BRExPGn-.js → cpp-Ckr6exJG.js} +1 -1
- package/dist/{crystal-BmMpdGo-.js → crystal-C7ZyoazB.js} +1 -1
- package/dist/{csharp-D_32Jaa4.js → csharp-Dp-6buKP.js} +1 -1
- package/dist/{cshtml-Czxi7YOt.js → cshtml-BrsLUgF9.js} +1 -1
- package/dist/{csp-DJAYrBon.js → csp-CaUMGvrx.js} +1 -1
- package/dist/{css-Dz7QhgHc.js → css-D_siVqXB.js} +1 -1
- package/dist/{css-extras-DfhFK5U-.js → css-extras-CuE-7Jkk.js} +1 -1
- package/dist/{csv-B1EPnHJY.js → csv-CFRqzXw4.js} +1 -1
- package/dist/{cypher-DsWiBAKB.js → cypher-7RMry_IH.js} +1 -1
- package/dist/{d-Cjg5yNTm.js → d-4nGEE1l-.js} +1 -1
- package/dist/{dart-DP7AaqtH.js → dart-qUCgl9Z_.js} +1 -1
- package/dist/{dataweave-BZZst967.js → dataweave-DOvgicit.js} +1 -1
- package/dist/{dax-D9CG_wU9.js → dax-p3ZYe8gl.js} +1 -1
- package/dist/{dhall-CTPOjez9.js → dhall-DDnvf94G.js} +1 -1
- package/dist/{diff-04mr6UnV.js → diff-DPjtjxzY.js} +1 -1
- package/dist/{django-D_jzFrNA.js → django-lEUpdGEL.js} +1 -1
- package/dist/{dns-zone-file-DoRLu9t3.js → dns-zone-file-C-0ywrKx.js} +1 -1
- package/dist/{docker-Bo6AIANE.js → docker-CW0I9H4m.js} +1 -1
- package/dist/{dot-BDZgdpBu.js → dot-CZ0LBaVm.js} +1 -1
- package/dist/{ebnf-DQSP85KF.js → ebnf-P5UGEbZR.js} +1 -1
- package/dist/{editorconfig-BKHFZvq1.js → editorconfig-BL5hkJER.js} +1 -1
- package/dist/{eiffel-0whO5Dvn.js → eiffel-Do72uj4u.js} +1 -1
- package/dist/{ejs-CkdQL-ON.js → ejs-4rfM-crj.js} +1 -1
- package/dist/{elixir-BasscN44.js → elixir-CJgHTQgv.js} +1 -1
- package/dist/{elm-D-6wfH0-.js → elm-DquyvmPG.js} +1 -1
- package/dist/{erb-CYe4vc0i.js → erb-GD3u0Bh2.js} +1 -1
- package/dist/{erlang-B3ZmN7kq.js → erlang-Dbo4loUA.js} +1 -1
- package/dist/{etlua-782Mnfpt.js → etlua-DikxTQBK.js} +1 -1
- package/dist/{excel-formula-Cu9gOlXB.js → excel-formula-BxGGtj84.js} +1 -1
- package/dist/{factor-CzMyGUZv.js → factor-C3qoTt-h.js} +1 -1
- package/dist/factor-C3qoTt-h.js.gz +0 -0
- package/dist/{false-BgtXQ6w2.js → false-Bpv3CI_q.js} +1 -1
- package/dist/{firestore-security-rules-B9LrYwiX.js → firestore-security-rules-Cw0cv7A0.js} +1 -1
- package/dist/{flow-CIes61PA.js → flow-Cnnv0Imq.js} +1 -1
- package/dist/{fortran-BtR_G34m.js → fortran-C3sZToIP.js} +1 -1
- package/dist/{fsharp-eoBuhmKU.js → fsharp-BqLDyOqf.js} +1 -1
- package/dist/{ftl-Clzew9Dp.js → ftl-DSq1XJa3.js} +1 -1
- package/dist/{gap-BZoysTmK.js → gap-C_-vedcR.js} +1 -1
- package/dist/{gcode-BC1kst0E.js → gcode-BNt538dv.js} +1 -1
- package/dist/{gdscript-BXsJ6X0o.js → gdscript-D_gaczb1.js} +1 -1
- package/dist/{gedcom-CH5Roix5.js → gedcom-BdukbgbO.js} +1 -1
- package/dist/{gherkin-BfR42BbE.js → gherkin-CF5SgU_k.js} +1 -1
- package/dist/gherkin-CF5SgU_k.js.gz +0 -0
- package/dist/{git-D5w4dRfT.js → git-CRRR0bnh.js} +1 -1
- package/dist/{glsl-CTO1Osc2.js → glsl-C5onBgy2.js} +1 -1
- package/dist/{gml-DEobKPNp.js → gml-DxIOblNb.js} +1 -1
- package/dist/{gn-qLGuNqbi.js → gn-XmDd1hVL.js} +1 -1
- package/dist/{go-module-DTo1OyoX.js → go-module-B7P1BBHQ.js} +1 -1
- package/dist/{go-CQBjcO17.js → go-s-C9BBds.js} +1 -1
- package/dist/{graphql-CzAnY_BF.js → graphql-USuj00mZ.js} +1 -1
- package/dist/{groovy-didwolPA.js → groovy-DvNZQ9Vq.js} +1 -1
- package/dist/{haml-D4PXEHxR.js → haml-CE1HQG7H.js} +1 -1
- package/dist/{handlebars-CpAeAFBD.js → handlebars-kXnLl516.js} +1 -1
- package/dist/{haskell-A6Pq8WOr.js → haskell-BXkwHm6A.js} +1 -1
- package/dist/{haxe-awO7P34b.js → haxe-wv9_P-D_.js} +1 -1
- package/dist/{hcl-C_d085X2.js → hcl-BlxiqKvW.js} +1 -1
- package/dist/{hlsl-Btyttp7W.js → hlsl-DT8M35zT.js} +1 -1
- package/dist/{hoon-LwJeJf8B.js → hoon-BpGkREDh.js} +1 -1
- package/dist/{hpkp-Da097XVi.js → hpkp-DNRkSzh0.js} +1 -1
- package/dist/{hsts-ctxjXNLx.js → hsts-CiSNg9m4.js} +1 -1
- package/dist/{http-B_J23KZw.js → http-dHM0PTna.js} +1 -1
- package/dist/{ichigojam-CgXEF2oB.js → ichigojam-Biiy0_Gu.js} +1 -1
- package/dist/{icon-BdiNqnfJ.js → icon-0_91unvK.js} +1 -1
- package/dist/{icu-message-format-v4aspaBl.js → icu-message-format-_CigUiGO.js} +1 -1
- package/dist/{idris-C-mICNZG.js → idris-U_KdyMsn.js} +1 -1
- package/dist/{iecst-CXJeEcqC.js → iecst-BIo3NDH8.js} +1 -1
- package/dist/{ignore-CrdPGson.js → ignore-BbsnHfe-.js} +1 -1
- package/dist/{index-B9lQPpjn.js → index-V9KXW_Nn.js} +290 -279
- package/dist/index-V9KXW_Nn.js.gz +0 -0
- package/dist/{inform7-BW15JI4R.js → inform7-B6nV_31R.js} +1 -1
- package/dist/{ini-4PpBWiAD.js → ini-CI97hNPB.js} +1 -1
- package/dist/{io-DMEE90qS.js → io-B1BtqvAD.js} +1 -1
- package/dist/{j-CRQjGbJR.js → j-CzpQhZBL.js} +1 -1
- package/dist/{java-B025r3F6.js → java-Dk8voijD.js} +1 -1
- package/dist/{javadoc-BV4LA5yb.js → javadoc-Dd19Uwnl.js} +1 -1
- package/dist/{javadoclike-CgVgAS0k.js → javadoclike-BFx6BPIz.js} +1 -1
- package/dist/{javascript-Bsr-lRMX.js → javascript-DT85_kIL.js} +1 -1
- package/dist/{javastacktrace-Dm52WNmH.js → javastacktrace-C8JPnwrP.js} +1 -1
- package/dist/{jexl-BFx_79aV.js → jexl-Cbb56hIS.js} +1 -1
- package/dist/{jolie-DKpww4sz.js → jolie-BOYI45H2.js} +1 -1
- package/dist/{jq-B27JRSYO.js → jq-CMRW2MrL.js} +1 -1
- package/dist/{js-extras-BphtqIJY.js → js-extras-Dox-S2K3.js} +1 -1
- package/dist/{js-templates-DIVXGcz2.js → js-templates-Bxhx9siB.js} +1 -1
- package/dist/{jsdoc-D0bYhcZw.js → jsdoc-B-W_FwI1.js} +1 -1
- package/dist/{json-CONVegrX.js → json-nzQa8lBT.js} +1 -1
- package/dist/{json5-B21V1mQX.js → json5-FZMNR8xX.js} +1 -1
- package/dist/{jsonp-BQ9Oct6o.js → jsonp-C0gKGjc3.js} +1 -1
- package/dist/{jsstacktrace-BAgcOBeP.js → jsstacktrace-DnGh6sDI.js} +1 -1
- package/dist/{jsx-Bf6KzmLQ.js → jsx-CFE9s5Sm.js} +1 -1
- package/dist/{julia-BP3Q27-z.js → julia-DTOhGQR6.js} +1 -1
- package/dist/{keepalived-Bz54KGxP.js → keepalived-DVQ6h2Yv.js} +1 -1
- package/dist/{keyman-C3pJ9UgY.js → keyman-DHV48jt6.js} +1 -1
- package/dist/knowledge-card.es.js +1 -1
- package/dist/knowledge-card.umd.js +1 -1
- package/dist/knowledge-card.umd.js.gz +0 -0
- package/dist/{kotlin-Ch1IUjHm.js → kotlin-BdWJJt5f.js} +1 -1
- package/dist/{kumir-DC_39Dyc.js → kumir-hJIYz6hF.js} +1 -1
- package/dist/{kusto-BvZ_VmBj.js → kusto-BGSua1pR.js} +1 -1
- package/dist/{latex-Dad0OMtg.js → latex-Cop4yhfp.js} +1 -1
- package/dist/{latte-CagcGB0O.js → latte-C72lWqlg.js} +1 -1
- package/dist/{less-XRdRA9xz.js → less-CvXKIKFE.js} +1 -1
- package/dist/{lilypond-DUgUS8Lg.js → lilypond-CqOSIcKp.js} +1 -1
- package/dist/{liquid-DDPEglZ3.js → liquid-yLHktqGN.js} +1 -1
- package/dist/{lisp-EePlsRBM.js → lisp-Dci-RpOk.js} +1 -1
- package/dist/{livescript-C0HQoqYn.js → livescript-CidHGLsB.js} +1 -1
- package/dist/{llvm--UdTtzH_.js → llvm-DhcS6KCe.js} +1 -1
- package/dist/{log-CL-IbwfI.js → log-Ct3dhKj7.js} +1 -1
- package/dist/{lolcode-bqc-fX9w.js → lolcode-ZjVxsht0.js} +1 -1
- package/dist/{lua-DzUBWM5I.js → lua-D4Utgcj9.js} +1 -1
- package/dist/{magma-vFdZg6_s.js → magma-Df59a2h0.js} +1 -1
- package/dist/{makefile-DY1NtYjs.js → makefile-CI_bcJcE.js} +1 -1
- package/dist/{markdown-FRmB1W3I.js → markdown-CUjaBwRY.js} +1 -1
- package/dist/markdown-CUjaBwRY.js.gz +0 -0
- package/dist/{markup-CsNJwDvR.js → markup-KN0qg238.js} +1 -1
- package/dist/{markup-templating-b7on7TG8.js → markup-templating-ECZSU_nW.js} +1 -1
- package/dist/{matlab-BYAgeVJI.js → matlab-B6tmVQ7U.js} +1 -1
- package/dist/{maxscript-DlkM_LbV.js → maxscript-DCtsZcTZ.js} +1 -1
- package/dist/{mel-DSjO1YjV.js → mel-BORxhajV.js} +1 -1
- package/dist/mel-BORxhajV.js.gz +0 -0
- package/dist/{mermaid-vXGCG2w2.js → mermaid-36EYp6Fr.js} +1 -1
- package/dist/{mizar-Bg4e3Jxs.js → mizar-CJDdW0Gm.js} +1 -1
- package/dist/{mongodb-C5yDyiCZ.js → mongodb-DWR6oQzb.js} +1 -1
- package/dist/{monkey-BCSsxwKP.js → monkey-BFdqZ1yZ.js} +1 -1
- package/dist/{moonscript-qL5GThXQ.js → moonscript-Db2fDoAK.js} +1 -1
- package/dist/{n1ql-Bc4nvhXk.js → n1ql-Cn9RslJI.js} +1 -1
- package/dist/{n4js-DGakWuyA.js → n4js-fhNpVFRy.js} +1 -1
- package/dist/{nand2tetris-hdl-DWBb3Cr5.js → nand2tetris-hdl-Do3MDVgU.js} +1 -1
- package/dist/{naniscript-DmeFH0TH.js → naniscript-AYXMcfRb.js} +1 -1
- package/dist/{nasm-EShGrqR2.js → nasm-DaIYY4IF.js} +1 -1
- package/dist/{neon-BQPeb9uG.js → neon-D73fiQp7.js} +1 -1
- package/dist/{nevod-CaaptUOc.js → nevod-DTXNtIBg.js} +1 -1
- package/dist/{nginx-CBS3Jq0s.js → nginx-QTWeOpVm.js} +1 -1
- package/dist/{nim-DGlNjSr2.js → nim-ga62TAz1.js} +1 -1
- package/dist/{nix-TugYCod0.js → nix-CcVPnBa4.js} +1 -1
- package/dist/{nsis-9zrUlvLP.js → nsis-DIrKhZ2O.js} +1 -1
- package/dist/{objectivec-CTUxI-4I.js → objectivec-EgLKGrO_.js} +1 -1
- package/dist/{ocaml-Dl8ahL4v.js → ocaml-CncNscPW.js} +1 -1
- package/dist/{opencl-CiPkGBT7.js → opencl-CU1f_sRU.js} +1 -1
- package/dist/opencl-CU1f_sRU.js.gz +0 -0
- package/dist/{openqasm-DjLgm1Ql.js → openqasm-R9SBeDKh.js} +1 -1
- package/dist/{oz-dlntopit.js → oz-ckPWlej9.js} +1 -1
- package/dist/{parigp-DSJKgckL.js → parigp-CVphlTpU.js} +1 -1
- package/dist/{parser-h6useoW8.js → parser-CLut9N3T.js} +1 -1
- package/dist/{pascal-5pFieoyD.js → pascal-BeiguFEJ.js} +1 -1
- package/dist/{pascaligo-M-fw9pOo.js → pascaligo-B1XZ5QNR.js} +1 -1
- package/dist/{pcaxis-CrFqYk2p.js → pcaxis-B2tvJJg-.js} +1 -1
- package/dist/{peoplecode-DE6DEo2Y.js → peoplecode-9VPWDY88.js} +1 -1
- package/dist/{perl-BWgdnzYq.js → perl-DPO9SR_y.js} +1 -1
- package/dist/{php-khT8qKjR.js → php-6cKFihM5.js} +1 -1
- package/dist/{php-extras-CciuDNH5.js → php-extras-CabHb1T1.js} +1 -1
- package/dist/{phpdoc-C7eoGcMX.js → phpdoc-PI3cCuGC.js} +1 -1
- package/dist/{plsql-D4Ueff-1.js → plsql-BdDnkgb5.js} +1 -1
- package/dist/{powerquery-DLH89RYZ.js → powerquery-Cz4UDfLv.js} +1 -1
- package/dist/{powershell-Cr8MYtH8.js → powershell-o5QYwvxW.js} +1 -1
- package/dist/{processing-ClAo-yBz.js → processing-B32exd3Q.js} +1 -1
- package/dist/{prolog-CcEntvge.js → prolog-Ppd4lQDc.js} +1 -1
- package/dist/{promql-D7PjDGVf.js → promql-Dmx6XqaC.js} +1 -1
- package/dist/{properties-Biq_S4xG.js → properties-7y_CkwAa.js} +1 -1
- package/dist/{protobuf-BhR80VWp.js → protobuf-qRJzaANA.js} +1 -1
- package/dist/{psl-B8DN86yM.js → psl-CCx16RjI.js} +1 -1
- package/dist/{pug-DsFm3dte.js → pug-PZ63FTiZ.js} +1 -1
- package/dist/{puppet-BRKFUsJC.js → puppet-ZzcR8y1Z.js} +1 -1
- package/dist/{pure-BDTKer6_.js → pure-DrYyP5Ve.js} +1 -1
- package/dist/{purebasic-BU1bIioN.js → purebasic-BmlZ-kFN.js} +1 -1
- package/dist/{purescript-CJ5LsDo6.js → purescript-D2GWnY1g.js} +1 -1
- package/dist/{python-C3kQBUZ1.js → python-tNBzUjFV.js} +1 -1
- package/dist/{q-B7IF7tzp.js → q-AY4vYhf7.js} +1 -1
- package/dist/{qml-B9i_byGT.js → qml-CDR7mWNW.js} +1 -1
- package/dist/{qore-D-5rWYSG.js → qore-DNrSu_c2.js} +1 -1
- package/dist/{qsharp-B9QDxaqe.js → qsharp-D2OvHvxC.js} +1 -1
- package/dist/{r-ChjOBocp.js → r-Cc-QDnmJ.js} +1 -1
- package/dist/{racket-DDNdIqvS.js → racket-CmPJzHpD.js} +1 -1
- package/dist/{reason-DCdqhvmK.js → reason-D_WH0qbO.js} +1 -1
- package/dist/{regex-B7xOs5j1.js → regex-CUIajHtx.js} +1 -1
- package/dist/{rego-BOt8v-PJ.js → rego-iDHxHcIJ.js} +1 -1
- package/dist/{renpy-OiAZV5_q.js → renpy-Bobv99-A.js} +1 -1
- package/dist/{rest-BKTUJigF.js → rest-CqSFR-Up.js} +1 -1
- package/dist/{rip-Bgz3IHAG.js → rip-Di7lkD88.js} +1 -1
- package/dist/{roboconf-B85jaig9.js → roboconf-BqnnZT8K.js} +1 -1
- package/dist/{robotframework-DRHEJe8S.js → robotframework-D-VxDa48.js} +1 -1
- package/dist/{ruby-BRP8zfQG.js → ruby-BA2oN_Pp.js} +1 -1
- package/dist/{rust-eCKq8CTS.js → rust-C_v5JFw8.js} +1 -1
- package/dist/{sas-m-R9aj9_.js → sas-DptEkkTk.js} +1 -1
- package/dist/sas-DptEkkTk.js.gz +0 -0
- package/dist/{sass-BKYba2Lb.js → sass-Bkrh-7FC.js} +1 -1
- package/dist/{scala-D5CR3Cpn.js → scala-BCq3Mf6X.js} +1 -1
- package/dist/{scheme-C2mGYfv5.js → scheme-DqBO1mk_.js} +1 -1
- package/dist/{scss-D2RCY7N1.js → scss-D0yXwWBo.js} +1 -1
- package/dist/{shell-session-DCNilFFV.js → shell-session-CZ2PhcYi.js} +1 -1
- package/dist/{smali-yzuynu9V.js → smali-uS2i2p86.js} +1 -1
- package/dist/{smalltalk-DY0PXbZf.js → smalltalk-7-7EvNIP.js} +1 -1
- package/dist/{smarty-Cp4ODqB3.js → smarty-CuOcPbhc.js} +1 -1
- package/dist/{sml-BmDPunYY.js → sml-l0QqdwU1.js} +1 -1
- package/dist/{solidity-DhSel0Mw.js → solidity-DvLTQ2r6.js} +1 -1
- package/dist/{solution-file-MmzqcEqM.js → solution-file-CMfql3BH.js} +1 -1
- package/dist/{soy-uR0fnuF7.js → soy-BGgp9nrX.js} +1 -1
- package/dist/{sparql-DwcncenY.js → sparql-BIOys-we.js} +1 -1
- package/dist/{splunk-spl-BXl0o_mu.js → splunk-spl-CxA7a145.js} +1 -1
- package/dist/{sqf-BR7zNjVW.js → sqf-Bhk8zfwL.js} +1 -1
- package/dist/sqf-Bhk8zfwL.js.gz +0 -0
- package/dist/{sql-DZC-PrCY.js → sql-Crsv6joQ.js} +1 -1
- package/dist/{squirrel-eAD1Di2a.js → squirrel-Ixw1kZin.js} +1 -1
- package/dist/{stan-CbrHo_yN.js → stan-BO1qZ_1h.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/dist/{stylus-BxL3z7NJ.js → stylus-CjFmsn4z.js} +1 -1
- package/dist/{swift-Uq_mpjHS.js → swift-DlTQGARB.js} +1 -1
- package/dist/{systemd-B-lQT0iF.js → systemd-BFMXQB8I.js} +1 -1
- package/dist/{t4-cs-Bu1Ey1gj.js → t4-cs-BQPq3dzh.js} +1 -1
- package/dist/{t4-templating-D8oX0Ngj.js → t4-templating-DAnw-4ub.js} +1 -1
- package/dist/{t4-vb-Cj5p94Ed.js → t4-vb-myrIO-MX.js} +1 -1
- package/dist/{tap-CV5O1WvW.js → tap-BwXlRUhX.js} +1 -1
- package/dist/{tcl-BsTS8y1v.js → tcl-weKMCbQl.js} +1 -1
- package/dist/{textile-BtCQDyPu.js → textile-Czgd_fzQ.js} +1 -1
- package/dist/textile-Czgd_fzQ.js.gz +0 -0
- package/dist/{toml-aSntXf-3.js → toml-BBuJ-0IG.js} +1 -1
- package/dist/{tremor-CuxFhXCt.js → tremor-Ccrr1ALD.js} +1 -1
- package/dist/{tsx-BTKUi6M1.js → tsx-CNteYBKo.js} +1 -1
- package/dist/{tt2-CVSb2XtR.js → tt2-CFph-Gmm.js} +1 -1
- package/dist/{turtle-CvR3VTtv.js → turtle-B6jab7Y8.js} +1 -1
- package/dist/{twig-Do3ooN4f.js → twig-CQKj4OB9.js} +1 -1
- package/dist/{typescript-Byb5X_BD.js → typescript-By37F6v-.js} +1 -1
- package/dist/{typoscript-8CtkHoRh.js → typoscript-CoMg_Z7m.js} +1 -1
- package/dist/{unrealscript-Ce345A5R.js → unrealscript-8nTOPuWp.js} +1 -1
- package/dist/{uorazor-BAbKsY7K.js → uorazor-q2f_tNfF.js} +1 -1
- package/dist/{uri-2NO-BhMF.js → uri-BgVFps_f.js} +1 -1
- package/dist/{v-CIhc7JnQ.js → v-DZm2YqnC.js} +1 -1
- package/dist/{vala-Cv0CEFTi.js → vala-BH9W23OB.js} +1 -1
- package/dist/{vbnet-Dt0Z-7p3.js → vbnet-Dehxqo_R.js} +1 -1
- package/dist/{velocity-C9T4dfsV.js → velocity-DB_BvhZU.js} +1 -1
- package/dist/{verilog-DXVAqPAx.js → verilog-Dhf5kOni.js} +1 -1
- package/dist/{vhdl-D3c8zt1y.js → vhdl-C9Q08DUi.js} +1 -1
- package/dist/{vim-ClFajHwq.js → vim-icewlPtn.js} +1 -1
- package/dist/vim-icewlPtn.js.gz +0 -0
- package/dist/{visual-basic-BxHxv3nw.js → visual-basic-DKohDyWy.js} +1 -1
- package/dist/{warpscript-DPtbZQGE.js → warpscript-CQBfna11.js} +1 -1
- package/dist/{wasm-CmncmVCq.js → wasm-DduprQCq.js} +1 -1
- package/dist/{web-idl-CsOuzzEM.js → web-idl-CHgC1QSP.js} +1 -1
- package/dist/{wiki-D1z_zGHa.js → wiki-D1gAyNHE.js} +1 -1
- package/dist/{wolfram-Yz0coRBL.js → wolfram-DM_pm_7h.js} +1 -1
- package/dist/{wren-DMAaA998.js → wren-DHiznewE.js} +1 -1
- package/dist/{xeora-Ddinb0_s.js → xeora-DmjxFlIE.js} +1 -1
- package/dist/{xml-doc-DDPvFetR.js → xml-doc-BetULvJk.js} +1 -1
- package/dist/{xojo-DGvxorKG.js → xojo-Bewu8S4g.js} +1 -1
- package/dist/{xquery-DeYVRhSC.js → xquery-D0SGg0Sq.js} +1 -1
- package/dist/{yaml-B0iiYIr1.js → yaml-BAZ7irph.js} +1 -1
- package/dist/{yang-BoYkZqAQ.js → yang-PEjZvJbM.js} +1 -1
- package/dist/{zig-CJGpHNDo.js → zig-BkX93V2a.js} +1 -1
- package/package.json +1 -1
- package/dist/autohotkey-Csy_TnN7.js.gz +0 -0
- package/dist/cmake-CFBmvS2Y.js.gz +0 -0
- package/dist/core-D8mBuybK.js.gz +0 -0
- package/dist/factor-CzMyGUZv.js.gz +0 -0
- package/dist/gherkin-BfR42BbE.js.gz +0 -0
- package/dist/index-B9lQPpjn.js.gz +0 -0
- package/dist/markdown-FRmB1W3I.js.gz +0 -0
- package/dist/mel-DSjO1YjV.js.gz +0 -0
- package/dist/opencl-CiPkGBT7.js.gz +0 -0
- package/dist/sas-m-R9aj9_.js.gz +0 -0
- package/dist/sqf-BR7zNjVW.js.gz +0 -0
- package/dist/textile-BtCQDyPu.js.gz +0 -0
- package/dist/vim-ClFajHwq.js.gz +0 -0
|
@@ -183,7 +183,7 @@ var mSe=function(){return mSe=Object.assign||function(e){for(var t,r=1,n=argumen
|
|
|
183
183
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
184
184
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
185
185
|
PERFORMANCE OF THIS SOFTWARE.
|
|
186
|
-
***************************************************************************** */var XRe=function(){return XRe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XRe.apply(this,arguments)};function zRe(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function GRe(e){var r=e.defaultContent,n=void 0===r?[]:r,i=e.onCreated,o=e.defaultHtml,a=void 0===o?"":o,s=e.value,l=void 0===s?"":s,u=e.onChange,c=e.defaultConfig,d=void 0===c?{}:c,p=e.mode,f=void 0===p?"default":p,h=e.style,m=void 0===h?{}:h,g=e.className,q=t.useRef(null),V=zRe(t.useState(null),2),v=V[0],b=V[1],y=zRe(t.useState(""),2),S=y[0],A=y[1],w=function(e){i&&i(e);var t=d.onCreated;t&&t(e)},x=function(e){A(e.getHtml()),u&&u(e);var t=d.onChange;t&&t(e)},C=function(e){var t=d.onDestroyed;b(null),t&&t(e)};return t.useEffect(function(){if(null!=v&&l!==S)try{v.setHtml(l)}catch(zm){}},[l]),t.useEffect(function(){var e;if(null!=q.current&&null==v&&!(null===(e=q.current)||void 0===e?void 0:e.getAttribute("data-w-e-textarea"))){var t=LRe({selector:q.current,config:XRe(XRe({},d),{onCreated:w,onChange:x,onDestroyed:C}),content:n,html:a||l,mode:f});b(t)}},[v]),t.createElement("div",{style:m,ref:q,className:g})}function HRe(e){var r=e.editor,n=e.defaultConfig,i=void 0===n?{}:n,o=e.mode,a=void 0===o?"default":o,s=e.style,l=void 0===s?{}:s,u=e.className,c=t.useRef(null);return t.useEffect(function(){null!=c.current&&null!=r&&jRe({editor:r,selector:c.current,config:i,mode:a})},[r]),t.createElement("div",{style:l,ref:c,className:u})}var ZRe={exports:{}};self,ZRe.exports=(e=>(()=>{var t={857:t=>{t.exports=e}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{default:()=>a});var e=n(857),t={"*":"list-item","-":"list-item","+":"list-item",">":"blockquote","#":"header1","##":"header2","###":"header3","####":"header4","#####":"header5"},r={"---":"divider","----":"divider","-----":"divider","------":"divider"};function o(t){var r=t.selection;if(null==r)return{beforeText:"",range:null};var n=r.anchor,i=e.SlateEditor.above(t,{match:function(r){return e.SlateEditor.isBlock(t,r)}});if(null==i)return{beforeText:"",range:null};var o=i[1],a={anchor:n,focus:e.SlateEditor.start(t,o)};return{beforeText:e.SlateEditor.string(t,a)||"",range:a}}const a={editorPlugin:function(n){var i=n.insertBreak,a=n.insertText,s=n;return s.insertText=function(r){var i=n.selection;if(null==i)return a(r);if(e.SlateRange.isExpanded(i))return a(r);if(null==e.DomEditor.getSelectedNodeByType(n,"paragraph"))return a(r);if(" "!==r)return a(r);var s=o(n),l=s.beforeText,u=s.range;if(!l||!u)return a(r);var c=t[l];if(!c)return a(r);e.SlateTransforms.select(n,u),e.SlateTransforms.delete(n);var d={type:c};e.SlateTransforms.setNodes(n,d,{match:function(t){return e.SlateEditor.isBlock(n,t)}}),"list-item"===c&&e.SlateTransforms.wrapNodes(n,{type:"bulleted-list",children:[]},{match:function(t){return"list-item"===e.DomEditor.getNodeType(t)}})},s.insertBreak=function(){var t=n.selection;if(null==t)return i();if(e.SlateRange.isExpanded(t))return i();if(null==e.DomEditor.getSelectedNodeByType(n,"paragraph"))return i();var a=o(n),s=a.beforeText,l=a.range;if(!s||!l)return i();if(0!==s.indexOf("```")){var u=r[s];if(!u)return i();e.SlateTransforms.select(n,l),e.SlateTransforms.delete(n);var c={type:u};e.SlateTransforms.setNodes(n,c,{match:function(t){return e.SlateEditor.isBlock(n,t)}})}else{var d=s.slice(3).toLowerCase().trim();"js"===d&&(d="javascript"),"ts"===d&&(d="typescript"),"md"===d&&(d="markdown"),"py"===d&&(d="python"),"vb"===d&&(d="visual-basic"),"c#"===d&&(d="csharp");var p=((n.getConfig().MENU_CONF||{}).codeSelectLang||[]).codeLangs;if(d&&!(void 0===p?[]:p).some(function(e){return e.value===d}))return i();e.SlateTransforms.select(n,l),e.SlateTransforms.delete(n);var f={type:"pre",children:[{type:"code",language:d,children:[{text:""}]}]};e.SlateTransforms.insertNodes(n,f)}},s}}})(),i})())(h(MRe));const YRe=f(ZRe.exports);function QRe(e,t,r,n,i){return{sel:e,data:t,children:r,text:n,elm:i,key:void 0===t?void 0:t.key}}const JRe=Array.isArray;function _Re(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function $Re(e,t,r){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==r&&void 0!==t)for(let n=0;n<t.length;++n){const e=t[n];if("string"==typeof e)continue;const r=e.data;void 0!==r&&$Re(r,e.children,e.sel)}}function eUe(e,t,r){let n,i,o,a={};if(null!=t&&(JRe(t)?n=t:_Re(t)?i=t.toString():t&&t.sel?n=[t]:a=t),void 0!==n)for(o=0;o<n.length;++o)_Re(n[o])&&(n[o]=QRe(void 0,void 0,void 0,n[o],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||$Re(a,n,e),QRe(e,a,n,i,void 0)}const tUe=[];for(let Set=0;Set<256;++Set)tUe.push((Set+256).toString(16).slice(1));let rUe;const nUe=new Uint8Array(16),iUe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function oUe(e,t,r){return iUe.randomUUID&&!e?iUe.randomUUID():function(e){var t;const r=(e=e||{}).random??(null==(t=e.rng)?void 0:t.call(e))??function(){if(!rUe){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");rUe=crypto.getRandomValues.bind(crypto)}return rUe(nUe)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(tUe[e[t+0]]+tUe[e[t+1]]+tUe[e[t+2]]+tUe[e[t+3]]+"-"+tUe[e[t+4]]+tUe[e[t+5]]+"-"+tUe[e[t+6]]+tUe[e[t+7]]+"-"+tUe[e[t+8]]+tUe[e[t+9]]+"-"+tUe[e[t+10]]+tUe[e[t+11]]+tUe[e[t+12]]+tUe[e[t+13]]+tUe[e[t+14]]+tUe[e[t+15]]).toLowerCase()}(r)}(e)}class aUe{constructor(){s(this,"title","插入填空项"),s(this,"tag","button")}getValue(e){return""}isActive(e){return!1}isDisabled(e){var t;return null==e.selection||(null==(t=e.getElemsByType("fill-blank"))?void 0:t.length)>=20}exec(e,t){if(this.isDisabled(e))return;const r=[{text:" "},{type:"fill-blank",key:oUe(),children:[{text:""}]},{text:" "}];zE.insertNodes(e,r)}}let sUe=[];const lUe={editorPlugin:function(e){const{isInline:t,isVoid:r}=e,n=e;return n.isInline=e=>"fill-blank"===Zj.getNodeType(e)||t(e),n.isVoid=e=>"fill-blank"===Zj.getNodeType(e)||r(e),n},renderElems:[{type:"fill-blank",renderElem:(e,t,r)=>{const n=null==r?void 0:r.getElemsByType("fill-blank"),i=(null==n?void 0:n.findIndex(t=>t.key===e.key&&!sUe.includes(t.id)))||0;return i===n.length-1?sUe=[]:sUe.push(n[i].id),eUe("input",{attrs:{class:"w-e-fill-blank","data-w-e-type":"fill-blank","data-w-e-is-void":"true","data-w-e-is-inline":"true",readonly:!0,placeholder:i+1}})}}],elemsToHtml:[{type:"fill-blank",elemToHtml:(e,t,r)=>'<input class="w-e-fill-blank" data-w-e-type="fill-blank" data-w-e-is-void="true" data-w-e-is-inline="true" readonly="true">'}],parseElemsHtml:[{selector:"input[data-w-e-type='fill-blank']",parseElemHtml:(e,t,r)=>({type:"fill-blank",key:oUe(),children:[{text:""}]})},{selector:"pre:not([data-w-e-type])>code",parseElemHtml:(e,t,r)=>{let n=(null==e?void 0:e.innerHTML)||"";const i='<input class="w-e-fill-blank" data-w-e-type="fill-blank" data-w-e-is-void="true" data-w-e-is-inline="true" readonly="true">',o=(null==t?void 0:t.filter(e=>"fill-blank"===(null==e?void 0:e.type)))||[];let a=[];return(null==o?void 0:o.length)&&(null==t||t.forEach((e,r)=>{var o;if(a.push(e),"fill-blank"===(null==e?void 0:e.type))if("fill-blank"===(null==(o=t[r+1])?void 0:o.type)){const e=null==n?void 0:n.indexOf(i,1);let t=null==n?void 0:n.slice(0,e);n=null==n?void 0:n.replace(t,""),t=t.replace(i,""),a.push({text:t})}else n=null==n?void 0:n.replace(i,"");else n=null==n?void 0:n.replace(null==e?void 0:e.text,"")})),{type:"code",language:"",children:(null==o?void 0:o.length)?a:[{text:(null==e?void 0:e.textContent)||""}]}}}],menus:[{key:"fill-blank",factory:()=>new aUe}]},uUe=t.createContext(null);NRe._registeredModules||(NRe._registeredModules=new Set);const cUe=NRe._registeredModules,dUe=(e,t)=>{const r=t||e&&"object"==typeof e&&e.key||JSON.stringify(e).substring(0,20);if(!cUe.has(r))try{NRe.registerModule(e),cUe.add(r)}catch(n){if(!(n instanceof Error&&(n.message.includes("duplicate")||n.message.includes("Duplicate"))))throw n}};dUe(lUe,"fillBlankModule"),dUe(YRe,"markdownModule");const pUe=t.forwardRef((e,r)=>{const{topProps:n}=(()=>{const e=t.useContext(uUe);if(!e)throw new Error("useMyContext must be used within a MyContext.Provider");return e})(),{uploadImg:i}=n,{defaultValue:o="",readOnly:a=!1,editorHeight:s=300,placeholder:l="请输入内容...",isBorder:u=!0,autoHeight:c,onChange:d,customToolbarKeys:p,mode:f="default",noPadding:h=!1}=e,[m,g]=t.useState(null),[q]=t.useState({toolbarKeys:p??["undo","redo","fullScreen","|","headerSelect","bold","underline","italic","color","bgColor","|","bulletedList","numberedList",{key:"group-justify",title:"对齐",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:"缩进",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"insertLink",{key:"group-image",title:"图片",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',menuKeys:["insertImage","uploadImage"]},"insertTable","codeBlock","divider","|"]}),V={placeholder:l,autoFocus:!1,MENU_CONF:{uploadImage:{async customUpload(e,t){if(!e||!i)return;const r=new FormData;r.append("file",e);const n=await i({file:r});(null==n?void 0:n.url)&&t(null==n?void 0:n.url,null==n?void 0:n.url,null==n?void 0:n.url)}}}},v=t.useRef(null);t.useEffect(()=>()=>{null!=m&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{null==m||m.destroy(),g(null)},500))},[m]),t.useEffect(()=>{a?null==m||m.disable():null==m||m.enable()},[a,m]);const y=t.useCallback((e="")=>e.replace(/<\/?p>/g,"").replace(/ /gi,"").replace(/<br\/?>/g,""),[]);t.useImperativeHandle(r,()=>({getHtml:()=>{if(null==m?void 0:m.isEmpty())return"";{const e=(null==m?void 0:m.getHtml())??"",t=y(e);return/\S+/.test(t)?e:""}},setValue:(e="")=>!!m&&(null==m||m.setHtml(e),!0)}));const S={};return a&&c?(S.minHeight=c.min+"px",S.maxHeight=c.max+"px",S.overflowY="auto"):S.height="number"==typeof s?s+"px":s,b.jsx(b.Fragment,{children:b.jsxs("div",{"data-nopadding":h,style:{border:u?"1px solid #E5E5E5":"",zIndex:99},className:"richeditor",children:[!a&&b.jsx(HRe,{editor:m,defaultConfig:q,mode:"default",style:{borderBottom:"1px solid #E5E5E5"}}),b.jsx(GRe,{defaultConfig:V,value:o,onCreated:g,mode:f,onChange:e=>{if(e&&e.selection)if(null==e?void 0:e.isEmpty())null==d||d("",e);else{const t=(null==e?void 0:e.getHtml())??"",r=y(t);/\S+/.test(r)?null==d||d(t,e):null==d||d("",e)}},style:{fontSize:"16px",...S}})]})})});Qh.RADIO,Qh.CHECKBOX,Qh.COMPLETION,Qh.ANSWER,Qh.ACM,Qh.CCM,Qh.RADIO,Qh.COMPLETION,Qh.ANSWER,Qh.CCM;const fUe={low:"简单",middle:"中等",high:"困难"},hUe="https://quiz.cloudlab.top",mUe="https://run.cloudlab.top",gUe=e=>{switch(e){case"radio":case"checkbox":return b.jsx($,{className:"w-4 h-4"});case"acm":case"ccm":return b.jsx(N,{className:"w-4 h-4"});case"completion":return b.jsx(z,{className:"w-4 h-4"});case"answer":return b.jsx(M,{className:"w-4 h-4"});default:return b.jsx(W,{className:"w-4 h-4"})}},qUe=e=>{switch(e){case"radio":return"单选题";case"checkbox":return"多选题";case"acm":case"ccm":return"编码测验";case"completion":return"填空题";case"answer":return"问答题";default:return"题目"}},VUe=e=>{switch(e){case"low":return"text-green-600 bg-green-100";case"middle":return"text-yellow-600 bg-yellow-100";case"high":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},vUe=e=>{const{currentIndex:t,questionsCount:r,type:n,difficulty:i="low",score:o}=e;return b.jsxs("div",{className:"questionHeader tailwind-scoped",children:[t&&r&&b.jsxs("div",{className:"questionIndex itemWrapper",children:["题目 ",t,"/",r]}),b.jsxs("span",{className:"questionType itemWrapper",children:[gUe(n)," ",qUe(n)]}),i&&b.jsx("div",{className:`difficulty itemWrapper ${VUe(i)}`,children:b.jsx("span",{className:"difficulty",children:fUe[i]})}),o&&b.jsxs("div",{className:"score itemWrapper",children:[b.jsx(_,{})," ",o," 分"]})]})},bUe=e=>{var n;const{data:i,onSubmit:o,buttonText:a,showQuestionTip:s,showResult:l,onNextQuestion:u}=e,{optionJson:c,answer:d,userAnswer:p,score:f,type:h,topic:m,content:g,auxiliary:q,difficulty:V,currentIndex:v,questionsCount:y}=i,[S,A]=t.useState(!0),[w,x]=t.useState(void 0),[C,E]=t.useState(),[k,T]=t.useState(""),[R,N]=t.useState([]);t.useEffect(()=>{p&&!C&&(E(p),p.indexOf(",")>-1?N(null==p?void 0:p.split(",")):T(p),O(p))},[i]);const O=e=>{if(!C&&!e)return void r.message.warning("请先作答!");const t=C||e;o&&!e&&void 0===w&&o(t),void 0!==w&&(null==u||u()),d&&l&&(t===d||t&&jh(null==t?void 0:t.split(","),null==d?void 0:d.split(","))?x(1):x(0))},W=["A","B","C","D","E","F","G","H","I","J"];return b.jsx("div",{className:"video-player-interaction tailwind-scoped",children:b.jsx("div",{className:"video-player-interaction-content",children:b.jsxs("div",{className:"video-player-interaction-content-main",children:[b.jsx(vUe,{score:f,type:h,difficulty:V,currentIndex:v,questionsCount:y}),b.jsx("div",{className:"video-player-interaction-content-desc",children:b.jsx(pUe,{defaultValue:m||g,readOnly:!0,noPadding:!0})}),b.jsx("div",{className:"video-player-interaction-content-options",children:"radio"===h?null==c?void 0:c.map(({key:e,value:t},r)=>b.jsx("button",{onClick:()=>(e=>{x(void 0),E(e+""),T(e+"")})(e),disabled:void 0!==w,className:`block w-full text-left p-4 rounded-lg border-2 transition-all ${k===e?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"} ${void 0!==w?e===d?"border-green-500 bg-green-50":k===e&&e!==d?"border-red-500 bg-red-50":"border-gray-200":""}`,children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("span",{children:[W[r],"、",t]}),void 0!==w&&e===d&&b.jsx(U,{className:"w-5 h-5 text-green-600"}),void 0!==w&&k===e&&e!==d&&b.jsx(F,{className:"w-5 h-5 text-red-600"})]})},e)):null==c?void 0:c.map(({key:e,value:t},r)=>b.jsx("button",{onClick:()=>(e=>{x(void 0);let t=C||"";if(t&&(null==t?void 0:t.indexOf(e))>-1){let r=t.split(",");r=r.filter(t=>t!==e),t=null==r?void 0:r.join(",")}else t=t?t+","+e:e;E(t)})(String(e)),disabled:void 0!==w,className:`block w-full text-left p-4 rounded-lg border-2 transition-all ${C&&(null==C?void 0:C.indexOf(e))>-1?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"} ${void 0!==w?d.indexOf(e)>-1?(null==C||C.indexOf(e),"border-green-500 bg-green-50"):C&&(null==C?void 0:C.indexOf(e))>-1&&-1===d.indexOf(e)?"border-red-500 bg-red-50":"border-gray-200":""}`,children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("span",{children:[W[r],"、",t]}),void 0!==w&&d.indexOf(e)>-1&&b.jsx(U,{className:"w-5 h-5 text-green-600"}),void 0!==w&&C&&(null==C?void 0:C.indexOf(e))>-1&&-1===d.indexOf(e)&&b.jsx(F,{className:"w-5 h-5 text-red-600"})]})},e+t))}),s&&0===w&&q&&(null==q?void 0:q.length)>0&&b.jsxs("div",{className:"video-player-interaction-content-tip",children:[b.jsxs("div",{className:"video-player-interaction-content-tip-icons",onClick:()=>{A(!S)},children:[b.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20x='0.535156'%20width='16'%20height='16'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.53516%201C4.66953%201%201.53516%204.13438%201.53516%208C1.53516%2011.8656%204.66953%2015%208.53516%2015C12.4008%2015%2015.5352%2011.8656%2015.5352%208C15.5352%204.13438%2012.4008%201%208.53516%201ZM8.03516%204.625C8.03516%204.55625%208.09141%204.5%208.16016%204.5H8.91016C8.97891%204.5%209.03516%204.55625%209.03516%204.625V8.875C9.03516%208.94375%208.97891%209%208.91016%209H8.16016C8.09141%209%208.03516%208.94375%208.03516%208.875V4.625ZM8.53516%2011.5C8.12109%2011.5%207.78516%2011.1641%207.78516%2010.75C7.78516%2010.3359%208.12109%2010%208.53516%2010C8.94922%2010%209.28516%2010.3359%209.28516%2010.75C9.28516%2011.1641%208.94922%2011.5%208.53516%2011.5Z'%20fill='%23FAAD14'/%3e%3c/svg%3e"}),b.jsx("span",{children:"提示"}),b.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20x='16.5352'%20y='16'%20width='16'%20height='16'%20transform='rotate(-180%2016.5352%2016)'%20fill='black'/%3e%3cpath%20d='M4.75455%2010.7326L8.71709%206.43956L12.68%2010.7326C12.8843%2010.9541%2013.2295%2010.9679%2013.4509%2010.7636C13.6723%2010.5592%2013.6862%2010.2141%2013.4818%209.99265L9.11818%205.26537C9.01492%205.15344%208.86956%205.08977%208.71727%205.08977C8.56498%205.08977%208.41963%205.15344%208.31636%205.26537L3.95273%209.99265C3.74838%2010.2141%203.76222%2010.5592%203.98364%2010.7636C4.20505%2010.9679%204.5502%2010.9541%204.75455%2010.7326'%20fill='%23FAAD14'/%3e%3c/svg%3e",style:{transform:S?"rotate(0deg)":"rotate(180deg)"}})]}),S&&b.jsxs("div",{className:"video-player-interaction-content-tip-text",children:[b.jsx(pUe,{defaultValue:null==(n=null==q?void 0:q[0])?void 0:n.description,readOnly:!0}),b.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clipPath='url(%23clip0_954_6949)'%3e%3cg%20filter='url(%23filter0_i_954_6949)'%3e%3cpath%20d='M26.9806%2012.2299L29.1814%2011.1896C29.9321%2013.1617%2030.1883%2015.2877%2029.9274%2017.3817C29.6665%2019.4757%2028.8965%2021.4739%2027.6848%2023.2015L25.6975%2021.81C26.6636%2020.4329%2027.2845%2018.8438%2027.5078%2017.1765C27.7311%2015.5092%2027.5503%2013.8127%2026.9806%2012.2299ZM17.053%205.27772C15.3709%205.28347%2013.7147%205.69355%2012.2243%206.47339C10.7338%207.25323%209.45264%208.37997%208.48881%209.75864L6.50399%208.36886C7.71308%206.63945%209.32747%205.23262%2011.206%204.27141C13.0845%203.31019%2015.1699%202.82387%2017.2798%202.85497L17.0554%205.2795L17.053%205.27772ZM12.325%2028.2294C12.0815%2028.5771%2011.772%2028.8734%2011.414%2029.1015C11.056%2029.3295%2010.6566%2029.4848%2010.2386%2029.5586C9.82061%2029.6323%209.39218%2029.6229%208.97778%2029.531C8.56339%2029.4392%208.17115%2029.2666%207.82346%2029.0231C7.47577%2028.7796%207.17943%2028.4701%206.95138%2028.1121C6.72332%2027.7541%206.56801%2027.3547%206.49431%2026.9367C6.34546%2026.0925%206.53806%2025.2237%207.02975%2024.5216L12.325%2028.2294ZM23.7127%2020.4202L20.9314%2024.3923L20.2555%2028.9549C20.2148%2029.2272%2020.1052%2029.4845%2019.9371%2029.7026C19.769%2029.9206%2019.548%2030.0921%2019.295%2030.2008C19.042%2030.3094%2018.7655%2030.3516%2018.4916%2030.3234C18.2178%2030.2952%2017.9556%2030.1974%2017.7301%2030.0395L3.48051%2020.0642C3.25433%2019.9064%203.07227%2019.6935%202.95167%2019.4455C2.83107%2019.1975%202.77592%2018.9228%202.79149%2018.6475C2.80706%2018.3721%202.89282%2018.1054%203.04062%2017.8726C3.18841%2017.6398%203.39332%2017.4487%203.63584%2017.3174L7.69207%2015.1218L10.4747%2011.15C11.3766%209.86202%2012.6346%208.8651%2014.0946%208.28134C15.5545%207.69757%2017.153%207.55231%2018.6943%207.86334L19.0811%207.31281C19.3203%206.95534%2019.6285%206.64922%2019.9876%206.41239C20.3467%206.17556%2020.7494%206.01279%2021.1722%205.93362C21.595%205.85444%2022.0293%205.86046%2022.4498%205.95132C22.8702%206.04217%2023.2683%206.21604%2023.6206%206.46273C23.973%206.70941%2024.2726%207.02396%2024.5018%207.38792C24.7311%207.75188%2024.8854%208.15794%2024.9557%208.5823C25.0259%209.00666%2025.0108%209.44078%2024.9111%209.85922C24.8115%2010.2777%2024.6293%2010.672%2024.3753%2011.0191L23.9911%2011.5701C24.811%2012.9126%2025.2214%2014.4651%2025.1719%2016.0374C25.1224%2017.6096%2024.6152%2019.1333%2023.7125%2020.4215L23.7127%2020.4202Z'%20fill='%23FFCC33'%20fill-opacity='0.15'/%3e%3c/g%3e%3cpath%20d='M21.3721%2019.6161C22.2185%2018.4077%2022.6941%2016.9787%2022.7405%2015.5041C22.787%2014.0291%2022.402%2012.5726%2021.6328%2011.3131L21.4625%2011.0344L21.6493%2010.7665L22.0335%2010.2156L22.04%2010.2062L22.0401%2010.2062C22.2549%209.91283%2022.4089%209.5795%2022.4931%209.2258C22.5774%208.87209%2022.5901%208.50513%2022.5307%208.14642C22.4713%207.78771%2022.3409%207.44447%2022.1471%207.13681C21.9534%206.82916%2021.7001%206.56327%2021.4023%206.35475C21.1044%206.14623%2020.7679%205.99926%2020.4125%205.92246C20.0571%205.84566%2019.69%205.84057%2019.3326%205.9075C18.9752%205.97442%2018.6348%206.11201%2018.3313%206.3122C18.0277%206.51239%2017.7672%206.77116%2017.565%207.07333L17.5587%207.08276L17.5586%207.08268L17.1718%207.63321L16.984%207.9005L16.6638%207.83588C15.2178%207.54409%2013.7182%207.68037%2012.3486%208.22802C10.9789%208.77567%209.79875%209.71092%208.95263%2010.9192L8.95257%2010.9193L6.16993%2014.8911L6.10222%2014.9877L5.99845%2015.0439L1.94222%2017.2396L1.94216%2017.2396C1.77467%2017.3302%201.63316%2017.4622%201.5311%2017.623C1.42903%2017.7838%201.36981%2017.968%201.35905%2018.1581C1.3483%2018.3482%201.38638%2018.538%201.46967%2018.7092C1.55296%2018.8805%201.67869%2019.0276%201.83489%2019.1365L1.83562%2019.137L16.0852%2029.1123L16.0854%2029.1124C16.2411%2029.2215%2016.4221%2029.289%2016.6112%2029.3084C16.8004%2029.3279%2016.9913%2029.2988%2017.166%2029.2238C17.3407%2029.1487%2017.4934%2029.0303%2017.6095%2028.8797C17.7254%2028.7293%2017.8011%2028.5518%2017.8293%2028.364L21.3721%2019.6161ZM21.3721%2019.6161L21.3715%2019.6158L18.5902%2023.5879L18.5225%2023.6846L18.5052%2023.8014L17.8294%2028.3634L21.3721%2019.6161ZM14.7994%202.84116L14.6671%204.27101C13.0611%204.34269%2011.4885%204.76584%2010.0608%205.51279C8.64735%206.25234%207.41357%207.28968%206.44341%208.55102L5.27665%207.73406C6.40133%206.25582%207.84479%205.04697%209.50211%204.19894C11.147%203.35725%2012.957%202.89436%2014.7994%202.84116ZM26.0717%2016.7253C26.2855%2015.1291%2026.1457%2013.5074%2025.6647%2011.9743L26.964%2011.3601C27.5441%2013.1097%2027.728%2014.9688%2027.4996%2016.8023C27.2694%2018.6498%2026.627%2020.4196%2025.6224%2021.982L24.4533%2021.1634C25.3069%2019.8204%2025.86%2018.3064%2026.0717%2016.7253ZM5.05507%2026.3323C4.95858%2025.7851%205.03183%2025.2256%205.25868%2024.7268L9.6592%2027.8081C9.52376%2027.941%209.37452%2028.0598%209.21372%2028.1622C8.91111%2028.355%208.5735%2028.4863%208.22015%2028.5486C7.86681%2028.6109%207.50466%2028.603%207.15437%2028.5253C6.80408%2028.4476%206.47252%2028.3017%206.17861%2028.096C5.88471%2027.8902%205.63421%2027.6285%205.44143%2027.3259C5.24866%2027.0233%205.11737%2026.6857%205.05507%2026.3323Z'%20stroke='%23FAA600'%20stroke-opacity='0.4'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_i_954_6949'%20x='2.78906'%20y='2.85352'%20width='27.2373'%20height='27.4785'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='-2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='arithmetic'%20k2='-1'%20k3='1'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.96%200%200%200%200%200.832%200%200%200%200%200.576%200%200%200%200.3%200'/%3e%3cfeBlend%20mode='normal'%20in2='shape'%20result='effect1_innerShadow_954_6949'/%3e%3c/filter%3e%3cclipPath%20id='clip0_954_6949'%3e%3crect%20width='32'%20height='32'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"})]})]}),o&&b.jsx("div",{className:"video-player-interaction-content-actions",children:b.jsx(r.Button,{type:"primary",onClick:()=>O(),children:a||(void 0===w?"提交":"下一题")})})]})})})};var yUe={exports:{}},SUe={exports:{}};"undefined"!=typeof self&&self,SUe.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return{}.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){function n(e){return"[object RegExp]"==={}.toString.call(e)}r.r(t),r.d(t,"Promise",function(){return N}),r.d(t,"TYPES",function(){return Qe}),r.d(t,"ProxyWindow",function(){return xe}),r.d(t,"setup",function(){return Ze}),r.d(t,"destroy",function(){return Ye}),r.d(t,"serializeMessage",function(){return Xe}),r.d(t,"deserializeMessage",function(){return ze}),r.d(t,"createProxyWindow",function(){return Ge}),r.d(t,"toProxyWindow",function(){return He}),r.d(t,"on",function(){return Le}),r.d(t,"once",function(){return je}),r.d(t,"send",function(){return Me}),r.d(t,"markWindowKnown",function(){return he}),r.d(t,"cleanUpWindow",function(){return Je}),r.d(t,"bridge",function(){});var i="Call was rejected by callee.\r\n";function o(e){return void 0===e&&(e=window),e.location.protocol}function a(e){if(void 0===e&&(e=window),e.mockDomain){var t=e.mockDomain.split("//")[0];if(t)return t}return o(e)}function s(e){return void 0===e&&(e=window),"about:"===a(e)}function l(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(t){}}function u(e){if(void 0===e&&(e=window),e&&!l(e))try{return e.opener}catch(t){}}function c(e){try{return!0}catch(t){}return!1}function d(e){void 0===e&&(e=window);var t=e.location;if(!t)throw new Error("Can not read window location");var r=o(e);if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var n=l(e);return n&&c()?d(n):"about://"}var i=t.host;if(!i)throw new Error("Can not read window host");return r+"//"+i}function p(e){void 0===e&&(e=window);var t=d(e);return t&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:t}function f(e){if(!function(e){try{if(e===window)return!0}catch(n){}try{var t=Object.getOwnPropertyDescriptor(e,"location");if(t&&!1===t.enumerable)return!1}catch(n){}try{if(s(e)&&c())return!0}catch(n){}try{if(void 0===(r=e)&&(r=window),"mock:"===a(r)&&c())return!0}catch(n){}var r;try{if(d(e)===d(window))return!0}catch(n){}return!1}(e))return!1;try{if(e===window)return!0;if(s(e)&&c())return!0;if(p(window)===p(e))return!0}catch(t){}return!1}function h(e){if(!f(e))throw new Error("Expected window to be same domain");return e}function m(e,t){if(!e||!t)return!1;var r=l(t);return r?r===e:-1!==function(e){var t=[];try{for(;e.parent!==e;)t.push(e.parent),e=e.parent}catch(r){}return t}(t).indexOf(e)}function g(e){var t,r,n=[];try{t=e.frames}catch(l){t=e}try{r=t.length}catch(l){}if(0===r)return n;if(r){for(var i=0;i<r;i++){var o=void 0;try{o=t[i]}catch(l){continue}n.push(o)}return n}for(var a=0;a<100;a++){var s=void 0;try{s=t[a]}catch(l){return n}if(!s)return n;n.push(s)}return n}var q=[],V=[];function v(e,t){void 0===t&&(t=!0);try{if(e===window)return!1}catch(o){return!0}try{if(!e)return!0}catch(o){return!0}try{if(e.closed)return!0}catch(o){return!o||o.message!==i}if(t&&f(e))try{if(e.mockclosed)return!0}catch(o){}try{if(!e.parent||!e.top)return!0}catch(o){}var r=function(e,t){for(var r=0;r<e.length;r++)try{if(e[r]===t)return r}catch(o){}return-1}(q,e);if(-1!==r){var n=V[r];if(n&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var t=e.ownerDocument;if(t&&t.documentElement&&!t.documentElement.contains(e)){for(var r=e;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!t.documentElement.contains(r.host))return!0}return!1}(n))return!0}return!1}function b(e){return void 0===e&&(e=window),u(e=e||window)||l(e)||void 0}function y(e,t){if("string"==typeof e){if("string"==typeof t)return"*"===e||t===e;if(n(t))return!1;if(Array.isArray(t))return!1}return n(e)?n(t)?e.toString()===t.toString():!Array.isArray(t)&&Boolean(t.match(e)):!!Array.isArray(e)&&(Array.isArray(t)?JSON.stringify(e)===JSON.stringify(t):!n(t)&&e.some(function(e){return y(e,t)}))}function S(e){try{if(e===window)return!0}catch(t){if(t&&t.message===i)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(t){if(t&&t.message===i)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&e.self===e)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&e.parent===e)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&e.top===e)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(t){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(t){}return!1}function A(e){if(f(e))return h(e).frameElement;for(var t=0,r=document.querySelectorAll("iframe");t<r.length;t++){var n=r[t];if(n&&n.contentWindow&&n.contentWindow===e)return n}}function w(e){if(void 0===(r=e)&&(r=window),Boolean(l(r))){var t=A(e);if(t&&t.parentElement)return void t.parentElement.removeChild(t)}var r;try{e.close()}catch(n){}}function x(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var t={}.toString;if(t){var r=t.call(e);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof e.then)return!0}catch(n){return!1}return!1}var C,E=[],k=[],T=0;function R(){if(!T&&C){var e=C;C=null,e.resolve()}}function U(){T+=1}function F(){T-=1,R()}var N=function(){function e(e){var t=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var r,n,i=!1,o=!1,a=!1;U();try{e(function(e){a?t.resolve(e):(i=!0,r=e)},function(e){a?t.reject(e):(o=!0,n=e)})}catch(s){return F(),void this.reject(s)}F(),a=!0,i?this.resolve(r):o&&this.reject(n)}}var t=e.prototype;return t.resolve=function(e){if(this.resolved||this.rejected)return this;if(x(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},t.reject=function(e){var t=this;if(this.resolved||this.rejected)return this;if(x(e))throw new Error("Can not reject promise with another promise");if(!e){var r=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){t.errorHandled||function(e,t){if(-1===E.indexOf(e)){E.push(e),setTimeout(function(){throw e},1);for(var r=0;r<k.length;r++)k[r](e,t)}}(e,t)},1),this.dispatch(),this},t.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},t.dispatch=function(){var t=this.resolved,r=this.rejected,n=this.handlers;if(!this.dispatching&&(t||r)){this.dispatching=!0,U();for(var i=function(e,t){return e.then(function(e){t.resolve(e)},function(e){t.reject(e)})},o=0;o<n.length;o++){var a=n[o],s=a.onSuccess,l=a.onError,u=a.promise,c=void 0;if(t)try{c=s?s(this.value):this.value}catch(p){u.reject(p);continue}else if(r){if(!l){u.reject(this.error);continue}try{c=l(this.error)}catch(p){u.reject(p);continue}}if(c instanceof e&&(c.resolved||c.rejected)){var d=c;d.resolved?u.resolve(d.value):u.reject(d.error),d.errorHandled=!0}else x(c)?c instanceof e&&(c.resolved||c.rejected)?c.resolved?u.resolve(c.value):u.reject(c.error):i(c,u):u.resolve(c)}n.length=0,this.dispatching=!1,F()}},t.then=function(t,r){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var n=new e;return this.handlers.push({promise:n,onSuccess:t,onError:r}),this.errorHandled=!0,this.dispatch(),n},t.catch=function(e){return this.then(void 0,e)},t.finally=function(t){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(r){return e.try(t).then(function(){return r})},function(r){return e.try(t).then(function(){throw r})})},t.timeout=function(e,t){var r=this;if(this.resolved||this.rejected)return this;var n=setTimeout(function(){r.resolved||r.rejected||r.reject(t||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(n),e})},t.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},t.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(t){return t instanceof e?t:x(t)?new e(function(e,r){return t.then(e,r)}):(new e).resolve(t)},e.reject=function(t){return(new e).reject(t)},e.asyncReject=function(t){return(new e).asyncReject(t)},e.all=function(t){var r=new e,n=t.length,i=[].slice();if(!n)return r.resolve(i),r;for(var o=function(e,t,o){return t.then(function(t){i[e]=t,0==(n-=1)&&r.resolve(i)},function(e){o.reject(e)})},a=0;a<t.length;a++){var s=t[a];if(s instanceof e){if(s.resolved){i[a]=s.value,n-=1;continue}}else if(!x(s)){i[a]=s,n-=1;continue}o(a,e.resolve(s),r)}return 0===n&&r.resolve(i),r},e.hash=function(t){var r={},n=[],i=function(e){if(t.hasOwnProperty(e)){var i=t[e];x(i)?n.push(i.then(function(t){r[e]=t})):r[e]=i}};for(var o in t)i(o);return e.all(n).then(function(){return r})},e.map=function(t,r){return e.all(t.map(r))},e.onPossiblyUnhandledException=function(e){return t=e,k.push(t),{cancel:function(){k.splice(k.indexOf(t),1)}};var t},e.try=function(t,r,n){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.try expected a function");var i;U();try{i=t.apply(r,n||[])}catch(o){return F(),e.reject(o)}return F(),e.resolve(i)},e.delay=function(t){return new e(function(e){setTimeout(e,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||x(t)},e.flush=function(){return t=C=C||new e,R(),t;var t},e}();function O(e,t){for(var r=0;r<e.length;r++)try{if(e[r]===t)return r}catch(n){}return-1}var W,D=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,t={};return Object.freeze(t),e.set(t,"__testvalue__"),"__testvalue__"===e.get(t)}catch(r){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var t=e.prototype;return t._cleanupClosedWindows=function(){for(var e=this.weakmap,t=this.keys,r=0;r<t.length;r++){var n=t[r];if(S(n)&&v(n)){if(e)try{e.delete(n)}catch(i){}t.splice(r,1),this.values.splice(r,1),r-=1}}},t.isSafeToReadWrite=function(e){return!S(e)},t.set=function(e,t){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(e,t)}catch(l){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var n=this.name,i=e[n];return void(i&&i[0]===e?i[1]=t:Object.defineProperty(e,n,{value:[e,t],writable:!0}))}catch(l){}this._cleanupClosedWindows();var o=this.keys,a=this.values,s=O(o,e);-1===s?(o.push(e),a.push(t)):a[s]=t},t.get=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return t.get(e)}catch(i){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=e[this.name];return r&&r[0]===e?r[1]:void 0}catch(i){}this._cleanupClosedWindows();var n=O(this.keys,e);if(-1!==n)return this.values[n]},t.delete=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.delete(e)}catch(o){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=e[this.name];r&&r[0]===e&&(r[0]=r[1]=void 0)}catch(o){}this._cleanupClosedWindows();var n=this.keys,i=O(n,e);-1!==i&&(n.splice(i,1),this.values.splice(i,1))},t.has=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return!0}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=e[this.name];return!(!r||r[0]!==e)}catch(n){}return this._cleanupClosedWindows(),-1!==O(this.keys,e)},t.getOrSet=function(e,t){if(this.has(e))return this.get(e);var r=t();return this.set(e,r),r},e}();function K(e){return e.name||e.__name__||e.displayName||"anonymous"}function B(e,t){try{delete e.name,e.name=t}catch(r){}return e.__name__=e.displayName=t,e}function P(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(16*Math.random()))})+"_"+function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))})).replace(/[=]/g,"");if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function I(e){try{return JSON.stringify([].slice.call(e),function(e,t){return"function"==typeof t?"memoize["+function(e){if(W=W||new D,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var t=W.get(e);return t||(t=typeof e+":"+P(),W.set(e,t)),t}(t)+"]":"undefined"!=typeof window&&t instanceof window.Element||null!==t&&"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument?{}:t})}catch(t){throw new Error("Arguments not serializable -- can not be used to memoize")}}function L(){return{}}var j=0,M=0;function X(e,t){void 0===t&&(t={});var r,n,i=t.thisNamespace,o=void 0!==i&&i,a=t.time,s=j;j+=1;var l=function(){for(var t=arguments.length,i=new Array(t),l=0;l<t;l++)i[l]=arguments[l];var u,c;s<M&&(r=null,n=null,s=j,j+=1),u=o?(n=n||new D).getOrSet(this,L):r=r||{};try{c=I(i)}catch(h){return e.apply(this,arguments)}var d=u[c];if(d&&a&&Date.now()-d.time<a&&(delete u[c],d=null),d)return d.value;var p=Date.now(),f=e.apply(this,arguments);return u[c]={time:p,value:f},f};return l.reset=function(){r=null,n=null},B(l,(t.name||K(e))+"::memoized")}function z(e){var t={};function r(){for(var r=arguments,n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=I(o);return t.hasOwnProperty(s)||(t[s]=N.try(function(){return e.apply(n,r)}).finally(function(){delete t[s]})),t[s]}return r.reset=function(){t={}},B(r,K(e)+"::promiseMemoized")}function G(){}function H(e,t){if(void 0===t&&(t=1),t>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";if("string"==typeof e)return e;if(e instanceof Error){var r=e&&e.stack,n=e&&e.message;if(r&&n)return-1!==r.indexOf(n)?r:n+"\n"+r;if(r)return r;if(n)return n}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(i){return"Error while stringifying error: "+H(i,t+1)}}function Z(e){return"string"==typeof e?e:e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function Y(e){return"[object RegExp]"==={}.toString.call(e)}function Q(e,t,r){if(e.hasOwnProperty(t))return e[t];var n=r();return e[t]=n,n}function J(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function _(){return Boolean(document.body)&&"complete"===document.readyState}function $(){return Boolean(document.body)&&"interactive"===document.readyState}X.clear=function(){M=j},X(function(e){if(Object.values)return Object.values(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}),X(function(){return new N(function(e){if(_()||$())return e();var t=setInterval(function(){if(_()||$())return clearInterval(t),e()},10)})});var ee="undefined"!=typeof document?document.currentScript:null,te=X(function(){if(ee)return ee;if(ee=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),t=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),r=t&&t[1];if(!r)return;for(var n=0,i=[].slice.call(document.getElementsByTagName("script")).reverse();n<i.length;n++){var o=i[n];if(o.src&&o.src===r)return o}}catch(a){}}())return ee;throw new Error("Can not determine current script")}),re=P();function ne(e){void 0===e&&(e=window);var t="__post_robot_10_0_46__";return e!==window?e[t]:e[t]=e[t]||{}}X(function(){var e;try{e=te()}catch(n){return re}var t=e.getAttribute("data-uid");if(t&&"string"==typeof t)return t;if((t=e.getAttribute("data-uid-auto"))&&"string"==typeof t)return t;if(e.src){var r=function(e){for(var t="",r=0;r<e.length;r++){var n=e[r].charCodeAt(0)*r;e[r+1]&&(n+=e[r+1].charCodeAt(0)*(r-1)),t+=String.fromCharCode(97+Math.abs(n)%26)}return t}(JSON.stringify({src:e.src,dataset:e.dataset}));t="uid_"+r.slice(r.length-30)}else t=P();return e.setAttribute("data-uid-auto",t),t});var ie=function(){return{}};function oe(e,t){return void 0===e&&(e="store"),void 0===t&&(t=ie),Q(ne(),e,function(){var e=t();return{has:function(t){return e.hasOwnProperty(t)},get:function(t,r){return e.hasOwnProperty(t)?e[t]:r},set:function(t,r){return e[t]=r,r},del:function(t){delete e[t]},getOrSet:function(t,r){return Q(e,t,r)},reset:function(){e=t()},keys:function(){return Object.keys(e)}}})}var ae,se=function(){};function le(){var e=ne();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new se,e.WINDOW_WILDCARD}function ue(e,t){return void 0===e&&(e="store"),void 0===t&&(t=ie),oe("windowStore").getOrSet(e,function(){var r=new D,n=function(e){return r.getOrSet(e,t)};return{has:function(t){return n(t).hasOwnProperty(e)},get:function(t,r){var i=n(t);return i.hasOwnProperty(e)?i[e]:r},set:function(t,r){return n(t)[e]=r,r},del:function(t){delete n(t)[e]},getOrSet:function(t,r){return Q(n(t),e,r)}}})}function ce(){return oe("instance").getOrSet("instanceID",P)}function de(e,t){var r=t.domain,n=ue("helloPromises"),i=n.get(e);i&&i.resolve({domain:r});var o=N.resolve({domain:r});return n.set(e,o),o}function pe(e,t){return(0,t.send)(e,"postrobot_hello",{instanceID:ce()},{domain:"*",timeout:-1}).then(function(t){var r=t.origin,n=t.data.instanceID;return de(e,{domain:r}),{win:e,domain:r,instanceID:n}})}function fe(e,t){var r=t.send;return ue("windowInstanceIDPromises").getOrSet(e,function(){return pe(e,{send:r}).then(function(e){return e.instanceID})})}function he(e){ue("knownWindows").set(e,!0)}function me(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function ge(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function qe(e,t){return{__type__:e,__val__:t}}var Ve,ve=((ae={}).function=function(){},ae.error=function(e){return qe("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},ae.promise=function(){},ae.regex=function(e){return qe("regex",e.source)},ae.date=function(e){return qe("date",e.toJSON())},ae.array=function(e){return e},ae.object=function(e){return e},ae.string=function(e){return e},ae.number=function(e){return e},ae.boolean=function(e){return e},ae.null=function(e){return e},ae[void 0]=function(e){return qe("undefined",e)},ae),be={},ye=((Ve={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},Ve.error=function(e){var t=e.stack,r=e.code,n=e.data,i=new Error(e.message);return i.code=r,n&&(i.data=n),i.stack=t+"\n\n"+i.stack,i},Ve.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},Ve.regex=function(e){return new RegExp(e)},Ve.date=function(e){return new Date(e)},Ve.array=function(e){return e},Ve.object=function(e){return e},Ve.string=function(e){return e},Ve.number=function(e){return e},Ve.boolean=function(e){return e},Ve.null=function(e){return e},Ve[void 0]=function(){},Ve),Se={};function Ae(){for(var e=oe("idToProxyWindow"),t=0,r=e.keys();t<r.length;t++){var n=r[t];e.get(n).shouldClean()&&e.del(n)}}function we(e,t){var r=t.send,n=t.id,i=void 0===n?P():n,o=e.then(function(e){if(f(e))return h(e).name}),a=e.then(function(e){if(v(e))throw new Error("Window is closed, can not determine type");return u(e)?"popup":"iframe"});o.catch(G),a.catch(G);var s=function(){return e.then(function(e){if(!v(e))return f(e)?h(e).name:o})};return{id:i,getType:function(){return a},getInstanceID:z(function(){return e.then(function(e){return fe(e,{send:r})})}),close:function(){return e.then(w)},getName:s,focus:function(){return e.then(function(e){e.focus()})},isClosed:function(){return e.then(function(e){return v(e)})},setLocation:function(t,r){return void 0===r&&(r={}),e.then(function(e){var n=window.location.protocol+"//"+window.location.host,i=r.method,o=void 0===i?"get":i,a=r.body;if(0===t.indexOf("/"))t=""+n+t;else if(!t.match(/^https?:\/\//)&&0!==t.indexOf(n))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(t));if("post"===o)return s().then(function(e){if(!e)throw new Error("Can not post to window without target name");!function(e){var t=e.url,r=e.target,n=e.body,i=e.method,o=void 0===i?"post":i,a=document.createElement("form");if(a.setAttribute("target",r),a.setAttribute("method",o),a.setAttribute("action",t),a.style.display="none",n)for(var s=0,l=Object.keys(n);s<l.length;s++){var u,c=l[s],d=document.createElement("input");d.setAttribute("name",c),d.setAttribute("value",null==(u=n[c])?void 0:u.toString()),a.appendChild(d)}J().appendChild(a),a.submit(),J().removeChild(a)}({url:t,target:e,method:o,body:a})});if("get"!==o)throw new Error("Unsupported method: "+o);if(f(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(t)}catch(l){}e.location=t})},setName:function(t){return e.then(function(e){var r=f(e),n=A(e);if(!r)throw new Error("Can not set name for cross-domain window: "+t);h(e).name=t,n&&n.setAttribute("name",t),o=N.resolve(t)})}}}new N(function(e){if(window.document&&window.document.body)return e(window.document.body);var t=setInterval(function(){if(window.document&&window.document.body)return clearInterval(t),e(window.document.body)},10)});var xe=function(){function e(e){var t=e.send,r=e.win,n=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new N,this.serializedWindow=n||we(this.actualWindowPromise,{send:t}),oe("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{send:t})}var t=e.prototype;return t.getID=function(){return this.serializedWindow.id},t.getType=function(){return this.serializedWindow.getType()},t.isPopup=function(){return this.getType().then(function(e){return"popup"===e})},t.setLocation=function(e,t){var r=this;return this.serializedWindow.setLocation(e,t).then(function(){return r})},t.getName=function(){return this.serializedWindow.getName()},t.setName=function(e){var t=this;return this.serializedWindow.setName(e).then(function(){return t})},t.close=function(){var e=this;return this.serializedWindow.close().then(function(){return e})},t.focus=function(){var e=this,t=this.isPopup(),r=this.getName(),n=N.hash({isPopup:t,name:r}).then(function(e){var t=e.name;e.isPopup&&t&&window.open("",t,"noopener")}),i=this.serializedWindow.focus();return N.all([n,i]).then(function(){return e})},t.isClosed=function(){return this.serializedWindow.isClosed()},t.getWindow=function(){return this.actualWindow},t.setWindow=function(e,t){var r=t.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=we(this.actualWindowPromise,{send:r,id:this.getID()}),ue("winToProxyWindow").set(e,this)},t.awaitWindow=function(){return this.actualWindowPromise},t.matchWindow=function(e,t){var r=this,n=t.send;return N.try(function(){return r.actualWindow?e===r.actualWindow:N.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:fe(e,{send:n})}).then(function(t){var i=t.proxyInstanceID===t.knownWindowInstanceID;return i&&r.setWindow(e,{send:n}),i})})},t.unwrap=function(){return this.actualWindow||this},t.getInstanceID=function(){return this.serializedWindow.getInstanceID()},t.shouldClean=function(){return Boolean(this.actualWindow&&v(this.actualWindow))},t.serialize=function(){return this.serializedWindow},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t,r){var n=r.send;return Ae(),e.toProxyWindow(t,{send:n}).serialize()},e.deserialize=function(t,r){var n=r.send;return Ae(),oe("idToProxyWindow").get(t.id)||new e({serializedWindow:t,send:n})},e.isProxyWindow=function(e){return Boolean(e&&!S(e)&&e.isProxyWindow)},e.toProxyWindow=function(t,r){var n=r.send;if(Ae(),e.isProxyWindow(t))return t;var i=t;return ue("winToProxyWindow").get(i)||new e({win:i,send:n})},e}();function Ce(e,t,r,n,i){var o=ue("methodStore"),a=oe("proxyWindowMethods");xe.isProxyWindow(n)?a.set(e,{val:t,name:r,domain:i,source:n}):(a.del(e),o.getOrSet(n,function(){return{}})[e]={domain:i,name:r,val:t,source:n})}function Ee(e,t){var r=ue("methodStore"),n=oe("proxyWindowMethods");return r.getOrSet(e,function(){return{}})[t]||n.get(t)}function ke(e,t,r,n,i){var o,a,s;a=(o={on:i.on,send:i.send}).on,s=o.send,oe("builtinListeners").getOrSet("functionCalls",function(){return a("postrobot_method",{domain:"*"},function(e){var t=e.source,r=e.origin,n=e.data,i=n.id,o=n.name,a=Ee(t,i);if(!a)throw new Error("Could not find method '"+o+"' with id: "+n.id+" in "+p(window));var l=a.source,u=a.domain,c=a.val;return N.try(function(){if(!y(u,r))throw new Error("Method '"+n.name+"' domain "+JSON.stringify(Y(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+p(window));if(xe.isProxyWindow(l))return l.matchWindow(t,{send:s}).then(function(e){if(!e)throw new Error("Method call '"+n.name+"' failed - proxy window does not match source in "+p(window))})}).then(function(){return c.apply({source:t,origin:r},n.args)},function(e){return N.try(function(){if(c.onError)return c.onError(e)}).then(function(){var t,r;throw e.stack&&(e.stack="Remote call to "+o+"("+(void 0===(t=n.args)&&(t=[]),(r=t,[].slice.call(r)).map(function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"}).join(", ")+") failed\n\n")+e.stack),e})}).then(function(e){return{result:e,id:i,name:o}})})});var l=r.__id__||P();e=xe.unwrap(e);var u=r.__name__||r.name||n;return"string"==typeof u&&"function"==typeof u.indexOf&&0===u.indexOf("anonymous::")&&(u=u.replace("anonymous::",n+"::")),xe.isProxyWindow(e)?(Ce(l,r,u,e,t),e.awaitWindow().then(function(e){Ce(l,r,u,e,t)})):Ce(l,r,u,e,t),qe("cross_domain_function",{id:l,name:u})}function Te(e,t,r,n){var i,o=n.on,a=n.send;return function(e,t){void 0===t&&(t=be);var r=JSON.stringify(e,function(e){var r=this[e];if(me(this))return r;var n=ge(r);if(!n)return r;var i=t[n]||ve[n];return i?i(r,e):r});return void 0===r?"undefined":r}(r,((i={}).promise=function(r,n){return i=r,qe("cross_domain_zalgo_promise",{then:ke(e,t,function(e,t){return i.then(e,t)},n,{on:(s={on:o,send:a}).on,send:s.send})});var i,s},i.function=function(r,n){return ke(e,t,r,n,{on:o,send:a})},i.object=function(e){return S(e)||xe.isProxyWindow(e)?qe("cross_domain_window",xe.serialize(e,{send:a})):e},i))}function Re(e,t,r,n){var i,o=n.send;return function(e,t){if(void 0===t&&(t=Se),"undefined"!==e)return JSON.parse(e,function(e,r){if(me(this))return r;var n,i;if(me(r)?(n=r.__type__,i=r.__val__):(n=ge(r),i=r),!n)return i;var o=t[n]||ye[n];return o?o(i,e):i})}(r,((i={}).cross_domain_zalgo_promise=function(e){return new N(e.then)},i.cross_domain_function=function(r){return n=e,i=t,s={send:o},l=(a=r).id,u=a.name,c=s.send,d=function(e){function t(){var r=arguments;return xe.toProxyWindow(n,{send:c}).awaitWindow().then(function(n){var o=Ee(n,l);if(o&&o.val!==t)return o.val.apply({source:window,origin:p()},r);var a=[].slice.call(r);return e.fireAndForget?c(n,"postrobot_method",{id:l,name:u,args:a},{domain:i,fireAndForget:!0}):c(n,"postrobot_method",{id:l,name:u,args:a},{domain:i,fireAndForget:!1}).then(function(e){return e.data.result})}).catch(function(e){throw e})}return void 0===e&&(e={}),t.__name__=u,t.__origin__=i,t.__source__=n,t.__id__=l,t.origin=i,t},(f=d()).fireAndForget=d({fireAndForget:!0}),f;var n,i,a,s,l,u,c,d,f},i.cross_domain_window=function(e){return xe.deserialize(e,{send:o})},i))}var Ue={};function Fe(e,t,r,n){var i=n.on,o=n.send;return N.try(function(){var n=ue().getOrSet(e,function(){return{}});return n.buffer=n.buffer||[],n.buffer.push(r),n.flush=n.flush||N.flush().then(function(){if(v(e))throw new Error("Window is closed");var r,a=Te(e,t,((r={}).__post_robot_10_0_46__=n.buffer||[],r),{on:i,send:o});delete n.buffer;for(var s=Object.keys(Ue),l=[],u=0;u<s.length;u++){var c=s[u];try{Ue[c](e,a,t)}catch(d){l.push(d)}}if(l.length===s.length)throw new Error("All post-robot messaging strategies failed:\n\n"+l.map(function(e,t){return t+". "+H(e)}).join("\n\n"))}),n.flush.then(function(){delete n.flush})}).then(G)}function Ne(e){return oe("responseListeners").get(e)}function Oe(e){oe("responseListeners").del(e)}function We(e){return oe("erroredResponseListeners").has(e)}function De(e){var t=e.name,r=e.win,n=e.domain,i=ue("requestListeners");if("*"===r&&(r=null),"*"===n&&(n=null),!t)throw new Error("Name required to get request listener");for(var o=0,a=[r,le()];o<a.length;o++){var s=a[o];if(s){var l=i.get(s);if(l){var u=l[t];if(u){if(n&&"string"==typeof n){if(u[n])return u[n];if(u.__domain_regex__)for(var c=0,d=u.__domain_regex__;c<d.length;c++){var p=d[c],f=p.listener;if(y(p.regex,n))return f}}if(u["*"])return u["*"]}}}}}function Ke(e,t,r,n){var i=n.on,o=n.send,a=De({name:r.name,win:e,domain:t}),s="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function l(n,a,l){return N.flush().then(function(){if(!r.fireAndForget&&!v(e))try{return Fe(e,t,{id:P(),origin:p(window),type:"postrobot_message_response",hash:r.hash,name:r.name,ack:n,data:a,error:l},{on:i,send:o})}catch(u){throw new Error("Send response message failed for "+s+" in "+p()+"\n\n"+H(u))}})}return N.all([N.flush().then(function(){if(!r.fireAndForget&&!v(e))try{return Fe(e,t,{id:P(),origin:p(window),type:"postrobot_message_ack",hash:r.hash,name:r.name},{on:i,send:o})}catch(n){throw new Error("Send ack message failed for "+s+" in "+p()+"\n\n"+H(n))}}),N.try(function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);return a.handler({source:e,origin:t,data:r.data})}).then(function(e){return l("success",e)},function(e){return l("error",null,e)})]).then(G).catch(function(e){if(a&&a.handleError)return a.handleError(e);throw e})}function Be(e,t,r){if(!We(r.hash)){var n=Ne(r.hash);if(!n)throw new Error("No handler found for post message ack for message: "+r.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!y(n.domain,t))throw new Error("Ack origin "+t+" does not match domain "+n.domain.toString());if(e!==n.win)throw new Error("Ack source does not match registered window")}catch(i){n.promise.reject(i)}n.ack=!0}}function Pe(e,t,r){if(!We(r.hash)){var i,o=Ne(r.hash);if(!o)throw new Error("No handler found for post message response for message: "+r.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!y(o.domain,t))throw new Error("Response origin "+t+" does not match domain "+(i=o.domain,Array.isArray(i)?"("+i.join(" | ")+")":n(i)?"RegExp("+i.toString()+")":i.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Oe(r.hash),"error"===r.ack?o.promise.reject(r.error):"success"===r.ack&&o.promise.resolve({source:e,origin:t,data:r.data})}}function Ie(e,t){var r=t.on,n=t.send,i=oe("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(c){return}var o=e.source,a=e.origin,s=function(e,t,r,n){var i,o=n.on,a=n.send;try{i=Re(t,r,e,{on:o,send:a})}catch(c){return}if(i&&"object"==typeof i&&null!==i){var s=i.__post_robot_10_0_46__;if(Array.isArray(s))return s}}(e.data,o,a,{on:r,send:n});if(s){he(o);for(var l=0;l<s.length;l++){var u=s[l];if(i.has(u.id))return;if(i.set(u.id,!0),v(o)&&!u.fireAndForget)return;0===u.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===u.type?Ke(o,a,u,{on:r,send:n}):"postrobot_message_response"===u.type?Pe(o,a,u):"postrobot_message_ack"===u.type&&Be(o,a,u)}catch(c){setTimeout(function(){throw c},0)}}}}function Le(e,t,r){if(!e)throw new Error("Expected name");if("function"==typeof(t=t||{})&&(r=t,t={}),!r)throw new Error("Expected handler");var n=function e(t,r){var n=t.name,i=t.win,o=t.domain,a=ue("requestListeners");if(!n||"string"!=typeof n)throw new Error("Name required to add request listener");if(i&&"*"!==i&&xe.isProxyWindow(i)){var s=i.awaitWindow().then(function(t){return e({name:n,win:t,domain:o},r)});return{cancel:function(){s.then(function(e){return e.cancel()},G)}}}var l=i;if(Array.isArray(l)){for(var u=[],c=0,d=l;c<d.length;c++)u.push(e({name:n,domain:o,win:d[c]},r));return{cancel:function(){for(var e=0;e<u.length;e++)u[e].cancel()}}}if(Array.isArray(o)){for(var p=[],f=0,h=o;f<h.length;f++)p.push(e({name:n,win:l,domain:h[f]},r));return{cancel:function(){for(var e=0;e<p.length;e++)p[e].cancel()}}}var m=De({name:n,win:l,domain:o});l&&"*"!==l||(l=le());var g=(o=o||"*").toString();if(m)throw l&&o?new Error("Request listener already exists for "+n+" on domain "+o.toString()+" for "+(l===le()?"wildcard":"specified")+" window"):l?new Error("Request listener already exists for "+n+" for "+(l===le()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+n+" on domain "+o.toString()):new Error("Request listener already exists for "+n);var q,V,v=a.getOrSet(l,function(){return{}}),b=Q(v,n,function(){return{}});return Y(o)?(q=Q(b,"__domain_regex__",function(){return[]})).push(V={regex:o,listener:r}):b[g]=r,{cancel:function(){delete b[g],V&&(q.splice(q.indexOf(V,1)),q.length||delete b.__domain_regex__),Object.keys(b).length||delete v[n],l&&!Object.keys(v).length&&a.del(l)}}}({name:e,win:t.window,domain:t.domain||"*"},{handler:r||t.handler,handleError:t.errorHandler||function(e){throw e}});return{cancel:function(){n.cancel()}}}function je(e,t,r){"function"==typeof(t=t||{})&&(r=t,t={});var n,i=new N;return t.errorHandler=function(e){n.cancel(),i.reject(e)},n=Le(e,t,function(e){if(n.cancel(),i.resolve(e),r)return r(e)}),i.cancel=n.cancel,i}Ue.postrobot_post_message=function(e,t,r){0===r.indexOf("file:")&&(r="*"),e.postMessage(t,r)};var Me=function e(t,r,n,i){var o=(i=i||{}).domain||"*",a=i.timeout||-1,s=i.timeout||5e3,u=i.fireAndForget||!1;return xe.toProxyWindow(t,{send:e}).awaitWindow().then(function(t){return N.try(function(){if(function(e,t,r){if(!e)throw new Error("Expected name");if("string"!=typeof r&&!Array.isArray(r)&&!Y(r))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(r)+" to be a string, array, or regex");if(v(t))throw new Error("Can not send "+e+". Target window is closed")}(r,t,o),function(e,t){var r=b(t);if(r)return r===e;if(t===e)return!1;if(function(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(i){}if(l(e)===e)return e;try{if(m(window,e)&&window.top)return window.top}catch(i){}try{if(m(e,window)&&window.top)return window.top}catch(i){}for(var t=0,r=function e(t){for(var r=[],n=0,i=g(t);n<i.length;n++){var o=i[n];r.push(o);for(var a=0,s=e(o);a<s.length;a++)r.push(s[a])}return r}(e);t<r.length;t++){var n=r[t];try{if(n.top)return n.top}catch(i){}if(l(n)===n)return n}}(t)===t)return!1;for(var n=0,i=g(e);n<i.length;n++)if(i[n]===t)return!0;return!1}(window,t))return function(e,t,r){void 0===t&&(t=5e3),void 0===r&&(r="Window");var n,i=(n=e,ue("helloPromises").getOrSet(n,function(){return new N}));return-1!==t&&(i=i.timeout(t,new Error(r+" did not load after "+t+"ms"))),i}(t,s)}).then(function(r){return n=t,i=o,a=(void 0===r?{}:r).domain,s=e,N.try(function(){return"string"==typeof i?i:N.try(function(){return a||pe(n,{send:s}).then(function(e){return e.domain})}).then(function(e){if(!y(i,i))throw new Error("Domain "+Z(i)+" does not match "+Z(i));return e})});var n,i,a,s}).then(function(i){var o,s,l,c,d=i,f="postrobot_method"===r&&n&&"string"==typeof n.name?n.name+"()":r,h=new N,m=r+"_"+P();if(!u){var g={name:r,win:t,domain:d,promise:h};l=m,c=g,oe("responseListeners").set(l,c);var q=ue("requestPromises").getOrSet(t,function(){return[]});q.push(h),h.catch(function(){!function(e){oe("erroredResponseListeners").set(e,!0)}(m),Oe(m)});var V=(s=t,ue("knownWindows").get(s,!1)?1e4:2e3),b=a,y=V,S=b,A=(function e(){o=setTimeout(function(){v(t)?h.reject(new Error("Window closed for "+r+" before "+(g.ack?"response":"ack"))):g.cancelled?h.reject(new Error("Response listener was cancelled for "+r)):(y=Math.max(y-500,0),-1!==S&&(S=Math.max(S-500,0)),g.ack||0!==y?0===S&&h.reject(new Error("No response for postMessage "+f+" in "+p()+" in "+b+"ms")):h.reject(new Error("No ack for postMessage "+f+" in "+p()+" in "+V+"ms"))),e()},500)}(),{cancel:function(){clearTimeout(o)}});h.finally(function(){A.cancel(),q.splice(q.indexOf(h,1))}).catch(G)}return Fe(t,d,{id:P(),origin:p(window),type:"postrobot_message_request",hash:m,name:r,data:n,fireAndForget:u},{on:Le,send:e}).then(function(){return u?h.resolve():h},function(e){throw new Error("Send request message failed for "+f+" in "+p()+"\n\n"+H(e))})})})};function Xe(e,t,r){return Te(e,t,r,{on:Le,send:Me})}function ze(e,t,r){return Re(e,t,r,{send:Me})}function Ge(e){return new xe({send:Me,win:e})}function He(e){return xe.toProxyWindow(e,{send:Me})}function Ze(){var e,t,r,n,i,o,a;ne().initialized||(ne().initialized=!0,i=(n={on:Le,send:Me}).on,o=n.send,(a=ne()).receiveMessage=a.receiveMessage||function(e){return Ie(e,{on:i,send:o})},t=(e={on:Le,send:Me}).on,r=e.send,oe().getOrSet("postMessageListener",function(){return e=window,n=function(e){var n,i,o,a;n=e,o=(i={on:t,send:r}).on,a=i.send,N.try(function(){var e=n.source||n.sourceElement,t=n.origin||n.originalEvent&&n.originalEvent.origin,r=n.data;if("null"===t&&(t="file://"),e){if(!t)throw new Error("Post message did not have origin domain");Ie({source:e,origin:t,data:r},{on:o,send:a})}})},e.addEventListener("message",n),{cancel:function(){e.removeEventListener("message",n)}};var e,n}),function(e){var t=e.on,r=e.send;oe("builtinListeners").getOrSet("helloListener",function(){var e=t("postrobot_hello",{domain:"*"},function(e){return de(e.source,{domain:e.origin}),{instanceID:ce()}}),n=b();return n&&pe(n,{send:r}).catch(function(e){}),e})}({on:Le,send:Me}))}function Ye(){var e;!function(){for(var e=oe("responseListeners"),t=0,r=e.keys();t<r.length;t++){var n=r[t],i=e.get(n);i&&(i.cancelled=!0),e.del(n)}}(),(e=oe().get("postMessageListener"))&&e.cancel(),delete window.__post_robot_10_0_46__}var Qe=!0;function Je(e){for(var t=0,r=ue("requestPromises").get(e,[]);t<r.length;t++)r[t].reject(new Error("Window "+(v(e)?"closed":"cleaned up")+" before response")).catch(G)}Ze()}]);var AUe=SUe.exports;!function(e){e.exports=AUe,e.exports.default=e.exports}(yUe);const wUe=f(yUe.exports),xUe=e=>{const{data:n,buttonText:i,codeTestURL:o=hUe,codeplayerURL:a=mUe,toRunCodeQuestion:s}=e,{verifyMode:l="",content:u="",topic:c,example:d,lang:p,cases:f}=n;t.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const h=t.useRef(null);return b.jsx("div",{className:"question-preview",children:b.jsx("div",{className:"content",children:b.jsx("div",{className:"preview-container",children:b.jsx("div",{className:"preview",children:b.jsxs("div",{className:"preview-content",children:[b.jsx(vUe,{score:n.score,type:n.type,difficulty:n.difficulty,currentIndex:null==n?void 0:n.currentIndex,questionsCount:null==n?void 0:n.questionsCount}),c&&b.jsx("div",{className:"topic",children:c}),u.trim()?b.jsx(pUe,{editorHeight:"fit-content",readOnly:!0,isBorder:!1,defaultValue:u,noPadding:!0}):b.jsx("p",{}),b.jsx(r.Button,{className:"submitBtn",onClick:()=>{if(s)s();else if(l===Jh.INPUT_OUTPUT){const e=window.open(o),t=null==f?void 0:f.map(({input:e,output:t})=>Array.isArray(e)?{input:e,output:t}:{input:[e],output:t});wUe.send(e,"send",{title:c,content:u,initCode:d,code:d,lang:null==p?void 0:p.toLocaleLowerCase(),cases:t,submitCases:t,noSubmit:!0,aiEnabled:!0})}else{const e=window.open(`${a}`),t=()=>{let t=[d];if("html"===n.lang&&d)try{const e=JSON.parse(d);t=[e.html??"",e.css??"",e.js??""]}catch(r){}wUe.send(e,"send",{title:c,content:u,lang:null==p?void 0:p.toLocaleLowerCase(),code:t,aiEnabled:!0,run:!1,dark:!0})};t(),wUe.on("refresh",{window:e},async function(){h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{(null==e?void 0:e.closed)||t()},500)}),wUe.on("change",{window:e},e=>{})}},type:"primary",style:{minWidth:"88px"},children:i||"去答题"})]})})})})})},{TextArea:CUe}=r.Input,EUe=e=>{const{status:n,data:i,onSubmit:o,buttonText:a,onNextQuestion:s}=e,{answerOption:l,userAnswer:u,topic:c}=i,[d,p]=t.useState([]),[f,h]=t.useState(),[m,g]=t.useState(!1),q=e=>{if(V&&!e)return void r.message.warning("请先进行填空!");if(m&&!e)return void(null==s||s());const t=e||d,n=null==l?void 0:l.every((e,r)=>{var n;return(null==e?void 0:e.answer)===(null==(n=t[r])?void 0:n.answer)});h(n),g(!0),!e&&(null==o||o(t))},V=t.useMemo(()=>d.every(e=>!(null==e?void 0:e.answer)),[d]);return t.useEffect(()=>{let e;"string"==typeof u&&(e=Mh(u));const t=(e||u||l||[]).map(e=>({answer:n===_h.ADD||u?null==e?void 0:e.answer:void 0}))??[];p(t),u&&q(t)},[n,u,l]),b.jsxs("div",{className:"completion",children:[b.jsx("div",{className:"completion-title",children:b.jsxs("div",{className:"completion-title-content",children:[b.jsx(vUe,{score:i.score,type:i.type,difficulty:i.difficulty,currentIndex:null==i?void 0:i.currentIndex,questionsCount:null==i?void 0:i.questionsCount}),b.jsx(pUe,{isBorder:!1,defaultValue:c.indexOf("<code")>-1?c.replace(/<code[^>]*>|<\/code>/g,""):c,readOnly:!0,autoHeight:{min:0,max:1e5},noPadding:!0})]})}),b.jsx("div",{className:"completion-content",children:null==d?void 0:d.map((e,t)=>{var r,i,o;return b.jsxs("div",{className:"item-warpper",children:[b.jsxs("div",{className:"completion-content-item",children:[b.jsxs("span",{children:["填空",t+1]}),b.jsx(CUe,{style:{resize:"none"},placeholder:n===_h.EXAM||n===_h.PREVIEW?"请输入答案":"",disabled:n===_h.ADD||m,autoSize:{maxRows:3},value:null==e?void 0:e.answer,onChange:e=>((e,t)=>{h(void 0),g(!1);const r=e.target.value,n=[...d];n[t].answer=r,p(n)})(e,t)})]}),m&&b.jsx("div",{className:"item-result "+((null==e?void 0:e.answer)===(null==(r=l[t])?void 0:r.answer)?"right":"error"),children:(null==e?void 0:e.answer)===(null==(i=l[t])?void 0:i.answer)?b.jsxs("span",{children:[b.jsx($e,{})," 正确"]}):b.jsxs("span",{children:[b.jsx(st,{})," 错误, ",b.jsxs("span",{className:"answer",children:["正确答案:",null==(o=l[t])?void 0:o.answer]})]})})]},String(t))})}),o&&b.jsx("div",{className:"submit-btn",children:b.jsx(r.Button,{type:"primary",onClick:()=>q(),children:a||(m?"下一题":"提交")})})]})},kUe=e=>{const{status:n=_h.EXAM,data:i,onSubmit:o,buttonText:a,onNextQuestion:s}=e,[l,u]=t.useState(),[c,d]=t.useState(!1),p=t.useRef(null);t.useEffect(()=>{i.userAnswer&&(u(i.userAnswer),f(i.userAnswer))},[i]);const f=e=>{if(c&&!e)return void(null==s||s());const t=e||l;t?(d(!0),!e&&o&&o(t)):r.message.warning("请输入答案!")},h=[];return[_h.ADD,_h.MARK].includes(n)&&i&&(i.answer&&h.push({key:"1",label:b.jsxs(b.Fragment,{children:[b.jsx("span",{style:{fontWeight:"bold"},children:"参考答案"}),b.jsx("span",{style:{fontSize:"12px",color:"#999999"},children:"(学生不可见)"})]}),children:b.jsx(pUe,{readOnly:!0,isBorder:!1,defaultValue:i.answer,autoHeight:{min:0,max:1e4}})}),i.judgeNorm&&h.push({key:"2",label:b.jsxs(b.Fragment,{children:[b.jsx("span",{style:{fontWeight:"bold"},children:"判分标准"}),b.jsx("span",{style:{fontSize:"12px",color:"#999999"},children:"(学生不可见)"})]}),children:b.jsx(pUe,{readOnly:!0,defaultValue:i.judgeNorm,isBorder:!1,autoHeight:{min:0,max:1e4}})})),b.jsxs("div",{className:"essay-question",children:[b.jsx("div",{className:"essay-question-title",children:b.jsxs("div",{className:"essay-question-title-content",children:[b.jsx(vUe,{score:i.score,type:i.type,difficulty:i.difficulty,currentIndex:null==i?void 0:i.currentIndex,questionsCount:null==i?void 0:i.questionsCount}),b.jsx(pUe,{defaultValue:null==i?void 0:i.topic,readOnly:!0,isBorder:!1,autoHeight:{min:0,max:1e5},noPadding:!0})]})}),b.jsxs("div",{className:"essay-question-content",children:[[_h.MARK,_h.VIEW,_h.EXAM,_h.PREVIEW].includes(n)&&b.jsx(pUe,{ref:p,readOnly:n===_h.ADD||n===_h.MARK||n===_h.VIEW,editorHeight:220,defaultValue:(null==i?void 0:i.userAnswer)||"",placeholder:n===_h.EXAM||n===_h.PREVIEW?"请输入回答":"",onChange:e=>{u(e)},customToolbarKeys:["undo","redo","fullScreen","|","headerSelect","bold",{key:"group-image",title:"图片",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',menuKeys:["insertImage","uploadImage"]},"insertTable"],uploadImageLimit:e=>e.size>3145728&&(r.message.destroy(),r.message.warning("仅能上传大小为3MB内的图片噢~"),!0)}),[_h.ADD,_h.MARK].includes(n)&&b.jsx(r.Collapse,{defaultActiveKey:n===_h.ADD?["1","2"].filter(e=>!("1"===e&&!(null==i?void 0:i.answer)||"2"===e&&!(null==i?void 0:i.judgeNorm))):[],ghost:!0,expandIcon:({isActive:e})=>b.jsx(Ye,{rotate:e?90:0}),items:h})]}),o&&b.jsx("div",{className:"submit-btn",children:b.jsx(r.Button,{type:"primary",onClick:()=>f(),children:a||c?"下一题":"提交"})})]})},TUe=t.forwardRef((e,r)=>{const{data:n,questionProps:i={}}=e,{onSubmit:o,onNextQuestion:a,buttonText:s="",showQuestionTip:l=!1,showResult:u,status:c=_h.PREVIEW,className:d="",styles:p={},uploadImg:f,codeTestURL:h,codeplayerURL:m,unknowQesutionRender:g,toRunCodeQuestion:q}=i,V=t.useMemo(()=>{const e={...n},{optionJson:t,type:r}=n;return!t||r!==Qh.ACM&&r!==Qh.CCM||(e.lang=null==t?void 0:t.defaultLanguage),e},[n]),v=e=>b.jsx(uUe.Provider,{value:{topProps:{uploadImg:f}},children:b.jsx("div",{className:`question-wrapper ${d}`,style:{...p},children:e})}),y={data:V,onSubmit:o,buttonText:s,status:c,onNextQuestion:a};switch(V.type){case Qh.RADIO:case Qh.CHECKBOX:return(()=>{const e=b.jsx(bUe,{showQuestionTip:l,showResult:u,...y});return v(e)})();case Qh.ACM:case Qh.CCM:return(()=>{const e=b.jsx(xUe,{codeTestURL:h,codeplayerURL:m,toRunCodeQuestion:q,...y});return v(e)})();case Qh.COMPLETION:return(()=>{const e=b.jsx(EUe,{showResult:u,...y});return v(e)})();case Qh.ANSWER:return(()=>{const e=b.jsx(kUe,{...y});return v(e)})();default:return g?g(V):b.jsx("div",{children:"未知题型"})}});var RUe={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function UUe(e){RUe=e}var FUe={exec:()=>null};function NUe(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(WUe.caret,"$1"),r=r.replace(e,i),n},getRegex:()=>new RegExp(r,t)};return n}var OUe=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),WUe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},DUe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,KUe=/(?:[*+-]|\d{1,9}[.)])/,BUe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,PUe=NUe(BUe).replace(/bull/g,KUe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),IUe=NUe(BUe).replace(/bull/g,KUe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),LUe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jUe=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,MUe=NUe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",jUe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),XUe=NUe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,KUe).getRegex(),zUe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",GUe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,HUe=NUe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",GUe).replace("tag",zUe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ZUe=NUe(LUe).replace("hr",DUe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zUe).getRegex(),YUe={blockquote:NUe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ZUe).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:MUe,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:DUe,html:HUe,lheading:PUe,list:XUe,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ZUe,table:FUe,text:/^[^\n]+/},QUe=NUe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",DUe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zUe).getRegex(),JUe={...YUe,lheading:IUe,table:QUe,paragraph:NUe(LUe).replace("hr",DUe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QUe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zUe).getRegex()},_Ue={...YUe,html:NUe("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",GUe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:FUe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:NUe(LUe).replace("hr",DUe).replace("heading"," *#{1,6} *[^\n]").replace("lheading",PUe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$Ue=/^( {2,}|\\)\n(?!\s*$)/,eFe=/[\p{P}\p{S}]/u,tFe=/[\s\p{P}\p{S}]/u,rFe=/[^\s\p{P}\p{S}]/u,nFe=NUe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,tFe).getRegex(),iFe=/(?!~)[\p{P}\p{S}]/u,oFe=NUe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",OUe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),aFe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sFe=NUe(aFe,"u").replace(/punct/g,eFe).getRegex(),lFe=NUe(aFe,"u").replace(/punct/g,iFe).getRegex(),uFe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cFe=NUe(uFe,"gu").replace(/notPunctSpace/g,rFe).replace(/punctSpace/g,tFe).replace(/punct/g,eFe).getRegex(),dFe=NUe(uFe,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,iFe).getRegex(),pFe=NUe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rFe).replace(/punctSpace/g,tFe).replace(/punct/g,eFe).getRegex(),fFe=NUe(/\\(punct)/,"gu").replace(/punct/g,eFe).getRegex(),hFe=NUe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mFe=NUe(GUe).replace("(?:--\x3e|$)","--\x3e").getRegex(),gFe=NUe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mFe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qFe=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,VFe=NUe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",qFe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vFe=NUe(/^!?\[(label)\]\[(ref)\]/).replace("label",qFe).replace("ref",jUe).getRegex(),bFe=NUe(/^!?\[(ref)\](?:\[\])?/).replace("ref",jUe).getRegex(),yFe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,SFe={_backpedal:FUe,anyPunctuation:fFe,autolink:hFe,blockSkip:oFe,br:$Ue,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:FUe,emStrongLDelim:sFe,emStrongRDelimAst:cFe,emStrongRDelimUnd:pFe,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:VFe,nolink:bFe,punctuation:nFe,reflink:vFe,reflinkSearch:NUe("reflink|nolink(?!\\()","g").replace("reflink",vFe).replace("nolink",bFe).getRegex(),tag:gFe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:FUe},AFe={...SFe,link:NUe(/^!?\[(label)\]\((.*?)\)/).replace("label",qFe).getRegex(),reflink:NUe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qFe).getRegex()},wFe={...SFe,emStrongRDelimAst:dFe,emStrongLDelim:lFe,url:NUe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",yFe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:NUe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",yFe).getRegex()},xFe={...wFe,br:NUe($Ue).replace("{2,}","*").getRegex(),text:NUe(wFe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},CFe={normal:YUe,gfm:JUe,pedantic:_Ue},EFe={normal:SFe,gfm:wFe,breaks:xFe,pedantic:AFe},kFe={"&":"&","<":"<",">":">",'"':""","'":"'"},TFe=e=>kFe[e];function RFe(e,t){if(t){if(WUe.escapeTest.test(e))return e.replace(WUe.escapeReplace,TFe)}else if(WUe.escapeTestNoEncode.test(e))return e.replace(WUe.escapeReplaceNoEncode,TFe);return e}function UFe(e){try{e=encodeURI(e).replace(WUe.percentDecode,"%")}catch{return null}return e}function FFe(e,t){var r;let n=e.replace(WUe.findPipe,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(WUe.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!(null==(r=n.at(-1))?void 0:r.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(WUe.slashPipe,"|");return n}function NFe(e,t,r){let n=e.length;if(0===n)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function OFe(e,t,r,n,i){let o=t.href,a=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:o,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}var WFe=class{constructor(e){s(this,"options"),s(this,"rules"),s(this,"lexer"),this.options=e||RUe}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:NFe(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let i=n[1];return t.split("\n").map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return n.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=NFe(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:NFe(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=NFe(t[0],"\n").split("\n"),r="",n="",i=[];for(;e.length>0;){let t,o=!1,a=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))a.push(e[t]),o=!0;else{if(o)break;a.push(e[t])}e=e.slice(t);let s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${l}`:l;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=u,0===e.length)break;let c=i.at(-1);if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){let t=c,o=t.raw+"\n"+e.join("\n"),a=this.blockquote(o);i[i.length-1]=a,r=r.substring(0,r.length-t.raw.length)+a.raw,n=n.substring(0,n.length-t.text.length)+a.text;break}if("list"===(null==c?void 0:c.type)){let t=c,o=t.raw+"\n"+e.join("\n"),a=this.list(o);i[i.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,n=n.substring(0,n.length-t.raw.length)+a.raw,e=o.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:i,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let o=this.rules.other.listItemRegex(r),a=!1;for(;e;){let r=!1,n="",s="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),u=e.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),o=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){let p,f=e.split("\n",1)[0];if(u=f,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),p=u):p=u.replace(this.rules.other.tabCharGlobal," "),i.test(u)||o.test(u)||a.test(u)||t.test(u)||r.test(u))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+p.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||o.test(l)||r.test(l))break;s+="\n"+u}!c&&!u.trim()&&(c=!0),n+=f+"\n",e=e.substring(f.length+1),l=p.slice(d)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let p,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:n,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=n}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>"space"===e.type),r=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){var t;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=FFe(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(null==(t=r[3])?void 0:t.trim())?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let e of i)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of o)a.rows.push(FFe(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=NFe(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),OFe(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return OFe(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){let r,i,o=[...n[0]].length-1,a=o,s=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+o);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(i=[...r].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&o%3&&!((o+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);let t=[...n[0]][0].length,l=e.slice(0,o+n.index+t+i);if(Math.min(o,i)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=r[0],n="mailto:"+e;else{let i;do{i=r[0],r[0]=(null==(t=this.rules.inline._backpedal.exec(r[0]))?void 0:t[0])??""}while(i!==r[0]);e=r[0],n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},DFe=class e{constructor(e){s(this,"tokens"),s(this,"options"),s(this,"state"),s(this,"tokenizer"),s(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||RUe,this.options.tokenizer=this.options.tokenizer||new WFe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:WUe,block:CFe.normal,inline:EFe.normal};this.options.pedantic?(t.block=CFe.pedantic,t.inline=EFe.pedantic):this.options.gfm&&(t.block=CFe.gfm,this.options.breaks?t.inline=EFe.breaks:t.inline=EFe.gfm),this.tokenizer.rules=t}static get rules(){return{block:CFe,inline:EFe}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(WUe.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){var n,i,o;for(this.options.pedantic&&(e=e.replace(WUe.tabCharGlobal," ").replace(WUe.spaceLine,""));e;){let a;if(null==(i=null==(n=this.options.extensions)?void 0:n.block)?void 0:i.some(r=>!!(a=r.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let r=t.at(-1);1===a.raw.length&&void 0!==r?r.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let s=e;if(null==(o=this.options.extensions)?void 0:o.startBlock){let t,r=1/0,n=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},n),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(s=e.substring(0,r+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let n=t.at(-1);r&&"paragraph"===(null==n?void 0:n.type)?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a),r=s.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var r,n,i,o,a;let s,l=e,u=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(u=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(u=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,u.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(u=this.tokenizer.rules.inline.blockSkip.exec(l));)s=u[2]?u[2].length:0,l=l.slice(0,u.index+s)+"["+"a".repeat(u[0].length-s-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=(null==(n=null==(r=this.options.hooks)?void 0:r.emStrongMask)?void 0:n.call({lexer:this},l))??l;let c=!1,d="";for(;e;){let r;if(c||(d=""),c=!1,null==(o=null==(i=this.options.extensions)?void 0:i.inline)?void 0:o.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,l,d)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(null==(a=this.options.extensions)?void 0:a.startInline){let t,r=1/0,i=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},i),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(d=r.raw.slice(-1)),c=!0;let n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(t)}}return t}},KFe=class{constructor(e){s(this,"options"),s(this,"parser"),this.options=e||RUe}space(e){return""}code({text:e,lang:t,escaped:r}){var n;let i=null==(n=(t||"").match(WUe.notSpaceStart))?void 0:n[0],o=e.replace(WUe.endingNewline,"")+"\n";return i?'<pre><code class="language-'+RFe(i)+'">'+(r?o:RFe(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:RFe(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o<e.items.length;o++){let t=e.items[o];n+=this.listitem(t)}let i=t?"ol":"ul";return"<"+i+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+i+">\n"}listitem(e){var t;let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+RFe(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let t=e.rows[i];r="";for(let e=0;e<t.length;e++)r+=this.tablecell(t[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${RFe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=UFe(e);if(null===i)return n;let o='<a href="'+(e=i)+'"';return t&&(o+=' title="'+RFe(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=UFe(e);if(null===i)return RFe(r);let o=`<img src="${e=i}" alt="${r}"`;return t&&(o+=` title="${RFe(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:RFe(e.text)}},BFe=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},PFe=class e{constructor(e){s(this,"options"),s(this,"renderer"),s(this,"textRenderer"),this.options=e||RUe,this.options.renderer=this.options.renderer||new KFe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new BFe}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=a,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){i+=t||"";continue}}let s=a;switch(s.type){case"space":i+=this.renderer.space(s);continue;case"hr":i+=this.renderer.hr(s);continue;case"heading":i+=this.renderer.heading(s);continue;case"code":i+=this.renderer.code(s);continue;case"table":i+=this.renderer.table(s);continue;case"blockquote":i+=this.renderer.blockquote(s);continue;case"list":i+=this.renderer.list(s);continue;case"html":i+=this.renderer.html(s);continue;case"def":i+=this.renderer.def(s);continue;case"paragraph":i+=this.renderer.paragraph(s);continue;case"text":{let r=s,n=this.renderer.text(r);for(;o+1<e.length&&"text"===e[o+1].type;)r=e[++o],n+="\n"+this.renderer.text(r);i+=t?this.renderer.paragraph({type:"paragraph",raw:n,text:n,tokens:[{type:"text",raw:n,text:n,escaped:!0}]}):n;continue}default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return"";throw new Error(e)}}}return i}parseInline(e,t=this.renderer){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=e||"";continue}}let s=a;switch(s.type){case"escape":case"text":i+=t.text(s);break;case"html":i+=t.html(s);break;case"link":i+=t.link(s);break;case"image":i+=t.image(s);break;case"strong":i+=t.strong(s);break;case"em":i+=t.em(s);break;case"codespan":i+=t.codespan(s);break;case"br":i+=t.br(s);break;case"del":i+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return"";throw new Error(e)}}}return i}},IFe=(o=class{constructor(e){s(this,"options"),s(this,"block"),this.options=e||RUe}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?DFe.lex:DFe.lexInline}provideParser(){return this.block?PFe.parse:PFe.parseInline}},s(o,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),s(o,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),o),LFe=new class{constructor(...e){s(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),s(this,"options",this.setOptions),s(this,"parse",this.parseMarkdown(!0)),s(this,"parseInline",this.parseMarkdown(!1)),s(this,"Parser",PFe),s(this,"Renderer",KFe),s(this,"TextRenderer",BFe),s(this,"Lexer",DFe),s(this,"Tokenizer",WFe),s(this,"Hooks",IFe),this.use(...e)}walkTokens(e,t){var r,n;let i=[];for(let o of e)switch(i=i.concat(t.call(this,o)),o.type){case"table":{let e=o;for(let r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=o;i=i.concat(this.walkTokens(e.items,t));break}default:{let e=o;(null==(n=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:n[e.type])?this.defaults.extensions.childTokens[e.type].forEach(r=>{let n=e[r].flat(1/0);i=i.concat(this.walkTokens(n,t))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new KFe(this.defaults);for(let r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=r,i=e.renderer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new WFe(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=r,i=e.tokenizer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new IFe;for(let r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=r,i=e.hooks[n],o=t[n];IFe.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async&&IFe.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await i.call(t,e);return o.call(t,r)})();let n=i.call(t,e);return o.call(t,n)}:t[n]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await i.apply(t,e);return!1===r&&(r=await o.apply(t,e)),r})();let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return DFe.lex(e,t??this.defaults)}parser(e,t){return PFe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let r=i.hooks?await i.hooks.preprocess(t):t,n=await(i.hooks?await i.hooks.provideLexer():e?DFe.lex:DFe.lexInline)(r,i),o=i.hooks?await i.hooks.processAllTokens(n):n;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let a=await(i.hooks?await i.hooks.provideParser():e?PFe.parse:PFe.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(a):a})().catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let r=(i.hooks?i.hooks.provideLexer():e?DFe.lex:DFe.lexInline)(t,i);i.hooks&&(r=i.hooks.processAllTokens(r)),i.walkTokens&&this.walkTokens(r,i.walkTokens);let n=(i.hooks?i.hooks.provideParser():e?PFe.parse:PFe.parseInline)(r,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(a){return o(a)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+RFe(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function jFe(e,t){return LFe.parse(e,t)}jFe.options=jFe.setOptions=function(e){return LFe.setOptions(e),jFe.defaults=LFe.defaults,UUe(jFe.defaults),jFe},jFe.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},jFe.defaults=RUe,jFe.use=function(...e){return LFe.use(...e),jFe.defaults=LFe.defaults,UUe(jFe.defaults),jFe},jFe.walkTokens=function(e,t){return LFe.walkTokens(e,t)},jFe.parseInline=LFe.parseInline,jFe.Parser=PFe,jFe.parser=PFe.parse,jFe.Renderer=KFe,jFe.TextRenderer=BFe,jFe.Lexer=DFe,jFe.lexer=DFe.lex,jFe.Tokenizer=WFe,jFe.Hooks=IFe,jFe.parse=jFe,jFe.options,jFe.setOptions,jFe.use,jFe.walkTokens,jFe.parseInline,PFe.parse,DFe.lex;const MFe=t.forwardRef((e,n)=>{const{envStatus:i,podName:o,runnerBaseUrl:a}=t.useContext(q$e),{data:s,hasTitle:l=!0,toScore:u,errorHanle:c,codeChange:d}=e,p=t.useRef(null),[f,h]=t.useState(!0),[m,g]=t.useState(!1),q=Xh(e=>{null==d||d(e.code)}),V=t.useRef(null);return t.useEffect(()=>(g(!1),h(!0),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{g(!0)},1e3),()=>{V.current&&clearTimeout(V.current)}),[s]),t.useImperativeHandle(n,()=>({toInstallPackage:e=>{var t,r;(null==(t=p.current)?void 0:t.contentWindow)&&wUe.send(null==(r=p.current)?void 0:r.contentWindow,"vgenPackages",{packages:e})}})),b.jsx(r.Spin,{spinning:f,classNames:{root:"codePlayerSpin"},children:b.jsx("div",{className:"codePlayer",children:b.jsx("div",{className:"codePlayerContent",style:{height:l?"":"100%"},children:m&&b.jsx("iframe",{ref:p,allowFullScreen:!0,allow:"clipboard-write;clipboard-read",src:`${a||"https://run.cloudlab.top"}/embedded?fromVgen=true`,style:{border:"none"},title:"CodeRunner",className:"CodeRunner-iframe",onLoad:async()=>{var e,t,n,a;try{h(!1);const d=null==(e=p.current)?void 0:e.contentWindow,{topic:f="",content:m="",lang:g="",code:V="",cases:v=[],css:b="",js:y=""}=s;let S=m;try{S=jFe.parse(m)}catch(l){}let A=[];if("html"===g)if(b||y)A=[V,b||"",y||""];else try{const e=JSON.parse(V);A=[e.html,e.css,e.js]}catch(l){}"html"!==g||A.length||(A=[V,"",""]);let w={...s};const x={title:f,content:S,lang:g,code:"html"===g?A:V,aiEnabled:!1,run:!1,cases:v,customButtons:u?[{name:"提交",value:"submit",style:{background:"#0064ff",color:"#ffffff"}}]:[]};i&&o&&(x.podName=o,x.nameSpace="pty-prod"),wUe.send(d,"send",x),u&&wUe.on("submit",{window:d},async function(e){var t,n;(null==(t=e.data)?void 0:t.code)?(r.message.success("提交成功,AI开始自动评分..."),u(null==(n=e.data)?void 0:n.code)):r.message.warning("请先作答!")}),wUe.on("change",{window:null==(t=p.current)?void 0:t.contentWindow},async function(e){var t,r,n,i,o;if("html"===g)try{const i={html:(null==(t=e.data)?void 0:t[0])??"",css:(null==(r=e.data)?void 0:r[1])??"",js:(null==(n=e.data)?void 0:n[2])??""};w.code=JSON.stringify(i)}catch(l){w.code=(null==(i=e.data)?void 0:i[0])??""}else w.code=(null==(o=e.data)?void 0:o[0])??"";q(w)}),wUe.on("errorHandle",{window:null==(n=p.current)?void 0:n.contentWindow},async function(e){var t,r,n;null==c||c({lang:null==(t=e.data)?void 0:t.lang,code:null==(r=e.data)?void 0:r.code,error:null==(n=e.data)?void 0:n.error})}),wUe.on("getToken",{window:null==(a=p.current)?void 0:a.contentWindow},async e=>({token:localStorage.getItem("token")}))}catch(l){}}})})})})}),XFe=e=>{const{data:n,hasTitle:i=!0,toScore:o,codeChange:a}=e,{quizBaseUrl:s}=t.useContext(q$e),l=t.useRef(null),[u,c]=t.useState(!0),[d,p]=t.useState(!1),f=Xh(e=>{null==a||a(e.code)}),h=t.useRef(null);return t.useEffect(()=>(p(!1),c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{p(!0)},1e3),()=>{h.current&&clearTimeout(h.current)}),[n]),b.jsx(r.Spin,{spinning:u,classNames:{root:"codeQuizSpin"},children:b.jsxs("div",{className:"codeQuiz",children:[i&&b.jsx("div",{className:"codeQuizTitle",children:"CodeQuiz"}),b.jsx("div",{className:"codeQuizContent",style:{height:i?"":"100%"},children:d&&b.jsx("iframe",{ref:l,allowFullScreen:!0,allow:"clipboard-write;clipboard-read",src:`${s||"https://quiz.cloudlab.top"}`,style:{border:"none"},title:"CodeQuiz",className:"codeQuiz-iframe",onLoad:async()=>{var e,t,i;try{c(!1);const s=null==(e=l.current)?void 0:e.contentWindow,{topic:u="",content:d="",lang:p="",code:h="",cases:m=[]}=n;let g=m;g=m.map(e=>"string"==typeof e.input?{...e,input:Mh(e.input)||[]}:{...e});let q=d;try{q=jFe.parse(d)}catch(a){}let V={...n};wUe.send(s,"send",{title:u,content:q,lang:p,code:h,cases:g,aiEnabled:!1,run:!1,customButtons:o?[{name:"判分",value:"submit",style:{background:"#0064ff",color:"#ffffff"}}]:[]}),o&&wUe.on("submit",{window:s},async function(e){var t,n;(null==(t=e.data)?void 0:t.code)?(r.message.success("提交成功,AI开始自动评分..."),o(null==(n=e.data)?void 0:n.code)):r.message.warning("请先作答!")}),wUe.on("change",{window:null==(t=l.current)?void 0:t.contentWindow},async function(e){var t,r,n,i;if("html"===p)try{const i={html:(null==(t=e.data)?void 0:t[0])??"",css:(null==(r=e.data)?void 0:r[1])??"",js:(null==(n=e.data)?void 0:n[2])??""};V.code=JSON.stringify(i)}catch(a){V.code=(null==(i=e.data)?void 0:i[0])??""}else V.code=e.data??"";f(V)}),wUe.on("getToken",{window:null==(i=l.current)?void 0:i.contentWindow},async e=>({token:localStorage.getItem("token")}))}catch(a){}}})})]})})};var zFe={exports:{}};
|
|
186
|
+
***************************************************************************** */var XRe=function(){return XRe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},XRe.apply(this,arguments)};function zRe(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function GRe(e){var r=e.defaultContent,n=void 0===r?[]:r,i=e.onCreated,o=e.defaultHtml,a=void 0===o?"":o,s=e.value,l=void 0===s?"":s,u=e.onChange,c=e.defaultConfig,d=void 0===c?{}:c,p=e.mode,f=void 0===p?"default":p,h=e.style,m=void 0===h?{}:h,g=e.className,q=t.useRef(null),V=zRe(t.useState(null),2),v=V[0],b=V[1],y=zRe(t.useState(""),2),S=y[0],A=y[1],w=function(e){i&&i(e);var t=d.onCreated;t&&t(e)},x=function(e){A(e.getHtml()),u&&u(e);var t=d.onChange;t&&t(e)},C=function(e){var t=d.onDestroyed;b(null),t&&t(e)};return t.useEffect(function(){if(null!=v&&l!==S)try{v.setHtml(l)}catch(zm){}},[l]),t.useEffect(function(){var e;if(null!=q.current&&null==v&&!(null===(e=q.current)||void 0===e?void 0:e.getAttribute("data-w-e-textarea"))){var t=LRe({selector:q.current,config:XRe(XRe({},d),{onCreated:w,onChange:x,onDestroyed:C}),content:n,html:a||l,mode:f});b(t)}},[v]),t.createElement("div",{style:m,ref:q,className:g})}function HRe(e){var r=e.editor,n=e.defaultConfig,i=void 0===n?{}:n,o=e.mode,a=void 0===o?"default":o,s=e.style,l=void 0===s?{}:s,u=e.className,c=t.useRef(null);return t.useEffect(function(){null!=c.current&&null!=r&&jRe({editor:r,selector:c.current,config:i,mode:a})},[r]),t.createElement("div",{style:l,ref:c,className:u})}var ZRe={exports:{}};self,ZRe.exports=(e=>(()=>{var t={857:t=>{t.exports=e}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{default:()=>a});var e=n(857),t={"*":"list-item","-":"list-item","+":"list-item",">":"blockquote","#":"header1","##":"header2","###":"header3","####":"header4","#####":"header5"},r={"---":"divider","----":"divider","-----":"divider","------":"divider"};function o(t){var r=t.selection;if(null==r)return{beforeText:"",range:null};var n=r.anchor,i=e.SlateEditor.above(t,{match:function(r){return e.SlateEditor.isBlock(t,r)}});if(null==i)return{beforeText:"",range:null};var o=i[1],a={anchor:n,focus:e.SlateEditor.start(t,o)};return{beforeText:e.SlateEditor.string(t,a)||"",range:a}}const a={editorPlugin:function(n){var i=n.insertBreak,a=n.insertText,s=n;return s.insertText=function(r){var i=n.selection;if(null==i)return a(r);if(e.SlateRange.isExpanded(i))return a(r);if(null==e.DomEditor.getSelectedNodeByType(n,"paragraph"))return a(r);if(" "!==r)return a(r);var s=o(n),l=s.beforeText,u=s.range;if(!l||!u)return a(r);var c=t[l];if(!c)return a(r);e.SlateTransforms.select(n,u),e.SlateTransforms.delete(n);var d={type:c};e.SlateTransforms.setNodes(n,d,{match:function(t){return e.SlateEditor.isBlock(n,t)}}),"list-item"===c&&e.SlateTransforms.wrapNodes(n,{type:"bulleted-list",children:[]},{match:function(t){return"list-item"===e.DomEditor.getNodeType(t)}})},s.insertBreak=function(){var t=n.selection;if(null==t)return i();if(e.SlateRange.isExpanded(t))return i();if(null==e.DomEditor.getSelectedNodeByType(n,"paragraph"))return i();var a=o(n),s=a.beforeText,l=a.range;if(!s||!l)return i();if(0!==s.indexOf("```")){var u=r[s];if(!u)return i();e.SlateTransforms.select(n,l),e.SlateTransforms.delete(n);var c={type:u};e.SlateTransforms.setNodes(n,c,{match:function(t){return e.SlateEditor.isBlock(n,t)}})}else{var d=s.slice(3).toLowerCase().trim();"js"===d&&(d="javascript"),"ts"===d&&(d="typescript"),"md"===d&&(d="markdown"),"py"===d&&(d="python"),"vb"===d&&(d="visual-basic"),"c#"===d&&(d="csharp");var p=((n.getConfig().MENU_CONF||{}).codeSelectLang||[]).codeLangs;if(d&&!(void 0===p?[]:p).some(function(e){return e.value===d}))return i();e.SlateTransforms.select(n,l),e.SlateTransforms.delete(n);var f={type:"pre",children:[{type:"code",language:d,children:[{text:""}]}]};e.SlateTransforms.insertNodes(n,f)}},s}}})(),i})())(h(MRe));const YRe=f(ZRe.exports);function QRe(e,t,r,n,i){return{sel:e,data:t,children:r,text:n,elm:i,key:void 0===t?void 0:t.key}}const JRe=Array.isArray;function _Re(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function $Re(e,t,r){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==r&&void 0!==t)for(let n=0;n<t.length;++n){const e=t[n];if("string"==typeof e)continue;const r=e.data;void 0!==r&&$Re(r,e.children,e.sel)}}function eUe(e,t,r){let n,i,o,a={};if(null!=t&&(JRe(t)?n=t:_Re(t)?i=t.toString():t&&t.sel?n=[t]:a=t),void 0!==n)for(o=0;o<n.length;++o)_Re(n[o])&&(n[o]=QRe(void 0,void 0,void 0,n[o],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||$Re(a,n,e),QRe(e,a,n,i,void 0)}const tUe=[];for(let Set=0;Set<256;++Set)tUe.push((Set+256).toString(16).slice(1));let rUe;const nUe=new Uint8Array(16),iUe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function oUe(e,t,r){return iUe.randomUUID&&!e?iUe.randomUUID():function(e){var t;const r=(e=e||{}).random??(null==(t=e.rng)?void 0:t.call(e))??function(){if(!rUe){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");rUe=crypto.getRandomValues.bind(crypto)}return rUe(nUe)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(tUe[e[t+0]]+tUe[e[t+1]]+tUe[e[t+2]]+tUe[e[t+3]]+"-"+tUe[e[t+4]]+tUe[e[t+5]]+"-"+tUe[e[t+6]]+tUe[e[t+7]]+"-"+tUe[e[t+8]]+tUe[e[t+9]]+"-"+tUe[e[t+10]]+tUe[e[t+11]]+tUe[e[t+12]]+tUe[e[t+13]]+tUe[e[t+14]]+tUe[e[t+15]]).toLowerCase()}(r)}(e)}class aUe{constructor(){s(this,"title","插入填空项"),s(this,"tag","button")}getValue(e){return""}isActive(e){return!1}isDisabled(e){var t;return null==e.selection||(null==(t=e.getElemsByType("fill-blank"))?void 0:t.length)>=20}exec(e,t){if(this.isDisabled(e))return;const r=[{text:" "},{type:"fill-blank",key:oUe(),children:[{text:""}]},{text:" "}];zE.insertNodes(e,r)}}let sUe=[];const lUe={editorPlugin:function(e){const{isInline:t,isVoid:r}=e,n=e;return n.isInline=e=>"fill-blank"===Zj.getNodeType(e)||t(e),n.isVoid=e=>"fill-blank"===Zj.getNodeType(e)||r(e),n},renderElems:[{type:"fill-blank",renderElem:(e,t,r)=>{const n=null==r?void 0:r.getElemsByType("fill-blank"),i=(null==n?void 0:n.findIndex(t=>t.key===e.key&&!sUe.includes(t.id)))||0;return i===n.length-1?sUe=[]:sUe.push(n[i].id),eUe("input",{attrs:{class:"w-e-fill-blank","data-w-e-type":"fill-blank","data-w-e-is-void":"true","data-w-e-is-inline":"true",readonly:!0,placeholder:i+1}})}}],elemsToHtml:[{type:"fill-blank",elemToHtml:(e,t,r)=>'<input class="w-e-fill-blank" data-w-e-type="fill-blank" data-w-e-is-void="true" data-w-e-is-inline="true" readonly="true">'}],parseElemsHtml:[{selector:"input[data-w-e-type='fill-blank']",parseElemHtml:(e,t,r)=>({type:"fill-blank",key:oUe(),children:[{text:""}]})},{selector:"pre:not([data-w-e-type])>code",parseElemHtml:(e,t,r)=>{let n=(null==e?void 0:e.innerHTML)||"";const i='<input class="w-e-fill-blank" data-w-e-type="fill-blank" data-w-e-is-void="true" data-w-e-is-inline="true" readonly="true">',o=(null==t?void 0:t.filter(e=>"fill-blank"===(null==e?void 0:e.type)))||[];let a=[];return(null==o?void 0:o.length)&&(null==t||t.forEach((e,r)=>{var o;if(a.push(e),"fill-blank"===(null==e?void 0:e.type))if("fill-blank"===(null==(o=t[r+1])?void 0:o.type)){const e=null==n?void 0:n.indexOf(i,1);let t=null==n?void 0:n.slice(0,e);n=null==n?void 0:n.replace(t,""),t=t.replace(i,""),a.push({text:t})}else n=null==n?void 0:n.replace(i,"");else n=null==n?void 0:n.replace(null==e?void 0:e.text,"")})),{type:"code",language:"",children:(null==o?void 0:o.length)?a:[{text:(null==e?void 0:e.textContent)||""}]}}}],menus:[{key:"fill-blank",factory:()=>new aUe}]},uUe=t.createContext(null);NRe._registeredModules||(NRe._registeredModules=new Set);const cUe=NRe._registeredModules,dUe=(e,t)=>{const r=t||e&&"object"==typeof e&&e.key||JSON.stringify(e).substring(0,20);if(!cUe.has(r))try{NRe.registerModule(e),cUe.add(r)}catch(n){if(!(n instanceof Error&&(n.message.includes("duplicate")||n.message.includes("Duplicate"))))throw n}};dUe(lUe,"fillBlankModule"),dUe(YRe,"markdownModule");const pUe=t.forwardRef((e,r)=>{const{topProps:n}=(()=>{const e=t.useContext(uUe);if(!e)throw new Error("useMyContext must be used within a MyContext.Provider");return e})(),{uploadImg:i}=n,{defaultValue:o="",readOnly:a=!1,editorHeight:s=300,placeholder:l="请输入内容...",isBorder:u=!0,autoHeight:c,onChange:d,customToolbarKeys:p,mode:f="default",noPadding:h=!1}=e,[m,g]=t.useState(null),[q]=t.useState({toolbarKeys:p??["undo","redo","fullScreen","|","headerSelect","bold","underline","italic","color","bgColor","|","bulletedList","numberedList",{key:"group-justify",title:"对齐",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:"缩进",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"insertLink",{key:"group-image",title:"图片",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',menuKeys:["insertImage","uploadImage"]},"insertTable","codeBlock","divider","|"]}),V={placeholder:l,autoFocus:!1,MENU_CONF:{uploadImage:{async customUpload(e,t){if(!e||!i)return;const r=new FormData;r.append("file",e);const n=await i({file:r});(null==n?void 0:n.url)&&t(null==n?void 0:n.url,null==n?void 0:n.url,null==n?void 0:n.url)}}}},v=t.useRef(null);t.useEffect(()=>()=>{null!=m&&(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{null==m||m.destroy(),g(null)},500))},[m]),t.useEffect(()=>{a?null==m||m.disable():null==m||m.enable()},[a,m]);const y=t.useCallback((e="")=>e.replace(/<\/?p>/g,"").replace(/ /gi,"").replace(/<br\/?>/g,""),[]);t.useImperativeHandle(r,()=>({getHtml:()=>{if(null==m?void 0:m.isEmpty())return"";{const e=(null==m?void 0:m.getHtml())??"",t=y(e);return/\S+/.test(t)?e:""}},setValue:(e="")=>!!m&&(null==m||m.setHtml(e),!0)}));const S={};return a&&c?(S.minHeight=c.min+"px",S.maxHeight=c.max+"px",S.overflowY="auto"):S.height="number"==typeof s?s+"px":s,b.jsx(b.Fragment,{children:b.jsxs("div",{"data-nopadding":h,style:{border:u?"1px solid #E5E5E5":"",zIndex:99},className:"richeditor",children:[!a&&b.jsx(HRe,{editor:m,defaultConfig:q,mode:"default",style:{borderBottom:"1px solid #E5E5E5"}}),b.jsx(GRe,{defaultConfig:V,value:o,onCreated:g,mode:f,onChange:e=>{if(e&&e.selection)if(null==e?void 0:e.isEmpty())null==d||d("",e);else{const t=(null==e?void 0:e.getHtml())??"",r=y(t);/\S+/.test(r)?null==d||d(t,e):null==d||d("",e)}},style:{fontSize:"16px",...S}})]})})});Qh.RADIO,Qh.CHECKBOX,Qh.COMPLETION,Qh.ANSWER,Qh.ACM,Qh.CCM,Qh.RADIO,Qh.COMPLETION,Qh.ANSWER,Qh.CCM;const fUe={low:"简单",middle:"中等",high:"困难"},hUe="https://quiz.cloudlab.top",mUe="https://run.cloudlab.top",gUe=e=>{switch(e){case"radio":case"checkbox":return b.jsx($,{className:"w-4 h-4"});case"acm":case"ccm":return b.jsx(N,{className:"w-4 h-4"});case"completion":return b.jsx(z,{className:"w-4 h-4"});case"answer":return b.jsx(M,{className:"w-4 h-4"});default:return b.jsx(W,{className:"w-4 h-4"})}},qUe=e=>{switch(e){case"radio":return"单选题";case"checkbox":return"多选题";case"acm":case"ccm":return"编码测验";case"completion":return"填空题";case"answer":return"问答题";default:return"题目"}},VUe=e=>{switch(e){case"low":return"text-green-600 bg-green-100";case"middle":return"text-yellow-600 bg-yellow-100";case"high":return"text-red-600 bg-red-100";default:return"text-gray-600 bg-gray-100"}},vUe=e=>{const{currentIndex:t,questionsCount:r,type:n,difficulty:i="low",score:o}=e;return b.jsxs("div",{className:"questionHeader tailwind-scoped",children:[t&&r&&b.jsxs("div",{className:"questionIndex itemWrapper",children:["题目 ",t,"/",r]}),b.jsxs("span",{className:"questionType itemWrapper",children:[gUe(n)," ",qUe(n)]}),i&&b.jsx("div",{className:`difficulty itemWrapper ${VUe(i)}`,children:b.jsx("span",{className:"difficulty",children:fUe[i]})}),o&&b.jsxs("div",{className:"score itemWrapper",children:[b.jsx(_,{})," ",o," 分"]})]})},bUe=e=>{var n;const{data:i,onSubmit:o,buttonText:a,showQuestionTip:s,showResult:l,onNextQuestion:u}=e,{optionJson:c,answer:d,userAnswer:p,score:f,type:h,topic:m,content:g,auxiliary:q,difficulty:V,currentIndex:v,questionsCount:y}=i,[S,A]=t.useState(!0),[w,x]=t.useState(void 0),[C,E]=t.useState(),[k,T]=t.useState(""),[R,N]=t.useState([]);t.useEffect(()=>{p&&!C&&(E(p),p.indexOf(",")>-1?N(null==p?void 0:p.split(",")):T(p),O(p))},[i]);const O=e=>{if(!C&&!e)return void r.message.warning("请先作答!");const t=C||e;o&&!e&&void 0===w&&o(t),void 0!==w&&(null==u||u()),d&&l&&(t===d||t&&jh(null==t?void 0:t.split(","),null==d?void 0:d.split(","))?x(1):x(0))},W=["A","B","C","D","E","F","G","H","I","J"];return b.jsx("div",{className:"video-player-interaction tailwind-scoped",children:b.jsx("div",{className:"video-player-interaction-content",children:b.jsxs("div",{className:"video-player-interaction-content-main",children:[b.jsx(vUe,{score:f,type:h,difficulty:V,currentIndex:v,questionsCount:y}),b.jsx("div",{className:"video-player-interaction-content-desc",children:b.jsx(pUe,{defaultValue:m||g,readOnly:!0,noPadding:!0})}),b.jsx("div",{className:"video-player-interaction-content-options",children:"radio"===h?null==c?void 0:c.map(({key:e,value:t},r)=>b.jsx("button",{onClick:()=>(e=>{x(void 0),E(e+""),T(e+"")})(e),disabled:void 0!==w,className:`block w-full text-left p-4 rounded-lg border-2 transition-all ${k===e?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"} ${void 0!==w?e===d?"border-green-500 bg-green-50":k===e&&e!==d?"border-red-500 bg-red-50":"border-gray-200":""}`,children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("span",{children:[W[r],"、",t]}),void 0!==w&&e===d&&b.jsx(U,{className:"w-5 h-5 text-green-600"}),void 0!==w&&k===e&&e!==d&&b.jsx(F,{className:"w-5 h-5 text-red-600"})]})},e)):null==c?void 0:c.map(({key:e,value:t},r)=>b.jsx("button",{onClick:()=>(e=>{x(void 0);let t=C||"";if(t&&(null==t?void 0:t.indexOf(e))>-1){let r=t.split(",");r=r.filter(t=>t!==e),t=null==r?void 0:r.join(",")}else t=t?t+","+e:e;E(t)})(String(e)),disabled:void 0!==w,className:`block w-full text-left p-4 rounded-lg border-2 transition-all ${C&&(null==C?void 0:C.indexOf(e))>-1?"border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300"} ${void 0!==w?d.indexOf(e)>-1?(null==C||C.indexOf(e),"border-green-500 bg-green-50"):C&&(null==C?void 0:C.indexOf(e))>-1&&-1===d.indexOf(e)?"border-red-500 bg-red-50":"border-gray-200":""}`,children:b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("span",{children:[W[r],"、",t]}),void 0!==w&&d.indexOf(e)>-1&&b.jsx(U,{className:"w-5 h-5 text-green-600"}),void 0!==w&&C&&(null==C?void 0:C.indexOf(e))>-1&&-1===d.indexOf(e)&&b.jsx(F,{className:"w-5 h-5 text-red-600"})]})},e+t))}),s&&0===w&&q&&(null==q?void 0:q.length)>0&&b.jsxs("div",{className:"video-player-interaction-content-tip",children:[b.jsxs("div",{className:"video-player-interaction-content-tip-icons",onClick:()=>{A(!S)},children:[b.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20x='0.535156'%20width='16'%20height='16'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.53516%201C4.66953%201%201.53516%204.13438%201.53516%208C1.53516%2011.8656%204.66953%2015%208.53516%2015C12.4008%2015%2015.5352%2011.8656%2015.5352%208C15.5352%204.13438%2012.4008%201%208.53516%201ZM8.03516%204.625C8.03516%204.55625%208.09141%204.5%208.16016%204.5H8.91016C8.97891%204.5%209.03516%204.55625%209.03516%204.625V8.875C9.03516%208.94375%208.97891%209%208.91016%209H8.16016C8.09141%209%208.03516%208.94375%208.03516%208.875V4.625ZM8.53516%2011.5C8.12109%2011.5%207.78516%2011.1641%207.78516%2010.75C7.78516%2010.3359%208.12109%2010%208.53516%2010C8.94922%2010%209.28516%2010.3359%209.28516%2010.75C9.28516%2011.1641%208.94922%2011.5%208.53516%2011.5Z'%20fill='%23FAAD14'/%3e%3c/svg%3e"}),b.jsx("span",{children:"提示"}),b.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.01'%20x='16.5352'%20y='16'%20width='16'%20height='16'%20transform='rotate(-180%2016.5352%2016)'%20fill='black'/%3e%3cpath%20d='M4.75455%2010.7326L8.71709%206.43956L12.68%2010.7326C12.8843%2010.9541%2013.2295%2010.9679%2013.4509%2010.7636C13.6723%2010.5592%2013.6862%2010.2141%2013.4818%209.99265L9.11818%205.26537C9.01492%205.15344%208.86956%205.08977%208.71727%205.08977C8.56498%205.08977%208.41963%205.15344%208.31636%205.26537L3.95273%209.99265C3.74838%2010.2141%203.76222%2010.5592%203.98364%2010.7636C4.20505%2010.9679%204.5502%2010.9541%204.75455%2010.7326'%20fill='%23FAAD14'/%3e%3c/svg%3e",style:{transform:S?"rotate(0deg)":"rotate(180deg)"}})]}),S&&b.jsxs("div",{className:"video-player-interaction-content-tip-text",children:[b.jsx(pUe,{defaultValue:null==(n=null==q?void 0:q[0])?void 0:n.description,readOnly:!0}),b.jsx("img",{src:"data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clipPath='url(%23clip0_954_6949)'%3e%3cg%20filter='url(%23filter0_i_954_6949)'%3e%3cpath%20d='M26.9806%2012.2299L29.1814%2011.1896C29.9321%2013.1617%2030.1883%2015.2877%2029.9274%2017.3817C29.6665%2019.4757%2028.8965%2021.4739%2027.6848%2023.2015L25.6975%2021.81C26.6636%2020.4329%2027.2845%2018.8438%2027.5078%2017.1765C27.7311%2015.5092%2027.5503%2013.8127%2026.9806%2012.2299ZM17.053%205.27772C15.3709%205.28347%2013.7147%205.69355%2012.2243%206.47339C10.7338%207.25323%209.45264%208.37997%208.48881%209.75864L6.50399%208.36886C7.71308%206.63945%209.32747%205.23262%2011.206%204.27141C13.0845%203.31019%2015.1699%202.82387%2017.2798%202.85497L17.0554%205.2795L17.053%205.27772ZM12.325%2028.2294C12.0815%2028.5771%2011.772%2028.8734%2011.414%2029.1015C11.056%2029.3295%2010.6566%2029.4848%2010.2386%2029.5586C9.82061%2029.6323%209.39218%2029.6229%208.97778%2029.531C8.56339%2029.4392%208.17115%2029.2666%207.82346%2029.0231C7.47577%2028.7796%207.17943%2028.4701%206.95138%2028.1121C6.72332%2027.7541%206.56801%2027.3547%206.49431%2026.9367C6.34546%2026.0925%206.53806%2025.2237%207.02975%2024.5216L12.325%2028.2294ZM23.7127%2020.4202L20.9314%2024.3923L20.2555%2028.9549C20.2148%2029.2272%2020.1052%2029.4845%2019.9371%2029.7026C19.769%2029.9206%2019.548%2030.0921%2019.295%2030.2008C19.042%2030.3094%2018.7655%2030.3516%2018.4916%2030.3234C18.2178%2030.2952%2017.9556%2030.1974%2017.7301%2030.0395L3.48051%2020.0642C3.25433%2019.9064%203.07227%2019.6935%202.95167%2019.4455C2.83107%2019.1975%202.77592%2018.9228%202.79149%2018.6475C2.80706%2018.3721%202.89282%2018.1054%203.04062%2017.8726C3.18841%2017.6398%203.39332%2017.4487%203.63584%2017.3174L7.69207%2015.1218L10.4747%2011.15C11.3766%209.86202%2012.6346%208.8651%2014.0946%208.28134C15.5545%207.69757%2017.153%207.55231%2018.6943%207.86334L19.0811%207.31281C19.3203%206.95534%2019.6285%206.64922%2019.9876%206.41239C20.3467%206.17556%2020.7494%206.01279%2021.1722%205.93362C21.595%205.85444%2022.0293%205.86046%2022.4498%205.95132C22.8702%206.04217%2023.2683%206.21604%2023.6206%206.46273C23.973%206.70941%2024.2726%207.02396%2024.5018%207.38792C24.7311%207.75188%2024.8854%208.15794%2024.9557%208.5823C25.0259%209.00666%2025.0108%209.44078%2024.9111%209.85922C24.8115%2010.2777%2024.6293%2010.672%2024.3753%2011.0191L23.9911%2011.5701C24.811%2012.9126%2025.2214%2014.4651%2025.1719%2016.0374C25.1224%2017.6096%2024.6152%2019.1333%2023.7125%2020.4215L23.7127%2020.4202Z'%20fill='%23FFCC33'%20fill-opacity='0.15'/%3e%3c/g%3e%3cpath%20d='M21.3721%2019.6161C22.2185%2018.4077%2022.6941%2016.9787%2022.7405%2015.5041C22.787%2014.0291%2022.402%2012.5726%2021.6328%2011.3131L21.4625%2011.0344L21.6493%2010.7665L22.0335%2010.2156L22.04%2010.2062L22.0401%2010.2062C22.2549%209.91283%2022.4089%209.5795%2022.4931%209.2258C22.5774%208.87209%2022.5901%208.50513%2022.5307%208.14642C22.4713%207.78771%2022.3409%207.44447%2022.1471%207.13681C21.9534%206.82916%2021.7001%206.56327%2021.4023%206.35475C21.1044%206.14623%2020.7679%205.99926%2020.4125%205.92246C20.0571%205.84566%2019.69%205.84057%2019.3326%205.9075C18.9752%205.97442%2018.6348%206.11201%2018.3313%206.3122C18.0277%206.51239%2017.7672%206.77116%2017.565%207.07333L17.5587%207.08276L17.5586%207.08268L17.1718%207.63321L16.984%207.9005L16.6638%207.83588C15.2178%207.54409%2013.7182%207.68037%2012.3486%208.22802C10.9789%208.77567%209.79875%209.71092%208.95263%2010.9192L8.95257%2010.9193L6.16993%2014.8911L6.10222%2014.9877L5.99845%2015.0439L1.94222%2017.2396L1.94216%2017.2396C1.77467%2017.3302%201.63316%2017.4622%201.5311%2017.623C1.42903%2017.7838%201.36981%2017.968%201.35905%2018.1581C1.3483%2018.3482%201.38638%2018.538%201.46967%2018.7092C1.55296%2018.8805%201.67869%2019.0276%201.83489%2019.1365L1.83562%2019.137L16.0852%2029.1123L16.0854%2029.1124C16.2411%2029.2215%2016.4221%2029.289%2016.6112%2029.3084C16.8004%2029.3279%2016.9913%2029.2988%2017.166%2029.2238C17.3407%2029.1487%2017.4934%2029.0303%2017.6095%2028.8797C17.7254%2028.7293%2017.8011%2028.5518%2017.8293%2028.364L21.3721%2019.6161ZM21.3721%2019.6161L21.3715%2019.6158L18.5902%2023.5879L18.5225%2023.6846L18.5052%2023.8014L17.8294%2028.3634L21.3721%2019.6161ZM14.7994%202.84116L14.6671%204.27101C13.0611%204.34269%2011.4885%204.76584%2010.0608%205.51279C8.64735%206.25234%207.41357%207.28968%206.44341%208.55102L5.27665%207.73406C6.40133%206.25582%207.84479%205.04697%209.50211%204.19894C11.147%203.35725%2012.957%202.89436%2014.7994%202.84116ZM26.0717%2016.7253C26.2855%2015.1291%2026.1457%2013.5074%2025.6647%2011.9743L26.964%2011.3601C27.5441%2013.1097%2027.728%2014.9688%2027.4996%2016.8023C27.2694%2018.6498%2026.627%2020.4196%2025.6224%2021.982L24.4533%2021.1634C25.3069%2019.8204%2025.86%2018.3064%2026.0717%2016.7253ZM5.05507%2026.3323C4.95858%2025.7851%205.03183%2025.2256%205.25868%2024.7268L9.6592%2027.8081C9.52376%2027.941%209.37452%2028.0598%209.21372%2028.1622C8.91111%2028.355%208.5735%2028.4863%208.22015%2028.5486C7.86681%2028.6109%207.50466%2028.603%207.15437%2028.5253C6.80408%2028.4476%206.47252%2028.3017%206.17861%2028.096C5.88471%2027.8902%205.63421%2027.6285%205.44143%2027.3259C5.24866%2027.0233%205.11737%2026.6857%205.05507%2026.3323Z'%20stroke='%23FAA600'%20stroke-opacity='0.4'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_i_954_6949'%20x='2.78906'%20y='2.85352'%20width='27.2373'%20height='27.4785'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='BackgroundImageFix'%20result='shape'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dx='-2'%20dy='2'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='arithmetic'%20k2='-1'%20k3='1'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.96%200%200%200%200%200.832%200%200%200%200%200.576%200%200%200%200.3%200'/%3e%3cfeBlend%20mode='normal'%20in2='shape'%20result='effect1_innerShadow_954_6949'/%3e%3c/filter%3e%3cclipPath%20id='clip0_954_6949'%3e%3crect%20width='32'%20height='32'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e"})]})]}),o&&b.jsx("div",{className:"video-player-interaction-content-actions",children:b.jsx(r.Button,{type:"primary",onClick:()=>O(),children:a||(void 0===w?"提交":"下一题")})})]})})})};var yUe={exports:{}},SUe={exports:{}};"undefined"!=typeof self&&self,SUe.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return{}.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){function n(e){return"[object RegExp]"==={}.toString.call(e)}r.r(t),r.d(t,"Promise",function(){return N}),r.d(t,"TYPES",function(){return Qe}),r.d(t,"ProxyWindow",function(){return xe}),r.d(t,"setup",function(){return Ze}),r.d(t,"destroy",function(){return Ye}),r.d(t,"serializeMessage",function(){return Xe}),r.d(t,"deserializeMessage",function(){return ze}),r.d(t,"createProxyWindow",function(){return Ge}),r.d(t,"toProxyWindow",function(){return He}),r.d(t,"on",function(){return Le}),r.d(t,"once",function(){return je}),r.d(t,"send",function(){return Me}),r.d(t,"markWindowKnown",function(){return he}),r.d(t,"cleanUpWindow",function(){return Je}),r.d(t,"bridge",function(){});var i="Call was rejected by callee.\r\n";function o(e){return void 0===e&&(e=window),e.location.protocol}function a(e){if(void 0===e&&(e=window),e.mockDomain){var t=e.mockDomain.split("//")[0];if(t)return t}return o(e)}function s(e){return void 0===e&&(e=window),"about:"===a(e)}function l(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(t){}}function u(e){if(void 0===e&&(e=window),e&&!l(e))try{return e.opener}catch(t){}}function c(e){try{return!0}catch(t){}return!1}function d(e){void 0===e&&(e=window);var t=e.location;if(!t)throw new Error("Can not read window location");var r=o(e);if(!r)throw new Error("Can not read window protocol");if("file:"===r)return"file://";if("about:"===r){var n=l(e);return n&&c()?d(n):"about://"}var i=t.host;if(!i)throw new Error("Can not read window host");return r+"//"+i}function p(e){void 0===e&&(e=window);var t=d(e);return t&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:t}function f(e){if(!function(e){try{if(e===window)return!0}catch(n){}try{var t=Object.getOwnPropertyDescriptor(e,"location");if(t&&!1===t.enumerable)return!1}catch(n){}try{if(s(e)&&c())return!0}catch(n){}try{if(void 0===(r=e)&&(r=window),"mock:"===a(r)&&c())return!0}catch(n){}var r;try{if(d(e)===d(window))return!0}catch(n){}return!1}(e))return!1;try{if(e===window)return!0;if(s(e)&&c())return!0;if(p(window)===p(e))return!0}catch(t){}return!1}function h(e){if(!f(e))throw new Error("Expected window to be same domain");return e}function m(e,t){if(!e||!t)return!1;var r=l(t);return r?r===e:-1!==function(e){var t=[];try{for(;e.parent!==e;)t.push(e.parent),e=e.parent}catch(r){}return t}(t).indexOf(e)}function g(e){var t,r,n=[];try{t=e.frames}catch(l){t=e}try{r=t.length}catch(l){}if(0===r)return n;if(r){for(var i=0;i<r;i++){var o=void 0;try{o=t[i]}catch(l){continue}n.push(o)}return n}for(var a=0;a<100;a++){var s=void 0;try{s=t[a]}catch(l){return n}if(!s)return n;n.push(s)}return n}var q=[],V=[];function v(e,t){void 0===t&&(t=!0);try{if(e===window)return!1}catch(o){return!0}try{if(!e)return!0}catch(o){return!0}try{if(e.closed)return!0}catch(o){return!o||o.message!==i}if(t&&f(e))try{if(e.mockclosed)return!0}catch(o){}try{if(!e.parent||!e.top)return!0}catch(o){}var r=function(e,t){for(var r=0;r<e.length;r++)try{if(e[r]===t)return r}catch(o){}return-1}(q,e);if(-1!==r){var n=V[r];if(n&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var t=e.ownerDocument;if(t&&t.documentElement&&!t.documentElement.contains(e)){for(var r=e;r.parentNode&&r.parentNode!==r;)r=r.parentNode;if(!r.host||!t.documentElement.contains(r.host))return!0}return!1}(n))return!0}return!1}function b(e){return void 0===e&&(e=window),u(e=e||window)||l(e)||void 0}function y(e,t){if("string"==typeof e){if("string"==typeof t)return"*"===e||t===e;if(n(t))return!1;if(Array.isArray(t))return!1}return n(e)?n(t)?e.toString()===t.toString():!Array.isArray(t)&&Boolean(t.match(e)):!!Array.isArray(e)&&(Array.isArray(t)?JSON.stringify(e)===JSON.stringify(t):!n(t)&&e.some(function(e){return y(e,t)}))}function S(e){try{if(e===window)return!0}catch(t){if(t&&t.message===i)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(t){if(t&&t.message===i)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&e.self===e)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&e.parent===e)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&e.top===e)return!0}catch(t){if(t&&t.message===i)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(t){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(t){}return!1}function A(e){if(f(e))return h(e).frameElement;for(var t=0,r=document.querySelectorAll("iframe");t<r.length;t++){var n=r[t];if(n&&n.contentWindow&&n.contentWindow===e)return n}}function w(e){if(void 0===(r=e)&&(r=window),Boolean(l(r))){var t=A(e);if(t&&t.parentElement)return void t.parentElement.removeChild(t)}var r;try{e.close()}catch(n){}}function x(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var t={}.toString;if(t){var r=t.call(e);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof e.then)return!0}catch(n){return!1}return!1}var C,E=[],k=[],T=0;function R(){if(!T&&C){var e=C;C=null,e.resolve()}}function U(){T+=1}function F(){T-=1,R()}var N=function(){function e(e){var t=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var r,n,i=!1,o=!1,a=!1;U();try{e(function(e){a?t.resolve(e):(i=!0,r=e)},function(e){a?t.reject(e):(o=!0,n=e)})}catch(s){return F(),void this.reject(s)}F(),a=!0,i?this.resolve(r):o&&this.reject(n)}}var t=e.prototype;return t.resolve=function(e){if(this.resolved||this.rejected)return this;if(x(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},t.reject=function(e){var t=this;if(this.resolved||this.rejected)return this;if(x(e))throw new Error("Can not reject promise with another promise");if(!e){var r=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+r)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){t.errorHandled||function(e,t){if(-1===E.indexOf(e)){E.push(e),setTimeout(function(){throw e},1);for(var r=0;r<k.length;r++)k[r](e,t)}}(e,t)},1),this.dispatch(),this},t.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},t.dispatch=function(){var t=this.resolved,r=this.rejected,n=this.handlers;if(!this.dispatching&&(t||r)){this.dispatching=!0,U();for(var i=function(e,t){return e.then(function(e){t.resolve(e)},function(e){t.reject(e)})},o=0;o<n.length;o++){var a=n[o],s=a.onSuccess,l=a.onError,u=a.promise,c=void 0;if(t)try{c=s?s(this.value):this.value}catch(p){u.reject(p);continue}else if(r){if(!l){u.reject(this.error);continue}try{c=l(this.error)}catch(p){u.reject(p);continue}}if(c instanceof e&&(c.resolved||c.rejected)){var d=c;d.resolved?u.resolve(d.value):u.reject(d.error),d.errorHandled=!0}else x(c)?c instanceof e&&(c.resolved||c.rejected)?c.resolved?u.resolve(c.value):u.reject(c.error):i(c,u):u.resolve(c)}n.length=0,this.dispatching=!1,F()}},t.then=function(t,r){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var n=new e;return this.handlers.push({promise:n,onSuccess:t,onError:r}),this.errorHandled=!0,this.dispatch(),n},t.catch=function(e){return this.then(void 0,e)},t.finally=function(t){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(r){return e.try(t).then(function(){return r})},function(r){return e.try(t).then(function(){throw r})})},t.timeout=function(e,t){var r=this;if(this.resolved||this.rejected)return this;var n=setTimeout(function(){r.resolved||r.rejected||r.reject(t||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(n),e})},t.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},t.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(t){return t instanceof e?t:x(t)?new e(function(e,r){return t.then(e,r)}):(new e).resolve(t)},e.reject=function(t){return(new e).reject(t)},e.asyncReject=function(t){return(new e).asyncReject(t)},e.all=function(t){var r=new e,n=t.length,i=[].slice();if(!n)return r.resolve(i),r;for(var o=function(e,t,o){return t.then(function(t){i[e]=t,0==(n-=1)&&r.resolve(i)},function(e){o.reject(e)})},a=0;a<t.length;a++){var s=t[a];if(s instanceof e){if(s.resolved){i[a]=s.value,n-=1;continue}}else if(!x(s)){i[a]=s,n-=1;continue}o(a,e.resolve(s),r)}return 0===n&&r.resolve(i),r},e.hash=function(t){var r={},n=[],i=function(e){if(t.hasOwnProperty(e)){var i=t[e];x(i)?n.push(i.then(function(t){r[e]=t})):r[e]=i}};for(var o in t)i(o);return e.all(n).then(function(){return r})},e.map=function(t,r){return e.all(t.map(r))},e.onPossiblyUnhandledException=function(e){return t=e,k.push(t),{cancel:function(){k.splice(k.indexOf(t),1)}};var t},e.try=function(t,r,n){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.try expected a function");var i;U();try{i=t.apply(r,n||[])}catch(o){return F(),e.reject(o)}return F(),e.resolve(i)},e.delay=function(t){return new e(function(e){setTimeout(e,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||x(t)},e.flush=function(){return t=C=C||new e,R(),t;var t},e}();function O(e,t){for(var r=0;r<e.length;r++)try{if(e[r]===t)return r}catch(n){}return-1}var W,D=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,t={};return Object.freeze(t),e.set(t,"__testvalue__"),"__testvalue__"===e.get(t)}catch(r){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var t=e.prototype;return t._cleanupClosedWindows=function(){for(var e=this.weakmap,t=this.keys,r=0;r<t.length;r++){var n=t[r];if(S(n)&&v(n)){if(e)try{e.delete(n)}catch(i){}t.splice(r,1),this.values.splice(r,1),r-=1}}},t.isSafeToReadWrite=function(e){return!S(e)},t.set=function(e,t){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.set(e,t)}catch(l){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var n=this.name,i=e[n];return void(i&&i[0]===e?i[1]=t:Object.defineProperty(e,n,{value:[e,t],writable:!0}))}catch(l){}this._cleanupClosedWindows();var o=this.keys,a=this.values,s=O(o,e);-1===s?(o.push(e),a.push(t)):a[s]=t},t.get=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return t.get(e)}catch(i){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=e[this.name];return r&&r[0]===e?r[1]:void 0}catch(i){}this._cleanupClosedWindows();var n=O(this.keys,e);if(-1!==n)return this.values[n]},t.delete=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.delete(e)}catch(o){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=e[this.name];r&&r[0]===e&&(r[0]=r[1]=void 0)}catch(o){}this._cleanupClosedWindows();var n=this.keys,i=O(n,e);-1!==i&&(n.splice(i,1),this.values.splice(i,1))},t.has=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return!0}catch(n){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=e[this.name];return!(!r||r[0]!==e)}catch(n){}return this._cleanupClosedWindows(),-1!==O(this.keys,e)},t.getOrSet=function(e,t){if(this.has(e))return this.get(e);var r=t();return this.set(e,r),r},e}();function K(e){return e.name||e.__name__||e.displayName||"anonymous"}function B(e,t){try{delete e.name,e.name=t}catch(r){}return e.__name__=e.displayName=t,e}function P(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(16*Math.random()))})+"_"+function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))})).replace(/[=]/g,"");if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function I(e){try{return JSON.stringify([].slice.call(e),function(e,t){return"function"==typeof t?"memoize["+function(e){if(W=W||new D,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var t=W.get(e);return t||(t=typeof e+":"+P(),W.set(e,t)),t}(t)+"]":"undefined"!=typeof window&&t instanceof window.Element||null!==t&&"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument?{}:t})}catch(t){throw new Error("Arguments not serializable -- can not be used to memoize")}}function L(){return{}}var j=0,M=0;function X(e,t){void 0===t&&(t={});var r,n,i=t.thisNamespace,o=void 0!==i&&i,a=t.time,s=j;j+=1;var l=function(){for(var t=arguments.length,i=new Array(t),l=0;l<t;l++)i[l]=arguments[l];var u,c;s<M&&(r=null,n=null,s=j,j+=1),u=o?(n=n||new D).getOrSet(this,L):r=r||{};try{c=I(i)}catch(h){return e.apply(this,arguments)}var d=u[c];if(d&&a&&Date.now()-d.time<a&&(delete u[c],d=null),d)return d.value;var p=Date.now(),f=e.apply(this,arguments);return u[c]={time:p,value:f},f};return l.reset=function(){r=null,n=null},B(l,(t.name||K(e))+"::memoized")}function z(e){var t={};function r(){for(var r=arguments,n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=I(o);return t.hasOwnProperty(s)||(t[s]=N.try(function(){return e.apply(n,r)}).finally(function(){delete t[s]})),t[s]}return r.reset=function(){t={}},B(r,K(e)+"::promiseMemoized")}function G(){}function H(e,t){if(void 0===t&&(t=1),t>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";if("string"==typeof e)return e;if(e instanceof Error){var r=e&&e.stack,n=e&&e.message;if(r&&n)return-1!==r.indexOf(n)?r:n+"\n"+r;if(r)return r;if(n)return n}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(i){return"Error while stringifying error: "+H(i,t+1)}}function Z(e){return"string"==typeof e?e:e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function Y(e){return"[object RegExp]"==={}.toString.call(e)}function Q(e,t,r){if(e.hasOwnProperty(t))return e[t];var n=r();return e[t]=n,n}function J(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function _(){return Boolean(document.body)&&"complete"===document.readyState}function $(){return Boolean(document.body)&&"interactive"===document.readyState}X.clear=function(){M=j},X(function(e){if(Object.values)return Object.values(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}),X(function(){return new N(function(e){if(_()||$())return e();var t=setInterval(function(){if(_()||$())return clearInterval(t),e()},10)})});var ee="undefined"!=typeof document?document.currentScript:null,te=X(function(){if(ee)return ee;if(ee=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.stack||""}}(),t=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),r=t&&t[1];if(!r)return;for(var n=0,i=[].slice.call(document.getElementsByTagName("script")).reverse();n<i.length;n++){var o=i[n];if(o.src&&o.src===r)return o}}catch(a){}}())return ee;throw new Error("Can not determine current script")}),re=P();function ne(e){void 0===e&&(e=window);var t="__post_robot_10_0_46__";return e!==window?e[t]:e[t]=e[t]||{}}X(function(){var e;try{e=te()}catch(n){return re}var t=e.getAttribute("data-uid");if(t&&"string"==typeof t)return t;if((t=e.getAttribute("data-uid-auto"))&&"string"==typeof t)return t;if(e.src){var r=function(e){for(var t="",r=0;r<e.length;r++){var n=e[r].charCodeAt(0)*r;e[r+1]&&(n+=e[r+1].charCodeAt(0)*(r-1)),t+=String.fromCharCode(97+Math.abs(n)%26)}return t}(JSON.stringify({src:e.src,dataset:e.dataset}));t="uid_"+r.slice(r.length-30)}else t=P();return e.setAttribute("data-uid-auto",t),t});var ie=function(){return{}};function oe(e,t){return void 0===e&&(e="store"),void 0===t&&(t=ie),Q(ne(),e,function(){var e=t();return{has:function(t){return e.hasOwnProperty(t)},get:function(t,r){return e.hasOwnProperty(t)?e[t]:r},set:function(t,r){return e[t]=r,r},del:function(t){delete e[t]},getOrSet:function(t,r){return Q(e,t,r)},reset:function(){e=t()},keys:function(){return Object.keys(e)}}})}var ae,se=function(){};function le(){var e=ne();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new se,e.WINDOW_WILDCARD}function ue(e,t){return void 0===e&&(e="store"),void 0===t&&(t=ie),oe("windowStore").getOrSet(e,function(){var r=new D,n=function(e){return r.getOrSet(e,t)};return{has:function(t){return n(t).hasOwnProperty(e)},get:function(t,r){var i=n(t);return i.hasOwnProperty(e)?i[e]:r},set:function(t,r){return n(t)[e]=r,r},del:function(t){delete n(t)[e]},getOrSet:function(t,r){return Q(n(t),e,r)}}})}function ce(){return oe("instance").getOrSet("instanceID",P)}function de(e,t){var r=t.domain,n=ue("helloPromises"),i=n.get(e);i&&i.resolve({domain:r});var o=N.resolve({domain:r});return n.set(e,o),o}function pe(e,t){return(0,t.send)(e,"postrobot_hello",{instanceID:ce()},{domain:"*",timeout:-1}).then(function(t){var r=t.origin,n=t.data.instanceID;return de(e,{domain:r}),{win:e,domain:r,instanceID:n}})}function fe(e,t){var r=t.send;return ue("windowInstanceIDPromises").getOrSet(e,function(){return pe(e,{send:r}).then(function(e){return e.instanceID})})}function he(e){ue("knownWindows").set(e,!0)}function me(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function ge(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function qe(e,t){return{__type__:e,__val__:t}}var Ve,ve=((ae={}).function=function(){},ae.error=function(e){return qe("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},ae.promise=function(){},ae.regex=function(e){return qe("regex",e.source)},ae.date=function(e){return qe("date",e.toJSON())},ae.array=function(e){return e},ae.object=function(e){return e},ae.string=function(e){return e},ae.number=function(e){return e},ae.boolean=function(e){return e},ae.null=function(e){return e},ae[void 0]=function(e){return qe("undefined",e)},ae),be={},ye=((Ve={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},Ve.error=function(e){var t=e.stack,r=e.code,n=e.data,i=new Error(e.message);return i.code=r,n&&(i.data=n),i.stack=t+"\n\n"+i.stack,i},Ve.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},Ve.regex=function(e){return new RegExp(e)},Ve.date=function(e){return new Date(e)},Ve.array=function(e){return e},Ve.object=function(e){return e},Ve.string=function(e){return e},Ve.number=function(e){return e},Ve.boolean=function(e){return e},Ve.null=function(e){return e},Ve[void 0]=function(){},Ve),Se={};function Ae(){for(var e=oe("idToProxyWindow"),t=0,r=e.keys();t<r.length;t++){var n=r[t];e.get(n).shouldClean()&&e.del(n)}}function we(e,t){var r=t.send,n=t.id,i=void 0===n?P():n,o=e.then(function(e){if(f(e))return h(e).name}),a=e.then(function(e){if(v(e))throw new Error("Window is closed, can not determine type");return u(e)?"popup":"iframe"});o.catch(G),a.catch(G);var s=function(){return e.then(function(e){if(!v(e))return f(e)?h(e).name:o})};return{id:i,getType:function(){return a},getInstanceID:z(function(){return e.then(function(e){return fe(e,{send:r})})}),close:function(){return e.then(w)},getName:s,focus:function(){return e.then(function(e){e.focus()})},isClosed:function(){return e.then(function(e){return v(e)})},setLocation:function(t,r){return void 0===r&&(r={}),e.then(function(e){var n=window.location.protocol+"//"+window.location.host,i=r.method,o=void 0===i?"get":i,a=r.body;if(0===t.indexOf("/"))t=""+n+t;else if(!t.match(/^https?:\/\//)&&0!==t.indexOf(n))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(t));if("post"===o)return s().then(function(e){if(!e)throw new Error("Can not post to window without target name");!function(e){var t=e.url,r=e.target,n=e.body,i=e.method,o=void 0===i?"post":i,a=document.createElement("form");if(a.setAttribute("target",r),a.setAttribute("method",o),a.setAttribute("action",t),a.style.display="none",n)for(var s=0,l=Object.keys(n);s<l.length;s++){var u,c=l[s],d=document.createElement("input");d.setAttribute("name",c),d.setAttribute("value",null==(u=n[c])?void 0:u.toString()),a.appendChild(d)}J().appendChild(a),a.submit(),J().removeChild(a)}({url:t,target:e,method:o,body:a})});if("get"!==o)throw new Error("Unsupported method: "+o);if(f(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(t)}catch(l){}e.location=t})},setName:function(t){return e.then(function(e){var r=f(e),n=A(e);if(!r)throw new Error("Can not set name for cross-domain window: "+t);h(e).name=t,n&&n.setAttribute("name",t),o=N.resolve(t)})}}}new N(function(e){if(window.document&&window.document.body)return e(window.document.body);var t=setInterval(function(){if(window.document&&window.document.body)return clearInterval(t),e(window.document.body)},10)});var xe=function(){function e(e){var t=e.send,r=e.win,n=e.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new N,this.serializedWindow=n||we(this.actualWindowPromise,{send:t}),oe("idToProxyWindow").set(this.getID(),this),r&&this.setWindow(r,{send:t})}var t=e.prototype;return t.getID=function(){return this.serializedWindow.id},t.getType=function(){return this.serializedWindow.getType()},t.isPopup=function(){return this.getType().then(function(e){return"popup"===e})},t.setLocation=function(e,t){var r=this;return this.serializedWindow.setLocation(e,t).then(function(){return r})},t.getName=function(){return this.serializedWindow.getName()},t.setName=function(e){var t=this;return this.serializedWindow.setName(e).then(function(){return t})},t.close=function(){var e=this;return this.serializedWindow.close().then(function(){return e})},t.focus=function(){var e=this,t=this.isPopup(),r=this.getName(),n=N.hash({isPopup:t,name:r}).then(function(e){var t=e.name;e.isPopup&&t&&window.open("",t,"noopener")}),i=this.serializedWindow.focus();return N.all([n,i]).then(function(){return e})},t.isClosed=function(){return this.serializedWindow.isClosed()},t.getWindow=function(){return this.actualWindow},t.setWindow=function(e,t){var r=t.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=we(this.actualWindowPromise,{send:r,id:this.getID()}),ue("winToProxyWindow").set(e,this)},t.awaitWindow=function(){return this.actualWindowPromise},t.matchWindow=function(e,t){var r=this,n=t.send;return N.try(function(){return r.actualWindow?e===r.actualWindow:N.hash({proxyInstanceID:r.getInstanceID(),knownWindowInstanceID:fe(e,{send:n})}).then(function(t){var i=t.proxyInstanceID===t.knownWindowInstanceID;return i&&r.setWindow(e,{send:n}),i})})},t.unwrap=function(){return this.actualWindow||this},t.getInstanceID=function(){return this.serializedWindow.getInstanceID()},t.shouldClean=function(){return Boolean(this.actualWindow&&v(this.actualWindow))},t.serialize=function(){return this.serializedWindow},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t,r){var n=r.send;return Ae(),e.toProxyWindow(t,{send:n}).serialize()},e.deserialize=function(t,r){var n=r.send;return Ae(),oe("idToProxyWindow").get(t.id)||new e({serializedWindow:t,send:n})},e.isProxyWindow=function(e){return Boolean(e&&!S(e)&&e.isProxyWindow)},e.toProxyWindow=function(t,r){var n=r.send;if(Ae(),e.isProxyWindow(t))return t;var i=t;return ue("winToProxyWindow").get(i)||new e({win:i,send:n})},e}();function Ce(e,t,r,n,i){var o=ue("methodStore"),a=oe("proxyWindowMethods");xe.isProxyWindow(n)?a.set(e,{val:t,name:r,domain:i,source:n}):(a.del(e),o.getOrSet(n,function(){return{}})[e]={domain:i,name:r,val:t,source:n})}function Ee(e,t){var r=ue("methodStore"),n=oe("proxyWindowMethods");return r.getOrSet(e,function(){return{}})[t]||n.get(t)}function ke(e,t,r,n,i){var o,a,s;a=(o={on:i.on,send:i.send}).on,s=o.send,oe("builtinListeners").getOrSet("functionCalls",function(){return a("postrobot_method",{domain:"*"},function(e){var t=e.source,r=e.origin,n=e.data,i=n.id,o=n.name,a=Ee(t,i);if(!a)throw new Error("Could not find method '"+o+"' with id: "+n.id+" in "+p(window));var l=a.source,u=a.domain,c=a.val;return N.try(function(){if(!y(u,r))throw new Error("Method '"+n.name+"' domain "+JSON.stringify(Y(a.domain)?a.domain.source:a.domain)+" does not match origin "+r+" in "+p(window));if(xe.isProxyWindow(l))return l.matchWindow(t,{send:s}).then(function(e){if(!e)throw new Error("Method call '"+n.name+"' failed - proxy window does not match source in "+p(window))})}).then(function(){return c.apply({source:t,origin:r},n.args)},function(e){return N.try(function(){if(c.onError)return c.onError(e)}).then(function(){var t,r;throw e.stack&&(e.stack="Remote call to "+o+"("+(void 0===(t=n.args)&&(t=[]),(r=t,[].slice.call(r)).map(function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"}).join(", ")+") failed\n\n")+e.stack),e})}).then(function(e){return{result:e,id:i,name:o}})})});var l=r.__id__||P();e=xe.unwrap(e);var u=r.__name__||r.name||n;return"string"==typeof u&&"function"==typeof u.indexOf&&0===u.indexOf("anonymous::")&&(u=u.replace("anonymous::",n+"::")),xe.isProxyWindow(e)?(Ce(l,r,u,e,t),e.awaitWindow().then(function(e){Ce(l,r,u,e,t)})):Ce(l,r,u,e,t),qe("cross_domain_function",{id:l,name:u})}function Te(e,t,r,n){var i,o=n.on,a=n.send;return function(e,t){void 0===t&&(t=be);var r=JSON.stringify(e,function(e){var r=this[e];if(me(this))return r;var n=ge(r);if(!n)return r;var i=t[n]||ve[n];return i?i(r,e):r});return void 0===r?"undefined":r}(r,((i={}).promise=function(r,n){return i=r,qe("cross_domain_zalgo_promise",{then:ke(e,t,function(e,t){return i.then(e,t)},n,{on:(s={on:o,send:a}).on,send:s.send})});var i,s},i.function=function(r,n){return ke(e,t,r,n,{on:o,send:a})},i.object=function(e){return S(e)||xe.isProxyWindow(e)?qe("cross_domain_window",xe.serialize(e,{send:a})):e},i))}function Re(e,t,r,n){var i,o=n.send;return function(e,t){if(void 0===t&&(t=Se),"undefined"!==e)return JSON.parse(e,function(e,r){if(me(this))return r;var n,i;if(me(r)?(n=r.__type__,i=r.__val__):(n=ge(r),i=r),!n)return i;var o=t[n]||ye[n];return o?o(i,e):i})}(r,((i={}).cross_domain_zalgo_promise=function(e){return new N(e.then)},i.cross_domain_function=function(r){return n=e,i=t,s={send:o},l=(a=r).id,u=a.name,c=s.send,d=function(e){function t(){var r=arguments;return xe.toProxyWindow(n,{send:c}).awaitWindow().then(function(n){var o=Ee(n,l);if(o&&o.val!==t)return o.val.apply({source:window,origin:p()},r);var a=[].slice.call(r);return e.fireAndForget?c(n,"postrobot_method",{id:l,name:u,args:a},{domain:i,fireAndForget:!0}):c(n,"postrobot_method",{id:l,name:u,args:a},{domain:i,fireAndForget:!1}).then(function(e){return e.data.result})}).catch(function(e){throw e})}return void 0===e&&(e={}),t.__name__=u,t.__origin__=i,t.__source__=n,t.__id__=l,t.origin=i,t},(f=d()).fireAndForget=d({fireAndForget:!0}),f;var n,i,a,s,l,u,c,d,f},i.cross_domain_window=function(e){return xe.deserialize(e,{send:o})},i))}var Ue={};function Fe(e,t,r,n){var i=n.on,o=n.send;return N.try(function(){var n=ue().getOrSet(e,function(){return{}});return n.buffer=n.buffer||[],n.buffer.push(r),n.flush=n.flush||N.flush().then(function(){if(v(e))throw new Error("Window is closed");var r,a=Te(e,t,((r={}).__post_robot_10_0_46__=n.buffer||[],r),{on:i,send:o});delete n.buffer;for(var s=Object.keys(Ue),l=[],u=0;u<s.length;u++){var c=s[u];try{Ue[c](e,a,t)}catch(d){l.push(d)}}if(l.length===s.length)throw new Error("All post-robot messaging strategies failed:\n\n"+l.map(function(e,t){return t+". "+H(e)}).join("\n\n"))}),n.flush.then(function(){delete n.flush})}).then(G)}function Ne(e){return oe("responseListeners").get(e)}function Oe(e){oe("responseListeners").del(e)}function We(e){return oe("erroredResponseListeners").has(e)}function De(e){var t=e.name,r=e.win,n=e.domain,i=ue("requestListeners");if("*"===r&&(r=null),"*"===n&&(n=null),!t)throw new Error("Name required to get request listener");for(var o=0,a=[r,le()];o<a.length;o++){var s=a[o];if(s){var l=i.get(s);if(l){var u=l[t];if(u){if(n&&"string"==typeof n){if(u[n])return u[n];if(u.__domain_regex__)for(var c=0,d=u.__domain_regex__;c<d.length;c++){var p=d[c],f=p.listener;if(y(p.regex,n))return f}}if(u["*"])return u["*"]}}}}}function Ke(e,t,r,n){var i=n.on,o=n.send,a=De({name:r.name,win:e,domain:t}),s="postrobot_method"===r.name&&r.data&&"string"==typeof r.data.name?r.data.name+"()":r.name;function l(n,a,l){return N.flush().then(function(){if(!r.fireAndForget&&!v(e))try{return Fe(e,t,{id:P(),origin:p(window),type:"postrobot_message_response",hash:r.hash,name:r.name,ack:n,data:a,error:l},{on:i,send:o})}catch(u){throw new Error("Send response message failed for "+s+" in "+p()+"\n\n"+H(u))}})}return N.all([N.flush().then(function(){if(!r.fireAndForget&&!v(e))try{return Fe(e,t,{id:P(),origin:p(window),type:"postrobot_message_ack",hash:r.hash,name:r.name},{on:i,send:o})}catch(n){throw new Error("Send ack message failed for "+s+" in "+p()+"\n\n"+H(n))}}),N.try(function(){if(!a)throw new Error("No handler found for post message: "+r.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);return a.handler({source:e,origin:t,data:r.data})}).then(function(e){return l("success",e)},function(e){return l("error",null,e)})]).then(G).catch(function(e){if(a&&a.handleError)return a.handleError(e);throw e})}function Be(e,t,r){if(!We(r.hash)){var n=Ne(r.hash);if(!n)throw new Error("No handler found for post message ack for message: "+r.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!y(n.domain,t))throw new Error("Ack origin "+t+" does not match domain "+n.domain.toString());if(e!==n.win)throw new Error("Ack source does not match registered window")}catch(i){n.promise.reject(i)}n.ack=!0}}function Pe(e,t,r){if(!We(r.hash)){var i,o=Ne(r.hash);if(!o)throw new Error("No handler found for post message response for message: "+r.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!y(o.domain,t))throw new Error("Response origin "+t+" does not match domain "+(i=o.domain,Array.isArray(i)?"("+i.join(" | ")+")":n(i)?"RegExp("+i.toString()+")":i.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Oe(r.hash),"error"===r.ack?o.promise.reject(r.error):"success"===r.ack&&o.promise.resolve({source:e,origin:t,data:r.data})}}function Ie(e,t){var r=t.on,n=t.send,i=oe("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(c){return}var o=e.source,a=e.origin,s=function(e,t,r,n){var i,o=n.on,a=n.send;try{i=Re(t,r,e,{on:o,send:a})}catch(c){return}if(i&&"object"==typeof i&&null!==i){var s=i.__post_robot_10_0_46__;if(Array.isArray(s))return s}}(e.data,o,a,{on:r,send:n});if(s){he(o);for(var l=0;l<s.length;l++){var u=s[l];if(i.has(u.id))return;if(i.set(u.id,!0),v(o)&&!u.fireAndForget)return;0===u.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===u.type?Ke(o,a,u,{on:r,send:n}):"postrobot_message_response"===u.type?Pe(o,a,u):"postrobot_message_ack"===u.type&&Be(o,a,u)}catch(c){setTimeout(function(){throw c},0)}}}}function Le(e,t,r){if(!e)throw new Error("Expected name");if("function"==typeof(t=t||{})&&(r=t,t={}),!r)throw new Error("Expected handler");var n=function e(t,r){var n=t.name,i=t.win,o=t.domain,a=ue("requestListeners");if(!n||"string"!=typeof n)throw new Error("Name required to add request listener");if(i&&"*"!==i&&xe.isProxyWindow(i)){var s=i.awaitWindow().then(function(t){return e({name:n,win:t,domain:o},r)});return{cancel:function(){s.then(function(e){return e.cancel()},G)}}}var l=i;if(Array.isArray(l)){for(var u=[],c=0,d=l;c<d.length;c++)u.push(e({name:n,domain:o,win:d[c]},r));return{cancel:function(){for(var e=0;e<u.length;e++)u[e].cancel()}}}if(Array.isArray(o)){for(var p=[],f=0,h=o;f<h.length;f++)p.push(e({name:n,win:l,domain:h[f]},r));return{cancel:function(){for(var e=0;e<p.length;e++)p[e].cancel()}}}var m=De({name:n,win:l,domain:o});l&&"*"!==l||(l=le());var g=(o=o||"*").toString();if(m)throw l&&o?new Error("Request listener already exists for "+n+" on domain "+o.toString()+" for "+(l===le()?"wildcard":"specified")+" window"):l?new Error("Request listener already exists for "+n+" for "+(l===le()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+n+" on domain "+o.toString()):new Error("Request listener already exists for "+n);var q,V,v=a.getOrSet(l,function(){return{}}),b=Q(v,n,function(){return{}});return Y(o)?(q=Q(b,"__domain_regex__",function(){return[]})).push(V={regex:o,listener:r}):b[g]=r,{cancel:function(){delete b[g],V&&(q.splice(q.indexOf(V,1)),q.length||delete b.__domain_regex__),Object.keys(b).length||delete v[n],l&&!Object.keys(v).length&&a.del(l)}}}({name:e,win:t.window,domain:t.domain||"*"},{handler:r||t.handler,handleError:t.errorHandler||function(e){throw e}});return{cancel:function(){n.cancel()}}}function je(e,t,r){"function"==typeof(t=t||{})&&(r=t,t={});var n,i=new N;return t.errorHandler=function(e){n.cancel(),i.reject(e)},n=Le(e,t,function(e){if(n.cancel(),i.resolve(e),r)return r(e)}),i.cancel=n.cancel,i}Ue.postrobot_post_message=function(e,t,r){0===r.indexOf("file:")&&(r="*"),e.postMessage(t,r)};var Me=function e(t,r,n,i){var o=(i=i||{}).domain||"*",a=i.timeout||-1,s=i.timeout||5e3,u=i.fireAndForget||!1;return xe.toProxyWindow(t,{send:e}).awaitWindow().then(function(t){return N.try(function(){if(function(e,t,r){if(!e)throw new Error("Expected name");if("string"!=typeof r&&!Array.isArray(r)&&!Y(r))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(r)+" to be a string, array, or regex");if(v(t))throw new Error("Can not send "+e+". Target window is closed")}(r,t,o),function(e,t){var r=b(t);if(r)return r===e;if(t===e)return!1;if(function(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(i){}if(l(e)===e)return e;try{if(m(window,e)&&window.top)return window.top}catch(i){}try{if(m(e,window)&&window.top)return window.top}catch(i){}for(var t=0,r=function e(t){for(var r=[],n=0,i=g(t);n<i.length;n++){var o=i[n];r.push(o);for(var a=0,s=e(o);a<s.length;a++)r.push(s[a])}return r}(e);t<r.length;t++){var n=r[t];try{if(n.top)return n.top}catch(i){}if(l(n)===n)return n}}(t)===t)return!1;for(var n=0,i=g(e);n<i.length;n++)if(i[n]===t)return!0;return!1}(window,t))return function(e,t,r){void 0===t&&(t=5e3),void 0===r&&(r="Window");var n,i=(n=e,ue("helloPromises").getOrSet(n,function(){return new N}));return-1!==t&&(i=i.timeout(t,new Error(r+" did not load after "+t+"ms"))),i}(t,s)}).then(function(r){return n=t,i=o,a=(void 0===r?{}:r).domain,s=e,N.try(function(){return"string"==typeof i?i:N.try(function(){return a||pe(n,{send:s}).then(function(e){return e.domain})}).then(function(e){if(!y(i,i))throw new Error("Domain "+Z(i)+" does not match "+Z(i));return e})});var n,i,a,s}).then(function(i){var o,s,l,c,d=i,f="postrobot_method"===r&&n&&"string"==typeof n.name?n.name+"()":r,h=new N,m=r+"_"+P();if(!u){var g={name:r,win:t,domain:d,promise:h};l=m,c=g,oe("responseListeners").set(l,c);var q=ue("requestPromises").getOrSet(t,function(){return[]});q.push(h),h.catch(function(){!function(e){oe("erroredResponseListeners").set(e,!0)}(m),Oe(m)});var V=(s=t,ue("knownWindows").get(s,!1)?1e4:2e3),b=a,y=V,S=b,A=(function e(){o=setTimeout(function(){v(t)?h.reject(new Error("Window closed for "+r+" before "+(g.ack?"response":"ack"))):g.cancelled?h.reject(new Error("Response listener was cancelled for "+r)):(y=Math.max(y-500,0),-1!==S&&(S=Math.max(S-500,0)),g.ack||0!==y?0===S&&h.reject(new Error("No response for postMessage "+f+" in "+p()+" in "+b+"ms")):h.reject(new Error("No ack for postMessage "+f+" in "+p()+" in "+V+"ms"))),e()},500)}(),{cancel:function(){clearTimeout(o)}});h.finally(function(){A.cancel(),q.splice(q.indexOf(h,1))}).catch(G)}return Fe(t,d,{id:P(),origin:p(window),type:"postrobot_message_request",hash:m,name:r,data:n,fireAndForget:u},{on:Le,send:e}).then(function(){return u?h.resolve():h},function(e){throw new Error("Send request message failed for "+f+" in "+p()+"\n\n"+H(e))})})})};function Xe(e,t,r){return Te(e,t,r,{on:Le,send:Me})}function ze(e,t,r){return Re(e,t,r,{send:Me})}function Ge(e){return new xe({send:Me,win:e})}function He(e){return xe.toProxyWindow(e,{send:Me})}function Ze(){var e,t,r,n,i,o,a;ne().initialized||(ne().initialized=!0,i=(n={on:Le,send:Me}).on,o=n.send,(a=ne()).receiveMessage=a.receiveMessage||function(e){return Ie(e,{on:i,send:o})},t=(e={on:Le,send:Me}).on,r=e.send,oe().getOrSet("postMessageListener",function(){return e=window,n=function(e){var n,i,o,a;n=e,o=(i={on:t,send:r}).on,a=i.send,N.try(function(){var e=n.source||n.sourceElement,t=n.origin||n.originalEvent&&n.originalEvent.origin,r=n.data;if("null"===t&&(t="file://"),e){if(!t)throw new Error("Post message did not have origin domain");Ie({source:e,origin:t,data:r},{on:o,send:a})}})},e.addEventListener("message",n),{cancel:function(){e.removeEventListener("message",n)}};var e,n}),function(e){var t=e.on,r=e.send;oe("builtinListeners").getOrSet("helloListener",function(){var e=t("postrobot_hello",{domain:"*"},function(e){return de(e.source,{domain:e.origin}),{instanceID:ce()}}),n=b();return n&&pe(n,{send:r}).catch(function(e){}),e})}({on:Le,send:Me}))}function Ye(){var e;!function(){for(var e=oe("responseListeners"),t=0,r=e.keys();t<r.length;t++){var n=r[t],i=e.get(n);i&&(i.cancelled=!0),e.del(n)}}(),(e=oe().get("postMessageListener"))&&e.cancel(),delete window.__post_robot_10_0_46__}var Qe=!0;function Je(e){for(var t=0,r=ue("requestPromises").get(e,[]);t<r.length;t++)r[t].reject(new Error("Window "+(v(e)?"closed":"cleaned up")+" before response")).catch(G)}Ze()}]);var AUe=SUe.exports;!function(e){e.exports=AUe,e.exports.default=e.exports}(yUe);const wUe=f(yUe.exports),xUe=e=>{const{data:n,buttonText:i,codeTestURL:o=hUe,codeplayerURL:a=mUe,toRunCodeQuestion:s}=e,{verifyMode:l="",content:u="",topic:c,example:d,lang:p,cases:f}=n;t.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const h=t.useRef(null);return b.jsx("div",{className:"question-preview",children:b.jsx("div",{className:"content",children:b.jsx("div",{className:"preview-container",children:b.jsx("div",{className:"preview",children:b.jsxs("div",{className:"preview-content",children:[b.jsx(vUe,{score:n.score,type:n.type,difficulty:n.difficulty,currentIndex:null==n?void 0:n.currentIndex,questionsCount:null==n?void 0:n.questionsCount}),c&&b.jsx("div",{className:"topic",children:c}),u.trim()?b.jsx(pUe,{editorHeight:"fit-content",readOnly:!0,isBorder:!1,defaultValue:u,noPadding:!0}):b.jsx("p",{}),b.jsx(r.Button,{className:"submitBtn",onClick:()=>{if(s)s();else if(l===Jh.INPUT_OUTPUT){const e=window.open(o),t=null==f?void 0:f.map(({input:e,output:t})=>Array.isArray(e)?{input:e,output:t}:{input:[e],output:t});wUe.send(e,"send",{title:c,content:u,initCode:d,code:d,lang:null==p?void 0:p.toLocaleLowerCase(),cases:t,submitCases:t,noSubmit:!0,aiEnabled:!0})}else{const e=window.open(`${a}`),t=()=>{let t=[d];if("html"===n.lang&&d)try{const e=JSON.parse(d);t=[e.html??"",e.css??"",e.js??""]}catch(r){}wUe.send(e,"send",{title:c,content:u,lang:null==p?void 0:p.toLocaleLowerCase(),code:t,aiEnabled:!0,run:!1,dark:!0})};t(),wUe.on("refresh",{window:e},async function(){h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{(null==e?void 0:e.closed)||t()},500)}),wUe.on("change",{window:e},e=>{})}},type:"primary",style:{minWidth:"88px"},children:i||"去答题"})]})})})})})},{TextArea:CUe}=r.Input,EUe=e=>{const{status:n,data:i,onSubmit:o,buttonText:a,onNextQuestion:s}=e,{answerOption:l,userAnswer:u,topic:c}=i,[d,p]=t.useState([]),[f,h]=t.useState(),[m,g]=t.useState(!1),q=e=>{if(V&&!e)return void r.message.warning("请先进行填空!");if(m&&!e)return void(null==s||s());const t=e||d,n=null==l?void 0:l.every((e,r)=>{var n;return(null==e?void 0:e.answer)===(null==(n=t[r])?void 0:n.answer)});h(n),g(!0),!e&&(null==o||o(t))},V=t.useMemo(()=>d.every(e=>!(null==e?void 0:e.answer)),[d]);return t.useEffect(()=>{let e;"string"==typeof u&&(e=Mh(u));const t=(e||u||l||[]).map(e=>({answer:n===_h.ADD||u?null==e?void 0:e.answer:void 0}))??[];p(t),u&&q(t)},[n,u,l]),b.jsxs("div",{className:"completion",children:[b.jsx("div",{className:"completion-title",children:b.jsxs("div",{className:"completion-title-content",children:[b.jsx(vUe,{score:i.score,type:i.type,difficulty:i.difficulty,currentIndex:null==i?void 0:i.currentIndex,questionsCount:null==i?void 0:i.questionsCount}),b.jsx(pUe,{isBorder:!1,defaultValue:(e=>{if(!e)return"";let t=e.replace(/<code[^>]*>|<\/code>/g,"");return["<p","<div","<h1","<h2","<h3","<h4","<h5","<h6","<ul","<ol","<pre","<blockquote"].some(e=>t.trim().toLowerCase().startsWith(e))?t:`<p>${t}</p>`})(c),readOnly:!0,autoHeight:{min:0,max:1e5},noPadding:!0})]})}),b.jsx("div",{className:"completion-content",children:null==d?void 0:d.map((e,t)=>{var r,i,o;return b.jsxs("div",{className:"item-warpper",children:[b.jsxs("div",{className:"completion-content-item",children:[b.jsxs("span",{children:["填空",t+1]}),b.jsx(CUe,{style:{resize:"none"},placeholder:n===_h.EXAM||n===_h.PREVIEW?"请输入答案":"",disabled:n===_h.ADD||m,autoSize:{maxRows:3},value:null==e?void 0:e.answer,onChange:e=>((e,t)=>{h(void 0),g(!1);const r=e.target.value,n=[...d];n[t].answer=r,p(n)})(e,t)})]}),m&&b.jsx("div",{className:"item-result "+((null==e?void 0:e.answer)===(null==(r=l[t])?void 0:r.answer)?"right":"error"),children:(null==e?void 0:e.answer)===(null==(i=l[t])?void 0:i.answer)?b.jsxs("span",{children:[b.jsx($e,{})," 正确"]}):b.jsxs("span",{children:[b.jsx(st,{})," 错误, ",b.jsxs("span",{className:"answer",children:["正确答案:",null==(o=l[t])?void 0:o.answer]})]})})]},String(t))})}),o&&b.jsx("div",{className:"submit-btn",children:b.jsx(r.Button,{type:"primary",onClick:()=>q(),children:a||(m?"下一题":"提交")})})]})},kUe=e=>{const{status:n=_h.EXAM,data:i,onSubmit:o,buttonText:a,onNextQuestion:s}=e,[l,u]=t.useState(),[c,d]=t.useState(!1),p=t.useRef(null);t.useEffect(()=>{i.userAnswer&&(u(i.userAnswer),f(i.userAnswer))},[i]);const f=e=>{if(c&&!e)return void(null==s||s());const t=e||l;t?(d(!0),!e&&o&&o(t)):r.message.warning("请输入答案!")},h=[];return[_h.ADD,_h.MARK].includes(n)&&i&&(i.answer&&h.push({key:"1",label:b.jsxs(b.Fragment,{children:[b.jsx("span",{style:{fontWeight:"bold"},children:"参考答案"}),b.jsx("span",{style:{fontSize:"12px",color:"#999999"},children:"(学生不可见)"})]}),children:b.jsx(pUe,{readOnly:!0,isBorder:!1,defaultValue:i.answer,autoHeight:{min:0,max:1e4}})}),i.judgeNorm&&h.push({key:"2",label:b.jsxs(b.Fragment,{children:[b.jsx("span",{style:{fontWeight:"bold"},children:"判分标准"}),b.jsx("span",{style:{fontSize:"12px",color:"#999999"},children:"(学生不可见)"})]}),children:b.jsx(pUe,{readOnly:!0,defaultValue:i.judgeNorm,isBorder:!1,autoHeight:{min:0,max:1e4}})})),b.jsxs("div",{className:"essay-question",children:[b.jsx("div",{className:"essay-question-title",children:b.jsxs("div",{className:"essay-question-title-content",children:[b.jsx(vUe,{score:i.score,type:i.type,difficulty:i.difficulty,currentIndex:null==i?void 0:i.currentIndex,questionsCount:null==i?void 0:i.questionsCount}),b.jsx(pUe,{defaultValue:null==i?void 0:i.topic,readOnly:!0,isBorder:!1,autoHeight:{min:0,max:1e5},noPadding:!0})]})}),b.jsxs("div",{className:"essay-question-content",children:[[_h.MARK,_h.VIEW,_h.EXAM,_h.PREVIEW].includes(n)&&b.jsx(pUe,{ref:p,readOnly:n===_h.ADD||n===_h.MARK||n===_h.VIEW,editorHeight:220,defaultValue:(null==i?void 0:i.userAnswer)||"",placeholder:n===_h.EXAM||n===_h.PREVIEW?"请输入回答":"",onChange:e=>{u(e)},customToolbarKeys:["undo","redo","fullScreen","|","headerSelect","bold",{key:"group-image",title:"图片",iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',menuKeys:["insertImage","uploadImage"]},"insertTable"],uploadImageLimit:e=>e.size>3145728&&(r.message.destroy(),r.message.warning("仅能上传大小为3MB内的图片噢~"),!0)}),[_h.ADD,_h.MARK].includes(n)&&b.jsx(r.Collapse,{defaultActiveKey:n===_h.ADD?["1","2"].filter(e=>!("1"===e&&!(null==i?void 0:i.answer)||"2"===e&&!(null==i?void 0:i.judgeNorm))):[],ghost:!0,expandIcon:({isActive:e})=>b.jsx(Ye,{rotate:e?90:0}),items:h})]}),o&&b.jsx("div",{className:"submit-btn",children:b.jsx(r.Button,{type:"primary",onClick:()=>f(),children:a||c?"下一题":"提交"})})]})},TUe=t.forwardRef((e,r)=>{const{data:n,questionProps:i={}}=e,{onSubmit:o,onNextQuestion:a,buttonText:s="",showQuestionTip:l=!1,showResult:u,status:c=_h.PREVIEW,className:d="",styles:p={},uploadImg:f,codeTestURL:h,codeplayerURL:m,unknowQesutionRender:g,toRunCodeQuestion:q}=i,V=t.useMemo(()=>{const e={...n},{optionJson:t,type:r}=n;return!t||r!==Qh.ACM&&r!==Qh.CCM||(e.lang=null==t?void 0:t.defaultLanguage),e},[n]),v=e=>b.jsx(uUe.Provider,{value:{topProps:{uploadImg:f}},children:b.jsx("div",{className:`question-wrapper ${d}`,style:{...p},children:e})}),y={data:V,onSubmit:o,buttonText:s,status:c,onNextQuestion:a};switch(V.type){case Qh.RADIO:case Qh.CHECKBOX:return(()=>{const e=b.jsx(bUe,{showQuestionTip:l,showResult:u,...y});return v(e)})();case Qh.ACM:case Qh.CCM:return(()=>{const e=b.jsx(xUe,{codeTestURL:h,codeplayerURL:m,toRunCodeQuestion:q,...y});return v(e)})();case Qh.COMPLETION:return(()=>{const e=b.jsx(EUe,{showResult:u,...y});return v(e)})();case Qh.ANSWER:return(()=>{const e=b.jsx(kUe,{...y});return v(e)})();default:return g?g(V):b.jsx("div",{children:"未知题型"})}});var RUe={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function UUe(e){RUe=e}var FUe={exec:()=>null};function NUe(e,t=""){let r="string"==typeof e?e:e.source,n={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(WUe.caret,"$1"),r=r.replace(e,i),n},getRegex:()=>new RegExp(r,t)};return n}var OUe=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),WUe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},DUe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,KUe=/(?:[*+-]|\d{1,9}[.)])/,BUe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,PUe=NUe(BUe).replace(/bull/g,KUe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),IUe=NUe(BUe).replace(/bull/g,KUe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),LUe=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,jUe=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,MUe=NUe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",jUe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),XUe=NUe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,KUe).getRegex(),zUe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",GUe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,HUe=NUe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",GUe).replace("tag",zUe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ZUe=NUe(LUe).replace("hr",DUe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zUe).getRegex(),YUe={blockquote:NUe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ZUe).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:MUe,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:DUe,html:HUe,lheading:PUe,list:XUe,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ZUe,table:FUe,text:/^[^\n]+/},QUe=NUe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",DUe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zUe).getRegex(),JUe={...YUe,lheading:IUe,table:QUe,paragraph:NUe(LUe).replace("hr",DUe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",QUe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zUe).getRegex()},_Ue={...YUe,html:NUe("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",GUe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:FUe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:NUe(LUe).replace("hr",DUe).replace("heading"," *#{1,6} *[^\n]").replace("lheading",PUe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$Ue=/^( {2,}|\\)\n(?!\s*$)/,eFe=/[\p{P}\p{S}]/u,tFe=/[\s\p{P}\p{S}]/u,rFe=/[^\s\p{P}\p{S}]/u,nFe=NUe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,tFe).getRegex(),iFe=/(?!~)[\p{P}\p{S}]/u,oFe=NUe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",OUe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),aFe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sFe=NUe(aFe,"u").replace(/punct/g,eFe).getRegex(),lFe=NUe(aFe,"u").replace(/punct/g,iFe).getRegex(),uFe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cFe=NUe(uFe,"gu").replace(/notPunctSpace/g,rFe).replace(/punctSpace/g,tFe).replace(/punct/g,eFe).getRegex(),dFe=NUe(uFe,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,iFe).getRegex(),pFe=NUe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,rFe).replace(/punctSpace/g,tFe).replace(/punct/g,eFe).getRegex(),fFe=NUe(/\\(punct)/,"gu").replace(/punct/g,eFe).getRegex(),hFe=NUe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mFe=NUe(GUe).replace("(?:--\x3e|$)","--\x3e").getRegex(),gFe=NUe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mFe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),qFe=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,VFe=NUe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",qFe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),vFe=NUe(/^!?\[(label)\]\[(ref)\]/).replace("label",qFe).replace("ref",jUe).getRegex(),bFe=NUe(/^!?\[(ref)\](?:\[\])?/).replace("ref",jUe).getRegex(),yFe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,SFe={_backpedal:FUe,anyPunctuation:fFe,autolink:hFe,blockSkip:oFe,br:$Ue,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:FUe,emStrongLDelim:sFe,emStrongRDelimAst:cFe,emStrongRDelimUnd:pFe,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:VFe,nolink:bFe,punctuation:nFe,reflink:vFe,reflinkSearch:NUe("reflink|nolink(?!\\()","g").replace("reflink",vFe).replace("nolink",bFe).getRegex(),tag:gFe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:FUe},AFe={...SFe,link:NUe(/^!?\[(label)\]\((.*?)\)/).replace("label",qFe).getRegex(),reflink:NUe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",qFe).getRegex()},wFe={...SFe,emStrongRDelimAst:dFe,emStrongLDelim:lFe,url:NUe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",yFe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:NUe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",yFe).getRegex()},xFe={...wFe,br:NUe($Ue).replace("{2,}","*").getRegex(),text:NUe(wFe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},CFe={normal:YUe,gfm:JUe,pedantic:_Ue},EFe={normal:SFe,gfm:wFe,breaks:xFe,pedantic:AFe},kFe={"&":"&","<":"<",">":">",'"':""","'":"'"},TFe=e=>kFe[e];function RFe(e,t){if(t){if(WUe.escapeTest.test(e))return e.replace(WUe.escapeReplace,TFe)}else if(WUe.escapeTestNoEncode.test(e))return e.replace(WUe.escapeReplaceNoEncode,TFe);return e}function UFe(e){try{e=encodeURI(e).replace(WUe.percentDecode,"%")}catch{return null}return e}function FFe(e,t){var r;let n=e.replace(WUe.findPipe,(e,t,r)=>{let n=!1,i=t;for(;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"}).split(WUe.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!(null==(r=n.at(-1))?void 0:r.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(WUe.slashPipe,"|");return n}function NFe(e,t,r){let n=e.length;if(0===n)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function OFe(e,t,r,n,i){let o=t.href,a=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:r,href:o,title:a,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}var WFe=class{constructor(e){s(this,"options"),s(this,"rules"),s(this,"lexer"),this.options=e||RUe}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:NFe(e,"\n")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],r=function(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(null===n)return t;let i=n[1];return t.split("\n").map(e=>{let t=e.match(r.other.beginningSpace);if(null===t)return e;let[n]=t;return n.length>=i.length?e.slice(i.length):e}).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=NFe(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:NFe(t[0],"\n")}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=NFe(t[0],"\n").split("\n"),r="",n="",i=[];for(;e.length>0;){let t,o=!1,a=[];for(t=0;t<e.length;t++)if(this.rules.other.blockquoteStart.test(e[t]))a.push(e[t]),o=!0;else{if(o)break;a.push(e[t])}e=e.slice(t);let s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,n=n?`${n}\n${l}`:l;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=u,0===e.length)break;let c=i.at(-1);if("code"===(null==c?void 0:c.type))break;if("blockquote"===(null==c?void 0:c.type)){let t=c,o=t.raw+"\n"+e.join("\n"),a=this.blockquote(o);i[i.length-1]=a,r=r.substring(0,r.length-t.raw.length)+a.raw,n=n.substring(0,n.length-t.text.length)+a.text;break}if("list"===(null==c?void 0:c.type)){let t=c,o=t.raw+"\n"+e.join("\n"),a=this.list(o);i[i.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,n=n.substring(0,n.length-t.raw.length)+a.raw,e=o.substring(i.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:i,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),n=r.length>1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let o=this.rules.other.listItemRegex(r),a=!1;for(;e;){let r=!1,n="",s="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),u=e.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),r=!0),!r){let t=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),o=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){let p,f=e.split("\n",1)[0];if(u=f,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),p=u):p=u.replace(this.rules.other.tabCharGlobal," "),i.test(u)||o.test(u)||a.test(u)||t.test(u)||r.test(u))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+="\n"+p.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||o.test(l)||r.test(l))break;s+="\n"+u}!c&&!u.trim()&&(c=!0),n+=f+"\n",e=e.substring(f.length+1),l=p.slice(d)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(n)&&(a=!0));let p,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:n,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=n}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>"space"===e.type),r=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));i.loose=r}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:n}}}table(e){var t;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=FFe(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(null==(t=r[3])?void 0:t.trim())?r[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let e of i)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of o)a.rows.push(FFe(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=NFe(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let r=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],n="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(r);e&&(r=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?r.slice(1):r.slice(1,-1)),OFe(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return OFe(r,e,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!n[1]&&!n[2]||!r||this.rules.inline.punctuation.exec(r))){let r,i,o=[...n[0]].length-1,a=o,s=0,l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+o);null!=(n=l.exec(t));){if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!r)continue;if(i=[...r].length,n[3]||n[4]){a+=i;continue}if((n[5]||n[6])&&o%3&&!((o+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);let t=[...n[0]][0].length,l=e.slice(0,o+n.index+t+i);if(Math.min(o,i)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(e),n=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return r&&n&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,r;return"@"===t[2]?(e=t[1],r="mailto:"+e):(e=t[1],r=e),{type:"link",raw:t[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let r;if(r=this.rules.inline.url.exec(e)){let e,n;if("@"===r[2])e=r[0],n="mailto:"+e;else{let i;do{i=r[0],r[0]=(null==(t=this.rules.inline._backpedal.exec(r[0]))?void 0:t[0])??""}while(i!==r[0]);e=r[0],n="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},DFe=class e{constructor(e){s(this,"tokens"),s(this,"options"),s(this,"state"),s(this,"tokenizer"),s(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=e||RUe,this.options.tokenizer=this.options.tokenizer||new WFe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:WUe,block:CFe.normal,inline:EFe.normal};this.options.pedantic?(t.block=CFe.pedantic,t.inline=EFe.pedantic):this.options.gfm&&(t.block=CFe.gfm,this.options.breaks?t.inline=EFe.breaks:t.inline=EFe.gfm),this.tokenizer.rules=t}static get rules(){return{block:CFe,inline:EFe}}static lex(t,r){return new e(r).lex(t)}static lexInline(t,r){return new e(r).inlineTokens(t)}lex(e){e=e.replace(WUe.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],r=!1){var n,i,o;for(this.options.pedantic&&(e=e.replace(WUe.tabCharGlobal," ").replace(WUe.spaceLine,""));e;){let a;if(null==(i=null==(n=this.options.extensions)?void 0:n.block)?void 0:i.some(r=>!!(a=r.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let r=t.at(-1);1===a.raw.length&&void 0!==r?r.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);let r=t.at(-1);"paragraph"===(null==r?void 0:r.type)||"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title},t.push(a));continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let s=e;if(null==(o=this.options.extensions)?void 0:o.startBlock){let t,r=1/0,n=e.slice(1);this.options.extensions.startBlock.forEach(e=>{t=e.call({lexer:this},n),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(s=e.substring(0,r+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){let n=t.at(-1);r&&"paragraph"===(null==n?void 0:n.type)?(n.raw+=(n.raw.endsWith("\n")?"":"\n")+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a),r=s.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);let r=t.at(-1);"text"===(null==r?void 0:r.type)?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+a.raw,r.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var r,n,i,o,a;let s,l=e,u=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(u=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(u[0].slice(u[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,u.index)+"["+"a".repeat(u[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(u=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,u.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(u=this.tokenizer.rules.inline.blockSkip.exec(l));)s=u[2]?u[2].length:0,l=l.slice(0,u.index+s)+"["+"a".repeat(u[0].length-s-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);l=(null==(n=null==(r=this.options.hooks)?void 0:r.emStrongMask)?void 0:n.call({lexer:this},l))??l;let c=!1,d="";for(;e;){let r;if(c||(d=""),c=!1,null==(o=null==(i=this.options.extensions)?void 0:i.inline)?void 0:o.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);"text"===r.type&&"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,l,d)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let n=e;if(null==(a=this.options.extensions)?void 0:a.startInline){let t,r=1/0,i=e.slice(1);this.options.extensions.startInline.forEach(e=>{t=e.call({lexer:this},i),"number"==typeof t&&t>=0&&(r=Math.min(r,t))}),r<1/0&&r>=0&&(n=e.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(d=r.raw.slice(-1)),c=!0;let n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent)break;throw new Error(t)}}return t}},KFe=class{constructor(e){s(this,"options"),s(this,"parser"),this.options=e||RUe}space(e){return""}code({text:e,lang:t,escaped:r}){var n;let i=null==(n=(t||"").match(WUe.notSpaceStart))?void 0:n[0],o=e.replace(WUe.endingNewline,"")+"\n";return i?'<pre><code class="language-'+RFe(i)+'">'+(r?o:RFe(o,!0))+"</code></pre>\n":"<pre><code>"+(r?o:RFe(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o<e.items.length;o++){let t=e.items[o];n+=this.listitem(t)}let i=t?"ol":"ul";return"<"+i+(t&&1!==r?' start="'+r+'"':"")+">\n"+n+"</"+i+">\n"}listitem(e){var t;let r="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+RFe(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):r+=n+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let t=e.rows[i];r="";for(let e=0;e<t.length;e++)r+=this.tablecell(t[e]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${RFe(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=UFe(e);if(null===i)return n;let o='<a href="'+(e=i)+'"';return t&&(o+=' title="'+RFe(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=UFe(e);if(null===i)return RFe(r);let o=`<img src="${e=i}" alt="${r}"`;return t&&(o+=` title="${RFe(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:RFe(e.text)}},BFe=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},PFe=class e{constructor(e){s(this,"options"),s(this,"renderer"),s(this,"textRenderer"),this.options=e||RUe,this.options.renderer=this.options.renderer||new KFe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new BFe}static parse(t,r){return new e(r).parse(t)}static parseInline(t,r){return new e(r).parseInline(t)}parse(e,t=!0){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=a,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(e.type)){i+=t||"";continue}}let s=a;switch(s.type){case"space":i+=this.renderer.space(s);continue;case"hr":i+=this.renderer.hr(s);continue;case"heading":i+=this.renderer.heading(s);continue;case"code":i+=this.renderer.code(s);continue;case"table":i+=this.renderer.table(s);continue;case"blockquote":i+=this.renderer.blockquote(s);continue;case"list":i+=this.renderer.list(s);continue;case"html":i+=this.renderer.html(s);continue;case"def":i+=this.renderer.def(s);continue;case"paragraph":i+=this.renderer.paragraph(s);continue;case"text":{let r=s,n=this.renderer.text(r);for(;o+1<e.length&&"text"===e[o+1].type;)r=e[++o],n+="\n"+this.renderer.text(r);i+=t?this.renderer.paragraph({type:"paragraph",raw:n,text:n,tokens:[{type:"text",raw:n,text:n,escaped:!0}]}):n;continue}default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return"";throw new Error(e)}}}return i}parseInline(e,t=this.renderer){var r,n;let i="";for(let o=0;o<e.length;o++){let a=e[o];if(null==(n=null==(r=this.options.extensions)?void 0:r.renderers)?void 0:n[a.type]){let e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=e||"";continue}}let s=a;switch(s.type){case"escape":case"text":i+=t.text(s);break;case"html":i+=t.html(s);break;case"link":i+=t.link(s);break;case"image":i+=t.image(s);break;case"strong":i+=t.strong(s);break;case"em":i+=t.em(s);break;case"codespan":i+=t.codespan(s);break;case"br":i+=t.br(s);break;case"del":i+=t.del(s);break;default:{let e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return"";throw new Error(e)}}}return i}},IFe=(o=class{constructor(e){s(this,"options"),s(this,"block"),this.options=e||RUe}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?DFe.lex:DFe.lexInline}provideParser(){return this.block?PFe.parse:PFe.parseInline}},s(o,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),s(o,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),o),LFe=new class{constructor(...e){s(this,"defaults",{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}),s(this,"options",this.setOptions),s(this,"parse",this.parseMarkdown(!0)),s(this,"parseInline",this.parseMarkdown(!1)),s(this,"Parser",PFe),s(this,"Renderer",KFe),s(this,"TextRenderer",BFe),s(this,"Lexer",DFe),s(this,"Tokenizer",WFe),s(this,"Hooks",IFe),this.use(...e)}walkTokens(e,t){var r,n;let i=[];for(let o of e)switch(i=i.concat(t.call(this,o)),o.type){case"table":{let e=o;for(let r of e.header)i=i.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{let e=o;i=i.concat(this.walkTokens(e.items,t));break}default:{let e=o;(null==(n=null==(r=this.defaults.extensions)?void 0:r.childTokens)?void 0:n[e.type])?this.defaults.extensions.childTokens[e.type].forEach(r=>{let n=e[r].flat(1/0);i=i.concat(this.walkTokens(n,t))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let r={...e};if(r.async=this.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){let r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=r.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");let r=t[e.level];r?r.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),r.extensions=t),e.renderer){let t=this.defaults.renderer||new KFe(this.defaults);for(let r in e.renderer){if(!(r in t))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let n=r,i=e.renderer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r||""}}r.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new WFe(this.defaults);for(let r in e.tokenizer){if(!(r in t))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let n=r,i=e.tokenizer[n],o=t[n];t[n]=(...e)=>{let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new IFe;for(let r in e.hooks){if(!(r in t))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let n=r,i=e.hooks[n],o=t[n];IFe.passThroughHooks.has(r)?t[n]=e=>{if(this.defaults.async&&IFe.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await i.call(t,e);return o.call(t,r)})();let n=i.call(t,e);return o.call(t,n)}:t[n]=(...e)=>{if(this.defaults.async)return(async()=>{let r=await i.apply(t,e);return!1===r&&(r=await o.apply(t,e)),r})();let r=i.apply(t,e);return!1===r&&(r=o.apply(t,e)),r}}r.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,n=e.walkTokens;r.walkTokens=function(e){let r=[];return r.push(n.call(this,e)),t&&(r=r.concat(t.call(this,e))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return DFe.lex(e,t??this.defaults)}parser(e,t){return PFe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},o=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===n.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let r=i.hooks?await i.hooks.preprocess(t):t,n=await(i.hooks?await i.hooks.provideLexer():e?DFe.lex:DFe.lexInline)(r,i),o=i.hooks?await i.hooks.processAllTokens(n):n;i.walkTokens&&await Promise.all(this.walkTokens(o,i.walkTokens));let a=await(i.hooks?await i.hooks.provideParser():e?PFe.parse:PFe.parseInline)(o,i);return i.hooks?await i.hooks.postprocess(a):a})().catch(o);try{i.hooks&&(t=i.hooks.preprocess(t));let r=(i.hooks?i.hooks.provideLexer():e?DFe.lex:DFe.lexInline)(t,i);i.hooks&&(r=i.hooks.processAllTokens(r)),i.walkTokens&&this.walkTokens(r,i.walkTokens);let n=(i.hooks?i.hooks.provideParser():e?PFe.parse:PFe.parseInline)(r,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(a){return o(a)}}}onError(e,t){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",e){let e="<p>An error occurred:</p><pre>"+RFe(r.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(r);throw r}}};function jFe(e,t){return LFe.parse(e,t)}jFe.options=jFe.setOptions=function(e){return LFe.setOptions(e),jFe.defaults=LFe.defaults,UUe(jFe.defaults),jFe},jFe.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},jFe.defaults=RUe,jFe.use=function(...e){return LFe.use(...e),jFe.defaults=LFe.defaults,UUe(jFe.defaults),jFe},jFe.walkTokens=function(e,t){return LFe.walkTokens(e,t)},jFe.parseInline=LFe.parseInline,jFe.Parser=PFe,jFe.parser=PFe.parse,jFe.Renderer=KFe,jFe.TextRenderer=BFe,jFe.Lexer=DFe,jFe.lexer=DFe.lex,jFe.Tokenizer=WFe,jFe.Hooks=IFe,jFe.parse=jFe,jFe.options,jFe.setOptions,jFe.use,jFe.walkTokens,jFe.parseInline,PFe.parse,DFe.lex;const MFe=t.forwardRef((e,n)=>{const{envStatus:i,podName:o,runnerBaseUrl:a}=t.useContext(q$e),{data:s,hasTitle:l=!0,toScore:u,errorHanle:c,codeChange:d}=e,p=t.useRef(null),[f,h]=t.useState(!0),[m,g]=t.useState(!1),q=Xh(e=>{null==d||d(e.code)}),V=t.useRef(null);return t.useEffect(()=>(g(!1),h(!0),V.current&&clearTimeout(V.current),V.current=setTimeout(()=>{g(!0)},1e3),()=>{V.current&&clearTimeout(V.current)}),[s]),t.useImperativeHandle(n,()=>({toInstallPackage:e=>{var t,r;(null==(t=p.current)?void 0:t.contentWindow)&&wUe.send(null==(r=p.current)?void 0:r.contentWindow,"vgenPackages",{packages:e})}})),b.jsx(r.Spin,{spinning:f,classNames:{root:"codePlayerSpin"},children:b.jsx("div",{className:"codePlayer",children:b.jsx("div",{className:"codePlayerContent",style:{height:l?"":"100%"},children:m&&b.jsx("iframe",{ref:p,allowFullScreen:!0,allow:"clipboard-write;clipboard-read",src:`${a||"https://run.cloudlab.top"}/embedded?fromVgen=true`,style:{border:"none"},title:"CodeRunner",className:"CodeRunner-iframe",onLoad:async()=>{var e,t,n,a;try{h(!1);const d=null==(e=p.current)?void 0:e.contentWindow,{topic:f="",content:m="",lang:g="",code:V="",cases:v=[],css:b="",js:y=""}=s;let S=m;try{S=jFe.parse(m)}catch(l){}let A=[];if("html"===g)if(b||y)A=[V,b||"",y||""];else try{const e=JSON.parse(V);A=[e.html,e.css,e.js]}catch(l){}"html"!==g||A.length||(A=[V,"",""]);let w={...s};const x={title:f,content:S,lang:g,code:"html"===g?A:V,aiEnabled:!1,run:!1,cases:v,customButtons:u?[{name:"提交",value:"submit",style:{background:"#0064ff",color:"#ffffff"}}]:[]};i&&o&&(x.podName=o,x.nameSpace="pty-prod"),wUe.send(d,"send",x),u&&wUe.on("submit",{window:d},async function(e){var t,n;(null==(t=e.data)?void 0:t.code)?(r.message.success("提交成功,AI开始自动评分..."),u(null==(n=e.data)?void 0:n.code)):r.message.warning("请先作答!")}),wUe.on("change",{window:null==(t=p.current)?void 0:t.contentWindow},async function(e){var t,r,n,i,o;if("html"===g)try{const i={html:(null==(t=e.data)?void 0:t[0])??"",css:(null==(r=e.data)?void 0:r[1])??"",js:(null==(n=e.data)?void 0:n[2])??""};w.code=JSON.stringify(i)}catch(l){w.code=(null==(i=e.data)?void 0:i[0])??""}else w.code=(null==(o=e.data)?void 0:o[0])??"";q(w)}),wUe.on("errorHandle",{window:null==(n=p.current)?void 0:n.contentWindow},async function(e){var t,r,n;null==c||c({lang:null==(t=e.data)?void 0:t.lang,code:null==(r=e.data)?void 0:r.code,error:null==(n=e.data)?void 0:n.error})}),wUe.on("getToken",{window:null==(a=p.current)?void 0:a.contentWindow},async e=>({token:localStorage.getItem("token")}))}catch(l){}}})})})})}),XFe=e=>{const{data:n,hasTitle:i=!0,toScore:o,codeChange:a}=e,{quizBaseUrl:s}=t.useContext(q$e),l=t.useRef(null),[u,c]=t.useState(!0),[d,p]=t.useState(!1),f=Xh(e=>{null==a||a(e.code)}),h=t.useRef(null);return t.useEffect(()=>(p(!1),c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{p(!0)},1e3),()=>{h.current&&clearTimeout(h.current)}),[n]),b.jsx(r.Spin,{spinning:u,classNames:{root:"codeQuizSpin"},children:b.jsxs("div",{className:"codeQuiz",children:[i&&b.jsx("div",{className:"codeQuizTitle",children:"CodeQuiz"}),b.jsx("div",{className:"codeQuizContent",style:{height:i?"":"100%"},children:d&&b.jsx("iframe",{ref:l,allowFullScreen:!0,allow:"clipboard-write;clipboard-read",src:`${s||"https://quiz.cloudlab.top"}`,style:{border:"none"},title:"CodeQuiz",className:"codeQuiz-iframe",onLoad:async()=>{var e,t,i;try{c(!1);const s=null==(e=l.current)?void 0:e.contentWindow,{topic:u="",content:d="",lang:p="",code:h="",cases:m=[]}=n;let g=m;g=m.map(e=>"string"==typeof e.input?{...e,input:Mh(e.input)||[]}:{...e});let q=d;try{q=jFe.parse(d)}catch(a){}let V={...n};wUe.send(s,"send",{title:u,content:q,lang:p,code:h,cases:g,aiEnabled:!1,run:!1,customButtons:o?[{name:"判分",value:"submit",style:{background:"#0064ff",color:"#ffffff"}}]:[]}),o&&wUe.on("submit",{window:s},async function(e){var t,n;(null==(t=e.data)?void 0:t.code)?(r.message.success("提交成功,AI开始自动评分..."),o(null==(n=e.data)?void 0:n.code)):r.message.warning("请先作答!")}),wUe.on("change",{window:null==(t=l.current)?void 0:t.contentWindow},async function(e){var t,r,n,i;if("html"===p)try{const i={html:(null==(t=e.data)?void 0:t[0])??"",css:(null==(r=e.data)?void 0:r[1])??"",js:(null==(n=e.data)?void 0:n[2])??""};V.code=JSON.stringify(i)}catch(a){V.code=(null==(i=e.data)?void 0:i[0])??""}else V.code=e.data??"";f(V)}),wUe.on("getToken",{window:null==(i=l.current)?void 0:i.contentWindow},async e=>({token:localStorage.getItem("token")}))}catch(a){}}})})]})})};var zFe={exports:{}};
|
|
187
187
|
/*!
|
|
188
188
|
Copyright (c) 2018 Jed Watson.
|
|
189
189
|
Licensed under the MIT License (MIT), see
|