H5P.AdvancedText = (function ($, EventDispatcher) {

  /**
   * A simple library for displaying text with advanced styling.
   *
   * @class H5P.AdvancedText
   * @param {Object} parameters
   * @param {Object} [parameters.text='New text']
   * @param {number} id
   */
  function AdvancedText(parameters, id) {
    var self = this;
    EventDispatcher.call(this);

    var html = (parameters.text === undefined ? '<em>New text</em>' : parameters.text);

    /**
     * Wipe container and add text html.
     *
     * @alias H5P.AdvancedText#attach
     * @param {H5P.jQuery} $container
     */
    self.attach = function ($container) {
      $container.addClass('h5p-advanced-text').html(html);
    };
  }

  AdvancedText.prototype = Object.create(EventDispatcher.prototype);
  AdvancedText.prototype.constructor = AdvancedText;

  return AdvancedText;

})(H5P.jQuery, H5P.EventDispatcher);
;var H5P = H5P || {};

/**
 * Constructor.
 *
 * @param {Object} params Options for this library.
 * @param {Number} id Content identifier
 * @returns {undefined}
 */
(function ($) {
  H5P.Image = function (params, id, extras) {
    H5P.EventDispatcher.call(this);
    this.extras = extras;

    if (params.file === undefined || !(params.file instanceof Object)) {
      this.placeholder = true;
    }
    else {
      this.source = H5P.getPath(params.file.path, id);
      this.width = params.file.width;
      this.height = params.file.height;
    }

    this.alt = (!params.decorative && params.alt !== undefined) ?
      this.stripHTML(this.htmlDecode(params.alt)) :
      '';

    if (params.title !== undefined) {
      this.title = this.stripHTML(this.htmlDecode(params.title));
    }
  };

  H5P.Image.prototype = Object.create(H5P.EventDispatcher.prototype);
  H5P.Image.prototype.constructor = H5P.Image;

  /**
   * Wipe out the content of the wrapper and put our HTML in it.
   *
   * @param {jQuery} $wrapper
   * @returns {undefined}
   */
  H5P.Image.prototype.attach = function ($wrapper) {
    var self = this;
    var source = this.source;

    if (self.$img === undefined) {
      if(self.placeholder) {
        self.$img = $('<div>', {
          width: '100%',
          height: '100%',
          class: 'h5p-placeholder',
          title: this.title === undefined ? '' : this.title,
          on: {
            load: function () {
              self.trigger('loaded');
            }
          }
        });
      } else {
        self.$img = $('<img>', {
          width: '100%',
          height: '100%',
          src: source,
          alt: this.alt,
          title: this.title === undefined ? '' : this.title,
          on: {
            load: function () {
              self.trigger('loaded');
            }
          }
        });
      }
    }

    $wrapper.addClass('h5p-image').html(self.$img);
  };

  /**
   * Retrieve decoded HTML encoded string.
   *
   * @param {string} input HTML encoded string.
   * @returns {string} Decoded string.
   */
  H5P.Image.prototype.htmlDecode = function (input) {
    const dparser = new DOMParser().parseFromString(input, 'text/html');
    return dparser.documentElement.textContent;
  };

  /**
   * Retrieve string without HTML tags.
   *
   * @param {string} input Input string.
   * @returns {string} Output string.
   */
  H5P.Image.prototype.stripHTML = function (html) {
    const div = document.createElement('div');
    div.innerHTML = html;
    return div.textContent || div.innerText || '';
  };

  return H5P.Image;
}(H5P.jQuery));
;var H5P = H5P || {};

H5P.ImageSlide = (function ($) {
  /**
   * Constructor function.
   */
  function C(options, contentId, extras) {
    var self = this;
    this.$ = $(this);
    H5P.EventDispatcher.call(this);

    this.aspectRatio = this.originalAspectRatio = extras.aspectRatio;
    // Extend defaults with provided options
    this.options = $.extend(true, {}, {
      image: null,
    }, options);
    // Keep provided id.
    this.contentId = contentId;

    this.image = H5P.newRunnable(this.options.image, this.contentId);
    this.image.on('loaded', function() {
      self.trigger('loaded');
      self.trigger('resize');
    });
  }

  C.prototype = Object.create(H5P.EventDispatcher.prototype);
  C.prototype.constructor = C;


  /**
   * Attach function called by H5P framework to insert H5P content into
   * page
   *
   * @param {jQuery} $container
   */
  C.prototype.attach = function ($container) {
    this.$container = $container;

    // Set class on container to identify it as a greeting card
    // container.  Allows for styling later.
    $container.addClass("h5p-image-slide");

    this.$imageHolder = $('<div>', {
      class: 'h5p-image-slide-image-holder',
    });

    $container.append(this.$imageHolder);

    // Add image
    this.image.attach(this.$imageHolder);

    this.adjustSize();
  };

  /**
   * Set the ascpect ratio for this slide
   *
   * @param {Integer} newAspectRatio the aspect ratio
   */
  C.prototype.setAspectRatio = function(newAspectRatio) {
    this.aspectRatio = newAspectRatio;
    // Adjust size if image has been attached
    if (this.$imageHolder) {
      this.adjustSize();
    }
  };

  /**
   * Reset the aspect ratio to the previously set aspect ratio
   *
   * Typically used when exiting fullscreen mode
   */
  C.prototype.resetAspectRatio = function() {
    this.aspectRatio = this.originalAspectRatio;
    // Adjust size if image has been attached
    if (this.$imageHolder) {
      this.adjustSize();
    }
  };

  /**
   * Update the size of the slide
   *
   * Typically used when the screen resizes, goes to fullscreen or similar
   */
  C.prototype.adjustSize = function() {
    var imageHeight = this.options.image.params.file.height;
    var imageWidth = this.options.image.params.file.width;

    var imageAspectRatio = imageWidth / imageHeight;
    if (this.aspectRatio >= imageAspectRatio) {
      // image too tall - Make it smaller and center it
      var widthInPercent = imageAspectRatio / this.aspectRatio * 100;
      var borderSize = (100 - widthInPercent) / 2 + '%';
      this.$imageHolder.css({
        height: '100%',
        width: imageAspectRatio / this.aspectRatio * 100 + '%',
        paddingLeft: borderSize,
        paddingRight: borderSize,
        paddingTop: 0,
        paddingBottom: 0
      });
    }
    else if (this.aspectRatio < imageAspectRatio) {
      // image too wide
      var heightInPercent = this.aspectRatio / imageAspectRatio * 100;

      // Note: divide by aspect ratio since padding top/bottom is relative to width
      var borderSize = (100 - heightInPercent) / 2 / this.aspectRatio + '%';

      this.$imageHolder.css({
        width: '100%',
        height: heightInPercent + '%',
        paddingTop: borderSize,
        paddingBottom: borderSize,
        paddingLeft: 0,
        paddingRight: 0
      });
    }
    else if (this.aspectRatio === undefined) {
      this.$imageHolder.css({
        width: '100%',
        height: '',
        paddingTop: 0,
        paddingBottom: 0,
        paddingLeft: 0,
        paddingRight: 0
      });
    }
  };

  return C;
})(H5P.jQuery);
;var H5P = H5P || {};

H5P.ImageSlider = (function ($) {
  /**
   * Constructor function.
   */
  function C(options, id) {
    this.$ = $(this);
    var self = this;

    H5P.EventDispatcher.call(this);
    // Extend defaults with provided options
    this.options = $.extend(true, {}, {
      imageSlides: [
        {
          imageSlide: null
        }
      ],
      a11y: {
        nextSlide: 'Next Image',
        prevSlide: 'Previous Image',
        gotoSlide: 'Go to image %slide'
      },
      aspectRatioMode: 'auto',
      aspectRatio: {
        aspectWidth: 4,
        aspectHeight: 3
      }
    }, options);

    // Filter out slides without image
    this.options.imageSlides = this.options.imageSlides.filter(function (slide) {
      return slide.params && slide.params.image && slide.params.image.params && slide.params.image.params.file;
    });

    if (this.options.imageSlides.length === 0) {
      return;
    }

    // Keep provided id.
    this.id = id;
    this.currentSlideId = 0;
    this.imageSlides = [];
    this.imageSlideHolders = [];
    this.determineAspectRatio();

    for (var i = 0; i < this.options.imageSlides.length; i++) {
      this.imageSlides[i] = H5P.newRunnable(this.options.imageSlides[i], this.id, undefined, undefined, {
        aspectRatio: this.aspectRatio
      });
      this.imageSlides[i].on('loaded', function() {
        self.trigger('resize');
      });
      this.imageSlideHolders[i] = false;
    }

    this.on('enterFullScreen', function() {
      self.enterFullScreen();
    });
    this.on('exitFullScreen', function(){
      self.exitFullScreen();
    });

    this.on('resize', function() {
      var fullScreenOn = self.$container.hasClass('h5p-fullscreen') || self.$container.hasClass('h5p-semi-fullscreen');
      if (fullScreenOn) {
        self.$slides.css('height', '');
        var newAspectRatio = window.innerWidth / (window.innerHeight - self.$progressBar.outerHeight());
        for (var i = 0; i < self.imageSlides.length; i++) {
          self.imageSlides[i].setAspectRatio(newAspectRatio);
        }
      }
      else {
        if (self.aspectRatio && self.$slides) {
          self.$slides.height(self.$slides.width() / self.aspectRatio);
        }
      }
      self.updateNavButtons();
      self.updateProgressBar();
    });
  }

  C.prototype = Object.create(H5P.EventDispatcher.prototype);
  C.prototype.constructor = C;

  /**
   * Set the aspect ratio for this image-slider
   */
  C.prototype.determineAspectRatio = function() {
    // Set aspectRatio to default
    this.aspectRatio = 4/3;

    // Try to identify aspectRatio according to settings
    switch (this.options.aspectRatioMode) {
      case 'auto':
        var imageRatios = [];
        for (var i = 0; i < this.options.imageSlides.length; i++) {
          var imageFile = this.options.imageSlides[i].params.image.params.file;
          imageRatios[i] = imageFile.width / imageFile.height;
        }
        imageRatios.sort(function (a, b) {
          return a - b;
        });
        // Get the median image ratio
        this.aspectRatio = imageRatios[Math.round(imageRatios.length / 2) - 1];
        break;

      case 'custom':
        if (this.options.aspectRatio.aspectWidth && this.options.aspectRatio.aspectHeight) {
          this.aspectRatio = this.options.aspectRatio.aspectWidth / this.options.aspectRatio.aspectHeight;
        }
        break;

      case 'notFixed':
        this.aspectRatio = undefined;
        break;
    }
  };

  /**
   * Attach function called by H5P framework to insert H5P content into
   * page
   *
   * @param {jQuery} $container
   */
  C.prototype.attach = function ($container) {
    if (this.options.imageSlides.length === 0) {
      return;
    }

    this.$container = $container;
    // Set class on container to identify it as a greeting card
    // container.  Allows for styling later.
    $container.addClass("h5p-image-slider").addClass('h5p-image-slider-using-mouse');

    $container.bind('keydown', function(e) {
      var keyboardNavKeys = [32, 13, 9];
      if (keyboardNavKeys.indexOf(e.which) !== -1) {
        $container.removeClass('h5p-image-slider-using-mouse');
      }
    });
    $container.bind('mousedown', function() {
      $container.addClass('h5p-image-slider-using-mouse');
    });

    this.$slidesHolder = $('<div>', {
      class: 'h5p-image-slider-slides-holder'
    }).appendTo($container);

    this.$screenReaderAnnouncement = $('<div>', {
      class: 'h5p-image-slider-sr-only',
      'aria-atomic': 'true',
      'aria-live': 'polite'
    }).appendTo(this.$slidesHolder);

    this.$slides = $('<div>', {
      class: 'h5p-image-slider-slides'
    }).appendTo(this.$slidesHolder);

    // If the H5P is embedded e.g. inside a non H5P accordion, the
    // slides DOM element might end up with no height. Using a
    // intersectionOberver to overcome this issue.
    const observer = new IntersectionObserver(() => {
      if (this.$slides.height() === 0) {
        this.trigger('resize');
        observer.disconnect();
      }
    }, {
      threshold: [0]
    });
    observer.observe($container.get(0));

    this.loadImageSlides();

    this.$currentSlide = this.imageSlideHolders[0].addClass('h5p-image-slider-current');

    this.attachControls();
  };

  /**
   * Update aria-live region with the current image's alt text.
   */
  C.prototype.announceCurrentSlide = function () {
    this.$screenReaderAnnouncement.text(this.imageSlides[this.currentSlideId].image.alt);
  };

  /**
   * Update layout when entering fullscreen.
   *
   * Many layout changes are handled on resize.
   */
  C.prototype.enterFullScreen = function() {
    this.updateNavButtons();
    this.updateProgressBar();
  };

  /**
   * Update layout when entering fullscreen.
   *
   * Many layout changes are handled on resize.
   */
  C.prototype.exitFullScreen = function() {
    for (var i = 0; i < this.imageSlides.length; i++) {
      this.imageSlides[i].resetAspectRatio();
    }
    this.updateNavButtons();
    this.updateProgressBar();
  };

  /**
   * Adds the HTML for the next three slides to the DOM
   */
  C.prototype.loadImageSlides = function() {
    // Load next three imageSlides (not all for performance reasons)
    for (var i = this.currentSlideId; i < this.imageSlides.length && i < this.currentSlideId + 3; i++) {
      if (this.imageSlideHolders[i] === false) {
        this.imageSlideHolders[i] = $('<div>', {
          'class': 'h5p-image-slide-holder'
        });
        if (i > 0) {
          this.imageSlideHolders[i].attr('aria-hidden', true);
        }
        if (i > this.currentSlideId) {
          this.imageSlideHolders[i].addClass('h5p-image-slider-future');
        }
        this.imageSlides[i].attach(this.imageSlideHolders[i]);
        this.$slides.append(this.imageSlideHolders[i]);
      }
    }
  };

  /**
   * Attaches controls to the DOM
   */
  C.prototype.attachControls = function() {
    var self = this;
    this.$leftButton = this.createControlButton(this.options.a11y.prevSlide, 'left');
    this.$rightButton = this.createControlButton(this.options.a11y.nextSlide, 'right');
    C.handleButtonClick(this.$leftButton, function () {
      if (!self.dragging) {
        self.gotoSlide(self.currentSlideId - 1);
      }
    });

    C.handleButtonClick(this.$rightButton, function() {
      if (!self.dragging) {
        self.gotoSlide(self.currentSlideId + 1);
      }
    });

    this.$slidesHolder.append(this.$leftButton);
    this.$slidesHolder.append(this.$rightButton);
    this.updateNavButtons();
    this.attachProgressBar();
    this.initDragging();
    this.initKeyEvents();
  };

  /**
   * Attaches the progress bar to the DOM
   */
  C.prototype.attachProgressBar = function() {
    this.$progressBar = $('<ul>', {
      class: 'h5p-image-slider-progress'
    });
    for (var i = 0; i < this.imageSlides.length; i++) {
      this.$progressBar.append(this.createProgressBarElement(i));
    }
    this.$slidesHolder.append(this.$progressBar);
  };

  /**
   * Creates a progress bar button
   *
   * @param {Integer} index  - slide index the progress bare element corresponds to
   * @return {jQuery} - progress bar button
   */
  C.prototype.createProgressBarElement = function(index) {
    var self = this;

    var $progressBarButton = $('<button>', {
      class: 'h5p-image-slider-progress-button',
      "aria-label": self.options.a11y.gotoSlide.replace('%slide', index + 1),
      tabindex: 0,
    });

    var $progressBarElement = $('<li>', {
      class: 'h5p-image-slider-progress-element',
    });

    $progressBarElement.append($progressBarButton);

    C.handleButtonClick($progressBarButton, function() {
      self.gotoSlide(index);
    });

    if (index === 0) {
      $progressBarElement.addClass('h5p-image-slider-current-progress-element');
    }
    return $progressBarElement;
  };

  /**
   * Creates a next or previous button
   *
   * @param {string} text - label for the button
   * @param {string} dir - next or prev
   * @return {jQuery} control button
   */
  C.prototype.createControlButton = function(text, dir) {
    var $controlButton = $('<div>', {
      class: 'h5p-image-slider-button ' + 'h5p-image-slider-' + dir + '-button',
    });

    var $controlBg = $('<div>', {
      class: 'h5p-image-slider-button-background'
    });
     $controlButton.append($controlBg);

    var $controlText = $('<div>', {
      class: 'h5p-image-slider-button-text',
      'aria-label': text,
      'role': 'button',
      'tabindex': 0
    });
    $controlButton.append($controlText);

    return $controlButton;
  };

  /**
   * Go to a specific slide
   *
   * @param {Integer} slideId the index of the slide we want to go to
   * @return {Boolean} false if failed(typically the slide didn't exist), true if not
   */
  C.prototype.gotoSlide = function(slideId) {
    if (slideId < 0 || slideId >= this.imageSlideHolders.length) {
      return false;
    }
    $('.h5p-image-slider-removing', this.$container).removeClass('.h5p-image-slider-removing');
    var nextSlideDirection = (this.currentSlideId < slideId) ? 'future' : 'past';
    var prevSlideDirection = nextSlideDirection === 'past' ? 'future' : 'past';
    this.currentSlideId = slideId;
    this.loadImageSlides();
    var $prevSlide = this.$currentSlide;
    var $nextSlide = (this.imageSlideHolders[slideId]);
    if (!this.dragging) {
      this.prepareNextSlideForAnimation($nextSlide, nextSlideDirection);
    }
    setTimeout(function() {
      $nextSlide.removeClass('h5p-image-slider-no-transition');
      $prevSlide.removeClass('h5p-image-slider-current')
        .addClass('h5p-image-slider-removing')
        .removeClass('h5p-image-slider-' + nextSlideDirection)
        .addClass('h5p-image-slider-' + prevSlideDirection)
        .attr('aria-hidden', true);
      $nextSlide.removeClass('h5p-image-slider-past')
        .removeClass('h5p-image-slider-future')
        .addClass('h5p-image-slider-current')
        .removeAttr('aria-hidden');
    }, 1);

    this.$currentSlide = $nextSlide;

    this.announceCurrentSlide();
    this.updateNavButtons();
    this.updateProgressBar();
    return true;
  };

  /**
   * Position the next slide correctly so that it is ready to be aimated in
   *
   * @param {jQuery} $nextSlide the slide to be prepared
   * @param {String} direction prev or next
   */
  C.prototype.prepareNextSlideForAnimation = function($nextSlide, direction) {
    $nextSlide.removeClass('h5p-image-slider-past')
      .removeClass('h5p-image-slider-future')
      .addClass('h5p-image-slider-no-transition')
      .addClass('h5p-image-slider-' + direction);
  };

  /**
   * Updates all navigation buttons, typically toggling and positioning
   */
  C.prototype.updateNavButtons = function() {
    if (this.currentSlideId >= this.imageSlides.length - 1) {
      this.$rightButton.hide();
    }
    else {
      this.$rightButton.show();
    }
    if (this.currentSlideId <= 0) {
      this.$leftButton.hide();
    }
    else {
      this.$leftButton.show();
    }
    var heightInPercent = 100;
    var fullScreenOn = this.$container.hasClass('h5p-fullscreen') || this.$container.hasClass('h5p-semi-fullscreen');
    if (!fullScreenOn) {
      heightInPercent = this.$currentSlide.height() / this.$slides.height() * 100;
    }
    this.$leftButton.css('height', heightInPercent + '%');
    this.$rightButton.css('height', heightInPercent + '%');
  };

  /**
   * Update the progress bar
   *
   * Highlights the element in the progress bar corresponding to the current slide
   * and reposition the progress bar
   */
  C.prototype.updateProgressBar = function () {
    const oldProgressElement = $('.h5p-image-slider-current-progress-element', this.$container).removeClass('h5p-image-slider-current-progress-element');
    const newProgressElement = $('.h5p-image-slider-progress-element', this.$container).eq(this.currentSlideId).addClass('h5p-image-slider-current-progress-element');

    if (oldProgressElement.children('.h5p-image-slider-progress-button').is(':focus')) {
      newProgressElement.children('.h5p-image-slider-progress-button').focus();
    }

    oldProgressElement.children('.h5p-image-slider-progress-button').attr('aria-current', 'false');
    newProgressElement.children('.h5p-image-slider-progress-button').attr('aria-current', 'true');

    var heightInPercent = this.$currentSlide.height() / this.$slides.height() * 100;
    $('.h5p-image-slider-progress', this.$container).css('top', heightInPercent + '%');
  };

  /**
   * Make a slide draggable
   */
  C.prototype.initDragging = function () {
    var self = this;
    this.$slidesHolder.on('touchstart', function(event) {
      self.dragging = true;
      self.dragStartX = event.originalEvent.touches[0].pageX;
      self.$currentSlide.addClass('h5p-image-slider-dragging');
      if (self.isButton(event.target)) {
        event.preventDefault();
        event.stopPropagation();
        var d = new Date();
        self.dragStartTime = d.getTime();
      }
    });

    this.$slidesHolder.on('touchmove', function(event) {
      event.preventDefault();
      self.dragActionUpdate(event.originalEvent.touches[0].pageX);
    });

    this.$slidesHolder.on('touchend', function(event) {
      self.finishDragAction();
      if (self.dragStartTime !== false && self.isButton(event.target)) {
        // This was possibly a click
        var d = new Date();
        if (d.getTime() - self.dragStartTime < 300) {
          if (self.isRightButton(event.target)) {
            self.gotoSlide(self.currentSlideId + 1);
          }
          else {
            self.gotoSlide(self.currentSlideId - 1);
          }
        }
      }
      self.dragStartTime = false;
    });

    this.$slidesHolder.on('touchcancel', function() {
      self.finishDragAction();
      self.dragStartTime = false;
    });
  };

  /**
   * Initialize key press events.
   *
   * @returns {undefined} Nothing.
   */
  C.prototype.initKeyEvents = function () {
    if (this.keydown !== undefined) {
      return;
    }

    var self = this;

    this.keydown = function (event) {
      // Left
      if (event.which === 37) {
        self.gotoSlide(self.currentSlideId - 1);
      }

      // Right
      else if (event.which === 39) {
        self.gotoSlide(self.currentSlideId + 1);
      }
    };
    H5P.jQuery('body').keydown(this.keydown);
  };

  /**
   * Is the domElement a button?
   *
   * @param {DOMElement} domElement the element to be checked
   * @return {Boolean} whether or not the element is a button
   */
  C.prototype.isButton = function (domElement) {
    var $target = $(domElement);
    return $target.hasClass('h5p-image-slider-button-background')
      || $target.hasClass('h5p-image-slider-button-text')
      || $target.hasClass('h5p-image-slider-button');
  };

  /**
   * Is the element the right/next button?
   *
   * @param {DOMElement} domElement the DOM element to be checked
   * @return {Boolean} Whether or not the element is the right button
   */
  C.prototype.isRightButton = function (domElement) {
    var $target = $(domElement);
    return $target.hasClass('h5p-image-slider-right-button')
      || $target.parent().hasClass('h5p-image-slider-right-button');
  };

  /**
   * Update the current and next slide in response to a drag action
   */
  C.prototype.dragActionUpdate = function(x) {
    this.dragXMovement = x - this.dragStartX;
    this.$currentSlide.css('transform', 'translateX(' + this.dragXMovement + 'px)');
    if (this.currentSlideId > 0) {
      var $prevSlide = this.imageSlideHolders[this.currentSlideId - 1].addClass('h5p-image-slider-dragging');
      if (this.dragXMovement < 0) {
        $prevSlide.css('transform', 'translateX(-100.001%)');
      }
      else {
        $prevSlide.css('transform', 'translateX(' + (this.dragXMovement - $prevSlide.width()) + 'px)');
      }
    }
    if (this.currentSlideId < this.imageSlideHolders.length - 1) {
      var $nextSlide = this.imageSlideHolders[this.currentSlideId + 1].addClass('h5p-image-slider-dragging');
      if (this.dragXMovement > 0) {
        $nextSlide.css('transform', 'translateX(100.001%)');
      }
      else {
        $nextSlide.css('transform', 'translateX(' +(this.dragXMovement + $nextSlide.width()) + 'px)');
      }
    }
  };

  /**
   * Actions to be done when a drag action is finished
   *
   * Will either go back to the current slide or finish the transition to the next slide
   */
  C.prototype.finishDragAction = function() {
    $('.h5p-image-slider-dragging', this.$container).removeClass('h5p-image-slider-dragging').each(function() {
      this.style.removeProperty('transform');
    });
    this.dragStartX = undefined;
    var xInPercent = this.dragXMovement / this.$currentSlide.width();
    if (xInPercent < -0.3) {
      if (this.currentSlideId < this.imageSlideHolders.length - 1) {
        this.gotoSlide(this.currentSlideId + 1);
      }
      else {
        this.$currentSlide.css('transform', 'translateX(0%)');
      }
    }
    else if (xInPercent > 0.3) {
      if (this.currentSlideId > 0) {
        this.gotoSlide(this.currentSlideId - 1);
      }
      else {
        this.$currentSlide.css('transform', 'translateX(0%)');
      }
    }
    this.dragging = false;
    this.dragXMovement = 0;
  };

  /**
   * Make a non-button element behave as a button. I.e handle enter and space
   * keydowns as click
   *
   * @param  {H5P.jQuery} $element The "button" element
   * @param  {Function} callback
   */
  C.handleButtonClick = function ($element, callback) {
    $element.click(function (event) {
      callback.call(this, event);
    });
    $element.keydown(function (event) {
      // 32 - space, 13 - enter
      if ([32, 13].indexOf(event.which) !== -1) {
        event.preventDefault();
        callback.call(this, event);
      }
    });
  };

  return C;
})(H5P.jQuery);
;var H5P = H5P || {};
/**
 * Transition contains helper function relevant for transitioning
 */
H5P.Transition = (function ($) {

  /**
   * @class
   * @namespace H5P
   */
  Transition = {};

  /**
   * @private
   */
  Transition.transitionEndEventNames = {
    'WebkitTransition': 'webkitTransitionEnd',
    'transition':       'transitionend',
    'MozTransition':    'transitionend',
    'OTransition':      'oTransitionEnd',
    'msTransition':     'MSTransitionEnd'
  };

  /**
   * @private
   */
  Transition.cache = [];

  /**
   * Get the vendor property name for an event
   *
   * @function H5P.Transition.getVendorPropertyName
   * @static
   * @private
   * @param  {string} prop Generic property name
   * @return {string}      Vendor specific property name
   */
  Transition.getVendorPropertyName = function (prop) {

    if (Transition.cache[prop] !== undefined) {
      return Transition.cache[prop];
    }

    var div = document.createElement('div');

    // Handle unprefixed versions (FF16+, for example)
    if (prop in div.style) {
      Transition.cache[prop] = prop;
    }
    else {
      var prefixes = ['Moz', 'Webkit', 'O', 'ms'];
      var prop_ = prop.charAt(0).toUpperCase() + prop.substr(1);

      if (prop in div.style) {
        Transition.cache[prop] = prop;
      }
      else {
        for (var i = 0; i < prefixes.length; ++i) {
          var vendorProp = prefixes[i] + prop_;
          if (vendorProp in div.style) {
            Transition.cache[prop] = vendorProp;
            break;
          }
        }
      }
    }

    return Transition.cache[prop];
  };

  /**
   * Get the name of the transition end event
   *
   * @static
   * @private
   * @return {string}  description
   */
  Transition.getTransitionEndEventName = function () {
    return Transition.transitionEndEventNames[Transition.getVendorPropertyName('transition')] || undefined;
  };

  /**
   * Helper function for listening on transition end events
   *
   * @function H5P.Transition.onTransitionEnd
   * @static
   * @param  {domElement} $element The element which is transitioned
   * @param  {function} callback The callback to be invoked when transition is finished
   * @param  {number} timeout  Timeout in milliseconds. Fallback if transition event is never fired
   */
  Transition.onTransitionEnd = function ($element, callback, timeout) {
    // Fallback on 1 second if transition event is not supported/triggered
    timeout = timeout || 1000;
    Transition.transitionEndEventName = Transition.transitionEndEventName || Transition.getTransitionEndEventName();
    var callbackCalled = false;

    var doCallback = function () {
      if (callbackCalled) {
        return;
      }
      $element.off(Transition.transitionEndEventName, callback);
      callbackCalled = true;
      clearTimeout(timer);
      callback();
    };

    var timer = setTimeout(function () {
      doCallback();
    }, timeout);

    $element.on(Transition.transitionEndEventName, function () {
      doCallback();
    });
  };

  /**
   * Wait for a transition - when finished, invokes next in line
   *
   * @private
   *
   * @param {Object[]}    transitions             Array of transitions
   * @param {H5P.jQuery}  transitions[].$element  Dom element transition is performed on
   * @param {number=}     transitions[].timeout   Timeout fallback if transition end never is triggered
   * @param {bool=}       transitions[].break     If true, sequence breaks after this transition
   * @param {number}      index                   The index for current transition
   */
  var runSequence = function (transitions, index) {
    if (index >= transitions.length) {
      return;
    }

    var transition = transitions[index];
    H5P.Transition.onTransitionEnd(transition.$element, function () {
      if (transition.end) {
        transition.end();
      }
      if (transition.break !== true) {
        runSequence(transitions, index+1);
      }
    }, transition.timeout || undefined);
  };

  /**
   * Run a sequence of transitions
   *
   * @function H5P.Transition.sequence
   * @static
   * @param {Object[]}    transitions             Array of transitions
   * @param {H5P.jQuery}  transitions[].$element  Dom element transition is performed on
   * @param {number=}     transitions[].timeout   Timeout fallback if transition end never is triggered
   * @param {bool=}       transitions[].break     If true, sequence breaks after this transition
   */
  Transition.sequence = function (transitions) {
    runSequence(transitions, 0);
  };

  return Transition;
})(H5P.jQuery);
;H5P.Column = (function (EventDispatcher) {

  /**
   * Column Constructor
   *
   * @class
   * @param {Object} params Describes task behavior
   * @param {number} id Content identifier
   * @param {Object} data User specific data to adapt behavior
   */
  function Column(params, id, data) {
    /** @alias H5P.Column# */
    var self = this;

    // We support events by extending this class
    EventDispatcher.call(self);

    // Add defaults
    params = params || {};
    if (params.useSeparators === undefined) {
      params.useSeparators = true;
    }

    // Fallback if column is empty
    if (params.content === undefined) {
      params.content = [];
    }

    this.contentData = data;

    // Column wrapper element
    var wrapper;

    // H5P content in the column
    var instances = [];
    var instanceContainers = [];

    // Number of tasks among instances
    var numTasks = 0;

    // Number of tasks that has been completed
    var numTasksCompleted = 0;

    // Keep track of result for each task
    var tasksResultEvent = [];

    // Keep track of last content's margin state
    var previousHasMargin;

    /**
     * Calculate score and trigger completed event.
     *
     * @private
     */
    var completed = function () {
      // Sum all scores
      var raw = 0;
      var max = 0;

      for (var i = 0; i < tasksResultEvent.length; i++) {
        var event = tasksResultEvent[i];
        raw += event.getScore();
        max += event.getMaxScore();
      }

      self.triggerXAPIScored(raw, max, 'completed');
    };

    /**
     * Generates an event handler for the given task index.
     *
     * @private
     * @param {number} taskIndex
     * @return {function} xAPI event handler
     */
    var trackScoring = function (taskIndex) {
      return function (event) {
        if (event.getScore() === null) {
          return; // Skip, not relevant
        }

        if (tasksResultEvent[taskIndex] === undefined) {
          // Update number of completed tasks
          numTasksCompleted++;
        }

        // Keep track of latest event with result
        tasksResultEvent[taskIndex] = event;

        // Track progress
        var progressed = self.createXAPIEventTemplate('progressed');
        progressed.data.statement.object.definition.extensions['http://id.tincanapi.com/extension/ending-point'] = taskIndex + 1;
        self.trigger(progressed);

        // Check to see if we're done
        if (numTasksCompleted === numTasks) {
          // Run this after the current event is sent
          setTimeout(function () {
            completed(); // Done
          }, 0);
        }
      };
    };

    /**
     * Creates a new ontent instance from the given content parameters and
     * then attaches it the wrapper. Sets up event listeners.
     *
     * @private
     * @param {Object} content Parameters
     * @param {Object} [contentData] Content Data
     */
    var addRunnable = function (content, contentData) {
      // Create container for content
      var container = document.createElement('div');
      container.classList.add('h5p-column-content');

      // Content overrides
      var library = content.library.split(' ')[0];
      if (library === 'H5P.Video') {
        // Prevent video from growing endlessly since height is unlimited.
        content.params.visuals.fit = false;
      }

      // Create content instance
      var instance = H5P.newRunnable(content, id, undefined, true, contentData);

      // Bubble resize events
      bubbleUp(instance, 'resize', self);

      // Keep track of all instances that are tasks
      const taskInstances = [];

      // Check if instance is a task
      if (Column.isTask(instance)) {
        // Tasks requires completion
        taskInstances.push(instance);
      }

      // For H5P.Row, we'll retrieve the actual task instances
      if (library === 'H5P.Row') {
        const rowColumns = instance.getInstances();

        // A row can have several columns
        for (const rowColumn of rowColumns) {

          // And each row column can have several content types,
          // some of which might be tasks
          const rowColumnInstances = rowColumn.getInstances();
          for (const rowColumnInstance of rowColumnInstances) {
            if (Column.isTask(rowColumnInstance)) {
              taskInstances.push(rowColumnInstance);
            }
          }
        }
      }

      for (const task of taskInstances) {
        task.on('xAPI', trackScoring(numTasks));
        numTasks++;
      }

      if (library === 'H5P.Image') {
        // Resize when images are loaded

        instance.on('loaded', function () {
          self.trigger('resize');
        });
      }

      // Keep track of all instances
      instances.push(instance);
      instanceContainers.push({
        hasAttached: false,
        container: container,
        instanceIndex: instances.length - 1,
      });

      // Add to DOM wrapper
      wrapper.appendChild(container);
    };

    /**
     * Help get data for content at given index
     *
     * @private
     * @param {number} index
     * @returns {Object} Data object with previous state
     */
    var grabContentData = function (index) {
      var contentData = {
        parent: self
      };

      if (data.previousState && data.previousState.instances && data.previousState.instances[index]) {
        contentData.previousState = data.previousState.instances[index];
      }

      return contentData;
    };

    /**
     * Adds separator before the next content.
     *
     * @private
     * @param {string} libraryName Name of the next content type
     * @param {string} useSeparator
     */
    var addSeparator = function (libraryName, useSeparator, content) {
      // Determine separator spacing
      var thisHasMargin = (hasMargins.indexOf(libraryName) !== -1);

      if (libraryName === 'H5P.Row') {
        let lastContent = null;
        let contentCount = content.params?.columns?.reduce((count, column) => {
          const contents = column.content?.params?.content;
          count += contents?.length ?? 0;
          if (contents?.length > 0) {
            lastContent = column.content.params.content[contents.length-1];
          }
          return count;
        }, 0);

        // To avoid messy margin computation, separator setting should be disabled when there is more
        // than a single content inside a row. We also don't want a separator if we don't have any content
        if (useSeparator === 'auto' && (contentCount > 1 || contentCount === 0)) {
          useSeparator = 'disabled';
        } else if (contentCount > 0) {
          // If we only have one content, we want to follow the same procedure as if that content was
          // not wrapped on Row and RowColumn. 
          addSeparator(lastContent.library.split(' ')[0], useSeparator ?? 'auto');
          return;
        } else {
          // No separator.
          return;
        }
      }

      // Only add if previous content exists
      if (previousHasMargin !== undefined) {

        // Create separator element
        let separator = document.createElement('div');

        // If no margins, check for top margin only
        if (!thisHasMargin && (hasTopMargins.indexOf(libraryName) === -1)) {
          if (!previousHasMargin) {
            // None of them have margin

            // Only add separator if forced
            if (useSeparator === 'enabled') {
              // Add ruler
              separator.classList.add('h5p-column-ruler');

              // Add space both before and after the ruler
              separator.classList.add('h5p-column-space-before-n-after');
            }
            else {
              // Default is to separte using a single space, no ruler
              separator.classList.add('h5p-column-space-before');
            }
          }
          else {
            // We don't have any margin but the previous content does

            // Only add separator if forced
            if (useSeparator === 'enabled') {
              // Add ruler
              separator.classList.add('h5p-column-ruler');

              // Add space after the ruler
              separator.classList.add('h5p-column-space-after');
            }
          }
        }
        else if (!previousHasMargin) {
          // We have margin but not the previous content doesn't

          // Only add separator if forced
          if (useSeparator === 'enabled') {
            // Add ruler
            separator.classList.add('h5p-column-ruler');

            // Add space after the ruler
            separator.classList.add('h5p-column-space-before');
          }
        }
        else {
          // Both already have margin

          if (useSeparator !== 'disabled') {
            // Default is to add ruler unless its disabled
            separator.classList.add('h5p-column-ruler');
          }
        }

        // Insert into DOM
        wrapper.appendChild(separator);
      }

      // Keep track of spacing for next separator
      previousHasMargin = thisHasMargin || (hasBottomMargins.indexOf(libraryName) !== -1);
    };

    /**
     * Creates a wrapper and the column content the first time the column
     * is attached to the DOM.
     *
     * @private
     */
    var createHTML = function () {
      // Create wrapper
      wrapper = document.createElement('div');

      // Go though all contents
      for (var i = 0; i < params.content.length; i++) {
        var content = params.content[i];

        // In case the author has created an element without selecting any
        // library
        if (content.content === undefined) {
          continue;
        }

        if (params.useSeparators) { // (check for global override)

          // Add separator between contents
          addSeparator(content.content.library.split(' ')[0], content.useSeparator, content.content);
        }

        // Add content
        addRunnable(content.content, grabContentData(i));
      }
    };

    /**
     * Attach the column to the given container
     *
     * @param {H5P.jQuery} $container
     */
    self.attach = function ($container) {
      if (wrapper === undefined) {
        // Create wrapper and content
        createHTML();
      }

      // Attach instances that have not been attached
      instanceContainers.filter(function (container) { return !container.hasAttached })
        .forEach(function (container) {
          instances[container.instanceIndex]
            .attach(H5P.jQuery(container.container));

          // Remove any fullscreen buttons
          disableFullscreen(instances[container.instanceIndex]);
        });


      // Add to DOM
      $container.addClass('h5p-column').html('').append(wrapper);
    };

    /**
     * Create object containing information about the current state
     * of this content.
     *
     * @return {Object}
     */
    self.getCurrentState = function () {
      // Get previous state object or create new state object
      var state = (data.previousState ? data.previousState : {});
      if (!state.instances) {
        state.instances = [];
      }

      // Grab the current state for each instance
      for (var i = 0; i < instances.length; i++) {
        var instance = instances[i];

        if (instance.getCurrentState instanceof Function ||
            typeof instance.getCurrentState === 'function') {

          state.instances[i] = instance.getCurrentState();
        }
      }

      // Done
      return state;
    };

    /**
     * Get xAPI data.
     * Contract used by report rendering engine.
     *
     * @see contract at {@link https://h5p.org/documentation/developers/contracts#guides-header-6}
     */
    self.getXAPIData = function () {
      var xAPIEvent = self.createXAPIEventTemplate('answered');
      addQuestionToXAPI(xAPIEvent);
      xAPIEvent.setScoredResult(self.getScore(),
        self.getMaxScore(),
        self,
        true,
        self.getScore() === self.getMaxScore()
      );
      return {
        statement: xAPIEvent.data.statement,
        children: getXAPIDataFromChildren(instances)
      };
    };

    /**
     * Get score for all children
     * Contract used for getting the complete score of task.
     *
     * @return {number} Score for questions
     */
    self.getScore = function () {
      return instances.reduce(function (prev, instance) {
        return prev + (instance.getScore ? instance.getScore() : 0);
      }, 0);
    };

    /**
     * Get maximum score possible for all children instances
     * Contract.
     *
     * @return {number} Maximum score for questions
     */
    self.getMaxScore = function () {
      return instances.reduce(function (prev, instance) {
        return prev + (instance.getMaxScore ? instance.getMaxScore() : 0);
      }, 0);
    };

    /**
     * Get answer given
     * Contract.
     *
     * @return {boolean} True, if all answers have been given.
     */
    self.getAnswerGiven = function () {
      return instances.reduce(function (prev, instance) {
        return prev && (instance.getAnswerGiven ? instance.getAnswerGiven() : prev);
      }, true);
    };

    /**
     * Show solutions.
     * Contract.
     */
    self.showSolutions = function () {
      instances.forEach(function (instance) {
        if (instance.toggleReadSpeaker) {
          instance.toggleReadSpeaker(true);
        }
        if (instance.showSolutions) {
          instance.showSolutions();
        }
        if (instance.toggleReadSpeaker) {
          instance.toggleReadSpeaker(false);
        }
      });
    };

    /**
     * Reset task.
     * Contract.
     */
    self.resetTask = function () {
      instances.forEach(function (instance) {
        if (instance.resetTask) {
          instance.resetTask();
        }
      });
    };

    /**
     * Get instances for all children
     * TODO: This is not a good interface, we should provide handling needed
     * handling of the tasks instead of repeating them for each parent...
     *
     * @return {Object[]} array of instances
     */
    self.getInstances = function () {
      return instances;
    };

    /**
     * Get title, e.g. for xAPI when Column is subcontent.
     *
     * @return {string} Title.
     */
    self.getTitle = function () {
      return H5P.createTitle((self.contentData && self.contentData.metadata && self.contentData.metadata.title) ? self.contentData.metadata.title : 'Column');
    };

    /**
     * Add the question itself to the definition part of an xAPIEvent
     */
    var addQuestionToXAPI = function (xAPIEvent) {
      var definition = xAPIEvent.getVerifiedStatementValue(['object', 'definition']);
      H5P.jQuery.extend(definition, getxAPIDefinition());
    };

    /**
     * Generate xAPI object definition used in xAPI statements.
     * @return {Object}
     */
    var getxAPIDefinition = function () {
      var definition = {};

      definition.interactionType = 'compound';
      definition.type = 'http://adlnet.gov/expapi/activities/cmi.interaction';
      definition.description = {
        'en-US': ''
      };

      return definition;
    };

    /**
     * Get xAPI data from sub content types
     *
     * @param {Array} of H5P instances
     * @returns {Array} of xAPI data objects used to build a report
     */
    var getXAPIDataFromChildren = function (children) {
      let childData = [];

      children.forEach(child => {
        if (child.libraryInfo.machineName === 'H5P.Row') {
          childData.push(...child.getXAPIDataFromChildren());
        }
        else if (typeof child.getXAPIData == 'function') {
          childData.push(child.getXAPIData());
        }
      });

      return childData.filter(function (data) {
        return !!data;
      });
    };

    // Resize children to fit inside parent
    bubbleDown(self, 'resize', instances);

    if (wrapper === undefined) {
      // Create wrapper and content
      createHTML();
    }

    self.setActivityStarted();
  }

  Column.prototype = Object.create(EventDispatcher.prototype);
  Column.prototype.constructor = Column;

  /**
   * Makes it easy to bubble events from parent to children
   *
   * @private
   * @param {Object} origin Origin of the Event
   * @param {string} eventName Name of the Event
   * @param {Array} targets Targets to trigger event on
   */
  function bubbleDown(origin, eventName, targets) {
    origin.on(eventName, function (event) {
      if (origin.bubblingUpwards) {
        return; // Prevent send event back down.
      }

      for (var i = 0; i < targets.length; i++) {
        targets[i].trigger(eventName, event);
      }
    });
  }

  /**
   * Makes it easy to bubble events from child to parent
   *
   * @private
   * @param {Object} origin Origin of the Event
   * @param {string} eventName Name of the Event
   * @param {Object} target Target to trigger event on
   */
  function bubbleUp(origin, eventName, target) {
    origin.on(eventName, function (event) {
      // Prevent target from sending event back down
      target.bubblingUpwards = true;

      // Trigger event
      target.trigger(eventName, event);

      // Reset
      target.bubblingUpwards = false;
    });
  }

  /**
   * Definition of which content types are tasks
   */
  var isTasks = [
    'H5P.ImageHotspotQuestion',
    'H5P.Blanks',
    'H5P.Essay',
    'H5P.SingleChoiceSet',
    'H5P.MultiChoice',
    'H5P.TrueFalse',
    'H5P.DragQuestion',
    'H5P.Summary',
    'H5P.DragText',
    'H5P.MarkTheWords',
    'H5P.MemoryGame',
    'H5P.QuestionSet',
    'H5P.InteractiveVideo',
    'H5P.CoursePresentation',
    'H5P.DocumentationTool',
    'H5P.MultiMediaChoice'
  ];

  /**
   * Check if the given content instance is a task (will give a score)
   *
   * @param {Object} instance
   * @return {boolean}
   */
  Column.isTask = function (instance) {
    if (instance.isTask !== undefined) {
      return instance.isTask; // Content will determine self if it's a task
    }

    // Go through the valid task names
    for (var i = 0; i < isTasks.length; i++) {
      // Check against library info. (instanceof is broken in H5P.newRunnable)
      if (instance.libraryInfo.machineName === isTasks[i]) {
        return true;
      }
    }

    return false;
  }

  /**
   * Definition of which content type have margins
   */
  var hasMargins = [
    'H5P.AdvancedText',
    'H5P.AudioRecorder',
    'H5P.Essay',
    'H5P.Link',
    'H5P.Accordion',
    'H5P.Table',
    'H5P.GuessTheAnswer',
    'H5P.Blanks',
    'H5P.MultiChoice',
    'H5P.TrueFalse',
    'H5P.DragQuestion',
    'H5P.Summary',
    'H5P.DragText',
    'H5P.MarkTheWords',
    'H5P.ImageHotspotQuestion',
    'H5P.MemoryGame',
    'H5P.Dialogcards',
    'H5P.QuestionSet',
    'H5P.DocumentationTool'
  ];

  /**
   * Definition of which content type have top margins
   */
  var hasTopMargins = [
    'H5P.SingleChoiceSet'
  ];

  /**
   * Definition of which content type have bottom margins
   */
  var hasBottomMargins = [
    'H5P.CoursePresentation',
    'H5P.Dialogcards',
    'H5P.GuessTheAnswer',
    'H5P.ImageSlider'
  ];

  /**
   * Remove custom fullscreen buttons from sub content.
   * (A bit of a hack, there should have been some sort of override…)
   *
   * @param {Object} instance
   */
  function disableFullscreen(instance) {
    switch (instance.libraryInfo.machineName) {
      case 'H5P.CoursePresentation':
        if (instance.$fullScreenButton) {
          instance.$fullScreenButton.remove();
        }
        break;

      case 'H5P.InteractiveVideo':
        instance.on('controls', function () {
          if (instance.controls.$fullscreen) {
            instance.controls.$fullscreen.remove();
          }
        });
        break;
    }
  }

  return Column;
})(H5P.EventDispatcher);
;(()=>{var e={2:(e,t,n)=>{"use strict";function r(e,t){const n=Object.create(null),r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}n.d(t,{A:()=>ts});const o=r("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function i(e){return!!e||""===e}function s(e){if(A(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=k(r)?l(r):s(r);if(o)for(const e in o)t[e]=o[e]}return t}return k(e)||P(e)?e:void 0}const a=/;(?![^(]*\))/g,c=/:(.+)/;function l(e){const t={};return e.split(a).forEach((e=>{if(e){const n=e.split(c);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function u(e){let t="";if(k(e))t=e;else if(A(e))for(let n=0;n<e.length;n++){const r=u(e[n]);r&&(t+=r+" ")}else if(P(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const p=e=>k(e)?e:null==e?"":A(e)||P(e)&&(e.toString===N||!C(e.toString))?JSON.stringify(e,f,2):String(e),f=(e,t)=>t&&t.__v_isRef?f(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:x(t)?{[`Set(${t.size})`]:[...t.values()]}:!P(t)||A(t)||I(t)?t:String(t),d={},h=[],y=()=>{},m=()=>!1,g=/^on[^a-z]/,v=e=>g.test(e),b=e=>e.startsWith("onUpdate:"),_=Object.assign,w=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},S=Object.prototype.hasOwnProperty,O=(e,t)=>S.call(e,t),A=Array.isArray,E=e=>"[object Map]"===T(e),x=e=>"[object Set]"===T(e),C=e=>"function"==typeof e,k=e=>"string"==typeof e,j=e=>"symbol"==typeof e,P=e=>null!==e&&"object"==typeof e,M=e=>P(e)&&C(e.then)&&C(e.catch),N=Object.prototype.toString,T=e=>N.call(e),L=e=>T(e).slice(8,-1),I=e=>"[object Object]"===T(e),D=e=>k(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,R=r(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},F=/-(\w)/g,B=U((e=>e.replace(F,((e,t)=>t?t.toUpperCase():"")))),z=/\B([A-Z])/g,V=U((e=>e.replace(z,"-$1").toLowerCase())),G=U((e=>e.charAt(0).toUpperCase()+e.slice(1))),W=U((e=>e?`on${G(e)}`:"")),$=(e,t)=>!Object.is(e,t),H=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},X=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},q=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let K;const Z=()=>K||(K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});let J;class Q{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&J&&(this.parent=J,this.index=(J.scopes||(J.scopes=[])).push(this)-1)}run(e){if(this.active){const t=J;try{return J=this,e()}finally{J=t}}}on(){J=this}off(){J=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}const Y=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ee=e=>(e.w&oe)>0,te=e=>(e.n&oe)>0,ne=new WeakMap;let re=0,oe=1;const ie=30;let se;const ae=Symbol(""),ce=Symbol("");class le{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,function(e,t=J){t&&t.active&&t.effects.push(e)}(this,n)}run(){if(!this.active)return this.fn();let e=se,t=pe;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=se,se=this,pe=!0,oe=1<<++re,re<=ie?(({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=oe})(this):ue(this),this.fn()}finally{re<=ie&&(e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const o=t[r];ee(o)&&!te(o)?o.delete(e):t[n++]=o,o.w&=~oe,o.n&=~oe}t.length=n}})(this),oe=1<<--re,se=this.parent,pe=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){se===this?this.deferStop=!0:this.active&&(ue(this),this.onStop&&this.onStop(),this.active=!1)}}function ue(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let pe=!0;const fe=[];function de(){fe.push(pe),pe=!1}function he(){const e=fe.pop();pe=void 0===e||e}function ye(e,t,n){if(pe&&se){let t=ne.get(e);t||ne.set(e,t=new Map);let r=t.get(n);r||t.set(n,r=Y()),me(r)}}function me(e,t){let n=!1;re<=ie?te(e)||(e.n|=oe,n=!ee(e)):n=!e.has(se),n&&(e.add(se),se.deps.push(e))}function ge(e,t,n,r,o,i){const s=ne.get(e);if(!s)return;let a=[];if("clear"===t)a=[...s.values()];else if("length"===n&&A(e))s.forEach(((e,t)=>{("length"===t||t>=r)&&a.push(e)}));else switch(void 0!==n&&a.push(s.get(n)),t){case"add":A(e)?D(n)&&a.push(s.get("length")):(a.push(s.get(ae)),E(e)&&a.push(s.get(ce)));break;case"delete":A(e)||(a.push(s.get(ae)),E(e)&&a.push(s.get(ce)));break;case"set":E(e)&&a.push(s.get(ae))}if(1===a.length)a[0]&&ve(a[0]);else{const e=[];for(const t of a)t&&e.push(...t);ve(Y(e))}}function ve(e,t){const n=A(e)?e:[...e];for(const e of n)e.computed&&be(e);for(const e of n)e.computed||be(e)}function be(e,t){(e!==se||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const _e=r("__proto__,__v_isRef,__isVue"),we=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(j)),Se=Ce(),Oe=Ce(!1,!0),Ae=Ce(!0),Ee=xe();function xe(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=ut(this);for(let e=0,t=this.length;e<t;e++)ye(n,0,e+"");const r=n[t](...e);return-1===r||!1===r?n[t](...e.map(ut)):r}})),["push","pop","shift","unshift","splice"].forEach((t=>{e[t]=function(...e){de();const n=ut(this)[t].apply(this,e);return he(),n}})),e}function Ce(e=!1,t=!1){return function(n,r,o){if("__v_isReactive"===r)return!e;if("__v_isReadonly"===r)return e;if("__v_isShallow"===r)return t;if("__v_raw"===r&&o===(e?t?nt:tt:t?et:Ye).get(n))return n;const i=A(n);if(!e&&i&&O(Ee,r))return Reflect.get(Ee,r,o);const s=Reflect.get(n,r,o);return(j(r)?we.has(r):_e(r))?s:(e||ye(n,0,r),t?s:ht(s)?i&&D(r)?s:s.value:P(s)?e?ot(s):rt(s):s)}}function ke(e=!1){return function(t,n,r,o){let i=t[n];if(at(i)&&ht(i)&&!ht(r))return!1;if(!e&&!at(r)&&(ct(r)||(r=ut(r),i=ut(i)),!A(t)&&ht(i)&&!ht(r)))return i.value=r,!0;const s=A(t)&&D(n)?Number(n)<t.length:O(t,n),a=Reflect.set(t,n,r,o);return t===ut(o)&&(s?$(r,i)&&ge(t,"set",n,r):ge(t,"add",n,r)),a}}const je={get:Se,set:ke(),deleteProperty:function(e,t){const n=O(e,t),r=(e[t],Reflect.deleteProperty(e,t));return r&&n&&ge(e,"delete",t,void 0),r},has:function(e,t){const n=Reflect.has(e,t);return j(t)&&we.has(t)||ye(e,0,t),n},ownKeys:function(e){return ye(e,0,A(e)?"length":ae),Reflect.ownKeys(e)}},Pe={get:Ae,set:(e,t)=>!0,deleteProperty:(e,t)=>!0},Me=_({},je,{get:Oe,set:ke(!0)}),Ne=e=>e,Te=e=>Reflect.getPrototypeOf(e);function Le(e,t,n=!1,r=!1){const o=ut(e=e.__v_raw),i=ut(t);n||(t!==i&&ye(o,0,t),ye(o,0,i));const{has:s}=Te(o),a=r?Ne:n?dt:ft;return s.call(o,t)?a(e.get(t)):s.call(o,i)?a(e.get(i)):void(e!==o&&e.get(t))}function Ie(e,t=!1){const n=this.__v_raw,r=ut(n),o=ut(e);return t||(e!==o&&ye(r,0,e),ye(r,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function De(e,t=!1){return e=e.__v_raw,!t&&ye(ut(e),0,ae),Reflect.get(e,"size",e)}function Re(e){e=ut(e);const t=ut(this);return Te(t).has.call(t,e)||(t.add(e),ge(t,"add",e,e)),this}function Ue(e,t){t=ut(t);const n=ut(this),{has:r,get:o}=Te(n);let i=r.call(n,e);i||(e=ut(e),i=r.call(n,e));const s=o.call(n,e);return n.set(e,t),i?$(t,s)&&ge(n,"set",e,t):ge(n,"add",e,t),this}function Fe(e){const t=ut(this),{has:n,get:r}=Te(t);let o=n.call(t,e);o||(e=ut(e),o=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return o&&ge(t,"delete",e,void 0),i}function Be(){const e=ut(this),t=0!==e.size,n=e.clear();return t&&ge(e,"clear",void 0,void 0),n}function ze(e,t){return function(n,r){const o=this,i=o.__v_raw,s=ut(i),a=t?Ne:e?dt:ft;return!e&&ye(s,0,ae),i.forEach(((e,t)=>n.call(r,a(e),a(t),o)))}}function Ve(e,t,n){return function(...r){const o=this.__v_raw,i=ut(o),s=E(i),a="entries"===e||e===Symbol.iterator&&s,c="keys"===e&&s,l=o[e](...r),u=n?Ne:t?dt:ft;return!t&&ye(i,0,c?ce:ae),{next(){const{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Ge(e){return function(...t){return"delete"!==e&&this}}function We(){const e={get(e){return Le(this,e)},get size(){return De(this)},has:Ie,add:Re,set:Ue,delete:Fe,clear:Be,forEach:ze(!1,!1)},t={get(e){return Le(this,e,!1,!0)},get size(){return De(this)},has:Ie,add:Re,set:Ue,delete:Fe,clear:Be,forEach:ze(!1,!0)},n={get(e){return Le(this,e,!0)},get size(){return De(this,!0)},has(e){return Ie.call(this,e,!0)},add:Ge("add"),set:Ge("set"),delete:Ge("delete"),clear:Ge("clear"),forEach:ze(!0,!1)},r={get(e){return Le(this,e,!0,!0)},get size(){return De(this,!0)},has(e){return Ie.call(this,e,!0)},add:Ge("add"),set:Ge("set"),delete:Ge("delete"),clear:Ge("clear"),forEach:ze(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=Ve(o,!1,!1),n[o]=Ve(o,!0,!1),t[o]=Ve(o,!1,!0),r[o]=Ve(o,!0,!0)})),[e,n,t,r]}const[$e,He,Xe,qe]=We();function Ke(e,t){const n=t?e?qe:Xe:e?He:$e;return(t,r,o)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(O(n,r)&&r in t?n:t,r,o)}const Ze={get:Ke(!1,!1)},Je={get:Ke(!1,!0)},Qe={get:Ke(!0,!1)},Ye=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap;function rt(e){return at(e)?e:it(e,!1,je,Ze,Ye)}function ot(e){return it(e,!0,Pe,Qe,tt)}function it(e,t,n,r,o){if(!P(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=o.get(e);if(i)return i;const s=(a=e).__v_skip||!Object.isExtensible(a)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(L(a));var a;if(0===s)return e;const c=new Proxy(e,2===s?r:n);return o.set(e,c),c}function st(e){return at(e)?st(e.__v_raw):!(!e||!e.__v_isReactive)}function at(e){return!(!e||!e.__v_isReadonly)}function ct(e){return!(!e||!e.__v_isShallow)}function lt(e){return st(e)||at(e)}function ut(e){const t=e&&e.__v_raw;return t?ut(t):e}function pt(e){return X(e,"__v_skip",!0),e}const ft=e=>P(e)?rt(e):e,dt=e=>P(e)?ot(e):e;function ht(e){return!(!e||!0!==e.__v_isRef)}const yt={get:(e,t,n)=>{return ht(r=Reflect.get(e,t,n))?r.value:r;var r},set:(e,t,n,r)=>{const o=e[t];return ht(o)&&!ht(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function mt(e){return st(e)?e:new Proxy(e,yt)}class gt{constructor(e,t,n,r){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new le(e,(()=>{var e;this._dirty||(this._dirty=!0,(e=ut(e=this)).dep&&ve(e.dep))})),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=ut(this);return t=e,pe&&se&&me((t=ut(t)).dep||(t.dep=Y())),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value;var t}set value(e){this._setter(e)}}function vt(e,t,n,r){let o;try{o=r?e(...r):e()}catch(e){_t(e,t,n)}return o}function bt(e,t,n,r){if(C(e)){const o=vt(e,t,n,r);return o&&M(o)&&o.catch((e=>{_t(e,t,n)})),o}const o=[];for(let i=0;i<e.length;i++)o.push(bt(e[i],t,n,r));return o}function _t(e,t,n,r=!0){if(t&&t.vnode,t){let r=t.parent;const o=t.proxy,i=n;for(;r;){const t=r.ec;if(t)for(let n=0;n<t.length;n++)if(!1===t[n](e,o,i))return;r=r.parent}const s=t.appContext.config.errorHandler;if(s)return void vt(s,null,10,[e,o,i])}!function(e){console.error(e)}(e)}let wt=!1,St=!1;const Ot=[];let At=0;const Et=[];let xt=null,Ct=0;const kt=[];let jt=null,Pt=0;const Mt=Promise.resolve();let Nt=null,Tt=null;function Lt(e){const t=Nt||Mt;return e?t.then(this?e.bind(this):e):t}function It(e){Ot.length&&Ot.includes(e,wt&&e.allowRecurse?At+1:At)||e===Tt||(null==e.id?Ot.push(e):Ot.splice(function(e){let t=At+1,n=Ot.length;for(;t<n;){const r=t+n>>>1;Bt(Ot[r])<e?t=r+1:n=r}return t}(e.id),0,e),Dt())}function Dt(){wt||St||(St=!0,Nt=Mt.then(zt))}function Rt(e,t,n,r){A(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?r+1:r)||n.push(e),Dt()}function Ut(e,t=null){if(Et.length){for(Tt=t,xt=[...new Set(Et)],Et.length=0,Ct=0;Ct<xt.length;Ct++)xt[Ct]();xt=null,Ct=0,Tt=null,Ut(e,t)}}function Ft(e){if(Ut(),kt.length){const e=[...new Set(kt)];if(kt.length=0,jt)return void jt.push(...e);for(jt=e,jt.sort(((e,t)=>Bt(e)-Bt(t))),Pt=0;Pt<jt.length;Pt++)jt[Pt]();jt=null,Pt=0}}const Bt=e=>null==e.id?1/0:e.id;function zt(e){St=!1,wt=!0,Ut(e),Ot.sort(((e,t)=>Bt(e)-Bt(t)));try{for(At=0;At<Ot.length;At++){const e=Ot[At];e&&!1!==e.active&&vt(e,null,14)}}finally{At=0,Ot.length=0,Ft(),wt=!1,Nt=null,(Ot.length||Et.length||kt.length)&&zt(e)}}new Set,new Map;let Vt,Gt=[],Wt=!1;function $t(e,...t){Vt?Vt.emit(e,...t):Wt||Gt.push({event:e,args:t})}function Ht(e,t){var n,r;Vt=e,Vt?(Vt.enabled=!0,Gt.forEach((({event:e,args:t})=>Vt.emit(e,...t))),Gt=[]):"undefined"!=typeof window&&window.HTMLElement&&!(null===(r=null===(n=window.navigator)||void 0===n?void 0:n.userAgent)||void 0===r?void 0:r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{Ht(e,t)})),setTimeout((()=>{Vt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Wt=!0,Gt=[])}),3e3)):(Wt=!0,Gt=[])}const Xt=Zt("component:added"),qt=Zt("component:updated"),Kt=Zt("component:removed");function Zt(e){return t=>{$t(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}function Jt(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||d;let o=n;const i=t.startsWith("update:"),s=i&&t.slice(7);if(s&&s in r){const e=`${"modelValue"===s?"model":s}Modifiers`,{number:t,trim:i}=r[e]||d;i&&(o=n.map((e=>e.trim()))),t&&(o=n.map(q))}let a;__VUE_PROD_DEVTOOLS__&&function(e,t,n){$t("component:emit",e.appContext.app,e,t,n)}(e,t,o);let c=r[a=W(t)]||r[a=W(B(t))];!c&&i&&(c=r[a=W(V(t))]),c&&bt(c,e,6,o);const l=r[a+"Once"];if(l){if(e.emitted){if(e.emitted[a])return}else e.emitted={};e.emitted[a]=!0,bt(l,e,6,o)}}function Qt(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(void 0!==o)return o;const i=e.emits;let s={},a=!1;if(__VUE_OPTIONS_API__&&!C(e)){const r=e=>{const n=Qt(e,t,!0);n&&(a=!0,_(s,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return i||a?(A(i)?i.forEach((e=>s[e]=null)):_(s,i),r.set(e,s),s):(r.set(e,null),null)}function Yt(e,t){return!(!e||!v(t))&&(t=t.slice(2).replace(/Once$/,""),O(e,t[0].toLowerCase()+t.slice(1))||O(e,V(t))||O(e,t))}let en=null,tn=null;function nn(e){const t=en;return en=e,tn=e&&e.type.__scopeId||null,t}function rn(e){const{type:t,vnode:n,proxy:r,withProxy:o,props:i,propsOptions:[s],slots:a,attrs:c,emit:l,render:u,renderCache:p,data:f,setupState:d,ctx:h,inheritAttrs:y}=e;let m,g;const v=nn(e);try{if(4&n.shapeFlag){const e=o||r;m=Kr(u.call(e,e,p,i,d,f,h)),g=c}else{const e=t;m=Kr(e.length>1?e(i,{attrs:c,slots:a,emit:l}):e(i,null)),g=t.props?c:on(c)}}catch(t){Mr.length=0,_t(t,e,1),m=$r(jr)}let _=m;if(g&&!1!==y){const e=Object.keys(g),{shapeFlag:t}=_;e.length&&7&t&&(s&&e.some(b)&&(g=sn(g,s)),_=Hr(_,g))}return n.dirs&&(_=Hr(_),_.dirs=_.dirs?_.dirs.concat(n.dirs):n.dirs),n.transition&&(_.transition=n.transition),m=_,nn(v),m}const on=e=>{let t;for(const n in e)("class"===n||"style"===n||v(n))&&((t||(t={}))[n]=e[n]);return t},sn=(e,t)=>{const n={};for(const r in e)b(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function an(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const i=r[o];if(t[i]!==e[i]&&!Yt(n,i))return!0}return!1}function cn(e,t,n=!1){const r=to||en;if(r){const o=null==r.parent?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&C(t)?t.call(r.proxy):t}}const ln={};function un(e,t,n){return pn(e,t,n)}function pn(e,t,{immediate:n,deep:r,flush:o,onTrack:i,onTrigger:s}=d){const a=to;let c,l,u=!1,p=!1;if(ht(e)?(c=()=>e.value,u=ct(e)):st(e)?(c=()=>e,r=!0):A(e)?(p=!0,u=e.some((e=>st(e)||ct(e))),c=()=>e.map((e=>ht(e)?e.value:st(e)?hn(e):C(e)?vt(e,a,2):void 0))):c=C(e)?t?()=>vt(e,a,2):()=>{if(!a||!a.isUnmounted)return l&&l(),bt(e,a,3,[f])}:y,t&&r){const e=c;c=()=>hn(e())}let f=e=>{l=v.onStop=()=>{vt(e,a,4)}};if(co)return f=y,t?n&&bt(t,a,3,[c(),p?[]:void 0,f]):c(),y;let h=p?[]:ln;const m=()=>{if(v.active)if(t){const e=v.run();(r||u||(p?e.some(((e,t)=>$(e,h[t]))):$(e,h)))&&(l&&l(),bt(t,a,3,[e,h===ln?void 0:h,f]),h=e)}else v.run()};let g;m.allowRecurse=!!t,g="sync"===o?m:"post"===o?()=>Or(m,a&&a.suspense):()=>function(e){Rt(e,xt,Et,Ct)}(m);const v=new le(c,g);return t?n?m():h=v.run():"post"===o?Or(v.run.bind(v),a&&a.suspense):v.run(),()=>{v.stop(),a&&a.scope&&w(a.scope.effects,v)}}function fn(e,t,n){const r=this.proxy,o=k(e)?e.includes(".")?dn(r,e):()=>r[e]:e.bind(r,r);let i;C(t)?i=t:(i=t.handler,n=t);const s=to;ro(this);const a=pn(o,i.bind(r),n);return s?ro(s):oo(),a}function dn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}function hn(e,t){if(!P(e)||e.__v_skip)return e;if((t=t||new Set).has(e))return e;if(t.add(e),ht(e))hn(e.value,t);else if(A(e))for(let n=0;n<e.length;n++)hn(e[n],t);else if(x(e)||E(e))e.forEach((e=>{hn(e,t)}));else if(I(e))for(const n in e)hn(e[n],t);return e}const yn=[Function,Array],mn={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:yn,onEnter:yn,onAfterEnter:yn,onEnterCancelled:yn,onBeforeLeave:yn,onLeave:yn,onAfterLeave:yn,onLeaveCancelled:yn,onBeforeAppear:yn,onAppear:yn,onAfterAppear:yn,onAppearCancelled:yn},setup(e,{slots:t}){const n=no(),r=function(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Nn((()=>{e.isMounted=!0})),In((()=>{e.isUnmounting=!0})),e}();let o;return()=>{const i=t.default&&Sn(t.default(),!0);if(!i||!i.length)return;let s=i[0];if(i.length>1){let e=!1;for(const t of i)if(t.type!==jr){s=t,e=!0;break}}const a=ut(e),{mode:c}=a;if(r.isLeaving)return bn(s);const l=_n(s);if(!l)return bn(s);const u=vn(l,a,r,n);wn(l,u);const p=n.subTree,f=p&&_n(p);let d=!1;const{getTransitionKey:h}=l.type;if(h){const e=h();void 0===o?o=e:e!==o&&(o=e,d=!0)}if(f&&f.type!==jr&&(!Br(l,f)||d)){const e=vn(f,a,r,n);if(wn(f,e),"out-in"===c)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.update()},bn(s);"in-out"===c&&l.type!==jr&&(e.delayLeave=(e,t,n)=>{gn(r,f)[String(f.key)]=f,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return s}}};function gn(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function vn(e,t,n,r){const{appear:o,mode:i,persisted:s=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:p,onLeave:f,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:y,onAppear:m,onAfterAppear:g,onAppearCancelled:v}=t,b=String(e.key),_=gn(n,e),w=(e,t)=>{e&&bt(e,r,9,t)},S=(e,t)=>{const n=t[1];w(e,t),A(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},O={mode:i,persisted:s,beforeEnter(t){let r=a;if(!n.isMounted){if(!o)return;r=y||a}t._leaveCb&&t._leaveCb(!0);const i=_[b];i&&Br(e,i)&&i.el._leaveCb&&i.el._leaveCb(),w(r,[t])},enter(e){let t=c,r=l,i=u;if(!n.isMounted){if(!o)return;t=m||c,r=g||l,i=v||u}let s=!1;const a=e._enterCb=t=>{s||(s=!0,w(t?i:r,[e]),O.delayedLeave&&O.delayedLeave(),e._enterCb=void 0)};t?S(t,[e,a]):a()},leave(t,r){const o=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return r();w(p,[t]);let i=!1;const s=t._leaveCb=n=>{i||(i=!0,r(),w(n?h:d,[t]),t._leaveCb=void 0,_[o]===e&&delete _[o])};_[o]=e,f?S(f,[t,s]):s()},clone:e=>vn(e,t,n,r)};return O}function bn(e){if(An(e))return(e=Hr(e)).children=null,e}function _n(e){return An(e)?e.children?e.children[0]:void 0:e}function wn(e,t){6&e.shapeFlag&&e.component?wn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Sn(e,t=!1,n){let r=[],o=0;for(let i=0;i<e.length;i++){let s=e[i];const a=null==n?s.key:String(n)+String(null!=s.key?s.key:i);s.type===Cr?(128&s.patchFlag&&o++,r=r.concat(Sn(s.children,t,a))):(t||s.type!==jr)&&r.push(null!=a?Hr(s,{key:a}):s)}if(o>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}const On=e=>!!e.type.__asyncLoader,An=e=>e.type.__isKeepAlive;function En(e,t){Cn(e,"a",t)}function xn(e,t){Cn(e,"da",t)}function Cn(e,t,n=to){const r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(jn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)An(e.parent.vnode)&&kn(r,t,n,e),e=e.parent}}function kn(e,t,n,r){const o=jn(t,e,r,!0);Dn((()=>{w(r[t],o)}),n)}function jn(e,t,n=to,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{if(n.isUnmounted)return;de(),ro(n);const o=bt(t,n,e,r);return oo(),he(),o});return r?o.unshift(i):o.push(i),i}}RegExp,RegExp;const Pn=e=>(t,n=to)=>(!co||"sp"===e)&&jn(e,t,n),Mn=Pn("bm"),Nn=Pn("m"),Tn=Pn("bu"),Ln=Pn("u"),In=Pn("bum"),Dn=Pn("um"),Rn=Pn("sp"),Un=Pn("rtg"),Fn=Pn("rtc");function Bn(e,t=to){jn("ec",e,t)}function zn(e,t,n,r){const o=e.dirs,i=t&&t.dirs;for(let s=0;s<o.length;s++){const a=o[s];i&&(a.oldValue=i[s].value);let c=a.dir[r];c&&(de(),bt(c,n,8,[e.el,a,e,t]),he())}}const Vn="components";function Gn(e,t){return function(e,t,n=!0,r=!1){const o=en||to;if(o){const n=o.type;if(e===Vn){const e=function(e,t=!0){return C(e)?e.displayName||e.name:e.name||t&&e.__name}(n,!1);if(e&&(e===t||e===B(t)||e===G(B(t))))return n}const i=$n(o[e]||n[e],t)||$n(o.appContext[e],t);return!i&&r?n:i}}(Vn,e,!0,t)||e}const Wn=Symbol();function $n(e,t){return e&&(e[t]||e[B(t)]||e[G(B(t))])}const Hn=e=>e?io(e)?po(e)||e.proxy:Hn(e.parent):null,Xn=_(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Hn(e.parent),$root:e=>Hn(e.root),$emit:e=>e.emit,$options:e=>__VUE_OPTIONS_API__?Qn(e):e.type,$forceUpdate:e=>e.f||(e.f=()=>It(e.update)),$nextTick:e=>e.n||(e.n=Lt.bind(e.proxy)),$watch:e=>__VUE_OPTIONS_API__?fn.bind(e):y}),qn={get({_:e},t){const{ctx:n,setupState:r,data:o,props:i,accessCache:s,type:a,appContext:c}=e;let l;if("$"!==t[0]){const a=s[t];if(void 0!==a)switch(a){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(r!==d&&O(r,t))return s[t]=1,r[t];if(o!==d&&O(o,t))return s[t]=2,o[t];if((l=e.propsOptions[0])&&O(l,t))return s[t]=3,i[t];if(n!==d&&O(n,t))return s[t]=4,n[t];__VUE_OPTIONS_API__&&!Kn||(s[t]=0)}}const u=Xn[t];let p,f;return u?("$attrs"===t&&ye(e,0,t),u(e)):(p=a.__cssModules)&&(p=p[t])?p:n!==d&&O(n,t)?(s[t]=4,n[t]):(f=c.config.globalProperties,O(f,t)?f[t]:void 0)},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return o!==d&&O(o,t)?(o[t]=n,!0):r!==d&&O(r,t)?(r[t]=n,!0):!(O(e.props,t)||"$"===t[0]&&t.slice(1)in e||(i[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:i}},s){let a;return!!n[s]||e!==d&&O(e,s)||t!==d&&O(t,s)||(a=i[0])&&O(a,s)||O(r,s)||O(Xn,s)||O(o.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:O(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let Kn=!0;function Zn(e,t,n){bt(A(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Jn(e,t,n,r){const o=r.includes(".")?dn(n,r):()=>n[r];if(k(e)){const n=t[e];C(n)&&un(o,n)}else if(C(e))un(o,e.bind(n));else if(P(e))if(A(e))e.forEach((e=>Jn(e,t,n,r)));else{const r=C(e.handler)?e.handler.bind(n):t[e.handler];C(r)&&un(o,r,e)}}function Qn(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let c;return a?c=a:o.length||n||r?(c={},o.length&&o.forEach((e=>Yn(c,e,s,!0))),Yn(c,t,s)):c=t,i.set(t,c),c}function Yn(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&Yn(e,i,n,!0),o&&o.forEach((t=>Yn(e,t,n,!0)));for(const o in t)if(r&&"expose"===o);else{const r=er[o]||n&&n[o];e[o]=r?r(e[o],t[o]):t[o]}return e}const er={data:tr,props:or,emits:or,methods:or,computed:or,beforeCreate:rr,created:rr,beforeMount:rr,mounted:rr,beforeUpdate:rr,updated:rr,beforeDestroy:rr,beforeUnmount:rr,destroyed:rr,unmounted:rr,activated:rr,deactivated:rr,errorCaptured:rr,serverPrefetch:rr,components:or,directives:or,watch:function(e,t){if(!e)return t;if(!t)return e;const n=_(Object.create(null),e);for(const r in t)n[r]=rr(e[r],t[r]);return n},provide:tr,inject:function(e,t){return or(nr(e),nr(t))}};function tr(e,t){return t?e?function(){return _(C(e)?e.call(this,this):e,C(t)?t.call(this,this):t)}:t:e}function nr(e){if(A(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function rr(e,t){return e?[...new Set([].concat(e,t))]:t}function or(e,t){return e?_(_(Object.create(null),e),t):t}function ir(e,t,n,r){const[o,i]=e.propsOptions;let s,a=!1;if(t)for(let c in t){if(R(c))continue;const l=t[c];let u;o&&O(o,u=B(c))?i&&i.includes(u)?(s||(s={}))[u]=l:n[u]=l:Yt(e.emitsOptions,c)||c in r&&l===r[c]||(r[c]=l,a=!0)}if(i){const t=ut(n),r=s||d;for(let s=0;s<i.length;s++){const a=i[s];n[a]=sr(o,t,a,r[a],e,!O(r,a))}}return a}function sr(e,t,n,r,o,i){const s=e[n];if(null!=s){const e=O(s,"default");if(e&&void 0===r){const e=s.default;if(s.type!==Function&&C(e)){const{propsDefaults:i}=o;n in i?r=i[n]:(ro(o),r=i[n]=e.call(null,t),oo())}else r=e}s[0]&&(i&&!e?r=!1:!s[1]||""!==r&&r!==V(n)||(r=!0))}return r}function ar(e,t,n=!1){const r=t.propsCache,o=r.get(e);if(o)return o;const i=e.props,s={},a=[];let c=!1;if(__VUE_OPTIONS_API__&&!C(e)){const r=e=>{c=!0;const[n,r]=ar(e,t,!0);_(s,n),r&&a.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!i&&!c)return r.set(e,h),h;if(A(i))for(let e=0;e<i.length;e++){const t=B(i[e]);cr(t)&&(s[t]=d)}else if(i)for(const e in i){const t=B(e);if(cr(t)){const n=i[e],r=s[t]=A(n)||C(n)?{type:n}:n;if(r){const e=pr(Boolean,r.type),n=pr(String,r.type);r[0]=e>-1,r[1]=n<0||e<n,(e>-1||O(r,"default"))&&a.push(t)}}}const l=[s,a];return r.set(e,l),l}function cr(e){return"$"!==e[0]}function lr(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:null===e?"null":""}function ur(e,t){return lr(e)===lr(t)}function pr(e,t){return A(t)?t.findIndex((t=>ur(t,e))):C(t)&&ur(t,e)?0:-1}const fr=e=>"_"===e[0]||"$stable"===e,dr=e=>A(e)?e.map(Kr):[Kr(e)],hr=(e,t,n)=>{if(t._n)return t;const r=function(e,t=en){if(!t)return e;if(e._n)return e;const n=(...r)=>{n._d&&Ir(-1);const o=nn(t),i=e(...r);return nn(o),n._d&&Ir(1),__VUE_PROD_DEVTOOLS__&&qt(t),i};return n._n=!0,n._c=!0,n._d=!0,n}(((...e)=>dr(t(...e))),n);return r._c=!1,r},yr=(e,t,n)=>{const r=e._ctx;for(const n in e){if(fr(n))continue;const o=e[n];if(C(o))t[n]=hr(0,o,r);else if(null!=o){const e=dr(o);t[n]=()=>e}}},mr=(e,t)=>{const n=dr(t);e.slots.default=()=>n},gr=(e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=ut(t),X(t,"_",n)):yr(t,e.slots={})}else e.slots={},t&&mr(e,t);X(e.slots,zr,1)},vr=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,s=d;if(32&r.shapeFlag){const e=t._;e?n&&1===e?i=!1:(_(o,t),n||1!==e||delete o._):(i=!t.$stable,yr(t,o)),s=t}else t&&(mr(e,t),s={default:1});if(i)for(const e in o)fr(e)||e in s||delete o[e]};function br(){return{app:null,config:{isNativeTag:m,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let _r=0;function wr(e,t){return function(n,r=null){C(n)||(n=Object.assign({},n)),null==r||P(r)||(r=null);const o=br(),i=new Set;let s=!1;const a=o.app={_uid:_r++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:ho,get config(){return o.config},set config(e){},use:(e,...t)=>(i.has(e)||(e&&C(e.install)?(i.add(e),e.install(a,...t)):C(e)&&(i.add(e),e(a,...t))),a),mixin:e=>(__VUE_OPTIONS_API__&&(o.mixins.includes(e)||o.mixins.push(e)),a),component:(e,t)=>t?(o.components[e]=t,a):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,a):o.directives[e],mount(i,c,l){if(!s){const u=$r(n,r);return u.appContext=o,c&&t?t(u,i):e(u,i,l),s=!0,a._container=i,i.__vue_app__=a,__VUE_PROD_DEVTOOLS__&&(a._instance=u.component,function(e,t){$t("app:init",e,t,{Fragment:Cr,Text:kr,Comment:jr,Static:Pr})}(a,ho)),po(u.component)||u.component.proxy}},unmount(){s&&(e(null,a._container),__VUE_PROD_DEVTOOLS__&&(a._instance=null,function(e){$t("app:unmount",e)}(a)),delete a._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,a)};return a}}function Sr(e,t,n,r,o=!1){if(A(e))return void e.forEach(((e,i)=>Sr(e,t&&(A(t)?t[i]:t),n,r,o)));if(On(r)&&!o)return;const i=4&r.shapeFlag?po(r.component)||r.component.proxy:r.el,s=o?null:i,{i:a,r:c}=e,l=t&&t.r,u=a.refs===d?a.refs={}:a.refs,p=a.setupState;if(null!=l&&l!==c&&(k(l)?(u[l]=null,O(p,l)&&(p[l]=null)):ht(l)&&(l.value=null)),C(c))vt(c,a,12,[s,u]);else{const t=k(c),r=ht(c);if(t||r){const a=()=>{if(e.f){const n=t?u[c]:c.value;o?A(n)&&w(n,i):A(n)?n.includes(i)||n.push(i):t?(u[c]=[i],O(p,c)&&(p[c]=u[c])):(c.value=[i],e.k&&(u[e.k]=c.value))}else t?(u[c]=s,O(p,c)&&(p[c]=s)):r&&(c.value=s,e.k&&(u[e.k]=s))};s?(a.id=-1,Or(a,n)):a()}}}const Or=function(e,t){t&&t.pendingBranch?A(e)?t.effects.push(...e):t.effects.push(e):Rt(e,jt,kt,Pt)};function Ar(e,t){"boolean"!=typeof __VUE_OPTIONS_API__&&(Z().__VUE_OPTIONS_API__=!0),"boolean"!=typeof __VUE_PROD_DEVTOOLS__&&(Z().__VUE_PROD_DEVTOOLS__=!1);const n=Z();n.__VUE__=!0,__VUE_PROD_DEVTOOLS__&&Ht(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:o,patchProp:i,createElement:s,createText:a,createComment:c,setText:l,setElementText:u,parentNode:p,nextSibling:f,setScopeId:m=y,cloneNode:g,insertStaticContent:v}=e,b=(e,t,n,r=null,o=null,i=null,s=!1,a=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Br(e,t)&&(r=ee(e),$(e,o,i,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:l,ref:u,shapeFlag:p}=t;switch(l){case kr:_(e,t,n,r);break;case jr:w(e,t,n,r);break;case Pr:null==e&&S(t,n,r,s);break;case Cr:N(e,t,n,r,o,i,s,a,c);break;default:1&p?A(e,t,n,r,o,i,s,a,c):6&p?T(e,t,n,r,o,i,s,a,c):(64&p||128&p)&&l.process(e,t,n,r,o,i,s,a,c,ne)}null!=u&&o&&Sr(u,e&&e.ref,i,t||e,!t)},_=(e,t,n,o)=>{if(null==e)r(t.el=a(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},w=(e,t,n,o)=>{null==e?r(t.el=c(t.children||""),n,o):t.el=e.el},S=(e,t,n,r)=>{[e.el,e.anchor]=v(e.children,t,n,r,e.el,e.anchor)},A=(e,t,n,r,o,i,s,a,c)=>{s=s||"svg"===t.type,null==e?E(t,n,r,o,i,s,a,c):k(e,t,o,i,s,a,c)},E=(e,t,n,o,a,c,l,p)=>{let f,d;const{type:h,props:y,shapeFlag:m,transition:v,patchFlag:b,dirs:_}=e;if(e.el&&void 0!==g&&-1===b)f=e.el=g(e.el);else{if(f=e.el=s(e.type,c,y&&y.is,y),8&m?u(f,e.children):16&m&&C(e.children,f,null,o,a,c&&"foreignObject"!==h,l,p),_&&zn(e,null,o,"created"),y){for(const t in y)"value"===t||R(t)||i(f,t,null,y[t],c,e.children,o,a,Y);"value"in y&&i(f,"value",null,y.value),(d=y.onVnodeBeforeMount)&&Qr(d,o,e)}x(f,e,e.scopeId,l,o)}__VUE_PROD_DEVTOOLS__&&(Object.defineProperty(f,"__vnode",{value:e,enumerable:!1}),Object.defineProperty(f,"__vueParentComponent",{value:o,enumerable:!1})),_&&zn(e,null,o,"beforeMount");const w=(!a||a&&!a.pendingBranch)&&v&&!v.persisted;w&&v.beforeEnter(f),r(f,t,n),((d=y&&y.onVnodeMounted)||w||_)&&Or((()=>{d&&Qr(d,o,e),w&&v.enter(f),_&&zn(e,null,o,"mounted")}),a)},x=(e,t,n,r,o)=>{if(n&&m(e,n),r)for(let t=0;t<r.length;t++)m(e,r[t]);if(o&&t===o.subTree){const t=o.vnode;x(e,t,t.scopeId,t.slotScopeIds,o.parent)}},C=(e,t,n,r,o,i,s,a,c=0)=>{for(let l=c;l<e.length;l++){const c=e[l]=a?Zr(e[l]):Kr(e[l]);b(null,c,t,n,r,o,i,s,a)}},k=(e,t,n,r,o,s,a)=>{const c=t.el=e.el;let{patchFlag:l,dynamicChildren:p,dirs:f}=t;l|=16&e.patchFlag;const h=e.props||d,y=t.props||d;let m;n&&Er(n,!1),(m=y.onVnodeBeforeUpdate)&&Qr(m,n,t,e),f&&zn(t,e,n,"beforeUpdate"),n&&Er(n,!0);const g=o&&"foreignObject"!==t.type;if(p?j(e.dynamicChildren,p,c,n,r,g,s):a||F(e,t,c,null,n,r,g,s,!1),l>0){if(16&l)P(c,t,h,y,n,r,o);else if(2&l&&h.class!==y.class&&i(c,"class",null,y.class,o),4&l&&i(c,"style",h.style,y.style,o),8&l){const s=t.dynamicProps;for(let t=0;t<s.length;t++){const a=s[t],l=h[a],u=y[a];u===l&&"value"!==a||i(c,a,l,u,o,e.children,n,r,Y)}}1&l&&e.children!==t.children&&u(c,t.children)}else a||null!=p||P(c,t,h,y,n,r,o);((m=y.onVnodeUpdated)||f)&&Or((()=>{m&&Qr(m,n,t,e),f&&zn(t,e,n,"updated")}),r)},j=(e,t,n,r,o,i,s)=>{for(let a=0;a<t.length;a++){const c=e[a],l=t[a],u=c.el&&(c.type===Cr||!Br(c,l)||70&c.shapeFlag)?p(c.el):n;b(c,l,u,null,r,o,i,s,!0)}},P=(e,t,n,r,o,s,a)=>{if(n!==r){for(const c in r){if(R(c))continue;const l=r[c],u=n[c];l!==u&&"value"!==c&&i(e,c,u,l,a,t.children,o,s,Y)}if(n!==d)for(const c in n)R(c)||c in r||i(e,c,n[c],null,a,t.children,o,s,Y);"value"in r&&i(e,"value",n.value,r.value)}},N=(e,t,n,o,i,s,c,l,u)=>{const p=t.el=e?e.el:a(""),f=t.anchor=e?e.anchor:a("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:y}=t;y&&(l=l?l.concat(y):y),null==e?(r(p,n,o),r(f,n,o),C(t.children,n,f,i,s,c,l,u)):d>0&&64&d&&h&&e.dynamicChildren?(j(e.dynamicChildren,h,n,i,s,c,l),(null!=t.key||i&&t===i.subTree)&&xr(e,t,!0)):F(e,t,n,f,i,s,c,l,u)},T=(e,t,n,r,o,i,s,a,c)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?o.ctx.activate(t,n,r,s,c):L(t,n,r,o,i,s,c):I(e,t,c)},L=(e,t,n,r,o,i,s)=>{const a=e.component=function(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||Yr,i={uid:eo++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new Q(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ar(r,o),emitsOptions:Qt(r,o),emit:null,emitted:null,propsDefaults:d,inheritAttrs:r.inheritAttrs,ctx:d,data:d,props:d,attrs:d,slots:d,refs:d,setupState:d,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Jt.bind(null,i),e.ce&&e.ce(i),i}(e,r,o);if(An(e)&&(a.ctx.renderer=ne),function(e,t=!1){co=t;const{props:n,children:r}=e.vnode,o=io(e);(function(e,t,n,r=!1){const o={},i={};X(i,zr,1),e.propsDefaults=Object.create(null),ir(e,t,o,i);for(const t in e.propsOptions[0])t in o||(o[t]=void 0);n?e.props=r?o:it(o,!1,Me,Je,et):e.type.props?e.props=o:e.props=i,e.attrs=i})(e,n,o,t),gr(e,r);const i=o?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=pt(new Proxy(e.ctx,qn));const{setup:r}=n;if(r){const n=e.setupContext=r.length>1?function(e){const t=t=>{e.exposed=t||{}};let n;return{get attrs(){return n||(n=function(e){return new Proxy(e.attrs,{get:(t,n)=>(ye(e,0,"$attrs"),t[n])})}(e))},slots:e.slots,emit:e.emit,expose:t}}(e):null;ro(e),de();const o=vt(r,e,0,[e.props,n]);if(he(),oo(),M(o)){if(o.then(oo,oo),t)return o.then((n=>{lo(e,n,t)})).catch((t=>{_t(t,e,0)}));e.asyncDep=o}else lo(e,o,t)}else uo(e,t)}(e,t):void 0;co=!1}(a),a.asyncDep){if(o&&o.registerDep(a,D),!e.el){const e=a.subTree=$r(jr);w(null,e,t,n)}}else D(a,e,t,n,o,i,s)},I=(e,t,n)=>{const r=t.component=e.component;if(function(e,t,n){const{props:r,children:o,component:i}=e,{props:s,children:a,patchFlag:c}=t,l=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!o&&!a||a&&a.$stable)||r!==s&&(r?!s||an(r,s,l):!!s);if(1024&c)return!0;if(16&c)return r?an(r,s,l):!!s;if(8&c){const e=t.dynamicProps;for(let t=0;t<e.length;t++){const n=e[t];if(s[n]!==r[n]&&!Yt(l,n))return!0}}return!1}(e,t,n)){if(r.asyncDep&&!r.asyncResolved)return void U(r,t,n);r.next=t,function(e){const t=Ot.indexOf(e);t>At&&Ot.splice(t,1)}(r.update),r.update()}else t.el=e.el,r.vnode=t},D=(e,t,n,r,o,i,s)=>{const a=e.effect=new le((()=>{if(e.isMounted){let t,{next:n,bu:r,u:a,parent:c,vnode:l}=e,u=n;Er(e,!1),n?(n.el=l.el,U(e,n,s)):n=l,r&&H(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Qr(t,c,n,l),Er(e,!0);const f=rn(e),d=e.subTree;e.subTree=f,b(d,f,p(d.el),ee(d),e,o,i),n.el=f.el,null===u&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,f.el),a&&Or(a,o),(t=n.props&&n.props.onVnodeUpdated)&&Or((()=>Qr(t,c,n,l)),o),__VUE_PROD_DEVTOOLS__&&qt(e)}else{let s;const{el:a,props:c}=t,{bm:l,m:u,parent:p}=e,f=On(t);if(Er(e,!1),l&&H(l),!f&&(s=c&&c.onVnodeBeforeMount)&&Qr(s,p,t),Er(e,!0),a&&oe){const n=()=>{e.subTree=rn(e),oe(a,e.subTree,e,o,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const s=e.subTree=rn(e);b(null,s,n,r,e,o,i),t.el=s.el}if(u&&Or(u,o),!f&&(s=c&&c.onVnodeMounted)){const e=t;Or((()=>Qr(s,p,e)),o)}(256&t.shapeFlag||p&&On(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&Or(e.a,o),e.isMounted=!0,__VUE_PROD_DEVTOOLS__&&Xt(e),t=n=r=null}}),(()=>It(c)),e.scope),c=e.update=()=>a.run();c.id=e.uid,Er(e,!0),c()},U=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:s}}=e,a=ut(o),[c]=e.propsOptions;let l=!1;if(!(r||s>0)||16&s){let r;ir(e,t,o,i)&&(l=!0);for(const i in a)t&&(O(t,i)||(r=V(i))!==i&&O(t,r))||(c?!n||void 0===n[i]&&void 0===n[r]||(o[i]=sr(c,a,i,void 0,e,!0)):delete o[i]);if(i!==a)for(const e in i)t&&O(t,e)||(delete i[e],l=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let s=n[r];if(Yt(e.emitsOptions,s))continue;const u=t[s];if(c)if(O(i,s))u!==i[s]&&(i[s]=u,l=!0);else{const t=B(s);o[t]=sr(c,a,t,u,e,!1)}else u!==i[s]&&(i[s]=u,l=!0)}}l&&ge(e,"set","$attrs")}(e,t.props,r,n),vr(e,t.children,n),de(),Ut(void 0,e.update),he()},F=(e,t,n,r,o,i,s,a,c=!1)=>{const l=e&&e.children,p=e?e.shapeFlag:0,f=t.children,{patchFlag:d,shapeFlag:h}=t;if(d>0){if(128&d)return void G(l,f,n,r,o,i,s,a,c);if(256&d)return void z(l,f,n,r,o,i,s,a,c)}8&h?(16&p&&Y(l,o,i),f!==l&&u(n,f)):16&p?16&h?G(l,f,n,r,o,i,s,a,c):Y(l,o,i,!0):(8&p&&u(n,""),16&h&&C(f,n,r,o,i,s,a,c))},z=(e,t,n,r,o,i,s,a,c)=>{t=t||h;const l=(e=e||h).length,u=t.length,p=Math.min(l,u);let f;for(f=0;f<p;f++){const r=t[f]=c?Zr(t[f]):Kr(t[f]);b(e[f],r,n,null,o,i,s,a,c)}l>u?Y(e,o,i,!0,!1,p):C(t,n,r,o,i,s,a,c,p)},G=(e,t,n,r,o,i,s,a,c)=>{let l=0;const u=t.length;let p=e.length-1,f=u-1;for(;l<=p&&l<=f;){const r=e[l],u=t[l]=c?Zr(t[l]):Kr(t[l]);if(!Br(r,u))break;b(r,u,n,null,o,i,s,a,c),l++}for(;l<=p&&l<=f;){const r=e[p],l=t[f]=c?Zr(t[f]):Kr(t[f]);if(!Br(r,l))break;b(r,l,n,null,o,i,s,a,c),p--,f--}if(l>p){if(l<=f){const e=f+1,p=e<u?t[e].el:r;for(;l<=f;)b(null,t[l]=c?Zr(t[l]):Kr(t[l]),n,p,o,i,s,a,c),l++}}else if(l>f)for(;l<=p;)$(e[l],o,i,!0),l++;else{const d=l,y=l,m=new Map;for(l=y;l<=f;l++){const e=t[l]=c?Zr(t[l]):Kr(t[l]);null!=e.key&&m.set(e.key,l)}let g,v=0;const _=f-y+1;let w=!1,S=0;const O=new Array(_);for(l=0;l<_;l++)O[l]=0;for(l=d;l<=p;l++){const r=e[l];if(v>=_){$(r,o,i,!0);continue}let u;if(null!=r.key)u=m.get(r.key);else for(g=y;g<=f;g++)if(0===O[g-y]&&Br(r,t[g])){u=g;break}void 0===u?$(r,o,i,!0):(O[u-y]=l+1,u>=S?S=u:w=!0,b(r,t[u],n,null,o,i,s,a,c),v++)}const A=w?function(e){const t=e.slice(),n=[0];let r,o,i,s,a;const c=e.length;for(r=0;r<c;r++){const c=e[r];if(0!==c){if(o=n[n.length-1],e[o]<c){t[r]=o,n.push(r);continue}for(i=0,s=n.length-1;i<s;)a=i+s>>1,e[n[a]]<c?i=a+1:s=a;c<e[n[i]]&&(i>0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}(O):h;for(g=A.length-1,l=_-1;l>=0;l--){const e=y+l,p=t[e],f=e+1<u?t[e+1].el:r;0===O[l]?b(null,p,n,f,o,i,s,a,c):w&&(g<0||l!==A[g]?W(p,n,f,2):g--)}}},W=(e,t,n,o,i=null)=>{const{el:s,type:a,transition:c,children:l,shapeFlag:u}=e;if(6&u)W(e.component.subTree,t,n,o);else if(128&u)e.suspense.move(t,n,o);else if(64&u)a.move(e,t,n,ne);else if(a!==Cr)if(a!==Pr)if(2!==o&&1&u&&c)if(0===o)c.beforeEnter(s),r(s,t,n),Or((()=>c.enter(s)),i);else{const{leave:e,delayLeave:o,afterLeave:i}=c,a=()=>r(s,t,n),l=()=>{e(s,(()=>{a(),i&&i()}))};o?o(s,a,l):l()}else r(s,t,n);else(({el:e,anchor:t},n,o)=>{let i;for(;e&&e!==t;)i=f(e),r(e,n,o),e=i;r(t,n,o)})(e,t,n);else{r(s,t,n);for(let e=0;e<l.length;e++)W(l[e],t,n,o);r(e.anchor,t,n)}},$=(e,t,n,r=!1,o=!1)=>{const{type:i,props:s,ref:a,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:p,dirs:f}=e;if(null!=a&&Sr(a,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&f,h=!On(e);let y;if(h&&(y=s&&s.onVnodeBeforeUnmount)&&Qr(y,t,e),6&u)J(e.component,n,r);else{if(128&u)return void e.suspense.unmount(n,r);d&&zn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,o,ne,r):l&&(i!==Cr||p>0&&64&p)?Y(l,t,n,!1,!0):(i===Cr&&384&p||!o&&16&u)&&Y(c,t,n),r&&q(e)}(h&&(y=s&&s.onVnodeUnmounted)||d)&&Or((()=>{y&&Qr(y,t,e),d&&zn(e,null,t,"unmounted")}),n)},q=e=>{const{type:t,el:n,anchor:r,transition:i}=e;if(t===Cr)return void K(n,r);if(t===Pr)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),o(e),e=n;o(t)})(e);const s=()=>{o(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){const{leave:t,delayLeave:r}=i,o=()=>t(n,s);r?r(e.el,s,o):o()}else s()},K=(e,t)=>{let n;for(;e!==t;)n=f(e),o(e),e=n;o(t)},J=(e,t,n)=>{const{bum:r,scope:o,update:i,subTree:s,um:a}=e;r&&H(r),o.stop(),i&&(i.active=!1,$(s,e,t,n)),a&&Or(a,t),Or((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve()),__VUE_PROD_DEVTOOLS__&&Kt(e)},Y=(e,t,n,r=!1,o=!1,i=0)=>{for(let s=i;s<e.length;s++)$(e[s],t,n,r,o)},ee=e=>6&e.shapeFlag?ee(e.component.subTree):128&e.shapeFlag?e.suspense.next():f(e.anchor||e.el),te=(e,t,n)=>{null==e?t._vnode&&$(t._vnode,null,null,!0):b(t._vnode||null,e,t,null,null,null,n),Ft(),t._vnode=e},ne={p:b,um:$,m:W,r:q,mt:L,mc:C,pc:F,pbc:j,n:ee,o:e};let re,oe;return t&&([re,oe]=t(ne)),{render:te,hydrate:re,createApp:wr(te,re)}}function Er({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function xr(e,t,n=!1){const r=e.children,o=t.children;if(A(r)&&A(o))for(let e=0;e<r.length;e++){const t=r[e];let i=o[e];1&i.shapeFlag&&!i.dynamicChildren&&((i.patchFlag<=0||32===i.patchFlag)&&(i=o[e]=Zr(o[e]),i.el=t.el),n||xr(t,i))}}const Cr=Symbol(void 0),kr=Symbol(void 0),jr=Symbol(void 0),Pr=Symbol(void 0),Mr=[];let Nr=null;function Tr(e=!1){Mr.push(Nr=e?null:[])}let Lr=1;function Ir(e){Lr+=e}function Dr(e){return e.dynamicChildren=Lr>0?Nr||h:null,Mr.pop(),Nr=Mr[Mr.length-1]||null,Lr>0&&Nr&&Nr.push(e),e}function Rr(e,t,n,r,o,i){return Dr(Wr(e,t,n,r,o,i,!0))}function Ur(e,t,n,r,o){return Dr($r(e,t,n,r,o,!0))}function Fr(e){return!!e&&!0===e.__v_isVNode}function Br(e,t){return e.type===t.type&&e.key===t.key}const zr="__vInternal",Vr=({key:e})=>null!=e?e:null,Gr=({ref:e,ref_key:t,ref_for:n})=>null!=e?k(e)||ht(e)||C(e)?{i:en,r:e,k:t,f:!!n}:e:null;function Wr(e,t=null,n=null,r=0,o=null,i=(e===Cr?0:1),s=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Vr(t),ref:t&&Gr(t),scopeId:tn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null};return a?(Jr(c,n),128&i&&e.normalize(c)):n&&(c.shapeFlag|=k(n)?8:16),Lr>0&&!s&&Nr&&(c.patchFlag>0||6&i)&&32!==c.patchFlag&&Nr.push(c),c}const $r=function(e,t=null,n=null,r=0,o=null,i=!1){if(e&&e!==Wn||(e=jr),Fr(e)){const r=Hr(e,t,!0);return n&&Jr(r,n),Lr>0&&!i&&Nr&&(6&r.shapeFlag?Nr[Nr.indexOf(e)]=r:Nr.push(r)),r.patchFlag|=-2,r}if(a=e,C(a)&&"__vccOpts"in a&&(e=e.__vccOpts),t){t=function(e){return e?lt(e)||zr in e?_({},e):e:null}(t);let{class:e,style:n}=t;e&&!k(e)&&(t.class=u(e)),P(n)&&(lt(n)&&!A(n)&&(n=_({},n)),t.style=s(n))}var a;return Wr(e,t,n,r,o,k(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:P(e)?4:C(e)?2:0,i,!0)};function Hr(e,t,n=!1){const{props:r,ref:o,patchFlag:i,children:a}=e,c=t?function(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const e in r)if("class"===e)t.class!==r.class&&(t.class=u([t.class,r.class]));else if("style"===e)t.style=s([t.style,r.style]);else if(v(e)){const n=t[e],o=r[e];!o||n===o||A(n)&&n.includes(o)||(t[e]=n?[].concat(n,o):o)}else""!==e&&(t[e]=r[e])}return t}(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Vr(c),ref:t&&t.ref?n&&o?A(o)?o.concat(Gr(t)):[o,Gr(t)]:Gr(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Cr?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Hr(e.ssContent),ssFallback:e.ssFallback&&Hr(e.ssFallback),el:e.el,anchor:e.anchor}}function Xr(e=" ",t=0){return $r(kr,null,e,t)}function qr(e="",t=!1){return t?(Tr(),Ur(jr,null,e)):$r(jr,null,e)}function Kr(e){return null==e||"boolean"==typeof e?$r(jr):A(e)?$r(Cr,null,e.slice()):"object"==typeof e?Zr(e):$r(kr,null,String(e))}function Zr(e){return null===e.el||e.memo?e:Hr(e)}function Jr(e,t){let n=0;const{shapeFlag:r}=e;if(null==t)t=null;else if(A(t))n=16;else if("object"==typeof t){if(65&r){const n=t.default;return void(n&&(n._c&&(n._d=!1),Jr(e,n()),n._c&&(n._d=!0)))}{n=32;const r=t._;r||zr in t?3===r&&en&&(1===en.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=en}}else C(t)?(t={default:t,_ctx:en},n=32):(t=String(t),64&r?(n=16,t=[Xr(t)]):n=8);e.children=t,e.shapeFlag|=n}function Qr(e,t,n,r=null){bt(e,t,7,[n,r])}const Yr=br();let eo=0;let to=null;const no=()=>to||en,ro=e=>{to=e,e.scope.on()},oo=()=>{to&&to.scope.off(),to=null};function io(e){return 4&e.vnode.shapeFlag}let so,ao,co=!1;function lo(e,t,n){C(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:P(t)&&(__VUE_PROD_DEVTOOLS__&&(e.devtoolsRawSetupState=t),e.setupState=mt(t)),uo(e,n)}function uo(e,t,n){const r=e.type;if(!e.render){if(!t&&so&&!r.render){const t=r.template;if(t){const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:i,compilerOptions:s}=r,a=_(_({isCustomElement:n,delimiters:i},o),s);r.render=so(t,a)}}e.render=r.render||y,ao&&ao(e)}__VUE_OPTIONS_API__&&(ro(e),de(),function(e){const t=Qn(e),n=e.proxy,r=e.ctx;Kn=!1,t.beforeCreate&&Zn(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:s,watch:a,provide:c,inject:l,created:u,beforeMount:p,mounted:f,beforeUpdate:d,updated:h,activated:m,deactivated:g,beforeDestroy:v,beforeUnmount:b,destroyed:_,unmounted:w,render:S,renderTracked:O,renderTriggered:E,errorCaptured:x,serverPrefetch:k,expose:j,inheritAttrs:M,components:N,directives:T,filters:L}=t;if(l&&function(e,t,n=y,r=!1){A(e)&&(e=nr(e));for(const n in e){const o=e[n];let i;i=P(o)?"default"in o?cn(o.from||n,o.default,!0):cn(o.from||n):cn(o),ht(i)&&r?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}(l,r,null,e.appContext.config.unwrapInjectedRef),s)for(const e in s){const t=s[e];C(t)&&(r[e]=t.bind(n))}if(o){const t=o.call(n,n);P(t)&&(e.data=rt(t))}if(Kn=!0,i)for(const e in i){const t=i[e],o=C(t)?t.bind(n,n):C(t.get)?t.get.bind(n,n):y,s=!C(t)&&C(t.set)?t.set.bind(n):y,a=fo({get:o,set:s});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(a)for(const e in a)Jn(a[e],r,n,e);if(c){const e=C(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(to){let n=to.provides;const r=to.parent&&to.parent.provides;r===n&&(n=to.provides=Object.create(r)),n[e]=t}}(t,e[t])}))}function I(e,t){A(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&Zn(u,e,"c"),I(Mn,p),I(Nn,f),I(Tn,d),I(Ln,h),I(En,m),I(xn,g),I(Bn,x),I(Fn,O),I(Un,E),I(In,b),I(Dn,w),I(Rn,k),A(j))if(j.length){const t=e.exposed||(e.exposed={});j.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===y&&(e.render=S),null!=M&&(e.inheritAttrs=M),N&&(e.components=N),T&&(e.directives=T)}(e),he(),oo())}function po(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(mt(pt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Xn?Xn[n](e):void 0}))}const fo=(e,t)=>function(e,t,n=!1){let r,o;const i=C(e);return i?(r=e,o=y):(r=e.get,o=e.set),new gt(r,o,i||!o,n)}(e,0,co);Symbol("");const ho="3.2.37",yo="undefined"!=typeof document?document:null,mo=yo&&yo.createElement("template"),go={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t?yo.createElementNS("http://www.w3.org/2000/svg",e):yo.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&o.setAttribute("multiple",r.multiple),o},createText:e=>yo.createTextNode(e),createComment:e=>yo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>yo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,r,o,i){const s=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==i&&(o=o.nextSibling););else{mo.innerHTML=r?`<svg>${e}</svg>`:e;const o=mo.content;if(r){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},vo=/\s*!important$/;function bo(e,t,n){if(A(n))n.forEach((n=>bo(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=function(e,t){const n=wo[t];if(n)return n;let r=B(t);if("filter"!==r&&r in e)return wo[t]=r;r=G(r);for(let n=0;n<_o.length;n++){const o=_o[n]+r;if(o in e)return wo[t]=o}return t}(e,t);vo.test(n)?e.setProperty(V(r),n.replace(vo,""),"important"):e[r]=n}}const _o=["Webkit","Moz","ms"],wo={},So="http://www.w3.org/1999/xlink",[Oo,Ao]=(()=>{let e=Date.now,t=!1;if("undefined"!=typeof window){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let Eo=0;const xo=Promise.resolve(),Co=()=>{Eo=0};function ko(e,t,n,r,o=null){const i=e._vei||(e._vei={}),s=i[t];if(r&&s)s.value=r;else{const[n,a]=function(e){let t;if(jo.test(e)){let n;for(t={};n=e.match(jo);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[V(e.slice(2)),t]}(t);if(r){const s=i[t]=function(e,t){const n=e=>{const r=e.timeStamp||Oo();(Ao||r>=n.attached-1)&&bt(function(e,t){if(A(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=Eo||(xo.then(Co),Eo=Oo()),n}(r,o);!function(e,t,n,r){e.addEventListener(t,n,r)}(e,n,s,a)}else s&&(function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,a),i[t]=void 0)}}const jo=/(?:Once|Passive|Capture)$/,Po=/^on[a-z]/;"undefined"!=typeof HTMLElement&&HTMLElement;const Mo="transition",No="animation",To=(e,{slots:t})=>function(e,t,n){const r=arguments.length;return 2===r?P(t)&&!A(t)?Fr(t)?$r(e,null,[t]):$r(e,t):$r(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&Fr(n)&&(n=[n]),$r(e,t,n))}(mn,function(e){const t={};for(const n in e)n in Lo||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:l=s,appearToClass:u=a,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(P(e))return[Ro(e.enter),Ro(e.leave)];{const t=Ro(e);return[t,t]}}(o),y=h&&h[0],m=h&&h[1],{onBeforeEnter:g,onEnter:v,onEnterCancelled:b,onLeave:w,onLeaveCancelled:S,onBeforeAppear:O=g,onAppear:A=v,onAppearCancelled:E=b}=t,x=(e,t,n)=>{Fo(e,t?u:a),Fo(e,t?l:s),n&&n()},C=(e,t)=>{e._isLeaving=!1,Fo(e,p),Fo(e,d),Fo(e,f),t&&t()},k=e=>(t,n)=>{const o=e?A:v,s=()=>x(t,e,n);Io(o,[t,s]),Bo((()=>{Fo(t,e?c:i),Uo(t,e?u:a),Do(o)||Vo(t,r,y,s)}))};return _(t,{onBeforeEnter(e){Io(g,[e]),Uo(e,i),Uo(e,s)},onBeforeAppear(e){Io(O,[e]),Uo(e,c),Uo(e,l)},onEnter:k(!1),onAppear:k(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>C(e,t);Uo(e,p),document.body.offsetHeight,Uo(e,f),Bo((()=>{e._isLeaving&&(Fo(e,p),Uo(e,d),Do(w)||Vo(e,r,m,n))})),Io(w,[e,n])},onEnterCancelled(e){x(e,!1),Io(b,[e])},onAppearCancelled(e){x(e,!0),Io(E,[e])},onLeaveCancelled(e){C(e),Io(S,[e])}})}(e),t);To.displayName="Transition";const Lo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Io=(To.props=_({},mn.props,Lo),(e,t=[])=>{A(e)?e.forEach((e=>e(...t))):e&&e(...t)}),Do=e=>!!e&&(A(e)?e.some((e=>e.length>1)):e.length>1);function Ro(e){return q(e)}function Uo(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Fo(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Bo(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let zo=0;function Vo(e,t,n,r){const o=e._endId=++zo,i=()=>{o===e._endId&&r()};if(n)return setTimeout(i,n);const{type:s,timeout:a,propCount:c}=function(e,t){const n=window.getComputedStyle(e),r=e=>(n[e]||"").split(", "),o=r(Mo+"Delay"),i=r(Mo+"Duration"),s=Go(o,i),a=r(No+"Delay"),c=r(No+"Duration"),l=Go(a,c);let u=null,p=0,f=0;return t===Mo?s>0&&(u=Mo,p=s,f=i.length):t===No?l>0&&(u=No,p=l,f=c.length):(p=Math.max(s,l),u=p>0?s>l?Mo:No:null,f=u?u===Mo?i.length:c.length:0),{type:u,timeout:p,propCount:f,hasTransform:u===Mo&&/\b(transform|all)(,|$)/.test(n[Mo+"Property"])}}(e,t);if(!s)return r();const l=s+"end";let u=0;const p=()=>{e.removeEventListener(l,f),i()},f=t=>{t.target===e&&++u>=c&&p()};setTimeout((()=>{u<c&&p()}),a+1),e.addEventListener(l,f)}function Go(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map(((t,n)=>Wo(t)+Wo(e[n]))))}function Wo(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}new WeakMap,new WeakMap;const $o=_({patchProp:(e,t,n,r,s=!1,a,c,l,u)=>{"class"===t?function(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){const r=e.style,o=k(n);if(n&&!o){for(const e in n)bo(r,e,n[e]);if(t&&!k(t))for(const e in t)null==n[e]&&bo(r,e,"")}else{const i=r.display;o?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=i)}}(e,n,r):v(t)?b(t)||ko(e,t,0,r,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,r){return r?"innerHTML"===t||"textContent"===t||!!(t in e&&Po.test(t)&&C(n)):"spellcheck"!==t&&"draggable"!==t&&"translate"!==t&&("form"!==t&&(("list"!==t||"INPUT"!==e.tagName)&&(("type"!==t||"TEXTAREA"!==e.tagName)&&((!Po.test(t)||!k(n))&&t in e))))}(e,t,r,s))?function(e,t,n,r,o,s,a){if("innerHTML"===t||"textContent"===t)return r&&a(r,o,s),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName&&!e.tagName.includes("-")){e._value=n;const r=null==n?"":n;return e.value===r&&"OPTION"!==e.tagName||(e.value=r),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const r=typeof e[t];"boolean"===r?n=i(n):null==n&&"string"===r?(n="",c=!0):"number"===r&&(n=0,c=!0)}try{e[t]=n}catch(e){}c&&e.removeAttribute(t)}(e,t,r,a,c,l,u):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,n,r){if(r&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(So,t.slice(6,t.length)):e.setAttributeNS(So,t,n);else{const r=o(t);null==n||r&&!i(n)?e.removeAttribute(t):e.setAttribute(t,r?"":n)}}(e,t,r,s))}},go);let Ho;var Xo={class:"h5p-audio-recorder-view"},qo=["innerHTML"],Ko=["innerHTML"],Zo={key:1,class:"h5p-audio-recorder-player"},Jo={controls:"controls"},Qo=Xr(" Your browser does not support the "),Yo=Wr("code",null,"audio",-1),ei=Xr(" element. "),ti=["src"],ni={key:3,class:"h5p-audio-recorder-download"},ri={class:"button-row"},oi={class:"button-row-double"},ii=Wr("span",{class:"fa-circle"},null,-1),si=Wr("span",{class:"fa-undo"},null,-1),ai={class:"label"},ci=Wr("span",{class:"fa-pause"},null,-1),li={class:"label"},ui=Wr("span",{class:"fa-circle"},null,-1),pi={class:"label"},fi=Wr("span",{class:"fa-play-circle"},null,-1),di={class:"label"},hi={class:"button-row-left"},yi=["href","download"],mi=Wr("span",{class:"icon-download"},null,-1),gi={class:"button-row-right"},vi=Wr("span",{class:"fa-undo"},null,-1),bi={class:"label"};const _i="unsupported",wi="blocked",Si="ready",Oi="recording",Ai="paused",Ei="done",xi="insecure-not-allowed",Ci="cant-create-audio-file";var ki={};ki[Si]="button-record",ki[Oi]="button-pause",ki[Ai]="button-continue",ki[Ei]="button-download";const ji={methods:{resize:function(){this.$el&&(this.viewState=this.$el.offsetWidth<=576?"small":"large")},record:function(){this.$emit(Oi)},pause:function(){this.state=Ai,this.$emit(this.state)},done:function(){this.state=Ei,this.$emit(Ei)},retry:function(){var e=this.$el;this.isSubcontent&&(e=function e(t){return t?-1!==t.className.indexOf("h5p-content")?t:e(t.parentNode):null}(this.$el)||this.$el);var t=new H5P.ConfirmationDialog({headerText:this.l10n.retryDialogHeaderText,dialogText:this.l10n.retryDialogBodyText,cancelText:this.l10n.retryDialogCancelText,confirmText:this.l10n.retryDialogConfirmText});t.appendTo(e),t.show();var n=this;t.on("confirmed",(function(){n.state=Si,n.$refs.timer&&n.$refs.timer.reset(),n.$emit("retry")}))}},computed:{unEscape:function(){return this.statusMessages[this.state].replace(/&#039;/g,"'")}},watch:{state:function(e){var t=this;ki[e]&&this.$nextTick((function(){return t.$refs[ki[e]].focus()})),this.$emit("resize")}}};n(668);var Pi=n(890);const Mi=(0,Pi.A)(ji,[["render",function(e,t,n,r,o,i){var s=Gn("vuMeter"),a=Gn("timer");return Tr(),Rr("div",Xo,[$r(s,{avgMicFrequency:e.avgMicFrequency,enablePulse:"recording"===e.state},null,8,["avgMicFrequency","enablePulse"]),"done"!==e.state&&e.title?(Tr(),Rr("div",{key:0,class:"title",innerHTML:e.title},null,8,qo)):qr("v-if",!0),Wr("div",{role:"status",class:u(e.state),innerHTML:e.statusMessages[e.state]},null,10,Ko),"done"===e.state&&""!==e.audioSrc?(Tr(),Rr("div",Zo,[Wr("audio",Jo,[Qo,Yo,ei,Wr("source",{src:e.audioSrc},null,8,ti)])])):qr("v-if",!0),"unsupported"!==e.state&&"done"!==e.state&&"insecure-not-allowed"!==e.state?(Tr(),Ur(a,{key:2,ref:"timer",stopped:"recording"!==e.state},null,8,["stopped"])):qr("v-if",!0),"blocked"!==e.state&&"unsupported"!==e.state&&"done"===e.state?(Tr(),Rr("div",ni,p(e.l10n.downloadRecording),1)):qr("v-if",!0),Wr("div",ri,[Wr("div",oi,["ready"===e.state||"blocked"===e.state?(Tr(),Rr("button",{key:0,class:"button record",ref:"button-record",onClick:t[0]||(t[0]=function(){return i.record&&i.record.apply(i,arguments)})},[ii,Xr(" "+p(e.l10n.recordAnswer),1)],512)):qr("v-if",!0),"recording"===e.state||"paused"===e.state?(Tr(),Rr("button",{key:1,class:u(["button retry small",{"small-screen":"small"===this.viewState}]),onClick:t[1]||(t[1]=function(){return i.retry&&i.retry.apply(i,arguments)})},[si,Wr("span",ai,p(e.l10n.retry),1)],2)):qr("v-if",!0),"recording"===e.state?(Tr(),Rr("button",{key:2,class:u(["button pause",{"small-screen":"small"===this.viewState}]),ref:"button-pause",onClick:t[2]||(t[2]=function(){return i.pause&&i.pause.apply(i,arguments)})},[ci,Wr("span",li,p(e.l10n.pause),1)],2)):qr("v-if",!0),"paused"===e.state?(Tr(),Rr("button",{key:3,class:u(["button record",{"small-screen":"small"===this.viewState}]),ref:"button-continue",onClick:t[3]||(t[3]=function(){return i.record&&i.record.apply(i,arguments)})},[ui,Wr("span",pi,p(e.l10n.continue),1)],2)):qr("v-if",!0),"recording"===e.state||"paused"===e.state?(Tr(),Rr("button",{key:4,class:u(["button done small",{"small-screen":"small"===this.viewState}]),onClick:t[4]||(t[4]=function(){return i.done&&i.done.apply(i,arguments)})},[fi,Wr("span",di,p(e.l10n.done),1)],2)):qr("v-if",!0)]),Wr("span",hi,["done"===e.state?(Tr(),Rr("a",{key:0,class:"button download",ref:"button-download",href:e.audioSrc,download:e.audioFilename},[mi,Xr(" "+p(e.l10n.download),1)],8,yi)):qr("v-if",!0)]),Wr("span",gi,["done"===e.state||"cant-create-audio-file"===e.state?(Tr(),Rr("button",{key:0,class:"button retry",onClick:t[5]||(t[5]=function(){return i.retry&&i.retry.apply(i,arguments)})},[vi,Wr("span",bi,p(e.l10n.retry),1)])):qr("v-if",!0)])])])}]]);var Ni={class:"recording-indicator-wrapper"},Ti=Wr("div",{class:"fa-microphone"},null,-1);const Li={props:["avgMicFrequency","enablePulse"],computed:{pulseScale:function(){return function(e){e>30?e=30:e<4&&(e=4);var t=(e-4)/30*(1.3-.7)+.7;return.005*Math.round(t/.005)}(this.avgMicFrequency)}}};n(447);const Ii=(0,Pi.A)(Li,[["render",function(e,t,n,r,o,i){return Tr(),Rr("div",Ni,[Wr("div",{style:s({transform:"scale(".concat(i.pulseScale,")")}),class:u([[{hidden:!n.enablePulse}],"h5p-audio-recorder-vu-meter"])},null,6),Ti])}]]);var Di={role:"timer",class:"audio-recorder-timer"},Ri=n(887);const Ui={props:["stopped"],mounted:function(){var e=this;setInterval((function(){e.secondsPassed=e.timer.time()/1e3}),200)},data:function(){return{timer:new Ri,secondsPassed:0}},methods:{reset:function(){this.secondsPassed=0,this.timer=new Ri}},computed:{formatTime:function(){var e=function(e){return e<10?"0".concat(e):"".concat(e)},t=parseInt(this.secondsPassed,10),n=e(Math.floor(t/60)),r=e(t-60*n);return"".concat(n,":").concat(r)}},watch:{stopped:function(e){this.timer[e?"stop":"start"]()}}};n(813);const Fi=(0,Pi.A)(Ui,[["render",function(e,t,n,r,o,i){return Tr(),Rr("div",Di,p(i.formatTime),1)}]]);function Bi(e){return Bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bi(e)}function zi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vi(e,t){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vi(e,t)}function Gi(e){return Gi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gi(e)}var Wi="inactive",$i="recording",Hi=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vi(e,t)}(i,H5P.EventDispatcher);var e,t,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Gi(n);if(r){var o=Gi(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Bi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).config={bufferLength:4096,numChannels:1},e.state=Wi;var t=new Blob(["/**\n * This is a web worker responsible for recording/buffering the sound and\n * encoding it as wav.\n */\n\nvar recLength = 0;\nvar recBuffers = [];\nvar sampleRate;\nvar numChannels;\n\n// Listen to incoming messages\nthis.onmessage = function(e) {\n  switch(e.data.command){\n    case 'init':\n      init(e.data.config);\n      break;\n    case 'record':\n      record(e.data.buffer);\n      break;\n    case 'export-wav':\n      exportWAV();\n      break;\n    case 'clear':\n      clear();\n      break;\n  }\n};\n\n/**\n * Initialization\n *\n * @param  {Object} config\n */\nfunction init(config) {\n  sampleRate = config.sampleRate;\n  numChannels = config.numChannels;\n  initBuffers();\n}\n\n/**\n * Storing the data buffer\n *\n * @param  {Float32Array} inputBuffer\n */\nfunction record(inputBuffer) {\n  for (var channel = 0; channel < numChannels; channel++){\n    recBuffers[channel].push(inputBuffer[channel]);\n  }\n  recLength += inputBuffer[0].length;\n}\n\n/**\n * Export buffered data as a wav encoded blob\n */\nfunction exportWAV() {\n  var buffers = [];\n  for (var channel = 0; channel < numChannels; channel++){\n    buffers.push(mergeBuffers(recBuffers[channel], recLength));\n  }\n  if (numChannels === 2){\n      var interleaved = interleave(buffers[0], buffers[1]);\n  } else {\n      var interleaved = buffers[0];\n  }\n  var dataview = encodeWAV(interleaved);\n  var audioBlob = new Blob([dataview], { type: 'audio/wav' });\n\n  this.postMessage({\n    command: 'wav-delivered',\n    blob: audioBlob\n  });\n}\n\n/**\n * Clear the buffers\n */\nfunction clear() {\n  recLength = 0;\n  recBuffers = [];\n  initBuffers();\n}\n\n/**\n * Initialize the buffers\n */\nfunction initBuffers() {\n  for (var channel = 0; channel < numChannels; channel++){\n    recBuffers[channel] = [];\n  }\n}\n\n/**\n * Merge buffers\n *\n * @param {Array} recBuffers\n * @param {[type]} recLength\n * @return {Float32Array}\n */\nfunction mergeBuffers(recBuffers, recLength){\n  var result = new Float32Array(recLength);\n  var offset = 0;\n  for (var i = 0; i < recBuffers.length; i++){\n    result.set(recBuffers[i], offset);\n    offset += recBuffers[i].length;\n  }\n  return result;\n}\n\n/**\n * Interleave two channels\n *\n * @param {Array} inputL\n * @param {Array} inputR\n * @return {Float32Array}\n */\nfunction interleave(inputL, inputR){\n  var length = inputL.length + inputR.length;\n  var result = new Float32Array(length);\n\n  var index = 0,\n    inputIndex = 0;\n\n  while (index < length){\n    result[index++] = inputL[inputIndex];\n    result[index++] = inputR[inputIndex];\n    inputIndex++;\n  }\n  return result;\n}\n\n/**\n * Convert floats to 16 bit PCMs\n *\n * @param {DataView} output\n * @param {number} offset\n * @param {Array} input\n */\nfunction floatTo16BitPCM(output, offset, input) {\n  for (var i = 0; i < input.length; i++, offset+=2){\n    var s = Math.max(-1, Math.min(1, input[i]));\n    output.setInt16(offset, s < 0 ? s * 0x8000 : s * 0x7FFF, true);\n  }\n}\n\n/**\n * Write string to wav header\n *\n * @param {DataView} view\n * @param {number} offset\n * @param {string} string\n */\nfunction writeString(view, offset, string) {\n  for (var i = 0; i < string.length; i++){\n    view.setUint8(offset + i, string.charCodeAt(i));\n  }\n}\n\n/**\n * Encode as wav\n *\n * @param {Array} samples\n * @return {DataView}\n */\nfunction encodeWAV(samples) {\n  var buffer = new ArrayBuffer(44 + samples.length * 2);\n  var view = new DataView(buffer);\n\n  /* RIFF identifier */\n  writeString(view, 0, 'RIFF');\n  /* RIFF chunk length */\n  view.setUint32(4, 36 + samples.length * 2, true);\n  /* RIFF type */\n  writeString(view, 8, 'WAVE');\n  /* format chunk identifier */\n  writeString(view, 12, 'fmt ');\n  /* format chunk length */\n  view.setUint32(16, 16, true);\n  /* sample format (raw) */\n  view.setUint16(20, 1, true);\n  /* channel count */\n  view.setUint16(22, numChannels, true);\n  /* sample rate */\n  view.setUint32(24, sampleRate, true);\n  /* byte rate (sample rate * block align) */\n  view.setUint32(28, sampleRate * 2 * numChannels, true);\n  /* block align (channel count * bytes per sample) */\n  view.setUint16(32, numChannels * 2, true);\n  /* bits per sample */\n  view.setUint16(34, 16, true);\n  /* data chunk identifier */\n  writeString(view, 36, 'data');\n  /* data chunk length */\n  view.setUint32(40, samples.length * 2, true);\n\n  floatTo16BitPCM(view, 44, samples);\n\n  return view;\n}\n"],{type:"text/javascript"});return e.worker=new Worker(URL.createObjectURL(t)),e.worker.onmessage=function(t){e.trigger(t.data.command,t.data.blob)},e.worker.onerror=function(t){e.trigger("worker-error",t)},e}return e=i,t=[{key:"getWavURL",value:function(){var e=this;this.stop();var t=new Promise((function(t,n){e.once("wav-delivered",(function(e){t(URL.createObjectURL(e.data))})),e.once("worker-error",(function(e){n(e)}))}));return this.worker.postMessage({command:"export-wav"}),t}},{key:"_setupAudioProcessing",value:function(e){var t=this;this.stream=e;var n=window.AudioContext||window.webkitAudioContext;this.audioContext=new n,this.scriptProcessorNode=this.audioContext.createScriptProcessor(this.config.bufferLength,this.config.numChannels,this.config.numChannels),this.scriptProcessorNode.onaudioprocess=function(e){t.state===$i&&t.worker.postMessage({command:"record",buffer:[e.inputBuffer.getChannelData(0)]})};var r=this.audioContext.createAnalyser();r.minDecibels=-90,r.maxDecibels=-10,r.smoothingTimeConstant=.85,r.fftSize=256,this.freqBufferLength=r.frequencyBinCount,this.freqDataArray=new Uint8Array(this.freqBufferLength),this.freqAnalyser=r,this.sourceNode=this.audioContext.createMediaStreamSource(e),this.sourceNode.connect(this.freqAnalyser),this.freqAnalyser.connect(this.scriptProcessorNode),this.scriptProcessorNode.connect(this.audioContext.destination)}},{key:"getAverageMicFrequency",value:function(){return this.freqAnalyser.getByteFrequencyData(this.freqDataArray),this.freqDataArray.reduce((function(e,t){return e+t}),0)/this.freqBufferLength}},{key:"grabMic",value:function(){var e=this;return this.supported()?(void 0===this.userMedia&&(this.userMedia=navigator.mediaDevices.getUserMedia({audio:!0}).then((function(t){e._setupAudioProcessing(t),e.worker.postMessage({command:"init",config:{sampleRate:e.sourceNode.context.sampleRate,numChannels:e.config.numChannels}})})).catch((function(t){var n="blocked";return t.name&&-1!==["NotSupportedError","NotSupportedError","NotAllowedError"].indexOf(t.name)&&(n="insecure-not-allowed"),delete e.userMedia,Promise.reject(n)}))),this.userMedia):Promise.reject()}},{key:"start",value:function(){var e=this;this.grabMic().then((function(){e._setState($i)})).catch((function(t){e.trigger(t)}))}},{key:"stop",value:function(){this._setState(Wi)}},{key:"supported",value:function(){return(void 0!==window.AudioContext||void 0!==window.webkitAudioContext)&&navigator.mediaDevices&&navigator.mediaDevices.getUserMedia}},{key:"releaseMic",value:function(){this._setState(Wi),this.worker.postMessage({command:"clear"}),this.stream.getAudioTracks().forEach((function(e){return e.stop()})),this.sourceNode.disconnect(),this.scriptProcessorNode.disconnect(),"closed"!==this.audioContext.state&&this.audioContext.close(),delete this.userMedia}},{key:"_setState",value:function(e){this.state=e,this.trigger(this.state)}}],t&&zi(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),i}();function Xi(e){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xi(e)}function qi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}const Ki=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n;return t=e,n=[{key:"extend",value:function(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[e].hasOwnProperty(t)&&("object"===Xi(arguments[0][t])&&"object"===Xi(arguments[e][t])?this.extend(arguments[0][t],arguments[e][t]):arguments[0][t]=arguments[e][t]);return arguments[0]}}],null&&qi(t.prototype,null),n&&qi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ji(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zi(Object(n),!0).forEach((function(t){Qi(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function es(e,t,n){return t&&Yi(e.prototype,t),n&&Yi(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var ts=es((function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),H5P.EventDispatcher.call(this),t=Ki.extend({l10n:{recordAnswer:"Record",pause:"Pause",continue:"Continue",download:"Download",done:"Done",retry:"Retry",microphoneNotSupported:"Microphone not supported. Make sure you are using a browser that allows microphone recording.",microphoneInaccessible:"Microphone is not accessible. Make sure that the browser microphone is enabled.",insecureNotAllowed:"Access to microphone is not allowed in your browser since this page is not served using HTTPS. Please contact the author, and ask him to make this available using HTTPS",statusReadyToRecord:"Press a button below to record your answer.",statusRecording:"Recording...",statusPaused:"Recording paused. Press a button to continue recording.",statusFinishedRecording:"You have successfully recorded your answer! Listen to the recording below.",downloadRecording:"Download this recording or retry.",retryDialogHeaderText:"Retry recording?",retryDialogBodyText:'By pressing "Retry" you will lose your current recording.',retryDialogConfirmText:"Retry",retryDialogCancelText:"Cancel",statusCantCreateTheAudioFile:"Can't create the audio file."}},t);var o=document.createElement("div");o.classList.add("h5p-audio-recorder");var i,s=this.recorder=new Hi,a={};a[_i]=t.l10n.microphoneNotSupported,a[wi]=t.l10n.microphoneInaccessible,a[Si]=t.l10n.statusReadyToRecord,a[Oi]=t.l10n.statusRecording,a[Ai]=t.l10n.statusPaused,a[Ei]=t.l10n.statusFinishedRecording,a[xi]=t.l10n.insecureNotAllowed,a[Ci]=t.l10n.statusCantCreateTheAudioFile;var c=this;Mi.data=function(){return{title:t.title,state:s.supported()?Si:_i,statusMessages:a,l10n:t.l10n,audioSrc:"",audioFilename:"",avgMicFrequency:0,isSubcontent:!c.hasOwnProperty("isRoot")||!c.isRoot()}};var l=((...e)=>{const t=(Ho||(Ho=Ar($o))).createApp(...e),{mount:n}=t;return t.mount=e=>{const r=function(e){return k(e)?document.querySelector(e):e}(e);if(!r)return;const o=t._component;C(o)||o.render||o.template||(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t})(Ji(Ji({},Mi),{},{components:{timer:Fi,vuMeter:Ii}}),{onRecording:function(){s.start()},onDone:function(){s.stop(),s.getWavURL().then((function(e){if(s.releaseMic(),i.$data.audioSrc=e,t.title&&t.title.length>0){var n=t.title.substr(0,20);i.$data.audioFilename=n.toLowerCase().replace(/ /g,"-")+".wav"}c.trigger("resize")})).catch((function(e){i.$data.state=Ci,console.error(t.l10n.statusCantCreateTheAudioFile,e)}))},onRetry:function(){s.releaseMic(),i.$data.audioSrc=""},onPaused:function(){s.stop()},onResize:function(){c.trigger("resize")}});this.on("resize",(function(){i.resize()})),s.on("recording",(function(){i.$data.state=Oi,r.updateMicFrequency()})),s.on("blocked",(function(){i.$data.state=wi})),s.on("insecure-not-allowed",(function(){i.$data.state=xi})),this.updateMicFrequency=function(){var e=this;i.$data.state===Oi?(i.$data.avgMicFrequency=s.getAverageMicFrequency(),setTimeout((function(){e.animateVUMeter=window.requestAnimationFrame((function(){e.updateMicFrequency()}))}),10)):window.cancelAnimationFrame(this.animateVUMeter)},this.attach=function(e){e.get(0).appendChild(o),i=l.mount(o)}}))},343:(e,t,n)=>{"use strict";var r=n(897),o=n(179),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},179:(e,t,n)=>{"use strict";var r=n(499),o=n(897),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),a=o("%Reflect.apply%",!0)||r.call(s,i),c=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=a(r,s,arguments);return c&&l&&c(t,"length").configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var p=function(){return a(r,i,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},903:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(645),o=n.n(r),i=n(278),s=n.n(i)()(o());s.push([e.id,'.h5p-content:not(.using-mouse) .h5p-audio-recorder-view .button:focus{outline:0;box-shadow:.06em 0 .6em .1em #7bc1f9}.h5p-audio-recorder-view{font-size:1em;padding:.9em;text-align:center;font-family:Arial,"Open Sans",sans-serif}.h5p-audio-recorder-view [class^=fa-]{font-family:"H5PFontAwesome4"}.h5p-audio-recorder-view .fa-microphone{width:60%;height:60%;left:50%;top:50%;transform:translate(-50%, -50%);position:absolute;font-size:2.5em;border-radius:50%;background-color:#fff;line-height:2.5em}.h5p-audio-recorder-view .h5p-audio-recorder-player{box-sizing:border-box;margin:1.25em 1em 0 1em}.h5p-audio-recorder-view .h5p-audio-recorder-player audio{width:100%}.h5p-audio-recorder-view .title{color:#000;font-size:1.25em;margin-bottom:1em;line-height:1.5em}.h5p-audio-recorder-view .icon-download:before{font-family:"H5PFontIcons";content:""}.h5p-audio-recorder-view [role=status]{background-color:#f8f8f8;color:#777;padding:.6em}.h5p-audio-recorder-view [role=status].recording{background-color:#f9e5e6;color:#da5254}.h5p-audio-recorder-view [role=status].done{background-color:#e0f9e3;color:#20603d}.h5p-audio-recorder-view [role=status].blocked,.h5p-audio-recorder-view [role=status].unsupported,.h5p-audio-recorder-view [role=status].insecure-not-allowed,.h5p-audio-recorder-view [role=status].cant-create-audio-file{background-color:#db8b8b;color:#000}.h5p-audio-recorder-view .h5p-audio-recorder-download{font-size:1.2em;padding:2em}.h5p-audio-recorder-view .h5p-confirmation-dialog-popup{top:5em;width:35em;max-width:100%;min-width:0}.h5p-audio-recorder-view .button-row{margin-bottom:1em}.h5p-audio-recorder-view .button-row .button-row-double{width:100%}.h5p-audio-recorder-view .button-row .button-row-left{text-align:right;flex:1}.h5p-audio-recorder-view .button-row .button-row-right{text-align:left;flex:1}.h5p-audio-recorder-view .button{font-size:1.042em;font-family:"Open Sans",sans-serif;padding:.708em 1.25em;border-radius:2em;margin:0 .5em;border:0;display:inline-block;cursor:pointer;text-decoration:none;font-weight:600;white-space:nowrap}.h5p-audio-recorder-view .button [class^=fa-]{font-weight:400}.h5p-audio-recorder-view .button.small{font-size:.85em}.h5p-audio-recorder-view .button.done{background-color:#fff;color:#1f824c;border:2px solid #1f824c;box-sizing:border-box}.h5p-audio-recorder-view .button.done:hover{color:#29ab64;border-color:#29ab64}.h5p-audio-recorder-view .button.done:active{color:#155934;border-color:#155934}.h5p-audio-recorder-view .button.done[disabled],.h5p-audio-recorder-view .button.done[aria-disabled]{color:#8ae3b2;border-color:#8ae3b2}.h5p-audio-recorder-view .button.retry{background-color:#5e5e5e;color:#fff;border-color:#5e5e5e;border:2px solid #5e5e5e;box-sizing:border-box}.h5p-audio-recorder-view .button.retry:hover{background-color:#515151;border-color:#515151}.h5p-audio-recorder-view .button.retry:active{background-color:#454545;border-color:#454545}.h5p-audio-recorder-view .button.retry[disabled]{background-color:#c4c4c4;border-color:#c4c4c4}.h5p-audio-recorder-view .button.record{background-color:#d95354;color:#fff;border-color:#d95354;border:2px solid #d95354;box-sizing:border-box}.h5p-audio-recorder-view .button.record:hover{background-color:#d43e3f;border-color:#d43e3f}.h5p-audio-recorder-view .button.record:active{background-color:#cc2d2e;border-color:#cc2d2e}.h5p-audio-recorder-view .button.record[disabled]{background-color:#fefafa;border-color:#fefafa}.h5p-audio-recorder-view .button.download{background-color:#1f824c;color:#fff;border-color:#1f824c;border:2px solid #1f824c;box-sizing:border-box}.h5p-audio-recorder-view .button.download:hover{background-color:#1a6d40;border-color:#1a6d40}.h5p-audio-recorder-view .button.download:active{background-color:#155934;border-color:#155934}.h5p-audio-recorder-view .button.download[disabled]{background-color:#8ae3b2;border-color:#8ae3b2}.h5p-audio-recorder-view .button.pause{background-color:#fff;color:#d95354;border:2px solid #d95354;box-sizing:border-box}.h5p-audio-recorder-view .button.pause:hover{color:#e27d7e;border-color:#e27d7e}.h5p-audio-recorder-view .button.pause:active{color:#cc2d2e;border-color:#cc2d2e}.h5p-audio-recorder-view .button.pause[disabled],.h5p-audio-recorder-view .button.pause[aria-disabled]{color:#fefafa;border-color:#fefafa}.h5p-audio-recorder-view .button.small-screen .label{display:none}.h5p-audio-recorder-view .button:not(.small-screen) [class^=fa-]{margin-right:.4em}.h5p-audio-recorder-view .button:not(.small-screen).record,.h5p-audio-recorder-view .button:not(.small-screen).pause{min-width:8.2em}',""]);const a=s},822:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(645),o=n.n(r),i=n(278),s=n.n(i)()(o());s.push([e.id,'.audio-recorder-timer{font-family:"Open Sans",sans-serif;font-size:2.5em;font-weight:600;color:#8f8f8f;margin:1em 0}',""]);const a=s},68:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(645),o=n.n(r),i=n(278),s=n.n(i),a=n(21),c=n.n(a),l=new URL(n(790),n.b),u=s()(o()),p=c()(l);u.push([e.id,".recording-indicator-wrapper{height:9.375em;width:9.375em;margin-left:auto;margin-right:auto;line-height:9.375em;color:#8e8e8e;position:relative;margin-bottom:1em}.h5p-audio-recorder-vu-meter{height:100%;width:100%;background-image:url("+p+");position:absolute;transform:scale(0.8)}.h5p-audio-recorder-vu-meter.hidden{display:none}",""]);const f=u},278:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&s[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},21:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},645:e=>{"use strict";e.exports=function(e){return e[1]}},827:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}y(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,i,s,l;if(a(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):h(o,o.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function y(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var l=c.length,u=h(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},i.prototype.addListener=function(e,t){return l(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return l(this,e,t,!0)},i.prototype.once=function(e,t){return a(t),this.on(e,p(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,p(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return f(this,e,!0)},i.prototype.rawListeners=function(e){return f(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},270:(e,t,n)=>{"use strict";var r=n(916),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=n),"[object Array]"===o.call(e)?function(e,t,n){for(var r=0,o=e.length;r<o;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s):"string"==typeof e?function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,s):function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s)}},845:e=>{"use strict";var t=Array.prototype.slice,n=Object.prototype.toString;e.exports=function(e){var r=this;if("function"!=typeof r||"[object Function]"!==n.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var o,i=t.call(arguments,1),s=Math.max(0,r.length-i.length),a=[],c=0;c<s;c++)a.push("$"+c);if(o=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var n=r.apply(this,i.concat(t.call(arguments)));return Object(n)===n?n:this}return r.apply(e,i.concat(t.call(arguments)))})),r.prototype){var l=function(){};l.prototype=r.prototype,o.prototype=new l,l.prototype=null}return o}},499:(e,t,n)=>{"use strict";var r=n(845);e.exports=Function.prototype.bind||r},897:(e,t,n)=>{"use strict";var r,o=SyntaxError,i=Function,s=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new s},u=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,p=n(923)(),f=Object.getPrototypeOf||function(e){return e.__proto__},d={},h="undefined"==typeof Uint8Array?r:f(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?f(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},m=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=f(o.prototype))}return y[t]=n,n},g={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(499),b=n(66),_=v.call(Function.call,Array.prototype.concat),w=v.call(Function.apply,Array.prototype.splice),S=v.call(Function.call,String.prototype.replace),O=v.call(Function.call,String.prototype.slice),A=v.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,C=function(e,t){var n,r=e;if(b(g,r)&&(r="%"+(n=g[r])[0]+"%"),b(y,r)){var i=y[r];if(i===d&&(i=m(r)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/g,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=O(e,0,1),n=O(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return S(e,E,(function(e,t,n,o){r[r.length]=n?S(o,x,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=C("%"+r+"%",t),a=i.name,l=i.value,u=!1,p=i.alias;p&&(r=p[0],w(n,_([0,1],p)));for(var f=1,d=!0;f<n.length;f+=1){var h=n[f],m=O(h,0,1),g=O(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===g||"'"===g||"`"===g)&&m!==g)throw new o("property names with quotes must have matching quotes");if("constructor"!==h&&d||(u=!0),b(y,a="%"+(r+="."+h)+"%"))l=y[a];else if(null!=l){if(!(h in l)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&f+1>=n.length){var v=c(l,h);l=(d=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:l[h]}else d=b(l,h),l=l[h];d&&!u&&(y[a]=l)}}return l}},923:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(361);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},361:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},432:(e,t,n)=>{"use strict";var r=n(361);e.exports=function(){return r()&&!!Symbol.toStringTag}},66:(e,t,n)=>{"use strict";var r=n(499);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},198:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},456:(e,t,n)=>{"use strict";var r=n(432)(),o=n(343)("Object.prototype.toString"),i=function(e){return!(r&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=s,e.exports=a?i:s},916:e=>{"use strict";var t,n,r=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o((function(){throw 42}),null,t)}catch(e){e!==n&&(o=null)}else o=null;var i=/^\s*class\b/,s=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},a=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{};e.exports=o?function(e){if(e===l)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;try{o(e,null,t)}catch(e){if(e!==n)return!1}return!s(e)}:function(e){if(e===l)return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if("function"==typeof e&&!e.prototype)return!0;if(c)return function(e){try{return!s(e)&&(r.call(e),!0)}catch(e){return!1}}(e);if(s(e))return!1;var t=a.call(e);return"[object Function]"===t||"[object GeneratorFunction]"===t}},940:(e,t,n)=>{"use strict";var r,o=Object.prototype.toString,i=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=n(432)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(i.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===o.call(e);if(!c)return!1;if(void 0===r){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();r=!!t&&c(t)}return c(e)===r}},116:(e,t,n)=>{"use strict";var r=n(270),o=n(847),i=n(343),s=i("Object.prototype.toString"),a=n(432)(),c="undefined"==typeof globalThis?n.g:globalThis,l=o(),u=i("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},p=i("String.prototype.slice"),f={},d=n(560),h=Object.getPrototypeOf;a&&d&&h&&r(l,(function(e){var t=new c[e];if(Symbol.toStringTag in t){var n=h(t),r=d(n,Symbol.toStringTag);if(!r){var o=h(n);r=d(o,Symbol.toStringTag)}f[e]=r.get}})),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=p(s(e),8,-1);return u(l,t)>-1}return!!d&&function(e){var t=!1;return r(f,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}},887:(e,t,n)=>{var r=n(827).EventEmitter,o=n(877).inherits;e.exports=s;var i={};function s(e){r.call(this),this._total=0,this._start=null,this._startCount=0,e&&this.start()}function a(){return(new Date).getTime()}o(s,r),s.get=function(e){return i[e]||(i[e]=new s),i[e]},s.destroy=function(e){return!!i[e]&&delete i[e]},s.prototype.time=function(){return this._total+this.timeFromStart()},s.prototype.emitTime=function(){var e=this.time();return this.emit("time",e),e},s.prototype.timeFromStart=function(){return this.isStarted()?a()-this._start:0},s.prototype.isStarted=function(){return!this.isStopped()},s.prototype.isStopped=function(){return null===this._start},s.prototype.start=function(){return++this._startCount,!!this.isStopped()&&(this._start=a(),this.emit("start"),!0)},s.prototype.stop=function(){return!!this.isStarted()&&(this._total+=this.timeFromStart(),this._start=null,this._stopCount=0,this.emit("stop"),!0)},s.prototype.stopParallel=function(){return!(!this.isStarted()||(--this._startCount,0!==this._startCount))&&this.stop()},s.prototype.toggle=function(){return this.start()||this.stop()},s.prototype.toString=function(){return this.time()+"ms"},s.prototype.valueOf=function(){return this.time()}},171:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},28:(e,t,n)=>{"use strict";var r=n(456),o=n(940),i=n(59),s=n(116);function a(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,u=a(Object.prototype.toString),p=a(Number.prototype.valueOf),f=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(c)var h=a(BigInt.prototype.valueOf);if(l)var y=a(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===u(e)}function v(e){return"[object Set]"===u(e)}function b(e){return"[object WeakMap]"===u(e)}function _(e){return"[object WeakSet]"===u(e)}function w(e){return"[object ArrayBuffer]"===u(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function O(e){return"[object DataView]"===u(e)}function A(e){return"undefined"!=typeof DataView&&(O.working?O(e):e instanceof DataView)}t.isArgumentsObject=r,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},g.working="undefined"!=typeof Map&&g(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},_.working="undefined"!=typeof WeakSet&&_(new WeakSet),t.isWeakSet=function(e){return _(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=S,O.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&O(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function x(e){return"[object SharedArrayBuffer]"===u(e)}function C(e){return void 0!==E&&(void 0===x.working&&(x.working=x(new E)),x.working?x(e):e instanceof E)}function k(e){return m(e,p)}function j(e){return m(e,f)}function P(e){return m(e,d)}function M(e){return c&&m(e,h)}function N(e){return l&&m(e,y)}t.isSharedArrayBuffer=C,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},t.isGeneratorObject=function(e){return"[object Generator]"===u(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},t.isNumberObject=k,t.isStringObject=j,t.isBooleanObject=P,t.isBigIntObject=M,t.isSymbolObject=N,t.isBoxedPrimitive=function(e){return k(e)||j(e)||P(e)||M(e)||N(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||C(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},877:(e,t,n)=>{var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(c(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),a=r[n];n<i;a=r[++n])m(a)||!w(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,n){if("undefined"!=typeof process&&!0===process.noDeprecation)return e;if("undefined"==typeof process)return function(){return t.deprecate(e,n).apply(this,arguments)};var r=!1;return function(){if(!r){if(process.throwDeprecation)throw new Error(n);process.traceDeprecation?console.trace(n):console.error(n),r=!0}return e.apply(this,arguments)}};var i={},s=/^$/;if({LESSOPEN:"| /usr/bin/lesspipe %s",USER:"fnoks",LC_TIME:"nb_NO.UTF-8",npm_config_user_agent:"npm/9.6.7 node/v18.17.1 linux x64 workspaces/false",SSH_AGENT_PID:"154431",XDG_SESSION_TYPE:"x11",npm_node_execpath:"/home/fnoks/.nvm/versions/node/v18.17.1/bin/node",SHLVL:"2",npm_config_noproxy:"",HOME:"/home/fnoks",OLDPWD:"/home/fnoks/h5p-libs/h5p-editor-branching-scenario",DESKTOP_SESSION:"ubuntu",NVM_BIN:"/home/fnoks/.nvm/versions/node/v18.17.1/bin",npm_package_json:"/home/fnoks/projects/libs/h5p-audio-recorder/package.json",NVM_INC:"/home/fnoks/.nvm/versions/node/v18.17.1/include/node",GNOME_SHELL_SESSION_MODE:"ubuntu",GTK_MODULES:"gail:atk-bridge",ZENDESK_EMAIL:"pal.jorgensen@h5p.group",LC_MONETARY:"nb_NO.UTF-8",npm_config_userconfig:"/home/fnoks/.npmrc",npm_config_local_prefix:"/home/fnoks/projects/libs/h5p-audio-recorder",SYSTEMD_EXEC_PID:"10063",ZENDESK_SUBDOMAIN:"h5p",DBUS_SESSION_BUS_ADDRESS:"unix:path=/run/user/1000/bus",COLORTERM:"truecolor",COLOR:"1",NVM_DIR:"/home/fnoks/.nvm",npm_config_metrics_registry:"https://registry.npmjs.org/",GTK_IM_MODULE:"ibus",ZIPOPT:"-D",LOGNAME:"fnoks",_:"/home/fnoks/.nvm/versions/node/v18.17.1/bin/npm",npm_config_prefix:"/home/fnoks/.nvm/versions/node/v18.17.1",XDG_SESSION_CLASS:"user",USERNAME:"fnoks",TERM:"xterm-256color",npm_config_cache:"/home/fnoks/.npm",GNOME_DESKTOP_SESSION_ID:"this-is-deprecated",WINDOWPATH:"2",npm_config_node_gyp:"/home/fnoks/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/fnoks/projects/libs/h5p-audio-recorder/node_modules/.bin:/home/fnoks/projects/libs/node_modules/.bin:/home/fnoks/projects/node_modules/.bin:/home/fnoks/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/fnoks/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/fnoks/.nvm/versions/node/v18.17.1/bin:/home/fnoks/.local/bin:/home/fnoks/projects/scripts:/home/fnoks/projects/h5pcom/h5pcom-tools:/usr/local/bin:/home/fnoks/.ebcli-virtual-env/executables:/home/fnoks/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin",SESSION_MANAGER:"local/fnoks-XPS-15-9520:@/tmp/.ICE-unix/3977,unix/fnoks-XPS-15-9520:/tmp/.ICE-unix/3977",NODE:"/home/fnoks/.nvm/versions/node/v18.17.1/bin/node",npm_package_name:"h5p-audio-recorder",XDG_MENU_PREFIX:"gnome-",LC_ADDRESS:"nb_NO.UTF-8",GNOME_TERMINAL_SCREEN:"/org/gnome/Terminal/screen/a2fe03f9_717f_4559_b315_bfa81a9f6c81",XDG_RUNTIME_DIR:"/run/user/1000",DISPLAY:":1",LANG:"en_US.UTF-8",XDG_CURRENT_DESKTOP:"ubuntu:GNOME",LC_TELEPHONE:"nb_NO.UTF-8",XMODIFIERS:"@im=ibus",XDG_SESSION_DESKTOP:"ubuntu",XAUTHORITY:"/run/user/1000/gdm/Xauthority",LS_COLORS:"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:",GNOME_TERMINAL_SERVICE:":1.180",npm_lifecycle_script:"webpack --mode=production",SSH_AGENT_LAUNCHER:"gnome-keyring",SSH_AUTH_SOCK:"/tmp/ssh-XXXXXXnUlj1m/agent.154430",SHELL:"/bin/bash",LC_NAME:"nb_NO.UTF-8",npm_package_version:"1.0.0",npm_lifecycle_event:"build",QT_ACCESSIBILITY:"1",AWS_USERNAME:"pal.jorgensen",GDMSESSION:"ubuntu",LESSCLOSE:"/usr/bin/lesspipe %s %s",LC_MEASUREMENT:"nb_NO.UTF-8",GPG_AGENT_INFO:"/run/user/1000/gnupg/S.gpg-agent:0:1",LC_IDENTIFICATION:"nb_NO.UTF-8",QT_IM_MODULE:"ibus",npm_config_globalconfig:"/home/fnoks/.nvm/versions/node/v18.17.1/etc/npmrc",npm_config_init_module:"/home/fnoks/.npm-init.js",PWD:"/home/fnoks/h5p-libs/h5p-audio-recorder",npm_execpath:"/home/fnoks/.nvm/versions/node/v18.17.1/lib/node_modules/npm/bin/npm-cli.js",XDG_CONFIG_DIRS:"/etc/xdg/xdg-ubuntu:/etc/xdg",NVM_CD_FLAGS:"",XDG_DATA_DIRS:"/usr/share/ubuntu:/usr/share/gnome:/home/fnoks/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop",npm_config_global_prefix:"/home/fnoks/.nvm/versions/node/v18.17.1",ZENDESK_API_TOKEN:"3maeHcp7Bh5hZIWqqcIrNSryhuO7oSbaK4xcemQ4",LC_NUMERIC:"nb_NO.UTF-8",npm_command:"run-script",LC_PAPER:"nb_NO.UTF-8",VTE_VERSION:"6800",INIT_CWD:"/home/fnoks/projects/libs/h5p-audio-recorder",EDITOR:"vi"}.NODE_DEBUG){var a={LESSOPEN:"| /usr/bin/lesspipe %s",USER:"fnoks",LC_TIME:"nb_NO.UTF-8",npm_config_user_agent:"npm/9.6.7 node/v18.17.1 linux x64 workspaces/false",SSH_AGENT_PID:"154431",XDG_SESSION_TYPE:"x11",npm_node_execpath:"/home/fnoks/.nvm/versions/node/v18.17.1/bin/node",SHLVL:"2",npm_config_noproxy:"",HOME:"/home/fnoks",OLDPWD:"/home/fnoks/h5p-libs/h5p-editor-branching-scenario",DESKTOP_SESSION:"ubuntu",NVM_BIN:"/home/fnoks/.nvm/versions/node/v18.17.1/bin",npm_package_json:"/home/fnoks/projects/libs/h5p-audio-recorder/package.json",NVM_INC:"/home/fnoks/.nvm/versions/node/v18.17.1/include/node",GNOME_SHELL_SESSION_MODE:"ubuntu",GTK_MODULES:"gail:atk-bridge",ZENDESK_EMAIL:"pal.jorgensen@h5p.group",LC_MONETARY:"nb_NO.UTF-8",npm_config_userconfig:"/home/fnoks/.npmrc",npm_config_local_prefix:"/home/fnoks/projects/libs/h5p-audio-recorder",SYSTEMD_EXEC_PID:"10063",ZENDESK_SUBDOMAIN:"h5p",DBUS_SESSION_BUS_ADDRESS:"unix:path=/run/user/1000/bus",COLORTERM:"truecolor",COLOR:"1",NVM_DIR:"/home/fnoks/.nvm",npm_config_metrics_registry:"https://registry.npmjs.org/",GTK_IM_MODULE:"ibus",ZIPOPT:"-D",LOGNAME:"fnoks",_:"/home/fnoks/.nvm/versions/node/v18.17.1/bin/npm",npm_config_prefix:"/home/fnoks/.nvm/versions/node/v18.17.1",XDG_SESSION_CLASS:"user",USERNAME:"fnoks",TERM:"xterm-256color",npm_config_cache:"/home/fnoks/.npm",GNOME_DESKTOP_SESSION_ID:"this-is-deprecated",WINDOWPATH:"2",npm_config_node_gyp:"/home/fnoks/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/fnoks/projects/libs/h5p-audio-recorder/node_modules/.bin:/home/fnoks/projects/libs/node_modules/.bin:/home/fnoks/projects/node_modules/.bin:/home/fnoks/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/home/fnoks/.nvm/versions/node/v18.17.1/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/fnoks/.nvm/versions/node/v18.17.1/bin:/home/fnoks/.local/bin:/home/fnoks/projects/scripts:/home/fnoks/projects/h5pcom/h5pcom-tools:/usr/local/bin:/home/fnoks/.ebcli-virtual-env/executables:/home/fnoks/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin",SESSION_MANAGER:"local/fnoks-XPS-15-9520:@/tmp/.ICE-unix/3977,unix/fnoks-XPS-15-9520:/tmp/.ICE-unix/3977",NODE:"/home/fnoks/.nvm/versions/node/v18.17.1/bin/node",npm_package_name:"h5p-audio-recorder",XDG_MENU_PREFIX:"gnome-",LC_ADDRESS:"nb_NO.UTF-8",GNOME_TERMINAL_SCREEN:"/org/gnome/Terminal/screen/a2fe03f9_717f_4559_b315_bfa81a9f6c81",XDG_RUNTIME_DIR:"/run/user/1000",DISPLAY:":1",LANG:"en_US.UTF-8",XDG_CURRENT_DESKTOP:"ubuntu:GNOME",LC_TELEPHONE:"nb_NO.UTF-8",XMODIFIERS:"@im=ibus",XDG_SESSION_DESKTOP:"ubuntu",XAUTHORITY:"/run/user/1000/gdm/Xauthority",LS_COLORS:"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:",GNOME_TERMINAL_SERVICE:":1.180",npm_lifecycle_script:"webpack --mode=production",SSH_AGENT_LAUNCHER:"gnome-keyring",SSH_AUTH_SOCK:"/tmp/ssh-XXXXXXnUlj1m/agent.154430",SHELL:"/bin/bash",LC_NAME:"nb_NO.UTF-8",npm_package_version:"1.0.0",npm_lifecycle_event:"build",QT_ACCESSIBILITY:"1",AWS_USERNAME:"pal.jorgensen",GDMSESSION:"ubuntu",LESSCLOSE:"/usr/bin/lesspipe %s %s",LC_MEASUREMENT:"nb_NO.UTF-8",GPG_AGENT_INFO:"/run/user/1000/gnupg/S.gpg-agent:0:1",LC_IDENTIFICATION:"nb_NO.UTF-8",QT_IM_MODULE:"ibus",npm_config_globalconfig:"/home/fnoks/.nvm/versions/node/v18.17.1/etc/npmrc",npm_config_init_module:"/home/fnoks/.npm-init.js",PWD:"/home/fnoks/h5p-libs/h5p-audio-recorder",npm_execpath:"/home/fnoks/.nvm/versions/node/v18.17.1/lib/node_modules/npm/bin/npm-cli.js",XDG_CONFIG_DIRS:"/etc/xdg/xdg-ubuntu:/etc/xdg",NVM_CD_FLAGS:"",XDG_DATA_DIRS:"/usr/share/ubuntu:/usr/share/gnome:/home/fnoks/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop",npm_config_global_prefix:"/home/fnoks/.nvm/versions/node/v18.17.1",ZENDESK_API_TOKEN:"3maeHcp7Bh5hZIWqqcIrNSryhuO7oSbaK4xcemQ4",LC_NUMERIC:"nb_NO.UTF-8",npm_command:"run-script",LC_PAPER:"nb_NO.UTF-8",VTE_VERSION:"6800",INIT_CWD:"/home/fnoks/projects/libs/h5p-audio-recorder",EDITOR:"vi"}.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+a+"$","i")}function c(e,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),p(r,e,r.depth)}function l(e,t){var n=c.styles[t];return n?"["+c.colors[n][0]+"m"+e+"["+c.colors[n][1]+"m":e}function u(e,t){return e}function p(e,n,r){if(e.customInspect&&n&&A(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return v(o)||(o=p(e,o,r)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):y(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,n);if(i)return i;var s=Object.keys(n),a=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(n)),O(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(n);if(0===s.length){if(A(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(_(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return e.stylize(Date.prototype.toString.call(n),"date");if(O(n))return f(n)}var l,u="",w=!1,E=["{","}"];return h(n)&&(w=!0,E=["[","]"]),A(n)&&(u=" [Function"+(n.name?": "+n.name:"")+"]"),_(n)&&(u=" "+RegExp.prototype.toString.call(n)),S(n)&&(u=" "+Date.prototype.toUTCString.call(n)),O(n)&&(u=" "+f(n)),0!==s.length||w&&0!=n.length?r<0?_(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),l=w?function(e,t,n,r,o){for(var i=[],s=0,a=t.length;s<a;++s)k(t,String(s))?i.push(d(e,t,n,r,String(s),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,n,r,o,!0))})),i}(e,n,r,a,s):s.map((function(t){return d(e,n,r,a,t,w)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(l,u,E)):E[0]+u+E[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),k(r,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=m(n)?p(e,c.value,null):p(e,c.value,n-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+a.split("\n").map((function(e){return"   "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function _(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"==typeof e&&null!==e}function S(e){return w(e)&&"[object Date]"===E(e)}function O(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function A(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!i[e])if(s.test(e)){var n=process.pid;i[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else i[e]=function(){};return i[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=n(28),t.isArray=h,t.isBoolean=y,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=_,t.types.isRegExp=_,t.isObject=w,t.isDate=S,t.types.isDate=S,t.isError=O,t.types.isNativeError=O,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(171);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;console.log("%s - %s",(n=[x((e=new Date).getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),C[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(198),t._extend=function(e,t){if(!t||!w(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(j&&e[j]){var t;if("function"!=typeof(t=e[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),j&&Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=j,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);var r=t.pop();if("function"!=typeof r)throw new TypeError("The last argument must be of type Function");var o=this,i=function(){return r.apply(o,arguments)};e.apply(this,t).then((function(e){process.nextTick(i.bind(null,null,e))}),(function(e){process.nextTick(P.bind(null,e,i))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,r(e)),t}},890:(e,t)=>{"use strict";t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,r]of t)n[e]=r;return n}},668:(e,t,n)=>{var r=n(903);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,n(642).A)("5dcc9be9",r,!1,{})},813:(e,t,n)=>{var r=n(822);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,n(642).A)("28c669e3",r,!1,{})},447:(e,t,n)=>{var r=n(68);r.__esModule&&(r=r.default),"string"==typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals),(0,n(642).A)("4ca8745e",r,!1,{})},642:(e,t,n)=>{"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],s=i[0],a={id:e+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}n.d(t,{A:()=>h});var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},s=o&&(document.head||document.getElementsByTagName("head")[0]),a=null,c=0,l=!1,u=function(){},p=null,f="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(e,t,n,o){l=n,p=o||{};var s=r(e,t);return y(s),function(t){for(var n=[],o=0;o<s.length;o++){var a=s[o];(c=i[a.id]).refs--,n.push(c)}for(t?y(s=r(e,t)):s=[],o=0;o<n.length;o++){var c;if(0===(c=n[o]).refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete i[c.id]}}}}function y(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(g(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(g(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:s}}}}function m(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function g(e){var t,n,r=document.querySelector("style["+f+'~="'+e.id+'"]');if(r){if(l)return u;r.parentNode.removeChild(r)}if(d){var o=c++;r=a||(a=m()),t=_.bind(null,r,o,!1),n=_.bind(null,r,o,!0)}else r=m(),t=w.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var v,b=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function _(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function w(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),p.ssrId&&e.setAttribute(f,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},59:(e,t,n)=>{"use strict";var r=n(270),o=n(847),i=n(343),s=i("Object.prototype.toString"),a=n(432)(),c="undefined"==typeof globalThis?n.g:globalThis,l=o(),u=i("String.prototype.slice"),p={},f=n(560),d=Object.getPrototypeOf;a&&f&&d&&r(l,(function(e){if("function"==typeof c[e]){var t=new c[e];if(Symbol.toStringTag in t){var n=d(t),r=f(n,Symbol.toStringTag);if(!r){var o=d(n);r=f(o,Symbol.toStringTag)}p[e]=r.get}}}));var h=n(116);e.exports=function(e){return!!h(e)&&(a&&Symbol.toStringTag in e?function(e){var t=!1;return r(p,(function(n,r){if(!t)try{var o=n.call(e);o===r&&(t=o)}catch(e){}})),t}(e):u(s(e),8,-1))}},790:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMC4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAxMDUuNCAxMDUuNCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTA1LjQgMTA1LjQ7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MHtmaWxsOiNFREFCQjA7fQ0KPC9zdHlsZT4NCjx0aXRsZT5BcnRib2FyZCAxPC90aXRsZT4NCjxnPg0KCTxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01Mi43LDBDMjMuNiwwLDAsMjMuNiwwLDUyLjdzMjMuNiw1Mi43LDUyLjcsNTIuN2MyOS4xLDAsNTIuNy0yMy42LDUyLjctNTIuN0MxMDUuNCwyMy42LDgxLjgsMCw1Mi43LDB6DQoJCSBNNTIuNywxMDUuMmMtMjksMC01Mi41LTIzLjUtNTIuNS01Mi41UzIzLjcsMC4yLDUyLjcsMC4yczUyLjUsMjMuNSw1Mi41LDUyLjVDMTA1LjIsODEuNyw4MS43LDEwNS4yLDUyLjcsMTA1LjJ6Ii8+DQoJPHBhdGggY2xhc3M9InN0MCIgZD0iTTUyLjcsMTUuMkMzMiwxNS4yLDE1LjIsMzIsMTUuMiw1Mi43UzMyLDkwLjIsNTIuNyw5MC4yczM3LjUtMTYuOCwzNy41LTM3LjVjMCwwLDAsMCwwLDANCgkJQzkwLjEsMzIsNzMuNCwxNS4yLDUyLjcsMTUuMnoiLz4NCgk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNTIuNyw3LjhDMjcuOSw3LjgsNy44LDI3LjksNy44LDUyLjdzMjAuMSw0NC45LDQ0LjksNDQuOWMyNC44LDAsNDQuOS0yMC4xLDQ0LjktNDQuOQ0KCQlDOTcuNiwyNy45LDc3LjUsNy44LDUyLjcsNy44eiBNNTIuNyw5Ni42Yy0yNC4yLDAtNDMuOS0xOS43LTQzLjktNDMuOWMwLTI0LjIsMTkuNy00My45LDQzLjktNDMuOWMyNC4yLDAsNDMuOSwxOS42LDQzLjksNDMuOQ0KCQlDOTYuNiw3Ni45LDc2LjksOTYuNiw1Mi43LDk2LjZ6Ii8+DQo8L2c+DQo8L3N2Zz4NCg=="},847:(e,t,n)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}},560:(e,t,n)=>{"use strict";var r=n(897)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.b=document.baseURI||self.location.href,H5P=H5P||{},H5P.AudioRecorder=n(2).A})();;var H5P = H5P || {};

/**
 * Class responsible for creating a help text dialog
 */
H5P.JoubelHelpTextDialog = (function ($) {

  var numInstances = 0;
  /**
   * Display a pop-up containing a message.
   *
   * @param {H5P.jQuery}  $container  The container which message dialog will be appended to
   * @param {string}      message     The message
   * @param {string}      closeButtonTitle The title for the close button
   * @return {H5P.jQuery}
   */
  function JoubelHelpTextDialog(header, message, closeButtonTitle) {
    H5P.EventDispatcher.call(this);

    var self = this;

    numInstances++;
    var headerId = 'joubel-help-text-header-' + numInstances;
    var helpTextId = 'joubel-help-text-body-' + numInstances;

    var $helpTextDialogBox = $('<div>', {
      'class': 'joubel-help-text-dialog-box',
      'role': 'dialog',
      'aria-labelledby': headerId,
      'aria-describedby': helpTextId
    });

    $('<div>', {
      'class': 'joubel-help-text-dialog-background'
    }).appendTo($helpTextDialogBox);

    var $helpTextDialogContainer = $('<div>', {
      'class': 'joubel-help-text-dialog-container'
    }).appendTo($helpTextDialogBox);

    $('<div>', {
      'class': 'joubel-help-text-header',
      'id': headerId,
      'role': 'header',
      'html': header
    }).appendTo($helpTextDialogContainer);

    $('<div>', {
      'class': 'joubel-help-text-body',
      'id': helpTextId,
      'html': message,
      'role': 'document',
      'tabindex': 0
    }).appendTo($helpTextDialogContainer);

    var handleClose = function () {
      $helpTextDialogBox.remove();
      self.trigger('closed');
    };

    var $closeButton = $('<div>', {
      'class': 'joubel-help-text-remove',
      'role': 'button',
      'title': closeButtonTitle,
      'tabindex': 1,
      'click': handleClose,
      'keydown': function (event) {
        // 32 - space, 13 - enter
        if ([32, 13].indexOf(event.which) !== -1) {
          event.preventDefault();
          handleClose();
        }
      }
    }).appendTo($helpTextDialogContainer);

    /**
     * Get the DOM element
     * @return {HTMLElement}
     */
    self.getElement = function () {
      return $helpTextDialogBox;
    };

    self.focus = function () {
      $closeButton.focus();
    };
  }

  JoubelHelpTextDialog.prototype = Object.create(H5P.EventDispatcher.prototype);
  JoubelHelpTextDialog.prototype.constructor = JoubelHelpTextDialog;

  return JoubelHelpTextDialog;
}(H5P.jQuery));
;var H5P = H5P || {};

/**
 * Class responsible for creating auto-disappearing dialogs
 */
H5P.JoubelMessageDialog = (function ($) {

  /**
   * Display a pop-up containing a message.
   *
   * @param {H5P.jQuery} $container The container which message dialog will be appended to
   * @param {string} message The message
   * @return {H5P.jQuery}
   */
  function JoubelMessageDialog ($container, message) {
    var timeout;

    var removeDialog = function () {
      $warning.remove();
      clearTimeout(timeout);
      $container.off('click.messageDialog');
    };

    // Create warning popup:
    var $warning = $('<div/>', {
      'class': 'joubel-message-dialog',
      text: message
    }).appendTo($container);

    // Remove after 3 seconds or if user clicks anywhere in $container:
    timeout = setTimeout(removeDialog, 3000);
    $container.on('click.messageDialog', removeDialog);

    return $warning;
  }

  return JoubelMessageDialog;
})(H5P.jQuery);
;var H5P = H5P || {};

/**
 * Class responsible for creating a circular progress bar
 */

H5P.JoubelProgressCircle = (function ($) {

  /**
   * Constructor for the Progress Circle
   *
   * @param {Number} number The amount of progress to display
   * @param {string} progressColor Color for the progress meter
   * @param {string} backgroundColor Color behind the progress meter
   */
  function ProgressCircle(number, progressColor, fillColor, backgroundColor) {
    progressColor = progressColor || '#1a73d9';
    fillColor = fillColor || '#f0f0f0';
    backgroundColor = backgroundColor || '#ffffff';
    var progressColorRGB = this.hexToRgb(progressColor);

    //Verify number
    try {
      number = Number(number);
      if (number === '') {
        throw 'is empty';
      }
      if (isNaN(number)) {
        throw 'is not a number';
      }
    } catch (e) {
      number = 'err';
    }

    //Draw circle
    if (number > 100) {
      number = 100;
    }

    // We can not use rgba, since they will stack on top of each other.
    // Instead we create the equivalent of the rgba color
    // and applies this to the activeborder and background color.
    var progressColorString = 'rgb(' + parseInt(progressColorRGB.r, 10) +
      ',' + parseInt(progressColorRGB.g, 10) +
      ',' + parseInt(progressColorRGB.b, 10) + ')';

    // Circle wrapper
    var $wrapper = $('<div/>', {
      'class': "joubel-progress-circle-wrapper"
    });

    //Active border indicates progress
    var $activeBorder = $('<div/>', {
      'class': "joubel-progress-circle-active-border"
    }).appendTo($wrapper);

    //Background circle
    var $backgroundCircle = $('<div/>', {
      'class': "joubel-progress-circle-circle"
    }).appendTo($activeBorder);

    //Progress text/number
    $('<span/>', {
      'text': number + '%',
      'class': "joubel-progress-circle-percentage"
    }).appendTo($backgroundCircle);

    var deg = number * 3.6;
    if (deg <= 180) {
      $activeBorder.css('background-image',
        'linear-gradient(' + (90 + deg) + 'deg, transparent 50%, ' + fillColor + ' 50%),' +
        'linear-gradient(90deg, ' + fillColor + ' 50%, transparent 50%)')
        .css('border', '2px solid' + backgroundColor)
        .css('background-color', progressColorString);
    } else {
      $activeBorder.css('background-image',
        'linear-gradient(' + (deg - 90) + 'deg, transparent 50%, ' + progressColorString + ' 50%),' +
        'linear-gradient(90deg, ' + fillColor + ' 50%, transparent 50%)')
        .css('border', '2px solid' + backgroundColor)
        .css('background-color', progressColorString);
    }

    this.$activeBorder = $activeBorder;
    this.$backgroundCircle = $backgroundCircle;
    this.$wrapper = $wrapper;

    this.initResizeFunctionality();

    return $wrapper;
  }

  /**
   * Initializes resize functionality for the progress circle
   */
  ProgressCircle.prototype.initResizeFunctionality = function () {
    var self = this;

    $(window).resize(function () {
      // Queue resize
      setTimeout(function () {
        self.resize();
      });
    });

    // First resize
    setTimeout(function () {
      self.resize();
    }, 0);
  };

  /**
   * Resize function makes progress circle grow or shrink relative to parent container
   */
  ProgressCircle.prototype.resize = function () {
    var $parent = this.$wrapper.parent();

    if ($parent !== undefined && $parent) {

      // Measurements
      var fontSize = parseInt($parent.css('font-size'), 10);

      // Static sizes
      var fontSizeMultiplum = 3.75;
      var progressCircleWidthPx = parseInt((fontSize / 4.5), 10) % 2 === 0 ? parseInt((fontSize / 4.5), 10) + 4 : parseInt((fontSize / 4.5), 10) + 5;
      var progressCircleOffset = progressCircleWidthPx / 2;

      var width = fontSize * fontSizeMultiplum;
      var height = fontSize * fontSizeMultiplum;
      this.$activeBorder.css({
        'width': width,
        'height': height
      });

      this.$backgroundCircle.css({
        'width': width - progressCircleWidthPx,
        'height': height - progressCircleWidthPx,
        'top': progressCircleOffset,
        'left': progressCircleOffset
      });
    }
  };

  /**
   * Hex to RGB conversion
   * @param hex
   * @returns {{r: Number, g: Number, b: Number}}
   */
  ProgressCircle.prototype.hexToRgb = function (hex) {
    var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
    return result ? {
      r: parseInt(result[1], 16),
      g: parseInt(result[2], 16),
      b: parseInt(result[3], 16)
    } : null;
  };

  return ProgressCircle;

}(H5P.jQuery));
;var H5P = H5P || {};

H5P.SimpleRoundedButton = (function ($) {

  /**
   * Creates a new tip
   */
  function SimpleRoundedButton(text) {

    var $simpleRoundedButton = $('<div>', {
      'class': 'joubel-simple-rounded-button',
      'title': text,
      'role': 'button',
      'tabindex': '0'
    }).keydown(function (e) {
      // 32 - space, 13 - enter
      if ([32, 13].indexOf(e.which) !== -1) {
        $(this).click();
        e.preventDefault();
      }
    });

    $('<span>', {
      'class': 'joubel-simple-rounded-button-text',
      'html': text
    }).appendTo($simpleRoundedButton);

    return $simpleRoundedButton;
  }

  return SimpleRoundedButton;
}(H5P.jQuery));
;var H5P = H5P || {};

/**
 * Class responsible for creating speech bubbles
 */
H5P.JoubelSpeechBubble = (function ($) {

  var $currentSpeechBubble;
  var $currentContainer;  
  var $tail;
  var $innerTail;
  var removeSpeechBubbleTimeout;
  var currentMaxWidth;

  var DEFAULT_MAX_WIDTH = 400;

  var iDevice = navigator.userAgent.match(/iPod|iPhone|iPad/g) ? true : false;

  /**
   * Creates a new speech bubble
   *
   * @param {H5P.jQuery} $container The speaking object
   * @param {string} text The text to display
   * @param {number} maxWidth The maximum width of the bubble
   * @return {H5P.JoubelSpeechBubble}
   */
  function JoubelSpeechBubble($container, text, maxWidth) {
    maxWidth = maxWidth || DEFAULT_MAX_WIDTH;
    currentMaxWidth = maxWidth;
    $currentContainer = $container;

    this.isCurrent = function ($tip) {
      return $tip.is($currentContainer);
    };

    this.remove = function () {
      remove();
    };

    var fadeOutSpeechBubble = function ($speechBubble) {
      if (!$speechBubble) {
        return;
      }

      // Stop removing bubble
      clearTimeout(removeSpeechBubbleTimeout);

      $speechBubble.removeClass('show');
      setTimeout(function () {
        if ($speechBubble) {
          $speechBubble.remove();
          $speechBubble = undefined;
        }
      }, 500);
    };

    if ($currentSpeechBubble !== undefined) {
      remove();
    }

    var $h5pContainer = getH5PContainer($container);

    // Make sure we fade out old speech bubble
    fadeOutSpeechBubble($currentSpeechBubble);

    // Create bubble
    $tail = $('<div class="joubel-speech-bubble-tail"></div>');
    $innerTail = $('<div class="joubel-speech-bubble-inner-tail"></div>');
    var $innerBubble = $(
      '<div class="joubel-speech-bubble-inner">' +
      '<div class="joubel-speech-bubble-text">' + text + '</div>' +
      '</div>'
    ).prepend($innerTail);

    $currentSpeechBubble = $(
      '<div class="joubel-speech-bubble" aria-live="assertive">'
    ).append([$tail, $innerBubble])
      .appendTo($h5pContainer);

    // Show speech bubble with transition
    setTimeout(function () {
      $currentSpeechBubble.addClass('show');
    }, 0);

    position($currentSpeechBubble, $currentContainer, maxWidth, $tail, $innerTail);

    // Handle click to close
    H5P.$body.on('mousedown.speechBubble', handleOutsideClick);

    // Handle window resizing
    H5P.$window.on('resize', '', handleResize);

    // Handle clicks when inside IV which blocks bubbling.
    $container.parents('.h5p-dialog')
      .on('mousedown.speechBubble', handleOutsideClick);

    if (iDevice) {
      H5P.$body.css('cursor', 'pointer');
    }

    return this;
  }

  // Remove speechbubble if it belongs to a dom element that is about to be hidden
  H5P.externalDispatcher.on('domHidden', function (event) {
    if ($currentSpeechBubble !== undefined && event.data.$dom.find($currentContainer).length !== 0) {
      remove();
    }
  });

  /**
   * Returns the closest h5p container for the given DOM element.
   * 
   * @param {object} $container jquery element
   * @return {object} the h5p container (jquery element)
   */
  function getH5PContainer($container) {
    var $h5pContainer = $container.closest('.h5p-frame');

    // Check closest h5p frame first, then check for container in case there is no frame.
    if (!$h5pContainer.length) {
      $h5pContainer = $container.closest('.h5p-container');
    }

    return $h5pContainer;
  }

  /**
   * Event handler that is called when the window is resized.
   */
  function handleResize() {
    position($currentSpeechBubble, $currentContainer, currentMaxWidth, $tail, $innerTail);
  }

  /**
   * Repositions the speech bubble according to the position of the container.
   * 
   * @param {object} $currentSpeechbubble the speech bubble that should be positioned   
   * @param {object} $container the container to which the speech bubble should point 
   * @param {number} maxWidth the maximum width of the speech bubble
   * @param {object} $tail the tail (the triangle that points to the referenced container)
   * @param {object} $innerTail the inner tail (the triangle that points to the referenced container)
   */
  function position($currentSpeechBubble, $container, maxWidth, $tail, $innerTail) {
    var $h5pContainer = getH5PContainer($container);

    // Calculate offset between the button and the h5p frame
    var offset = getOffsetBetween($h5pContainer, $container);

    var direction = (offset.bottom > offset.top ? 'bottom' : 'top');
    var tipWidth = offset.outerWidth * 0.9; // Var needs to be renamed to make sense
    var bubbleWidth = tipWidth > maxWidth ? maxWidth : tipWidth;

    var bubblePosition = getBubblePosition(bubbleWidth, offset);
    var tailPosition = getTailPosition(bubbleWidth, bubblePosition, offset, $container.width());
    // Need to set font-size, since element is appended to body.
    // Using same font-size as parent. In that way it will grow accordingly
    // when resizing
    var fontSize = 16;//parseFloat($parent.css('font-size'));

    // Set width and position of speech bubble
    $currentSpeechBubble.css(bubbleCSS(
      direction,
      bubbleWidth,
      bubblePosition,
      fontSize
    ));

    var preparedTailCSS = tailCSS(direction, tailPosition);
    $tail.css(preparedTailCSS);
    $innerTail.css(preparedTailCSS);
  }

  /**
   * Static function for removing the speechbubble
   */
  var remove = function () {
    H5P.$body.off('mousedown.speechBubble');
    H5P.$window.off('resize', '', handleResize);
    $currentContainer.parents('.h5p-dialog').off('mousedown.speechBubble');
    if (iDevice) {
      H5P.$body.css('cursor', '');
    }
    if ($currentSpeechBubble !== undefined) {
      // Apply transition, then remove speech bubble
      $currentSpeechBubble.removeClass('show');

      // Make sure we remove any old timeout before reassignment
      clearTimeout(removeSpeechBubbleTimeout);
      removeSpeechBubbleTimeout = setTimeout(function () {
        $currentSpeechBubble.remove();
        $currentSpeechBubble = undefined;
      }, 500);
    }
    // Don't return false here. If the user e.g. clicks a button when the bubble is visible,
    // we want the bubble to disapear AND the button to receive the event
  };

  /**
   * Remove the speech bubble and container reference
   */
  function handleOutsideClick(event) {
    if (event.target === $currentContainer[0]) {
      return; // Button clicks are not outside clicks
    }

    remove();
    // There is no current container when a container isn't clicked
    $currentContainer = undefined;
  }

  /**
   * Calculate position for speech bubble
   *
   * @param {number} bubbleWidth The width of the speech bubble
   * @param {object} offset
   * @return {object} Return position for the speech bubble
   */
  function getBubblePosition(bubbleWidth, offset) {
    var bubblePosition = {};

    var tailOffset = 9;
    var widthOffset = bubbleWidth / 2;

    // Calculate top position
    bubblePosition.top = offset.top + offset.innerHeight;

    // Calculate bottom position
    bubblePosition.bottom = offset.bottom + offset.innerHeight + tailOffset;

    // Calculate left position
    if (offset.left < widthOffset) {
      bubblePosition.left = 3;
    }
    else if ((offset.left + widthOffset) > offset.outerWidth) {
      bubblePosition.left = offset.outerWidth - bubbleWidth - 3;
    }
    else {
      bubblePosition.left = offset.left - widthOffset + (offset.innerWidth / 2);
    }

    return bubblePosition;
  }

  /**
   * Calculate position for speech bubble tail
   *
   * @param {number} bubbleWidth The width of the speech bubble
   * @param {object} bubblePosition Speech bubble position
   * @param {object} offset
   * @param {number} iconWidth The width of the tip icon
   * @return {object} Return position for the tail
   */
  function getTailPosition(bubbleWidth, bubblePosition, offset, iconWidth) {
    var tailPosition = {};
    // Magic numbers. Tuned by hand so that the tail fits visually within
    // the bounds of the speech bubble.
    var leftBoundary = 9;
    var rightBoundary = bubbleWidth - 20;

    tailPosition.left = offset.left - bubblePosition.left + (iconWidth / 2) - 6;
    if (tailPosition.left < leftBoundary) {
      tailPosition.left = leftBoundary;
    }
    if (tailPosition.left > rightBoundary) {
      tailPosition.left = rightBoundary;
    }

    tailPosition.top = -6;
    tailPosition.bottom = -6;

    return tailPosition;
  }

  /**
   * Return bubble CSS for the desired growth direction
   *
   * @param {string} direction The direction the speech bubble will grow
   * @param {number} width The width of the speech bubble
   * @param {object} position Speech bubble position
   * @param {number} fontSize The size of the bubbles font
   * @return {object} Return CSS
   */
  function bubbleCSS(direction, width, position, fontSize) {
    if (direction === 'top') {
      return {
        width: width + 'px',
        bottom: position.bottom + 'px',
        left: position.left + 'px',
        fontSize: fontSize + 'px',
        top: ''
      };
    }
    else {
      return {
        width: width + 'px',
        top: position.top + 'px',
        left: position.left + 'px',
        fontSize: fontSize + 'px',
        bottom: ''
      };
    }
  }

  /**
   * Return tail CSS for the desired growth direction
   *
   * @param {string} direction The direction the speech bubble will grow
   * @param {object} position Tail position
   * @return {object} Return CSS
   */
  function tailCSS(direction, position) {
    if (direction === 'top') {
      return {
        bottom: position.bottom + 'px',
        left: position.left + 'px',
        top: ''
      };
    }
    else {
      return {
        top: position.top + 'px',
        left: position.left + 'px',
        bottom: ''
      };
    }
  }

  /**
   * Calculates the offset between an element inside a container and the
   * container. Only works if all the edges of the inner element are inside the
   * outer element.
   * Width/height of the elements is included as a convenience.
   *
   * @param {H5P.jQuery} $outer
   * @param {H5P.jQuery} $inner
   * @return {object} Position offset
   */
  function getOffsetBetween($outer, $inner) {
    var outer = $outer[0].getBoundingClientRect();
    var inner = $inner[0].getBoundingClientRect();

    return {
      top: inner.top - outer.top,
      right: outer.right - inner.right,
      bottom: outer.bottom - inner.bottom,
      left: inner.left - outer.left,
      innerWidth: inner.width,
      innerHeight: inner.height,
      outerWidth: outer.width,
      outerHeight: outer.height
    };
  }

  return JoubelSpeechBubble;
})(H5P.jQuery);
;var H5P = H5P || {};

H5P.JoubelThrobber = (function ($) {

  /**
   * Creates a new tip
   */
  function JoubelThrobber() {

    // h5p-throbber css is described in core
    var $throbber = $('<div/>', {
      'class': 'h5p-throbber'
    });

    return $throbber;
  }

  return JoubelThrobber;
}(H5P.jQuery));
;H5P.JoubelTip = (function ($) {
  var $conv = $('<div/>');

  /**
   * Creates a new tip element.
   *
   * NOTE that this may look like a class but it doesn't behave like one.
   * It returns a jQuery object.
   *
   * @param {string} tipHtml The text to display in the popup
   * @param {Object} [behaviour] Options
   * @param {string} [behaviour.tipLabel] Set to use a custom label for the tip button (you want this for good A11Y)
   * @param {boolean} [behaviour.helpIcon] Set to 'true' to Add help-icon classname to Tip button (changes the icon)
   * @param {boolean} [behaviour.showSpeechBubble] Set to 'false' to disable functionality (you may this in the editor)
   * @param {boolean} [behaviour.tabcontrol] Set to 'true' if you plan on controlling the tabindex in the parent (tabindex="-1")
   * @return {H5P.jQuery|undefined} Tip button jQuery element or 'undefined' if invalid tip
   */
  function JoubelTip(tipHtml, behaviour) {

    // Keep track of the popup that appears when you click the Tip button
    var speechBubble;

    // Parse tip html to determine text
    var tipText = $conv.html(tipHtml).text().trim();
    if (tipText === '') {
      return; // The tip has no textual content, i.e. it's invalid.
    }

    // Set default behaviour
    behaviour = $.extend({
      tipLabel: tipText,
      helpIcon: false,
      showSpeechBubble: true,
      tabcontrol: false
    }, behaviour);

    // Create Tip button
    var $tipButton = $('<div/>', {
      class: 'joubel-tip-container' + (behaviour.showSpeechBubble ? '' : ' be-quiet'),
      'aria-label': behaviour.tipLabel,
      'aria-expanded': false,
      role: 'button',
      tabindex: (behaviour.tabcontrol ? -1 : 0),
      click: function (event) {
        // Toggle show/hide popup
        toggleSpeechBubble();
        event.preventDefault();
      },
      keydown: function (event) {
        if (event.which === 32 || event.which === 13) { // Space & enter key
          // Toggle show/hide popup
          toggleSpeechBubble();
          event.stopPropagation();
          event.preventDefault();
        }
        else { // Any other key
          // Toggle hide popup
          toggleSpeechBubble(false);
        }
      },
      // Add markup to render icon
      html: '<span class="joubel-icon-tip-normal ' + (behaviour.helpIcon ? ' help-icon': '') + '">' +
              '<span class="h5p-icon-shadow"></span>' +
              '<span class="h5p-icon-speech-bubble"></span>' +
              '<span class="h5p-icon-info"></span>' +
            '</span>'
      // IMPORTANT: All of the markup elements must have 'pointer-events: none;'
    });

    const $tipAnnouncer = $('<div>', {
      'class': 'hidden-but-read',
      'aria-live': 'polite',
      appendTo: $tipButton,
    });

    /**
     * Tip button interaction handler.
     * Toggle show or hide the speech bubble popup when interacting with the
     * Tip button.
     *
     * @private
     * @param {boolean} [force] 'true' shows and 'false' hides.
     */
    var toggleSpeechBubble = function (force) {
      if (speechBubble !== undefined && speechBubble.isCurrent($tipButton)) {
        // Hide current popup
        speechBubble.remove();
        speechBubble = undefined;

        $tipButton.attr('aria-expanded', false);
        $tipAnnouncer.html('');
      }
      else if (force !== false && behaviour.showSpeechBubble) {
        // Create and show new popup
        speechBubble = H5P.JoubelSpeechBubble($tipButton, tipHtml);
        $tipButton.attr('aria-expanded', true);
        $tipAnnouncer.html(tipHtml);
      }
    };

    return $tipButton;
  }

  return JoubelTip;
})(H5P.jQuery);
;var H5P = H5P || {};

H5P.JoubelSlider = (function ($) {

  /**
   * Creates a new Slider
   *
   * @param {object} [params] Additional parameters
   */
  function JoubelSlider(params) {
    H5P.EventDispatcher.call(this);

    this.$slider = $('<div>', $.extend({
      'class': 'h5p-joubel-ui-slider'
    }, params));

    this.$slides = [];
    this.currentIndex = 0;
    this.numSlides = 0;
  }
  JoubelSlider.prototype = Object.create(H5P.EventDispatcher.prototype);
  JoubelSlider.prototype.constructor = JoubelSlider;

  JoubelSlider.prototype.addSlide = function ($content) {
    $content.addClass('h5p-joubel-ui-slide').css({
      'left': (this.numSlides*100) + '%'
    });
    this.$slider.append($content);
    this.$slides.push($content);

    this.numSlides++;

    if(this.numSlides === 1) {
      $content.addClass('current');
    }
  };

  JoubelSlider.prototype.attach = function ($container) {
    $container.append(this.$slider);
  };

  JoubelSlider.prototype.move = function (index) {
    var self = this;

    if(index === 0) {
      self.trigger('first-slide');
    }
    if(index+1 === self.numSlides) {
      self.trigger('last-slide');
    }
    self.trigger('move');

    var $previousSlide = self.$slides[this.currentIndex];
    H5P.Transition.onTransitionEnd(this.$slider, function () {
      $previousSlide.removeClass('current');
      self.trigger('moved');
    });
    this.$slides[index].addClass('current');

    var translateX = 'translateX(' + (-index*100) + '%)';
    this.$slider.css({
      '-webkit-transform': translateX,
      '-moz-transform': translateX,
      '-ms-transform': translateX,
      'transform': translateX
    });

    this.currentIndex = index;
  };

  JoubelSlider.prototype.remove = function () {
    this.$slider.remove();
  };

  JoubelSlider.prototype.next = function () {
    if(this.currentIndex+1 >= this.numSlides) {
      return;
    }

    this.move(this.currentIndex+1);
  };

  JoubelSlider.prototype.previous = function () {
    this.move(this.currentIndex-1);
  };

  JoubelSlider.prototype.first = function () {
    this.move(0);
  };

  JoubelSlider.prototype.last = function () {
    this.move(this.numSlides-1);
  };

  return JoubelSlider;
})(H5P.jQuery);
;var H5P = H5P || {};

/**
 * @module
 */
H5P.JoubelScoreBar = (function ($) {

  /* Need to use an id for the star SVG since that is the only way to reference
     SVG filters  */
  var idCounter = 0;

  /**
   * Creates a score bar
   * @class H5P.JoubelScoreBar
   * @param {number} maxScore  Maximum score
   * @param {string} [label] Makes it easier for readspeakers to identify the scorebar
   * @param {string} [helpText] Score explanation
   * @param {string} [scoreExplanationButtonLabel] Label for score explanation button
   */
  function JoubelScoreBar(maxScore, label, helpText, scoreExplanationButtonLabel) {
    var self = this;

    self.maxScore = maxScore;
    self.score = 0;
    idCounter++;

    /**
     * @const {string}
     */
    self.STAR_MARKUP = '<svg tabindex="-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 63.77 53.87" aria-hidden="true" focusable="false">' +
        '<title>star</title>' +
        '<filter tabindex="-1" id="h5p-joubelui-score-bar-star-inner-shadow-' + idCounter + '" x0="-50%" y0="-50%" width="200%" height="200%">' +
          '<feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"></feGaussianBlur>' +
          '<feOffset dy="2" dx="4"></feOffset>' +
          '<feComposite in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite>' +
          '<feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood>' +
          '<feComposite in2="shadowDiff" operator="in"></feComposite>' +
          '<feComposite in2="SourceGraphic" operator="over" result="firstfilter"></feComposite>' +
          '<feGaussianBlur in="firstfilter" stdDeviation="3" result="blur2"></feGaussianBlur>' +
          '<feOffset dy="-2" dx="-4"></feOffset>' +
          '<feComposite in2="firstfilter" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"></feComposite>' +
          '<feFlood flood-color="#ffe95c" flood-opacity="1"></feFlood>' +
          '<feComposite in2="shadowDiff" operator="in"></feComposite>' +
          '<feComposite in2="firstfilter" operator="over"></feComposite>' +
        '</filter>' +
        '<path tabindex="-1" class="h5p-joubelui-score-bar-star-shadow" d="M35.08,43.41V9.16H20.91v0L9.51,10.85,9,10.93C2.8,12.18,0,17,0,21.25a11.22,11.22,0,0,0,3,7.48l8.73,8.53-1.07,6.16Z"/>' +
        '<g tabindex="-1">' +
          '<path tabindex="-1" class="h5p-joubelui-score-bar-star-border" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/>' +
          '<path tabindex="-1" class="h5p-joubelui-score-bar-star-fill" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/>' +
          '<path tabindex="-1" filter="url(#h5p-joubelui-score-bar-star-inner-shadow-' + idCounter + ')" class="h5p-joubelui-score-bar-star-fill-full-score" d="M61.36,22.8,49.72,34.11l2.78,16a2.6,2.6,0,0,1,.05.64c0,.85-.37,1.6-1.33,1.6A2.74,2.74,0,0,1,49.94,52L35.58,44.41,21.22,52a2.93,2.93,0,0,1-1.28.37c-.91,0-1.33-.75-1.33-1.6,0-.21.05-.43.05-.64l2.78-16L9.8,22.8A2.57,2.57,0,0,1,9,21.25c0-1,1-1.33,1.81-1.49l16.07-2.35L34.09,2.83c.27-.59.85-1.33,1.55-1.33s1.28.69,1.55,1.33l7.21,14.57,16.07,2.35c.75.11,1.81.53,1.81,1.49A3.07,3.07,0,0,1,61.36,22.8Z"/>' +
        '</g>' +
      '</svg>';

    /**
     * @function appendTo
     * @memberOf H5P.JoubelScoreBar#
     * @param {H5P.jQuery}  $wrapper  Dom container
     */
    self.appendTo = function ($wrapper) {
      self.$scoreBar.appendTo($wrapper);
    };

    /**
     * Create the text representation of the scorebar .
     *
     * @private
     * @return {string}
     */
    var createLabel = function (score) {
      if (!label) {
        return '';
      }

      return label.replace(':num', score).replace(':total', self.maxScore);
    };

    /**
     * Creates the html for this widget
     *
     * @method createHtml
     * @private
     */
    var createHtml = function () {
      // Container div
      self.$scoreBar = $('<div>', {
        'class': 'h5p-joubelui-score-bar',
      });

      var $visuals = $('<div>', {
        'class': 'h5p-joubelui-score-bar-visuals',
        appendTo: self.$scoreBar
      });

      // The progress bar wrapper
      self.$progressWrapper = $('<div>', {
        'class': 'h5p-joubelui-score-bar-progress-wrapper',
        appendTo: $visuals
      });

      self.$progress = $('<div>', {
        'class': 'h5p-joubelui-score-bar-progress',
        'html': createLabel(self.score),
        appendTo: self.$progressWrapper
      });

      // The star
      $('<div>', {
        'class': 'h5p-joubelui-score-bar-star',
        html: self.STAR_MARKUP
      }).appendTo($visuals);

      // The score container
      var $numerics = $('<div>', {
        'class': 'h5p-joubelui-score-numeric',
        appendTo: self.$scoreBar,
        'aria-hidden': true
      });

      // The current score
      self.$scoreCounter = $('<span>', {
        'class': 'h5p-joubelui-score-number h5p-joubelui-score-number-counter',
        text: 0,
        appendTo: $numerics
      });

      // The separator
      $('<span>', {
        'class': 'h5p-joubelui-score-number-separator',
        text: '/',
        appendTo: $numerics
      });

      // Max score
      self.$maxScore = $('<span>', {
        'class': 'h5p-joubelui-score-number h5p-joubelui-score-max',
        text: self.maxScore,
        appendTo: $numerics
      });

      if (helpText) {
        H5P.JoubelUI.createTip(helpText, {
          tipLabel: scoreExplanationButtonLabel ? scoreExplanationButtonLabel : helpText,
          helpIcon: true
        }).appendTo(self.$scoreBar);
        self.$scoreBar.addClass('h5p-score-bar-has-help');
      }
    };

    /**
     * Set the current score
     * @method setScore
     * @memberOf H5P.JoubelScoreBar#
     * @param  {number} score
     */
    self.setScore = function (score) {
      // Do nothing if score hasn't changed
      if (score === self.score) {
        return;
      }
      self.score = score > self.maxScore ? self.maxScore : score;
      self.updateVisuals();
    };

    /**
     * Increment score
     * @method incrementScore
     * @memberOf H5P.JoubelScoreBar#
     * @param  {number=}        incrementBy Optional parameter, defaults to 1
     */
    self.incrementScore = function (incrementBy) {
      self.setScore(self.score + (incrementBy || 1));
    };

    /**
     * Set the max score
     * @method setMaxScore
     * @memberOf H5P.JoubelScoreBar#
     * @param  {number}    maxScore The max score
     */
    self.setMaxScore = function (maxScore) {
      self.maxScore = maxScore;
    };

    /**
     * Updates the progressbar visuals
     * @memberOf H5P.JoubelScoreBar#
     * @method updateVisuals
     */
    self.updateVisuals = function () {
      self.$progress.html(createLabel(self.score));
      self.$scoreCounter.text(self.score);
      self.$maxScore.text(self.maxScore);

      setTimeout(function () {
        // Start the progressbar animation
        self.$progress.css({
          width: ((self.score / self.maxScore) * 100) + '%'
        });

        H5P.Transition.onTransitionEnd(self.$progress, function () {
          // If fullscore fill the star and start the animation
          self.$scoreBar.toggleClass('h5p-joubelui-score-bar-full-score', self.score === self.maxScore);
          self.$scoreBar.toggleClass('h5p-joubelui-score-bar-animation-active', self.score === self.maxScore);

          // Only allow the star animation to run once
          self.$scoreBar.one("animationend", function() {
            self.$scoreBar.removeClass("h5p-joubelui-score-bar-animation-active");
          });
        }, 600);
      }, 300);
    };

    /**
     * Removes all classes
     * @method reset
     */
    self.reset = function () {
      self.$scoreBar.removeClass('h5p-joubelui-score-bar-full-score');
    };

    createHtml();
  }

  return JoubelScoreBar;
})(H5P.jQuery);
;var H5P = H5P || {};

H5P.JoubelProgressbar = (function ($) {

  /**
   * Joubel progressbar class
   * @method JoubelProgressbar
   * @constructor
   * @param  {number}          steps Number of steps
   * @param {Object} [options] Additional options
   * @param {boolean} [options.disableAria] Disable readspeaker assistance
   * @param {string} [options.progressText] A progress text for describing
   *  current progress out of total progress for readspeakers.
   *  e.g. "Slide :num of :total"
   */
  function JoubelProgressbar(steps, options) {
    H5P.EventDispatcher.call(this);
    var self = this;
    this.options = $.extend({
      progressText: 'Slide :num of :total'
    }, options);
    this.currentStep = 0;
    this.steps = steps;

    this.$progressbar = $('<div>', {
      'class': 'h5p-joubelui-progressbar'
    });
    this.$background = $('<div>', {
      'class': 'h5p-joubelui-progressbar-background'
    }).appendTo(this.$progressbar);
  }

  JoubelProgressbar.prototype = Object.create(H5P.EventDispatcher.prototype);
  JoubelProgressbar.prototype.constructor = JoubelProgressbar;

  JoubelProgressbar.prototype.updateAria = function () {
    var self = this;
    if (this.options.disableAria) {
      return;
    }

    if (!this.$currentStatus) {
      this.$currentStatus = $('<div>', {
        'class': 'h5p-joubelui-progressbar-slide-status-text',
        'aria-live': 'assertive'
      }).appendTo(this.$progressbar);
    }
    var interpolatedProgressText = self.options.progressText
      .replace(':num', self.currentStep)
      .replace(':total', self.steps);
    this.$currentStatus.html(interpolatedProgressText);
  };

  /**
   * Appends to a container
   * @method appendTo
   * @param  {H5P.jquery} $container
   */
  JoubelProgressbar.prototype.appendTo = function ($container) {
    this.$progressbar.appendTo($container);
  };

  /**
   * Update progress
   * @method setProgress
   * @param  {number}    step
   */
  JoubelProgressbar.prototype.setProgress = function (step) {
    // Check for valid value:
    if (step > this.steps || step < 0) {
      return;
    }
    this.currentStep = step;
    this.$background.css({
      width: ((this.currentStep/this.steps)*100) + '%'
    });

    this.updateAria();
  };

  /**
   * Increment progress with 1
   * @method next
   */
  JoubelProgressbar.prototype.next = function () {
    this.setProgress(this.currentStep+1);
  };

  /**
   * Reset progressbar
   * @method reset
   */
  JoubelProgressbar.prototype.reset = function () {
    this.setProgress(0);
  };

  /**
   * Check if last step is reached
   * @method isLastStep
   * @return {Boolean}
   */
  JoubelProgressbar.prototype.isLastStep = function () {
    return this.steps === this.currentStep;
  };

  return JoubelProgressbar;
})(H5P.jQuery);
;var H5P = H5P || {};

/**
 * H5P Joubel UI library.
 *
 * This is a utility library, which does not implement attach. I.e, it has to bee actively used by
 * other libraries
 * @module
 */
H5P.JoubelUI = (function ($) {

  /**
   * The internal object to return
   * @class H5P.JoubelUI
   * @static
   */
  function JoubelUI() {}

  /* Public static functions */

  /**
   * Create a tip icon
   * @method H5P.JoubelUI.createTip
   * @param  {string}  text   The textual tip
   * @param  {Object}  params Parameters
   * @return {H5P.JoubelTip}
   */
  JoubelUI.createTip = function (text, params) {
    return new H5P.JoubelTip(text, params);
  };

  /**
   * Create message dialog
   * @method H5P.JoubelUI.createMessageDialog
   * @param  {H5P.jQuery}               $container The dom container
   * @param  {string}                   message    The message
   * @return {H5P.JoubelMessageDialog}
   */
  JoubelUI.createMessageDialog = function ($container, message) {
    return new H5P.JoubelMessageDialog($container, message);
  };

  /**
   * Create help text dialog
   * @method H5P.JoubelUI.createHelpTextDialog
   * @param  {string}             header  The textual header
   * @param  {string}             message The textual message
   * @param  {string}             closeButtonTitle The title for the close button
   * @return {H5P.JoubelHelpTextDialog}
   */
  JoubelUI.createHelpTextDialog = function (header, message, closeButtonTitle) {
    return new H5P.JoubelHelpTextDialog(header, message, closeButtonTitle);
  };

  /**
   * Create progress circle
   * @method H5P.JoubelUI.createProgressCircle
   * @param  {number}             number          The progress (0 to 100)
   * @param  {string}             progressColor   The progress color in hex value
   * @param  {string}             fillColor       The fill color in hex value
   * @param  {string}             backgroundColor The background color in hex value
   * @return {H5P.JoubelProgressCircle}
   */
  JoubelUI.createProgressCircle = function (number, progressColor, fillColor, backgroundColor) {
    return new H5P.JoubelProgressCircle(number, progressColor, fillColor, backgroundColor);
  };

  /**
   * Create throbber for loading
   * @method H5P.JoubelUI.createThrobber
   * @return {H5P.JoubelThrobber}
   */
  JoubelUI.createThrobber = function () {
    return new H5P.JoubelThrobber();
  };

  /**
   * Create simple rounded button
   * @method H5P.JoubelUI.createSimpleRoundedButton
   * @param  {string}                  text The button label
   * @return {H5P.SimpleRoundedButton}
   */
  JoubelUI.createSimpleRoundedButton = function (text) {
    return new H5P.SimpleRoundedButton(text);
  };

  /**
   * Create Slider
   * @method H5P.JoubelUI.createSlider
   * @param  {Object} [params] Parameters
   * @return {H5P.JoubelSlider}
   */
  JoubelUI.createSlider = function (params) {
    return new H5P.JoubelSlider(params);
  };

  /**
   * Create Score Bar
   * @method H5P.JoubelUI.createScoreBar
   * @param  {number=}       maxScore The maximum score
   * @param {string} [label] Makes it easier for readspeakers to identify the scorebar
   * @return {H5P.JoubelScoreBar}
   */
  JoubelUI.createScoreBar = function (maxScore, label, helpText, scoreExplanationButtonLabel) {
    return new H5P.JoubelScoreBar(maxScore, label, helpText, scoreExplanationButtonLabel);
  };

  /**
   * Create Progressbar
   * @method H5P.JoubelUI.createProgressbar
   * @param  {number=}       numSteps The total numer of steps
   * @param {Object} [options] Additional options
   * @param {boolean} [options.disableAria] Disable readspeaker assistance
   * @param {string} [options.progressText] A progress text for describing
   *  current progress out of total progress for readspeakers.
   *  e.g. "Slide :num of :total"
   * @return {H5P.JoubelProgressbar}
   */
  JoubelUI.createProgressbar = function (numSteps, options) {
    return new H5P.JoubelProgressbar(numSteps, options);
  };

  /**
   * Create standard Joubel button
   *
   * @method H5P.JoubelUI.createButton
   * @param {object} params
   *  May hold any properties allowed by jQuery. If href is set, an A tag
   *  is used, if not a button tag is used.
   * @return {H5P.jQuery} The jquery element created
   */
  JoubelUI.createButton = function(params) {
    var type = 'button';
    if (params.href) {
      type = 'a';
    }
    else {
      params.type = 'button';
    }
    if (params.class) {
      params.class += ' h5p-joubelui-button';
    }
    else {
      params.class = 'h5p-joubelui-button';
    }
    return $('<' + type + '/>', params);
  };

  /**
   * Fix for iframe scoll bug in IOS. When focusing an element that doesn't have
   * focus support by default the iframe will scroll the parent frame so that
   * the focused element is out of view. This varies dependening on the elements
   * of the parent frame.
   */
  if (H5P.isFramed && !H5P.hasiOSiframeScrollFix &&
      /iPad|iPhone|iPod/.test(navigator.userAgent)) {
    H5P.hasiOSiframeScrollFix = true;

    // Keep track of original focus function
    var focus = HTMLElement.prototype.focus;

    // Override the original focus
    HTMLElement.prototype.focus = function () {
      // Only focus the element if it supports it natively
      if ( (this instanceof HTMLAnchorElement ||
            this instanceof HTMLInputElement ||
            this instanceof HTMLSelectElement ||
            this instanceof HTMLTextAreaElement ||
            this instanceof HTMLButtonElement ||
            this instanceof HTMLIFrameElement ||
            this instanceof HTMLAreaElement) && // HTMLAreaElement isn't supported by Safari yet.
          !this.getAttribute('role')) { // Focus breaks if a different role has been set
          // In theory this.isContentEditable should be able to recieve focus,
          // but it didn't work when tested.

        // Trigger the original focus with the proper context
        focus.call(this);
      }
    };
  }

  return JoubelUI;
})(H5P.jQuery);
;H5P.Tooltip = H5P.Tooltip || function() {};

H5P.Question = (function ($, EventDispatcher, JoubelUI) {

  /**
   * Extending this class make it alot easier to create tasks for other
   * content types.
   *
   * @class H5P.Question
   * @extends H5P.EventDispatcher
   * @param {string} type
   */
  function Question(type) {
    var self = this;

    // Inheritance
    EventDispatcher.call(self);

    // Register default section order
    self.order = ['video', 'image', 'audio', 'introduction', 'content', 'explanation', 'feedback', 'scorebar', 'buttons', 'read'];

    // Keep track of registered sections
    var sections = {};

    // Buttons
    var buttons = {};
    var buttonOrder = [];

    // Wrapper when attached
    var $wrapper;

    // Click element
    var clickElement;

    // ScoreBar
    var scoreBar;

    // Keep track of the feedback's visual status.
    var showFeedback;

    // Keep track of which buttons are scheduled for hiding.
    var buttonsToHide = [];

    // Keep track of which buttons are scheduled for showing.
    var buttonsToShow = [];

    // Keep track of the hiding and showing of buttons.
    var toggleButtonsTimer;
    var toggleButtonsTransitionTimer;
    var buttonTruncationTimer;

    // Keeps track of initialization of question
    var initialized = false;

    /**
     * @type {Object} behaviour Behaviour of Question
     * @property {Boolean} behaviour.disableFeedback Set to true to disable feedback section
     */
    var behaviour = {
      disableFeedback: false,
      disableReadSpeaker: false
    };

    // Keeps track of thumb state
    var imageThumb = true;

    // Keeps track of image transitions
    var imageTransitionTimer;

    // Keep track of whether sections is transitioning.
    var sectionsIsTransitioning = false;

    // Keep track of auto play state
    var disableAutoPlay = false;

    // Feedback transition timer
    var feedbackTransitionTimer;

    // Used when reading messages to the user
    var $read, readText;

    /**
     * Register section with given content.
     *
     * @private
     * @param {string} section ID of the section
     * @param {(string|H5P.jQuery)} [content]
     */
    var register = function (section, content) {
      sections[section] = {};
      var $e = sections[section].$element = $('<div/>', {
        'class': 'h5p-question-' + section,
      });
      if (content) {
        $e[content instanceof $ ? 'append' : 'html'](content);
      }
    };

    /**
     * Update registered section with content.
     *
     * @private
     * @param {string} section ID of the section
     * @param {(string|H5P.jQuery)} content
     */
    var update = function (section, content) {
      if (content instanceof $) {
        sections[section].$element.html('').append(content);
      }
      else {
        sections[section].$element.html(content);
      }
    };

    /**
     * Insert element with given ID into the DOM.
     *
     * @private
     * @param {array|Array|string[]} order
     * List with ordered element IDs
     * @param {string} id
     * ID of the element to be inserted
     * @param {Object} elements
     * Maps ID to the elements
     * @param {H5P.jQuery} $container
     * Parent container of the elements
     */
    var insert = function (order, id, elements, $container) {
      // Try to find an element id should be after
      for (var i = 0; i < order.length; i++) {
        if (order[i] === id) {
          // Found our pos
          while (i > 0 &&
          (elements[order[i - 1]] === undefined ||
          !elements[order[i - 1]].isVisible)) {
            i--;
          }
          if (i === 0) {
            // We are on top.
            elements[id].$element.prependTo($container);
          }
          else {
            // Add after element
            elements[id].$element.insertAfter(elements[order[i - 1]].$element);
          }
          elements[id].isVisible = true;
          break;
        }
      }
    };

    /**
     * Make feedback into a popup and position relative to click.
     *
     * @private
     * @param {string} [closeText] Text for the close button
     */
    var makeFeedbackPopup = function (closeText) {
      var $element = sections.feedback.$element;
      var $parent = sections.content.$element;
      var $click = (clickElement != null ? clickElement.$element : null);

      $element.appendTo($parent).addClass('h5p-question-popup');

      if (sections.scorebar) {
        sections.scorebar.$element.appendTo($element);
      }

      $parent.addClass('h5p-has-question-popup');

      // Draw the tail
      var $tail = $('<div/>', {
        'class': 'h5p-question-feedback-tail'
      }).hide()
        .appendTo($parent);

      // Draw the close button
      var $close = $('<div/>', {
        'class': 'h5p-question-feedback-close',
        'tabindex': 0,
        'title': closeText,
        on: {
          click: function (event) {
            $element.remove();
            $tail.remove();
            event.preventDefault();
          },
          keydown: function (event) {
            switch (event.which) {
              case 13: // Enter
              case 32: // Space
                $element.remove();
                $tail.remove();
                event.preventDefault();
            }
          }
        }
      }).hide().appendTo($element);

      if ($click != null) {
        if ($click.hasClass('correct')) {
          $element.addClass('h5p-question-feedback-correct');
          $close.show();
          sections.buttons.$element.hide();
        }
        else {
          sections.buttons.$element.appendTo(sections.feedback.$element);
        }
      }

      positionFeedbackPopup($element, $click);
    };

    /**
     * Position the feedback popup.
     *
     * @private
     * @param {H5P.jQuery} $element Feedback div
     * @param {H5P.jQuery} $click Visual click div
     */
    var positionFeedbackPopup = function ($element, $click) {
      var $container = $element.parent();
      var $tail = $element.siblings('.h5p-question-feedback-tail');
      var popupWidth = $element.outerWidth();
      var popupHeight = setElementHeight($element);
      var space = 15;
      var disableTail = false;
      var positionY = $container.height() / 2 - popupHeight / 2;
      var positionX = $container.width() / 2 - popupWidth / 2;
      var tailX = 0;
      var tailY = 0;
      var tailRotation = 0;

      if ($click != null) {
        // Edge detection for click, takes space into account
        var clickNearTop = ($click[0].offsetTop < space);
        var clickNearBottom = ($click[0].offsetTop + $click.height() > $container.height() - space);
        var clickNearLeft = ($click[0].offsetLeft < space);
        var clickNearRight = ($click[0].offsetLeft + $click.width() > $container.width() - space);

        // Click is not in a corner or close to edge, calculate position normally
        positionX = $click[0].offsetLeft - popupWidth / 2  + $click.width() / 2;
        positionY = $click[0].offsetTop - popupHeight - space;
        tailX = positionX + popupWidth / 2 - $tail.width() / 2;
        tailY = positionY + popupHeight - ($tail.height() / 2);
        tailRotation = 225;

        // If popup is outside top edge, position under click instead
        if (popupHeight + space > $click[0].offsetTop) {
          positionY = $click[0].offsetTop + $click.height() + space;
          tailY = positionY - $tail.height() / 2 ;
          tailRotation = 45;
        }

        // If popup is outside left edge, position left
        if (positionX < 0) {
          positionX = 0;
        }

        // If popup is outside right edge, position right
        if (positionX + popupWidth > $container.width()) {
          positionX = $container.width() - popupWidth;
        }

        // Special cases such as corner clicks, or close to an edge, they override X and Y positions if met
        if (clickNearTop && (clickNearLeft || clickNearRight)) {
          positionX = $click[0].offsetLeft + (clickNearLeft ? $click.width() : -popupWidth);
          positionY = $click[0].offsetTop + $click.height();
          disableTail = true;
        }
        else if (clickNearBottom && (clickNearLeft || clickNearRight)) {
          positionX = $click[0].offsetLeft + (clickNearLeft ? $click.width() : -popupWidth);
          positionY = $click[0].offsetTop - popupHeight;
          disableTail = true;
        }
        else if (!clickNearTop && !clickNearBottom) {
          if (clickNearLeft || clickNearRight) {
            positionY = $click[0].offsetTop - popupHeight / 2 + $click.width() / 2;
            positionX = $click[0].offsetLeft + (clickNearLeft ? $click.width() + space : -popupWidth + -space);
            // Make sure this does not position the popup off screen
            if (positionX < 0) {
              positionX = 0;
              disableTail = true;
            }
            else {
              tailX = positionX + (clickNearLeft ? - $tail.width() / 2 : popupWidth - $tail.width() / 2);
              tailY = positionY + popupHeight / 2 - $tail.height() / 2;
              tailRotation = (clickNearLeft ? 315 : 135);
            }
          }
        }

        // Contain popup from overflowing bottom edge
        if (positionY + popupHeight > $container.height()) {
          positionY = $container.height() - popupHeight;

          if (popupHeight > $container.height() - ($click[0].offsetTop + $click.height() + space)) {
            disableTail = true;
          }
        }
      }
      else {
        disableTail = true;
      }

      // Contain popup from ovreflowing top edge
      if (positionY < 0) {
        positionY = 0;
      }

      $element.css({top: positionY, left: positionX});
      $tail.css({top: tailY, left: tailX});

      if (!disableTail) {
        $tail.css({
          'left': tailX,
          'top': tailY,
          'transform': 'rotate(' + tailRotation + 'deg)'
        }).show();
      }
      else {
        $tail.hide();
      }
    };

    /**
     * Set element max height, used for animations.
     *
     * @param {H5P.jQuery} $element
     */
    var setElementHeight = function ($element) {
      if (!$element.is(':visible')) {
        // No animation
        $element.css('max-height', 'none');
        return;
      }

      // If this element is shown in the popup, we can't set width to 100%,
      // since it already has a width set in CSS
      var isFeedbackPopup = $element.hasClass('h5p-question-popup');

      // Get natural element height
      var $tmp = $element.clone()
        .css({
          'position': 'absolute',
          'max-height': 'none',
          'width': isFeedbackPopup ? '' : '100%'
        })
        .appendTo($element.parent());

      // Need to take margins into account when calculating available space
      var sideMargins = parseFloat($element.css('margin-left'))
        + parseFloat($element.css('margin-right'));
      var tmpElWidth = $tmp.css('width') ? $tmp.css('width') : '100%';
      $tmp.css('width', 'calc(' + tmpElWidth + ' - ' + sideMargins + 'px)');

      // Apply height to element
      var h = Math.round($tmp.get(0).getBoundingClientRect().height);
      var fontSize = parseFloat($element.css('fontSize'));
      var relativeH = h / fontSize;
      $element.css('max-height', relativeH + 'em');
      $tmp.remove();

      if (h > 0 && sections.buttons && sections.buttons.$element === $element) {
        // Make sure buttons section is visible
        showSection(sections.buttons);

        // Resize buttons after resizing button section
        setTimeout(resizeButtons, 150);
      }
      return h;
    };

    /**
     * Does the actual job of hiding the buttons scheduled for hiding.
     *
     * @private
     * @param {boolean} [relocateFocus] Find a new button to focus
     */
    var hideButtons = function (relocateFocus) {
      for (var i = 0; i < buttonsToHide.length; i++) {
        hideButton(buttonsToHide[i].id);
      }
      buttonsToHide = [];

      if (relocateFocus) {
        self.focusButton();
      }
    };

    /**
     * Does the actual hiding.
     * @private
     * @param {string} buttonId
     */
    var hideButton = function (buttonId) {
      // Using detach() vs hide() makes it harder to cheat.
      buttons[buttonId].$element.detach();
      buttons[buttonId].isVisible = false;
    };

    /**
     * Shows the buttons on the next tick. This is to avoid buttons flickering
     * If they're both added and removed on the same tick.
     *
     * @private
     */
    var toggleButtons = function () {
      // If no buttons section, return
      if (sections.buttons === undefined) {
        return;
      }

      // Clear transition timer, reevaluate if buttons will be detached
      clearTimeout(toggleButtonsTransitionTimer);

      // Show buttons
      for (var i = 0; i < buttonsToShow.length; i++) {
        insert(buttonOrder, buttonsToShow[i].id, buttons, sections.buttons.$element);
        buttons[buttonsToShow[i].id].isVisible = true;
      }
      buttonsToShow = [];

      // Hide buttons
      var numToHide = 0;
      var relocateFocus = false;
      for (var j = 0; j < buttonsToHide.length; j++) {
        var button = buttons[buttonsToHide[j].id];
        if (button.isVisible) {
          numToHide += 1;
        }
        if (button.$element.is(':focus')) {
          // Move focus to the first visible button.
          relocateFocus = true;
        }
      }

      var animationTimer = 150;
      if (sections.feedback && sections.feedback.$element.hasClass('h5p-question-popup')) {
        animationTimer = 0;
      }

      if (numToHide === sections.buttons.$element.children().length) {
        // All buttons are going to be hidden. Hide container using transition.
        hideSection(sections.buttons);
        // Detach buttons
        hideButtons(relocateFocus);
      }
      else {
        hideButtons(relocateFocus);

        // Show button section
        if (!sections.buttons.$element.is(':empty')) {
          showSection(sections.buttons);
          setElementHeight(sections.buttons.$element);

          // Trigger resize after animation
          toggleButtonsTransitionTimer = setTimeout(function () {
            self.trigger('resize');
          }, animationTimer);
        }

        // Resize buttons to fit container
        resizeButtons();
      }

      toggleButtonsTimer = undefined;
    };

    /**
     * Allows for scaling of the question image.
     */
    var scaleImage = function () {
      var $imgSection = sections.image.$element;
      clearTimeout(imageTransitionTimer);

      // Add this here to avoid initial transition of the image making
      // content overflow. Alternatively we need to trigger a resize.
      $imgSection.addClass('animatable');

      if (imageThumb) {

        // Expand image
        $(this).attr('aria-expanded', true);
        $imgSection.addClass('h5p-question-image-fill-width');
        imageThumb = false;

        imageTransitionTimer = setTimeout(function () {
          self.trigger('resize');
        }, 600);
      }
      else {

        // Scale down image
        $(this).attr('aria-expanded', false);
        $imgSection.removeClass('h5p-question-image-fill-width');
        imageThumb = true;

        imageTransitionTimer = setTimeout(function () {
          self.trigger('resize');
        }, 600);
      }
    };

    /**
     * Get scrollable ancestor of element
     *
     * @private
     * @param {H5P.jQuery} $element
     * @param {Number} [currDepth=0] Current recursive calls to ancestor, stop at maxDepth
     * @param {Number} [maxDepth=5] Maximum depth for finding ancestor.
     * @returns {H5P.jQuery} Parent element that is scrollable
     */
    var findScrollableAncestor = function ($element, currDepth, maxDepth) {
      if (!currDepth) {
        currDepth = 0;
      }
      if (!maxDepth) {
        maxDepth = 5;
      }
      // Check validation of element or if we have reached document root
      if (!$element || !($element instanceof $) || document === $element.get(0) || currDepth >= maxDepth) {
        return;
      }

      if ($element.css('overflow-y') === 'auto') {
        return $element;
      }
      else {
        return findScrollableAncestor($element.parent(), currDepth + 1, maxDepth);
      }
    };

    /**
     * Scroll to bottom of Question.
     *
     * @private
     */
    var scrollToBottom = function () {
      if (!$wrapper || ($wrapper.hasClass('h5p-standalone') && !H5P.isFullscreen)) {
        return; // No scroll
      }

      var scrollableAncestor = findScrollableAncestor($wrapper);

      // Scroll to bottom of scrollable ancestor
      if (scrollableAncestor) {
        scrollableAncestor.animate({
          scrollTop: $wrapper.css('height')
        }, "slow");
      }
    };

    /**
     * Resize buttons to fit container width
     *
     * @private
     */
    var resizeButtons = function () {
      if (!buttons || !sections.buttons) {
        return;
      }

      var go = function () {
        // Don't do anything if button elements are not visible yet
        if (!sections.buttons.$element.is(':visible')) {
          return;
        }

        // Width of all buttons
        var buttonsWidth = {
          max: 0,
          min: 0,
          current: 0
        };

        for (var i in buttons) {
          var button = buttons[i];
          if (button.isVisible) {
            setButtonWidth(buttons[i]);
            buttonsWidth.max += button.width.max;
            buttonsWidth.min += button.width.min;
            buttonsWidth.current += button.isTruncated ? button.width.min : button.width.max;
          }
        }

        var makeButtonsFit = function (availableWidth) {
          if (buttonsWidth.max < availableWidth) {
            // It is room for everyone on the right side of the score bar (without truncating)
            if (buttonsWidth.max !== buttonsWidth.current) {
              // Need to make everyone big
              restoreButtonLabels(buttonsWidth.current, availableWidth);
            }
            return true;
          }
          else if (buttonsWidth.min < availableWidth) {
            // Is it room for everyone on the right side of the score bar with truncating?
            if (buttonsWidth.current > availableWidth) {
              removeButtonLabels(buttonsWidth.current, availableWidth);
            }
            else {
              restoreButtonLabels(buttonsWidth.current, availableWidth);
            }
            return true;
          }
          return false;
        };

        toggleFullWidthScorebar(false);

        var buttonSectionWidth = Math.floor(sections.buttons.$element.width()) - 1;

        if (!makeButtonsFit(buttonSectionWidth)) {
          // If we get here we need to wrap:
          toggleFullWidthScorebar(true);
          buttonSectionWidth = Math.floor(sections.buttons.$element.width()) - 1;
          makeButtonsFit(buttonSectionWidth);
        }
      };

      // If visible, resize right away
      if (sections.buttons.$element.is(':visible')) {
        go();
      }
      else { // If not visible, try on the next tick
        // Clear button truncation timer if within a button truncation function
        if (buttonTruncationTimer) {
          clearTimeout(buttonTruncationTimer);
        }
        buttonTruncationTimer = setTimeout(function () {
          buttonTruncationTimer = undefined;
          go();
        }, 0);
      }
    };

    var toggleFullWidthScorebar = function (enabled) {
      if (sections.scorebar &&
          sections.scorebar.$element &&
          sections.scorebar.$element.hasClass('h5p-question-visible')) {
        sections.buttons.$element.addClass('has-scorebar');
        sections.buttons.$element.toggleClass('wrap', enabled);
        sections.scorebar.$element.toggleClass('full-width', enabled);
      }
      else {
        sections.buttons.$element.removeClass('has-scorebar');
      }
    };

    /**
     * Remove button labels until they use less than max width.
     *
     * @private
     * @param {Number} buttonsWidth Total width of all buttons
     * @param {Number} maxButtonsWidth Max width allowed for buttons
     */
    var removeButtonLabels = function (buttonsWidth, maxButtonsWidth) {
      // Reverse traversal
      for (var i = buttonOrder.length - 1; i >= 0; i--) {
        var buttonId = buttonOrder[i];
        var button = buttons[buttonId];
        if (!button.isTruncated && button.isVisible) {
          var $button = button.$element;
          buttonsWidth -= button.width.max - button.width.min;
          // Set tooltip (needed by H5P.Tooltip)
          let buttonText = $button.text();
          $button.attr('data-tooltip', buttonText);

          // Use button text as aria label if a specific one isn't provided
          if (!button.ariaLabel) {
            $button.attr('aria-label', buttonText);
          }
          // Remove label
          $button.html('').addClass('truncated');
          button.isTruncated = true;
          if (buttonsWidth <= maxButtonsWidth) {
            // Buttons are small enough.
            return;
          }
        }
      }
    };

    /**
     * Restore button labels until it fills maximum possible width without exceeding the max width.
     *
     * @private
     * @param {Number} buttonsWidth Total width of all buttons
     * @param {Number} maxButtonsWidth Max width allowed for buttons
     */
    var restoreButtonLabels = function (buttonsWidth, maxButtonsWidth) {
      for (var i = 0; i < buttonOrder.length; i++) {
        var buttonId = buttonOrder[i];
        var button = buttons[buttonId];
        if (button.isTruncated && button.isVisible) {
          // Calculate new total width of buttons with a static pixel for consistency cross-browser
          buttonsWidth += button.width.max - button.width.min + 1;

          if (buttonsWidth > maxButtonsWidth) {
            return;
          }
          // Restore label
          button.$element.html(button.text);

          // Remove tooltip (used by H5P.Tooltip)
          button.$element.removeAttr('data-tooltip');

          // Remove aria-label if a specific one isn't provided
          if (!button.ariaLabel) {
            button.$element.removeAttr('aria-label');
          }

          button.$element.removeClass('truncated');
          button.isTruncated = false;
        }
      }
    };

    /**
     * Helper function for finding index of keyValue in array
     *
     * @param {String} keyValue Value to be found
     * @param {String} key In key
     * @param {Array} array In array
     * @returns {number}
     */
    var existsInArray = function (keyValue, key, array) {
      var i;
      for (i = 0; i < array.length; i++) {
        if (array[i][key] === keyValue) {
          return i;
        }
      }
      return -1;
    };

    /**
     * Show a section
     * @param {Object} section
     */
    var showSection = function (section) {
      section.$element.addClass('h5p-question-visible');
      section.isVisible = true;
    };

    /**
     * Hide a section
     * @param {Object} section
     */
    var hideSection = function (section) {
      section.$element.css('max-height', '');
      section.isVisible = false;

      setTimeout(function () {
        // Only hide if section hasn't been set to visible in the meantime
        if (!section.isVisible) {
          section.$element.removeClass('h5p-question-visible');
        }
      }, 150);
    };

    /**
     * Set behaviour for question.
     *
     * @param {Object} options An object containing behaviour that will be extended by Question
     */
    self.setBehaviour = function (options) {
      $.extend(behaviour, options);
    };

    /**
     * A video to display above the task.
     *
     * @param {object} params
     */
    self.setVideo = function (params) {
      sections.video = {
        $element: $('<div/>', {
          'class': 'h5p-question-video'
        })
      };

      if (disableAutoPlay && params.params.playback) {
        params.params.playback.autoplay = false;
      }

      // Never fit to wrapper
      if (!params.params.visuals) {
        params.params.visuals = {};
      }
      params.params.visuals.fit = false;
      sections.video.instance = H5P.newRunnable(params, self.contentId, sections.video.$element, true);
      var fromVideo = false; // Hack to avoid never ending loop
      sections.video.instance.on('resize', function () {
        fromVideo = true;
        self.trigger('resize');
        fromVideo = false;
      });
      self.on('resize', function () {
        if (!fromVideo) {
          sections.video.instance.trigger('resize');
        }
      });

      return self;
    };

    /**
     * An audio player to display above the task.
     *
     * @param {object} params
     */
    self.setAudio = function (params) {
      params.params = params.params || {};

      sections.audio = {
        $element: $('<div/>', {
          'class': 'h5p-question-audio',
        })
      };

      if (disableAutoPlay) {
        params.params.autoplay = false;
      }
      else if (params.params.playerMode === 'transparent') {
        params.params.autoplay = true; // false doesn't make sense for transparent audio
      }

      sections.audio.instance = H5P.newRunnable(params, self.contentId, sections.audio.$element, true);
      // The height value that is set by H5P.Audio is counter-productive here.
      if (sections.audio.instance.audio) {
        sections.audio.instance.audio.style.height = '';
      }

      return self;
    };

    /**
     * Will stop any playback going on in the task.
     */
    self.pause = function () {
      if (sections.video && sections.video.isVisible) {
        sections.video.instance.pause();
      }
      if (sections.audio && sections.audio.isVisible) {
        sections.audio.instance.pause();
      }
    };

    /**
     * Start playback of video
     */
    self.play = function () {
      if (sections.video && sections.video.isVisible) {
        sections.video.instance.play();
      }
      if (sections.audio && sections.audio.isVisible) {
        sections.audio.instance.play();
      }
    };

    /**
     * Disable auto play, useful in editors.
     */
    self.disableAutoPlay = function () {
      disableAutoPlay = true;
    };

    /**
     * Process HTML escaped string for use as attribute value,
     * e.g. for alt text or title attributes.
     *
     * @param {string} value
     * @return {string} WARNING! Do NOT use for innerHTML.
     */
    self.massageAttributeOutput = function (value) {
      const dparser = new DOMParser().parseFromString(value, 'text/html');
      const div = document.createElement('div');
      div.innerHTML = dparser.documentElement.textContent;;
      return div.textContent || div.innerText || '';
    };

    /**
     * Add task image.
     *
     * @param {string} path Relative
     * @param {Object} [options] Options object
     * @param {string} [options.alt] Text representation
     * @param {string} [options.title] Hover text
     * @param {Boolean} [options.disableImageZooming] Set as true to disable image zooming
     * @param {string} [options.expandImage] Localization strings
     * @param {string} [options.minimizeImage] Localization string

     */
    self.setImage = function (path, options) {
      options = options ? options : {};
      sections.image = {};
      // Image container
      sections.image.$element = $('<div/>', {
        'class': 'h5p-question-image h5p-question-image-fill-width'
      });

      // Inner wrap
      var $imgWrap = $('<div/>', {
        'class': 'h5p-question-image-wrap',
        appendTo: sections.image.$element
      });

      // Image element
      var $img = $('<img/>', {
        src: H5P.getPath(path, self.contentId),
        alt: (options.alt === undefined ? '' : self.massageAttributeOutput(options.alt)),
        title: (options.title === undefined ? '' : self.massageAttributeOutput(options.title)),
        on: {
          load: function () {
            self.trigger('imageLoaded', this);
            self.trigger('resize');
          }
        },
        appendTo: $imgWrap
      });

      // Disable image zooming
      if (options.disableImageZooming) {
        $img.css('maxHeight', 'none');

        // Make sure we are using the correct amount of width at all times
        var determineImgWidth = function () {

          // Remove margins if natural image width is bigger than section width
          var imageSectionWidth = sections.image.$element.get(0).getBoundingClientRect().width;

          // Do not transition, for instant measurements
          $imgWrap.css({
            '-webkit-transition': 'none',
            'transition': 'none'
          });

          // Margin as translateX on both sides of image.
          var diffX = 2 * ($imgWrap.get(0).getBoundingClientRect().left -
            sections.image.$element.get(0).getBoundingClientRect().left);

          if ($img.get(0).naturalWidth >= imageSectionWidth - diffX) {
            sections.image.$element.addClass('h5p-question-image-fill-width');
          }
          else { // Use margin for small res images
            sections.image.$element.removeClass('h5p-question-image-fill-width');
          }

          // Reset transition rules
          $imgWrap.css({
            '-webkit-transition': '',
            'transition': ''
          });
        };

        // Determine image width
        if ($img.is(':visible')) {
          determineImgWidth();
        }
        else {
          $img.on('load', determineImgWidth);
        }

        // Skip adding zoom functionality
        return;
      }

      const setAriaLabel = () => {
        const ariaLabel = $imgWrap.attr('aria-expanded') === 'true'
          ? options.minimizeImage 
          : options.expandImage;
          
          $imgWrap.attr('aria-label', `${ariaLabel} ${options.alt}`);
        };

      var sizeDetermined = false;
      var determineSize = function () {
        if (sizeDetermined || !$img.is(':visible')) {
          return; // Try again next time.
        }

        $imgWrap.addClass('h5p-question-image-scalable')
          .attr('aria-expanded', false)
          .attr('role', 'button')
          .attr('tabIndex', '0')
          .on('click', function (event) {
            if (event.which === 1) {
              scaleImage.apply(this); // Left mouse button click
              setAriaLabel();
            }
          }).on('keypress', function (event) {
            if (event.which === 32) {
              event.preventDefault(); // Prevent default behaviour; page scroll down
              scaleImage.apply(this); // Space bar pressed
              setAriaLabel();
            }
          });

        setAriaLabel();

        sections.image.$element.removeClass('h5p-question-image-fill-width');

        sizeDetermined  = true; // Prevent any futher events
      };

      self.on('resize', determineSize);

      return self;
    };

    /**
     * Add the introduction section.
     *
     * @param {(string|H5P.jQuery)} content
     */
    self.setIntroduction = function (content) {
      register('introduction', content);

      return self;
    };

    /**
     * Add the content section.
     *
     * @param {(string|H5P.jQuery)} content
     * @param {Object} [options]
     * @param {string} [options.class]
     */
    self.setContent = function (content, options) {
      register('content', content);

      if (options && options.class) {
        sections.content.$element.addClass(options.class);
      }

      return self;
    };

    /**
     * Force readspeaker to read text. Useful when you have to use
     * setTimeout for animations.
     */
    self.read = function (content) {
      if (!$read) {
        return; // Not ready yet
      }

      if (readText) {
        // Combine texts if called multiple times
        readText += (readText.substr(-1, 1) === '.' ? ' ' : '. ') + content;
      }
      else {
        readText = content;
      }

      // Set text
      $read.html(readText);

      setTimeout(function () {
        // Stop combining when done reading
        readText = null;
        $read.html('');
      }, 100);
    };

    /**
     * Read feedback
     */
    self.readFeedback = function () {
      var invalidFeedback =
        behaviour.disableReadSpeaker ||
        !showFeedback ||
        !sections.feedback ||
        !sections.feedback.$element;

      if (invalidFeedback) {
        return;
      }

      var $feedbackText = $('.h5p-question-feedback-content-text', sections.feedback.$element);
      if ($feedbackText && $feedbackText.html() && $feedbackText.html().length) {
        self.read($feedbackText.html());
      }
    };

    /**
     * Remove feedback
     *
     * @return {H5P.Question}
     */
    self.removeFeedback = function () {

      clearTimeout(feedbackTransitionTimer);

      if (sections.feedback && showFeedback) {

        showFeedback = false;

        // Hide feedback & scorebar
        hideSection(sections.scorebar);
        hideSection(sections.feedback);

        sectionsIsTransitioning = true;

        // Detach after transition
        feedbackTransitionTimer = setTimeout(function () {
          // Avoiding Transition.onTransitionEnd since it will register multiple events, and there's no way to cancel it if the transition changes back to "show" while the animation is happening.
          if (!showFeedback) {
            sections.feedback.$element.children().detach();
            sections.scorebar.$element.children().detach();

            // Trigger resize after animation
            self.trigger('resize');
          }
          sectionsIsTransitioning = false;
          scoreBar.setScore(0);
        }, 150);

        if ($wrapper) {
          $wrapper.find('.h5p-question-feedback-tail').remove();
        }
      }

      return self;
    };

    /**
     * Set feedback message.
     *
     * @param {string} [content]
     * @param {number} score The score
     * @param {number} maxScore The maximum score for this question
     * @param {string} [scoreBarLabel] Makes it easier for readspeakers to identify the scorebar
     * @param {string} [helpText] Help text that describes the score inside a tip icon
     * @param {object} [popupSettings] Extra settings for popup feedback
     * @param {boolean} [popupSettings.showAsPopup] Should the feedback display as popup?
     * @param {string} [popupSettings.closeText] Translation for close button text
     * @param {object} [popupSettings.click] Element representing where user clicked on screen
     */
    self.setFeedback = function (content, score, maxScore, scoreBarLabel, helpText, popupSettings, scoreExplanationButtonLabel) {
      // Feedback is disabled
      if (behaviour.disableFeedback) {
        return self;
      }

      // Need to toggle buttons right away to avoid flickering/blinking
      // Note: This means content types should invoke hide/showButton before setFeedback
      toggleButtons();

      clickElement = (popupSettings != null && popupSettings.click != null ? popupSettings.click : null);
      clearTimeout(feedbackTransitionTimer);

      var $feedback = $('<div>', {
        'class': 'h5p-question-feedback-container'
      });

      var $feedbackContent = $('<div>', {
        'class': 'h5p-question-feedback-content'
      }).appendTo($feedback);

      // Feedback text
      $('<div>', {
        'class': 'h5p-question-feedback-content-text',
        'html': content
      }).appendTo($feedbackContent);

      var $scorebar = $('<div>', {
        'class': 'h5p-question-scorebar-container'
      });
      if (scoreBar === undefined) {
        scoreBar = JoubelUI.createScoreBar(maxScore, scoreBarLabel, helpText, scoreExplanationButtonLabel);
      }
      scoreBar.appendTo($scorebar);

      $feedbackContent.toggleClass('has-content', content !== undefined && content.length > 0);

      // Feedback for readspeakers
      if (!behaviour.disableReadSpeaker && scoreBarLabel) {
        self.read(scoreBarLabel.replace(':num', score).replace(':total', maxScore) + '. ' + (content ? content : ''));
      }

      showFeedback = true;
      if (sections.feedback) {
        // Update section
        update('feedback', $feedback);
        update('scorebar', $scorebar);
      }
      else {
        // Create section
        register('feedback', $feedback);
        register('scorebar', $scorebar);
        if (initialized && $wrapper) {
          insert(self.order, 'feedback', sections, $wrapper);
          insert(self.order, 'scorebar', sections, $wrapper);
        }
      }

      showSection(sections.feedback);
      showSection(sections.scorebar);

      resizeButtons();

      if (popupSettings != null && popupSettings.showAsPopup == true) {
        makeFeedbackPopup(popupSettings.closeText);
        scoreBar.setScore(score);
      }
      else {
        // Show feedback section
        feedbackTransitionTimer = setTimeout(function () {
          setElementHeight(sections.feedback.$element);
          setElementHeight(sections.scorebar.$element);
          sectionsIsTransitioning = true;

          // Scroll to bottom after showing feedback
          scrollToBottom();

          // Trigger resize after animation
          feedbackTransitionTimer = setTimeout(function () {
            sectionsIsTransitioning = false;
            self.trigger('resize');
            scoreBar.setScore(score);
          }, 150);
        }, 0);
      }

      return self;
    };

    /**
     * Set feedback content (no animation).
     *
     * @param {string} content
     * @param {boolean} [extendContent] True will extend content, instead of replacing it
     */
    self.updateFeedbackContent = function (content, extendContent) {
      if (sections.feedback && sections.feedback.$element) {

        if (extendContent) {
          content = $('.h5p-question-feedback-content', sections.feedback.$element).html() + ' ' + content;
        }

        // Update feedback content html
        $('.h5p-question-feedback-content', sections.feedback.$element).html(content).addClass('has-content');

        // Make sure the height is correct
        setElementHeight(sections.feedback.$element);

        // Need to trigger resize when feedback has finished transitioning
        setTimeout(self.trigger.bind(self, 'resize'), 150);
      }

      return self;
    };

    /**
     * Set the content of the explanation / feedback panel
     *
     * @param {Object} data
     * @param {string} data.correct
     * @param {string} data.wrong
     * @param {string} data.text
     * @param {string} title Title for explanation panel
     *
     * @return {H5P.Question}
     */
    self.setExplanation = function (data, title) {
      if (data) {
        var explainer = new H5P.Question.Explainer(title, data);

        if (sections.explanation) {
          // Update section
          update('explanation', explainer.getElement());
        }
        else {
          register('explanation', explainer.getElement());

          if (initialized && $wrapper) {
            insert(self.order, 'explanation', sections, $wrapper);
          }
        }
      }
      else if (sections.explanation) {
        // Hide explanation section
        sections.explanation.$element.children().detach();
      }

      return self;
    };

    /**
     * Checks to see if button is registered.
     *
     * @param {string} id
     * @returns {boolean}
     */
    self.hasButton = function (id) {
      return (buttons[id] !== undefined);
    };

    /**
     * @typedef {Object} ConfirmationDialog
     * @property {boolean} [enable] Must be true to show confirmation dialog
     * @property {Object} [instance] Instance that uses confirmation dialog
     * @property {jQuery} [$parentElement] Append to this element.
     * @property {Object} [l10n] Translatable fields
     * @property {string} [l10n.header] Header text
     * @property {string} [l10n.body] Body text
     * @property {string} [l10n.cancelLabel]
     * @property {string} [l10n.confirmLabel]
     */

    /**
     * Register buttons for the task.
     *
     * @param {string} id
     * @param {string} text label
     * @param {function} clicked
     * @param {boolean} [visible=true]
     * @param {Object} [options] Options for button
     * @param {Object} [extras] Extra options
     * @param {ConfirmationDialog} [extras.confirmationDialog] Confirmation dialog
     * @param {Object} [extras.contentData] Content data
     * @params {string} [extras.textIfSubmitting] Text to display if submitting
     */
    self.addButton = function (id, text, clicked, visible, options, extras) {
      if (buttons[id]) {
        return self; // Already registered
      }

      if (sections.buttons === undefined)  {
        // We have buttons, register wrapper
        register('buttons');
        if (initialized) {
          insert(self.order, 'buttons', sections, $wrapper);
        }
      }

      extras = extras || {};
      extras.confirmationDialog = extras.confirmationDialog || {};
      options = options || {};

      var confirmationDialog =
        self.addConfirmationDialogToButton(extras.confirmationDialog, clicked);

      /**
       * Handle button clicks through both mouse and keyboard
       * @private
       */
      var handleButtonClick = function () {
        if (extras.confirmationDialog.enable && confirmationDialog) {
          // Show popups section if used
          if (!extras.confirmationDialog.$parentElement) {
            sections.popups.$element.removeClass('hidden');
          }
          confirmationDialog.show($e.position().top);
        }
        else {
          clicked();
        }
      };

      const isSubmitting = extras.contentData && extras.contentData.standalone
        && (extras.contentData.isScoringEnabled || extras.contentData.isReportingEnabled);

      if (isSubmitting && extras.textIfSubmitting) {
        text = extras.textIfSubmitting;
      }

      buttons[id] = {
        isTruncated: false,
        text: text,
        isVisible: false,
        ariaLabel: options['aria-label']
      };

      // The button might be <button> or <a>
      // (dependent on options.href set or not)
      var isAnchorTag = (options.href !== undefined);
      var $e = buttons[id].$element = JoubelUI.createButton($.extend({
        'class': 'h5p-question-' + id,
        html: text,
        on: {
          click: function (event) {
            handleButtonClick();
            if (isAnchorTag) {
              event.preventDefault();
            }
          }
        }
      }, options));
      buttonOrder.push(id);

      H5P.Tooltip($e.get(0), {tooltipSource: 'data-tooltip'});

      // The button might be <button> or <a>. If <a>, the space key is not
      // triggering the click event, must therefore handle this here:
      if (isAnchorTag) {
        $e.on('keypress', function (event) {
          if (event.which === 32) { // Space
            handleButtonClick();
            event.preventDefault();
          }
        });
      }

      if (visible === undefined || visible) {
        // Button should be visible
        $e.appendTo(sections.buttons.$element);
        buttons[id].isVisible = true;
        showSection(sections.buttons);
      }

      return self;
    };

    var setButtonWidth = function (button) {
      var $button = button.$element;
      var $tmp = $button.clone()
        .css({
          'position': 'absolute',
          'white-space': 'nowrap',
          'max-width': 'none'
        }).removeClass('truncated')
        .html(button.text)
        .appendTo($button.parent());

      // Calculate max width (button including text)
      button.width = {
        max: Math.ceil($tmp.outerWidth() + parseFloat($tmp.css('margin-left')) + parseFloat($tmp.css('margin-right')))
      };

      // Calculate min width (truncated, icon only)
      $tmp.html('').addClass('truncated');
      button.width.min = Math.ceil($tmp.outerWidth() + parseFloat($tmp.css('margin-left')) + parseFloat($tmp.css('margin-right')));
      $tmp.remove();
    };

    /**
     * Add confirmation dialog to button
     * @param {ConfirmationDialog} options
     *  A confirmation dialog that will be shown before click handler of button
     *  is triggered
     * @param {function} clicked
     *  Click handler of button
     * @return {H5P.ConfirmationDialog|undefined}
     *  Confirmation dialog if enabled
     */
    self.addConfirmationDialogToButton = function (options, clicked) {
      options = options || {};

      if (!options.enable) {
        return;
      }

      // Confirmation dialog
      var confirmationDialog = new H5P.ConfirmationDialog({
        instance: options.instance,
        headerText: options.l10n.header,
        dialogText: options.l10n.body,
        cancelText: options.l10n.cancelLabel,
        confirmText: options.l10n.confirmLabel
      });

      // Determine parent element
      if (options.$parentElement) {
        const parentElement = options.$parentElement.get(0);
        let dialogParent;
        // If using h5p-content, dialog will not appear on embedded fullscreen
        if (parentElement.classList.contains('h5p-content')) {
          dialogParent = parentElement.querySelector('.h5p-container');
        }

        confirmationDialog.appendTo(dialogParent ?? parentElement);
      }
      else {

        // Create popup section and append to that
        if (sections.popups === undefined) {
          register('popups');
          if (initialized) {
            insert(self.order, 'popups', sections, $wrapper);
          }
          sections.popups.$element.addClass('hidden');
          self.order.push('popups');
        }
        confirmationDialog.appendTo(sections.popups.$element.get(0));
      }

      // Add event listeners
      confirmationDialog.on('confirmed', function () {
        if (!options.$parentElement) {
          sections.popups.$element.addClass('hidden');
        }
        clicked();

        // Trigger to content type
        self.trigger('confirmed');
      });

      confirmationDialog.on('canceled', function () {
        if (!options.$parentElement) {
          sections.popups.$element.addClass('hidden');
        }
        // Trigger to content type
        self.trigger('canceled');
      });

      return confirmationDialog;
    };

    /**
     * Show registered button with given identifier.
     *
     * @param {string} id
     * @param {Number} [priority]
     */
    self.showButton = function (id, priority) {
      var aboutToBeHidden = existsInArray(id, 'id', buttonsToHide) !== -1;
      if (buttons[id] === undefined || (buttons[id].isVisible === true && !aboutToBeHidden)) {
        return self;
      }

      priority = priority || 0;

      // Skip if already being shown
      var indexToShow = existsInArray(id, 'id', buttonsToShow);
      if (indexToShow !== -1) {

        // Update priority
        if (buttonsToShow[indexToShow].priority < priority) {
          buttonsToShow[indexToShow].priority = priority;
        }

        return self;
      }

      // Check if button is going to be hidden on next tick
      var exists = existsInArray(id, 'id', buttonsToHide);
      if (exists !== -1) {

        // Skip hiding if higher priority
        if (buttonsToHide[exists].priority <= priority) {
          buttonsToHide.splice(exists, 1);
          buttonsToShow.push({id: id, priority: priority});
        }

      } // If button is not shown
      else if (!buttons[id].$element.is(':visible')) {

        // Show button on next tick
        buttonsToShow.push({id: id, priority: priority});
      }

      if (!toggleButtonsTimer) {
        toggleButtonsTimer = setTimeout(toggleButtons, 0);
      }

      return self;
    };

    /**
     * Hide registered button with given identifier.
     *
     * @param {string} id
     * @param {number} [priority]
     */
    self.hideButton = function (id, priority) {
      var aboutToBeShown = existsInArray(id, 'id', buttonsToShow) !== -1;
      if (buttons[id] === undefined || (buttons[id].isVisible === false && !aboutToBeShown)) {
        return self;
      }

      priority = priority || 0;

      // Skip if already being hidden
      var indexToHide = existsInArray(id, 'id', buttonsToHide);
      if (indexToHide !== -1) {

        // Update priority
        if (buttonsToHide[indexToHide].priority < priority) {
          buttonsToHide[indexToHide].priority = priority;
        }

        return self;
      }

      // Check if buttons is going to be shown on next tick
      var exists = existsInArray(id, 'id', buttonsToShow);
      if (exists !== -1) {

        // Skip showing if higher priority
        if (buttonsToShow[exists].priority <= priority) {
          buttonsToShow.splice(exists, 1);
          buttonsToHide.push({id: id, priority: priority});
        }
      }
      else if (!buttons[id].$element.is(':visible')) {

        // Make sure it is detached in case the container is hidden.
        hideButton(id);
      }
      else {

        // Hide button on next tick.
        buttonsToHide.push({id: id, priority: priority});
      }

      if (!toggleButtonsTimer) {
        toggleButtonsTimer = setTimeout(toggleButtons, 0);
      }

      return self;
    };

    /**
     * Set focus to the given button. If no button is given the first visible
     * button gets focused. This is useful if you lose focus.
     *
     * @param {string} [id]
     */
    self.focusButton = function (id) {
      if (id === undefined) {
        // Find first button that is visible.
        for (var i = 0; i < buttonOrder.length; i++) {
          var button = buttons[buttonOrder[i]];
          if (button && button.isVisible) {
            // Give that button focus
            button.$element.focus();
            break;
          }
        }
      }
      else if (buttons[id] && buttons[id].$element.is(':visible')) {
        // Set focus to requested button
        buttons[id].$element.focus();
      }

      return self;
    };

    /**
     * Toggle readspeaker functionality
     * @param {boolean} [disable] True to disable, false to enable.
     */
    self.toggleReadSpeaker = function (disable) {
      behaviour.disableReadSpeaker = disable || !behaviour.disableReadSpeaker;
    };

    /**
     * Set new element for section.
     *
     * @param {String} id
     * @param {H5P.jQuery} $element
     */
    self.insertSectionAtElement = function (id, $element) {
      if (sections[id] === undefined) {
        register(id);
      }
      sections[id].parent = $element;

      // Insert section if question is not initialized
      if (!initialized) {
        insert([id], id, sections, $element);
      }

      return self;
    };

    /**
     * Attach content to given container.
     *
     * @param {H5P.jQuery} $container
     */
    self.attach = function ($container) {
      if (self.isRoot()) {
        self.setActivityStarted();
      }

      // The first time we attach we also create our DOM elements.
      if ($wrapper === undefined) {
        if (self.registerDomElements !== undefined &&
           (self.registerDomElements instanceof Function ||
           typeof self.registerDomElements === 'function')) {

          // Give the question type a chance to register before attaching
          self.registerDomElements();
        }

        // Create section for reading messages
        $read = $('<div/>', {
          'aria-live': 'polite',
          'class': 'h5p-hidden-read'
        });
        register('read', $read);
        self.trigger('registerDomElements');
      }

      // Prepare container
      $wrapper = $container;
      $container.html('')
        .addClass('h5p-question h5p-' + type);

      // Add sections in given order
      var $sections = [];
      for (var i = 0; i < self.order.length; i++) {
        var section = self.order[i];
        if (sections[section]) {
          if (sections[section].parent) {
            // Section has a different parent
            sections[section].$element.appendTo(sections[section].parent);
          }
          else {
            $sections.push(sections[section].$element);
          }
          sections[section].isVisible = true;
        }
      }

      // Only append once to DOM for optimal performance
      $container.append($sections);

      // Let others react to dom changes
      self.trigger('domChanged', {
        '$target': $container,
        'library': self.libraryInfo.machineName,
        'contentId': self.contentId,
        'key': 'newLibrary'
      }, {'bubbles': true, 'external': true});

      // ??
      initialized = true;

      return self;
    };

    /**
     * Detach all sections from their parents
     */
    self.detachSections = function () {
      // Deinit Question
      initialized = false;

      // Detach sections
      for (var section in sections) {
        sections[section].$element.detach();
      }

      return self;
    };

    // Listen for resize
    self.on('resize', function () {
      // Allow elements to attach and set their height before resizing
      if (!sectionsIsTransitioning && sections.feedback && showFeedback) {
        // Resize feedback to fit
        setElementHeight(sections.feedback.$element);
      }

      // Re-position feedback popup if in use
      var $element = sections.feedback;
      var $click = clickElement;

      if ($element != null && $element.$element != null && $click != null && $click.$element != null) {
        setTimeout(function () {
          positionFeedbackPopup($element.$element, $click.$element);
        }, 10);
      }

      resizeButtons();
    });
  }

  // Inheritance
  Question.prototype = Object.create(EventDispatcher.prototype);
  Question.prototype.constructor = Question;

  /**
   * Determine the overall feedback to display for the question.
   * Returns empty string if no matching range is found.
   *
   * @param {Object[]} feedbacks
   * @param {number} scoreRatio
   * @return {string}
   */
  Question.determineOverallFeedback = function (feedbacks, scoreRatio) {
    scoreRatio = Math.floor(scoreRatio * 100);

    for (var i = 0; i < feedbacks.length; i++) {
      var feedback = feedbacks[i];
      var hasFeedback = (feedback.feedback !== undefined && feedback.feedback.trim().length !== 0);

      if (feedback.from <= scoreRatio && feedback.to >= scoreRatio && hasFeedback) {
        return feedback.feedback;
      }
    }

    return '';
  };

  return Question;
})(H5P.jQuery, H5P.EventDispatcher, H5P.JoubelUI);
;H5P.Question.Explainer = (function ($) {
  /**
   * Constructor
   *
   * @class
   * @param {string} title
   * @param {array} explanations
   */
  function Explainer(title, explanations) {
    var self = this;

    /**
     * Create the DOM structure
     */
    var createHTML = function () {
      self.$explanation = $('<div>', {
        'class': 'h5p-question-explanation-container'
      });

      // Add title:
      $('<div>', {
        'class': 'h5p-question-explanation-title',
        role: 'heading',
        html: title,
        appendTo: self.$explanation
      });

      var $explanationList = $('<ul>', {
        'class': 'h5p-question-explanation-list',
        appendTo: self.$explanation
      });

      for (var i = 0; i < explanations.length; i++) {
        var feedback = explanations[i];
        var $explanationItem = $('<li>', {
          'class': 'h5p-question-explanation-item',
          appendTo: $explanationList
        });

        var $content = $('<div>', {
          'class': 'h5p-question-explanation-status'
        });

        if (feedback.correct) {
          $('<span>', {
            'class': 'h5p-question-explanation-correct',
            html: feedback.correct,
            appendTo: $content
          });
        }
        if (feedback.wrong) {
          $('<span>', {
            'class': 'h5p-question-explanation-wrong',
            html: feedback.wrong,
            appendTo: $content
          });
        }
        $content.appendTo($explanationItem);

        if (feedback.text) {
          $('<div>', {
            'class': 'h5p-question-explanation-text',
            html: feedback.text,
            appendTo: $explanationItem
          });
        }
      }
    };

    createHTML();

    /**
     * Return the container HTMLElement
     *
     * @return {HTMLElement}
     */
    self.getElement = function () {
      return self.$explanation;
    };
  }

  return Explainer;

})(H5P.jQuery);
;(function (Question) {

  /**
   * Makes it easy to add animated score points for your question type.
   *
   * @class H5P.Question.ScorePoints
   */
  Question.ScorePoints = function () {
    var self = this;

    var elements = [];
    var showElementsTimer;

    /**
     * Create the element that displays the score point element for questions.
     *
     * @param {boolean} isCorrect
     * @return {HTMLElement}
     */
    self.getElement = function (isCorrect) {
      var element = document.createElement('div');
      element.classList.add(isCorrect ? 'h5p-question-plus-one' : 'h5p-question-minus-one');
      element.classList.add('h5p-question-hidden-one');
      elements.push(element);

      // Schedule display animation of all added elements
      if (showElementsTimer) {
        clearTimeout(showElementsTimer);
      }
      showElementsTimer = setTimeout(showElements, 0);

      return element;
    };

    /**
     * @private
     */
    var showElements = function () {
      // Determine delay between triggering animations
      var delay = 0;
      var increment = 150;
      var maxTime = 1000;

      if (elements.length && elements.length > Math.ceil(maxTime / increment)) {
        // Animations will run for more than ~1 second, reduce it.
        increment = maxTime / elements.length;
      }

      for (var i = 0; i < elements.length; i++) {
        // Use timer to trigger show
        setTimeout(showElement(elements[i]), delay);

        // Increse delay for next element
        delay += increment;
      }
    };

    /**
     * Trigger transition animation for the given element
     *
     * @private
     * @param {HTMLElement} element
     * @return {function}
     */
    var showElement = function (element) {
      return function () {
        element.classList.remove('h5p-question-hidden-one');
      };
    };
  };

})(H5P.Question);
;H5P.TrueFalse = (function ($, Question) {
  'use strict';

  // Maximum score for True False
  var MAX_SCORE = 1;

  /**
   * Enum containing the different states this content type can exist in
   *
   * @enum
   */
  var State = Object.freeze({
    ONGOING: 1,
    FINISHED_WRONG: 2,
    FINISHED_CORRECT: 3,
    INTERNAL_SOLUTION: 4,
    EXTERNAL_SOLUTION: 5
  });

  /**
   * Button IDs
   */
  var Button = Object.freeze({
    CHECK: 'check-answer',
    TRYAGAIN: 'try-again',
    SHOW_SOLUTION: 'show-solution'
  });

  /**
   * Initialize module.
   *
   * @class H5P.TrueFalse
   * @extends H5P.Question
   * @param {Object} options
   * @param {number} id Content identification
   * @param {Object} contentData Task specific content data
   */
  function TrueFalse(options, id, contentData) {
    var self = this;

    // Inheritance
    Question.call(self, 'true-false');

    var params = $.extend(true, {
      question: 'No question text provided',
      correct: 'true',
      l10n: {
        trueText: 'True',
        falseText: 'False',
        score: 'You got @score of @total points',
        checkAnswer: 'Check',
        submitAnswer: 'Submit',
        showSolutionButton: 'Show solution',
        tryAgain: 'Retry',
        wrongAnswerMessage: 'Wrong answer',
        correctAnswerMessage: 'Correct answer',
        scoreBarLabel: 'You got :num out of :total points',
        a11yCheck: 'Check the answers. The responses will be marked as correct, incorrect, or unanswered.',
        a11yShowSolution: 'Show the solution. The task will be marked with its correct solution.',
        a11yRetry: 'Retry the task. Reset all responses and start the task over again.',
      },
      behaviour: {
        enableRetry: true,
        enableSolutionsButton: true,
        enableCheckButton: true,
        confirmCheckDialog: false,
        confirmRetryDialog: false,
        autoCheck: false
      }
    }, options);

    // Counter used to create unique id for this question
    TrueFalse.counter = (TrueFalse.counter === undefined ? 0 : TrueFalse.counter + 1);

    // A unique ID is needed for aria label
    var domId = 'h5p-tfq' + H5P.TrueFalse.counter;

    // saves the content id
    this.contentId = id;
    this.contentData = contentData;

    // The radio group
    var answerGroup = new H5P.TrueFalse.AnswerGroup(domId, params.correct, params.l10n);
    if (contentData.previousState !== undefined && contentData.previousState.answer !== undefined) {
      answerGroup.check(contentData.previousState.answer);
    }
    answerGroup.on('selected', function () {
      self.triggerXAPI('interacted');

      if (params.behaviour.autoCheck) {
        checkAnswer();
        triggerXAPIAnswered();
      }
    });


    /**
     * Create the answers
     *
     * @method createAnswers
     * @private
     * @return {H5P.jQuery}
     */
    var createAnswers = function () {
      return answerGroup.getDomElement();
    };

    /**
     * Register buttons
     *
     * @method registerButtons
     * @private
     */
    var registerButtons = function () {
      var $content = $('[data-content-id="' + self.contentId + '"].h5p-content');
      var $containerParents = $content.parents('.h5p-container');

      // select find container to attach dialogs to
      var $container;
      if($containerParents.length !== 0) {
        // use parent highest up if any
        $container = $containerParents.last();
      }
      else if($content.length !== 0){
        $container = $content;
      }
      else  {
        $container = $(document.body);
      }

      // Show solution button
      if (params.behaviour.enableSolutionsButton === true) {
        self.addButton(Button.SHOW_SOLUTION, params.l10n.showSolutionButton, function () {
          self.showSolutions(true);
        }, false, {
          'aria-label': params.l10n.a11yShowSolution,
        });
      }

      // Check button
      if (!params.behaviour.autoCheck && params.behaviour.enableCheckButton) {
        self.addButton(Button.CHECK, params.l10n.checkAnswer, function () {
          checkAnswer();
          triggerXAPIAnswered();
        }, true, {
          'aria-label': params.l10n.a11yCheck
        }, {
          confirmationDialog: {
            enable: params.behaviour.confirmCheckDialog,
            l10n: params.confirmCheck,
            instance: self,
            $parentElement: $container
          },
          contentData: self.contentData,
          textIfSubmitting: params.l10n.submitAnswer,
        });
      }

      // Try again button
      if (params.behaviour.enableRetry === true) {
        self.addButton(Button.TRYAGAIN, params.l10n.tryAgain, function () {
          self.resetTask();
        }, true, {
          'aria-label': params.l10n.a11yRetry,
        }, {
          confirmationDialog: {
            enable: params.behaviour.confirmRetryDialog,
            l10n: params.confirmRetry,
            instance: self,
            $parentElement: $container
          }
        });
      }

      toggleButtonState(State.ONGOING);
    };

    /**
     * Creates and triggers the xAPI answered event
     *
     * @method triggerXAPIAnswered
     * @private
     * @fires xAPIEvent
     */
    var triggerXAPIAnswered = function () {
      var xAPIEvent = self.createXAPIEventTemplate('answered');
      addQuestionToXAPI(xAPIEvent);
      addResponseToXAPI(xAPIEvent);
      self.trigger(xAPIEvent);
    };

    /**
     * Add the question itself to the definition part of an xAPIEvent
     *
     * @method addQuestionToXAPI
     * @param {XAPIEvent} xAPIEvent
     * @private
     */
    var addQuestionToXAPI = function(xAPIEvent) {
      var definition = xAPIEvent.getVerifiedStatementValue(['object', 'definition']);
      definition.description = {
        // Remove tags, must wrap in div tag because jQuery 1.9 will crash if the string isn't wrapped in a tag.
        'en-US': $('<div>' + params.question + '</div>').text()
      };
      definition.type = 'http://adlnet.gov/expapi/activities/cmi.interaction';
      definition.interactionType = 'true-false';
      definition.correctResponsesPattern = [getCorrectAnswer()];
    };

    /**
     * Returns the correct answer
     *
     * @method getCorrectAnswer
     * @private
     * @return {String}
     */
    var getCorrectAnswer = function () {
      return (params.correct === 'true' ? 'true' : 'false');
    };

    /**
     * Returns the wrong answer
     *
     * @method getWrongAnswer
     * @private
     * @return {String}
     */
    var getWrongAnswer = function () {
      return (params.correct === 'false' ? 'true' : 'false');
    };

    /**
     * Add the response part to an xAPI event
     *
     * @method addResponseToXAPI
     * @private
     * @param {H5P.XAPIEvent} xAPIEvent
     *  The xAPI event we will add a response to
     */
    var addResponseToXAPI = function(xAPIEvent) {
      var isCorrect = answerGroup.isCorrect();
      xAPIEvent.setScoredResult(isCorrect ? MAX_SCORE : 0, MAX_SCORE, self, true, isCorrect);
      xAPIEvent.data.statement.result.response = (isCorrect ? getCorrectAnswer() : getWrongAnswer());
    };

    /**
     * Toggles btton visibility dependent of current state
     *
     * @method toggleButtonVisibility
     * @private
     * @param  {String}    buttonId
     * @param  {Boolean}   visible
     */
    var toggleButtonVisibility = function (buttonId, visible) {
      if (visible === true) {
        self.showButton(buttonId);
      }
      else {
        self.hideButton(buttonId);
      }
    };

    /**
     * Toggles buttons state
     *
     * @method toggleButtonState
     * @private
     * @param  {String}          state
     */
    var toggleButtonState = function (state) {
      toggleButtonVisibility(Button.SHOW_SOLUTION, state === State.FINISHED_WRONG);
      toggleButtonVisibility(Button.CHECK, state === State.ONGOING);
      toggleButtonVisibility(Button.TRYAGAIN, state === State.FINISHED_WRONG || state === State.INTERNAL_SOLUTION);
    };

    /**
     * Check if answer is correct or wrong, and update visuals accordingly
     *
     * @method checkAnswer
     * @private
     */
    var checkAnswer = function () {
      // Create feedback widget
      var score = self.getScore();
      var scoreText;

      toggleButtonState(score === MAX_SCORE ? State.FINISHED_CORRECT : State.FINISHED_WRONG);

      if (score === MAX_SCORE && params.behaviour.feedbackOnCorrect) {
        scoreText = params.behaviour.feedbackOnCorrect;
      }
      else if (score === 0 && params.behaviour.feedbackOnWrong) {
        scoreText = params.behaviour.feedbackOnWrong;
      }
      else {
        scoreText = params.l10n.score;
      }
      // Replace relevant variables:
      scoreText = scoreText.replace('@score', score).replace('@total', MAX_SCORE);
      self.setFeedback(scoreText, score, MAX_SCORE, params.l10n.scoreBarLabel);
      answerGroup.reveal();
    };

    /**
     * Registers this question type's DOM elements before they are attached.
     * Called from H5P.Question.
     *
     * @method registerDomElements
     * @private
     */
    self.registerDomElements = function () {
      var self = this;

      // Check for task media
      var media = params.media;
      if (media && media.type && media.type.library) {
        media = media.type;
        var type = media.library.split(' ')[0];
        if (type === 'H5P.Image') {
          if (media.params.file) {
            // Register task image
            self.setImage(media.params.file.path, {
              disableImageZooming: params.media.disableImageZooming || false,
              alt: media.params.alt,
              title: media.params.title,
              expandImage: media.params.expandImage,
              minimizeImage: media.params.minimizeImage
            });
          }
        }
        else if (type === 'H5P.Video') {
          if (media.params.sources) {
            // Register task video
            self.setVideo(media);
          }
        }
        else if (type === 'H5P.Audio') {
          if (media.params.files) {
            // Register task audio
            self.setAudio(media);
          }
        }
      }

      // Add task question text
      self.setIntroduction('<div id="' + domId + '">' + params.question + '</div>');

      // Register task content area
      self.$content = createAnswers();
      self.setContent(self.$content);

      // ... and buttons
      registerButtons();
    };

    /**
     * Implements resume (save content state)
     *
     * @method getCurrentState
     * @public
     * @returns {object} object containing answer
     */
    self.getCurrentState = function () {
      return {answer: answerGroup.getAnswer()};
    };

    /**
     * Used for contracts.
     * Checks if the parent program can proceed. Always true.
     *
     * @method getAnswerGiven
     * @public
     * @returns {Boolean} true
     */
    self.getAnswerGiven = function () {
      return answerGroup.hasAnswered();
    };

    /**
     * Used for contracts.
     * Checks the current score for this task.
     *
     * @method getScore
     * @public
     * @returns {Number} The current score.
     */
    self.getScore = function () {
      return answerGroup.isCorrect() ? MAX_SCORE : 0;
    };

    /**
     * Used for contracts.
     * Checks the maximum score for this task.
     *
     * @method getMaxScore
     * @public
     * @returns {Number} The maximum score.
     */
    self.getMaxScore = function () {
      return MAX_SCORE;
    };

    /**
     * Get title of task
     *
     * @method getTitle
     * @public
     * @returns {string} title
     */
    self.getTitle = function () {
      return H5P.createTitle((self.contentData && self.contentData.metadata && self.contentData.metadata.title) ? self.contentData.metadata.title : 'True-False');
    };

    /**
     * Used for contracts.
     * Show the solution.
     *
     * @method showSolutions
     * @public
     */
    self.showSolutions = function (internal) {
      checkAnswer();
      answerGroup.showSolution();
      toggleButtonState(internal ? State.INTERNAL_SOLUTION : State.EXTERNAL_SOLUTION);
    };

    /**
     * Used for contracts.
     * Resets the complete task back to its' initial state.
     *
     * @method resetTask
     * @public
     */
    self.resetTask = function () {
      answerGroup.reset();
      self.removeFeedback();
      toggleButtonState(State.ONGOING);
    };

    /**
     * Get xAPI data.
     * Contract used by report rendering engine.
     *
     * @see contract at {@link https://h5p.org/documentation/developers/contracts#guides-header-6}
     */
    self.getXAPIData = function(){
      var xAPIEvent = this.createXAPIEventTemplate('answered');
      this.addQuestionToXAPI(xAPIEvent);
      this.addResponseToXAPI(xAPIEvent);
      return {
        statement: xAPIEvent.data.statement
      };
    };

    /**
     * Add the question itself to the definition part of an xAPIEvent
     */
    self.addQuestionToXAPI = function(xAPIEvent) {
      var definition = xAPIEvent.getVerifiedStatementValue(['object', 'definition']);
      $.extend(definition, this.getxAPIDefinition());
    };

    /**
     * Generate xAPI object definition used in xAPI statements.
     * @return {Object}
     */
    self.getxAPIDefinition = function () {
      var definition = {};
      definition.interactionType = 'true-false';
      definition.type = 'http://adlnet.gov/expapi/activities/cmi.interaction';
      definition.description = {
        'en-US': $('<div>' + params.question + '</div>').text()
      };
      definition.correctResponsesPattern = [getCorrectAnswer()];

      return definition;
    };

    /**
     * Add the response part to an xAPI event
     *
     * @param {H5P.XAPIEvent} xAPIEvent
     *  The xAPI event we will add a response to
     */
    self.addResponseToXAPI = function (xAPIEvent) {
      var isCorrect = answerGroup.isCorrect();
      var rawUserScore = isCorrect ? MAX_SCORE : 0;
      var currentResponse = '';

      xAPIEvent.setScoredResult(rawUserScore, MAX_SCORE, self, true, isCorrect);

      if(self.getCurrentState().answer !== undefined) {
        currentResponse += answerGroup.isCorrect() ? getCorrectAnswer() : getWrongAnswer();
      }
      xAPIEvent.data.statement.result.response = currentResponse;
    };
   }

  // Inheritance
  TrueFalse.prototype = Object.create(Question.prototype);
  TrueFalse.prototype.constructor = TrueFalse;

  return TrueFalse;
})(H5P.jQuery, H5P.Question);
;H5P.TrueFalse.AnswerGroup = (function ($, EventDispatcher) {
  'use strict';

  /**
   * Initialize module.
   *
   * @class H5P.TrueFalse.AnswerGroup
   * @extends H5P.EventDispatcher
   * @param {String} domId Id for label
   * @param {String} correctOption Correct option ('true' or 'false')
   * @param {Object} l10n Object containing all interface translations
   */
  function AnswerGroup(domId, correctOption, l10n) {
    var self = this;

    EventDispatcher.call(self);

    var $answers = $('<div>', {
      'class': 'h5p-true-false-answers',
      role: 'radiogroup',
      'aria-labelledby': domId
    });

    var answer;
    var trueAnswer = new H5P.TrueFalse.Answer(l10n.trueText, l10n.correctAnswerMessage, l10n.wrongAnswerMessage);
    var falseAnswer = new H5P.TrueFalse.Answer(l10n.falseText, l10n.correctAnswerMessage, l10n.wrongAnswerMessage);
    var correctAnswer = (correctOption === 'true' ? trueAnswer : falseAnswer);
    var wrongAnswer = (correctOption === 'false' ? trueAnswer : falseAnswer);

    // Handle checked
    var handleChecked = function (newAnswer, other) {
      return function () {
        answer = newAnswer;
        other.uncheck();
        self.trigger('selected');
      };
    };
    trueAnswer.on('checked', handleChecked(true, falseAnswer));
    falseAnswer.on('checked', handleChecked(false, trueAnswer));

    // Handle switches (using arrow keys)
    var handleInvert = function (newAnswer, other) {
      return function () {
        answer = newAnswer;
        other.check();
        self.trigger('selected');
      };
    };
    trueAnswer.on('invert', handleInvert(false, falseAnswer));
    falseAnswer.on('invert', handleInvert(true, trueAnswer));

    // Handle tabbing
    var handleTabable = function(other, tabable) {
      return function () {
        // If one of them are checked, that one should get tabfocus
        if (!tabable || !self.hasAnswered() || other.isChecked()) {
          other.tabable(tabable);
        }
      };
    };
    // Need to remove tabIndex on the other alternative on focus
    trueAnswer.on('focus', handleTabable(falseAnswer, false));
    falseAnswer.on('focus', handleTabable(trueAnswer, false));
    // Need to make both alternatives tabable on blur:
    trueAnswer.on('blur', handleTabable(falseAnswer, true));
    falseAnswer.on('blur', handleTabable(trueAnswer, true));

    $answers.append(trueAnswer.getDomElement());
    $answers.append(falseAnswer.getDomElement());

    /**
     * Get hold of the DOM element representing this thingy
     * @method getDomElement
     * @return {jQuery}
     */
    self.getDomElement = function () {
      return $answers;
    };

    /**
     * Programatic check
     * @method check
     * @param  {[type]} answer [description]
     */
    self.check = function (answer) {
      if (answer) {
        trueAnswer.check();
      }
      else {
        falseAnswer.check();
      }
    };

    /**
     * Return current answer
     * @method getAnswer
     * @return {Boolean} undefined if no answer if given
     */
    self.getAnswer = function () {
      return answer;
    };

    /**
     * Check if user has answered question yet
     * @method hasAnswered
     * @return {Boolean}
     */
    self.hasAnswered = function () {
      return answer !== undefined;
    };

    /**
     * Is answer correct?
     * @method isCorrect
     * @return {Boolean}
     */
    self.isCorrect = function () {
      return correctAnswer.isChecked();
    };

    /**
     * Enable user input
     *
     * @method enable
     */
    self.enable = function () {
      trueAnswer.enable().tabable(true);
      falseAnswer.enable();
    };

    /**
     * Disable user input
     *
     * @method disable
     */
    self.disable = function () {
      trueAnswer.disable();
      falseAnswer.disable();
    };

    /**
     * Reveal correct/wrong answer
     *
     * @method reveal
     */
    self.reveal = function () {
      if (self.hasAnswered()) {
        if (self.isCorrect()) {
          correctAnswer.markCorrect();
        }
        else {
          wrongAnswer.markWrong();
        }
      }

      self.disable();
    };

    /**
     * Reset task
     * @method reset
     */
    self.reset = function () {
      trueAnswer.reset();
      falseAnswer.reset();
      self.enable();
      answer = undefined;
    };

    /**
     * Show the solution
     * @method showSolution
     * @return {[type]}
     */
    self.showSolution = function () {
      correctAnswer.markCorrect();
      wrongAnswer.unmark();
    };
  }

  // Inheritance
  AnswerGroup.prototype = Object.create(EventDispatcher.prototype);
  AnswerGroup.prototype.constructor = AnswerGroup;

  return AnswerGroup;
})(H5P.jQuery, H5P.EventDispatcher);
;H5P.TrueFalse.Answer = (function ($, EventDispatcher) {
  'use strict';

  var Keys = {
    ENTER: 13,
    SPACE: 32,
    LEFT_ARROW: 37,
    UP_ARROW: 38,
    RIGHT_ARROW: 39,
    DOWN_ARROW: 40
  };

  /**
   * Initialize module.
   *
   * @class H5P.TrueFalse.Answer
   * @extends H5P.EventDispatcher
   * @param {String} text Label
   * @param {String} correctMessage Message read by readspeaker when correct alternative is chosen
   * @param {String} wrongMessage Message read by readspeaker when wrong alternative is chosen
   */
  function Answer (text, correctMessage, wrongMessage) {
    var self = this;

    EventDispatcher.call(self);

    var checked = false;
    var enabled = true;

    var $answer = $('<div>', {
      'class': 'h5p-true-false-answer',
      role: 'radio',
      'aria-checked': false,
      html: text + '<span class="aria-label"></span>',
      tabindex: 0, // Tabable by default
      click: function (event) {
        // Handle left mouse (or tap on touch devices)
        if (event.which === 1) {
          self.check();
        }
      },
      keydown: function (event) {
        if (!enabled) {
          return;
        }
        if ([Keys.SPACE, Keys.ENTER].indexOf(event.keyCode) !== -1) {
          event.preventDefault();
          self.check();
        }
        else if ([Keys.LEFT_ARROW, Keys.UP_ARROW, Keys.RIGHT_ARROW, Keys.DOWN_ARROW].indexOf(event.keyCode) !== -1) {
          event.preventDefault();
          self.uncheck();
          self.trigger('invert');
        }
      },
      focus: function () {
        self.trigger('focus');
      },
      blur: function () {
        self.trigger('blur');
      }
    });

    var $ariaLabel = $answer.find('.aria-label');

    // A bug in Chrome 54 makes the :after icons (V and X) not beeing rendered.
    // Doing this in a timeout solves this
    // Might be removed when Chrome 56 is out
    var chromeBugFixer = function (callback) {
      setTimeout(function () {
        callback();
      }, 0);
    };

    /**
     * Return the dom element representing the alternative
     *
     * @public
     * @method getDomElement
     * @return {H5P.jQuery}
     */
    self.getDomElement = function () {
      return $answer;
    };

    /**
     * Unchecks the alternative
     *
     * @public
     * @method uncheck
     * @return {H5P.TrueFalse.Answer}
     */
    self.uncheck = function () {
      if (enabled) {
        $answer.blur();
        checked = false;
        chromeBugFixer(function () {
          $answer.attr('aria-checked', checked);
        });
      }
      return self;
    };

    /**
     * Set tabable or not
     * @method tabable
     * @param  {Boolean} enabled
     * @return {H5P.TrueFalse.Answer}
     */
    self.tabable = function (enabled) {
      $answer.attr('tabIndex', enabled ? 0 : null);
      return self;
    };

    /**
     * Checks the alternative
     *
     * @method check
     * @return {H5P.TrueFalse.Answer}
     */
    self.check = function () {
      if (enabled) {
        checked = true;
        chromeBugFixer(function () {
          $answer.attr('aria-checked', checked);
        });
        self.trigger('checked');
        $answer.focus();
      }
      return self;
    };

    /**
     * Is this alternative checked?
     *
     * @method isChecked
     * @return {boolean}
     */
    self.isChecked = function () {
      return checked;
    };

    /**
     * Enable alternative
     *
     * @method enable
     * @return {H5P.TrueFalse.Answer}
     */
    self.enable = function () {
      $answer.attr({
        'aria-disabled': '',
        tabIndex: 0
      });
      enabled = true;

      return self;
    };

    /**
     * Disables alternative
     *
     * @method disable
     * @return {H5P.TrueFalse.Answer}
     */
    self.disable = function () {
      $answer.attr({
        'aria-disabled': true,
        tabIndex: null
      });
      enabled = false;

      return self;
    };

    /**
     * Reset alternative
     *
     * @method reset
     * @return {H5P.TrueFalse.Answer}
     */
    self.reset = function () {
      self.enable();
      self.uncheck();
      self.unmark();
      $ariaLabel.html('');

      return self;
    };

    /**
     * Marks this alternative as the wrong one
     *
     * @method markWrong
     * @return {H5P.TrueFalse.Answer}
     */
    self.markWrong = function () {
      chromeBugFixer(function () {
        $answer.addClass('wrong');
      });
      $ariaLabel.html('.' + wrongMessage);

      return self;
    };

    /**
     * Marks this alternative as the wrong one
     *
     * @method markCorrect
     * @return {H5P.TrueFalse.Answer}
     */
    self.markCorrect = function () {
      chromeBugFixer(function () {
        $answer.addClass('correct');
      });
      $ariaLabel.html('.' + correctMessage);

      return self;
    };

    self.unmark = function () {
      chromeBugFixer(function () {
        $answer.removeClass('wrong correct');
      });

      return self;
    };
  }

  // Inheritance
  Answer.prototype = Object.create(EventDispatcher.prototype);
  Answer.prototype.constructor = Answer;

  return Answer;

})(H5P.jQuery, H5P.EventDispatcher);
;		(function(xopen, fetch, dataurls) {

			switch(location.protocol.split(':')[0]) {
				case 'http':
				case 'https':
					return;
			};

			const url2data	= function(oldurl) {
					switch(oldurl.split(':')[0]) {
						case 'blob':
							console.log('blob', oldurl);
						case 'data':
							return oldurl;
					}
					let urltoks	 = oldurl.replace(H5PIntegration.url, '.').split('/');
					if(urltoks[0] == '.') {
						urltoks.shift();
						const url	= urltoks.join('/');
						if(typeof dataurls[url]!=='undefined') {
							if(dataurls[url][0]=='application/json') {
								return 'data:application/json;text,' + dataurls[url][1];
							}
							return 'data:' + dataurls[url].join(';base64,');
						}
					}
					console.error('url not found:', oldurl);
					return "data:;text,";
			};
			window.fetch = function() {
				arguments[0]	= url2data(arguments[0]);
				return fetch.apply(this, arguments);
			};
			XMLHttpRequest.prototype.open = function() {
				arguments[1]	= url2data(arguments[1]);
				return xopen.apply(this, arguments);
			};
		})(XMLHttpRequest.prototype.open, window.fetch, {"libraries\/H5P.AdvancedText-1.1\/library.json":["application\/json","{\"title\":\"Text\",\"description\":\"A simple library that displays text with all kinds of styling.\",\"majorVersion\":1,\"minorVersion\":1,\"patchVersion\":16,\"runnable\":0,\"machineName\":\"H5P.AdvancedText\",\"author\":\"Joubel\",\"preloadedJs\":[{\"path\":\"text.js\"}],\"preloadedCss\":[{\"path\":\"text.css\"}],\"metadataSettings\":{\"disable\":0,\"disableExtraTitleField\":1}}"],"libraries\/H5P.Image-1.1\/library.json":["application\/json","{\"title\":\"Image\",\"contentType\":\"Media\",\"description\":\"Simple library that displays an image.\",\"majorVersion\":1,\"minorVersion\":1,\"patchVersion\":22,\"runnable\":0,\"machineName\":\"H5P.Image\",\"author\":\"Joubel\",\"coreApi\":{\"majorVersion\":1,\"minorVersion\":19},\"preloadedJs\":[{\"path\":\"image.js\"}],\"preloadedCss\":[{\"path\":\"image.css\"}],\"metadataSettings\":{\"disable\":0,\"disableExtraTitleField\":1},\"editorDependencies\":[{\"machineName\":\"H5PEditor.ShowWhen\",\"majorVersion\":1,\"minorVersion\":0}]}"],"libraries\/H5PEditor.ShowWhen-1.0\/library.json":["application\/json","{\"machineName\":\"H5PEditor.ShowWhen\",\"title\":\"Toggle visibility of a field based on rules\",\"license\":\"MIT\",\"author\":\"fnoks\",\"majorVersion\":1,\"minorVersion\":0,\"patchVersion\":9,\"runnable\":0,\"preloadedJs\":[{\"path\":\"h5p-show-when.js\"}],\"preloadedCss\":[{\"path\":\"h5p-show-when.css\"}]}"],"libraries\/H5P.ImageSlide-1.1\/library.json":["application\/json","{\"title\":\"Image Slide\",\"description\":\"Image Slide, helper library for images used in image sliders and similar. Can render images with sizing options\",\"majorVersion\":1,\"minorVersion\":1,\"patchVersion\":4,\"runnable\":0,\"author\":\"Falcon\",\"license\":\"MIT\",\"machineName\":\"H5P.ImageSlide\",\"preloadedJs\":[{\"path\":\"image-slide.js\"}],\"preloadedCss\":[{\"path\":\"image-slide.css\"}]}"],"libraries\/H5P.ImageSlider-1.1\/library.json":["application\/json","{\"title\":\"Image Slider\",\"description\":\"Image Slider\",\"majorVersion\":1,\"minorVersion\":1,\"patchVersion\":9,\"runnable\":1,\"author\":\"Falcon\",\"license\":\"MIT\",\"fullscreen\":1,\"embedTypes\":[\"iframe\"],\"machineName\":\"H5P.ImageSlider\",\"preloadedJs\":[{\"path\":\"image-slider.js\"}],\"preloadedCss\":[{\"path\":\"image-slider.css\"}],\"editorDependencies\":[{\"machineName\":\"H5PEditor.ShowWhen\",\"majorVersion\":1,\"minorVersion\":0}]}"],"libraries\/H5P.AudioRecorder-1.0\/library.json":["application\/json","{\"title\":\"Audio Recorder\",\"description\":\"Record audio and download it\",\"machineName\":\"H5P.AudioRecorder\",\"majorVersion\":1,\"minorVersion\":0,\"patchVersion\":33,\"runnable\":1,\"author\":\"Joubel\",\"license\":\"MIT\",\"embedTypes\":[\"iframe\"],\"preloadedCss\":[{\"path\":\"fonts\\\/h5p-audio-recorder-font-open-sans.css\"}],\"preloadedJs\":[{\"path\":\"dist\\\/h5p-audio-recorder.js\"}],\"preloadedDependencies\":[{\"machineName\":\"FontAwesome\",\"majorVersion\":4,\"minorVersion\":5},{\"machineName\":\"H5P.FontIcons\",\"majorVersion\":1,\"minorVersion\":0}]}"],"libraries\/FontAwesome-4.5\/library.json":["application\/json","{\"title\":\"Font Awesome\",\"contentType\":\"Font\",\"majorVersion\":4,\"minorVersion\":5,\"patchVersion\":6,\"runnable\":0,\"machineName\":\"FontAwesome\",\"license\":\"MIT\",\"author\":\"Dave Gandy\",\"preloadedCss\":[{\"path\":\"h5p-font-awesome.min.css\"}]}"],"libraries\/H5P.FontIcons-1.0\/library.json":["application\/json","{\"title\":\"H5P.FontIcons\",\"majorVersion\":1,\"minorVersion\":0,\"patchVersion\":11,\"runnable\":0,\"machineName\":\"H5P.FontIcons\",\"author\":\"Joubel\",\"preloadedCss\":[{\"path\":\"styles\\\/h5p-font-icons.css\"}]}"],"libraries\/H5P.TrueFalse-1.8\/library.json":["application\/json","{\"title\":\"True\\\/False Question\",\"description\":\"Test your users with 'True or False' type questions\",\"machineName\":\"H5P.TrueFalse\",\"majorVersion\":1,\"minorVersion\":8,\"patchVersion\":11,\"runnable\":1,\"license\":\"MIT\",\"author\":\"Joubel\",\"embedTypes\":[\"iframe\"],\"coreApi\":{\"majorVersion\":1,\"minorVersion\":19},\"preloadedCss\":[{\"path\":\"styles\\\/h5p-true-false.css\"}],\"preloadedJs\":[{\"path\":\"scripts\\\/h5p-true-false.js\"},{\"path\":\"scripts\\\/h5p-true-false-answer-group.js\"},{\"path\":\"scripts\\\/h5p-true-false-answer.js\"}],\"preloadedDependencies\":[{\"machineName\":\"FontAwesome\",\"majorVersion\":4,\"minorVersion\":5},{\"machineName\":\"H5P.Question\",\"majorVersion\":1,\"minorVersion\":5},{\"machineName\":\"H5P.JoubelUI\",\"majorVersion\":1,\"minorVersion\":3},{\"machineName\":\"H5P.FontIcons\",\"majorVersion\":1,\"minorVersion\":0}],\"editorDependencies\":[{\"machineName\":\"H5PEditor.RadioGroup\",\"majorVersion\":1,\"minorVersion\":1},{\"machineName\":\"H5PEditor.ShowWhen\",\"majorVersion\":1,\"minorVersion\":0}]}"],"libraries\/H5P.Question-1.5\/library.json":["application\/json","{\"title\":\"Question\",\"machineName\":\"H5P.Question\",\"majorVersion\":1,\"minorVersion\":5,\"patchVersion\":15,\"runnable\":0,\"license\":\"MIT\",\"author\":\"Joubel\",\"coreApi\":{\"majorVersion\":1,\"minorVersion\":7},\"preloadedCss\":[{\"path\":\"styles\\\/question.css\"},{\"path\":\"styles\\\/explainer.css\"}],\"preloadedJs\":[{\"path\":\"scripts\\\/question.js\"},{\"path\":\"scripts\\\/explainer.js\"},{\"path\":\"scripts\\\/score-points.js\"}],\"preloadedDependencies\":[{\"machineName\":\"FontAwesome\",\"majorVersion\":4,\"minorVersion\":5},{\"machineName\":\"H5P.JoubelUI\",\"majorVersion\":1,\"minorVersion\":3}]}"],"libraries\/H5P.JoubelUI-1.3\/library.json":["application\/json","{\"title\":\"Joubel UI\",\"contentType\":\"Utility\",\"description\":\"UI utility library\",\"majorVersion\":1,\"minorVersion\":3,\"patchVersion\":19,\"runnable\":0,\"coreApi\":{\"majorVersion\":1,\"minorVersion\":3},\"machineName\":\"H5P.JoubelUI\",\"author\":\"Joubel\",\"preloadedJs\":[{\"path\":\"js\\\/joubel-help-dialog.js\"},{\"path\":\"js\\\/joubel-message-dialog.js\"},{\"path\":\"js\\\/joubel-progress-circle.js\"},{\"path\":\"js\\\/joubel-simple-rounded-button.js\"},{\"path\":\"js\\\/joubel-speech-bubble.js\"},{\"path\":\"js\\\/joubel-throbber.js\"},{\"path\":\"js\\\/joubel-tip.js\"},{\"path\":\"js\\\/joubel-slider.js\"},{\"path\":\"js\\\/joubel-score-bar.js\"},{\"path\":\"js\\\/joubel-progressbar.js\"},{\"path\":\"js\\\/joubel-ui.js\"}],\"preloadedCss\":[{\"path\":\"css\\\/joubel-help-dialog.css\"},{\"path\":\"css\\\/joubel-message-dialog.css\"},{\"path\":\"css\\\/joubel-progress-circle.css\"},{\"path\":\"css\\\/joubel-simple-rounded-button.css\"},{\"path\":\"css\\\/joubel-speech-bubble.css\"},{\"path\":\"css\\\/joubel-tip.css\"},{\"path\":\"css\\\/joubel-slider.css\"},{\"path\":\"css\\\/joubel-score-bar.css\"},{\"path\":\"css\\\/joubel-progressbar.css\"},{\"path\":\"css\\\/joubel-ui.css\"},{\"path\":\"css\\\/joubel-icon.css\"}],\"preloadedDependencies\":[{\"machineName\":\"FontAwesome\",\"majorVersion\":4,\"minorVersion\":5},{\"machineName\":\"H5P.Transition\",\"majorVersion\":1,\"minorVersion\":0},{\"machineName\":\"H5P.FontIcons\",\"majorVersion\":1,\"minorVersion\":0}]}"],"libraries\/H5P.Transition-1.0\/library.json":["application\/json","{\"machineName\":\"H5P.Transition\",\"title\":\"Transition\",\"description\":\"Contains helper function relevant for transitioning\",\"license\":\"MIT\",\"author\":\"Joubel\",\"majorVersion\":1,\"minorVersion\":0,\"patchVersion\":4,\"runnable\":0,\"preloadedJs\":[{\"path\":\"transition.js\"}]}"],"libraries\/H5PEditor.RadioGroup-1.1\/library.json":["application\/json","{\"title\":\"H5PEditor.RadioGroup\",\"majorVersion\":1,\"minorVersion\":1,\"patchVersion\":4,\"runnable\":0,\"machineName\":\"H5PEditor.RadioGroup\",\"coreApi\":{\"majorVersion\":1,\"minorVersion\":12},\"author\":\"Joubel\",\"preloadedJs\":[{\"path\":\"radio-group.js\"}],\"preloadedCss\":[{\"path\":\"radio-group.css\"}]}"],"libraries\/H5P.Column-1.18\/library.json":["application\/json","{\"machineName\":\"H5P.Column\",\"title\":\"Page\",\"description\":\"Content holder displaying content in a column.\",\"contentType\":\"instructional\",\"license\":\"MIT\",\"author\":\"Joubel\",\"majorVersion\":1,\"minorVersion\":18,\"patchVersion\":8,\"runnable\":1,\"fullscreen\":0,\"embedTypes\":[\"iframe\"],\"coreApi\":{\"majorVersion\":1,\"minorVersion\":27},\"preloadedJs\":[{\"path\":\"scripts\\\/h5p-column.js\"}],\"preloadedCss\":[{\"path\":\"styles\\\/h5p-column.css\"}]}"]});		H5PIntegration	= (function(x){
			let url	= window.location.href.split('/');
			url.pop();
			x.url	= url.join('/');
			return x;
		})({"baseUrl":"","url":"","siteUrl":"","l10n":{"H5P":{"fullscreen":"Vollbild","disableFullscreen":"Kein Vollbild","download":"Download","copyrights":"Nutzungsrechte","embed":"Einbetten","size":"Size","showAdvanced":"Show advanced","hideAdvanced":"Hide advanced","advancedHelp":"Include this script on your website if you want dynamic sizing of the embedded content:","copyrightInformation":"Nutzungsrechte","close":"Schlie\u00dfen","title":"Titel","author":"Autor","year":"Jahr","source":"Quelle","license":"Lizenz","thumbnail":"Thumbnail","noCopyrights":"Keine Copyright-Informationen vorhanden","reuse":"Wiederverwenden","reuseContent":"Verwende Inhalt","reuseDescription":"Verwende Inhalt.","downloadDescription":"Lade den Inhalt als H5P-Datei herunter.","copyrightsDescription":"Zeige Urheberinformationen an.","embedDescription":"Zeige den Code f\u00fcr die Einbettung an.","h5pDescription":"Visit H5P.org to check out more cool content.","contentChanged":"Dieser Inhalt hat sich seit Ihrer letzten Nutzung ver\u00e4ndert.","startingOver":"Sie beginnen von vorne.","by":"von","showMore":"Zeige mehr","showLess":"Zeige weniger","subLevel":"Sublevel","confirmDialogHeader":"Best\u00e4tige Aktion","confirmDialogBody":"Please confirm that you wish to proceed. This action is not reversible.","cancelLabel":"Όχι","confirmLabel":"Ναι","licenseU":"Undisclosed","licenseCCBY":"Attribution","licenseCCBYSA":"Attribution-ShareAlike","licenseCCBYND":"Attribution-NoDerivs","licenseCCBYNC":"Attribution-NonCommercial","licenseCCBYNCSA":"Attribution-NonCommercial-ShareAlike","licenseCCBYNCND":"Attribution-NonCommercial-NoDerivs","licenseCC40":"4.0 International","licenseCC30":"3.0 Unported","licenseCC25":"2.5 Generic","licenseCC20":"2.0 Generic","licenseCC10":"1.0 Generic","licenseGPL":"General Public License","licenseV3":"Version 3","licenseV2":"Version 2","licenseV1":"Version 1","licensePD":"Public Domain","licenseCC010":"CC0 1.0 Universal (CC0 1.0) Public Domain Dedication","licensePDM":"Public Domain Mark","licenseC":"Copyright","contentType":"Inhaltstyp","licenseExtras":"License Extras","changes":"Changelog","contentCopied":"Inhalt wurde ins Clipboard kopiert","connectionLost":"Connection lost. Results will be stored and sent when you regain connection.","connectionReestablished":"Connection reestablished.","resubmitScores":"Attempting to submit stored results.","offlineDialogHeader":"Your connection to the server was lost","offlineDialogBody":"We were unable to send information about your completion of this task. Please check your internet connection.","offlineDialogRetryMessage":"Versuche es wieder in :num....","offlineDialogRetryButtonLabel":"Jetzt nochmal probieren","offlineSuccessfulSubmit":"Erfolgreich Ergebnisse gesendet."}},"hubIsEnabled":false,"reportingIsEnabled":false,"libraryConfig":null,"crossorigin":null,"crossoriginCacheBuster":null,"pluginCacheBuster":"","libraryUrl":".\/libraries\/h5pcore\/js","contents":{"cid-assets":{"displayOptions":{"copy":false,"copyright":false,"embed":false,"export":false,"frame":false,"icon":false},"embedCode":"","exportUrl":false,"fullScreen":false,"contentUserData":[],"metadata":{"title":"\u0394\u03c1\u03b1\u03c3\u03c4\u03b7\u03c1\u03b9\u03cc\u03c4\u03b7\u03c4\u03b1 \u03a0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03ae\u03c2 \u039b\u03cc\u03b3\u03bf\u03c5 (\u03a0\u03b5\u03c1\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae)","license":null},"library":"H5P.Column 1.18","jsonContent":"{\"content\":[{\"content\":{\"params\":{\"text\":\"<p>\\u0395\\u03be\\u03b7\\u03b3\\u03ae\\u03c3\\u03c4\\u03b5 \\u03c3\\u03b5 \\u03ad\\u03bd\\u03b1 \\u03ac\\u03c4\\u03bf\\u03bc\\u03bf \\u03bc\\u03b5\\u03b3\\u03b1\\u03bb\\u03cd\\u03c4\\u03b5\\u03c1\\u03b7\\u03c2 \\u03b7\\u03bb\\u03b9\\u03ba\\u03af\\u03b1\\u03c2, \\u03c0\\u03bf\\u03c5 \\u03b4\\u03b5\\u03bd \\u03ad\\u03c7\\u03b5\\u03b9 \\u03b9\\u03c3\\u03c7\\u03c5\\u03c1\\u03ae \\u03c0\\u03b5\\u03c1\\u03b9\\u03b2\\u03b1\\u03bb\\u03bb\\u03bf\\u03bd\\u03c4\\u03b9\\u03ba\\u03ae \\u03c3\\u03c5\\u03bd\\u03b5\\u03af\\u03b4\\u03b7\\u03c3\\u03b7, \\u03c3\\u03b5 \\u03c4\\u03b9 \\u03ba\\u03b1\\u03c4\\u03ac\\u03c3\\u03c4\\u03b1\\u03c3\\u03b7 \\u03b2\\u03c1\\u03af\\u03c3\\u03ba\\u03b5\\u03c4\\u03b1\\u03b9 \\u03c4\\u03bf \\u03c0\\u03b5\\u03c1\\u03b9\\u03b2\\u03ac\\u03bb\\u03bb\\u03bf\\u03bd \\u03bb\\u03cc\\u03b3\\u03c9 \\u03c4\\u03b7\\u03c2 \\u03c1\\u03cd\\u03c0\\u03b1\\u03bd\\u03c3\\u03b7\\u03c2. \\u0394\\u03b5\\u03af\\u03c4\\u03b5 \\u03c4\\u03b9\\u03c2 \\u03b5\\u03b9\\u03ba\\u03cc\\u03bd\\u03b5\\u03c2, \\u03b3\\u03b9\\u03b1 \\u03bd\\u03b1 \\u03bf\\u03c1\\u03b3\\u03b1\\u03bd\\u03ce\\u03c3\\u03b5\\u03c4\\u03b5 \\u03c4\\u03b7 \\u03c3\\u03ba\\u03ad\\u03c8\\u03b7 \\u03c3\\u03b1\\u03c2, \\u03be\\u03b5\\u03ba\\u03b9\\u03bd\\u03ce\\u03bd\\u03c4\\u03b1\\u03c2 \\u03b1\\u03c0\\u03cc \\u03c4\\u03bf \\u03b3\\u03b5\\u03bd\\u03b9\\u03ba\\u03cc \\u03c6\\u03b1\\u03b9\\u03bd\\u03cc\\u03bc\\u03b5\\u03bd\\u03bf \\u03ba\\u03b1\\u03b9 \\u03b5\\u03be\\u03b5\\u03b9\\u03b4\\u03b9\\u03ba\\u03b5\\u03cd\\u03bf\\u03bd\\u03c4\\u03b1\\u03c2 \\u03bc\\u03b5 \\u03c0\\u03b1\\u03c1\\u03b1\\u03b4\\u03b5\\u03af\\u03b3\\u03bc\\u03b1\\u03c4\\u03b1...<\\\/p>\\n\"},\"library\":\"H5P.AdvancedText 1.1\",\"metadata\":{\"contentType\":\"Text\",\"license\":\"U\",\"title\":\"Untitled Text\"},\"subContentId\":\"1e6e899f-9197-4e3f-bbb5-4424e6fe73e7\"},\"useSeparator\":\"auto\"},{\"content\":{\"params\":{\"imageSlides\":[{\"params\":{\"image\":{\"params\":{\"decorative\":true,\"contentName\":\"\\u0395\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"file\":{\"path\":\"images\\\/file-697cf1dfc43b0.jpg\",\"mime\":\"image\\\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1200,\"height\":675}},\"library\":\"H5P.Image 1.1\",\"subContentId\":\"72a3ddb2-e18f-4b90-ad4c-2618152dc94e\",\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\"}}},\"library\":\"H5P.ImageSlide 1.1\",\"subContentId\":\"af96e262-f95b-4c43-8541-d7da39addc10\",\"metadata\":{\"contentType\":\"Image Slide\",\"license\":\"U\",\"title\":\"Untitled Image Slide\"}},{\"params\":{\"image\":{\"params\":{\"decorative\":true,\"contentName\":\"\\u0395\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"file\":{\"path\":\"images\\\/file-697cf1eeace35.jpg\",\"mime\":\"image\\\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1200,\"height\":675}},\"library\":\"H5P.Image 1.1\",\"subContentId\":\"a21d056a-eaaf-4145-86cc-3be421f6dba0\",\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\"}}},\"library\":\"H5P.ImageSlide 1.1\",\"subContentId\":\"cb92ddb8-6b1f-479f-8359-467f5ec4182c\",\"metadata\":{\"contentType\":\"Image Slide\",\"license\":\"U\",\"title\":\"Untitled Image Slide\"}},{\"params\":{\"image\":{\"params\":{\"decorative\":true,\"contentName\":\"\\u0395\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"file\":{\"path\":\"images\\\/file-697cf205027ab.jpg\",\"mime\":\"image\\\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1200,\"height\":675}},\"library\":\"H5P.Image 1.1\",\"subContentId\":\"638308b4-ee86-43be-944a-aa95d7849b30\",\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\"}}},\"library\":\"H5P.ImageSlide 1.1\",\"subContentId\":\"8ec10795-3294-410e-8241-1ae3d5f6b377\",\"metadata\":{\"contentType\":\"Image Slide\",\"license\":\"U\",\"title\":\"Untitled Image Slide\"}},{\"params\":{\"image\":{\"params\":{\"decorative\":true,\"contentName\":\"\\u0395\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"file\":{\"path\":\"images\\\/file-697cf20debb98.jpg\",\"mime\":\"image\\\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1200,\"height\":675}},\"library\":\"H5P.Image 1.1\",\"subContentId\":\"94f8fc76-e737-4fc1-9ea2-dd71f95194d7\",\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\"}}},\"library\":\"H5P.ImageSlide 1.1\",\"subContentId\":\"f65e6d68-c02a-49da-b0a2-030069dbbb43\",\"metadata\":{\"contentType\":\"Image Slide\",\"license\":\"U\",\"title\":\"Untitled Image Slide\"}},{\"params\":{\"image\":{\"params\":{\"decorative\":true,\"contentName\":\"\\u0395\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\",\"expandImage\":\"Expand Image\",\"minimizeImage\":\"Minimize Image\",\"file\":{\"path\":\"images\\\/file-697cf25e73403.jpg\",\"mime\":\"image\\\/jpeg\",\"copyright\":{\"license\":\"U\"},\"width\":1200,\"height\":675}},\"library\":\"H5P.Image 1.1\",\"subContentId\":\"260d960c-6e15-4809-9c0d-f171632534cd\",\"metadata\":{\"contentType\":\"Image\",\"license\":\"U\",\"title\":\"Untitled Image\"}}},\"library\":\"H5P.ImageSlide 1.1\",\"subContentId\":\"11e334b3-ced6-4d4f-ae21-f0ff36f36aee\",\"metadata\":{\"contentType\":\"Image Slide\",\"license\":\"U\",\"title\":\"Untitled Image Slide\"}}],\"aspectRatioMode\":\"auto\",\"aspectRatio\":{\"aspectWidth\":4,\"aspectHeight\":3},\"a11y\":{\"nextSlide\":\"\\u0395\\u03c0\\u03cc\\u03bc\\u03b5\\u03bd\\u03b7 \\u03b5\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\",\"prevSlide\":\"\\u03a0\\u03c1\\u03bf\\u03b7\\u03b3\\u03bf\\u03cd\\u03bc\\u03b5\\u03bd\\u03b7 \\u03b5\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1\",\"gotoSlide\":\"\\u039c\\u03b5\\u03c4\\u03ac\\u03b2\\u03b1\\u03c3\\u03b7 \\u03c3\\u03c4\\u03b7\\u03bd \\u03b5\\u03b9\\u03ba\\u03cc\\u03bd\\u03b1 %slide\"}},\"library\":\"H5P.ImageSlider 1.1\",\"metadata\":{\"contentType\":\"Image Slider\",\"license\":\"U\",\"title\":\"Untitled Image Slider\"},\"subContentId\":\"34408161-ed5e-41fe-b3da-85915f7fd19d\"},\"useSeparator\":\"auto\"},{\"content\":{\"params\":{\"l10n\":{\"recordAnswer\":\"\\u0397\\u03c7\\u03bf\\u03b3\\u03c1\\u03ac\\u03c6\\u03b7\\u03c3\\u03b7\",\"pause\":\"\\u03a0\\u03b1\\u03cd\\u03c3\\u03b7\",\"continue\":\"\\u03a3\\u03c5\\u03bd\\u03ad\\u03c7\\u03b5\\u03b9\\u03b1\",\"download\":\"\\u039b\\u03ae\\u03c8\\u03b7\",\"done\":\"\\u039f\\u03bb\\u03bf\\u03ba\\u03bb\\u03ae\\u03c1\\u03c9\\u03c3\\u03b7\",\"retry\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7\",\"microphoneNotSupported\":\"\\u03a4\\u03bf \\u03bc\\u03b9\\u03ba\\u03c1\\u03cc\\u03c6\\u03c9\\u03bd\\u03bf \\u03b4\\u03b5\\u03bd \\u03c5\\u03c0\\u03bf\\u03c3\\u03c4\\u03b7\\u03c1\\u03af\\u03b6\\u03b5\\u03c4\\u03b1\\u03b9. \\u0392\\u03b5\\u03b2\\u03b1\\u03b9\\u03c9\\u03b8\\u03b5\\u03af\\u03c4\\u03b5 \\u03cc\\u03c4\\u03b9 \\u03c7\\u03c1\\u03b7\\u03c3\\u03b9\\u03bc\\u03bf\\u03c0\\u03bf\\u03b9\\u03b5\\u03af\\u03c4\\u03b5 \\u03ad\\u03bd\\u03b1 \\u03c0\\u03c1\\u03cc\\u03b3\\u03c1\\u03b1\\u03bc\\u03bc\\u03b1 \\u03c0\\u03b5\\u03c1\\u03b9\\u03ae\\u03b3\\u03b7\\u03c3\\u03b7\\u03c2 \\u03c0\\u03bf\\u03c5 \\u03b5\\u03c0\\u03b9\\u03c4\\u03c1\\u03ad\\u03c0\\u03b5\\u03b9 \\u03c4\\u03b7\\u03bd \\u03ba\\u03b1\\u03c4\\u03b1\\u03b3\\u03c1\\u03b1\\u03c6\\u03ae \\u03ae\\u03c7\\u03bf\\u03c5 \\u03b1\\u03c0\\u03cc \\u03bc\\u03b9\\u03ba\\u03c1\\u03cc\\u03c6\\u03c9\\u03bd\\u03bf.\",\"microphoneInaccessible\":\"\\u03a4\\u03bf \\u03bc\\u03b9\\u03ba\\u03c1\\u03cc\\u03c6\\u03c9\\u03bd\\u03bf \\u03b4\\u03b5\\u03bd \\u03b5\\u03af\\u03bd\\u03b1\\u03b9 \\u03c0\\u03c1\\u03bf\\u03c3\\u03b2\\u03ac\\u03c3\\u03b9\\u03bc\\u03bf. \\u0392\\u03b5\\u03b2\\u03b1\\u03b9\\u03c9\\u03b8\\u03b5\\u03af\\u03c4\\u03b5 \\u03cc\\u03c4\\u03b9 \\u03c4\\u03bf \\u03bc\\u03b9\\u03ba\\u03c1\\u03cc\\u03c6\\u03c9\\u03bd\\u03bf \\u03c4\\u03bf\\u03c5 \\u03c6\\u03c5\\u03bb\\u03bb\\u03bf\\u03bc\\u03b5\\u03c4\\u03c1\\u03b7\\u03c4\\u03ae \\u03b5\\u03af\\u03bd\\u03b1\\u03b9 \\u03b5\\u03bd\\u03b5\\u03c1\\u03b3\\u03bf\\u03c0\\u03bf\\u03b9\\u03b7\\u03bc\\u03ad\\u03bd\\u03bf.\",\"insecureNotAllowed\":\"\\u0397 \\u03c0\\u03c1\\u03cc\\u03c3\\u03b2\\u03b1\\u03c3\\u03b7 \\u03c3\\u03c4\\u03bf \\u03bc\\u03b9\\u03ba\\u03c1\\u03cc\\u03c6\\u03c9\\u03bd\\u03bf \\u03b4\\u03b5\\u03bd \\u03b5\\u03c0\\u03b9\\u03c4\\u03c1\\u03ad\\u03c0\\u03b5\\u03c4\\u03b1\\u03b9 \\u03c3\\u03c4\\u03bf\\u03bd \\u03c6\\u03c5\\u03bb\\u03bb\\u03bf\\u03bc\\u03b5\\u03c4\\u03c1\\u03b7\\u03c4\\u03ae \\u03c3\\u03b1\\u03c2, \\u03ba\\u03b1\\u03b8\\u03ce\\u03c2 \\u03b1\\u03c5\\u03c4\\u03ae \\u03b7 \\u03c3\\u03b5\\u03bb\\u03af\\u03b4\\u03b1 \\u03b4\\u03b5\\u03bd \\u03b5\\u03bc\\u03c6\\u03b1\\u03bd\\u03af\\u03b6\\u03b5\\u03c4\\u03b1\\u03b9 \\u03bc\\u03b5 HTTPS. \\u0395\\u03c0\\u03b9\\u03ba\\u03bf\\u03b9\\u03bd\\u03c9\\u03bd\\u03ae\\u03c3\\u03c4\\u03b5 \\u03bc\\u03b5 \\u03c4\\u03bf\\u03bd \\u03b4\\u03b7\\u03bc\\u03b9\\u03bf\\u03c5\\u03c1\\u03b3\\u03cc \\u03ba\\u03b1\\u03b9 \\u03b6\\u03b7\\u03c4\\u03ae\\u03c3\\u03c4\\u03b5 \\u03c4\\u03bf\\u03c5 \\u03bd\\u03b1 \\u03ba\\u03ac\\u03bd\\u03b5\\u03b9 \\u03b4\\u03b9\\u03b1\\u03b8\\u03ad\\u03c3\\u03b9\\u03bc\\u03bf \\u03c4\\u03bf \\u03c0\\u03b5\\u03c1\\u03b9\\u03b5\\u03c7\\u03cc\\u03bc\\u03b5\\u03bd\\u03bf \\u03c7\\u03c1\\u03b7\\u03c3\\u03b9\\u03bc\\u03bf\\u03c0\\u03bf\\u03b9\\u03ce\\u03bd\\u03c4\\u03b1\\u03c2 HTTPS\",\"statusReadyToRecord\":\"\\u03a0\\u03b1\\u03c4\\u03ae\\u03c3\\u03c4\\u03b5 \\u03c4\\u03bf \\u03c0\\u03b1\\u03c1\\u03b1\\u03ba\\u03ac\\u03c4\\u03c9 \\u03ba\\u03bf\\u03c5\\u03bc\\u03c0\\u03af \\u03b3\\u03b9\\u03b1 \\u03bd\\u03b1 \\u03b7\\u03c7\\u03bf\\u03b3\\u03c1\\u03b1\\u03c6\\u03ae\\u03c3\\u03b5\\u03c4\\u03b5 \\u03c4\\u03b7\\u03bd \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03b7\\u03c3\\u03ae \\u03c3\\u03b1\\u03c2.\",\"statusRecording\":\"\\u0397\\u03c7\\u03bf\\u03b3\\u03c1\\u03ac\\u03c6\\u03b7\\u03c3\\u03b7...\",\"statusPaused\":\"\\u0397 \\u03b7\\u03c7\\u03bf\\u03b3\\u03c1\\u03ac\\u03c6\\u03b7\\u03c3\\u03b7 \\u03ad\\u03c7\\u03b5\\u03b9 \\u03c3\\u03c4\\u03b1\\u03bc\\u03b1\\u03c4\\u03ae\\u03c3\\u03b5\\u03b9. \\u03a0\\u03b1\\u03c4\\u03ae\\u03c3\\u03c4\\u03b5 \\u03c4\\u03bf \\u03ba\\u03bf\\u03c5\\u03bc\\u03c0\\u03af \\u03b3\\u03b9\\u03b1 \\u03bd\\u03b1 \\u03c4\\u03b7 \\u03c3\\u03c5\\u03bd\\u03b5\\u03c7\\u03af\\u03c3\\u03b5\\u03c4\\u03b5.\",\"statusFinishedRecording\":\"\\u0388\\u03c7\\u03b5\\u03c4\\u03b5 \\u03b7\\u03c7\\u03bf\\u03b3\\u03c1\\u03b1\\u03c6\\u03ae\\u03c3\\u03b5\\u03b9 \\u03b5\\u03c0\\u03b9\\u03c4\\u03c5\\u03c7\\u03ce\\u03c2 \\u03c4\\u03b7\\u03bd \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03b7\\u03c3\\u03ae \\u03c3\\u03b1\\u03c2! \\u0391\\u03ba\\u03bf\\u03cd\\u03c3\\u03c4\\u03b5 \\u03c0\\u03b1\\u03c1\\u03b1\\u03ba\\u03ac\\u03c4\\u03c9 \\u03c4\\u03b7\\u03bd \\u03b7\\u03c7\\u03bf\\u03b3\\u03c1\\u03ac\\u03c6\\u03b7\\u03c3\\u03ae \\u03c3\\u03b1\\u03c2.\",\"downloadRecording\":\"\\u039a\\u03b1\\u03c4\\u03b5\\u03b2\\u03ac\\u03c3\\u03c4\\u03b5 \\u03c4\\u03b7\\u03bd \\u03b7\\u03c7\\u03bf\\u03b3\\u03c1\\u03ac\\u03c6\\u03b7\\u03c3\\u03b7 \\u03ae \\u03c0\\u03c1\\u03bf\\u03c3\\u03c0\\u03b1\\u03b8\\u03ae\\u03c3\\u03c4\\u03b5 \\u03be\\u03b1\\u03bd\\u03ac.\",\"retryDialogHeaderText\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7 \\u03b7\\u03c7\\u03bf\\u03b3\\u03c1\\u03ac\\u03c6\\u03b7\\u03c3\\u03b7\\u03c2;\",\"retryDialogBodyText\":\"\\u0395\\u03c0\\u03b9\\u03bb\\u03ad\\u03b3\\u03bf\\u03bd\\u03c4\\u03b1\\u03c2 &quot;\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7&quot; \\u03b7 \\u03c4\\u03c1\\u03ad\\u03c7\\u03bf\\u03c5\\u03c3\\u03b1 \\u03b7\\u03c7\\u03bf\\u03b3\\u03c1\\u03ac\\u03c6\\u03b7\\u03c3\\u03ae \\u03c3\\u03b1\\u03c2 \\u03b8\\u03b1 \\u03c7\\u03b1\\u03b8\\u03b5\\u03af.\",\"retryDialogConfirmText\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7\",\"retryDialogCancelText\":\"\\u0391\\u03ba\\u03cd\\u03c1\\u03c9\\u03c3\\u03b7\",\"statusCantCreateTheAudioFile\":\"\\u0394\\u03b5\\u03bd \\u03b5\\u03af\\u03bd\\u03b1\\u03b9 \\u03b4\\u03c5\\u03bd\\u03b1\\u03c4\\u03ae \\u03b7 \\u03b4\\u03b7\\u03bc\\u03b9\\u03bf\\u03c5\\u03c1\\u03b3\\u03af\\u03b1 \\u03c4\\u03bf\\u03c5 \\u03b1\\u03c1\\u03c7\\u03b5\\u03af\\u03bf\\u03c5 \\u03ae\\u03c7\\u03bf\\u03c5.\"}},\"library\":\"H5P.AudioRecorder 1.0\",\"metadata\":{\"contentType\":\"Audio Recorder\",\"license\":\"U\",\"title\":\"Untitled Audio Recorder\"},\"subContentId\":\"298ac413-c89b-41cb-bf13-44668756e5ea\"},\"useSeparator\":\"auto\"},{\"content\":{\"params\":{\"media\":{\"disableImageZooming\":false},\"correct\":\"true\",\"behaviour\":{\"enableRetry\":true,\"enableSolutionsButton\":true,\"enableCheckButton\":true,\"confirmCheckDialog\":false,\"confirmRetryDialog\":false,\"autoCheck\":false},\"l10n\":{\"trueText\":\"\\u03a3\\u03c9\\u03c3\\u03c4\\u03cc\",\"falseText\":\"\\u039b\\u03ac\\u03b8\\u03bf\\u03c2\",\"score\":\"\\u03a3\\u03c5\\u03b3\\u03ba\\u03ad\\u03bd\\u03c4\\u03c1\\u03c9\\u03c3\\u03b5\\u03c2 @score \\u03b1\\u03c0\\u03cc @total \\u03b2\\u03b1\\u03b8\\u03bc\\u03bf\\u03cd\\u03c2\",\"checkAnswer\":\"\\u0388\\u03bb\\u03b5\\u03b3\\u03c7\\u03bf\\u03c2\",\"submitAnswer\":\"\\u03a5\\u03c0\\u03bf\\u03b2\\u03bf\\u03bb\\u03ae\",\"showSolutionButton\":\"\\u039b\\u03cd\\u03c3\\u03b7\",\"tryAgain\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7\",\"wrongAnswerMessage\":\"\\u039b\\u03ac\\u03b8\\u03bf\\u03c2 \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03b7\\u03c3\\u03b7\",\"correctAnswerMessage\":\"\\u03a3\\u03c9\\u03c3\\u03c4\\u03ae \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03b7\\u03c3\\u03b7\",\"scoreBarLabel\":\"\\u03a3\\u03c5\\u03b3\\u03ba\\u03b5\\u03bd\\u03c4\\u03c1\\u03ce\\u03c3\\u03b1\\u03c4\\u03b5 :num \\u03b1\\u03c0\\u03cc :total \\u03b2\\u03b1\\u03b8\\u03bc\\u03bf\\u03cd\\u03c2\",\"a11yCheck\":\"\\u0388\\u03bb\\u03b5\\u03b3\\u03c7\\u03bf\\u03c2 \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03ae\\u03c3\\u03b5\\u03c9\\u03bd. \\u039f\\u03b9 \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03ae\\u03c3\\u03b5\\u03b9\\u03c2 \\u03b8\\u03b1 \\u03bc\\u03b1\\u03c1\\u03ba\\u03b1\\u03c1\\u03b9\\u03c3\\u03c4\\u03bf\\u03cd\\u03bd \\u03c9\\u03c2 \\u03c3\\u03c9\\u03c3\\u03c4\\u03ad\\u03c2, \\u03bb\\u03ac\\u03b8\\u03bf\\u03c2 \\u03ba\\u03b1\\u03b9 \\u03bc\\u03b7 \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03b7\\u03bc\\u03ad\\u03bd\\u03b5\\u03c2.\",\"a11yShowSolution\":\"\\u03a0\\u03c1\\u03bf\\u03b2\\u03bf\\u03bb\\u03ae \\u03c4\\u03b7\\u03c2 \\u03bb\\u03cd\\u03c3\\u03b7\\u03c2. \\u0397 \\u03ac\\u03c3\\u03ba\\u03b7\\u03c3\\u03b7 \\u03b8\\u03b1 \\u03b5\\u03c0\\u03b9\\u03c3\\u03b7\\u03bc\\u03b1\\u03bd\\u03b8\\u03b5\\u03af \\u03bc\\u03b5 \\u03c4\\u03b7\\u03bd \\u03c3\\u03c9\\u03c3\\u03c4\\u03ae \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03c3\\u03b7.\",\"a11yRetry\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7 \\u03c4\\u03b7\\u03c2 \\u03b5\\u03c1\\u03b3\\u03b1\\u03c3\\u03af\\u03b1\\u03c2. \\u0395\\u03c0\\u03b1\\u03bd\\u03b1\\u03c6\\u03bf\\u03c1\\u03ac \\u03cc\\u03bb\\u03c9\\u03bd \\u03c4\\u03c9\\u03bd \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03ae\\u03c3\\u03b5\\u03c9\\u03bd \\u03ba\\u03b1\\u03b9 \\u03ad\\u03bd\\u03b1\\u03c1\\u03be\\u03b7 \\u03b1\\u03c0\\u03cc \\u03c4\\u03b7\\u03bd \\u03b1\\u03c1\\u03c7\\u03ae.\"},\"confirmCheck\":{\"header\":\"\\u039f\\u03bb\\u03bf\\u03ba\\u03bb\\u03ae\\u03c1\\u03c9\\u03c3\\u03b7 \\u03ac\\u03c3\\u03ba\\u03b7\\u03c3\\u03b7\\u03c2\",\"body\":\"\\u0395\\u03af\\u03c3\\u03b1\\u03b9 \\u03c3\\u03af\\u03b3\\u03bf\\u03c5\\u03c1\\u03bf\\u03c2 \\u03cc\\u03c4\\u03b9 \\u03b8\\u03ad\\u03bb\\u03b5\\u03b9\\u03c2 \\u03bd\\u03b1 \\u03bf\\u03bb\\u03bf\\u03ba\\u03bb\\u03b7\\u03c1\\u03ce\\u03c3\\u03b5\\u03b9\\u03c2 \\u03c4\\u03b7\\u03bd \\u03ac\\u03c3\\u03ba\\u03b7\\u03c3\\u03b7;\",\"cancelLabel\":\"\\u038c\\u03c7\\u03b9\",\"confirmLabel\":\"\\u039d\\u03b1\\u03b9\"},\"confirmRetry\":{\"header\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7\",\"body\":\"\\u0395\\u03af\\u03c3\\u03b1\\u03b9 \\u03c3\\u03af\\u03b3\\u03bf\\u03c5\\u03c1\\u03bf\\u03c2\\\/\\u03b7 \\u03cc\\u03c4\\u03b9 \\u03b8\\u03ad\\u03bb\\u03b5\\u03b9\\u03c2 \\u03bd\\u03b1 \\u03c0\\u03c1\\u03bf\\u03c3\\u03c0\\u03b1\\u03b8\\u03ae\\u03c3\\u03b5\\u03b9\\u03c2 \\u03be\\u03b1\\u03bd\\u03ac;\",\"cancelLabel\":\"\\u038c\\u03c7\\u03b9\",\"confirmLabel\":\"\\u039d\\u03b1\\u03b9\"},\"question\":\"<p>\\u0391\\u03ba\\u03bf\\u03bb\\u03bf\\u03cd\\u03b8\\u03b7\\u03c3\\u03b5\\u03c2 \\u03c3\\u03c4\\u03b7\\u03bd \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03b7\\u03c3\\u03ae \\u03c3\\u03bf\\u03c5 \\u03c4\\u03bf \\u03bf\\u03c1\\u03b3\\u03b1\\u03bd\\u03c9\\u03c4\\u03b9\\u03ba\\u03cc \\u03c3\\u03c7\\u03ae\\u03bc\\u03b1 \\u00ab\\u03b3\\u03b5\\u03bd\\u03b9\\u03ba\\u03cc \\u03c6\\u03b1\\u03b9\\u03bd\\u03cc\\u03bc\\u03b5\\u03bd\\u03bf-\\u03c0\\u03b1\\u03c1\\u03b1\\u03b4\\u03b5\\u03af\\u03b3\\u03bc\\u03b1\\u03c4\\u03b1\\u00bb;<\\\/p>\\n\"},\"library\":\"H5P.TrueFalse 1.8\",\"metadata\":{\"contentType\":\"True\\\/False Question\",\"license\":\"U\",\"title\":\"Untitled True\\\/False Question\"},\"subContentId\":\"1c558872-f188-4c7f-9c30-e3ad9fc9f56f\"},\"useSeparator\":\"auto\"},{\"content\":{\"params\":{\"media\":{\"disableImageZooming\":false},\"correct\":\"true\",\"behaviour\":{\"enableRetry\":true,\"enableSolutionsButton\":true,\"enableCheckButton\":true,\"confirmCheckDialog\":false,\"confirmRetryDialog\":false,\"autoCheck\":false},\"l10n\":{\"trueText\":\"\\u03a3\\u03c9\\u03c3\\u03c4\\u03cc\",\"falseText\":\"\\u039b\\u03ac\\u03b8\\u03bf\\u03c2\",\"score\":\"\\u03a3\\u03c5\\u03b3\\u03ba\\u03ad\\u03bd\\u03c4\\u03c1\\u03c9\\u03c3\\u03b5\\u03c2 @score \\u03b1\\u03c0\\u03cc @total \\u03b2\\u03b1\\u03b8\\u03bc\\u03bf\\u03cd\\u03c2\",\"checkAnswer\":\"\\u0388\\u03bb\\u03b5\\u03b3\\u03c7\\u03bf\\u03c2\",\"submitAnswer\":\"\\u03a5\\u03c0\\u03bf\\u03b2\\u03bf\\u03bb\\u03ae\",\"showSolutionButton\":\"\\u039b\\u03cd\\u03c3\\u03b7\",\"tryAgain\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7\",\"wrongAnswerMessage\":\"\\u039b\\u03ac\\u03b8\\u03bf\\u03c2 \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03b7\\u03c3\\u03b7\",\"correctAnswerMessage\":\"\\u03a3\\u03c9\\u03c3\\u03c4\\u03ae \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03b7\\u03c3\\u03b7\",\"scoreBarLabel\":\"\\u03a3\\u03c5\\u03b3\\u03ba\\u03b5\\u03bd\\u03c4\\u03c1\\u03ce\\u03c3\\u03b1\\u03c4\\u03b5 :num \\u03b1\\u03c0\\u03cc :total \\u03b2\\u03b1\\u03b8\\u03bc\\u03bf\\u03cd\\u03c2\",\"a11yCheck\":\"\\u0388\\u03bb\\u03b5\\u03b3\\u03c7\\u03bf\\u03c2 \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03ae\\u03c3\\u03b5\\u03c9\\u03bd. \\u039f\\u03b9 \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03ae\\u03c3\\u03b5\\u03b9\\u03c2 \\u03b8\\u03b1 \\u03bc\\u03b1\\u03c1\\u03ba\\u03b1\\u03c1\\u03b9\\u03c3\\u03c4\\u03bf\\u03cd\\u03bd \\u03c9\\u03c2 \\u03c3\\u03c9\\u03c3\\u03c4\\u03ad\\u03c2, \\u03bb\\u03ac\\u03b8\\u03bf\\u03c2 \\u03ba\\u03b1\\u03b9 \\u03bc\\u03b7 \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03b7\\u03bc\\u03ad\\u03bd\\u03b5\\u03c2.\",\"a11yShowSolution\":\"\\u03a0\\u03c1\\u03bf\\u03b2\\u03bf\\u03bb\\u03ae \\u03c4\\u03b7\\u03c2 \\u03bb\\u03cd\\u03c3\\u03b7\\u03c2. \\u0397 \\u03ac\\u03c3\\u03ba\\u03b7\\u03c3\\u03b7 \\u03b8\\u03b1 \\u03b5\\u03c0\\u03b9\\u03c3\\u03b7\\u03bc\\u03b1\\u03bd\\u03b8\\u03b5\\u03af \\u03bc\\u03b5 \\u03c4\\u03b7\\u03bd \\u03c3\\u03c9\\u03c3\\u03c4\\u03ae \\u03b1\\u03c0\\u03ac\\u03bd\\u03c4\\u03c3\\u03b7.\",\"a11yRetry\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7 \\u03c4\\u03b7\\u03c2 \\u03b5\\u03c1\\u03b3\\u03b1\\u03c3\\u03af\\u03b1\\u03c2. \\u0395\\u03c0\\u03b1\\u03bd\\u03b1\\u03c6\\u03bf\\u03c1\\u03ac \\u03cc\\u03bb\\u03c9\\u03bd \\u03c4\\u03c9\\u03bd \\u03b1\\u03c0\\u03b1\\u03bd\\u03c4\\u03ae\\u03c3\\u03b5\\u03c9\\u03bd \\u03ba\\u03b1\\u03b9 \\u03ad\\u03bd\\u03b1\\u03c1\\u03be\\u03b7 \\u03b1\\u03c0\\u03cc \\u03c4\\u03b7\\u03bd \\u03b1\\u03c1\\u03c7\\u03ae.\"},\"confirmCheck\":{\"header\":\"\\u039f\\u03bb\\u03bf\\u03ba\\u03bb\\u03ae\\u03c1\\u03c9\\u03c3\\u03b7 \\u03ac\\u03c3\\u03ba\\u03b7\\u03c3\\u03b7\\u03c2\",\"body\":\"\\u0395\\u03af\\u03c3\\u03b1\\u03b9 \\u03c3\\u03af\\u03b3\\u03bf\\u03c5\\u03c1\\u03bf\\u03c2 \\u03cc\\u03c4\\u03b9 \\u03b8\\u03ad\\u03bb\\u03b5\\u03b9\\u03c2 \\u03bd\\u03b1 \\u03bf\\u03bb\\u03bf\\u03ba\\u03bb\\u03b7\\u03c1\\u03ce\\u03c3\\u03b5\\u03b9\\u03c2 \\u03c4\\u03b7\\u03bd \\u03ac\\u03c3\\u03ba\\u03b7\\u03c3\\u03b7;\",\"cancelLabel\":\"\\u038c\\u03c7\\u03b9\",\"confirmLabel\":\"\\u039d\\u03b1\\u03b9\"},\"confirmRetry\":{\"header\":\"\\u0395\\u03c0\\u03b1\\u03bd\\u03ac\\u03bb\\u03b7\\u03c8\\u03b7\",\"body\":\"\\u0395\\u03af\\u03c3\\u03b1\\u03b9 \\u03c3\\u03af\\u03b3\\u03bf\\u03c5\\u03c1\\u03bf\\u03c2\\\/\\u03b7 \\u03cc\\u03c4\\u03b9 \\u03b8\\u03ad\\u03bb\\u03b5\\u03b9\\u03c2 \\u03bd\\u03b1 \\u03c0\\u03c1\\u03bf\\u03c3\\u03c0\\u03b1\\u03b8\\u03ae\\u03c3\\u03b5\\u03b9\\u03c2 \\u03be\\u03b1\\u03bd\\u03ac;\",\"cancelLabel\":\"\\u038c\\u03c7\\u03b9\",\"confirmLabel\":\"\\u039d\\u03b1\\u03b9\"},\"question\":\"<p>\\u03a7\\u03c1\\u03b7\\u03c3\\u03b9\\u03bc\\u03bf\\u03c0\\u03bf\\u03af\\u03b7\\u03c3\\u03b5\\u03c2 \\u03ba\\u03b5\\u03b9\\u03bc\\u03b5\\u03bd\\u03bf\\u03bf\\u03c1\\u03b3\\u03b1\\u03bd\\u03c9\\u03c4\\u03b9\\u03ba\\u03ad\\u03c2 \\u03bb\\u03ad\\u03be\\u03b5\\u03b9\\u03c2 \\u03ae \\u03c6\\u03c1\\u03ac\\u03c3\\u03b5\\u03b9\\u03c2 \\u03c0\\u03bf\\u03c5 \\u03bd\\u03b1 \\u03c6\\u03b1\\u03bd\\u03b5\\u03c1\\u03ce\\u03bd\\u03bf\\u03c5\\u03bd \\u03c4\\u03b7\\u03bd \\u03c0\\u03bf\\u03c1\\u03b5\\u03af\\u03b1 \\u03b1\\u03c0\\u03cc \\u03c4\\u03bf \\u03b3\\u03b5\\u03bd\\u03b9\\u03ba\\u03cc \\u03c6\\u03b1\\u03b9\\u03bd\\u03cc\\u03bc\\u03b5\\u03bd\\u03bf \\u03c3\\u03c4\\u03b1 \\u03c3\\u03c5\\u03b3\\u03ba\\u03b5\\u03ba\\u03c1\\u03b9\\u03bc\\u03ad\\u03bd\\u03b1 \\u03c0\\u03b1\\u03c1\\u03b1\\u03b4\\u03b5\\u03af\\u03b3\\u03bc\\u03b1\\u03c4\\u03b1;<\\\/p>\\n\"},\"library\":\"H5P.TrueFalse 1.8\",\"metadata\":{\"contentType\":\"True\\\/False Question\",\"license\":\"U\",\"title\":\"Untitled True\\\/False Question\"},\"subContentId\":\"244b5f82-35be-404c-9dcd-7b734a1aba5a\"},\"useSeparator\":\"auto\"}]}"}}});