@astl/astrolabe 0.0.0 → 0.1.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/CHANGELOG.md +134 -0
- package/LICENSE +202 -0
- package/README.md +65 -0
- package/dist/cdn/astrolabe-editor.js +1441 -0
- package/dist/cdn/astrolabe-editor.js.map +1 -0
- package/dist/cdn/astrolabe-player.js +2 -0
- package/dist/cdn/astrolabe-player.js.map +1 -0
- package/dist/cdn/astrolabe.css +238 -0
- package/dist/cdn/astrolabe.js +3 -0
- package/dist/cdn/astrolabe.js.map +1 -0
- package/dist/cdn/astrolabe.standalone.js +8007 -0
- package/dist/cdn/chunks/audio-B0LSIn5N.js +48 -0
- package/dist/cdn/chunks/audio-B0LSIn5N.js.map +1 -0
- package/dist/cdn/chunks/audio-manifest-B9FWQzRy.js +2 -0
- package/dist/cdn/chunks/audio-manifest-B9FWQzRy.js.map +1 -0
- package/dist/cdn/chunks/block-styles-CKo9x7Vt.js +68 -0
- package/dist/cdn/chunks/block-styles-CKo9x7Vt.js.map +1 -0
- package/dist/cdn/chunks/book-CHzDDaim.js +15 -0
- package/dist/cdn/chunks/book-CHzDDaim.js.map +1 -0
- package/dist/cdn/chunks/callout-QFLFLPc5.js +49 -0
- package/dist/cdn/chunks/callout-QFLFLPc5.js.map +1 -0
- package/dist/cdn/chunks/callout-manifest-Cb12O4jl.js +2 -0
- package/dist/cdn/chunks/callout-manifest-Cb12O4jl.js.map +1 -0
- package/dist/cdn/chunks/categorise-BO2tNVJ3.js +203 -0
- package/dist/cdn/chunks/categorise-BO2tNVJ3.js.map +1 -0
- package/dist/cdn/chunks/categorise-manifest-C_hEDVYQ.js +2 -0
- package/dist/cdn/chunks/categorise-manifest-C_hEDVYQ.js.map +1 -0
- package/dist/cdn/chunks/chip-styles-Dme5daTO.js +77 -0
- package/dist/cdn/chunks/chip-styles-Dme5daTO.js.map +1 -0
- package/dist/cdn/chunks/choice-CExBvqKj.js +136 -0
- package/dist/cdn/chunks/choice-CExBvqKj.js.map +1 -0
- package/dist/cdn/chunks/choice-manifest-C-XahD7m.js +2 -0
- package/dist/cdn/chunks/choice-manifest-C-XahD7m.js.map +1 -0
- package/dist/cdn/chunks/color-control-Cl5cuMSO.js +91 -0
- package/dist/cdn/chunks/color-control-Cl5cuMSO.js.map +1 -0
- package/dist/cdn/chunks/crossword-Cb-a3Tjj.js +270 -0
- package/dist/cdn/chunks/crossword-Cb-a3Tjj.js.map +1 -0
- package/dist/cdn/chunks/crossword-manifest-2qlu7AYd.js +2 -0
- package/dist/cdn/chunks/crossword-manifest-2qlu7AYd.js.map +1 -0
- package/dist/cdn/chunks/declarations-BhqOz1ap.js +2 -0
- package/dist/cdn/chunks/declarations-BhqOz1ap.js.map +1 -0
- package/dist/cdn/chunks/definitions-CNX90WtL.js +6 -0
- package/dist/cdn/chunks/definitions-CNX90WtL.js.map +1 -0
- package/dist/cdn/chunks/directive-helpers-D7lOZKnB.js +14 -0
- package/dist/cdn/chunks/directive-helpers-D7lOZKnB.js.map +1 -0
- package/dist/cdn/chunks/drop-manifest-bzNOa5ks.js +2 -0
- package/dist/cdn/chunks/drop-manifest-bzNOa5ks.js.map +1 -0
- package/dist/cdn/chunks/drop-vRXndjHu.js +86 -0
- package/dist/cdn/chunks/drop-vRXndjHu.js.map +1 -0
- package/dist/cdn/chunks/flash-cards-0NrrKdrx.js +87 -0
- package/dist/cdn/chunks/flash-cards-0NrrKdrx.js.map +1 -0
- package/dist/cdn/chunks/flash-cards-manifest-B8nWXbRy.js +2 -0
- package/dist/cdn/chunks/flash-cards-manifest-B8nWXbRy.js.map +1 -0
- package/dist/cdn/chunks/gap-lor-khst.js +78 -0
- package/dist/cdn/chunks/gap-lor-khst.js.map +1 -0
- package/dist/cdn/chunks/gap-manifest-RSydA41N.js +2 -0
- package/dist/cdn/chunks/gap-manifest-RSydA41N.js.map +1 -0
- package/dist/cdn/chunks/help-C-woafz5.js +138 -0
- package/dist/cdn/chunks/help-C-woafz5.js.map +1 -0
- package/dist/cdn/chunks/help-form-DaC6KaFG.js +160 -0
- package/dist/cdn/chunks/help-form-DaC6KaFG.js.map +1 -0
- package/dist/cdn/chunks/hotspot-manifest-CNs1oiZ_.js +2 -0
- package/dist/cdn/chunks/hotspot-manifest-CNs1oiZ_.js.map +1 -0
- package/dist/cdn/chunks/hotspot-oel1Eelo.js +154 -0
- package/dist/cdn/chunks/hotspot-oel1Eelo.js.map +1 -0
- package/dist/cdn/chunks/image-drop-Dkprw0Kn.js +295 -0
- package/dist/cdn/chunks/image-drop-Dkprw0Kn.js.map +1 -0
- package/dist/cdn/chunks/image-drop-manifest-BZ6hCoAd.js +2 -0
- package/dist/cdn/chunks/image-drop-manifest-BZ6hCoAd.js.map +1 -0
- package/dist/cdn/chunks/image-label-Dm5shQSh.js +177 -0
- package/dist/cdn/chunks/image-label-Dm5shQSh.js.map +1 -0
- package/dist/cdn/chunks/image-label-manifest--1CLRJzd.js +2 -0
- package/dist/cdn/chunks/image-label-manifest--1CLRJzd.js.map +1 -0
- package/dist/cdn/chunks/inline-styles-CTgXWnHb.js +80 -0
- package/dist/cdn/chunks/inline-styles-CTgXWnHb.js.map +1 -0
- package/dist/cdn/chunks/insert-menu-LgrifBYT.js +80 -0
- package/dist/cdn/chunks/insert-menu-LgrifBYT.js.map +1 -0
- package/dist/cdn/chunks/issue-list-BgnXzXRM.js +51 -0
- package/dist/cdn/chunks/issue-list-BgnXzXRM.js.map +1 -0
- package/dist/cdn/chunks/keys-DU-Qknmz.js +2 -0
- package/dist/cdn/chunks/keys-DU-Qknmz.js.map +1 -0
- package/dist/cdn/chunks/live-jdiyYln2.js +7 -0
- package/dist/cdn/chunks/live-jdiyYln2.js.map +1 -0
- package/dist/cdn/chunks/long-answer-CtzClLAx.js +71 -0
- package/dist/cdn/chunks/long-answer-CtzClLAx.js.map +1 -0
- package/dist/cdn/chunks/long-answer-manifest-BYJpZRtB.js +2 -0
- package/dist/cdn/chunks/long-answer-manifest-BYJpZRtB.js.map +1 -0
- package/dist/cdn/chunks/mark-words-CpH3gTcX.js +131 -0
- package/dist/cdn/chunks/mark-words-CpH3gTcX.js.map +1 -0
- package/dist/cdn/chunks/mark-words-manifest-Cs2pXCEx.js +2 -0
- package/dist/cdn/chunks/mark-words-manifest-Cs2pXCEx.js.map +1 -0
- package/dist/cdn/chunks/match-DKE_4o-x.js +352 -0
- package/dist/cdn/chunks/match-DKE_4o-x.js.map +1 -0
- package/dist/cdn/chunks/match-manifest-D0UfoajU.js +2 -0
- package/dist/cdn/chunks/match-manifest-D0UfoajU.js.map +1 -0
- package/dist/cdn/chunks/memory-B6hSyHyz.js +187 -0
- package/dist/cdn/chunks/memory-B6hSyHyz.js.map +1 -0
- package/dist/cdn/chunks/memory-manifest-D1589iR0.js +2 -0
- package/dist/cdn/chunks/memory-manifest-D1589iR0.js.map +1 -0
- package/dist/cdn/chunks/menu-messages-Dx3jYUEp.js +2 -0
- package/dist/cdn/chunks/menu-messages-Dx3jYUEp.js.map +1 -0
- package/dist/cdn/chunks/messages-9xiYDvRT.js +2 -0
- package/dist/cdn/chunks/messages-9xiYDvRT.js.map +1 -0
- package/dist/cdn/chunks/option-styles-WKzjKmCH.js +50 -0
- package/dist/cdn/chunks/option-styles-WKzjKmCH.js.map +1 -0
- package/dist/cdn/chunks/order-BhG_6IC-.js +225 -0
- package/dist/cdn/chunks/order-BhG_6IC-.js.map +1 -0
- package/dist/cdn/chunks/order-manifest-J5IXN0he.js +2 -0
- package/dist/cdn/chunks/order-manifest-J5IXN0he.js.map +1 -0
- package/dist/cdn/chunks/pick-and-place-DVQIPYuL.js +2 -0
- package/dist/cdn/chunks/pick-and-place-DVQIPYuL.js.map +1 -0
- package/dist/cdn/chunks/picture-D10YRMYH.js +2 -0
- package/dist/cdn/chunks/picture-D10YRMYH.js.map +1 -0
- package/dist/cdn/chunks/picture-view-BKnAyScQ.js +92 -0
- package/dist/cdn/chunks/picture-view-BKnAyScQ.js.map +1 -0
- package/dist/cdn/chunks/repeat-CY2W2URZ.js +8 -0
- package/dist/cdn/chunks/repeat-CY2W2URZ.js.map +1 -0
- package/dist/cdn/chunks/roving-focus-BxGgi2DD.js +2 -0
- package/dist/cdn/chunks/roving-focus-BxGgi2DD.js.map +1 -0
- package/dist/cdn/chunks/runtime-DxAbpr3S.js +526 -0
- package/dist/cdn/chunks/runtime-DxAbpr3S.js.map +1 -0
- package/dist/cdn/chunks/scan-jWgPnVxA.js +2 -0
- package/dist/cdn/chunks/scan-jWgPnVxA.js.map +1 -0
- package/dist/cdn/chunks/select-DTA3dJzr.js +345 -0
- package/dist/cdn/chunks/select-DTA3dJzr.js.map +1 -0
- package/dist/cdn/chunks/select-manifest-BBMbvdkH.js +2 -0
- package/dist/cdn/chunks/select-manifest-BBMbvdkH.js.map +1 -0
- package/dist/cdn/chunks/source-view-DXKPFCl9.js +29 -0
- package/dist/cdn/chunks/source-view-DXKPFCl9.js.map +1 -0
- package/dist/cdn/chunks/style-form-D5haJtWM.js +240 -0
- package/dist/cdn/chunks/style-form-D5haJtWM.js.map +1 -0
- package/dist/cdn/chunks/style-messages-BbZpeD2a.js +2 -0
- package/dist/cdn/chunks/style-messages-BbZpeD2a.js.map +1 -0
- package/dist/cdn/chunks/style-model-ZXNe_c8R.js +2 -0
- package/dist/cdn/chunks/style-model-ZXNe_c8R.js.map +1 -0
- package/dist/cdn/chunks/style-placing-DPw1zyrz.js +2 -0
- package/dist/cdn/chunks/style-placing-DPw1zyrz.js.map +1 -0
- package/dist/cdn/chunks/style-popups-BobgX1WK.js +74 -0
- package/dist/cdn/chunks/style-popups-BobgX1WK.js.map +1 -0
- package/dist/cdn/chunks/style-rules-D45PZLCv.js +136 -0
- package/dist/cdn/chunks/style-rules-D45PZLCv.js.map +1 -0
- package/dist/cdn/chunks/styled-Dmx5Yjv7.js +57 -0
- package/dist/cdn/chunks/styled-Dmx5Yjv7.js.map +1 -0
- package/dist/cdn/chunks/styles-DxJJxVNH.js +136 -0
- package/dist/cdn/chunks/styles-DxJJxVNH.js.map +1 -0
- package/dist/cdn/chunks/surface-CgxfAwCR.js +1019 -0
- package/dist/cdn/chunks/surface-CgxfAwCR.js.map +1 -0
- package/dist/cdn/chunks/true-false-DP3MO599.js +146 -0
- package/dist/cdn/chunks/true-false-DP3MO599.js.map +1 -0
- package/dist/cdn/chunks/true-false-manifest-B4exv60u.js +2 -0
- package/dist/cdn/chunks/true-false-manifest-B4exv60u.js.map +1 -0
- package/dist/cdn/chunks/video-j9MCH6Kw.js +98 -0
- package/dist/cdn/chunks/video-j9MCH6Kw.js.map +1 -0
- package/dist/cdn/chunks/video-manifest-8OwkhhAI.js +2 -0
- package/dist/cdn/chunks/video-manifest-8OwkhhAI.js.map +1 -0
- package/dist/cdn/chunks/word-bank-ARjwUKZf.js +80 -0
- package/dist/cdn/chunks/word-bank-ARjwUKZf.js.map +1 -0
- package/dist/cdn/chunks/word-bank-manifest-C1FSo1kH.js +2 -0
- package/dist/cdn/chunks/word-bank-manifest-C1FSo1kH.js.map +1 -0
- package/dist/cdn/chunks/word-search-AHvM7yCJ.js +274 -0
- package/dist/cdn/chunks/word-search-AHvM7yCJ.js.map +1 -0
- package/dist/cdn/chunks/word-search-manifest-Fg1a59Z1.js +2 -0
- package/dist/cdn/chunks/word-search-manifest-Fg1a59Z1.js.map +1 -0
- package/dist/editor.d.ts +32 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +51 -0
- package/dist/editor.js.map +1 -0
- package/dist/engine.d.ts +33 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +53 -0
- package/dist/engine.js.map +1 -0
- package/dist/player.d.ts +19 -0
- package/dist/player.d.ts.map +1 -0
- package/dist/player.js +22 -0
- package/dist/player.js.map +1 -0
- package/dist/server.d.ts +8 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +8 -0
- package/dist/server.js.map +1 -0
- package/package.json +82 -4
- package/src/bundles/astrolabe-editor.ts +11 -0
- package/src/bundles/astrolabe-player.ts +10 -0
- package/src/bundles/astrolabe-standalone.ts +23 -0
- package/src/bundles/astrolabe.ts +12 -0
- package/src/editor.ts +98 -0
- package/src/engine.ts +59 -0
- package/src/player.ts +23 -0
- package/src/server.ts +7 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={"insert.title":`Insert`,"insert.components":`Components`,"insert.exercises":`Exercises`,"insert.content":`Content`,"insert.picture":`Picture`,"insert.picture.description":`A picture with alt text and an optional caption`,"insert.pageBreak":`Page break`,"insert.pageBreak.description":`Split the exercise into steps at the cursor`,"insert.hint":`Hint`,"insert.hint.description":`One students ask for: for the question at the cursor, else for the page`,"insert.explanation":`Explanation`,"insert.explanation.description":`Why the answer is right, shown once it is checked`,"insert.feedback":`Feedback`,"insert.feedback.description":`A text by the verdict, shown once the answer is checked`,"insert.text":`Text`,"insert.text.description":`A paragraph after this block`,"insert.noMatch":`Nothing matches “{query}”.`,"toolbar.label":`Format and insert`,"toolbar.style":`Text style: {style}`,"toolbar.paragraph":`Paragraph`,"toolbar.heading":`Heading`,"toolbar.subheading":`Subheading`,"toolbar.bold":`Bold`,"toolbar.italic":`Italic`,"toolbar.underline":`Underline`,"toolbar.link":`Link`,"toolbar.link.address":`Link address`,"toolbar.link.apply":`Apply`,"toolbar.link.remove":`Remove link`,"toolbar.link.blocked":`This address is not allowed here.`,"toolbar.bulleted":`Bulleted list`,"toolbar.numbered":`Numbered list`,"toolbar.undo":`Undo`,"toolbar.redo":`Redo`,"toolbar.elements":`Elements`,"toolbar.templates":`Templates`,"toolbar.layouts":`Layout`,"toolbar.view":`View`,"toolbar.search":`Search`,"block.text":`Text`,"block.gap":`Gap`,"issue.onPage":`{n} on page {page}`,"picture.title":`Add a picture`,"picture.editTitle":`Edit the picture`,"picture.file":`Upload a picture`,"picture.library":`Choose from the library`,"picture.urlOnly":`This editor adds pictures by their address only: it has no upload.`,"picture.src":`Picture address (URL)`,"picture.alt":`Alt text`,"picture.altHelp":`What the picture shows, for students who cannot see it. Do not give an answer away.`,"picture.decorative":`Decorative: screen readers skip it (alt="")`,"picture.caption":`Caption (optional)`,"picture.cancel":`Cancel`,"picture.insert":`Insert`,"picture.save":`Save`,"picture.uploading":`Uploading…`,"picture.uploaded":`Uploaded.`,"picture.uploadFailed":`The upload failed. Try again, or give the picture's address.`,"picture.uploadBlocked":`The upload gave an address the URL policy does not allow.`,"picture.picked":`Chosen from the library.`,"picture.pickFailed":`The library did not open. Try again, or give the picture's address.`,"picture.pickBlocked":`The library returned an address the URL policy does not allow.`,"picture.srcMissing":`Give the picture's address, or upload it.`,"picture.srcBlocked":`The URL policy does not allow this address.`,"picture.altMissing":`Describe the picture, or mark it as decorative.`,"picture.altRequired":`Describe the picture: students who cannot see it need its alt text for the task.`,"picture.pasteRefused":`This editor has no upload, so a picture file cannot be pasted or dropped. Add it with Insert, Picture, by its address.`,"field.picture.src":`Picture address (URL)`,"field.regions.draw":`Drag on the picture to draw a zone, or add one and type its numbers.`,"field.points.place":`Click the picture to place a pin, or add one and type its position.`,"field.region":`Zone {n}`,"field.region.add":`Add a zone`,"field.region.remove":`Remove zone {n}`,"field.point":`Pin {n}`,"field.point.add":`Add a pin`,"field.point.remove":`Remove pin {n}`,"field.shape":`Shape`,"field.shape.rect":`Rectangle`,"field.shape.circle":`Circle`,"field.shape.polygon":`Polygon`,"field.x":`From the left (%)`,"field.y":`From the top (%)`,"field.width":`Width (%)`,"field.height":`Height (%)`,"field.cx":`Centre from the left (%)`,"field.cy":`Centre from the top (%)`,"field.r":`Radius (% of the width)`,"field.vertex.x":`Point {n} from the left (%)`,"field.vertex.y":`Point {n} from the top (%)`,"field.vertex.add":`Add a point`,"field.vertex.remove":`Remove point {n}`,"field.label":`Label`,"field.label.optional":`Label (optional)`,"field.more":`Only the first {shown} of {count} are listed here: edit the others in the source.`,"inspector.title":`Properties`,"inspector.delete":`Delete`,"inspector.moveUp":`Move up`,"inspector.moveDown":`Move down`,"inspector.empty":`Put the cursor in an exercise element to edit its answers and settings.`,"inspector.unsupported":`Element {tag} cannot be edited here.`,"inspector.unset":`(not set)`,"inspector.item":`{label} {n}`,"inspector.add":`Add`,"inspector.remove":`Remove`,"inspector.removeItem":`Remove: {label} {n}`,"inspector.untitled":`Item {n} (empty)`,"inspector.variant":`Variant`,"inspector.styleTemplate":`Element style`,"inspector.styleTemplate.inherit":`Same as the exercise`,"inspector.styleTemplate.default":`Default look`,"inspector.document":`Exercise`,"inspector.documentStyle":`Look of the whole exercise`,"inspector.upload":`Upload a file`,"inspector.uploadItem":`Upload a file: {label}`,"inspector.uploading":`Uploading…`,"inspector.uploaded":`Uploaded.`,"inspector.uploadFailed":`The upload failed. Try again, or type its address.`,"inspector.uploadBlocked":`The upload gave an address the URL policy does not allow.`,"issues.title":`Problems`,"issues.errors":`{count, plural, one {# error} other {# errors}}`,"issues.warnings":`{count, plural, one {# warning} other {# warnings}}`,"issues.summary":`{errors}, {warnings}`,"issues.none":`No errors or warnings.`,"severity.error":`Error`,"severity.warning":`Warning`,"label.text":`{label}: {text}`,"preview.title":`Student view`,"preview.show":`Preview`,"preview.refresh":`Refresh preview`,"preview.hint":`Press Preview to try the exercise the way a student will see it.`,"preview.loading":`Preparing the preview…`,"preview.stale":`The document changed after this preview. Refresh it to see the changes.`,"preview.invalid":`{count, plural, one {Fix this error to see the preview:} other {Fix these # errors to see the preview:}}`,"preview.failed":`The preview could not be shown.`,"surface.label":`Exercise content`,"surface.pageNumber":`Page {page} of {pages}`,"surface.pageTitle":`Page title`,"surface.pageJoin":`Join with page {previous}`,"surface.pageAdded":`Page {page} added`,"surface.pageJoined":`Page {page} joined with page {previous}`,"surface.pageDelete":`Delete page`,"surface.pageDeleted":`Deleted page {n}`,"surface.pageAddTitle":`Add title`,"surface.pageRemoveTitle":`Remove title`,"surface.pageTitleOf":`Title of page {page}`,"surface.pageTitleRemoved":`Removed the title of page {page}`,"surface.points":`{points, plural, one {# pt} other {# pts}}`,"surface.items":`{n, plural, one {# item} other {# items}}`,"surface.blockMovedUp":`Block moved up, now block {n}`,"surface.blockMovedDown":`Block moved down, now block {n}`,"surface.blockRemoved":`Block {n} deleted`,"surface.addOption":`Add option`,"surface.chip.empty":`No answer`,"surface.chip.more":`+{n}`,"surface.picture.alt":`Picture: {alt}`,"surface.picture.decorative":`Picture, decorative (no alt text)`,"surface.picture.noAlt":`Picture without alt text`,"surface.picture.blocked":`(not shown: the URL policy does not allow its address)`,"surface.picture.edit":`Edit`,"surface.loading":`Loading the editor…`,"surface.failed":`The editor could not be loaded. Reload the page to try again.`,"view.visual":`Visual`,"view.source":`HTML`,"view.sourceLabel":`The exercise as HTML`,"view.sourceErrors":`{n, plural, one {The HTML has # error. Fix it to go back.} other {The HTML has # errors. Fix them to go back.}}`,"status.elements":`{n, plural, one {# element} other {# elements}}`,"status.errors":`{n, plural, one {# error} other {# errors}}`,"status.warnings":`{n, plural, one {# warning} other {# warnings}}`,"status.ready":`Ready to share`,"insert.layouts":`Layout`,"insert.layout.two":`Two columns`,"insert.layout.two.description":`Two columns of the same width.`,"insert.layout.three":`Three columns`,"insert.layout.three.description":`Three columns of the same width.`,"insert.layout.wide-narrow":`Wide + narrow`,"insert.layout.wide-narrow.description":`A wide column, then a narrow one.`,"insert.layout.narrow-wide":`Narrow + wide`,"insert.layout.narrow-wide.description":`A narrow column, then a wide one.`,"insert.layout.picture-text":`Picture beside text`,"insert.layout.picture-text.description":`A picture you choose, with text next to it.`,"layout.section":`Columns`,"layout.change":`Change layout`,"layout.other":`Another layout`,"layout.unwrap":`Remove layout`,"layout.delete":`Delete with content`,"layout.confirm":`Delete the layout and its content?`,"layout.confirmDelete":`Yes, delete`,"layout.cancel":`Cancel`,"toolbar.font":`Font: {value}`,"toolbar.font.name":`Font`,"toolbar.size":`Size: {value}`,"toolbar.size.name":`Size`,"toolbar.color":`Text colour`,"toolbar.highlight":`Highlight`,"toolbar.align":`Alignment`,"toolbar.align.start":`Left`,"toolbar.align.center":`Centre`,"toolbar.align.end":`Right`,"toolbar.align.justify":`Justified`,"toolbar.spacing":`Spacing`,"toolbar.spacing.line":`Line height`,"toolbar.spacing.after":`Space after`,"toolbar.spacing.none":`None`,"toolbar.spacing.small":`Small`,"toolbar.spacing.medium":`Medium`,"toolbar.spacing.large":`Large`,"toolbar.clear":`Clear formatting`,"toolbar.default":`Default`,"toolbar.myStyles":`My styles`,"toolbar.readyStyles":`Ready styles`,"style.preset.note":`Note`,"style.preset.tip":`Tip`,"style.preset.important":`Important`,"style.preset.definition":`Definition`,"style.preset.example":`Example`,"style.preset.quote":`Quote`,"style.preset.highlight":`Highlight`,"style.preset.small-print":`Small print`,"style.color.theme":`Theme colours`,"style.color.swatch":`Theme colour {n}`,"style.color.custom":`Custom colour`,"style.color.picker":`Pick a colour`,"style.color.invalid":`Write a colour as #rrggbb.`,"style.color.none":`No colour`,"style.close":`Close`,"style.form.none":`Put the cursor in what you want to style.`,"style.target.picture":`Picture style`,"style.target.figure":`Picture and caption style`,"style.target.block":`Block style`,"style.target.component":`Element style`,"style.target.column":`Column style`,"style.target.layout":`Layout style`,"style.position.inline":`In the text`,"style.position.start":`On the left`,"style.position.end":`On the right`,"style.position.center":`Centred`,"style.position.full":`Full width`,"style.rules.open":`Manage styles…`,"style.rules.title":`Styles`,"inspector.style":`Style`,"surface.picture.place":`Position and size: {position}, {width}`,"surface.picture.placeAuto":`Position and size: {position}`,"style.target.more":`{target}…`,"help.cost":`costs {percent}%`,"help.when.correct":`Correct`,"help.when.incorrect":`Wrong`,"help.when.partial":`Partly correct`,"help.when.omitted":`Skipped`,"help.costLabel":`Cost of the hint`,"help.whenLabel":`For the result`},t={"insert.title":`Wstaw`,"insert.components":`Elementy`,"insert.exercises":`Ćwiczenia`,"insert.content":`Treść`,"insert.picture":`Obrazek`,"insert.picture.description":`Obrazek z tekstem alternatywnym i podpisem do wyboru`,"insert.pageBreak":`Podział strony`,"insert.pageBreak.description":`Podziel ćwiczenie na kroki od miejsca kursora`,"insert.hint":`Podpowiedź`,"insert.hint.description":`Na prośbę ucznia: do pytania przy kursorze, a poza nim do strony`,"insert.explanation":`Wyjaśnienie`,"insert.explanation.description":`Dlaczego odpowiedź jest dobra, widoczne po sprawdzeniu`,"insert.feedback":`Informacja zwrotna`,"insert.feedback.description":`Tekst zależny od wyniku, widoczny po sprawdzeniu`,"insert.text":`Tekst`,"insert.text.description":`Akapit po tym bloku`,"insert.noMatch":`Nic nie pasuje do „{query}”.`,"toolbar.label":`Formatowanie i wstawianie`,"toolbar.style":`Styl tekstu: {style}`,"toolbar.paragraph":`Akapit`,"toolbar.heading":`Nagłówek`,"toolbar.subheading":`Podtytuł`,"toolbar.bold":`Pogrubienie`,"toolbar.italic":`Kursywa`,"toolbar.underline":`Podkreślenie`,"toolbar.link":`Link`,"toolbar.link.address":`Adres linku`,"toolbar.link.apply":`Zastosuj`,"toolbar.link.remove":`Usuń link`,"toolbar.link.blocked":`Tego adresu nie można tu użyć.`,"toolbar.bulleted":`Lista punktowana`,"toolbar.numbered":`Lista numerowana`,"toolbar.undo":`Cofnij`,"toolbar.redo":`Ponów`,"toolbar.elements":`Elementy`,"toolbar.templates":`Szablony`,"toolbar.layouts":`Układ`,"toolbar.view":`Widok`,"toolbar.search":`Szukaj`,"block.text":`Tekst`,"block.gap":`Luka`,"issue.onPage":`{n} na stronie {page}`,"picture.title":`Dodaj obrazek`,"picture.editTitle":`Edytuj obrazek`,"picture.file":`Wgraj obrazek`,"picture.library":`Wybierz z biblioteki`,"picture.urlOnly":`Ten edytor dodaje obrazki tylko po adresie: nie ma wgrywania.`,"picture.src":`Adres obrazka (URL)`,"picture.alt":`Tekst alternatywny`,"picture.altHelp":`Co przedstawia obrazek, dla uczniów, którzy go nie widzą. Nie zdradzaj odpowiedzi.`,"picture.decorative":`Ozdobny: czytniki ekranu go pomijają (alt="")`,"picture.caption":`Podpis (opcjonalny)`,"picture.cancel":`Anuluj`,"picture.insert":`Wstaw`,"picture.save":`Zapisz`,"picture.uploading":`Wgrywam…`,"picture.uploaded":`Wgrano.`,"picture.uploadFailed":`Nie udało się wgrać obrazka. Spróbuj ponownie albo podaj jego adres.`,"picture.uploadBlocked":`Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.`,"picture.picked":`Wybrano z biblioteki.`,"picture.pickFailed":`Nie udało się otworzyć biblioteki. Spróbuj ponownie albo podaj adres obrazka.`,"picture.pickBlocked":`Biblioteka zwróciła adres, na który nie pozwala polityka adresów.`,"picture.srcMissing":`Podaj adres obrazka albo go wgraj.`,"picture.srcBlocked":`Polityka adresów nie pozwala na ten adres.`,"picture.altMissing":`Opisz obrazek albo oznacz go jako ozdobny.`,"picture.altRequired":`Opisz obrazek: uczniowie, którzy go nie widzą, potrzebują tekstu alternatywnego do zadania.`,"picture.pasteRefused":`Ten edytor nie ma wgrywania, więc nie można wkleić ani upuścić pliku obrazka. Dodaj go przez Wstaw, Obrazek, podając adres.`,"field.picture.src":`Adres obrazka (URL)`,"field.regions.draw":`Przeciągnij po obrazku, aby narysować strefę, albo dodaj ją i wpisz jej liczby.`,"field.points.place":`Kliknij obrazek, aby wbić pinezkę, albo dodaj ją i wpisz jej położenie.`,"field.region":`Strefa {n}`,"field.region.add":`Dodaj strefę`,"field.region.remove":`Usuń strefę {n}`,"field.point":`Pinezka {n}`,"field.point.add":`Dodaj pinezkę`,"field.point.remove":`Usuń pinezkę {n}`,"field.shape":`Kształt`,"field.shape.rect":`Prostokąt`,"field.shape.circle":`Koło`,"field.shape.polygon":`Wielokąt`,"field.x":`Od lewej (%)`,"field.y":`Od góry (%)`,"field.width":`Szerokość (%)`,"field.height":`Wysokość (%)`,"field.cx":`Środek od lewej (%)`,"field.cy":`Środek od góry (%)`,"field.r":`Promień (% szerokości)`,"field.vertex.x":`Punkt {n} od lewej (%)`,"field.vertex.y":`Punkt {n} od góry (%)`,"field.vertex.add":`Dodaj punkt`,"field.vertex.remove":`Usuń punkt {n}`,"field.label":`Etykieta`,"field.label.optional":`Etykieta (opcjonalna)`,"field.more":`Tu widać tylko pierwsze {shown} z {count}: pozostałe edytuj w źródle.`,"inspector.title":`Właściwości`,"inspector.delete":`Usuń`,"inspector.moveUp":`Przenieś wyżej`,"inspector.moveDown":`Przenieś niżej`,"inspector.empty":`Umieść kursor w elemencie ćwiczenia, aby edytować jego odpowiedzi i ustawienia.`,"inspector.unsupported":`Elementu {tag} nie można tu edytować.`,"inspector.unset":`(nie ustawiono)`,"inspector.item":`{label} {n}`,"inspector.add":`Dodaj`,"inspector.remove":`Usuń`,"inspector.removeItem":`Usuń: {label} {n}`,"inspector.untitled":`Element {n} (pusty)`,"inspector.variant":`Wariant`,"inspector.styleTemplate":`Styl elementu`,"inspector.styleTemplate.inherit":`Jak całe ćwiczenie`,"inspector.styleTemplate.default":`Domyślny wygląd`,"inspector.document":`Ćwiczenie`,"inspector.documentStyle":`Wygląd całego ćwiczenia`,"inspector.upload":`Wgraj plik`,"inspector.uploadItem":`Wgraj plik: {label}`,"inspector.uploading":`Wgrywam…`,"inspector.uploaded":`Wgrano.`,"inspector.uploadFailed":`Nie udało się wgrać pliku. Spróbuj ponownie albo wpisz jego adres.`,"inspector.uploadBlocked":`Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.`,"issues.title":`Problemy`,"issues.errors":`{count, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}`,"issues.warnings":`{count, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}`,"issues.summary":`{errors}, {warnings}`,"issues.none":`Brak błędów i ostrzeżeń.`,"severity.error":`Błąd`,"severity.warning":`Ostrzeżenie`,"label.text":`{label}: {text}`,"preview.title":`Widok ucznia`,"preview.show":`Podgląd`,"preview.refresh":`Odśwież podgląd`,"preview.hint":`Naciśnij „Podgląd”, aby wypróbować ćwiczenie tak, jak zobaczy je uczeń.`,"preview.loading":`Przygotowuję podgląd…`,"preview.stale":`Dokument zmienił się po tym podglądzie. Odśwież go, aby zobaczyć zmiany.`,"preview.invalid":`{count, plural, one {Popraw ten błąd, aby zobaczyć podgląd:} few {Popraw te # błędy, aby zobaczyć podgląd:} many {Popraw tych # błędów, aby zobaczyć podgląd:} other {Popraw te # błędu, aby zobaczyć podgląd:}}`,"preview.failed":`Nie udało się pokazać podglądu.`,"surface.label":`Treść ćwiczenia`,"surface.pageNumber":`Strona {page} z {pages}`,"surface.pageTitle":`Tytuł strony`,"surface.pageJoin":`Połącz ze stroną {previous}`,"surface.pageAdded":`Dodano stronę {page}`,"surface.pageJoined":`Strona {page} połączona ze stroną {previous}`,"surface.pageDelete":`Usuń stronę`,"surface.pageDeleted":`Usunięto stronę {n}`,"surface.pageAddTitle":`Dodaj tytuł`,"surface.pageRemoveTitle":`Usuń tytuł`,"surface.pageTitleOf":`Tytuł strony {page}`,"surface.pageTitleRemoved":`Usunięto tytuł strony {page}`,"surface.points":`{points, plural, one {# pkt} few {# pkt} many {# pkt} other {# pkt}}`,"surface.items":`{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}`,"surface.blockMovedUp":`Blok przesunięty w górę, teraz to blok {n}`,"surface.blockMovedDown":`Blok przesunięty w dół, teraz to blok {n}`,"surface.blockRemoved":`Usunięto blok {n}`,"surface.addOption":`Dodaj odpowiedź`,"surface.chip.empty":`Brak odpowiedzi`,"surface.chip.more":`+{n}`,"surface.picture.alt":`Obrazek: {alt}`,"surface.picture.decorative":`Obrazek ozdobny (bez tekstu alternatywnego)`,"surface.picture.noAlt":`Obrazek bez tekstu alternatywnego`,"surface.picture.blocked":`(niepokazany: polityka adresów nie pozwala na jego adres)`,"surface.picture.edit":`Edytuj`,"surface.loading":`Wczytuję edytor…`,"surface.failed":`Nie udało się wczytać edytora. Odśwież stronę, aby spróbować ponownie.`,"view.visual":`Wizualny`,"view.source":`HTML`,"view.sourceLabel":`Ćwiczenie jako HTML`,"view.sourceErrors":`{n, plural, one {HTML ma # błąd. Popraw go, aby wrócić.} few {HTML ma # błędy. Popraw je, aby wrócić.} many {HTML ma # błędów. Popraw je, aby wrócić.} other {HTML ma # błędu. Popraw go, aby wrócić.}}`,"status.elements":`{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}`,"status.errors":`{n, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}`,"status.warnings":`{n, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}`,"status.ready":`Gotowe do udostępnienia`,"insert.layouts":`Układ`,"insert.layout.two":`Dwie kolumny`,"insert.layout.two.description":`Dwie kolumny tej samej szerokości.`,"insert.layout.three":`Trzy kolumny`,"insert.layout.three.description":`Trzy kolumny tej samej szerokości.`,"insert.layout.wide-narrow":`Szeroka + wąska`,"insert.layout.wide-narrow.description":`Szeroka kolumna, a po niej wąska.`,"insert.layout.narrow-wide":`Wąska + szeroka`,"insert.layout.narrow-wide.description":`Wąska kolumna, a po niej szeroka.`,"insert.layout.picture-text":`Obrazek obok tekstu`,"insert.layout.picture-text.description":`Wybrany obrazek, a obok niego tekst.`,"layout.section":`Kolumny`,"layout.change":`Zmień układ`,"layout.other":`Inny układ`,"layout.unwrap":`Usuń układ`,"layout.delete":`Usuń z zawartością`,"layout.confirm":`Usunąć układ razem z zawartością?`,"layout.confirmDelete":`Tak, usuń`,"layout.cancel":`Anuluj`,"toolbar.font":`Czcionka: {value}`,"toolbar.font.name":`Czcionka`,"toolbar.size":`Rozmiar: {value}`,"toolbar.size.name":`Rozmiar`,"toolbar.color":`Kolor tekstu`,"toolbar.highlight":`Wyróżnienie`,"toolbar.align":`Wyrównanie`,"toolbar.align.start":`Do lewej`,"toolbar.align.center":`Do środka`,"toolbar.align.end":`Do prawej`,"toolbar.align.justify":`Wyjustowane`,"toolbar.spacing":`Odstępy`,"toolbar.spacing.line":`Interlinia`,"toolbar.spacing.after":`Odstęp po`,"toolbar.spacing.none":`Brak`,"toolbar.spacing.small":`Mały`,"toolbar.spacing.medium":`Średni`,"toolbar.spacing.large":`Duży`,"toolbar.clear":`Wyczyść formatowanie`,"toolbar.default":`Domyślnie`,"toolbar.myStyles":`Moje style`,"toolbar.readyStyles":`Gotowe style`,"style.preset.note":`Uwaga`,"style.preset.tip":`Wskazówka`,"style.preset.important":`Ważne`,"style.preset.definition":`Definicja`,"style.preset.example":`Przykład`,"style.preset.quote":`Cytat`,"style.preset.highlight":`Wyróżnienie`,"style.preset.small-print":`Mały druk`,"style.color.theme":`Kolory motywu`,"style.color.swatch":`Kolor motywu {n}`,"style.color.custom":`Własny kolor`,"style.color.picker":`Wybierz kolor`,"style.color.invalid":`Wpisz kolor jako #rrggbb.`,"style.color.none":`Bez koloru`,"style.close":`Zamknij`,"style.form.none":`Ustaw kursor w tym, co chcesz ostylować.`,"style.target.picture":`Styl obrazka`,"style.target.figure":`Styl obrazka z podpisem`,"style.target.block":`Styl bloku`,"style.target.component":`Styl elementu`,"style.target.column":`Styl kolumny`,"style.target.layout":`Styl układu`,"style.position.inline":`W tekście`,"style.position.start":`Po lewej`,"style.position.end":`Po prawej`,"style.position.center":`Na środku`,"style.position.full":`Cała szerokość`,"style.rules.open":`Zarządzaj stylami…`,"style.rules.title":`Style`,"inspector.style":`Styl`,"surface.picture.place":`Położenie i rozmiar: {position}, {width}`,"surface.picture.placeAuto":`Położenie i rozmiar: {position}`,"style.target.more":`{target}…`,"help.cost":`koszt {percent}%`,"help.when.correct":`Dobrze`,"help.when.incorrect":`Źle`,"help.when.partial":`Częściowo dobrze`,"help.when.omitted":`Pominięte`,"help.costLabel":`Koszt podpowiedzi`,"help.whenLabel":`Dla wyniku`},n=`astl.editor`,r=[{namespace:n,locale:`en`,messages:e},{namespace:n,locale:`pl`,messages:t}];export{r as n,n as t};
|
|
2
|
+
//# sourceMappingURL=messages-9xiYDvRT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages-9xiYDvRT.js","names":["en","pl","en_default","pl_default","EDITOR_NAMESPACE","editorMessages"],"sources":["../../../../editor/src/messages/en.json","../../../../editor/src/messages/pl.json","../../../../editor/src/messages.ts"],"sourcesContent":["{\n \"insert.title\": \"Insert\",\n \"insert.components\": \"Components\",\n \"insert.exercises\": \"Exercises\",\n \"insert.content\": \"Content\",\n \"insert.picture\": \"Picture\",\n \"insert.picture.description\": \"A picture with alt text and an optional caption\",\n \"insert.pageBreak\": \"Page break\",\n \"insert.pageBreak.description\": \"Split the exercise into steps at the cursor\",\n \"insert.hint\": \"Hint\",\n \"insert.hint.description\": \"One students ask for: for the question at the cursor, else for the page\",\n \"insert.explanation\": \"Explanation\",\n \"insert.explanation.description\": \"Why the answer is right, shown once it is checked\",\n \"insert.feedback\": \"Feedback\",\n \"insert.feedback.description\": \"A text by the verdict, shown once the answer is checked\",\n \"insert.text\": \"Text\",\n \"insert.text.description\": \"A paragraph after this block\",\n \"insert.noMatch\": \"Nothing matches “{query}”.\",\n \"toolbar.label\": \"Format and insert\",\n \"toolbar.style\": \"Text style: {style}\",\n \"toolbar.paragraph\": \"Paragraph\",\n \"toolbar.heading\": \"Heading\",\n \"toolbar.subheading\": \"Subheading\",\n \"toolbar.bold\": \"Bold\",\n \"toolbar.italic\": \"Italic\",\n \"toolbar.underline\": \"Underline\",\n \"toolbar.link\": \"Link\",\n \"toolbar.link.address\": \"Link address\",\n \"toolbar.link.apply\": \"Apply\",\n \"toolbar.link.remove\": \"Remove link\",\n \"toolbar.link.blocked\": \"This address is not allowed here.\",\n \"toolbar.bulleted\": \"Bulleted list\",\n \"toolbar.numbered\": \"Numbered list\",\n \"toolbar.undo\": \"Undo\",\n \"toolbar.redo\": \"Redo\",\n \"toolbar.elements\": \"Elements\",\n \"toolbar.templates\": \"Templates\",\n \"toolbar.layouts\": \"Layout\",\n \"toolbar.view\": \"View\",\n \"toolbar.search\": \"Search\",\n \"block.text\": \"Text\",\n \"block.gap\": \"Gap\",\n \"issue.onPage\": \"{n} on page {page}\",\n \"picture.title\": \"Add a picture\",\n \"picture.editTitle\": \"Edit the picture\",\n \"picture.file\": \"Upload a picture\",\n \"picture.library\": \"Choose from the library\",\n \"picture.urlOnly\": \"This editor adds pictures by their address only: it has no upload.\",\n \"picture.src\": \"Picture address (URL)\",\n \"picture.alt\": \"Alt text\",\n \"picture.altHelp\": \"What the picture shows, for students who cannot see it. Do not give an answer away.\",\n \"picture.decorative\": \"Decorative: screen readers skip it (alt=\\\"\\\")\",\n \"picture.caption\": \"Caption (optional)\",\n \"picture.cancel\": \"Cancel\",\n \"picture.insert\": \"Insert\",\n \"picture.save\": \"Save\",\n \"picture.uploading\": \"Uploading…\",\n \"picture.uploaded\": \"Uploaded.\",\n \"picture.uploadFailed\": \"The upload failed. Try again, or give the picture's address.\",\n \"picture.uploadBlocked\": \"The upload gave an address the URL policy does not allow.\",\n \"picture.picked\": \"Chosen from the library.\",\n \"picture.pickFailed\": \"The library did not open. Try again, or give the picture's address.\",\n \"picture.pickBlocked\": \"The library returned an address the URL policy does not allow.\",\n \"picture.srcMissing\": \"Give the picture's address, or upload it.\",\n \"picture.srcBlocked\": \"The URL policy does not allow this address.\",\n \"picture.altMissing\": \"Describe the picture, or mark it as decorative.\",\n \"picture.altRequired\": \"Describe the picture: students who cannot see it need its alt text for the task.\",\n \"picture.pasteRefused\": \"This editor has no upload, so a picture file cannot be pasted or dropped. Add it with Insert, Picture, by its address.\",\n \"field.picture.src\": \"Picture address (URL)\",\n \"field.regions.draw\": \"Drag on the picture to draw a zone, or add one and type its numbers.\",\n \"field.points.place\": \"Click the picture to place a pin, or add one and type its position.\",\n \"field.region\": \"Zone {n}\",\n \"field.region.add\": \"Add a zone\",\n \"field.region.remove\": \"Remove zone {n}\",\n \"field.point\": \"Pin {n}\",\n \"field.point.add\": \"Add a pin\",\n \"field.point.remove\": \"Remove pin {n}\",\n \"field.shape\": \"Shape\",\n \"field.shape.rect\": \"Rectangle\",\n \"field.shape.circle\": \"Circle\",\n \"field.shape.polygon\": \"Polygon\",\n \"field.x\": \"From the left (%)\",\n \"field.y\": \"From the top (%)\",\n \"field.width\": \"Width (%)\",\n \"field.height\": \"Height (%)\",\n \"field.cx\": \"Centre from the left (%)\",\n \"field.cy\": \"Centre from the top (%)\",\n \"field.r\": \"Radius (% of the width)\",\n \"field.vertex.x\": \"Point {n} from the left (%)\",\n \"field.vertex.y\": \"Point {n} from the top (%)\",\n \"field.vertex.add\": \"Add a point\",\n \"field.vertex.remove\": \"Remove point {n}\",\n \"field.label\": \"Label\",\n \"field.label.optional\": \"Label (optional)\",\n \"field.more\": \"Only the first {shown} of {count} are listed here: edit the others in the source.\",\n \"inspector.title\": \"Properties\",\n \"inspector.delete\": \"Delete\",\n \"inspector.moveUp\": \"Move up\",\n \"inspector.moveDown\": \"Move down\",\n \"inspector.empty\": \"Put the cursor in an exercise element to edit its answers and settings.\",\n \"inspector.unsupported\": \"Element {tag} cannot be edited here.\",\n \"inspector.unset\": \"(not set)\",\n \"inspector.item\": \"{label} {n}\",\n \"inspector.add\": \"Add\",\n \"inspector.remove\": \"Remove\",\n \"inspector.removeItem\": \"Remove: {label} {n}\",\n \"inspector.untitled\": \"Item {n} (empty)\",\n \"inspector.variant\": \"Variant\",\n \"inspector.styleTemplate\": \"Element style\",\n \"inspector.styleTemplate.inherit\": \"Same as the exercise\",\n \"inspector.styleTemplate.default\": \"Default look\",\n \"inspector.document\": \"Exercise\",\n \"inspector.documentStyle\": \"Look of the whole exercise\",\n \"inspector.upload\": \"Upload a file\",\n \"inspector.uploadItem\": \"Upload a file: {label}\",\n \"inspector.uploading\": \"Uploading…\",\n \"inspector.uploaded\": \"Uploaded.\",\n \"inspector.uploadFailed\": \"The upload failed. Try again, or type its address.\",\n \"inspector.uploadBlocked\": \"The upload gave an address the URL policy does not allow.\",\n \"issues.title\": \"Problems\",\n \"issues.errors\": \"{count, plural, one {# error} other {# errors}}\",\n \"issues.warnings\": \"{count, plural, one {# warning} other {# warnings}}\",\n \"issues.summary\": \"{errors}, {warnings}\",\n \"issues.none\": \"No errors or warnings.\",\n \"severity.error\": \"Error\",\n \"severity.warning\": \"Warning\",\n \"label.text\": \"{label}: {text}\",\n \"preview.title\": \"Student view\",\n \"preview.show\": \"Preview\",\n \"preview.refresh\": \"Refresh preview\",\n \"preview.hint\": \"Press Preview to try the exercise the way a student will see it.\",\n \"preview.loading\": \"Preparing the preview…\",\n \"preview.stale\": \"The document changed after this preview. Refresh it to see the changes.\",\n \"preview.invalid\": \"{count, plural, one {Fix this error to see the preview:} other {Fix these # errors to see the preview:}}\",\n \"preview.failed\": \"The preview could not be shown.\",\n \"surface.label\": \"Exercise content\",\n \"surface.pageNumber\": \"Page {page} of {pages}\",\n \"surface.pageTitle\": \"Page title\",\n \"surface.pageJoin\": \"Join with page {previous}\",\n \"surface.pageAdded\": \"Page {page} added\",\n \"surface.pageJoined\": \"Page {page} joined with page {previous}\",\n \"surface.pageDelete\": \"Delete page\",\n \"surface.pageDeleted\": \"Deleted page {n}\",\n \"surface.pageAddTitle\": \"Add title\",\n \"surface.pageRemoveTitle\": \"Remove title\",\n \"surface.pageTitleOf\": \"Title of page {page}\",\n \"surface.pageTitleRemoved\": \"Removed the title of page {page}\",\n \"surface.points\": \"{points, plural, one {# pt} other {# pts}}\",\n \"surface.items\": \"{n, plural, one {# item} other {# items}}\",\n \"surface.blockMovedUp\": \"Block moved up, now block {n}\",\n \"surface.blockMovedDown\": \"Block moved down, now block {n}\",\n \"surface.blockRemoved\": \"Block {n} deleted\",\n \"surface.addOption\": \"Add option\",\n \"surface.chip.empty\": \"No answer\",\n \"surface.chip.more\": \"+{n}\",\n \"surface.picture.alt\": \"Picture: {alt}\",\n \"surface.picture.decorative\": \"Picture, decorative (no alt text)\",\n \"surface.picture.noAlt\": \"Picture without alt text\",\n \"surface.picture.blocked\": \"(not shown: the URL policy does not allow its address)\",\n \"surface.picture.edit\": \"Edit\",\n \"surface.loading\": \"Loading the editor…\",\n \"surface.failed\": \"The editor could not be loaded. Reload the page to try again.\",\n \"view.visual\": \"Visual\",\n \"view.source\": \"HTML\",\n \"view.sourceLabel\": \"The exercise as HTML\",\n \"view.sourceErrors\": \"{n, plural, one {The HTML has # error. Fix it to go back.} other {The HTML has # errors. Fix them to go back.}}\",\n \"status.elements\": \"{n, plural, one {# element} other {# elements}}\",\n \"status.errors\": \"{n, plural, one {# error} other {# errors}}\",\n \"status.warnings\": \"{n, plural, one {# warning} other {# warnings}}\",\n \"status.ready\": \"Ready to share\",\n \"insert.layouts\": \"Layout\",\n \"insert.layout.two\": \"Two columns\",\n \"insert.layout.two.description\": \"Two columns of the same width.\",\n \"insert.layout.three\": \"Three columns\",\n \"insert.layout.three.description\": \"Three columns of the same width.\",\n \"insert.layout.wide-narrow\": \"Wide + narrow\",\n \"insert.layout.wide-narrow.description\": \"A wide column, then a narrow one.\",\n \"insert.layout.narrow-wide\": \"Narrow + wide\",\n \"insert.layout.narrow-wide.description\": \"A narrow column, then a wide one.\",\n \"insert.layout.picture-text\": \"Picture beside text\",\n \"insert.layout.picture-text.description\": \"A picture you choose, with text next to it.\",\n \"layout.section\": \"Columns\",\n \"layout.change\": \"Change layout\",\n \"layout.other\": \"Another layout\",\n \"layout.unwrap\": \"Remove layout\",\n \"layout.delete\": \"Delete with content\",\n \"layout.confirm\": \"Delete the layout and its content?\",\n \"layout.confirmDelete\": \"Yes, delete\",\n \"layout.cancel\": \"Cancel\",\n \"toolbar.font\": \"Font: {value}\",\n \"toolbar.font.name\": \"Font\",\n \"toolbar.size\": \"Size: {value}\",\n \"toolbar.size.name\": \"Size\",\n \"toolbar.color\": \"Text colour\",\n \"toolbar.highlight\": \"Highlight\",\n \"toolbar.align\": \"Alignment\",\n \"toolbar.align.start\": \"Left\",\n \"toolbar.align.center\": \"Centre\",\n \"toolbar.align.end\": \"Right\",\n \"toolbar.align.justify\": \"Justified\",\n \"toolbar.spacing\": \"Spacing\",\n \"toolbar.spacing.line\": \"Line height\",\n \"toolbar.spacing.after\": \"Space after\",\n \"toolbar.spacing.none\": \"None\",\n \"toolbar.spacing.small\": \"Small\",\n \"toolbar.spacing.medium\": \"Medium\",\n \"toolbar.spacing.large\": \"Large\",\n \"toolbar.clear\": \"Clear formatting\",\n \"toolbar.default\": \"Default\",\n \"toolbar.myStyles\": \"My styles\",\n \"toolbar.readyStyles\": \"Ready styles\",\n \"style.preset.note\": \"Note\",\n \"style.preset.tip\": \"Tip\",\n \"style.preset.important\": \"Important\",\n \"style.preset.definition\": \"Definition\",\n \"style.preset.example\": \"Example\",\n \"style.preset.quote\": \"Quote\",\n \"style.preset.highlight\": \"Highlight\",\n \"style.preset.small-print\": \"Small print\",\n \"style.color.theme\": \"Theme colours\",\n \"style.color.swatch\": \"Theme colour {n}\",\n \"style.color.custom\": \"Custom colour\",\n \"style.color.picker\": \"Pick a colour\",\n \"style.color.invalid\": \"Write a colour as #rrggbb.\",\n \"style.color.none\": \"No colour\",\n \"style.close\": \"Close\",\n \"style.form.none\": \"Put the cursor in what you want to style.\",\n \"style.target.picture\": \"Picture style\",\n \"style.target.figure\": \"Picture and caption style\",\n \"style.target.block\": \"Block style\",\n \"style.target.component\": \"Element style\",\n \"style.target.column\": \"Column style\",\n \"style.target.layout\": \"Layout style\",\n \"style.position.inline\": \"In the text\",\n \"style.position.start\": \"On the left\",\n \"style.position.end\": \"On the right\",\n \"style.position.center\": \"Centred\",\n \"style.position.full\": \"Full width\",\n \"style.rules.open\": \"Manage styles…\",\n \"style.rules.title\": \"Styles\",\n \"inspector.style\": \"Style\",\n \"surface.picture.place\": \"Position and size: {position}, {width}\",\n \"surface.picture.placeAuto\": \"Position and size: {position}\",\n \"style.target.more\": \"{target}…\",\n \"help.cost\": \"costs {percent}%\",\n \"help.when.correct\": \"Correct\",\n \"help.when.incorrect\": \"Wrong\",\n \"help.when.partial\": \"Partly correct\",\n \"help.when.omitted\": \"Skipped\",\n \"help.costLabel\": \"Cost of the hint\",\n \"help.whenLabel\": \"For the result\"\n}\n","{\n \"insert.title\": \"Wstaw\",\n \"insert.components\": \"Elementy\",\n \"insert.exercises\": \"Ćwiczenia\",\n \"insert.content\": \"Treść\",\n \"insert.picture\": \"Obrazek\",\n \"insert.picture.description\": \"Obrazek z tekstem alternatywnym i podpisem do wyboru\",\n \"insert.pageBreak\": \"Podział strony\",\n \"insert.pageBreak.description\": \"Podziel ćwiczenie na kroki od miejsca kursora\",\n \"insert.hint\": \"Podpowiedź\",\n \"insert.hint.description\": \"Na prośbę ucznia: do pytania przy kursorze, a poza nim do strony\",\n \"insert.explanation\": \"Wyjaśnienie\",\n \"insert.explanation.description\": \"Dlaczego odpowiedź jest dobra, widoczne po sprawdzeniu\",\n \"insert.feedback\": \"Informacja zwrotna\",\n \"insert.feedback.description\": \"Tekst zależny od wyniku, widoczny po sprawdzeniu\",\n \"insert.text\": \"Tekst\",\n \"insert.text.description\": \"Akapit po tym bloku\",\n \"insert.noMatch\": \"Nic nie pasuje do „{query}”.\",\n \"toolbar.label\": \"Formatowanie i wstawianie\",\n \"toolbar.style\": \"Styl tekstu: {style}\",\n \"toolbar.paragraph\": \"Akapit\",\n \"toolbar.heading\": \"Nagłówek\",\n \"toolbar.subheading\": \"Podtytuł\",\n \"toolbar.bold\": \"Pogrubienie\",\n \"toolbar.italic\": \"Kursywa\",\n \"toolbar.underline\": \"Podkreślenie\",\n \"toolbar.link\": \"Link\",\n \"toolbar.link.address\": \"Adres linku\",\n \"toolbar.link.apply\": \"Zastosuj\",\n \"toolbar.link.remove\": \"Usuń link\",\n \"toolbar.link.blocked\": \"Tego adresu nie można tu użyć.\",\n \"toolbar.bulleted\": \"Lista punktowana\",\n \"toolbar.numbered\": \"Lista numerowana\",\n \"toolbar.undo\": \"Cofnij\",\n \"toolbar.redo\": \"Ponów\",\n \"toolbar.elements\": \"Elementy\",\n \"toolbar.templates\": \"Szablony\",\n \"toolbar.layouts\": \"Układ\",\n \"toolbar.view\": \"Widok\",\n \"toolbar.search\": \"Szukaj\",\n \"block.text\": \"Tekst\",\n \"block.gap\": \"Luka\",\n \"issue.onPage\": \"{n} na stronie {page}\",\n \"picture.title\": \"Dodaj obrazek\",\n \"picture.editTitle\": \"Edytuj obrazek\",\n \"picture.file\": \"Wgraj obrazek\",\n \"picture.library\": \"Wybierz z biblioteki\",\n \"picture.urlOnly\": \"Ten edytor dodaje obrazki tylko po adresie: nie ma wgrywania.\",\n \"picture.src\": \"Adres obrazka (URL)\",\n \"picture.alt\": \"Tekst alternatywny\",\n \"picture.altHelp\": \"Co przedstawia obrazek, dla uczniów, którzy go nie widzą. Nie zdradzaj odpowiedzi.\",\n \"picture.decorative\": \"Ozdobny: czytniki ekranu go pomijają (alt=\\\"\\\")\",\n \"picture.caption\": \"Podpis (opcjonalny)\",\n \"picture.cancel\": \"Anuluj\",\n \"picture.insert\": \"Wstaw\",\n \"picture.save\": \"Zapisz\",\n \"picture.uploading\": \"Wgrywam…\",\n \"picture.uploaded\": \"Wgrano.\",\n \"picture.uploadFailed\": \"Nie udało się wgrać obrazka. Spróbuj ponownie albo podaj jego adres.\",\n \"picture.uploadBlocked\": \"Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.\",\n \"picture.picked\": \"Wybrano z biblioteki.\",\n \"picture.pickFailed\": \"Nie udało się otworzyć biblioteki. Spróbuj ponownie albo podaj adres obrazka.\",\n \"picture.pickBlocked\": \"Biblioteka zwróciła adres, na który nie pozwala polityka adresów.\",\n \"picture.srcMissing\": \"Podaj adres obrazka albo go wgraj.\",\n \"picture.srcBlocked\": \"Polityka adresów nie pozwala na ten adres.\",\n \"picture.altMissing\": \"Opisz obrazek albo oznacz go jako ozdobny.\",\n \"picture.altRequired\": \"Opisz obrazek: uczniowie, którzy go nie widzą, potrzebują tekstu alternatywnego do zadania.\",\n \"picture.pasteRefused\": \"Ten edytor nie ma wgrywania, więc nie można wkleić ani upuścić pliku obrazka. Dodaj go przez Wstaw, Obrazek, podając adres.\",\n \"field.picture.src\": \"Adres obrazka (URL)\",\n \"field.regions.draw\": \"Przeciągnij po obrazku, aby narysować strefę, albo dodaj ją i wpisz jej liczby.\",\n \"field.points.place\": \"Kliknij obrazek, aby wbić pinezkę, albo dodaj ją i wpisz jej położenie.\",\n \"field.region\": \"Strefa {n}\",\n \"field.region.add\": \"Dodaj strefę\",\n \"field.region.remove\": \"Usuń strefę {n}\",\n \"field.point\": \"Pinezka {n}\",\n \"field.point.add\": \"Dodaj pinezkę\",\n \"field.point.remove\": \"Usuń pinezkę {n}\",\n \"field.shape\": \"Kształt\",\n \"field.shape.rect\": \"Prostokąt\",\n \"field.shape.circle\": \"Koło\",\n \"field.shape.polygon\": \"Wielokąt\",\n \"field.x\": \"Od lewej (%)\",\n \"field.y\": \"Od góry (%)\",\n \"field.width\": \"Szerokość (%)\",\n \"field.height\": \"Wysokość (%)\",\n \"field.cx\": \"Środek od lewej (%)\",\n \"field.cy\": \"Środek od góry (%)\",\n \"field.r\": \"Promień (% szerokości)\",\n \"field.vertex.x\": \"Punkt {n} od lewej (%)\",\n \"field.vertex.y\": \"Punkt {n} od góry (%)\",\n \"field.vertex.add\": \"Dodaj punkt\",\n \"field.vertex.remove\": \"Usuń punkt {n}\",\n \"field.label\": \"Etykieta\",\n \"field.label.optional\": \"Etykieta (opcjonalna)\",\n \"field.more\": \"Tu widać tylko pierwsze {shown} z {count}: pozostałe edytuj w źródle.\",\n \"inspector.title\": \"Właściwości\",\n \"inspector.delete\": \"Usuń\",\n \"inspector.moveUp\": \"Przenieś wyżej\",\n \"inspector.moveDown\": \"Przenieś niżej\",\n \"inspector.empty\": \"Umieść kursor w elemencie ćwiczenia, aby edytować jego odpowiedzi i ustawienia.\",\n \"inspector.unsupported\": \"Elementu {tag} nie można tu edytować.\",\n \"inspector.unset\": \"(nie ustawiono)\",\n \"inspector.item\": \"{label} {n}\",\n \"inspector.add\": \"Dodaj\",\n \"inspector.remove\": \"Usuń\",\n \"inspector.removeItem\": \"Usuń: {label} {n}\",\n \"inspector.untitled\": \"Element {n} (pusty)\",\n \"inspector.variant\": \"Wariant\",\n \"inspector.styleTemplate\": \"Styl elementu\",\n \"inspector.styleTemplate.inherit\": \"Jak całe ćwiczenie\",\n \"inspector.styleTemplate.default\": \"Domyślny wygląd\",\n \"inspector.document\": \"Ćwiczenie\",\n \"inspector.documentStyle\": \"Wygląd całego ćwiczenia\",\n \"inspector.upload\": \"Wgraj plik\",\n \"inspector.uploadItem\": \"Wgraj plik: {label}\",\n \"inspector.uploading\": \"Wgrywam…\",\n \"inspector.uploaded\": \"Wgrano.\",\n \"inspector.uploadFailed\": \"Nie udało się wgrać pliku. Spróbuj ponownie albo wpisz jego adres.\",\n \"inspector.uploadBlocked\": \"Wgrywanie zwróciło adres, na który nie pozwala polityka adresów.\",\n \"issues.title\": \"Problemy\",\n \"issues.errors\": \"{count, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}\",\n \"issues.warnings\": \"{count, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}\",\n \"issues.summary\": \"{errors}, {warnings}\",\n \"issues.none\": \"Brak błędów i ostrzeżeń.\",\n \"severity.error\": \"Błąd\",\n \"severity.warning\": \"Ostrzeżenie\",\n \"label.text\": \"{label}: {text}\",\n \"preview.title\": \"Widok ucznia\",\n \"preview.show\": \"Podgląd\",\n \"preview.refresh\": \"Odśwież podgląd\",\n \"preview.hint\": \"Naciśnij „Podgląd”, aby wypróbować ćwiczenie tak, jak zobaczy je uczeń.\",\n \"preview.loading\": \"Przygotowuję podgląd…\",\n \"preview.stale\": \"Dokument zmienił się po tym podglądzie. Odśwież go, aby zobaczyć zmiany.\",\n \"preview.invalid\": \"{count, plural, one {Popraw ten błąd, aby zobaczyć podgląd:} few {Popraw te # błędy, aby zobaczyć podgląd:} many {Popraw tych # błędów, aby zobaczyć podgląd:} other {Popraw te # błędu, aby zobaczyć podgląd:}}\",\n \"preview.failed\": \"Nie udało się pokazać podglądu.\",\n \"surface.label\": \"Treść ćwiczenia\",\n \"surface.pageNumber\": \"Strona {page} z {pages}\",\n \"surface.pageTitle\": \"Tytuł strony\",\n \"surface.pageJoin\": \"Połącz ze stroną {previous}\",\n \"surface.pageAdded\": \"Dodano stronę {page}\",\n \"surface.pageJoined\": \"Strona {page} połączona ze stroną {previous}\",\n \"surface.pageDelete\": \"Usuń stronę\",\n \"surface.pageDeleted\": \"Usunięto stronę {n}\",\n \"surface.pageAddTitle\": \"Dodaj tytuł\",\n \"surface.pageRemoveTitle\": \"Usuń tytuł\",\n \"surface.pageTitleOf\": \"Tytuł strony {page}\",\n \"surface.pageTitleRemoved\": \"Usunięto tytuł strony {page}\",\n \"surface.points\": \"{points, plural, one {# pkt} few {# pkt} many {# pkt} other {# pkt}}\",\n \"surface.items\": \"{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}\",\n \"surface.blockMovedUp\": \"Blok przesunięty w górę, teraz to blok {n}\",\n \"surface.blockMovedDown\": \"Blok przesunięty w dół, teraz to blok {n}\",\n \"surface.blockRemoved\": \"Usunięto blok {n}\",\n \"surface.addOption\": \"Dodaj odpowiedź\",\n \"surface.chip.empty\": \"Brak odpowiedzi\",\n \"surface.chip.more\": \"+{n}\",\n \"surface.picture.alt\": \"Obrazek: {alt}\",\n \"surface.picture.decorative\": \"Obrazek ozdobny (bez tekstu alternatywnego)\",\n \"surface.picture.noAlt\": \"Obrazek bez tekstu alternatywnego\",\n \"surface.picture.blocked\": \"(niepokazany: polityka adresów nie pozwala na jego adres)\",\n \"surface.picture.edit\": \"Edytuj\",\n \"surface.loading\": \"Wczytuję edytor…\",\n \"surface.failed\": \"Nie udało się wczytać edytora. Odśwież stronę, aby spróbować ponownie.\",\n \"view.visual\": \"Wizualny\",\n \"view.source\": \"HTML\",\n \"view.sourceLabel\": \"Ćwiczenie jako HTML\",\n \"view.sourceErrors\": \"{n, plural, one {HTML ma # błąd. Popraw go, aby wrócić.} few {HTML ma # błędy. Popraw je, aby wrócić.} many {HTML ma # błędów. Popraw je, aby wrócić.} other {HTML ma # błędu. Popraw go, aby wrócić.}}\",\n \"status.elements\": \"{n, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}}\",\n \"status.errors\": \"{n, plural, one {# błąd} few {# błędy} many {# błędów} other {# błędu}}\",\n \"status.warnings\": \"{n, plural, one {# ostrzeżenie} few {# ostrzeżenia} many {# ostrzeżeń} other {# ostrzeżenia}}\",\n \"status.ready\": \"Gotowe do udostępnienia\",\n \"insert.layouts\": \"Układ\",\n \"insert.layout.two\": \"Dwie kolumny\",\n \"insert.layout.two.description\": \"Dwie kolumny tej samej szerokości.\",\n \"insert.layout.three\": \"Trzy kolumny\",\n \"insert.layout.three.description\": \"Trzy kolumny tej samej szerokości.\",\n \"insert.layout.wide-narrow\": \"Szeroka + wąska\",\n \"insert.layout.wide-narrow.description\": \"Szeroka kolumna, a po niej wąska.\",\n \"insert.layout.narrow-wide\": \"Wąska + szeroka\",\n \"insert.layout.narrow-wide.description\": \"Wąska kolumna, a po niej szeroka.\",\n \"insert.layout.picture-text\": \"Obrazek obok tekstu\",\n \"insert.layout.picture-text.description\": \"Wybrany obrazek, a obok niego tekst.\",\n \"layout.section\": \"Kolumny\",\n \"layout.change\": \"Zmień układ\",\n \"layout.other\": \"Inny układ\",\n \"layout.unwrap\": \"Usuń układ\",\n \"layout.delete\": \"Usuń z zawartością\",\n \"layout.confirm\": \"Usunąć układ razem z zawartością?\",\n \"layout.confirmDelete\": \"Tak, usuń\",\n \"layout.cancel\": \"Anuluj\",\n \"toolbar.font\": \"Czcionka: {value}\",\n \"toolbar.font.name\": \"Czcionka\",\n \"toolbar.size\": \"Rozmiar: {value}\",\n \"toolbar.size.name\": \"Rozmiar\",\n \"toolbar.color\": \"Kolor tekstu\",\n \"toolbar.highlight\": \"Wyróżnienie\",\n \"toolbar.align\": \"Wyrównanie\",\n \"toolbar.align.start\": \"Do lewej\",\n \"toolbar.align.center\": \"Do środka\",\n \"toolbar.align.end\": \"Do prawej\",\n \"toolbar.align.justify\": \"Wyjustowane\",\n \"toolbar.spacing\": \"Odstępy\",\n \"toolbar.spacing.line\": \"Interlinia\",\n \"toolbar.spacing.after\": \"Odstęp po\",\n \"toolbar.spacing.none\": \"Brak\",\n \"toolbar.spacing.small\": \"Mały\",\n \"toolbar.spacing.medium\": \"Średni\",\n \"toolbar.spacing.large\": \"Duży\",\n \"toolbar.clear\": \"Wyczyść formatowanie\",\n \"toolbar.default\": \"Domyślnie\",\n \"toolbar.myStyles\": \"Moje style\",\n \"toolbar.readyStyles\": \"Gotowe style\",\n \"style.preset.note\": \"Uwaga\",\n \"style.preset.tip\": \"Wskazówka\",\n \"style.preset.important\": \"Ważne\",\n \"style.preset.definition\": \"Definicja\",\n \"style.preset.example\": \"Przykład\",\n \"style.preset.quote\": \"Cytat\",\n \"style.preset.highlight\": \"Wyróżnienie\",\n \"style.preset.small-print\": \"Mały druk\",\n \"style.color.theme\": \"Kolory motywu\",\n \"style.color.swatch\": \"Kolor motywu {n}\",\n \"style.color.custom\": \"Własny kolor\",\n \"style.color.picker\": \"Wybierz kolor\",\n \"style.color.invalid\": \"Wpisz kolor jako #rrggbb.\",\n \"style.color.none\": \"Bez koloru\",\n \"style.close\": \"Zamknij\",\n \"style.form.none\": \"Ustaw kursor w tym, co chcesz ostylować.\",\n \"style.target.picture\": \"Styl obrazka\",\n \"style.target.figure\": \"Styl obrazka z podpisem\",\n \"style.target.block\": \"Styl bloku\",\n \"style.target.component\": \"Styl elementu\",\n \"style.target.column\": \"Styl kolumny\",\n \"style.target.layout\": \"Styl układu\",\n \"style.position.inline\": \"W tekście\",\n \"style.position.start\": \"Po lewej\",\n \"style.position.end\": \"Po prawej\",\n \"style.position.center\": \"Na środku\",\n \"style.position.full\": \"Cała szerokość\",\n \"style.rules.open\": \"Zarządzaj stylami…\",\n \"style.rules.title\": \"Style\",\n \"inspector.style\": \"Styl\",\n \"surface.picture.place\": \"Położenie i rozmiar: {position}, {width}\",\n \"surface.picture.placeAuto\": \"Położenie i rozmiar: {position}\",\n \"style.target.more\": \"{target}…\",\n \"help.cost\": \"koszt {percent}%\",\n \"help.when.correct\": \"Dobrze\",\n \"help.when.incorrect\": \"Źle\",\n \"help.when.partial\": \"Częściowo dobrze\",\n \"help.when.omitted\": \"Pominięte\",\n \"help.costLabel\": \"Koszt podpowiedzi\",\n \"help.whenLabel\": \"Dla wyniku\"\n}\n","import type { MessageCatalog } from '@astl/core';\nimport en from './messages/en.json' with { type: 'json' };\nimport pl from './messages/pl.json' with { type: 'json' };\n\n/** i18n namespace of the authoring kit's own UI (insert menu, inspector, issues, preview). */\nexport const EDITOR_NAMESPACE = 'astl.editor';\n\nexport const editorMessages: readonly MessageCatalog[] = [\n { namespace: EDITOR_NAMESPACE, locale: 'en', messages: en },\n { namespace: EDITOR_NAMESPACE, locale: 'pl', messages: pl },\n];\n"],"mappings":"A,yvrBEKaI,EAAmB,cAEnBC,EAA4C,CACvD,CAAE,UAAWD,EAAkB,OAAQ,KAAM,SAAUJ,CAAG,EAC1D,CAAE,UAAWI,EAAkB,OAAQ,KAAM,SAAUH,CAAG,CAC5D,E"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import{E as e}from"./runtime-DxAbpr3S.js";var t=e`
|
|
2
|
+
.option {
|
|
3
|
+
hyphens: auto;
|
|
4
|
+
}
|
|
5
|
+
input {
|
|
6
|
+
appearance: none;
|
|
7
|
+
flex: none;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
display: grid;
|
|
10
|
+
place-content: center;
|
|
11
|
+
inline-size: 1.25rem;
|
|
12
|
+
block-size: 1.25rem;
|
|
13
|
+
margin: 0;
|
|
14
|
+
border: var(--astl-outline-width) solid var(--astl-outline);
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
background: var(--astl-surface);
|
|
17
|
+
color: var(--astl-on-accent);
|
|
18
|
+
font: inherit;
|
|
19
|
+
cursor: inherit;
|
|
20
|
+
}
|
|
21
|
+
input:checked {
|
|
22
|
+
border-color: var(--astl-selected);
|
|
23
|
+
background: var(--astl-selected);
|
|
24
|
+
}
|
|
25
|
+
input[type='radio']:checked::before {
|
|
26
|
+
content: '';
|
|
27
|
+
inline-size: 0.5rem;
|
|
28
|
+
block-size: 0.5rem;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
background: currentColor;
|
|
31
|
+
}
|
|
32
|
+
@media (forced-colors: active) {
|
|
33
|
+
input {
|
|
34
|
+
appearance: auto;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.option[data-selected] {
|
|
38
|
+
border-color: var(--astl-selected);
|
|
39
|
+
background: var(--astl-selected-soft);
|
|
40
|
+
}
|
|
41
|
+
.option[data-selected]::before {
|
|
42
|
+
content: '';
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset-block: 0;
|
|
45
|
+
inset-inline-start: 0;
|
|
46
|
+
inline-size: var(--astl-selected-bar);
|
|
47
|
+
background: var(--astl-selected);
|
|
48
|
+
}
|
|
49
|
+
`;export{t};
|
|
50
|
+
//# sourceMappingURL=option-styles-WKzjKmCH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"option-styles-WKzjKmCH.js","names":["i","optionStyles"],"sources":["../../../../components/src/option-styles.ts"],"sourcesContent":["/**\n * Shared CSS of the options with a painted radio, `.option` boxes that show their pick: choice, true-false and match.\n * Imported only by them (one small chunk with their elements, none with the others). An element lists it after its\n * own rules and before `blockStyles`; to refine a rule here, it uses a more specific selector.\n */\nimport { type CSSResultGroup, css } from 'lit';\n\n// Painted radios: crisp in every theme, also when locked (a disabled native control fades out); forced colours draw\n// the native one. A pick shows one hue: the checked control in the selected colour, as the option's edge. Selected:\n// the theme's fill; in hc also a bar at the inline start (selected-* tokens), so a pick shows without the control\n// mark and without colour, and never looks like a verdict border. Option texts can be long: they hyphenate.\nexport const optionStyles: CSSResultGroup = css`\n .option {\n hyphens: auto;\n }\n input {\n appearance: none;\n flex: none;\n box-sizing: border-box;\n display: grid;\n place-content: center;\n inline-size: 1.25rem;\n block-size: 1.25rem;\n margin: 0;\n border: var(--astl-outline-width) solid var(--astl-outline);\n border-radius: 50%;\n background: var(--astl-surface);\n color: var(--astl-on-accent);\n font: inherit;\n cursor: inherit;\n }\n input:checked {\n border-color: var(--astl-selected);\n background: var(--astl-selected);\n }\n input[type='radio']:checked::before {\n content: '';\n inline-size: 0.5rem;\n block-size: 0.5rem;\n border-radius: 50%;\n background: currentColor;\n }\n @media (forced-colors: active) {\n input {\n appearance: auto;\n }\n }\n .option[data-selected] {\n border-color: var(--astl-selected);\n background: var(--astl-selected-soft);\n }\n .option[data-selected]::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: var(--astl-selected-bar);\n background: var(--astl-selected);\n }\n`;\n"],"mappings":"A,0CAWA,IAAaC,EAA+B,CAAG"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import{C as e,E as t,T as n,b as r,h as i,n as a,v as o,y as s}from"./runtime-DxAbpr3S.js";import{n as c,r as l,t as u}from"./order-manifest-J5IXN0he.js";import{t as d}from"./pick-and-place-DVQIPYuL.js";import{t as f}from"./roving-focus-BxGgi2DD.js";import{t as p}from"./block-styles-CKo9x7Vt.js";var m=`astl.order`,h=[{namespace:m,locale:`en`,messages:c},{namespace:m,locale:`pl`,messages:u}],g=2,_=n`<g fill="currentColor"><circle cx="7" cy="5" r="1.6"/><circle cx="13" cy="5" r="1.6"/><circle cx="7" cy="10" r="1.6"/><circle cx="13" cy="10" r="1.6"/><circle cx="7" cy="15" r="1.6"/><circle cx="13" cy="15" r="1.6"/></g>`,v=n`<path d="M10 2.5v15M6 6.5l4-4 4 4M6 13.5l4 4 4-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>`,y=n`<path d="M2.5 10h15M6.5 6l-4 4 4 4M13.5 6l4 4-4 4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>`;function b(e,t,n){let r=e.filter(e=>e!==t);return r.splice(n,0,t),r}function x(e,t){let n=[];for(let r of t){let i=e.get(r)??``,a=/^[1-9]\d*$/.test(i)?Number(i)-1:-1;if(a<0||a>=t.length||n[a]!==void 0)return null;n[a]=r}return n}var S=class extends a{static manifest=l;static messages=h;static shadowRootOptions={...s.shadowRootOptions,slotAssignment:`manual`};static properties={placed:{state:!0}};static styles=[t`
|
|
2
|
+
.hints {
|
|
3
|
+
display: grid;
|
|
4
|
+
margin-block-start: var(--astl-space-1);
|
|
5
|
+
color: var(--astl-ink-muted);
|
|
6
|
+
font-family: var(--astl-font-body);
|
|
7
|
+
font-size: var(--astl-size-ui);
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
}
|
|
10
|
+
.hints > * {
|
|
11
|
+
grid-area: 1 / 1;
|
|
12
|
+
}
|
|
13
|
+
.hints > [data-off] {
|
|
14
|
+
visibility: hidden;
|
|
15
|
+
}
|
|
16
|
+
.items {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: var(--astl-space-2);
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
list-style: none;
|
|
23
|
+
}
|
|
24
|
+
.horizontal .items {
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
}
|
|
28
|
+
.row {
|
|
29
|
+
position: relative;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: flex-start;
|
|
33
|
+
min-inline-size: 0;
|
|
34
|
+
border: var(--astl-outline-width) solid var(--astl-outline);
|
|
35
|
+
border-radius: var(--astl-radius-m);
|
|
36
|
+
background: var(--astl-surface);
|
|
37
|
+
user-select: none;
|
|
38
|
+
hyphens: auto;
|
|
39
|
+
-webkit-user-select: none;
|
|
40
|
+
transition:
|
|
41
|
+
background-color var(--astl-duration-fast),
|
|
42
|
+
box-shadow var(--astl-duration-fast);
|
|
43
|
+
}
|
|
44
|
+
.horizontal .row {
|
|
45
|
+
flex: 0 1 auto;
|
|
46
|
+
max-inline-size: 100%;
|
|
47
|
+
}
|
|
48
|
+
`,t`
|
|
49
|
+
.horizontal .item {
|
|
50
|
+
padding-inline: var(--astl-space-2);
|
|
51
|
+
}
|
|
52
|
+
.horizontal .row > .astl-verdict {
|
|
53
|
+
margin-inline-end: var(--astl-space-2);
|
|
54
|
+
}
|
|
55
|
+
.row:not([data-verdict]):not([data-lifted]):has(.item:enabled:hover) {
|
|
56
|
+
border-color: var(--astl-selected);
|
|
57
|
+
}
|
|
58
|
+
`,t`
|
|
59
|
+
.row[data-lifted] {
|
|
60
|
+
z-index: 1;
|
|
61
|
+
border-color: var(--astl-selected);
|
|
62
|
+
background: var(--astl-selected-soft);
|
|
63
|
+
box-shadow: 0 var(--astl-space-1) var(--astl-space-3) color-mix(in srgb, var(--astl-ink) 30%, transparent);
|
|
64
|
+
}
|
|
65
|
+
.row[data-lifted]::before {
|
|
66
|
+
content: '';
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset-block: 0;
|
|
69
|
+
inset-inline-start: 0;
|
|
70
|
+
inline-size: var(--astl-selected-bar);
|
|
71
|
+
background: var(--astl-selected);
|
|
72
|
+
}
|
|
73
|
+
.row[data-lifted] .text {
|
|
74
|
+
font-weight: var(--astl-selected-weight);
|
|
75
|
+
}
|
|
76
|
+
`,t`
|
|
77
|
+
.lifting .row:not([data-lifted]):has(.item:hover) {
|
|
78
|
+
border-color: var(--astl-selected);
|
|
79
|
+
}
|
|
80
|
+
.item {
|
|
81
|
+
flex: 1 1 auto;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: flex-start;
|
|
85
|
+
gap: var(--astl-space-2);
|
|
86
|
+
min-inline-size: var(--astl-target-min);
|
|
87
|
+
min-block-size: var(--astl-target-min);
|
|
88
|
+
margin: 0;
|
|
89
|
+
padding-block: var(--astl-space-2);
|
|
90
|
+
padding-inline: var(--astl-space-3);
|
|
91
|
+
border: 0;
|
|
92
|
+
border-radius: inherit;
|
|
93
|
+
background: none;
|
|
94
|
+
color: inherit;
|
|
95
|
+
font: inherit;
|
|
96
|
+
text-align: start;
|
|
97
|
+
cursor: grab;
|
|
98
|
+
}
|
|
99
|
+
.item:disabled {
|
|
100
|
+
cursor: default;
|
|
101
|
+
}
|
|
102
|
+
.row[data-lifted] .item {
|
|
103
|
+
cursor: grabbing;
|
|
104
|
+
}
|
|
105
|
+
`,t`
|
|
106
|
+
.grip,
|
|
107
|
+
.horizontal .item {
|
|
108
|
+
touch-action: none;
|
|
109
|
+
}
|
|
110
|
+
.number {
|
|
111
|
+
flex: none;
|
|
112
|
+
min-inline-size: 1.5em;
|
|
113
|
+
color: var(--astl-ink-muted);
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
font-variant-numeric: tabular-nums;
|
|
116
|
+
text-align: end;
|
|
117
|
+
}
|
|
118
|
+
.grip {
|
|
119
|
+
flex: none;
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
block-size: 1lh;
|
|
123
|
+
color: var(--astl-ink-muted);
|
|
124
|
+
}
|
|
125
|
+
.row[data-lifted] .grip {
|
|
126
|
+
color: var(--astl-selected);
|
|
127
|
+
}
|
|
128
|
+
`,t`
|
|
129
|
+
.item:disabled .grip {
|
|
130
|
+
color: var(--astl-line);
|
|
131
|
+
}
|
|
132
|
+
.grip svg {
|
|
133
|
+
inline-size: 1em;
|
|
134
|
+
block-size: 1em;
|
|
135
|
+
}
|
|
136
|
+
.text {
|
|
137
|
+
flex: 1 1 auto;
|
|
138
|
+
min-inline-size: 0;
|
|
139
|
+
}
|
|
140
|
+
.row > .astl-verdict {
|
|
141
|
+
flex: none;
|
|
142
|
+
block-size: 1lh;
|
|
143
|
+
margin-block-start: var(--astl-space-2);
|
|
144
|
+
margin-inline-end: var(--astl-space-3);
|
|
145
|
+
}
|
|
146
|
+
.group-verdict {
|
|
147
|
+
margin-block: var(--astl-space-3) 0;
|
|
148
|
+
}
|
|
149
|
+
.solution {
|
|
150
|
+
margin-block-start: var(--astl-space-3);
|
|
151
|
+
padding-block: var(--astl-space-2);
|
|
152
|
+
padding-inline: var(--astl-space-3);
|
|
153
|
+
border: var(--astl-outline-width) solid var(--astl-line);
|
|
154
|
+
border-radius: var(--astl-radius-m);
|
|
155
|
+
}
|
|
156
|
+
.solution-list {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-direction: column;
|
|
159
|
+
gap: var(--astl-space-1);
|
|
160
|
+
margin: var(--astl-space-2) 0 0;
|
|
161
|
+
padding: 0;
|
|
162
|
+
list-style: none;
|
|
163
|
+
}
|
|
164
|
+
`,t`
|
|
165
|
+
.horizontal .solution-list {
|
|
166
|
+
flex-flow: row wrap;
|
|
167
|
+
column-gap: var(--astl-space-2);
|
|
168
|
+
}
|
|
169
|
+
.solution-item {
|
|
170
|
+
display: flex;
|
|
171
|
+
gap: var(--astl-space-2);
|
|
172
|
+
}
|
|
173
|
+
@media (prefers-reduced-motion: reduce) {
|
|
174
|
+
.row {
|
|
175
|
+
transition: none;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
`,p];#e;#t;constructor(){super(),this.placed=null;let e=this;this.#e=new f(this,{count:()=>this.slotIds.length,item:e=>this.renderRoot.querySelector(`button[data-position="${e}"]`),get axis(){return e.horizontal?`inline`:`block`}}),this.#t=new d(this,{destinations:()=>this.slotIds.map((e,t)=>t),current:e=>(this.placed??this.slotIds).indexOf(e),at:(e,t,n)=>this.#u(e,t,n),commit:(e,t)=>this.#s(e,t),say:(e,t,n,r)=>this.#c(e===`pick`?`ui.pickedUp`:e===`cancel`?`ui.cancelled`:e===`target`||n!==r?`ui.moved`:`ui.dropped`,t,n),changed:e=>this.#e.focus(this.shown.indexOf(e)),preview:`live`,leave:`drop`,get axis(){return e.horizontal?`inline`:`block`},get handle(){return e.horizontal?null:`.grip`}})}get horizontal(){return this.stringAttribute(`variant`)===`horizontal`}get items(){return this.childElements(`astl-item`)}get slotIds(){return this.id===``?[]:this.items.map(e=>e.id)}get shown(){let e=this.placed??this.slotIds,t=this.#t.picked,n=this.#t.target;return t===null||n===null?e:b(e,t,n)}getAnswers(){let e=this.placed;return e===null?{}:Object.fromEntries(e.map((e,t)=>[e,String(t+1)]))}setAnswers(e){let t=this.slotIds,n=t.filter(t=>Object.hasOwn(e,t));if(n.length===0)return;if(this.#t.reset(),n.length===t.length&&n.every(t=>e[t]===``)){this.placed=null;return}let r=new Map((this.placed??t).map((e,t)=>[e,String(t+1)]));for(let t of n)r.set(t,e[t]??``);let i=x(r,t);i!==null&&(this.placed=i)}units(){return{answered:this.placed===null?0:1,total:1}}render(){let t=this.uiLanguage,n=this.shown,i=!this.horizontal,a=this.#o(),o=this.#t.picked!==null;return e`<fieldset part="order" class=${`${i?`vertical`:`horizontal`}${o?` lifting`:``}`}>
|
|
179
|
+
<legend part="prompt">
|
|
180
|
+
<slot data-tag="astl-prompt"></slot>
|
|
181
|
+
<span class="hints" lang=${t.lang}
|
|
182
|
+
><span class="hint" ?data-off=${o}><bdi>${this.t(`ui.hint`,{count:n.length})}</bdi></span
|
|
183
|
+
><span class="moving" ?data-off=${!o}><bdi>${this.t(`ui.moving`)}</bdi></span></span
|
|
184
|
+
>
|
|
185
|
+
</legend>
|
|
186
|
+
<ol class="items" part="list" role="list" @keydown=${this.#l}>
|
|
187
|
+
${n.map((e,t)=>this.#n(e,t,n.length,i))}
|
|
188
|
+
</ol>
|
|
189
|
+
${this.renderGroupVerdict()}
|
|
190
|
+
${a===null?r:this.#r(a,i)}
|
|
191
|
+
<span id="instructions" hidden lang=${t.lang} dir=${t.dir}>${this.t(`ui.instructions`)}</span>
|
|
192
|
+
</fieldset>`}#n(t,n,i,a){let s=this.#t.picked===t,c=this.#a(n,t),l=this.uiLanguage,u=[`position-${n}`,c===null?``:`verdict-${n}`,`instructions`].filter(e=>e!==``).join(` `);return e`<li class="row astl-box astl-ring" part="item" data-verdict=${o(c??void 0)} ?data-lifted=${s}>
|
|
193
|
+
<button
|
|
194
|
+
type="button"
|
|
195
|
+
class="item"
|
|
196
|
+
data-item=${t}
|
|
197
|
+
data-position=${n}
|
|
198
|
+
tabindex=${this.disabled?-1:this.#e.tabIndex(n)}
|
|
199
|
+
?disabled=${this.disabled}
|
|
200
|
+
aria-describedby=${u}
|
|
201
|
+
@click=${e=>this.#t.click(e,t,n)}
|
|
202
|
+
@pointerdown=${e=>this.#t.pointerdown(e,t)}
|
|
203
|
+
>
|
|
204
|
+
${a?e`<span class="number" aria-hidden="true">${n+1}</span>`:r}
|
|
205
|
+
<span class="grip" aria-hidden="true"
|
|
206
|
+
><svg viewBox="0 0 20 20" focusable="false">${s?a?v:y:_}</svg></span
|
|
207
|
+
>
|
|
208
|
+
<span class="text"><slot data-item=${t}></slot></span>
|
|
209
|
+
</button>
|
|
210
|
+
<span id="position-${n}" hidden lang=${l.lang} dir=${l.dir}
|
|
211
|
+
>${this.t(`ui.position`,{position:n+1,count:i})}</span
|
|
212
|
+
>
|
|
213
|
+
${this.renderVerdict(c,{hiddenWord:!0,id:`verdict-${n}`})}
|
|
214
|
+
</li>`}#r(t,n){let a=this.uiLanguage,o=new Map(this.items.map(e=>[e.id,e]));return e`<div class="solution astl-solution" part="solution">
|
|
215
|
+
${i(`correct`)}<span class="astl-solution-label" lang=${a.lang} dir=${a.dir}>${this.t(`ui.solution`)}</span>
|
|
216
|
+
<ol class="solution-list" role="list">
|
|
217
|
+
${t.map((t,i)=>e`<li class="solution-item" data-item=${t}>
|
|
218
|
+
${n?e`<span class="number" aria-hidden="true">${i+1}</span>`:r}
|
|
219
|
+
<span class="text">${this.#i(o.get(t))}</span>
|
|
220
|
+
</li>`)}
|
|
221
|
+
</ol>
|
|
222
|
+
</div>`}#i(t){return t===void 0?r:e`<span lang=${o(t.getAttribute(`lang`)??void 0)} dir=${o(t.getAttribute(`dir`)??void 0)}
|
|
223
|
+
>${Array.from(t.childNodes,e=>e.cloneNode(!0))}</span
|
|
224
|
+
>`}#a(e,t){let n=this.slotVerdict(t);return n!==null&&(this.placed??this.slotIds)[e]===t?n:null}#o(){let e=this.solution;if(e===null||this.groupVerdict===`correct`)return null;let t=this.slotIds;return x(new Map(t.map(t=>[t,e[t]??``])),t)}#s(e,t){let n=this.getAnswers();this.placed=b(this.placed??this.slotIds,e,t);let r=Object.fromEntries(Object.entries(this.getAnswers()).filter(([e,t])=>n[e]!==t));Object.keys(r).length>0&&this.emitChange(r)}#c(e,t,n){let r=(this.items.find(e=>e.id===t)?.textContent??``).replace(/\s+/g,` `).trim();return this.t(e,{item:r,position:n+1,count:this.slotIds.length})}#l=e=>{let t=e.target instanceof HTMLElement?e.target.closest(`button`):null;if(t===null||this.disabled)return;let n=Number(t.dataset.position);this.#t.keydown(e,this.shown[n]??``)||this.#e.keydown(e,n)};#u(e,t,n){let r=this.shown.indexOf(n),i=getComputedStyle(this).direction===`rtl`,a=[...this.renderRoot.querySelectorAll(`.items > .row`)];for(let[n,o]of a.entries()){if(n===r)continue;let a=o.getBoundingClientRect();if(e<a.left||e>a.right||t<a.top||t>a.bottom)continue;let s=this.horizontal?(i?-1:1)*(e-(a.left+a.width/2)):t-(a.top+a.height/2);return(n>r?s>=-2:s<=g)?n:null}return null}},C={manifest:l,element:S,messages:h};export{C as orderElement};
|
|
225
|
+
//# sourceMappingURL=order-BhG_6IC-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-BhG_6IC-.js","names":["en","pl","LitElement","nothing","ifDefined","b","i$1","w","A","verdictIcon","AstlElement","i","en_default","orderManifest","pl_default","PickAndPlace","RovingFocus","blockStyles","namespace","orderUiMessages","MIDDLE_SLACK","GRIP","MOVE_BLOCK","MOVE_INLINE","moved","out","order","id","item","position","arrangementOf","items","value","positions","k","OrderElement","element","#roving","#pick","#positionAt","x","y","#putDown","#message","moment","from","target","placed","slots","given","answers","slot","next","ui","shown","vertical","solution","#solutionOrder","lifting","#keydown","#renderItem","#renderSolution","lifted","verdict","#verdictAt","describedBy","ref","event","#copyOf","node","before","changed","text","el","key","button","rtl","rows","row","r","past","orderElement"],"sources":["../../../../components/src/order/ui-messages.ts","../../../../components/src/order/element.ts"],"sourcesContent":["import type { MessageCatalog } from '@astl/core';\nimport en from './messages/ui/en.json' with { type: 'json' };\nimport pl from './messages/ui/pl.json' with { type: 'json' };\n\nconst namespace = 'astl.order';\n\n/**\n * The student strings (`ui.*`): the element's catalogs. A module of their own, because bundlers split by module: one\n * that also built `orderMessages` would put the authoring strings into the element's chunk.\n */\nexport const orderUiMessages: readonly MessageCatalog[] = [\n { namespace, locale: 'en', messages: en },\n { namespace, locale: 'pl', messages: pl },\n];\n","import type { Answers, ComponentManifest, MessageCatalog, SlotVerdict, Units } from '@astl/core';\nimport { AstlElement, type ElementRegistration, verdictIcon } from '@astl/player';\nimport { PickAndPlace, RovingFocus } from '@astl/player/interaction';\nimport {\n type CSSResultGroup,\n css,\n html,\n LitElement,\n nothing,\n type PropertyDeclarations,\n svg,\n type TemplateResult,\n} from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { blockStyles } from '../block-styles.js';\nimport { orderManifest } from './manifest.js';\nimport { orderUiMessages } from './ui-messages.js';\n\n/** px around an item's middle that already count as its middle while dragging. */\nconst MIDDLE_SLACK = 2;\n\nconst GRIP = svg`<g fill=\"currentColor\"><circle cx=\"7\" cy=\"5\" r=\"1.6\"/><circle cx=\"13\" cy=\"5\" r=\"1.6\"/><circle cx=\"7\" cy=\"10\" r=\"1.6\"/><circle cx=\"13\" cy=\"10\" r=\"1.6\"/><circle cx=\"7\" cy=\"15\" r=\"1.6\"/><circle cx=\"13\" cy=\"15\" r=\"1.6\"/></g>`;\nconst MOVE_BLOCK = svg`<path d=\"M10 2.5v15M6 6.5l4-4 4 4M6 13.5l4 4 4-4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>`;\nconst MOVE_INLINE = svg`<path d=\"M2.5 10h15M6.5 6l-4 4 4 4M13.5 6l4 4-4 4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>`;\n\n/** `order` with `item` moved to `position`. */\nfunction moved(order: readonly string[], item: string, position: number): string[] {\n const out = order.filter((id) => id !== item);\n out.splice(position, 0, item);\n return out;\n}\n\n/**\n * The arrangement (item ids by position) that 1-based `positions` per item describe, or null unless every item has\n * its own position from 1 to n (written the way the element writes them).\n */\nfunction arrangementOf(positions: ReadonlyMap<string, string>, items: readonly string[]): string[] | null {\n const order: string[] = [];\n for (const item of items) {\n const value = positions.get(item) ?? '';\n const k = /^[1-9]\\d*$/.test(value) ? Number(value) - 1 : -1;\n if (k < 0 || k >= items.length || order[k] !== undefined) return null;\n order[k] = item;\n }\n return order;\n}\n\n/**\n * `<astl-order>`: items in a list (`vertical`) or in a wrapping row (`horizontal`), each a native button with one tab\n * stop for the whole list. Space or Enter picks an item up, the arrow keys (in reading direction) move it, Space or\n * Enter puts it down, Escape cancels; a click or tap picks an item up and a second one on another item moves it there\n * (no dragging needed); a pointer can also drag it. The light-DOM `<astl-item>` children keep the view order and are\n * slotted manually into the positions. Slots: one per item id; the answer is the 1-based position the item is at.\n * Unanswered until the student first puts an item down.\n */\nexport class OrderElement extends AstlElement {\n static override manifest: ComponentManifest = orderManifest;\n static override messages: readonly MessageCatalog[] = orderUiMessages;\n static override shadowRootOptions: ShadowRootInit = {\n ...LitElement.shadowRootOptions,\n slotAssignment: 'manual',\n };\n\n static override properties: PropertyDeclarations = {\n placed: { state: true },\n };\n\n // Notes on the rules are JS comments between css parts: inside a css literal they would ship to every student.\n static override styles: CSSResultGroup = [\n // Read by young students: UI size, never smaller. The task hint and the \"choose its new place\" hint share one\n // cell, so picking an item up never moves the list (under a finger or a pointer).\n css`\n .hints {\n display: grid;\n margin-block-start: var(--astl-space-1);\n color: var(--astl-ink-muted);\n font-family: var(--astl-font-body);\n font-size: var(--astl-size-ui);\n font-weight: 400;\n }\n .hints > * {\n grid-area: 1 / 1;\n }\n .hints > [data-off] {\n visibility: hidden;\n }\n .items {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-2);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .horizontal .items {\n flex-direction: row;\n flex-wrap: wrap;\n }\n .row {\n position: relative;\n box-sizing: border-box;\n display: flex;\n align-items: flex-start;\n min-inline-size: 0;\n border: var(--astl-outline-width) solid var(--astl-outline);\n border-radius: var(--astl-radius-m);\n background: var(--astl-surface);\n user-select: none;\n hyphens: auto;\n -webkit-user-select: none;\n transition:\n background-color var(--astl-duration-fast),\n box-shadow var(--astl-duration-fast);\n }\n .horizontal .row {\n flex: 0 1 auto;\n max-inline-size: 100%;\n }\n `,\n // Word chips: snug, so a short sentence fits a phone line or two (the target stays 44px).\n css`\n .horizontal .item {\n padding-inline: var(--astl-space-2);\n }\n .horizontal .row > .astl-verdict {\n margin-inline-end: var(--astl-space-2);\n }\n .row:not([data-verdict]):not([data-lifted]):has(.item:enabled:hover) {\n border-color: var(--astl-selected);\n }\n `,\n // Picked up: the theme's selection fill, a lifted shadow and a move icon instead of the grip; in hc also a bar at\n // the inline start and bold text (selected-* tokens), so it never depends on colour and never looks like a verdict\n // border.\n css`\n .row[data-lifted] {\n z-index: 1;\n border-color: var(--astl-selected);\n background: var(--astl-selected-soft);\n box-shadow: 0 var(--astl-space-1) var(--astl-space-3) color-mix(in srgb, var(--astl-ink) 30%, transparent);\n }\n .row[data-lifted]::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: var(--astl-selected-bar);\n background: var(--astl-selected);\n }\n .row[data-lifted] .text {\n font-weight: var(--astl-selected-weight);\n }\n `,\n // While an item is picked up, the place a click or tap would send it to.\n css`\n .lifting .row:not([data-lifted]):has(.item:hover) {\n border-color: var(--astl-selected);\n }\n .item {\n flex: 1 1 auto;\n box-sizing: border-box;\n display: flex;\n align-items: flex-start;\n gap: var(--astl-space-2);\n min-inline-size: var(--astl-target-min);\n min-block-size: var(--astl-target-min);\n margin: 0;\n padding-block: var(--astl-space-2);\n padding-inline: var(--astl-space-3);\n border: 0;\n border-radius: inherit;\n background: none;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: grab;\n }\n .item:disabled {\n cursor: default;\n }\n .row[data-lifted] .item {\n cursor: grabbing;\n }\n `,\n // Touch drags start on the grip of a list item (the rest scrolls the page) or anywhere on a short chip.\n css`\n .grip,\n .horizontal .item {\n touch-action: none;\n }\n .number {\n flex: none;\n min-inline-size: 1.5em;\n color: var(--astl-ink-muted);\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n text-align: end;\n }\n .grip {\n flex: none;\n display: inline-flex;\n align-items: center;\n block-size: 1lh;\n color: var(--astl-ink-muted);\n }\n .row[data-lifted] .grip {\n color: var(--astl-selected);\n }\n `,\n // Locked (review): the grip says nothing can move.\n css`\n .item:disabled .grip {\n color: var(--astl-line);\n }\n .grip svg {\n inline-size: 1em;\n block-size: 1em;\n }\n .text {\n flex: 1 1 auto;\n min-inline-size: 0;\n }\n .row > .astl-verdict {\n flex: none;\n block-size: 1lh;\n margin-block-start: var(--astl-space-2);\n margin-inline-end: var(--astl-space-3);\n }\n .group-verdict {\n margin-block: var(--astl-space-3) 0;\n }\n .solution {\n margin-block-start: var(--astl-space-3);\n padding-block: var(--astl-space-2);\n padding-inline: var(--astl-space-3);\n border: var(--astl-outline-width) solid var(--astl-line);\n border-radius: var(--astl-radius-m);\n }\n .solution-list {\n display: flex;\n flex-direction: column;\n gap: var(--astl-space-1);\n margin: var(--astl-space-2) 0 0;\n padding: 0;\n list-style: none;\n }\n `,\n // Words of a sentence read as one: a little more than a space between them.\n css`\n .horizontal .solution-list {\n flex-flow: row wrap;\n column-gap: var(--astl-space-2);\n }\n .solution-item {\n display: flex;\n gap: var(--astl-space-2);\n }\n @media (prefers-reduced-motion: reduce) {\n .row {\n transition: none;\n }\n }\n `,\n blockStyles,\n ];\n\n /** The student's arrangement, item ids by position; null until they first put an item down (unanswered). */\n declare protected placed: readonly string[] | null;\n\n /** One tab stop for the list: the item that has it, by position (it moves with a picked-up item). */\n readonly #roving: RovingFocus;\n /**\n * Picking up and moving: destinations are positions, and the list shows the picked-up item where it would go.\n * Putting it down is an answer, also where it was picked up (a deliberate choice); focus leaving the list puts a\n * moved item down where it is, an item that did not move just goes back.\n */\n readonly #pick: PickAndPlace<number>;\n\n constructor() {\n super();\n this.placed = null;\n const element = this;\n this.#roving = new RovingFocus(this, {\n count: () => this.slotIds.length,\n item: (position) =>\n (this.renderRoot as ShadowRoot).querySelector<HTMLButtonElement>(\n `button[data-position=\"${position}\"]`,\n ),\n // Reading direction: in a row, the next position is to the right in LTR and to the left in RTL.\n get axis() {\n return element.horizontal ? 'inline' : 'block';\n },\n });\n this.#pick = new PickAndPlace<number>(this, {\n destinations: () => this.slotIds.map((_, k) => k),\n current: (item) => (this.placed ?? this.slotIds).indexOf(item),\n at: (x, y, item) => this.#positionAt(x, y, item),\n commit: (item, position) => this.#putDown(item, position),\n // A put where the student last heard the item is \"put down\"; a jump there (a tap on another item, a drag) is\n // \"moved\".\n say: (moment, item, position, from) =>\n this.#message(\n moment === 'pick'\n ? 'ui.pickedUp'\n : moment === 'cancel'\n ? 'ui.cancelled'\n : moment === 'target' || position !== from\n ? 'ui.moved'\n : 'ui.dropped',\n item,\n position,\n ),\n // Focus follows the item, but only while it is in the list (never pulled back from elsewhere).\n changed: (item) => this.#roving.focus(this.shown.indexOf(item)),\n preview: 'live',\n leave: 'drop',\n get axis() {\n return element.horizontal ? 'inline' : 'block';\n },\n // Touch drags start on the grip of a list item (the rest scrolls the page) or anywhere on a short chip.\n get handle() {\n return element.horizontal ? null : '.grip';\n },\n });\n }\n\n get horizontal(): boolean {\n return this.stringAttribute('variant') === 'horizontal';\n }\n\n /** `<astl-item>` children in view order (never the source order). */\n get items(): readonly HTMLElement[] {\n return this.childElements('astl-item');\n }\n\n /** One slot per item, in reading order (the view order): the item ids. */\n get slotIds(): readonly string[] {\n return this.id === '' ? [] : this.items.map((item) => item.id);\n }\n\n /** Item ids by position, as shown now: with the item being moved where it would go; the answer, or the view order. */\n protected get shown(): readonly string[] {\n const order = this.placed ?? this.slotIds;\n const item = this.#pick.picked;\n const target = this.#pick.target;\n return item === null || target === null ? order : moved(order, item, target);\n }\n\n getAnswers(): Answers {\n const placed = this.placed;\n if (placed === null) return {};\n return Object.fromEntries(placed.map((item, k) => [item, String(k + 1)]));\n }\n\n /**\n * Accepts a complete arrangement only (given positions merged over the shown ones), so what is checked is always\n * what the student sees; every item set to `''` makes the list unanswered again.\n */\n setAnswers(answers: Answers): void {\n const slots = this.slotIds;\n const given = slots.filter((slot) => Object.hasOwn(answers, slot));\n if (given.length === 0) return;\n this.#pick.reset();\n if (given.length === slots.length && given.every((slot) => answers[slot] === '')) {\n this.placed = null;\n return;\n }\n const positions = new Map((this.placed ?? slots).map((item, k) => [item, String(k + 1)]));\n for (const slot of given) positions.set(slot, answers[slot] ?? '');\n const next = arrangementOf(positions, slots);\n if (next !== null) this.placed = next;\n }\n\n units(): Units {\n return { answered: this.placed === null ? 0 : 1, total: 1 };\n }\n\n protected override render(): TemplateResult {\n const ui = this.uiLanguage;\n const shown = this.shown;\n const vertical = !this.horizontal;\n const solution = this.#solutionOrder();\n const lifting = this.#pick.picked !== null;\n const classes = `${vertical ? 'vertical' : 'horizontal'}${lifting ? ' lifting' : ''}`;\n return html`<fieldset part=\"order\" class=${classes}>\n <legend part=\"prompt\">\n <slot data-tag=\"astl-prompt\"></slot>\n <span class=\"hints\" lang=${ui.lang}\n ><span class=\"hint\" ?data-off=${lifting}><bdi>${this.t('ui.hint', { count: shown.length })}</bdi></span\n ><span class=\"moving\" ?data-off=${!lifting}><bdi>${this.t('ui.moving')}</bdi></span></span\n >\n </legend>\n <ol class=\"items\" part=\"list\" role=\"list\" @keydown=${this.#keydown}>\n ${shown.map((id, k) => this.#renderItem(id, k, shown.length, vertical))}\n </ol>\n ${this.renderGroupVerdict()}\n ${solution === null ? nothing : this.#renderSolution(solution, vertical)}\n <span id=\"instructions\" hidden lang=${ui.lang} dir=${ui.dir}>${this.t('ui.instructions')}</span>\n </fieldset>`;\n }\n\n #renderItem(id: string, k: number, count: number, vertical: boolean): TemplateResult {\n const lifted = this.#pick.picked === id;\n const verdict = this.#verdictAt(k, id);\n const ui = this.uiLanguage;\n const describedBy = [`position-${k}`, verdict === null ? '' : `verdict-${k}`, 'instructions']\n .filter((ref) => ref !== '')\n .join(' ');\n return html`<li class=\"row astl-box astl-ring\" part=\"item\" data-verdict=${ifDefined(verdict ?? undefined)} ?data-lifted=${lifted}>\n <button\n type=\"button\"\n class=\"item\"\n data-item=${id}\n data-position=${k}\n tabindex=${this.disabled ? -1 : this.#roving.tabIndex(k)}\n ?disabled=${this.disabled}\n aria-describedby=${describedBy}\n @click=${(event: MouseEvent) => this.#pick.click(event, id, k)}\n @pointerdown=${(event: PointerEvent) => this.#pick.pointerdown(event, id)}\n >\n ${vertical ? html`<span class=\"number\" aria-hidden=\"true\">${k + 1}</span>` : nothing}\n <span class=\"grip\" aria-hidden=\"true\"\n ><svg viewBox=\"0 0 20 20\" focusable=\"false\">${lifted ? (vertical ? MOVE_BLOCK : MOVE_INLINE) : GRIP}</svg></span\n >\n <span class=\"text\"><slot data-item=${id}></slot></span>\n </button>\n <span id=\"position-${k}\" hidden lang=${ui.lang} dir=${ui.dir}\n >${this.t('ui.position', { position: k + 1, count })}</span\n >\n ${this.renderVerdict(verdict, { hiddenWord: true, id: `verdict-${k}` })}\n </li>`;\n }\n\n #renderSolution(order: readonly string[], vertical: boolean): TemplateResult {\n const ui = this.uiLanguage;\n const items = new Map(this.items.map((item) => [item.id, item]));\n return html`<div class=\"solution astl-solution\" part=\"solution\">\n ${verdictIcon('correct')}<span class=\"astl-solution-label\" lang=${ui.lang} dir=${ui.dir}>${this.t('ui.solution')}</span>\n <ol class=\"solution-list\" role=\"list\">\n ${order.map(\n (id, k) => html`<li class=\"solution-item\" data-item=${id}>\n ${vertical ? html`<span class=\"number\" aria-hidden=\"true\">${k + 1}</span>` : nothing}\n <span class=\"text\">${this.#copyOf(items.get(id))}</span>\n </li>`,\n )}\n </ol>\n </div>`;\n }\n\n /** The item's content, copied: a light-DOM node can only be slotted once, and the list already shows it. */\n #copyOf(item: HTMLElement | undefined): TemplateResult | typeof nothing {\n if (item === undefined) return nothing;\n return html`<span lang=${ifDefined(item.getAttribute('lang') ?? undefined)} dir=${ifDefined(item.getAttribute('dir') ?? undefined)}\n >${Array.from(item.childNodes, (node) => node.cloneNode(true))}</span\n >`;\n }\n\n /** The verdict of the item shown at position k, while it is still where it was graded (not being moved away). */\n #verdictAt(k: number, id: string): SlotVerdict | null {\n const verdict = this.slotVerdict(id);\n return verdict !== null && (this.placed ?? this.slotIds)[k] === id ? verdict : null;\n }\n\n /** The correct order to show: none without a solution, and none next to an order that is already correct. */\n #solutionOrder(): readonly string[] | null {\n const solution = this.solution;\n if (solution === null || this.groupVerdict === 'correct') return null;\n const slots = this.slotIds;\n return arrangementOf(new Map(slots.map((slot) => [slot, solution[slot] ?? ''])), slots);\n }\n\n // Moving\n\n /** Puts the item down at `position`: the arrangement shown becomes the answer, reported where it changed. */\n #putDown(item: string, position: number): void {\n const before = this.getAnswers();\n this.placed = moved(this.placed ?? this.slotIds, item, position);\n const changed = Object.fromEntries(\n Object.entries(this.getAnswers()).filter(([slot, value]) => before[slot] !== value),\n );\n if (Object.keys(changed).length > 0) this.emitChange(changed);\n }\n\n #message(key: string, item: string, position: number): string {\n const text = (this.items.find((el) => el.id === item)?.textContent ?? '').replace(/\\s+/g, ' ').trim();\n return this.t(key, { item: text, position: position + 1, count: this.slotIds.length });\n }\n\n /** On the picked-up item the arrow keys move it, else they move the list's tab stop. */\n #keydown = (event: KeyboardEvent): void => {\n const button = event.target instanceof HTMLElement ? event.target.closest('button') : null;\n if (button === null || this.disabled) return;\n const position = Number(button.dataset.position);\n if (!this.#pick.keydown(event, this.shown[position] ?? '')) this.#roving.keydown(event, position);\n };\n\n /**\n * The position a dragged item goes to: the item under the pointer, once the pointer has reached its middle (in\n * reading order) on the way there. The halfway rule keeps items of different sizes from swapping back and forth.\n */\n #positionAt(x: number, y: number, item: string): number | null {\n const from = this.shown.indexOf(item);\n const rtl = getComputedStyle(this).direction === 'rtl';\n const rows = [...(this.renderRoot as ShadowRoot).querySelectorAll<HTMLElement>('.items > .row')];\n for (const [k, row] of rows.entries()) {\n if (k === from) continue;\n const r = row.getBoundingClientRect();\n if (x < r.left || x > r.right || y < r.top || y > r.bottom) continue;\n // Distance past the middle in reading order: positive after it, negative before it. The slack lets a pointer\n // dropped on the middle (rounded to whole pixels) count as there.\n const past = this.horizontal\n ? (rtl ? -1 : 1) * (x - (r.left + r.width / 2))\n : y - (r.top + r.height / 2);\n return (k > from ? past >= -MIDDLE_SLACK : past <= MIDDLE_SLACK) ? k : null;\n }\n return null;\n }\n}\n\nexport const orderElement: ElementRegistration = {\n manifest: orderManifest,\n element: OrderElement,\n messages: orderUiMessages,\n};\n"],"mappings":"A,ySAIA,IAAMkB,EAAY,aAMLC,EAA6C,CACxD,CAAE,YAAW,OAAQ,KAAM,SAAUnB,CAAG,EACxC,CAAE,YAAW,OAAQ,KAAM,SAAUC,CAAG,CAC1C,ECMMmB,EAAe,EAEfC,EAAO,CAAG,+NACVC,EAAa,CAAG,wJAChBC,EAAc,CAAG,yJAGvB,SAASC,EAAM,EAA0B,EAAc,EAA4B,CACjF,IAAMC,EAAMC,EAAM,OAAQ,GAAOC,IAAOC,CAAI,EAE5C,OADAH,EAAI,OAAOI,EAAU,EAAGD,CAAI,EACrBH,CACT,CAMA,SAASK,EAAc,EAAwC,EAA2C,CACxG,IAAMJ,EAAkB,CAAC,EACzB,IAAK,IAAME,KAAQG,EAAO,CACxB,IAAMC,EAAQC,EAAU,IAAIL,CAAI,GAAK,GAC/BM,EAAI,aAAa,KAAKF,CAAK,EAAI,OAAOA,CAAK,EAAI,EAAI,GACzD,GAAIE,EAAI,GAAKA,GAAKH,EAAM,QAAUL,EAAMQ,KAAO,IAAA,GAAW,OAAO,KACjE,EAAMA,GAAKN,CACb,CACA,OAAOF,CACT,CAUA,IAAaS,EAAb,cAAkCzB,CAAY,CAC5C,OAAgB,SAA8BG,EAC9C,OAAgB,SAAsCM,EACtD,OAAgB,kBAAoC,CAClD,GAAGjB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Q,CAClG,EAMA,GAAY,EAAW,EAAW,EAA6B,CAC7D,IAAMgB,EAAO,KAAK,MAAM,QAAQjB,CAAI,EAC9BgD,EAAM,iBAAiB,IAAI,CAAC,CAAC,YAAc,MAC3CC,EAAO,CAAC,GAAI,KAAK,WAA0B,iBAA8B,eAAe,CAAC,EAC/F,IAAK,GAAM,CAAC3C,EAAG4C,KAAQD,EAAK,QAAQ,EAAG,CACrC,GAAI3C,IAAMW,EAAM,SAChB,IAAMkC,EAAID,EAAI,sBAAsB,EACpC,GAAItC,EAAIuC,EAAE,MAAQvC,EAAIuC,EAAE,OAAStC,EAAIsC,EAAE,KAAOtC,EAAIsC,EAAE,OAAQ,SAG5D,IAAMC,EAAO,KAAK,YACbJ,EAAM,GAAK,IAAMpC,GAAKuC,EAAE,KAAOA,EAAE,MAAQ,IAC1CtC,GAAKsC,EAAE,IAAMA,EAAE,OAAS,GAC5B,OAAQ7C,EAAIW,EAAOmC,GAAQ,GAAgBA,GAAQ5D,GAAgBc,EAAI,IACzE,CACA,OAAO,IACT,CACF,EAEa+C,EAAoC,CAC/C,SAAUpE,EACV,QAASsB,EACT,SAAUhB,CACZ,E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={tag:`astl-order`,version:1,display:`block`,graded:!0,attributes:[],children:[{tag:`astl-prompt`,visibility:`public`,content:`inline`,min:0,max:1,attributes:[]},{tag:`astl-item`,visibility:`public`,content:`inline`,min:3,max:20,attributes:[{name:`id`,type:`id`,visibility:`public`,required:!0}]}],scoring:{default:`all`,modes:{all:`all-correct`,"per-position":`proportional`}},variants:{default:`vertical`,values:[`vertical`,`horizontal`]},slotKinds:[`number`],issues:[`ORDER_ITEM_EMPTY`,`ORDER_ITEM_DUPLICATE`,`ORDER_ITEM_LINK`],messages:`astl.order`,a11y:{pattern:`list of buttons with a roving tab stop; pick up, move and drop (keyboard, tap tap or drag)`,keys:[`Tab`,`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`Space`,`Enter`,`Escape`]},cssParts:[`order`,`prompt`,`list`,`item`,`verdict`,`solution`]},t={"ui.hint":`Put the {count, plural, one {# item} other {# items}} in the right order.`,"ui.moving":`Now choose its new place.`,"ui.instructions":`Space or Enter picks the item up. Then the arrow keys move it, Space or Enter puts it down and Escape cancels.`,"ui.position":`Position {position} of {count}`,"ui.pickedUp":`Picked up “{item}”, position {position} of {count}.`,"ui.moved":`Moved “{item}” to position {position} of {count}.`,"ui.dropped":`Put “{item}” down at position {position} of {count}.`,"ui.cancelled":`Move cancelled. “{item}” is back at position {position} of {count}.`,"ui.solution":`Correct order`},n={"ui.hint":`Ułóż {count, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}} we właściwej kolejności.`,"ui.moving":`Teraz wybierz nowe miejsce.`,"ui.instructions":`Spacja lub Enter podnosi element. Potem strzałki go przesuwają, Spacja lub Enter go odkłada, a Escape anuluje.`,"ui.position":`Pozycja {position} z {count}`,"ui.pickedUp":`Podniesiono „{item}”, pozycja {position} z {count}.`,"ui.moved":`Przeniesiono „{item}” na pozycję {position} z {count}.`,"ui.dropped":`Odłożono „{item}” na pozycji {position} z {count}.`,"ui.cancelled":`Anulowano przenoszenie. „{item}” wraca na pozycję {position} z {count}.`,"ui.solution":`Poprawna kolejność`};export{t as n,e as r,n as t};
|
|
2
|
+
//# sourceMappingURL=order-manifest-J5IXN0he.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-manifest-J5IXN0he.js","names":["orderManifest","en_default","pl_default"],"sources":["../../../../components/src/order/manifest.ts","../../../../components/src/order/messages/ui/en.json","../../../../components/src/order/messages/ui/pl.json"],"sourcesContent":["import type { ComponentManifest } from '@astl/core';\n\n/**\n * Items to put in order: steps of a process, words of a sentence, dates. The source lists the items in the correct\n * order; the view shows them permuted, never in the source order. One `number` slot per item: the answer is the\n * 1-based position the student put the item at; an item scores when it is in its source position.\n */\nexport const orderManifest: ComponentManifest = {\n tag: 'astl-order',\n version: 1,\n display: 'block',\n graded: true,\n attributes: [],\n children: [\n /** The task. */\n { tag: 'astl-prompt', visibility: 'public', content: 'inline', min: 0, max: 1, attributes: [] },\n /**\n * One item, written in its correct place: the source order is the answer. `id` is local to the element. At least\n * 3 items: the view never shows the source order, so 2 would always need the same swap. Up to 20: enough for a\n * long sentence or timeline, still workable on a phone and with the keyboard.\n */\n {\n tag: 'astl-item',\n visibility: 'public',\n content: 'inline',\n min: 3,\n max: 20,\n attributes: [{ name: 'id', type: 'id', visibility: 'public', required: true }],\n },\n ],\n scoring: { default: 'all', modes: { all: 'all-correct', 'per-position': 'proportional' } },\n /** `vertical`: a list (steps, dates). `horizontal`: a row that wraps, in reading order (words of a sentence). */\n variants: { default: 'vertical', values: ['vertical', 'horizontal'] },\n slotKinds: ['number'],\n issues: ['ORDER_ITEM_EMPTY', 'ORDER_ITEM_DUPLICATE', 'ORDER_ITEM_LINK'],\n messages: 'astl.order',\n a11y: {\n pattern: 'list of buttons with a roving tab stop; pick up, move and drop (keyboard, tap tap or drag)',\n keys: [\n 'Tab',\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight',\n 'Home',\n 'End',\n 'Space',\n 'Enter',\n 'Escape',\n ],\n },\n cssParts: ['order', 'prompt', 'list', 'item', 'verdict', 'solution'],\n};\n","{\n \"ui.hint\": \"Put the {count, plural, one {# item} other {# items}} in the right order.\",\n \"ui.moving\": \"Now choose its new place.\",\n \"ui.instructions\": \"Space or Enter picks the item up. Then the arrow keys move it, Space or Enter puts it down and Escape cancels.\",\n \"ui.position\": \"Position {position} of {count}\",\n \"ui.pickedUp\": \"Picked up “{item}”, position {position} of {count}.\",\n \"ui.moved\": \"Moved “{item}” to position {position} of {count}.\",\n \"ui.dropped\": \"Put “{item}” down at position {position} of {count}.\",\n \"ui.cancelled\": \"Move cancelled. “{item}” is back at position {position} of {count}.\",\n \"ui.solution\": \"Correct order\"\n}\n","{\n \"ui.hint\": \"Ułóż {count, plural, one {# element} few {# elementy} many {# elementów} other {# elementu}} we właściwej kolejności.\",\n \"ui.moving\": \"Teraz wybierz nowe miejsce.\",\n \"ui.instructions\": \"Spacja lub Enter podnosi element. Potem strzałki go przesuwają, Spacja lub Enter go odkłada, a Escape anuluje.\",\n \"ui.position\": \"Pozycja {position} z {count}\",\n \"ui.pickedUp\": \"Podniesiono „{item}”, pozycja {position} z {count}.\",\n \"ui.moved\": \"Przeniesiono „{item}” na pozycję {position} z {count}.\",\n \"ui.dropped\": \"Odłożono „{item}” na pozycji {position} z {count}.\",\n \"ui.cancelled\": \"Anulowano przenoszenie. „{item}” wraca na pozycję {position} z {count}.\",\n \"ui.solution\": \"Poprawna kolejność\"\n}\n"],"mappings":"AAOA,IAAaA,EAAmC,CAC9C,IAAK,aACL,QAAS,EACT,QAAS,QACT,OAAQ,GACR,WAAY,CAAC,EACb,SAAU,CAER,CAAE,IAAK,cAAe,WAAY,SAAU,QAAS,SAAU,IAAK,EAAG,IAAK,EAAG,WAAY,CAAC,CAAE,EAM9F,CACE,IAAK,YACL,WAAY,SACZ,QAAS,SACT,IAAK,EACL,IAAK,GACL,WAAY,CAAC,CAAE,KAAM,KAAM,KAAM,KAAM,WAAY,SAAU,SAAU,EAAK,CAAC,CAC/E,CACF,EACA,QAAS,CAAE,QAAS,MAAO,MAAO,CAAE,IAAK,cAAe,eAAgB,cAAe,CAAE,EAEzF,SAAU,CAAE,QAAS,WAAY,OAAQ,CAAC,WAAY,YAAY,CAAE,EACpE,UAAW,CAAC,QAAQ,EACpB,OAAQ,CAAC,mBAAoB,uBAAwB,iBAAiB,EACtE,SAAU,aACV,KAAM,CACJ,QAAS,6FACT,KAAM,CACJ,MACA,UACA,YACA,YACA,aACA,OACA,MACA,QACA,QACA,QACF,CACF,EACA,SAAU,CAAC,QAAS,SAAU,OAAQ,OAAQ,UAAW,UAAU,CACrE,E"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./keys-DU-Qknmz.js";var t=class{#e;#t;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=!1;#l=!1;constructor(e,t){this.#e=e,this.#t=t,e.addController(this)}get picked(){return this.#n}get target(){return this.#r}get dragging(){return this.#a}get over(){return this.#o}touchmove={handleEvent:e=>{this.#s?.dragging&&e.cancelable&&e.preventDefault()},passive:!1};hostDisconnected(){this.reset(),this.#h()}hostUpdate(){this.#e.disabled&&(this.#n!==null||this.#s!==null)&&this.reset()}pick(e){let t=this.#t.current(e);this.#n=e,this.#r=null,this.#i=t,this.#C(`pick`,e,t,t),this.#w(e)}put(e){let t=this.#n;t===null||this.#e.disabled||(this.#t.preview!==`live`&&e===this.#t.current(t)?this.cancel():this.#y(t,e))}cancel(){this.#b(!0)}reset(){this.#S(),this.#n=null,this.#r=null,this.#T()}click(e,t,n){if(!this.tap(e)||this.#e.disabled)return;let r=this.#n;r===null?this.pick(t):n===void 0?r===t?this.put(this.#r??this.#t.current(t)):this.pick(t):this.put(n)}tap(e){return!this.#c||e.detail===0||(this.#h(),!1)}keydown(t,n){if(this.#e.disabled)return!1;if(t.repeat&&(t.key===`Enter`||t.key===` `))return t.preventDefault(),!0;if(t.altKey||t.ctrlKey||t.metaKey||this.#n!==n)return!1;let r=this.#t,i=r.destinations(n),a=i.length,o=Math.max(0,i.indexOf(this.#r??r.current(n))),s=e(t,r.axis??`both`,this.#e),c;if(s!==0)c=r.wrap?(o+s+a)%a:Math.min(Math.max(o+s,0),a-1);else if(t.key===`Home`)c=0;else if(t.key===`End`)c=a-1;else return!1;t.preventDefault();let l=i[c];if(c!==o&&l!==void 0){let e=this.#i??l;this.#r=l,this.#i=l,this.#C(`target`,n,l,e),this.#w(n)}return!0}pointerdown(e,t){this.#S(),this.#h();let n=this.#t,r=e.pointerType===`touch`,i=n.handle;if(this.#e.disabled||!e.isPrimary||e.button!==0||r&&i&&!e.composedPath().some(e=>e instanceof Element&&e.matches(i)))return;let a=e.currentTarget,o={item:t,pointer:e.pointerId,x:e.clientX,y:e.clientY,box:n.box?a.closest(n.box):null,armed:!r||!n.hold,dragging:!1};if(this.#s=o,this.#D(`addEventListener`),!o.armed)o.timer=setTimeout(()=>{this.#s===o&&!this.#e.disabled&&this.#v(o)},n.hold);else if(!r)try{a.setPointerCapture(e.pointerId)}catch{}}#u=e=>{let t=this.#s;if(t===null||e.pointerId!==t.pointer)return;if(!(e.buttons&1)){this.#f(e);return}let n=e.clientX-t.x,r=e.clientY-t.y,i=Math.hypot(n,r)>=6;if(!t.armed){i&&this.#S();return}if(!t.dragging){if(!i)return;this.#v(t)}e.preventDefault(),t.box!==null&&(t.box.style.translate=`${n}px ${r}px`);let a=this.#t.at(e.clientX,e.clientY,t.item);a!==this.#o&&(this.#o=a,this.#e.requestUpdate()),this.#t.preview===`live`&&a!==null&&a!==this.#r&&(this.#r=a,this.#w(t.item))};#d=e=>{let t=this.#s;if(t===null||e.pointerId!==t.pointer)return;let n=this.#o;if(this.#S(),!t.dragging)return;let r=t.item,i=this.#t.current(r);this.#t.preview===`live`?this.#y(r,this.#r??i):n!==null&&n!==i?this.#y(r,n):this.#b(!1)};#f=e=>{let t=this.#s;t!==null&&e.pointerId===t.pointer&&(this.#S(),t.dragging&&this.#t.preview===`live`&&this.#b(!0))};#p=e=>{this.#s!==null&&e.preventDefault()};#m=e=>{!this.#s?.dragging&&!this.#O(e.composedPath())&&this.#x()};#h=()=>{this.#c=!1,document.removeEventListener(`pointerdown`,this.#h,!0)};#g=e=>{this.#O(e.composedPath())||this.#x()};#_=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),this.#S(),this.#b(!0))};#v(e){e.armed=!0,e.dragging=!0,this.#a=e.item,this.#t.preview===`live`&&this.#n!==e.item&&(this.#b(!1),this.#n=e.item,this.#r=null,this.#i=this.#t.current(e.item)),this.#w(e.item)}#y(e,t){let n=(e===this.#n?this.#i:null)??this.#t.current(e);this.#n=null,this.#r=null,this.#t.commit(e,t),this.#C(`put`,e,t,n),this.#w(e)}#b(e){let t=this.#n;if(t===null)return;let n=this.#t.current(t),r=this.#i??n;this.#n=null,this.#r=null,e&&this.#C(`cancel`,t,n,r),this.#w(t)}#x(){let e=this.#n,t=this.#r;e!==null&&(this.#t.leave===`drop`&&t!==null&&t!==this.#t.current(e)?this.#y(e,t):this.#b(!1))}#S(){let e=this.#s;e!==null&&(clearTimeout(e.timer),e.box?.style.removeProperty(`translate`),this.#D(`removeEventListener`),e.dragging&&(this.#c=!0,document.addEventListener(`pointerdown`,this.#h,!0)),this.#s=null,this.#a=null,this.#o=null,this.#T())}#C(e,t,n,r){this.#e.context.announce(this.#t.say(e,t,n,r))}#w(e){this.#t.changed?.(e),this.#T()}#T(){this.#E(),this.#e.requestUpdate()}#E(){let e=this.#e.isConnected&&(this.#n!==null||this.#a!==null);if(e===this.#l)return;this.#l=e;let t=e?`addEventListener`:`removeEventListener`;document[t](`pointerdown`,this.#g,!0),document[t](`keydown`,this.#_,!0),document[t](`focusin`,this.#m,!0)}#D(e){document[e](`pointermove`,this.#u),document[e](`pointerup`,this.#d),document[e](`pointercancel`,this.#f),document[e](`lostpointercapture`,this.#f),document[e](`contextmenu`,this.#p)}#O(e){return[this.#e,...this.#t.parts?.()??[]].some(t=>e.includes(t))}};export{t};
|
|
2
|
+
//# sourceMappingURL=pick-and-place-DVQIPYuL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pick-and-place-DVQIPYuL.js","names":["arrowDelta","PickAndPlace","#host","host","#options","options","#picked","#target","#dragging","#over","#press","event","#fresh","at","item","#said","#say","#changed","to","#place","#cancel","#endPress","#sync","picked","place","#dragged","list","n","delta","next","from","touch","handle","node","target","press","#hear","#start","#lost","dx","dy","far","over","#owns","#leave","announce","moment","#listen","on","#listening","method","#outside","#escape","#focusin","#move","#up","#menu","path","el"],"sources":["../../../../player/src/interaction/pick-and-place.ts"],"sourcesContent":["import type { ElementContext } from '@astl/core';\nimport type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport { type Axis, arrowDelta } from './keys.js';\n\n/** Pointer travel (px) that turns a press into a drag; anything shorter is a tap. */\nexport const DRAG_THRESHOLD = 6;\n\n/**\n * The moments a student hears: an item is picked, a destination is chosen (arrow keys), the item is put somewhere,\n * or it goes back where it was.\n */\nexport type PickMoment = 'pick' | 'target' | 'put' | 'cancel';\n\n/** The element a PickAndPlace works for: a component element (an `AstlElement`) or anything shaped like one. */\nexport interface PickAndPlaceHost extends ReactiveControllerHost, HTMLElement {\n readonly disabled: boolean;\n readonly context: Pick<ElementContext, 'announce'>;\n}\n\n/** What a component tells PickAndPlace. Read on every use, so a getter can follow an attribute. */\nexport interface PickAndPlaceOptions<D> {\n /** Where `item` can go, in the order the arrow keys step through. */\n destinations(item: string): readonly D[];\n /** Where `item` is now (its answer, or where it starts). */\n current(item: string): D;\n /** The destination under a pointer at viewport point `x`, `y` while `item` is dragged, or null. */\n at(x: number, y: number, item: string): D | null;\n /** Puts `item` at `to`: the answer changes (report it with `emitChange`). */\n commit(item: string, to: D): void;\n /**\n * The announcement of a moment, in the component's own messages. `to` is where the item is (or would go: `target`)\n * after the moment; `from` is where the student last knew it to be (where it was picked, or the last target).\n */\n say(moment: PickMoment, item: string, to: D, from: D): string;\n /** After an item is picked, gets a new target, is put or goes back: e.g. to move a roving tab stop along with it. */\n changed?(item: string): void;\n /** The arrow keys that step through the destinations. Default `both`. */\n readonly axis?: Axis;\n /** Past the last destination comes the first, and back. */\n readonly wrap?: boolean;\n /**\n * `follow` (default): a dragged item stays where it is until it is put, `over` names the destination under the\n * pointer and the `box` around the pressed element moves with the pointer; a pick from before the drag stays until\n * the drag ends. Putting an item where it is changes nothing: it goes back.\n * `live`: the item is shown where it would go (a list being reordered): a drag picks the item and its target\n * follows the pointer, and putting it down is an answer even where it started.\n */\n readonly preview?: 'follow' | 'live';\n /** `follow`: a CSS selector for the box, around the pressed element, that moves with the pointer. */\n readonly box?: string;\n /**\n * Focus leaving the host (or a press outside it) with an item picked: `cancel` (default) puts it back without a\n * word; `drop` puts it at its target (announced) when it has one other than where it is, else puts it back.\n */\n readonly leave?: 'cancel' | 'drop';\n /** A touch drags only after it is held this long (ms) without moving; a touch that moves sooner scrolls the page. */\n readonly hold?: number;\n /** Touches drag only from this part of an item (CSS selector); elsewhere they scroll. Mouse and pen drag anywhere. */\n readonly handle?: string | null;\n /**\n * Elements outside the host that take part, such as destinations elsewhere in the page (the gaps of a word bank):\n * focus moving to them and presses on them keep a pick. Items may sit there too (a gap holding a word).\n */\n parts?(): Iterable<Element>;\n}\n\n/** A pointer pressed on an item: a tap, or a drag once it travels DRAG_THRESHOLD px (a touch: once it is armed). */\ninterface Press {\n readonly item: string;\n readonly pointer: number;\n readonly x: number;\n readonly y: number;\n readonly box: HTMLElement | null;\n armed: boolean;\n dragging: boolean;\n timer?: ReturnType<typeof setTimeout>;\n}\n\n/**\n * Pick and place, with every way in (WCAG 2.2: 2.1.1 keyboard, 2.5.7 dragging movements):\n * - keyboard: Space or Enter on an item picks it (a native button click), the arrow keys choose a destination (Home\n * and End: the first and the last), Space or Enter on it again puts it there, Escape puts it back;\n * - one pointer, no dragging: tap an item, then a destination (`put`) or another item (with a `place`: put there;\n * without: pick that one instead);\n * - a drag once the pointer travels DRAG_THRESHOLD px, with pointer capture; the click after a drag is not a tap;\n * a touch drags after a long press (`hold`) or from a handle (`handle`), so other touches scroll the page.\n * Escape and a press outside the host work wherever the focus is; held keys do not repeat a pick; Alt, Ctrl and Meta\n * shortcuts stay with the browser; a disabled host forgets any pick. Announcements go through `context.announce`.\n *\n * Wire each item: `@click=${(e) => pick.click(e, id)}`, `@keydown=${(e) => pick.keydown(e, id)}`,\n * `@pointerdown=${(e) => pick.pointerdown(e, id)}` and, for touches that may scroll first (`hold`),\n * `@touchmove=${pick.touchmove}`. A press's moves, release and menu are heard on the document, also for items outside\n * the host.\n */\nexport class PickAndPlace<D> implements ReactiveController {\n readonly #host: PickAndPlaceHost;\n readonly #options: PickAndPlaceOptions<D>;\n #picked: string | null = null;\n #target: D | null = null;\n #said: D | null = null;\n #dragging: string | null = null;\n #over: D | null = null;\n #press: Press | null = null;\n /** A drag just ended: the click that follows its release is not a tap (keyboard clicks have detail 0). */\n #dragged = false;\n #listening = false;\n\n constructor(host: PickAndPlaceHost, options: PickAndPlaceOptions<D>) {\n this.#host = host;\n this.#options = options;\n host.addController(this);\n }\n\n /** The item picked with the keyboard or a tap, waiting for a destination. */\n get picked(): string | null {\n return this.#picked;\n }\n\n /** The destination the arrow keys chose for the picked item; null: where it is. */\n get target(): D | null {\n return this.#target;\n }\n\n /** The item being dragged. */\n get dragging(): string | null {\n return this.#dragging;\n }\n\n /** The destination under the dragged item. */\n get over(): D | null {\n return this.#over;\n }\n\n /**\n * While a touch may still scroll (`hold`), the page must not scroll once it drags. Bound on items, not the host:\n * a non-passive touch listener makes the browser wait for it before scrolling.\n */\n readonly touchmove: AddEventListenerOptions & EventListenerObject = {\n handleEvent: (event: TouchEvent): void => {\n if (this.#press?.dragging && event.cancelable) event.preventDefault();\n },\n passive: false,\n };\n\n hostDisconnected(): void {\n this.reset();\n this.#fresh();\n }\n\n hostUpdate(): void {\n if (this.#host.disabled && (this.#picked !== null || this.#press !== null)) this.reset();\n }\n\n /** Picks `item`, announced. */\n pick(item: string): void {\n const at = this.#options.current(item);\n this.#picked = item;\n this.#target = null;\n this.#said = at;\n this.#say('pick', item, at, at);\n this.#changed(item);\n }\n\n /** Puts the picked item at `to`, announced; where it already is, it goes back (unless the preview is `live`). */\n put(to: D): void {\n const item = this.#picked;\n if (item === null || this.#host.disabled) return;\n if (this.#options.preview !== 'live' && to === this.#options.current(item)) this.cancel();\n else this.#place(item, to);\n }\n\n /** Puts the picked item back where it is, announced. */\n cancel(): void {\n this.#cancel(true);\n }\n\n /** Forgets any pick and drag without a word, e.g. when answers are set from outside. */\n reset(): void {\n this.#endPress();\n this.#picked = null;\n this.#target = null;\n this.#sync();\n }\n\n /**\n * A click on `item` (a tap, or Space or Enter on its button) picks it. While an item is picked: with a `place` (the\n * clicked item stands for a destination, like a position in a list) the picked item is put there; without, a click\n * on the picked item puts it at its target (or back), and a click on another item picks that one instead.\n */\n click(event: MouseEvent, item: string, place?: D): void {\n if (!this.tap(event) || this.#host.disabled) return;\n const picked = this.#picked;\n if (picked === null) this.pick(item);\n else if (place !== undefined) this.put(place);\n else if (picked !== item) this.pick(item);\n else this.put(this.#target ?? this.#options.current(item));\n }\n\n /**\n * Whether a click is a tap (or Space or Enter on a button), not the click a drag's release brings, which it uses up:\n * for clicks that do more than `click`.\n */\n tap(event: MouseEvent): boolean {\n if (!this.#dragged || event.detail === 0) return true;\n this.#fresh();\n return false;\n }\n\n /** Arrow keys (and Home, End) on the picked `item` choose its target; returns true when the key was used. */\n keydown(event: KeyboardEvent, item: string): boolean {\n if (this.#host.disabled) return false;\n // A held key repeats clicks: it would pick and put items one after another.\n if (event.repeat && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n return true;\n }\n if (event.altKey || event.ctrlKey || event.metaKey || this.#picked !== item) return false;\n const options = this.#options;\n const list = options.destinations(item);\n const n = list.length;\n const at = Math.max(0, list.indexOf(this.#target ?? options.current(item)));\n const delta = arrowDelta(event, options.axis ?? 'both', this.#host);\n let next: number;\n if (delta !== 0) next = options.wrap ? (at + delta + n) % n : Math.min(Math.max(at + delta, 0), n - 1);\n else if (event.key === 'Home') next = 0;\n else if (event.key === 'End') next = n - 1;\n else return false;\n event.preventDefault();\n const to = list[next];\n if (next !== at && to !== undefined) {\n const from = this.#said ?? to;\n this.#target = to;\n this.#said = to;\n this.#say('target', item, to, from);\n this.#changed(item);\n }\n return true;\n }\n\n /** A press on `item` with the primary button, a finger or a pen: a tap or the start of a drag. */\n pointerdown(event: PointerEvent, item: string): void {\n // A press whose release never came must not leave an item hanging.\n this.#endPress();\n this.#fresh();\n const options = this.#options;\n const touch = event.pointerType === 'touch';\n const handle = options.handle;\n if (this.#host.disabled || !event.isPrimary || event.button !== 0) return;\n if (\n touch &&\n handle &&\n !event.composedPath().some((node) => node instanceof Element && node.matches(handle))\n )\n return;\n const target = event.currentTarget as HTMLElement;\n const press: Press = {\n item,\n pointer: event.pointerId,\n x: event.clientX,\n y: event.clientY,\n box: options.box ? target.closest<HTMLElement>(options.box) : null,\n armed: !touch || !options.hold,\n dragging: false,\n };\n this.#press = press;\n this.#hear('addEventListener');\n if (!press.armed) {\n press.timer = setTimeout(() => {\n if (this.#press === press && !this.#host.disabled) this.#start(press);\n }, options.hold);\n } else if (!touch) {\n // Moves and the release outside the item still reach it (touches are captured anyway).\n try {\n target.setPointerCapture(event.pointerId);\n } catch {\n // A synthetic pointer (not active in the browser) cannot be captured; its events reach the document anyway.\n }\n }\n }\n\n readonly #move = (event: PointerEvent): void => {\n const press = this.#press;\n if (press === null || event.pointerId !== press.pointer) return;\n if ((event.buttons & 1) === 0) {\n this.#lost(event);\n return;\n }\n const dx = event.clientX - press.x;\n const dy = event.clientY - press.y;\n const far = Math.hypot(dx, dy) >= DRAG_THRESHOLD;\n if (!press.armed) {\n // A touch that moves before the long press scrolls the page: let it go.\n if (far) this.#endPress();\n return;\n }\n if (!press.dragging) {\n if (!far) return;\n this.#start(press);\n }\n event.preventDefault();\n if (press.box !== null) press.box.style.translate = `${dx}px ${dy}px`;\n const over = this.#options.at(event.clientX, event.clientY, press.item);\n if (over !== this.#over) {\n this.#over = over;\n this.#host.requestUpdate();\n }\n if (this.#options.preview === 'live' && over !== null && over !== this.#target) {\n this.#target = over;\n this.#changed(press.item);\n }\n };\n\n readonly #up = (event: PointerEvent): void => {\n const press = this.#press;\n if (press === null || event.pointerId !== press.pointer) return;\n const over = this.#over;\n this.#endPress();\n // Not dragged: a tap, and the click that follows picks or puts.\n if (!press.dragging) return;\n const item = press.item;\n const at = this.#options.current(item);\n if (this.#options.preview === 'live') this.#place(item, this.#target ?? at);\n else if (over !== null && over !== at) this.#place(item, over);\n // A drag is a move of its own: a pick from before it goes back.\n else this.#cancel(false);\n };\n\n /** The pointer was cancelled, lost its capture, or its release was missed. */\n readonly #lost = (event: PointerEvent): void => {\n const press = this.#press;\n if (press === null || event.pointerId !== press.pointer) return;\n this.#endPress();\n if (press.dragging && this.#options.preview === 'live') this.#cancel(true);\n };\n\n /** A long press must not open a menu over the item it is about to drag. */\n readonly #menu = (event: Event): void => {\n if (this.#press !== null) event.preventDefault();\n };\n\n /**\n * Focus moving to anything outside the host and its parts. A move to nothing (a tap on something that takes no\n * focus, like a zone) is not leaving: presses outside are handled on their own.\n */\n readonly #focusin = (event: FocusEvent): void => {\n if (!this.#press?.dragging && !this.#owns(event.composedPath())) this.#leave();\n };\n\n /** The next press anywhere starts afresh: a touch drag's release brings no click that would use the flag up. */\n readonly #fresh = (): void => {\n this.#dragged = false;\n document.removeEventListener('pointerdown', this.#fresh, true);\n };\n\n readonly #outside = (event: PointerEvent): void => {\n if (!this.#owns(event.composedPath())) this.#leave();\n };\n\n /** Escape cancels a pick or a drag wherever the focus is (a destination button, or nowhere after a tap). */\n readonly #escape = (event: KeyboardEvent): void => {\n if (event.key !== 'Escape') return;\n event.preventDefault();\n event.stopPropagation();\n this.#endPress();\n this.#cancel(true);\n };\n\n #start(press: Press): void {\n press.armed = true;\n press.dragging = true;\n this.#dragging = press.item;\n if (this.#options.preview === 'live' && this.#picked !== press.item) {\n this.#cancel(false);\n this.#picked = press.item;\n this.#target = null;\n this.#said = this.#options.current(press.item);\n }\n this.#changed(press.item);\n }\n\n #place(item: string, to: D): void {\n const from = (item === this.#picked ? this.#said : null) ?? this.#options.current(item);\n this.#picked = null;\n this.#target = null;\n this.#options.commit(item, to);\n this.#say('put', item, to, from);\n this.#changed(item);\n }\n\n #cancel(announce: boolean): void {\n const item = this.#picked;\n if (item === null) return;\n const at = this.#options.current(item);\n const from = this.#said ?? at;\n this.#picked = null;\n this.#target = null;\n if (announce) this.#say('cancel', item, at, from);\n this.#changed(item);\n }\n\n #leave(): void {\n const item = this.#picked;\n const to = this.#target;\n if (item === null) return;\n if (this.#options.leave === 'drop' && to !== null && to !== this.#options.current(item))\n this.#place(item, to);\n else this.#cancel(false);\n }\n\n #endPress(): void {\n const press = this.#press;\n if (press === null) return;\n clearTimeout(press.timer);\n press.box?.style.removeProperty('translate');\n this.#hear('removeEventListener');\n if (press.dragging) {\n this.#dragged = true;\n document.addEventListener('pointerdown', this.#fresh, true);\n }\n this.#press = null;\n this.#dragging = null;\n this.#over = null;\n this.#sync();\n }\n\n #say(moment: PickMoment, item: string, to: D, from: D): void {\n this.#host.context.announce(this.#options.say(moment, item, to, from));\n }\n\n #changed(item: string): void {\n this.#options.changed?.(item);\n this.#sync();\n }\n\n /** Requests a render; Escape, presses and focus outside are heard on the document only while something is picked. */\n #sync(): void {\n this.#listen();\n this.#host.requestUpdate();\n }\n\n #listen(): void {\n const on = this.#host.isConnected && (this.#picked !== null || this.#dragging !== null);\n if (on === this.#listening) return;\n this.#listening = on;\n const method = on ? 'addEventListener' : 'removeEventListener';\n document[method]('pointerdown', this.#outside as EventListener, true);\n document[method]('keydown', this.#escape as EventListener, true);\n document[method]('focusin', this.#focusin as EventListener, true);\n }\n\n /** The moves, release and menu of a press, heard on the document while it lasts (the item may be anywhere). */\n #hear(method: 'addEventListener' | 'removeEventListener'): void {\n document[method]('pointermove', this.#move as EventListener);\n document[method]('pointerup', this.#up as EventListener);\n document[method]('pointercancel', this.#lost as EventListener);\n document[method]('lostpointercapture', this.#lost as EventListener);\n document[method]('contextmenu', this.#menu);\n }\n\n /** Whether an event's composed path runs through the host or one of its parts. */\n #owns(path: readonly EventTarget[]): boolean {\n return [this.#host, ...(this.#options.parts?.() ?? [])].some((el) => path.includes(el));\n }\n}\n"],"mappings":"A,uCA8FA,IAAaC,EAAb,KAA2D,CACzD,GACA,GACA,GAAyB,KACzB,GAAoB,KACpB,GAAkB,KAClB,GAA2B,KAC3B,GAAkB,KAClB,GAAuB,KAEvB,GAAW,GACX,GAAa,GAEb,YAAY,EAAwB,EAAiC,CACnE,KAAKC,GAAQC,EACb,KAAKC,GAAWC,EAChBF,EAAK,cAAc,IAAI,CAC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