@citolab/qti-components 7.0.5 → 7.0.6-beta.1
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/cdn/chunks/chunk-3V6LA7B3.js +8 -0
- package/cdn/chunks/chunk-4WXQYE2P.js +8 -0
- package/cdn/chunks/chunk-5BR5CJFH.js +24 -0
- package/cdn/chunks/chunk-5GCSZ3CH.js +73 -0
- package/cdn/chunks/chunk-5P7CTN7Q.js +11 -0
- package/cdn/chunks/chunk-6MCYE7P5.js +1 -0
- package/cdn/chunks/chunk-6S4CDN3T.js +43 -0
- package/cdn/chunks/chunk-DZCKF45D.js +5 -0
- package/cdn/chunks/chunk-FRS2J3OS.js +59 -0
- package/cdn/chunks/chunk-FTKONGII.js +934 -0
- package/cdn/chunks/chunk-IAP2CEE7.js +1 -0
- package/cdn/chunks/chunk-IMJOPCFR.js +1 -0
- package/cdn/chunks/chunk-KWPDTFYH.js +1 -0
- package/cdn/chunks/{chunk-UIEC4LXR.js → chunk-L4CUWIE6.js} +1 -1
- package/cdn/chunks/chunk-LZZB4VGC.js +48 -0
- package/cdn/chunks/{chunk-CFXQCNG6.js → chunk-MJMONWKB.js} +18 -2
- package/cdn/chunks/chunk-PKT2SJQD.js +8 -0
- package/cdn/chunks/chunk-QQCGUVEV.js +1 -0
- package/cdn/chunks/chunk-R33OODNX.js +1 -0
- package/cdn/chunks/chunk-RXKI3AO4.js +1 -0
- package/cdn/chunks/chunk-TQBDBMWL.js +5 -0
- package/cdn/chunks/chunk-X2KBNXRO.js +6 -0
- package/cdn/exports/interaction.js +1 -0
- package/cdn/exports/item.context.js +1 -0
- package/cdn/exports/qti-assessment-item.context.js +1 -0
- package/cdn/exports/qti-condition-expression.js +1 -0
- package/cdn/exports/qti-expression.js +1 -0
- package/cdn/index.global.js +56 -107
- package/cdn/index.js +1 -4503
- package/cdn/qti-components/index.js +1 -924
- package/cdn/qti-item/core/index.js +1 -0
- package/cdn/qti-loader/index.js +1 -23
- package/cdn/qti-test/components/index.js +1 -3598
- package/cdn/qti-test/components/styles.js +1 -17
- package/cdn/qti-test/components/test-component.abstract.js +1 -1
- package/cdn/qti-test/components/test-item-link.js +1 -24
- package/cdn/qti-test/components/test-next.js +1 -24
- package/cdn/qti-test/components/test-paging-buttons-stamp.js +1 -3
- package/cdn/qti-test/components/test-prev.js +1 -24
- package/cdn/qti-test/components/test-view.js +1 -11
- package/cdn/qti-test/core/index.js +1 -0
- package/cdn/qti-transformers/index.js +1 -23
- package/dist/chunks/{chunk-PUBGXXTM.js → chunk-2V6LQV2K.js} +5 -5
- package/dist/chunks/{chunk-LKINC6JO.js → chunk-3EU75IUF.js} +6 -6
- package/dist/chunks/chunk-3EU75IUF.js.map +1 -0
- package/dist/chunks/chunk-4GNVYCBN.js +627 -0
- package/dist/chunks/chunk-4GNVYCBN.js.map +1 -0
- package/dist/chunks/{chunk-HWA4A3SR.js → chunk-4WVLWWYJ.js} +5 -5
- package/dist/chunks/chunk-6JXR63MH.js +50 -0
- package/dist/chunks/chunk-6JXR63MH.js.map +1 -0
- package/dist/chunks/{chunk-3ROZMGAN.js → chunk-7QMCKYDR.js} +3 -3
- package/dist/chunks/{chunk-W4B23OIP.js → chunk-A24F75DB.js} +3 -3
- package/dist/chunks/chunk-BPHQLJWE.js +102 -0
- package/dist/chunks/chunk-BPHQLJWE.js.map +1 -0
- package/dist/chunks/chunk-DLUJN2FW.js +22 -0
- package/dist/chunks/chunk-DLUJN2FW.js.map +1 -0
- package/dist/chunks/{chunk-3OXGDCSU.js → chunk-DU37U6PW.js} +4835 -4991
- package/dist/chunks/chunk-DU37U6PW.js.map +1 -0
- package/dist/chunks/{chunk-XPDS72XY.js → chunk-FV7HWK54.js} +1 -1
- package/dist/chunks/chunk-FV7HWK54.js.map +1 -0
- package/dist/chunks/chunk-GSWZT6N2.js +50 -0
- package/dist/chunks/chunk-GSWZT6N2.js.map +1 -0
- package/dist/{qti-item/qti-item.js → chunks/chunk-H2JE6IVU.js} +2 -13
- package/dist/chunks/{chunk-LROTNPC2.js → chunk-HHVRU3AJ.js} +21 -8
- package/dist/chunks/chunk-HHVRU3AJ.js.map +1 -0
- package/dist/chunks/{chunk-Y6UWSECL.js → chunk-J2SHENRN.js} +2 -2
- package/dist/chunks/chunk-J2SHENRN.js.map +1 -0
- package/dist/chunks/chunk-KOEILLVS.js +8 -0
- package/dist/chunks/chunk-KOEILLVS.js.map +1 -0
- package/dist/chunks/{chunk-ZEFOMZNY.js → chunk-KYAIMBP5.js} +3 -3
- package/dist/chunks/chunk-O6WEZVEM.js +43 -0
- package/dist/chunks/chunk-O6WEZVEM.js.map +1 -0
- package/dist/chunks/{chunk-XDFXD3BI.js → chunk-UFYWCLXF.js} +2 -2
- package/dist/chunks/chunk-UFYWCLXF.js.map +1 -0
- package/dist/chunks/chunk-UN2IFSGC.js +1 -0
- package/dist/chunks/chunk-XSI6FXGD.js +19 -0
- package/dist/chunks/chunk-XSI6FXGD.js.map +1 -0
- package/dist/chunks/chunk-ZPNJ2HP5.js +71 -0
- package/dist/chunks/chunk-ZPNJ2HP5.js.map +1 -0
- package/dist/exports/expression-result.d.ts +19 -0
- package/dist/exports/expression-result.js +1 -0
- package/dist/exports/interaction.d.ts +23 -0
- package/dist/exports/interaction.interface.d.ts +13 -0
- package/dist/exports/interaction.interface.js +1 -0
- package/dist/exports/interaction.js +8 -0
- package/dist/exports/item.context.d.ts +12 -0
- package/dist/exports/item.context.js +8 -0
- package/dist/exports/qti-assessment-item.context.d.ts +10 -0
- package/dist/exports/qti-assessment-item.context.js +8 -0
- package/dist/exports/qti-condition-expression.d.ts +13 -0
- package/dist/exports/qti-condition-expression.js +10 -0
- package/dist/exports/qti-expression.d.ts +21 -0
- package/dist/exports/qti-expression.js +9 -0
- package/dist/exports/variables.d.ts +3 -0
- package/dist/exports/variables.js +1 -0
- package/dist/exports/variables.js.map +1 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +140 -11045
- package/dist/index.js.map +1 -1
- package/dist/qti-components/index.d.ts +36 -9
- package/dist/qti-components/index.js +95 -6438
- package/dist/qti-components/index.js.map +1 -1
- package/dist/qti-components-jsx.d.ts +371 -666
- package/dist/qti-item/{components/item-container.d.ts → core/index.d.ts} +22 -1
- package/dist/qti-item/core/index.js +13 -0
- package/dist/qti-item/core/index.js.map +1 -0
- package/dist/qti-loader/index.d.ts +7 -1
- package/dist/qti-loader/index.js +6 -305
- package/dist/qti-loader/index.js.map +1 -1
- package/dist/{qti-simple-choice-DxWcdKHi.d.ts → qti-response-declaration-DAeBp8HH.d.ts} +463 -613
- package/dist/qti-test/components/index.d.ts +8 -4
- package/dist/qti-test/components/index.js +24 -4135
- package/dist/qti-test/components/index.js.map +1 -1
- package/dist/qti-test/components/styles.js +7 -22
- package/dist/qti-test/components/styles.js.map +1 -1
- package/dist/qti-test/components/test-component.abstract.d.ts +8 -3
- package/dist/qti-test/components/test-component.abstract.js +7 -145
- package/dist/qti-test/components/test-component.abstract.js.map +1 -1
- package/dist/qti-test/components/test-item-link.d.ts +8 -3
- package/dist/qti-test/components/test-item-link.js +9 -198
- package/dist/qti-test/components/test-item-link.js.map +1 -1
- package/dist/qti-test/components/test-next.d.ts +8 -3
- package/dist/qti-test/components/test-next.js +9 -205
- package/dist/qti-test/components/test-next.js.map +1 -1
- package/dist/qti-test/components/test-paging-buttons-stamp.d.ts +8 -3
- package/dist/qti-test/components/test-paging-buttons-stamp.js +8 -214
- package/dist/qti-test/components/test-paging-buttons-stamp.js.map +1 -1
- package/dist/qti-test/components/test-prev.d.ts +8 -3
- package/dist/qti-test/components/test-prev.js +9 -205
- package/dist/qti-test/components/test-prev.js.map +1 -1
- package/dist/qti-test/components/test-view.d.ts +8 -3
- package/dist/qti-test/components/test-view.js +8 -205
- package/dist/qti-test/components/test-view.js.map +1 -1
- package/dist/qti-test/core/index.d.ts +132 -0
- package/dist/qti-test/core/index.js +27 -0
- package/dist/qti-test/core/index.js.map +1 -0
- package/dist/qti-transformers/index.js +6 -287
- package/dist/qti-transformers/index.js.map +1 -1
- package/dist/{test-base-BJwG9Ie8.d.ts → test.context-CaENAJNk.d.ts} +22 -30
- package/dist/variables-cO3DzqJy.d.ts +33 -0
- package/dist/vscode.html-custom-data.json +226 -293
- package/package.json +83 -77
- package/cdn/chunks/chunk-5O3Z7TDV.js +0 -1
- package/cdn/chunks/chunk-65LFT33L.js +0 -8
- package/cdn/chunks/chunk-6D25UFJR.js +0 -8
- package/cdn/chunks/chunk-6UGPNL7M.js +0 -1
- package/cdn/chunks/chunk-CSUKVUZF.js +0 -3
- package/cdn/chunks/chunk-CSY3WI5A.js +0 -1
- package/cdn/chunks/chunk-G5O7EN45.js +0 -5
- package/cdn/chunks/chunk-JLNHEMQG.js +0 -1
- package/cdn/chunks/chunk-LPWIM7QJ.js +0 -902
- package/cdn/chunks/chunk-M3YRM3AV.js +0 -1
- package/cdn/chunks/chunk-M6BOWL2U.js +0 -1
- package/cdn/chunks/chunk-P5IE36FO.js +0 -8
- package/cdn/chunks/chunk-PXH5KN5O.js +0 -1
- package/cdn/chunks/chunk-RBEI6NIF.js +0 -1
- package/cdn/chunks/chunk-SMKIYFFI.js +0 -1
- package/cdn/chunks/chunk-SRLMW23F.js +0 -0
- package/cdn/chunks/chunk-T3YDLD2H.js +0 -11
- package/cdn/chunks/chunk-T4HD2C4F.js +0 -1
- package/cdn/chunks/chunk-T6IXJ4W4.js +0 -1
- package/cdn/chunks/chunk-TFAUBGP2.js +0 -0
- package/cdn/chunks/chunk-V44O3GTW.js +0 -0
- package/cdn/chunks/chunk-V6B54FQW.js +0 -5
- package/cdn/chunks/chunk-V6KX6BQN.js +0 -1
- package/cdn/chunks/chunk-VYANBI35.js +0 -1
- package/cdn/chunks/chunk-ZIZLFFSG.js +0 -0
- package/cdn/index.css +0 -1
- package/cdn/qti-components/index.global.js +0 -226
- package/cdn/qti-item/components/index.css +0 -1
- package/cdn/qti-item/components/index.global.js +0 -149
- package/cdn/qti-item/components/index.js +0 -3549
- package/cdn/qti-item/components/item-container.css +0 -1
- package/cdn/qti-item/components/item-container.global.js +0 -149
- package/cdn/qti-item/components/item-container.js +0 -3549
- package/cdn/qti-item/index.css +0 -1
- package/cdn/qti-item/index.global.js +0 -149
- package/cdn/qti-item/index.js +0 -3549
- package/cdn/qti-item/qti-item.global.js +0 -114
- package/cdn/qti-item/qti-item.js +0 -1
- package/cdn/qti-loader/index.global.js +0 -1
- package/cdn/qti-test/components/index.css +0 -1
- package/cdn/qti-test/components/index.global.js +0 -242
- package/cdn/qti-test/components/styles.global.js +0 -44
- package/cdn/qti-test/components/test-component.abstract.global.js +0 -170
- package/cdn/qti-test/components/test-container.css +0 -1
- package/cdn/qti-test/components/test-container.global.js +0 -149
- package/cdn/qti-test/components/test-container.js +0 -3549
- package/cdn/qti-test/components/test-item-link.global.js +0 -170
- package/cdn/qti-test/components/test-next.global.js +0 -170
- package/cdn/qti-test/components/test-next.spec.css +0 -1
- package/cdn/qti-test/components/test-next.spec.global.js +0 -297
- package/cdn/qti-test/components/test-next.spec.js +0 -5215
- package/cdn/qti-test/components/test-paging-buttons-stamp.global.js +0 -207
- package/cdn/qti-test/components/test-prev.global.js +0 -170
- package/cdn/qti-test/components/test-view.global.js +0 -170
- package/cdn/qti-test/context/index.global.js +0 -58
- package/cdn/qti-test/context/index.js +0 -1
- package/cdn/qti-test/context/test.context.global.js +0 -58
- package/cdn/qti-test/context/test.context.js +0 -1
- package/cdn/qti-test/index.css +0 -1
- package/cdn/qti-test/index.global.js +0 -242
- package/cdn/qti-test/index.js +0 -3598
- package/cdn/qti-test/mixins/index.global.js +0 -1
- package/cdn/qti-test/mixins/index.js +0 -23
- package/cdn/qti-test/mixins/test-loader.mixin.global.js +0 -1
- package/cdn/qti-test/mixins/test-loader.mixin.js +0 -23
- package/cdn/qti-test/mixins/test-navigation.mixin.global.js +0 -1
- package/cdn/qti-test/mixins/test-navigation.mixin.js +0 -1
- package/cdn/qti-test/mixins/test-view.mixin.global.js +0 -1
- package/cdn/qti-test/mixins/test-view.mixin.js +0 -1
- package/cdn/qti-test/qti-assessment-test/index.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/index.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/qti-assessment-item-ref.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-assessment-section.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/qti-assessment-section.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-assessment-test.global.js +0 -170
- package/cdn/qti-test/qti-assessment-test/qti-assessment-test.js +0 -1
- package/cdn/qti-test/qti-assessment-test/qti-test-part.global.js +0 -114
- package/cdn/qti-test/qti-assessment-test/qti-test-part.js +0 -1
- package/cdn/qti-test/qti-test.global.js +0 -170
- package/cdn/qti-test/qti-test.js +0 -23
- package/cdn/qti-test/test-base.global.js +0 -170
- package/cdn/qti-test/test-base.js +0 -1
- package/cdn/qti-transformers/index.global.js +0 -1
- package/dist/chunks/chunk-3G2DDBJW.js +0 -44
- package/dist/chunks/chunk-3G2DDBJW.js.map +0 -1
- package/dist/chunks/chunk-3NLCJYSX.js +0 -1
- package/dist/chunks/chunk-3OXGDCSU.js.map +0 -1
- package/dist/chunks/chunk-6YE2KJ4C.js +0 -55
- package/dist/chunks/chunk-AAQCM2FP.js +0 -56
- package/dist/chunks/chunk-AAQCM2FP.js.map +0 -1
- package/dist/chunks/chunk-DJLE6EV2.js +0 -36
- package/dist/chunks/chunk-DJLE6EV2.js.map +0 -1
- package/dist/chunks/chunk-EW5CTHAD.js +0 -1
- package/dist/chunks/chunk-IKZWK2C5.js +0 -1
- package/dist/chunks/chunk-IP7JSYO6.js +0 -1
- package/dist/chunks/chunk-JE6BMXZU.js +0 -94
- package/dist/chunks/chunk-JE6BMXZU.js.map +0 -1
- package/dist/chunks/chunk-JSPJGWGT.js +0 -20
- package/dist/chunks/chunk-JSPJGWGT.js.map +0 -1
- package/dist/chunks/chunk-LKINC6JO.js.map +0 -1
- package/dist/chunks/chunk-LROTNPC2.js.map +0 -1
- package/dist/chunks/chunk-MTMT2RMF.js +0 -63
- package/dist/chunks/chunk-MTMT2RMF.js.map +0 -1
- package/dist/chunks/chunk-NDJZGJUR.js +0 -65
- package/dist/chunks/chunk-NDJZGJUR.js.map +0 -1
- package/dist/chunks/chunk-OE2LFIH2.js +0 -1
- package/dist/chunks/chunk-OJ2XGDWK.js +0 -1
- package/dist/chunks/chunk-QRCUNRP5.js +0 -75
- package/dist/chunks/chunk-QRCUNRP5.js.map +0 -1
- package/dist/chunks/chunk-S6JJYCO7.js +0 -51
- package/dist/chunks/chunk-S6JJYCO7.js.map +0 -1
- package/dist/chunks/chunk-U3AALKEP.js +0 -1
- package/dist/chunks/chunk-UCQFSRYF.js +0 -34
- package/dist/chunks/chunk-UCQFSRYF.js.map +0 -1
- package/dist/chunks/chunk-URGVQ64M.js +0 -1
- package/dist/chunks/chunk-V4FXK4TP.js +0 -128
- package/dist/chunks/chunk-V4FXK4TP.js.map +0 -1
- package/dist/chunks/chunk-XDFXD3BI.js.map +0 -1
- package/dist/chunks/chunk-XPDS72XY.js.map +0 -1
- package/dist/chunks/chunk-Y6UWSECL.js.map +0 -1
- package/dist/index-Cvrd4KQA.d.ts +0 -109
- package/dist/qti-item/components/index.d.ts +0 -3
- package/dist/qti-item/components/index.js +0 -3856
- package/dist/qti-item/components/index.js.map +0 -1
- package/dist/qti-item/components/item-container.js +0 -3856
- package/dist/qti-item/components/item-container.js.map +0 -1
- package/dist/qti-item/index.d.ts +0 -4
- package/dist/qti-item/index.js +0 -3869
- package/dist/qti-item/index.js.map +0 -1
- package/dist/qti-item/qti-item.d.ts +0 -25
- package/dist/qti-item/qti-item.js.map +0 -1
- package/dist/qti-test/components/test-container.d.ts +0 -37
- package/dist/qti-test/components/test-container.js +0 -3782
- package/dist/qti-test/components/test-container.js.map +0 -1
- package/dist/qti-test/components/test-next.spec.d.ts +0 -16
- package/dist/qti-test/components/test-next.spec.js +0 -56915
- package/dist/qti-test/components/test-next.spec.js.map +0 -1
- package/dist/qti-test/context/index.d.ts +0 -6
- package/dist/qti-test/context/index.js +0 -9
- package/dist/qti-test/context/index.js.map +0 -1
- package/dist/qti-test/context/test.context.d.ts +0 -6
- package/dist/qti-test/context/test.context.js +0 -9
- package/dist/qti-test/context/test.context.js.map +0 -1
- package/dist/qti-test/index.d.ts +0 -14
- package/dist/qti-test/index.js +0 -4746
- package/dist/qti-test/index.js.map +0 -1
- package/dist/qti-test/mixins/index.d.ts +0 -8
- package/dist/qti-test/mixins/index.js +0 -350
- package/dist/qti-test/mixins/index.js.map +0 -1
- package/dist/qti-test/mixins/test-loader.mixin.d.ts +0 -8
- package/dist/qti-test/mixins/test-loader.mixin.js +0 -240
- package/dist/qti-test/mixins/test-loader.mixin.js.map +0 -1
- package/dist/qti-test/mixins/test-navigation.mixin.d.ts +0 -22
- package/dist/qti-test/mixins/test-navigation.mixin.js +0 -64
- package/dist/qti-test/mixins/test-navigation.mixin.js.map +0 -1
- package/dist/qti-test/mixins/test-view.mixin.d.ts +0 -6
- package/dist/qti-test/mixins/test-view.mixin.js +0 -50
- package/dist/qti-test/mixins/test-view.mixin.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/index.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/index.js +0 -221
- package/dist/qti-test/qti-assessment-test/index.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js +0 -85
- package/dist/qti-test/qti-assessment-test/qti-assessment-item-ref.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.js +0 -73
- package/dist/qti-test/qti-assessment-test/qti-assessment-section.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.d.ts +0 -6
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.js +0 -54
- package/dist/qti-test/qti-assessment-test/qti-assessment-test.js.map +0 -1
- package/dist/qti-test/qti-assessment-test/qti-test-part.d.ts +0 -19
- package/dist/qti-test/qti-assessment-test/qti-test-part.js +0 -62
- package/dist/qti-test/qti-assessment-test/qti-test-part.js.map +0 -1
- package/dist/qti-test/qti-test.d.ts +0 -68
- package/dist/qti-test/qti-test.js +0 -500
- package/dist/qti-test/qti-test.js.map +0 -1
- package/dist/qti-test/test-base.d.ts +0 -6
- package/dist/qti-test/test-base.js +0 -137
- package/dist/qti-test/test-base.js.map +0 -1
- /package/cdn/chunks/{chunk-6DMSHH5X.js → chunk-3GO57DNP.js} +0 -0
- /package/cdn/{chunks/chunk-DAZR7RUI.js → exports/expression-result.js} +0 -0
- /package/cdn/{chunks/chunk-EOPEMJS3.js → exports/interaction.interface.js} +0 -0
- /package/cdn/{chunks/chunk-GEFUIFM7.js → exports/variables.js} +0 -0
- /package/dist/chunks/{chunk-PUBGXXTM.js.map → chunk-2V6LQV2K.js.map} +0 -0
- /package/dist/chunks/{chunk-HWA4A3SR.js.map → chunk-4WVLWWYJ.js.map} +0 -0
- /package/dist/chunks/{chunk-3ROZMGAN.js.map → chunk-7QMCKYDR.js.map} +0 -0
- /package/dist/chunks/{chunk-W4B23OIP.js.map → chunk-A24F75DB.js.map} +0 -0
- /package/dist/chunks/{chunk-3NLCJYSX.js.map → chunk-H2JE6IVU.js.map} +0 -0
- /package/dist/chunks/{chunk-ZEFOMZNY.js.map → chunk-KYAIMBP5.js.map} +0 -0
- /package/dist/chunks/{chunk-6YE2KJ4C.js.map → chunk-UN2IFSGC.js.map} +0 -0
- /package/dist/{chunks/chunk-EW5CTHAD.js.map → exports/expression-result.js.map} +0 -0
- /package/dist/{chunks/chunk-IKZWK2C5.js.map → exports/interaction.interface.js.map} +0 -0
- /package/dist/{chunks/chunk-IP7JSYO6.js.map → exports/interaction.js.map} +0 -0
- /package/dist/{chunks/chunk-OE2LFIH2.js.map → exports/item.context.js.map} +0 -0
- /package/dist/{chunks/chunk-OJ2XGDWK.js.map → exports/qti-assessment-item.context.js.map} +0 -0
- /package/dist/{chunks/chunk-U3AALKEP.js.map → exports/qti-condition-expression.js.map} +0 -0
- /package/dist/{chunks/chunk-URGVQ64M.js.map → exports/qti-expression.js.map} +0 -0
package/cdn/index.js
CHANGED
|
@@ -1,4503 +1 @@
|
|
|
1
|
-
|
|
2
|
-
<xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes" />
|
|
3
|
-
<xsl:template match="@*|node()">
|
|
4
|
-
<xsl:copy>
|
|
5
|
-
<xsl:apply-templates select="@*|node()"/>
|
|
6
|
-
</xsl:copy>
|
|
7
|
-
</xsl:template>
|
|
8
|
-
|
|
9
|
-
<!-- remove existing namespaces -->
|
|
10
|
-
<xsl:template match="*">
|
|
11
|
-
<!-- remove element prefix -->
|
|
12
|
-
<xsl:element name="{local-name()}">
|
|
13
|
-
<!-- process attributes -->
|
|
14
|
-
<xsl:for-each select="@*">
|
|
15
|
-
<!-- remove attribute prefix -->
|
|
16
|
-
<xsl:attribute name="{local-name()}">
|
|
17
|
-
<xsl:value-of select="."/>
|
|
18
|
-
</xsl:attribute>
|
|
19
|
-
</xsl:for-each>
|
|
20
|
-
<xsl:apply-templates/>
|
|
21
|
-
</xsl:element>
|
|
22
|
-
</xsl:template>
|
|
23
|
-
</xsl:stylesheet>`;function pr(n,s,e){n.querySelectorAll(s).forEach(t=>{let r=`${s}-${e}`,i=hr(t,r);t.replaceWith(i)})}function mr(n,s){n.querySelectorAll("*").forEach(e=>{let t=e.classList;t&&t.forEach(r=>{if(r.startsWith(`${s}:`)){let i=r.slice(`${s}:`.length),l=`${e.nodeName}-${i}`,a=hr(e,l);e.replaceWith(a)}})})}function hr(n,s){let e=document.createElement(s);for(let t of n.attributes)e.setAttribute(t.name,t.value);for(;n.firstChild;)e.appendChild(n.firstChild);return e}function ur(n){let s=[];return n.querySelectorAll("qti-assessment-item-ref").forEach(e=>{let t=e.getAttribute("identifier"),r=e.getAttribute("href"),i=e.getAttribute("category");s.push({identifier:t,href:r,category:i})}),s}var St=null;function re(n,s=!1){return s&&St!==null&&St.abort(),new Promise((e,t)=>{let r=new XMLHttpRequest;St=r,r.open("GET",n,!0),r.responseType="document",r.onload=()=>{r.status>=200&&r.status<300?e(r.responseXML):t(r.statusText)},r.onerror=()=>{t(r.statusText)},r.send()})}function ie(n){return new DOMParser().parseFromString(n,"text/xml")}function oe(n){let s=new XSLTProcessor,e=new DOMParser().parseFromString(ki,"text/xml");return s.importStylesheet(e),s.transformToFragment(n,document)}function Qe(n,s){s.endsWith("/")||(s+="/"),n.querySelectorAll("[src],[href],[primary-path]").forEach(e=>{let t="";e.getAttribute("src")&&(t="src"),e.getAttribute("href")&&(t="href"),e.getAttribute("primary-path")&&(t="primary-path");let r=e.getAttribute(t)?.trim();if(!r.startsWith("data:")&&!r.startsWith("http")){let i=s+encodeURI(r);e.setAttribute(t,i)}})}function gr(n){n.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value').forEach(e=>{let t=document.createComment(e.textContent);e.replaceChild(t,e.firstChild)})}function br(n){n.querySelectorAll("qti-stylesheet").forEach(s=>s.remove())}var z=()=>{let n,s={async load(e,t=!1){return new Promise(r=>{re(e,t).then(i=>(n=i,s.path(e.substring(0,e.lastIndexOf("/"))),r(s)))})},parse(e){return n=ie(e),s},path:e=>(Qe(n,e),s),fn(e){return e(n),s},pciHooks(e){let t=["hook","module"],r=e.substring(0,e.lastIndexOf("/"));for(let i of t)n.querySelectorAll("["+i+"]").forEach(a=>{let c=a.getAttribute(i);!c.startsWith("data:")&&!c.startsWith("http")&&(a.setAttribute("base-url",e),a.setAttribute("module",r+"/"+encodeURI(c+(c.endsWith(".js")?"":".js"))))});return s},extendElementName:(e,t)=>(pr(n,e,t),s),extendElementsWithClass:(e="extend")=>(mr(n,e),s),customInteraction(e,t){let r=n.querySelector("qti-custom-interaction"),i=r.querySelector("object");return r.setAttribute("data-base-ref",e),r.setAttribute("data-base-item",e+t),r.setAttribute("data",i.getAttribute("data")),r.setAttribute("width",i.getAttribute("width")),r.setAttribute("height",i.getAttribute("height")),r.removeChild(i),s},convertCDATAtoComment(){return gr(n),s},stripStyleSheets(){return br(n),s},html(){return new XMLSerializer().serializeToString(oe(n))},xml(){return new XMLSerializer().serializeToString(n)},htmlDoc(){return oe(n)},xmlDoc(){return n}};return s};var fr=()=>{let n,s={async load(e){return new Promise(t=>{re(e).then(r=>(n=r,t(s)))})},parse(e){n=ie(e)},assessmentTest(){let e=n.querySelector('resource[type="imsqti_test_xmlv3p0"]');return{href:e.getAttribute("href"),identifier:e.getAttribute("identifier")}}};return s};var se=()=>{let n,s={async load(e){return new Promise((t,r)=>{re(e).then(i=>(n=i,s.path(e.substring(0,e.lastIndexOf("/"))),t(s)))})},parse(e){return n=ie(e),s},path:e=>(Qe(n,e),s),fn(e){return e(n),s},items(){return ur(n)},html(){return new XMLSerializer().serializeToString(oe(n))},xml(){return new XMLSerializer().serializeToString(n)},htmlDoc(){return oe(n)},xmlDoc(){return n}};return s};var vr=n=>{class s extends n{constructor(...t){super(...t),this.addEventListener("qti-assessment-test-connected",()=>{}),this.addEventListener("qti-load-item-request",({detail:r})=>{r.promise=(async()=>(await z().load(`${r.href}`,r.cancelPreviousRequest)).htmlDoc())()}),this.addEventListener("qti-interaction-changed",r=>{}),this.addEventListener("qti-outcome-changed",()=>{})}}return s};var yr=n=>{class s extends n{constructor(...t){super(...t),this.addEventListener("qti-request-test-item",({detail:r})=>{if(!r)return;this._clearLoadedItems();let i=this.testElement.el.querySelector(`qti-assessment-item-ref[identifier="${r}"]`),l=this._loadItemRequest(i.href,!1),a=i.closest("qti-test-part").identifier,c=i.closest("qti-assessment-section").identifier;this._testContext={...this._testContext,navPartId:a,navSectionId:c,navItemId:r,navItemLoading:!0},l?l.then(d=>{i.xmlDoc=d,requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("qti-item-connected",{bubbles:!0,composed:!0}))),this._testContext={...this._testContext,navItemLoading:!1}}).catch(d=>console.error("Failed to load item:",d)):console.info("Load item request was not handled:",i.href)}),this.addEventListener("qti-assessment-test-connected",()=>{let r=this._testContext.navItemId;r||(r=this.testElement.el.querySelector("qti-assessment-item-ref").identifier),this.dispatchEvent(new CustomEvent("qti-request-test-item",{detail:r,bubbles:!0,composed:!0}))})}_clearLoadedItems(){let t=this.testElement.el.querySelectorAll("qti-assessment-test qti-assessment-item-ref");Array.from(t).forEach(r=>{r.xmlDoc=null})}_loadItemRequest(t,r=!0){let i=new CustomEvent("qti-load-item-request",{bubbles:!0,composed:!0,detail:{href:t,promise:null,cancelPreviousRequest:r}});return this.dispatchEvent(i),i.detail.promise}}return s};var qr=n=>{class s extends n{constructor(...t){super(...t),this._testContext={...this._testContext,view:"candidate"},this.addEventListener("on-test-switch-view",r=>{this._testContext={...this._testContext,view:r.detail},this._updateElementView()}),this.addEventListener("qti-assessment-test-connected",()=>{this._updateElementView()}),this.addEventListener("qti-assessment-item-connected",r=>{this._updateElementView(),this._setCorrectResponseVisibility(r.detail)})}willUpdate(t){super.willUpdate(t),t.has("_testContext")&&this._updateElementView()}_updateElementView(){if(this.testElement&&this.testElement.el){Array.from(this.testElement.el.querySelectorAll("[view]")).forEach(i=>{i.classList.toggle("show",i.getAttribute("view")===this._testContext.view)});let r=this.testElement.el.querySelector(`qti-assessment-item[identifier="${this._testContext.navItemId}"]`);r&&r.showCorrectResponse(this._testContext.view==="scorer")}}_setCorrectResponseVisibility(t){t.showCorrectResponse(this._testContext.view==="scorer")}}return s};import{provide as wr}from"@lit/context";import{LitElement as Ti}from"lit";import{state as Er}from"lit/decorators.js";import{createContext as xr}from"@lit/context";var S=xr(Symbol("test")),et=xr(Symbol("testElement"));var ae=class extends Ti{constructor(){super();this._testContext={items:[],testOutcomeVariables:[]};this.testElement={el:null};this._updateItemInTestContext=e=>{let{identifier:t,variables:r}=e,i=this._testContext.items.find(l=>l?.identifier===t);if(!i){console.warn(`Item IDs between assessment.xml and item.xml should match: ${t} is not found!`);return}i.variables?.length===1?this._updateItemVariablesInTestContext(t,r):e.variables=[...i.variables||[]]};this.addEventListener("qti-assessment-test-connected",e=>{let t=e.detail,r=Array.from(t.querySelectorAll("qti-assessment-item-ref")).map(i=>({href:i.href,identifier:i.identifier,category:i.category,variables:[{identifier:"completionStatus",value:"not_attempted",type:"outcome"}]}));this.testElement={el:t},this._testContext={...this._testContext,items:r}}),this.addEventListener("qti-assessment-item-connected",e=>{this._updateItemInTestContext(e.detail)}),this.addEventListener("qti-outcome-changed",e=>{let t=e.composedPath()[0];this._updateItemVariablesInTestContext(t.identifier,t.variables)})}get context(){return this._testContext}set context(e){e!=null&&(this._testContext={...e},e.items?.forEach(t=>{let r=this._testContext.items.find(i=>i.identifier===t.identifier);r?r.variables=t.variables:this._testContext.items.push(t)}))}_updateItemVariablesInTestContext(e,t){this._testContext={...this._testContext,items:this._testContext.items.map(r=>r.identifier!==e?r:{...r,variables:t.map(i=>{let l=r.variables.find(a=>a.identifier===i.identifier);return l?{...l,...i}:i})})}}connectedCallback(){super.connectedCallback(),this.setAttribute("qti-test","")}};o([Er(),wr({context:S})],ae.prototype,"_testContext",2),o([Er(),wr({context:et})],ae.prototype,"testElement",2);var tt=class extends vr(yr(qr(ae))){render(){return Mi`<slot></slot>`}};tt=o([Si("qti-test")],tt);import{consume as Li}from"@lit/context";import{html as _i,LitElement as Ai}from"lit";import{property as ne}from"lit/decorators.js";var Cr={fromAttribute(n){return n==="true"},toAttribute(n){return n?"true":"false"}},L=class extends Ai{constructor(){super(...arguments);this.weigths=new Map}createRenderRoot(){return this}get assessmentItem(){return this.renderRoot?.querySelector("qti-assessment-item")}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new CustomEvent("qti-assessment-item-ref-connected",{bubbles:!0,composed:!0,detail:{identifier:this.identifier,href:this.href,category:this.category}}))}render(){return _i`${this.xmlDoc}`}};o([ne({type:String})],L.prototype,"category",2),o([ne({type:String})],L.prototype,"identifier",2),o([ne({type:Boolean,converter:Cr})],L.prototype,"required",2),o([ne({type:Boolean,converter:Cr})],L.prototype,"fixed",2),o([ne({type:String})],L.prototype,"href",2),o([Li({context:S,subscribe:!0})],L.prototype,"_testContext",2),o([ne({type:Object,attribute:!1})],L.prototype,"xmlDoc",2);customElements.get("qti-assessment-item-ref")||customElements.define("qti-assessment-item-ref",L);import{consume as Ri}from"@lit/context";import{html as Di,LitElement as Ii}from"lit";import{property as le}from"lit/decorators.js";var Lt={fromAttribute(n){return n==="true"},toAttribute(n){return n?"true":"false"}},_=class extends Ii{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new Event("qti-assessment-section-connected",{bubbles:!0,composed:!0}))}render(){return Di`<slot name="qti-rubric-block"></slot><slot></slot>`}};o([le({type:String})],_.prototype,"identifier",2),o([le({type:String})],_.prototype,"required",2),o([le({type:Boolean,converter:Lt})],_.prototype,"fixed",2),o([le({type:String})],_.prototype,"title",2),o([le({type:Boolean,converter:Lt})],_.prototype,"visible",2),o([le({type:Boolean,converter:Lt,attribute:"keep-together"})],_.prototype,"keepTogether",2),o([Ri({context:S,subscribe:!0})],_.prototype,"_testContext",2);customElements.get("qti-assessment-section")||customElements.define("qti-assessment-section",_);import{consume as Vi}from"@lit/context";import{html as Hi,LitElement as Ni}from"lit";import{customElement as $i,property as kr}from"lit/decorators.js";var Q=class extends Ni{async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new CustomEvent("qti-assessment-test-connected",{detail:this,bubbles:!0,composed:!0}))}render(){return Hi` <slot></slot>`}};o([kr({type:String})],Q.prototype,"identifier",2),o([kr({type:String})],Q.prototype,"title",2),o([Vi({context:S,subscribe:!0})],Q.prototype,"_testContext",2),Q=o([$i("qti-assessment-test")],Q);import{html as zi,LitElement as Oi}from"lit";import{customElement as Fi,property as Te}from"lit/decorators.js";var A=class extends Oi{constructor(){super(...arguments);this.identifier="";this.title="";this.class="";this.NavigationMode="nonlinear";this.submissionMode="individual"}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.dispatchEvent(new Event("qti-test-part-connected",{bubbles:!0,composed:!0}))}render(){return zi` <slot></slot>`}};o([Te({type:String})],A.prototype,"identifier",2),o([Te({type:String})],A.prototype,"title",2),o([Te({type:String})],A.prototype,"class",2),o([Te({type:String,attribute:"navigation-mode"})],A.prototype,"NavigationMode",2),o([Te({type:String,attribute:"submission-mode"})],A.prototype,"submissionMode",2),A=o([Fi("qti-test-part")],A);customElements.get("qti-test-part")||customElements.define("qti-test-part",A);import{consume as Mr}from"@lit/context";import{LitElement as Ui}from"lit";import{state as Sr}from"lit/decorators.js";function rt(n,s){let e;return(t,r)=>{let{connectedCallback:i,disconnectedCallback:l}=t;t.connectedCallback=function(){i.call(this);let a=d=>{let p=Array.from(this.querySelectorAll(n)).concat(Array.from(this.shadowRoot?.querySelectorAll(n)||[]));for(let m of d){let h=Array.from(m.addedNodes).map(y=>y),b=Array.from(m.addedNodes).map(y=>y);m.type==="childList"&&h.find(y=>p.includes(y))&&this[r](h,b)}};e=new MutationObserver(a),e.observe(this,{childList:!0,subtree:!0});let c=Array.from(this.querySelectorAll(n)).concat(Array.from(this.shadowRoot?.querySelectorAll(n)||[]));this[r](Array.from(c),[])},t.disconnectedCallback=function(){l.call(this),e.disconnect()}}}function v(n,s){let e={waitUntilFirstUpdate:!1,...s};return(t,r)=>{let{update:i}=t,l=Array.isArray(n)?n:[n];t.update=function(a){l.forEach(c=>{let d=c;if(a.has(d)){let p=a.get(d),m=this[d];p!==m&&(!e.waitUntilFirstUpdate||this.hasUpdated)&&this[r](p,m)}}),i.call(this,a)}}}import{property as Pi}from"lit/decorators.js";function Tr(n){return(s,e)=>{Pi(n)(s,e);let t=`__${e}`;Object.defineProperty(s,e,{get(){return this[t]},set(r){let i=this[t];if(this[t]=r,i!==r){if(this._internals?.states){let l=e.toLowerCase();r?this._internals.states.add(`--${l}`):this._internals.states.delete(`--${l}`)}if(n.aria&&this._internals){let l=n.aria;r?this._internals[l]="true":this._internals[l]=null}this.requestUpdate(e,i)}},configurable:!0,enumerable:!0})}}var q=class extends Ui{constructor(){super();this.disabled=!0;this._internals=this.attachInternals()}_handleTestElementChange(e,t){t.el&&(this.disabled=!1)}willUpdate(e){if(e.has("_testContext")){let{items:t=[],navItemId:r}=this._testContext??{};this.itemIndex=t.findIndex(i=>i.identifier===r),this.items=t,this.view=this._testContext?.view}}_switchView(e){this.dispatchEvent(new CustomEvent("on-test-switch-view",{composed:!0,bubbles:!0,detail:e}))}_requestItem(e){this.dispatchEvent(new CustomEvent("qti-request-test-item",{composed:!0,bubbles:!0,detail:e}))}};o([Tr({type:Boolean,reflect:!0,aria:"ariaDisabled"})],q.prototype,"disabled",2),o([Sr(),Mr({context:S,subscribe:!0})],q.prototype,"_testContext",2),o([Sr(),Mr({context:et,subscribe:!0})],q.prototype,"_testElement",2),o([v("_testElement")],q.prototype,"_handleTestElementChange",1);import{css as Xi,html as Bi}from"lit";import{customElement as ji}from"lit/decorators.js";import{css as it}from"lit";var Lr=it`
|
|
24
|
-
display: inline-flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
padding: 0.5rem 1rem;
|
|
28
|
-
border-radius: 0.25rem;
|
|
29
|
-
user-select: none;
|
|
30
|
-
`,ce=it`
|
|
31
|
-
background-color: lightgray;
|
|
32
|
-
${Lr};
|
|
33
|
-
`,de=it`
|
|
34
|
-
cursor: not-allowed;
|
|
35
|
-
opacity: 0.5;
|
|
36
|
-
`,Wc=it`
|
|
37
|
-
${Lr};
|
|
38
|
-
border: 1px solid gray;
|
|
39
|
-
`;var Me=class extends q{constructor(){super(),this._internals.role="button",this._internals.ariaLabel="Next item",this.addEventListener("click",s=>{s.preventDefault(),this.disabled||this._requestItem(this.items[this.itemIndex+1].identifier)})}willUpdate(s){super.willUpdate(s),s.has("_testContext")&&(this.disabled=!this._testElement?.el||this.itemIndex<0||this.itemIndex>=this.items.length-1)}render(){return Bi`<slot></slot>`}};Me.styles=Xi`
|
|
40
|
-
:host {
|
|
41
|
-
${ce};
|
|
42
|
-
}
|
|
43
|
-
:host([disabled]) {
|
|
44
|
-
${de};
|
|
45
|
-
}
|
|
46
|
-
`,Me=o([ji("test-next")],Me);import{css as Wi,html as Yi}from"lit";import{customElement as Ki}from"lit/decorators.js";var Se=class extends q{constructor(){super(),this._internals.role="button",this._internals.ariaLabel="Next item",this.addEventListener("click",s=>{s.preventDefault(),this.disabled||this._requestItem(this.items[this.itemIndex-1].identifier)})}willUpdate(s){super.willUpdate(s),s.has("_testContext")&&(this.disabled=!this._testElement?.el||this.itemIndex===0||this.itemIndex===-1)}render(){return Yi`<slot></slot>`}};Se.styles=Wi`
|
|
47
|
-
:host {
|
|
48
|
-
${ce};
|
|
49
|
-
}
|
|
50
|
-
:host([disabled]) {
|
|
51
|
-
${de};
|
|
52
|
-
}
|
|
53
|
-
`,Se=o([Ki("test-prev")],Se);import{html as _r}from"lit";import{customElement as Gi,property as Ar,state as Ji}from"lit/decorators.js";var w=class extends q{constructor(){super(...arguments);this.label="view";this._handleViewOptionsChange=()=>{this.updateViewOptions()};this._viewOptions=w.DEFAULT_VIEW_OPTIONS}connectedCallback(){super.connectedCallback(),this.updateViewOptions()}updateViewOptions(){if(this.viewOptions){let e=this.viewOptions.split(",").map(t=>t.trim());this._viewOptions=e.filter(t=>w.DEFAULT_VIEW_OPTIONS.includes(t))}else this._viewOptions=w.DEFAULT_VIEW_OPTIONS}render(){return _r`
|
|
54
|
-
<label part="label" for="viewSelect">${this.label}</label>
|
|
55
|
-
<select
|
|
56
|
-
part="select"
|
|
57
|
-
id="viewSelect"
|
|
58
|
-
.disabled=${this.disabled}
|
|
59
|
-
@change=${e=>{let t=e.target;this._switchView(t.value)}}
|
|
60
|
-
>
|
|
61
|
-
${this._viewOptions.map(e=>_r`<option value="${e}" ?selected=${e===this.view}>${e}</option>`)}
|
|
62
|
-
</select>
|
|
63
|
-
`}};w.DEFAULT_VIEW_OPTIONS=["author","candidate","proctor","scorer","testConstructor","tutor"],o([Ar({type:String})],w.prototype,"label",2),o([Ar({type:String,attribute:"view-options"})],w.prototype,"viewOptions",2),o([v("viewOptions",{waitUntilFirstUpdate:!0})],w.prototype,"_handleViewOptionsChange",2),o([Ji()],w.prototype,"_viewOptions",2),w=o([Gi("test-view")],w);import{css as Zi,html as Qi}from"lit";import{customElement as eo,property as to}from"lit/decorators.js";var pe=class extends q{constructor(){super();this.itemId=null;this.addEventListener("click",()=>this._requestItem(this.itemId))}render(){return Qi` <slot></slot> `}};pe.styles=Zi`
|
|
64
|
-
:host {
|
|
65
|
-
${ce};
|
|
66
|
-
}
|
|
67
|
-
:host([disabled]) {
|
|
68
|
-
${de};
|
|
69
|
-
}
|
|
70
|
-
`,o([to({type:String,attribute:"item-id"})],pe.prototype,"itemId",2),pe=o([eo("test-item-link")],pe);import{LitElement as io,html as At}from"lit";import{customElement as oo,property as so,state as Rr}from"lit/decorators.js";import{until as ao}from"lit/directives/until.js";var ot=`@layer qti-base, qti-components, qti-utilities, qti-variants, qti-extended;
|
|
71
|
-
|
|
72
|
-
:root,
|
|
73
|
-
:host {
|
|
74
|
-
/* Active colors */
|
|
75
|
-
--qti-bg-active: #ffecec;
|
|
76
|
-
--qti-border-active: #f86d70;
|
|
77
|
-
|
|
78
|
-
/* Gap size */
|
|
79
|
-
--qti-gap-size: 1rem;
|
|
80
|
-
|
|
81
|
-
/* Background colors */
|
|
82
|
-
--qti-bg: white;
|
|
83
|
-
--qti-hover-bg: #f9fafb;
|
|
84
|
-
|
|
85
|
-
/* Light theme colors */
|
|
86
|
-
--qti-light-bg-active: #f0f0f0; /* Light gray */
|
|
87
|
-
--qti-light-border-active: #d0d0d0; /* Medium gray */
|
|
88
|
-
|
|
89
|
-
/* Dark theme colors */
|
|
90
|
-
--qti-dark-bg-active: #1f2937; /* Dark gray */
|
|
91
|
-
--qti-dark-border-active: #64748b; /* Medium gray */
|
|
92
|
-
|
|
93
|
-
/* Disabled colors */
|
|
94
|
-
--qti-disabled-bg: #f3f4f6;
|
|
95
|
-
--qti-disabled-color: #45484f;
|
|
96
|
-
|
|
97
|
-
/* Border properties */
|
|
98
|
-
--qti-border-thickness: 2px;
|
|
99
|
-
--qti-border-style: solid;
|
|
100
|
-
--qti-border-color: #c6cad0;
|
|
101
|
-
--qti-border-radius: 0.3rem;
|
|
102
|
-
--qti-drop-border-radius: calc(var(--qti-border-radius) + var(--qti-border-thickness));
|
|
103
|
-
|
|
104
|
-
/* Focus & active states */
|
|
105
|
-
--qti-focus-border-width: 5px;
|
|
106
|
-
--qti-focus-color: #bddcff7e;
|
|
107
|
-
|
|
108
|
-
/* Class-specific variables */
|
|
109
|
-
|
|
110
|
-
/* Form elements */
|
|
111
|
-
--qti-form-size: 1rem;
|
|
112
|
-
|
|
113
|
-
/* Point elements */
|
|
114
|
-
--qti-point-size: 2rem;
|
|
115
|
-
|
|
116
|
-
/* Order buttons */
|
|
117
|
-
--qti-order-size: 2rem;
|
|
118
|
-
|
|
119
|
-
/* Generic padding for all elements */
|
|
120
|
-
--qti-padding-vertical: 0.5rem; /* py-2 */
|
|
121
|
-
--qti-padding-horizontal: 0.5rem; /* px-2 */
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/* SVG masks and backgrounds */
|
|
125
|
-
|
|
126
|
-
.chevron {
|
|
127
|
-
background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
|
|
128
|
-
no-repeat center right 6px;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.handle {
|
|
132
|
-
background-image: radial-gradient(
|
|
133
|
-
circle at center,
|
|
134
|
-
rgb(0 0 0 / 10%) 0,
|
|
135
|
-
rgb(0 0 0 / 20%) 2px,
|
|
136
|
-
rgb(255 255 255 / 0%) 2px,
|
|
137
|
-
rgb(255 255 255 / 0%) 100%
|
|
138
|
-
);
|
|
139
|
-
background-repeat: repeat-y;
|
|
140
|
-
background-position: left center;
|
|
141
|
-
background-size: 14px 8px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.check-mask {
|
|
145
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
146
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/*
|
|
150
|
-
Following are classes that can be applied to elements and element states, so they are not used directly
|
|
151
|
-
The @apply directive is used to apply these classes to elements
|
|
152
|
-
*/
|
|
153
|
-
|
|
154
|
-
/* Apply .bordered to an element */
|
|
155
|
-
|
|
156
|
-
.bordered {
|
|
157
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
158
|
-
outline: none;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* Apply .form rules for checkbox and radiobutton */
|
|
162
|
-
|
|
163
|
-
.form {
|
|
164
|
-
|
|
165
|
-
display: grid;
|
|
166
|
-
place-content: center;
|
|
167
|
-
width: var(--qti-form-size);
|
|
168
|
-
height: var(--qti-form-size);
|
|
169
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
170
|
-
outline: none;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/* Apply .button rules for button-like elements, such as drags and buttons */
|
|
174
|
-
|
|
175
|
-
.button {
|
|
176
|
-
|
|
177
|
-
border-radius: var(--qti-border-radius);
|
|
178
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
179
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
180
|
-
outline: none;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/* Apply .select for the select dropdown element */
|
|
184
|
-
|
|
185
|
-
.select {
|
|
186
|
-
|
|
187
|
-
border-radius: var(--qti-border-radius);
|
|
188
|
-
position: relative;
|
|
189
|
-
-webkit-appearance: none;
|
|
190
|
-
-moz-appearance: none;
|
|
191
|
-
appearance: none;
|
|
192
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
193
|
-
padding-right: calc(var(--qti-padding-horizontal) + 1.5rem); /* 1.5rem for the chevron */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
|
|
194
|
-
no-repeat center right 6px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/* Apply .text for the input text and textarea */
|
|
198
|
-
|
|
199
|
-
.text {
|
|
200
|
-
|
|
201
|
-
border-radius: 0;
|
|
202
|
-
cursor: text;
|
|
203
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
204
|
-
background: unset;
|
|
205
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
206
|
-
outline: none;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/* Apply .spot for hotspot shapes */
|
|
210
|
-
|
|
211
|
-
.spot {
|
|
212
|
-
|
|
213
|
-
width: 100%;
|
|
214
|
-
height: 100%;
|
|
215
|
-
background-color: transparent;
|
|
216
|
-
padding: 0;
|
|
217
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
218
|
-
outline: none;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/* Apply .point for circular small hotspots */
|
|
222
|
-
|
|
223
|
-
.point {
|
|
224
|
-
|
|
225
|
-
border-radius: 100%;
|
|
226
|
-
width: var(--qti-point-size);
|
|
227
|
-
height: var(--qti-point-size);
|
|
228
|
-
background-color: transparent;
|
|
229
|
-
padding: 0;
|
|
230
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
231
|
-
outline: none;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/* Apply .drag for draggable elements */
|
|
235
|
-
|
|
236
|
-
.drag {
|
|
237
|
-
|
|
238
|
-
transition:
|
|
239
|
-
transform 200ms ease-out,
|
|
240
|
-
box-shadow 200ms ease-out,
|
|
241
|
-
rotate 200ms ease-out;
|
|
242
|
-
cursor: grab;
|
|
243
|
-
background-color: var(--qti-bg);
|
|
244
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
245
|
-
border-radius: var(--qti-border-radius);
|
|
246
|
-
padding-left: calc(var(--qti-padding-horizontal) + 0.5rem) !important; /* 1.5rem for the drag */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; background-image: radial-gradient(
|
|
247
|
-
circle at center,
|
|
248
|
-
rgb(0 0 0 / 10%) 0,
|
|
249
|
-
rgb(0 0 0 / 20%) 2px,
|
|
250
|
-
rgb(255 255 255 / 0%) 2px,
|
|
251
|
-
rgb(255 255 255 / 0%) 100%
|
|
252
|
-
); background-repeat: repeat-y; background-position: left center; background-size: 14px 8px;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* Apply .dragging for the dragging state of a draggable element */
|
|
256
|
-
|
|
257
|
-
.dragging {
|
|
258
|
-
pointer-events: none;
|
|
259
|
-
rotate: -2deg;
|
|
260
|
-
box-shadow:
|
|
261
|
-
0 8px 12px rgb(0 0 0 / 20%),
|
|
262
|
-
0 4px 8px rgb(0 0 0 / 10%);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
/* Apply .drop for an element where you can drop the draggable */
|
|
266
|
-
|
|
267
|
-
.drop {
|
|
268
|
-
|
|
269
|
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
|
|
270
|
-
center no-repeat;
|
|
271
|
-
border-radius: var(--qti-border-radius);
|
|
272
|
-
position: relative;
|
|
273
|
-
background-color: var(--qti-bg);
|
|
274
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
275
|
-
outline: none;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/* Apply .dropping for an indicator where you can drop the draggable */
|
|
279
|
-
|
|
280
|
-
.dropping {
|
|
281
|
-
background-color: var(--qti-bg-active);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/* Apply .order for a small circular button */
|
|
285
|
-
|
|
286
|
-
.order {
|
|
287
|
-
|
|
288
|
-
display: grid;
|
|
289
|
-
place-content: center;
|
|
290
|
-
|
|
291
|
-
/* background-color: var(--qti-bg-active); */
|
|
292
|
-
border-radius: 100%;
|
|
293
|
-
width: var(--qti-order-size);
|
|
294
|
-
height: var(--qti-order-size);
|
|
295
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
296
|
-
outline: none;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/* Apply .check-size for radio and checkbox size */
|
|
300
|
-
|
|
301
|
-
.check-size {
|
|
302
|
-
width: calc(var(--qti-form-size) - 6px);
|
|
303
|
-
height: calc(var(--qti-form-size) - 6px);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/* Apply .check for checkbox */
|
|
307
|
-
|
|
308
|
-
.check {
|
|
309
|
-
gap: 0.5rem;
|
|
310
|
-
border-radius: var(--qti-border-radius);
|
|
311
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
312
|
-
outline: none;
|
|
313
|
-
cursor: pointer;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/* Apply .check-radio for outer circle of the radio buttons */
|
|
317
|
-
|
|
318
|
-
.check-radio {
|
|
319
|
-
|
|
320
|
-
border-radius: 100%;
|
|
321
|
-
|
|
322
|
-
display: grid;
|
|
323
|
-
|
|
324
|
-
place-content: center;
|
|
325
|
-
|
|
326
|
-
width: var(--qti-form-size);
|
|
327
|
-
|
|
328
|
-
height: var(--qti-form-size);
|
|
329
|
-
|
|
330
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
331
|
-
|
|
332
|
-
outline: none;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
/* Apply .check-radio-checked for the inner checked radio */
|
|
336
|
-
|
|
337
|
-
.check-radio-checked {
|
|
338
|
-
background-color: var(--qti-border-active);
|
|
339
|
-
border-radius: 100%;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/* Apply .check-checkbox for outer square of the checkbox */
|
|
343
|
-
|
|
344
|
-
.check-checkbox {
|
|
345
|
-
|
|
346
|
-
display: flex;
|
|
347
|
-
place-items: center;
|
|
348
|
-
border-radius: var(--qti-border-radius);
|
|
349
|
-
display: grid;
|
|
350
|
-
place-content: center;
|
|
351
|
-
width: var(--qti-form-size);
|
|
352
|
-
height: var(--qti-form-size);
|
|
353
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
354
|
-
outline: none;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/* Apply .check-checkbox-checked for the inner checkmark */
|
|
358
|
-
|
|
359
|
-
.check-checkbox-checked {
|
|
360
|
-
background-color: var(--qti-border-active);
|
|
361
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
362
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
/* Apply .hov for hover state */
|
|
366
|
-
|
|
367
|
-
.hov {
|
|
368
|
-
background-color: var(--qti-hover-bg);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/* Apply .foc for focus state */
|
|
372
|
-
|
|
373
|
-
.foc {
|
|
374
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/* Apply .act for active state */
|
|
378
|
-
|
|
379
|
-
.act {
|
|
380
|
-
border-color: var(--qti-border-active);
|
|
381
|
-
background-color: var(--qti-bg-active);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
.act-bg {
|
|
385
|
-
background-color: var(--qti-bg-active);
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
.act-bor {
|
|
389
|
-
border-color: var(--qti-border-active);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/* Apply .rdo for readonly state */
|
|
393
|
-
|
|
394
|
-
.rdo {
|
|
395
|
-
cursor: pointer;
|
|
396
|
-
background-color: var(--qti-bg);
|
|
397
|
-
outline: 0;
|
|
398
|
-
border: none;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/* Apply .dis for disabled state */
|
|
402
|
-
|
|
403
|
-
.dis {
|
|
404
|
-
cursor: not-allowed;
|
|
405
|
-
background-color: var(--qti-disabled-bg);
|
|
406
|
-
color: var(--qti-disabled-color);
|
|
407
|
-
border-color: var(--qti-border-color);
|
|
408
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
/* base */
|
|
412
|
-
|
|
413
|
-
/* ============================
|
|
414
|
-
QTI 3 shared css
|
|
415
|
-
1. Display
|
|
416
|
-
2. Special Flex styles
|
|
417
|
-
3. Margin
|
|
418
|
-
4. Padding
|
|
419
|
-
5. Horizontal Alignment styles
|
|
420
|
-
6. Vertical Alignment styles
|
|
421
|
-
7. Height
|
|
422
|
-
8. Width
|
|
423
|
-
9. Text-Indent
|
|
424
|
-
10. List Style
|
|
425
|
-
11. Layout
|
|
426
|
-
12. Other QTI 3 presentation utilities
|
|
427
|
-
============================ */
|
|
428
|
-
|
|
429
|
-
/* ==========
|
|
430
|
-
Display css
|
|
431
|
-
=========== */
|
|
432
|
-
|
|
433
|
-
.qti-display-inline {
|
|
434
|
-
display: inline;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.qti-display-inline-block {
|
|
438
|
-
display: inline-block;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
.qti-display-block {
|
|
442
|
-
display: block;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.qti-display-flex {
|
|
446
|
-
display: flexbox;
|
|
447
|
-
display: flex;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
.qti-display-inline-flex {
|
|
451
|
-
display: inline-flex;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
.qti-display-grid {
|
|
455
|
-
display: grid;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.qti-display-inline-grid {
|
|
459
|
-
display: inline-grid;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.qti-display-table {
|
|
463
|
-
display: table;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.qti-display-table-cell {
|
|
467
|
-
display: table-cell;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.qti-display-table-row {
|
|
471
|
-
display: table-row;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
.qti-display-list-item {
|
|
475
|
-
display: list-item;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
.qti-display-inherit {
|
|
479
|
-
display: inherit;
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
/*
|
|
483
|
-
* hidden to screen readers and sighted
|
|
484
|
-
*/
|
|
485
|
-
|
|
486
|
-
.qti-hidden {
|
|
487
|
-
display: none;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
/*
|
|
491
|
-
* visible to screen readers, hidden to sighted
|
|
492
|
-
*/
|
|
493
|
-
|
|
494
|
-
.qti-visually-hidden {
|
|
495
|
-
position: fixed !important;
|
|
496
|
-
overflow: hidden;
|
|
497
|
-
clip: rect(1px 1px 1px 1px);
|
|
498
|
-
height: 1px;
|
|
499
|
-
width: 1px;
|
|
500
|
-
border: 0;
|
|
501
|
-
margin: -1px;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
/* =============================
|
|
505
|
-
Special flex styles
|
|
506
|
-
============================= */
|
|
507
|
-
|
|
508
|
-
.qti-flex-direction-column {
|
|
509
|
-
flex-direction: column;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.qti-flex-direction-row {
|
|
513
|
-
flex-direction: row;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.qti-flex-grow-1 {
|
|
517
|
-
flex-grow: 1;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
.qti-flex-grow-0 {
|
|
521
|
-
flex-grow: 0;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/* =========
|
|
525
|
-
Margin css
|
|
526
|
-
========== */
|
|
527
|
-
|
|
528
|
-
/**
|
|
529
|
-
* For margin Top and Bottom and Left and Right
|
|
530
|
-
*/
|
|
531
|
-
|
|
532
|
-
.qti-margin-0 {
|
|
533
|
-
margin: 0 !important;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.qti-margin-1 {
|
|
537
|
-
margin: 0.25rem !important;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
.qti-margin-2 {
|
|
541
|
-
margin: 0.5rem !important;
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
.qti-margin-3 {
|
|
545
|
-
margin: 1rem !important;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.qti-margin-4 {
|
|
549
|
-
margin: 1.5rem !important;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
.qti-margin-5 {
|
|
553
|
-
margin: 3rem !important;
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
.qti-margin-auto {
|
|
557
|
-
margin: auto !important;
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
/*
|
|
561
|
-
For margin Left and Right
|
|
562
|
-
*/
|
|
563
|
-
|
|
564
|
-
.qti-margin-x-0 {
|
|
565
|
-
margin-right: 0 !important;
|
|
566
|
-
margin-left: 0 !important;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.qti-margin-x-1 {
|
|
570
|
-
margin-right: 0.25rem !important;
|
|
571
|
-
margin-left: 0.25rem !important;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.qti-margin-x-2 {
|
|
575
|
-
margin-right: 0.5rem !important;
|
|
576
|
-
margin-left: 0.5rem !important;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.qti-margin-x-3 {
|
|
580
|
-
margin-right: 1rem !important;
|
|
581
|
-
margin-left: 1rem !important;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
.qti-margin-x-4 {
|
|
585
|
-
margin-right: 1.5rem !important;
|
|
586
|
-
margin-left: 1.5rem !important;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.qti-margin-x-5 {
|
|
590
|
-
margin-right: 3rem !important;
|
|
591
|
-
margin-left: 3rem !important;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
.qti-margin-x-auto {
|
|
595
|
-
margin-right: auto !important;
|
|
596
|
-
margin-left: auto !important;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
/*
|
|
600
|
-
For margin Top and Bottom
|
|
601
|
-
*/
|
|
602
|
-
|
|
603
|
-
.qti-margin-y-0 {
|
|
604
|
-
margin-top: 0 !important;
|
|
605
|
-
margin-bottom: 0 !important;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
.qti-margin-y-1 {
|
|
609
|
-
margin-top: 0.25rem !important;
|
|
610
|
-
margin-bottom: 0.25rem !important;
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
.qti-margin-y-2 {
|
|
614
|
-
margin-top: 0.5rem !important;
|
|
615
|
-
margin-bottom: 0.5rem !important;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
.qti-margin-y-3 {
|
|
619
|
-
margin-top: 1rem !important;
|
|
620
|
-
margin-bottom: 1rem !important;
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
.qti-margin-y-4 {
|
|
624
|
-
margin-top: 1.5rem !important;
|
|
625
|
-
margin-bottom: 1.5rem !important;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
.qti-margin-y-5 {
|
|
629
|
-
margin-top: 3rem !important;
|
|
630
|
-
margin-bottom: 3rem !important;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
.qti-margin-y-auto {
|
|
634
|
-
margin-top: auto !important;
|
|
635
|
-
margin-bottom: auto !important;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
/*
|
|
639
|
-
For margin Top
|
|
640
|
-
*/
|
|
641
|
-
|
|
642
|
-
.qti-margin-t-0 {
|
|
643
|
-
margin-top: 0 !important;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
.qti-margin-t-1 {
|
|
647
|
-
margin-top: 0.25rem !important;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
.qti-margin-t-2 {
|
|
651
|
-
margin-top: 0.5rem !important;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
.qti-margin-t-3 {
|
|
655
|
-
margin-top: 1rem !important;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
.qti-margin-t-4 {
|
|
659
|
-
margin-top: 1.5rem !important;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
.qti-margin-t-5 {
|
|
663
|
-
margin-top: 3rem !important;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
.qti-margin-t-auto {
|
|
667
|
-
margin-top: auto !important;
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
/*
|
|
671
|
-
For margin Bottom
|
|
672
|
-
*/
|
|
673
|
-
|
|
674
|
-
.qti-margin-b-0 {
|
|
675
|
-
margin-bottom: 0 !important;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.qti-margin-b-1 {
|
|
679
|
-
margin-bottom: 0.25rem !important;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
.qti-margin-b-2 {
|
|
683
|
-
margin-bottom: 0.5rem !important;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
.qti-margin-b-3 {
|
|
687
|
-
margin-bottom: 1rem !important;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
.qti-margin-b-4 {
|
|
691
|
-
margin-bottom: 1.5rem !important;
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
.qti-margin-b-5 {
|
|
695
|
-
margin-bottom: 3rem !important;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
.qti-margin-b-auto {
|
|
699
|
-
margin-bottom: auto !important;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
/*
|
|
703
|
-
For margin Start LTR
|
|
704
|
-
*/
|
|
705
|
-
|
|
706
|
-
.qti-margin-s-0 {
|
|
707
|
-
margin-left: 0 !important;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
.qti-margin-s-1 {
|
|
711
|
-
margin-left: 0.25rem !important;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
.qti-margin-s-2 {
|
|
715
|
-
margin-left: 0.5rem !important;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
.qti-margin-s-3 {
|
|
719
|
-
margin-left: 1rem !important;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
.qti-margin-s-4 {
|
|
723
|
-
margin-left: 1.5rem !important;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
.qti-margin-s-5 {
|
|
727
|
-
margin-left: 3rem !important;
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
.qti-margin-s-auto {
|
|
731
|
-
margin-left: auto !important;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
/*
|
|
735
|
-
For margin End LTR
|
|
736
|
-
*/
|
|
737
|
-
|
|
738
|
-
.qti-margin-e-0 {
|
|
739
|
-
margin-right: 0 !important;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.qti-margin-e-1 {
|
|
743
|
-
margin-right: 0.25rem !important;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
.qti-margin-e-2 {
|
|
747
|
-
margin-right: 0.5rem !important;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
.qti-margin-e-3 {
|
|
751
|
-
margin-right: 1rem !important;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
.qti-margin-e-4 {
|
|
755
|
-
margin-right: 1.5rem !important;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
.qti-margin-e-5 {
|
|
759
|
-
margin-right: 3rem !important;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.qti-margin-e-auto {
|
|
763
|
-
margin-right: auto !important;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
/* =========
|
|
767
|
-
Padding css
|
|
768
|
-
========== */
|
|
769
|
-
|
|
770
|
-
/*
|
|
771
|
-
For padding Top and Bottom and Left and Right
|
|
772
|
-
*/
|
|
773
|
-
|
|
774
|
-
.qti-padding-0 {
|
|
775
|
-
padding: 0 !important;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
.qti-padding-1 {
|
|
779
|
-
padding: 0.25rem !important;
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
.qti-padding-2 {
|
|
783
|
-
padding: 0.5rem !important;
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
.qti-padding-3 {
|
|
787
|
-
padding: 1rem !important;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
.qti-padding-4 {
|
|
791
|
-
padding: 1.5rem !important;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.qti-padding-5 {
|
|
795
|
-
padding: 3rem !important;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/*
|
|
799
|
-
For padding Left and Right
|
|
800
|
-
*/
|
|
801
|
-
|
|
802
|
-
.qti-padding-x-0 {
|
|
803
|
-
padding-right: 0 !important;
|
|
804
|
-
padding-left: 0 !important;
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
.qti-padding-x-1 {
|
|
808
|
-
padding-right: 0.25rem !important;
|
|
809
|
-
padding-left: 0.25rem !important;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
.qti-padding-x-2 {
|
|
813
|
-
padding-right: 0.5rem !important;
|
|
814
|
-
padding-left: 0.5rem !important;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
.qti-padding-x-3 {
|
|
818
|
-
padding-right: 1rem !important;
|
|
819
|
-
padding-left: 1rem !important;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
.qti-padding-x-4 {
|
|
823
|
-
padding-right: 1.5rem !important;
|
|
824
|
-
padding-left: 1.5rem !important;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
.qti-padding-x-5 {
|
|
828
|
-
padding-right: 3rem !important;
|
|
829
|
-
padding-left: 3rem !important;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
/*
|
|
833
|
-
For padding Top and Bottom
|
|
834
|
-
*/
|
|
835
|
-
|
|
836
|
-
.qti-padding-y-0 {
|
|
837
|
-
padding-top: 0 !important;
|
|
838
|
-
padding-bottom: 0 !important;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
.qti-padding-y-1 {
|
|
842
|
-
padding-top: 0.25rem !important;
|
|
843
|
-
padding-bottom: 0.25rem !important;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
.qti-padding-y-2 {
|
|
847
|
-
padding-top: 0.5rem !important;
|
|
848
|
-
padding-bottom: 0.5rem !important;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
.qti-padding-y-3 {
|
|
852
|
-
padding-top: 1rem !important;
|
|
853
|
-
padding-bottom: 1rem !important;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
.qti-padding-y-4 {
|
|
857
|
-
padding-top: 1.5rem !important;
|
|
858
|
-
padding-bottom: 1.5rem !important;
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
.qti-padding-y-5 {
|
|
862
|
-
padding-top: 3rem !important;
|
|
863
|
-
padding-bottom: 3rem !important;
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
/*
|
|
867
|
-
For padding Top
|
|
868
|
-
*/
|
|
869
|
-
|
|
870
|
-
.qti-padding-t-0 {
|
|
871
|
-
padding-top: 0 !important;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
.qti-padding-t-1 {
|
|
875
|
-
padding-top: 0.25rem !important;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
.qti-padding-t-2 {
|
|
879
|
-
padding-top: 0.5rem !important;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
.qti-padding-t-3 {
|
|
883
|
-
padding-top: 1rem !important;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
.qti-padding-t-4 {
|
|
887
|
-
padding-top: 1.5rem !important;
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
.qti-padding-t-5 {
|
|
891
|
-
padding-top: 3rem !important;
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
/*
|
|
895
|
-
For padding Bottom
|
|
896
|
-
*/
|
|
897
|
-
|
|
898
|
-
.qti-padding-b-0 {
|
|
899
|
-
padding-bottom: 0 !important;
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
.qti-padding-b-1 {
|
|
903
|
-
padding-bottom: 0.25rem !important;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
.qti-padding-b-2 {
|
|
907
|
-
padding-bottom: 0.5rem !important;
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
.qti-padding-b-3 {
|
|
911
|
-
padding-bottom: 1rem !important;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
.qti-padding-b-4 {
|
|
915
|
-
padding-bottom: 1.5rem !important;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
.qti-padding-b-5 {
|
|
919
|
-
padding-bottom: 3rem !important;
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
/*
|
|
923
|
-
For padding Start LTR
|
|
924
|
-
*/
|
|
925
|
-
|
|
926
|
-
.qti-padding-s-0 {
|
|
927
|
-
padding-left: 0 !important;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
.qti-padding-s-1 {
|
|
931
|
-
padding-left: 0.25rem !important;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
.qti-padding-s-2 {
|
|
935
|
-
padding-left: 0.5rem !important;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
.qti-padding-s-3 {
|
|
939
|
-
padding-left: 1rem !important;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
.qti-padding-s-4 {
|
|
943
|
-
padding-left: 1.5rem !important;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
.qti-padding-s-5 {
|
|
947
|
-
padding-left: 3rem !important;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
/*
|
|
951
|
-
For padding End LTR
|
|
952
|
-
*/
|
|
953
|
-
|
|
954
|
-
.qti-padding-e-0 {
|
|
955
|
-
padding-right: 0 !important;
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
.qti-padding-e-1 {
|
|
959
|
-
padding-right: 0.25rem !important;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
.qti-padding-e-2 {
|
|
963
|
-
padding-right: 0.5rem !important;
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
.qti-padding-e-3 {
|
|
967
|
-
padding-right: 1rem !important;
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
.qti-padding-e-4 {
|
|
971
|
-
padding-right: 1.5rem !important;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
.qti-padding-e-5 {
|
|
975
|
-
padding-right: 3rem !important;
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
/* ====================
|
|
979
|
-
Horizontal alignment
|
|
980
|
-
==================== */
|
|
981
|
-
|
|
982
|
-
.qti-align-left {
|
|
983
|
-
text-align: left;
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
.qti-align-center {
|
|
987
|
-
text-align: center;
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
.qti-align-right {
|
|
991
|
-
text-align: right;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
/* ==================
|
|
995
|
-
Vertical alignment
|
|
996
|
-
================== */
|
|
997
|
-
|
|
998
|
-
.qti-valign-top {
|
|
999
|
-
vertical-align: top;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
.qti-valign-middle {
|
|
1003
|
-
vertical-align: middle;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
.qti-valign-baseline {
|
|
1007
|
-
vertical-align: baseline;
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
.qti-valign-bottom {
|
|
1011
|
-
vertical-align: bottom;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
/* =============
|
|
1015
|
-
Height styles
|
|
1016
|
-
============= */
|
|
1017
|
-
|
|
1018
|
-
.qti-height-0 {
|
|
1019
|
-
height: 0;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
.qti-height-px {
|
|
1023
|
-
height: 1px;
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
.qti-height-0p5 {
|
|
1027
|
-
height: 0.125rem;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
.qti-height-1 {
|
|
1031
|
-
height: 0.25rem;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
.qti-height-1p5 {
|
|
1035
|
-
height: 0.375rem;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
.qti-height-2 {
|
|
1039
|
-
height: 0.5rem;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
.qti-height-2p5 {
|
|
1043
|
-
height: 0.625rem;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
.qti-height-3 {
|
|
1047
|
-
height: 0.75rem;
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
.qti-height-3p5 {
|
|
1051
|
-
height: 0.875rem;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
.qti-height-4 {
|
|
1055
|
-
height: 1rem;
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
.qti-height-5 {
|
|
1059
|
-
height: 1.25rem;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
.qti-height-6 {
|
|
1063
|
-
height: 1.5rem;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
.qti-height-7 {
|
|
1067
|
-
height: 1.75rem;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
.qti-height-8 {
|
|
1071
|
-
height: 2rem;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
.qti-height-9 {
|
|
1075
|
-
height: 2.25rem;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
.qti-height-10 {
|
|
1079
|
-
height: 2.5rem;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
.qti-height-11 {
|
|
1083
|
-
height: 2.75rem;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
.qti-height-12 {
|
|
1087
|
-
height: 3rem;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
.qti-height-14 {
|
|
1091
|
-
height: 3.5rem;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
.qti-height-16 {
|
|
1095
|
-
height: 4rem;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
.qti-height-20 {
|
|
1099
|
-
height: 5rem;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
.qti-height-24 {
|
|
1103
|
-
height: 6rem;
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
.qti-height-28 {
|
|
1107
|
-
height: 7rem;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
.qti-height-32 {
|
|
1111
|
-
height: 8rem;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
.qti-height-36 {
|
|
1115
|
-
height: 9rem;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
.qti-height-40 {
|
|
1119
|
-
height: 10rem;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
.qti-height-44 {
|
|
1123
|
-
height: 11rem;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
.qti-height-48 {
|
|
1127
|
-
height: 12rem;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
.qti-height-52 {
|
|
1131
|
-
height: 13rem;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
.qti-height-56 {
|
|
1135
|
-
height: 14rem;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
.qti-height-60 {
|
|
1139
|
-
height: 15rem;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
.qti-height-64 {
|
|
1143
|
-
height: 16rem;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
.qti-height-72 {
|
|
1147
|
-
height: 18rem;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
.qti-height-80 {
|
|
1151
|
-
height: 20rem;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
.qti-height-96 {
|
|
1155
|
-
height: 24rem;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
.qti-height-1-2 {
|
|
1159
|
-
height: 50%;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
.qti-height-1-3 {
|
|
1163
|
-
height: 33.3333%;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
.qti-height-2-3 {
|
|
1167
|
-
height: 66.6667%;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
.qti-height-1-4 {
|
|
1171
|
-
height: 25%;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
.qti-height-2-4 {
|
|
1175
|
-
height: 50%;
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
.qti-height-3-4 {
|
|
1179
|
-
height: 75%;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
.qti-height-1-5 {
|
|
1183
|
-
height: 20%;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
.qti-height-2-5 {
|
|
1187
|
-
height: 40%;
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
.qti-height-3-5 {
|
|
1191
|
-
height: 60%;
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
.qti-height-4-5 {
|
|
1195
|
-
height: 80%;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
.qti-height-1-6 {
|
|
1199
|
-
height: 16.6667%;
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
.qti-height-2-6 {
|
|
1203
|
-
height: 33.3333%;
|
|
1204
|
-
}
|
|
1205
|
-
|
|
1206
|
-
.qti-height-3-6 {
|
|
1207
|
-
height: 50%;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
.qti-height-4-6 {
|
|
1211
|
-
height: 66.6667%;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
.qti-height-5-6 {
|
|
1215
|
-
height: 83.3333%;
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
.qti-height-auto {
|
|
1219
|
-
height: auto;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
.qti-height-full {
|
|
1223
|
-
height: 100%;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
/* ============
|
|
1227
|
-
Width styles
|
|
1228
|
-
============ */
|
|
1229
|
-
|
|
1230
|
-
.qti-width-0 {
|
|
1231
|
-
width: 0;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
.qti-width-px {
|
|
1235
|
-
width: 1px;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
.qti-width-0p5 {
|
|
1239
|
-
width: 0.125rem;
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
.qti-width-1 {
|
|
1243
|
-
width: 0.25rem;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
.qti-width-1p5 {
|
|
1247
|
-
width: 0.375rem;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
.qti-width-2 {
|
|
1251
|
-
width: 0.5rem;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
.qti-width-2p5 {
|
|
1255
|
-
width: 0.625rem;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
.qti-width-3 {
|
|
1259
|
-
width: 0.75rem;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
.qti-width-3p5 {
|
|
1263
|
-
width: 0.875rem;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
.qti-width-4 {
|
|
1267
|
-
width: 1rem;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
.qti-width-5 {
|
|
1271
|
-
width: 1.25rem;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
.qti-width-6 {
|
|
1275
|
-
width: 1.5rem;
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
.qti-width-7 {
|
|
1279
|
-
width: 1.75rem;
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
.qti-width-8 {
|
|
1283
|
-
width: 2rem;
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
.qti-width-9 {
|
|
1287
|
-
width: 2.25rem;
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
.qti-width-10 {
|
|
1291
|
-
width: 2.5rem;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
.qti-width-11 {
|
|
1295
|
-
width: 2.75rem;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
.qti-width-12 {
|
|
1299
|
-
width: 3rem;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
.qti-width-14 {
|
|
1303
|
-
width: 3.5rem;
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
.qti-width-16 {
|
|
1307
|
-
width: 4rem;
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
.qti-width-20 {
|
|
1311
|
-
width: 5rem;
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
.qti-width-24 {
|
|
1315
|
-
width: 6rem;
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
.qti-width-28 {
|
|
1319
|
-
width: 7rem;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
.qti-width-32 {
|
|
1323
|
-
width: 8rem;
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
.qti-width-36 {
|
|
1327
|
-
width: 9rem;
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
.qti-width-40 {
|
|
1331
|
-
width: 10rem;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
.qti-width-44 {
|
|
1335
|
-
width: 11rem;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
.qti-width-48 {
|
|
1339
|
-
width: 12rem;
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
.qti-width-52 {
|
|
1343
|
-
width: 13rem;
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
.qti-width-56 {
|
|
1347
|
-
width: 14rem;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
.qti-width-60 {
|
|
1351
|
-
width: 15rem;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
.qti-width-64 {
|
|
1355
|
-
width: 16rem;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
.qti-width-72 {
|
|
1359
|
-
width: 18rem;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
.qti-width-80 {
|
|
1363
|
-
width: 20rem;
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
.qti-width-96 {
|
|
1367
|
-
width: 24rem;
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
.qti-width-auto {
|
|
1371
|
-
width: auto;
|
|
1372
|
-
}
|
|
1373
|
-
|
|
1374
|
-
.qti-width-1-2 {
|
|
1375
|
-
width: 50%;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
.qti-width-1-3 {
|
|
1379
|
-
width: 33.3333%;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
.qti-width-2-3 {
|
|
1383
|
-
width: 66.6667%;
|
|
1384
|
-
}
|
|
1385
|
-
|
|
1386
|
-
.qti-width-1-4 {
|
|
1387
|
-
width: 25%;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
.qti-width-2-4 {
|
|
1391
|
-
width: 50%;
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
.qti-width-3-4 {
|
|
1395
|
-
width: 75%;
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
.qti-width-1-5 {
|
|
1399
|
-
width: 20%;
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
.qti-width-2-5 {
|
|
1403
|
-
width: 40%;
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
.qti-width-3-5 {
|
|
1407
|
-
width: 60%;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
.qti-width-4-5 {
|
|
1411
|
-
width: 80%;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
.qti-width-1-6 {
|
|
1415
|
-
width: 16.6667%;
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
.qti-width-2-6 {
|
|
1419
|
-
width: 33.3333%;
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
.qti-width-3-6 {
|
|
1423
|
-
width: 50%;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
.qti-width-4-6 {
|
|
1427
|
-
width: 66.6667%;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
.qti-width-5-6 {
|
|
1431
|
-
width: 83.3333%;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
.qti-width-1-12 {
|
|
1435
|
-
width: 8.3333%;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
.qti-width-2-12 {
|
|
1439
|
-
width: 16.6667%;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
.qti-width-3-12 {
|
|
1443
|
-
width: 25%;
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
.qti-width-4-12 {
|
|
1447
|
-
width: 33.3333%;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
.qti-width-5-12 {
|
|
1451
|
-
width: 41.6667%;
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
.qti-width-6-12 {
|
|
1455
|
-
width: 50%;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
.qti-width-7-12 {
|
|
1459
|
-
width: 58.3333%;
|
|
1460
|
-
}
|
|
1461
|
-
|
|
1462
|
-
.qti-width-8-12 {
|
|
1463
|
-
width: 66.6667%;
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
.qti-width-9-12 {
|
|
1467
|
-
width: 75%;
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
.qti-width-10-12 {
|
|
1471
|
-
width: 83.3333%;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
.qti-width-11-12 {
|
|
1475
|
-
width: 91.6667%;
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
.qti-width-full,
|
|
1479
|
-
.qti-fullwidth {
|
|
1480
|
-
width: 100%;
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
/* ==================
|
|
1484
|
-
Text Indent styles
|
|
1485
|
-
================== */
|
|
1486
|
-
|
|
1487
|
-
.qti-text-indent-0 {
|
|
1488
|
-
text-indent: 0;
|
|
1489
|
-
}
|
|
1490
|
-
|
|
1491
|
-
.qti-text-indent-px {
|
|
1492
|
-
text-indent: 1px;
|
|
1493
|
-
}
|
|
1494
|
-
|
|
1495
|
-
.qti-text-indent-0p5 {
|
|
1496
|
-
text-indent: 0.125rem;
|
|
1497
|
-
}
|
|
1498
|
-
|
|
1499
|
-
.qti-text-indent-1 {
|
|
1500
|
-
text-indent: 0.25rem;
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
.qti-text-indent-1p5 {
|
|
1504
|
-
text-indent: 0.375rem;
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
.qti-text-indent-2 {
|
|
1508
|
-
text-indent: 0.5rem;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
.qti-text-indent-2p5 {
|
|
1512
|
-
text-indent: 0.625rem;
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
.qti-text-indent-3 {
|
|
1516
|
-
text-indent: 0.75rem;
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
.qti-text-indent-3p5 {
|
|
1520
|
-
text-indent: 0.875rem;
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
.qti-text-indent-4 {
|
|
1524
|
-
text-indent: 1rem;
|
|
1525
|
-
}
|
|
1526
|
-
|
|
1527
|
-
.qti-text-indent-5 {
|
|
1528
|
-
text-indent: 1.25rem;
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
.qti-text-indent-6 {
|
|
1532
|
-
text-indent: 1.5rem;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
.qti-text-indent-7 {
|
|
1536
|
-
text-indent: 1.75rem;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
.qti-text-indent-8 {
|
|
1540
|
-
text-indent: 2rem;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
.qti-text-indent-12 {
|
|
1544
|
-
text-indent: 3rem;
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
.qti-text-indent-16 {
|
|
1548
|
-
text-indent: 4rem;
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
.qti-text-indent-20 {
|
|
1552
|
-
text-indent: 5rem;
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1555
|
-
.qti-text-indent-24 {
|
|
1556
|
-
text-indent: 6rem;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
.qti-text-indent-28 {
|
|
1560
|
-
text-indent: 7rem;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
.qti-text-indent-32 {
|
|
1564
|
-
text-indent: 8rem;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
/* =================
|
|
1568
|
-
List Style styles
|
|
1569
|
-
================= */
|
|
1570
|
-
|
|
1571
|
-
.qti-list-style-type-none {
|
|
1572
|
-
list-style-type: none;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
.qti-list-style-type-disc {
|
|
1576
|
-
list-style-type: disc;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
.qti-list-style-type-circle {
|
|
1580
|
-
list-style-type: circle;
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
.qti-list-style-type-square {
|
|
1584
|
-
list-style-type: square;
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
|
-
.qti-list-style-type-decimal {
|
|
1588
|
-
list-style-type: decimal;
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
.qti-list-style-type-decimal-leading-zero {
|
|
1592
|
-
list-style-type: decimal-leading-zero;
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
.qti-list-style-type-lower-alpha {
|
|
1596
|
-
list-style-type: lower-alpha;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
.qti-list-style-type-upper-alpha {
|
|
1600
|
-
list-style-type: upper-alpha;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
.qti-list-style-type-lower-roman {
|
|
1604
|
-
list-style-type: lower-roman;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
.qti-list-style-type-upper-roman {
|
|
1608
|
-
list-style-type: upper-roman;
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
.qti-list-style-type-lower-latin {
|
|
1612
|
-
list-style-type: lower-latin;
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
.qti-list-style-type-upper-latin {
|
|
1616
|
-
list-style-type: upper-latin;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
.qti-list-style-type-lower-greek {
|
|
1620
|
-
list-style-type: lower-greek;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
.qti-list-style-type-arabic-indic {
|
|
1624
|
-
list-style-type: arabic-indic;
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
.qti-list-style-type-armenian {
|
|
1628
|
-
list-style-type: armenian;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
.qti-list-style-type-lower-armenian {
|
|
1632
|
-
list-style-type: lower-armenian;
|
|
1633
|
-
}
|
|
1634
|
-
|
|
1635
|
-
.qti-list-style-type-upper-armenian {
|
|
1636
|
-
list-style-type: upper-armenian;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
.qti-list-style-type-bengali {
|
|
1640
|
-
list-style-type: bengali;
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
.qti-list-style-type-cambodian {
|
|
1644
|
-
list-style-type: cambodian;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
.qti-list-style-type-simp-chinese-formal {
|
|
1648
|
-
list-style-type: simp-chinese-formal;
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
.qti-list-style-type-simp-chinese-informal {
|
|
1652
|
-
list-style-type: simp-chinese-informal;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
.qti-list-style-type-trad-chinese-formal {
|
|
1656
|
-
list-style-type: trad-chinese-formal;
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
|
-
.qti-list-style-type-trad-chinese-informal {
|
|
1660
|
-
list-style-type: trad-chinese-informal;
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
.qti-list-style-type-cjk-ideographic {
|
|
1664
|
-
list-style-type: cjk-ideographic;
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
.qti-list-style-type-cjk-heavenly-stem {
|
|
1668
|
-
list-style-type: cjk-heavenly-stem;
|
|
1669
|
-
}
|
|
1670
|
-
|
|
1671
|
-
.qti-list-style-type-cjk-earthly-branch {
|
|
1672
|
-
list-style-type: cjk-earthly-branch;
|
|
1673
|
-
}
|
|
1674
|
-
|
|
1675
|
-
.qti-list-style-type-devanagari {
|
|
1676
|
-
list-style-type: devanagari;
|
|
1677
|
-
}
|
|
1678
|
-
|
|
1679
|
-
.qti-list-style-type-ethiopic-halehame-ti-er {
|
|
1680
|
-
list-style-type: ethiopic-halehame-ti-er;
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
.qti-list-style-type-ethiopic-halehame-ti-et {
|
|
1684
|
-
list-style-type: ethiopic-halehame-ti-et;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
.qti-list-style-type-ethiopic-halehame-am {
|
|
1688
|
-
list-style-type: ethiopic-halehame-am;
|
|
1689
|
-
}
|
|
1690
|
-
|
|
1691
|
-
.qti-list-style-type-ethiopic-halehame {
|
|
1692
|
-
list-style-type: ethiopic-halehame;
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
.qti-list-style-type-georgian {
|
|
1696
|
-
list-style-type: georgian;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
.qti-list-style-type-gujarati {
|
|
1700
|
-
list-style-type: gujarati;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
.qti-list-style-type-gurmukhi {
|
|
1704
|
-
list-style-type: gurmukhi;
|
|
1705
|
-
}
|
|
1706
|
-
|
|
1707
|
-
.qti-list-style-type-hangul {
|
|
1708
|
-
list-style-type: hangul;
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
.qti-list-style-type-hangul-consonant {
|
|
1712
|
-
list-style-type: hangul-consonant;
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
.qti-list-style-type-hebrew {
|
|
1716
|
-
list-style-type: hebrew;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
.qti-list-style-type-hiragana {
|
|
1720
|
-
list-style-type: hiragana;
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
.qti-list-style-type-hiragana-iroha {
|
|
1724
|
-
list-style-type: hiragana-iroha;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
.qti-list-style-type-khmer {
|
|
1728
|
-
list-style-type: khmer;
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
.qti-list-style-type-korean-hangul-formal {
|
|
1732
|
-
list-style-type: korean-hangul-formal;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
.qti-list-style-type-korean-hanja-formal {
|
|
1736
|
-
list-style-type: korean-hanja-formal;
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
.qti-list-style-type-korean-hanja-informal {
|
|
1740
|
-
list-style-type: korean-hanja-informal;
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
.qti-list-style-type-lao {
|
|
1744
|
-
list-style-type: lao;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
.qti-list-style-type-malayalam {
|
|
1748
|
-
list-style-type: malayalam;
|
|
1749
|
-
}
|
|
1750
|
-
|
|
1751
|
-
.qti-list-style-type-mongolian {
|
|
1752
|
-
list-style-type: mongolian;
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
.qti-list-style-type-myanmar {
|
|
1756
|
-
list-style-type: myanmar;
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
.qti-list-style-type-oriya {
|
|
1760
|
-
list-style-type: oriya;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
.qti-list-style-type-persian {
|
|
1764
|
-
list-style-type: persian;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
.qti-list-style-type-thai {
|
|
1768
|
-
list-style-type: thai;
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
.qti-list-style-type-tibetan {
|
|
1772
|
-
list-style-type: tibetan;
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
.qti-list-style-type-telugu {
|
|
1776
|
-
list-style-type: telugu;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
.qti-list-style-type-urdu {
|
|
1780
|
-
list-style-type: urdu;
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
/* =========================
|
|
1784
|
-
Other QTI 3 Presentation Utilities
|
|
1785
|
-
========================= */
|
|
1786
|
-
|
|
1787
|
-
.qti-bordered {
|
|
1788
|
-
border: 1px solid var(--table-border-color);
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
.qti-underline {
|
|
1792
|
-
text-decoration: underline;
|
|
1793
|
-
text-decoration-color: var(--foreground);
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
.qti-italic {
|
|
1797
|
-
font-style: italic;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
.qti-well {
|
|
1801
|
-
min-height: 20px;
|
|
1802
|
-
padding: 19px;
|
|
1803
|
-
margin-bottom: 20px;
|
|
1804
|
-
background-color: var(--well-bg);
|
|
1805
|
-
border: var(--well-border);
|
|
1806
|
-
border-radius: 4px;
|
|
1807
|
-
box-shadow: var(--well-box-shadow);
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
/* Set writing-mode to vertical-rl
|
|
1811
|
-
Typical for CJK vertical text */
|
|
1812
|
-
|
|
1813
|
-
.qti-writing-mode-vertical-rl {
|
|
1814
|
-
writing-mode: vertical-rl;
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
/* Set writing-mode to vertical-lr
|
|
1818
|
-
Typical for Mongolian vertical text */
|
|
1819
|
-
|
|
1820
|
-
.qti-writing-mode-vertical-lr {
|
|
1821
|
-
writing-mode: vertical-lr;
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
/* Set writing-mode to horizontal-tb
|
|
1825
|
-
Browser default */
|
|
1826
|
-
|
|
1827
|
-
.qti-writing-mode-horizontal-tb {
|
|
1828
|
-
writing-mode: horizontal-tb;
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
/* Float an element left */
|
|
1832
|
-
|
|
1833
|
-
.qti-float-left {
|
|
1834
|
-
float: left;
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
/* Float an element right */
|
|
1838
|
-
|
|
1839
|
-
.qti-float-right {
|
|
1840
|
-
float: right;
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
/* Remove a float */
|
|
1844
|
-
|
|
1845
|
-
.qti-float-none {
|
|
1846
|
-
float: none;
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
/* Clearfix Hack to apply to a container of
|
|
1850
|
-
floated content that overflows the container. */
|
|
1851
|
-
|
|
1852
|
-
.qti-float-clearfix::after {
|
|
1853
|
-
content: '';
|
|
1854
|
-
clear: both;
|
|
1855
|
-
display: table;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
.qti-float-clear-left
|
|
1859
|
-
.qti-float-clear-right
|
|
1860
|
-
.qti-float-clear-both
|
|
1861
|
-
|
|
1862
|
-
/* Set text-orientation to upright */
|
|
1863
|
-
.qti-text-orientation-upright {
|
|
1864
|
-
text-orientation: upright;
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
/* stylelint-disable number-max-precision */
|
|
1868
|
-
|
|
1869
|
-
@layer qti-base {
|
|
1870
|
-
.qti-layout-row {
|
|
1871
|
-
display: flex;
|
|
1872
|
-
flex-wrap: wrap;
|
|
1873
|
-
width: 100%;
|
|
1874
|
-
gap: 2.1276595745%;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
.qti-layout-row [class*='qti-layout-col']:not(:empty) {
|
|
1878
|
-
box-sizing: border-box;
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
.qti-layout-row [class*='qti-layout-col']:empty {
|
|
1882
|
-
width: 0;
|
|
1883
|
-
overflow: hidden; /* to fully collapse if there\u2019s padding or borders */
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
.qti-layout-col1 {
|
|
1887
|
-
width: 6.3829787234%;
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
.qti-layout-col2 {
|
|
1891
|
-
width: 14.8936170213%;
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
.qti-layout-col3 {
|
|
1895
|
-
width: 23.4042553191%;
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
.qti-layout-col4 {
|
|
1899
|
-
width: 31.914893617%;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
.qti-layout-col5 {
|
|
1903
|
-
width: 40.4255319149%;
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
.qti-layout-col6 {
|
|
1907
|
-
width: 48.9361702128%;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
.qti-layout-col7 {
|
|
1911
|
-
width: 57.4468085106%;
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
.qti-layout-col8 {
|
|
1915
|
-
width: 65.9574468085%;
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
.qti-layout-col9 {
|
|
1919
|
-
width: 74.4680851064%;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
.qti-layout-col10 {
|
|
1923
|
-
width: 82.9787234043%;
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
.qti-layout-col11 {
|
|
1927
|
-
width: 91.4893617021%;
|
|
1928
|
-
}
|
|
1929
|
-
|
|
1930
|
-
.qti-layout-col12 {
|
|
1931
|
-
width: 100%;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
.qti-layout-offset1 {
|
|
1935
|
-
margin-left: 8.5106382979%;
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
.qti-layout-offset2 {
|
|
1939
|
-
margin-left: 17.0212765957%;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
.qti-layout-offset3 {
|
|
1943
|
-
margin-left: 25.5319148936%;
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
.qti-layout-offset4 {
|
|
1947
|
-
margin-left: 34.0425531915%;
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
.qti-layout-offset5 {
|
|
1951
|
-
margin-left: 42.5531914894%;
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
.qti-layout-offset6 {
|
|
1955
|
-
margin-left: 51.0638297872%;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
.qti-layout-offset7 {
|
|
1959
|
-
margin-left: 59.5744680851%;
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
.qti-layout-offset8 {
|
|
1963
|
-
margin-left: 68.085106383%;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
.qti-layout-offset9 {
|
|
1967
|
-
margin-left: 76.5957446809%;
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
|
-
.qti-layout-offset10 {
|
|
1971
|
-
margin-left: 85.1063829787%;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
.qti-layout-offset11 {
|
|
1975
|
-
margin-left: 93.6170212766%;
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
.qti-layout-offset12 {
|
|
1979
|
-
margin-left: 102.1276595745%;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
@media (width <= 767px) {
|
|
1983
|
-
[class*='qti-layout-col'] {
|
|
1984
|
-
width: 100%;
|
|
1985
|
-
}
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
[view],
|
|
1990
|
-
qti-outcome-declaration,
|
|
1991
|
-
qti-response-declaration {
|
|
1992
|
-
display: none;
|
|
1993
|
-
}
|
|
1994
|
-
|
|
1995
|
-
[view].show {
|
|
1996
|
-
display: block;
|
|
1997
|
-
}
|
|
1998
|
-
|
|
1999
|
-
:host {
|
|
2000
|
-
box-sizing: border-box;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
*,
|
|
2004
|
-
*::before,
|
|
2005
|
-
*::after {
|
|
2006
|
-
box-sizing: inherit;
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
/* components */
|
|
2010
|
-
|
|
2011
|
-
@layer qti-components {
|
|
2012
|
-
qti-choice-interaction {
|
|
2013
|
-
&.qti-input-control-hidden {
|
|
2014
|
-
& qti-simple-choice {
|
|
2015
|
-
|
|
2016
|
-
&:hover {
|
|
2017
|
-
background-color: var(--qti-hover-bg);
|
|
2018
|
-
}
|
|
2019
|
-
|
|
2020
|
-
&:focus {
|
|
2021
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2022
|
-
}
|
|
2023
|
-
|
|
2024
|
-
&::part(ch) {
|
|
2025
|
-
display: none;
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2028
|
-
&:state(--checked),
|
|
2029
|
-
&[aria-checked='true'] {
|
|
2030
|
-
border-color: var(--qti-border-active);
|
|
2031
|
-
background-color: var(--qti-bg-active);
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
&:state(readonly),
|
|
2035
|
-
&[aria-readonly='true'] {
|
|
2036
|
-
cursor: pointer;
|
|
2037
|
-
background-color: var(--qti-bg);
|
|
2038
|
-
outline: 0;
|
|
2039
|
-
border: none;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
&:state(disabled),
|
|
2043
|
-
&[aria-disabled='true'] {
|
|
2044
|
-
cursor: not-allowed;
|
|
2045
|
-
background-color: var(--qti-disabled-bg);
|
|
2046
|
-
color: var(--qti-disabled-color);
|
|
2047
|
-
border-color: var(--qti-border-color);
|
|
2048
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
border-radius: var(--qti-border-radius);
|
|
2052
|
-
|
|
2053
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2054
|
-
|
|
2055
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2056
|
-
|
|
2057
|
-
outline: none
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
&:not(.qti-input-control-hidden) {
|
|
2062
|
-
& qti-simple-choice {
|
|
2063
|
-
|
|
2064
|
-
&:not([aria-disabled='true'], [aria-readonly='true'], :state(--checked)):hover {
|
|
2065
|
-
background-color: var(--qti-hover-bg);
|
|
2066
|
-
}
|
|
2067
|
-
|
|
2068
|
-
&:focus {
|
|
2069
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
&:state(--checked),
|
|
2073
|
-
&[aria-checked='true'] {
|
|
2074
|
-
border-color: var(--qti-border-active);
|
|
2075
|
-
background-color: var(--qti-bg-active);
|
|
2076
|
-
}
|
|
2077
|
-
|
|
2078
|
-
&:state(readonly),
|
|
2079
|
-
&[aria-readonly='true'] {
|
|
2080
|
-
cursor: pointer;
|
|
2081
|
-
background-color: var(--qti-bg);
|
|
2082
|
-
outline: 0;
|
|
2083
|
-
border: none;
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
&:state(disabled),
|
|
2087
|
-
&[aria-disabled='true'] {
|
|
2088
|
-
cursor: not-allowed;
|
|
2089
|
-
background-color: var(--qti-disabled-bg);
|
|
2090
|
-
color: var(--qti-disabled-color);
|
|
2091
|
-
border-color: var(--qti-border-color);
|
|
2092
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
&::part(cha) {
|
|
2096
|
-
width: calc(var(--qti-form-size) - 6px);
|
|
2097
|
-
height: calc(var(--qti-form-size) - 6px);
|
|
2098
|
-
}
|
|
2099
|
-
|
|
2100
|
-
&:state(radio)::part(ch) {
|
|
2101
|
-
border-radius: 100%;
|
|
2102
|
-
display: grid;
|
|
2103
|
-
place-content: center;
|
|
2104
|
-
width: var(--qti-form-size);
|
|
2105
|
-
height: var(--qti-form-size);
|
|
2106
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2107
|
-
outline: none;
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
&:state(radio):state(--checked)::part(cha) {
|
|
2111
|
-
background-color: var(--qti-border-active);
|
|
2112
|
-
border-radius: 100%;
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
&:state(checkbox)::part(ch) {
|
|
2116
|
-
display: flex;
|
|
2117
|
-
place-items: center;
|
|
2118
|
-
border-radius: var(--qti-border-radius);
|
|
2119
|
-
display: grid;
|
|
2120
|
-
place-content: center;
|
|
2121
|
-
width: var(--qti-form-size);
|
|
2122
|
-
height: var(--qti-form-size);
|
|
2123
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2124
|
-
outline: none;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
&:state(checkbox):state(--checked)::part(cha) {
|
|
2128
|
-
background-color: var(--qti-border-active);
|
|
2129
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
2130
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
gap: 0.5rem;
|
|
2134
|
-
|
|
2135
|
-
border-radius: var(--qti-border-radius);
|
|
2136
|
-
|
|
2137
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2138
|
-
|
|
2139
|
-
outline: none;
|
|
2140
|
-
|
|
2141
|
-
cursor: pointer
|
|
2142
|
-
}
|
|
2143
|
-
}
|
|
2144
|
-
|
|
2145
|
-
& qti-simple-choice {
|
|
2146
|
-
width: -moz-fit-content;
|
|
2147
|
-
width: fit-content;
|
|
2148
|
-
cursor: pointer;
|
|
2149
|
-
|
|
2150
|
-
&:state(correct-response),
|
|
2151
|
-
&[data-correct-response='true'] {
|
|
2152
|
-
&::after {
|
|
2153
|
-
content: '\\02714';
|
|
2154
|
-
color: #16a34a; /* text-green-600 */
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
& qti-simple-choice > p {
|
|
2160
|
-
margin: 0 !important;
|
|
2161
|
-
padding: 0 !important;
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
.hover-border {
|
|
2166
|
-
border: 2px solid #000; /* Adjust the border style and color as needed */
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
qti-graphic-gap-match-interaction {
|
|
2170
|
-
position: relative;
|
|
2171
|
-
|
|
2172
|
-
&.qti-selections-light {
|
|
2173
|
-
&:state(--dragzone-active)::part(drags) {
|
|
2174
|
-
background-color: var(--qti-light-bg-active);
|
|
2175
|
-
border-color: var(--qti-light-border-active);
|
|
2176
|
-
}
|
|
2177
|
-
|
|
2178
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
2179
|
-
background-color: var(--qti-light-bg-active);
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
|
|
2183
|
-
&.qti-selections-dark {
|
|
2184
|
-
&:state(--dragzone-active)::part(drags) {
|
|
2185
|
-
background-color: var(--qti-dark-bg-active);
|
|
2186
|
-
border-color: var(--qti-dark-border-active);
|
|
2187
|
-
}
|
|
2188
|
-
|
|
2189
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
2190
|
-
background-color: var(--qti-dark-bg-active);
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
|
|
2194
|
-
/* General styles for active and enabled states */
|
|
2195
|
-
&:state(--dragzone-active)::part(drags) {
|
|
2196
|
-
border-color: var(--qti-border-active);
|
|
2197
|
-
background-color: var(--qti-bg-active);
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
2201
|
-
background-color: var(--qti-bg-active);
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
& qti-gap-img,
|
|
2205
|
-
qti-gap-text {
|
|
2206
|
-
display: flex;
|
|
2207
|
-
justify-content: center;
|
|
2208
|
-
align-items: center;
|
|
2209
|
-
cursor: grab;
|
|
2210
|
-
}
|
|
2211
|
-
|
|
2212
|
-
& qti-associable-hotspot {
|
|
2213
|
-
display: flex;
|
|
2214
|
-
justify-content: center;
|
|
2215
|
-
align-items: center;
|
|
2216
|
-
border: 2px solid transparent;
|
|
2217
|
-
|
|
2218
|
-
&[enabled] {
|
|
2219
|
-
|
|
2220
|
-
/* Light theme override */
|
|
2221
|
-
.qti-selections-light {
|
|
2222
|
-
background-color: var(--qti-light-bg-active);
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
/* Dark theme override */
|
|
2226
|
-
.qti-selections-dark {
|
|
2227
|
-
background-color: var(--qti-dark-bg-active);
|
|
2228
|
-
}
|
|
2229
|
-
background-color: var(--qti-bg-active)
|
|
2230
|
-
}
|
|
2231
|
-
|
|
2232
|
-
&[active] {
|
|
2233
|
-
|
|
2234
|
-
/* Light theme override */
|
|
2235
|
-
.qti-selections-light {
|
|
2236
|
-
background-color: var(--qti-light-bg-active);
|
|
2237
|
-
border-color: var(--qti-light-border-active);
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
/* Dark theme override */
|
|
2241
|
-
.qti-selections-dark {
|
|
2242
|
-
background-color: var(--qti-dark-bg-active);
|
|
2243
|
-
border-color: var(--qti-dark-border-active);
|
|
2244
|
-
}
|
|
2245
|
-
border-color: var(--qti-border-active);
|
|
2246
|
-
background-color: var(--qti-bg-active)
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
&[disabled] {
|
|
2250
|
-
|
|
2251
|
-
&:not(:empty) {
|
|
2252
|
-
cursor: default !important;
|
|
2253
|
-
}
|
|
2254
|
-
|
|
2255
|
-
cursor: not-allowed;
|
|
2256
|
-
|
|
2257
|
-
background-color: var(--qti-disabled-bg);
|
|
2258
|
-
|
|
2259
|
-
color: var(--qti-disabled-color);
|
|
2260
|
-
|
|
2261
|
-
border-color: var(--qti-border-color);
|
|
2262
|
-
|
|
2263
|
-
outline: 4px solid var(--qti-disabled-bg)
|
|
2264
|
-
}
|
|
2265
|
-
|
|
2266
|
-
&:empty::after {
|
|
2267
|
-
padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
|
|
2268
|
-
content: '\\0000a0'; /* when empty, put a space in it */
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
&:not(:empty) {
|
|
2272
|
-
padding: 0;
|
|
2273
|
-
width: auto;
|
|
2274
|
-
}
|
|
2275
|
-
|
|
2276
|
-
&:not(:empty) > * {
|
|
2277
|
-
flex: 1;
|
|
2278
|
-
transform: rotate(0); /* rotate-0 */
|
|
2279
|
-
box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
& img {
|
|
2284
|
-
margin: 0;
|
|
2285
|
-
padding: 0;
|
|
2286
|
-
}
|
|
2287
|
-
}
|
|
2288
|
-
|
|
2289
|
-
qti-text-entry-interaction {
|
|
2290
|
-
&::part(input) {
|
|
2291
|
-
border-radius: 0;
|
|
2292
|
-
cursor: text;
|
|
2293
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2294
|
-
background: unset;
|
|
2295
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2296
|
-
outline: none;
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
&:hover {
|
|
2300
|
-
background-color: var(--qti-hover-bg);
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
&:focus-within {
|
|
2304
|
-
&::part(input) {
|
|
2305
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2306
|
-
border-color: var(--qti-border-active);
|
|
2307
|
-
}
|
|
2308
|
-
}
|
|
2309
|
-
}
|
|
2310
|
-
|
|
2311
|
-
qti-extended-text-interaction {
|
|
2312
|
-
&::part(textarea) {
|
|
2313
|
-
border-radius: 0;
|
|
2314
|
-
cursor: text;
|
|
2315
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2316
|
-
background: unset;
|
|
2317
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2318
|
-
outline: none;
|
|
2319
|
-
}
|
|
2320
|
-
|
|
2321
|
-
&:hover {
|
|
2322
|
-
background-color: var(--qti-hover-bg);
|
|
2323
|
-
}
|
|
2324
|
-
|
|
2325
|
-
&:focus-within {
|
|
2326
|
-
&::part(textarea) {
|
|
2327
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2328
|
-
border-color: var(--qti-border-active);
|
|
2329
|
-
}
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
|
|
2333
|
-
qti-gap-match-interaction {
|
|
2334
|
-
&.qti-selections-light {
|
|
2335
|
-
&:state(--dragzone-active)::part(drags) {
|
|
2336
|
-
background-color: var(--qti-light-bg-active);
|
|
2337
|
-
border-color: var(--qti-light-border-active);
|
|
2338
|
-
}
|
|
2339
|
-
|
|
2340
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
2341
|
-
background-color: var(--qti-light-bg-active);
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
|
|
2345
|
-
&.qti-selections-dark {
|
|
2346
|
-
&:state(--dragzone-active)::part(drags) {
|
|
2347
|
-
background-color: var(--qti-dark-bg-active);
|
|
2348
|
-
border-color: var(--qti-dark-border-active);
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
2352
|
-
background-color: var(--qti-dark-bg-active);
|
|
2353
|
-
}
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
/* General styles for active and enabled states */
|
|
2357
|
-
&:state(--dragzone-active)::part(drags) {
|
|
2358
|
-
border-color: var(--qti-border-active);
|
|
2359
|
-
background-color: var(--qti-bg-active);
|
|
2360
|
-
}
|
|
2361
|
-
|
|
2362
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
2363
|
-
background-color: var(--qti-bg-active);
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
& qti-gap-text {
|
|
2367
|
-
|
|
2368
|
-
&[dragging] {
|
|
2369
|
-
pointer-events: none;
|
|
2370
|
-
rotate: -2deg;
|
|
2371
|
-
box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
|
|
2372
|
-
0 4px 8px rgb(0 0 0 / 10%);
|
|
2373
|
-
}
|
|
2374
|
-
|
|
2375
|
-
&:hover {
|
|
2376
|
-
background-color: var(--qti-hover-bg);
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
&:focus {
|
|
2380
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
transition: transform 200ms ease-out,
|
|
2384
|
-
box-shadow 200ms ease-out,
|
|
2385
|
-
rotate 200ms ease-out;
|
|
2386
|
-
|
|
2387
|
-
cursor: grab;
|
|
2388
|
-
|
|
2389
|
-
background-color: var(--qti-bg);
|
|
2390
|
-
|
|
2391
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2392
|
-
|
|
2393
|
-
border-radius: var(--qti-border-radius);
|
|
2394
|
-
|
|
2395
|
-
padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
|
|
2396
|
-
|
|
2397
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2398
|
-
|
|
2399
|
-
outline: none;
|
|
2400
|
-
|
|
2401
|
-
background-image: radial-gradient(
|
|
2402
|
-
circle at center,
|
|
2403
|
-
rgb(0 0 0 / 10%) 0,
|
|
2404
|
-
rgb(0 0 0 / 20%) 2px,
|
|
2405
|
-
rgb(255 255 255 / 0%) 2px,
|
|
2406
|
-
rgb(255 255 255 / 0%) 100%
|
|
2407
|
-
);
|
|
2408
|
-
|
|
2409
|
-
background-repeat: repeat-y;
|
|
2410
|
-
|
|
2411
|
-
background-position: left center;
|
|
2412
|
-
|
|
2413
|
-
background-size: 14px 8px
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
& qti-gap {
|
|
2417
|
-
|
|
2418
|
-
&[disabled] {
|
|
2419
|
-
|
|
2420
|
-
&:not(:empty) {
|
|
2421
|
-
cursor: default !important;
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
cursor: not-allowed;
|
|
2425
|
-
|
|
2426
|
-
background-color: var(--qti-disabled-bg);
|
|
2427
|
-
|
|
2428
|
-
color: var(--qti-disabled-color);
|
|
2429
|
-
|
|
2430
|
-
border-color: var(--qti-border-color);
|
|
2431
|
-
|
|
2432
|
-
outline: 4px solid var(--qti-disabled-bg)
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
&[enabled] {
|
|
2436
|
-
|
|
2437
|
-
/* Light theme override */
|
|
2438
|
-
.qti-selections-light {
|
|
2439
|
-
border-color: var(--qti-light-border-active);
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
/* Dark theme override */
|
|
2443
|
-
.qti-selections-dark {
|
|
2444
|
-
border-color: var(--qti-dark-border-active);
|
|
2445
|
-
}
|
|
2446
|
-
background-color: var(--qti-bg-active)
|
|
2447
|
-
}
|
|
2448
|
-
|
|
2449
|
-
&[active] {
|
|
2450
|
-
|
|
2451
|
-
/* Light theme override */
|
|
2452
|
-
.qti-selections-light {
|
|
2453
|
-
background-color: var(--qti-light-bg-active);
|
|
2454
|
-
border-color: var(--qti-light-border-active);
|
|
2455
|
-
}
|
|
2456
|
-
|
|
2457
|
-
/* Dark theme override */
|
|
2458
|
-
.qti-selections-dark {
|
|
2459
|
-
background-color: var(--qti-dark-bg-active);
|
|
2460
|
-
border-color: var(--qti-dark-border-active);
|
|
2461
|
-
}
|
|
2462
|
-
border-color: var(--qti-border-active);
|
|
2463
|
-
background-color: var(--qti-bg-active)
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
display: inline-flex;
|
|
2467
|
-
align-items: center;
|
|
2468
|
-
|
|
2469
|
-
&:empty::after {
|
|
2470
|
-
padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
|
|
2471
|
-
content: '\\0000a0'; /* when empty, put a space in it */
|
|
2472
|
-
}
|
|
2473
|
-
|
|
2474
|
-
&:not(:empty) {
|
|
2475
|
-
display: inline-flex;
|
|
2476
|
-
padding: 0;
|
|
2477
|
-
width: auto;
|
|
2478
|
-
}
|
|
2479
|
-
|
|
2480
|
-
&:not(:empty) > * {
|
|
2481
|
-
flex: 1;
|
|
2482
|
-
transform: rotate(0); /* rotate-0 */
|
|
2483
|
-
box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
|
|
2484
|
-
}
|
|
2485
|
-
|
|
2486
|
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
|
|
2487
|
-
center no-repeat;
|
|
2488
|
-
|
|
2489
|
-
border-radius: var(--qti-border-radius);
|
|
2490
|
-
|
|
2491
|
-
position: relative;
|
|
2492
|
-
|
|
2493
|
-
background-color: var(--qti-bg);
|
|
2494
|
-
|
|
2495
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2496
|
-
|
|
2497
|
-
outline: none
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
|
-
qti-hotspot-interaction {
|
|
2502
|
-
& qti-hotspot-choice {
|
|
2503
|
-
&[shape='circle'] {
|
|
2504
|
-
|
|
2505
|
-
&:hover {
|
|
2506
|
-
background-color: var(--qti-hover-bg);
|
|
2507
|
-
}
|
|
2508
|
-
|
|
2509
|
-
&:focus {
|
|
2510
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2511
|
-
}
|
|
2512
|
-
|
|
2513
|
-
&:state(--checked),
|
|
2514
|
-
&[aria-checked='true'] {
|
|
2515
|
-
border-color: var(--qti-border-active);
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
&:state(--readonly),
|
|
2519
|
-
&[aria-readonly='true'] {
|
|
2520
|
-
cursor: pointer;
|
|
2521
|
-
background-color: var(--qti-bg);
|
|
2522
|
-
outline: 0;
|
|
2523
|
-
border: none;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
&:state(--disabled),
|
|
2527
|
-
&[aria-disabled='true'] {
|
|
2528
|
-
cursor: not-allowed;
|
|
2529
|
-
background-color: var(--qti-disabled-bg);
|
|
2530
|
-
color: var(--qti-disabled-color);
|
|
2531
|
-
border-color: var(--qti-border-color);
|
|
2532
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
width: 100%;
|
|
2536
|
-
|
|
2537
|
-
height: 100%;
|
|
2538
|
-
|
|
2539
|
-
background-color: transparent;
|
|
2540
|
-
|
|
2541
|
-
padding: 0;
|
|
2542
|
-
|
|
2543
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2544
|
-
|
|
2545
|
-
outline: none
|
|
2546
|
-
}
|
|
2547
|
-
|
|
2548
|
-
&[shape='rect'] {
|
|
2549
|
-
|
|
2550
|
-
/* &:hover {
|
|
2551
|
-
@apply hov;
|
|
2552
|
-
} */
|
|
2553
|
-
|
|
2554
|
-
&:focus {
|
|
2555
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2556
|
-
}
|
|
2557
|
-
|
|
2558
|
-
&:state(--checked),
|
|
2559
|
-
&[aria-checked='true'] {
|
|
2560
|
-
border-color: var(--qti-border-active);
|
|
2561
|
-
}
|
|
2562
|
-
|
|
2563
|
-
&[aria-readonly='true'] {
|
|
2564
|
-
cursor: pointer;
|
|
2565
|
-
background-color: var(--qti-bg);
|
|
2566
|
-
outline: 0;
|
|
2567
|
-
border: none;
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
|
-
&[aria-disabled='true'] {
|
|
2571
|
-
cursor: not-allowed;
|
|
2572
|
-
background-color: var(--qti-disabled-bg);
|
|
2573
|
-
color: var(--qti-disabled-color);
|
|
2574
|
-
border-color: var(--qti-border-color);
|
|
2575
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
|
-
width: 100%;
|
|
2579
|
-
|
|
2580
|
-
height: 100%;
|
|
2581
|
-
|
|
2582
|
-
background-color: transparent;
|
|
2583
|
-
|
|
2584
|
-
padding: 0;
|
|
2585
|
-
|
|
2586
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2587
|
-
|
|
2588
|
-
outline: none
|
|
2589
|
-
}
|
|
2590
|
-
|
|
2591
|
-
&[shape='poly'] {
|
|
2592
|
-
&:hover::after {
|
|
2593
|
-
content: '';
|
|
2594
|
-
width: 100%;
|
|
2595
|
-
height: 100%;
|
|
2596
|
-
background: repeating-linear-gradient(
|
|
2597
|
-
45deg,
|
|
2598
|
-
var(--qti-border-active),
|
|
2599
|
-
var(--qti-border-active) 5px,
|
|
2600
|
-
transparent 5px,
|
|
2601
|
-
transparent 10px
|
|
2602
|
-
);
|
|
2603
|
-
display: block;
|
|
2604
|
-
}
|
|
2605
|
-
|
|
2606
|
-
&:state(--checked)::after,
|
|
2607
|
-
&[aria-checked='true']::after {
|
|
2608
|
-
content: '';
|
|
2609
|
-
width: 100%;
|
|
2610
|
-
height: 100%;
|
|
2611
|
-
background: repeating-linear-gradient(
|
|
2612
|
-
45deg,
|
|
2613
|
-
transparent,
|
|
2614
|
-
transparent 5px,
|
|
2615
|
-
var(--qti-border-active) 5px,
|
|
2616
|
-
var(--qti-border-active) 10px
|
|
2617
|
-
);
|
|
2618
|
-
display: block;
|
|
2619
|
-
}
|
|
2620
|
-
|
|
2621
|
-
&[aria-readonly='true'] {
|
|
2622
|
-
cursor: pointer;
|
|
2623
|
-
background-color: var(--qti-bg);
|
|
2624
|
-
outline: 0;
|
|
2625
|
-
border: none;
|
|
2626
|
-
}
|
|
2627
|
-
|
|
2628
|
-
&[aria-disabled='true'] {
|
|
2629
|
-
cursor: not-allowed;
|
|
2630
|
-
background-color: var(--qti-disabled-bg);
|
|
2631
|
-
color: var(--qti-disabled-color);
|
|
2632
|
-
border-color: var(--qti-border-color);
|
|
2633
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2634
|
-
}
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
|
|
2639
|
-
qti-hottext-interaction {
|
|
2640
|
-
/* &:not(.qti-input-control-hidden),
|
|
2641
|
-
&:not(.qti-unselected-hidden) { */
|
|
2642
|
-
qti-hottext {
|
|
2643
|
-
display: inline-flex;
|
|
2644
|
-
align-items: center;
|
|
2645
|
-
|
|
2646
|
-
&:hover {
|
|
2647
|
-
background-color: var(--qti-hover-bg);
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
&:focus {
|
|
2651
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
&::part(cha) {
|
|
2655
|
-
width: calc(var(--qti-form-size) - 6px);
|
|
2656
|
-
height: calc(var(--qti-form-size) - 6px);
|
|
2657
|
-
}
|
|
2658
|
-
|
|
2659
|
-
&:state(radio)::part(ch) {
|
|
2660
|
-
border-radius: 100%;
|
|
2661
|
-
display: grid;
|
|
2662
|
-
place-content: center;
|
|
2663
|
-
width: var(--qti-form-size);
|
|
2664
|
-
height: var(--qti-form-size);
|
|
2665
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2666
|
-
outline: none;
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
|
-
&:state(radio):state(--checked)::part(cha) {
|
|
2670
|
-
background-color: var(--qti-border-active);
|
|
2671
|
-
border-radius: 100%;
|
|
2672
|
-
}
|
|
2673
|
-
|
|
2674
|
-
&:state(checkbox)::part(ch) {
|
|
2675
|
-
display: flex;
|
|
2676
|
-
place-items: center;
|
|
2677
|
-
border-radius: var(--qti-border-radius);
|
|
2678
|
-
display: grid;
|
|
2679
|
-
place-content: center;
|
|
2680
|
-
width: var(--qti-form-size);
|
|
2681
|
-
height: var(--qti-form-size);
|
|
2682
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2683
|
-
outline: none;
|
|
2684
|
-
}
|
|
2685
|
-
|
|
2686
|
-
&:state(checkbox):state(--checked)::part(cha) {
|
|
2687
|
-
background-color: var(--qti-border-active);
|
|
2688
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
2689
|
-
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
2690
|
-
}
|
|
2691
|
-
|
|
2692
|
-
gap: 0.5rem;
|
|
2693
|
-
|
|
2694
|
-
border-radius: var(--qti-border-radius);
|
|
2695
|
-
|
|
2696
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2697
|
-
|
|
2698
|
-
outline: none;
|
|
2699
|
-
|
|
2700
|
-
cursor: pointer
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
/* } */
|
|
2704
|
-
|
|
2705
|
-
&.qti-input-control-hidden {
|
|
2706
|
-
qti-hottext {
|
|
2707
|
-
/* --qti-padding-md: 0.1rem;
|
|
2708
|
-
--qti-padding-lg: 0.2rem;
|
|
2709
|
-
--qti-border-radius-md: 0.3rem;
|
|
2710
|
-
--qti-border-thickness: 1px;
|
|
2711
|
-
--qti-font-weight-semibold: 400; */
|
|
2712
|
-
|
|
2713
|
-
&:hover {
|
|
2714
|
-
background-color: var(--qti-hover-bg);
|
|
2715
|
-
}
|
|
2716
|
-
|
|
2717
|
-
&:focus {
|
|
2718
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2719
|
-
}
|
|
2720
|
-
|
|
2721
|
-
/* @layer qti-variants { */
|
|
2722
|
-
&::part(ch) {
|
|
2723
|
-
display: none;
|
|
2724
|
-
}
|
|
2725
|
-
|
|
2726
|
-
&:state(--checked) {
|
|
2727
|
-
border-color: var(--qti-border-active);
|
|
2728
|
-
background-color: var(--qti-bg-active);
|
|
2729
|
-
}
|
|
2730
|
-
|
|
2731
|
-
&[aria-readonly='true'] {
|
|
2732
|
-
cursor: pointer;
|
|
2733
|
-
background-color: var(--qti-bg);
|
|
2734
|
-
outline: 0;
|
|
2735
|
-
border: none;
|
|
2736
|
-
}
|
|
2737
|
-
|
|
2738
|
-
&[aria-disabled='true'] {
|
|
2739
|
-
cursor: not-allowed;
|
|
2740
|
-
background-color: var(--qti-disabled-bg);
|
|
2741
|
-
color: var(--qti-disabled-color);
|
|
2742
|
-
border-color: var(--qti-border-color);
|
|
2743
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2744
|
-
}
|
|
2745
|
-
|
|
2746
|
-
border-radius: var(--qti-border-radius);
|
|
2747
|
-
|
|
2748
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2749
|
-
|
|
2750
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2751
|
-
|
|
2752
|
-
outline: none
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
/* } */
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
&.qti-unselected-hidden {
|
|
2759
|
-
qti-hottext {
|
|
2760
|
-
&:hover {
|
|
2761
|
-
background-color: var(--qti-hover-bg);
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
&:focus {
|
|
2765
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2766
|
-
}
|
|
2767
|
-
|
|
2768
|
-
cursor: pointer;
|
|
2769
|
-
|
|
2770
|
-
&::part(ch) {
|
|
2771
|
-
display: none;
|
|
2772
|
-
}
|
|
2773
|
-
|
|
2774
|
-
&:state(--checked) {
|
|
2775
|
-
background-color: var(--qti-bg-active);
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
&[aria-readonly='true'] {
|
|
2779
|
-
cursor: pointer;
|
|
2780
|
-
background-color: var(--qti-bg);
|
|
2781
|
-
outline: 0;
|
|
2782
|
-
border: none;
|
|
2783
|
-
}
|
|
2784
|
-
|
|
2785
|
-
&[aria-disabled='true'] {
|
|
2786
|
-
cursor: not-allowed;
|
|
2787
|
-
background-color: var(--qti-disabled-bg);
|
|
2788
|
-
color: var(--qti-disabled-color);
|
|
2789
|
-
border-color: var(--qti-border-color);
|
|
2790
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2791
|
-
}
|
|
2792
|
-
}
|
|
2793
|
-
}
|
|
2794
|
-
}
|
|
2795
|
-
|
|
2796
|
-
qti-inline-choice-interaction {
|
|
2797
|
-
&::part(select) {
|
|
2798
|
-
|
|
2799
|
-
&:hover {
|
|
2800
|
-
background-color: var(--qti-hover-bg);
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
|
-
&:focus {
|
|
2804
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
border-radius: var(--qti-border-radius);
|
|
2808
|
-
|
|
2809
|
-
position: relative;
|
|
2810
|
-
|
|
2811
|
-
-webkit-appearance: none;
|
|
2812
|
-
|
|
2813
|
-
-moz-appearance: none;
|
|
2814
|
-
|
|
2815
|
-
appearance: none;
|
|
2816
|
-
|
|
2817
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2818
|
-
|
|
2819
|
-
padding-right: calc(var(--qti-padding-horizontal) + 1.5rem);
|
|
2820
|
-
|
|
2821
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2822
|
-
|
|
2823
|
-
outline: none;
|
|
2824
|
-
|
|
2825
|
-
background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
|
|
2826
|
-
no-repeat center right 6px
|
|
2827
|
-
}
|
|
2828
|
-
}
|
|
2829
|
-
|
|
2830
|
-
qti-match-interaction:not(.qti-match-tabular) {
|
|
2831
|
-
&:state(--dragzone-enabled) qti-simple-match-set:first-of-type {
|
|
2832
|
-
background-color: var(--qti-bg-active);
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
&:state(--dragzone-active) qti-simple-match-set:first-of-type {
|
|
2836
|
-
border-color: var(--qti-border-active);
|
|
2837
|
-
background-color: var(--qti-bg-active);
|
|
2838
|
-
}
|
|
2839
|
-
|
|
2840
|
-
/* The draggables */
|
|
2841
|
-
& qti-simple-match-set:first-of-type {
|
|
2842
|
-
display: flex;
|
|
2843
|
-
flex-wrap: wrap;
|
|
2844
|
-
align-items: flex-start; /* Prevents children from stretching */
|
|
2845
|
-
gap: var(--qti-gap-size);
|
|
2846
|
-
border: 2px solid transparent;
|
|
2847
|
-
|
|
2848
|
-
& qti-simple-associable-choice {
|
|
2849
|
-
|
|
2850
|
-
&[dragging] {
|
|
2851
|
-
pointer-events: none;
|
|
2852
|
-
rotate: -2deg;
|
|
2853
|
-
box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
|
|
2854
|
-
0 4px 8px rgb(0 0 0 / 10%);
|
|
2855
|
-
}
|
|
2856
|
-
|
|
2857
|
-
&:hover {
|
|
2858
|
-
background-color: var(--qti-hover-bg);
|
|
2859
|
-
}
|
|
2860
|
-
|
|
2861
|
-
&:focus {
|
|
2862
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2863
|
-
}
|
|
2864
|
-
|
|
2865
|
-
transition: transform 200ms ease-out,
|
|
2866
|
-
box-shadow 200ms ease-out,
|
|
2867
|
-
rotate 200ms ease-out;
|
|
2868
|
-
|
|
2869
|
-
cursor: grab;
|
|
2870
|
-
|
|
2871
|
-
background-color: var(--qti-bg);
|
|
2872
|
-
|
|
2873
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
2874
|
-
|
|
2875
|
-
border-radius: var(--qti-border-radius);
|
|
2876
|
-
|
|
2877
|
-
padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
|
|
2878
|
-
|
|
2879
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2880
|
-
|
|
2881
|
-
outline: none;
|
|
2882
|
-
|
|
2883
|
-
background-image: radial-gradient(
|
|
2884
|
-
circle at center,
|
|
2885
|
-
rgb(0 0 0 / 10%) 0,
|
|
2886
|
-
rgb(0 0 0 / 20%) 2px,
|
|
2887
|
-
rgb(255 255 255 / 0%) 2px,
|
|
2888
|
-
rgb(255 255 255 / 0%) 100%
|
|
2889
|
-
);
|
|
2890
|
-
|
|
2891
|
-
background-repeat: repeat-y;
|
|
2892
|
-
|
|
2893
|
-
background-position: left center;
|
|
2894
|
-
|
|
2895
|
-
background-size: 14px 8px
|
|
2896
|
-
}
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
/* The droppables */
|
|
2900
|
-
& qti-simple-match-set:last-of-type {
|
|
2901
|
-
display: grid;
|
|
2902
|
-
grid-auto-columns: 1fr; /* auto-cols-fr */
|
|
2903
|
-
grid-auto-flow: column; /* grid-flow-col */
|
|
2904
|
-
gap: var(--qti-gap-size); /* gap-2 */
|
|
2905
|
-
width: 100%; /* w-full */
|
|
2906
|
-
|
|
2907
|
-
& qti-simple-associable-choice {
|
|
2908
|
-
display: flex;
|
|
2909
|
-
flex-direction: column;
|
|
2910
|
-
}
|
|
2911
|
-
|
|
2912
|
-
& > qti-simple-associable-choice {
|
|
2913
|
-
/* a droppable qti-simple-associable-choice */
|
|
2914
|
-
box-sizing: border-box;
|
|
2915
|
-
display: grid;
|
|
2916
|
-
grid-row: 2 / 4;
|
|
2917
|
-
grid-template-rows: subgrid;
|
|
2918
|
-
|
|
2919
|
-
& img {
|
|
2920
|
-
max-width: 100%;
|
|
2921
|
-
height: auto;
|
|
2922
|
-
}
|
|
2923
|
-
|
|
2924
|
-
&[enabled] {
|
|
2925
|
-
&::part(dropslot) {
|
|
2926
|
-
background-color: var(--qti-bg-active);
|
|
2927
|
-
}
|
|
2928
|
-
}
|
|
2929
|
-
|
|
2930
|
-
&[disabled] {
|
|
2931
|
-
&::part(dropslot) {
|
|
2932
|
-
cursor: not-allowed;
|
|
2933
|
-
background-color: var(--qti-disabled-bg);
|
|
2934
|
-
color: var(--qti-disabled-color);
|
|
2935
|
-
border-color: var(--qti-border-color);
|
|
2936
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
2937
|
-
}
|
|
2938
|
-
}
|
|
2939
|
-
|
|
2940
|
-
&[active] {
|
|
2941
|
-
&::part(dropslot) {
|
|
2942
|
-
border-color: var(--qti-border-active);
|
|
2943
|
-
background-color: var(--qti-bg-active);
|
|
2944
|
-
}
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
&::part(dropslot) {
|
|
2948
|
-
|
|
2949
|
-
&[dragging] {
|
|
2950
|
-
pointer-events: none;
|
|
2951
|
-
rotate: -2deg;
|
|
2952
|
-
box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
|
|
2953
|
-
0 4px 8px rgb(0 0 0 / 10%);
|
|
2954
|
-
}
|
|
2955
|
-
|
|
2956
|
-
&:focus {
|
|
2957
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2958
|
-
}
|
|
2959
|
-
|
|
2960
|
-
min-height: 6rem;
|
|
2961
|
-
gap: var(--qti-gap-size);
|
|
2962
|
-
box-sizing: border-box;
|
|
2963
|
-
display: flex;
|
|
2964
|
-
justify-content: center;
|
|
2965
|
-
align-items: center;
|
|
2966
|
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
|
|
2967
|
-
center no-repeat;
|
|
2968
|
-
border-radius: var(--qti-border-radius);
|
|
2969
|
-
position: relative;
|
|
2970
|
-
background-color: var(--qti-bg);
|
|
2971
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
2972
|
-
outline: none;
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
& > *:not(qti-simple-associable-choice) {
|
|
2976
|
-
pointer-events: none;
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
|
-
& > qti-simple-associable-choice {
|
|
2980
|
-
|
|
2981
|
-
&::part(dropslot) {
|
|
2982
|
-
display: none;
|
|
2983
|
-
}
|
|
2984
|
-
|
|
2985
|
-
&:hover {
|
|
2986
|
-
background-color: var(--qti-hover-bg);
|
|
2987
|
-
}
|
|
2988
|
-
|
|
2989
|
-
&:focus {
|
|
2990
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
2991
|
-
}
|
|
2992
|
-
|
|
2993
|
-
flex-basis: fit-content;
|
|
2994
|
-
|
|
2995
|
-
transition: transform 200ms ease-out,
|
|
2996
|
-
box-shadow 200ms ease-out,
|
|
2997
|
-
rotate 200ms ease-out;
|
|
2998
|
-
|
|
2999
|
-
cursor: grab;
|
|
3000
|
-
|
|
3001
|
-
background-color: var(--qti-bg);
|
|
3002
|
-
|
|
3003
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
3004
|
-
|
|
3005
|
-
border-radius: var(--qti-border-radius);
|
|
3006
|
-
|
|
3007
|
-
padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
|
|
3008
|
-
|
|
3009
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3010
|
-
|
|
3011
|
-
outline: none;
|
|
3012
|
-
|
|
3013
|
-
background-image: radial-gradient(
|
|
3014
|
-
circle at center,
|
|
3015
|
-
rgb(0 0 0 / 10%) 0,
|
|
3016
|
-
rgb(0 0 0 / 20%) 2px,
|
|
3017
|
-
rgb(255 255 255 / 0%) 2px,
|
|
3018
|
-
rgb(255 255 255 / 0%) 100%
|
|
3019
|
-
);
|
|
3020
|
-
|
|
3021
|
-
background-repeat: repeat-y;
|
|
3022
|
-
|
|
3023
|
-
background-position: left center;
|
|
3024
|
-
|
|
3025
|
-
background-size: 14px 8px;
|
|
3026
|
-
}
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3030
|
-
|
|
3031
|
-
qti-order-interaction:state(--dragzone-active)::part(drags) {
|
|
3032
|
-
border-color: var(--qti-border-active);
|
|
3033
|
-
background-color: var(--qti-bg-active);
|
|
3034
|
-
}
|
|
3035
|
-
|
|
3036
|
-
qti-order-interaction:state(--dragzone-enabled)::part(drags) {
|
|
3037
|
-
background-color: var(--qti-bg-active);
|
|
3038
|
-
}
|
|
3039
|
-
|
|
3040
|
-
qti-order-interaction {
|
|
3041
|
-
&::part(qti-simple-choice),
|
|
3042
|
-
& qti-simple-choice {
|
|
3043
|
-
|
|
3044
|
-
&[dragging] {
|
|
3045
|
-
pointer-events: none;
|
|
3046
|
-
rotate: -2deg;
|
|
3047
|
-
box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
|
|
3048
|
-
0 4px 8px rgb(0 0 0 / 10%);
|
|
3049
|
-
}
|
|
3050
|
-
|
|
3051
|
-
&:hover {
|
|
3052
|
-
background-color: var(--qti-hover-bg);
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
&:focus {
|
|
3056
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
|
-
transition: transform 200ms ease-out,
|
|
3060
|
-
box-shadow 200ms ease-out,
|
|
3061
|
-
rotate 200ms ease-out;
|
|
3062
|
-
|
|
3063
|
-
cursor: grab;
|
|
3064
|
-
|
|
3065
|
-
background-color: var(--qti-bg);
|
|
3066
|
-
|
|
3067
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
3068
|
-
|
|
3069
|
-
border-radius: var(--qti-border-radius);
|
|
3070
|
-
|
|
3071
|
-
padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
|
|
3072
|
-
|
|
3073
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3074
|
-
|
|
3075
|
-
outline: none;
|
|
3076
|
-
|
|
3077
|
-
background-image: radial-gradient(
|
|
3078
|
-
circle at center,
|
|
3079
|
-
rgb(0 0 0 / 10%) 0,
|
|
3080
|
-
rgb(0 0 0 / 20%) 2px,
|
|
3081
|
-
rgb(255 255 255 / 0%) 2px,
|
|
3082
|
-
rgb(255 255 255 / 0%) 100%
|
|
3083
|
-
);
|
|
3084
|
-
|
|
3085
|
-
background-repeat: repeat-y;
|
|
3086
|
-
|
|
3087
|
-
background-position: left center;
|
|
3088
|
-
|
|
3089
|
-
background-size: 14px 8px
|
|
3090
|
-
}
|
|
3091
|
-
|
|
3092
|
-
&::part(qti-simple-choice) {
|
|
3093
|
-
display: flex;
|
|
3094
|
-
overflow: hidden;
|
|
3095
|
-
align-items: center;
|
|
3096
|
-
width: 100%;
|
|
3097
|
-
text-overflow: ellipsis;
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
&::part(drops) {
|
|
3101
|
-
gap: 0.5rem; /* gap-2 */
|
|
3102
|
-
}
|
|
3103
|
-
|
|
3104
|
-
&::part(drags) {
|
|
3105
|
-
gap: 0.5rem; /* gap-2 */
|
|
3106
|
-
}
|
|
3107
|
-
|
|
3108
|
-
&::part(drop-list) {
|
|
3109
|
-
|
|
3110
|
-
&[enabled] {
|
|
3111
|
-
|
|
3112
|
-
/* Light theme override */
|
|
3113
|
-
.qti-selections-light {
|
|
3114
|
-
border-color: var(--qti-light-border-active);
|
|
3115
|
-
}
|
|
3116
|
-
|
|
3117
|
-
/* Dark theme override */
|
|
3118
|
-
.qti-selections-dark {
|
|
3119
|
-
border-color: var(--qti-dark-border-active);
|
|
3120
|
-
}
|
|
3121
|
-
background-color: var(--qti-bg-active)
|
|
3122
|
-
}
|
|
3123
|
-
|
|
3124
|
-
&:hover {
|
|
3125
|
-
background-color: var(--qti-hover-bg);
|
|
3126
|
-
}
|
|
3127
|
-
|
|
3128
|
-
&:focus {
|
|
3129
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3130
|
-
}
|
|
3131
|
-
|
|
3132
|
-
display: flex;
|
|
3133
|
-
min-height: 4rem;
|
|
3134
|
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
|
|
3135
|
-
center no-repeat;
|
|
3136
|
-
border-radius: var(--qti-border-radius);
|
|
3137
|
-
position: relative;
|
|
3138
|
-
background-color: var(--qti-bg);
|
|
3139
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3140
|
-
outline: none;
|
|
3141
|
-
}
|
|
3142
|
-
|
|
3143
|
-
&::part(active) {
|
|
3144
|
-
border-color: var(--qti-border-active);
|
|
3145
|
-
background-color: var(--qti-bg-active);
|
|
3146
|
-
}
|
|
3147
|
-
|
|
3148
|
-
& drop-list {
|
|
3149
|
-
&[shape='circle'] {
|
|
3150
|
-
|
|
3151
|
-
&:hover {
|
|
3152
|
-
background-color: var(--qti-hover-bg);
|
|
3153
|
-
}
|
|
3154
|
-
|
|
3155
|
-
&:focus {
|
|
3156
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3157
|
-
}
|
|
3158
|
-
|
|
3159
|
-
&[aria-checked='true'] {
|
|
3160
|
-
border-color: var(--qti-border-active);
|
|
3161
|
-
background-color: var(--qti-bg-active);
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3164
|
-
&[aria-readonly='true'] {
|
|
3165
|
-
cursor: pointer;
|
|
3166
|
-
background-color: var(--qti-bg);
|
|
3167
|
-
outline: 0;
|
|
3168
|
-
border: none;
|
|
3169
|
-
}
|
|
3170
|
-
|
|
3171
|
-
&[aria-disabled='true'] {
|
|
3172
|
-
cursor: not-allowed;
|
|
3173
|
-
background-color: var(--qti-disabled-bg);
|
|
3174
|
-
color: var(--qti-disabled-color);
|
|
3175
|
-
border-color: var(--qti-border-color);
|
|
3176
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
3177
|
-
}
|
|
3178
|
-
|
|
3179
|
-
width: 100%;
|
|
3180
|
-
|
|
3181
|
-
height: 100%;
|
|
3182
|
-
|
|
3183
|
-
background-color: transparent;
|
|
3184
|
-
|
|
3185
|
-
padding: 0;
|
|
3186
|
-
|
|
3187
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3188
|
-
|
|
3189
|
-
outline: none
|
|
3190
|
-
}
|
|
3191
|
-
|
|
3192
|
-
&[shape='square'] {
|
|
3193
|
-
|
|
3194
|
-
&:hover {
|
|
3195
|
-
background-color: var(--qti-hover-bg);
|
|
3196
|
-
}
|
|
3197
|
-
|
|
3198
|
-
&:focus {
|
|
3199
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3200
|
-
}
|
|
3201
|
-
|
|
3202
|
-
&[aria-checked='true'] {
|
|
3203
|
-
border-color: var(--qti-border-active);
|
|
3204
|
-
background-color: var(--qti-bg-active);
|
|
3205
|
-
}
|
|
3206
|
-
|
|
3207
|
-
&[aria-readonly='true'] {
|
|
3208
|
-
cursor: pointer;
|
|
3209
|
-
background-color: var(--qti-bg);
|
|
3210
|
-
outline: 0;
|
|
3211
|
-
border: none;
|
|
3212
|
-
}
|
|
3213
|
-
|
|
3214
|
-
&[aria-disabled='true'] {
|
|
3215
|
-
cursor: not-allowed;
|
|
3216
|
-
background-color: var(--qti-disabled-bg);
|
|
3217
|
-
color: var(--qti-disabled-color);
|
|
3218
|
-
border-color: var(--qti-border-color);
|
|
3219
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
3220
|
-
}
|
|
3221
|
-
|
|
3222
|
-
width: 100%;
|
|
3223
|
-
|
|
3224
|
-
height: 100%;
|
|
3225
|
-
|
|
3226
|
-
background-color: transparent;
|
|
3227
|
-
|
|
3228
|
-
padding: 0;
|
|
3229
|
-
|
|
3230
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3231
|
-
|
|
3232
|
-
outline: none
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
|
|
3237
|
-
qti-associate-interaction {
|
|
3238
|
-
/* General styles for active and enabled states */
|
|
3239
|
-
&:state(--dragzone-active) slot[name='qti-simple-associable-choice'] {
|
|
3240
|
-
border-color: var(--qti-border-active);
|
|
3241
|
-
background-color: var(--qti-bg-active);
|
|
3242
|
-
}
|
|
3243
|
-
|
|
3244
|
-
&:state(--dragzone-enabled) slot[name='qti-simple-associable-choice'] {
|
|
3245
|
-
background-color: var(--qti-bg-active);
|
|
3246
|
-
}
|
|
3247
|
-
|
|
3248
|
-
& qti-simple-associable-choice, /* drags when in lightdom */
|
|
3249
|
-
&::part(qti-simple-associable-choice) /* drags when in shadowdom */ {
|
|
3250
|
-
|
|
3251
|
-
&:hover {
|
|
3252
|
-
background-color: var(--qti-hover-bg);
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
&:focus {
|
|
3256
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3257
|
-
}
|
|
3258
|
-
|
|
3259
|
-
&[dragging] {
|
|
3260
|
-
pointer-events: none;
|
|
3261
|
-
rotate: -2deg;
|
|
3262
|
-
box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
|
|
3263
|
-
0 4px 8px rgb(0 0 0 / 10%);
|
|
3264
|
-
}
|
|
3265
|
-
|
|
3266
|
-
transition: transform 200ms ease-out,
|
|
3267
|
-
box-shadow 200ms ease-out,
|
|
3268
|
-
rotate 200ms ease-out;
|
|
3269
|
-
|
|
3270
|
-
cursor: grab;
|
|
3271
|
-
|
|
3272
|
-
background-color: var(--qti-bg);
|
|
3273
|
-
|
|
3274
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
3275
|
-
|
|
3276
|
-
border-radius: var(--qti-border-radius);
|
|
3277
|
-
|
|
3278
|
-
padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
|
|
3279
|
-
|
|
3280
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3281
|
-
|
|
3282
|
-
outline: none;
|
|
3283
|
-
|
|
3284
|
-
background-image: radial-gradient(
|
|
3285
|
-
circle at center,
|
|
3286
|
-
rgb(0 0 0 / 10%) 0,
|
|
3287
|
-
rgb(0 0 0 / 20%) 2px,
|
|
3288
|
-
rgb(255 255 255 / 0%) 2px,
|
|
3289
|
-
rgb(255 255 255 / 0%) 100%
|
|
3290
|
-
);
|
|
3291
|
-
|
|
3292
|
-
background-repeat: repeat-y;
|
|
3293
|
-
|
|
3294
|
-
background-position: left center;
|
|
3295
|
-
|
|
3296
|
-
background-size: 14px 8px
|
|
3297
|
-
}
|
|
3298
|
-
|
|
3299
|
-
/* display: flex;
|
|
3300
|
-
overflow: hidden;
|
|
3301
|
-
align-items: center; */
|
|
3302
|
-
|
|
3303
|
-
/* &::part(drop-container) {
|
|
3304
|
-
display: flex;
|
|
3305
|
-
flex-direction: column;
|
|
3306
|
-
gap: var(--qti-gap-size);
|
|
3307
|
-
} */
|
|
3308
|
-
|
|
3309
|
-
&::part(drop-list) {
|
|
3310
|
-
|
|
3311
|
-
display: grid;
|
|
3312
|
-
height: 3rem;
|
|
3313
|
-
min-width: 10rem;
|
|
3314
|
-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
|
|
3315
|
-
center no-repeat;
|
|
3316
|
-
border-radius: var(--qti-border-radius);
|
|
3317
|
-
position: relative;
|
|
3318
|
-
background-color: var(--qti-bg);
|
|
3319
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3320
|
-
outline: none;
|
|
3321
|
-
}
|
|
3322
|
-
|
|
3323
|
-
&::part(drop-list):focus {
|
|
3324
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3325
|
-
}
|
|
3326
|
-
|
|
3327
|
-
&::part(drop-list)[dragging] {
|
|
3328
|
-
border-color: var(--qti-border-active);
|
|
3329
|
-
background-color: var(--qti-bg-active);
|
|
3330
|
-
}
|
|
3331
|
-
|
|
3332
|
-
/* &::part(drop-list) {
|
|
3333
|
-
@apply act;
|
|
3334
|
-
} */
|
|
3335
|
-
}
|
|
3336
|
-
|
|
3337
|
-
qti-graphic-order-interaction {
|
|
3338
|
-
& qti-hotspot-choice {
|
|
3339
|
-
|
|
3340
|
-
&:hover {
|
|
3341
|
-
background-color: var(--qti-hover-bg);
|
|
3342
|
-
}
|
|
3343
|
-
|
|
3344
|
-
&:focus {
|
|
3345
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
|
-
&:state(--checked),
|
|
3349
|
-
&[aria-checked='true'] {
|
|
3350
|
-
border-color: var(--qti-border-active);
|
|
3351
|
-
background-color: var(--qti-bg-active);
|
|
3352
|
-
}
|
|
3353
|
-
|
|
3354
|
-
&[aria-readonly='true'] {
|
|
3355
|
-
cursor: pointer;
|
|
3356
|
-
background-color: var(--qti-bg);
|
|
3357
|
-
outline: 0;
|
|
3358
|
-
border: none;
|
|
3359
|
-
}
|
|
3360
|
-
|
|
3361
|
-
&[aria-disabled='true'] {
|
|
3362
|
-
cursor: not-allowed;
|
|
3363
|
-
background-color: var(--qti-disabled-bg);
|
|
3364
|
-
color: var(--qti-disabled-color);
|
|
3365
|
-
border-color: var(--qti-border-color);
|
|
3366
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
3367
|
-
}
|
|
3368
|
-
|
|
3369
|
-
&[aria-ordervalue] {
|
|
3370
|
-
display: grid;
|
|
3371
|
-
place-content: center;
|
|
3372
|
-
}
|
|
3373
|
-
|
|
3374
|
-
&[aria-ordervalue]::after {
|
|
3375
|
-
content: attr(aria-ordervalue) !important;
|
|
3376
|
-
}
|
|
3377
|
-
|
|
3378
|
-
width: 100%;
|
|
3379
|
-
|
|
3380
|
-
height: 100%;
|
|
3381
|
-
|
|
3382
|
-
background-color: transparent;
|
|
3383
|
-
|
|
3384
|
-
padding: 0;
|
|
3385
|
-
|
|
3386
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3387
|
-
|
|
3388
|
-
outline: none
|
|
3389
|
-
}
|
|
3390
|
-
|
|
3391
|
-
&.qti-selections-light {
|
|
3392
|
-
&:state(--dragzone-active)::part(drags) {
|
|
3393
|
-
background-color: var(--qti-light-bg-active);
|
|
3394
|
-
border-color: var(--qti-light-border-active);
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
3398
|
-
background-color: var(--qti-light-bg-active);
|
|
3399
|
-
}
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
|
-
&.qti-selections-dark {
|
|
3403
|
-
&:state(--dragzone-active)::part(drags) {
|
|
3404
|
-
background-color: var(--qti-dark-bg-active);
|
|
3405
|
-
border-color: var(--qti-dark-border-active);
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
3409
|
-
background-color: var(--qti-dark-bg-active);
|
|
3410
|
-
}
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
/* General styles for active and enabled states */
|
|
3414
|
-
&:state(--dragzone-active)::part(drags) {
|
|
3415
|
-
border-color: var(--qti-border-active);
|
|
3416
|
-
background-color: var(--qti-bg-active);
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
3420
|
-
background-color: var(--qti-bg-active);
|
|
3421
|
-
}
|
|
3422
|
-
}
|
|
3423
|
-
|
|
3424
|
-
qti-graphic-associate-interaction {
|
|
3425
|
-
position: relative;
|
|
3426
|
-
display: block;
|
|
3427
|
-
|
|
3428
|
-
& qti-associable-hotspot {
|
|
3429
|
-
&[shape='circle'] {
|
|
3430
|
-
|
|
3431
|
-
&:hover {
|
|
3432
|
-
background-color: var(--qti-hover-bg);
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
|
-
&:focus {
|
|
3436
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
|
-
&[aria-checked='true'] {
|
|
3440
|
-
border-color: var(--qti-border-active);
|
|
3441
|
-
background-color: var(--qti-bg-active);
|
|
3442
|
-
}
|
|
3443
|
-
|
|
3444
|
-
&[aria-readonly='true'] {
|
|
3445
|
-
cursor: pointer;
|
|
3446
|
-
background-color: var(--qti-bg);
|
|
3447
|
-
outline: 0;
|
|
3448
|
-
border: none;
|
|
3449
|
-
}
|
|
3450
|
-
|
|
3451
|
-
&[aria-disabled='true'] {
|
|
3452
|
-
cursor: not-allowed;
|
|
3453
|
-
background-color: var(--qti-disabled-bg);
|
|
3454
|
-
color: var(--qti-disabled-color);
|
|
3455
|
-
border-color: var(--qti-border-color);
|
|
3456
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
3457
|
-
}
|
|
3458
|
-
|
|
3459
|
-
width: 100%;
|
|
3460
|
-
|
|
3461
|
-
height: 100%;
|
|
3462
|
-
|
|
3463
|
-
background-color: transparent;
|
|
3464
|
-
|
|
3465
|
-
padding: 0;
|
|
3466
|
-
|
|
3467
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3468
|
-
|
|
3469
|
-
outline: none
|
|
3470
|
-
}
|
|
3471
|
-
|
|
3472
|
-
&[shape='square'] {
|
|
3473
|
-
|
|
3474
|
-
&:hover {
|
|
3475
|
-
background-color: var(--qti-hover-bg);
|
|
3476
|
-
}
|
|
3477
|
-
|
|
3478
|
-
&:focus {
|
|
3479
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3480
|
-
}
|
|
3481
|
-
|
|
3482
|
-
&[aria-checked='true'] {
|
|
3483
|
-
border-color: var(--qti-border-active);
|
|
3484
|
-
background-color: var(--qti-bg-active);
|
|
3485
|
-
}
|
|
3486
|
-
|
|
3487
|
-
&[aria-readonly='true'] {
|
|
3488
|
-
cursor: pointer;
|
|
3489
|
-
background-color: var(--qti-bg);
|
|
3490
|
-
outline: 0;
|
|
3491
|
-
border: none;
|
|
3492
|
-
}
|
|
3493
|
-
|
|
3494
|
-
&[aria-disabled='true'] {
|
|
3495
|
-
cursor: not-allowed;
|
|
3496
|
-
background-color: var(--qti-disabled-bg);
|
|
3497
|
-
color: var(--qti-disabled-color);
|
|
3498
|
-
border-color: var(--qti-border-color);
|
|
3499
|
-
outline: 4px solid var(--qti-disabled-bg);
|
|
3500
|
-
}
|
|
3501
|
-
|
|
3502
|
-
width: 100%;
|
|
3503
|
-
|
|
3504
|
-
height: 100%;
|
|
3505
|
-
|
|
3506
|
-
background-color: transparent;
|
|
3507
|
-
|
|
3508
|
-
padding: 0;
|
|
3509
|
-
|
|
3510
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3511
|
-
|
|
3512
|
-
outline: none
|
|
3513
|
-
}
|
|
3514
|
-
}
|
|
3515
|
-
|
|
3516
|
-
&.qti-selections-light {
|
|
3517
|
-
&:state(--dragzone-active)::part(drags) {
|
|
3518
|
-
background-color: var(--qti-light-bg-active);
|
|
3519
|
-
border-color: var(--qti-light-border-active);
|
|
3520
|
-
}
|
|
3521
|
-
|
|
3522
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
3523
|
-
background-color: var(--qti-light-bg-active);
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
|
|
3527
|
-
&.qti-selections-dark {
|
|
3528
|
-
&:state(--dragzone-active)::part(drags) {
|
|
3529
|
-
background-color: var(--qti-dark-bg-active);
|
|
3530
|
-
border-color: var(--qti-dark-border-active);
|
|
3531
|
-
}
|
|
3532
|
-
|
|
3533
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
3534
|
-
background-color: var(--qti-dark-bg-active);
|
|
3535
|
-
}
|
|
3536
|
-
}
|
|
3537
|
-
|
|
3538
|
-
/* General styles for active and enabled states */
|
|
3539
|
-
&:state(--dragzone-active)::part(drags) {
|
|
3540
|
-
border-color: var(--qti-border-active);
|
|
3541
|
-
background-color: var(--qti-bg-active);
|
|
3542
|
-
}
|
|
3543
|
-
|
|
3544
|
-
&:state(--dragzone-enabled)::part(drags) {
|
|
3545
|
-
background-color: var(--qti-bg-active);
|
|
3546
|
-
}
|
|
3547
|
-
}
|
|
3548
|
-
|
|
3549
|
-
qti-slider-interaction {
|
|
3550
|
-
--qti-tick-color: rgb(229 231 235 / 100%);
|
|
3551
|
-
--qti-tick-width: 1px;
|
|
3552
|
-
}
|
|
3553
|
-
|
|
3554
|
-
qti-select-point-interaction {
|
|
3555
|
-
&::part(point) {
|
|
3556
|
-
&:hover {
|
|
3557
|
-
background-color: var(--qti-hover-bg);
|
|
3558
|
-
}
|
|
3559
|
-
|
|
3560
|
-
&:focus {
|
|
3561
|
-
box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
|
|
3562
|
-
}
|
|
3563
|
-
|
|
3564
|
-
border-radius: 100%;
|
|
3565
|
-
|
|
3566
|
-
width: var(--qti-point-size);
|
|
3567
|
-
|
|
3568
|
-
height: var(--qti-point-size);
|
|
3569
|
-
|
|
3570
|
-
background-color: transparent;
|
|
3571
|
-
|
|
3572
|
-
padding: 0;
|
|
3573
|
-
|
|
3574
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3575
|
-
|
|
3576
|
-
outline: none;
|
|
3577
|
-
}
|
|
3578
|
-
}
|
|
3579
|
-
|
|
3580
|
-
qti-position-object-stage {
|
|
3581
|
-
& qti-position-object-interaction {
|
|
3582
|
-
/* no styles necessary, only layout styles, defined in the component */
|
|
3583
|
-
}
|
|
3584
|
-
}
|
|
3585
|
-
|
|
3586
|
-
qti-prompt {
|
|
3587
|
-
margin: 0.5rem 0; /* my-2 */
|
|
3588
|
-
display: block;
|
|
3589
|
-
width: 100%;
|
|
3590
|
-
}
|
|
3591
|
-
}
|
|
3592
|
-
`;var O=class extends io{constructor(){super(...arguments);this.testURL=null;this.testDoc=null;this.testXML=null;this.templateContent=null}async handleTestURLChange(){if(this.testURL)try{let e=await se().load(this.testURL);this.testDoc=e.htmlDoc()}catch(e){console.error("Error loading or parsing XML:",e)}}handleTestXMLChange(){if(this.testXML)try{this.testDoc=se().parse(this.testXML).htmlDoc()}catch(e){console.error("Error parsing XML:",e)}}async connectedCallback(){super.connectedCallback(),this.initializeTemplateContent(),this.applyStyles(),this.testURL&&this.handleTestURLChange(),this.testXML&&this.handleTestXMLChange()}initializeTemplateContent(){let e=this.querySelector("template");this.templateContent=e?e.content:At``}applyStyles(){let e=new CSSStyleSheet;e.replaceSync(ot),this.shadowRoot.adoptedStyleSheets=[e]}render(){return At`
|
|
3593
|
-
${this.templateContent}
|
|
3594
|
-
<slot></slot>
|
|
3595
|
-
${ao(this.testDoc,At`<span>Loading...</span>`)}
|
|
3596
|
-
`}};o([so({type:String,attribute:"test-url"})],O.prototype,"testURL",2),o([Rr()],O.prototype,"testDoc",2),o([Rr()],O.prototype,"testXML",2),o([v("testURL",{waitUntilFirstUpdate:!0})],O.prototype,"handleTestURLChange",1),o([v("testXML",{waitUntilFirstUpdate:!0})],O.prototype,"handleTestXMLChange",1),O=o([oo("test-container")],O);import{html as no}from"lit";import{customElement as lo,property as Dr}from"lit/decorators.js";import{prepareTemplate as co}from"stampino";var me=class extends q{constructor(){super();this.maxDisplayedItems=2;this.skipOnCategory="dep-informational";this._internals.ariaLabel="pagination"}createRenderRoot(){return this}render(){let e=this._testContext.items.reduce((a,c)=>{let p=c.category?.split(" ").includes(this.skipOnCategory)?"i":a.counter++;return a.result.push({...c,newIndex:p}),a},{counter:0,result:[]}).result,t=e.findIndex(a=>a.identifier===this._testContext.navItemId),r=Math.max(0,t-this.maxDisplayedItems),i=Math.min(e.length,t+this.maxDisplayedItems+1),l=e.slice(r,i);return no`
|
|
3597
|
-
${l.map(a=>{let c=a.variables.find(ke=>ke.identifier=="SCORE"),d=parseInt(c?.value?.toString()),p=a.variables.find(ke=>ke.identifier==="completionStatus")?.value,m=a.category!==this.skipOnCategory?"regular":"info",h=this._testContext.navItemId===a.identifier,b=this._testContext.view==="scorer"&&m=="regular"&&d!==void 0&&!isNaN(d)&&d>0,y=this._testContext.view==="scorer"&&m=="regular"&&d!==void 0&&!isNaN(d)&&d<=0,f=this._testContext.view==="candidate"&&p==="completed"&&a.category!==this.skipOnCategory,Ce={...a,type:m,active:h,correct:b,incorrect:y,answered:f},Ze=this.firstElementChild;return co(Ze)({item:Ce})})}
|
|
3598
|
-
`}};o([Dr({type:Number,attribute:"max-displayed-items"})],me.prototype,"maxDisplayedItems",2),o([Dr({type:String,attribute:"skip-on-category"})],me.prototype,"skipOnCategory",2),me=o([lo("test-paging-buttons-stamp")],me);import{html as po,LitElement as mo}from"lit";import{customElement as ho}from"lit/decorators.js";var st=class extends mo{render(){return po`<slot></slot>`}};st=o([ho("qti-item")],st);import{LitElement as uo,html as Rt}from"lit";import{customElement as go,property as bo,state as Ir}from"lit/decorators.js";import{until as fo}from"lit/directives/until.js";var F=class extends uo{constructor(){super(...arguments);this.itemURL=null;this.itemDoc=null;this.itemXML=null;this.templateContent=null}async handleItemURLChange(){if(this.itemURL)try{let e=await z().load(this.itemURL);this.itemDoc=e.htmlDoc()}catch(e){console.error("Error loading or parsing XML:",e)}}handleItemXMLChange(){if(this.itemXML)try{this.itemDoc=z().parse(this.itemXML).htmlDoc()}catch(e){console.error("Error parsing XML:",e)}}async connectedCallback(){super.connectedCallback(),this.initializeTemplateContent(),this.applyStyles(),this.itemURL&&this.handleItemURLChange(),this.itemXML&&this.handleItemXMLChange()}initializeTemplateContent(){let e=this.querySelector("template");this.templateContent=e?e.content:Rt``}applyStyles(){let e=new CSSStyleSheet;e.replaceSync(ot),this.shadowRoot.adoptedStyleSheets=[e]}render(){return Rt`
|
|
3599
|
-
${this.templateContent}
|
|
3600
|
-
<slot></slot>
|
|
3601
|
-
${fo(this.itemDoc,Rt`<span>Loading...</span>`)}
|
|
3602
|
-
`}};o([bo({type:String,attribute:"item-url"})],F.prototype,"itemURL",2),o([Ir()],F.prototype,"itemDoc",2),o([Ir()],F.prototype,"itemXML",2),o([v("itemURL",{waitUntilFirstUpdate:!0})],F.prototype,"handleItemURLChange",1),o([v("itemXML",{waitUntilFirstUpdate:!0})],F.prototype,"handleItemXMLChange",1),F=o([go("item-container")],F);import{provide as yo}from"@lit/context";import{LitElement as qo,html as xo}from"lit";import{customElement as wo,property as he}from"lit/decorators.js";import{createContext as vo}from"@lit/context";var Vr=[{identifier:"completionStatus",cardinality:"single",baseType:"string",value:"unknown",type:"outcome"},{identifier:"numAttempts",cardinality:"single",baseType:"integer",value:"0",type:"response"}],x=vo(Symbol("item"));var E=class extends qo{constructor(){super();this.identifier="";this.adaptive="false";this.timeDependent=null;this._handleDisabledChange=(e,t)=>{this._interactionElements.forEach(r=>r.disabled=t)};this._handleReadonlyChange=(e,t)=>this._interactionElements.forEach(r=>r.readonly=t);this._context={identifier:this.getAttribute("identifier"),variables:Vr};this._initialContext={...this._context,variables:this._context.variables};this._feedbackElements=[];this._interactionElements=[];this.addEventListener("qti-register-variable",e=>{this._context={...this._context,variables:[...this._context.variables,e.detail.variable]},this._initialContext=this._context,e.stopPropagation()}),this.addEventListener("qti-register-feedback",e=>{e.stopPropagation();let t=e.detail;this._feedbackElements.push(t),(Number(this._context.variables.find(i=>i.identifier==="numAttempts")?.value)||0)>0&&t.checkShowFeedback(t.outcomeIdentifier)}),this.addEventListener("qti-register-interaction",e=>{e.stopPropagation(),this._interactionElements.push(e.target)}),this.addEventListener("end-attempt",e=>{let{responseIdentifier:t,countAttempt:r}=e.detail;this.validate(),this.updateResponseVariable(t,"true"),this.processResponse(r)}),this.addEventListener("qti-set-outcome-value",e=>{let{outcomeIdentifier:t,value:r}=e.detail;this.updateOutcomeVariable(t,r),e.stopPropagation()}),this.addEventListener("qti-interaction-response",this.handleUpdateResponseVariable)}get variables(){return this._context.variables.map(e=>({identifier:e.identifier,value:e.value,type:e.type,...e.type==="outcome"&&e.identifier==="SCORE"?{externalScored:e.externalScored}:{}}))}set variables(e){if(!Array.isArray(e)||e.some(t=>!("identifier"in t))){console.warn("variables property should be an array of VariableDeclaration");return}this._context={...this._context,variables:this._context.variables.map(t=>{let r=e.find(i=>i.identifier===t.identifier);return r?{...t,...r}:t})},this._context.variables.forEach(t=>{if(t.type==="response"){let r=this._interactionElements.find(i=>i.responseIdentifier===t.identifier);r&&(r.value=t.value)}})}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this._emit("qti-assessment-item-connected",this)}set responses(e){if(e)for(let t of e){this.getResponse(t.responseIdentifier)&&this.updateResponseVariable(t.responseIdentifier,t.response);let i=this._interactionElements.find(l=>l.getAttribute("response-identifier")===t.responseIdentifier);i&&(i.value=t.response)}}render(){return xo`<slot></slot>`}showCorrectResponse(e){let r=this._context.variables.filter(i=>"correctResponse"in i&&i.correctResponse).map(i=>({responseIdentifier:i.identifier,response:i.correctResponse}));for(let i of r){let l=this._interactionElements.find(a=>a.getAttribute("response-identifier")===i.responseIdentifier);l&&(l.correctResponse=e?i.response:"")}}processResponse(e=!0){this.validate();let t=this.querySelector("qti-response-processing");return!t||!t.process?!1:(t.process(),this.adaptive==="false"&&this.updateOutcomeVariable("completionStatus",this._getCompletionStatus()),e&&this.updateOutcomeVariable("numAttempts",(+this._context.variables.find(r=>r.identifier==="numAttempts")?.value+1).toString()),this._emit("qti-response-processed"),!0)}resetResponses(){this._context=this._initialContext}getResponse(e){return this.getVariable(e)}getOutcome(e){return this.getVariable(e)}getVariable(e){return this._context.variables.find(t=>t.identifier===e)||null}handleUpdateResponseVariable(e){let{responseIdentifier:t,response:r}=e.detail;this.updateResponseVariable(t,r)}updateResponseVariable(e,t){this._context={...this._context,variables:this._context.variables.map(r=>r.identifier!==e?r:{...r,value:t})},this._emit("qti-interaction-changed",{item:this.identifier,responseIdentifier:e,response:Array.isArray(t)?[...t]:t}),this.adaptive==="false"&&this.updateOutcomeVariable("completionStatus",this._getCompletionStatus())}updateOutcomeVariable(e,t){let r=this.getOutcome(e);if(!r){console.warn(`Can not set qti-outcome-identifier: ${e}, it is not available`);return}this._context={...this._context,variables:this._context.variables.map(i=>i.identifier!==e?i:{...i,value:r.cardinality==="single"?t:[...i.value,t]})},this._feedbackElements.forEach(i=>i.checkShowFeedback(e)),this._emit("qti-outcome-changed",{item:this.identifier,outcomeIdentifier:e,value:this._context.variables.find(i=>i.identifier===e)?.value})}validate(){return this._interactionElements.every(e=>e.validate())?!0:this._interactionElements.some(e=>e.validate())?!1:null}_getCompletionStatus(){let e=this.validate();return e===!0?"completed":e===!1?"incomplete":"not_attempted"}_emit(e,t=null){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0,detail:t}))}};o([he({type:String})],E.prototype,"title",2),o([he({type:String})],E.prototype,"identifier",2),o([he({type:String})],E.prototype,"adaptive",2),o([he({type:String})],E.prototype,"timeDependent",2),o([he({type:Boolean})],E.prototype,"disabled",2),o([v("disabled",{waitUntilFirstUpdate:!0})],E.prototype,"_handleDisabledChange",2),o([he({type:Boolean})],E.prototype,"readonly",2),o([v("readonly",{waitUntilFirstUpdate:!0})],E.prototype,"_handleReadonlyChange",2),o([yo({context:x})],E.prototype,"_context",2),E=o([wo("qti-assessment-item")],E);import{LitElement as Eo}from"lit";import{customElement as Co,property as Hr}from"lit/decorators.js";var ue=class extends Eo{constructor(){super(...arguments);this.identifier="";this.href=""}async connectedCallback(){super.connectedCallback();let e=new Event("qti-assessment-stimulus-ref-connected",{cancelable:!0,bubbles:!0,composed:!0});if(this.dispatchEvent(e)){let i=this.closest("qti-assessment-item").querySelector(`[data-stimulus-idref=${this.identifier}]`);i?await this.updateStimulusRef(i):console.warn(`Stimulus with data-stimulus-idref ${this.identifier} not found`)}}async updateStimulusRef(e){let t=await z().load(this.href).then(r=>r.htmlDoc());if(t){let r=t.querySelectorAll("qti-stimulus-body, qti-stylesheet");e.innerHTML="",e.append(...r)}}};o([Hr({type:String})],ue.prototype,"identifier",2),o([Hr({type:String})],ue.prototype,"href",2),ue=o([Co("qti-assessment-stimulus-ref")],ue);import{html as ko}from"lit";import{property as at}from"lit/decorators.js";var Nr={toAttribute:n=>n?"true":"false",fromAttribute:n=>n==="true"};function R(n,s){class e extends n{constructor(...i){super(...i);this.identifier="";this.tabIndex=0;this.disabled=!1;this.readonly=!1;this.internals=this.attachInternals()}handleDisabledChange(i,l){this.tabIndex=l?-1:0,l&&this.blur()}connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`register-${s}`,{bubbles:!0,composed:!0}))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`unregister-${s}`,{bubbles:!0,composed:!0}))}_onKeyUp(i){i.altKey||i.code==="Space"&&(i.preventDefault(),this._activate())}_onClick(){this.disabled||this.readonly||(this.focus(),this._activate())}_activate(){this.disabled||this.readonly||this.dispatchEvent(new CustomEvent(`activate-${s}`,{bubbles:!0,composed:!0,detail:{identifier:this.identifier}}))}render(){return ko`<slot></slot>`}}return o([at({type:String})],e.prototype,"identifier",2),o([at({type:Number,reflect:!0,attribute:"tabindex"})],e.prototype,"tabIndex",2),o([at({type:Boolean,reflect:!0,attribute:"aria-disabled",converter:Nr})],e.prototype,"disabled",2),o([at({type:Boolean,reflect:!0,attribute:"aria-readonly",converter:Nr})],e.prototype,"readonly",2),o([v("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e}import{customElement as Mo}from"lit/decorators.js";import{html as So,LitElement as Lo}from"lit";import{css as To}from"lit";var $r=To`
|
|
3603
|
-
:host {
|
|
3604
|
-
display: block;
|
|
3605
|
-
}
|
|
3606
|
-
`;var Le=class extends Lo{render(){return So`<slot name="qti-rubric-block"></slot><slot></slot>`}};Le.styles=$r,Le=o([Mo("qti-item-body")],Le);import{html as _o,LitElement as Ao}from"lit";import{customElement as Ro}from"lit/decorators.js";var nt=class extends Ao{render(){return _o`<slot></slot>`}connectedCallback(){this.parentElement.tagName.endsWith("INTERACTION")&&this.setAttribute("slot","prompt")}};nt=o([Ro("qti-prompt")],nt);import{LitElement as Do}from"lit";import{customElement as Io}from"lit/decorators.js";var lt=class extends Do{constructor(){super(...arguments);this.styleElement=null}firstUpdated(e){super.firstUpdated(e);let t=this.getAttribute("href");if(t!==null&&fetch(t).then(r=>r.text()).then(r=>{let i=this.minifyCss(r);this.styleElement=document.createElement("style"),this.styleElement.media="screen",this.styleElement.textContent=`@scope {${i}}`,this.parentElement?this.parentElement.appendChild(this.styleElement):console.warn("No parent element to append the scoped stylesheet to.")}).catch(r=>{console.error("Failed to load stylesheet:",r)}),this.textContent!==null&&this.textContent.trim()!==""){let r=this.minifyCss(this.textContent);this.styleElement=document.createElement("style"),this.styleElement.media="screen",this.styleElement.textContent=`@scope {${r}}`,this.parentElement?this.parentElement.appendChild(this.styleElement):console.warn("No parent element to append the scoped stylesheet to.")}}minifyCss(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;])\s*/g,"$1").trim()}disconnectedCallback(){if(this.styleElement)try{this.styleElement.remove()}catch(e){console.error("Could not remove stylesheet:",e)}super.disconnectedCallback()}};lt=o([Io("qti-stylesheet")],lt);import{consume as $o}from"@lit/context";import{css as zo,html as Oo}from"lit";import{customElement as Fo,property as ct,state as Po}from"lit/decorators.js";import{html as Vo,LitElement as Ho}from"lit";import{customElement as No}from"lit/decorators.js";var W=class extends Ho{render(){return Vo`<slot></slot>`}defaultValues(s){let e=Array.from(this.querySelectorAll("qti-default-value > qti-value"));if(e.length===0)return null;let t=e.map(r=>r.innerHTML.trim());return t.length>1||s.cardinality==="multiple"||s.cardinality==="ordered"?t:t[0]}};W=o([No("qti-variabledeclaration")],W);var D=class extends W{constructor(){super(...arguments);this.externalScored=null}render(){let e=this.itemContext?.variables.find(t=>t.identifier===this.identifier)?.value;return Oo`${JSON.stringify(e,null,2)}`}get interpolationTable(){let e=this.querySelector("qti-interpolation-table");if(e){let t=new Map;for(let r of e.querySelectorAll("qti-interpolation-table-entry")){!r.getAttribute("source-value")&&r.getAttribute("target-value")&&console.error("source-value or target-value is missing in qti-interpolation-table-entry");let i=parseInt(r.getAttribute("source-value")),l=parseInt(r.getAttribute("target-value"));(isNaN(i)||isNaN(l))&&console.error("source-value or target-value is not a number in qti-interpolation-table-entry"),t.set(i,l)}return t}return null}connectedCallback(){super.connectedCallback();let e={identifier:this.identifier,cardinality:this.cardinality,baseType:this.baseType,type:"outcome",value:null,interpolationTable:this.interpolationTable,externalScored:this.externalScored};e.value=this.defaultValues(e),this.dispatchEvent(new CustomEvent("qti-register-variable",{bubbles:!0,composed:!0,detail:{variable:e}}))}};D.styles=[zo`
|
|
3607
|
-
:host {
|
|
3608
|
-
display: none;
|
|
3609
|
-
}
|
|
3610
|
-
`],o([ct({type:String,attribute:"base-type"})],D.prototype,"baseType",2),o([ct({type:String,attribute:"external-scored"})],D.prototype,"externalScored",2),o([ct({type:String})],D.prototype,"identifier",2),o([ct({type:String})],D.prototype,"cardinality",2),o([$o({context:x,subscribe:!0}),Po()],D.prototype,"itemContext",2),D=o([Fo("qti-outcome-declaration")],D);import{consume as Uo}from"@lit/context";import{css as Xo,html as Bo}from"lit";import{customElement as jo,property as Dt,state as Wo}from"lit/decorators.js";var P=class extends W{render(){let s=this.itemContext?.variables.find(e=>e.identifier===this.identifier)?.value;return Bo`${JSON.stringify(s,null,2)}`}connectedCallback(){super.connectedCallback();let s={baseType:this.baseType,identifier:this.identifier,correctResponse:this.correctResponse,cardinality:this.cardinality||"single",mapping:this.mapping,value:null,type:"response",candidateResponse:null};s.value=this.defaultValues(s),this.dispatchEvent(new CustomEvent("qti-register-variable",{bubbles:!0,composed:!0,detail:{variable:s}}))}get correctResponse(){let s,e=this.querySelector("qti-correct-response");if(e){let t=e.querySelectorAll("qti-value");if(this.cardinality==="single"&&t.length>0)s=t[0].textContent,t[0].remove();else if(this.cardinality!=="single"){s=[];for(let r=0;r<t.length;r++)s.push(t[r].textContent),t[r].remove()}}return s}get mapping(){return this.querySelector("qti-mapping")}};P.styles=[Xo`
|
|
3611
|
-
:host {
|
|
3612
|
-
display: none;
|
|
3613
|
-
}
|
|
3614
|
-
`],o([Dt({type:String,attribute:"base-type"})],P.prototype,"baseType",2),o([Dt({type:String})],P.prototype,"identifier",2),o([Dt({type:String})],P.prototype,"cardinality",2),o([Uo({context:x,subscribe:!0}),Wo()],P.prototype,"itemContext",2),P=o([jo("qti-response-declaration")],P);import{LitElement as Yo}from"lit";import{customElement as Ko}from"lit/decorators.js";var dt=class extends Yo{};dt=o([Ko("qti-companion-materials-info")],dt);import{LitElement as Go,html as Jo}from"lit";import{customElement as Zo}from"lit/decorators.js";var pt=class extends Go{render(){return Jo`<slot></slot>`}};pt=o([Zo("qti-content-body")],pt);import{LitElement as Qo,css as es,html as ts}from"lit";import{customElement as rs,property as mt}from"lit/decorators.js";var I=class extends Qo{handleclassNamesChange(){this.classNames.split(" ").forEach(e=>{switch(e){case"qti-rubric-discretionary-placement":this.setAttribute("slot","qti-rubric-block");break;case"qti-rubric-inline":this.setAttribute("slot","");break;default:break}})}render(){return ts`<slot></slot>`}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-rubric-block")}};I.styles=es`
|
|
3615
|
-
:host {
|
|
3616
|
-
display: block;
|
|
3617
|
-
}
|
|
3618
|
-
`,o([mt({type:String})],I.prototype,"id",2),o([mt({type:String})],I.prototype,"use",2),o([mt({type:String})],I.prototype,"view",2),o([mt({type:String,attribute:"class"})],I.prototype,"classNames",2),o([v("classNames",{waitUntilFirstUpdate:!0})],I.prototype,"handleclassNamesChange",1),I=o([rs("qti-rubric-block")],I);import{css as ns,html as ls}from"lit";import{customElement as cs}from"lit/decorators.js";import{consume as os}from"@lit/context";import{LitElement as ss}from"lit";import{property as ht,state as as}from"lit/decorators.js";var is=()=>new Intl.NumberFormat().format(.1).replace(/\d/g,""),_e=n=>{if(typeof n=="string")return n;let s=is();return s==="."?n.toLocaleString():n.toString().replace(".","").replace(s,".")};function It(n){return n==null}function Ae(n){return n.replace(/([^:]\/)\/+/g,"$1").replace(/\/\//g,"/").replace("http:/","http://").replace("https:/","https://")}var C=class extends ss{connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-feedback",{bubbles:!0,composed:!0,detail:this}))}checkShowFeedback(s){let e=this._context.variables.find(r=>r.identifier===s)||null;if(this.outcomeIdentifier!==s||!e)return;let t=!1;Array.isArray(e.value)?t=e.value.includes(this.identifier):t=!It(this.identifier)&&!It(e?.value)&&this.identifier===e.value||!1,this.showFeedback(t)}showFeedback(s){this.showStatus=s&&this.showHide==="show"||!s&&this.showHide==="hide"?"on":"off"}};o([ht({type:String,attribute:"show-hide"})],C.prototype,"showHide",2),o([ht({type:String,attribute:"outcome-identifier"})],C.prototype,"outcomeIdentifier",2),o([ht({type:String})],C.prototype,"identifier",2),o([ht({type:String,attribute:!1})],C.prototype,"showStatus",2),o([os({context:x,subscribe:!0}),as()],C.prototype,"_context",2);var Re=class extends C{render(){return ls` <slot part="feedback" class="feedback ${this.showStatus}"></slot> `}firstUpdated(s){this.checkShowFeedback(this.outcomeIdentifier)}};Re.styles=ns`
|
|
3619
|
-
:host {
|
|
3620
|
-
display: block;
|
|
3621
|
-
}
|
|
3622
|
-
.on {
|
|
3623
|
-
display: block;
|
|
3624
|
-
}
|
|
3625
|
-
.off {
|
|
3626
|
-
display: none;
|
|
3627
|
-
}
|
|
3628
|
-
`,Re=o([cs("qti-feedback-block")],Re);import{css as ds,html as ps}from"lit";import{customElement as ms}from"lit/decorators.js";var De=class extends C{constructor(){super(...arguments);this.render=()=>ps` <slot part="feedback" class="${this.showStatus}"></slot> `}};De.styles=ds`
|
|
3629
|
-
.on {
|
|
3630
|
-
display: inline-block;
|
|
3631
|
-
}
|
|
3632
|
-
.off {
|
|
3633
|
-
display: none;
|
|
3634
|
-
}
|
|
3635
|
-
`,De=o([ms("qti-feedback-inline")],De);import{css as hs,html as us}from"lit";import{customElement as gs}from"lit/decorators.js";var Ie=class extends C{render(){return us`
|
|
3636
|
-
<dialog class="qti-dialog" part="feedback" ?open="${this.showStatus==="on"}">
|
|
3637
|
-
<slot></slot>
|
|
3638
|
-
<div style="margin-top: var(--qti-gap-size); text-align: center;">
|
|
3639
|
-
<button class="button close-button" @click="${this.closeFeedback}"></button>
|
|
3640
|
-
</div>
|
|
3641
|
-
</dialog>
|
|
3642
|
-
`}openFeedback(){let s=this.shadowRoot?.querySelector("dialog");s&&!s.open&&s.showModal()}closeFeedback(){let s=this.shadowRoot?.querySelector("dialog");s&&s.open&&(s.close(),this.showStatus="off")}firstUpdated(){this.showStatus==="on"&&this.openFeedback()}updated(s){s.has("showStatus")&&(this.showStatus==="on"?this.openFeedback():this.closeFeedback())}};Ie.styles=hs`
|
|
3643
|
-
.qti-dialog {
|
|
3644
|
-
background: var(--qti-bg);
|
|
3645
|
-
border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
|
|
3646
|
-
border-radius: var(--qti-border-radius);
|
|
3647
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
3648
|
-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
3649
|
-
position: fixed;
|
|
3650
|
-
top: 50%;
|
|
3651
|
-
left: 50%;
|
|
3652
|
-
transform: translate(-50%, -50%);
|
|
3653
|
-
z-index: 1000;
|
|
3654
|
-
width: auto;
|
|
3655
|
-
max-width: 90%;
|
|
3656
|
-
}
|
|
3657
|
-
|
|
3658
|
-
.button {
|
|
3659
|
-
border-radius: var(--qti-border-radius);
|
|
3660
|
-
padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
|
|
3661
|
-
background-color: var(--qti-bg-active);
|
|
3662
|
-
border: var(--qti-border-active);
|
|
3663
|
-
cursor: pointer;
|
|
3664
|
-
position: relative;
|
|
3665
|
-
display: inline-block;
|
|
3666
|
-
}
|
|
3667
|
-
|
|
3668
|
-
.button:hover {
|
|
3669
|
-
background-color: var(--qti-hover-bg);
|
|
3670
|
-
}
|
|
3671
|
-
|
|
3672
|
-
.button:disabled {
|
|
3673
|
-
background-color: var(--qti-disabled-bg);
|
|
3674
|
-
color: var(--qti-disabled-color);
|
|
3675
|
-
cursor: not-allowed;
|
|
3676
|
-
}
|
|
3677
|
-
|
|
3678
|
-
.button:focus {
|
|
3679
|
-
outline: var(--qti-focus-border-width) solid var(--qti-focus-color);
|
|
3680
|
-
}
|
|
3681
|
-
|
|
3682
|
-
/* Text content of the button */
|
|
3683
|
-
.button::after {
|
|
3684
|
-
content: var(--qti-close-text, 'Close');
|
|
3685
|
-
color: inherit;
|
|
3686
|
-
font-size: inherit;
|
|
3687
|
-
text-align: center;
|
|
3688
|
-
display: inline-block;
|
|
3689
|
-
line-height: 1.5;
|
|
3690
|
-
}
|
|
3691
|
-
`,Ie=o([gs("qti-modal-feedback")],Ie);import{html as ys}from"lit";import{ifDefined as qs}from"lit/directives/if-defined.js";import{property as Vt,state as bs}from"lit/decorators.js";import{LitElement as fs}from"lit";var u=class extends fs{constructor(){super();this.disabled=!1;this.readonly=!1;this._internals=this.attachInternals()}reportValidity(){return this._internals.reportValidity()}reset(){this.value=""}get correctResponse(){return this._correctResponse}set correctResponse(e){this._correctResponse=e}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-interaction",{bubbles:!0,composed:!0,cancelable:!1,detail:{responseIdentifier:this.responseIdentifier}}))}saveResponse(e){this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,cancelable:!1,detail:{responseIdentifier:this.responseIdentifier,response:Array.isArray(e)?[...e]:e}}))}};u.formAssociated=!0,o([Vt({type:String,attribute:"response-identifier"})],u.prototype,"responseIdentifier",2),o([Vt({reflect:!0,type:Boolean})],u.prototype,"disabled",2),o([Vt({reflect:!0,type:Boolean})],u.prototype,"readonly",2),o([bs()],u.prototype,"_correctResponse",2);import{customElement as xs,property as Ve,state as Or}from"lit/decorators.js";import{css as vs}from"lit";var zr=vs`
|
|
3692
|
-
/* PK: display host as block, else design will be collapsed */
|
|
3693
|
-
:host {
|
|
3694
|
-
display: block;
|
|
3695
|
-
}
|
|
3696
|
-
textarea {
|
|
3697
|
-
box-sizing: border-box;
|
|
3698
|
-
width: 100%;
|
|
3699
|
-
height: 100%;
|
|
3700
|
-
border: 0;
|
|
3701
|
-
}
|
|
3702
|
-
`;var k=class extends u{constructor(){super(...arguments);this._rows=5;this._value=""}handleclassNamesChange(e,t){let r=t.split(" "),i=!1;if(r.forEach(l=>{if(l.startsWith("qti-height-lines-")){let a=l.replace("qti-height-lines-","");this._rows=parseInt(a),i=!0}}),!i&&this.expectedLength){let l=Math.ceil(this.expectedLength/50);this._rows=l}}get value(){return this._value}set value(e){if(typeof e=="string"){this._value=e;let t=new FormData;t.append(this.responseIdentifier,e),this._internals.setFormValue(t),this.validate()}else throw new Error("Value must be a string")}validate(){let e=this.shadowRoot.querySelector("textarea");if(!e)return!1;if(this.patternMask&&this.dataPatternmaskMessage){this._internals.setValidity({}),e.setCustomValidity("");let t=this.patternMask.startsWith("^")&&this.patternMask.endsWith("$")?this.patternMask:`^${this.patternMask}$`,r=new RegExp(t);e.checkValidity()&&r.test(e.value)||(this._internals.setValidity({customError:!0},this.dataPatternmaskMessage),e.setCustomValidity(this.dataPatternmaskMessage))}else{let t=e.checkValidity();this._internals.setValidity(t?{}:{customError:!1})}return this._value!==""&&e.checkValidity()}reportValidity(){let e=this.shadowRoot.querySelector("textarea");if(!e)return!1;let t=this.validate();return t||e.reportValidity(),t}render(){return ys`<slot name="prompt"></slot
|
|
3703
|
-
><textarea
|
|
3704
|
-
part="textarea"
|
|
3705
|
-
name="${this.responseIdentifier}"
|
|
3706
|
-
spellcheck="false"
|
|
3707
|
-
autocomplete="off"
|
|
3708
|
-
maxlength="${5e3}"
|
|
3709
|
-
@keydown="${e=>e.stopImmediatePropagation()}"
|
|
3710
|
-
@keyup="${this.textChanged}"
|
|
3711
|
-
@change="${this.textChanged}"
|
|
3712
|
-
@blur="${e=>{this.reportValidity()}}"
|
|
3713
|
-
placeholder="${qs(this.placeholderText?this.placeholderText:void 0)}"
|
|
3714
|
-
rows="${this._rows}"
|
|
3715
|
-
?disabled="${this.disabled}"
|
|
3716
|
-
?readonly="${this.readonly}"
|
|
3717
|
-
.value=${this._value}
|
|
3718
|
-
></textarea>`}textChanged(e){if(this.disabled||this.readonly)return;let t=e.target;this.setEmptyAttribute(t.value),this._value!==t.value&&(this.value=t.value,this.saveResponse(t.value))}setEmptyAttribute(e){this.setAttribute("empty",e===""?"true":"false")}};k.styles=zr,o([Or()],k.prototype,"_rows",2),o([Ve({type:Number,attribute:"expected-length"})],k.prototype,"expectedLength",2),o([Ve({type:String,attribute:"pattern-mask"})],k.prototype,"patternMask",2),o([Ve({type:String,attribute:"placeholder-text"})],k.prototype,"placeholderText",2),o([Ve({type:String,attribute:"data-patternmask-message"})],k.prototype,"dataPatternmaskMessage",2),o([Or()],k.prototype,"_value",2),o([Ve({type:String,attribute:"class"})],k.prototype,"classNames",2),o([v("classNames")],k.prototype,"handleclassNamesChange",1),k=o([xs("qti-extended-text-interaction")],k);import{html as Es}from"lit";import{customElement as Cs,property as ut,state as ks}from"lit/decorators.js";import{ifDefined as Pr}from"lit/directives/if-defined.js";import{createRef as Ts}from"lit/directives/ref.js";import{css as ws}from"lit";var Fr=ws`
|
|
3719
|
-
:host {
|
|
3720
|
-
display: inline-block;
|
|
3721
|
-
}
|
|
3722
|
-
[part='correct'] {
|
|
3723
|
-
position: absolute;
|
|
3724
|
-
width: 100%;
|
|
3725
|
-
}
|
|
3726
|
-
:host(.qti-input-width-1) [part='input'] {
|
|
3727
|
-
width: 1.1rem;
|
|
3728
|
-
min-width: 1.1rem;
|
|
3729
|
-
}
|
|
3730
|
-
|
|
3731
|
-
:host(.qti-input-width-2) [part='input'] {
|
|
3732
|
-
width: 2.3rem;
|
|
3733
|
-
min-width: 2.3rem;
|
|
3734
|
-
}
|
|
3735
|
-
|
|
3736
|
-
:host(.qti-input-width-3) [part='input'] {
|
|
3737
|
-
width: 3.3rem;
|
|
3738
|
-
min-width: 3.3rem;
|
|
3739
|
-
}
|
|
3740
|
-
|
|
3741
|
-
:host(.qti-input-width-4) [part='input'] {
|
|
3742
|
-
width: 4.2rem;
|
|
3743
|
-
min-width: 4.2rem;
|
|
3744
|
-
}
|
|
3745
|
-
|
|
3746
|
-
:host(.qti-input-width-6) [part='input'] {
|
|
3747
|
-
width: 6.6rem;
|
|
3748
|
-
min-width: 6.6rem;
|
|
3749
|
-
}
|
|
3750
|
-
|
|
3751
|
-
:host(.qti-input-width-10) [part='input'] {
|
|
3752
|
-
width: 8rem;
|
|
3753
|
-
min-width: 8rem;
|
|
3754
|
-
}
|
|
3755
|
-
|
|
3756
|
-
:host(.qti-input-width-15) [part='input'] {
|
|
3757
|
-
width: 12rem;
|
|
3758
|
-
min-width: 12rem;
|
|
3759
|
-
}
|
|
3760
|
-
|
|
3761
|
-
:host(.qti-input-width-20) [part='input'] {
|
|
3762
|
-
width: 17rem;
|
|
3763
|
-
min-width: 17rem;
|
|
3764
|
-
}
|
|
3765
|
-
|
|
3766
|
-
:host(.qti-input-width-25) [part='input'] {
|
|
3767
|
-
width: 20rem;
|
|
3768
|
-
min-width: 20rem;
|
|
3769
|
-
}
|
|
3770
|
-
|
|
3771
|
-
:host(.qti-input-width-30) [part='input'] {
|
|
3772
|
-
width: 24rem;
|
|
3773
|
-
min-width: 24rem;
|
|
3774
|
-
}
|
|
3775
|
-
|
|
3776
|
-
:host(.qti-input-width-35) [part='input'] {
|
|
3777
|
-
width: 28rem;
|
|
3778
|
-
min-width: 28rem;
|
|
3779
|
-
}
|
|
3780
|
-
|
|
3781
|
-
:host(.qti-input-width-40) [part='input'] {
|
|
3782
|
-
width: 32rem;
|
|
3783
|
-
min-width: 32rem;
|
|
3784
|
-
}
|
|
3785
|
-
|
|
3786
|
-
:host(.qti-input-width-45) [part='input'] {
|
|
3787
|
-
width: 36rem;
|
|
3788
|
-
min-width: 36rem;
|
|
3789
|
-
}
|
|
3790
|
-
|
|
3791
|
-
:host(.qti-input-width-50) [part='input'] {
|
|
3792
|
-
width: 40rem;
|
|
3793
|
-
min-width: 40rem;
|
|
3794
|
-
}
|
|
3795
|
-
|
|
3796
|
-
:host(.qti-input-width-72) [part='input'] {
|
|
3797
|
-
width: 57rem;
|
|
3798
|
-
min-width: 57rem;
|
|
3799
|
-
}
|
|
3800
|
-
`;var V=class extends u{constructor(){super(...arguments);this._value="";this.inputRef=Ts()}get value(){return this._value}set value(e){if(typeof e=="string"){this._value=e;let t=new FormData;t.append(this.responseIdentifier,e),this._internals.setFormValue(t),this.validate()}else throw new Error("Value must be a string")}validate(){let e=this.shadowRoot.querySelector("input");if(!e)return!1;if(this.patternMask&&this.dataPatternmaskMessage)this._internals.setValidity({}),e.setCustomValidity(""),e.checkValidity()||(this._internals.setValidity({customError:!0},this.dataPatternmaskMessage),e.setCustomValidity(this.dataPatternmaskMessage));else{let t=e.checkValidity();this._internals.setValidity(t?{}:{customError:!1})}return this._value!==""&&e.checkValidity()}render(){return Es`
|
|
3801
|
-
<input
|
|
3802
|
-
part="input"
|
|
3803
|
-
name="${this.responseIdentifier}"
|
|
3804
|
-
spellcheck="false"
|
|
3805
|
-
autocomplete="off"
|
|
3806
|
-
@blur="${e=>{this.reportValidity()}}"
|
|
3807
|
-
@keydown="${e=>e.stopImmediatePropagation()}"
|
|
3808
|
-
@keyup="${this.textChanged}"
|
|
3809
|
-
@change="${this.textChanged}"
|
|
3810
|
-
type="${this.patternMask=="[0-9]*"?"number":"text"}"
|
|
3811
|
-
placeholder="${Pr(this.placeholderText?this.placeholderText:void 0)}"
|
|
3812
|
-
.value="${this._value}"
|
|
3813
|
-
pattern="${Pr(this.patternMask?this.patternMask:void 0)}"
|
|
3814
|
-
maxlength=${1e3}
|
|
3815
|
-
?disabled="${this.disabled}"
|
|
3816
|
-
?readonly="${this.readonly}"
|
|
3817
|
-
/>
|
|
3818
|
-
<div part="correct">${this._correctResponse}</div>
|
|
3819
|
-
`}textChanged(e){if(this.disabled||this.readonly)return;let t=e.target;this.setEmptyAttribute(t.value),this._value!==t.value&&(this.value=t.value,this.saveResponse(t.value))}reportValidity(){let e=this.shadowRoot.querySelector("input");if(!e)return!1;let t=this.validate();return t||e.reportValidity(),t}reset(){this._value=""}setEmptyAttribute(e){this.setAttribute("empty",e===""?"true":"false")}};V.styles=Fr,o([ut({type:Number,attribute:"expected-length"})],V.prototype,"expectedLength",2),o([ut({type:String,attribute:"pattern-mask"})],V.prototype,"patternMask",2),o([ut({type:String,attribute:"placeholder-text"})],V.prototype,"placeholderText",2),o([ut({type:String,attribute:"data-patternmask-message"})],V.prototype,"dataPatternmaskMessage",2),o([ks()],V.prototype,"_value",2),V=o([Cs("qti-text-entry-interaction")],V);import{html as Ss}from"lit";import{customElement as Ls}from"lit/decorators.js";import{property as Ur,query as Ms}from"lit/decorators.js";var Y=(n,s)=>{class e extends n{constructor(){super(...arguments);this._choiceElements=[];this.minChoices=0;this.maxChoices=1;this._handleDisabledChange=(i,l)=>{this._choiceElements.forEach(a=>a.disabled=l)};this._handleReadonlyChange=(i,l)=>{this._choiceElements.forEach(a=>a.readonly=l)};this._value=""}_handleMaxChoicesChange(i,l){this._determineInputType()}get value(){return Array.isArray(this._value)?this._value.join(","):this._value}set value(i){if(this.maxChoices>1&&typeof i=="string"?this._value=i.split(","):this._value=i,Array.isArray(this._value)){let l=new FormData;this._value.forEach(a=>{l.append(this.responseIdentifier,a)}),this._internals.setFormValue(l)}else this._internals.setFormValue(this._value);this._updateChoiceSelection()}get correctResponse(){return this._correctResponse}set correctResponse(i){this._correctResponse=i;let l=Array.isArray(i)?i:[i];this._choiceElements.forEach(a=>{a.internals.states.delete("correct-response"),a.internals.states.delete("incorrect-response"),l.length>0&&(l.includes(a.identifier)?a.internals.states.add("correct-response"):a.internals.states.add("incorrect-response"))})}connectedCallback(){super.connectedCallback(),this.addEventListener(`register-${s}`,this._registerChoiceElement),this.addEventListener(`unregister-${s}`,this._unregisterChoiceElement),this.addEventListener(`activate-${s}`,this._choiceElementSelectedHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(`register-${s}`,this._registerChoiceElement),this.removeEventListener(`unregister-${s}`,this._unregisterChoiceElement),this.removeEventListener(`activate-${s}`,this._choiceElementSelectedHandler)}validate(){let i=this._choiceElements.filter(d=>this._getChoiceChecked(d)),l=i.length,a=!0,c="";return this.maxChoices!==0&&l>this.maxChoices?(a=!1,c=this.dataset.maxSelectionsMessage||`You can select at most ${this.maxChoices} choices.`):l<this.minChoices&&(a=!1,c=this.dataset.minSelectionsMessage||`You must select at least ${this.minChoices} choices.`),i.length>0&&this._internals.setValidity(a?{}:{customError:!0},c,i[l-1]||this._choiceElements[0]||this),this.reportValidity(),a}reportValidity(){return this._validationMessageElement&&(this._internals.validity.valid?(this._validationMessageElement.textContent="",this._validationMessageElement.style.display="none"):(this._validationMessageElement.textContent=this._internals.validationMessage,this._validationMessageElement.style.display="block")),this._internals.validity.valid}_registerChoiceElement(i){i.stopPropagation();let l=i.target;l.disabled=this.disabled,this._choiceElements.push(l),this._setInputType(l)}_unregisterChoiceElement(i){i.stopPropagation();let l=i.target;this._choiceElements=this._choiceElements.filter(a=>a!==l)}_determineInputType(){this._choiceElements.forEach(i=>{this._setInputType(i)})}_setInputType(i){this._internals.ariaLabel=this.maxChoices===1?"radio-group":"checkbox-group";let l=this.maxChoices===1?"radio":"checkbox";i.internals.role=l,i.internals.states.delete(l==="radio"?"checkbox":"radio"),i.internals.states.add(l)}_choiceElementSelectedHandler(i){this._toggleChoiceChecked(i.target),this.maxChoices===1&&this._choiceElements.forEach(l=>{l.identifier!==i.detail.identifier&&this._setChoiceChecked(l,!1)}),this._handleChoiceSelection()}_setChoiceChecked(i,l){i.internals?.states&&(l?(i.internals.states.add("--checked"),i.internals.ariaChecked="true"):(i.internals.states.delete("--checked"),i.internals.ariaChecked="false"))}_getChoiceChecked(i){return i.internals.states.has("--checked")}_toggleChoiceChecked(i){let l=this._getChoiceChecked(i);this._setChoiceChecked(i,!l)}_handleChoiceSelection(){let l=this._choiceElements.filter(a=>this._getChoiceChecked(a)).map(a=>a.identifier);this.value=this.maxChoices===1?l[0]||"":l,this.validate(),this.saveResponse(this._value)}_updateChoiceSelection(){let i=Array.isArray(this._value)?this._value:[this._value];this._choiceElements.forEach(l=>{let a=i.includes(l.identifier);this._setChoiceChecked(l,a)})}}return o([Ms("#validationMessage")],e.prototype,"_validationMessageElement",2),o([Ur({type:Number,attribute:"min-choices"})],e.prototype,"minChoices",2),o([Ur({type:Number,attribute:"max-choices"})],e.prototype,"maxChoices",2),o([v("maxChoices",{waitUntilFirstUpdate:!0})],e.prototype,"_handleMaxChoicesChange",1),o([v("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"_handleDisabledChange",2),o([v("readonly",{waitUntilFirstUpdate:!0})],e.prototype,"_handleReadonlyChange",2),e};var gt=class extends Y(u,"qti-hottext"){constructor(){super(...arguments);this.render=()=>Ss`<slot></slot>`}};gt=o([Ls("qti-hottext-interaction")],gt);import{css as _s,html as Xr}from"lit";import{customElement as As,property as Rs,state as Br}from"lit/decorators.js";import{unsafeHTML as jr}from"lit/directives/unsafe-html.js";var K=class extends u{constructor(){super(...arguments);this.options=[];this.correctOption="";this.dataPrompt="select"}static get styles(){return[_s`
|
|
3820
|
-
:host {
|
|
3821
|
-
display: inline-block;
|
|
3822
|
-
}
|
|
3823
|
-
slot {
|
|
3824
|
-
display: flex;
|
|
3825
|
-
flex-direction: column;
|
|
3826
|
-
}
|
|
3827
|
-
[role='menu'] {
|
|
3828
|
-
position: absolute;
|
|
3829
|
-
z-index: 1000;
|
|
3830
|
-
}
|
|
3831
|
-
.anchor {
|
|
3832
|
-
/* anchor-name: --infobox; */
|
|
3833
|
-
width: fit-content;
|
|
3834
|
-
}
|
|
3835
|
-
|
|
3836
|
-
.positionedElement {
|
|
3837
|
-
position: absolute;
|
|
3838
|
-
/* position-anchor: --infobox; */
|
|
3839
|
-
/* top: anchor(bottom); */
|
|
3840
|
-
}
|
|
3841
|
-
`]}render(){return Xr`
|
|
3842
|
-
<select part="select" @change="${this.choiceSelected}" ?disabled="${this.disabled}" ?readonly="${this.readonly}">
|
|
3843
|
-
${this.options.map(e=>Xr`
|
|
3844
|
-
<option value="${e.value}" ?selected="${e.selected}">${jr(e.textContent)}</option>
|
|
3845
|
-
`)}
|
|
3846
|
-
</select>
|
|
3847
|
-
|
|
3848
|
-
${jr(this.correctOption)}
|
|
3849
|
-
`}connectedCallback(){super.connectedCallback(),this.addEventListener("on-dropdown-selected",this.choiceSelected);let e=Array.from(this.querySelectorAll("qti-inline-choice"));this.options=[{textContent:this.dataPrompt,value:"",selected:!1},...e.map(t=>({textContent:t.innerHTML,value:t.getAttribute("identifier"),selected:!1}))]}disconnectedCallback(){this.removeEventListener("on-dropdown-selected",this.choiceSelected)}validate(){let e=this.options.find(t=>t.selected);return e?e.value!=="":!1}reset(){this.options=this.options.map((e,t)=>({...e,selected:t===0}))}set value(e){this.options=this.options.map(t=>(e===t.value&&(t.selected=!0),t))}get value(){return this.options.find(e=>e.selected).value}set correctResponse(e){if(e===""){this.correctOption="";return}this.correctOption=`<span part="correct-option">${this.options.find(t=>e===t.value).textContent}</span>`}choiceSelected(e){let t=e.target.value;this.options=this.options.map(r=>({...r,selected:r.value===t})),this.saveResponse(t)}};K.inputWidthClass=["","qti-input-width-2","qti-input-width-1","qti-input-width-3","qti-input-width-4","qti-input-width-6","qti-input-width-10","qti-input-width-15","qti-input-width-20","qti-input-width-72"],o([Br()],K.prototype,"options",2),o([Br()],K.prototype,"correctOption",2),o([Rs({attribute:"data-prompt",type:String})],K.prototype,"dataPrompt",2),K=o([As("qti-inline-choice-interaction")],K);import{html as Hs}from"lit";import{customElement as Ns,property as $s}from"lit/decorators.js";import{property as Ds}from"lit/decorators.js";var bt=(n,s)=>{class e extends n{constructor(){super(...arguments);this.shuffle="false"}connectedCallback(){super.connectedCallback(),this._applyShuffle()}updated(i){i.has("shuffle")&&this._applyShuffle()}_applyShuffle(){this.shuffle==="true"?this._shuffleChoices():this._resetShuffleChoices()}_shuffleChoices(){let i=Array.from(this.querySelectorAll(s)),l=i.filter(h=>h.hasAttribute("fixed")),a=i.filter(h=>!h.hasAttribute("fixed"));if(a.length<=1){console.warn("Shuffling is not possible with fewer than 2 non-fixed elements.");return}let c=[...a],d=!1,p=0;for(;!d&&p<10;){p++;for(let h=a.length-1;h>0;h--){let b=Math.floor(Math.random()*(h+1));[a[h],a[b]]=[a[b],a[h]]}d=!a.every((h,b)=>h===c[b])}d||console.warn("Failed to shuffle the choices after multiple attempts.");let m=1;[...l,...a].forEach(h=>{h.style.setProperty("order",String(m++))})}_resetShuffleChoices(){this.querySelectorAll(s).forEach(i=>{i.style.setProperty("order","initial")})}}return o([Ds({type:String,reflect:!0})],e.prototype,"shuffle",2),e};import{property as Is}from"lit/decorators.js";var Wr=(n,s)=>{class e extends n{constructor(){super(...arguments);this._classes=[];this._allLabels=["qti-labels-decimal","qti-labels-lower-alpha","qti-labels-upper-alpha"];this._allLabelSuffixes=["qti-labels-suffix-period","qti-labels-suffix-parenthesis"]}set class(i){i&&(this._classes=i.split(" "),this._addLabels())}get class(){return this._classes?.join(" ")||""}updated(i){super.updated(i),i.has("shuffle")&&this._addLabels()}_addLabels(){let i=this._classes.some(a=>this._allLabels.includes(a)||this._allLabelSuffixes.includes(a)),l=a=>!isNaN(+a);if(i){let c=Array.from(this.querySelectorAll("qti-simple-choice")).map(d=>d).map((d,p)=>({el:d,order:l(d.style.order)?+d.style.order:p+1})).sort((d,p)=>d.order-p.order).map(d=>d.el);for(let d=0;d<c.length;d++)c[d].marker=this._getLabel(d+1)}}_getLabel(i){let l=this._classes.filter(d=>this._allLabels.includes(d)).pop(),a=this._classes.filter(d=>this._allLabelSuffixes.includes(d)).pop();!l&&a&&(l="qti-labels-upper-alpha");let c="";switch(l){case"qti-labels-decimal":c=`${i}`;break;case"qti-labels-lower-alpha":c=`${String.fromCharCode(97+i-1)}`;break;case"qti-labels-upper-alpha":c=`${String.fromCharCode(65+i-1)}`;break}return a==="qti-labels-suffix-period"?c+=".":a==="qti-labels-suffix-parenthesis"&&(c+=")"),c}}return o([Is({type:String,reflect:!0})],e.prototype,"class",1),e};import{css as Vs}from"lit";var Yr=Vs`
|
|
3850
|
-
[part='slot'] {
|
|
3851
|
-
display: flex;
|
|
3852
|
-
flex-direction: column;
|
|
3853
|
-
gap: var(--qti-gap-size);
|
|
3854
|
-
flex-wrap: wrap;
|
|
3855
|
-
}
|
|
3856
|
-
|
|
3857
|
-
::slotted(qti-simple-choice) {
|
|
3858
|
-
flex: 0 0
|
|
3859
|
-
calc((100% - (var(--qti-gap-size) * var(--choice-interactions-stacking))) / var(--choice-interactions-stacking)) !important;
|
|
3860
|
-
box-sizing: border-box !important;
|
|
3861
|
-
}
|
|
3862
|
-
|
|
3863
|
-
:host(.qti-choices-stacking-1) [part='slot'] {
|
|
3864
|
-
flex-direction: row;
|
|
3865
|
-
--choice-interactions-stacking: 1;
|
|
3866
|
-
}
|
|
3867
|
-
|
|
3868
|
-
:host(.qti-choices-stacking-2) [part='slot'] {
|
|
3869
|
-
flex-direction: row;
|
|
3870
|
-
--choice-interactions-stacking: 2;
|
|
3871
|
-
}
|
|
3872
|
-
:host(.qti-choices-stacking-3) [part='slot'] {
|
|
3873
|
-
flex-direction: row;
|
|
3874
|
-
--choice-interactions-stacking: 3;
|
|
3875
|
-
}
|
|
3876
|
-
:host(.qti-choices-stacking-4) [part='slot'] {
|
|
3877
|
-
flex-direction: row;
|
|
3878
|
-
--choice-interactions-stacking: 4;
|
|
3879
|
-
}
|
|
3880
|
-
:host(.qti-choices-stacking-5) [part='slot'] {
|
|
3881
|
-
flex-direction: row;
|
|
3882
|
-
--choice-interactions-stacking: 5;
|
|
3883
|
-
}
|
|
3884
|
-
:host([orientation='horizontal']) [part='slot'] {
|
|
3885
|
-
flex-direction: row;
|
|
3886
|
-
}
|
|
3887
|
-
`;var ge=class extends Wr(bt(Y(u,"qti-simple-choice"),"qti-simple-choice"),"qti-simple-choice"){constructor(){super(),this._internals.role="group"}render(){return Hs`
|
|
3888
|
-
<slot part="prompt" name="prompt"></slot><slot part="slot"></slot>
|
|
3889
|
-
<div part="message" role="alert" id="validationMessage"></div>
|
|
3890
|
-
`}};ge.styles=Yr,o([$s({type:String})],ge.prototype,"orientation",2),ge=o([Ns("qti-choice-interaction")],ge);import{css as zs,html as Os}from"lit";import{customElement as Fs}from"lit/decorators.js";var He=class extends u{constructor(){super(...arguments);this._file=null;this._base64=null}reset(){this._file=null,this._base64=null,this.saveResponse(null)}validate(){return this._base64!==null}get value(){return this._base64}set value(e){if(typeof e=="string")this._base64=e,this.saveResponse(e);else if(e===null)this.reset();else throw new Error("Value must be a Base64-encoded string or null")}static get properties(){return{...u.properties}}render(){return Os`
|
|
3891
|
-
<div>
|
|
3892
|
-
<slot name="prompt"></slot>
|
|
3893
|
-
<input type="file" @change="${this._onFileChange}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" />
|
|
3894
|
-
</div>
|
|
3895
|
-
`}async _onFileChange(e){let t=e.target;t.files&&t.files.length>0&&(this._file=t.files[0],this._base64=await this._convertToBase64(this._file),this.saveResponse(this._base64),this.dispatchEvent(new CustomEvent("qti-interaction-response",{detail:{response:this._base64}})))}_convertToBase64(e){return new Promise((t,r)=>{let i=new FileReader;i.onload=()=>t(i.result),i.onerror=()=>r(i.error),i.readAsDataURL(e)})}};He.styles=[zs`
|
|
3896
|
-
:host {
|
|
3897
|
-
display: block;
|
|
3898
|
-
margin: 1em 0;
|
|
3899
|
-
}
|
|
3900
|
-
input[type='file'] {
|
|
3901
|
-
display: block;
|
|
3902
|
-
margin-top: 0.5em;
|
|
3903
|
-
}
|
|
3904
|
-
`],He=o([Fs("qti-upload-interaction")],He);import{css as Ps,html as Us,LitElement as Xs}from"lit";import{customElement as Bs}from"lit/decorators.js";var Ne=class extends Xs{render(){return Us`<slot></slot>`}process(){let s=new Ht,e=[...this.children];s.process(e)}};Ne.styles=[Ps`
|
|
3905
|
-
:host {
|
|
3906
|
-
display: none;
|
|
3907
|
-
}
|
|
3908
|
-
`],Ne=o([Bs("qti-outcome-processing")],Ne);var Ht=class{process(s){for(let e of s)e.process()}};import{css as js,html as Ws,LitElement as Ys}from"lit";import{customElement as Ks}from"lit/decorators.js";var Kr=`<qti-response-processing>
|
|
3909
|
-
<qti-response-condition>
|
|
3910
|
-
<qti-response-if>
|
|
3911
|
-
<qti-match>
|
|
3912
|
-
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
3913
|
-
<qti-correct identifier="RESPONSE"></qti-correct>
|
|
3914
|
-
</qti-match>
|
|
3915
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
3916
|
-
<qti-base-value base-type="float">1</qti-base-value>
|
|
3917
|
-
</qti-set-outcome-value>
|
|
3918
|
-
</qti-response-if>
|
|
3919
|
-
<qti-response-else>
|
|
3920
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
3921
|
-
<qti-base-value base-type="float">0</qti-base-value>
|
|
3922
|
-
</qti-set-outcome-value>
|
|
3923
|
-
</qti-response-else>
|
|
3924
|
-
</qti-response-condition>
|
|
3925
|
-
</qti-response-processing>`,Gr=`<qti-response-processing>
|
|
3926
|
-
<qti-response-condition>
|
|
3927
|
-
<qti-response-if>
|
|
3928
|
-
<qti-is-null>
|
|
3929
|
-
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
3930
|
-
</qti-is-null>
|
|
3931
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
3932
|
-
<qti-base-value base-type="float">0.0</qti-base-value>
|
|
3933
|
-
</qti-set-outcome-value>
|
|
3934
|
-
</qti-response-if>
|
|
3935
|
-
<qti-response-else>
|
|
3936
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
3937
|
-
<qti-map-response identifier="RESPONSE"> </qti-map-response>
|
|
3938
|
-
</qti-set-outcome-value>
|
|
3939
|
-
</qti-response-else>
|
|
3940
|
-
</qti-response-condition>
|
|
3941
|
-
</qti-response-processing>`,Jr=`<qti-response-processing>
|
|
3942
|
-
<qti-response-condition>
|
|
3943
|
-
<qti-response-if>
|
|
3944
|
-
<qti-is-null>
|
|
3945
|
-
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
3946
|
-
</qti-is-null>
|
|
3947
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
3948
|
-
<qti-base-value base-type="float">0</qti-base-value>
|
|
3949
|
-
</qti-set-outcome-value>
|
|
3950
|
-
</qti-response-if>
|
|
3951
|
-
<qti-response-else>
|
|
3952
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
3953
|
-
<qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
|
|
3954
|
-
</qti-set-outcome-value>
|
|
3955
|
-
</qti-response-else>
|
|
3956
|
-
</qti-response-condition>
|
|
3957
|
-
</qti-response-processing>`;var ee=class extends Ys{render(){return Ws`<slot></slot>`}process(){if(!this.closest("qti-assessment-item"))return;let e=[...this.children];for(let t of e)t.process()}firstUpdated(s){if(this.getAttribute("template")){let e=this.getAttribute("template").split("/"),t=e[e.length-1].replace(".xml","");switch(this.innerHTML="",t){case"map_response":{this.appendChild(this.fragmentFromString(Gr).firstElementChild.firstElementChild);break}case"map_response_point":{this.appendChild(this.fragmentFromString(Jr).firstElementChild.firstElementChild);break}case"match_correct":this.appendChild(this.fragmentFromString(Kr).firstElementChild.firstElementChild);break}}}fragmentFromString(s){return document.createRange().createContextualFragment(s)}};ee.styles=[js`
|
|
3958
|
-
:host {
|
|
3959
|
-
display: none;
|
|
3960
|
-
}
|
|
3961
|
-
`],ee=o([Ks("qti-response-processing")],ee);import{property as Qs}from"lit/decorators.js";import{customElement as Gs}from"lit/decorators.js";import{html as Js,LitElement as Zs}from"lit";var H=class extends Zs{render(){return Js`<slot></slot>`}process(){throw new Error("Not implemented")}};H=o([Gs("qti-rule")],H);var ft=class extends H{get childExpression(){return this.firstElementChild}process(){let s=this.getAttribute("identifier"),e=this.closest("qti-assessment-item").getVariable(s),t;return e.interpolationTable&&(t=e.interpolationTable.get(parseInt(this.childExpression.calculate()))),t==null?(console.warn("lookupOutcomeValue: value is null or undefined"),0):(this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:this.identifier,value:_e(t)}})),t)}};o([Qs({type:String})],ft.prototype,"identifier",2);customElements.define("qti-lookup-outcome-value",ft);import{html as ea}from"lit";var Nt=class extends H{render(){return ea`<slot></slot>`}process(){let s=[...this.children];for(let e=0;e<s.length;e++){let t=s[e];if(t.calculate()){t.process();return}}}};customElements.define("qti-response-condition",Nt);var $t=class extends H{process(){let s=this.getAttribute("identifier"),e=this.firstElementChild,r=new zt(e).process();this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:s,value:Array.isArray(r)?r.map(i=>_e(i)):_e(r)}}))}},zt=class{constructor(s){this.expression=s}process(){let s=this.expression?this.expression.calculate():null;if(s==null){console.warn("setOutcomeValue: value is null or undefined");return}return s}};customElements.define("qti-set-outcome-value",$t);import{LitElement as ta,html as ra}from"lit";var $e=class extends ta{render(){return ra`<slot></slot>`}calculate(){return!0}getSubRules(){return[...this.children]}process(){let s=this.getSubRules();for(let e=0;e<s.length;e++)s[e].process()}};customElements.define("qti-response-else",$e);import{html as ia}from"lit";var ze=class extends $e{calculate(){return this.firstElementChild.calculate()}getSubRules(){let s=[];for(let e=1;e<this.children.length;e++)s.push(this.children[e]);return s}};customElements.define("qti-response-if",ze);var Ot=class extends ze{render(){return ia`${super.render()}`}};customElements.define("qti-response-else-if",Ot);import{consume as oa}from"@lit/context";import{css as sa,html as aa,LitElement as na}from"lit";import{state as Zr}from"lit/decorators.js";var g=class extends na{constructor(){super(...arguments);this.getVariables=()=>Array.from(this.children).map(e=>{switch(e.tagName.toLowerCase()){case"qti-base-value":return{baseType:e.getAttribute("base-type"),value:e.textContent.trim(),cardinality:"single"};case"qti-variable":{let t=e.getAttribute("identifier")||"";return this.context.variables.find(i=>i.identifier===t)||null}case"qti-multiple":{let r=e.getResult();return r.length>0?{identifier:"",baseType:r[0].baseType,value:r.map(i=>i.value),cardinality:"multiple",type:"response"}:null}case"qti-correct":{let t=e.getAttribute("identifier")||"",r=this.context.variables.find(i=>i.identifier===t)||null;return{baseType:r.baseType,value:r.correctResponse,cardinality:r.cardinality}}default:{try{return{baseType:"integer",value:e.getResult().toString(),cardinality:"single"}}catch{console.warn("default not sufficient")}return null}}}).filter(e=>e!==null)}render(){return aa`<pre>${JSON.stringify(this.result,null,2)}</pre>
|
|
3962
|
-
<slot></slot>`}calculate(){return this.result=this.getResult(),this.result}getResult(){throw new Error("Not implemented")}};g.styles=sa`
|
|
3963
|
-
slot {
|
|
3964
|
-
display: none;
|
|
3965
|
-
}
|
|
3966
|
-
`,o([Zr()],g.prototype,"result",2),o([oa({context:x,subscribe:!0}),Zr()],g.prototype,"context",2);var T=class extends g{calculate(){return this.result=this.getResult(),this.result}getResult(){throw new Error("Not implemented")}};var vt=class extends la(T){calculate(){return this.calculateChildren(Array.from(this.children))}};function la(n){return class extends n{calculateChildren(e){return e.map(r=>{let i=r;if(!i.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let l=i.calculate(),a=!1;if(typeof l=="string")if(l==="true")a=!0;else if(l==="false")a=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof l=="boolean"&&(a=l);return a}).every(r=>typeof r=="boolean"&&r)}}}customElements.define("qti-and",vt);import{property as ca}from"lit/decorators.js";var yt=class extends g{constructor(){super(...arguments);this.baseType="string"}getResult(){return this.textContent.trim()}};o([ca({type:String,attribute:"base-type"})],yt.prototype,"baseType",2);customElements.define("qti-base-value",yt);var Ft=class extends T{getResult(){let s=this.getVariables();if(this.children.length===2){let e=s[0],t=s[1];if(e.baseType==="directedPair"&&t.baseType==="directedPair"&&e.cardinality==="multiple"){let r=e.value,i=t.value;return r.filter(c=>i.includes(c)).length>0}else if(e.baseType==="directedPair"&&t.baseType==="directedPair"&&e.cardinality==="single"){let r=e.value;return t.value.includes(r)}else console.error("unsupported baseType or cardinality in qti contains, only baseType: directedPair and cardinality: multiple is supported")}else console.error("unexpected number of children in qti contains");return!1}};customElements.define("qti-contains",Ft);var Pt=class extends g{get interpretation(){return this.getAttribute("interpretation")||""}getResult(){let s=this.getAttribute("identifier")||"",e=this.context.variables.find(t=>t.identifier===s)||null;return e.cardinality!=="single"?e.correctResponse.length>0?e.correctResponse[0]:"":e.correctResponse}};customElements.define("qti-correct",Pt);import{property as da}from"lit/decorators.js";var qt=class extends g{constructor(){super(...arguments);this.roundingMode="significantFigures"}get figures(){if(!this.getAttribute("figures"))return console.error("figures attribute is missing"),null;let t=parseInt(this.getAttribute("figures")||"0");return isNaN(t)?(console.error("figures attribute is not a number"),null):t<0?(console.error("figures attribute is negative"),null):t<1&&this.roundingMode==="significantFigures"?(console.error("figures cannot be smaller than 1 for RoundingMode significantFigures"),null):t}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if(this.roundingMode===null)return null;if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("unexpected cardinality in qti equal"),!1;switch(e[0].baseType){case"integer":case"float":{let i=parseFloat(t.value),l=parseFloat(r.value);if(!isNaN(i)&&!isNaN(l))return this.roundingMode==="significantFigures"?i.toPrecision(this.figures)===l.toPrecision(this.figures):Math.round(i*Math.pow(10,this.figures))/Math.pow(10,this.figures)===Math.round(l*Math.pow(10,this.figures))/Math.pow(10,this.figures);console.error(`value cannot be casted to numeric value in equalRounded operator: ${i}, ${l}`);break}default:{console.error("values other than float and int cannot be used in equalRounded operator.");break}}return!1}return console.error("unexpected number of children in qti-equal-rounded"),null}};o([da({type:String})],qt.prototype,"roundingMode",2);customElements.define("qti-equal-rounded",qt);import{property as pa}from"lit/decorators.js";var M=class{static compareSingleValues(s,e,t){switch(t){case"identifier":case"string":return s===e;case"integer":{let r=parseInt(s,10),i=parseInt(e,10);if(!isNaN(r)&&!isNaN(i))return r===i;console.error(`Cannot convert ${s} and/or ${e} to int.`);break}case"float":{let r=parseFloat(s),i=parseFloat(e);if(!isNaN(r)&&!isNaN(i))return r===i;console.error(`couldn't convert ${s} and/or ${e} to float.`);break}case"pair":case"directedPair":{let r=s.split(" ").sort(),i=e.split(" ").sort();if(r.length===2&&i.length===2)return t==="pair"&&(r.sort(),i.sort()),r.join(" ")===i.join(" ");console.error(`compared two pair but one of the values does not have 2 values: 1: ${s} 2: ${e}`);break}}return!1}};var xt=class extends g{constructor(){super(...arguments);this.toleranceMode="exact"}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];return this.toleranceMode!=="exact"?(console.error("toleranceMode is not supported yet"),!1):t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value)?(console.error("unexpected cardinality in qti equal"),!1):M.compareSingleValues(t.value,r.value,t.baseType)}return console.error("unexpected number of children in qti-equal"),null}};o([pa({type:String})],xt.prototype,"toleranceMode",2);customElements.define("qti-equal",xt);var Ut=class extends g{getResult(){if(this.children.length===2){let s=this.getVariables(),e=s[0],t=s[1];if((e.baseType==="integer"||e.baseType==="float")&&(t.baseType==="integer"||t.baseType==="float"))return+e.value>+t.value;console.error("unexpected baseType or cardinality in qti gt")}return console.error("unexpected number of children in qt"),null}};customElements.define("qti-gt",Ut);var Xt=class extends T{getResult(){if(this.children.length===2){let s=this.getVariables(),e=s[0],t=s[1];return(e.baseType==="integer"||e.baseType==="float")&&(t.baseType==="integer"||t.baseType==="float")?+e.value>=+t.value:(console.error("unexpected baseType or cardinality in qti gte"),null)}return console.log("unexpected number of children in qte"),null}};customElements.define("qti-gte",Xt);var Bt=class extends g{getResult(){if(this.children.length===1){let s=this.getVariables();if(!s)return!0;let e=s[0].value;return e==null||e==null||e===""}return console.error("unexpected number of children in qti Null"),null}};customElements.define("qti-is-null",Bt);var jt=class extends g{getResult(){if(this.children.length===2){let s=this.getVariables(),e=s[0],t=s[1];if((e.baseType==="integer"||e.baseType==="float")&&(t.baseType==="integer"||t.baseType==="float"))return+e.value<+t.value;console.error("unexpected baseType or cardinality in qti lt")}return console.error("unexpected number of children in lt"),null}};customElements.define("qti-lt",jt);var Wt=class extends T{getResult(){if(this.children.length===2){let s=this.getVariables(),e=s[0],t=s[1];return(e.baseType==="integer"||e.baseType==="float")&&(t.baseType==="integer"||t.baseType==="float")?+e.value<=+t.value:(console.error("unexpected baseType or cardinality in qti lte"),null)}return console.log("unexpected number of children in lte"),null}};customElements.define("qti-lte",Wt);import{property as ma}from"lit/decorators.js";var wt=class extends g{getResult(){let s=this.context.variables.find(i=>i.identifier===this.identifier);if(!s)return console.warn(`Response ${this.identifier} can not be found`),null;let e=s.mapping,t=Array.isArray(s.value)?s.value:[s.value],r=0;for(let i of t){let l=e.mapEntries.find(a=>M.compareSingleValues(a.mapKey,i,s.baseType));l==null||l.mappedValue==null?r+=e.defaultValue:r+=l.mappedValue}return e.lowerBound!=null&&(r=Math.max(e.lowerBound,r)),e.upperBound!=null&&(r=Math.min(e.upperBound,r)),r}};o([ma({type:String})],wt.prototype,"identifier",2);customElements.define("qti-map-response",wt);import{property as Yt}from"lit/decorators.js";import{LitElement as ha}from"lit";var be=class extends ha{constructor(){super(...arguments);this.defaultValue=0}get mapEntries(){return Array.from(this.querySelectorAll("qti-map-entry")).map(e=>({mapKey:e.getAttribute("map-key"),mappedValue:+e.getAttribute("mapped-value")}))}};o([Yt({attribute:"default-value",type:Number})],be.prototype,"defaultValue",2),o([Yt({attribute:"lower-bound",type:Number})],be.prototype,"lowerBound",2),o([Yt({attribute:"upper-bound",type:Number})],be.prototype,"upperBound",2);customElements.define("qti-mapping",be);var Kt=class n extends g{getResult(){if(this.children.length===2){let s=this.getVariables(),e=s[0],t=s[1];return n.match(e,t)}return console.error("unexpected number of children in match"),null}static match(s,e){switch(e.cardinality){case"single":return s.value===null?!1:Array.isArray(s.value)||Array.isArray(e.value)?(console.error("unexpected cardinality in qti match"),!1):M.compareSingleValues(s.value?.toString(),e.value.toString(),e.baseType);case"ordered":{if(!Array.isArray(s.value)||!Array.isArray(e.value))return console.error("unexpected cardinality in qti match"),!1;if(s.value.length!==e.value.length)return!1;for(let t=0;t<s.value.length;t++)if(!M.compareSingleValues(e.value[t],s.value[t],e.baseType))return!1;return!0}case"multiple":{if(!Array.isArray(s.value)||!Array.isArray(e.value))return console.error("unexpected cardinality in qti match"),!1;if(s.value.length!==e.value.length)return!1;let t=0;for(let r of e.value){let i=null,l=[...s.value];for(let a of l)if(M.compareSingleValues(r,a,e.baseType)){i=a;break}if(i!==null)l.splice(l.indexOf(i),1);else return!1;t++}return!0}default:return console.error("unexpected cardinality in qti match"),!1}}};customElements.define("qti-match",Kt);var Gt=class extends g{getResult(){let s=this.getVariables();this.children.length!==2&&console.warn("The member operator takes two sub-expressions");let[e,t]=s;if(e.baseType===t.baseType||e.baseType==="integer"&&t.baseType==="float"||e.baseType==="float"&&t.baseType==="integer"||console.warn("Which must both have the same base-type"),t.cardinality==="multiple"||t.cardinality==="ordered"||console.warn("and the second must be a multiple or ordered container"),(e.baseType==="float"||t.baseType==="float")&&console.warn("The member operator should not be used on sub-expressions with a base-type of float"),(e.baseType==="duration"||t.baseType==="duration")&&console.warn("It must not be used on sub-expressions with a base-type of duration"),e.value===null||t.value===null)return null;let r=e.value;return t.value.includes(r)}};customElements.define("qti-member",Gt);var Jt=class extends g{getResult(){let s=this.getVariables();if(s.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let e of s)if(e.cardinality!=="multiple"&&e.cardinality!=="single")return console.error("unexpected cardinality in qti multiple"),[];return s}};customElements.define("qti-multiple",Jt);import{html as ua}from"lit";var Zt=class extends g{render(){return ua`${super.render()}`}getResult(){return!this.firstElementChild.calculate()}};customElements.define("qti-not",Zt);var Qt=class extends T{getResult(){return Array.from(this.children).map(e=>{let t=e;if(!t.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let r=t.calculate(),i=!1;if(typeof r=="string")if(r==="true")i=!0;else if(r==="false")i=!1;else return console.error("unexpected val in qti-or, expected boolean"),null;else typeof r=="boolean"&&(i=r);return i}).some(e=>typeof e=="boolean"&&e)}};customElements.define("qti-or",Qt);var er=class extends g{getResult(){let s=this.getVariables();if(s.length===0)return console.error("unexpected number of children in qti multiple"),null;for(let e of s)if(e.cardinality!=="ordered"&&e.cardinality!=="single")return console.error("unexpected cardinality in qti ordered"),[];return s}};customElements.define("qti-ordered",er);import{consume as ga}from"@lit/context";import{LitElement as ba,html as fa}from"lit";import{property as va,state as ya}from"lit/decorators.js";var Oe=class extends ba{render(){let s=this.context?.variables.find(e=>e.identifier===this.identifier)?.value;return fa`${JSON.stringify(s,null,2)}`}calculate(){return this.context.variables.find(e=>e.identifier===this.identifier)||null}};o([va({type:String})],Oe.prototype,"identifier",2),o([ga({context:x,subscribe:!0}),ya()],Oe.prototype,"context",2);customElements.define("qti-printed-variable",Oe);var tr=class extends g{getResult(){return this.getVariables().reduce((t,r)=>{if(r.baseType=="float"||r.baseType=="integer")try{return t*parseInt(r.value.toString())}catch{console.warn("can not convert to number")}else console.warn(`has another baseType ${r.baseType}`);return t},1)}};customElements.define("qti-product",tr);var Et=class extends qa(g){getResult(){return this.calculateChildren(Array.from(this.children))}};function qa(n){return class extends n{calculateChildren(e){let t=e.map(r=>{if(!r.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let i=r.calculate();return Number.isNaN(i)?(console.error("Unexpected value in qti-subtract, expected number"),null):Number(i)});return t.some(r=>r===null)?(console.error("One or more child expressions returned invalid values"),0):t[0]-t[1]}}}customElements.define("qti-subtract",Et);import{property as xa}from"lit/decorators.js";var Ct=class extends g{constructor(){super(...arguments);this.caseSensitive="true"}getResult(){if(this.children.length===2){let e=this.getVariables(),t=e[0],r=e[1];if(t.cardinality!=="single"||r.cardinality!=="single"||Array.isArray(t.value)||Array.isArray(r.value))return console.error("unexpected cardinality in qti string-match"),!1;let i=this.caseSensitive==="true"?t.value:t.value.toLowerCase(),l=this.caseSensitive==="true"?r.value:r.value.toLowerCase();return M.compareSingleValues(i,l,t.baseType)}return console.error("unexpected number of children in qti-string-match"),null}};o([xa({type:String,attribute:"case-sensitive"})],Ct.prototype,"caseSensitive",2);customElements.define("qti-string-match",Ct);var rr=class extends g{constructor(){super(),this._expression=new ir(Array.from(this.children))}getResult(){return this._expression.calculate()}},ir=class{constructor(s){this.expressions=s}calculate(){return this.expressions.map(e=>{if(!e.calculate)return console.error("Element doesn't implement QtiConditionExpression"),null;let t=e.calculate();return Number.isNaN(t)?(console.error("unexpected value in qti-sum, expected number"),null):Number(t)}).reduce((e,t)=>e+t,0)}};customElements.define("qti-sum",rr);var or=class extends g{getResult(){let s=this.getAttribute("identifier");return this.context.variables.find(t=>t.identifier===s).value}};customElements.define("qti-variable",or);import{html as Qr}from"lit";import{customElement as wa,property as ei,state as Ea}from"lit/decorators.js";var te=class extends u{constructor(){super(...arguments);this._errorMessage=null;this.loadConfig=async(e,t)=>{e=this.removeDoubleSlashes(e);try{let r=await fetch(e);if(r.ok){let l=await r.json();for(let a in l.paths)t&&(l.paths[a]=this.getResolvablePath(l.paths[a],t));return l}}catch{}return null};this.getResolvablePathString=(e,t)=>(e=e.replace(/\.js$/,""),e?.toLocaleLowerCase().startsWith("http")||!t?e:this.removeDoubleSlashes(`${t}/${e}`));this.getResolvablePath=(e,t)=>Array.isArray(e)?e.map(r=>this.getResolvablePathString(r,t)):this.getResolvablePathString(e,t)}convertQtiVariableJSON(e){for(let t in e)if(e.hasOwnProperty(t)){let r=e[t];if(r){for(let i in r)if(r.hasOwnProperty(i)){let l=r[i];if(Array.isArray(l))return l.map(String);if(l!=null)return String(l)}}}return null}startChecking(){this.intervalId=setInterval(()=>{let e=this.pci.getResponse(),t=this.pci.getResponse(),r=JSON.stringify(e);if(r!==this.rawResponse){this.rawResponse=r;let i=this.convertQtiVariableJSON(t);this.value=i,this.saveResponse(i)}},200)}stopChecking(){this.intervalId!==void 0&&clearInterval(this.intervalId)}validate(){return!0}set value(e){}get value(){return this.rawResponse}getTAOConfig(e){let t=e.querySelectorAll("properties"),r={},i=a=>{let c={},d=a.getAttribute("key");if(d){let p=Array.from(a.children),m=p.map(b=>b.getAttribute("key"));m.length>0&&!m.find(b=>!Number.isInteger(+b))?c[d]=p.map(b=>l(b)):c[d]=a.textContent}return c},l=a=>{if(a){let c={};for(let d of a.children)c={...c,...i(d)};return c}};for(let a of t)return a.getAttribute("key")||(r={...r,...l(a)}),r;return console.log("Can not find qti-custom-interaction config"),null}register(e){this.pci=e;let t=this.parentElement.tagName==="QTI-CUSTOM-INTERACTION"?"TAO":"IMS",r=t=="IMS"?this.querySelector("qti-interaction-markup"):this.querySelector("markup");r.classList.add("qti-customInteraction"),t=="TAO"&&this.querySelector("properties")&&(this.querySelector("properties").style.display="none");let i=t=="IMS"?{properties:this.dataset,onready:()=>{console.log("onready")}}:this.getTAOConfig(this);t=="IMS"?e.getInstance(r,i,void 0):e.initialize(this.customInteractionTypeIdentifier,r.firstElementChild,i),t=="TAO"&&Array.from(this.querySelectorAll("link")).map(a=>a.getAttribute("href")).forEach(a=>{let c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.media="screen",c.href=a,r.appendChild(c)}),this.startChecking()}connectedCallback(){super.connectedCallback(),define("qtiCustomInteractionContext",()=>({register:r=>{this.register(r)},notifyReady:()=>{}}));let e=this.buildRequireConfig();requirejs.config(e)(["require"],r=>{r([this.module])})}disconnectedCallback(){super.disconnectedCallback(),requirejs.undef(this.customInteractionTypeIdentifier);let e=requirejs.s.contexts;delete e[this.customInteractionTypeIdentifier],this.stopChecking()}buildRequireConfig(){let e={context:this.customInteractionTypeIdentifier,catchError:!0,paths:window.requirePaths||{},shim:window.requireShim||{}};if(!globalThis.require)return this._errorMessage="RequireJS not found. Please load it via CDN: https://cdnjs.com/libraries/require.js",null;let t=this.getAttribute("data-base-url"),r=this.querySelector("qti-interaction-modules");if(r){let i=r.querySelectorAll("qti-interaction-module");for(let l of i){let a=l.getAttribute("id"),c=l.getAttribute("primary-path"),d=l.getAttribute("fallback-path");if(a&&c){let p=d?this.combineRequireResolvePaths(this.getResolvablePath(c,t),this.getResolvablePath(d,t)):this.getResolvablePath(c,t),m=e.paths[a]||[];e.paths[a]=this.combineRequireResolvePaths(m,p)}}}return e}combineRequireResolvePaths(e,t){let r=Array.isArray(e)?e:[e],i=Array.isArray(t)?t:[t];return r.concat(i)}removeDoubleSlashes(e){return e.replace(/([^:]\/)\/+/g,"$1").replace(/\/\//g,"/").replace("http:/","http://").replace("https:/","https://")}render(){return Qr`<slot></slot>${this._errorMessage&&Qr`<div style="color:red">
|
|
3967
|
-
<h1>Error</h1>
|
|
3968
|
-
${this._errorMessage}
|
|
3969
|
-
</div>`}`}};o([ei({type:String,attribute:"module"})],te.prototype,"module",2),o([ei({type:String,attribute:"custom-interaction-type-identifier"})],te.prototype,"customInteractionTypeIdentifier",2),o([Ea()],te.prototype,"_errorMessage",2),te=o([wa("qti-portable-custom-interaction")],te);import{html as ii}from"lit";import{customElement as ka,state as Ta}from"lit/decorators.js";var ti=(n,s,e)=>{class t extends n{}return t};import{property as sr}from"lit/decorators.js";var N=(n,s,e,t)=>{class r extends ti(n,e,s){constructor(){super(...arguments);this.observer=null;this.droppableObsever=null;this.resizeObserver=null;this.draggables=[];this.droppables=[];this.dragContainers=[];this.dragClone=null;this.dragSource=null;this.touchStartPoint=null;this.isDraggable=!1;this.cloneOffset={x:0,y:0};this.isDragging=!1;this.rootNode=null;this.allDropzones=[];this.lastTarget=null;this.dropzoneOriginalParent=null;this.currentDropTarget=null;this.MIN_DRAG_DISTANCE=5;this.DRAG_CLONE_OPACITY=1;this.dataTransfer={data:{},setData(a,c){this.data[a]=c},getData(a){return this.data[a]},effectAllowed:"move"};this.configuration={copyStylesDragClone:!0,dragCanBePlacedBack:!0,dragOnClick:!1};this.minAssociations=1;this.maxAssociations=1;this.draggablesModified=(a,c)=>{for(let p of c)this.draggables.includes(p)&&(this.draggables=this.draggables.filter(m=>m!==p),p.removeAttribute("tabindex"),p.removeEventListener("touchstart",this.handleTouchStart.bind(this)),p.removeEventListener("mousedown",this.handleTouchStart.bind(this)));for(let p of a)this.draggables.includes(p)||(this.draggables.push(p),p.setAttribute("tabindex","0"),p.hasTouchStartListener||(p.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!1}),p.addEventListener("mousedown",this.handleTouchStart.bind(this),{passive:!1}),p.hasTouchStartListener=!0));let d=0;this.draggables.forEach(p=>{p.style.viewTransitionName=`drag-${d}-${this.getAttribute("identifier")||crypto.randomUUID()}`,p.setAttribute("qti-draggable","true"),p.addEventListener("dragstart",this.handleDragStart),p.addEventListener("dragend",this.handleDragEnd),d++})};this.droppablesModified=(a,c)=>{for(let d of c)this.droppables.includes(d)&&(this.droppables=this.droppables.filter(p=>p!==d),this.allDropzones=this.allDropzones.filter(p=>p!==d));for(let d of a)this.droppables.includes(d)||(this.droppables.push(d),this.allDropzones.push(d));for(let d of this.droppables)this.dataset.choicesContainerWidth&&(d.style.width=`${this.dataset.choicesContainerWidth}px`,d.style.boxSizing="border-box")};this.handleDragStart=a=>{let c=a.currentTarget;a.dataTransfer.setData("text",c.getAttribute("identifier")),this.responseIdentifier&&a.dataTransfer.setData("responseIdentifier",this.responseIdentifier),this._internals.states.add("--dragzone-enabled"),this._internals.states.add("--dragzone-active"),c.setAttribute("dragging",""),this.activateDragLocation(),this.activateDroppables(c)};this.handleDragEnd=async a=>{a.preventDefault();let c=a.currentTarget;this._internals.states.delete("--dragzone-enabled"),this._internals.states.delete("--dragzone-active"),this.deactivateDragLocation(),this.deactivateDroppables(),c.removeAttribute("dragging")}}handleDraggableContainerChange(a,c){this.isMatchTabular()||(a.length>0||c.length>0)&&this.dragContainersModified(a||[],c||[])}dragContainersModified(a,c){for(let d of c)this.dragContainers.includes(d)&&(this.dragContainers=this.dragContainers.filter(p=>p!==d),this.allDropzones=this.allDropzones.filter(p=>p!==d));for(let d of a)this.dragContainers.includes(d)||(this.dragContainers.push(d),this.allDropzones.push(d))}handleDraggablesChange(a,c){this.isMatchTabular()||(a.length>0||c.length>0)&&this.draggablesModified(a||[],c||[])}handleDroppablesChange(a,c){this.isMatchTabular()||(a.length>0||c.length>0)&&this.droppablesModified(a||[],c||[])}firstUpdated(a){super.firstUpdated(a),this.hasAttribute("disabled")||(document.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!1}),document.addEventListener("mousemove",this.handleTouchMove.bind(this),{passive:!1}),document.addEventListener("touchend",this.handleTouchEnd.bind(this),{passive:!1}),document.addEventListener("mouseup",this.handleTouchEnd.bind(this),{passive:!1}),document.addEventListener("touchcancel",this.handleTouchCancel.bind(this),{passive:!1}));let d=Array.from(this.querySelectorAll(s)||[]).concat(Array.from(this.shadowRoot?.querySelectorAll(s)||[])),p=Array.from(this.querySelectorAll(e)||[]).concat(Array.from(this.shadowRoot?.querySelectorAll(e)||[])),m=Array.from(this.querySelectorAll(t)||[]).concat(Array.from(this.shadowRoot?.querySelectorAll(t)||[]));this.dragContainersModified(m,[]),this.droppablesModified(p,[]),this.draggablesModified(d,[]),this.updateMinDimensionsForDropZones(),this.observer=new MutationObserver(()=>this.updateMinDimensionsForDropZones()),this.observer.observe(this,{childList:!0,subtree:!0}),this.resizeObserver=new ResizeObserver(()=>this.updateMinDimensionsForDropZones()),this.querySelectorAll("qti-gap-text").forEach(b=>this.resizeObserver?.observe(b))}async moveDraggableToDroppable(a,c){(()=>{a.style.transform="translate(0, 0)",c.tagName==="SLOT"?a.setAttribute("slot",c.getAttribute("name")):c.appendChild(a),this.checkAllMaxAssociations(),this.saveResponse()})()}activateDroppable(a){this.dragContainers.includes(a)?(this._internals.states.add("--dragzone-active"),a.setAttribute("active","")):(this._internals.states.delete("--dragzone-active"),a.setAttribute("active",""))}deactivateDroppable(a,c=!0){c&&this._internals.states.add("--dragzone-active"),a.removeAttribute("active")}connectedCallback(){super.connectedCallback()}isMatchTabular(){return this.classList.contains("qti-match-tabular")}updateMinDimensionsForDropZones(){let a=this.querySelectorAll(s),c=Array.from(this.querySelectorAll(e)).map(h=>h),d=0,p=0;a.forEach(h=>{let b=h.getBoundingClientRect();d=Math.max(d,b.height),p=Math.max(p,b.width)});let m=this.querySelector(t)||this.shadowRoot?.querySelector(t);m&&(m.style.minHeight=`${d}px`,m.style.minWidth=`${p}px`);for(let h of c)h.style.minHeight=`${d}px`,h.style.minWidth=`${p}px`}activateDroppables(a){this.dragContainers.forEach(d=>{d.setAttribute("enabled",""),d.hasAttribute("disabled")&&(d.contains(a)||d.shadowRoot&&d.shadowRoot.contains(a))&&d.removeAttribute("disabled")}),this.droppables.forEach(d=>{d.setAttribute("enabled",""),d.hasAttribute("disabled")&&(d.contains(a)||d.shadowRoot&&d.shadowRoot.contains(a))&&d.removeAttribute("disabled")})}activateDragLocation(){this._internals.states.add("--dragzone-enabled")}deactivateDragLocation(){this._internals.states.delete("--dragzone-enabled")}deactivateDroppables(){this.dragContainers.forEach(c=>{c.removeAttribute("enabled")}),this.droppables.forEach(c=>c.removeAttribute("enabled"))}disconnectedCallback(){super.disconnectedCallback(),this.observer&&(this.observer.disconnect(),this.observer=null),this.droppableObsever&&(this.droppableObsever.disconnect(),this.droppableObsever=null),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),document.removeEventListener("touchmove",this.handleTouchMove),document.removeEventListener("mousemove",this.handleTouchMove),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("mouseup",this.handleTouchEnd),document.removeEventListener("touchcancel",this.handleTouchCancel)}handleTouchMove(a){if(this.isDraggable&&this.dragClone){let{x:c,y:d}=this.getEventCoordinates(a),p={clientX:c,clientY:d};this.calculateDragDistance(p)>=this.MIN_DRAG_DISTANCE&&(this.isDragging=!0,this.updateDragClonePosition(p));let m=this.findClosestDropzone();this.currentDropTarget=m,m!==this.lastTarget&&(this.lastTarget&&(this.deactivateDroppable(this.lastTarget),this.dispatchCustomEvent(this.lastTarget,"dragleave")),m&&(this.activateDroppable(m),this.dispatchCustomEvent(m,"dragenter")),this.lastTarget=m),this.currentDropTarget&&this.dispatchCustomEvent(this.currentDropTarget,"dragover"),a.preventDefault()}}handleTouchEnd(a){if(this.isDragging){if(this.currentDropTarget){let c=this.dragClone;this.moveDraggableToDroppable(c,this.currentDropTarget)}this.resetDragState()}this._internals.states.delete("--dragzone-active"),this.checkAllMaxAssociations(),a.preventDefault()}handleTouchCancel(a){this.resetDragState()}validate(){if(!this.shadowRoot)return!1;let a=this.getValidAssociations(),c=!0,d="";this.maxAssociations>0&&a>this.maxAssociations?(c=!1,d=this.dataset.maxSelectionsMessage||`You've selected too many associations. Maximum allowed is ${this.maxAssociations}.`):this.minAssociations>0&&a<this.minAssociations&&(c=!1,d=this.dataset.minSelectionsMessage||`You haven't selected enough associations. Minimum required is ${this.minAssociations}.`);let p=this.lastElementChild;return this._internals.setValidity(c?{}:{customError:!0},d,p),this.reportValidity(),c}reportValidity(){let a=this.shadowRoot.querySelector("#validationMessage");return a&&(this._internals.validity.valid?(a.textContent="",a.style.display="none"):(a.textContent=this._internals.validationMessage,a.style.display="block")),this._internals.validity.valid}checkMaxAssociations(a){let c=this.getMatchMaxValue(a),d=a.querySelectorAll('[qti-draggable="true"]').length;return c===0||d>=c}resetDragState(){if(this.dragClone)if(!(this.currentDropTarget!==null)||this.dragContainers.includes(this.currentDropTarget))this.dragSource.style.opacity="1.0",this.dragSource.style.display="block",this.dragSource.style.pointerEvents="auto",this.dragClone.remove();else{let d=window.getComputedStyle(this.dragSource);for(let p=0;p<d.length;p++){let m=d[p];this.dragClone.style.setProperty(m,d.getPropertyValue(m))}this.dragClone.style.opacity="1.0",this.dragClone.style.display="block",this.dragClone.style.pointerEvents="auto"}this.isDragging=!1,this.isDraggable=!1,this.dragSource=null,this.dragClone=null,this.touchStartPoint=null,this.currentDropTarget=null,this.lastTarget=null}checkAllMaxAssociations(){this.droppables.forEach(a=>{this.checkMaxAssociations(a)?this.disableDroppable(a):this.enableDroppable(a)})}getMatchMaxValue(a){let c=a.getAttribute("match-max");return c?parseInt(c,10):1}disableDroppable(a){a.setAttribute("disabled","")}enableDroppable(a){a.removeAttribute("disabled")}get value(){return this.collectResponseData()}set value(a){if(!this.isMatchTabular())if(Array.isArray(a)){a?.forEach(d=>this.placeResponse(d));let c=new FormData;a.forEach(d=>{c.append(this.responseIdentifier,d)}),this._internals.setFormValue(c)}else this._internals.setFormValue(a)}placeResponse(a){let[c,...d]=a.split(" ").reverse(),p=this.findDroppableById(c);d.forEach(m=>this.placeDraggableInDroppable(m,p))}findDroppableById(a){return this.droppables.find(c=>c.getAttribute("identifier")===a)}async placeDraggableInDroppable(a,c){let d=this.querySelector(`[identifier=${a}]`);if(!c||!d){console.error(`Cannot find draggable or droppable with the given identifier: ${a}`);return}let p=()=>{d.style.transform="translate(0, 0)",console.log("droppable",c),c.appendChild(d),this.checkAllMaxAssociations()};document.startViewTransition?await document.startViewTransition(p).finished:p()}getValidAssociations(){return this.droppables.filter(a=>a.childElementCount>0).length}saveResponse(){this.validate();let a=this.collectResponseData();this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:this.responseIdentifier,response:a}}))}collectResponseData(){return this.droppables.map(c=>{let d=c.querySelectorAll('[qti-draggable="true"]'),p=Array.from(d).map(h=>h.getAttribute("identifier")),m=c.getAttribute("identifier");return p.map(h=>`${h} ${m}`)}).flat()}reset(a=!0){a&&this.saveResponse()}updateDragClonePosition(a){if(!this.isDragging||!this.dragClone)return;let c=a.clientX-this.cloneOffset.x,d=a.clientY-this.cloneOffset.y,{newLeft:p,newTop:m}=this.applyBoundaries(c,d,this.dragClone);this.dragClone.style.left=`${p}px`,this.dragClone.style.top=`${m}px`}getEventCoordinates(a,c=!1){let d=a.touches?a.touches[0]:a;return{x:c?d.pageX:d.clientX,y:c?d.pageY:d.clientY}}calculateDragDistance(a){let c=Math.abs(a.clientX-this.touchStartPoint.x),d=Math.abs(a.clientY-this.touchStartPoint.y);return c+d}applyBoundaries(a,c,d){let p=new DOMRect(0,0,window.innerWidth,window.innerHeight);this.rootNode instanceof ShadowRoot?p=this.rootNode.host.getBoundingClientRect():this.rootNode instanceof Document&&(p=document.documentElement.getBoundingClientRect());let m=d.getBoundingClientRect(),h=m.width,b=m.height,y=Math.max(p.left,Math.min(a,p.right-h)),f=Math.max(p.top,Math.min(c,p.bottom-b));return{newLeft:y,newTop:f}}findClosestDropzone(){let a=this.allDropzones.filter(m=>!m.hasAttribute("disabled"));if(!this.dragClone||a.length===0)return null;let c=this.dragClone.getBoundingClientRect(),d=null,p=0;for(let m of a){let h=m.getBoundingClientRect(),b=this.calculateOverlapArea(c,h);b>p&&(p=b,d=m)}if(!d){let m=200;for(let h of a){let b=h.getBoundingClientRect(),y=Math.sqrt(Math.pow(c.left-b.left,2)+Math.pow(c.top-b.top,2));y<m&&(m=y,d=h)}}return d}calculateOverlapArea(a,c){let d=Math.max(0,Math.min(a.right,c.right)-Math.max(a.left,c.left)),p=Math.max(0,Math.min(a.bottom,c.bottom)-Math.max(a.top,c.top));return d*p}dispatchCustomEvent(a,c,d=!0){if(!a)return;let p=new CustomEvent(c,{bubbles:d,cancelable:!0});p.dataTransfer=this.dataTransfer,a.dispatchEvent(p)}handleTouchStart(a){let{x:c,y:d}=this.getEventCoordinates(a);this.dropzoneOriginalParent=a.currentTarget.parentElement,this.touchStartPoint={x:c,y:d},this.dragSource=a.currentTarget,this.isDraggable=!0,this.rootNode=this.dragSource.getRootNode();let p=this.findDraggableInDraggableContainer(this.dragSource.getAttribute("identifier")),m=this.dragSource.parentElement;if(this.droppables.includes(m)){this.enableDroppable(m),this.dragClone=this.dragSource,this.dragSource=this.findDraggableInDraggableContainer(this.dragSource.getAttribute("identifier"));let h=this.findParentInteractionElement(this.dragSource),b=this.dragClone.getBoundingClientRect();h?h.appendChild(this.dragClone):this.rootNode instanceof ShadowRoot?this.rootNode.host.appendChild(this.dragClone):this.rootNode instanceof Document&&document.body.appendChild(this.dragClone),b&&this.setDragCloneStyles(b)}else{let h=p.getBoundingClientRect();this.cloneOffset.x=c-h.left,this.cloneOffset.y=d-h.top,this.dragClone=p.cloneNode(!0),h&&this.setDragCloneStyles(h);let b=this.findParentInteractionElement(this.dragSource);b?b.appendChild(this.dragClone):this.rootNode instanceof ShadowRoot?this.rootNode.host.appendChild(this.dragClone):this.rootNode instanceof Document&&document.body.appendChild(this.dragClone);let y=this.getMatchMaxValue(this.dragSource),f=this.draggables.filter(Ce=>Ce.getAttribute("identifier")===this.dragSource.getAttribute("identifier"));y!==0&&f.length>=y?(p.style.opacity="0.0",p.style.pointerEvents="none"):p.style.opacity="1.0",a.preventDefault()}}findParentInteractionElement(a){let c=a.parentElement;for(;c&&!c.tagName?.toLowerCase().endsWith("-interaction");)c=c.parentElement;return c}findDraggableInDraggableContainer(a){let c=this.dragContainers.flat();for(let d of c){if(d.getAttribute("identifier")===a)return d;let m=Array.from(d.assignedElements()||[]).find(h=>h.getAttribute("identifier")===a);if(m)return m}}setDragCloneStyles(a){this.dragClone.style.position="fixed",this.dragClone.style.top=`${a.top}px`,this.dragClone.style.left=`${a.left}px`,this.dragClone.style.width=`${a.width}px`,this.dragClone.style.height=`${a.height}px`,this.dragClone.style.setProperty("box-sizing","border-box","important"),this.dragClone.style.zIndex="9999",this.dragClone.style.pointerEvents="none",this.dragClone.style.opacity=this.DRAG_CLONE_OPACITY.toString(),this.dragClone.style.display="block"}}return o([sr({attribute:!1,type:Object})],r.prototype,"configuration",2),o([sr({type:Number,reflect:!0,attribute:"min-associations"})],r.prototype,"minAssociations",2),o([sr({type:Number,reflect:!0,attribute:"max-associations"})],r.prototype,"maxAssociations",2),o([rt(t)],r.prototype,"handleDraggableContainerChange",1),o([rt(s)],r.prototype,"handleDraggablesChange",1),o([rt(e)],r.prototype,"handleDroppablesChange",1),r};import{css as Ca}from"lit";var ri=Ca`
|
|
3970
|
-
:host {
|
|
3971
|
-
display: block; /* necessary to calculate scaling position */
|
|
3972
|
-
}
|
|
3973
|
-
slot[name='qti-simple-associable-choice'] {
|
|
3974
|
-
display: flex;
|
|
3975
|
-
align-items: flex-start;
|
|
3976
|
-
flex: 1;
|
|
3977
|
-
border: 2px solid transparent;
|
|
3978
|
-
padding: 0.3rem;
|
|
3979
|
-
border-radius: 0.3rem;
|
|
3980
|
-
gap: 0.5rem;
|
|
3981
|
-
}
|
|
3982
|
-
|
|
3983
|
-
:host::part(associables-container) {
|
|
3984
|
-
display: flex;
|
|
3985
|
-
padding: 0.5rem;
|
|
3986
|
-
justify-content: space-between;
|
|
3987
|
-
background: linear-gradient(
|
|
3988
|
-
180deg,
|
|
3989
|
-
rgb(0 0 0 / 0%) calc(50% - 1px),
|
|
3990
|
-
var(--qti-border-color-gray) calc(50%),
|
|
3991
|
-
rgb(0 0 0 / 0%) calc(50% + 1px)
|
|
3992
|
-
);
|
|
3993
|
-
}
|
|
3994
|
-
`;var fe=class extends N(u,"qti-simple-associable-choice",".dl","slot[name='qti-simple-associable-choice']"){constructor(){super();this._childrenMap=[];this._registerChoiceHandler=this._registerChoice.bind(this),this.addEventListener("register-qti-simple-associable-choice",this._registerChoiceHandler)}_registerChoice(e){let t=e.target;this._childrenMap.push(t)}render(){return ii` <slot name="prompt"></slot>
|
|
3995
|
-
<slot name="qti-simple-associable-choice"></slot>
|
|
3996
|
-
<div part="drop-container">
|
|
3997
|
-
${this._childrenMap.length>0&&Array.from(Array(Math.ceil(this._childrenMap.length/2)).keys()).map((e,t)=>ii`<div part="associables-container">
|
|
3998
|
-
<div name="left${t}" part="drop-list" class="dl" identifier="droplist${t}_left"></div>
|
|
3999
|
-
<div name="right${t}" part="drop-list" class="dl" identifier="droplist${t}_right"></div>
|
|
4000
|
-
</div>`)}
|
|
4001
|
-
|
|
4002
|
-
<div role="alert" id="validationMessage"></div>
|
|
4003
|
-
</div>`}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("register-qti-simple-associable-choice",this._registerChoiceHandler)}};fe.styles=ri,o([Ta()],fe.prototype,"_childrenMap",2),fe=o([ka("qti-associate-interaction")],fe);import{html as oi}from"lit";import{customElement as Ma,property as kt,state as Sa}from"lit/decorators.js";var U=class extends u{constructor(){super();this._errorMessage=null;this.handlePostMessage=this.handlePostMessage.bind(this)}connectedCallback(){super.connectedCallback();let e=this.data.startsWith("http")?this.data:Ae(this.baseItemUrl+"/"+this.data);fetch(e).then(t=>t.json()).then(t=>{this.manifest=t,this.setupCES()}).catch(t=>{this._errorMessage=t})}setupCES(){let e=this.shadowRoot.querySelector("#pciContainer"),t=e.contentDocument;window.addEventListener("message",this.handlePostMessage),t.open(),t.write(`
|
|
4004
|
-
<html>
|
|
4005
|
-
<head>
|
|
4006
|
-
<link href='${Ae(`${this.baseRefUrl}/${this.manifest.style[0]}`)}' rel="stylesheet" />
|
|
4007
|
-
<script src='${Ae(`${this.baseRefUrl}/${this.manifest.script[0]}`)}'></script>
|
|
4008
|
-
</head>
|
|
4009
|
-
<body></body>
|
|
4010
|
-
</html>
|
|
4011
|
-
`),t.close()}getIFrames(){let e=this.shadowRoot.querySelectorAll("iframe"),t=this.querySelectorAll("iframe"),r=[...e,...t];for(let i of r){let l=i.src;if(new URL(l,window.location.href).origin===window.location.origin)try{let c=i.contentDocument||i.contentWindow.document;c&&this.getInnerIFrames(c,r)}catch(c){console.error("Error accessing nested iframe:",c)}}return r.forEach((i,l)=>{r.indexOf(i)!==l&&r.splice(l,1)}),r}getInnerIFrames(e,t=[]){return e.querySelectorAll("iframe").forEach(i=>{t.push(i);let l=i.src;if(new URL(l,window.location.href).origin===window.location.origin)try{let c=i.contentDocument||i.contentWindow.document;this.getInnerIFrames(c,t)}catch(c){console.error("Error accessing nested iframe:",c)}else console.warn("Skipped cross-origin iframe:",l)}),t}postToWindowAndIframes(e,t){window.postMessage({type:e,data:t},"*");let r=this.getIFrames();for(let i of r)i.contentWindow&&i.contentWindow.postMessage({type:e,data:t},"*")}handlePostMessage(e){let{type:t,data:r}=e.data;switch(t){case"setResponse":this.rawResponse=r,this.saveResponse(r);break;case"getResponse":{this.postToWindowAndIframes("responseData",this.rawResponse);break}case"getMedia":{let i=this.manifest.media.map(l=>l.startsWith("http")?l:Ae(this.baseRefUrl+"/"+l));this.postToWindowAndIframes("mediaData",i);break}case"setStageHeight":console.log("setStageHeight not implemented");break}}validate(){return this.rawResponse!==""}get value(){return this.rawResponse}set value(e){if(typeof e=="string")this.rawResponse=e,this.saveResponse(e);else throw new Error("Value must be a string")}disconnectedCallback(){window.removeEventListener("message",this.handlePostMessage),super.disconnectedCallback()}render(){return oi`<iframe
|
|
4012
|
-
width=${this.getAttribute("width")}
|
|
4013
|
-
height=${this.getAttribute("height")}
|
|
4014
|
-
frameborder="0"
|
|
4015
|
-
title="pciContainer"
|
|
4016
|
-
id="pciContainer"
|
|
4017
|
-
>
|
|
4018
|
-
</iframe>
|
|
4019
|
-
${this._errorMessage&&oi`<div style="color:red">
|
|
4020
|
-
<h1>Error</h1>
|
|
4021
|
-
${this._errorMessage}
|
|
4022
|
-
</div>`}`}};o([kt({type:String,attribute:"data"})],U.prototype,"data",2),o([kt({type:String,attribute:"data-base-item"})],U.prototype,"baseItemUrl",2),o([kt({type:String,attribute:"data-base-ref"})],U.prototype,"baseRefUrl",2),o([kt({type:String,attribute:"id"})],U.prototype,"id",2),o([Sa()],U.prototype,"_errorMessage",2),U=o([Ma("qti-custom-interaction")],U);import{html as La,LitElement as _a}from"lit";import{customElement as Aa,property as Tt}from"lit/decorators.js";var G=class extends _a{constructor(){super(...arguments);this.disabled=!1;this.countAttempt=null;this.title="end attempt"}render(){return La`<button ?disabled=${this.disabled} part="button" @click=${this.endAttempt}>${this.title}</button>`}endAttempt(e){this.dispatchEvent(new CustomEvent("end-attempt",{bubbles:!0,composed:!0,detail:{responseIdentifier:this.responseIdentifier,countAttempt:this.countAttempt==="true"}}))}};o([Tt({type:String,attribute:"response-identifier"})],G.prototype,"responseIdentifier",2),o([Tt({reflect:!0,type:Boolean})],G.prototype,"disabled",2),o([Tt({type:String,attribute:"count-attempt"})],G.prototype,"countAttempt",2),o([Tt({type:String})],G.prototype,"title",2),G=o([Aa("qti-end-attempt-interaction")],G);import{html as Da}from"lit";import{customElement as Ia}from"lit/decorators.js";import{css as Ra}from"lit";var si=Ra`
|
|
4023
|
-
:host {
|
|
4024
|
-
display: flex;
|
|
4025
|
-
align-items: flex-start;
|
|
4026
|
-
flex-direction: column;
|
|
4027
|
-
flex-wrap: wrap;
|
|
4028
|
-
gap: 0.5rem;
|
|
4029
|
-
}
|
|
4030
|
-
|
|
4031
|
-
:host(.qti-choices-top) {
|
|
4032
|
-
flex-direction: column;
|
|
4033
|
-
}
|
|
4034
|
-
:host(.qti-choices-bottom) {
|
|
4035
|
-
flex-direction: column-reverse;
|
|
4036
|
-
}
|
|
4037
|
-
:host(.qti-choices-left) {
|
|
4038
|
-
flex-direction: row;
|
|
4039
|
-
}
|
|
4040
|
-
:host(.qti-choices-right) {
|
|
4041
|
-
flex-direction: row-reverse;
|
|
4042
|
-
}
|
|
4043
|
-
/* [part='drops'] , */
|
|
4044
|
-
[name='prompt'] {
|
|
4045
|
-
width: 100%;
|
|
4046
|
-
}
|
|
4047
|
-
[name='drags'] {
|
|
4048
|
-
display: flex;
|
|
4049
|
-
align-items: flex-start;
|
|
4050
|
-
flex: 1;
|
|
4051
|
-
border: 2px solid transparent;
|
|
4052
|
-
padding: 0.3rem;
|
|
4053
|
-
border-radius: 0.3rem;
|
|
4054
|
-
gap: 0.5rem;
|
|
4055
|
-
}
|
|
4056
|
-
`;var Fe=class extends N(u,"qti-gap-text","qti-gap","slot[part='drags']"){render(){return Da`<slot name="prompt"> </slot>
|
|
4057
|
-
<slot part="drags" name="drags"></slot>
|
|
4058
|
-
<slot part="drops"></slot>
|
|
4059
|
-
<div role="alert" id="validationMessage"></div>`}set correctResponse(s){let e=[],t=Array.isArray(s)?s:[s];t&&(e=t.map(i=>{let l=i.split(" ");return{text:l[0],gap:l[1]}})),this.querySelectorAll("qti-gap").forEach(i=>{let l=i.getAttribute("identifier"),a=e.find(d=>d.gap===l)?.text,c=this.querySelector(`qti-gap-text[identifier="${a}"]`)?.textContent.trim();if(a&&c){if(!i.nextElementSibling?.classList.contains("correct-option")){let d=document.createElement("span");d.classList.add("correct-option"),d.textContent=c,i.insertAdjacentElement("afterend",d)}}else i.nextElementSibling?.classList.contains("correct-option")&&i.nextElementSibling.remove()})}};Fe.styles=si,Fe=o([Ia("qti-gap-match-interaction")],Fe);import{html as Ha,svg as ni}from"lit";import{customElement as Na,queryAssignedElements as $a,state as ar}from"lit/decorators.js";import{ifDefined as li}from"lit/directives/if-defined.js";import{repeat as za}from"lit/directives/repeat.js";function ve(n,s,e,t){switch(n){case"circle":{let[r,i,l]=s,a=r/e.width*100,c=i/e.height*100,d=l/e.width*100;t.style.left=a-d+"%",t.style.top=c-d+"%",t.style.width=t.style.height=4*d+"px",t.style.borderRadius="9999px"}break;case"rect":{let[r,i,l,a]=s,c=r/e.width*100,d=i/e.height*100,p=l/e.width*100,m=a/e.height*100;t.style.left=c+"%",t.style.top=d+"%",t.style.width=p-c+"%",t.style.height=m-d+"%"}break;case"poly":{let r=s.reduce((f,Ce,Ze,dr)=>{if(Ze%2===1){let ke=f.pop();f[f.length]={x:ke,y:dr[Ze]}}else f.push(Ce);return f},[]),i=Math.min(...r.map(f=>f.x)),l=Math.max(...r.map(f=>f.x)),a=Math.min(...r.map(f=>f.y)),c=Math.max(...r.map(f=>f.y)),d=i/e.width*100,p=a/e.height*100,m=l/e.width*100,h=c/e.height*100;t.style.left=i/e.width*100+"%",t.style.top=a/e.height*100+"%",t.style.width=m-d+"%",t.style.height=h-p+"%";let y=r.map(f=>({x:(f.x-i)/(l-i)*100,y:(f.y-a)/(c-a)*100})).map(f=>Math.round(f.x)+"% "+Math.round(f.y)+"%").join(",");t.style.clipPath=`polygon(${y})`}break;default:break}}import{css as Va}from"lit";var ai=Va`
|
|
4060
|
-
slot:not([name='prompt']) {
|
|
4061
|
-
// position: relative; /* qti-hotspot-choice relative to the slot */
|
|
4062
|
-
display: block;
|
|
4063
|
-
width: fit-content; /* hotspots not stretching further if image is at max size */
|
|
4064
|
-
}
|
|
4065
|
-
::slotted(img) {
|
|
4066
|
-
/* image not selectable anymore */
|
|
4067
|
-
pointer-events: none;
|
|
4068
|
-
user-select: none;
|
|
4069
|
-
}
|
|
4070
|
-
::slotted(qti-associable-hotspot) {
|
|
4071
|
-
transform: translate(-50%, -50%);
|
|
4072
|
-
}
|
|
4073
|
-
line-container {
|
|
4074
|
-
display: block;
|
|
4075
|
-
position: relative;
|
|
4076
|
-
}
|
|
4077
|
-
svg {
|
|
4078
|
-
position: absolute;
|
|
4079
|
-
top: 0px;
|
|
4080
|
-
left: 0px;
|
|
4081
|
-
}
|
|
4082
|
-
`;var X=class extends u{constructor(){super();this.startPoint=null;this.endPoint=null;this._lines=[];this.addEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}reset(){this._lines=[]}validate(){return this._lines.length>0}set value(e){Array.isArray(e)&&(this._lines=e)}get value(){return this._lines}render(){return Ha`<slot name="prompt"></slot>
|
|
4083
|
-
<line-container>
|
|
4084
|
-
<svg
|
|
4085
|
-
width=${li(this.grImage[0]?.width)}
|
|
4086
|
-
height=${li(this.grImage[0]?.height)}
|
|
4087
|
-
viewbox="0 0 ${this.grImage[0]?.width} ${this.grImage[0]?.height}"
|
|
4088
|
-
>
|
|
4089
|
-
${za(this._lines,e=>e,(e,t)=>ni`
|
|
4090
|
-
<line
|
|
4091
|
-
part="line"
|
|
4092
|
-
x1=${parseInt(this.querySelector("[identifier="+e.split(" ")[0]+"]").style.left)}
|
|
4093
|
-
y1=${parseInt(this.querySelector("[identifier="+e.split(" ")[0]+"]").style.top)}
|
|
4094
|
-
x2=${parseInt(this.querySelector("[identifier="+e.split(" ")[1]+"]").style.left)}
|
|
4095
|
-
y2=${parseInt(this.querySelector("[identifier="+e.split(" ")[1]+"]").style.top)}
|
|
4096
|
-
stroke="red"
|
|
4097
|
-
stroke-width="3"
|
|
4098
|
-
@click=${r=>{r.stopPropagation(),this._lines=this._lines.filter((i,l)=>l!==t),this.saveResponse(this._lines)}}
|
|
4099
|
-
/>
|
|
4100
|
-
`)}
|
|
4101
|
-
${this.startPoint&&ni`<line
|
|
4102
|
-
part="point"
|
|
4103
|
-
x1=${this.startCoord.x}
|
|
4104
|
-
y1=${this.startCoord.y}
|
|
4105
|
-
x2=${this.mouseCoord.x}
|
|
4106
|
-
y2=${this.mouseCoord.y}
|
|
4107
|
-
stroke="red"
|
|
4108
|
-
stroke-width="3"
|
|
4109
|
-
/>`}
|
|
4110
|
-
</svg>
|
|
4111
|
-
<slot></slot>
|
|
4112
|
-
</line-container>
|
|
4113
|
-
<div role="alert" id="validationMessage"></div>`}positionHotspotOnRegister(e){let t=this.querySelector("img"),r=e.target,i=r.getAttribute("coords"),l=r.getAttribute("shape"),a=i.split(",").map(c=>parseInt(c));ve(l,a,t,r)}firstUpdated(e){super.firstUpdated(e),this.hotspots=this.querySelectorAll("qti-associable-hotspot"),document.addEventListener("mousemove",t=>{this.mouseCoord={x:t.clientX-this.grImage[0].getBoundingClientRect().left,y:t.clientY-this.grImage[0].getBoundingClientRect().top}}),this.hotspots.forEach(t=>{t.style.left=t.getAttribute("coords").split(",")[0]+"px",t.style.top=t.getAttribute("coords").split(",")[1]+"px",t.addEventListener("click",r=>{this.startPoint?this.endPoint||(this.endPoint=r.target,this._lines=[...this._lines,this.startPoint.getAttribute("identifier")+" "+this.endPoint.getAttribute("identifier")],this.saveResponse(this._lines),this.startPoint=null,this.endPoint=null):(this.startPoint=r.target,this.startCoord={x:this.startPoint.getAttribute("coords").split(",")[0],y:this.startPoint.getAttribute("coords").split(",")[1]})})})}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}};X.styles=ai,o([ar()],X.prototype,"_lines",2),o([ar()],X.prototype,"startCoord",2),o([ar()],X.prototype,"mouseCoord",2),o([$a({selector:"img"})],X.prototype,"grImage",2),X=o([Na("qti-graphic-associate-interaction")],X);import{html as Fa}from"lit";import{customElement as Pa}from"lit/decorators.js";import{css as Oa}from"lit";var ci=Oa`
|
|
4114
|
-
:host {
|
|
4115
|
-
display: flex;
|
|
4116
|
-
align-items: flex-start;
|
|
4117
|
-
flex-direction: column;
|
|
4118
|
-
flex-wrap: wrap;
|
|
4119
|
-
gap: 0.5rem;
|
|
4120
|
-
}
|
|
4121
|
-
|
|
4122
|
-
:host(.qti-choices-top) {
|
|
4123
|
-
flex-direction: column-reverse;
|
|
4124
|
-
}
|
|
4125
|
-
:host(.qti-choices-bottom) {
|
|
4126
|
-
flex-direction: column;
|
|
4127
|
-
}
|
|
4128
|
-
:host(.qti-choices-left) {
|
|
4129
|
-
flex-direction: row-reverse;
|
|
4130
|
-
& [name='drags'] {
|
|
4131
|
-
width: 25%;
|
|
4132
|
-
}
|
|
4133
|
-
& [part='image'] {
|
|
4134
|
-
width: 75%;
|
|
4135
|
-
}
|
|
4136
|
-
}
|
|
4137
|
-
:host(.qti-choices-right) {
|
|
4138
|
-
flex-direction: row;
|
|
4139
|
-
& [name='drags'] {
|
|
4140
|
-
width: 25%;
|
|
4141
|
-
}
|
|
4142
|
-
& [part='image'] {
|
|
4143
|
-
width: 75%;
|
|
4144
|
-
}
|
|
4145
|
-
}
|
|
4146
|
-
[part='image'] {
|
|
4147
|
-
display: block;
|
|
4148
|
-
position: relative;
|
|
4149
|
-
}
|
|
4150
|
-
/* [part='drops'] , */
|
|
4151
|
-
|
|
4152
|
-
[name='drags'] {
|
|
4153
|
-
display: flex;
|
|
4154
|
-
align-items: flex-start;
|
|
4155
|
-
flex-wrap: wrap;
|
|
4156
|
-
flex: 1;
|
|
4157
|
-
border: 2px solid transparent;
|
|
4158
|
-
padding: 0.3rem;
|
|
4159
|
-
border-radius: 0.3rem;
|
|
4160
|
-
gap: 0.5rem;
|
|
4161
|
-
}
|
|
4162
|
-
::slotted(img) {
|
|
4163
|
-
display: inline-block;
|
|
4164
|
-
user-select: none;
|
|
4165
|
-
pointer-events: none;
|
|
4166
|
-
}
|
|
4167
|
-
`;var Pe=class extends N(u,"qti-gap-img, qti-gap-text","qti-associable-hotspot","slot[part='drags']"){render(){return Fa` <slot name="prompt"></slot>
|
|
4168
|
-
<slot part="image"></slot>
|
|
4169
|
-
<slot part="drags" name="drags" class="hover-border"></slot>
|
|
4170
|
-
<div role="alert" id="validationMessage"></div>`}positionHotspotOnRegister(s){let e=s.target,t=e.getAttribute("coords"),r=e.getAttribute("shape"),i=t.split(",").map(l=>parseInt(l));switch(r){case"circle":{let[l,a,c]=i;e.style.left=l-c+"px",e.style.top=a-c+"px",e.style.width=e.style.height=2*c+"px"}break;case"rect":{let[l,a,c,d]=i;e.style.left=l+"px",e.style.top=a+"px",e.style.width=c-l+"px",e.style.height=d-a+"px"}break;default:break}}connectedCallback(){super.connectedCallback(),this.addEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-register-hotspot",this.positionHotspotOnRegister)}};Pe.styles=ci,Pe=o([Pa("qti-graphic-gap-match-interaction")],Pe);import{html as Xa}from"lit";import{customElement as Ba}from"lit/decorators.js";import{css as Ua}from"lit";var di=Ua`
|
|
4171
|
-
slot:not([name='prompt']) {
|
|
4172
|
-
position: relative; /* qti-hotspot-choice relative to the slot */
|
|
4173
|
-
display: block;
|
|
4174
|
-
width: fit-content; /* hotspots not stretching further if image is at max size */
|
|
4175
|
-
}
|
|
4176
|
-
::slotted(img) {
|
|
4177
|
-
/* image not selectable anymore */
|
|
4178
|
-
pointer-events: none;
|
|
4179
|
-
user-select: none;
|
|
4180
|
-
}
|
|
4181
|
-
`;var Ue=class extends Y(u,"qti-hotspot-choice"){constructor(){super(...arguments);this._choiceElements=[]}render(){return Xa`
|
|
4182
|
-
<slot name="prompt"></slot>
|
|
4183
|
-
<slot></slot>
|
|
4184
|
-
<div role="alert" id="validationMessage"></div>
|
|
4185
|
-
`}setHotspotOrder(e){let{identifier:t}=e.detail,r=this._choiceElements.find(l=>l.getAttribute("identifier")===t),i=this._choiceElements.length;if(!this.choiceOrdering){if(this.choiceOrdering=!0,r.order==null){if(this._choiceElements.filter(l=>l.order>0).length>=i){this.choiceOrdering=!1;return}r.order=this._choiceElements.filter(l=>!!l.order).length+1,this.choiceOrdering=!1;return}else this._choiceElements.forEach(l=>(l.order>l.order&&l.order--,l)),r.order=null;this.choiceOrdering=!1}}positionHotspotOnRegister(e){let t=this.querySelector("img"),r=e.target,i=r.getAttribute("coords"),l=r.getAttribute("shape"),a=i.split(",").map(c=>parseInt(c));ve(l,a,t,r)}connectedCallback(){super.connectedCallback(),this.addEventListener("activate-qti-hotspot-choice",this.setHotspotOrder),this.addEventListener("register-qti-hotspot-choice",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("activate-qti-hotspot-choice",this.setHotspotOrder),this.removeEventListener("register-qti-hotspot-choice",this.positionHotspotOnRegister)}};Ue.styles=di,Ue=o([Ba("qti-graphic-order-interaction")],Ue);import{html as Wa}from"lit";import{customElement as Ya}from"lit/decorators.js";import{css as ja}from"lit";var pi=ja`
|
|
4186
|
-
slot:not([name='prompt']) {
|
|
4187
|
-
position: relative; /* qti-hotspot-choice relative to the slot */
|
|
4188
|
-
display: block;
|
|
4189
|
-
width: fit-content; /* hotspots not stretching further if image is at max size */
|
|
4190
|
-
}
|
|
4191
|
-
::slotted(img) {
|
|
4192
|
-
/* image not selectable anymore */
|
|
4193
|
-
pointer-events: none;
|
|
4194
|
-
user-select: none;
|
|
4195
|
-
/* width:100%; */
|
|
4196
|
-
}
|
|
4197
|
-
`;var Xe=class extends Y(u,"qti-hotspot-choice"){render(){return Wa`
|
|
4198
|
-
<slot name="prompt"></slot>
|
|
4199
|
-
<slot></slot>
|
|
4200
|
-
`}positionHotspotOnRegister(s){let e=this.querySelector("img"),t=s.target,r=t.getAttribute("coords"),i=t.getAttribute("shape"),l=r.split(",").map(a=>parseInt(a));ve(i,l,e,t)}connectedCallback(){super.connectedCallback(),this.addEventListener("register-qti-hotspot-choice",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("unregister-qti-hotspot-choice",this.positionHotspotOnRegister)}};Xe.styles=pi,Xe=o([Ya("qti-hotspot-interaction")],Xe);import{html as Be,nothing as en}from"lit";import{customElement as tn,property as hi,state as ui}from"lit/decorators.js";import{unsafeHTML as gi}from"lit/directives/unsafe-html.js";import{css as Ka,html as Ga,LitElement as Ja}from"lit";import{customElement as Za,property as nr}from"lit/decorators.js";var J=class extends R(Ja,"qti-simple-associable-choice"){constructor(){super(...arguments);this.matchMin=0;this.matchMax=1;this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","qti-simple-associable-choice"),this.setAttribute("part","qti-simple-associable-choice")}render(){return Ga`
|
|
4201
|
-
<slot part="slot"></slot>
|
|
4202
|
-
<slot part="dropslot" name="qti-simple-associable-choice"></slot>
|
|
4203
|
-
`}};J.styles=Ka`
|
|
4204
|
-
:host {
|
|
4205
|
-
display: flex;
|
|
4206
|
-
user-select: none;
|
|
4207
|
-
}
|
|
4208
|
-
slot {
|
|
4209
|
-
width: 100%;
|
|
4210
|
-
display: block;
|
|
4211
|
-
}
|
|
4212
|
-
slot[name='qti-simple-associable-choice'] {
|
|
4213
|
-
width: 100%;
|
|
4214
|
-
}
|
|
4215
|
-
`,o([nr({type:Number,attribute:"match-min"})],J.prototype,"matchMin",2),o([nr({type:Number,attribute:"match-max"})],J.prototype,"matchMax",2),o([nr({type:Boolean,attribute:"fixed"})],J.prototype,"fixed",2),J=o([Za("qti-simple-associable-choice")],J);import{css as Qa}from"lit";var mi=Qa`
|
|
4216
|
-
slot:not([hidden]) {
|
|
4217
|
-
/* slot where the */
|
|
4218
|
-
display: flex;
|
|
4219
|
-
flex-direction: column;
|
|
4220
|
-
gap: 0.5rem;
|
|
4221
|
-
align-items: flex-start; /* prevents the drag and drop container slots having the same height */
|
|
4222
|
-
}
|
|
4223
|
-
:host(.qti-choices-top) slot {
|
|
4224
|
-
flex-direction: column;
|
|
4225
|
-
}
|
|
4226
|
-
:host(.qti-choices-bottom) slot {
|
|
4227
|
-
flex-direction: column-reverse;
|
|
4228
|
-
}
|
|
4229
|
-
:host(.qti-choices-left) slot {
|
|
4230
|
-
flex-direction: row;
|
|
4231
|
-
}
|
|
4232
|
-
:host(.qti-choices-right) slot {
|
|
4233
|
-
flex-direction: row-reverse;
|
|
4234
|
-
}
|
|
4235
|
-
slot[name='prompt'] {
|
|
4236
|
-
display: block;
|
|
4237
|
-
}
|
|
4238
|
-
::slotted(qti-simple-match-set) {
|
|
4239
|
-
/* Make sure the drag and drop container slots have the same width */
|
|
4240
|
-
flex: 1;
|
|
4241
|
-
}
|
|
4242
|
-
`;var B=class extends N(u,"qti-simple-match-set:first-of-type qti-simple-associable-choice, qti-simple-match-set:last-of-type > qti-simple-associable-choice > qti-simple-associable-choice","qti-simple-match-set:last-of-type > qti-simple-associable-choice","qti-simple-match-set:first-of-type"){constructor(){super(...arguments);this.lastCheckedRadio=null;this.class="";this._response=[];this.responseIdentifier="";this.correctOptions=[];this.handleRadioClick=e=>{let t=e.target;this.lastCheckedRadio===t?(t.checked=!1,this.lastCheckedRadio=null,this.handleRadioChange(e)):this.lastCheckedRadio=t};this.handleRadioChange=e=>{let t=e.target,r=t.value,i=t.name,l=t.type;t.checked?(this.value?this.value.indexOf(r)===-1&&(l==="radio"&&(this.value=this.value.filter(a=>a.indexOf(i)===-1)),this.value=[...this.value,r]):this.value=[r],this.lastCheckedRadio=t):(this.value=this.value.filter(a=>a!==r),this.lastCheckedRadio=null),this.requestUpdate(),this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:this.responseIdentifier,response:Array.isArray(this.value)?[...this.value]:this.value}}))}}get value(){return this.classList.contains("qti-match-tabular")?this._response:super.value}set value(e){this.classList.contains("qti-match-tabular")?this._response=e:super.value=e}async connectedCallback(){super.connectedCallback(),this.rows=Array.from(this.querySelectorAll("qti-simple-match-set:first-of-type qti-simple-associable-choice")),this.cols=Array.from(this.querySelectorAll("qti-simple-match-set:last-of-type qti-simple-associable-choice")),this.value=[]}set correctResponse(e){if(e===""){this.correctOptions=[];return}else Array.isArray(e)&&(this.correctOptions=e)}render(){let e=this.class.split(" ").includes("qti-match-tabular");return Be`
|
|
4243
|
-
<slot name="prompt"></slot>
|
|
4244
|
-
<slot ?hidden=${e}></slot>
|
|
4245
|
-
|
|
4246
|
-
${e?Be`
|
|
4247
|
-
<table>
|
|
4248
|
-
<tr>
|
|
4249
|
-
<td></td>
|
|
4250
|
-
${this.cols.map(t=>Be`<th part="r-header">${gi(t.innerHTML)}</th>`)}
|
|
4251
|
-
</tr>
|
|
4252
|
-
|
|
4253
|
-
${this.rows.map(t=>Be`<tr>
|
|
4254
|
-
<td part="c-header">${gi(t.innerHTML)}</td>
|
|
4255
|
-
${this.cols.map(r=>{let i=t.getAttribute("identifier"),l=r.getAttribute("identifier"),a=`${i} ${l}`,c=this.value.filter(h=>h.split(" ")[0]===i).length||0,d=this.value.includes(a),p=`rb ${d?"rb-checked":""} ${this.correctOptions.includes(a)?"rb-correct":""}`,m=this.correctOptions.length>0?!0:t.matchMax===1?!1:c>=t.matchMax&&!d;return Be`<td>
|
|
4256
|
-
<input
|
|
4257
|
-
type=${t.matchMax===1?"radio":"checkbox"}
|
|
4258
|
-
part=${p}
|
|
4259
|
-
name=${i}
|
|
4260
|
-
value=${a}
|
|
4261
|
-
.disabled=${m}
|
|
4262
|
-
@change=${h=>this.handleRadioChange(h)}
|
|
4263
|
-
@click=${h=>t.matchMax===1?this.handleRadioClick(h):null}
|
|
4264
|
-
/>
|
|
4265
|
-
</td>`})}
|
|
4266
|
-
</tr>`)}
|
|
4267
|
-
</table>
|
|
4268
|
-
`:en}
|
|
4269
|
-
|
|
4270
|
-
<div role="alert" id="validationMessage"></div>
|
|
4271
|
-
`}};B.styles=mi,o([hi({type:String})],B.prototype,"class",2),o([ui()],B.prototype,"_response",2),o([hi({type:String,attribute:"response-identifier"})],B.prototype,"responseIdentifier",2),o([ui()],B.prototype,"correctOptions",2),B=o([tn("qti-match-interaction")],B);import{css as rn,html as on}from"lit";import{customElement as sn}from"lit/decorators.js";var je=class extends u{constructor(){super();this._value=0}reset(){}validate(){return!0}get value(){return this._value.toString()}set value(e){if(!isNaN(parseInt(e.toString())))this._value=parseInt(e.toString());else throw new Error("Value must be a number")}static get properties(){return{...u.properties,step:{type:Number,attribute:"step",default:10}}}render(){return on` <slot name="prompt"></slot>
|
|
4272
|
-
<slot></slot>`}connectedCallback(){super.connectedCallback();let e=this.querySelector("audio")||this.querySelector("video")||this.querySelector("object");e&&e.addEventListener("ended",()=>{this._value++,this.saveResponse(this.value)})}};je.styles=[rn``],je=o([sn("qti-media-interaction")],je);import{html as fi}from"lit";import{customElement as nn,property as ln,state as lr}from"lit/decorators.js";import{unsafeHTML as cn}from"lit/directives/unsafe-html.js";import{css as an}from"lit";var bi=an`
|
|
4273
|
-
[part='drags'] {
|
|
4274
|
-
display: flex;
|
|
4275
|
-
align-items: flex-start;
|
|
4276
|
-
flex: 1;
|
|
4277
|
-
border: 2px solid transparent;
|
|
4278
|
-
}
|
|
4279
|
-
|
|
4280
|
-
[part='drops'] {
|
|
4281
|
-
flex: 1;
|
|
4282
|
-
display: grid;
|
|
4283
|
-
grid-auto-flow: column;
|
|
4284
|
-
grid-auto-columns: 1fr;
|
|
4285
|
-
}
|
|
4286
|
-
|
|
4287
|
-
:host([orientation='horizontal']) [part='drags'] {
|
|
4288
|
-
flex-direction: row;
|
|
4289
|
-
}
|
|
4290
|
-
:host([orientation='horizontal']) [part='drops'] {
|
|
4291
|
-
grid-auto-flow: column;
|
|
4292
|
-
}
|
|
4293
|
-
:host([orientation='vertical']) [part='drags'] {
|
|
4294
|
-
flex-direction: column;
|
|
4295
|
-
}
|
|
4296
|
-
:host([orientation='vertical']) [part='drops'] {
|
|
4297
|
-
grid-auto-flow: row;
|
|
4298
|
-
}
|
|
4299
|
-
|
|
4300
|
-
[part='drop-list'] {
|
|
4301
|
-
display: block;
|
|
4302
|
-
flex: 1;
|
|
4303
|
-
}
|
|
4304
|
-
|
|
4305
|
-
[part='container'] {
|
|
4306
|
-
display: flex;
|
|
4307
|
-
gap: 0.5rem;
|
|
4308
|
-
}
|
|
4309
|
-
:host(.qti-choices-top) [part='container'] {
|
|
4310
|
-
flex-direction: column;
|
|
4311
|
-
}
|
|
4312
|
-
:host(.qti-choices-bottom) [part='container'] {
|
|
4313
|
-
flex-direction: column-reverse;
|
|
4314
|
-
}
|
|
4315
|
-
:host(.qti-choices-left) [part='container'] {
|
|
4316
|
-
flex-direction: row;
|
|
4317
|
-
}
|
|
4318
|
-
:host(.qti-choices-right) [part='container'] {
|
|
4319
|
-
flex-direction: row-reverse;
|
|
4320
|
-
}
|
|
4321
|
-
`;var j=class extends bt(N(u,"qti-simple-choice","drop-list","slot[part='drags']"),"qti-simple-choice"){constructor(){super(...arguments);this.nrChoices=0;this.correctResponses=[];this.showCorrectResponses=!1}render(){let e=Array.from(this.querySelectorAll("qti-simple-choice"));return this.nrChoices<e.length&&(this.nrChoices=e.length),fi` <slot name="prompt"> </slot>
|
|
4322
|
-
<div part="container">
|
|
4323
|
-
<slot part="drags"> </slot>
|
|
4324
|
-
<div part="drops">
|
|
4325
|
-
${Array.from(Array(this.nrChoices)).map((t,r)=>fi`<drop-list part="drop-list" identifier="droplist${r}"></drop-list>${this.showCorrectResponses&&this.correctResponses.length>r?cn(`<span part='correct-response'>${this.correctResponses[r]}</span>`):""}`)}
|
|
4326
|
-
</div>
|
|
4327
|
-
</div>`}set correctResponse(e){if(e===""){this.showCorrectResponses=!1;return}this.correctResponses.length===0&&(Array.isArray(e)?e:[e]).forEach(r=>{let i=this.querySelector(`qti-simple-choice[identifier="${r}"]`);i||(i=this.shadowRoot.querySelector(`qti-simple-choice[identifier="${r}"]`));let l=i?.textContent.trim();this.correctResponses=[...this.correctResponses,l]}),this.showCorrectResponses=!0}getResponse(){return Array.from(this.shadowRoot.querySelectorAll("drop-list")).map(r=>{let i=r.querySelectorAll('[qti-draggable="true"]');return[...Array.from(i).map(a=>a.getAttribute("identifier"))].join(" ")})}async firstUpdated(e){super.firstUpdated(e),this.childrenMap=Array.from(this.querySelectorAll("qti-simple-choice")),this.childrenMap.forEach(t=>t.setAttribute("part","qti-simple-choice"))}};j.styles=bi,o([lr()],j.prototype,"nrChoices",2),o([lr()],j.prototype,"correctResponses",2),o([lr()],j.prototype,"showCorrectResponses",2),o([ln({type:String})],j.prototype,"orientation",2),j=o([nn("qti-order-interaction")],j);import{LitElement as dn,css as pn,html as mn}from"lit";var Mt=class extends dn{render(){return mn`<slot></slot>`}};Mt.styles=[pn`
|
|
4328
|
-
:host {
|
|
4329
|
-
display: block;
|
|
4330
|
-
}
|
|
4331
|
-
::slotted(img) {
|
|
4332
|
-
position: absolute;
|
|
4333
|
-
cursor: move;
|
|
4334
|
-
user-select: none;
|
|
4335
|
-
left: 50%;
|
|
4336
|
-
transform: translateX(-50%);
|
|
4337
|
-
}
|
|
4338
|
-
`];customElements.define("qti-position-object-interaction",Mt);import{LitElement as hn,css as un,html as gn}from"lit";import{customElement as bn}from"lit/decorators.js";var We=class extends hn{render(){return gn`<slot></slot>`}constructor(){super(),this.removeMoveListener=this.removeMoveListener.bind(this),this.dragElementHandler=this.dragElementHandler.bind(this)}dragElementHandler(s){s.preventDefault();let e=s.clientX-this.startX,t=s.clientY-this.startY;this.dragElement.style.left=this.dragElement.offsetLeft+e+"px",this.dragElement.style.top=this.dragElement.offsetTop+t+"px",this.startX=s.clientX,this.startY=s.clientY}firstUpdated(s){super.firstUpdated(s),this.dragElement=this.querySelector("qti-position-object-interaction>img"),this.startX=0,this.startY=0,this.dragElement.addEventListener("mousedown",e=>{this.startX=e.clientX,this.startY=e.clientY,document.addEventListener("mousemove",this.dragElementHandler,!0)}),document.addEventListener("mouseup",this.removeMoveListener)}removeMoveListener(){document.removeEventListener("mousemove",this.dragElementHandler,!0)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousemove",this.dragElementHandler),document.removeEventListener("mouseup",this.removeMoveListener)}};We.styles=[un`
|
|
4339
|
-
:host {
|
|
4340
|
-
display: inline-block;
|
|
4341
|
-
position: relative;
|
|
4342
|
-
}
|
|
4343
|
-
`],We=o([bn("qti-position-object-stage")],We);import{css as fn,html as vi}from"lit";import{customElement as vn,property as yi,state as yn}from"lit/decorators.js";import{repeat as qn}from"lit/directives/repeat.js";import{styleMap as xn}from"lit/directives/style-map.js";var Z=class extends u{constructor(){super(...arguments);this.maxChoices=1/0;this.minChoices=0;this._points=[];this._imgElement=null;this._onImageClick=e=>{if(this._points.length<this.maxChoices){let t=e.offsetX,r=e.offsetY;this._points=[...this._points,`${t} ${r}`],this.saveResponse(this._points)}}}render(){return vi` <slot name="prompt"></slot>
|
|
4344
|
-
<point-container>
|
|
4345
|
-
${qn(this._points,e=>e,(e,t)=>vi`
|
|
4346
|
-
<button
|
|
4347
|
-
part="point"
|
|
4348
|
-
style=${xn({position:"absolute",transform:"translate(-50%, -50%)",left:`${e.split(" ")[0]}px`,top:`${e.split(" ")[1]}px`})}
|
|
4349
|
-
aria-label="Remove point at ${e}"
|
|
4350
|
-
@click=${r=>{r.stopPropagation(),this._points=this._points.filter((i,l)=>l!==t),this.saveResponse(this._points)}}
|
|
4351
|
-
></button>
|
|
4352
|
-
`)}
|
|
4353
|
-
<slot></slot>
|
|
4354
|
-
</point-container>`}reset(){this._points=[]}validate(){return this._points.length>=this.minChoices&&this._points.length<=this.maxChoices}set value(e){this._points=Array.isArray(e)?e:[e]}get value(){return this._points}firstUpdated(){this._imgElement=this.querySelector("img"),this._imgElement?this._imgElement.addEventListener("click",this._onImageClick):console.warn("No <img> element found in <qti-select-point-interaction>")}disconnectedCallback(){super.disconnectedCallback(),this._imgElement&&this._imgElement.removeEventListener("click",this._onImageClick)}};Z.styles=[fn`
|
|
4355
|
-
:host {
|
|
4356
|
-
display: block;
|
|
4357
|
-
}
|
|
4358
|
-
point-container {
|
|
4359
|
-
display: block;
|
|
4360
|
-
position: relative;
|
|
4361
|
-
}
|
|
4362
|
-
`],o([yi({type:Number,attribute:"max-choices"})],Z.prototype,"maxChoices",2),o([yi({type:Number,attribute:"min-choices"})],Z.prototype,"minChoices",2),o([yn()],Z.prototype,"_points",2),Z=o([vn("qti-select-point-interaction")],Z);import{html as En,LitElement as Cn}from"lit";import{customElement as kn,property as cr,query as Tn}from"lit/decorators.js";import{css as wn}from"lit";var qi=wn`
|
|
4363
|
-
:host {
|
|
4364
|
-
display: block;
|
|
4365
|
-
--show-bounds: true;
|
|
4366
|
-
--show-ticks: true;
|
|
4367
|
-
--show-value: true;
|
|
4368
|
-
}
|
|
4369
|
-
|
|
4370
|
-
[part='slider'] {
|
|
4371
|
-
margin-left: 2rem; /* mx-8 */
|
|
4372
|
-
margin-right: 2rem;
|
|
4373
|
-
padding-bottom: 1rem; /* pb-4 */
|
|
4374
|
-
padding-top: 1.25rem; /* pt-5 */
|
|
4375
|
-
}
|
|
4376
|
-
|
|
4377
|
-
[part='bounds'] {
|
|
4378
|
-
display: flex;
|
|
4379
|
-
width: 100%;
|
|
4380
|
-
justify-content: space-between;
|
|
4381
|
-
margin-bottom: 0.5rem; /* mb-2 */
|
|
4382
|
-
}
|
|
4383
|
-
|
|
4384
|
-
[part='ticks'] {
|
|
4385
|
-
margin-left: 0.125rem; /* mx-0.5 */
|
|
4386
|
-
margin-right: 0.125rem;
|
|
4387
|
-
margin-bottom: 0.25rem; /* mb-1 */
|
|
4388
|
-
height: 0.5rem; /* h-2 */
|
|
4389
|
-
background: linear-gradient(to right, var(--qti-border-color) var(--qti-border-thickness), transparent 1px) repeat-x
|
|
4390
|
-
0 center / calc(calc(100% - var(--qti-border-thickness)) / ((var(--max) - var(--min)) / var(--step))) 100%;
|
|
4391
|
-
}
|
|
4392
|
-
|
|
4393
|
-
[part='rail'] {
|
|
4394
|
-
display: flex;
|
|
4395
|
-
align-items: center;
|
|
4396
|
-
box-sizing: border-box;
|
|
4397
|
-
height: 0.375rem; /* h-1.5 */
|
|
4398
|
-
width: 100%;
|
|
4399
|
-
cursor: pointer;
|
|
4400
|
-
border-radius: 9999px; /* rounded-full */
|
|
4401
|
-
border: 1px solid #d1d5db; /* border-gray-300 */
|
|
4402
|
-
background-color: #e5e7eb; /* bg-gray-200 */
|
|
4403
|
-
}
|
|
4404
|
-
|
|
4405
|
-
[part='knob'] {
|
|
4406
|
-
background-color: var(--qti-bg-active);
|
|
4407
|
-
border: 2px solid var(--qti-border-active);
|
|
4408
|
-
position: relative;
|
|
4409
|
-
height: 1rem; /* h-4 */
|
|
4410
|
-
width: 1rem; /* w-4 */
|
|
4411
|
-
transform-origin: center;
|
|
4412
|
-
transform: translateX(-50%);
|
|
4413
|
-
cursor: pointer;
|
|
4414
|
-
border-radius: 9999px; /* rounded-full */
|
|
4415
|
-
left: var(--value-percentage);
|
|
4416
|
-
}
|
|
4417
|
-
|
|
4418
|
-
[part='value'] {
|
|
4419
|
-
position: absolute;
|
|
4420
|
-
bottom: 2rem; /* bottom-8 */
|
|
4421
|
-
left: 0.5rem; /* left-2 */
|
|
4422
|
-
transform: translateX(-50%);
|
|
4423
|
-
cursor: pointer;
|
|
4424
|
-
border-radius: 0.25rem; /* rounded */
|
|
4425
|
-
background-color: #f3f4f6; /* bg-gray-100 */
|
|
4426
|
-
padding: 0.25rem 0.5rem; /* px-2 py-1 */
|
|
4427
|
-
text-align: center;
|
|
4428
|
-
color: #6b7280; /* text-gray-500 */
|
|
4429
|
-
}
|
|
4430
|
-
`;var $=class extends Cn{constructor(){super();this._value=0;this.min=0;this.max=100;this.step=1;this._internals=this.attachInternals()}connectedCallback(){super.connectedCallback(),this._updateValue(this.min),this.setAttribute("tabindex","0"),this.setAttribute("role","slider")}get value(){return this._value.toString()}set value(e){let t=parseInt(e,10);isNaN(t)||this._updateValue(t)}_updateValue(e){this._value=Math.min(this.max,Math.max(this.min,e));let t=(this._value-this.min)/(this.max-this.min)*100;this.style.setProperty("--value-percentage",`${t}%`),this._internals.setFormValue(this.value),this.requestUpdate()}render(){return En`
|
|
4431
|
-
<slot name="prompt"></slot>
|
|
4432
|
-
<div id="slider" part="slider">
|
|
4433
|
-
<div id="bounds" part="bounds">
|
|
4434
|
-
<div>${this.min}</div>
|
|
4435
|
-
<div>${this.max}</div>
|
|
4436
|
-
</div>
|
|
4437
|
-
|
|
4438
|
-
<div id="ticks" part="ticks"></div>
|
|
4439
|
-
|
|
4440
|
-
<div id="rail" part="rail" @mousedown=${this._onMouseDown} @touchstart=${this._onTouchStart}>
|
|
4441
|
-
<div id="knob" part="knob"><div id="value" part="value">${this.value}</div></div>
|
|
4442
|
-
</div>
|
|
4443
|
-
</div>
|
|
4444
|
-
`}_onMouseDown(e){this._startDrag(e.pageX);let t=i=>this._onDrag(i.pageX),r=()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",r),this._onDragEnd()};document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}_onTouchStart(e){this._startDrag(e.touches[0].pageX);let t=i=>this._onDrag(i.touches[0].pageX),r=()=>{document.removeEventListener("touchmove",t),document.removeEventListener("touchend",r),this._onDragEnd()};document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",r)}_startDrag(e){this._onDrag(e)}_onDrag(e){let t=this._rail.getBoundingClientRect(),r=e-t.left,i=Math.min(1,Math.max(0,r/t.width)),l=this.min+Math.round(i*(this.max-this.min)/this.step)*this.step;this._updateValue(l)}_onDragEnd(){this.dispatchEvent(new Event("change",{bubbles:!0}))}};$.formAssociated=!0,$.styles=qi,o([Tn("#rail")],$.prototype,"_rail",2),o([cr({type:Number,attribute:"lower-bound"})],$.prototype,"min",2),o([cr({type:Number,attribute:"upper-bound"})],$.prototype,"max",2),o([cr({type:Number,attribute:"step"})],$.prototype,"step",2),$=o([kn("qti-slider-interaction")],$);import{consume as Mn}from"@lit/context";import{LitElement as Sn,html as Ln}from"lit";import{customElement as _n,state as An}from"lit/decorators.js";var Ye=class extends Sn{render(){return Ln`<slot @slotchange=${this.handleSlotChange}></slot>`}handleSlotChange(){let s=Array.from(this.firstElementChild?.childNodes??[]).find(e=>e.nodeType===Node.COMMENT_NODE);try{this.operatorFunction=new Function("context","fn","item",s?.textContent??"")}catch(e){console.error("custom-operator contains invalid javascript code",e)}}calculate(){let s={variable:t=>this._context?.variables.find(r=>r.identifier===t)?.value??"",correct:t=>this._context?.variables.find(r=>r.identifier===t)?.correctResponse??""},e={getVariable:t=>this._context?.variables.find(r=>r.identifier===t),updateOutcomeVariable:(t,r)=>{this.dispatchEvent(new CustomEvent("qti-set-outcome-value",{bubbles:!0,composed:!0,detail:{outcomeIdentifier:t,value:r}}))},updateResponseVariable:(t,r)=>{this.dispatchEvent(new CustomEvent("qti-interaction-response",{bubbles:!0,composed:!0,detail:{responseIdentifier:t,response:r}}))}};return this.operatorFunction(this._context,s,e)}};o([Mn({context:x,subscribe:!0}),An()],Ye.prototype,"_context",2),Ye=o([_n("qti-custom-operator")],Ye);import{LitElement as Rn,css as Dn,html as In}from"lit";import{customElement as Vn}from"lit/decorators.js";var Ke=class extends Rn{connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent("qti-register-hotspot",{bubbles:!0,composed:!0,cancelable:!1}))}render(){return In` <slot name="drags"></slot> `}};Ke.styles=Dn`
|
|
4445
|
-
:host {
|
|
4446
|
-
display: flex;
|
|
4447
|
-
user-select: none;
|
|
4448
|
-
position: absolute;
|
|
4449
|
-
}
|
|
4450
|
-
`,Ke=o([Vn("qti-associable-hotspot")],Ke);import{css as Hn,html as Nn,LitElement as $n}from"lit";import{customElement as zn,property as On}from"lit/decorators.js";var ye=class extends $n{constructor(){super(...arguments);this.tabindex=0}render(){return Nn` <slot name="drags"></slot>`}};ye.styles=Hn`
|
|
4451
|
-
:host {
|
|
4452
|
-
display: flex;
|
|
4453
|
-
user-select: none;
|
|
4454
|
-
}
|
|
4455
|
-
`,o([On({type:Number,reflect:!0})],ye.prototype,"tabindex",2),ye=o([zn("qti-gap")],ye);import{css as Fn,LitElement as Pn}from"lit";import{customElement as Un,property as Xn}from"lit/decorators.js";var qe=class extends Pn{constructor(){super(...arguments);this.tabindex=0}connectedCallback(){this.setAttribute("slot","drags")}};qe.styles=Fn`
|
|
4456
|
-
:host {
|
|
4457
|
-
display: flex;
|
|
4458
|
-
user-select: none;
|
|
4459
|
-
}
|
|
4460
|
-
`,o([Xn({type:Number,reflect:!0})],qe.prototype,"tabindex",2),qe=o([Un("qti-gap-img")],qe);import{css as Bn,html as jn,LitElement as Wn}from"lit";import{customElement as Yn,property as Kn}from"lit/decorators.js";var xe=class extends R(Wn,"qti-gap-text"){constructor(){super(...arguments);this.tabindex=0}connectedCallback(){super.connectedCallback(),this.setAttribute("slot","drags")}render(){return jn`<slot></slot>`}};xe.styles=Bn`
|
|
4461
|
-
:host {
|
|
4462
|
-
display: inline-flex;
|
|
4463
|
-
user-select: none;
|
|
4464
|
-
}
|
|
4465
|
-
`,o([Kn({type:Number,reflect:!0})],xe.prototype,"tabindex",2),xe=o([Yn("qti-gap-text")],xe);import{css as Gn,LitElement as Jn}from"lit";import{customElement as Zn,property as Qn}from"lit/decorators.js";var we=class extends R(Jn,"qti-hotspot-choice"){};we.styles=Gn`
|
|
4466
|
-
:host {
|
|
4467
|
-
display: flex;
|
|
4468
|
-
user-select: none;
|
|
4469
|
-
position: absolute;
|
|
4470
|
-
}
|
|
4471
|
-
`,o([Qn({attribute:"aria-ordervalue",type:Number,reflect:!0})],we.prototype,"order",2),we=o([Zn("qti-hotspot-choice")],we);import{css as el,html as tl,LitElement as rl}from"lit";import{customElement as il}from"lit/decorators.js";var Ge=class extends R(rl,"qti-hottext"){render(){return tl`<div part="ch"><div part="cha"></div></div>
|
|
4472
|
-
<slot></slot> `}};Ge.styles=el`
|
|
4473
|
-
:host {
|
|
4474
|
-
display: flex;
|
|
4475
|
-
user-select: none;
|
|
4476
|
-
}
|
|
4477
|
-
`,Ge=o([il("qti-hottext")],Ge);import{css as ol,html as sl,LitElement as al}from"lit";import{customElement as nl,property as ll}from"lit/decorators.js";var Je=class extends al{static get styles(){return[ol`
|
|
4478
|
-
:host {
|
|
4479
|
-
display: block;
|
|
4480
|
-
cursor: pointer;
|
|
4481
|
-
}
|
|
4482
|
-
`]}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this._onSelectInlineChoice),this.dispatchEvent(new CustomEvent("qti-inline-choice-register",{bubbles:!0,composed:!0,cancelable:!1}))}disconnectedCallback(){this.removeEventListener("click",this._onSelectInlineChoice)}render(){return sl` <slot></slot> `}_onSelectInlineChoice(){this.dispatchEvent(new CustomEvent("qti-inline-choice-select",{bubbles:!0,cancelable:!1,composed:!0,detail:{identifier:this.identifier}}))}};o([ll({type:String})],Je.prototype,"identifier",2),Je=o([nl("qti-inline-choice")],Je);import{css as cl,html as xi,LitElement as dl,nothing as pl}from"lit";import{customElement as ml,property as hl}from"lit/decorators.js";var Ee=class extends R(dl,"qti-simple-choice"){get checked(){return this.internals.states.has("--checked")}render(){return xi`<div part="ch">
|
|
4483
|
-
<div part="cha"></div>
|
|
4484
|
-
</div>
|
|
4485
|
-
${this.marker?xi`<div id="label">${this.marker}</div>`:pl}
|
|
4486
|
-
<slot part="slot"></slot> `}};Ee.styles=cl`
|
|
4487
|
-
:host {
|
|
4488
|
-
display: flex;
|
|
4489
|
-
align-items: center;
|
|
4490
|
-
user-select: none;
|
|
4491
|
-
}
|
|
4492
|
-
slot {
|
|
4493
|
-
width: 100%;
|
|
4494
|
-
display: flex;
|
|
4495
|
-
align-items: center;
|
|
4496
|
-
}
|
|
4497
|
-
[part='ch'] {
|
|
4498
|
-
display: flex;
|
|
4499
|
-
flex-shrink: 0;
|
|
4500
|
-
align-items: center;
|
|
4501
|
-
justify-content: center;
|
|
4502
|
-
}
|
|
4503
|
-
`,o([hl({type:String,attribute:!1})],Ee.prototype,"marker",2),Ee=o([ml("qti-simple-choice")],Ee);var zx=async n=>{let s=n.substring(0,n.lastIndexOf("/")),e=await fr().load(`${n}`).then(a=>a.assessmentTest()),t=await se().load(`${s}/${e.href}`).then(a=>a.htmlDoc()),r=await se().load(`${s}/${e.href}`).then(a=>a.items()),i=`${s}/${e.href}`,l=`${s}/${e.href.substring(0,e.href.lastIndexOf("/"))}`;return{testHTMLDoc:t,testURI:l,testURL:i,items:r,testIdentifier:e.identifier}},Ox=async n=>z().load(n).then(s=>s.htmlDoc().firstElementChild);export{R as ActiveElementMixin,u as Interaction,F as ItemContainer,vt as QtiAnd,E as QtiAssessmentItem,L as QtiAssessmentItemRef,_ as QtiAssessmentSection,ue as QtiAssessmentStimulusRef,Q as QtiAssessmentTest,Ke as QtiAssociableHotspot,fe as QtiAssociateInteraction,yt as QtiBaseValue,ge as QtiChoiceInteraction,dt as QtiCompanionMaterialsInfo,T as QtiConditionExpression,Ft as QtiContains,pt as QtiContentBody,Pt as QtiCorrect,U as QtiCustomInteraction,Ye as QtiCustomOperator,G as QtiEndAttemptInteraction,xt as QtiEqual,qt as QtiEqualRounded,g as QtiExpression,k as QtiExtendedTextInteraction,Re as QtiFeedbackBlock,De as QtiFeedbackInline,ye as QtiGap,qe as QtiGapImg,Fe as QtiGapMatchInteraction,xe as QtiGapText,X as QtiGraphicAssociateInteraction,Pe as QtiGraphicGapMatchInteraction,Ue as QtiGraphicOrderInteraction,Ut as QtiGt,Xt as QtiGte,we as QtiHotspotChoice,Xe as QtiHotspotInteraction,Ge as QtiHottext,gt as QtiHottextInteraction,Je as QtiInlineChoice,K as QtiInlineChoiceInteraction,Bt as QtiIsNull,st as QtiItem,Le as QtiItemBody,ft as QtiLookupOutcomeValue,jt as QtiLt,Wt as QtiLte,wt as QtiMapResponse,be as QtiMapping,Kt as QtiMatch,B as QtiMatchInteraction,je as QtiMediaInteraction,Gt as QtiMember,Ie as QtiModalFeedback,Jt as QtiMultiple,Zt as QtiNot,Qt as QtiOr,j as QtiOrderInteraction,er as QtiOrdered,D as QtiOutcomeDeclaration,Ne as QtiOutcomeProcessing,Ht as QtiOutcomeProcessingProcessor,te as QtiPortableCustomInteraction,Mt as QtiPositionObjectInteraction,We as QtiPositionObjectStage,Oe as QtiPrintedVariable,tr as QtiProduct,nt as QtiPrompt,Nt as QtiResponseCondition,P as QtiResponseDeclaration,$e as QtiResponseElse,Ot as QtiResponseElseIf,ze as QtiResponseIf,ee as QtiResponseProcessing,I as QtiRubricBlock,H as QtiRule,Z as QtiSelectPointInteraction,$t as QtiSetOutcomeValue,zt as QtiSetOutcomeValueRule,J as QtiSimpleAssociableChoice,Ee as QtiSimpleChoice,$ as QtiSliderInteraction,Ct as QtiStringMatch,lt as QtiStylesheet,Et as QtiSubtract,rr as QtiSum,ir as QtiSumExpression,tt as QtiTest,A as QtiTestPart,V as QtiTextEntryInteraction,He as QtiUploadInteraction,or as QtiVariable,q as TestComponent,O as TestContainer,pe as TestItemLink,Me as TestNext,me as TestPagingButtonsStamp,Se as TestPrev,w as TestView,Ox as getItemByUri,zx as getManifestInfo,x as itemContext,Vr as itemContextVariables,la as qtiAndMixin,qa as qtiSubtractMixin,z as qtiTransformItem,fr as qtiTransformManifest,se as qtiTransformTest,S as testContext,et as testElement};
|
|
1
|
+
import{$ as eo,A as D,Aa as Eo,B as E,Ba as Fo,C as F,Ca as Go,D as G,Da as Ho,E as H,F as I,G as J,H as K,I as L,J as M,K as N,L as O,M as P,N as Q,O as R,P as S,Q as T,R as U,S as V,T as W,U as X,V as Y,W as Z,X as _,Y as $,Z as oo,_ as ro,a as o,aa as fo,b as m,ba as mo,c as p,ca as po,d as t,da as to,e as x,ea as xo,f as a,fa as ao,g as b,ga as bo,h as c,ha as co,i as d,ia as go,j as g,ja as ho,k as h,ka as io,l as i,la as jo,m as j,ma as ko,n as k,na as lo,o as l,oa as no,p as n,pa as qo,q,qa as so,r as s,ra as uo,s as u,sa as vo,t as v,ta as wo,u as w,ua as yo,v as y,va as zo,w as z,wa as Ao,x as A,xa as Bo,y as B,ya as Co,z as C,za as Do}from"./chunks/chunk-FTKONGII.js";import{a as Yo,b as Zo}from"./chunks/chunk-4UJBK6JO.js";import{a as Wo,b as Xo}from"./chunks/chunk-TQBDBMWL.js";import{a as Io,b as Lo,c as Mo,d as No,e as Oo,f as Po}from"./chunks/chunk-DZCKF45D.js";import"./chunks/chunk-MJMONWKB.js";import"./chunks/chunk-5BR5CJFH.js";import{a as r,b as e,c as f}from"./chunks/chunk-5FCXUJAG.js";import"./chunks/chunk-3GO57DNP.js";import{a as Uo}from"./chunks/chunk-4WXQYE2P.js";import{a as Ro}from"./chunks/chunk-3V6LA7B3.js";import{a as Vo}from"./chunks/chunk-6S4CDN3T.js";import{a as So}from"./chunks/chunk-PKT2SJQD.js";import{a as To}from"./chunks/chunk-5P7CTN7Q.js";import{a as Qo}from"./chunks/chunk-IMJOPCFR.js";import"./chunks/chunk-EHK76KRT.js";import{a as Jo,b as Ko}from"./chunks/chunk-6MCYE7P5.js";import"./chunks/chunk-XUJ7TXHW.js";import"./chunks/chunk-L4CUWIE6.js";import"./chunks/chunk-R33OODNX.js";import"./chunks/chunk-KWPDTFYH.js";import"./chunks/chunk-RXKI3AO4.js";import"./chunks/chunk-X2KBNXRO.js";import"./chunks/chunk-5GCSZ3CH.js";import"./chunks/chunk-LZZB4VGC.js";import"./chunks/chunk-QQCGUVEV.js";import"./chunks/chunk-FRS2J3OS.js";import"./chunks/chunk-IAP2CEE7.js";export{Wo as ItemContainer,oo as QtiAnd,o as QtiAssessmentItem,Mo as QtiAssessmentItemRef,No as QtiAssessmentSection,m as QtiAssessmentStimulusRef,Oo as QtiAssessmentTest,c as QtiAssociableHotspot,d as QtiAssociateInteraction,eo as QtiBaseValue,g as QtiChoiceInteraction,p as QtiCompanionMaterialsInfo,fo as QtiContains,Do as QtiContentBody,mo as QtiCorrect,h as QtiCustomInteraction,t as QtiCustomOperator,i as QtiEndAttemptInteraction,to as QtiEqual,po as QtiEqualRounded,j as QtiExtendedTextInteraction,x as QtiFeedbackBlock,a as QtiFeedbackInline,q as QtiGap,k as QtiGapImg,l as QtiGapMatchInteraction,n as QtiGapText,s as QtiGraphicAssociateInteraction,u as QtiGraphicGapMatchInteraction,v as QtiGraphicOrderInteraction,xo as QtiGt,ao as QtiGte,w as QtiHotspotChoice,y as QtiHotspotInteraction,A as QtiHottext,z as QtiHottextInteraction,C as QtiInlineChoice,B as QtiInlineChoiceInteraction,bo as QtiIsNull,Xo as QtiItem,P as QtiItemBody,V as QtiLookupOutcomeValue,co as QtiLt,go as QtiLte,ho as QtiMapResponse,io as QtiMapping,jo as QtiMatch,E as QtiMatchInteraction,F as QtiMediaInteraction,ko as QtiMember,b as QtiModalFeedback,lo as QtiMultiple,no as QtiNot,qo as QtiOr,G as QtiOrderInteraction,so as QtiOrdered,Go as QtiOutcomeDeclaration,Q as QtiOutcomeProcessing,R as QtiOutcomeProcessingProcessor,H as QtiPortableCustomInteraction,I as QtiPositionObjectInteraction,J as QtiPositionObjectStage,uo as QtiPrintedVariable,vo as QtiProduct,S as QtiPrompt,W as QtiResponseCondition,Ho as QtiResponseDeclaration,Z as QtiResponseElse,$ as QtiResponseElseIf,_ as QtiResponseIf,T as QtiResponseProcessing,Eo as QtiRubricBlock,U as QtiRule,K as QtiSelectPointInteraction,X as QtiSetOutcomeValue,Y as QtiSetOutcomeValueRule,D as QtiSimpleAssociableChoice,L as QtiSimpleChoice,M as QtiSliderInteraction,zo as QtiStringMatch,Fo as QtiStylesheet,wo as QtiSubtract,Ao as QtiSum,Bo as QtiSumExpression,Lo as QtiTest,Po as QtiTestPart,N as QtiTextEntryInteraction,O as QtiUploadInteraction,Co as QtiVariable,Qo as TestComponent,Io as TestContainer,Uo as TestItemLink,Ro as TestNext,Vo as TestPagingButtonsStamp,So as TestPrev,To as TestView,Zo as getItemByUri,Yo as getManifestInfo,ro as qtiAndMixin,yo as qtiSubtractMixin,r as qtiTransformItem,e as qtiTransformManifest,f as qtiTransformTest,Jo as testContext,Ko as testElement};
|