@aussieljk/forkbook 0.0.1-11 → 0.0.1-13
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/README.md +1 -1
- package/assets/create/rendererAssets/common/button.css +6 -6
- package/assets/create/rendererAssets/common/header.css +5 -5
- package/assets/create/rendererAssets/common/page.css +10 -10
- package/dist/_browser-chunks/{Color-QLZNXLSV.js → Color-2EUQ6NXV.js} +2 -2
- package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
- package/dist/_browser-chunks/{WithTooltip-GNLRTZDF.js → WithTooltip-QCFTNB6P.js} +5 -4
- package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
- package/dist/_browser-chunks/{chunk-6ELMKWKX.js → chunk-2WZWS7GJ.js} +1 -1
- package/dist/_browser-chunks/{chunk-FRAOQJDI.js → chunk-3QPZOXB7.js} +1 -5
- package/dist/_browser-chunks/{chunk-GRO2ZYEJ.js → chunk-4BOJAE7P.js} +12 -8
- package/dist/_browser-chunks/{chunk-ZHKZKFY4.js → chunk-6SL45YM3.js} +9 -13
- package/dist/_browser-chunks/{chunk-DS2WQZGO.js → chunk-BLCZ3C5M.js} +41 -62
- package/dist/_browser-chunks/{chunk-7DQREF4S.js → chunk-DHTLVXAL.js} +37 -44
- package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-DISGPOF4.js} +54 -51
- package/dist/_browser-chunks/{chunk-76222HQR.js → chunk-E6QKKKLO.js} +20 -5
- package/dist/_browser-chunks/{chunk-DYNTDJ3O.js → chunk-EBSOKHFG.js} +8 -2
- package/dist/_browser-chunks/{chunk-3M5T7BW4.js → chunk-ECMVTOVD.js} +1 -1
- package/dist/_browser-chunks/{chunk-EQKMUQF3.js → chunk-ENHFQXYS.js} +5 -4
- package/dist/_browser-chunks/{chunk-KYSD26D6.js → chunk-EW2M3URL.js} +90 -83
- package/dist/_browser-chunks/{chunk-I4ATZPNZ.js → chunk-FCULT3AE.js} +3 -3
- package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
- package/dist/_browser-chunks/{chunk-NGMQJMCY.js → chunk-HZFHNYRC.js} +1 -1
- package/dist/_browser-chunks/{chunk-5H4KFI44.js → chunk-KQJ4T6JL.js} +30 -24
- package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-NK5SGJNG.js} +22 -17
- package/dist/_browser-chunks/{chunk-N3NRW5XX.js → chunk-PQRPDA4U.js} +3 -3
- package/dist/_browser-chunks/{chunk-2JDQ35OA.js → chunk-PU7D2WDP.js} +0 -11
- package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-QFO2B4X2.js} +31 -28
- package/dist/_browser-chunks/{chunk-TTBPZQ24.js → chunk-S7N7Z5TY.js} +47 -43
- package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
- package/dist/_browser-chunks/{chunk-WBLVFDJT.js → chunk-UH3XTEOQ.js} +716 -658
- package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
- package/dist/_browser-chunks/{chunk-O24AZJZ7.js → chunk-YJO5BK52.js} +7 -3
- package/dist/_browser-chunks/{chunk-3HM3VWJS.js → chunk-ZF37BMDS.js} +6 -2
- package/dist/_browser-chunks/{chunk-QU4RB2WU.js → chunk-ZF5SPY56.js} +4 -4
- package/dist/_browser-chunks/{matchers-YLBYSYAF.js → matchers-2HVLNCVO.js} +4 -4
- package/dist/_browser-chunks/{react-dom-client-4OHE3QDV.js → react-dom-client-SLBUX3U3.js} +1 -1
- package/dist/_node-chunks/{attached-runtime-J2AKT5WI.js → attached-runtime-7IRDQUTZ.js} +28 -29
- package/dist/_node-chunks/{builder-manager-Z4RWF4ZH.js → builder-manager-YTALSWKQ.js} +39 -28
- package/dist/_node-chunks/{chunk-2WVLC5M2.js → chunk-26ERGIQH.js} +6 -6
- package/dist/_node-chunks/{chunk-VZG3OKFO.js → chunk-33T4HNF2.js} +6 -6
- package/dist/_node-chunks/{chunk-ZEYODVQT.js → chunk-3F3673RQ.js} +7 -7
- package/dist/_node-chunks/{chunk-Y4W4B3E7.js → chunk-3FLRYZLJ.js} +6 -6
- package/dist/_node-chunks/{chunk-AVL7GUOZ.js → chunk-3L2QRDKH.js} +522 -1045
- package/dist/_node-chunks/{chunk-XO54HM4P.js → chunk-3NH7IHUS.js} +6 -6
- package/dist/_node-chunks/{chunk-GMKLTDKN.js → chunk-3ZAENV5A.js} +6 -6
- package/dist/_node-chunks/{chunk-3IIQSDCO.js → chunk-4B52HLKK.js} +53 -55
- package/dist/_node-chunks/chunk-4CZJ4SFH.js +281 -0
- package/dist/_node-chunks/{chunk-BBU2FUPC.js → chunk-4IIWFG7O.js} +13 -11
- package/dist/_node-chunks/{chunk-2U5J7YTA.js → chunk-4YWZLOAF.js} +6 -6
- package/dist/_node-chunks/{chunk-XVOIYGTJ.js → chunk-5A5XOSRM.js} +6 -6
- package/dist/_node-chunks/chunk-5T6Q7HT3.js +11 -0
- package/dist/_node-chunks/{chunk-MI7WBXWX.js → chunk-6DRDJF2Q.js} +6 -6
- package/dist/_node-chunks/{chunk-WBCKO5LP.js → chunk-6JSZY5TJ.js} +6 -6
- package/dist/_node-chunks/{chunk-3EBGFRAH.js → chunk-7SPDKMDQ.js} +32 -40
- package/dist/_node-chunks/{chunk-IRPQQARO.js → chunk-7YLKDHLZ.js} +7 -7
- package/dist/_node-chunks/{chunk-BSQB5B57.js → chunk-7YQIVUEK.js} +6 -6
- package/dist/_node-chunks/{chunk-PYVGF5F2.js → chunk-ADCQYK3Z.js} +6 -6
- package/dist/_node-chunks/{chunk-7YQTID2W.js → chunk-ALHQVE5R.js} +6 -6
- package/dist/_node-chunks/{chunk-MW4OAPPD.js → chunk-B4XAZ2OC.js} +8 -8
- package/dist/_node-chunks/{chunk-GGCOG7OV.js → chunk-BFQJF3ID.js} +283 -306
- package/dist/_node-chunks/{chunk-5GOXN5M4.js → chunk-BSXI35KM.js} +7 -7
- package/dist/_node-chunks/{chunk-TAMTPVYZ.js → chunk-BZQF5KUE.js} +7 -7
- package/dist/_node-chunks/{chunk-5JLVSH44.js → chunk-CEIESR4U.js} +8 -8
- package/dist/_node-chunks/{chunk-OJWUUSA4.js → chunk-CESXIP3N.js} +6 -6
- package/dist/_node-chunks/{chunk-CEYSYQLV.js → chunk-DAEUTT3I.js} +6 -6
- package/dist/_node-chunks/{chunk-FB2BOL6I.js → chunk-DIC4T2UO.js} +6 -6
- package/dist/_node-chunks/{chunk-LKITAODU.js → chunk-DPOWAA4P.js} +37 -31
- package/dist/_node-chunks/{chunk-W3KFVTWV.js → chunk-DTNEHO4J.js} +10 -10
- package/dist/_node-chunks/{chunk-C5OFHB3N.js → chunk-DY7F7B6V.js} +7 -7
- package/dist/_node-chunks/{chunk-FUG5LYKS.js → chunk-E56UKDJR.js} +8 -8
- package/dist/_node-chunks/{chunk-A7GEBS3Q.js → chunk-EFX2VA4Q.js} +6 -6
- package/dist/_node-chunks/{chunk-PQTEFQIJ.js → chunk-EM6AYELK.js} +10 -12
- package/dist/_node-chunks/{chunk-32FLWHUC.js → chunk-F2AFT3P7.js} +497 -475
- package/dist/_node-chunks/{chunk-OXT6T4AS.js → chunk-GC7NA2Y7.js} +7 -7
- package/dist/_node-chunks/{chunk-55S3GGGC.js → chunk-GIKCT5KG.js} +7 -7
- package/dist/_node-chunks/{chunk-PXOD36TR.js → chunk-GLNHSUKT.js} +20 -20
- package/dist/_node-chunks/{chunk-BKND5XP2.js → chunk-GQZZQB4K.js} +7 -7
- package/dist/_node-chunks/{chunk-GTXZNA2L.js → chunk-GRN6WQC3.js} +10 -10
- package/dist/_node-chunks/{chunk-6UASHVMR.js → chunk-HCMHVV7N.js} +8 -8
- package/dist/_node-chunks/{chunk-IVAOJWPF.js → chunk-HJVZQS65.js} +7 -7
- package/dist/_node-chunks/{chunk-ER3X3AQ7.js → chunk-I26RGEVQ.js} +7 -7
- package/dist/_node-chunks/{chunk-LAIED5XU.js → chunk-I36FPWMO.js} +6 -6
- package/dist/_node-chunks/{chunk-W7HY3ELZ.js → chunk-IDPQ3CVN.js} +474 -479
- package/dist/_node-chunks/{chunk-36LPBTLF.js → chunk-JUVUVVHI.js} +6 -6
- package/dist/_node-chunks/{chunk-DGWKJQ6G.js → chunk-K6TEIAKH.js} +62 -7
- package/dist/_node-chunks/{chunk-7IOSIYW2.js → chunk-KEXQ3BON.js} +7 -7
- package/dist/_node-chunks/{chunk-NLNAIU4I.js → chunk-KUZSE7ZD.js} +9 -9
- package/dist/_node-chunks/chunk-LJ5JRR5Q.js +18 -0
- package/dist/_node-chunks/{chunk-YBG7HVP7.js → chunk-LMGI47HP.js} +8 -8
- package/dist/_node-chunks/{chunk-6E34W4UX.js → chunk-LPIPPSMS.js} +6 -6
- package/dist/_node-chunks/{chunk-XICRXTTE.js → chunk-LR4W5G37.js} +6 -6
- package/dist/_node-chunks/{chunk-VKRGTLQJ.js → chunk-M4MRBEJI.js} +27 -23
- package/dist/_node-chunks/{chunk-REIDJUVJ.js → chunk-M7BVABR2.js} +20 -16
- package/dist/_node-chunks/{chunk-XCJ2ZIQ4.js → chunk-MK2RPLWT.js} +7 -7
- package/dist/_node-chunks/{chunk-LHNHFYK3.js → chunk-MKSEM5C2.js} +6 -6
- package/dist/_node-chunks/{chunk-RNRGXAFV.js → chunk-MWQIBOUB.js} +6 -6
- package/dist/_node-chunks/{chunk-NFDQT7UW.js → chunk-NAXIA2JI.js} +320 -316
- package/dist/_node-chunks/{chunk-GYFR2JLS.js → chunk-NDVIMCIX.js} +7 -7
- package/dist/_node-chunks/{chunk-D5ADPGA4.js → chunk-NIOVXWQZ.js} +6 -6
- package/dist/_node-chunks/{chunk-54EHKXV7.js → chunk-NRP4FGRT.js} +15 -9
- package/dist/_node-chunks/{chunk-NIQSBBT2.js → chunk-NSNBFXVB.js} +7 -7
- package/dist/_node-chunks/{chunk-Z2ZTDQDY.js → chunk-NTUTJAD4.js} +8 -8
- package/dist/_node-chunks/{chunk-XH5CXH53.js → chunk-O46DZ2KC.js} +8 -8
- package/dist/_node-chunks/{chunk-S3NDLFYL.js → chunk-OH5M2YER.js} +7 -7
- package/dist/_node-chunks/{chunk-FTYDKQCO.js → chunk-OSIENBU6.js} +6 -6
- package/dist/_node-chunks/{chunk-76KKKLEE.js → chunk-OVJZBW54.js} +7 -7
- package/dist/_node-chunks/{chunk-WO4UEQI6.js → chunk-PGIDRLZ5.js} +22 -22
- package/dist/_node-chunks/{chunk-J3SM62J3.js → chunk-PJCSZR4T.js} +8 -8
- package/dist/_node-chunks/{chunk-OPT5A55S.js → chunk-PQXP5FZ2.js} +8 -8
- package/dist/_node-chunks/{chunk-5P4N734V.js → chunk-PU33WSBW.js} +34 -52
- package/dist/_node-chunks/{chunk-APPFF22V.js → chunk-PUBZLLNL.js} +7 -7
- package/dist/_node-chunks/{chunk-ALGQMFMN.js → chunk-QWZZX2HN.js} +6 -6
- package/dist/_node-chunks/{chunk-NLLM4MDK.js → chunk-RMUBUNBY.js} +6 -6
- package/dist/_node-chunks/{chunk-SJXLINHV.js → chunk-S33FEPQ3.js} +6 -6
- package/dist/_node-chunks/{chunk-FEC5PGJO.js → chunk-SHP6447T.js} +7 -7
- package/dist/_node-chunks/{chunk-MBIVTOJK.js → chunk-ST3KB36E.js} +6 -6
- package/dist/_node-chunks/{chunk-AKMPPLT5.js → chunk-SXX75O2D.js} +7 -7
- package/dist/_node-chunks/{chunk-6UAJLEIO.js → chunk-TQ5YAQ4Y.js} +6 -6
- package/dist/_node-chunks/{chunk-R7VDUSKY.js → chunk-TSJ3JCNN.js} +16 -10
- package/dist/_node-chunks/{chunk-TKMXEHM4.js → chunk-UYEX6LW6.js} +7 -7
- package/dist/_node-chunks/{chunk-46Y5H6X5.js → chunk-VJLLEKWR.js} +138 -116
- package/dist/_node-chunks/{chunk-IFAV3CER.js → chunk-WWJKLYU5.js} +10 -10
- package/dist/_node-chunks/{chunk-MXLHIEXC.js → chunk-XC7K4QEX.js} +6 -6
- package/dist/_node-chunks/{chunk-GO3YSBPE.js → chunk-Y64FM6U7.js} +8 -8
- package/dist/_node-chunks/{chunk-T6P2EJD2.js → chunk-YDM7NH4T.js} +6 -6
- package/dist/_node-chunks/{chunk-XSVOMORJ.js → chunk-ZHVOUP6D.js} +6 -6
- package/dist/_node-chunks/dist-CFCU4PZG.js +27 -0
- package/dist/_node-chunks/dist-PFMT5YJK.js +16 -0
- package/dist/_node-chunks/{local-runtime-YDAW5RJV.js → local-runtime-BKID5MBG.js} +19 -20
- package/dist/_node-chunks/{mdx-plugin-XLDET5LV.js → mdx-plugin-7BOUDCZB.js} +13 -13
- package/dist/_node-chunks/{monorepo-NWMAHGOM.js → monorepo-FRHSAJB7.js} +11 -11
- package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-4B6IZ7JD.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-7BHSAJP4.js} +11 -11
- package/dist/_node-chunks/optimized-tests-F5LCOTXH.js +22 -0
- package/dist/_node-chunks/{pattern-copy-play-PJC4PO6A.js → pattern-copy-play-6TGV6WS4.js} +9 -9
- package/dist/_node-chunks/postinstallAddon-4RININ5C.js +20 -0
- package/dist/_node-chunks/{rehype-external-links-4CWXZ35U.js → rehype-external-links-EE2HT4QP.js} +9 -9
- package/dist/_node-chunks/{rehype-slug-QZ2PWSJH.js → rehype-slug-ZKRW2V6Z.js} +9 -9
- package/dist/_node-chunks/{relaxed-limits-ZQR4ER7L.js → relaxed-limits-6Q7VRQC5.js} +11 -11
- package/dist/_node-chunks/{run-U63AXEKZ.js → run-6Y3ZTASZ.js} +23 -21
- package/dist/_node-chunks/{run-BMXB2BW2.js → run-EBHIAT35.js} +18 -18
- package/dist/_node-chunks/{setup-NCUTUBNN.js → setup-6XIF77JT.js} +8 -8
- package/dist/_node-chunks/{vitest.config.4.template-4XHF7XPS.js → vitest.config.4.template-GMQNQ4UW.js} +7 -7
- package/dist/actions/decorator.js +16 -21
- package/dist/actions/index.d.ts +3 -3
- package/dist/actions/index.js +1 -1
- package/dist/addon-a11y/index.js +2 -2
- package/dist/addon-a11y/manager.js +11 -11
- package/dist/addon-a11y/preset.js +7 -7
- package/dist/addon-a11y/preview.d.ts +8 -2
- package/dist/addon-a11y/preview.js +2 -2
- package/dist/addon-docs/blocks.d.ts +104 -85
- package/dist/addon-docs/blocks.js +30 -32
- package/dist/addon-docs/index.d.ts +2 -2
- package/dist/addon-docs/index.js +3 -3
- package/dist/addon-docs/manager.js +4 -4
- package/dist/addon-docs/preset.js +12 -12
- package/dist/addon-docs/preview.d.ts +3 -1
- package/dist/addon-docs/preview.js +1 -1
- package/dist/addon-links/index.d.ts +2 -1
- package/dist/addon-links/preview.d.ts +1 -1
- package/dist/addon-mcp/preset.js +11 -11
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +16 -16
- package/dist/addon-ondevice-controls/index.js +1 -1
- package/dist/addon-ondevice-controls/register.js +1 -1
- package/dist/addon-pseudo-states/index.js +1 -1
- package/dist/addon-pseudo-states/preview.d.ts +1 -1
- package/dist/addon-pseudo-states/preview.js +1 -1
- package/dist/addon-themes/index.d.ts +6 -5
- package/dist/addon-themes/postinstall.js +7 -7
- package/dist/addon-vitest/constants.js +8 -8
- package/dist/addon-vitest/manager.js +18 -9
- package/dist/addon-vitest/node/coverage-reporter.js +11 -11
- package/dist/addon-vitest/node/vitest.js +34 -34
- package/dist/addon-vitest/postinstall.js +10 -10
- package/dist/addon-vitest/preset.js +21 -20
- package/dist/addon-vitest/vitest-plugin/global-setup.js +22 -22
- package/dist/addon-vitest/vitest-plugin/index.js +69 -59
- package/dist/babel/index.d.ts +209 -212
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +110 -89
- package/dist/bin/dispatcher.js +10 -10
- package/dist/bin/loader.js +8 -8
- package/dist/builder-vite/index.d.ts +1 -1
- package/dist/builder-vite/index.js +18 -18
- package/dist/builder-vite/preset.js +13 -13
- package/dist/channels/index.d.ts +1 -1
- package/dist/channels/index.js +2 -2
- package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
- package/dist/{chunk-Fg1Fm__9.d.ts → chunk-BCG2ui5q.d.ts} +671 -674
- package/dist/{chunk-DoIGKY33.d.ts → chunk-BLZXEm1K.d.ts} +6 -8
- package/dist/{chunk-CYuvV2sR.d.ts → chunk-BNRZY6Jq.d.ts} +3 -3
- package/dist/{chunk-CNqjcOmK.d.ts → chunk-BV_hETtB.d.ts} +2 -2
- package/dist/chunk-BcYKnZln.d.ts +10 -0
- package/dist/{chunk-BCoJQE-f.d.ts → chunk-BtKww7r1.d.ts} +6 -4
- package/dist/{chunk-Bpi2tz-6.d.ts → chunk-Bubi-WAs.d.ts} +20 -17
- package/dist/{chunk-pcFXCimE.d.ts → chunk-CmV7WZzR.d.ts} +124 -2
- package/dist/{chunk-BGkgZp-H.d.ts → chunk-D3uSIa6H.d.ts} +9 -1
- package/dist/{chunk-DROZ9oel.d.ts → chunk-DNCU78oW.d.ts} +110 -9
- package/dist/{chunk-D0NUmzXp.d.ts → chunk-LWwxlbee.d.ts} +4 -4
- package/dist/{chunk-BXLImeLy.d.ts → chunk-u_gGuTrz.d.ts} +23 -8
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +25 -30
- package/dist/cli/skills/content/index.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.d.ts +1 -1
- package/dist/cli/tools/sdk/child-host.js +17 -17
- package/dist/cli/tools/sdk/index.d.ts +3 -3
- package/dist/cli/tools/sdk/index.js +18 -18
- package/dist/cli-commands/bin/index.js +7 -7
- package/dist/client-logger/index.d.ts +20 -21
- package/dist/client-logger/index.js +2 -1
- package/dist/common/index.d.ts +13 -13
- package/dist/common/index.js +34 -35
- package/dist/components/index.d.ts +46 -35
- package/dist/components/index.js +194 -205
- package/dist/core-events/index.d.ts +2 -2
- package/dist/core-server/index.d.ts +15 -10
- package/dist/core-server/index.js +706 -165
- package/dist/core-server/presets/common-manager.js +254 -336
- package/dist/core-server/presets/common-override-preset.js +10 -10
- package/dist/core-server/presets/common-preset.js +83 -275
- package/dist/create/bin/index.js +7 -7
- package/dist/create/index.js +15 -15
- package/dist/csf/csf-utils.d.ts +1 -1
- package/dist/csf/index.d.ts +3 -3
- package/dist/csf/index.js +40 -43
- package/dist/csf-tools/index.d.ts +52 -44
- package/dist/csf-tools/index.js +13 -13
- package/dist/docs-tools/index.d.ts +332 -16
- package/dist/docs-tools/index.js +3 -3
- package/dist/instrumenter/index.d.ts +5 -5
- package/dist/instrumenter/index.js +25 -15
- package/dist/manager/_manager-chunks/{globals-runtime-DvV_TF3-.js → globals-runtime-B4NRbNSS.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-wjkxyMn0.js → globals-runtime-BC43T1rL.js} +4150 -50
- package/dist/manager/_manager-chunks/{globals-runtime-BSj0mCjE.js → globals-runtime-BgWmCsA7.js} +114 -110
- package/dist/manager/_manager-chunks/{globals-runtime-CA8AuIRT.js → globals-runtime-BnQ7i5wq.js} +232 -228
- package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
- package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
- package/dist/manager/_manager-chunks/{globals-runtime-C5gK7HhH.js → globals-runtime-C59T0h-j.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-CCTA-XPa.js → globals-runtime-CCZrdft6.js} +5 -4
- package/dist/manager/_manager-chunks/{globals-runtime-BY3epqww.js → globals-runtime-CS41oTca.js} +2 -1
- package/dist/manager/_manager-chunks/{globals-runtime-Bu9eGDTe.js → globals-runtime-Cccwtspx.js} +288 -420
- package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
- package/dist/manager/_manager-chunks/{globals-runtime-BweHuXkK.js → globals-runtime-DCmvKMN5.js} +2 -2
- package/dist/manager/_manager-chunks/{globals-runtime-C92M_Vnq.js → globals-runtime-Ddp2jFET.js} +5 -5
- package/dist/manager/_manager-chunks/globals-runtime-DgO0hT2p.js +32 -0
- package/dist/manager/_manager-chunks/globals-runtime-Me9Bl-sx.js +156 -0
- package/dist/manager/_manager-chunks/{globals-runtime-CHjExYMv.js → globals-runtime-UFDJQlo-.js} +741 -540
- package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
- package/dist/manager/_manager-chunks/{globals-runtime-Bj5KDUJi.js → globals-runtime-oRjPg2jY.js} +1 -1
- package/dist/manager/_manager-chunks/runtime-4wMiTjjZ.js +552 -0
- package/dist/manager/_manager-chunks/{runtime--hR2NZFd.js → runtime-AvqHE9rM.js} +112 -109
- package/dist/manager/_manager-chunks/{runtime-EPerAEAs.js → runtime-CZtDJIYj.js} +3 -3
- package/dist/manager/_manager-chunks/{runtime-B6NL14pz.js → runtime-D8QxTQiI.js} +6 -6
- package/dist/manager/_manager-chunks/{runtime-BAsOe1C_.js → runtime-DC3oEVlM.js} +49 -49
- package/dist/manager/_manager-chunks/{runtime-CJQZFUUj.js → runtime-DCOIOn4T.js} +46 -56
- package/dist/manager/_manager-chunks/{runtime-DvB1axgp.js → runtime-D_FDSHFG.js} +13 -13
- package/dist/manager/_manager-chunks/{runtime-Dtbhxq5m.js → runtime-Db8fJ2MP.js} +67 -500
- package/dist/manager/_manager-chunks/{runtime-CgRqs_SK.js → runtime-lPbyY_f5.js} +882 -869
- package/dist/manager/_manager-chunks/{runtime-Dem2xJbS.js → runtime-td6oYfU6.js} +739 -554
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +479 -464
- package/dist/manager-errors.d.ts +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +9 -9
- package/dist/mocking-utils/index.d.ts +5 -3
- package/dist/mocking-utils/index.js +21 -26
- package/dist/nextjs-vite/export-mocks/headers/index.js +3 -1
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +4 -1
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +9 -1
- package/dist/nextjs-vite/export-mocks/router/index.js +13 -7
- package/dist/nextjs-vite/index.d.ts +2 -2
- package/dist/nextjs-vite/index.js +9 -5
- package/dist/nextjs-vite/node/index.js +7 -7
- package/dist/nextjs-vite/preset.js +12 -12
- package/dist/nextjs-vite/preview.d.ts +2 -1
- package/dist/nextjs-vite/preview.js +1 -1
- package/dist/nextjs-vite/vite-plugin/index.d.ts +2 -2
- package/dist/nextjs-vite/vite-plugin/index.js +9 -9
- package/dist/nextjs-vite-plugin/index.js +17 -27
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +10 -6
- package/dist/node-logger/index.d.ts +18 -18
- package/dist/node-logger/index.js +9 -9
- package/dist/oxc-parser/index.js +14 -11
- package/dist/oxc-parser/worker.js +10 -10
- package/dist/preview/_chunks/{runtime-Bcv1hJky.js → runtime-BYRCSYBN.js} +4148 -48
- package/dist/preview/_chunks/{runtime-WapFVPAh.js → runtime-Bvh_rfnQ.js} +2 -37
- package/dist/preview/_chunks/{runtime-BZ4pNS3g.js → runtime-CdZ1yk7m.js} +3 -3
- package/dist/preview/_chunks/{runtime-BhSZ1Mwt.js → runtime-CsO4apr9.js} +38 -42
- package/dist/preview/_chunks/{runtime-BUnOhg9h.js → runtime-D2MPrqbU.js} +2 -2
- package/dist/preview/_chunks/{runtime-BPwAnlRx.js → runtime-DS0s7U3c.js} +1 -1
- package/dist/preview/_chunks/{runtime-BgPhfM5P.js → runtime-U1Ycy25F.js} +736 -428
- package/dist/preview/_chunks/{runtime-BJwGQok8.js → runtime-tyJLgv6h.js} +221 -60
- package/dist/preview/runtime.js +1 -1
- package/dist/preview-api/index.d.ts +3 -3
- package/dist/preview-api/index.js +8 -8
- package/dist/preview-errors.d.ts +1 -1
- package/dist/react/docgen/docgen-worker.js +11 -11
- package/dist/react/entry-preview-argtypes.js +1 -1
- package/dist/react/entry-preview-docs.js +1 -1
- package/dist/react/entry-preview.js +1 -1
- package/dist/react/index.d.ts +5 -7
- package/dist/react/index.js +5 -5
- package/dist/react/preset.js +13 -13
- package/dist/react/preview.js +4 -4
- package/dist/react-native/bin/get-stories.js +8 -8
- package/dist/react-native/index.d.ts +37 -36
- package/dist/react-native/index.js +38 -38
- package/dist/react-native/metro/node.d.ts +1 -1
- package/dist/react-native/metro/node.js +10 -10
- package/dist/react-native/metro/withForkbook.d.ts +7 -7
- package/dist/react-native/metro/withForkbook.js +16 -16
- package/dist/react-native/preview.js +4 -1
- package/dist/react-native/scripts/generate.js +8 -8
- package/dist/react-native/stub.js +1 -1
- package/dist/react-native-ui/index.d.ts +8 -7
- package/dist/react-native-ui/index.js +1 -8
- package/dist/react-native-ui-common/index.d.ts +30 -9
- package/dist/react-native-ui-common/index.js +26 -31
- package/dist/react-vite/node/index.js +7 -7
- package/dist/react-vite/preset.js +7 -7
- package/dist/router/index.d.ts +2 -2
- package/dist/router/index.js +4 -2
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.js +9 -9
- package/dist/shared/open-service/index.d.ts +3 -3
- package/dist/shared/open-service/index.js +1 -1
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
- package/dist/shared/open-service/toolsets/docs/public.d.ts +7 -7
- package/dist/telemetry/index.d.ts +38 -274
- package/dist/telemetry/index.js +11 -66
- package/dist/test/index.d.ts +2 -2
- package/dist/test/index.js +139 -120
- package/dist/theming/create.d.ts +1 -1
- package/dist/theming/index.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +2 -2
- package/package.json +16 -16
- package/template/nextjs-vite/cli/js/Button.jsx +2 -2
- package/template/nextjs-vite/cli/js/Header.jsx +1 -1
- package/template/nextjs-vite/cli/js/Page.jsx +1 -1
- package/template/nextjs-vite/cli/ts/Button.tsx +2 -2
- package/template/nextjs-vite/cli/ts/Header.tsx +1 -1
- package/template/nextjs-vite/cli/ts/Page.tsx +1 -1
- package/template/react/cli/js/Button.jsx +2 -2
- package/template/react/cli/js/Header.jsx +1 -1
- package/template/react/cli/js/Page.jsx +1 -1
- package/template/react/cli/ts/Button.tsx +2 -2
- package/template/react/cli/ts/Header.tsx +1 -1
- package/template/react/cli/ts/Page.tsx +1 -1
- package/template/react-vite/cli/js/Button.jsx +2 -2
- package/template/react-vite/cli/js/Header.jsx +1 -1
- package/template/react-vite/cli/js/Page.jsx +1 -1
- package/template/react-vite/cli/ts/Button.tsx +2 -2
- package/template/react-vite/cli/ts/Header.tsx +1 -1
- package/template/react-vite/cli/ts/Page.tsx +1 -1
- package/dist/_node-chunks/chunk-2YNXKY72.js +0 -40
- package/dist/_node-chunks/chunk-3NST2GUZ.js +0 -33
- package/dist/_node-chunks/chunk-4D325SMT.js +0 -1359
- package/dist/_node-chunks/chunk-APXRPW7A.js +0 -11
- package/dist/_node-chunks/chunk-QHBQRPDP.js +0 -155
- package/dist/_node-chunks/chunk-SMBAR4G6.js +0 -18
- package/dist/_node-chunks/chunk-SRDKK3SG.js +0 -33
- package/dist/_node-chunks/chunk-V5IMPC3J.js +0 -33
- package/dist/_node-chunks/chunk-YIAUHGY2.js +0 -69
- package/dist/_node-chunks/dist-C5QIQD3G.js +0 -27
- package/dist/_node-chunks/dist-NBRPZCHX.js +0 -16
- package/dist/_node-chunks/optimized-tests-EIPJR7HA.js +0 -22
- package/dist/_node-chunks/postinstallAddon-EOAAURMG.js +0 -20
- package/dist/_node-chunks/session-id-HEW5JUNB.js +0 -23
- package/dist/chunk-BGhyFTJO.d.ts +0 -115
- package/dist/chunk-DaVb55-_.d.ts +0 -124
- package/dist/manager/_manager-chunks/globals-runtime-Bs75QQ_I.js +0 -9987
- package/dist/manager/_manager-chunks/globals-runtime-WZKaeKm9.js +0 -4091
- package/dist/manager/_manager-chunks/runtime-5o_11Jae.js +0 -78
- package/dist/preview/_chunks/runtime-BsMjBzuq.js +0 -53
- package/dist/preview/_chunks/runtime-C1jgT6tJ.js +0 -4091
- package/dist/preview/_chunks/runtime-CkOhMcXf.js +0 -387
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as __toESM, n as __esmMin, r as __exportAll, t as __commonJSMin } from "./runtime-BdGkqNEt.js";
|
|
2
|
-
import { F as init_dist$1, H as require_css_escape, I as computeAccessibleName$1, P as require_lz_string, R as computeAccessibleDescription$1, W as require_redent,
|
|
3
|
-
import { i as require_lib, r as require_ansi_regex } from "./runtime-
|
|
2
|
+
import { F as init_dist$1, H as require_css_escape, I as computeAccessibleName$1, P as require_lz_string, R as computeAccessibleDescription$1, W as require_redent, et as require_picocolors_browser } from "./runtime-Bvh_rfnQ.js";
|
|
3
|
+
import { i as require_lib, r as require_ansi_regex } from "./runtime-DS0s7U3c.js";
|
|
4
4
|
//#region ../../node_modules/@adobe/css-tools/dist/esm/adobe-css-tools.mjs
|
|
5
5
|
function o$1(t) {
|
|
6
6
|
return t ? t.trim() : "";
|
|
@@ -939,26 +939,26 @@ function init_getRole() {
|
|
|
939
939
|
}
|
|
940
940
|
//#endregion
|
|
941
941
|
//#region ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs
|
|
942
|
-
function isElement(node) {
|
|
942
|
+
function isElement$2(node) {
|
|
943
943
|
return node !== null && node.nodeType === node.ELEMENT_NODE;
|
|
944
944
|
}
|
|
945
945
|
function isHTMLTableCaptionElement(node) {
|
|
946
|
-
return isElement(node) && getLocalName(node) === "caption";
|
|
946
|
+
return isElement$2(node) && getLocalName(node) === "caption";
|
|
947
947
|
}
|
|
948
948
|
function isHTMLInputElement(node) {
|
|
949
|
-
return isElement(node) && getLocalName(node) === "input";
|
|
949
|
+
return isElement$2(node) && getLocalName(node) === "input";
|
|
950
950
|
}
|
|
951
951
|
function isHTMLOptGroupElement(node) {
|
|
952
|
-
return isElement(node) && getLocalName(node) === "optgroup";
|
|
952
|
+
return isElement$2(node) && getLocalName(node) === "optgroup";
|
|
953
953
|
}
|
|
954
954
|
function isHTMLSelectElement(node) {
|
|
955
|
-
return isElement(node) && getLocalName(node) === "select";
|
|
955
|
+
return isElement$2(node) && getLocalName(node) === "select";
|
|
956
956
|
}
|
|
957
957
|
function isHTMLTableElement(node) {
|
|
958
|
-
return isElement(node) && getLocalName(node) === "table";
|
|
958
|
+
return isElement$2(node) && getLocalName(node) === "table";
|
|
959
959
|
}
|
|
960
960
|
function isHTMLTextAreaElement(node) {
|
|
961
|
-
return isElement(node) && getLocalName(node) === "textarea";
|
|
961
|
+
return isElement$2(node) && getLocalName(node) === "textarea";
|
|
962
962
|
}
|
|
963
963
|
function safeWindow(node) {
|
|
964
964
|
var defaultView = (node.ownerDocument === null ? node : node.ownerDocument).defaultView;
|
|
@@ -966,19 +966,19 @@ function safeWindow(node) {
|
|
|
966
966
|
return defaultView;
|
|
967
967
|
}
|
|
968
968
|
function isHTMLFieldSetElement(node) {
|
|
969
|
-
return isElement(node) && getLocalName(node) === "fieldset";
|
|
969
|
+
return isElement$2(node) && getLocalName(node) === "fieldset";
|
|
970
970
|
}
|
|
971
971
|
function isHTMLLegendElement(node) {
|
|
972
|
-
return isElement(node) && getLocalName(node) === "legend";
|
|
972
|
+
return isElement$2(node) && getLocalName(node) === "legend";
|
|
973
973
|
}
|
|
974
974
|
function isHTMLSlotElement(node) {
|
|
975
|
-
return isElement(node) && getLocalName(node) === "slot";
|
|
975
|
+
return isElement$2(node) && getLocalName(node) === "slot";
|
|
976
976
|
}
|
|
977
977
|
function isSVGElement(node) {
|
|
978
|
-
return isElement(node) && node.ownerSVGElement !== void 0;
|
|
978
|
+
return isElement$2(node) && node.ownerSVGElement !== void 0;
|
|
979
979
|
}
|
|
980
980
|
function isSVGSVGElement(node) {
|
|
981
|
-
return isElement(node) && getLocalName(node) === "svg";
|
|
981
|
+
return isElement$2(node) && getLocalName(node) === "svg";
|
|
982
982
|
}
|
|
983
983
|
function isSVGTitleElement(node) {
|
|
984
984
|
return isSVGElement(node) && getLocalName(node) === "title";
|
|
@@ -990,7 +990,7 @@ function isSVGTitleElement(node) {
|
|
|
990
990
|
* @returns {Element[]} -
|
|
991
991
|
*/
|
|
992
992
|
function queryIdRefs(node, attributeName) {
|
|
993
|
-
if (isElement(node) && node.hasAttribute(attributeName)) {
|
|
993
|
+
if (isElement$2(node) && node.hasAttribute(attributeName)) {
|
|
994
994
|
var ids = node.getAttribute(attributeName).split(" ");
|
|
995
995
|
var root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
|
996
996
|
return ids.map(function(id) {
|
|
@@ -1002,7 +1002,7 @@ function queryIdRefs(node, attributeName) {
|
|
|
1002
1002
|
return [];
|
|
1003
1003
|
}
|
|
1004
1004
|
function hasAnyConcreteRoles(node, roles) {
|
|
1005
|
-
if (isElement(node)) return roles.indexOf(getRole(node)) !== -1;
|
|
1005
|
+
if (isElement$2(node)) return roles.indexOf(getRole(node)) !== -1;
|
|
1006
1006
|
return false;
|
|
1007
1007
|
}
|
|
1008
1008
|
var presentationRoles;
|
|
@@ -1035,7 +1035,7 @@ function asFlatString(s) {
|
|
|
1035
1035
|
* @returns {boolean} -
|
|
1036
1036
|
*/
|
|
1037
1037
|
function isHidden(node, getComputedStyleImplementation) {
|
|
1038
|
-
if (!isElement(node)) return false;
|
|
1038
|
+
if (!isElement$2(node)) return false;
|
|
1039
1039
|
if (node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true") return true;
|
|
1040
1040
|
var style = getComputedStyleImplementation(node);
|
|
1041
1041
|
return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
|
|
@@ -1053,7 +1053,7 @@ function isControl(node) {
|
|
|
1053
1053
|
]) || hasAbstractRole(node, "range");
|
|
1054
1054
|
}
|
|
1055
1055
|
function hasAbstractRole(node, role) {
|
|
1056
|
-
if (!isElement(node)) return false;
|
|
1056
|
+
if (!isElement$2(node)) return false;
|
|
1057
1057
|
switch (role) {
|
|
1058
1058
|
case "range": return hasAnyConcreteRoles(node, [
|
|
1059
1059
|
"meter",
|
|
@@ -1157,7 +1157,7 @@ function findLabelableElement(element) {
|
|
|
1157
1157
|
if (isLabelableElement(element)) return element;
|
|
1158
1158
|
var labelableElement = null;
|
|
1159
1159
|
element.childNodes.forEach(function(childNode) {
|
|
1160
|
-
if (labelableElement === null && isElement(childNode)) {
|
|
1160
|
+
if (labelableElement === null && isElement$2(childNode)) {
|
|
1161
1161
|
var descendantLabelableElement = findLabelableElement(childNode);
|
|
1162
1162
|
if (descendantLabelableElement !== null) labelableElement = descendantLabelableElement;
|
|
1163
1163
|
}
|
|
@@ -1212,7 +1212,7 @@ function computeTextAlternative(root) {
|
|
|
1212
1212
|
var _options$compute = options.compute, compute = _options$compute === void 0 ? "name" : _options$compute, _options$computedStyl = options.computedStyleSupportsPseudoElements, computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== void 0 : _options$computedStyl, _options$getComputedS = options.getComputedStyle, getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS, _options$hidden = options.hidden, hidden = _options$hidden === void 0 ? false : _options$hidden;
|
|
1213
1213
|
function computeMiscTextAlternative(node, context) {
|
|
1214
1214
|
var accumulatedText = "";
|
|
1215
|
-
if (isElement(node) && computedStyleSupportsPseudoElements) {
|
|
1215
|
+
if (isElement$2(node) && computedStyleSupportsPseudoElements) {
|
|
1216
1216
|
var beforeContent = getTextualContent(getComputedStyle(node, "::before"));
|
|
1217
1217
|
accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
|
|
1218
1218
|
}
|
|
@@ -1222,10 +1222,10 @@ function computeTextAlternative(root) {
|
|
|
1222
1222
|
isReferenced: false,
|
|
1223
1223
|
recursion: true
|
|
1224
1224
|
});
|
|
1225
|
-
var separator = (isElement(child) ? getComputedStyle(child).getPropertyValue("display") : "inline") !== "inline" ? " " : "";
|
|
1225
|
+
var separator = (isElement$2(child) ? getComputedStyle(child).getPropertyValue("display") : "inline") !== "inline" ? " " : "";
|
|
1226
1226
|
accumulatedText += "".concat(separator).concat(result).concat(separator);
|
|
1227
1227
|
});
|
|
1228
|
-
if (isElement(node) && computedStyleSupportsPseudoElements) {
|
|
1228
|
+
if (isElement$2(node) && computedStyleSupportsPseudoElements) {
|
|
1229
1229
|
var afterContent = getTextualContent(getComputedStyle(node, "::after"));
|
|
1230
1230
|
accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
|
|
1231
1231
|
}
|
|
@@ -1246,11 +1246,11 @@ function computeTextAlternative(root) {
|
|
|
1246
1246
|
return null;
|
|
1247
1247
|
}
|
|
1248
1248
|
function computeTooltipAttributeValue(node) {
|
|
1249
|
-
if (!isElement(node)) return null;
|
|
1249
|
+
if (!isElement$2(node)) return null;
|
|
1250
1250
|
return useAttribute(node, "title");
|
|
1251
1251
|
}
|
|
1252
1252
|
function computeElementTextAlternative(node) {
|
|
1253
|
-
if (!isElement(node)) return null;
|
|
1253
|
+
if (!isElement$2(node)) return null;
|
|
1254
1254
|
if (isHTMLFieldSetElement(node)) {
|
|
1255
1255
|
consultedNodes.add(node);
|
|
1256
1256
|
var children = arrayFrom(node.childNodes);
|
|
@@ -1329,7 +1329,7 @@ function computeTextAlternative(root) {
|
|
|
1329
1329
|
consultedNodes.add(current);
|
|
1330
1330
|
return "";
|
|
1331
1331
|
}
|
|
1332
|
-
var labelAttributeNode = isElement(current) ? current.getAttributeNode("aria-labelledby") : null;
|
|
1332
|
+
var labelAttributeNode = isElement$2(current) ? current.getAttributeNode("aria-labelledby") : null;
|
|
1333
1333
|
var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs(current, "aria-labelledby") : [];
|
|
1334
1334
|
if (compute === "name" && !context.isReferenced && labelElements.length > 0) {
|
|
1335
1335
|
consultedNodes.add(labelAttributeNode);
|
|
@@ -1343,7 +1343,7 @@ function computeTextAlternative(root) {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
var skipToStep2E = context.recursion && isControl(current) && compute === "name";
|
|
1345
1345
|
if (!skipToStep2E) {
|
|
1346
|
-
var ariaLabel = (isElement(current) && current.getAttribute("aria-label") || "").trim();
|
|
1346
|
+
var ariaLabel = (isElement$2(current) && current.getAttribute("aria-label") || "").trim();
|
|
1347
1347
|
if (ariaLabel !== "" && compute === "name") {
|
|
1348
1348
|
consultedNodes.add(current);
|
|
1349
1349
|
return ariaLabel;
|
|
@@ -1384,7 +1384,7 @@ function computeTextAlternative(root) {
|
|
|
1384
1384
|
return getValueOfTextbox(current);
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
|
|
1387
|
+
if (allowsNameFromContent(current) || isElement$2(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
|
|
1388
1388
|
var accumulatedText2F = computeMiscTextAlternative(current, {
|
|
1389
1389
|
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
|
1390
1390
|
isReferenced: false
|
|
@@ -1596,7 +1596,7 @@ function matches$1(textToMatch, matcher) {
|
|
|
1596
1596
|
function deprecate(name, replacementText) {
|
|
1597
1597
|
console.warn(`Warning: ${name} has been deprecated and will be removed in future updates.`, replacementText);
|
|
1598
1598
|
}
|
|
1599
|
-
function normalize$
|
|
1599
|
+
function normalize$2(text) {
|
|
1600
1600
|
return text.replace(/\s+/g, " ").trim();
|
|
1601
1601
|
}
|
|
1602
1602
|
function getTag(element) {
|
|
@@ -1750,7 +1750,7 @@ function toContainHTML(container, htmlText) {
|
|
|
1750
1750
|
}
|
|
1751
1751
|
function toHaveTextContent(node, checkWith, options = { normalizeWhitespace: true }) {
|
|
1752
1752
|
checkNode(node, toHaveTextContent, this);
|
|
1753
|
-
const textContent = options.normalizeWhitespace ? normalize$
|
|
1753
|
+
const textContent = options.normalizeWhitespace ? normalize$2(node.textContent) : node.textContent.replace(/\u00a0/g, " ");
|
|
1754
1754
|
const checkingWithEmptyString = textContent !== "" && checkWith === "";
|
|
1755
1755
|
return {
|
|
1756
1756
|
pass: !checkingWithEmptyString && matches$1(textContent, checkWith),
|
|
@@ -1793,7 +1793,7 @@ function toHaveAccessibleErrorMessage(htmlElement, expectedAccessibleErrorMessag
|
|
|
1793
1793
|
return getMessage(this, this.utils.matcherHint(method, "element"), "Expected element to be marked as invalid with attribute", `${ariaInvalidName}="${String(true)}"`, "Received", htmlElement.hasAttribute("aria-invalid") ? `${ariaInvalidName}="${htmlElement.getAttribute(ariaInvalidName)}` : null);
|
|
1794
1794
|
}
|
|
1795
1795
|
};
|
|
1796
|
-
const error = normalize$
|
|
1796
|
+
const error = normalize$2(htmlElement.ownerDocument.getElementById(errormessageId)?.textContent ?? "");
|
|
1797
1797
|
return {
|
|
1798
1798
|
pass: expectedAccessibleErrorMessage === void 0 ? Boolean(error) : expectedAccessibleErrorMessage instanceof RegExp ? expectedAccessibleErrorMessage.test(error) : this.equals(error, expectedAccessibleErrorMessage),
|
|
1799
1799
|
message: () => {
|
|
@@ -2338,7 +2338,7 @@ function toHaveDescription(htmlElement, checkWith) {
|
|
|
2338
2338
|
let description = "";
|
|
2339
2339
|
if (descriptionIDs.length > 0) {
|
|
2340
2340
|
const document = htmlElement.ownerDocument;
|
|
2341
|
-
description = normalize$
|
|
2341
|
+
description = normalize$2(descriptionIDs.map((descriptionID) => document.getElementById(descriptionID)).filter(Boolean).map((el) => el.textContent).join(" "));
|
|
2342
2342
|
}
|
|
2343
2343
|
return {
|
|
2344
2344
|
pass: expectsDescription ? checkWith instanceof RegExp ? checkWith.test(description) : this.equals(description, checkWith) : Boolean(description),
|
|
@@ -2365,7 +2365,7 @@ function toHaveErrorMessage(htmlElement, checkWith) {
|
|
|
2365
2365
|
let errormessage = "";
|
|
2366
2366
|
if (errormessageIDs.length > 0) {
|
|
2367
2367
|
const document = htmlElement.ownerDocument;
|
|
2368
|
-
errormessage = normalize$
|
|
2368
|
+
errormessage = normalize$2(errormessageIDs.map((errormessageID) => document.getElementById(errormessageID)).filter(Boolean).map((el) => el.textContent).join(" "));
|
|
2369
2369
|
}
|
|
2370
2370
|
return {
|
|
2371
2371
|
pass: expectsErrorMessage ? checkWith instanceof RegExp ? checkWith.test(errormessage) : this.equals(errormessage, checkWith) : Boolean(errormessage),
|
|
@@ -3722,7 +3722,7 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3722
3722
|
var dom_esm_exports = /* @__PURE__ */ __exportAll({
|
|
3723
3723
|
buildQueries: () => buildQueries,
|
|
3724
3724
|
configure: () => configure,
|
|
3725
|
-
createEvent: () => createEvent,
|
|
3725
|
+
createEvent: () => createEvent$1,
|
|
3726
3726
|
findAllByAltText: () => findAllByAltText,
|
|
3727
3727
|
findAllByDisplayValue: () => findAllByDisplayValue,
|
|
3728
3728
|
findAllByLabelText: () => findAllByLabelText,
|
|
@@ -3869,7 +3869,7 @@ function jestFakeTimersAreEnabled() {
|
|
|
3869
3869
|
// istanbul ignore next
|
|
3870
3870
|
return false;
|
|
3871
3871
|
}
|
|
3872
|
-
function getDocument() {
|
|
3872
|
+
function getDocument$1() {
|
|
3873
3873
|
/* istanbul ignore if */
|
|
3874
3874
|
if (typeof window === "undefined") throw new Error("Could not find default container");
|
|
3875
3875
|
return window.document;
|
|
@@ -3896,7 +3896,7 @@ function filterCommentsAndDefaultIgnoreTagsTags(value) {
|
|
|
3896
3896
|
}
|
|
3897
3897
|
function prettyDOM(dom, maxLength, options) {
|
|
3898
3898
|
if (options === void 0) options = {};
|
|
3899
|
-
if (!dom) dom = getDocument().body;
|
|
3899
|
+
if (!dom) dom = getDocument$1().body;
|
|
3900
3900
|
if (typeof maxLength !== "number") maxLength = typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.DEBUG_PRINT_LIMIT || 7e3;
|
|
3901
3901
|
if (maxLength === 0) return "";
|
|
3902
3902
|
if (dom.documentElement) dom = dom.documentElement;
|
|
@@ -4310,9 +4310,9 @@ function getSuggestedQuery(element, variant, method) {
|
|
|
4310
4310
|
if (canSuggest("LabelText", method, labelText)) return makeSuggestion("LabelText", element, labelText, { variant });
|
|
4311
4311
|
const placeholderText = element.getAttribute("placeholder");
|
|
4312
4312
|
if (canSuggest("PlaceholderText", method, placeholderText)) return makeSuggestion("PlaceholderText", element, placeholderText, { variant });
|
|
4313
|
-
const textContent = normalize(getNodeText(element));
|
|
4313
|
+
const textContent = normalize$1(getNodeText(element));
|
|
4314
4314
|
if (canSuggest("Text", method, textContent)) return makeSuggestion("Text", element, textContent, { variant });
|
|
4315
|
-
if (canSuggest("DisplayValue", method, element.value)) return makeSuggestion("DisplayValue", element, normalize(element.value), { variant });
|
|
4315
|
+
if (canSuggest("DisplayValue", method, element.value)) return makeSuggestion("DisplayValue", element, normalize$1(element.value), { variant });
|
|
4316
4316
|
const alt = element.getAttribute("alt");
|
|
4317
4317
|
if (canSuggest("AltText", method, alt)) return makeSuggestion("AltText", element, alt, { variant });
|
|
4318
4318
|
const title = element.getAttribute("title");
|
|
@@ -4324,7 +4324,7 @@ function copyStackTrace(target, source) {
|
|
|
4324
4324
|
target.stack = source.stack.replace(source.message, target.message);
|
|
4325
4325
|
}
|
|
4326
4326
|
function waitFor(callback, _ref) {
|
|
4327
|
-
let _ref$container = _ref.container, container = _ref$container === void 0 ? getDocument() : _ref$container, _ref$timeout = _ref.timeout, timeout = _ref$timeout === void 0 ? getConfig().asyncUtilTimeout : _ref$timeout, _ref$showOriginalStac = _ref.showOriginalStackTrace, showOriginalStackTrace = _ref$showOriginalStac === void 0 ? getConfig().showOriginalStackTrace : _ref$showOriginalStac, stackTraceError = _ref.stackTraceError, _ref$interval = _ref.interval, interval = _ref$interval === void 0 ? 50 : _ref$interval, _ref$onTimeout = _ref.onTimeout, onTimeout = _ref$onTimeout === void 0 ? (error) => {
|
|
4327
|
+
let _ref$container = _ref.container, container = _ref$container === void 0 ? getDocument$1() : _ref$container, _ref$timeout = _ref.timeout, timeout = _ref$timeout === void 0 ? getConfig().asyncUtilTimeout : _ref$timeout, _ref$showOriginalStac = _ref.showOriginalStackTrace, showOriginalStackTrace = _ref$showOriginalStac === void 0 ? getConfig().showOriginalStackTrace : _ref$showOriginalStac, stackTraceError = _ref.stackTraceError, _ref$interval = _ref.interval, interval = _ref$interval === void 0 ? 50 : _ref$interval, _ref$onTimeout = _ref.onTimeout, onTimeout = _ref$onTimeout === void 0 ? (error) => {
|
|
4328
4328
|
Object.defineProperty(error, "message", { value: getConfig().getElementError(error.message, container).message });
|
|
4329
4329
|
return error;
|
|
4330
4330
|
} : _ref$onTimeout, _ref$mutationObserver = _ref.mutationObserverOptions, mutationObserverOptions = _ref$mutationObserver === void 0 ? {
|
|
@@ -4566,7 +4566,7 @@ function fireEvent(element, event) {
|
|
|
4566
4566
|
return element.dispatchEvent(event);
|
|
4567
4567
|
});
|
|
4568
4568
|
}
|
|
4569
|
-
function createEvent(eventName, node, init, _temp) {
|
|
4569
|
+
function createEvent$1(eventName, node, init, _temp) {
|
|
4570
4570
|
let _ref = _temp === void 0 ? {} : _temp, _ref$EventType = _ref.EventType, EventType = _ref$EventType === void 0 ? "Event" : _ref$EventType, _ref$defaultInit = _ref.defaultInit, defaultInit = _ref$defaultInit === void 0 ? {} : _ref$defaultInit;
|
|
4571
4571
|
if (!node) throw new Error("Unable to fire a \"" + eventName + "\" event - please provide a DOM element.");
|
|
4572
4572
|
const eventInit = {
|
|
@@ -4625,7 +4625,7 @@ function encode(value) {
|
|
|
4625
4625
|
function getPlaygroundUrl(markup) {
|
|
4626
4626
|
return "https://testing-playground.com/#markup=" + encode(markup);
|
|
4627
4627
|
}
|
|
4628
|
-
var import_build, import_lib, import_lz_string, printProps, NodeTypeTextNode, printChildren, printText, printComment, printElement, printElementAsLeaf, ELEMENT_NODE$1, TEXT_NODE$1, COMMENT_NODE$1, FRAGMENT_NODE, ELEMENT_REGEXP, isCustomElement, testNode, picocolors, readFileSync, codeFrameColumns, TEXT_NODE, _excluded$1, shouldHighlight, DOMCollection, ELEMENT_NODE, COMMENT_NODE, logDOM, config, labelledNodeNames, elementRoleList, logRoles, normalize, wrapSingleQueryWithSuggestion, wrapAllByQueryWithSuggestion, queryHelpers, queryAllLabelsByText, queryAllByLabelText, getAllByLabelText, getMultipleError$7, queryByLabelText, getByLabelText, findAllByLabelText, findByLabelText, getAllByLabelTextWithSuggestions, getByLabelTextWithSuggestions, queryAllByLabelTextWithSuggestions, queryAllByPlaceholderText, getMultipleError$6, getMissingError$6, queryAllByPlaceholderTextWithSuggestions, _buildQueries$6, queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText, queryAllByText, getMultipleError$5, getMissingError$5, queryAllByTextWithSuggestions, _buildQueries$5, queryByText, getAllByText, getByText, findAllByText, findByText, queryAllByDisplayValue, getMultipleError$4, getMissingError$4, queryAllByDisplayValueWithSuggestions, _buildQueries$4, queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue, VALID_TAG_REGEXP, queryAllByAltText, getMultipleError$3, getMissingError$3, queryAllByAltTextWithSuggestions, _buildQueries$3, queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText, isSvgTitle, queryAllByTitle, getMultipleError$2, getMissingError$2, queryAllByTitleWithSuggestions, _buildQueries$2, queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle, queryAllByRole, getNameHint, getMultipleError$1, getMissingError$1, queryAllByRoleWithSuggestions, _buildQueries$1, queryByRole, getAllByRole, getByRole, findAllByRole, findByRole, getTestIdAttribute, queryAllByTestId, getMultipleError, getMissingError, queryAllByTestIdWithSuggestions, _buildQueries, queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId, queries, isRemoved, eventMap, eventAliasMap, _excluded, _excluded2, debug, logTestingPlaygroundURL, initialValue, screen;
|
|
4628
|
+
var import_build, import_lib, import_lz_string, printProps, NodeTypeTextNode, printChildren, printText, printComment, printElement, printElementAsLeaf, ELEMENT_NODE$1, TEXT_NODE$1, COMMENT_NODE$1, FRAGMENT_NODE, ELEMENT_REGEXP, isCustomElement, testNode, picocolors, readFileSync, codeFrameColumns, TEXT_NODE, _excluded$1, shouldHighlight, DOMCollection, ELEMENT_NODE, COMMENT_NODE, logDOM, config, labelledNodeNames, elementRoleList, logRoles, normalize$1, wrapSingleQueryWithSuggestion, wrapAllByQueryWithSuggestion, queryHelpers, queryAllLabelsByText, queryAllByLabelText, getAllByLabelText, getMultipleError$7, queryByLabelText, getByLabelText, findAllByLabelText, findByLabelText, getAllByLabelTextWithSuggestions, getByLabelTextWithSuggestions, queryAllByLabelTextWithSuggestions, queryAllByPlaceholderText, getMultipleError$6, getMissingError$6, queryAllByPlaceholderTextWithSuggestions, _buildQueries$6, queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText, queryAllByText, getMultipleError$5, getMissingError$5, queryAllByTextWithSuggestions, _buildQueries$5, queryByText, getAllByText, getByText, findAllByText, findByText, queryAllByDisplayValue, getMultipleError$4, getMissingError$4, queryAllByDisplayValueWithSuggestions, _buildQueries$4, queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue, VALID_TAG_REGEXP, queryAllByAltText, getMultipleError$3, getMissingError$3, queryAllByAltTextWithSuggestions, _buildQueries$3, queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText, isSvgTitle, queryAllByTitle, getMultipleError$2, getMissingError$2, queryAllByTitleWithSuggestions, _buildQueries$2, queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle, queryAllByRole, getNameHint, getMultipleError$1, getMissingError$1, queryAllByRoleWithSuggestions, _buildQueries$1, queryByRole, getAllByRole, getByRole, findAllByRole, findByRole, getTestIdAttribute, queryAllByTestId, getMultipleError, getMissingError, queryAllByTestIdWithSuggestions, _buildQueries, queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId, queries, isRemoved, eventMap$1, eventAliasMap, _excluded, _excluded2, debug, logTestingPlaygroundURL, initialValue, screen;
|
|
4629
4629
|
function init_dom_esm() {
|
|
4630
4630
|
return (init_dom_esm = __esmMin((() => {
|
|
4631
4631
|
import_build = /* @__PURE__ */ __toESM(require_build());
|
|
@@ -4744,7 +4744,7 @@ function init_dom_esm() {
|
|
|
4744
4744
|
let _ref10$hidden = (_temp2 === void 0 ? {} : _temp2).hidden;
|
|
4745
4745
|
return console.log(prettyRoles(dom, { hidden: _ref10$hidden === void 0 ? false : _ref10$hidden }));
|
|
4746
4746
|
};
|
|
4747
|
-
normalize = getDefaultNormalizer();
|
|
4747
|
+
normalize$1 = getDefaultNormalizer();
|
|
4748
4748
|
wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => function(container) {
|
|
4749
4749
|
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
|
|
4750
4750
|
const element = query(container, ...args);
|
|
@@ -5160,7 +5160,7 @@ function init_dom_esm() {
|
|
|
5160
5160
|
findByTestId
|
|
5161
5161
|
});
|
|
5162
5162
|
isRemoved = (result) => !result || Array.isArray(result) && !result.length;
|
|
5163
|
-
eventMap = {
|
|
5163
|
+
eventMap$1 = {
|
|
5164
5164
|
copy: {
|
|
5165
5165
|
EventType: "ClipboardEvent",
|
|
5166
5166
|
defaultInit: {
|
|
@@ -5848,14 +5848,14 @@ function init_dom_esm() {
|
|
|
5848
5848
|
"cancelable",
|
|
5849
5849
|
"detail"
|
|
5850
5850
|
];
|
|
5851
|
-
Object.keys(eventMap).forEach((key) => {
|
|
5852
|
-
const _eventMap$key = eventMap[key], EventType = _eventMap$key.EventType, defaultInit = _eventMap$key.defaultInit;
|
|
5851
|
+
Object.keys(eventMap$1).forEach((key) => {
|
|
5852
|
+
const _eventMap$key = eventMap$1[key], EventType = _eventMap$key.EventType, defaultInit = _eventMap$key.defaultInit;
|
|
5853
5853
|
const eventName = key.toLowerCase();
|
|
5854
|
-
createEvent[key] = (node, init) => createEvent(eventName, node, init, {
|
|
5854
|
+
createEvent$1[key] = (node, init) => createEvent$1(eventName, node, init, {
|
|
5855
5855
|
EventType,
|
|
5856
5856
|
defaultInit
|
|
5857
5857
|
});
|
|
5858
|
-
fireEvent[key] = (node, init) => fireEvent(node, createEvent[key](node, init));
|
|
5858
|
+
fireEvent[key] = (node, init) => fireEvent(node, createEvent$1[key](node, init));
|
|
5859
5859
|
});
|
|
5860
5860
|
Object.keys(eventAliasMap).forEach((aliasKey) => {
|
|
5861
5861
|
const key = eventAliasMap[aliasKey];
|
|
@@ -5865,7 +5865,7 @@ function init_dom_esm() {
|
|
|
5865
5865
|
});
|
|
5866
5866
|
debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach((el) => logDOM(el, maxLength, options)) : logDOM(element, maxLength, options);
|
|
5867
5867
|
logTestingPlaygroundURL = function(element) {
|
|
5868
|
-
if (element === void 0) element = getDocument().body;
|
|
5868
|
+
if (element === void 0) element = getDocument$1().body;
|
|
5869
5869
|
if (!element || !("innerHTML" in element)) {
|
|
5870
5870
|
console.log("The element you're providing isn't a valid DOM element.");
|
|
5871
5871
|
return;
|
|
@@ -5891,6 +5891,4106 @@ function init_dom_esm() {
|
|
|
5891
5891
|
})))();
|
|
5892
5892
|
}
|
|
5893
5893
|
//#endregion
|
|
5894
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isElementType.js
|
|
5895
|
+
function isElementType(element, tag, props) {
|
|
5896
|
+
if (element.namespaceURI && element.namespaceURI !== "http://www.w3.org/1999/xhtml") return false;
|
|
5897
|
+
tag = Array.isArray(tag) ? tag : [tag];
|
|
5898
|
+
if (!tag.includes(element.tagName.toLowerCase())) return false;
|
|
5899
|
+
if (props) return Object.entries(props).every(([k, v]) => element[k] === v);
|
|
5900
|
+
return true;
|
|
5901
|
+
}
|
|
5902
|
+
//#endregion
|
|
5903
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getWindow.js
|
|
5904
|
+
function getWindow(node) {
|
|
5905
|
+
var _node_ownerDocument;
|
|
5906
|
+
if (isDocument$1(node) && node.defaultView) return node.defaultView;
|
|
5907
|
+
else if ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.defaultView) return node.ownerDocument.defaultView;
|
|
5908
|
+
throw new Error(`Could not determine window of node. Node was ${describe(node)}`);
|
|
5909
|
+
}
|
|
5910
|
+
function isDocument$1(node) {
|
|
5911
|
+
return node.nodeType === 9;
|
|
5912
|
+
}
|
|
5913
|
+
function describe(val) {
|
|
5914
|
+
return typeof val === "function" ? `function ${val.name}` : val === null ? "null" : String(val);
|
|
5915
|
+
}
|
|
5916
|
+
//#endregion
|
|
5917
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Blob.js
|
|
5918
|
+
function readBlobText(blob, FileReader) {
|
|
5919
|
+
return new Promise((res, rej) => {
|
|
5920
|
+
const fr = new FileReader();
|
|
5921
|
+
fr.onerror = rej;
|
|
5922
|
+
fr.onabort = rej;
|
|
5923
|
+
fr.onload = () => {
|
|
5924
|
+
res(String(fr.result));
|
|
5925
|
+
};
|
|
5926
|
+
fr.readAsText(blob);
|
|
5927
|
+
});
|
|
5928
|
+
}
|
|
5929
|
+
//#endregion
|
|
5930
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/FileList.js
|
|
5931
|
+
function createFileList(window, files) {
|
|
5932
|
+
const list = {
|
|
5933
|
+
...files,
|
|
5934
|
+
length: files.length,
|
|
5935
|
+
item: (index) => list[index],
|
|
5936
|
+
[Symbol.iterator]: function* nextFile() {
|
|
5937
|
+
for (let i = 0; i < list.length; i++) yield list[i];
|
|
5938
|
+
}
|
|
5939
|
+
};
|
|
5940
|
+
list.constructor = window.FileList;
|
|
5941
|
+
/* istanbul ignore else */ if (window.FileList) Object.setPrototypeOf(list, window.FileList.prototype);
|
|
5942
|
+
Object.freeze(list);
|
|
5943
|
+
return list;
|
|
5944
|
+
}
|
|
5945
|
+
//#endregion
|
|
5946
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/DataTransfer.js
|
|
5947
|
+
function _define_property$8(obj, key, value) {
|
|
5948
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
5949
|
+
value,
|
|
5950
|
+
enumerable: true,
|
|
5951
|
+
configurable: true,
|
|
5952
|
+
writable: true
|
|
5953
|
+
});
|
|
5954
|
+
else obj[key] = value;
|
|
5955
|
+
return obj;
|
|
5956
|
+
}
|
|
5957
|
+
function toAsciiLowercase(value) {
|
|
5958
|
+
return value.replace(/[A-Z]/g, (char) => char.toLowerCase());
|
|
5959
|
+
}
|
|
5960
|
+
function normalizeFormat(format) {
|
|
5961
|
+
const type = toAsciiLowercase(format);
|
|
5962
|
+
return type === "text" ? "text/plain" : type === "url" ? "text/uri-list" : type;
|
|
5963
|
+
}
|
|
5964
|
+
function getTypeMatcher(type, exact) {
|
|
5965
|
+
const [group, sub] = type.split("/");
|
|
5966
|
+
const isGroup = !sub || sub === "*";
|
|
5967
|
+
return (item) => {
|
|
5968
|
+
return exact ? item.type === (isGroup ? group : type) : isGroup ? item.type.startsWith(`${group}/`) : item.type === group;
|
|
5969
|
+
};
|
|
5970
|
+
}
|
|
5971
|
+
function createDataTransferStub(window) {
|
|
5972
|
+
return new class DataTransferStub {
|
|
5973
|
+
getData(format) {
|
|
5974
|
+
var _this_items_find;
|
|
5975
|
+
const type = normalizeFormat(format);
|
|
5976
|
+
const match = (_this_items_find = this.items.find(getTypeMatcher(type, true))) !== null && _this_items_find !== void 0 ? _this_items_find : this.items.find(getTypeMatcher(type, false));
|
|
5977
|
+
let text = "";
|
|
5978
|
+
match === null || match === void 0 || match.getAsString((t) => {
|
|
5979
|
+
text = t;
|
|
5980
|
+
});
|
|
5981
|
+
return text;
|
|
5982
|
+
}
|
|
5983
|
+
setData(format, data) {
|
|
5984
|
+
const type = normalizeFormat(format);
|
|
5985
|
+
const matchIndex = this.items.findIndex(getTypeMatcher(type, true));
|
|
5986
|
+
const item = new DataTransferItemStub(data, type);
|
|
5987
|
+
if (matchIndex >= 0) this.items.splice(matchIndex, 1, item);
|
|
5988
|
+
else this.items.push(item);
|
|
5989
|
+
}
|
|
5990
|
+
clearData(format) {
|
|
5991
|
+
if (format) {
|
|
5992
|
+
const type = normalizeFormat(format);
|
|
5993
|
+
const matchIndex = this.items.findIndex(getTypeMatcher(type, true));
|
|
5994
|
+
if (matchIndex >= 0) this.items.remove(matchIndex);
|
|
5995
|
+
} else this.items.clear();
|
|
5996
|
+
}
|
|
5997
|
+
get types() {
|
|
5998
|
+
const t = [];
|
|
5999
|
+
if (this.files.length) t.push("Files");
|
|
6000
|
+
this.items.forEach((i) => t.push(i.type));
|
|
6001
|
+
Object.freeze(t);
|
|
6002
|
+
return t;
|
|
6003
|
+
}
|
|
6004
|
+
/* istanbul ignore next */ setDragImage() {}
|
|
6005
|
+
constructor() {
|
|
6006
|
+
_define_property$8(this, "dropEffect", "none");
|
|
6007
|
+
_define_property$8(this, "effectAllowed", "uninitialized");
|
|
6008
|
+
_define_property$8(this, "items", new DataTransferItemListStub());
|
|
6009
|
+
_define_property$8(this, "files", createFileList(window, []));
|
|
6010
|
+
}
|
|
6011
|
+
}();
|
|
6012
|
+
}
|
|
6013
|
+
function createDataTransfer(window, files = []) {
|
|
6014
|
+
const dt = typeof window.DataTransfer === "undefined" ? createDataTransferStub(window) : /* istanbul ignore next */ new window.DataTransfer();
|
|
6015
|
+
Object.defineProperty(dt, "files", { get: () => createFileList(window, files) });
|
|
6016
|
+
return dt;
|
|
6017
|
+
}
|
|
6018
|
+
async function getBlobFromDataTransferItem(window, item) {
|
|
6019
|
+
if (item.kind === "file") return item.getAsFile();
|
|
6020
|
+
return new window.Blob([await new Promise((r) => item.getAsString(r))], { type: item.type });
|
|
6021
|
+
}
|
|
6022
|
+
var DataTransferItemStub, DataTransferItemListStub;
|
|
6023
|
+
function init_DataTransfer() {
|
|
6024
|
+
return (init_DataTransfer = __esmMin((() => {
|
|
6025
|
+
DataTransferItemStub = class {
|
|
6026
|
+
getAsFile() {
|
|
6027
|
+
return this.file;
|
|
6028
|
+
}
|
|
6029
|
+
getAsString(callback) {
|
|
6030
|
+
if (typeof this.data === "string") callback(this.data);
|
|
6031
|
+
}
|
|
6032
|
+
/* istanbul ignore next */ webkitGetAsEntry() {
|
|
6033
|
+
throw new Error("not implemented");
|
|
6034
|
+
}
|
|
6035
|
+
constructor(dataOrFile, type) {
|
|
6036
|
+
_define_property$8(this, "kind", void 0);
|
|
6037
|
+
_define_property$8(this, "type", void 0);
|
|
6038
|
+
_define_property$8(this, "file", null);
|
|
6039
|
+
_define_property$8(this, "data", void 0);
|
|
6040
|
+
if (typeof dataOrFile === "string") {
|
|
6041
|
+
this.kind = "string";
|
|
6042
|
+
this.type = String(type);
|
|
6043
|
+
this.data = dataOrFile;
|
|
6044
|
+
} else {
|
|
6045
|
+
this.kind = "file";
|
|
6046
|
+
this.type = dataOrFile.type;
|
|
6047
|
+
this.file = dataOrFile;
|
|
6048
|
+
}
|
|
6049
|
+
}
|
|
6050
|
+
};
|
|
6051
|
+
DataTransferItemListStub = class extends Array {
|
|
6052
|
+
add(...args) {
|
|
6053
|
+
const item = typeof args[0] === "string" ? new DataTransferItemStub(args[0], toAsciiLowercase(args[1])) : new DataTransferItemStub(args[0]);
|
|
6054
|
+
this.push(item);
|
|
6055
|
+
return item;
|
|
6056
|
+
}
|
|
6057
|
+
clear() {
|
|
6058
|
+
this.splice(0, this.length);
|
|
6059
|
+
}
|
|
6060
|
+
remove(index) {
|
|
6061
|
+
this.splice(index, 1);
|
|
6062
|
+
}
|
|
6063
|
+
};
|
|
6064
|
+
})))();
|
|
6065
|
+
}
|
|
6066
|
+
//#endregion
|
|
6067
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Clipboard.js
|
|
6068
|
+
function _define_property$7(obj, key, value) {
|
|
6069
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
6070
|
+
value,
|
|
6071
|
+
enumerable: true,
|
|
6072
|
+
configurable: true,
|
|
6073
|
+
writable: true
|
|
6074
|
+
});
|
|
6075
|
+
else obj[key] = value;
|
|
6076
|
+
return obj;
|
|
6077
|
+
}
|
|
6078
|
+
function createClipboardItem(window, ...blobs) {
|
|
6079
|
+
const dataMap = Object.fromEntries(blobs.map((b) => [typeof b === "string" ? "text/plain" : b.type, Promise.resolve(b)]));
|
|
6080
|
+
/* istanbul ignore if */ if (typeof window.ClipboardItem !== "undefined") return new window.ClipboardItem(dataMap);
|
|
6081
|
+
return new class ClipboardItem {
|
|
6082
|
+
get types() {
|
|
6083
|
+
return Array.from(Object.keys(this.data));
|
|
6084
|
+
}
|
|
6085
|
+
async getType(type) {
|
|
6086
|
+
const value = await this.data[type];
|
|
6087
|
+
if (!value) throw new Error(`${type} is not one of the available MIME types on this item.`);
|
|
6088
|
+
return value instanceof window.Blob ? value : new window.Blob([value], { type });
|
|
6089
|
+
}
|
|
6090
|
+
constructor(d) {
|
|
6091
|
+
_define_property$7(this, "data", void 0);
|
|
6092
|
+
this.data = d;
|
|
6093
|
+
}
|
|
6094
|
+
}(dataMap);
|
|
6095
|
+
}
|
|
6096
|
+
function createClipboardStub(window, control) {
|
|
6097
|
+
return Object.assign(new class Clipboard extends window.EventTarget {
|
|
6098
|
+
async read() {
|
|
6099
|
+
return Array.from(this.items);
|
|
6100
|
+
}
|
|
6101
|
+
async readText() {
|
|
6102
|
+
let text = "";
|
|
6103
|
+
for (const item of this.items) {
|
|
6104
|
+
const type = item.types.includes("text/plain") ? "text/plain" : item.types.find((t) => t.startsWith("text/"));
|
|
6105
|
+
if (type) text += await item.getType(type).then((b) => readBlobText(b, window.FileReader));
|
|
6106
|
+
}
|
|
6107
|
+
return text;
|
|
6108
|
+
}
|
|
6109
|
+
async write(data) {
|
|
6110
|
+
this.items = data;
|
|
6111
|
+
}
|
|
6112
|
+
async writeText(text) {
|
|
6113
|
+
this.items = [createClipboardItem(window, text)];
|
|
6114
|
+
}
|
|
6115
|
+
constructor(...args) {
|
|
6116
|
+
super(...args), _define_property$7(this, "items", []);
|
|
6117
|
+
}
|
|
6118
|
+
}(), { [ClipboardStubControl]: control });
|
|
6119
|
+
}
|
|
6120
|
+
function isClipboardStub(clipboard) {
|
|
6121
|
+
return !!(clipboard === null || clipboard === void 0 ? void 0 : clipboard[ClipboardStubControl]);
|
|
6122
|
+
}
|
|
6123
|
+
function attachClipboardStubToView(window) {
|
|
6124
|
+
if (isClipboardStub(window.navigator.clipboard)) return window.navigator.clipboard[ClipboardStubControl];
|
|
6125
|
+
const realClipboard = Object.getOwnPropertyDescriptor(window.navigator, "clipboard");
|
|
6126
|
+
let stub;
|
|
6127
|
+
const control = {
|
|
6128
|
+
resetClipboardStub: () => {
|
|
6129
|
+
stub = createClipboardStub(window, control);
|
|
6130
|
+
},
|
|
6131
|
+
detachClipboardStub: () => {
|
|
6132
|
+
/* istanbul ignore if */ if (realClipboard) Object.defineProperty(window.navigator, "clipboard", realClipboard);
|
|
6133
|
+
else Object.defineProperty(window.navigator, "clipboard", {
|
|
6134
|
+
value: void 0,
|
|
6135
|
+
configurable: true
|
|
6136
|
+
});
|
|
6137
|
+
}
|
|
6138
|
+
};
|
|
6139
|
+
stub = createClipboardStub(window, control);
|
|
6140
|
+
Object.defineProperty(window.navigator, "clipboard", {
|
|
6141
|
+
get: () => stub,
|
|
6142
|
+
configurable: true
|
|
6143
|
+
});
|
|
6144
|
+
return stub[ClipboardStubControl];
|
|
6145
|
+
}
|
|
6146
|
+
function resetClipboardStubOnView(window) {
|
|
6147
|
+
if (isClipboardStub(window.navigator.clipboard)) window.navigator.clipboard[ClipboardStubControl].resetClipboardStub();
|
|
6148
|
+
}
|
|
6149
|
+
function detachClipboardStubFromView(window) {
|
|
6150
|
+
if (isClipboardStub(window.navigator.clipboard)) window.navigator.clipboard[ClipboardStubControl].detachClipboardStub();
|
|
6151
|
+
}
|
|
6152
|
+
async function readDataTransferFromClipboard(document) {
|
|
6153
|
+
const window = document.defaultView;
|
|
6154
|
+
const clipboard = window === null || window === void 0 ? void 0 : window.navigator.clipboard;
|
|
6155
|
+
const items = clipboard && await clipboard.read();
|
|
6156
|
+
if (!items) throw new Error("The Clipboard API is unavailable.");
|
|
6157
|
+
const dt = createDataTransfer(window);
|
|
6158
|
+
for (const item of items) for (const type of item.types) dt.setData(type, await item.getType(type).then((b) => readBlobText(b, window.FileReader)));
|
|
6159
|
+
return dt;
|
|
6160
|
+
}
|
|
6161
|
+
async function writeDataTransferToClipboard(document, clipboardData) {
|
|
6162
|
+
const window = getWindow(document);
|
|
6163
|
+
const clipboard = window.navigator.clipboard;
|
|
6164
|
+
const items = [];
|
|
6165
|
+
for (let i = 0; i < clipboardData.items.length; i++) {
|
|
6166
|
+
const dtItem = clipboardData.items[i];
|
|
6167
|
+
const blob = await getBlobFromDataTransferItem(window, dtItem);
|
|
6168
|
+
items.push(createClipboardItem(window, blob));
|
|
6169
|
+
}
|
|
6170
|
+
if (!(clipboard && await clipboard.write(items).then(
|
|
6171
|
+
() => true,
|
|
6172
|
+
/* istanbul ignore next */
|
|
6173
|
+
() => false
|
|
6174
|
+
))) throw new Error("The Clipboard API is unavailable.");
|
|
6175
|
+
}
|
|
6176
|
+
var ClipboardStubControl, g$1;
|
|
6177
|
+
function init_Clipboard() {
|
|
6178
|
+
return (init_Clipboard = __esmMin((() => {
|
|
6179
|
+
init_DataTransfer();
|
|
6180
|
+
ClipboardStubControl = Symbol("Manage ClipboardSub");
|
|
6181
|
+
g$1 = globalThis;
|
|
6182
|
+
/* istanbul ignore else */ if (typeof g$1.afterEach === "function") g$1.afterEach(() => {
|
|
6183
|
+
if (typeof globalThis.window !== "undefined") resetClipboardStubOnView(globalThis.window);
|
|
6184
|
+
});
|
|
6185
|
+
/* istanbul ignore else */ if (typeof g$1.afterAll === "function") g$1.afterAll(() => {
|
|
6186
|
+
if (typeof globalThis.window !== "undefined") detachClipboardStubFromView(globalThis.window);
|
|
6187
|
+
});
|
|
6188
|
+
})))();
|
|
6189
|
+
}
|
|
6190
|
+
//#endregion
|
|
6191
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/selector.js
|
|
6192
|
+
var FOCUSABLE_SELECTOR;
|
|
6193
|
+
function init_selector() {
|
|
6194
|
+
return (init_selector = __esmMin((() => {
|
|
6195
|
+
FOCUSABLE_SELECTOR = [
|
|
6196
|
+
"input:not([type=hidden]):not([disabled])",
|
|
6197
|
+
"button:not([disabled])",
|
|
6198
|
+
"select:not([disabled])",
|
|
6199
|
+
"textarea:not([disabled])",
|
|
6200
|
+
"[contenteditable=\"\"]",
|
|
6201
|
+
"[contenteditable=\"true\"]",
|
|
6202
|
+
"a[href]",
|
|
6203
|
+
"[tabindex]:not([disabled])",
|
|
6204
|
+
"details > summary"
|
|
6205
|
+
].join(", ");
|
|
6206
|
+
})))();
|
|
6207
|
+
}
|
|
6208
|
+
//#endregion
|
|
6209
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/isFocusable.js
|
|
6210
|
+
function isFocusable(element) {
|
|
6211
|
+
return element.matches(FOCUSABLE_SELECTOR);
|
|
6212
|
+
}
|
|
6213
|
+
function init_isFocusable() {
|
|
6214
|
+
return (init_isFocusable = __esmMin((() => {
|
|
6215
|
+
init_selector();
|
|
6216
|
+
})))();
|
|
6217
|
+
}
|
|
6218
|
+
//#endregion
|
|
6219
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/cloneEvent.js
|
|
6220
|
+
function cloneEvent(event) {
|
|
6221
|
+
return new event.constructor(event.type, event);
|
|
6222
|
+
}
|
|
6223
|
+
//#endregion
|
|
6224
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isDisabled.js
|
|
6225
|
+
function isDisabled(element) {
|
|
6226
|
+
for (let el = element; el; el = el.parentElement) if (isElementType(el, [
|
|
6227
|
+
"button",
|
|
6228
|
+
"input",
|
|
6229
|
+
"select",
|
|
6230
|
+
"textarea",
|
|
6231
|
+
"optgroup",
|
|
6232
|
+
"option"
|
|
6233
|
+
])) {
|
|
6234
|
+
if (el.hasAttribute("disabled")) return true;
|
|
6235
|
+
} else if (isElementType(el, "fieldset")) {
|
|
6236
|
+
var _el_querySelector;
|
|
6237
|
+
if (el.hasAttribute("disabled") && !((_el_querySelector = el.querySelector(":scope > legend")) === null || _el_querySelector === void 0 ? void 0 : _el_querySelector.contains(element))) return true;
|
|
6238
|
+
} else if (el.tagName.includes("-")) {
|
|
6239
|
+
if (el.constructor.formAssociated && el.hasAttribute("disabled")) return true;
|
|
6240
|
+
}
|
|
6241
|
+
return false;
|
|
6242
|
+
}
|
|
6243
|
+
function init_isDisabled() {
|
|
6244
|
+
return (init_isDisabled = __esmMin((() => {})))();
|
|
6245
|
+
}
|
|
6246
|
+
//#endregion
|
|
6247
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/getActiveElement.js
|
|
6248
|
+
function getActiveElement(document) {
|
|
6249
|
+
const activeElement = document.activeElement;
|
|
6250
|
+
if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.shadowRoot) {
|
|
6251
|
+
const activeElementInShadowTree = getActiveElement(activeElement.shadowRoot);
|
|
6252
|
+
if (activeElementInShadowTree) return activeElementInShadowTree;
|
|
6253
|
+
} else if (activeElement && isElementType(activeElement, "iframe")) {
|
|
6254
|
+
const contentDocument = activeElement.contentDocument;
|
|
6255
|
+
if (contentDocument) return getActiveElement(contentDocument);
|
|
6256
|
+
}
|
|
6257
|
+
if (isDisabled(activeElement)) return document.ownerDocument ? /* istanbul ignore next */ document.ownerDocument.body : document.body;
|
|
6258
|
+
return activeElement;
|
|
6259
|
+
}
|
|
6260
|
+
function getActiveElementOrBody(document) {
|
|
6261
|
+
var _getActiveElement;
|
|
6262
|
+
return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== void 0 ? _getActiveElement : /* istanbul ignore next */ document.body;
|
|
6263
|
+
}
|
|
6264
|
+
function init_getActiveElement() {
|
|
6265
|
+
return (init_getActiveElement = __esmMin((() => {
|
|
6266
|
+
init_isDisabled();
|
|
6267
|
+
})))();
|
|
6268
|
+
}
|
|
6269
|
+
//#endregion
|
|
6270
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/findClosest.js
|
|
6271
|
+
function findClosest(element, callback) {
|
|
6272
|
+
let el = element;
|
|
6273
|
+
do {
|
|
6274
|
+
if (callback(el)) return el;
|
|
6275
|
+
el = el.parentElement;
|
|
6276
|
+
} while (el && el !== element.ownerDocument.body);
|
|
6277
|
+
}
|
|
6278
|
+
//#endregion
|
|
6279
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/isContentEditable.js
|
|
6280
|
+
function isContentEditable(element) {
|
|
6281
|
+
return element.hasAttribute("contenteditable") && (element.getAttribute("contenteditable") == "true" || element.getAttribute("contenteditable") == "");
|
|
6282
|
+
}
|
|
6283
|
+
/**
|
|
6284
|
+
* If a node is a contenteditable or inside one, return that element.
|
|
6285
|
+
*/ function getContentEditable(node) {
|
|
6286
|
+
const element = getElement$1(node);
|
|
6287
|
+
return element && (element.closest("[contenteditable=\"\"]") || element.closest("[contenteditable=\"true\"]"));
|
|
6288
|
+
}
|
|
6289
|
+
function getElement$1(node) {
|
|
6290
|
+
return node.nodeType === 1 ? node : node.parentElement;
|
|
6291
|
+
}
|
|
6292
|
+
//#endregion
|
|
6293
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/click/isClickableInput.js
|
|
6294
|
+
function isClickableInput(element) {
|
|
6295
|
+
return isElementType(element, "button") || isElementType(element, "input") && element.type in clickableInputTypes;
|
|
6296
|
+
}
|
|
6297
|
+
var clickableInputTypes;
|
|
6298
|
+
function init_isClickableInput() {
|
|
6299
|
+
return (init_isClickableInput = __esmMin((() => {
|
|
6300
|
+
clickableInputTypes = /*#__PURE__*/ function(clickableInputTypes) {
|
|
6301
|
+
clickableInputTypes["button"] = "button";
|
|
6302
|
+
clickableInputTypes["color"] = "color";
|
|
6303
|
+
clickableInputTypes["file"] = "file";
|
|
6304
|
+
clickableInputTypes["image"] = "image";
|
|
6305
|
+
clickableInputTypes["reset"] = "reset";
|
|
6306
|
+
clickableInputTypes["submit"] = "submit";
|
|
6307
|
+
clickableInputTypes["checkbox"] = "checkbox";
|
|
6308
|
+
clickableInputTypes["radio"] = "radio";
|
|
6309
|
+
return clickableInputTypes;
|
|
6310
|
+
}(clickableInputTypes || {});
|
|
6311
|
+
})))();
|
|
6312
|
+
}
|
|
6313
|
+
//#endregion
|
|
6314
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/isEditable.js
|
|
6315
|
+
function isEditable(element) {
|
|
6316
|
+
return isEditableInputOrTextArea(element) && !element.readOnly || isContentEditable(element);
|
|
6317
|
+
}
|
|
6318
|
+
function isEditableInputOrTextArea(element) {
|
|
6319
|
+
return isElementType(element, "textarea") || isElementType(element, "input") && element.type in editableInputTypes;
|
|
6320
|
+
}
|
|
6321
|
+
var editableInputTypes;
|
|
6322
|
+
function init_isEditable() {
|
|
6323
|
+
return (init_isEditable = __esmMin((() => {
|
|
6324
|
+
editableInputTypes = /*#__PURE__*/ function(editableInputTypes) {
|
|
6325
|
+
editableInputTypes["text"] = "text";
|
|
6326
|
+
editableInputTypes["date"] = "date";
|
|
6327
|
+
editableInputTypes["datetime-local"] = "datetime-local";
|
|
6328
|
+
editableInputTypes["email"] = "email";
|
|
6329
|
+
editableInputTypes["month"] = "month";
|
|
6330
|
+
editableInputTypes["number"] = "number";
|
|
6331
|
+
editableInputTypes["password"] = "password";
|
|
6332
|
+
editableInputTypes["search"] = "search";
|
|
6333
|
+
editableInputTypes["tel"] = "tel";
|
|
6334
|
+
editableInputTypes["time"] = "time";
|
|
6335
|
+
editableInputTypes["url"] = "url";
|
|
6336
|
+
editableInputTypes["week"] = "week";
|
|
6337
|
+
return editableInputTypes;
|
|
6338
|
+
}(editableInputTypes || {});
|
|
6339
|
+
})))();
|
|
6340
|
+
}
|
|
6341
|
+
//#endregion
|
|
6342
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/selection.js
|
|
6343
|
+
/**
|
|
6344
|
+
* Determine if the element has its own selection implementation
|
|
6345
|
+
* and does not interact with the Document Selection API.
|
|
6346
|
+
*/ function hasOwnSelection(node) {
|
|
6347
|
+
return isElement$1(node) && isEditableInputOrTextArea(node);
|
|
6348
|
+
}
|
|
6349
|
+
function hasNoSelection(node) {
|
|
6350
|
+
return isElement$1(node) && isClickableInput(node);
|
|
6351
|
+
}
|
|
6352
|
+
function isElement$1(node) {
|
|
6353
|
+
return node.nodeType === 1;
|
|
6354
|
+
}
|
|
6355
|
+
function init_selection() {
|
|
6356
|
+
return (init_selection = __esmMin((() => {
|
|
6357
|
+
init_isClickableInput();
|
|
6358
|
+
init_isEditable();
|
|
6359
|
+
})))();
|
|
6360
|
+
}
|
|
6361
|
+
//#endregion
|
|
6362
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/updateSelectionOnFocus.js
|
|
6363
|
+
/**
|
|
6364
|
+
* Reset the Document Selection when moving focus into an element
|
|
6365
|
+
* with own selection implementation.
|
|
6366
|
+
*/ function updateSelectionOnFocus(element) {
|
|
6367
|
+
const selection = element.ownerDocument.getSelection();
|
|
6368
|
+
/* istanbul ignore if */ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) return;
|
|
6369
|
+
if (hasOwnSelection(element)) {
|
|
6370
|
+
const contenteditable = getContentEditable(selection.focusNode);
|
|
6371
|
+
if (contenteditable) {
|
|
6372
|
+
if (!selection.isCollapsed) {
|
|
6373
|
+
var _contenteditable_firstChild;
|
|
6374
|
+
const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
|
|
6375
|
+
selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
|
|
6376
|
+
}
|
|
6377
|
+
} else selection.setBaseAndExtent(element, 0, element, 0);
|
|
6378
|
+
}
|
|
6379
|
+
}
|
|
6380
|
+
function init_updateSelectionOnFocus() {
|
|
6381
|
+
return (init_updateSelectionOnFocus = __esmMin((() => {
|
|
6382
|
+
init_Clipboard();
|
|
6383
|
+
init_selection();
|
|
6384
|
+
})))();
|
|
6385
|
+
}
|
|
6386
|
+
//#endregion
|
|
6387
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/wrapEvent.js
|
|
6388
|
+
function wrapEvent(cb, _element) {
|
|
6389
|
+
return getConfig().eventWrapper(cb);
|
|
6390
|
+
}
|
|
6391
|
+
function init_wrapEvent() {
|
|
6392
|
+
return (init_wrapEvent = __esmMin((() => {
|
|
6393
|
+
init_dom_esm();
|
|
6394
|
+
})))();
|
|
6395
|
+
}
|
|
6396
|
+
//#endregion
|
|
6397
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/focus.js
|
|
6398
|
+
/**
|
|
6399
|
+
* Focus closest focusable element.
|
|
6400
|
+
*/ function focusElement(element) {
|
|
6401
|
+
const target = findClosest(element, isFocusable);
|
|
6402
|
+
const activeElement = getActiveElement(element.ownerDocument);
|
|
6403
|
+
if ((target !== null && target !== void 0 ? target : element.ownerDocument.body) === activeElement) return;
|
|
6404
|
+
else if (target) wrapEvent(() => target.focus());
|
|
6405
|
+
else wrapEvent(() => activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur());
|
|
6406
|
+
updateSelectionOnFocus(target !== null && target !== void 0 ? target : element.ownerDocument.body);
|
|
6407
|
+
}
|
|
6408
|
+
function blurElement(element) {
|
|
6409
|
+
if (!isFocusable(element)) return;
|
|
6410
|
+
if (!(getActiveElement(element.ownerDocument) === element)) return;
|
|
6411
|
+
wrapEvent(() => element.blur());
|
|
6412
|
+
}
|
|
6413
|
+
function init_focus() {
|
|
6414
|
+
return (init_focus = __esmMin((() => {
|
|
6415
|
+
init_Clipboard();
|
|
6416
|
+
init_getActiveElement();
|
|
6417
|
+
init_isFocusable();
|
|
6418
|
+
init_updateSelectionOnFocus();
|
|
6419
|
+
init_wrapEvent();
|
|
6420
|
+
})))();
|
|
6421
|
+
}
|
|
6422
|
+
//#endregion
|
|
6423
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/registry.js
|
|
6424
|
+
var behavior;
|
|
6425
|
+
function init_registry() {
|
|
6426
|
+
return (init_registry = __esmMin((() => {
|
|
6427
|
+
behavior = {};
|
|
6428
|
+
})))();
|
|
6429
|
+
}
|
|
6430
|
+
//#endregion
|
|
6431
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/click.js
|
|
6432
|
+
function init_click() {
|
|
6433
|
+
return (init_click = __esmMin((() => {
|
|
6434
|
+
init_Clipboard();
|
|
6435
|
+
init_isFocusable();
|
|
6436
|
+
init_focus();
|
|
6437
|
+
init_registry();
|
|
6438
|
+
behavior.click = (event, target, instance) => {
|
|
6439
|
+
const context = target.closest("button,input,label,select,textarea");
|
|
6440
|
+
const control = context && isElementType(context, "label") && context.control;
|
|
6441
|
+
if (control && control !== target) return () => {
|
|
6442
|
+
if (isFocusable(control)) {
|
|
6443
|
+
focusElement(control);
|
|
6444
|
+
instance.dispatchEvent(control, cloneEvent(event));
|
|
6445
|
+
}
|
|
6446
|
+
};
|
|
6447
|
+
else if (isElementType(target, "input", { type: "file" })) return () => {
|
|
6448
|
+
blurElement(target);
|
|
6449
|
+
target.dispatchEvent(new (getWindow(target)).Event("fileDialog"));
|
|
6450
|
+
focusElement(target);
|
|
6451
|
+
};
|
|
6452
|
+
};
|
|
6453
|
+
})))();
|
|
6454
|
+
}
|
|
6455
|
+
//#endregion
|
|
6456
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/document/UI.js
|
|
6457
|
+
function isUIValue(value) {
|
|
6458
|
+
return typeof value === "object" && UIValue in value;
|
|
6459
|
+
}
|
|
6460
|
+
function isUISelectionStart(start) {
|
|
6461
|
+
return !!start && typeof start === "object" && UISelection in start;
|
|
6462
|
+
}
|
|
6463
|
+
function setUIValue(element, value) {
|
|
6464
|
+
if (element[InitialValue] === void 0) element[InitialValue] = element.value;
|
|
6465
|
+
element[UIValue] = value;
|
|
6466
|
+
element.value = Object.assign(new String(value), { [UIValue]: true });
|
|
6467
|
+
}
|
|
6468
|
+
function getUIValue(element) {
|
|
6469
|
+
return element[UIValue] === void 0 ? element.value : String(element[UIValue]);
|
|
6470
|
+
}
|
|
6471
|
+
/** Flag the IDL value as clean. This does not change the value. */ function setUIValueClean(element) {
|
|
6472
|
+
element[UIValue] = void 0;
|
|
6473
|
+
}
|
|
6474
|
+
function clearInitialValue(element) {
|
|
6475
|
+
element[InitialValue] = void 0;
|
|
6476
|
+
}
|
|
6477
|
+
function getInitialValue(element) {
|
|
6478
|
+
return element[InitialValue];
|
|
6479
|
+
}
|
|
6480
|
+
function setUISelectionRaw(element, selection) {
|
|
6481
|
+
element[UISelection] = selection;
|
|
6482
|
+
}
|
|
6483
|
+
function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = "replace") {
|
|
6484
|
+
const valueLength = getUIValue(element).length;
|
|
6485
|
+
const sanitizeOffset = (o) => Math.max(0, Math.min(valueLength, o));
|
|
6486
|
+
const anchorOffset = mode === "replace" || element[UISelection] === void 0 ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;
|
|
6487
|
+
const focusOffset = sanitizeOffset(focusOffsetParam);
|
|
6488
|
+
const startOffset = Math.min(anchorOffset, focusOffset);
|
|
6489
|
+
const endOffset = Math.max(anchorOffset, focusOffset);
|
|
6490
|
+
element[UISelection] = {
|
|
6491
|
+
anchorOffset,
|
|
6492
|
+
focusOffset
|
|
6493
|
+
};
|
|
6494
|
+
if (element.selectionStart === startOffset && element.selectionEnd === endOffset) return;
|
|
6495
|
+
const startObj = Object.assign(new Number(startOffset), { [UISelection]: true });
|
|
6496
|
+
try {
|
|
6497
|
+
element.setSelectionRange(startObj, endOffset);
|
|
6498
|
+
} catch {}
|
|
6499
|
+
}
|
|
6500
|
+
function getUISelection(element) {
|
|
6501
|
+
var _element_UISelection, _element_selectionStart, _element_selectionEnd;
|
|
6502
|
+
const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
|
|
6503
|
+
anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
|
|
6504
|
+
focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
|
|
6505
|
+
};
|
|
6506
|
+
return {
|
|
6507
|
+
...sel,
|
|
6508
|
+
startOffset: Math.min(sel.anchorOffset, sel.focusOffset),
|
|
6509
|
+
endOffset: Math.max(sel.anchorOffset, sel.focusOffset)
|
|
6510
|
+
};
|
|
6511
|
+
}
|
|
6512
|
+
function hasUISelection(element) {
|
|
6513
|
+
return !!element[UISelection];
|
|
6514
|
+
}
|
|
6515
|
+
/** Flag the IDL selection as clean. This does not change the selection. */ function setUISelectionClean(element) {
|
|
6516
|
+
element[UISelection] = void 0;
|
|
6517
|
+
}
|
|
6518
|
+
var UIValue, UISelection, InitialValue;
|
|
6519
|
+
function init_UI() {
|
|
6520
|
+
return (init_UI = __esmMin((() => {
|
|
6521
|
+
UIValue = Symbol("Displayed value in UI");
|
|
6522
|
+
UISelection = Symbol("Displayed selection in UI");
|
|
6523
|
+
InitialValue = Symbol("Initial value to compare on blur");
|
|
6524
|
+
})))();
|
|
6525
|
+
}
|
|
6526
|
+
//#endregion
|
|
6527
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/timeValue.js
|
|
6528
|
+
function buildTimeValue(value) {
|
|
6529
|
+
const onlyDigitsValue = value.replace(/\D/g, "");
|
|
6530
|
+
if (onlyDigitsValue.length < 2) return value;
|
|
6531
|
+
const firstDigit = parseInt$1(onlyDigitsValue[0], 10);
|
|
6532
|
+
const secondDigit = parseInt$1(onlyDigitsValue[1], 10);
|
|
6533
|
+
if (firstDigit >= 3 || firstDigit === 2 && secondDigit >= 4) {
|
|
6534
|
+
let index;
|
|
6535
|
+
if (firstDigit >= 3) index = 1;
|
|
6536
|
+
else index = 2;
|
|
6537
|
+
return build(onlyDigitsValue, index);
|
|
6538
|
+
}
|
|
6539
|
+
if (value.length === 2) return value;
|
|
6540
|
+
return build(onlyDigitsValue, 2);
|
|
6541
|
+
}
|
|
6542
|
+
function build(onlyDigitsValue, index) {
|
|
6543
|
+
const hours = onlyDigitsValue.slice(0, index);
|
|
6544
|
+
const validHours = Math.min(parseInt$1(hours, 10), 23);
|
|
6545
|
+
const minuteCharacters = onlyDigitsValue.slice(index);
|
|
6546
|
+
const parsedMinutes = parseInt$1(minuteCharacters, 10);
|
|
6547
|
+
const validMinutes = Math.min(parsedMinutes, 59);
|
|
6548
|
+
return `${validHours.toString().padStart(2, "0")}:${validMinutes.toString().padStart(2, "0")}`;
|
|
6549
|
+
}
|
|
6550
|
+
function isValidDateOrTimeValue(element, value) {
|
|
6551
|
+
const clone = element.cloneNode();
|
|
6552
|
+
clone.value = value;
|
|
6553
|
+
return clone.value === value;
|
|
6554
|
+
}
|
|
6555
|
+
var parseInt$1;
|
|
6556
|
+
function init_timeValue() {
|
|
6557
|
+
return (init_timeValue = __esmMin((() => {
|
|
6558
|
+
parseInt$1 = globalThis.parseInt;
|
|
6559
|
+
})))();
|
|
6560
|
+
}
|
|
6561
|
+
//#endregion
|
|
6562
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/maxLength.js
|
|
6563
|
+
function getMaxLength(element) {
|
|
6564
|
+
var _element_getAttribute;
|
|
6565
|
+
const attr = (_element_getAttribute = element.getAttribute("maxlength")) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : "";
|
|
6566
|
+
return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : void 0;
|
|
6567
|
+
}
|
|
6568
|
+
function supportsMaxLength(element) {
|
|
6569
|
+
return isElementType(element, "textarea") || isElementType(element, "input") && element.type in maxLengthSupportedTypes;
|
|
6570
|
+
}
|
|
6571
|
+
var maxLengthSupportedTypes;
|
|
6572
|
+
function init_maxLength() {
|
|
6573
|
+
return (init_maxLength = __esmMin((() => {
|
|
6574
|
+
maxLengthSupportedTypes = /*#__PURE__*/ function(maxLengthSupportedTypes) {
|
|
6575
|
+
maxLengthSupportedTypes["email"] = "email";
|
|
6576
|
+
maxLengthSupportedTypes["password"] = "password";
|
|
6577
|
+
maxLengthSupportedTypes["search"] = "search";
|
|
6578
|
+
maxLengthSupportedTypes["telephone"] = "telephone";
|
|
6579
|
+
maxLengthSupportedTypes["text"] = "text";
|
|
6580
|
+
maxLengthSupportedTypes["url"] = "url";
|
|
6581
|
+
return maxLengthSupportedTypes;
|
|
6582
|
+
}(maxLengthSupportedTypes || {});
|
|
6583
|
+
})))();
|
|
6584
|
+
}
|
|
6585
|
+
//#endregion
|
|
6586
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/cursor.js
|
|
6587
|
+
function getNextCursorPosition(node, offset, direction, inputType) {
|
|
6588
|
+
if (isTextNode(node) && offset + direction >= 0 && offset + direction <= node.nodeValue.length) return {
|
|
6589
|
+
node,
|
|
6590
|
+
offset: offset + direction
|
|
6591
|
+
};
|
|
6592
|
+
const nextNode = getNextCharacterContentNode(node, offset, direction);
|
|
6593
|
+
if (nextNode) {
|
|
6594
|
+
if (isTextNode(nextNode)) return {
|
|
6595
|
+
node: nextNode,
|
|
6596
|
+
offset: direction > 0 ? Math.min(1, nextNode.nodeValue.length) : Math.max(nextNode.nodeValue.length - 1, 0)
|
|
6597
|
+
};
|
|
6598
|
+
else if (isElementType(nextNode, "br")) {
|
|
6599
|
+
const nextPlusOne = getNextCharacterContentNode(nextNode, void 0, direction);
|
|
6600
|
+
if (!nextPlusOne) {
|
|
6601
|
+
if (direction < 0 && inputType === "deleteContentBackward") return {
|
|
6602
|
+
node: nextNode.parentNode,
|
|
6603
|
+
offset: getOffset(nextNode)
|
|
6604
|
+
};
|
|
6605
|
+
return;
|
|
6606
|
+
} else if (isTextNode(nextPlusOne)) return {
|
|
6607
|
+
node: nextPlusOne,
|
|
6608
|
+
offset: direction > 0 ? 0 : nextPlusOne.nodeValue.length
|
|
6609
|
+
};
|
|
6610
|
+
else if (direction < 0 && isElementType(nextPlusOne, "br")) return {
|
|
6611
|
+
node: nextNode.parentNode,
|
|
6612
|
+
offset: getOffset(nextNode)
|
|
6613
|
+
};
|
|
6614
|
+
else return {
|
|
6615
|
+
node: nextPlusOne.parentNode,
|
|
6616
|
+
offset: getOffset(nextPlusOne) + (direction > 0 ? 0 : 1)
|
|
6617
|
+
};
|
|
6618
|
+
} else return {
|
|
6619
|
+
node: nextNode.parentNode,
|
|
6620
|
+
offset: getOffset(nextNode) + (direction > 0 ? 1 : 0)
|
|
6621
|
+
};
|
|
6622
|
+
}
|
|
6623
|
+
}
|
|
6624
|
+
function getNextCharacterContentNode(node, offset, direction) {
|
|
6625
|
+
const nextOffset = Number(offset) + (direction < 0 ? -1 : 0);
|
|
6626
|
+
if (offset !== void 0 && isElement(node) && nextOffset >= 0 && nextOffset < node.children.length) node = node.children[nextOffset];
|
|
6627
|
+
return walkNodes(node, direction === 1 ? "next" : "previous", isTreatedAsCharacterContent);
|
|
6628
|
+
}
|
|
6629
|
+
function isTreatedAsCharacterContent(node) {
|
|
6630
|
+
if (isTextNode(node)) return true;
|
|
6631
|
+
if (isElement(node)) {
|
|
6632
|
+
if (isElementType(node, ["input", "textarea"])) return node.type !== "hidden";
|
|
6633
|
+
else if (isElementType(node, "br")) return true;
|
|
6634
|
+
}
|
|
6635
|
+
return false;
|
|
6636
|
+
}
|
|
6637
|
+
function getOffset(node) {
|
|
6638
|
+
let i = 0;
|
|
6639
|
+
while (node.previousSibling) {
|
|
6640
|
+
i++;
|
|
6641
|
+
node = node.previousSibling;
|
|
6642
|
+
}
|
|
6643
|
+
return i;
|
|
6644
|
+
}
|
|
6645
|
+
function isElement(node) {
|
|
6646
|
+
return node.nodeType === 1;
|
|
6647
|
+
}
|
|
6648
|
+
function isTextNode(node) {
|
|
6649
|
+
return node.nodeType === 3;
|
|
6650
|
+
}
|
|
6651
|
+
function walkNodes(node, direction, callback) {
|
|
6652
|
+
for (;;) {
|
|
6653
|
+
var _node_ownerDocument;
|
|
6654
|
+
const sibling = node[`${direction}Sibling`];
|
|
6655
|
+
if (sibling) {
|
|
6656
|
+
node = getDescendant(sibling, direction === "next" ? "first" : "last");
|
|
6657
|
+
if (callback(node)) return node;
|
|
6658
|
+
} else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.body))) node = node.parentNode;
|
|
6659
|
+
else break;
|
|
6660
|
+
}
|
|
6661
|
+
}
|
|
6662
|
+
function getDescendant(node, direction) {
|
|
6663
|
+
while (node.hasChildNodes()) node = node[`${direction}Child`];
|
|
6664
|
+
return node;
|
|
6665
|
+
}
|
|
6666
|
+
function init_cursor() {
|
|
6667
|
+
return (init_cursor = __esmMin((() => {})))();
|
|
6668
|
+
}
|
|
6669
|
+
//#endregion
|
|
6670
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/document/trackValue.js
|
|
6671
|
+
function isReact17Element(element) {
|
|
6672
|
+
return Object.getOwnPropertyNames(element).some((k) => k.startsWith("__react")) && getWindow(element).REACT_VERSION === 17;
|
|
6673
|
+
}
|
|
6674
|
+
function startTrackValue(element) {
|
|
6675
|
+
if (!isReact17Element(element)) return;
|
|
6676
|
+
element[TrackChanges] = {
|
|
6677
|
+
previousValue: String(element.value),
|
|
6678
|
+
tracked: []
|
|
6679
|
+
};
|
|
6680
|
+
}
|
|
6681
|
+
function trackOrSetValue(element, v) {
|
|
6682
|
+
var _element_TrackChanges_tracked, _element_TrackChanges;
|
|
6683
|
+
(_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === void 0 || (_element_TrackChanges_tracked = _element_TrackChanges.tracked) == null || _element_TrackChanges_tracked.push(v);
|
|
6684
|
+
if (!element[TrackChanges]) {
|
|
6685
|
+
setUIValueClean(element);
|
|
6686
|
+
setUISelection(element, { focusOffset: v.length });
|
|
6687
|
+
}
|
|
6688
|
+
}
|
|
6689
|
+
function commitValueAfterInput(element, cursorOffset) {
|
|
6690
|
+
var _changes_tracked;
|
|
6691
|
+
const changes = element[TrackChanges];
|
|
6692
|
+
element[TrackChanges] = void 0;
|
|
6693
|
+
if (!(changes === null || changes === void 0 ? void 0 : (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0 ? void 0 : _changes_tracked.length)) return;
|
|
6694
|
+
const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
|
|
6695
|
+
if (!isJustReactStateUpdate) setUIValueClean(element);
|
|
6696
|
+
if (hasUISelection(element)) setUISelection(element, { focusOffset: isJustReactStateUpdate ? cursorOffset : element.value.length });
|
|
6697
|
+
}
|
|
6698
|
+
var TrackChanges;
|
|
6699
|
+
function init_trackValue() {
|
|
6700
|
+
return (init_trackValue = __esmMin((() => {
|
|
6701
|
+
init_Clipboard();
|
|
6702
|
+
init_UI();
|
|
6703
|
+
TrackChanges = Symbol("Track programmatic changes for React workaround");
|
|
6704
|
+
})))();
|
|
6705
|
+
}
|
|
6706
|
+
//#endregion
|
|
6707
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/getTargetTypeAndSelection.js
|
|
6708
|
+
/**
|
|
6709
|
+
* Determine which selection logic and selection ranges to consider.
|
|
6710
|
+
*/ function getTargetTypeAndSelection(node) {
|
|
6711
|
+
const element = getElement(node);
|
|
6712
|
+
if (element && hasOwnSelection(element)) return {
|
|
6713
|
+
type: "input",
|
|
6714
|
+
selection: getUISelection(element)
|
|
6715
|
+
};
|
|
6716
|
+
const selection = element === null || element === void 0 ? void 0 : element.ownerDocument.getSelection();
|
|
6717
|
+
return {
|
|
6718
|
+
type: getContentEditable(node) && (selection === null || selection === void 0 ? void 0 : selection.anchorNode) && getContentEditable(selection.anchorNode) ? "contenteditable" : "default",
|
|
6719
|
+
selection
|
|
6720
|
+
};
|
|
6721
|
+
}
|
|
6722
|
+
function getElement(node) {
|
|
6723
|
+
return node.nodeType === 1 ? node : node.parentElement;
|
|
6724
|
+
}
|
|
6725
|
+
function init_getTargetTypeAndSelection() {
|
|
6726
|
+
return (init_getTargetTypeAndSelection = __esmMin((() => {
|
|
6727
|
+
init_UI();
|
|
6728
|
+
init_Clipboard();
|
|
6729
|
+
init_selection();
|
|
6730
|
+
})))();
|
|
6731
|
+
}
|
|
6732
|
+
//#endregion
|
|
6733
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/getInputRange.js
|
|
6734
|
+
/**
|
|
6735
|
+
* Get the range that would be overwritten by input.
|
|
6736
|
+
*/ function getInputRange(focusNode) {
|
|
6737
|
+
const typeAndSelection = getTargetTypeAndSelection(focusNode);
|
|
6738
|
+
if (typeAndSelection.type === "input") return typeAndSelection.selection;
|
|
6739
|
+
else if (typeAndSelection.type === "contenteditable") {
|
|
6740
|
+
var _typeAndSelection_selection;
|
|
6741
|
+
return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
|
|
6742
|
+
}
|
|
6743
|
+
}
|
|
6744
|
+
function init_getInputRange() {
|
|
6745
|
+
return (init_getInputRange = __esmMin((() => {
|
|
6746
|
+
init_getTargetTypeAndSelection();
|
|
6747
|
+
})))();
|
|
6748
|
+
}
|
|
6749
|
+
//#endregion
|
|
6750
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelection.js
|
|
6751
|
+
/**
|
|
6752
|
+
* Set the selection
|
|
6753
|
+
*/ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
|
|
6754
|
+
var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
|
|
6755
|
+
if (getTargetTypeAndSelection(focusNode).type === "input") return setUISelection(focusNode, {
|
|
6756
|
+
anchorOffset,
|
|
6757
|
+
focusOffset
|
|
6758
|
+
});
|
|
6759
|
+
(_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === void 0 || (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) == null || _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
|
|
6760
|
+
}
|
|
6761
|
+
function init_setSelection() {
|
|
6762
|
+
return (init_setSelection = __esmMin((() => {
|
|
6763
|
+
init_UI();
|
|
6764
|
+
init_Clipboard();
|
|
6765
|
+
init_getTargetTypeAndSelection();
|
|
6766
|
+
})))();
|
|
6767
|
+
}
|
|
6768
|
+
//#endregion
|
|
6769
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/input.js
|
|
6770
|
+
function isDateOrTime(element) {
|
|
6771
|
+
return isElementType(element, "input") && ["date", "time"].includes(element.type);
|
|
6772
|
+
}
|
|
6773
|
+
function input(instance, element, data, inputType = "insertText") {
|
|
6774
|
+
const inputRange = getInputRange(element);
|
|
6775
|
+
/* istanbul ignore if */ if (!inputRange) return;
|
|
6776
|
+
if (!isDateOrTime(element)) {
|
|
6777
|
+
if (!instance.dispatchUIEvent(element, "beforeinput", {
|
|
6778
|
+
inputType,
|
|
6779
|
+
data
|
|
6780
|
+
})) return;
|
|
6781
|
+
}
|
|
6782
|
+
if ("startContainer" in inputRange) editContenteditable(instance, element, inputRange, data, inputType);
|
|
6783
|
+
else editInputElement(instance, element, inputRange, data, inputType);
|
|
6784
|
+
}
|
|
6785
|
+
function editContenteditable(instance, element, inputRange, data, inputType) {
|
|
6786
|
+
let del = false;
|
|
6787
|
+
if (!inputRange.collapsed) {
|
|
6788
|
+
del = true;
|
|
6789
|
+
inputRange.deleteContents();
|
|
6790
|
+
} else if (["deleteContentBackward", "deleteContentForward"].includes(inputType)) {
|
|
6791
|
+
const nextPosition = getNextCursorPosition(inputRange.startContainer, inputRange.startOffset, inputType === "deleteContentBackward" ? -1 : 1, inputType);
|
|
6792
|
+
if (nextPosition) {
|
|
6793
|
+
del = true;
|
|
6794
|
+
const delRange = inputRange.cloneRange();
|
|
6795
|
+
if (delRange.comparePoint(nextPosition.node, nextPosition.offset) < 0) delRange.setStart(nextPosition.node, nextPosition.offset);
|
|
6796
|
+
else delRange.setEnd(nextPosition.node, nextPosition.offset);
|
|
6797
|
+
delRange.deleteContents();
|
|
6798
|
+
}
|
|
6799
|
+
}
|
|
6800
|
+
if (data) {
|
|
6801
|
+
if (inputRange.endContainer.nodeType === 3) {
|
|
6802
|
+
const offset = inputRange.endOffset;
|
|
6803
|
+
inputRange.endContainer.insertData(offset, data);
|
|
6804
|
+
inputRange.setStart(inputRange.endContainer, offset + data.length);
|
|
6805
|
+
inputRange.setEnd(inputRange.endContainer, offset + data.length);
|
|
6806
|
+
} else {
|
|
6807
|
+
const text = element.ownerDocument.createTextNode(data);
|
|
6808
|
+
inputRange.insertNode(text);
|
|
6809
|
+
inputRange.setStart(text, data.length);
|
|
6810
|
+
inputRange.setEnd(text, data.length);
|
|
6811
|
+
}
|
|
6812
|
+
}
|
|
6813
|
+
if (del || data) instance.dispatchUIEvent(element, "input", { inputType });
|
|
6814
|
+
}
|
|
6815
|
+
function editInputElement(instance, element, inputRange, data, inputType) {
|
|
6816
|
+
let dataToInsert = data;
|
|
6817
|
+
if (supportsMaxLength(element)) {
|
|
6818
|
+
const maxLength = getMaxLength(element);
|
|
6819
|
+
if (maxLength !== void 0 && data.length > 0) {
|
|
6820
|
+
const selectionLength = inputRange.endOffset - inputRange.startOffset;
|
|
6821
|
+
const spaceUntilMaxLength = maxLength - element.value.length + selectionLength;
|
|
6822
|
+
if (spaceUntilMaxLength > 0) dataToInsert = data.substring(0, spaceUntilMaxLength);
|
|
6823
|
+
else return;
|
|
6824
|
+
}
|
|
6825
|
+
}
|
|
6826
|
+
const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
|
|
6827
|
+
if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) return;
|
|
6828
|
+
if (isElementType(element, "input", { type: "number" }) && !isValidNumberInput(newValue)) return;
|
|
6829
|
+
setUIValue(element, newValue);
|
|
6830
|
+
setSelection({
|
|
6831
|
+
focusNode: element,
|
|
6832
|
+
anchorOffset: newOffset,
|
|
6833
|
+
focusOffset: newOffset
|
|
6834
|
+
});
|
|
6835
|
+
if (isDateOrTime(element)) {
|
|
6836
|
+
if (isValidDateOrTimeValue(element, newValue)) {
|
|
6837
|
+
commitInput(instance, element, newOffset, {});
|
|
6838
|
+
instance.dispatchUIEvent(element, "change");
|
|
6839
|
+
clearInitialValue(element);
|
|
6840
|
+
}
|
|
6841
|
+
} else commitInput(instance, element, newOffset, {
|
|
6842
|
+
data,
|
|
6843
|
+
inputType
|
|
6844
|
+
});
|
|
6845
|
+
}
|
|
6846
|
+
function calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {
|
|
6847
|
+
const value = getUIValue(node);
|
|
6848
|
+
const prologEnd = Math.max(0, startOffset === endOffset && inputType === "deleteContentBackward" ? startOffset - 1 : startOffset);
|
|
6849
|
+
const prolog = value.substring(0, prologEnd);
|
|
6850
|
+
const epilogStart = Math.min(value.length, startOffset === endOffset && inputType === "deleteContentForward" ? startOffset + 1 : endOffset);
|
|
6851
|
+
let newValue = `${prolog}${inputData}${value.substring(epilogStart, value.length)}`;
|
|
6852
|
+
let newOffset = prologEnd + inputData.length;
|
|
6853
|
+
if (isElementType(node, "input", { type: "time" })) {
|
|
6854
|
+
const builtValue = buildTimeValue(newValue);
|
|
6855
|
+
if (builtValue !== "" && isValidDateOrTimeValue(node, builtValue)) {
|
|
6856
|
+
newValue = builtValue;
|
|
6857
|
+
newOffset = builtValue.length;
|
|
6858
|
+
}
|
|
6859
|
+
}
|
|
6860
|
+
return {
|
|
6861
|
+
oldValue: value,
|
|
6862
|
+
newValue,
|
|
6863
|
+
newOffset
|
|
6864
|
+
};
|
|
6865
|
+
}
|
|
6866
|
+
function commitInput(instance, element, newOffset, inputInit) {
|
|
6867
|
+
instance.dispatchUIEvent(element, "input", inputInit);
|
|
6868
|
+
commitValueAfterInput(element, newOffset);
|
|
6869
|
+
}
|
|
6870
|
+
function isValidNumberInput(value) {
|
|
6871
|
+
var _value_match, _value_match1;
|
|
6872
|
+
const valueParts = value.split("e", 2);
|
|
6873
|
+
return !(/[^\d.\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === void 0 ? void 0 : _value_match.length) > 2 || Number((_value_match1 = value.match(/\./g)) === null || _value_match1 === void 0 ? void 0 : _value_match1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
|
|
6874
|
+
}
|
|
6875
|
+
function init_input() {
|
|
6876
|
+
return (init_input = __esmMin((() => {
|
|
6877
|
+
init_UI();
|
|
6878
|
+
init_Clipboard();
|
|
6879
|
+
init_timeValue();
|
|
6880
|
+
init_maxLength();
|
|
6881
|
+
init_cursor();
|
|
6882
|
+
init_trackValue();
|
|
6883
|
+
init_getInputRange();
|
|
6884
|
+
init_setSelection();
|
|
6885
|
+
})))();
|
|
6886
|
+
}
|
|
6887
|
+
//#endregion
|
|
6888
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/cut.js
|
|
6889
|
+
function init_cut() {
|
|
6890
|
+
return (init_cut = __esmMin((() => {
|
|
6891
|
+
init_Clipboard();
|
|
6892
|
+
init_isEditable();
|
|
6893
|
+
init_input();
|
|
6894
|
+
init_registry();
|
|
6895
|
+
behavior.cut = (event, target, instance) => {
|
|
6896
|
+
return () => {
|
|
6897
|
+
if (isEditable(target)) input(instance, target, "", "deleteByCut");
|
|
6898
|
+
};
|
|
6899
|
+
};
|
|
6900
|
+
})))();
|
|
6901
|
+
}
|
|
6902
|
+
//#endregion
|
|
6903
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/document/getValueOrTextContent.js
|
|
6904
|
+
function getValueOrTextContent(element) {
|
|
6905
|
+
// istanbul ignore if
|
|
6906
|
+
if (!element) return null;
|
|
6907
|
+
if (isContentEditable(element)) return element.textContent;
|
|
6908
|
+
return getUIValue(element);
|
|
6909
|
+
}
|
|
6910
|
+
function init_getValueOrTextContent() {
|
|
6911
|
+
return (init_getValueOrTextContent = __esmMin((() => {
|
|
6912
|
+
init_Clipboard();
|
|
6913
|
+
init_UI();
|
|
6914
|
+
})))();
|
|
6915
|
+
}
|
|
6916
|
+
//#endregion
|
|
6917
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isVisible.js
|
|
6918
|
+
function isVisible(element) {
|
|
6919
|
+
const window = getWindow(element);
|
|
6920
|
+
for (let el = element; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement) {
|
|
6921
|
+
const { display, visibility } = window.getComputedStyle(el);
|
|
6922
|
+
if (display === "none") return false;
|
|
6923
|
+
if (visibility === "hidden") return false;
|
|
6924
|
+
}
|
|
6925
|
+
return true;
|
|
6926
|
+
}
|
|
6927
|
+
function init_isVisible() {
|
|
6928
|
+
return (init_isVisible = __esmMin((() => {})))();
|
|
6929
|
+
}
|
|
6930
|
+
//#endregion
|
|
6931
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/getTabDestination.js
|
|
6932
|
+
function getTabDestination(activeElement, shift) {
|
|
6933
|
+
const document = activeElement.ownerDocument;
|
|
6934
|
+
const focusableElements = document.querySelectorAll(FOCUSABLE_SELECTOR);
|
|
6935
|
+
const enabledElements = Array.from(focusableElements).filter((el) => el === activeElement || !(Number(el.getAttribute("tabindex")) < 0 || isDisabled(el)));
|
|
6936
|
+
if (Number(activeElement.getAttribute("tabindex")) >= 0) enabledElements.sort((a, b) => {
|
|
6937
|
+
const i = Number(a.getAttribute("tabindex"));
|
|
6938
|
+
const j = Number(b.getAttribute("tabindex"));
|
|
6939
|
+
if (i === j) return 0;
|
|
6940
|
+
else if (i === 0) return 1;
|
|
6941
|
+
else if (j === 0) return -1;
|
|
6942
|
+
return i - j;
|
|
6943
|
+
});
|
|
6944
|
+
const checkedRadio = {};
|
|
6945
|
+
let prunedElements = [document.body];
|
|
6946
|
+
const activeRadioGroup = isElementType(activeElement, "input", { type: "radio" }) ? activeElement.name : void 0;
|
|
6947
|
+
enabledElements.forEach((currentElement) => {
|
|
6948
|
+
const el = currentElement;
|
|
6949
|
+
if (isElementType(el, "input", { type: "radio" }) && el.name) {
|
|
6950
|
+
if (el === activeElement) {
|
|
6951
|
+
prunedElements.push(el);
|
|
6952
|
+
return;
|
|
6953
|
+
} else if (el.name === activeRadioGroup) return;
|
|
6954
|
+
if (el.checked) {
|
|
6955
|
+
prunedElements = prunedElements.filter((e) => !isElementType(e, "input", {
|
|
6956
|
+
type: "radio",
|
|
6957
|
+
name: el.name
|
|
6958
|
+
}));
|
|
6959
|
+
prunedElements.push(el);
|
|
6960
|
+
checkedRadio[el.name] = el;
|
|
6961
|
+
return;
|
|
6962
|
+
}
|
|
6963
|
+
if (typeof checkedRadio[el.name] !== "undefined") return;
|
|
6964
|
+
}
|
|
6965
|
+
prunedElements.push(el);
|
|
6966
|
+
});
|
|
6967
|
+
for (let index = prunedElements.findIndex((el) => el === activeElement);;) {
|
|
6968
|
+
index += shift ? -1 : 1;
|
|
6969
|
+
if (index === prunedElements.length) index = 0;
|
|
6970
|
+
else if (index === -1) index = prunedElements.length - 1;
|
|
6971
|
+
if (prunedElements[index] === activeElement || prunedElements[index] === document.body || isVisible(prunedElements[index])) return prunedElements[index];
|
|
6972
|
+
}
|
|
6973
|
+
}
|
|
6974
|
+
function init_getTabDestination() {
|
|
6975
|
+
return (init_getTabDestination = __esmMin((() => {
|
|
6976
|
+
init_isDisabled();
|
|
6977
|
+
init_isVisible();
|
|
6978
|
+
init_selector();
|
|
6979
|
+
})))();
|
|
6980
|
+
}
|
|
6981
|
+
//#endregion
|
|
6982
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/moveSelection.js
|
|
6983
|
+
/**
|
|
6984
|
+
* Move the selection
|
|
6985
|
+
*/ function moveSelection(node, direction) {
|
|
6986
|
+
if (hasOwnSelection(node)) {
|
|
6987
|
+
const selection = getUISelection(node);
|
|
6988
|
+
setSelection({
|
|
6989
|
+
focusNode: node,
|
|
6990
|
+
focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
|
|
6991
|
+
});
|
|
6992
|
+
} else {
|
|
6993
|
+
const selection = node.ownerDocument.getSelection();
|
|
6994
|
+
if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) return;
|
|
6995
|
+
if (selection.isCollapsed) {
|
|
6996
|
+
const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
|
|
6997
|
+
if (nextPosition) setSelection({
|
|
6998
|
+
focusNode: nextPosition.node,
|
|
6999
|
+
focusOffset: nextPosition.offset
|
|
7000
|
+
});
|
|
7001
|
+
} else selection[direction < 0 ? "collapseToStart" : "collapseToEnd"]();
|
|
7002
|
+
}
|
|
7003
|
+
}
|
|
7004
|
+
function init_moveSelection() {
|
|
7005
|
+
return (init_moveSelection = __esmMin((() => {
|
|
7006
|
+
init_UI();
|
|
7007
|
+
init_Clipboard();
|
|
7008
|
+
init_cursor();
|
|
7009
|
+
init_selection();
|
|
7010
|
+
init_setSelection();
|
|
7011
|
+
})))();
|
|
7012
|
+
}
|
|
7013
|
+
//#endregion
|
|
7014
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/selectAll.js
|
|
7015
|
+
/**
|
|
7016
|
+
* Expand a selection like the browser does when pressing Ctrl+A.
|
|
7017
|
+
*/ function selectAll(target) {
|
|
7018
|
+
var _getContentEditable;
|
|
7019
|
+
if (hasOwnSelection(target)) return setSelection({
|
|
7020
|
+
focusNode: target,
|
|
7021
|
+
anchorOffset: 0,
|
|
7022
|
+
focusOffset: getUIValue(target).length
|
|
7023
|
+
});
|
|
7024
|
+
const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
|
|
7025
|
+
setSelection({
|
|
7026
|
+
focusNode,
|
|
7027
|
+
anchorOffset: 0,
|
|
7028
|
+
focusOffset: focusNode.childNodes.length
|
|
7029
|
+
});
|
|
7030
|
+
}
|
|
7031
|
+
function isAllSelected(target) {
|
|
7032
|
+
var _getContentEditable;
|
|
7033
|
+
if (hasOwnSelection(target)) return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
|
|
7034
|
+
const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
|
|
7035
|
+
const selection = target.ownerDocument.getSelection();
|
|
7036
|
+
return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
|
|
7037
|
+
}
|
|
7038
|
+
function init_selectAll() {
|
|
7039
|
+
return (init_selectAll = __esmMin((() => {
|
|
7040
|
+
init_UI();
|
|
7041
|
+
init_Clipboard();
|
|
7042
|
+
init_selection();
|
|
7043
|
+
init_setSelection();
|
|
7044
|
+
})))();
|
|
7045
|
+
}
|
|
7046
|
+
//#endregion
|
|
7047
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionRange.js
|
|
7048
|
+
/**
|
|
7049
|
+
* Backward-compatible selection.
|
|
7050
|
+
*
|
|
7051
|
+
* Handles input elements and contenteditable if it only contains a single text node.
|
|
7052
|
+
*/ function setSelectionRange(element, anchorOffset, focusOffset) {
|
|
7053
|
+
var _element_firstChild;
|
|
7054
|
+
if (hasOwnSelection(element)) return setSelection({
|
|
7055
|
+
focusNode: element,
|
|
7056
|
+
anchorOffset,
|
|
7057
|
+
focusOffset
|
|
7058
|
+
});
|
|
7059
|
+
/* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3) return setSelection({
|
|
7060
|
+
focusNode: element.firstChild,
|
|
7061
|
+
anchorOffset,
|
|
7062
|
+
focusOffset
|
|
7063
|
+
});
|
|
7064
|
+
/* istanbul ignore next */ throw new Error("Not implemented. The result of this interaction is unreliable.");
|
|
7065
|
+
}
|
|
7066
|
+
function init_setSelectionRange() {
|
|
7067
|
+
return (init_setSelectionRange = __esmMin((() => {
|
|
7068
|
+
init_Clipboard();
|
|
7069
|
+
init_selection();
|
|
7070
|
+
init_setSelection();
|
|
7071
|
+
})))();
|
|
7072
|
+
}
|
|
7073
|
+
//#endregion
|
|
7074
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/radio.js
|
|
7075
|
+
function walkRadio(instance, el, direction) {
|
|
7076
|
+
const window = getWindow(el);
|
|
7077
|
+
const group = Array.from(el.ownerDocument.querySelectorAll(el.name ? `input[type="radio"][name="${window.CSS.escape(el.name)}"]` : `input[type="radio"][name=""], input[type="radio"]:not([name])`));
|
|
7078
|
+
for (let i = group.findIndex((e) => e === el) + direction;; i += direction) {
|
|
7079
|
+
if (!group[i]) i = direction > 0 ? 0 : group.length - 1;
|
|
7080
|
+
if (group[i] === el) return;
|
|
7081
|
+
if (isDisabled(group[i])) continue;
|
|
7082
|
+
focusElement(group[i]);
|
|
7083
|
+
instance.dispatchUIEvent(group[i], "click");
|
|
7084
|
+
return;
|
|
7085
|
+
}
|
|
7086
|
+
}
|
|
7087
|
+
function init_radio() {
|
|
7088
|
+
return (init_radio = __esmMin((() => {
|
|
7089
|
+
init_Clipboard();
|
|
7090
|
+
init_isDisabled();
|
|
7091
|
+
init_focus();
|
|
7092
|
+
})))();
|
|
7093
|
+
}
|
|
7094
|
+
//#endregion
|
|
7095
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keydown.js
|
|
7096
|
+
var keydownBehavior, combinationBehavior;
|
|
7097
|
+
function init_keydown() {
|
|
7098
|
+
return (init_keydown = __esmMin((() => {
|
|
7099
|
+
init_UI();
|
|
7100
|
+
init_getValueOrTextContent();
|
|
7101
|
+
init_Clipboard();
|
|
7102
|
+
init_isEditable();
|
|
7103
|
+
init_getActiveElement();
|
|
7104
|
+
init_getTabDestination();
|
|
7105
|
+
init_selection();
|
|
7106
|
+
init_focus();
|
|
7107
|
+
init_input();
|
|
7108
|
+
init_moveSelection();
|
|
7109
|
+
init_selectAll();
|
|
7110
|
+
init_setSelectionRange();
|
|
7111
|
+
init_radio();
|
|
7112
|
+
init_registry();
|
|
7113
|
+
behavior.keydown = (event, target, instance) => {
|
|
7114
|
+
var _ref;
|
|
7115
|
+
var _keydownBehavior_event_key;
|
|
7116
|
+
return (_ref = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === void 0 ? void 0 : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _ref !== void 0 ? _ref : combinationBehavior(event, target, instance);
|
|
7117
|
+
};
|
|
7118
|
+
keydownBehavior = {
|
|
7119
|
+
ArrowDown: (event, target, instance) => {
|
|
7120
|
+
/* istanbul ignore else */ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, 1);
|
|
7121
|
+
},
|
|
7122
|
+
ArrowLeft: (event, target, instance) => {
|
|
7123
|
+
if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, -1);
|
|
7124
|
+
return () => moveSelection(target, -1);
|
|
7125
|
+
},
|
|
7126
|
+
ArrowRight: (event, target, instance) => {
|
|
7127
|
+
if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, 1);
|
|
7128
|
+
return () => moveSelection(target, 1);
|
|
7129
|
+
},
|
|
7130
|
+
ArrowUp: (event, target, instance) => {
|
|
7131
|
+
/* istanbul ignore else */ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, -1);
|
|
7132
|
+
},
|
|
7133
|
+
Backspace: (event, target, instance) => {
|
|
7134
|
+
if (isEditable(target)) return () => {
|
|
7135
|
+
input(instance, target, "", "deleteContentBackward");
|
|
7136
|
+
};
|
|
7137
|
+
},
|
|
7138
|
+
Delete: (event, target, instance) => {
|
|
7139
|
+
if (isEditable(target)) return () => {
|
|
7140
|
+
input(instance, target, "", "deleteContentForward");
|
|
7141
|
+
};
|
|
7142
|
+
},
|
|
7143
|
+
End: (event, target) => {
|
|
7144
|
+
if (isElementType(target, ["input", "textarea"]) || isContentEditable(target)) return () => {
|
|
7145
|
+
var _ref;
|
|
7146
|
+
var _getValueOrTextContent;
|
|
7147
|
+
const newPos = (_ref = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === void 0 ? void 0 : _getValueOrTextContent.length) !== null && _ref !== void 0 ? _ref : /* istanbul ignore next */ 0;
|
|
7148
|
+
setSelectionRange(target, newPos, newPos);
|
|
7149
|
+
};
|
|
7150
|
+
},
|
|
7151
|
+
Home: (event, target) => {
|
|
7152
|
+
if (isElementType(target, ["input", "textarea"]) || isContentEditable(target)) return () => {
|
|
7153
|
+
setSelectionRange(target, 0, 0);
|
|
7154
|
+
};
|
|
7155
|
+
},
|
|
7156
|
+
PageDown: (event, target) => {
|
|
7157
|
+
if (isElementType(target, ["input"])) return () => {
|
|
7158
|
+
const newPos = getUIValue(target).length;
|
|
7159
|
+
setSelectionRange(target, newPos, newPos);
|
|
7160
|
+
};
|
|
7161
|
+
},
|
|
7162
|
+
PageUp: (event, target) => {
|
|
7163
|
+
if (isElementType(target, ["input"])) return () => {
|
|
7164
|
+
setSelectionRange(target, 0, 0);
|
|
7165
|
+
};
|
|
7166
|
+
},
|
|
7167
|
+
Tab: (event, target, instance) => {
|
|
7168
|
+
return () => {
|
|
7169
|
+
const dest = getTabDestination(getActiveElementOrBody(instance.config.document), instance.system.keyboard.modifiers.Shift);
|
|
7170
|
+
focusElement(dest);
|
|
7171
|
+
if (hasOwnSelection(dest)) setUISelection(dest, {
|
|
7172
|
+
anchorOffset: 0,
|
|
7173
|
+
focusOffset: dest.value.length
|
|
7174
|
+
});
|
|
7175
|
+
};
|
|
7176
|
+
}
|
|
7177
|
+
};
|
|
7178
|
+
combinationBehavior = (event, target, instance) => {
|
|
7179
|
+
if (event.code === "KeyA" && instance.system.keyboard.modifiers.Control) return () => selectAll(target);
|
|
7180
|
+
};
|
|
7181
|
+
})))();
|
|
7182
|
+
}
|
|
7183
|
+
//#endregion
|
|
7184
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keypress.js
|
|
7185
|
+
var ClickInputOnEnter, SubmitSingleInputOnEnter;
|
|
7186
|
+
function init_keypress() {
|
|
7187
|
+
return (init_keypress = __esmMin((() => {
|
|
7188
|
+
init_Clipboard();
|
|
7189
|
+
init_isEditable();
|
|
7190
|
+
init_input();
|
|
7191
|
+
init_registry();
|
|
7192
|
+
behavior.keypress = (event, target, instance) => {
|
|
7193
|
+
if (event.key === "Enter") {
|
|
7194
|
+
if (isElementType(target, "button") || isElementType(target, "input") && ClickInputOnEnter.includes(target.type) || isElementType(target, "a") && Boolean(target.href)) return () => {
|
|
7195
|
+
instance.dispatchUIEvent(target, "click");
|
|
7196
|
+
};
|
|
7197
|
+
else if (isElementType(target, "input")) {
|
|
7198
|
+
const form = target.form;
|
|
7199
|
+
const submit = form === null || form === void 0 ? void 0 : form.querySelector("input[type=\"submit\"], button:not([type]), button[type=\"submit\"]");
|
|
7200
|
+
if (submit) return () => instance.dispatchUIEvent(submit, "click");
|
|
7201
|
+
else if (form && SubmitSingleInputOnEnter.includes(target.type) && form.querySelectorAll("input").length === 1) return () => instance.dispatchUIEvent(form, "submit");
|
|
7202
|
+
else return;
|
|
7203
|
+
}
|
|
7204
|
+
}
|
|
7205
|
+
if (isEditable(target)) {
|
|
7206
|
+
const inputType = event.key === "Enter" ? isContentEditable(target) && !instance.system.keyboard.modifiers.Shift ? "insertParagraph" : "insertLineBreak" : "insertText";
|
|
7207
|
+
const inputData = event.key === "Enter" ? "\n" : event.key;
|
|
7208
|
+
return () => input(instance, target, inputData, inputType);
|
|
7209
|
+
}
|
|
7210
|
+
};
|
|
7211
|
+
ClickInputOnEnter = [
|
|
7212
|
+
"button",
|
|
7213
|
+
"color",
|
|
7214
|
+
"file",
|
|
7215
|
+
"image",
|
|
7216
|
+
"reset",
|
|
7217
|
+
"submit"
|
|
7218
|
+
];
|
|
7219
|
+
SubmitSingleInputOnEnter = [
|
|
7220
|
+
"email",
|
|
7221
|
+
"month",
|
|
7222
|
+
"password",
|
|
7223
|
+
"search",
|
|
7224
|
+
"tel",
|
|
7225
|
+
"text",
|
|
7226
|
+
"url",
|
|
7227
|
+
"week"
|
|
7228
|
+
];
|
|
7229
|
+
})))();
|
|
7230
|
+
}
|
|
7231
|
+
//#endregion
|
|
7232
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keyup.js
|
|
7233
|
+
var keyupBehavior;
|
|
7234
|
+
function init_keyup() {
|
|
7235
|
+
return (init_keyup = __esmMin((() => {
|
|
7236
|
+
init_isClickableInput();
|
|
7237
|
+
init_Clipboard();
|
|
7238
|
+
init_registry();
|
|
7239
|
+
behavior.keyup = (event, target, instance) => {
|
|
7240
|
+
var _keyupBehavior_event_key;
|
|
7241
|
+
return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
|
|
7242
|
+
};
|
|
7243
|
+
keyupBehavior = { " ": (event, target, instance) => {
|
|
7244
|
+
if (isClickableInput(target)) return () => instance.dispatchUIEvent(target, "click");
|
|
7245
|
+
} };
|
|
7246
|
+
})))();
|
|
7247
|
+
}
|
|
7248
|
+
//#endregion
|
|
7249
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/paste.js
|
|
7250
|
+
function init_paste() {
|
|
7251
|
+
return (init_paste = __esmMin((() => {
|
|
7252
|
+
init_Clipboard();
|
|
7253
|
+
init_isEditable();
|
|
7254
|
+
init_input();
|
|
7255
|
+
init_registry();
|
|
7256
|
+
behavior.paste = (event, target, instance) => {
|
|
7257
|
+
if (isEditable(target)) return () => {
|
|
7258
|
+
var _event_clipboardData;
|
|
7259
|
+
const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData("text");
|
|
7260
|
+
if (insertData) input(instance, target, insertData, "insertFromPaste");
|
|
7261
|
+
};
|
|
7262
|
+
};
|
|
7263
|
+
})))();
|
|
7264
|
+
}
|
|
7265
|
+
//#endregion
|
|
7266
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/eventMap.js
|
|
7267
|
+
function getEventClass(type) {
|
|
7268
|
+
return eventMap[type].EventType;
|
|
7269
|
+
}
|
|
7270
|
+
function isMouseEvent(type) {
|
|
7271
|
+
return mouseEvents.includes(getEventClass(type));
|
|
7272
|
+
}
|
|
7273
|
+
function isKeyboardEvent(type) {
|
|
7274
|
+
return getEventClass(type) === "KeyboardEvent";
|
|
7275
|
+
}
|
|
7276
|
+
var eventMap, mouseEvents;
|
|
7277
|
+
function init_eventMap() {
|
|
7278
|
+
return (init_eventMap = __esmMin((() => {
|
|
7279
|
+
eventMap = {
|
|
7280
|
+
auxclick: {
|
|
7281
|
+
EventType: "PointerEvent",
|
|
7282
|
+
defaultInit: {
|
|
7283
|
+
bubbles: true,
|
|
7284
|
+
cancelable: true,
|
|
7285
|
+
composed: true
|
|
7286
|
+
}
|
|
7287
|
+
},
|
|
7288
|
+
beforeinput: {
|
|
7289
|
+
EventType: "InputEvent",
|
|
7290
|
+
defaultInit: {
|
|
7291
|
+
bubbles: true,
|
|
7292
|
+
cancelable: true,
|
|
7293
|
+
composed: true
|
|
7294
|
+
}
|
|
7295
|
+
},
|
|
7296
|
+
blur: {
|
|
7297
|
+
EventType: "FocusEvent",
|
|
7298
|
+
defaultInit: {
|
|
7299
|
+
bubbles: false,
|
|
7300
|
+
cancelable: false,
|
|
7301
|
+
composed: true
|
|
7302
|
+
}
|
|
7303
|
+
},
|
|
7304
|
+
click: {
|
|
7305
|
+
EventType: "PointerEvent",
|
|
7306
|
+
defaultInit: {
|
|
7307
|
+
bubbles: true,
|
|
7308
|
+
cancelable: true,
|
|
7309
|
+
composed: true
|
|
7310
|
+
}
|
|
7311
|
+
},
|
|
7312
|
+
contextmenu: {
|
|
7313
|
+
EventType: "PointerEvent",
|
|
7314
|
+
defaultInit: {
|
|
7315
|
+
bubbles: true,
|
|
7316
|
+
cancelable: true,
|
|
7317
|
+
composed: true
|
|
7318
|
+
}
|
|
7319
|
+
},
|
|
7320
|
+
copy: {
|
|
7321
|
+
EventType: "ClipboardEvent",
|
|
7322
|
+
defaultInit: {
|
|
7323
|
+
bubbles: true,
|
|
7324
|
+
cancelable: true,
|
|
7325
|
+
composed: true
|
|
7326
|
+
}
|
|
7327
|
+
},
|
|
7328
|
+
change: {
|
|
7329
|
+
EventType: "Event",
|
|
7330
|
+
defaultInit: {
|
|
7331
|
+
bubbles: true,
|
|
7332
|
+
cancelable: false
|
|
7333
|
+
}
|
|
7334
|
+
},
|
|
7335
|
+
cut: {
|
|
7336
|
+
EventType: "ClipboardEvent",
|
|
7337
|
+
defaultInit: {
|
|
7338
|
+
bubbles: true,
|
|
7339
|
+
cancelable: true,
|
|
7340
|
+
composed: true
|
|
7341
|
+
}
|
|
7342
|
+
},
|
|
7343
|
+
dblclick: {
|
|
7344
|
+
EventType: "MouseEvent",
|
|
7345
|
+
defaultInit: {
|
|
7346
|
+
bubbles: true,
|
|
7347
|
+
cancelable: true,
|
|
7348
|
+
composed: true
|
|
7349
|
+
}
|
|
7350
|
+
},
|
|
7351
|
+
focus: {
|
|
7352
|
+
EventType: "FocusEvent",
|
|
7353
|
+
defaultInit: {
|
|
7354
|
+
bubbles: false,
|
|
7355
|
+
cancelable: false,
|
|
7356
|
+
composed: true
|
|
7357
|
+
}
|
|
7358
|
+
},
|
|
7359
|
+
focusin: {
|
|
7360
|
+
EventType: "FocusEvent",
|
|
7361
|
+
defaultInit: {
|
|
7362
|
+
bubbles: true,
|
|
7363
|
+
cancelable: false,
|
|
7364
|
+
composed: true
|
|
7365
|
+
}
|
|
7366
|
+
},
|
|
7367
|
+
focusout: {
|
|
7368
|
+
EventType: "FocusEvent",
|
|
7369
|
+
defaultInit: {
|
|
7370
|
+
bubbles: true,
|
|
7371
|
+
cancelable: false,
|
|
7372
|
+
composed: true
|
|
7373
|
+
}
|
|
7374
|
+
},
|
|
7375
|
+
keydown: {
|
|
7376
|
+
EventType: "KeyboardEvent",
|
|
7377
|
+
defaultInit: {
|
|
7378
|
+
bubbles: true,
|
|
7379
|
+
cancelable: true,
|
|
7380
|
+
composed: true
|
|
7381
|
+
}
|
|
7382
|
+
},
|
|
7383
|
+
keypress: {
|
|
7384
|
+
EventType: "KeyboardEvent",
|
|
7385
|
+
defaultInit: {
|
|
7386
|
+
bubbles: true,
|
|
7387
|
+
cancelable: true,
|
|
7388
|
+
composed: true
|
|
7389
|
+
}
|
|
7390
|
+
},
|
|
7391
|
+
keyup: {
|
|
7392
|
+
EventType: "KeyboardEvent",
|
|
7393
|
+
defaultInit: {
|
|
7394
|
+
bubbles: true,
|
|
7395
|
+
cancelable: true,
|
|
7396
|
+
composed: true
|
|
7397
|
+
}
|
|
7398
|
+
},
|
|
7399
|
+
paste: {
|
|
7400
|
+
EventType: "ClipboardEvent",
|
|
7401
|
+
defaultInit: {
|
|
7402
|
+
bubbles: true,
|
|
7403
|
+
cancelable: true,
|
|
7404
|
+
composed: true
|
|
7405
|
+
}
|
|
7406
|
+
},
|
|
7407
|
+
input: {
|
|
7408
|
+
EventType: "InputEvent",
|
|
7409
|
+
defaultInit: {
|
|
7410
|
+
bubbles: true,
|
|
7411
|
+
cancelable: false,
|
|
7412
|
+
composed: true
|
|
7413
|
+
}
|
|
7414
|
+
},
|
|
7415
|
+
mousedown: {
|
|
7416
|
+
EventType: "MouseEvent",
|
|
7417
|
+
defaultInit: {
|
|
7418
|
+
bubbles: true,
|
|
7419
|
+
cancelable: true,
|
|
7420
|
+
composed: true
|
|
7421
|
+
}
|
|
7422
|
+
},
|
|
7423
|
+
mouseenter: {
|
|
7424
|
+
EventType: "MouseEvent",
|
|
7425
|
+
defaultInit: {
|
|
7426
|
+
bubbles: false,
|
|
7427
|
+
cancelable: false,
|
|
7428
|
+
composed: true
|
|
7429
|
+
}
|
|
7430
|
+
},
|
|
7431
|
+
mouseleave: {
|
|
7432
|
+
EventType: "MouseEvent",
|
|
7433
|
+
defaultInit: {
|
|
7434
|
+
bubbles: false,
|
|
7435
|
+
cancelable: false,
|
|
7436
|
+
composed: true
|
|
7437
|
+
}
|
|
7438
|
+
},
|
|
7439
|
+
mousemove: {
|
|
7440
|
+
EventType: "MouseEvent",
|
|
7441
|
+
defaultInit: {
|
|
7442
|
+
bubbles: true,
|
|
7443
|
+
cancelable: true,
|
|
7444
|
+
composed: true
|
|
7445
|
+
}
|
|
7446
|
+
},
|
|
7447
|
+
mouseout: {
|
|
7448
|
+
EventType: "MouseEvent",
|
|
7449
|
+
defaultInit: {
|
|
7450
|
+
bubbles: true,
|
|
7451
|
+
cancelable: true,
|
|
7452
|
+
composed: true
|
|
7453
|
+
}
|
|
7454
|
+
},
|
|
7455
|
+
mouseover: {
|
|
7456
|
+
EventType: "MouseEvent",
|
|
7457
|
+
defaultInit: {
|
|
7458
|
+
bubbles: true,
|
|
7459
|
+
cancelable: true,
|
|
7460
|
+
composed: true
|
|
7461
|
+
}
|
|
7462
|
+
},
|
|
7463
|
+
mouseup: {
|
|
7464
|
+
EventType: "MouseEvent",
|
|
7465
|
+
defaultInit: {
|
|
7466
|
+
bubbles: true,
|
|
7467
|
+
cancelable: true,
|
|
7468
|
+
composed: true
|
|
7469
|
+
}
|
|
7470
|
+
},
|
|
7471
|
+
pointerover: {
|
|
7472
|
+
EventType: "PointerEvent",
|
|
7473
|
+
defaultInit: {
|
|
7474
|
+
bubbles: true,
|
|
7475
|
+
cancelable: true,
|
|
7476
|
+
composed: true
|
|
7477
|
+
}
|
|
7478
|
+
},
|
|
7479
|
+
pointerenter: {
|
|
7480
|
+
EventType: "PointerEvent",
|
|
7481
|
+
defaultInit: {
|
|
7482
|
+
bubbles: false,
|
|
7483
|
+
cancelable: false
|
|
7484
|
+
}
|
|
7485
|
+
},
|
|
7486
|
+
pointerdown: {
|
|
7487
|
+
EventType: "PointerEvent",
|
|
7488
|
+
defaultInit: {
|
|
7489
|
+
bubbles: true,
|
|
7490
|
+
cancelable: true,
|
|
7491
|
+
composed: true
|
|
7492
|
+
}
|
|
7493
|
+
},
|
|
7494
|
+
pointermove: {
|
|
7495
|
+
EventType: "PointerEvent",
|
|
7496
|
+
defaultInit: {
|
|
7497
|
+
bubbles: true,
|
|
7498
|
+
cancelable: true,
|
|
7499
|
+
composed: true
|
|
7500
|
+
}
|
|
7501
|
+
},
|
|
7502
|
+
pointerup: {
|
|
7503
|
+
EventType: "PointerEvent",
|
|
7504
|
+
defaultInit: {
|
|
7505
|
+
bubbles: true,
|
|
7506
|
+
cancelable: true,
|
|
7507
|
+
composed: true
|
|
7508
|
+
}
|
|
7509
|
+
},
|
|
7510
|
+
pointercancel: {
|
|
7511
|
+
EventType: "PointerEvent",
|
|
7512
|
+
defaultInit: {
|
|
7513
|
+
bubbles: true,
|
|
7514
|
+
cancelable: false,
|
|
7515
|
+
composed: true
|
|
7516
|
+
}
|
|
7517
|
+
},
|
|
7518
|
+
pointerout: {
|
|
7519
|
+
EventType: "PointerEvent",
|
|
7520
|
+
defaultInit: {
|
|
7521
|
+
bubbles: true,
|
|
7522
|
+
cancelable: true,
|
|
7523
|
+
composed: true
|
|
7524
|
+
}
|
|
7525
|
+
},
|
|
7526
|
+
pointerleave: {
|
|
7527
|
+
EventType: "PointerEvent",
|
|
7528
|
+
defaultInit: {
|
|
7529
|
+
bubbles: false,
|
|
7530
|
+
cancelable: false
|
|
7531
|
+
}
|
|
7532
|
+
},
|
|
7533
|
+
submit: {
|
|
7534
|
+
EventType: "Event",
|
|
7535
|
+
defaultInit: {
|
|
7536
|
+
bubbles: true,
|
|
7537
|
+
cancelable: true
|
|
7538
|
+
}
|
|
7539
|
+
}
|
|
7540
|
+
};
|
|
7541
|
+
mouseEvents = ["MouseEvent", "PointerEvent"];
|
|
7542
|
+
})))();
|
|
7543
|
+
}
|
|
7544
|
+
//#endregion
|
|
7545
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/createEvent.js
|
|
7546
|
+
function createEvent(type, target, init) {
|
|
7547
|
+
const window = getWindow(target);
|
|
7548
|
+
const { EventType, defaultInit } = eventMap[type];
|
|
7549
|
+
const event = new (getEventConstructors(window))[EventType](type, defaultInit);
|
|
7550
|
+
eventInitializer[EventType].forEach((f) => f(event, init !== null && init !== void 0 ? init : {}));
|
|
7551
|
+
return event;
|
|
7552
|
+
}
|
|
7553
|
+
/* istanbul ignore next */ function getEventConstructors(window) {
|
|
7554
|
+
var _window_Event, _window_AnimationEvent, _window_ClipboardEvent, _window_PopStateEvent, _window_ProgressEvent, _window_TransitionEvent, _window_UIEvent, _window_CompositionEvent, _window_FocusEvent, _window_InputEvent, _window_KeyboardEvent, _window_MouseEvent, _window_DragEvent, _window_PointerEvent, _window_TouchEvent;
|
|
7555
|
+
const Event = (_window_Event = window.Event) !== null && _window_Event !== void 0 ? _window_Event : class Event {};
|
|
7556
|
+
const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class AnimationEvent extends Event {};
|
|
7557
|
+
const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class ClipboardEvent extends Event {};
|
|
7558
|
+
const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class PopStateEvent extends Event {};
|
|
7559
|
+
const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class ProgressEvent extends Event {};
|
|
7560
|
+
const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class TransitionEvent extends Event {};
|
|
7561
|
+
const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class UIEvent extends Event {};
|
|
7562
|
+
const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class CompositionEvent extends UIEvent {};
|
|
7563
|
+
const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class FocusEvent extends UIEvent {};
|
|
7564
|
+
const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class InputEvent extends UIEvent {};
|
|
7565
|
+
const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {};
|
|
7566
|
+
const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class MouseEvent extends UIEvent {};
|
|
7567
|
+
return {
|
|
7568
|
+
Event,
|
|
7569
|
+
AnimationEvent,
|
|
7570
|
+
ClipboardEvent,
|
|
7571
|
+
PopStateEvent,
|
|
7572
|
+
ProgressEvent,
|
|
7573
|
+
TransitionEvent,
|
|
7574
|
+
UIEvent,
|
|
7575
|
+
CompositionEvent,
|
|
7576
|
+
FocusEvent,
|
|
7577
|
+
InputEvent,
|
|
7578
|
+
KeyboardEvent,
|
|
7579
|
+
MouseEvent,
|
|
7580
|
+
DragEvent: (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class DragEvent extends MouseEvent {},
|
|
7581
|
+
PointerEvent: (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class PointerEvent extends MouseEvent {},
|
|
7582
|
+
TouchEvent: (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class TouchEvent extends UIEvent {}
|
|
7583
|
+
};
|
|
7584
|
+
}
|
|
7585
|
+
function assignProps(obj, props) {
|
|
7586
|
+
for (const [key, value] of Object.entries(props)) Object.defineProperty(obj, key, { get: () => value !== null && value !== void 0 ? value : null });
|
|
7587
|
+
}
|
|
7588
|
+
function sanitizeNumber(n) {
|
|
7589
|
+
return Number(n !== null && n !== void 0 ? n : 0);
|
|
7590
|
+
}
|
|
7591
|
+
function initClipboardEvent(event, { clipboardData }) {
|
|
7592
|
+
assignProps(event, { clipboardData });
|
|
7593
|
+
}
|
|
7594
|
+
function initFocusEvent(event, { relatedTarget }) {
|
|
7595
|
+
assignProps(event, { relatedTarget });
|
|
7596
|
+
}
|
|
7597
|
+
function initInputEvent(event, { data, inputType, isComposing }) {
|
|
7598
|
+
assignProps(event, {
|
|
7599
|
+
data,
|
|
7600
|
+
isComposing: Boolean(isComposing),
|
|
7601
|
+
inputType: String(inputType)
|
|
7602
|
+
});
|
|
7603
|
+
}
|
|
7604
|
+
function initUIEvent(event, { view, detail }) {
|
|
7605
|
+
assignProps(event, {
|
|
7606
|
+
view,
|
|
7607
|
+
detail: sanitizeNumber(detail !== null && detail !== void 0 ? detail : 0)
|
|
7608
|
+
});
|
|
7609
|
+
}
|
|
7610
|
+
function initUIEventModifiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
|
|
7611
|
+
assignProps(event, {
|
|
7612
|
+
altKey: Boolean(altKey),
|
|
7613
|
+
ctrlKey: Boolean(ctrlKey),
|
|
7614
|
+
metaKey: Boolean(metaKey),
|
|
7615
|
+
shiftKey: Boolean(shiftKey),
|
|
7616
|
+
getModifierState(k) {
|
|
7617
|
+
return Boolean({
|
|
7618
|
+
Alt: altKey,
|
|
7619
|
+
AltGraph: modifierAltGraph,
|
|
7620
|
+
CapsLock: modifierCapsLock,
|
|
7621
|
+
Control: ctrlKey,
|
|
7622
|
+
Fn: modifierFn,
|
|
7623
|
+
FnLock: modifierFnLock,
|
|
7624
|
+
Meta: metaKey,
|
|
7625
|
+
NumLock: modifierNumLock,
|
|
7626
|
+
ScrollLock: modifierScrollLock,
|
|
7627
|
+
Shift: shiftKey,
|
|
7628
|
+
Symbol: modifierSymbol,
|
|
7629
|
+
SymbolLock: modifierSymbolLock
|
|
7630
|
+
}[k]);
|
|
7631
|
+
}
|
|
7632
|
+
});
|
|
7633
|
+
}
|
|
7634
|
+
function initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {
|
|
7635
|
+
assignProps(event, {
|
|
7636
|
+
key: String(key),
|
|
7637
|
+
code: String(code),
|
|
7638
|
+
location: sanitizeNumber(location),
|
|
7639
|
+
repeat: Boolean(repeat),
|
|
7640
|
+
isComposing: Boolean(isComposing),
|
|
7641
|
+
charCode
|
|
7642
|
+
});
|
|
7643
|
+
}
|
|
7644
|
+
function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget, offsetX, offsetY, pageX, pageY }) {
|
|
7645
|
+
assignProps(event, {
|
|
7646
|
+
screenX: sanitizeNumber(screenX),
|
|
7647
|
+
screenY: sanitizeNumber(screenY),
|
|
7648
|
+
clientX: sanitizeNumber(clientX),
|
|
7649
|
+
x: sanitizeNumber(clientX),
|
|
7650
|
+
clientY: sanitizeNumber(clientY),
|
|
7651
|
+
y: sanitizeNumber(clientY),
|
|
7652
|
+
button: sanitizeNumber(button),
|
|
7653
|
+
buttons: sanitizeNumber(buttons),
|
|
7654
|
+
relatedTarget,
|
|
7655
|
+
offsetX: sanitizeNumber(offsetX),
|
|
7656
|
+
offsetY: sanitizeNumber(offsetY),
|
|
7657
|
+
pageX: sanitizeNumber(pageX),
|
|
7658
|
+
pageY: sanitizeNumber(pageY)
|
|
7659
|
+
});
|
|
7660
|
+
}
|
|
7661
|
+
function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary, buttons }) {
|
|
7662
|
+
assignProps(event, {
|
|
7663
|
+
pointerId: sanitizeNumber(pointerId),
|
|
7664
|
+
width: sanitizeNumber(width !== null && width !== void 0 ? width : 1),
|
|
7665
|
+
height: sanitizeNumber(height !== null && height !== void 0 ? height : 1),
|
|
7666
|
+
pressure: sanitizeNumber(pressure !== null && pressure !== void 0 ? pressure : buttons ? .5 : 0),
|
|
7667
|
+
tangentialPressure: sanitizeNumber(tangentialPressure),
|
|
7668
|
+
tiltX: sanitizeNumber(tiltX),
|
|
7669
|
+
tiltY: sanitizeNumber(tiltY),
|
|
7670
|
+
twist: sanitizeNumber(twist),
|
|
7671
|
+
pointerType: String(pointerType !== null && pointerType !== void 0 ? pointerType : ""),
|
|
7672
|
+
isPrimary: Boolean(isPrimary)
|
|
7673
|
+
});
|
|
7674
|
+
}
|
|
7675
|
+
var eventInitializer;
|
|
7676
|
+
function init_createEvent() {
|
|
7677
|
+
return (init_createEvent = __esmMin((() => {
|
|
7678
|
+
init_Clipboard();
|
|
7679
|
+
init_eventMap();
|
|
7680
|
+
eventInitializer = {
|
|
7681
|
+
ClipboardEvent: [initClipboardEvent],
|
|
7682
|
+
Event: [],
|
|
7683
|
+
FocusEvent: [initUIEvent, initFocusEvent],
|
|
7684
|
+
InputEvent: [initUIEvent, initInputEvent],
|
|
7685
|
+
MouseEvent: [
|
|
7686
|
+
initUIEvent,
|
|
7687
|
+
initUIEventModifiers,
|
|
7688
|
+
initMouseEvent
|
|
7689
|
+
],
|
|
7690
|
+
PointerEvent: [
|
|
7691
|
+
initUIEvent,
|
|
7692
|
+
initUIEventModifiers,
|
|
7693
|
+
initMouseEvent,
|
|
7694
|
+
initPointerEvent
|
|
7695
|
+
],
|
|
7696
|
+
KeyboardEvent: [
|
|
7697
|
+
initUIEvent,
|
|
7698
|
+
initUIEventModifiers,
|
|
7699
|
+
initKeyboardEvent
|
|
7700
|
+
]
|
|
7701
|
+
};
|
|
7702
|
+
})))();
|
|
7703
|
+
}
|
|
7704
|
+
//#endregion
|
|
7705
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/dispatchEvent.js
|
|
7706
|
+
function dispatchUIEvent(target, type, init, preventDefault = false) {
|
|
7707
|
+
if (isMouseEvent(type) || isKeyboardEvent(type)) init = {
|
|
7708
|
+
...init,
|
|
7709
|
+
...this.system.getUIEventModifiers()
|
|
7710
|
+
};
|
|
7711
|
+
const event = createEvent(type, target, init);
|
|
7712
|
+
return dispatchEvent.call(this, target, event, preventDefault);
|
|
7713
|
+
}
|
|
7714
|
+
function dispatchEvent(target, event, preventDefault = false) {
|
|
7715
|
+
var _behavior_type;
|
|
7716
|
+
const type = event.type;
|
|
7717
|
+
const behaviorImplementation = preventDefault ? () => {} : (_behavior_type = behavior[type]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
|
|
7718
|
+
if (behaviorImplementation) {
|
|
7719
|
+
event.preventDefault();
|
|
7720
|
+
let defaultPrevented = false;
|
|
7721
|
+
Object.defineProperty(event, "defaultPrevented", { get: () => defaultPrevented });
|
|
7722
|
+
Object.defineProperty(event, "preventDefault", { value: () => {
|
|
7723
|
+
defaultPrevented = event.cancelable;
|
|
7724
|
+
} });
|
|
7725
|
+
wrapEvent(() => target.dispatchEvent(event));
|
|
7726
|
+
if (!defaultPrevented) behaviorImplementation();
|
|
7727
|
+
return !defaultPrevented;
|
|
7728
|
+
}
|
|
7729
|
+
return wrapEvent(() => target.dispatchEvent(event));
|
|
7730
|
+
}
|
|
7731
|
+
function dispatchDOMEvent(target, type, init) {
|
|
7732
|
+
const event = createEvent(type, target, init);
|
|
7733
|
+
wrapEvent(() => target.dispatchEvent(event));
|
|
7734
|
+
}
|
|
7735
|
+
function init_dispatchEvent() {
|
|
7736
|
+
return (init_dispatchEvent = __esmMin((() => {
|
|
7737
|
+
init_click();
|
|
7738
|
+
init_cut();
|
|
7739
|
+
init_keydown();
|
|
7740
|
+
init_keypress();
|
|
7741
|
+
init_keyup();
|
|
7742
|
+
init_paste();
|
|
7743
|
+
init_registry();
|
|
7744
|
+
init_wrapEvent();
|
|
7745
|
+
init_eventMap();
|
|
7746
|
+
init_createEvent();
|
|
7747
|
+
})))();
|
|
7748
|
+
}
|
|
7749
|
+
//#endregion
|
|
7750
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/document/patchFocus.js
|
|
7751
|
+
function patchFocus(HTMLElement) {
|
|
7752
|
+
if (HTMLElement.prototype[patched]) return;
|
|
7753
|
+
const { focus, blur } = HTMLElement.prototype;
|
|
7754
|
+
Object.defineProperties(HTMLElement.prototype, {
|
|
7755
|
+
focus: {
|
|
7756
|
+
configurable: true,
|
|
7757
|
+
value: patchedFocus,
|
|
7758
|
+
writable: true
|
|
7759
|
+
},
|
|
7760
|
+
blur: {
|
|
7761
|
+
configurable: true,
|
|
7762
|
+
value: patchedBlur,
|
|
7763
|
+
writable: true
|
|
7764
|
+
},
|
|
7765
|
+
[patched]: {
|
|
7766
|
+
configurable: true,
|
|
7767
|
+
get: () => ({
|
|
7768
|
+
focus,
|
|
7769
|
+
blur
|
|
7770
|
+
})
|
|
7771
|
+
}
|
|
7772
|
+
});
|
|
7773
|
+
let activeCall;
|
|
7774
|
+
function patchedFocus(options) {
|
|
7775
|
+
if (this.ownerDocument.visibilityState !== "hidden") return focus.call(this, options);
|
|
7776
|
+
const blurred = getActiveTarget(this.ownerDocument);
|
|
7777
|
+
if (blurred === this) return;
|
|
7778
|
+
const thisCall = Symbol("focus call");
|
|
7779
|
+
activeCall = thisCall;
|
|
7780
|
+
if (blurred) {
|
|
7781
|
+
blur.call(blurred);
|
|
7782
|
+
dispatchDOMEvent(blurred, "blur", { relatedTarget: this });
|
|
7783
|
+
dispatchDOMEvent(blurred, "focusout", { relatedTarget: activeCall === thisCall ? this : null });
|
|
7784
|
+
}
|
|
7785
|
+
if (activeCall === thisCall) {
|
|
7786
|
+
focus.call(this, options);
|
|
7787
|
+
dispatchDOMEvent(this, "focus", { relatedTarget: blurred });
|
|
7788
|
+
}
|
|
7789
|
+
if (activeCall === thisCall) dispatchDOMEvent(this, "focusin", { relatedTarget: blurred });
|
|
7790
|
+
}
|
|
7791
|
+
function patchedBlur() {
|
|
7792
|
+
if (this.ownerDocument.visibilityState !== "hidden") return blur.call(this);
|
|
7793
|
+
const blurred = getActiveTarget(this.ownerDocument);
|
|
7794
|
+
if (blurred !== this) return;
|
|
7795
|
+
activeCall = Symbol("blur call");
|
|
7796
|
+
blur.call(this);
|
|
7797
|
+
dispatchDOMEvent(blurred, "blur", { relatedTarget: null });
|
|
7798
|
+
dispatchDOMEvent(blurred, "focusout", { relatedTarget: null });
|
|
7799
|
+
}
|
|
7800
|
+
}
|
|
7801
|
+
function getActiveTarget(document) {
|
|
7802
|
+
const active = getActiveElement(document);
|
|
7803
|
+
return (active === null || active === void 0 ? void 0 : active.tagName) === "BODY" ? null : active;
|
|
7804
|
+
}
|
|
7805
|
+
var patched;
|
|
7806
|
+
function init_patchFocus() {
|
|
7807
|
+
return (init_patchFocus = __esmMin((() => {
|
|
7808
|
+
init_dispatchEvent();
|
|
7809
|
+
init_Clipboard();
|
|
7810
|
+
init_getActiveElement();
|
|
7811
|
+
init_dom_esm();
|
|
7812
|
+
patched = Symbol("patched focus/blur methods");
|
|
7813
|
+
})))();
|
|
7814
|
+
}
|
|
7815
|
+
//#endregion
|
|
7816
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/document/interceptor.js
|
|
7817
|
+
function prepareInterceptor(element, propName, interceptorImpl) {
|
|
7818
|
+
const prototypeDescriptor = Object.getOwnPropertyDescriptor(element.constructor.prototype, propName);
|
|
7819
|
+
const objectDescriptor = Object.getOwnPropertyDescriptor(element, propName);
|
|
7820
|
+
const target = (prototypeDescriptor === null || prototypeDescriptor === void 0 ? void 0 : prototypeDescriptor.set) ? "set" : "value";
|
|
7821
|
+
/* istanbul ignore if */ if (typeof (prototypeDescriptor === null || prototypeDescriptor === void 0 ? void 0 : prototypeDescriptor[target]) !== "function" || prototypeDescriptor[target][Interceptor]) throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
|
|
7822
|
+
function intercept(...args) {
|
|
7823
|
+
const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);
|
|
7824
|
+
const sourceDescriptor = !applyNative && objectDescriptor ? objectDescriptor : prototypeDescriptor;
|
|
7825
|
+
const realFunc = sourceDescriptor === null || sourceDescriptor === void 0 ? void 0 : sourceDescriptor[target];
|
|
7826
|
+
if (target === "set") realFunc.call(this, realArgs);
|
|
7827
|
+
else realFunc.call(this, ...realArgs);
|
|
7828
|
+
then === null || then === void 0 || then();
|
|
7829
|
+
}
|
|
7830
|
+
intercept[Interceptor] = Interceptor;
|
|
7831
|
+
Object.defineProperty(element, propName, {
|
|
7832
|
+
...objectDescriptor !== null && objectDescriptor !== void 0 ? objectDescriptor : prototypeDescriptor,
|
|
7833
|
+
[target]: intercept
|
|
7834
|
+
});
|
|
7835
|
+
}
|
|
7836
|
+
function prepareValueInterceptor(element) {
|
|
7837
|
+
prepareInterceptor(element, "value", function interceptorImpl(v) {
|
|
7838
|
+
const value = v === null ? "" : v;
|
|
7839
|
+
const isUI = isUIValue(value);
|
|
7840
|
+
if (isUI) startTrackValue(this);
|
|
7841
|
+
return {
|
|
7842
|
+
applyNative: !!isUI,
|
|
7843
|
+
realArgs: sanitizeValue(this, value),
|
|
7844
|
+
then: isUI ? void 0 : () => trackOrSetValue(this, String(value))
|
|
7845
|
+
};
|
|
7846
|
+
});
|
|
7847
|
+
}
|
|
7848
|
+
function sanitizeValue(element, v) {
|
|
7849
|
+
if (isElementType(element, "input", { type: "number" }) && String(v) !== "" && !Number.isNaN(Number(v))) return String(Number(v));
|
|
7850
|
+
return String(v);
|
|
7851
|
+
}
|
|
7852
|
+
function prepareSelectionInterceptor(element) {
|
|
7853
|
+
prepareInterceptor(element, "setSelectionRange", function interceptorImpl(start, ...others) {
|
|
7854
|
+
const isUI = isUISelectionStart(start);
|
|
7855
|
+
return {
|
|
7856
|
+
applyNative: !!isUI,
|
|
7857
|
+
realArgs: [Number(start), ...others],
|
|
7858
|
+
then: () => isUI ? void 0 : setUISelectionClean(element)
|
|
7859
|
+
};
|
|
7860
|
+
});
|
|
7861
|
+
prepareInterceptor(element, "selectionStart", function interceptorImpl(v) {
|
|
7862
|
+
return {
|
|
7863
|
+
realArgs: v,
|
|
7864
|
+
then: () => setUISelectionClean(element)
|
|
7865
|
+
};
|
|
7866
|
+
});
|
|
7867
|
+
prepareInterceptor(element, "selectionEnd", function interceptorImpl(v) {
|
|
7868
|
+
return {
|
|
7869
|
+
realArgs: v,
|
|
7870
|
+
then: () => setUISelectionClean(element)
|
|
7871
|
+
};
|
|
7872
|
+
});
|
|
7873
|
+
prepareInterceptor(element, "select", function interceptorImpl() {
|
|
7874
|
+
return {
|
|
7875
|
+
realArgs: [],
|
|
7876
|
+
then: () => setUISelectionRaw(element, {
|
|
7877
|
+
anchorOffset: 0,
|
|
7878
|
+
focusOffset: getUIValue(element).length
|
|
7879
|
+
})
|
|
7880
|
+
};
|
|
7881
|
+
});
|
|
7882
|
+
}
|
|
7883
|
+
function prepareRangeTextInterceptor(element) {
|
|
7884
|
+
prepareInterceptor(element, "setRangeText", function interceptorImpl(...realArgs) {
|
|
7885
|
+
return {
|
|
7886
|
+
realArgs,
|
|
7887
|
+
then: () => {
|
|
7888
|
+
setUIValueClean(element);
|
|
7889
|
+
setUISelectionClean(element);
|
|
7890
|
+
}
|
|
7891
|
+
};
|
|
7892
|
+
});
|
|
7893
|
+
}
|
|
7894
|
+
var Interceptor;
|
|
7895
|
+
function init_interceptor() {
|
|
7896
|
+
return (init_interceptor = __esmMin((() => {
|
|
7897
|
+
init_Clipboard();
|
|
7898
|
+
init_trackValue();
|
|
7899
|
+
init_UI();
|
|
7900
|
+
Interceptor = Symbol("Interceptor for programmatical calls");
|
|
7901
|
+
})))();
|
|
7902
|
+
}
|
|
7903
|
+
//#endregion
|
|
7904
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/document/prepareDocument.js
|
|
7905
|
+
function prepareDocument(document) {
|
|
7906
|
+
if (document[isPrepared]) return;
|
|
7907
|
+
document.addEventListener("focus", (e) => {
|
|
7908
|
+
const el = e.target;
|
|
7909
|
+
prepareElement(el);
|
|
7910
|
+
}, {
|
|
7911
|
+
capture: true,
|
|
7912
|
+
passive: true
|
|
7913
|
+
});
|
|
7914
|
+
// istanbul ignore else
|
|
7915
|
+
if (document.activeElement) prepareElement(document.activeElement);
|
|
7916
|
+
document.addEventListener("blur", (e) => {
|
|
7917
|
+
const el = e.target;
|
|
7918
|
+
const initialValue = getInitialValue(el);
|
|
7919
|
+
if (initialValue !== void 0) {
|
|
7920
|
+
if (el.value !== initialValue) dispatchDOMEvent(el, "change");
|
|
7921
|
+
clearInitialValue(el);
|
|
7922
|
+
}
|
|
7923
|
+
}, {
|
|
7924
|
+
capture: true,
|
|
7925
|
+
passive: true
|
|
7926
|
+
});
|
|
7927
|
+
document[isPrepared] = isPrepared;
|
|
7928
|
+
}
|
|
7929
|
+
function prepareElement(el) {
|
|
7930
|
+
if (el[isPrepared]) return;
|
|
7931
|
+
if (isElementType(el, ["input", "textarea"])) {
|
|
7932
|
+
prepareValueInterceptor(el);
|
|
7933
|
+
prepareSelectionInterceptor(el);
|
|
7934
|
+
prepareRangeTextInterceptor(el);
|
|
7935
|
+
}
|
|
7936
|
+
el[isPrepared] = isPrepared;
|
|
7937
|
+
}
|
|
7938
|
+
var isPrepared;
|
|
7939
|
+
function init_prepareDocument() {
|
|
7940
|
+
return (init_prepareDocument = __esmMin((() => {
|
|
7941
|
+
init_dispatchEvent();
|
|
7942
|
+
init_Clipboard();
|
|
7943
|
+
init_UI();
|
|
7944
|
+
init_dom_esm();
|
|
7945
|
+
init_interceptor();
|
|
7946
|
+
isPrepared = Symbol("Node prepared with document state workarounds");
|
|
7947
|
+
})))();
|
|
7948
|
+
}
|
|
7949
|
+
//#endregion
|
|
7950
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getDocumentFromNode.js
|
|
7951
|
+
function getDocumentFromNode(el) {
|
|
7952
|
+
return isDocument(el) ? el : el.ownerDocument;
|
|
7953
|
+
}
|
|
7954
|
+
function isDocument(node) {
|
|
7955
|
+
return node.nodeType === 9;
|
|
7956
|
+
}
|
|
7957
|
+
//#endregion
|
|
7958
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/level.js
|
|
7959
|
+
function setLevelRef(instance, level) {
|
|
7960
|
+
instance.levelRefs[level] = {};
|
|
7961
|
+
}
|
|
7962
|
+
function getLevelRef(instance, level) {
|
|
7963
|
+
return instance.levelRefs[level];
|
|
7964
|
+
}
|
|
7965
|
+
var ApiLevel;
|
|
7966
|
+
function init_level() {
|
|
7967
|
+
return (init_level = __esmMin((() => {
|
|
7968
|
+
ApiLevel = /*#__PURE__*/ function(ApiLevel) {
|
|
7969
|
+
ApiLevel[ApiLevel["Trigger"] = 2] = "Trigger";
|
|
7970
|
+
ApiLevel[ApiLevel["Call"] = 1] = "Call";
|
|
7971
|
+
return ApiLevel;
|
|
7972
|
+
}({});
|
|
7973
|
+
})))();
|
|
7974
|
+
}
|
|
7975
|
+
//#endregion
|
|
7976
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/wait.js
|
|
7977
|
+
function wait(config) {
|
|
7978
|
+
const delay = config.delay;
|
|
7979
|
+
if (typeof delay !== "number") return;
|
|
7980
|
+
return Promise.all([new Promise((resolve) => globalThis.setTimeout(() => resolve(), delay)), config.advanceTimers(delay)]);
|
|
7981
|
+
}
|
|
7982
|
+
//#endregion
|
|
7983
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/options.js
|
|
7984
|
+
var PointerEventsCheckLevel;
|
|
7985
|
+
function init_options() {
|
|
7986
|
+
return (init_options = __esmMin((() => {
|
|
7987
|
+
PointerEventsCheckLevel = /*#__PURE__*/ function(PointerEventsCheckLevel) {
|
|
7988
|
+
/**
|
|
7989
|
+
* Check pointer events on every user interaction that triggers a bunch of events.
|
|
7990
|
+
* E.g. once for releasing a mouse button even though this triggers `pointerup`, `mouseup`, `click`, etc...
|
|
7991
|
+
*/ PointerEventsCheckLevel[PointerEventsCheckLevel["EachTrigger"] = 4] = "EachTrigger";
|
|
7992
|
+
/** Check each target once per call to pointer (related) API */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachApiCall"] = 2] = "EachApiCall";
|
|
7993
|
+
/** Check each event target once */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachTarget"] = 1] = "EachTarget";
|
|
7994
|
+
/** No pointer events check */ PointerEventsCheckLevel[PointerEventsCheckLevel["Never"] = 0] = "Never";
|
|
7995
|
+
return PointerEventsCheckLevel;
|
|
7996
|
+
}({});
|
|
7997
|
+
})))();
|
|
7998
|
+
}
|
|
7999
|
+
//#endregion
|
|
8000
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/keyboard.js
|
|
8001
|
+
function _define_property$6(obj, key, value) {
|
|
8002
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
8003
|
+
value,
|
|
8004
|
+
enumerable: true,
|
|
8005
|
+
configurable: true,
|
|
8006
|
+
writable: true
|
|
8007
|
+
});
|
|
8008
|
+
else obj[key] = value;
|
|
8009
|
+
return obj;
|
|
8010
|
+
}
|
|
8011
|
+
function isModifierKey(key) {
|
|
8012
|
+
return modifierKeys.includes(key);
|
|
8013
|
+
}
|
|
8014
|
+
function isModifierLock(key) {
|
|
8015
|
+
return modifierLocks.includes(key);
|
|
8016
|
+
}
|
|
8017
|
+
var DOM_KEY_LOCATION, modifierKeys, modifierLocks, KeyboardHost;
|
|
8018
|
+
function init_keyboard() {
|
|
8019
|
+
return (init_keyboard = __esmMin((() => {
|
|
8020
|
+
init_Clipboard();
|
|
8021
|
+
init_getActiveElement();
|
|
8022
|
+
DOM_KEY_LOCATION = /*#__PURE__*/ function(DOM_KEY_LOCATION) {
|
|
8023
|
+
DOM_KEY_LOCATION[DOM_KEY_LOCATION["STANDARD"] = 0] = "STANDARD";
|
|
8024
|
+
DOM_KEY_LOCATION[DOM_KEY_LOCATION["LEFT"] = 1] = "LEFT";
|
|
8025
|
+
DOM_KEY_LOCATION[DOM_KEY_LOCATION["RIGHT"] = 2] = "RIGHT";
|
|
8026
|
+
DOM_KEY_LOCATION[DOM_KEY_LOCATION["NUMPAD"] = 3] = "NUMPAD";
|
|
8027
|
+
return DOM_KEY_LOCATION;
|
|
8028
|
+
}({});
|
|
8029
|
+
modifierKeys = [
|
|
8030
|
+
"Alt",
|
|
8031
|
+
"AltGraph",
|
|
8032
|
+
"Control",
|
|
8033
|
+
"Fn",
|
|
8034
|
+
"Meta",
|
|
8035
|
+
"Shift",
|
|
8036
|
+
"Symbol"
|
|
8037
|
+
];
|
|
8038
|
+
modifierLocks = [
|
|
8039
|
+
"CapsLock",
|
|
8040
|
+
"FnLock",
|
|
8041
|
+
"NumLock",
|
|
8042
|
+
"ScrollLock",
|
|
8043
|
+
"SymbolLock"
|
|
8044
|
+
];
|
|
8045
|
+
KeyboardHost = class {
|
|
8046
|
+
isKeyPressed(keyDef) {
|
|
8047
|
+
return this.pressed.has(String(keyDef.code));
|
|
8048
|
+
}
|
|
8049
|
+
getPressedKeys() {
|
|
8050
|
+
return this.pressed.values().map((p) => p.keyDef);
|
|
8051
|
+
}
|
|
8052
|
+
/** Press a key */ async keydown(instance, keyDef, repeat = false) {
|
|
8053
|
+
const key = String(keyDef.key);
|
|
8054
|
+
const code = String(keyDef.code);
|
|
8055
|
+
const target = getActiveElementOrBody(instance.config.document);
|
|
8056
|
+
this.setKeydownTarget(target);
|
|
8057
|
+
this.pressed.add(code, keyDef);
|
|
8058
|
+
if (isModifierKey(key)) this.modifiers[key] = true;
|
|
8059
|
+
const unprevented = instance.dispatchUIEvent(target, "keydown", {
|
|
8060
|
+
key,
|
|
8061
|
+
code,
|
|
8062
|
+
repeat
|
|
8063
|
+
});
|
|
8064
|
+
if (isModifierLock(key) && !this.modifiers[key]) {
|
|
8065
|
+
this.modifiers[key] = true;
|
|
8066
|
+
this.modifierLockStart[key] = true;
|
|
8067
|
+
}
|
|
8068
|
+
if (unprevented) this.pressed.setUnprevented(code);
|
|
8069
|
+
if (unprevented && this.hasKeyPress(key)) instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keypress", {
|
|
8070
|
+
key,
|
|
8071
|
+
code,
|
|
8072
|
+
charCode: keyDef.key === "Enter" ? 13 : String(keyDef.key).charCodeAt(0)
|
|
8073
|
+
});
|
|
8074
|
+
}
|
|
8075
|
+
/** Release a key */ async keyup(instance, keyDef) {
|
|
8076
|
+
const key = String(keyDef.key);
|
|
8077
|
+
const code = String(keyDef.code);
|
|
8078
|
+
const unprevented = this.pressed.isUnprevented(code);
|
|
8079
|
+
this.pressed.delete(code);
|
|
8080
|
+
if (isModifierKey(key) && !this.pressed.values().find((p) => p.keyDef.key === key)) this.modifiers[key] = false;
|
|
8081
|
+
instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keyup", {
|
|
8082
|
+
key,
|
|
8083
|
+
code
|
|
8084
|
+
}, !unprevented);
|
|
8085
|
+
if (isModifierLock(key) && this.modifiers[key]) {
|
|
8086
|
+
if (this.modifierLockStart[key]) this.modifierLockStart[key] = false;
|
|
8087
|
+
else this.modifiers[key] = false;
|
|
8088
|
+
}
|
|
8089
|
+
}
|
|
8090
|
+
setKeydownTarget(target) {
|
|
8091
|
+
if (target !== this.lastKeydownTarget) this.carryChar = "";
|
|
8092
|
+
this.lastKeydownTarget = target;
|
|
8093
|
+
}
|
|
8094
|
+
hasKeyPress(key) {
|
|
8095
|
+
return (key.length === 1 || key === "Enter") && !this.modifiers.Control && !this.modifiers.Alt;
|
|
8096
|
+
}
|
|
8097
|
+
constructor(system) {
|
|
8098
|
+
_define_property$6(this, "system", void 0);
|
|
8099
|
+
_define_property$6(this, "modifiers", {
|
|
8100
|
+
Alt: false,
|
|
8101
|
+
AltGraph: false,
|
|
8102
|
+
CapsLock: false,
|
|
8103
|
+
Control: false,
|
|
8104
|
+
Fn: false,
|
|
8105
|
+
FnLock: false,
|
|
8106
|
+
Meta: false,
|
|
8107
|
+
NumLock: false,
|
|
8108
|
+
ScrollLock: false,
|
|
8109
|
+
Shift: false,
|
|
8110
|
+
Symbol: false,
|
|
8111
|
+
SymbolLock: false
|
|
8112
|
+
});
|
|
8113
|
+
_define_property$6(this, "pressed", new class {
|
|
8114
|
+
add(code, keyDef) {
|
|
8115
|
+
var _this_registry, _code, _;
|
|
8116
|
+
(_ = (_this_registry = this.registry)[_code = code]) !== null && _ !== void 0 || (_this_registry[_code] = {
|
|
8117
|
+
keyDef,
|
|
8118
|
+
unpreventedDefault: false
|
|
8119
|
+
});
|
|
8120
|
+
}
|
|
8121
|
+
has(code) {
|
|
8122
|
+
return !!this.registry[code];
|
|
8123
|
+
}
|
|
8124
|
+
setUnprevented(code) {
|
|
8125
|
+
const o = this.registry[code];
|
|
8126
|
+
if (o) o.unpreventedDefault = true;
|
|
8127
|
+
}
|
|
8128
|
+
isUnprevented(code) {
|
|
8129
|
+
var _this_registry_code;
|
|
8130
|
+
return !!((_this_registry_code = this.registry[code]) === null || _this_registry_code === void 0 ? void 0 : _this_registry_code.unpreventedDefault);
|
|
8131
|
+
}
|
|
8132
|
+
delete(code) {
|
|
8133
|
+
delete this.registry[code];
|
|
8134
|
+
}
|
|
8135
|
+
values() {
|
|
8136
|
+
return Object.values(this.registry);
|
|
8137
|
+
}
|
|
8138
|
+
constructor() {
|
|
8139
|
+
_define_property$6(this, "registry", {});
|
|
8140
|
+
}
|
|
8141
|
+
}());
|
|
8142
|
+
_define_property$6(this, "carryChar", "");
|
|
8143
|
+
_define_property$6(this, "lastKeydownTarget", void 0);
|
|
8144
|
+
_define_property$6(this, "modifierLockStart", {});
|
|
8145
|
+
this.system = system;
|
|
8146
|
+
}
|
|
8147
|
+
};
|
|
8148
|
+
})))();
|
|
8149
|
+
}
|
|
8150
|
+
//#endregion
|
|
8151
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/keyboard/keyMap.js
|
|
8152
|
+
var defaultKeyMap$1;
|
|
8153
|
+
function init_keyMap() {
|
|
8154
|
+
return (init_keyMap = __esmMin((() => {
|
|
8155
|
+
init_keyboard();
|
|
8156
|
+
defaultKeyMap$1 = [
|
|
8157
|
+
..."0123456789".split("").map((c) => ({
|
|
8158
|
+
code: `Digit${c}`,
|
|
8159
|
+
key: c
|
|
8160
|
+
})),
|
|
8161
|
+
...")!@#$%^&*(".split("").map((c, i) => ({
|
|
8162
|
+
code: `Digit${i}`,
|
|
8163
|
+
key: c,
|
|
8164
|
+
shiftKey: true
|
|
8165
|
+
})),
|
|
8166
|
+
..."abcdefghijklmnopqrstuvwxyz".split("").map((c) => ({
|
|
8167
|
+
code: `Key${c.toUpperCase()}`,
|
|
8168
|
+
key: c
|
|
8169
|
+
})),
|
|
8170
|
+
..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map((c) => ({
|
|
8171
|
+
code: `Key${c}`,
|
|
8172
|
+
key: c,
|
|
8173
|
+
shiftKey: true
|
|
8174
|
+
})),
|
|
8175
|
+
{
|
|
8176
|
+
code: "BracketLeft",
|
|
8177
|
+
key: "["
|
|
8178
|
+
},
|
|
8179
|
+
{
|
|
8180
|
+
code: "BracketLeft",
|
|
8181
|
+
key: "{",
|
|
8182
|
+
shiftKey: true
|
|
8183
|
+
},
|
|
8184
|
+
{
|
|
8185
|
+
code: "BracketRight",
|
|
8186
|
+
key: "]"
|
|
8187
|
+
},
|
|
8188
|
+
{
|
|
8189
|
+
code: "BracketRight",
|
|
8190
|
+
key: "}",
|
|
8191
|
+
shiftKey: true
|
|
8192
|
+
},
|
|
8193
|
+
{
|
|
8194
|
+
code: "Space",
|
|
8195
|
+
key: " "
|
|
8196
|
+
},
|
|
8197
|
+
{
|
|
8198
|
+
code: "AltLeft",
|
|
8199
|
+
key: "Alt",
|
|
8200
|
+
location: DOM_KEY_LOCATION.LEFT
|
|
8201
|
+
},
|
|
8202
|
+
{
|
|
8203
|
+
code: "AltRight",
|
|
8204
|
+
key: "Alt",
|
|
8205
|
+
location: DOM_KEY_LOCATION.RIGHT
|
|
8206
|
+
},
|
|
8207
|
+
{
|
|
8208
|
+
code: "ShiftLeft",
|
|
8209
|
+
key: "Shift",
|
|
8210
|
+
location: DOM_KEY_LOCATION.LEFT
|
|
8211
|
+
},
|
|
8212
|
+
{
|
|
8213
|
+
code: "ShiftRight",
|
|
8214
|
+
key: "Shift",
|
|
8215
|
+
location: DOM_KEY_LOCATION.RIGHT
|
|
8216
|
+
},
|
|
8217
|
+
{
|
|
8218
|
+
code: "ControlLeft",
|
|
8219
|
+
key: "Control",
|
|
8220
|
+
location: DOM_KEY_LOCATION.LEFT
|
|
8221
|
+
},
|
|
8222
|
+
{
|
|
8223
|
+
code: "ControlRight",
|
|
8224
|
+
key: "Control",
|
|
8225
|
+
location: DOM_KEY_LOCATION.RIGHT
|
|
8226
|
+
},
|
|
8227
|
+
{
|
|
8228
|
+
code: "MetaLeft",
|
|
8229
|
+
key: "Meta",
|
|
8230
|
+
location: DOM_KEY_LOCATION.LEFT
|
|
8231
|
+
},
|
|
8232
|
+
{
|
|
8233
|
+
code: "MetaRight",
|
|
8234
|
+
key: "Meta",
|
|
8235
|
+
location: DOM_KEY_LOCATION.RIGHT
|
|
8236
|
+
},
|
|
8237
|
+
{
|
|
8238
|
+
code: "OSLeft",
|
|
8239
|
+
key: "OS",
|
|
8240
|
+
location: DOM_KEY_LOCATION.LEFT
|
|
8241
|
+
},
|
|
8242
|
+
{
|
|
8243
|
+
code: "OSRight",
|
|
8244
|
+
key: "OS",
|
|
8245
|
+
location: DOM_KEY_LOCATION.RIGHT
|
|
8246
|
+
},
|
|
8247
|
+
{
|
|
8248
|
+
code: "ContextMenu",
|
|
8249
|
+
key: "ContextMenu"
|
|
8250
|
+
},
|
|
8251
|
+
{
|
|
8252
|
+
code: "Tab",
|
|
8253
|
+
key: "Tab"
|
|
8254
|
+
},
|
|
8255
|
+
{
|
|
8256
|
+
code: "CapsLock",
|
|
8257
|
+
key: "CapsLock"
|
|
8258
|
+
},
|
|
8259
|
+
{
|
|
8260
|
+
code: "Backspace",
|
|
8261
|
+
key: "Backspace"
|
|
8262
|
+
},
|
|
8263
|
+
{
|
|
8264
|
+
code: "Enter",
|
|
8265
|
+
key: "Enter"
|
|
8266
|
+
},
|
|
8267
|
+
{
|
|
8268
|
+
code: "Escape",
|
|
8269
|
+
key: "Escape"
|
|
8270
|
+
},
|
|
8271
|
+
{
|
|
8272
|
+
code: "ArrowUp",
|
|
8273
|
+
key: "ArrowUp"
|
|
8274
|
+
},
|
|
8275
|
+
{
|
|
8276
|
+
code: "ArrowDown",
|
|
8277
|
+
key: "ArrowDown"
|
|
8278
|
+
},
|
|
8279
|
+
{
|
|
8280
|
+
code: "ArrowLeft",
|
|
8281
|
+
key: "ArrowLeft"
|
|
8282
|
+
},
|
|
8283
|
+
{
|
|
8284
|
+
code: "ArrowRight",
|
|
8285
|
+
key: "ArrowRight"
|
|
8286
|
+
},
|
|
8287
|
+
{
|
|
8288
|
+
code: "Home",
|
|
8289
|
+
key: "Home"
|
|
8290
|
+
},
|
|
8291
|
+
{
|
|
8292
|
+
code: "End",
|
|
8293
|
+
key: "End"
|
|
8294
|
+
},
|
|
8295
|
+
{
|
|
8296
|
+
code: "Delete",
|
|
8297
|
+
key: "Delete"
|
|
8298
|
+
},
|
|
8299
|
+
{
|
|
8300
|
+
code: "PageUp",
|
|
8301
|
+
key: "PageUp"
|
|
8302
|
+
},
|
|
8303
|
+
{
|
|
8304
|
+
code: "PageDown",
|
|
8305
|
+
key: "PageDown"
|
|
8306
|
+
},
|
|
8307
|
+
{
|
|
8308
|
+
code: "Fn",
|
|
8309
|
+
key: "Fn"
|
|
8310
|
+
},
|
|
8311
|
+
{
|
|
8312
|
+
code: "Symbol",
|
|
8313
|
+
key: "Symbol"
|
|
8314
|
+
},
|
|
8315
|
+
{
|
|
8316
|
+
code: "AltRight",
|
|
8317
|
+
key: "AltGraph"
|
|
8318
|
+
}
|
|
8319
|
+
];
|
|
8320
|
+
})))();
|
|
8321
|
+
}
|
|
8322
|
+
//#endregion
|
|
8323
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/pointer/keyMap.js
|
|
8324
|
+
var defaultKeyMap;
|
|
8325
|
+
function init_keyMap$1() {
|
|
8326
|
+
return (init_keyMap$1 = __esmMin((() => {
|
|
8327
|
+
defaultKeyMap = [
|
|
8328
|
+
{
|
|
8329
|
+
name: "MouseLeft",
|
|
8330
|
+
pointerType: "mouse",
|
|
8331
|
+
button: "primary"
|
|
8332
|
+
},
|
|
8333
|
+
{
|
|
8334
|
+
name: "MouseRight",
|
|
8335
|
+
pointerType: "mouse",
|
|
8336
|
+
button: "secondary"
|
|
8337
|
+
},
|
|
8338
|
+
{
|
|
8339
|
+
name: "MouseMiddle",
|
|
8340
|
+
pointerType: "mouse",
|
|
8341
|
+
button: "auxiliary"
|
|
8342
|
+
},
|
|
8343
|
+
{
|
|
8344
|
+
name: "TouchA",
|
|
8345
|
+
pointerType: "touch"
|
|
8346
|
+
},
|
|
8347
|
+
{
|
|
8348
|
+
name: "TouchB",
|
|
8349
|
+
pointerType: "touch"
|
|
8350
|
+
},
|
|
8351
|
+
{
|
|
8352
|
+
name: "TouchC",
|
|
8353
|
+
pointerType: "touch"
|
|
8354
|
+
}
|
|
8355
|
+
];
|
|
8356
|
+
})))();
|
|
8357
|
+
}
|
|
8358
|
+
//#endregion
|
|
8359
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/buttons.js
|
|
8360
|
+
function _define_property$5(obj, key, value) {
|
|
8361
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
8362
|
+
value,
|
|
8363
|
+
enumerable: true,
|
|
8364
|
+
configurable: true,
|
|
8365
|
+
writable: true
|
|
8366
|
+
});
|
|
8367
|
+
else obj[key] = value;
|
|
8368
|
+
return obj;
|
|
8369
|
+
}
|
|
8370
|
+
function getMouseButtonId(button = 0) {
|
|
8371
|
+
if (button in MouseButton) return MouseButton[button];
|
|
8372
|
+
return Number(button);
|
|
8373
|
+
}
|
|
8374
|
+
function getMouseEventButton(button) {
|
|
8375
|
+
button = getMouseButtonId(button);
|
|
8376
|
+
if (button in MouseButtonFlip) return MouseButtonFlip[button];
|
|
8377
|
+
return button;
|
|
8378
|
+
}
|
|
8379
|
+
var Buttons, MouseButton, MouseButtonFlip;
|
|
8380
|
+
function init_buttons() {
|
|
8381
|
+
return (init_buttons = __esmMin((() => {
|
|
8382
|
+
Buttons = class {
|
|
8383
|
+
getButtons() {
|
|
8384
|
+
let v = 0;
|
|
8385
|
+
for (const button of Object.keys(this.pressed)) v |= 2 ** Number(button);
|
|
8386
|
+
return v;
|
|
8387
|
+
}
|
|
8388
|
+
down(keyDef) {
|
|
8389
|
+
const button = getMouseButtonId(keyDef.button);
|
|
8390
|
+
if (button in this.pressed) {
|
|
8391
|
+
this.pressed[button].push(keyDef);
|
|
8392
|
+
return;
|
|
8393
|
+
}
|
|
8394
|
+
this.pressed[button] = [keyDef];
|
|
8395
|
+
return button;
|
|
8396
|
+
}
|
|
8397
|
+
up(keyDef) {
|
|
8398
|
+
const button = getMouseButtonId(keyDef.button);
|
|
8399
|
+
if (button in this.pressed) {
|
|
8400
|
+
this.pressed[button] = this.pressed[button].filter((k) => k.name !== keyDef.name);
|
|
8401
|
+
if (this.pressed[button].length === 0) {
|
|
8402
|
+
delete this.pressed[button];
|
|
8403
|
+
return button;
|
|
8404
|
+
}
|
|
8405
|
+
}
|
|
8406
|
+
}
|
|
8407
|
+
constructor() {
|
|
8408
|
+
_define_property$5(this, "pressed", {});
|
|
8409
|
+
}
|
|
8410
|
+
};
|
|
8411
|
+
MouseButton = {
|
|
8412
|
+
primary: 0,
|
|
8413
|
+
secondary: 1,
|
|
8414
|
+
auxiliary: 2,
|
|
8415
|
+
back: 3,
|
|
8416
|
+
X1: 3,
|
|
8417
|
+
forward: 4,
|
|
8418
|
+
X2: 4
|
|
8419
|
+
};
|
|
8420
|
+
MouseButtonFlip = {
|
|
8421
|
+
1: 2,
|
|
8422
|
+
2: 1
|
|
8423
|
+
};
|
|
8424
|
+
})))();
|
|
8425
|
+
}
|
|
8426
|
+
//#endregion
|
|
8427
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/device.js
|
|
8428
|
+
function _define_property$4(obj, key, value) {
|
|
8429
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
8430
|
+
value,
|
|
8431
|
+
enumerable: true,
|
|
8432
|
+
configurable: true,
|
|
8433
|
+
writable: true
|
|
8434
|
+
});
|
|
8435
|
+
else obj[key] = value;
|
|
8436
|
+
return obj;
|
|
8437
|
+
}
|
|
8438
|
+
var Device;
|
|
8439
|
+
function init_device() {
|
|
8440
|
+
return (init_device = __esmMin((() => {
|
|
8441
|
+
Device = class {
|
|
8442
|
+
get countPressed() {
|
|
8443
|
+
return this.pressedKeys.size;
|
|
8444
|
+
}
|
|
8445
|
+
isPressed(keyDef) {
|
|
8446
|
+
return this.pressedKeys.has(keyDef.name);
|
|
8447
|
+
}
|
|
8448
|
+
addPressed(keyDef) {
|
|
8449
|
+
return this.pressedKeys.add(keyDef.name);
|
|
8450
|
+
}
|
|
8451
|
+
removePressed(keyDef) {
|
|
8452
|
+
return this.pressedKeys.delete(keyDef.name);
|
|
8453
|
+
}
|
|
8454
|
+
constructor() {
|
|
8455
|
+
_define_property$4(this, "pressedKeys", /* @__PURE__ */ new Set());
|
|
8456
|
+
}
|
|
8457
|
+
};
|
|
8458
|
+
})))();
|
|
8459
|
+
}
|
|
8460
|
+
//#endregion
|
|
8461
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getTreeDiff.js
|
|
8462
|
+
function getTreeDiff(a, b) {
|
|
8463
|
+
const treeA = [];
|
|
8464
|
+
for (let el = a; el; el = el.parentElement) treeA.push(el);
|
|
8465
|
+
const treeB = [];
|
|
8466
|
+
for (let el = b; el; el = el.parentElement) treeB.push(el);
|
|
8467
|
+
let i = 0;
|
|
8468
|
+
for (;; i++) if (i >= treeA.length || i >= treeB.length || treeA[treeA.length - 1 - i] !== treeB[treeB.length - 1 - i]) break;
|
|
8469
|
+
return [
|
|
8470
|
+
treeA.slice(0, treeA.length - i),
|
|
8471
|
+
treeB.slice(0, treeB.length - i),
|
|
8472
|
+
treeB.slice(treeB.length - i)
|
|
8473
|
+
];
|
|
8474
|
+
}
|
|
8475
|
+
//#endregion
|
|
8476
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/resolveCaretPosition.js
|
|
8477
|
+
function resolveCaretPosition({ target, node, offset }) {
|
|
8478
|
+
if (hasOwnSelection(target)) return {
|
|
8479
|
+
node: target,
|
|
8480
|
+
offset: offset !== null && offset !== void 0 ? offset : getUIValue(target).length
|
|
8481
|
+
};
|
|
8482
|
+
else if (node) return {
|
|
8483
|
+
node,
|
|
8484
|
+
offset: offset !== null && offset !== void 0 ? offset : node.nodeType === 3 ? node.nodeValue.length : node.childNodes.length
|
|
8485
|
+
};
|
|
8486
|
+
return findNodeAtTextOffset(target, offset);
|
|
8487
|
+
}
|
|
8488
|
+
function findNodeAtTextOffset(node, offset, isRoot = true) {
|
|
8489
|
+
let i = offset === void 0 ? node.childNodes.length - 1 : 0;
|
|
8490
|
+
const step = offset === void 0 ? -1 : 1;
|
|
8491
|
+
while (offset === void 0 ? i >= (isRoot ? Math.max(node.childNodes.length - 1, 0) : 0) : i <= node.childNodes.length) {
|
|
8492
|
+
if (offset && i === node.childNodes.length) throw new Error("The given offset is out of bounds.");
|
|
8493
|
+
const c = node.childNodes.item(i);
|
|
8494
|
+
const text = String(c.textContent);
|
|
8495
|
+
if (text.length) {
|
|
8496
|
+
if (offset !== void 0 && text.length < offset) offset -= text.length;
|
|
8497
|
+
else if (c.nodeType === 1) return findNodeAtTextOffset(c, offset, false);
|
|
8498
|
+
else if (c.nodeType === 3) return {
|
|
8499
|
+
node: c,
|
|
8500
|
+
offset: offset !== null && offset !== void 0 ? offset : c.nodeValue.length
|
|
8501
|
+
};
|
|
8502
|
+
}
|
|
8503
|
+
i += step;
|
|
8504
|
+
}
|
|
8505
|
+
return {
|
|
8506
|
+
node,
|
|
8507
|
+
offset: node.childNodes.length
|
|
8508
|
+
};
|
|
8509
|
+
}
|
|
8510
|
+
function init_resolveCaretPosition() {
|
|
8511
|
+
return (init_resolveCaretPosition = __esmMin((() => {
|
|
8512
|
+
init_UI();
|
|
8513
|
+
init_Clipboard();
|
|
8514
|
+
init_selection();
|
|
8515
|
+
})))();
|
|
8516
|
+
}
|
|
8517
|
+
//#endregion
|
|
8518
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionPerMouse.js
|
|
8519
|
+
function setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {
|
|
8520
|
+
if (hasNoSelection(target)) return;
|
|
8521
|
+
const targetHasOwnSelection = hasOwnSelection(target);
|
|
8522
|
+
const text = String(targetHasOwnSelection ? getUIValue(target) : target.textContent);
|
|
8523
|
+
const [start, end] = node ? [offset, offset] : getTextRange(text, offset, clickCount);
|
|
8524
|
+
if (targetHasOwnSelection) {
|
|
8525
|
+
setUISelection(target, {
|
|
8526
|
+
anchorOffset: start !== null && start !== void 0 ? start : text.length,
|
|
8527
|
+
focusOffset: end !== null && end !== void 0 ? end : text.length
|
|
8528
|
+
});
|
|
8529
|
+
return {
|
|
8530
|
+
node: target,
|
|
8531
|
+
start: start !== null && start !== void 0 ? start : 0,
|
|
8532
|
+
end: end !== null && end !== void 0 ? end : text.length
|
|
8533
|
+
};
|
|
8534
|
+
} else {
|
|
8535
|
+
const { node: startNode, offset: startOffset } = resolveCaretPosition({
|
|
8536
|
+
target,
|
|
8537
|
+
node,
|
|
8538
|
+
offset: start
|
|
8539
|
+
});
|
|
8540
|
+
const { node: endNode, offset: endOffset } = resolveCaretPosition({
|
|
8541
|
+
target,
|
|
8542
|
+
node,
|
|
8543
|
+
offset: end
|
|
8544
|
+
});
|
|
8545
|
+
const range = target.ownerDocument.createRange();
|
|
8546
|
+
try {
|
|
8547
|
+
range.setStart(startNode, startOffset);
|
|
8548
|
+
range.setEnd(endNode, endOffset);
|
|
8549
|
+
} catch {
|
|
8550
|
+
throw new Error("The given offset is out of bounds.");
|
|
8551
|
+
}
|
|
8552
|
+
const selection = document.getSelection();
|
|
8553
|
+
selection === null || selection === void 0 || selection.removeAllRanges();
|
|
8554
|
+
selection === null || selection === void 0 || selection.addRange(range.cloneRange());
|
|
8555
|
+
return range;
|
|
8556
|
+
}
|
|
8557
|
+
}
|
|
8558
|
+
function getTextRange(text, pos, clickCount) {
|
|
8559
|
+
if (clickCount % 3 === 1 || text.length === 0) return [pos, pos];
|
|
8560
|
+
const textPos = pos !== null && pos !== void 0 ? pos : text.length;
|
|
8561
|
+
if (clickCount % 3 === 2) return [textPos - text.substr(0, pos).match(/(\w+|\s+|\W)?$/)[0].length, pos === void 0 ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length];
|
|
8562
|
+
return [textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length, pos === void 0 ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length];
|
|
8563
|
+
}
|
|
8564
|
+
function init_setSelectionPerMouse() {
|
|
8565
|
+
return (init_setSelectionPerMouse = __esmMin((() => {
|
|
8566
|
+
init_UI();
|
|
8567
|
+
init_Clipboard();
|
|
8568
|
+
init_selection();
|
|
8569
|
+
init_resolveCaretPosition();
|
|
8570
|
+
})))();
|
|
8571
|
+
}
|
|
8572
|
+
//#endregion
|
|
8573
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/modifySelectionPerMouse.js
|
|
8574
|
+
function modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {
|
|
8575
|
+
const selectionFocus = resolveCaretPosition({
|
|
8576
|
+
target,
|
|
8577
|
+
node,
|
|
8578
|
+
offset
|
|
8579
|
+
});
|
|
8580
|
+
if ("node" in selectionRange) {
|
|
8581
|
+
/* istanbul ignore else */ if (selectionFocus.node === selectionRange.node) {
|
|
8582
|
+
const anchorOffset = selectionFocus.offset < selectionRange.start ? selectionRange.end : selectionRange.start;
|
|
8583
|
+
const focusOffset = selectionFocus.offset > selectionRange.end || selectionFocus.offset < selectionRange.start ? selectionFocus.offset : selectionRange.end;
|
|
8584
|
+
setUISelection(selectionRange.node, {
|
|
8585
|
+
anchorOffset,
|
|
8586
|
+
focusOffset
|
|
8587
|
+
});
|
|
8588
|
+
}
|
|
8589
|
+
} else {
|
|
8590
|
+
const range = selectionRange.cloneRange();
|
|
8591
|
+
const cmp = range.comparePoint(selectionFocus.node, selectionFocus.offset);
|
|
8592
|
+
if (cmp < 0) range.setStart(selectionFocus.node, selectionFocus.offset);
|
|
8593
|
+
else if (cmp > 0) range.setEnd(selectionFocus.node, selectionFocus.offset);
|
|
8594
|
+
const selection = document.getSelection();
|
|
8595
|
+
selection === null || selection === void 0 || selection.removeAllRanges();
|
|
8596
|
+
selection === null || selection === void 0 || selection.addRange(range.cloneRange());
|
|
8597
|
+
}
|
|
8598
|
+
}
|
|
8599
|
+
function init_modifySelectionPerMouse() {
|
|
8600
|
+
return (init_modifySelectionPerMouse = __esmMin((() => {
|
|
8601
|
+
init_UI();
|
|
8602
|
+
init_Clipboard();
|
|
8603
|
+
init_resolveCaretPosition();
|
|
8604
|
+
})))();
|
|
8605
|
+
}
|
|
8606
|
+
//#endregion
|
|
8607
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/shared.js
|
|
8608
|
+
function isDifferentPointerPosition(positionA, positionB) {
|
|
8609
|
+
var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_coords2, _positionB_coords2, _positionA_coords3, _positionB_coords3, _positionA_coords4, _positionB_coords4, _positionA_coords5, _positionB_coords5, _positionA_coords6, _positionB_coords6, _positionA_coords7, _positionB_coords7, _positionA_coords8, _positionB_coords8, _positionA_coords9, _positionB_coords9, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
|
|
8610
|
+
return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === void 0 ? void 0 : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === void 0 ? void 0 : _positionB_coords.x) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === void 0 ? void 0 : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === void 0 ? void 0 : _positionB_coords1.y) || ((_positionA_coords2 = positionA.coords) === null || _positionA_coords2 === void 0 ? void 0 : _positionA_coords2.clientX) !== ((_positionB_coords2 = positionB.coords) === null || _positionB_coords2 === void 0 ? void 0 : _positionB_coords2.clientX) || ((_positionA_coords3 = positionA.coords) === null || _positionA_coords3 === void 0 ? void 0 : _positionA_coords3.clientY) !== ((_positionB_coords3 = positionB.coords) === null || _positionB_coords3 === void 0 ? void 0 : _positionB_coords3.clientY) || ((_positionA_coords4 = positionA.coords) === null || _positionA_coords4 === void 0 ? void 0 : _positionA_coords4.offsetX) !== ((_positionB_coords4 = positionB.coords) === null || _positionB_coords4 === void 0 ? void 0 : _positionB_coords4.offsetX) || ((_positionA_coords5 = positionA.coords) === null || _positionA_coords5 === void 0 ? void 0 : _positionA_coords5.offsetY) !== ((_positionB_coords5 = positionB.coords) === null || _positionB_coords5 === void 0 ? void 0 : _positionB_coords5.offsetY) || ((_positionA_coords6 = positionA.coords) === null || _positionA_coords6 === void 0 ? void 0 : _positionA_coords6.pageX) !== ((_positionB_coords6 = positionB.coords) === null || _positionB_coords6 === void 0 ? void 0 : _positionB_coords6.pageX) || ((_positionA_coords7 = positionA.coords) === null || _positionA_coords7 === void 0 ? void 0 : _positionA_coords7.pageY) !== ((_positionB_coords7 = positionB.coords) === null || _positionB_coords7 === void 0 ? void 0 : _positionB_coords7.pageY) || ((_positionA_coords8 = positionA.coords) === null || _positionA_coords8 === void 0 ? void 0 : _positionA_coords8.screenX) !== ((_positionB_coords8 = positionB.coords) === null || _positionB_coords8 === void 0 ? void 0 : _positionB_coords8.screenX) || ((_positionA_coords9 = positionA.coords) === null || _positionA_coords9 === void 0 ? void 0 : _positionA_coords9.screenY) !== ((_positionB_coords9 = positionB.coords) === null || _positionB_coords9 === void 0 ? void 0 : _positionB_coords9.screenY) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === void 0 ? void 0 : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === void 0 ? void 0 : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === void 0 ? void 0 : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === void 0 ? void 0 : _positionB_caret1.offset);
|
|
8611
|
+
}
|
|
8612
|
+
//#endregion
|
|
8613
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/mouse.js
|
|
8614
|
+
function _define_property$3(obj, key, value) {
|
|
8615
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
8616
|
+
value,
|
|
8617
|
+
enumerable: true,
|
|
8618
|
+
configurable: true,
|
|
8619
|
+
writable: true
|
|
8620
|
+
});
|
|
8621
|
+
else obj[key] = value;
|
|
8622
|
+
return obj;
|
|
8623
|
+
}
|
|
8624
|
+
var Mouse;
|
|
8625
|
+
function init_mouse() {
|
|
8626
|
+
return (init_mouse = __esmMin((() => {
|
|
8627
|
+
init_click();
|
|
8628
|
+
init_cut();
|
|
8629
|
+
init_keydown();
|
|
8630
|
+
init_keypress();
|
|
8631
|
+
init_keyup();
|
|
8632
|
+
init_paste();
|
|
8633
|
+
init_dom_esm();
|
|
8634
|
+
init_Clipboard();
|
|
8635
|
+
init_isDisabled();
|
|
8636
|
+
init_focus();
|
|
8637
|
+
init_setSelectionPerMouse();
|
|
8638
|
+
init_modifySelectionPerMouse();
|
|
8639
|
+
init_buttons();
|
|
8640
|
+
Mouse = class {
|
|
8641
|
+
move(instance, position, isPrevented) {
|
|
8642
|
+
const prevPosition = this.position;
|
|
8643
|
+
const prevTarget = this.getTarget(instance);
|
|
8644
|
+
this.position = position;
|
|
8645
|
+
if (!isDifferentPointerPosition(prevPosition, position)) return;
|
|
8646
|
+
const nextTarget = this.getTarget(instance);
|
|
8647
|
+
const init = this.getEventInit("mousemove");
|
|
8648
|
+
const [leave, enter] = getTreeDiff(prevTarget, nextTarget);
|
|
8649
|
+
return {
|
|
8650
|
+
leave: () => {
|
|
8651
|
+
if (prevTarget !== nextTarget) {
|
|
8652
|
+
instance.dispatchUIEvent(prevTarget, "mouseout", init);
|
|
8653
|
+
leave.forEach((el) => instance.dispatchUIEvent(el, "mouseleave", init));
|
|
8654
|
+
}
|
|
8655
|
+
},
|
|
8656
|
+
enter: () => {
|
|
8657
|
+
if (prevTarget !== nextTarget) {
|
|
8658
|
+
instance.dispatchUIEvent(nextTarget, "mouseover", init);
|
|
8659
|
+
enter.forEach((el) => instance.dispatchUIEvent(el, "mouseenter", init));
|
|
8660
|
+
}
|
|
8661
|
+
},
|
|
8662
|
+
move: () => {
|
|
8663
|
+
if (isPrevented) return;
|
|
8664
|
+
instance.dispatchUIEvent(nextTarget, "mousemove", init);
|
|
8665
|
+
this.modifySelecting(instance);
|
|
8666
|
+
}
|
|
8667
|
+
};
|
|
8668
|
+
}
|
|
8669
|
+
down(instance, keyDef, isPrevented) {
|
|
8670
|
+
const button = this.buttons.down(keyDef);
|
|
8671
|
+
if (button === void 0) return;
|
|
8672
|
+
const target = this.getTarget(instance);
|
|
8673
|
+
this.buttonDownTarget[button] = target;
|
|
8674
|
+
const init = this.getEventInit("mousedown", keyDef.button);
|
|
8675
|
+
const disabled = isDisabled(target);
|
|
8676
|
+
if (!isPrevented && (disabled || instance.dispatchUIEvent(target, "mousedown", init))) {
|
|
8677
|
+
this.startSelecting(instance, init.detail);
|
|
8678
|
+
focusElement(target);
|
|
8679
|
+
}
|
|
8680
|
+
if (!disabled && getMouseEventButton(keyDef.button) === 2) instance.dispatchUIEvent(target, "contextmenu", this.getEventInit("contextmenu", keyDef.button));
|
|
8681
|
+
}
|
|
8682
|
+
up(instance, keyDef, isPrevented) {
|
|
8683
|
+
const button = this.buttons.up(keyDef);
|
|
8684
|
+
if (button === void 0) return;
|
|
8685
|
+
const target = this.getTarget(instance);
|
|
8686
|
+
if (!isDisabled(target)) {
|
|
8687
|
+
if (!isPrevented) {
|
|
8688
|
+
const mouseUpInit = this.getEventInit("mouseup", keyDef.button);
|
|
8689
|
+
instance.dispatchUIEvent(target, "mouseup", mouseUpInit);
|
|
8690
|
+
this.endSelecting();
|
|
8691
|
+
}
|
|
8692
|
+
const clickTarget = getTreeDiff(this.buttonDownTarget[button], target)[2][0];
|
|
8693
|
+
if (clickTarget) {
|
|
8694
|
+
const init = this.getEventInit("click", keyDef.button);
|
|
8695
|
+
if (init.detail) {
|
|
8696
|
+
instance.dispatchUIEvent(clickTarget, init.button === 0 ? "click" : "auxclick", init);
|
|
8697
|
+
if (init.button === 0 && init.detail === 2) instance.dispatchUIEvent(clickTarget, "dblclick", {
|
|
8698
|
+
...this.getEventInit("dblclick", keyDef.button),
|
|
8699
|
+
detail: init.detail
|
|
8700
|
+
});
|
|
8701
|
+
}
|
|
8702
|
+
}
|
|
8703
|
+
}
|
|
8704
|
+
}
|
|
8705
|
+
resetClickCount() {
|
|
8706
|
+
this.clickCount.reset();
|
|
8707
|
+
}
|
|
8708
|
+
getEventInit(type, button) {
|
|
8709
|
+
const init = { ...this.position.coords };
|
|
8710
|
+
init.button = getMouseEventButton(button);
|
|
8711
|
+
init.buttons = this.buttons.getButtons();
|
|
8712
|
+
if (type === "mousedown") init.detail = this.clickCount.getOnDown(init.button);
|
|
8713
|
+
else if (type === "mouseup") init.detail = this.clickCount.getOnUp(init.button);
|
|
8714
|
+
else if (type === "click" || type === "auxclick") init.detail = this.clickCount.incOnClick(init.button);
|
|
8715
|
+
return init;
|
|
8716
|
+
}
|
|
8717
|
+
getTarget(instance) {
|
|
8718
|
+
var _this_position_target;
|
|
8719
|
+
return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
|
|
8720
|
+
}
|
|
8721
|
+
startSelecting(instance, clickCount) {
|
|
8722
|
+
var _this_position_caret, _this_position_caret1;
|
|
8723
|
+
this.selecting = setSelectionPerMouseDown({
|
|
8724
|
+
document: instance.config.document,
|
|
8725
|
+
target: this.getTarget(instance),
|
|
8726
|
+
node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
|
|
8727
|
+
offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
|
|
8728
|
+
clickCount
|
|
8729
|
+
});
|
|
8730
|
+
}
|
|
8731
|
+
modifySelecting(instance) {
|
|
8732
|
+
var _this_position_caret, _this_position_caret1;
|
|
8733
|
+
if (!this.selecting) return;
|
|
8734
|
+
modifySelectionPerMouseMove(this.selecting, {
|
|
8735
|
+
document: instance.config.document,
|
|
8736
|
+
target: this.getTarget(instance),
|
|
8737
|
+
node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
|
|
8738
|
+
offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
|
|
8739
|
+
});
|
|
8740
|
+
}
|
|
8741
|
+
endSelecting() {
|
|
8742
|
+
this.selecting = void 0;
|
|
8743
|
+
}
|
|
8744
|
+
constructor() {
|
|
8745
|
+
_define_property$3(this, "position", {});
|
|
8746
|
+
_define_property$3(this, "buttons", new Buttons());
|
|
8747
|
+
_define_property$3(this, "selecting", void 0);
|
|
8748
|
+
_define_property$3(this, "buttonDownTarget", {});
|
|
8749
|
+
_define_property$3(this, "clickCount", new class {
|
|
8750
|
+
incOnClick(button) {
|
|
8751
|
+
const current = this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
|
|
8752
|
+
this.count = this.count[button] === void 0 ? {} : { [button]: Number(this.count[button]) + 1 };
|
|
8753
|
+
return current;
|
|
8754
|
+
}
|
|
8755
|
+
getOnDown(button) {
|
|
8756
|
+
var _this_count_button, _this_count_button1;
|
|
8757
|
+
this.down = { [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0 };
|
|
8758
|
+
this.count = { [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0 };
|
|
8759
|
+
return Number(this.count[button]) + 1;
|
|
8760
|
+
}
|
|
8761
|
+
getOnUp(button) {
|
|
8762
|
+
return this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
|
|
8763
|
+
}
|
|
8764
|
+
reset() {
|
|
8765
|
+
this.count = {};
|
|
8766
|
+
}
|
|
8767
|
+
constructor() {
|
|
8768
|
+
_define_property$3(this, "down", {});
|
|
8769
|
+
_define_property$3(this, "count", {});
|
|
8770
|
+
}
|
|
8771
|
+
}());
|
|
8772
|
+
}
|
|
8773
|
+
};
|
|
8774
|
+
})))();
|
|
8775
|
+
}
|
|
8776
|
+
//#endregion
|
|
8777
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/pointer/cssPointerEvents.js
|
|
8778
|
+
function hasPointerEvents(instance, element) {
|
|
8779
|
+
var _checkPointerEvents;
|
|
8780
|
+
return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== "none";
|
|
8781
|
+
}
|
|
8782
|
+
function closestPointerEventsDeclaration(element) {
|
|
8783
|
+
const window = getWindow(element);
|
|
8784
|
+
for (let el = element, tree = []; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement) {
|
|
8785
|
+
tree.push(el);
|
|
8786
|
+
const pointerEvents = window.getComputedStyle(el).pointerEvents;
|
|
8787
|
+
if (pointerEvents && !["inherit", "unset"].includes(pointerEvents)) return {
|
|
8788
|
+
pointerEvents,
|
|
8789
|
+
tree
|
|
8790
|
+
};
|
|
8791
|
+
}
|
|
8792
|
+
}
|
|
8793
|
+
function checkPointerEvents(instance, element) {
|
|
8794
|
+
const lastCheck = element[PointerEventsCheck];
|
|
8795
|
+
if (!(instance.config.pointerEventsCheck !== PointerEventsCheckLevel.Never && (!lastCheck || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachApiCall) && lastCheck[ApiLevel.Call] !== getLevelRef(instance, ApiLevel.Call) || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachTrigger) && lastCheck[ApiLevel.Trigger] !== getLevelRef(instance, ApiLevel.Trigger)))) return lastCheck === null || lastCheck === void 0 ? void 0 : lastCheck.result;
|
|
8796
|
+
const declaration = closestPointerEventsDeclaration(element);
|
|
8797
|
+
element[PointerEventsCheck] = {
|
|
8798
|
+
[ApiLevel.Call]: getLevelRef(instance, ApiLevel.Call),
|
|
8799
|
+
[ApiLevel.Trigger]: getLevelRef(instance, ApiLevel.Trigger),
|
|
8800
|
+
result: declaration
|
|
8801
|
+
};
|
|
8802
|
+
return declaration;
|
|
8803
|
+
}
|
|
8804
|
+
function assertPointerEvents(instance, element) {
|
|
8805
|
+
const declaration = checkPointerEvents(instance, element);
|
|
8806
|
+
if ((declaration === null || declaration === void 0 ? void 0 : declaration.pointerEvents) === "none") throw new Error([
|
|
8807
|
+
`Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? "inherits" : "has"} \`pointer-events: none\`:`,
|
|
8808
|
+
"",
|
|
8809
|
+
printTree(declaration.tree)
|
|
8810
|
+
].join("\n"));
|
|
8811
|
+
}
|
|
8812
|
+
function printTree(tree) {
|
|
8813
|
+
return tree.reverse().map((el, i) => [
|
|
8814
|
+
"".padEnd(i),
|
|
8815
|
+
el.tagName,
|
|
8816
|
+
el.id && `#${el.id}`,
|
|
8817
|
+
el.hasAttribute("data-testid") && `(testId=${el.getAttribute("data-testid")})`,
|
|
8818
|
+
getLabelDescr(el),
|
|
8819
|
+
tree.length > 1 && i === 0 && " <-- This element declared `pointer-events: none`",
|
|
8820
|
+
tree.length > 1 && i === tree.length - 1 && " <-- Asserted pointer events here"
|
|
8821
|
+
].filter(Boolean).join("")).join("\n");
|
|
8822
|
+
}
|
|
8823
|
+
function getLabelDescr(element) {
|
|
8824
|
+
var _element_labels;
|
|
8825
|
+
let label;
|
|
8826
|
+
if (element.hasAttribute("aria-label")) label = element.getAttribute("aria-label");
|
|
8827
|
+
else if (element.hasAttribute("aria-labelledby")) {
|
|
8828
|
+
var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
|
|
8829
|
+
label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute("aria-labelledby"))) === null || _element_ownerDocument_getElementById === void 0 ? void 0 : (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === void 0 ? void 0 : _element_ownerDocument_getElementById_textContent.trim();
|
|
8830
|
+
} else if (isElementType(element, [
|
|
8831
|
+
"button",
|
|
8832
|
+
"input",
|
|
8833
|
+
"meter",
|
|
8834
|
+
"output",
|
|
8835
|
+
"progress",
|
|
8836
|
+
"select",
|
|
8837
|
+
"textarea"
|
|
8838
|
+
]) && ((_element_labels = element.labels) === null || _element_labels === void 0 ? void 0 : _element_labels.length)) label = Array.from(element.labels).map((el) => {
|
|
8839
|
+
var _el_textContent;
|
|
8840
|
+
return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
|
|
8841
|
+
}).join("|");
|
|
8842
|
+
else if (isElementType(element, "button")) {
|
|
8843
|
+
var _element_textContent;
|
|
8844
|
+
label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
|
|
8845
|
+
}
|
|
8846
|
+
label = label === null || label === void 0 ? void 0 : label.replace(/\n/g, " ");
|
|
8847
|
+
if (Number(label === null || label === void 0 ? void 0 : label.length) > 30) label = `${label === null || label === void 0 ? void 0 : label.substring(0, 29)}…`;
|
|
8848
|
+
return label ? `(label=${label})` : "";
|
|
8849
|
+
}
|
|
8850
|
+
function hasBitFlag(conf, flag) {
|
|
8851
|
+
return (conf & flag) > 0;
|
|
8852
|
+
}
|
|
8853
|
+
var PointerEventsCheck;
|
|
8854
|
+
function init_cssPointerEvents() {
|
|
8855
|
+
return (init_cssPointerEvents = __esmMin((() => {
|
|
8856
|
+
init_options();
|
|
8857
|
+
init_level();
|
|
8858
|
+
PointerEventsCheck = Symbol("Last check for pointer-events");
|
|
8859
|
+
})))();
|
|
8860
|
+
}
|
|
8861
|
+
//#endregion
|
|
8862
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/pointer.js
|
|
8863
|
+
function _define_property$2(obj, key, value) {
|
|
8864
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
8865
|
+
value,
|
|
8866
|
+
enumerable: true,
|
|
8867
|
+
configurable: true,
|
|
8868
|
+
writable: true
|
|
8869
|
+
});
|
|
8870
|
+
else obj[key] = value;
|
|
8871
|
+
return obj;
|
|
8872
|
+
}
|
|
8873
|
+
var Pointer;
|
|
8874
|
+
function init_pointer() {
|
|
8875
|
+
return (init_pointer = __esmMin((() => {
|
|
8876
|
+
init_Clipboard();
|
|
8877
|
+
init_cssPointerEvents();
|
|
8878
|
+
init_buttons();
|
|
8879
|
+
Pointer = class {
|
|
8880
|
+
init(instance) {
|
|
8881
|
+
const target = this.getTarget(instance);
|
|
8882
|
+
const [, enter] = getTreeDiff(null, target);
|
|
8883
|
+
const init = this.getEventInit();
|
|
8884
|
+
assertPointerEvents(instance, target);
|
|
8885
|
+
instance.dispatchUIEvent(target, "pointerover", init);
|
|
8886
|
+
enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init));
|
|
8887
|
+
return this;
|
|
8888
|
+
}
|
|
8889
|
+
move(instance, position) {
|
|
8890
|
+
const prevPosition = this.position;
|
|
8891
|
+
const prevTarget = this.getTarget(instance);
|
|
8892
|
+
this.position = position;
|
|
8893
|
+
if (!isDifferentPointerPosition(prevPosition, position)) return;
|
|
8894
|
+
const nextTarget = this.getTarget(instance);
|
|
8895
|
+
const init = this.getEventInit(-1);
|
|
8896
|
+
const [leave, enter] = getTreeDiff(prevTarget, nextTarget);
|
|
8897
|
+
return {
|
|
8898
|
+
leave: () => {
|
|
8899
|
+
if (hasPointerEvents(instance, prevTarget)) {
|
|
8900
|
+
if (prevTarget !== nextTarget) {
|
|
8901
|
+
instance.dispatchUIEvent(prevTarget, "pointerout", init);
|
|
8902
|
+
leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init));
|
|
8903
|
+
}
|
|
8904
|
+
}
|
|
8905
|
+
},
|
|
8906
|
+
enter: () => {
|
|
8907
|
+
assertPointerEvents(instance, nextTarget);
|
|
8908
|
+
if (prevTarget !== nextTarget) {
|
|
8909
|
+
instance.dispatchUIEvent(nextTarget, "pointerover", init);
|
|
8910
|
+
enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init));
|
|
8911
|
+
}
|
|
8912
|
+
},
|
|
8913
|
+
move: () => {
|
|
8914
|
+
instance.dispatchUIEvent(nextTarget, "pointermove", init);
|
|
8915
|
+
}
|
|
8916
|
+
};
|
|
8917
|
+
}
|
|
8918
|
+
down(instance, button = 0) {
|
|
8919
|
+
if (this.isDown) return;
|
|
8920
|
+
const target = this.getTarget(instance);
|
|
8921
|
+
assertPointerEvents(instance, target);
|
|
8922
|
+
this.isDown = true;
|
|
8923
|
+
this.isPrevented = !instance.dispatchUIEvent(target, "pointerdown", this.getEventInit(button));
|
|
8924
|
+
}
|
|
8925
|
+
up(instance, button = 0) {
|
|
8926
|
+
if (!this.isDown) return;
|
|
8927
|
+
const target = this.getTarget(instance);
|
|
8928
|
+
assertPointerEvents(instance, target);
|
|
8929
|
+
this.isPrevented = false;
|
|
8930
|
+
this.isDown = false;
|
|
8931
|
+
instance.dispatchUIEvent(target, "pointerup", this.getEventInit(button));
|
|
8932
|
+
}
|
|
8933
|
+
release(instance) {
|
|
8934
|
+
const target = this.getTarget(instance);
|
|
8935
|
+
const [leave] = getTreeDiff(target, null);
|
|
8936
|
+
const init = this.getEventInit();
|
|
8937
|
+
/* istanbul ignore else */ if (hasPointerEvents(instance, target)) {
|
|
8938
|
+
instance.dispatchUIEvent(target, "pointerout", init);
|
|
8939
|
+
leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init));
|
|
8940
|
+
}
|
|
8941
|
+
this.isCancelled = true;
|
|
8942
|
+
}
|
|
8943
|
+
getTarget(instance) {
|
|
8944
|
+
var _this_position_target;
|
|
8945
|
+
return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
|
|
8946
|
+
}
|
|
8947
|
+
getEventInit(button) {
|
|
8948
|
+
return {
|
|
8949
|
+
...this.position.coords,
|
|
8950
|
+
pointerId: this.pointerId,
|
|
8951
|
+
pointerType: this.pointerType,
|
|
8952
|
+
isPrimary: this.isPrimary,
|
|
8953
|
+
button: getMouseEventButton(button),
|
|
8954
|
+
buttons: this.buttons.getButtons()
|
|
8955
|
+
};
|
|
8956
|
+
}
|
|
8957
|
+
constructor({ pointerId, pointerType, isPrimary }, buttons) {
|
|
8958
|
+
_define_property$2(this, "pointerId", void 0);
|
|
8959
|
+
_define_property$2(this, "pointerType", void 0);
|
|
8960
|
+
_define_property$2(this, "isPrimary", void 0);
|
|
8961
|
+
_define_property$2(this, "buttons", void 0);
|
|
8962
|
+
_define_property$2(this, "isMultitouch", false);
|
|
8963
|
+
_define_property$2(this, "isCancelled", false);
|
|
8964
|
+
_define_property$2(this, "isDown", false);
|
|
8965
|
+
_define_property$2(this, "isPrevented", false);
|
|
8966
|
+
_define_property$2(this, "position", {});
|
|
8967
|
+
this.pointerId = pointerId;
|
|
8968
|
+
this.pointerType = pointerType;
|
|
8969
|
+
this.isPrimary = isPrimary;
|
|
8970
|
+
this.isMultitouch = !isPrimary;
|
|
8971
|
+
this.buttons = buttons;
|
|
8972
|
+
}
|
|
8973
|
+
};
|
|
8974
|
+
})))();
|
|
8975
|
+
}
|
|
8976
|
+
//#endregion
|
|
8977
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/index.js
|
|
8978
|
+
function _define_property$1(obj, key, value) {
|
|
8979
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
8980
|
+
value,
|
|
8981
|
+
enumerable: true,
|
|
8982
|
+
configurable: true,
|
|
8983
|
+
writable: true
|
|
8984
|
+
});
|
|
8985
|
+
else obj[key] = value;
|
|
8986
|
+
return obj;
|
|
8987
|
+
}
|
|
8988
|
+
var PointerHost;
|
|
8989
|
+
function init_pointer$1() {
|
|
8990
|
+
return (init_pointer$1 = __esmMin((() => {
|
|
8991
|
+
init_buttons();
|
|
8992
|
+
init_device();
|
|
8993
|
+
init_mouse();
|
|
8994
|
+
init_pointer();
|
|
8995
|
+
PointerHost = class {
|
|
8996
|
+
isKeyPressed(keyDef) {
|
|
8997
|
+
return this.devices.get(keyDef.pointerType).isPressed(keyDef);
|
|
8998
|
+
}
|
|
8999
|
+
async press(instance, keyDef, position) {
|
|
9000
|
+
this.devices.get(keyDef.pointerType).addPressed(keyDef);
|
|
9001
|
+
this.buttons.down(keyDef);
|
|
9002
|
+
const pointerName = this.getPointerName(keyDef);
|
|
9003
|
+
const pointer = keyDef.pointerType === "touch" ? this.pointers.new(pointerName, keyDef.pointerType, this.buttons) : this.pointers.get(pointerName);
|
|
9004
|
+
pointer.position = position;
|
|
9005
|
+
if (pointer.pointerType !== "touch") this.mouse.position = position;
|
|
9006
|
+
if (pointer.pointerType === "touch") pointer.init(instance);
|
|
9007
|
+
pointer.down(instance, keyDef.button);
|
|
9008
|
+
if (pointer.pointerType !== "touch") this.mouse.down(instance, keyDef, pointer.isPrevented);
|
|
9009
|
+
}
|
|
9010
|
+
async move(instance, pointerName, position) {
|
|
9011
|
+
const pointer = this.pointers.get(pointerName);
|
|
9012
|
+
const pointermove = pointer.move(instance, position);
|
|
9013
|
+
const mousemove = pointer.pointerType === "touch" ? void 0 : this.mouse.move(instance, position, pointer.isPrevented);
|
|
9014
|
+
pointermove === null || pointermove === void 0 || pointermove.leave();
|
|
9015
|
+
mousemove === null || mousemove === void 0 || mousemove.leave();
|
|
9016
|
+
pointermove === null || pointermove === void 0 || pointermove.enter();
|
|
9017
|
+
mousemove === null || mousemove === void 0 || mousemove.enter();
|
|
9018
|
+
pointermove === null || pointermove === void 0 || pointermove.move();
|
|
9019
|
+
mousemove === null || mousemove === void 0 || mousemove.move();
|
|
9020
|
+
}
|
|
9021
|
+
async release(instance, keyDef, position) {
|
|
9022
|
+
const device = this.devices.get(keyDef.pointerType);
|
|
9023
|
+
device.removePressed(keyDef);
|
|
9024
|
+
this.buttons.up(keyDef);
|
|
9025
|
+
const pointer = this.pointers.get(this.getPointerName(keyDef));
|
|
9026
|
+
const isPrevented = pointer.isPrevented;
|
|
9027
|
+
pointer.position = position;
|
|
9028
|
+
if (pointer.pointerType !== "touch") this.mouse.position = position;
|
|
9029
|
+
if (device.countPressed === 0) pointer.up(instance, keyDef.button);
|
|
9030
|
+
if (pointer.pointerType === "touch") pointer.release(instance);
|
|
9031
|
+
if (pointer.pointerType === "touch" && !pointer.isMultitouch) {
|
|
9032
|
+
const mousemove = this.mouse.move(instance, position, isPrevented);
|
|
9033
|
+
mousemove === null || mousemove === void 0 || mousemove.leave();
|
|
9034
|
+
mousemove === null || mousemove === void 0 || mousemove.enter();
|
|
9035
|
+
mousemove === null || mousemove === void 0 || mousemove.move();
|
|
9036
|
+
this.mouse.down(instance, keyDef, isPrevented);
|
|
9037
|
+
}
|
|
9038
|
+
if (!pointer.isMultitouch) {
|
|
9039
|
+
const mousemove = this.mouse.move(instance, position, isPrevented);
|
|
9040
|
+
mousemove === null || mousemove === void 0 || mousemove.leave();
|
|
9041
|
+
mousemove === null || mousemove === void 0 || mousemove.enter();
|
|
9042
|
+
mousemove === null || mousemove === void 0 || mousemove.move();
|
|
9043
|
+
this.mouse.up(instance, keyDef, isPrevented);
|
|
9044
|
+
}
|
|
9045
|
+
}
|
|
9046
|
+
getPointerName(keyDef) {
|
|
9047
|
+
return keyDef.pointerType === "touch" ? keyDef.name : keyDef.pointerType;
|
|
9048
|
+
}
|
|
9049
|
+
getPreviousPosition(pointerName) {
|
|
9050
|
+
return this.pointers.has(pointerName) ? this.pointers.get(pointerName).position : void 0;
|
|
9051
|
+
}
|
|
9052
|
+
resetClickCount() {
|
|
9053
|
+
this.mouse.resetClickCount();
|
|
9054
|
+
}
|
|
9055
|
+
getMouseTarget(instance) {
|
|
9056
|
+
var _this_mouse_position_target;
|
|
9057
|
+
return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== void 0 ? _this_mouse_position_target : instance.config.document.body;
|
|
9058
|
+
}
|
|
9059
|
+
setMousePosition(position) {
|
|
9060
|
+
this.mouse.position = position;
|
|
9061
|
+
this.pointers.get("mouse").position = position;
|
|
9062
|
+
}
|
|
9063
|
+
constructor(system) {
|
|
9064
|
+
_define_property$1(this, "system", void 0);
|
|
9065
|
+
_define_property$1(this, "mouse", void 0);
|
|
9066
|
+
_define_property$1(this, "buttons", void 0);
|
|
9067
|
+
_define_property$1(this, "devices", new class {
|
|
9068
|
+
get(k) {
|
|
9069
|
+
var _this_registry, _k, _;
|
|
9070
|
+
return (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
|
|
9071
|
+
}
|
|
9072
|
+
constructor() {
|
|
9073
|
+
_define_property$1(this, "registry", {});
|
|
9074
|
+
}
|
|
9075
|
+
}());
|
|
9076
|
+
_define_property$1(this, "pointers", new class {
|
|
9077
|
+
new(pointerName, pointerType, buttons) {
|
|
9078
|
+
const isPrimary = pointerType !== "touch" || !Object.values(this.registry).some((p) => p.pointerType === "touch" && !p.isCancelled);
|
|
9079
|
+
if (!isPrimary) Object.values(this.registry).forEach((p) => {
|
|
9080
|
+
if (p.pointerType === pointerType && !p.isCancelled) p.isMultitouch = true;
|
|
9081
|
+
});
|
|
9082
|
+
this.registry[pointerName] = new Pointer({
|
|
9083
|
+
pointerId: this.nextId++,
|
|
9084
|
+
pointerType,
|
|
9085
|
+
isPrimary
|
|
9086
|
+
}, buttons);
|
|
9087
|
+
return this.registry[pointerName];
|
|
9088
|
+
}
|
|
9089
|
+
get(pointerName) {
|
|
9090
|
+
if (!this.has(pointerName)) throw new Error(`Trying to access pointer "${pointerName}" which does not exist.`);
|
|
9091
|
+
return this.registry[pointerName];
|
|
9092
|
+
}
|
|
9093
|
+
has(pointerName) {
|
|
9094
|
+
return pointerName in this.registry;
|
|
9095
|
+
}
|
|
9096
|
+
constructor() {
|
|
9097
|
+
_define_property$1(this, "registry", {});
|
|
9098
|
+
_define_property$1(this, "nextId", 1);
|
|
9099
|
+
}
|
|
9100
|
+
}());
|
|
9101
|
+
this.system = system;
|
|
9102
|
+
this.buttons = new Buttons();
|
|
9103
|
+
this.mouse = new Mouse();
|
|
9104
|
+
this.pointers.new("mouse", "mouse", this.buttons);
|
|
9105
|
+
}
|
|
9106
|
+
};
|
|
9107
|
+
})))();
|
|
9108
|
+
}
|
|
9109
|
+
//#endregion
|
|
9110
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/system/index.js
|
|
9111
|
+
function _define_property(obj, key, value) {
|
|
9112
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
9113
|
+
value,
|
|
9114
|
+
enumerable: true,
|
|
9115
|
+
configurable: true,
|
|
9116
|
+
writable: true
|
|
9117
|
+
});
|
|
9118
|
+
else obj[key] = value;
|
|
9119
|
+
return obj;
|
|
9120
|
+
}
|
|
9121
|
+
var System;
|
|
9122
|
+
function init_system() {
|
|
9123
|
+
return (init_system = __esmMin((() => {
|
|
9124
|
+
init_keyboard();
|
|
9125
|
+
init_pointer$1();
|
|
9126
|
+
System = class {
|
|
9127
|
+
getUIEventModifiers() {
|
|
9128
|
+
return {
|
|
9129
|
+
altKey: this.keyboard.modifiers.Alt,
|
|
9130
|
+
ctrlKey: this.keyboard.modifiers.Control,
|
|
9131
|
+
metaKey: this.keyboard.modifiers.Meta,
|
|
9132
|
+
shiftKey: this.keyboard.modifiers.Shift,
|
|
9133
|
+
modifierAltGraph: this.keyboard.modifiers.AltGraph,
|
|
9134
|
+
modifierCapsLock: this.keyboard.modifiers.CapsLock,
|
|
9135
|
+
modifierFn: this.keyboard.modifiers.Fn,
|
|
9136
|
+
modifierFnLock: this.keyboard.modifiers.FnLock,
|
|
9137
|
+
modifierNumLock: this.keyboard.modifiers.NumLock,
|
|
9138
|
+
modifierScrollLock: this.keyboard.modifiers.ScrollLock,
|
|
9139
|
+
modifierSymbol: this.keyboard.modifiers.Symbol,
|
|
9140
|
+
modifierSymbolLock: this.keyboard.modifiers.SymbolLock
|
|
9141
|
+
};
|
|
9142
|
+
}
|
|
9143
|
+
constructor() {
|
|
9144
|
+
_define_property(this, "keyboard", new KeyboardHost(this));
|
|
9145
|
+
_define_property(this, "pointer", new PointerHost(this));
|
|
9146
|
+
}
|
|
9147
|
+
};
|
|
9148
|
+
})))();
|
|
9149
|
+
}
|
|
9150
|
+
//#endregion
|
|
9151
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/convenience/click.js
|
|
9152
|
+
async function click$1(element) {
|
|
9153
|
+
const pointerIn = [];
|
|
9154
|
+
if (!this.config.skipHover) pointerIn.push({ target: element });
|
|
9155
|
+
pointerIn.push({
|
|
9156
|
+
keys: "[MouseLeft]",
|
|
9157
|
+
target: element
|
|
9158
|
+
});
|
|
9159
|
+
return this.pointer(pointerIn);
|
|
9160
|
+
}
|
|
9161
|
+
async function dblClick$1(element) {
|
|
9162
|
+
return this.pointer([{ target: element }, "[MouseLeft][MouseLeft]"]);
|
|
9163
|
+
}
|
|
9164
|
+
async function tripleClick$1(element) {
|
|
9165
|
+
return this.pointer([{ target: element }, "[MouseLeft][MouseLeft][MouseLeft]"]);
|
|
9166
|
+
}
|
|
9167
|
+
//#endregion
|
|
9168
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/convenience/hover.js
|
|
9169
|
+
async function hover$1(element) {
|
|
9170
|
+
return this.pointer({ target: element });
|
|
9171
|
+
}
|
|
9172
|
+
async function unhover$1(element) {
|
|
9173
|
+
assertPointerEvents(this, this.system.pointer.getMouseTarget(this));
|
|
9174
|
+
return this.pointer({ target: element.ownerDocument.body });
|
|
9175
|
+
}
|
|
9176
|
+
function init_hover() {
|
|
9177
|
+
return (init_hover = __esmMin((() => {
|
|
9178
|
+
init_Clipboard();
|
|
9179
|
+
init_cssPointerEvents();
|
|
9180
|
+
})))();
|
|
9181
|
+
}
|
|
9182
|
+
//#endregion
|
|
9183
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/convenience/tab.js
|
|
9184
|
+
async function tab$1({ shift } = {}) {
|
|
9185
|
+
return this.keyboard(shift === true ? "{Shift>}{Tab}{/Shift}" : shift === false ? "[/ShiftLeft][/ShiftRight]{Tab}" : "{Tab}");
|
|
9186
|
+
}
|
|
9187
|
+
//#endregion
|
|
9188
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/keyDef/readNextDescriptor.js
|
|
9189
|
+
/**
|
|
9190
|
+
* Read the next key definition from user input
|
|
9191
|
+
*
|
|
9192
|
+
* Describe key per `{descriptor}` or `[descriptor]`.
|
|
9193
|
+
* Everything else will be interpreted as a single character as descriptor - e.g. `a`.
|
|
9194
|
+
* Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.
|
|
9195
|
+
* A previously pressed key can be released per `{/descriptor}`.
|
|
9196
|
+
* Keeping the key pressed can be written as `{descriptor>}`.
|
|
9197
|
+
* When keeping the key pressed you can choose how long the key is pressed `{descriptor>3}`.
|
|
9198
|
+
* You can then release the key per `{descriptor>3/}` or keep it pressed and continue with the next key.
|
|
9199
|
+
*/ function readNextDescriptor(text, context) {
|
|
9200
|
+
let pos = 0;
|
|
9201
|
+
const startBracket = text[pos] in bracketDict ? text[pos] : "";
|
|
9202
|
+
pos += startBracket.length;
|
|
9203
|
+
const type = new RegExp(`^\\${startBracket}{2}`).test(text) ? "" : startBracket;
|
|
9204
|
+
return {
|
|
9205
|
+
type,
|
|
9206
|
+
...type === "" ? readPrintableChar(text, pos, context) : readTag(text, pos, type, context)
|
|
9207
|
+
};
|
|
9208
|
+
}
|
|
9209
|
+
function readPrintableChar(text, pos, context) {
|
|
9210
|
+
const descriptor = text[pos];
|
|
9211
|
+
assertDescriptor(descriptor, text, pos, context);
|
|
9212
|
+
pos += descriptor.length;
|
|
9213
|
+
return {
|
|
9214
|
+
consumedLength: pos,
|
|
9215
|
+
descriptor,
|
|
9216
|
+
releasePrevious: false,
|
|
9217
|
+
releaseSelf: true,
|
|
9218
|
+
repeat: 1
|
|
9219
|
+
};
|
|
9220
|
+
}
|
|
9221
|
+
function readTag(text, pos, startBracket, context) {
|
|
9222
|
+
var _ref;
|
|
9223
|
+
var _text_slice_match, _text_slice_match1;
|
|
9224
|
+
const releasePreviousModifier = text[pos] === "/" ? "/" : "";
|
|
9225
|
+
pos += releasePreviousModifier.length;
|
|
9226
|
+
const escapedDescriptor = startBracket === "{" && text[pos] === "\\";
|
|
9227
|
+
pos += Number(escapedDescriptor);
|
|
9228
|
+
const descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === "{" ? /^\w+|^[^}>/]/ : /^\w+/)) === null || _text_slice_match === void 0 ? void 0 : _text_slice_match[0];
|
|
9229
|
+
assertDescriptor(descriptor, text, pos, context);
|
|
9230
|
+
pos += descriptor.length;
|
|
9231
|
+
const repeatModifier = (_ref = (_text_slice_match1 = text.slice(pos).match(/^>\d+/)) === null || _text_slice_match1 === void 0 ? void 0 : _text_slice_match1[0]) !== null && _ref !== void 0 ? _ref : "";
|
|
9232
|
+
pos += repeatModifier.length;
|
|
9233
|
+
const releaseSelfModifier = text[pos] === "/" || !repeatModifier && text[pos] === ">" ? text[pos] : "";
|
|
9234
|
+
pos += releaseSelfModifier.length;
|
|
9235
|
+
const expectedEndBracket = bracketDict[startBracket];
|
|
9236
|
+
const endBracket = text[pos] === expectedEndBracket ? expectedEndBracket : "";
|
|
9237
|
+
if (!endBracket) throw new Error(getErrorMessage([
|
|
9238
|
+
!repeatModifier && "repeat modifier",
|
|
9239
|
+
!releaseSelfModifier && "release modifier",
|
|
9240
|
+
`"${expectedEndBracket}"`
|
|
9241
|
+
].filter(Boolean).join(" or "), text[pos], text, context));
|
|
9242
|
+
pos += endBracket.length;
|
|
9243
|
+
return {
|
|
9244
|
+
consumedLength: pos,
|
|
9245
|
+
descriptor,
|
|
9246
|
+
releasePrevious: !!releasePreviousModifier,
|
|
9247
|
+
repeat: repeatModifier ? Math.max(Number(repeatModifier.substr(1)), 1) : 1,
|
|
9248
|
+
releaseSelf: hasReleaseSelf(releaseSelfModifier, repeatModifier)
|
|
9249
|
+
};
|
|
9250
|
+
}
|
|
9251
|
+
function assertDescriptor(descriptor, text, pos, context) {
|
|
9252
|
+
if (!descriptor) throw new Error(getErrorMessage("key descriptor", text[pos], text, context));
|
|
9253
|
+
}
|
|
9254
|
+
function hasReleaseSelf(releaseSelfModifier, repeatModifier) {
|
|
9255
|
+
if (releaseSelfModifier) return releaseSelfModifier === "/";
|
|
9256
|
+
if (repeatModifier) return false;
|
|
9257
|
+
}
|
|
9258
|
+
function getErrorMessage(expected, found, text, context) {
|
|
9259
|
+
return `Expected ${expected} but found "${found !== null && found !== void 0 ? found : ""}" in "${text}"
|
|
9260
|
+
See ${context === "pointer" ? `https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen` : `https://testing-library.com/docs/user-event/keyboard`}
|
|
9261
|
+
for more information about how userEvent parses your input.`;
|
|
9262
|
+
}
|
|
9263
|
+
var bracketDict;
|
|
9264
|
+
function init_readNextDescriptor() {
|
|
9265
|
+
return (init_readNextDescriptor = __esmMin((() => {
|
|
9266
|
+
bracketDict = {
|
|
9267
|
+
"{": "}",
|
|
9268
|
+
"[": "]"
|
|
9269
|
+
};
|
|
9270
|
+
})))();
|
|
9271
|
+
}
|
|
9272
|
+
//#endregion
|
|
9273
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/keyboard/parseKeyDef.js
|
|
9274
|
+
/**
|
|
9275
|
+
* Parse key definitions per `keyboardMap`
|
|
9276
|
+
*
|
|
9277
|
+
* Keys can be referenced by `{key}` or `{special}` as well as physical locations per `[code]`.
|
|
9278
|
+
* Everything else will be interpreted as a typed character - e.g. `a`.
|
|
9279
|
+
* Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.
|
|
9280
|
+
* Keeping the key pressed can be written as `{key>}`.
|
|
9281
|
+
* When keeping the key pressed you can choose how long (how many keydown and keypress) the key is pressed `{key>3}`.
|
|
9282
|
+
* You can then release the key per `{key>3/}` or keep it pressed and continue with the next key.
|
|
9283
|
+
*/ function parseKeyDef$1(keyboardMap, text) {
|
|
9284
|
+
const defs = [];
|
|
9285
|
+
do {
|
|
9286
|
+
var _keyboardMap_find;
|
|
9287
|
+
const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, "keyboard");
|
|
9288
|
+
const keyDef = (_keyboardMap_find = keyboardMap.find((def) => {
|
|
9289
|
+
if (type === "[") {
|
|
9290
|
+
var _def_code;
|
|
9291
|
+
return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
|
|
9292
|
+
} else if (type === "{") {
|
|
9293
|
+
var _def_key;
|
|
9294
|
+
return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
|
|
9295
|
+
}
|
|
9296
|
+
return def.key === descriptor;
|
|
9297
|
+
})) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
|
|
9298
|
+
key: "Unknown",
|
|
9299
|
+
code: "Unknown",
|
|
9300
|
+
[type === "[" ? "code" : "key"]: descriptor
|
|
9301
|
+
};
|
|
9302
|
+
defs.push({
|
|
9303
|
+
keyDef,
|
|
9304
|
+
releasePrevious,
|
|
9305
|
+
releaseSelf,
|
|
9306
|
+
repeat
|
|
9307
|
+
});
|
|
9308
|
+
text = text.slice(consumedLength);
|
|
9309
|
+
} while (text);
|
|
9310
|
+
return defs;
|
|
9311
|
+
}
|
|
9312
|
+
function init_parseKeyDef() {
|
|
9313
|
+
return (init_parseKeyDef = __esmMin((() => {
|
|
9314
|
+
init_Clipboard();
|
|
9315
|
+
init_readNextDescriptor();
|
|
9316
|
+
})))();
|
|
9317
|
+
}
|
|
9318
|
+
//#endregion
|
|
9319
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/keyboard/index.js
|
|
9320
|
+
async function keyboard$1(text) {
|
|
9321
|
+
const actions = parseKeyDef$1(this.config.keyboardMap, text);
|
|
9322
|
+
for (let i = 0; i < actions.length; i++) {
|
|
9323
|
+
await wait(this.config);
|
|
9324
|
+
await keyboardAction(this, actions[i]);
|
|
9325
|
+
}
|
|
9326
|
+
}
|
|
9327
|
+
async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
|
|
9328
|
+
const { system } = instance;
|
|
9329
|
+
if (system.keyboard.isKeyPressed(keyDef)) await system.keyboard.keyup(instance, keyDef);
|
|
9330
|
+
if (!releasePrevious) {
|
|
9331
|
+
for (let i = 1; i <= repeat; i++) {
|
|
9332
|
+
await system.keyboard.keydown(instance, keyDef, i > 1);
|
|
9333
|
+
if (i < repeat) await wait(instance.config);
|
|
9334
|
+
}
|
|
9335
|
+
if (releaseSelf) await system.keyboard.keyup(instance, keyDef);
|
|
9336
|
+
}
|
|
9337
|
+
}
|
|
9338
|
+
async function releaseAllKeys(instance) {
|
|
9339
|
+
for (const k of instance.system.keyboard.getPressedKeys()) await instance.system.keyboard.keyup(instance, k);
|
|
9340
|
+
}
|
|
9341
|
+
function init_keyboard$1() {
|
|
9342
|
+
return (init_keyboard$1 = __esmMin((() => {
|
|
9343
|
+
init_Clipboard();
|
|
9344
|
+
init_parseKeyDef();
|
|
9345
|
+
})))();
|
|
9346
|
+
}
|
|
9347
|
+
//#endregion
|
|
9348
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/document/copySelection.js
|
|
9349
|
+
function copySelection(target) {
|
|
9350
|
+
const data = hasOwnSelection(target) ? { "text/plain": readSelectedValueFromInput(target) } : { "text/plain": String(target.ownerDocument.getSelection()) };
|
|
9351
|
+
const dt = createDataTransfer(getWindow(target));
|
|
9352
|
+
for (const type in data) if (data[type]) dt.setData(type, data[type]);
|
|
9353
|
+
return dt;
|
|
9354
|
+
}
|
|
9355
|
+
function readSelectedValueFromInput(target) {
|
|
9356
|
+
const sel = getUISelection(target);
|
|
9357
|
+
return getUIValue(target).substring(sel.startOffset, sel.endOffset);
|
|
9358
|
+
}
|
|
9359
|
+
function init_copySelection() {
|
|
9360
|
+
return (init_copySelection = __esmMin((() => {
|
|
9361
|
+
init_DataTransfer();
|
|
9362
|
+
init_Clipboard();
|
|
9363
|
+
init_selection();
|
|
9364
|
+
init_UI();
|
|
9365
|
+
})))();
|
|
9366
|
+
}
|
|
9367
|
+
//#endregion
|
|
9368
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/clipboard/copy.js
|
|
9369
|
+
async function copy$1() {
|
|
9370
|
+
var _doc_activeElement;
|
|
9371
|
+
const doc = this.config.document;
|
|
9372
|
+
const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
|
|
9373
|
+
const clipboardData = copySelection(target);
|
|
9374
|
+
if (clipboardData.items.length === 0) return;
|
|
9375
|
+
if (this.dispatchUIEvent(target, "copy", { clipboardData }) && this.config.writeToClipboard) await writeDataTransferToClipboard(doc, clipboardData);
|
|
9376
|
+
return clipboardData;
|
|
9377
|
+
}
|
|
9378
|
+
function init_copy() {
|
|
9379
|
+
return (init_copy = __esmMin((() => {
|
|
9380
|
+
init_Clipboard();
|
|
9381
|
+
init_copySelection();
|
|
9382
|
+
})))();
|
|
9383
|
+
}
|
|
9384
|
+
//#endregion
|
|
9385
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/clipboard/cut.js
|
|
9386
|
+
async function cut$1() {
|
|
9387
|
+
var _doc_activeElement;
|
|
9388
|
+
const doc = this.config.document;
|
|
9389
|
+
const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
|
|
9390
|
+
const clipboardData = copySelection(target);
|
|
9391
|
+
if (clipboardData.items.length === 0) return;
|
|
9392
|
+
if (this.dispatchUIEvent(target, "cut", { clipboardData }) && this.config.writeToClipboard) await writeDataTransferToClipboard(target.ownerDocument, clipboardData);
|
|
9393
|
+
return clipboardData;
|
|
9394
|
+
}
|
|
9395
|
+
function init_cut$1() {
|
|
9396
|
+
return (init_cut$1 = __esmMin((() => {
|
|
9397
|
+
init_Clipboard();
|
|
9398
|
+
init_copySelection();
|
|
9399
|
+
})))();
|
|
9400
|
+
}
|
|
9401
|
+
//#endregion
|
|
9402
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/clipboard/paste.js
|
|
9403
|
+
async function paste$1(clipboardData) {
|
|
9404
|
+
var _doc_activeElement, _ref;
|
|
9405
|
+
const doc = this.config.document;
|
|
9406
|
+
const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
|
|
9407
|
+
const dataTransfer = (_ref = typeof clipboardData === "string" ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(() => {
|
|
9408
|
+
throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.");
|
|
9409
|
+
});
|
|
9410
|
+
this.dispatchUIEvent(target, "paste", { clipboardData: dataTransfer });
|
|
9411
|
+
}
|
|
9412
|
+
function getClipboardDataFromString(doc, text) {
|
|
9413
|
+
const dt = createDataTransfer(getWindow(doc));
|
|
9414
|
+
dt.setData("text", text);
|
|
9415
|
+
return dt;
|
|
9416
|
+
}
|
|
9417
|
+
function init_paste$1() {
|
|
9418
|
+
return (init_paste$1 = __esmMin((() => {
|
|
9419
|
+
init_DataTransfer();
|
|
9420
|
+
init_Clipboard();
|
|
9421
|
+
})))();
|
|
9422
|
+
}
|
|
9423
|
+
//#endregion
|
|
9424
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/pointer/parseKeyDef.js
|
|
9425
|
+
function parseKeyDef(pointerMap, keys) {
|
|
9426
|
+
const defs = [];
|
|
9427
|
+
do {
|
|
9428
|
+
const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, "pointer");
|
|
9429
|
+
const keyDef = pointerMap.find((p) => p.name === descriptor);
|
|
9430
|
+
if (keyDef) defs.push({
|
|
9431
|
+
keyDef,
|
|
9432
|
+
releasePrevious,
|
|
9433
|
+
releaseSelf
|
|
9434
|
+
});
|
|
9435
|
+
keys = keys.slice(consumedLength);
|
|
9436
|
+
} while (keys);
|
|
9437
|
+
return defs;
|
|
9438
|
+
}
|
|
9439
|
+
function init_parseKeyDef$1() {
|
|
9440
|
+
return (init_parseKeyDef$1 = __esmMin((() => {
|
|
9441
|
+
init_Clipboard();
|
|
9442
|
+
init_readNextDescriptor();
|
|
9443
|
+
})))();
|
|
9444
|
+
}
|
|
9445
|
+
//#endregion
|
|
9446
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/pointer/index.js
|
|
9447
|
+
async function pointer$1(input) {
|
|
9448
|
+
const { pointerMap } = this.config;
|
|
9449
|
+
const actions = [];
|
|
9450
|
+
(Array.isArray(input) ? input : [input]).forEach((actionInput) => {
|
|
9451
|
+
if (typeof actionInput === "string") actions.push(...parseKeyDef(pointerMap, actionInput));
|
|
9452
|
+
else if ("keys" in actionInput) actions.push(...parseKeyDef(pointerMap, actionInput.keys).map((i) => ({
|
|
9453
|
+
...actionInput,
|
|
9454
|
+
...i
|
|
9455
|
+
})));
|
|
9456
|
+
else actions.push(actionInput);
|
|
9457
|
+
});
|
|
9458
|
+
for (let i = 0; i < actions.length; i++) {
|
|
9459
|
+
await wait(this.config);
|
|
9460
|
+
await pointerAction(this, actions[i]);
|
|
9461
|
+
}
|
|
9462
|
+
this.system.pointer.resetClickCount();
|
|
9463
|
+
}
|
|
9464
|
+
async function pointerAction(instance, action) {
|
|
9465
|
+
var _action_target, _action_coords, _action_node, _action_offset;
|
|
9466
|
+
var _previousPosition_caret, _previousPosition_caret1;
|
|
9467
|
+
const pointerName = "pointerName" in action && action.pointerName ? action.pointerName : "keyDef" in action ? instance.system.pointer.getPointerName(action.keyDef) : "mouse";
|
|
9468
|
+
const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
|
|
9469
|
+
const position = {
|
|
9470
|
+
target: (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
|
|
9471
|
+
coords: (_action_coords = action.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
|
|
9472
|
+
caret: {
|
|
9473
|
+
node: (_action_node = action.node) !== null && _action_node !== void 0 ? _action_node : hasCaretPosition(action) ? void 0 : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === void 0 ? void 0 : _previousPosition_caret.node,
|
|
9474
|
+
offset: (_action_offset = action.offset) !== null && _action_offset !== void 0 ? _action_offset : hasCaretPosition(action) ? void 0 : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === void 0 ? void 0 : _previousPosition_caret1.offset
|
|
9475
|
+
}
|
|
9476
|
+
};
|
|
9477
|
+
if ("keyDef" in action) {
|
|
9478
|
+
if (instance.system.pointer.isKeyPressed(action.keyDef)) {
|
|
9479
|
+
setLevelRef(instance, ApiLevel.Trigger);
|
|
9480
|
+
await instance.system.pointer.release(instance, action.keyDef, position);
|
|
9481
|
+
}
|
|
9482
|
+
if (!action.releasePrevious) {
|
|
9483
|
+
setLevelRef(instance, ApiLevel.Trigger);
|
|
9484
|
+
await instance.system.pointer.press(instance, action.keyDef, position);
|
|
9485
|
+
if (action.releaseSelf) {
|
|
9486
|
+
setLevelRef(instance, ApiLevel.Trigger);
|
|
9487
|
+
await instance.system.pointer.release(instance, action.keyDef, position);
|
|
9488
|
+
}
|
|
9489
|
+
}
|
|
9490
|
+
} else {
|
|
9491
|
+
setLevelRef(instance, ApiLevel.Trigger);
|
|
9492
|
+
await instance.system.pointer.move(instance, pointerName, position);
|
|
9493
|
+
}
|
|
9494
|
+
}
|
|
9495
|
+
function hasCaretPosition(action) {
|
|
9496
|
+
var _ref, _action_target;
|
|
9497
|
+
return !!((_ref = (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : action.node) !== null && _ref !== void 0 ? _ref : action.offset !== void 0);
|
|
9498
|
+
}
|
|
9499
|
+
function getPrevTarget(instance, position) {
|
|
9500
|
+
var _position_target;
|
|
9501
|
+
if (!position) throw new Error("This pointer has no previous position. Provide a target property!");
|
|
9502
|
+
return (_position_target = position.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
|
|
9503
|
+
}
|
|
9504
|
+
function init_pointer$2() {
|
|
9505
|
+
return (init_pointer$2 = __esmMin((() => {
|
|
9506
|
+
init_Clipboard();
|
|
9507
|
+
init_level();
|
|
9508
|
+
init_parseKeyDef$1();
|
|
9509
|
+
})))();
|
|
9510
|
+
}
|
|
9511
|
+
//#endregion
|
|
9512
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utility/clear.js
|
|
9513
|
+
async function clear$1(element) {
|
|
9514
|
+
if (!isEditable(element) || isDisabled(element)) throw new Error("clear()` is only supported on editable elements.");
|
|
9515
|
+
focusElement(element);
|
|
9516
|
+
if (element.ownerDocument.activeElement !== element) throw new Error("The element to be cleared could not be focused.");
|
|
9517
|
+
selectAll(element);
|
|
9518
|
+
if (!isAllSelected(element)) throw new Error("The element content to be cleared could not be selected.");
|
|
9519
|
+
input(this, element, "", "deleteContentBackward");
|
|
9520
|
+
}
|
|
9521
|
+
function init_clear() {
|
|
9522
|
+
return (init_clear = __esmMin((() => {
|
|
9523
|
+
init_click();
|
|
9524
|
+
init_cut();
|
|
9525
|
+
init_keydown();
|
|
9526
|
+
init_keypress();
|
|
9527
|
+
init_keyup();
|
|
9528
|
+
init_paste();
|
|
9529
|
+
init_dom_esm();
|
|
9530
|
+
init_Clipboard();
|
|
9531
|
+
init_isEditable();
|
|
9532
|
+
init_isDisabled();
|
|
9533
|
+
init_focus();
|
|
9534
|
+
init_input();
|
|
9535
|
+
init_selectAll();
|
|
9536
|
+
})))();
|
|
9537
|
+
}
|
|
9538
|
+
//#endregion
|
|
9539
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utility/selectOptions.js
|
|
9540
|
+
async function selectOptions$1(select, values) {
|
|
9541
|
+
return selectOptionsBase.call(this, true, select, values);
|
|
9542
|
+
}
|
|
9543
|
+
async function deselectOptions$1(select, values) {
|
|
9544
|
+
return selectOptionsBase.call(this, false, select, values);
|
|
9545
|
+
}
|
|
9546
|
+
async function selectOptionsBase(newValue, select, values) {
|
|
9547
|
+
if (!newValue && !select.multiple) throw getConfig().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
|
|
9548
|
+
const valArray = Array.isArray(values) ? values : [values];
|
|
9549
|
+
const allOptions = Array.from(select.querySelectorAll("option, [role=\"option\"]"));
|
|
9550
|
+
const selectedOptions = valArray.map((val) => {
|
|
9551
|
+
if (typeof val !== "string" && allOptions.includes(val)) return val;
|
|
9552
|
+
else {
|
|
9553
|
+
const matchingOption = allOptions.find((o) => o.value === val || o.innerHTML === val);
|
|
9554
|
+
if (matchingOption) return matchingOption;
|
|
9555
|
+
else throw getConfig().getElementError(`Value "${String(val)}" not found in options`, select);
|
|
9556
|
+
}
|
|
9557
|
+
}).filter((option) => !isDisabled(option));
|
|
9558
|
+
if (isDisabled(select) || !selectedOptions.length) return;
|
|
9559
|
+
const selectOption = (option) => {
|
|
9560
|
+
option.selected = newValue;
|
|
9561
|
+
this.dispatchUIEvent(select, "input", {
|
|
9562
|
+
bubbles: true,
|
|
9563
|
+
cancelable: false,
|
|
9564
|
+
composed: true
|
|
9565
|
+
});
|
|
9566
|
+
this.dispatchUIEvent(select, "change");
|
|
9567
|
+
};
|
|
9568
|
+
if (isElementType(select, "select")) {
|
|
9569
|
+
if (select.multiple) for (const option of selectedOptions) {
|
|
9570
|
+
const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, option);
|
|
9571
|
+
if (withPointerEvents) {
|
|
9572
|
+
this.dispatchUIEvent(option, "pointerover");
|
|
9573
|
+
this.dispatchUIEvent(select, "pointerenter");
|
|
9574
|
+
this.dispatchUIEvent(option, "mouseover");
|
|
9575
|
+
this.dispatchUIEvent(select, "mouseenter");
|
|
9576
|
+
this.dispatchUIEvent(option, "pointermove");
|
|
9577
|
+
this.dispatchUIEvent(option, "mousemove");
|
|
9578
|
+
this.dispatchUIEvent(option, "pointerdown");
|
|
9579
|
+
this.dispatchUIEvent(option, "mousedown");
|
|
9580
|
+
}
|
|
9581
|
+
focusElement(select);
|
|
9582
|
+
if (withPointerEvents) {
|
|
9583
|
+
this.dispatchUIEvent(option, "pointerup");
|
|
9584
|
+
this.dispatchUIEvent(option, "mouseup");
|
|
9585
|
+
}
|
|
9586
|
+
selectOption(option);
|
|
9587
|
+
if (withPointerEvents) this.dispatchUIEvent(option, "click");
|
|
9588
|
+
await wait(this.config);
|
|
9589
|
+
}
|
|
9590
|
+
else if (selectedOptions.length === 1) {
|
|
9591
|
+
const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
|
|
9592
|
+
if (withPointerEvents) await this.click(select);
|
|
9593
|
+
else focusElement(select);
|
|
9594
|
+
selectOption(selectedOptions[0]);
|
|
9595
|
+
if (withPointerEvents) {
|
|
9596
|
+
this.dispatchUIEvent(select, "pointerover");
|
|
9597
|
+
this.dispatchUIEvent(select, "pointerenter");
|
|
9598
|
+
this.dispatchUIEvent(select, "mouseover");
|
|
9599
|
+
this.dispatchUIEvent(select, "mouseenter");
|
|
9600
|
+
this.dispatchUIEvent(select, "pointerup");
|
|
9601
|
+
this.dispatchUIEvent(select, "mouseup");
|
|
9602
|
+
this.dispatchUIEvent(select, "click");
|
|
9603
|
+
}
|
|
9604
|
+
await wait(this.config);
|
|
9605
|
+
} else throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);
|
|
9606
|
+
} else if (select.getAttribute("role") === "listbox") for (const option of selectedOptions) {
|
|
9607
|
+
await this.click(option);
|
|
9608
|
+
await this.unhover(option);
|
|
9609
|
+
}
|
|
9610
|
+
else throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
|
|
9611
|
+
}
|
|
9612
|
+
function init_selectOptions() {
|
|
9613
|
+
return (init_selectOptions = __esmMin((() => {
|
|
9614
|
+
init_dom_esm();
|
|
9615
|
+
init_Clipboard();
|
|
9616
|
+
init_isDisabled();
|
|
9617
|
+
init_cssPointerEvents();
|
|
9618
|
+
init_click();
|
|
9619
|
+
init_cut();
|
|
9620
|
+
init_keydown();
|
|
9621
|
+
init_keypress();
|
|
9622
|
+
init_keyup();
|
|
9623
|
+
init_paste();
|
|
9624
|
+
init_focus();
|
|
9625
|
+
})))();
|
|
9626
|
+
}
|
|
9627
|
+
//#endregion
|
|
9628
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utility/type.js
|
|
9629
|
+
async function type$1(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
|
|
9630
|
+
if (element.disabled) return;
|
|
9631
|
+
if (!skipClick) await this.click(element);
|
|
9632
|
+
if (initialSelectionStart !== void 0) setSelectionRange(element, initialSelectionStart, initialSelectionEnd !== null && initialSelectionEnd !== void 0 ? initialSelectionEnd : initialSelectionStart);
|
|
9633
|
+
await this.keyboard(text);
|
|
9634
|
+
if (!skipAutoClose) await releaseAllKeys(this);
|
|
9635
|
+
}
|
|
9636
|
+
function init_type() {
|
|
9637
|
+
return (init_type = __esmMin((() => {
|
|
9638
|
+
init_keyboard$1();
|
|
9639
|
+
init_Clipboard();
|
|
9640
|
+
init_setSelectionRange();
|
|
9641
|
+
})))();
|
|
9642
|
+
}
|
|
9643
|
+
//#endregion
|
|
9644
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/setFiles.js
|
|
9645
|
+
function restoreProperty(obj, prop, descriptor) {
|
|
9646
|
+
if (descriptor) Object.defineProperty(obj, prop, descriptor);
|
|
9647
|
+
else delete obj[prop];
|
|
9648
|
+
}
|
|
9649
|
+
function setFiles(el, files) {
|
|
9650
|
+
var _el_fakeFiles;
|
|
9651
|
+
(_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 || _el_fakeFiles.restore();
|
|
9652
|
+
const typeDescr = Object.getOwnPropertyDescriptor(el, "type");
|
|
9653
|
+
const valueDescr = Object.getOwnPropertyDescriptor(el, "value");
|
|
9654
|
+
const filesDescr = Object.getOwnPropertyDescriptor(el, "files");
|
|
9655
|
+
function restore() {
|
|
9656
|
+
restoreProperty(el, "type", typeDescr);
|
|
9657
|
+
restoreProperty(el, "value", valueDescr);
|
|
9658
|
+
restoreProperty(el, "files", filesDescr);
|
|
9659
|
+
}
|
|
9660
|
+
el[fakeFiles] = { restore };
|
|
9661
|
+
Object.defineProperties(el, {
|
|
9662
|
+
files: {
|
|
9663
|
+
configurable: true,
|
|
9664
|
+
get: () => files
|
|
9665
|
+
},
|
|
9666
|
+
value: {
|
|
9667
|
+
configurable: true,
|
|
9668
|
+
get: () => files.length ? `C:\\fakepath\\${files[0].name}` : "",
|
|
9669
|
+
set(v) {
|
|
9670
|
+
if (v === "") restore();
|
|
9671
|
+
else {
|
|
9672
|
+
var _valueDescr_set;
|
|
9673
|
+
valueDescr === null || valueDescr === void 0 || (_valueDescr_set = valueDescr.set) == null || _valueDescr_set.call(el, v);
|
|
9674
|
+
}
|
|
9675
|
+
}
|
|
9676
|
+
},
|
|
9677
|
+
type: {
|
|
9678
|
+
configurable: true,
|
|
9679
|
+
get: () => "file",
|
|
9680
|
+
set(v) {
|
|
9681
|
+
if (v !== "file") {
|
|
9682
|
+
restore();
|
|
9683
|
+
el.type = v;
|
|
9684
|
+
}
|
|
9685
|
+
}
|
|
9686
|
+
}
|
|
9687
|
+
});
|
|
9688
|
+
}
|
|
9689
|
+
var fakeFiles;
|
|
9690
|
+
function init_setFiles() {
|
|
9691
|
+
return (init_setFiles = __esmMin((() => {
|
|
9692
|
+
fakeFiles = Symbol("files and value properties are mocked");
|
|
9693
|
+
})))();
|
|
9694
|
+
}
|
|
9695
|
+
//#endregion
|
|
9696
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/utility/upload.js
|
|
9697
|
+
async function upload$1(element, fileOrFiles) {
|
|
9698
|
+
const input = isElementType(element, "label") ? element.control : element;
|
|
9699
|
+
if (!input || !isElementType(input, "input", { type: "file" })) throw new TypeError(`The ${input === element ? "given" : "associated"} ${input === null || input === void 0 ? void 0 : input.tagName} element does not accept file uploads`);
|
|
9700
|
+
if (isDisabled(element)) return;
|
|
9701
|
+
const files = (Array.isArray(fileOrFiles) ? fileOrFiles : [fileOrFiles]).filter((file) => !this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? void 0 : 1);
|
|
9702
|
+
const fileDialog = () => {
|
|
9703
|
+
var _input_files;
|
|
9704
|
+
if (files.length === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f, i) => {
|
|
9705
|
+
var _input_files;
|
|
9706
|
+
return f === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.item(i));
|
|
9707
|
+
})) return;
|
|
9708
|
+
setFiles(input, createFileList(getWindow(element), files));
|
|
9709
|
+
this.dispatchUIEvent(input, "input");
|
|
9710
|
+
this.dispatchUIEvent(input, "change");
|
|
9711
|
+
};
|
|
9712
|
+
input.addEventListener("fileDialog", fileDialog);
|
|
9713
|
+
await this.click(element);
|
|
9714
|
+
input.removeEventListener("fileDialog", fileDialog);
|
|
9715
|
+
}
|
|
9716
|
+
function normalize(nameOrType) {
|
|
9717
|
+
return nameOrType.toLowerCase().replace(/(\.|\/)jpg\b/g, "$1jpeg");
|
|
9718
|
+
}
|
|
9719
|
+
function isAcceptableFile(file, accept) {
|
|
9720
|
+
if (!accept) return true;
|
|
9721
|
+
const wildcards = [
|
|
9722
|
+
"audio/*",
|
|
9723
|
+
"image/*",
|
|
9724
|
+
"video/*"
|
|
9725
|
+
];
|
|
9726
|
+
return normalize(accept).trim().split(/\s*,\s*/).some((acceptToken) => {
|
|
9727
|
+
if (acceptToken.startsWith(".")) return normalize(file.name).endsWith(acceptToken);
|
|
9728
|
+
else if (wildcards.includes(acceptToken)) return normalize(file.type).startsWith(acceptToken.replace("*", ""));
|
|
9729
|
+
return normalize(file.type) === acceptToken;
|
|
9730
|
+
});
|
|
9731
|
+
}
|
|
9732
|
+
function init_upload() {
|
|
9733
|
+
return (init_upload = __esmMin((() => {
|
|
9734
|
+
init_Clipboard();
|
|
9735
|
+
init_setFiles();
|
|
9736
|
+
init_isDisabled();
|
|
9737
|
+
})))();
|
|
9738
|
+
}
|
|
9739
|
+
//#endregion
|
|
9740
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/setup/api.js
|
|
9741
|
+
var userEventApi;
|
|
9742
|
+
function init_api() {
|
|
9743
|
+
return (init_api = __esmMin((() => {
|
|
9744
|
+
init_hover();
|
|
9745
|
+
init_keyboard$1();
|
|
9746
|
+
init_copy();
|
|
9747
|
+
init_cut$1();
|
|
9748
|
+
init_paste$1();
|
|
9749
|
+
init_pointer$2();
|
|
9750
|
+
init_clear();
|
|
9751
|
+
init_selectOptions();
|
|
9752
|
+
init_type();
|
|
9753
|
+
init_upload();
|
|
9754
|
+
userEventApi = {
|
|
9755
|
+
click: click$1,
|
|
9756
|
+
dblClick: dblClick$1,
|
|
9757
|
+
tripleClick: tripleClick$1,
|
|
9758
|
+
hover: hover$1,
|
|
9759
|
+
unhover: unhover$1,
|
|
9760
|
+
tab: tab$1,
|
|
9761
|
+
keyboard: keyboard$1,
|
|
9762
|
+
copy: copy$1,
|
|
9763
|
+
cut: cut$1,
|
|
9764
|
+
paste: paste$1,
|
|
9765
|
+
pointer: pointer$1,
|
|
9766
|
+
clear: clear$1,
|
|
9767
|
+
deselectOptions: deselectOptions$1,
|
|
9768
|
+
selectOptions: selectOptions$1,
|
|
9769
|
+
type: type$1,
|
|
9770
|
+
upload: upload$1
|
|
9771
|
+
};
|
|
9772
|
+
})))();
|
|
9773
|
+
}
|
|
9774
|
+
//#endregion
|
|
9775
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/setup/wrapAsync.js
|
|
9776
|
+
/**
|
|
9777
|
+
* Wrap an internal Promise
|
|
9778
|
+
*/ function wrapAsync(implementation) {
|
|
9779
|
+
return getConfig().asyncWrapper(implementation);
|
|
9780
|
+
}
|
|
9781
|
+
function init_wrapAsync() {
|
|
9782
|
+
return (init_wrapAsync = __esmMin((() => {
|
|
9783
|
+
init_dom_esm();
|
|
9784
|
+
})))();
|
|
9785
|
+
}
|
|
9786
|
+
//#endregion
|
|
9787
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/setup/setup.js
|
|
9788
|
+
function createConfig(options = {}, defaults = defaultOptionsSetup, node) {
|
|
9789
|
+
const document = getDocument(options, node, defaults);
|
|
9790
|
+
return {
|
|
9791
|
+
...defaults,
|
|
9792
|
+
...options,
|
|
9793
|
+
document
|
|
9794
|
+
};
|
|
9795
|
+
}
|
|
9796
|
+
/**
|
|
9797
|
+
* Start a "session" with userEvent.
|
|
9798
|
+
* All APIs returned by this function share an input device state and a default configuration.
|
|
9799
|
+
*/ function setupMain(options = {}) {
|
|
9800
|
+
var _config_document_defaultView;
|
|
9801
|
+
const config = createConfig(options);
|
|
9802
|
+
prepareDocument(config.document);
|
|
9803
|
+
patchFocus(getWindow(config.document).HTMLElement);
|
|
9804
|
+
attachClipboardStubToView((_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window);
|
|
9805
|
+
return createInstance(config).api;
|
|
9806
|
+
}
|
|
9807
|
+
/**
|
|
9808
|
+
* Setup in direct call per `userEvent.anyApi()`
|
|
9809
|
+
*/ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {
|
|
9810
|
+
var _ref;
|
|
9811
|
+
const config = createConfig(options, defaultOptionsDirect, node);
|
|
9812
|
+
prepareDocument(config.document);
|
|
9813
|
+
patchFocus(getWindow(config.document).HTMLElement);
|
|
9814
|
+
const system = (_ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && _ref !== void 0 ? _ref : new System();
|
|
9815
|
+
return {
|
|
9816
|
+
api: createInstance(config, system).api,
|
|
9817
|
+
system
|
|
9818
|
+
};
|
|
9819
|
+
}
|
|
9820
|
+
/**
|
|
9821
|
+
* Create a set of callbacks with different default settings but the same state.
|
|
9822
|
+
*/ function setupSub(options) {
|
|
9823
|
+
return createInstance({
|
|
9824
|
+
...this.config,
|
|
9825
|
+
...options
|
|
9826
|
+
}, this.system).api;
|
|
9827
|
+
}
|
|
9828
|
+
function wrapAndBindImpl(instance, impl) {
|
|
9829
|
+
function method(...args) {
|
|
9830
|
+
setLevelRef(instance, ApiLevel.Call);
|
|
9831
|
+
return wrapAsync(() => impl.apply(instance, args).then(async (ret) => {
|
|
9832
|
+
await wait(instance.config);
|
|
9833
|
+
return ret;
|
|
9834
|
+
}));
|
|
9835
|
+
}
|
|
9836
|
+
Object.defineProperty(method, "name", { get: () => impl.name });
|
|
9837
|
+
return method;
|
|
9838
|
+
}
|
|
9839
|
+
function createInstance(config, system = new System()) {
|
|
9840
|
+
const instance = {};
|
|
9841
|
+
Object.assign(instance, {
|
|
9842
|
+
config,
|
|
9843
|
+
dispatchEvent: dispatchEvent.bind(instance),
|
|
9844
|
+
dispatchUIEvent: dispatchUIEvent.bind(instance),
|
|
9845
|
+
system,
|
|
9846
|
+
levelRefs: {},
|
|
9847
|
+
...userEventApi
|
|
9848
|
+
});
|
|
9849
|
+
return {
|
|
9850
|
+
instance,
|
|
9851
|
+
api: {
|
|
9852
|
+
...Object.fromEntries(Object.entries(userEventApi).map(([name, api]) => [name, wrapAndBindImpl(instance, api)])),
|
|
9853
|
+
setup: setupSub.bind(instance)
|
|
9854
|
+
}
|
|
9855
|
+
};
|
|
9856
|
+
}
|
|
9857
|
+
function getDocument(options, node, defaults) {
|
|
9858
|
+
var _ref, _options_document;
|
|
9859
|
+
return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== void 0 ? _ref : defaults.document;
|
|
9860
|
+
}
|
|
9861
|
+
var defaultOptionsDirect, defaultOptionsSetup;
|
|
9862
|
+
function init_setup() {
|
|
9863
|
+
return (init_setup = __esmMin((() => {
|
|
9864
|
+
init_patchFocus();
|
|
9865
|
+
init_prepareDocument();
|
|
9866
|
+
init_dispatchEvent();
|
|
9867
|
+
init_Clipboard();
|
|
9868
|
+
init_level();
|
|
9869
|
+
init_options();
|
|
9870
|
+
init_dom_esm();
|
|
9871
|
+
init_keyMap();
|
|
9872
|
+
init_keyMap$1();
|
|
9873
|
+
init_system();
|
|
9874
|
+
init_api();
|
|
9875
|
+
init_wrapAsync();
|
|
9876
|
+
defaultOptionsDirect = {
|
|
9877
|
+
applyAccept: true,
|
|
9878
|
+
autoModify: true,
|
|
9879
|
+
delay: 0,
|
|
9880
|
+
document: globalThis.document,
|
|
9881
|
+
keyboardMap: defaultKeyMap$1,
|
|
9882
|
+
pointerMap: defaultKeyMap,
|
|
9883
|
+
pointerEventsCheck: PointerEventsCheckLevel.EachApiCall,
|
|
9884
|
+
skipAutoClose: false,
|
|
9885
|
+
skipClick: false,
|
|
9886
|
+
skipHover: false,
|
|
9887
|
+
writeToClipboard: false,
|
|
9888
|
+
advanceTimers: () => Promise.resolve()
|
|
9889
|
+
};
|
|
9890
|
+
defaultOptionsSetup = {
|
|
9891
|
+
...defaultOptionsDirect,
|
|
9892
|
+
writeToClipboard: true
|
|
9893
|
+
};
|
|
9894
|
+
})))();
|
|
9895
|
+
}
|
|
9896
|
+
//#endregion
|
|
9897
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/setup/directApi.js
|
|
9898
|
+
var directApi_exports = /* @__PURE__ */ __exportAll({
|
|
9899
|
+
clear: () => clear,
|
|
9900
|
+
click: () => click,
|
|
9901
|
+
copy: () => copy,
|
|
9902
|
+
cut: () => cut,
|
|
9903
|
+
dblClick: () => dblClick,
|
|
9904
|
+
deselectOptions: () => deselectOptions,
|
|
9905
|
+
hover: () => hover,
|
|
9906
|
+
keyboard: () => keyboard,
|
|
9907
|
+
paste: () => paste,
|
|
9908
|
+
pointer: () => pointer,
|
|
9909
|
+
selectOptions: () => selectOptions,
|
|
9910
|
+
tab: () => tab,
|
|
9911
|
+
tripleClick: () => tripleClick,
|
|
9912
|
+
type: () => type,
|
|
9913
|
+
unhover: () => unhover,
|
|
9914
|
+
upload: () => upload
|
|
9915
|
+
});
|
|
9916
|
+
function clear(element) {
|
|
9917
|
+
return setupDirect().api.clear(element);
|
|
9918
|
+
}
|
|
9919
|
+
function click(element, options = {}) {
|
|
9920
|
+
return setupDirect(options, element).api.click(element);
|
|
9921
|
+
}
|
|
9922
|
+
function copy(options = {}) {
|
|
9923
|
+
return setupDirect(options).api.copy();
|
|
9924
|
+
}
|
|
9925
|
+
function cut(options = {}) {
|
|
9926
|
+
return setupDirect(options).api.cut();
|
|
9927
|
+
}
|
|
9928
|
+
function dblClick(element, options = {}) {
|
|
9929
|
+
return setupDirect(options).api.dblClick(element);
|
|
9930
|
+
}
|
|
9931
|
+
function deselectOptions(select, values, options = {}) {
|
|
9932
|
+
return setupDirect(options).api.deselectOptions(select, values);
|
|
9933
|
+
}
|
|
9934
|
+
function hover(element, options = {}) {
|
|
9935
|
+
return setupDirect(options).api.hover(element);
|
|
9936
|
+
}
|
|
9937
|
+
async function keyboard(text, options = {}) {
|
|
9938
|
+
const { api, system } = setupDirect(options);
|
|
9939
|
+
return api.keyboard(text).then(() => system);
|
|
9940
|
+
}
|
|
9941
|
+
async function pointer(input, options = {}) {
|
|
9942
|
+
const { api, system } = setupDirect(options);
|
|
9943
|
+
return api.pointer(input).then(() => system);
|
|
9944
|
+
}
|
|
9945
|
+
function paste(clipboardData, options) {
|
|
9946
|
+
return setupDirect(options).api.paste(clipboardData);
|
|
9947
|
+
}
|
|
9948
|
+
function selectOptions(select, values, options = {}) {
|
|
9949
|
+
return setupDirect(options).api.selectOptions(select, values);
|
|
9950
|
+
}
|
|
9951
|
+
function tripleClick(element, options = {}) {
|
|
9952
|
+
return setupDirect(options).api.tripleClick(element);
|
|
9953
|
+
}
|
|
9954
|
+
function type(element, text, options = {}) {
|
|
9955
|
+
return setupDirect(options, element).api.type(element, text, options);
|
|
9956
|
+
}
|
|
9957
|
+
function unhover(element, options = {}) {
|
|
9958
|
+
const { api, system } = setupDirect(options);
|
|
9959
|
+
system.pointer.setMousePosition({ target: element });
|
|
9960
|
+
return api.unhover(element);
|
|
9961
|
+
}
|
|
9962
|
+
function upload(element, fileOrFiles, options = {}) {
|
|
9963
|
+
return setupDirect(options).api.upload(element, fileOrFiles);
|
|
9964
|
+
}
|
|
9965
|
+
function tab(options = {}) {
|
|
9966
|
+
return setupDirect().api.tab(options);
|
|
9967
|
+
}
|
|
9968
|
+
function init_directApi() {
|
|
9969
|
+
return (init_directApi = __esmMin((() => {
|
|
9970
|
+
init_setup();
|
|
9971
|
+
})))();
|
|
9972
|
+
}
|
|
9973
|
+
//#endregion
|
|
9974
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/setup/index.js
|
|
9975
|
+
var userEvent;
|
|
9976
|
+
function init_setup$1() {
|
|
9977
|
+
return (init_setup$1 = __esmMin((() => {
|
|
9978
|
+
init_setup();
|
|
9979
|
+
init_directApi();
|
|
9980
|
+
userEvent = {
|
|
9981
|
+
...directApi_exports,
|
|
9982
|
+
setup: setupMain
|
|
9983
|
+
};
|
|
9984
|
+
})))();
|
|
9985
|
+
}
|
|
9986
|
+
//#endregion
|
|
9987
|
+
//#region ../../node_modules/@testing-library/user-event/dist/esm/index.js
|
|
9988
|
+
function init_esm() {
|
|
9989
|
+
return (init_esm = __esmMin((() => {
|
|
9990
|
+
init_setup$1();
|
|
9991
|
+
})))();
|
|
9992
|
+
}
|
|
9993
|
+
//#endregion
|
|
5894
9994
|
//#region ../../node_modules/@preact/signals-core/dist/signals-core.module.js
|
|
5895
9995
|
function t() {
|
|
5896
9996
|
if (!(v > 1)) {
|
|
@@ -6302,4 +10402,4 @@ function init_signals_core_module() {
|
|
|
6302
10402
|
})))();
|
|
6303
10403
|
}
|
|
6304
10404
|
//#endregion
|
|
6305
|
-
export { l as a,
|
|
10405
|
+
export { l as a, init_esm as c, dom_esm_exports as d, init_dom_esm as f, j as i, init_setup$1 as l, matchers_exports as m, g as n, n as o, init_matchers as p, init_signals_core_module as r, y as s, f as t, userEvent as u };
|