import { a as QtiAssociateInteraction, b as QtiChoiceInteraction, c as QtiExtendedTextInteraction, f as QtiGapMatchInteraction, h as QtiGraphicAssociateInteraction, i as QtiGraphicGapMatchInteraction, j as QtiGraphicOrderInteraction, l as QtiHotspotInteraction, n as QtiHottextInteraction, p as QtiInlineChoiceInteraction, q as QtiMatchInteraction, r as QtiOrderInteraction, s as QtiPortableCustomInteraction, B as QtiPortableCustomInteractionTest, u as QtiSelectPointInteraction, x as QtiSliderInteraction, y as QtiTextEntryInteraction, Q as QtiAssociableHotspot, d as QtiGap, e as QtiGapImg, g as QtiGapText, k as QtiHotspotChoice, m as QtiHottext, o as QtiInlineChoice, t as QtiPrompt, v as QtiSimpleAssociableChoice, w as QtiSimpleChoice } from './qti-text-entry-interaction.d-h5UZ8Qvp.js'; export { O as Orientation, z as inlineScriptText, A as inlineStyleText } from './qti-text-entry-interaction.d-h5UZ8Qvp.js'; import * as lit from 'lit'; import { CSSResultGroup, LitElement, PropertyValueMap } from 'lit'; import { I as Interaction } from './record.d-wB9uYs-j.js'; import './interaction.interface.d-CvjHM2bi.js'; import './config.context.d-BvU9r-Mg.js'; import './item.types.d-DuVR0ZVK.js'; import './qti.context.d-CejJMlfZ.js'; import 'lit/directives/ref.js'; /** * Upload interaction: candidates attach a file as their response. * * @slot prompt - The prompt shown above the file input. */ declare class QtiUploadInteraction extends Interaction { #private; static styles: CSSResultGroup; reset(): void; validate(): boolean; get response(): string | null; set response(base64: string | null); static get properties(): { [key: string]: lit.PropertyDeclaration; }; render(): lit.TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'qti-upload-interaction': QtiUploadInteraction; } } /** * Position-object interaction: candidates place draggable objects onto a stage image. * * @slot - Default slot for the object choices and stage. */ declare class QtiPositionObjectInteraction extends LitElement { static styles: CSSResultGroup; render(): lit.TemplateResult<1>; } declare class QtiPositionObjectStage extends LitElement { static styles: CSSResultGroup; choiceOrdering: boolean; startX: any; startY: any; dragElement: any; render(): lit.TemplateResult<1>; constructor(); dragElementHandler(event: MouseEvent): void; firstUpdated(a: PropertyValueMap): void; removeMoveListener(): void; disconnectedCallback(): void; } declare global { interface HTMLElementTagNameMap { 'qti-position-object-stage': QtiPositionObjectStage; } } /** * Media interaction: wraps an embedded media object (audio/video) and tracks play events. * * @slot prompt - The prompt shown above the media element. * @slot - Default slot for the embedded media element. */ declare class QtiMediaInteraction extends Interaction { #private; static styles: CSSResultGroup; reset(): void; validate(): boolean; get response(): string | null; set response(val: string | null); static get properties(): { step: { type: NumberConstructor; attribute: string; default: number; }; }; render(): lit.TemplateResult<1>; constructor(); connectedCallback(): void; } declare global { interface HTMLElementTagNameMap { 'qti-media-interaction': QtiMediaInteraction; } } /** * A button that ends the current attempt. * * @csspart button - The end-attempt button element. */ declare class QtiEndAttemptInteraction extends LitElement { static styles: CSSResultGroup; responseIdentifier: string; disabled: boolean; /** Defines the number of attempts that a user can make using the 'endAttemptInteraction' mechanism (this can be used to limit the number of hints, etc.). [More information](https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/index.html#DataCharacteristic_EndAttemptInteraction.Attr_count-attempt) */ countAttempt: 'true' | 'false' | null; title: string; render(): lit.TemplateResult<1>; endAttempt(_: Event): void; } declare global { interface HTMLElementTagNameMap { 'qti-end-attempt-interaction': QtiEndAttemptInteraction; } } /** * QTI Custom Interaction component for legacy CES-based interactions. * * This component implements support for custom interactions originally built for the CES * (Custom Element Standard) player - the predecessor to FACET and the Trifork QTI Player. * * @remarks * The interaction workflow: * 1. Fetch the CI manifest (JSON file with script, style, media references) * 2. Check if bootstrap.js uses the CES API * 3. If CES is used: * - Fetch index.html from main window (where service worker/fetch works) * - Inject registerCES proxy script for postMessage-based communication * - Create blob URL and pass it to ciBootstrap * 4. Create pciContainer iframe with style and bootstrap script * 5. Handle postMessage events for getMedia, getResponse, setResponse, getBlobUrl * * The postMessage bridge is necessary because: * - Iframes created via document.write() have about:blank origin * - They cannot access the parent's global CES object (cross-origin) * - Service workers don't control about:blank documents * * Messages are sent to all parent windows to support embedding scenarios like Storybook * where window.top might not be the actual host application. */ declare class QtiCustomInteraction extends Interaction { #private; static styles: CSSResultGroup; constructor(); data: string; baseItemUrl: string; baseRefUrl: string; id: string; private _errorMessage; manifest: { script: string[]; style: string[]; media: string[]; }; connectedCallback(): void; /** * Sets up the CES custom interaction by creating the iframe structure and * handling the CES API communication via postMessage. * * For interactions that use CES, this method: * 1. Fetches the original bootstrap.js and checks if it uses CES * 2. If CES is used, fetches index.html and injects the registerCES proxy * 3. Creates a blob URL for the modified HTML (stored in _contentBlobUrl) * 4. Replaces bootstrap.js with ciBootstrap that loads the blob URL * 5. Sets up postMessage listeners for CES API calls */ setupCES(): Promise; handlePostMessage(event: MessageEvent): void; validate(): boolean; get response(): string | string[] | null; set response(val: string | string[] | null); disconnectedCallback(): void; render(): lit.TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'qti-custom-interaction': QtiCustomInteraction; } } declare const qtiInteractionElements: readonly [{ readonly tag: "qti-associate-interaction"; readonly ctor: typeof QtiAssociateInteraction; }, { readonly tag: "qti-choice-interaction"; readonly ctor: typeof QtiChoiceInteraction; }, { readonly tag: "qti-custom-interaction"; readonly ctor: typeof QtiCustomInteraction; }, { readonly tag: "qti-end-attempt-interaction"; readonly ctor: typeof QtiEndAttemptInteraction; }, { readonly tag: "qti-extended-text-interaction"; readonly ctor: typeof QtiExtendedTextInteraction; }, { readonly tag: "qti-gap-match-interaction"; readonly ctor: typeof QtiGapMatchInteraction; }, { readonly tag: "qti-graphic-associate-interaction"; readonly ctor: typeof QtiGraphicAssociateInteraction; }, { readonly tag: "qti-graphic-gap-match-interaction"; readonly ctor: typeof QtiGraphicGapMatchInteraction; }, { readonly tag: "qti-graphic-order-interaction"; readonly ctor: typeof QtiGraphicOrderInteraction; }, { readonly tag: "qti-hotspot-interaction"; readonly ctor: typeof QtiHotspotInteraction; }, { readonly tag: "qti-hottext-interaction"; readonly ctor: typeof QtiHottextInteraction; }, { readonly tag: "qti-inline-choice-interaction"; readonly ctor: typeof QtiInlineChoiceInteraction; }, { readonly tag: "qti-match-interaction"; readonly ctor: typeof QtiMatchInteraction; }, { readonly tag: "qti-media-interaction"; readonly ctor: typeof QtiMediaInteraction; }, { readonly tag: "qti-order-interaction"; readonly ctor: typeof QtiOrderInteraction; }, { readonly tag: "qti-portable-custom-interaction"; readonly ctor: typeof QtiPortableCustomInteraction; }, { readonly tag: "qti-portable-custom-interaction-test"; readonly ctor: typeof QtiPortableCustomInteractionTest; }, { readonly tag: "qti-position-object-interaction"; readonly ctor: typeof QtiPositionObjectInteraction; }, { readonly tag: "qti-position-object-stage"; readonly ctor: typeof QtiPositionObjectStage; }, { readonly tag: "qti-select-point-interaction"; readonly ctor: typeof QtiSelectPointInteraction; }, { readonly tag: "qti-slider-interaction"; readonly ctor: typeof QtiSliderInteraction; }, { readonly tag: "qti-text-entry-interaction"; readonly ctor: typeof QtiTextEntryInteraction; }, { readonly tag: "qti-upload-interaction"; readonly ctor: typeof QtiUploadInteraction; }, { readonly tag: "qti-associable-hotspot"; readonly ctor: typeof QtiAssociableHotspot; }, { readonly tag: "qti-gap"; readonly ctor: typeof QtiGap; }, { readonly tag: "qti-gap-img"; readonly ctor: typeof QtiGapImg; }, { readonly tag: "qti-gap-text"; readonly ctor: typeof QtiGapText; }, { readonly tag: "qti-hotspot-choice"; readonly ctor: typeof QtiHotspotChoice; }, { readonly tag: "qti-hottext"; readonly ctor: typeof QtiHottext; }, { readonly tag: "qti-inline-choice"; readonly ctor: typeof QtiInlineChoice; }, { readonly tag: "qti-prompt"; readonly ctor: typeof QtiPrompt; }, { readonly tag: "qti-simple-associable-choice"; readonly ctor: typeof QtiSimpleAssociableChoice; }, { readonly tag: "qti-simple-choice"; readonly ctor: typeof QtiSimpleChoice; }]; export { QtiAssociableHotspot, QtiAssociateInteraction, QtiChoiceInteraction, QtiCustomInteraction, QtiEndAttemptInteraction, QtiExtendedTextInteraction, QtiGap, QtiGapImg, QtiGapMatchInteraction, QtiGapText, QtiGraphicAssociateInteraction, QtiGraphicGapMatchInteraction, QtiGraphicOrderInteraction, QtiHotspotChoice, QtiHotspotInteraction, QtiHottext, QtiHottextInteraction, QtiInlineChoice, QtiInlineChoiceInteraction, QtiMatchInteraction, QtiMediaInteraction, QtiOrderInteraction, QtiPortableCustomInteraction, QtiPositionObjectInteraction, QtiPositionObjectStage, QtiPrompt, QtiSelectPointInteraction, QtiSimpleAssociableChoice, QtiSimpleChoice, QtiSliderInteraction, QtiTextEntryInteraction, QtiUploadInteraction, qtiInteractionElements };