update metadataplayer
authorymh <ymh.work@gmail.com>
Wed, 04 Sep 2024 15:36:55 +0200
changeset 1505 3fcce374ca5e
parent 1504 8cc1dda7efc8
child 1506 d5aa9340cb92
update metadataplayer
src/ldt/ldt/static/ldt/metadataplayer/AdaptivePlayer.js
src/ldt/ldt/static/ldt/metadataplayer/Annotation.css
src/ldt/ldt/static/ldt/metadataplayer/Annotation.js
src/ldt/ldt/static/ldt/metadataplayer/AnnotationsController.css
src/ldt/ldt/static/ldt/metadataplayer/AnnotationsController.js
src/ldt/ldt/static/ldt/metadataplayer/AnnotationsList.css
src/ldt/ldt/static/ldt/metadataplayer/AnnotationsList.js
src/ldt/ldt/static/ldt/metadataplayer/Arrow.js
src/ldt/ldt/static/ldt/metadataplayer/AutoPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/Controller.css
src/ldt/ldt/static/ldt/metadataplayer/Controller.js
src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.css
src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js
src/ldt/ldt/static/ldt/metadataplayer/CurrentSegmentInfobox.css
src/ldt/ldt/static/ldt/metadataplayer/CurrentSegmentInfobox.js
src/ldt/ldt/static/ldt/metadataplayer/DailymotionPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/EnrichedPlan.css
src/ldt/ldt/static/ldt/metadataplayer/EnrichedPlan.js
src/ldt/ldt/static/ldt/metadataplayer/HelloWorld.css
src/ldt/ldt/static/ldt/metadataplayer/HelloWorld.js
src/ldt/ldt/static/ldt/metadataplayer/Highlighter.css
src/ldt/ldt/static/ldt/metadataplayer/Highlighter.js
src/ldt/ldt/static/ldt/metadataplayer/HtmlMashupPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/HtmlPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/ImageDisplay.css
src/ldt/ldt/static/ldt/metadataplayer/ImageDisplay.js
src/ldt/ldt/static/ldt/metadataplayer/JwpPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/KnowledgeConcierge.css
src/ldt/ldt/static/ldt/metadataplayer/KnowledgeConcierge.js
src/ldt/ldt/static/ldt/metadataplayer/LatestAnnotation.css
src/ldt/ldt/static/ldt/metadataplayer/LatestAnnotation.js
src/ldt/ldt/static/ldt/metadataplayer/LdtPlayer-core.js
src/ldt/ldt/static/ldt/metadataplayer/Markers.css
src/ldt/ldt/static/ldt/metadataplayer/Markers.js
src/ldt/ldt/static/ldt/metadataplayer/MashupPlayer.css
src/ldt/ldt/static/ldt/metadataplayer/MashupPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/MediaList.css
src/ldt/ldt/static/ldt/metadataplayer/MediaList.js
src/ldt/ldt/static/ldt/metadataplayer/Mediafragment.js
src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js
src/ldt/ldt/static/ldt/metadataplayer/NoteTaking.css
src/ldt/ldt/static/ldt/metadataplayer/NoteTaking.js
src/ldt/ldt/static/ldt/metadataplayer/PlaceholderPlayer.css
src/ldt/ldt/static/ldt/metadataplayer/PlaceholderPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/Polemic.css
src/ldt/ldt/static/ldt/metadataplayer/Polemic.js
src/ldt/ldt/static/ldt/metadataplayer/PopcornPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/Quiz.css
src/ldt/ldt/static/ldt/metadataplayer/Quiz.js
src/ldt/ldt/static/ldt/metadataplayer/QuizCreator.css
src/ldt/ldt/static/ldt/metadataplayer/QuizCreator.js
src/ldt/ldt/static/ldt/metadataplayer/Renkan.css
src/ldt/ldt/static/ldt/metadataplayer/Renkan.js
src/ldt/ldt/static/ldt/metadataplayer/Segments.css
src/ldt/ldt/static/ldt/metadataplayer/Segments.js
src/ldt/ldt/static/ldt/metadataplayer/Shortcuts.css
src/ldt/ldt/static/ldt/metadataplayer/Shortcuts.js
src/ldt/ldt/static/ldt/metadataplayer/Slice.css
src/ldt/ldt/static/ldt/metadataplayer/Slice.js
src/ldt/ldt/static/ldt/metadataplayer/SlidePreview.css
src/ldt/ldt/static/ldt/metadataplayer/SlidePreview.js
src/ldt/ldt/static/ldt/metadataplayer/SlideVideoPlayer.css
src/ldt/ldt/static/ldt/metadataplayer/SlideVideoPlayer.js
src/ldt/ldt/static/ldt/metadataplayer/Slider.css
src/ldt/ldt/static/ldt/metadataplayer/Slider.js
src/ldt/ldt/static/ldt/metadataplayer/Slideshare.css
src/ldt/ldt/static/ldt/metadataplayer/Slideshare.js
src/ldt/ldt/static/ldt/metadataplayer/Social.css
src/ldt/ldt/static/ldt/metadataplayer/Social.js
src/ldt/ldt/static/ldt/metadataplayer/Sparkline.js
src/ldt/ldt/static/ldt/metadataplayer/SpelSyncHtml.js
src/ldt/ldt/static/ldt/metadataplayer/Tagcloud.css
src/ldt/ldt/static/ldt/metadataplayer/Tagcloud.js
src/ldt/ldt/static/ldt/metadataplayer/Title.js
src/ldt/ldt/static/ldt/metadataplayer/Tooltip.css
src/ldt/ldt/static/ldt/metadataplayer/Tooltip.js
src/ldt/ldt/static/ldt/metadataplayer/Trace.js
src/ldt/ldt/static/ldt/metadataplayer/Transcript.css
src/ldt/ldt/static/ldt/metadataplayer/Transcript.js
src/ldt/ldt/static/ldt/metadataplayer/Tweet.css
src/ldt/ldt/static/ldt/metadataplayer/Tweet.js
src/ldt/ldt/static/ldt/metadataplayer/img/cancel_annotation.png
src/ldt/ldt/static/ldt/metadataplayer/img/delete.png
src/ldt/ldt/static/ldt/metadataplayer/img/edit.png
src/ldt/ldt/static/ldt/metadataplayer/img/external.png
src/ldt/ldt/static/ldt/metadataplayer/img/fullscreen.svg
src/ldt/ldt/static/ldt/metadataplayer/img/hand_left.png
src/ldt/ldt/static/ldt/metadataplayer/img/hand_right.png
src/ldt/ldt/static/ldt/metadataplayer/img/left_arrow.svg
src/ldt/ldt/static/ldt/metadataplayer/img/loader.gif
src/ldt/ldt/static/ldt/metadataplayer/img/min_right_toggle.png
src/ldt/ldt/static/ldt/metadataplayer/img/min_valid_sprites.png
src/ldt/ldt/static/ldt/metadataplayer/img/min_wrong_toggle.png
src/ldt/ldt/static/ldt/metadataplayer/img/pinstripe-grey.png
src/ldt/ldt/static/ldt/metadataplayer/img/pinstripe-purple.png
src/ldt/ldt/static/ldt/metadataplayer/img/pinstripe.png
src/ldt/ldt/static/ldt/metadataplayer/img/pip_toggle.svg
src/ldt/ldt/static/ldt/metadataplayer/img/player-sprites.png
src/ldt/ldt/static/ldt/metadataplayer/img/player_gradient.png
src/ldt/ldt/static/ldt/metadataplayer/img/polemic.png
src/ldt/ldt/static/ldt/metadataplayer/img/profile_arrow.png
src/ldt/ldt/static/ldt/metadataplayer/img/publish_annotation.png
src/ldt/ldt/static/ldt/metadataplayer/img/published_annotation.png
src/ldt/ldt/static/ldt/metadataplayer/img/quiz_add_question.svg
src/ldt/ldt/static/ldt/metadataplayer/img/quiz_off.svg
src/ldt/ldt/static/ldt/metadataplayer/img/quiz_on.svg
src/ldt/ldt/static/ldt/metadataplayer/img/reel.gif
src/ldt/ldt/static/ldt/metadataplayer/img/right_arrow.svg
src/ldt/ldt/static/ldt/metadataplayer/img/slice-handles.png
src/ldt/ldt/static/ldt/metadataplayer/img/socialbuttons.png
src/ldt/ldt/static/ldt/metadataplayer/img/socialcopy.png
src/ldt/ldt/static/ldt/metadataplayer/img/submit_annotation.png
src/ldt/ldt/static/ldt/metadataplayer/img/tag.png
src/ldt/ldt/static/ldt/metadataplayer/img/time_edit.png
src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-corners.png
src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-gradient.png
src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-h-borders.png
src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-tip.png
src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-v-borders.png
src/ldt/ldt/static/ldt/metadataplayer/img/twitter.svg
src/ldt/ldt/static/ldt/metadataplayer/img/twitter_sprites.png
src/ldt/ldt/static/ldt/metadataplayer/img/valid_sprites.png
src/ldt/ldt/static/ldt/metadataplayer/img/voiceannotation.png
src/ldt/ldt/static/ldt/metadataplayer/img/white_arrow_long.png
src/ldt/ldt/static/ldt/metadataplayer/img/widget-control.png
src/ldt/ldt/static/ldt/metadataplayer/img/zoombuttons.png
--- a/src/ldt/ldt/static/ldt/metadataplayer/AdaptivePlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-IriSP.Widgets.AdaptivePlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.AdaptivePlayer.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.AdaptivePlayer.prototype.defaults = {
-    mime_type: 'video/mp4; codecs="avc1.42E01E"',
-    normal_player: "HtmlPlayer",
-    fallback_player: "JwpPlayer"
-};
-
-IriSP.Widgets.AdaptivePlayer.prototype.draw = function() {
-    
-    if (typeof this.video === "undefined") {
-        this.video = this.media.video;
-    }
-    
-    var _props = [ "autostart", "video", "height", "width", "url_transform" ],
-        _opts = {},
-        _canPlayType = document.createElement('video').canPlayType(this.mime_type);
-    
-    _opts.type = (_canPlayType !== "no") ? this.normal_player : this.fallback_player;
-    
-    for (var i = 0; i < _props.length; i++) {
-        if (typeof this[_props[i]] !== "undefined") {
-            _opts[_props[i]] = this[_props[i]];
-        }
-    }
-
-    this.insertSubwidget(this.$, _opts);
-    
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Annotation.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-.Ldt-Annotation-Widget {
-    border-style: none solid solid;
-    border-width: 1px;
-    border-color: #b7b7b7;
-    padding: 0 1px 1px;
-    margin: 0;
-}
-
-.Ldt-Annotation-Widget.Ldt-Annotation-ShowTop {
-    border-top-style: solid;
-    padding-top: 1px;
-}
-
-.Ldt-Annotation-Inner {
-    background: url(img/pinstripe.png);
-    padding: 5px;
-    margin: 0;
-}
-
-.Ldt-Annotation-Inner h3 {
-    margin: 5px 0;
-    font-size: 14px;
-    font-weight: bold;
-}
-
-.Ldt-Annotation-Description {
-    max-height: 150px;
-    overflow: auto;
-}
-
-.Ldt-Annotation-Cleared {
-    clear: both;
-}
-
-.Ldt-Annotation-MaxMinButton {
-    float: right; margin: 5px 5px 0; width: 17px; height: 17px;
-    background: url(img/widget-control.png); background-position: 0 -51px; cursor: pointer;
-}
-
-.Ldt-Annotation-Social {
-    float: right;
-}
-
-.Ldt-Annotation-MaxMinButton:hover {
-    background-position: -17px -51px;
-}
-
-.Ldt-Annotation-Minimized div.Ldt-Annotation-MaxMinButton {
-    background-position: 0 -34px;
-}
-
-.Ldt-Annotation-Minimized div.Ldt-Annotation-MaxMinButton:hover {
-    background-position: -17px -34px;
-}
-
-.Ldt-Annotation-Inner h3.Ldt-Annotation-MashupOrigin {
-    font-size: 12px;
-}
-
-.Ldt-Annotation-Title, .Ldt-Annotation-MashupMedia {
-    color: #0068c4;
-    text-decoration: none;
-}
-
-.Ldt-Annotation-Type {
-    color: #8080A0;
-}
-
-.Ldt-Annotation-Time {
-    color: #ff3b77
-}
-
-.Ldt-Annotation-Inner p {
-    font-size: 12px;
-    line-height: 16px;
-}
-
-.Ldt-Annotation-Label {
-    font-size: 12px; font-weight: bold; max-width: 90px; float: left; clear: left;
-}
-
-.Ldt-Annotation-Labelled {
-    margin: 5px 0 0 90px; clear: right;
-}
-
-.Ldt-Annotation-Tags-Block {
-    font-size: 12px;
-}
-
-ul.Ldt-Annotation-Tags {
-    list-style: none; padding: 0;
-}
-
-li.Ldt-Annotation-TagLabel {
-    display: inline-block; border: none; margin: 0 10px 5px 0; height: 23px; padding: 0 0 0 20px;
-    background: url(img/tag.png) left top no-repeat;
-    cursor: pointer;
-}
-
-.Ldt-Annotation-TagLabel span {
-    display: inline-block; font-size: 12px; height: 19px; padding: 4px 5px 0 0; border: none; margin: 0;
-    background: url(img/tag.png) right top no-repeat;
-}
-
-li.Ldt-Annotation-TagLabel:hover {
-    background-position: left -23px;
-}
-
-.Ldt-Annotation-TagLabel:hover span {
-    background-position: right -23px;
-}
-
-.Ldt-Annotation-MashupOrigin {
-    display: none;
-}
-
-.Ldt-Annotation-isMashup .Ldt-Annotation-MashupOrigin {
-    display: block;
-}
-
-.Ldt-Annotation-Empty .Ldt-Annotation-HiddenWhenEmpty {
-    display: none;
-}
-
-.Ldt-Annotation-Minimized .Ldt-Annotation-HiddenWhenMinimized {
-    display: none;
-}
-
-.Ldt-Annotation-EmptyBlock {
-    display: none;
-}
-
--- a/src/ldt/ldt/static/ldt/metadataplayer/Annotation.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-// TODO: Migrate Timeupdate functions to Extract
-
-IriSP.Widgets.Annotation = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.lastAnnotation = false;
-    this.minimized = this.start_minimized || false;
-    this.bounds = [ 0, 0 ];
-};
-
-IriSP.Widgets.Annotation.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Annotation.prototype.messages = {
-    fr: {
-        watching: "Je regarde ",
-        on_site: " sur ",
-        tags_: "Mots-clés\u00a0:",
-        description_: "Description\u00a0:",
-        creator_: "Créé par\u00a0:",
-        excerpt_from: "Extrait de\u00a0:",
-        untitled: "Segment sans titre"
-    },
-    en: {
-        watching: "I'm watching ",
-        on_site: " on ",
-        tags_: "Keywords:",
-        description_: "Description:",
-        creator_: "Created by\u00a0:",
-        excerpt_from: "Excerpt from:",
-        untitled: "Untitled segment"
-    }
-};
-
-IriSP.Widgets.Annotation.prototype.template =
-    '{{#show_arrow}}<div class="Ldt-Annotation-Arrow"></div>{{/show_arrow}}'
-    + '<div class="Ldt-Annotation-Widget {{^show_arrow}}Ldt-Annotation-ShowTop{{/show_arrow}}">'
-    + '<div class="Ldt-Annotation-Inner Ldt-Annotation-Empty{{#start_minimized}} Ldt-Annotation-Minimized{{/start_minimized}}">'
-    + '<div class="Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-MaxMinButton"></div>'
-    + '{{#show_social}}<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></div>{{/show_social}}'
-    + '<h3 class="Ldt-Annotation-HiddenWhenEmpty">{{#show_annotation_type}}<span class="Ldt-Annotation-Type"></span> » {{/show_annotation_type}}<a class="Ldt-Annotation-Title" href="#"></a> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">'
-    + '(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3>'
-    + '<h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">'
-    + '(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3>'
-    + '<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Creator-Block"><div class="Ldt-Annotation-Label">{{l10n.creator_}}</div>'
-    + '{{#show_creator}}<p class="Ldt-Annotation-Labelled Ldt-Annotation-Creator"></p></div>{{/show_creator}}'
-    + '{{#show_description}}<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div>'
-    + '<p class="Ldt-Annotation-Labelled Ldt-Annotation-Description"></p></div>{{/show_description}}'
-    + '<div class="Ldt-Annotation-Tags-Block Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Cleared">'
-    + '<div class="Ldt-Annotation-Label">{{l10n.tags_}}</div><ul class="Ldt-Annotation-Labelled Ldt-Annotation-Tags"></ul>'
-    + '</div></div></div></div>';
-
-IriSP.Widgets.Annotation.prototype.defaults = {
-    annotation_type : "chap",
-    start_minimized: false,
-    show_arrow : true,
-    show_creator: true,
-    show_description: true,
-    arrow_position: .5,
-    site_name : "Lignes de Temps",
-    search_on_tag_click: true,
-    show_social: true,
-    show_annotation_type: false
-};
-
-IriSP.Widgets.Annotation.prototype.draw = function() {
-    
-    var _this = this,
-        currentAnnotation;
-    
-    function timeupdate(_time) {
-        var _list = _this.getWidgetAnnotationsAtTime();
-        if (!_list.length) {
-            _this.$.find(".Ldt-Annotation-Inner").addClass("Ldt-Annotation-Empty");
-            if (_this.arrow) {
-                _this.arrow.moveToTime(_time);
-            }
-            _this.bounds = [ _time, _time ];
-            _this.sendBounds();
-        }
-    }
-    
-    function highlightTitleAndDescription() {
-        if (!currentAnnotation) {
-            return;
-        }
-        var title = currentAnnotation.title,
-            description = currentAnnotation.description.replace(/(^\s+|\s+$)/g,''),
-            rx = (currentAnnotation.found ? (_this.source.getAnnotations().regexp || false) : false);
-        _this.$.find(".Ldt-Annotation-Title").html(IriSP.textFieldHtml(title,rx)  || "(" + _this.l10n.untitled + ")");
-        if (description) {
-            _this.$.find(".Ldt-Annotation-Description-Block").removeClass("Ldt-Annotation-EmptyBlock");
-            _this.$.find(".Ldt-Annotation-Description").html(IriSP.textFieldHtml(description,rx));
-        } else {
-            _this.$.find(".Ldt-Annotation-Description-Block").addClass("Ldt-Annotation-EmptyBlock");
-        }
-    }
-    
-    function drawAnnotation(_annotation) {
-        currentAnnotation = _annotation;
-        var _url = (typeof _annotation.url !== "undefined" 
-                ? _annotation.url
-                : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id)),
-            _text = _this.l10n.watching + _annotation.title + (_this.site_name ? _this.l10n.on_site + _this.site_name : ''),
-            _tags = _annotation.getTags(),
-            _tagblock = _this.$.find(".Ldt-Annotation-Tags");
-        _tagblock.empty();
-        if (_tags.length) {
-            _this.$.find(".Ldt-Annotation-Tags-Block").removeClass("Ldt-Annotation-EmptyBlock");
-            _tags.forEach(function(_tag) {
-                var _trimmedTitle =  _tag.title.replace(/(^\s+|\s+$)/g,'');
-                if (_trimmedTitle) {
-                    var _el = IriSP.jQuery('<li class="Ldt-Annotation-TagLabel"></li>').append(IriSP.jQuery('<span>').text(_trimmedTitle));
-                    _el.click(function() {
-                        if (_this.search_on_tag_click) {
-                            _this.source.getAnnotations().search(_trimmedTitle);
-                        }
-                        _tag.trigger("click");
-                    });
-                    _tagblock.append(_el);
-                }
-            });
-        } else {
-            _this.$.find(".Ldt-Annotation-Tags-Block").addClass("Ldt-Annotation-EmptyBlock");
-        }
-        highlightTitleAndDescription();
-        if (_this.show_creator) {
-             _this.$.find(".Ldt-Annotation-Creator").text(_annotation.creator);
-        }
-        if (_this.show_annotation_type) {
-            _this.$.find(".Ldt-Annotation-Type").text(_annotation.getAnnotationType().title);
-            _this.$.find(".Ldt-Annotation-Type").attr("title", _annotation.getAnnotationType().description);
-        }
-        _this.$.find(".Ldt-Annotation-Begin").text(_annotation.begin.toString());
-        _this.$.find(".Ldt-Annotation-End").text(_annotation.end.toString());
-        if (_annotation.elementType === "mashedAnnotation") {
-            _this.$.find('.Ldt-Annotation-Inner').addClass("Ldt-Annotation-isMashup");
-            _this.$.find(".Ldt-Annotation-MashupMedia").text(_annotation.getMedia().title);
-            _this.$.find(".Ldt-Annotation-MashupBegin").text(_annotation.annotation.begin.toString());
-            _this.$.find(".Ldt-Annotation-MashupEnd").text(_annotation.annotation.end.toString());
-        } else {
-            _this.$.find('.Ldt-Annotation-Inner').removeClass("Ldt-Annotation-isMashup");
-        }
-        if (typeof _this.socialWidget !== "undefined") {
-            _this.socialWidget.updateUrls(_url, _text);
-        } else {
-            setTimeout(function() {
-                if (typeof _this.socialWidget !== "undefined") {
-                    _this.socialWidget.updateUrls(_url, _text);
-                }
-            },800);
-        }
-        _this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty");
-        _this.bounds = [ _annotation.begin, _annotation.end ];
-        if (_this.arrow) {
-            _this.arrow.moveToTime((1 - _this.arrow_position) * _annotation.begin + _this.arrow_position * _annotation.end);
-        }
-        _this.sendBounds();
-    }
-    
-    this.renderTemplate();
-    
-    this.$.find(".Ldt-Annotation-Title").click(function() {
-        if (currentAnnotation) {
-            _this.media.setCurrentTime(currentAnnotation.begin);
-        }
-        return false;
-    });
-    
-    if (this.show_social) {
-        this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"), { type: "Social" }, "socialWidget");
-    }
-    
-    if (this.show_arrow) {
-        this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"), { type: "Arrow", width: this.width }, "arrow");
-    }
-    this.onMediaEvent("timeupdate",timeupdate);
-    this.onMdpEvent("Annotation.hide","hide");
-    this.onMdpEvent("Annotation.show","show");
-    this.onMdpEvent("Annotation.minimize","minimize");
-    this.onMdpEvent("Annotation.maximize","maximize");
-    this.onMdpEvent("Annotation.getBounds","sendBounds");
-    this.$.find(".Ldt-Annotation-MaxMinButton").click(this.functionWrapper("toggleSize"));
-    this.$.on("resize", function () { _this.width = _this.$.parent().width();
-                                      _this.$.css({ width: _this.width });
-                                    });
-    this.getWidgetAnnotations().forEach(function(_a) {
-        _a.on("enter", function() {
-            drawAnnotation(_a);
-        });
-    });
-    this.source.getAnnotations().on("found", highlightTitleAndDescription);
-    this.source.getAnnotations().on("not-found", highlightTitleAndDescription);
-    this.source.getAnnotations().on("search-cleared", highlightTitleAndDescription);
-    IriSP.attachDndData(this.$.find("h3"), function() {
-    	return {
-	    	title: currentAnnotation.title,
-	    	description: currentAnnotation.description,
-	    	image: currentAnnotation.thumbnail,
-	    	uri: (typeof currentAnnotation.url !== "undefined" 
-	            ? currentAnnotation.url
-	            : (document.location.href.replace(/#.*$/,'') + '#id='  + currentAnnotation.id)),
-            text: '[' + currentAnnotation.begin.toString() + '] ' + currentAnnotation.title
-	    };
-    });
-};
-
-IriSP.Widgets.Annotation.prototype.sendBounds = function() {
-    this.player.trigger("Annotation.boundsChanged",this.bounds);
-};
-
-IriSP.Widgets.Annotation.prototype.drawAnnotation = function(_annotation) {
-    this.lastAnnotation = _annotation.id;
-
-};
-
-IriSP.Widgets.Annotation.prototype.hide = function() {
-    this.$.slideUp();
-};
-
-IriSP.Widgets.Annotation.prototype.show = function() {
-    this.$.slideDown();
-};
-
-IriSP.Widgets.Annotation.prototype.toggleSize = function() {
-    if (this.minimized) {
-        this.maximize();
-    } else {
-        this.minimize();
-    }
-};
-
-IriSP.Widgets.Annotation.prototype.minimize = function() {
-    this.minimized = true;
-    this.$.find('.Ldt-Annotation-Inner').addClass("Ldt-Annotation-Minimized");
-};
-
-IriSP.Widgets.Annotation.prototype.maximize = function() {
-    this.minimized = false;
-    this.$.find('.Ldt-Annotation-Inner').removeClass("Ldt-Annotation-Minimized");
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/AnnotationsController.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-
-.Ldt-AnnotationsController{
-	background: url(img/pinstripe.png);
-	width: 535px;
-    max-height: 280px;
-	margin: 0px;
-	margin-top: 4px;
-	border-style: solid;
-    border-width: 1px;
-    border-color: #b7b7b7;
-}
-
-.Ldt-AnnotationsController-ButtonsContainer{
-	width: 100%;
-	min-height: 30px;
-	text-align: center;
-}
-
-.Ldt-AnnotationsController-Button{
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 25px;
-    width: 150px;
-    font-size: 14px;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    margin-right: 10px;
-    margin-left: 10px;
-    margin-bottom: 5px;
-    margin-top: 5px;
-    padding: 4px;
-    text-align: center;
-	vertical-align: middle;
-	line-height: 30px;
-}
-
-.Ldt-AnnotationsController-Button:hover{
-	background-color: #e15581;
-	border-color: #222222 #e87d9f #f0adc3 #68273c;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/AnnotationsController.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,219 +0,0 @@
-/* 
- * Widget that ties AnnotationList and CreateAnnotation together
- * using buttons to hide/show AnnotationList and CreateAnnotation widgets.
- * 
- */
-
-IriSP.Widgets.AnnotationsController = function(player, config){
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.AnnotationsController.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.AnnotationsController.prototype.defaults = {
-    // If true, displaying AnnotationList will hide CreateAnnotation and vice versa.
-    display_or_write: false,
-    toggle_widgets: false,
-    starts_hidden: false,
-    hide_without_segment: false,
-    hide_when_writing: true,
-    starting_widget: false,
-    always_show_widget: false,
-    segments_annotation_type: "chap",
-    custom_write_text: false,
-    custom_display_text: false,
-};
-
-IriSP.Widgets.AnnotationsController.prototype.template = 
-    "<div class='Ldt-AnnotationsController'>"
-    + "<div class='Ldt-AnnotationsController-ButtonsContainer'>"
-    + "    <div class='Ldt-AnnotationsController-Button Ldt-AnnotationsController-ShowCreateAnnotationButton'>{{#custom_write_text}}{{/custom_write_text}}{{custom_write_text}}{{^custom_write_text}}{{l10n.write}}{{/custom_write_text}}</div>"
-    + "    <div class='Ldt-AnnotationsController-Button Ldt-AnnotationsController-ShowAnnotationsListButton'>{{#custom_display_text}}{{/custom_display_text}}{{custom_display_text}}{{^custom_display_text}}{{l10n.display}}{{/custom_display_text}}</div>"
-    + "</div>"
-    + "</div>"
-
-IriSP.Widgets.AnnotationsController.prototype.messages = {
-    en : {
-        write : "Write",
-        display : "Display",
-    },
-    fr : {
-        write : "Ecrire",
-        display : "Voir"
-    }
-};
-
-IriSP.Widgets.AnnotationsController.prototype.draw = function() { 
-    this.renderTemplate();
-    var _this = this;
-    this.element_$ = this.$.find(".Ldt-AnnotationsController")
-    
-    this.displayButton_$ = this.$.find(".Ldt-AnnotationsController-ShowAnnotationsListButton");
-    this.writeButton_$ = this.$.find(".Ldt-AnnotationsController-ShowCreateAnnotationButton");
-    
-    this.writeButton_$.click(function(){
-        if (!_this.writeButton_$.hasClass("selected")){
-            _this.player.trigger("CreateAnnotation.show")
-            if (_this.display_or_write){
-                _this.player.trigger("AnnotationsList.hide");
-            }
-        }
-        else {
-            _this.player.trigger("CreateAnnotation.hide")
-            if (_this.toggle_widgets){
-                _this.player.trigger("AnnotationsList.show")
-            }
-            else if (_this.display_or_write){
-                _this.player.trigger("AnnotationsList.hide");
-            }
-        }
-    });
-    this.displayButton_$.click(function(){
-        if (!_this.displayButton_$.hasClass("selected")){
-            _this.player.trigger("AnnotationsList.show")
-            if (_this.display_or_write){
-                _this.player.trigger("CreateAnnotation.hide");
-            }
-        }
-        else {
-            _this.player.trigger("AnnotationsList.hide")
-            if (_this.toggle_widgets){
-                _this.player.trigger("CreateAnnotation.show")
-            }
-            else if (_this.display_or_write){
-                _this.player.trigger("CreateAnnotation.hide");
-            }
-        }
-        
-    })
-    
-    if(this.hide_without_segment){
-        this.onMediaEvent("timeupdate", function(){
-            _this.refresh();
-        })
-        this.onMediaEvent("settimerange", function(_timeRange){
-            _this.refresh(_timeRange);
-        })
-        this.segments = this.source.getAnnotationsByTypeTitle(this.segments_annotation_type)
-        this.currentSegment = false
-    }
-    
-
-    this.createAnnotationEnabled = false;
-    this.onMdpEvent("CreateAnnotation.hide", function(){
-        if (_this.hide_when_writing){
-            _this.show()
-        }
-        _this.createAnnotationEnabled = false;
-        _this.writeButton_$.toggleClass("selected", false);
-    })
-    this.onMdpEvent("CreateAnnotation.show", function(){
-        if (_this.hide_when_writing){
-            _this.hide()
-        }
-        _this.createAnnotationEnabled = true;
-        _this.writeButton_$.toggleClass("selected", true);
-    })
-    this.onMdpEvent("AnnotationsList.hide", function(){
-        _this.displayButton_$.toggleClass("selected", false);
-    })
-    this.onMdpEvent("AnnotationsList.show", function(){
-        _this.displayButton_$.toggleClass("selected", true);
-    })
-    
-    if (this.starts_hidden) {
-        this.visible = true
-        this.hide();
-    }
-    else{
-        this.visible = false
-        this.show();
-    }
-    
-    if (this.starting_widget && this.visible){
-        if (this.starting_widget == "AnnotationsList"){
-            this.player.trigger("AnnotationsList.show")
-        }
-        else if (this.starting_widget == "CreateAnnotation"){
-            this.player.trigger("CreateAnnotation.show")
-        }
-    }
-    
-};
-
-IriSP.Widgets.AnnotationsController.prototype.refresh = function(_timeRange){
-    _timeRange = typeof _timeRange !== 'undefined' ? _timeRange : false ;
-    
-    if(!_timeRange){
-        if (this.media.getTimeRange()){
-            _timeRange = this.media.getTimeRange();
-        }
-    }
-    
-    if (this.hide_without_segment){
-        if (!_timeRange && !this.media.getTimeRange()){
-            _currentTime = this.media.getCurrentTime() 
-            _currentSegments = this.segments.filter(function(_segment){
-                return (_currentTime >= _segment.begin && _currentTime <= _segment.end)
-            });
-            if(_currentSegments.length > 0){
-                currentSegment = true;
-            }
-            else {
-                currentSegment = false;
-            }
-        }
-        else {
-            var _timeRangeBegin = _timeRange[0],
-                _timeRangeEnd = _timeRange[1];
-            _currentSegments = this.segments.filter(function(_segment){
-                return (_timeRangeBegin == _segment.begin && _timeRangeEnd == _segment.end)
-            });
-            if(_currentSegments.length > 0){
-                currentSegment = true;
-            }
-            else {
-                currentSegment = false;
-            }
-        }
-        if (!currentSegment && _currentSegments.length == 0){
-            if (this.visible || this.hide_when_writing){
-                this.writeButton_$.toggleClass("selected", false);
-                this.displayButton_$.toggleClass("selected", false);
-                this.player.trigger("CreateAnnotation.hide");
-                this.player.trigger("AnnotationsList.hide");
-                this.hide();
-            }
-        }
-        else {
-            if (!this.visible){
-                if (!this.createAnnotationEnabled){
-                    this.show();
-                }
-                this.writeButton_$.toggleClass("selected", false);
-                this.displayButton_$.toggleClass("selected", false);
-                if (this.starting_widget == "AnnotationsList"){
-                    this.player.trigger("AnnotationsList.show")
-                }
-                if (this.starting_widget == "CreateAnnotation"){
-                    this.player.trigger("CreateAnnotation.show")
-                }
-            }
-            
-        }
-    }
-}
-
-IriSP.Widgets.AnnotationsController.prototype.hide = function() {
-    if (this.visible){
-        this.visible = false;
-        this.element_$.hide();
-    }
-}
-
-IriSP.Widgets.AnnotationsController.prototype.show = function() {
-    if(!this.visible){
-        this.visible = true;
-        this.element_$.show();
-    }
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/AnnotationsList.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,254 +0,0 @@
-/* AnnotationsListWidget */
-
-#ui-datepicker-div
-{
-    display: none;
-}
-
-.Ldt-AnnotationsListWidget {
-    border: none; 
-    margin: 0; 
-    padding: 0;
-    overflow: auto;
-}
-.Ldt-AnnotationsListWidget a {
-    text-decoration: none;
-}
-
-.Ldt-AnnotationsList-Audio {
-    width: 1px; height: 1px;
-}
-
-.Ldt-AnnotationsList-Filters {
-	display: table-cell;
-	width: 100%;
-	height: 30px;
-	vertical-align: middle;
-    text-align: center;
-	
-}
-
-.Ldt-AnnotationsList-filter-text {
-    text-align: left;
-	display: inline;
-	margin: 4px 2px;
-}
-
-.Ldt-AnnotationsList-filter-dropdown {
-    text-align: center;
-	display: inline;
-	margin: 4px 2px;
-}
-
-.Ldt-AnnotationsList-filter-checkbox {
-    text-align: center;
-	display: inline;
-	margin: 4px 2px;
-}
-
-ul.Ldt-AnnotationsList-ul, ul.Ldt-AnnotationsList-ul-toDelete  {
-    list-style: none;
-    padding: 0px;
-    margin: 0px;
-}
-
-li.Ldt-AnnotationsList-li {
-    width: 100%;
-    clear: both;
-    margin: 2px 0;
-    padding: 2px 0;
-    min-height: 3em;
-    position: relative;
-}
-.Ldt-AnnotationsList-li.selected {
-    background-image: url(img/pinstripe-grey.png);
-    z-index: 1;
-}
-.Ldt-AnnotationsList-ThumbContainer {
-    float: left;
-    width: 80px;
-    height: 50px;
-    text-align: center;
-    margin: 0px 2px 10px 2px;
-    box-shadow: #808080 0px 0px 2px;
-}
-.Ldt-AnnotationsList-Thumbnail {
-    border: none;
-    max-width: 100%;
-    max-height: 100%;
-    margin: 0 auto;
-}
-
-.Ldt-AnnotationsList-External-Icon {
-	background-image: url(img/external.png);
-	z-index: 100;
-	height: 15px;
-	width: 15px;
-	position: relative;
-	bottom: 20px;
-	left: 64px;
-}
-
-.Ldt-AnnotationsList-DeleteButton {
-	margin: 0px;
-	float: right;
-	font-size: 20px;
-	position: relative;
-	top: -50px;
-	left: -5px;
-	color: #787878
-}
-.Ldt-AnnotationsList-DeleteButton:hover {
-	color: #f7268e;
-	cursor: pointer;
-}
-
-.Ldt-AnnotationsList-Duration {
-    color: #f7268e;
-    float: right;
-    text-align: right;
-    font-size: 12px;
-    margin: 2px;
-}
-.Ldt-AnnotationsList-CreationDate {
-    color: #f7268e;
-    text-align: left;
-    font-size: 12px;
-    margin: 2px 2px 2px 89px;
-}
-h3.Ldt-AnnotationsList-Title span.Ldt-AnnotationsList-TitleContent{
-    color: #0068c4;
-    font-size: 13px;
-    margin-left: 5px;
-    font-weight: bold;
-}
-
-h3.Ldt-AnnotationsList-Title.Ldt-Annotation-Timecode{	
-    font-size: 13px;
-}
-
-.Ldt-AnnotationsList-Title a {
-    color: #0068c4;
-}
-
-.Ldt-AnnotationsList-Creator {
-    color: #4d90f4;
-    margin-left: 5px;
-    font-size: 13px;
-}
-
-p.Ldt-AnnotationsList-Description {
-    margin: 2px 0 2px 89px;
-    font-size: 12px;
-    color: #333333;
-}
-
-.Ldt-AnnotationsList-Description a {
-    color: #0068c4;
-}
-
-.Ldt-AnnotationsList-Description a:hover {
-    text-decoration: underline; color: #800000;
-}
-
-ul.Ldt-AnnotationsList-Tags {
-    list-style: none;
-    padding: 0;
-    margin: 2px 0 0 82px;
-}
-
-li.Ldt-AnnotationsList-Tag-Li {
-    display: inline-block; border: none; margin: 0 10px 5px 0; height: 23px; padding: 0 0 0 20px;
-    background: url(img/tag.png) left top no-repeat;
-    cursor: pointer;
-}
-
-.Ldt-AnnotationsList-Tag-Li span {
-    display: inline-block; font-size: 12px; height: 19px; padding: 4px 5px 0 0; border: none; margin: 0;
-    background: url(img/tag.png) right top no-repeat;
-}
-
-li.Ldt-AnnotationsList-Tag-Li:hover {
-    background-position: left -23px;
-}
-
-.Ldt-AnnotationsList-Tag-Li:hover span {
-    background-position: right -23px;
-}
-
-.Ldt-AnnotationsList-Play {
-    width: 125px; height: 20px; margin: 2px 0 2px 82px; text-align: center;
-    padding: 3px 5px 0 20px; font-size: 12px; cursor: pointer;
-    background: url(img/voiceannotation.png); color: #333333;
-}
-
-.Ldt-AnnotationsList-Play:hover {
-    background-position: 0 bottom;
-}
-
-.Ldt-AnnotationsList-EditControls {
-    opacity: 0;
-    position: absolute;
-    bottom: 2px;
-    right: 8px;
-}
-
-.Ldt-AnnotationsList-li:hover .Ldt-AnnotationsList-EditControls {
-    display: inline-block;
-    opacity: .8;
-    transition: opacity 1000ms ease-in-out;
-}
-
-.Ldt-AnnotationsList-EditControls > div {
-    display: inline-block;
-    width: 16px;
-    height: 16px;
-    cursor: pointer;
-    margin-left: 8px;
-}
-
-.Ldt-AnnotationsList-Delete {
-    background: url(img/delete.png);
-}
-
-.Ldt-AnnotationsList-Edit {
-    background: url(img/edit.png);
-}
-
-.Ldt-AnnotationsList-PublishAnnotation {
-    background: url(img/publish_annotation.png);
-}
-
-.published .Ldt-AnnotationsList-PublishAnnotation {
-    background: url(img/published_annotation.png);
-}
-
-.Ldt-AnnotationsList .editing {
-    display: none;
-}
-
-.Ldt-AnnotationsList .editableInput {
-    width: 80%;
-}
-
-.Ldt-AnnotationsList-ScreenMain{
-	margin: 0px;
-	padding: 0px;
-}
-
-.Ldt-AnnotationsList-ScreenDelete, .Ldt-AnnotationsList-ScreenSending, 
-.Ldt-AnnotationsList-ScreenError, .Ldt-AnnotationsList-ScreenSuccess{
-	margin-top: 15px;
-	width: 100%
-	text-align: center;
-	vertical-align: middle;
-	font-size: 14px;
-	font-weight: bold;
-	color: #68273C;
-}
-
-a.Ldt-AnnotationsList-Close {
-    position: absolute; right: 2px;
-    display: inline-block; width: 17px; height: 17px; margin: 4px;
-    background: url(img/widget-control.png);
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/AnnotationsList.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1214 +0,0 @@
-IriSP.Widgets.AnnotationsList = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.lastIds = [];
-    var _this = this;
-    this.throttledRefresh = IriSP._.throttle(function(full) {
-        _this.refresh(full);
-    }, 800);
-    this.searchString = false;
-    this.lastSearch = false;
-    this.localSource = undefined;
-};
-
-IriSP.Widgets.AnnotationsList.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.AnnotationsList.prototype.defaults = {
-    pre_draw_callback: function(){
-        return this.importUsers();
-    },
-    /*
-     * URL when the annotations are to be reloaded from an LDT-like segment API
-     * e.g.
-     * http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?
-     */
-    ajax_url : false,
-    /*
-     * number of milliseconds before/after the current timecode when calling the
-     * segment API
-     */
-    ajax_granularity : 600000,
-    default_thumbnail : "",
-    custom_external_icon : "",
-    /*
-     * URL when the annotation is not in the current project, e.g.
-     * http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}
-     */
-    foreign_url : "",
-    annotation_type : false,
-    refresh_interval : 0,
-    limit_count : 20,
-    newest_first : false,
-    show_title: true,
-    show_audio: true,
-    show_creator: true,
-    show_controls: false,
-    show_end_time: true,
-    show_publish: false,
-    show_twitter: false,
-    twitter_hashtag: '',
-    // Callback for Edit action. Leave undefined for default action.
-    on_edit: undefined,
-    publish_type: "PublicContribution",
-    // Used to publish annotations
-    api_endpoint_template: "",
-    api_serializer: "ldt_annotate",
-    api_method: "POST",
-    editable: false,
-    // Id that will be used as localStorage key
-    editable_storage: "",
-    widget_max_height: 680,
-    always_visible : false,
-    start_visible: true,
-    show_audio : true,
-    show_filters : false,
-    keyword_filter: true,
-    date_filter: true,
-    user_filter: true,
-    segment_filter: true,
-    latest_contributions_filter: false,
-    current_day_filter: true,
-    show_header : false,
-    custom_header : false,
-    annotations_count_header : true,
-    annotations_count_header_string: "annotations",
-    show_creation_date : false,
-    show_timecode : true,
-    show_end_time : true,
-    project_id: "",
-    /*
-     * Only annotation in the current segment will be displayed. Designed to work with the Segments Widget.
-     */
-    allow_annotations_deletion: false,
-    /*
-     * URL to call when deleting annotation. Expects a mustache template with {{annotation_id}}, ex /api/anotations/{{annotation_id}}/
-     */
-    api_delete_endpoint : "",
-    api_delete_method: "DELETE",
-    api_users_endpoint: "",
-    api_users_method: "GET",
-    make_name_string_function: function(params){
-        return params.username ? params.username : "Anonymous";
-    },
-    filter_by_segments: false,
-    segment_filter: true,
-    segments_annotation_type: "chap",
-    /*
-     * Set to a username if you only want to display annotations from a given user
-     */
-    show_only_annotation_from_user: false,
-    /*
-     * Show a text field that filter annotations by username
-     */
-    tags : true,
-
-    polemics : [{
-        keyword: "++",
-        background_color: "#c9ecc6"
-    },{
-        keyword: "--",
-        background_color: "#f9c5c6"
-    },{
-        keyword: "??",
-        background_color: "#cec5f9"
-    },{
-        keyword: "==",
-        background_color: "#f9f4c6"
-    }]
-};
-
-IriSP.Widgets.AnnotationsList.prototype.importUsers = function(){
-    if (!this.source.users_data && this.api_users_endpoint){
-        this.usernames = Array();
-        var _this = this,
-            _list = this.getWidgetAnnotations(),
-            usernames_list_string = "";
-
-        _list.forEach(function(_annotation){
-            if(_this.usernames.indexOf(_annotation.creator) == -1){
-                _this.usernames.push(_annotation.creator);
-            }
-        });
-        this.usernames.forEach(function(_username){
-            usernames_list_string+=_username+","
-        })
-        usernames_list_string = usernames_list_string.substring(0, usernames_list_string.length - 1);
-        _url = Mustache.to_html(this.api_users_endpoint, {usernames_list_string: encodeURIComponent(usernames_list_string), usernames_list_length: this.usernames.length});
-        return IriSP.jQuery.ajax({
-            async: false,
-            url: _url,
-            type: "GET",
-            success: function(_data) {
-                _this.source.users_data = _data.objects
-            },
-            error: function(_xhr, _error, _thrown) {
-                console.log(_xhr)
-                console.log(_error)
-                console.log(_thrown)
-            }
-        })
-    }
-}
-
-IriSP.Widgets.AnnotationsList.prototype.messages = {
-    en: {
-        voice_annotation: "Voice Annotation",
-        now_playing: "Now playing...",
-        previous: "Previous",
-        next: "Next",
-        set_time: "Double-click to update to current player time",
-        edit_annotation: "Edit note",
-        delete_annotation: "Delete note",
-        publish_annotation: "Make note public",
-        import_annotations: "Paste or load notes in this field and press Import.",
-        confirm_delete_message: "You are about to delete {{ annotation.title }}. Are you sure you want to delete it?",
-        confirm_publish_message: "You are about to publish {{ annotation.title }}. Are you sure you want to make it public?",
-        tweet_annotation: "Tweet annotation",
-        external_annotation: "This annotation was submitted to another project",
-        everyone: "Everyone",
-        header: "Annotations for this content",
-        segment_filter: "All cuttings",
-        latest_contributions: "Latest contributions",
-        close_widget: "Close",
-        confirm: "Confirm",
-        cancel: "Cancel",
-        annotation_deletion_delete: "You will delete this annotation",
-        annotation_deletion_sending: "Your deletion request is being sent ... ",
-        annotation_deletion_success: "The annotation has been deleted.",
-        annotation_deletion_error: "There was an error contacting the server. The annotation has not been deleted."
-    },
-    fr: {
-        voice_annotation: "Annotation Vocale",
-        now_playing: "Lecture en cours...",
-        previous: "Précédent",
-        next: "Suivant",
-        set_time: "Double-cliquer pour fixer au temps du lecteur",
-        edit_annotation: "Éditer la note",
-        delete_annotation: "Supprimer la note",
-        publish_annotation: "Rendre la note publique",
-        import_annotations: "Copiez ou chargez des notes dans ce champ et appuyez sur Import",
-        confirm_delete_message: "Vous allez supprimer {{ annotation.title }}. Êtes-vous certain(e) ?",
-        confirm_publish_message: "Vous allez publier {{ annotation.title }}. Êtes-vous certain(e) ?",
-        tweet_annotation: "Tweeter l'annotation",
-        external_annotation: "Cette annotation a été postée sur un autre projet",
-        everyone: "Tous",
-        header: "Annotations sur ce contenu",
-        segment_filter: "Tous les segments",
-        latest_contributions: "Dernières contributions",
-        close_widget: "Fermer",
-        confirm: "Confirmer",
-        cancel: "Annuler",
-        annotation_deletion_delete: "Vous allez supprimer cette annotation",
-        annotation_deletion_sending: "Votre demande de suppression est en cours d'envoi ... ",
-        annotation_deletion_success: "L'annotation a été supprimée.",
-        annotation_deletion_error: "Une erreur s'est produite en contactant le serveur. L'annotation n'a pas été supprimée."
-    }
-};
-
-IriSP.Widgets.AnnotationsList.prototype.template =
-    '{{#show_header}}<p class="Ldt-AnnotationsList-header">'
-    +     '{{#custom_header}}{{custom_header}}{{/custom_header}}'
-    +     '{{^custom_header}}{{l10n.header}}{{/custom_header}}'
-    + '</p>{{/show_header}}'
-    + '<div class="Ldt-AnnotationsListWidget">'
-    +     '<div class="Ldt-AnnotationsList-ScreenMain">'
-    +         '{{#show_filters}}'
-    +         '<div class="Ldt-AnnotationsList-Filters">'
-    +             '{{#keyword_filter}}<input class="Ldt-AnnotationsList-filter-text" id="Ldt-AnnotationsList-keywordsFilter" type="text" value=""></input>{{/keyword_filter}}'
-    +             '{{#user_filter}}<select class="Ldt-AnnotationsList-filter-dropdown" id="Ldt-AnnotationsList-userFilter"><option selected value="">{{l10n.everyone}}</option></select>{{/user_filter}}'
-    +             '{{#date_filter}}<label class="Ldt-AnnotationsList-filter-date">Date: <input id="Ldt-AnnotationsList-dateFilter" type="text"></input></label>{{/date_filter}}'
-    +             '{{#segment_filter}}<label class="Ldt-AnnotationsList-filter-checkbox"><input type="checkbox" id="Ldt-AnnotationsList-ignoreSegmentsFilter">{{l10n.segment_filter}}</label>{{/segment_filter}}'
-    +             '{{#latest_contributions_filter}}<label class="Ldt-AnnotationsList-filter-checkbox"><input type="checkbox" id="Ldt-AnnotationsList-latestContributionsFilter">{{l10n.latest_contributions}}</label>{{/latest_contributions_filter}}'
-    +         '</div>'
-    +         '{{/show_filters}}'
-    +         '{{#show_controls}}<div class="Ldt-AnnotationsList-Controls"><span class="Ldt-AnnotationsList-Control-Prev">{{ l10n.previous }}</span> | <span class="Ldt-AnnotationsList-Control-Next">{{ l10n.next }}</span></div>{{/show_controls}}'
-    +         '{{#show_audio}}<div class="Ldt-AnnotationsList-Audio"></div>{{/show_audio}}'
-    +         '<ul class="Ldt-AnnotationsList-ul">'
-    +         '</ul>'
-    +     '</div>'    
-    +     '{{#allow_annotations_deletion}}'
-    +     '<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenDelete">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>' 
-    +         '{{l10n.annotation_deletion_delete}}'
-    +         '<ul class="Ldt-AnnotationsList-ul-ToDelete"></ul>'
-    +         '<a class="Ldt-AnnotationsList-ConfirmDelete">{{l10n.confirm}}</a> <a class="Ldt-AnnotationsList-CancelDelete">{{l10n.cancel}}</a>'
-    +     '</div>'
-    +     '<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSending">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>'  
-    +         '{{l10n.annotation_deletion_sending}}'
-    +     '</div>'
-    +     '<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSuccess">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>'  
-    +         '{{l10n.annotation_deletion_success}}'
-    +     '</div>'
-    +     '<div data.annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenError">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>'  
-    +         '{{l10n.annotation_deletion_error}}'
-    +     '</div>'
-    +     '{{/allow_annotations_deletion}}'
-    + '</div>';
-
-IriSP.Widgets.AnnotationsList.prototype.annotationTemplate =
-    '<li class="Ldt-AnnotationsList-li Ldt-Highlighter-Annotation Ldt-TraceMe" data-annotation="{{ id }}" data-begin="{{ begin_ms }}" data-end="{{ end_ms }}" trace-info="annotation-id:{{id}}, media-id:{{media_id}}" style="{{specific_style}}">'
-    + '<div data-annotation="{{ id }}" class="Ldt-AnnotationsList-ThumbContainer Ldt-AnnotationsList-Annotation-Screen Ldt-AnnotationsList-Annotation-ScreenMain">'
-    +   '<a {{#url}}href="{{url}}"{{/url}} draggable="true">'
-    +     '<img title="{{^external}}{{ begin }} - {{ end }}{{/external}}{{#external}}{{l10n.external_annotation}}{{/external}}" class="Ldt-AnnotationsList-Thumbnail" src="{{thumbnail}}" />'
-    +     '{{#external}}<div title="{{l10n.external_annotation}}" class="Ldt-AnnotationsList-External-Icon"></div>{{/external}}'
-    +   '</a>'
-    + '</div>'
-    + '{{#allow_annotations_deletion}}'
-    + '<div data-annotation="{{ id }}" class="Ldt-AnnotationsList-DeleteButton">&#10006;</div>'
-    + '{{/allow_annotations_deletion}}'
-    + '{{#show_timecode}}<div title="{{l10n.set_time}}" class="Ldt-AnnotationsList-Duration"><span class="Ldt-AnnotationsList-Begin Ldt-live-editable Ldt-AnnotationsList-TimeEdit" data-editable_value="{{begin}}" data-editable_id="{{id}}" data-editable_field="begin" data-editable_type="timestamp">{{begin}}</span>{{#show_end_time}} - <span class="Ldt-AnnotationsList-End Ldt-live-editable" data-editable_value="{{end}}" data-editable_id="{{id}}" data-editable_field="end" data-editable_type="timestamp">{{end}}</span>{{/show_end_time}}</div>{{/show_timecode}}'
-    + '<h3 class="Ldt-AnnotationsList-Title Ldt-Annotation-Timecode" data-timecode="{{ begin_ms }}" draggable="true">'
-    + '{{#show_title}}<span class="Ldt-AnnotationsList-TitleContent Ldt-live-editable" data-editable_value="{{title}}" data-editable_type="multiline" data-editable_id="{{id}}" data-editable_field="title">{{{htitle}}}</span>{{/show_title}}'
-    + '{{#show_creator}}<span class="Ldt-AnnotationsList-Creator">{{ creator }}</span>{{/show_creator}}'
-    + '</h3>'
-    + '<p class="Ldt-AnnotationsList-Description Ldt-live-editable" data-editable_type="multiline" data-editable_value="{{description}}" data-editable_id="{{id}}" data-editable_field="description">{{{hdescription}}}</p>'
-    + '{{#created}}'
-    + '<div class="Ldt-AnnotationsList-CreationDate">{{{created}}}</div>'
-    + '{{/created}}'
-    + '{{#tags.length}}'
-    + '<ul class="Ldt-AnnotationsList-Tags">'
-    +   '{{#tags}}'
-    +   '{{#.}}'
-    +   '<li class="Ldt-AnnotationsList-Tag-Li">'
-    +     '<span>{{.}}</span>'
-    +   '</li>'
-    +   '{{/.}}'
-    +   '{{/tags}}'
-    + '</ul>'
-    + '{{/tags.length}}'
-    + '{{#audio}}<div class="Ldt-AnnotationsList-Play" data-annotation-id="{{id}}">{{l10n.voice_annotation}}</div>{{/audio}}'
-    + '<div class="Ldt-AnnotationsList-EditControls">'
-    +    '{{#show_twitter}}<a title="{{l10n.tweet_annotation}}" target="_blank" href="https://twitter.com/intent/tweet?{{twitter_param}}"><img width="16" height="16" src="metadataplayer/img/twitter.svg"></a>{{/show_twitter}}'
-    +    '{{#show_publish}}<div title="{{l10n.publish_annotation}}" class="Ldt-AnnotationsList-PublishAnnotation" data-editable_id="{{id}}"></div>{{/show_publish}}'
-    +    '{{#editable}}<div title="{{l10n.edit_annotation}}" class="Ldt-AnnotationsList-Edit" data-editable_id="{{id}}"></div>'
-    +    '<div title="{{l10n.delete_annotation}}" class="Ldt-AnnotationsList-Delete" data-editable_id="{{id}}"></div>{{/editable}}'
-    + '</div>'
-    + '</li>';
-
-// obj.url = this.project_url + "/" + media + "/" + annotations[i].meta.project
-// + "/" + annotations[i].meta["id-ref"] + '#id=' + annotations[i].id;
-
-IriSP.Widgets.AnnotationsList.prototype.ajaxSource = function() {
-    var _currentTime = this.media.getCurrentTime(),
-        _duration = this.media.duration;
-    this.lastAjaxQuery = _currentTime;
-    var _url = Mustache.to_html(this.ajax_url, {
-        media : this.source.currentMedia.id,
-        begin : Math.max(0, _currentTime - this.ajax_granularity),
-        end : Math.min(_duration.milliseconds, _currentTime + this.ajax_granularity)
-    });
-    this.currentSource = this.player.loadMetadata(IriSP._.defaults({
-        "url" : _url
-    }, this.metadata));
-};
-
-IriSP.Widgets.AnnotationsList.prototype.showScreen = function(_screenName) {
-    this.$.find('.Ldt-AnnotationsList-Screen' + _screenName).show()
-        .siblings().hide();
-}
-
-IriSP.Widgets.AnnotationsList.prototype.ajaxMashup = function() {
-    var _currentTime = this.media.getCurrentTime();
-    var _currentAnnotation = this.source.currentMedia.getAnnotationAtTime(_currentTime);
-    if (typeof _currentAnnotation !== "undefined" && _currentAnnotation.id !== this.lastMashupAnnotation) {
-        this.lastMashupAnnotation = _currentAnnotation.id;
-        var _currentMedia = _currentAnnotation.getMedia(),
-            _url = Mustache.to_html(this.ajax_url, {
-                media : _currentMedia.id,
-                begin : Math.max(0, _currentAnnotation.annotation.begin.milliseconds - this.ajax_granularity),
-                end : Math.min(_currentMedia.duration.milliseconds, _currentAnnotation.annotation.end.milliseconds + this.ajax_granularity)
-            });
-        this.currentSource = this.player.loadMetadata(IriSP._.defaults({
-            "url" : _url
-        }, this.metadata));
-    }
-};
-
-/*
- * Import annotations
- */
-IriSP.Widgets.AnnotationsList.prototype.importAnnotations = function () {
-    var widget = this;
-    var $ = IriSP.jQuery;
-    var textarea = $("<textarea>");
-    var el = $("<div>")
-            .append($("<span>")
-                    .addClass("importAnnotationsLabel")
-                    .text(widget.messages.import_annotations))
-            .addClass("importContainer")
-            .dialog({
-                title: "Annotation import",
-                autoOpen: true,
-                width: '80%',
-                minHeight: '400',
-                height: 400,
-                buttons: [ { text: "Close", click: function() { $( this ).dialog( "close" ); } },
-                           // { text: "Load", click: function () {
-                           //     // TODO
-                           //     // http://www.html5rocks.com/en/tutorials/file/dndfiles/?redirect_from_locale=fr
-                           //     console.log("Load from a file");
-                           // } },
-                           { text: "Import", click: function () {
-                               // FIXME: this should be a model.Source method
-                               var time_regexp = /(\[[\d:]+\])/;
-                               console.log("Import data");
-                               // widget.localSource
-                               // Dummy parsing for the moment
-                               var data = textarea[0].value
-                                       .split(time_regexp)
-                                       .filter( function (s) { return ! s.match(/^\s*$/)});
-                               var begin = null,
-                                   end = null,
-                                   content = null,
-                                   // Previous is either null, timestamp or text
-                                   previous = null;
-                               for (var i = 0; i < data.length; i++) {
-                                   var el = data[i];
-                                   if (el.match(time_regexp)) {
-                                       if (previous == 'text') {
-                                           // Timestamp following text. Let's make it an annotation
-                                           end = IriSP.timestamp2ms(el.slice(1, -1));
-                                           TODO.createAnnotation(begin, end, content);
-                                           // Preserve the end value, which may be the begin value of the next annotation.
-                                           begin = end;
-                                           end = null;
-                                           content = null;
-                                       } else {
-                                           //  (previous == 'timestamp' || previous == null)
-                                           // 2 consecutive timestamps. Let's start a new annotation
-                                           content = null;
-                                           begin = IriSP.timestamp2ms(el.slice(1, -1));
-                                           end = null;
-                                       };
-                                       previous = 'timestamp';
-                                   } else {
-                                       // Text content
-                                       content = el;
-                                       previous = 'text';
-                                   }
-                                   // Last textual value
-                                   if (previous == 'text' && begin !== null) {
-                                       TODO.createAnnotation(begin, begin, content);
-                                   }
-                               }
-                           } } ]
-            });
-
-}
-
-IriSP.Widgets.AnnotationsList.prototype.refresh = function(_forceRedraw) {
-    _forceRedraw = (typeof _forceRedraw !== "undefined" && _forceRedraw);
-    if (this.currentSource.status !== IriSP.Model._SOURCE_STATUS_READY) {
-        return 0;
-    }
-    var _this = this,
-        _currentTime = this.media.getCurrentTime();
-    var _list = this.annotation_type ? this.currentSource.getAnnotationsByTypeTitle(this.annotation_type) : this.currentSource.getAnnotations();
-    if (this.mashupMode) {
-        var _currentAnnotation = this.source.currentMedia.getAnnotationAtTime(_currentTime);
-        if (typeof _currentAnnotation !== "undefined") {
-            _currentTime = _currentTime - _currentAnnotation.begin + _currentAnnotation.annotation.begin;
-            var _mediaId = _currentAnnotation.getMedia().id;
-            _list = _list.filter(function(_annotation) {
-                return _annotation.getMedia().id === _mediaId;
-            });
-        }
-    }
-    _list = _list.filter(function(_annotation) {
-        return _annotation.found !== false;
-    });
-    
-    if ((this.filter_by_segments)&&(!(this.show_filters && this.segment_filter && this.ignoresegmentcheckbox_$[0].checked))) {
-        /*
-         *  A given annotation is considered "in" segment if the middle of it is between the segment beginning and the segment end. 
-         *  Note this is meant to be used for "markings" annotations (not segments)
-         */
-        _segmentsAnnotation = this.currentSource.getAnnotationsByTypeTitle(this.segments_annotation_type)
-        if (this.media.getTimeRange()){
-            _currentSegments = _segmentsAnnotation.filter(function(_segment){
-                return (_this.media.getTimeRange()[0] == _segment.begin && _this.media.getTimeRange()[1] == _segment.end)
-            });
-        }
-        else {
-            _currentSegments = _segmentsAnnotation.filter(function(_segment){
-                return (_currentTime >= _segment.begin && _currentTime <= _segment.end)
-            });
-        }
-        if (_currentSegments.length == 0) {
-            _list = _list.filter(function(_annotation){
-                return false;
-            });
-        }
-        else {
-            _list = _list.filter(function(_annotation){
-                _annotation_time = (_annotation.begin+_annotation.end)/2;
-                return (_currentSegments[0].begin <= _annotation_time && _currentSegments[0].end >= _annotation_time)
-            });
-        }
-        if(this.annotations_count_header && this.annotations_count != _list.length){
-            this.annotations_count = _list.length;
-            this.refreshHeader();
-        }
-    }
-    if (this.show_only_annotation_from_user){
-        _list = _list.filter(function(_annotation){
-           return _annotation.creator == _this.show_only_annotation_from_user;
-        });
-    }
-    if (this.limit_count) {
-        /* Get the n annotations closest to current timecode */
-        _list = _list.sortBy(function(_annotation) {
-            return Math.abs((_annotation.begin + _annotation.end) / 2 - _currentTime);
-        }).slice(0, this.limit_count);
-    }
-    
-    if (this.newest_first) {
-        _list = _list.sortBy(function(_annotation) {
-            return -_annotation.created.valueOf();
-        });
-    } else {
-        _list = _list.sortBy(function(_annotation) {
-            return _annotation.begin;
-        });
-    }
-    
-    if (this.show_filters){
-        if (this.user_filter){
-            _username = this.userselect_$[0].options[this.userselect_$[0].selectedIndex].value;
-            if (_username != "false")
-            {
-                _list = _list.filter(function(_annotation){
-                    return _annotation.creator == _username
-                })
-            }
-        }
-        if (this.keyword_filter){
-        _keyword = this.keywordinput_$[0].value;
-            if (_keyword != ""){
-                _list = _list.filter(function(_annotation){
-                   return _annotation.description.toLowerCase().match(_keyword.toLowerCase());
-                });
-            }
-        }
-        if (this.date_filter){
-            if(this.datefilterinput_$[0].value != ""){
-                _date = this.datefilterinput_$.datepicker("getDate");
-                _list = _list.filter(function(_annotation){
-                    return ((_annotation.created.getDate() == _date.getDate())&&(_annotation.created.getMonth() == _date.getMonth())&&(_annotation.created.getFullYear() == _date.getFullYear()));
-                });
-            }
-        }
-        if (this.latest_contributions_filter && this.latestcontributionscheckbox_$[0].checked){
-            _list = _list.sortBy(function(_annotation) {
-                return -_annotation.created.valueOf();
-            });
-            this.usernames.forEach(function(_user){
-                
-                latest_ann = _list.filter(function(_annotation){
-                    return _annotation.creator == _user;
-                })[0];
-                _list = _list.filter(function(_annotation){
-                    return _annotation.id == (latest_ann ? latest_ann.id : false) || _annotation.creator != _user;
-                });
-            });
-        }
-        
-    }
-    
-    var _ids = _list.idIndex;
-
-    if (_forceRedraw || !IriSP._.isEqual(_ids, this.lastIds) || this.searchString !== this.lastSearch) {
-        /* This part only gets executed if the list needs updating */
-        this.lastSearch = this.searchString;
-        this.lastIds = _ids;
-        this.list_$.html("");
-        _list.forEach(function(_annotation) {
-            var _url = (
-                ( typeof _annotation.url !== "undefined" && _annotation.url)
-                ? _annotation.url
-                : (
-                    ( typeof _this.source.projectId !== "undefined" && typeof _annotation.project !== "undefined" && _annotation.project && _this.source.projectId !== _annotation.project )
-                    ? Mustache.to_html(
-                        _this.foreign_url,
-                        {
-                            project : _annotation.project,
-                            media : _annotation.media.id,
-                            annotation : _annotation.id,
-                            annotationType : _annotation.annotationType.id
-                        }
-                    )
-                    : document.location.href.replace(/#.*$/,'') + '#id=' + _annotation.id + '&t=' + (_annotation.begin / 1000.0)
-                    )
-                ),
-                _external = _annotation.project != _this.source.projectId ? true : false,
-                _title = "",
-                _description = _annotation.description,
-                _thumbnail = (typeof _annotation.thumbnail !== "undefined" && _annotation.thumbnail ? _annotation.thumbnail : _this.default_thumbnail);
-            if (_this.show_creator){
-                if (_annotation.creator) {
-                    var _users = [],
-                        _user = {},
-                        _creator = "";
-                    if (_this.source.users_data) {
-                        _users = _this.source.users_data.filter(function(_user_data){
-                            return _user_data.username == _annotation.creator;
-                        });
-                    }
-                    if (_users.length == 0){
-                        _user.username = _annotation.creator
-                    }
-                    else{
-                        _user = _users[0]
-                    }
-                    _creator = _this.make_name_string_function(_user);
-                }
-            }
-            if (_this.show_title && _annotation.title){
-                    var _title = _annotation.title;
-            }
-            var _bgcolor;
-            IriSP._(_this.polemics).each(function(_polemic) {
-                var _rgxp = IriSP.Model.regexpFromTextOrArray(_polemic.keyword, true);
-                if (_rgxp.test(_title + " " + _description)) {
-                    _bgcolor = _polemic.background_color;
-                }
-            });
-            var _created = false;
-            if (_this.show_creation_date) {
-                _created = _annotation.created.toLocaleDateString()+", "+_annotation.created.toLocaleTimeString().replace(/\u200E/g, '').replace(/^([^\d]*\d{1,2}:\d{1,2}):\d{1,2}([^\d]*)$/, '$1$2');;
-            }
-            if(this.tags == true){
-                var _tags = _annotation.getTagTexts();
-            }
-            else {
-                var _tags = false;
-            }
-            var _data = {
-                id : _annotation.id,
-                media_id : _annotation.getMedia().id,
-                htitle : IriSP.textFieldHtml(_title),
-                title: _title,
-                creator: _creator,
-                hdescription : IriSP.textFieldHtml(_description),
-                description: _description,
-                begin : _annotation.begin.toString(),
-                end : _annotation.end.toString(),
-                created : _created,
-                show_timecode : _this.show_timecode,
-                show_end_time : _this.show_end_time,
-                show_title : _this.show_title && _title,
-                thumbnail : _thumbnail,
-                url : _url,
-                tags : _tags,
-                specific_style : (typeof _bgcolor !== "undefined" ? "background-color: " + _bgcolor : ""),
-                l10n: _this.l10n,
-                editable: _this.editable,
-                external: _external,
-                show_publish: _this.show_publish,
-                show_creator: _this.show_creator,
-                show_twitter: _this.show_twitter,
-                twitter_param: IriSP.jQuery.param({ url: _url, text: IriSP.textFieldHtml(_title) + (_this.twitter_hashtag ? ' #' + _this.twitter_hashtag : "") }),
-                allow_annotations_deletion: _this.allow_annotations_deletion
-            };
-            if (_this.show_audio && _annotation.audio && _annotation.audio.href && _annotation.audio.href != "null") {
-                _data.audio = true;
-                if (!_this.jwplayers[_annotation.id]) {
-                    var _audiofile = _annotation.audio.href;
-                    if (_this.audio_url_transform) {
-                        _audiofile = _this.audio_url_transform(_annotation.audio.href);
-                    }
-                    var _tmpId = "jwplayer-" + IriSP.Model.getUID();
-                    _this.jwplayers[_annotation.id] = _tmpId;
-                    _this.$.find(".Ldt-AnnotationsList-Audio").append(IriSP.jQuery("<div>").attr("id", _tmpId));
-                    jwplayer(_tmpId).setup({
-                        flashplayer: IriSP.getLib("jwPlayerSWF"),
-                        file: _audiofile,
-                        fallback: false,
-                        primary: "flash",
-                        controls: false,
-                        width: 1,
-                        height: 1,
-                        events: {
-                            onPause: function() {
-                                _this.$.find(".Ldt-AnnotationsList-Play[data-annotation-id=" + _annotation.id + "]").text(_this.l10n.voice_annotation);
-                            },
-                            onPlay: function() {
-                                _this.$.find(".Ldt-AnnotationsList-Play[data-annotation-id=" + _annotation.id + "]").text(_this.l10n.now_playing);
-                            }
-                        }
-                    });
-                }
-            }
-            var _html = Mustache.to_html(_this.annotationTemplate, _data),
-                _el = IriSP.jQuery(_html),
-                _onselect = function() {
-                    _this.$.find('.Ldt-AnnotationsList-li').removeClass("selected");
-                    _el.addClass("selected");
-                },
-                _onunselect = function() {
-                    _this.$.find('.Ldt-AnnotationsList-li').removeClass("selected");
-                };
-            _el.mouseover(function() {
-                    _annotation.trigger("select");
-                })
-                .mouseout(function() {
-                    _annotation.trigger("unselect");
-                })
-                .click(function() {
-                    if (_this.filter_by_segments && _this.media.getTimeRange()){
-                        _ann_time = ( _annotation.begin + _annotation.end ) / 2;
-                        if ((_ann_time <= _this.media.getTimeRange()[0]) || (_ann_time >= _this.media.getTimeRange()[1])){
-                            _this.media.resetTimeRange()
-                        }
-                    }
-                    _annotation.trigger("click");
-                })
-                .appendTo(_this.list_$);
-            IriSP.attachDndData(_el.find("[draggable]"), {
-            	title: _title,
-            	description: _description,
-            	uri: _url,
-                image: _annotation.thumbnail,
-                text: '[' + _annotation.begin.toString() + '] ' + _title
-            });
-            _el.on("remove", function() {
-                _annotation.off("select", _onselect);
-                _annotation.off("unselect", _onunselect);
-            });
-            _annotation.on("select", _onselect);
-            _annotation.on("unselect", _onunselect);
-        });
-
-        /* Correct the empty tag bug */
-        this.$.find('.Ldt-AnnotationsList-Tag-Li').each(function() {
-            var _el = IriSP.jQuery(this);
-            if (!_el.text().replace(/(^\s+|\s+$)/g,'')) {
-                _el.remove();
-            }
-        });
-
-        if (this.editable) {
-            var widget = _this;
-            var $ = IriSP.jQuery;
-
-            var edit_element = function (_this, insertion_point) {
-                var feedback_wrong = "#FF9999";
-                var feedback_ok = "#99FF99";
-
-                // insertion_point can be used to specify where to
-                // insert the input field.  Firefox is buggy wrt input
-                // fields inside <a> or <h?> tags, it does not
-                // propagate mouse clicks. If _this is a <a> then we
-                // have to specify the ancestor before which we can
-                // insert the input widget.
-                if (insertion_point === undefined)
-                    insertion_point = _this;
-
-                // Insert input element
-                var input_element = $(_this.dataset.editable_type === 'multiline' ? "<textarea>" : "<input>")
-                        .addClass("editableInput")
-                        .insertBefore($(insertion_point));
-                input_element[0].value = _this.dataset.editable_value;
-                $(input_element).show().focus();
-                $(_this).addClass("editing");
-
-                function feedback(color) {
-                    // Give some feedback
-                    $(_this).removeClass("editing");
-                    input_element.remove();
-                    var previous_color = $(_this).css("background-color");
-                    $(_this).stop().css("background-color", color)
-                        .animate({ backgroundColor: previous_color}, 1000);
-                }
-
-                function cancelChanges(s) {
-                    feedback(feedback_wrong);
-                }
-                function validateChanges() {
-                    var n = input_element[0].value;
-                    if (n == _this.dataset.editable_value) {
-                        // No change
-                        feedback(feedback_ok);
-                        return;
-                    }
-                    if (n == '') {
-                        // Delete annotation
-                        delete_local_annotation(_this.dataset.editable_id);
-                        widget.player.trigger("Annotation.delete", _this.dataset.editable_id);
-                        return;
-                    } else {
-                        // Convert value if necessary.
-                        var val = n;
-                        if (_this.dataset.editable_type == 'timestamp') {
-                            val = IriSP.timestamp2ms(n);
-                            if (Number.isNaN(val)) {
-                                // Invalid value. Cancel changes
-                                cancelChanges();
-                                return;
-                            }
-                        }
-                        _this.dataset.editable_value = n;
-                        n = val;
-                        $(_this).text(val);
-                    }
-
-                    // We cannot use .getElement since it fetches
-                    // elements from the global Directory
-                    var an = get_local_annotation(_this.dataset.editable_id);
-                    if (an === undefined) {
-                        console.log("Strange error: cannot find edited annotation");
-                        feedback(feedback_wrong);
-                    } else {
-                        _this.dataset.editable_value = n;
-                        // Update annotation for storage
-                        if (_this.dataset.editable_field == 'begin')
-                            an.setBegin(n);
-                        else if (_this.dataset.editable_field == 'end')
-                            an.setEnd(n);
-                        else
-                            an[_this.dataset.editable_field] = n;
-                        an.modified = new Date();
-                        // FIXME: use user name, when available
-                        an.contributor = widget.player.config.username || "COCo User";
-                        widget.player.addLocalAnnotation(an);
-                        widget.player.trigger("Annotation.update", an);
-                        feedback(feedback_ok);
-                    }
-                }
-                $(input_element).bind('keydown', function(e) {
-                    if (e.which == 13) {
-                        e.preventDefault();
-                        validateChanges();
-                    } else if (e.which == 27) {
-                        e.preventDefault();
-                        cancelChanges();
-                    }
-                }).bind("blur", function (e) {
-                    validateChanges();
-                });
-            };
-
-            var get_local_annotation = function (ident) {
-                return widget.player.getLocalAnnotation(ident);
-            };
-
-            var save_local_annotations = function() {
-                widget.player.saveLocalAnnotations();
-                // Merge modifications into widget source
-                widget.source.merge(widget.player.localSource);
-            };
-
-            var delete_local_annotation = function(ident) {
-                widget.source.getAnnotations().removeId(ident, true);
-                widget.player.deleteLocalAnnotation(ident);
-                widget.refresh(true);
-            };
-
-            this.$.find('.Ldt-AnnotationsList-Delete').click(function(e) {
-                // Delete annotation
-                var _annotation = get_local_annotation(this.dataset.editable_id);
-                if (confirm(Mustache.to_html(widget.l10n.confirm_delete_message, { annotation: _annotation })))
-                    delete_local_annotation(this.dataset.editable_id);
-                widget.refresh(true);
-            });
-            this.$.find('.Ldt-AnnotationsList-Edit').click(function(e) {
-                if (widget.on_edit) {
-                    var _annotation = get_local_annotation(this.dataset.editable_id);
-                    widget.on_edit(_annotation);
-                } else {
-                    // Edit annotation title. We have to specify the insertion point.
-                    var element = $(this).parents(".Ldt-AnnotationsList-li").find(".Ldt-AnnotationsList-TitleContent.Ldt-live-editable");
-                    edit_element(element[0]);
-                }
-            });
-            this.$.find('.Ldt-AnnotationsList-PublishAnnotation').click(function(e) {
-                var _annotation = get_local_annotation(this.dataset.editable_id);
-                // Publish annotation to the server
-                if (!confirm(Mustache.to_html(widget.l10n.confirm_publish_message, { annotation: _annotation })))
-                    return;
-                var _url = Mustache.to_html(widget.api_endpoint_template, {id: widget.source.projectId});
-                if (_url !== "") {
-                    var _export = widget.player.sourceManager.newLocalSource({serializer: IriSP.serializers[widget.api_serializer]});
-
-                    if (widget.publish_type) {
-                        // If publish_type is specified, try to set the annotation type of the exported annotation
-                        var at = widget.source.getAnnotationTypes().filter(function(at) { return at.title == widget.publish_type; });
-                        if (at.length == 1) {
-                            _annotation.setAnnotationType(at[0].id);
-                        }
-                    }
-                    var _exportedAnnotations = new IriSP.Model.List(widget.player.sourceManager);
-                    _exportedAnnotations.push(_annotation);
-                    _export.addList("annotation", _exportedAnnotations);
-                    IriSP.jQuery.ajax({
-                        url: _url,
-                        type: widget.api_method,
-                        contentType: 'application/json',
-                        data: _export.serialize(),
-                        success: function(_data) {
-                            $(this).addClass("published");
-                            // Save the published information
-                            var an = get_local_annotation(_annotation.id);
-                            // FIXME: handle "published" tag
-                            an.setTags( [ "published" ]);
-                            save_local_annotations();
-                            widget.player.trigger("Annotation.publish", _annotation);
-                        },
-                        error: function(_xhr, _error, _thrown) {
-                            IriSP.log("Error when sending annotation", _thrown);
-                        }
-                    });
-                }
-            });
-            this.$.find('.Ldt-AnnotationsList-TimeEdit').dblclick(function(e) {
-                var _this = this;
-                // Use current player time
-                var an = get_local_annotation(_this.dataset.editable_id);
-                if (an !== undefined) {
-                    // FIXME: implement Undo feature
-                    an.setBegin(widget.media.getCurrentTime().milliseconds);
-                    save_local_annotations();
-                    widget.player.trigger("Annotation.update", an);
-                    widget.refresh(true);
-                }
-            });
-        };
-
-        this.$.find('.Ldt-AnnotationsList-Tag-Li').click(function() {
-            _this.source.getAnnotations().search(IriSP.jQuery(this).text().replace(/(^\s+|\s+$)/g,''));
-        });
-        this.$.find('.Ldt-Annotation-Timecode').click(function () {
-            _this.media.setCurrentTime(Number(this.dataset.timecode));
-        });
-
-        this.$.find(".Ldt-AnnotationsList-Play").click(function() {
-            var _el = IriSP.jQuery(this),
-                _annid = _el.attr("data-annotation-id");
-            if (_this.jwplayers[_annid]) {
-                jwplayer(_this.jwplayers[_annid]).play();
-            }
-            _this.media.pause();
-        });
-
-        if (this.source.getAnnotations().searching) {
-            var rx = _this.source.getAnnotations().regexp || false;
-            this.$.find(".Ldt-AnnotationsList-Title a, .Ldt-AnnotationsList-Description").each(function() {
-                var _$ = IriSP.jQuery(this);
-                _$.html(IriSP.textFieldHtml(_$.text(), rx));
-            });
-        }
-
-        this.$.find(".Ldt-AnnotationsList-DeleteButton").click(_this.functionWrapper("onDeleteClick"))
-    }
-
-    if (this.ajax_url) {
-        if (this.mashupMode) {
-            this.ajaxMashup();
-        } else {
-            if (Math.abs(_currentTime - this.lastAjaxQuery) > (this.ajax_granularity)) {
-                this.ajaxSource();
-            }
-        }
-    }
-    
-    return _list.length;
-};
-
-IriSP.Widgets.AnnotationsList.prototype.onDeleteClick = function(event){
-    _list = this.getWidgetAnnotations();
-    ann_id = event.target.dataset.annotation;
-    delete_preview_$ = this.$.find(".Ldt-AnnotationsList-ul-ToDelete");
-    delete_preview_$.html("");
-    _list = _list.filter(function(_annotation){
-        return _annotation.id == ann_id
-    })
-    var _annotation = _list[0],
-        _title = "",
-        _creator = "",
-        _this = this;
-    if (_annotation.creator) {
-        var _users = [],
-            _user = {};
-        if (_this.source.users_data) {
-            _users = _this.source.users_data.filter(function(_user_data){
-                return _user_data.username == _annotation.creator;
-            });
-        }
-        if (_users.length == 0){
-            _user.username = _annotation.creator
-        }
-        else{
-            _user = _users[0]
-        }
-        _creator = _this.make_name_string_function(_user);
-    }
-    if (_annotation.title) {
-        var tempTitle = _annotation.title;
-        if( tempTitle.substr(0, _title.length + 1) == (_title + ":") ){
-            _title = "";
-        }
-        _title = _title + ( (_title=="") ? "" : ": ") + _annotation.title;
-    }
-    var _created = false;
-    if (this.show_creation_date) {
-        _created = _annotation.created.toLocaleDateString()+", "+_annotation.created.toLocaleTimeString();
-    }
-    var _data = {
-            id : _annotation.id,
-            media_id : _annotation.getMedia().id,
-            htitle : IriSP.textFieldHtml(_title),
-            hdescription : IriSP.textFieldHtml(_annotation.description),
-            begin : _annotation.begin.toString(),
-            end : _annotation.end.toString(),
-            created : _created,
-            show_timecode : this.show_timecode,
-            show_creator : this.show_creator,
-            creator : _creator,
-            tags : false,
-            l10n: this.l10n,
-            allow_annotations_deletion: false
-    }
-    _html = Mustache.to_html(this.annotationTemplate, _data)
-    delete_preview_$.html(_html)
-    
-    this.$.find(".Ldt-AnnotationsList-ConfirmDelete").click(function(){
-        _this.sendDelete(ann_id);
-    });
-    
-    this.showScreen("Delete");    
-}
-
-IriSP.Widgets.AnnotationsList.prototype.refreshHeader = function() {
-    var annotation_count_string = " (" + this.annotations_count +" "+this.annotations_count_header_string+")";
-    this.$.find('.Ldt-AnnotationsList-header').html("");
-    this.$.find('.Ldt-AnnotationsList-header').html(
-        this.custom_header && typeof this.custom_header == "string"? this.custom_header + annotation_count_string : this.l10n.header + annotation_count_string
-    );
-}
-
-IriSP.Widgets.AnnotationsList.prototype.hide = function() {
-    var _this = this;
-    if (this.visible){
-        this.visible = false;
-        this.widget_$.slideUp(function(){
-            _this.$.find('.Ldt-AnnotationsList-header').hide();            
-        });
-        this.showScreen("Main")
-    }
-}
-
-IriSP.Widgets.AnnotationsList.prototype.show = function() {
-    if(!this.visible){
-        this.visible = true;
-        this.$.find('.Ldt-AnnotationsList-header').show();
-        this.widget_$.slideDown();
-        this.showScreen("Main")
-    }
-}
-
-
-IriSP.Widgets.AnnotationsList.prototype.toggle = function() {
-    if (!this.always_visible) {
-        if (this.visible) {
-            this.hide();
-        } else {
-            this.show();
-        }
-    }
-};
-
-IriSP.Widgets.AnnotationsList.prototype.revertToMainScreen = function(){
-    if (this.$.find(".Ldt-AnnotationsList-ScreenMain").is(":hidden")){
-        this.showScreen("Main");
-    }
-}
-
-IriSP.Widgets.AnnotationsList.prototype.sendDelete = function(id){
-    var _this = this,
-        _url = Mustache.to_html(this.api_delete_endpoint, {annotation_id: id, project_id: this.project_id})
-    
-    IriSP.jQuery.ajax({
-        url: _url,
-        type: this.api_delete_method,
-        contentType: 'application/json',
-        success: function(_data) {
-            _this.showScreen('Success');
-            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 2000));
-            _this.currentSource.getAnnotations().removeId(id);
-            _this.player.trigger("AnnotationsList.refresh");
-        },
-        error: function(_xhr, _error, _thrown) {
-            IriSP.log("Error when sending annotation", _thrown);
-            _this.showScreen('Error');
-            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 2000));
-        }
-    });
-    this.showScreen('Sending');
-}
-
-IriSP.Widgets.AnnotationsList.prototype.draw = function() {
-    this.jwplayers = {};
-    this.mashupMode = (this.media.elementType === "mashup");
-
-    this.renderTemplate();
-
-    var _this = this;
-    this.list_$ = this.$.find(".Ldt-AnnotationsList-ul");
-    this.widget_$ = this.$.find(".Ldt-AnnotationsListWidget");
-    
-    if (this.widget_max_height){
-        this.widget_$.css("max-height", this.widget_max_height)
-    }
-    
-    if (this.show_filters){
-        if (this.user_filter){
-            this.userselect_$ = this.$.find("#Ldt-AnnotationsList-userFilter");
-            this.userselect_$.change(function(){
-                _this.player.trigger("AnnotationsList.refresh");
-            });
-            this.userselect_$.html("<option selected value='false'>"+this.l10n.everyone+"</option>");
-            this.usernames.forEach(function(_user){
-                var _users = _this.source.users_data.filter(function(_user_data){
-                    return _user_data.username == _user;
-                }),
-                    _user_data = {};
-                if (_users.length == 0){
-                    _user_data.username = _user;
-                }
-                else{
-                    _user_data = _users[0];
-                }
-                _this.userselect_$.append("<option value='"+_user+"'>"+_this.make_name_string_function(_user_data)+"</option>");
-            });
-        }
-        if (this.keyword_filter){
-            this.keywordinput_$ = this.$.find("#Ldt-AnnotationsList-keywordsFilter");
-            this.keywordinput_$.keyup(function(){
-                _this.player.trigger("AnnotationsList.refresh");
-            });
-            
-        }
-        if (this.segment_filter){
-            this.ignoresegmentcheckbox_$ = this.$.find("#Ldt-AnnotationsList-ignoreSegmentsFilter");
-            this.ignoresegmentcheckbox_$.click(function(){
-                _this.player.trigger("AnnotationsList.refresh");
-            });
-        }
-        if(this.date_filter){
-            this.datefilterinput_$ = this.$.find("#Ldt-AnnotationsList-dateFilter");
-            this.datefilterinput_$.datepicker({ dateFormat: 'dd/mm/yy' });
-            this.datefilterinput_$.change(function(){
-                _this.player.trigger("AnnotationsList.refresh")
-            })
-            if (this.current_day_filter){
-                currentDate = new Date();
-                this.datefilterinput_$.datepicker("setDate",currentDate);
-            }
-        }
-        if(this.latest_contributions_filter){
-            this.latestcontributionscheckbox_$ = this.$.find("#Ldt-AnnotationsList-latestContributionsFilter");
-            this.latestcontributionscheckbox_$.click(function(){
-                _this.player.trigger("AnnotationsList.refresh");
-            });
-        }
-    }
-    
-    this.source.getAnnotations().on("search", function(_text) {
-        _this.searchString = _text;
-        if (_this.source !== _this.currentSource) {
-            _this.currentSource.getAnnotations().search(_text);
-            _this.throttledRefresh();
-        }
-    });
-    this.source.getAnnotations().on("found", function() {
-        _this.throttledRefresh();
-    });
-    this.source.getAnnotations().on("not-found", function() {
-        _this.throttledRefresh();
-    });
-    this.source.getAnnotations().on("clear-search", function() {
-        _this.searchString = false;
-        if (_this.source !== _this.currentSource) {
-            _this.currentSource.getAnnotations().trigger("clear-search");
-        }
-    });
-    
-    this.$.find(".Ldt-AnnotationsList-Close").click(function(){
-        _this.showScreen("Main");
-    })
-    
-    this.source.getAnnotations().on("search-cleared", function() {
-        _this.throttledRefresh();
-    });
-
-    this.onMdpEvent("AnnotationsList.refresh", function() {
-        if (_this.ajax_url) {
-            if (_this.mashupMode) {
-                _this.ajaxMashup();
-            } else {
-                _this.ajaxSource();
-            }
-        }
-        _this.throttledRefresh(false);
-    });
-
-    this.onMdpEvent("AnnotationsList.update", function() {
-        if (_this.ajax_url) {
-            if (_this.mashupMode) {
-                _this.ajaxMashup();
-            } else {
-                _this.ajaxSource();
-            }
-        }
-        _this.throttledRefresh(true);
-    });
-
-    if (this.ajax_url) {
-        if (this.mashupMode) {
-            this.ajaxMashup();
-        } else {
-            this.ajaxSource();
-        }
-    } else {
-        this.currentSource = this.source;
-    }
-
-    if (this.refresh_interval) {
-        window.setInterval(function() {
-            _this.currentSource.get();
-        }, this.refresh_interval);
-    }
-    
-    if (this.annotations_count_header){
-        this.annotations_count = false;
-    }
-    
-    this.onMdpEvent("AnnotationsList.toggle","toggle");
-    this.onMdpEvent("AnnotationsList.hide", "hide");
-    this.onMdpEvent("AnnotationsList.show", "show");
-    
-    this.onMdpEvent("createAnnotationWidget.addedAnnotation", this.throttledRefresh);
-    var _events = [
-        "timeupdate",
-        "seeked",
-        "loadedmetadata",
-        "settimerange"
-    ];
-    for (var _i = 0; _i < _events.length; _i++) {
-        this.onMediaEvent(_events[_i], this.throttledRefresh);
-    }
-
-    this.throttledRefresh();
-    
-    this.showScreen("Main");
-    this.$.find(".Ldt-AnnotationsList-CancelDelete").click(function(){
-        _this.showScreen("Main")
-    });
-    
-    this.visible = true;
-    if (!this.start_visible){
-        this.hide();
-    }
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Arrow.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-IriSP.Widgets.Arrow = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.current_pilot_widget = this.pilot_widget
-};
-
-IriSP.Widgets.Arrow.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Arrow.prototype.defaults = {
-    arrow_height : 12,
-    arrow_width : 20,
-    base_height : 0,
-    base_curve : 0,
-    fill_url: IriSP.widgetsDir + '/img/pinstripe.png',
-    fill_color: "#ffffff", //Gradients can be used, e.g. "90-#000-#fff" for vertical white-to-black
-    stroke_color: "#b7b7b7",
-    stroke_width: 1.5,
-    animation_speed: 20
-};
-
-IriSP.Widgets.Arrow.prototype.draw = function() {
-    this.height = this.arrow_height + this.base_height;
-    this.$.addClass("Ldt-Arrow").css({
-        height: (1+this.height) + "px",
-        "margin-top": "1px",
-        overflow: "hidden"
-    });
-    this.paper = new Raphael(this.container, this.width, 1+this.height );
-    window.myArrow = this;
-    this.svgArrow = this.paper.path('M0,' + this.height + 'L' + this.width + ',' + this.height);
-    this.svgArrow.attr({
-        stroke: this.stroke_color,
-        "stroke-width": this.stroke_width,
-        fill: this.fill_url ? ( 'url(' + this.fill_url + ')' ) : this.fill_color
-    });
-    this.moveToX(0);
-};
-
-IriSP.Widgets.Arrow.prototype.drawAt = function(_x) {
-    _x = Math.max(0, Math.min(_x, this.width));
-    var _d = 'M0,' + this.height
-        + 'L0,' + Math.min( this.height, this.arrow_height + this.base_curve)
-        + 'Q0,' + this.arrow_height
-        + ' ' + Math.max(0, Math.min(this.base_curve, _x - this.arrow_width / 2)) + ',' + this.arrow_height
-        + 'L' + Math.max(0, _x - this.arrow_width / 2) + ',' + this.arrow_height
-        + 'L' + Math.max(0, _x - this.arrow_width / 2) + ',' + Math.min(this.arrow_height, 2 * this.arrow_height * _x / this.arrow_width)
-        + 'L' + _x + ',0'
-        + 'L' + Math.min(this.width, _x + this.arrow_width / 2) + ',' + Math.min(this.arrow_height, 2 * this.arrow_height * ( this.width - _x ) / this.arrow_width)
-        + 'L' + Math.min(this.width, _x + this.arrow_width / 2) + ',' + this.arrow_height
-        + 'L' + Math.min(this.width, Math.max(this.width - this.base_curve, _x + this.arrow_width / 2)) + ',' + this.arrow_height
-        + 'Q' + this.width + ',' + this.arrow_height
-        + ' ' + this.width + ',' + Math.min( this.height, this.arrow_height + this.base_curve)
-        + 'L' + this.width + ',' + this.height;
-    this.svgArrow.attr({
-        path: _d
-    });
-};
-
-IriSP.Widgets.Arrow.prototype.moveToX = function(_x) {
-    this.targetX = Math.max(0, Math.min(_x, this.width));
-    if (typeof this.animInterval === "undefined") {
-        this.animInterval = window.setInterval(
-            this.functionWrapper("increment"),
-            40
-        );
-    }
-    this.increment();
-};
-
-IriSP.Widgets.Arrow.prototype.moveToTime = function(_t) {
-    this.moveToX(this.width * _t / this.media.duration);
-};
-
-IriSP.Widgets.Arrow.prototype.increment = function() {
-    if (typeof this.currentX === "undefined") {
-        this.currentX = this.targetX;
-    }
-    if (this.currentX < this.targetX) {
-        this.currentX = Math.min(this.targetX, this.currentX + this.animation_speed);
-    }
-    if (this.currentX > this.targetX) {
-        this.currentX = Math.max(this.targetX, this.currentX - this.animation_speed);
-    }
-    if (this.currentX === this.targetX) {
-        window.clearInterval(this.animInterval);
-        this.animInterval = undefined;
-    }
-    this.drawAt(this.currentX);
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/AutoPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-IriSP.Widgets.AutoPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.AutoPlayer.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.AutoPlayer.prototype.defaults = {
-    default_type: "JwpPlayer"
-};
-
-IriSP.Widgets.AutoPlayer.prototype.draw = function() {
-
-    if (typeof this.video === "undefined") {
-        this.video = this.media.video;
-    }
-
-    var _props = [ "live", "provider", "autostart", "streamer", "video", "height", "width", "url_transform" ],
-        _opts = {},
-        _types = [
-            {
-                regexp: /^rtmp:\/\//,
-                type: "JwpPlayer"
-            },
-            {
-                regexp: /\.(mp4|m4v|mp3)$/,
-                type: "AdaptivePlayer"
-            },
-            {
-                regexp: /\.(ogg|ogv|webm)$/,
-                type: "HtmlPlayer"
-            },
-            {
-                regexp: /^(https?:\/\/)?(www\.)?youtube\.com/,
-                type: "PopcornPlayer"
-            },
-            {
-                regexp: /^(https?:\/\/)?(www\.)?vimeo\.com/,
-                type: "PopcornPlayer"
-            },
-            {
-                regexp: /^(https?:\/\/)?(www\.)?dailymotion\.com/,
-                type: "DailymotionPlayer"
-            }
-        ],
-        _rtmprgx = /^rtmp:\/\//;
-
-    for (var i = 0; i < _types.length; i++) {
-        if (this.video && _types[i].regexp.test(this.video.toLowerCase())) {
-            _opts.type =  _types[i].type;
-            break;
-        }
-    }
-
-    if (typeof _opts.type === "undefined") {
-        _opts.type = this.default_type;
-    }
-
-    if (_opts.type === "AdaptivePlayer") {
-        var _canPlayType = document.createElement('video').canPlayType('video/mp4; codecs="avc1.42E01E"');
-        _opts.type = (_canPlayType !== "no") ? "HtmlPlayer" : "JwpPlayer";
-    }
-
-    if (_rtmprgx.test(this.video)) {
-        _opts.provider = "rtmp";
-        _opts.live = true;
-    }
-
-    for (var i = 0; i < _props.length; i++) {
-        if (typeof this[_props[i]] !== "undefined") {
-            _opts[_props[i]] = this[_props[i]];
-        }
-    }
-
-    this.insertSubwidget(this.$, _opts);
-
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Controller.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-/* Player Widget */
-
-.Ldt-Ctrl {
-    font-size: 10px;
-    background: url('img/player_gradient.png') repeat-x transparent ;
-    height: 25px;
-    border: 1px solid #b6b8b8;
-    position: relative;
-    overflow: hidden;
-}
-
-.Ldt-Ctrl-Left {
-    float: left;
-}
-
-.Ldt-Ctrl-Right {
-    float: right;
-}
-
-.Ldt-Ctrl-button {
-    float: left;
-    width: 30px;
-    height: 25px;
-    background: url('img/player-sprites.png');
-    cursor: pointer;
-}
-
-.Ldt-Ctrl-spacer {
-    float: left;
-    width: 1px;
-    height: 25px;
-    background: #b6b8b8;
-}
-
-.Ldt-Ctrl-Play {
-    margin: 100px 0;
-    margin: 0 15px;
-}
-
-.Ldt-Ctrl-Play-PlayState {
-    background-position: 0 0;
-}
-
-.Ldt-Ctrl-Play-PlayState:hover {
-    background-position: 0 -25px;
-}
-
-.Ldt-Ctrl-Play-PlayState:active {
-    background-position: 0 -50px;
-}
-
-.Ldt-Ctrl-Play-PauseState {
-    background-position: -30px 0;
-}
-
-.Ldt-Ctrl-Play-PauseState:hover {
-    background-position: -30px -25px;
-}
-
-.Ldt-Ctrl-Play-PauseState:active {
-    background-position: -30px -50px;
-}
-
-.Ldt-Ctrl-Annotate {
-    margin: 0 2px;
-    background-position: -60px 0;
-}
-
-.Ldt-Ctrl-Annotate:hover {
-    background-position: -60px -25px;
-}
-
-.Ldt-Ctrl-Annotate:active {
-    background-position: -60px -50px;
-}
-
-.Ldt-Ctrl-SearchBtn {
-    margin: 0 2px;
-    background-position: -90px 0;
-}
-
-.Ldt-Ctrl-SearchBtn:hover {
-    background-position: -90px -25px;
-}
-
-.Ldt-Ctrl-SearchBtn:active {
-    background-position: -90px -50px;
-}
-
-.Ldt-Ctrl-Search {
-    width: 0; float: left; overflow: hidden;
-}
-
-input.Ldt-Ctrl-SearchInput {
-    -moz-box-sizing: border-box;
-    width: 145px;
-    height: 20px;
-    margin: 2px;
-    padding: 3px;
-    border: 1px solid #8080a0;
-    border-radius: 3px;
-    font-size: 13px;
-}
-
-.Ldt-Ctrl-Time {
-    float: left;
-    margin: 5px;
-    font-size: 12px;
-    font-family: Arial, Verdana, sans-serif;
-}
-
-.Ldt-Ctrl-Time-Elapsed {
-    float: left;
-    color: #4a4a4a;
-}
-
-.Ldt-Ctrl-Time-Separator {
-    margin: 0 4px;
-    float: left;
-}
-
-.Ldt-Ctrl-Time-Total {
-    float: left;
-    color: #b2b2b2;
-}
-
-.Ldt-Ctrl-Sound {
-    margin: 0 2px;
-}
-
-.Ldt-Ctrl-Sound-Full {
-    background-position: -120px 0;
-}
-
-.Ldt-Ctrl-Sound-Full:hover {
-    background-position: -120px -25px;
-}
-
-.Ldt-Ctrl-Sound-Full:active {
-    background-position: -120px -50px;
-}
-
-.Ldt-Ctrl-Sound-Mute {
-    background-position: -150px 0;
-}
-
-.Ldt-Ctrl-Sound-Mute:hover {
-    background-position: -150px -25px;
-}
-
-.Ldt-Ctrl-Sound-Mute:active {
-    background-position: -150px -50px;
-}
-
-.Ldt-Ctrl-Sound-Half {
-    background-position: -180px 0;
-}
-
-.Ldt-Ctrl-Sound-Half:hover {
-    background-position: -180px -25px;
-}
-
-.Ldt-Ctrl-Sound-Half:active {
-    background-position: -180px -50px;
-}
-
-.Ldt-Ctrl-Volume-Control {
-    display: none;
-    position: absolute;
-    background: url('img/player_gradient.png') repeat-x transparent ;
-    height: 25px;
-    width: 100px;
-    top: 25px;
-    right: -1px;
-    z-index: 100;
-    padding: 0 2px;
-    border: 1px solid #b6b8b8;
-}
-
-.Ldt-Ctrl-Volume-Bar {
-    height: 5px;
-    margin: 9px 3px 0;
-    background: #cccccc;
-    border: 1px solid #999999;
-    border-radius: 2px;
-}
-
-.Ldt-Ctrl-Volume-Control .ui-slider-handle {
-    width: 6px;
-    height: 19px;
-    background: #a8a8a8;
-    border: 1px solid #999999;
-    border-radius: 2px;
-    top: -8px;
-    margin-left: -4px;
-    cursor: pointer;
-}
-
-.Ldt-Ctrl-Volume-Control:hover .ui-slider-handle {
-    background: #F7268E;
-}
-
-/* quiz */
-
-.Ldt-Ctrl-Quiz-Enable button, .Ldt-Ctrl-Quiz-Create button, .Ldt-Ctrl-Quiz-Disactivated button, .Ldt-Ctrl-Fullscreen-Button{
-	border: none;
-	background: transparent;
-}
-
-.Ldt-Ctrl-Quiz-Enable {
-    background-image: url("img/quiz_off.svg");
-    float: left;
-    height: 22px;
-    width: 22px;
-    background-repeat: no-repeat;
-}
-.Ldt-Ctrl-Quiz-Enable.Ldt-Ctrl-Quiz-Toggle-Active {
-    background-image: url("img/quiz_on.svg");
-}
-
-.Ldt-Ctrl-Quiz-Create {
-    background-image: url("img/quiz_add_question.svg");
-    float: left;
-    height: 23px;
-    width: 26px;
-    background-repeat: no-repeat;
-    margin-left: 4px;
-    margin-top: 0px;
-    display: none;
-}
-.Ldt-Ctrl-Quiz-Create.Ldt-Ctrl-Quiz-Toggle-Active {
-    display: inline-block;
-}
-
-.Ldt-Ctrl-Fullscreen-Button {
-    margin-top: 3px;
-}
-
-.Ldt-Ctrl-Fullscreen-Button {
-    float: left;
-    background-image: url("img/fullscreen.svg");
-    background-position: right;
-    margin-right: 6px;
-    margin-top: 1px;
-    height: 22px;
-    width: 22px;
-    border: none;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/Controller.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,354 +0,0 @@
-/* Displays Play and Pause buttons, Search Button and Form, Volume Control */
-
-IriSP.Widgets.Controller = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.lastSearchValue = "";
-};
-
-IriSP.Widgets.Controller.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Controller.prototype.defaults = {
-    disable_annotate_btn: false,
-    disable_search_btn: false,
-    disable_ctrl_f: false,
-    disable_fullscreen : true,
-    always_show_search: false,
-    enable_quiz_toggle: undefined
-};
-
-IriSP.Widgets.Controller.prototype.template =
-    '<div class="Ldt-Ctrl">'
-    + '<div class="Ldt-Ctrl-Left">'
-    + '<div class="Ldt-Ctrl-button Ldt-Ctrl-Play Ldt-Ctrl-Play-PlayState Ldt-TraceMe" title="{{l10n.play_pause}}"></div>'
-    + '<div class="Ldt-Ctrl-spacer"></div>'
-    + '{{^disable_annotate_btn}}'
-    + '<div class="Ldt-Ctrl-button Ldt-Ctrl-Annotate Ldt-TraceMe" title="{{l10n.annotate}}"></div>'
-    + '<div class="Ldt-Ctrl-spacer"></div>'
-    + '{{/disable_annotate_btn}}'
-    + '{{^disable_search_btn}}'
-    + '<div class="Ldt-Ctrl-button Ldt-Ctrl-SearchBtn Ldt-TraceMe" title="{{l10n.search}}"></div>'
-    + '{{/disable_search_btn}}'
-    + '<div class="Ldt-Ctrl-Search">'
-    + '<input placeholder="{{ l10n.search }}" type="search" class="Ldt-Ctrl-SearchInput Ldt-TraceMe"></input>'
-    + '</div>'
-    + '<div class="Ldt-Ctrl-Quiz-Enable Ldt-TraceMe" title="Activer/Désactiver le quiz"></div>'
-    + '<div class="Ldt-Ctrl-Quiz-Create Ldt-TraceMe" ></div>'
-    + '</div>'
-    + '<div class="Ldt-Ctrl-Right">'
-    + '{{^disable_fullscreen}}<div class="Ldt-Ctrl-Fullscreen-Button Ldt-TraceMe" title="Passer le lecteur en plein-écran"></div{{/disable_fullscreen}}'
-    + '<div class="Ldt-Ctrl-spacer"></div>'
-    + '<div class="Ldt-Ctrl-Time">'
-    + '<div class="Ldt-Ctrl-Time-Elapsed" title="{{l10n.elapsed_time}}">00:00</div>'
-    + '<div class="Ldt-Ctrl-Time-Separator">/</div>'
-    + '<div class="Ldt-Ctrl-Time-Total" title="{{l10n.total_time}}">00:00</div>'
-    + '</div>'
-    + '<div class="Ldt-Ctrl-spacer"></div>'
-    + '<div class="Ldt-Ctrl-button Ldt-Ctrl-Sound Ldt-Ctrl-Sound-Full Ldt-TraceMe" title="{{l10n.mute_unmute}}"></div>'
-    + '</div>'
-    + '<div class="Ldt-Ctrl-Volume-Control" title="{{l10n.volume_control}}">'
-    + '<div class="Ldt-Ctrl-Volume-Bar"></div>'
-    + '</div>'
-    + '</div>';
-
-IriSP.Widgets.Controller.prototype.messages = {
-    en: {
-        play_pause: "Play/Pause",
-        mute_unmute: "Mute/Unmute",
-        play: "Play",
-        pause: "Pause",
-        mute: "Mute",
-        unmute: "Unmute",
-        annotate: "Annotate",
-        search: "Search",
-        elapsed_time: "Elapsed time",
-        total_time: "Total duration",
-        volume: "Volume",
-        volume_control: "Volume control",
-        enable_quiz: "Enable quiz"
-    },
-    fr: {
-        play_pause: "Lecture/Pause",
-        mute_unmute: "Couper/Activer le son",
-        play: "Lecture",
-        pause: "Pause",
-        mute: "Couper le son",
-        unmute: "Activer le son",
-        annotate: "Annoter",
-        search: "Rechercher",
-        elapsed_time: "Temps écoulé",
-        total_time: "Durée totale",
-        volume: "Niveau sonore",
-        volume_control: "Réglage du niveau sonore",
-        enable_quiz: "Activer le quiz"
-    }
-};
-
-IriSP.Widgets.Controller.prototype.draw = function() {
-    var _this = this;
-    this.renderTemplate();
-
-    // Define blocks
-    this.$playButton = this.$.find(".Ldt-Ctrl-Play");
-    this.$searchBlock = this.$.find(".Ldt-Ctrl-Search");
-    this.$searchInput = this.$.find(".Ldt-Ctrl-SearchInput");
-    this.$volumeBar = this.$.find(".Ldt-Ctrl-Volume-Bar");
-
-    // handle events
-    this.onMediaEvent("play","playButtonUpdater");
-    this.onMediaEvent("pause","playButtonUpdater");
-    this.onMediaEvent("volumechange","volumeUpdater");
-    this.onMediaEvent("timeupdate","timeDisplayUpdater");
-    this.onMediaEvent("loadedmetadata","volumeUpdater");
-
-    // handle clicks
-    this.$playButton.click(this.functionWrapper("playHandler"));
-
-    if (this.enable_quiz_toggle !== undefined) {
-        if (this.enable_quiz_toggle) {
-            this.$.find(".Ldt-Ctrl-Quiz-Enable").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
-            this.$.find(".Ldt-Ctrl-Quiz-Create").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
-            // this.player.trigger("QuizCreator.show");
-            this.$.find("#QuizEditContainer").show();
-        }
-        else
-        {
-            this.$.find(".Ldt-Ctrl-Quiz-Enable").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
-            this.$.find(".Ldt-Ctrl-Quiz-Create").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
-            this.player.trigger("QuizCreator.hide");
-            this.$.find("#QuizEditContainer").hide();
-        }
-    } else {
-            this.$.find(".Ldt-Ctrl-Quiz-Enable").hide();
-    }
-
-    this.$.find(".Ldt-Ctrl-Annotate").click(function() {
-        _this.player.trigger("CreateAnnotation.toggle");
-    });
-    this.$.find(".Ldt-Ctrl-SearchBtn").click(this.functionWrapper("searchButtonHandler"));
-
-    this.$searchInput.keyup(this.functionWrapper("searchHandler"));
-    this.$searchInput.on("search", this.functionWrapper("searchHandler"));
-
-    // Fullscreen handling
-    this.$.find(".Ldt-Ctrl-Fullscreen-Button").click(this.functionWrapper("toggleFullscreen"));
-    var fullscreen_event_name = IriSP.getFullscreenEventname();
-    if (fullscreen_event_name) {
-        document.addEventListener(fullscreen_event_name, function() {
-            if (IriSP.isFullscreen() && IriSP.getFullscreenElement() == _this.$[0]) {
-                _this.$.addClass("Ldt-Fullscreen-Element");
-            } else {
-                _this.$.removeClass("Ldt-Fullscreen-Element");
-            }
-        });
-    };
-
-    // Quiz activation
-    this.$.find(".Ldt-Ctrl-Quiz-Enable").click(this.functionWrapper("toggleQuiz"));
-    this.$.find(".Ldt-Ctrl-Quiz-Create").click(this.functionWrapper("createQuiz"));
-
-    var _volctrl = this.$.find(".Ldt-Ctrl-Volume-Control");
-    this.$.find('.Ldt-Ctrl-Sound')
-        .click(this.functionWrapper("muteHandler"))
-        .mouseover(function() {
-            _volctrl.show();
-        })
-        .mouseout(function() {
-            _volctrl.hide();
-        });
-    _volctrl.mouseover(function() {
-        _volctrl.show();
-    }).mouseout(function() {
-        _volctrl.hide();
-    });
-
-    // Handle CTRL-F
-    if (!this.disable_ctrl_f) {
-        var _fKey = "F".charCodeAt(0),
-            _lastCtrlFTime = 0;
-        IriSP.jQuery(document).keydown(function(_event) {
-            if (_event.keyCode === _fKey && (_event.ctrlKey || _event.metaKey)) {
-                var _time = IriSP.jQuery.now();
-                if (_time - _lastCtrlFTime > 2000) {
-                    _this.searchButtonHandler();
-                }
-                _lastCtrlFTime = _time;
-                return false;
-            }
-        });
-    }
-
-    // Allow Volume Cursor Dragging
-    this.$volumeBar.slider({
-        slide: function(event, ui) {
-            _this.$volumeBar.attr("title",_this.l10n.volume+': ' + ui.value + '%');
-            _this.media.setVolume(ui.value / 100);
-        },
-        stop: this.functionWrapper("volumeUpdater")
-    });
-
-    // trigger an IriSP.Player.MouseOver to the widgets that are interested (i.e : sliderWidget)
-    this.$.hover(
-        function() {
-            _this.player.trigger("Player.MouseOver");
-        },
-        function() {
-            _this.player.trigger("Player.MouseOut");
-        });
-
-    this.timeDisplayUpdater(new IriSP.Model.Time(0));
-
-    var annotations = this.source.getAnnotations();
-    annotations.on("search", function(_text) {
-        _this.$searchInput.val(_text);
-        _this.showSearchBlock();
-    });
-    annotations.on("found", function(_text) {
-        _this.$searchInput.css('background-color','#e1ffe1');
-    });
-    annotations.on("not-found", function(_text) {
-        _this.$searchInput.css('background-color', "#d62e3a");
-    });
-    annotations.on("search-cleared", function() {
-        _this.hideSearchBlock();
-    });
-    if (_this.always_show_search) {
-        _this.showSearchBlock();
-    }
-};
-
-/* Update the elasped time div */
-IriSP.Widgets.Controller.prototype.timeDisplayUpdater = function(_time) {
-
-    // we get it at each call because it may change.
-    var _totalTime = this.media.duration;
-    this.$.find(".Ldt-Ctrl-Time-Elapsed").html(_time.toString());
-    this.$.find(".Ldt-Ctrl-Time-Total").html(_totalTime.toString());
-};
-
-/* update the icon of the button - separate function from playHandler
-   because in some cases (for instance, when the user directly clicks on
-   the jwplayer window) we have to change the icon without playing/pausing
-*/
-IriSP.Widgets.Controller.prototype.playButtonUpdater = function() {
-    if (this.media.getPaused()) {
-    /* the background sprite is changed by adding/removing the correct classes */
-        this.$playButton
-            .attr("title", this.l10n.play)
-            .removeClass("Ldt-Ctrl-Play-PauseState")
-            .addClass("Ldt-Ctrl-Play-PlayState");
-    } else {
-        this.$playButton
-            .attr("title", this.l10n.pause)
-            .removeClass("Ldt-Ctrl-Play-PlayState")
-            .addClass("Ldt-Ctrl-Play-PauseState");
-    }
-};
-
-//FullScreen
-IriSP.Widgets.Controller.prototype.toggleFullscreen = function() {
-    if (IriSP.isFullscreen()) {
-        IriSP.setFullScreen(this.$[0], false);
-    } else {
-        IriSP.setFullScreen(this.$[0], true);
-    }
-};
-
-//Quiz
-IriSP.Widgets.Controller.prototype.createQuiz = function() {
-    this.player.trigger("Quiz.hide");
-    this.media.pause();
-    this.player.trigger("QuizCreator.create");
-};
-
-IriSP.Widgets.Controller.prototype.toggleQuiz = function() {
-    this.enable_quiz_toggle = !this.enable_quiz_toggle;
-    if (this.enable_quiz_toggle) {
-        $(".Ldt-Ctrl-Quiz-Enable").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
-        $(".Ldt-Ctrl-Quiz-Create").addClass("Ldt-Ctrl-Quiz-Toggle-Active");
-        this.player.trigger("Quiz.activate");
-    }
-    else
-    {
-        $(".Ldt-Ctrl-Quiz-Enable").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
-        $(".Ldt-Ctrl-Quiz-Create").removeClass("Ldt-Ctrl-Quiz-Toggle-Active");
-        this.player.trigger("Quiz.deactivate");
-        this.player.trigger("QuizCreator.hide");
-    }
-};
-
-IriSP.Widgets.Controller.prototype.playHandler = function() {
-    if (this.media.getPaused()) {
-        this.media.play();
-    } else {
-        this.media.pause();
-    }
-};
-
-IriSP.Widgets.Controller.prototype.muteHandler = function() {
-    this.media.setMuted(!this.media.getMuted());
-};
-
-IriSP.Widgets.Controller.prototype.volumeUpdater = function() {
-    var _muted = this.media.getMuted(),
-        _vol = this.media.getVolume();
-    if (_vol === false) {
-        _vol = .5;
-    }
-    var _soundCtl = this.$.find(".Ldt-Ctrl-Sound");
-    _soundCtl.removeClass("Ldt-Ctrl-Sound-Mute Ldt-Ctrl-Sound-Half Ldt-Ctrl-Sound-Full");
-    if (_muted) {
-        _soundCtl.attr("title", this.l10n.unmute)
-            .addClass("Ldt-Ctrl-Sound-Mute");
-    } else {
-        _soundCtl.attr("title", this.l10n.mute)
-            .addClass(_vol < .5 ? "Ldt-Ctrl-Sound-Half" : "Ldt-Ctrl-Sound-Full" );
-    }
-    this.$volumeBar.slider("value", _muted ? 0 : 100 * _vol);
-};
-
-IriSP.Widgets.Controller.prototype.showSearchBlock = function() {
-    this.$searchBlock.animate({ width:"160px" }, 200);
-    this.$searchInput.css('background-color','#fff');
-    this.$searchInput.focus();
-};
-
-IriSP.Widgets.Controller.prototype.hideSearchBlock = function() {
-    if (! this.always_show_search) {
-        this.$searchBlock.animate( { width: 0 }, 200);
-    }
-};
-
-/** react to clicks on the search button */
-IriSP.Widgets.Controller.prototype.searchButtonHandler = function() {
-    if ( !this.$searchBlock.width() ) {
-        this.showSearchBlock();
-        var _val = this.$searchInput.val();
-        if (_val) {
-            this.source.getAnnotations().search(_val);
-        }
-	} else {
-        this.hideSearchBlock();
-    }
-};
-
-/** this handler is called whenever the content of the search
-   field changes */
-IriSP.Widgets.Controller.prototype.searchHandler = function() {
-    if ( !this.$searchBlock.width() ) {
-        this.$searchBlock.css({ width:"160px" });
-        this.$searchInput.css('background-color','#fff');
-    }
-    var _val = this.$searchInput.val();
-    this._positiveMatch = false;
-
-    // do nothing if the search field is empty, instead of highlighting everything.
-    if (_val !== this.lastSearchValue) {
-        if (_val) {
-            this.source.getAnnotations().search(_val);
-        } else {
-            this.source.getAnnotations().trigger("clear-search");
-            this.$searchInput.css('background-color','');
-        }
-    }
-    this.lastSearchValue = _val;
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
- *
- */
-
-.Ldt-CreateAnnotation {
-    border-style: none solid solid;
-    border-width: 1px;
-    border-color: #b7b7b7;
-    padding: 0 1px 1px;
-    margin: 0;
-}
-
-.Ldt-CreateAnnotation-Inner {
-    background: url(img/pinstripe.png); padding: 5px; margin: 0; position: relative;
-}
-
-.Ldt-CreateAnnotation-Inner h3 {
-    margin: 5px 0; font-size: 14px; font-weight: bold; text-align: right; clear:both; color: #0068c4;
-}
-
-.Ldt-CreateAnnotation-h3Left {
-    float: left;
-}
-
-.Ldt-CreateAnnotation-Main {
-    min-height: 50px;
-}
-
-.Ldt-CreateAnnotation-Title, .Ldt-CreateAnnotation-Creator {
-    font-size: 14px;
-    font-weight: bold;
-    color: #0068c4;
-    border: 1px solid #666666;
-    border-radius: 2px;
-}
-
-.Ldt-CreateAnnotation-Title.empty, .Ldt-CreateAnnotation-Creator.empty {
-    font-style: italic;
-    color: #90b0d0;
-}
-
-.Ldt-CreateAnnotation-Times {
-    color: #ff3b77
-}
-
-.Ldt-CreateAnnotation-Submit,
-.Ldt-CreateAnnotation-Cancel,
-.Ldt-CreateAnnotation-PreviewSubmit{
-    position: absolute;
-    bottom: 7px;
-    color: #ffffff;
-    cursor: pointer;
-    height: 50px;
-    width: 50px;
-    padding: 28px 0 0;
-    font-size: 12px;
-    border: none;
-    text-align: center;
-    cursor: pointer;
-}
-
-
-.Ldt-CreateAnnotation-Cancel{
-    right: 7px;
-    background: url('img/cancel_annotation.png');
-}
-
-.Ldt-CreateAnnotation-Submit{
-	right: 67px; 
-	background: url('img/submit_annotation.png');
-}
-
-.Ldt-CreateAnnotation-Submit:hover,
-.Ldt-CreateAnnotation-Cancel:hover{
-    background-position: -50px 0;
-}
-
-.Ldt-CreateAnnotation-Description {
-    height: 3em;
-    padding: 2px;
-    resize: none;
-    width: calc(100% - 122px);
-    border: 1px solid #666666;
-    border-radius: 2px;
-}
-
-.Ldt-CreateAnnotation-Description.empty {
-    font-style: italic; color: #999999;
-}
-
-.Ldt-CreateAnnotation-Avatar {
-    float: right;
-    width: 48px;
-    height: 48px;
-    margin: 5px 0;
-    padding: 0 0 0 15px;
-    background: url('img/profile_arrow.png') left no-repeat;
-}
-
-.Ldt-CreateAnnotation-Avatar img {
-    float: right;
-    display: block;
-    max-width: 100%;
-    max-height: 100%;
-    border: 1px solid #bbbbbb;
-}
-
-.Ldt-CreateAnnotation-RecBlock {
-    width: 220px; float: left;
-}
-
-.Ldt-CreateAnnotation-TagTitle, .Ldt-CreateAnnotation-PolemicTitle, .Ldt-CreateAnnotation-RecLabel {
-    display: block; margin: 5px 0 2px; font-size: 12px;
-}
-
-.Ldt-CreateAnnotation-TagList, .Ldt-CreateAnnotation-PolemicList {
-    list-style: none;
-    width: calc(100% - 122px);
-    padding-left: 0px;
-}
-
-li.Ldt-CreateAnnotation-TagLi {
-    display: inline-block; border: none; margin: 0 10px 5px 0; height: 23px; padding: 0 0 0 20px;
-    background: url(img/tag.png) left top no-repeat;
-    cursor: pointer;
-}
-
-.Ldt-CreateAnnotation-TagButton {
-    display: inline-block; font-size: 12px; height: 19px; padding: 4px 5px 0 0; border: none; margin: 0;
-    background: url(img/tag.png) right top no-repeat;
-}
-
-li.Ldt-CreateAnnotation-TagLi:hover {
-    background-position: left -23px;
-}
-
-.Ldt-CreateAnnotation-TagLi:hover .Ldt-CreateAnnotation-TagButton {
-    background-position: right -23px;
-}
-
-li.Ldt-CreateAnnotation-TagLi.selected {
-    background-position: left -46px;
-}
-
-.Ldt-CreateAnnotation-TagLi.selected .Ldt-CreateAnnotation-TagButton {
-    background-position: right -46px;
-}
-
-li.Ldt-CreateAnnotation-PolemicLi {
-    display: inline-block; border: none; margin: 0 5px 0; height: 21px; width: 26px; padding: 2px 0 0;
-    background: url(img/polemic.png) left top no-repeat; font-size: 14px; font-weight: bold; text-align: center;
-    cursor: pointer;
-}
-
-li.Ldt-CreateAnnotation-PolemicLi:hover {
-    background-position: 0 -23px;
-}
-
-li.Ldt-CreateAnnotation-PolemicLi.selected {
-    background-position: 0 -46px;
-}
-
-.Ldt-CreateAnnotation-InnerBox {
-    margin: 20px 50px;
-    border: 1px solid #CCCCCC;
-    padding: 20px;
-    background: #FFFFFF;
-    color: #FF3B77; text-align: center;
-    font-size: 13px; font-weight: bold;
-}
-
-a.Ldt-CreateAnnotation-Close {
-    position: absolute; top: 2px; right: 2px;
-    display: inline-block; width: 17px; height: 17px; margin: 2px;
-    background: url(img/widget-control.png);
-}
-
-a.Ldt-CreateAnnotation-Close:hover {
-    background-position: -17px 0;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/CreateAnnotation.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,624 +0,0 @@
-/* TODO: Add Social Network Sharing */
-
-IriSP.Widgets.CreateAnnotation = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    if (_this.editable_storage != '' && window.localStorage[_this.editable_storage]) {
-        this.source.onLoad(function () {
-            var _export = _this.player.sourceManager.newLocalSource({serializer: IriSP.serializers['ldt_localstorage']});
-            _export.deSerialize(window.localStorage[_this.editable_storage]);
-            _this.source.merge(_export);
-        });
-    };
-};
-
-IriSP.Widgets.CreateAnnotation.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.CreateAnnotation.prototype.defaults = {
-    show_title_field : true,
-    show_creator_field : true,
-    creator_field_readonly : false,
-    start_visible : true,
-    always_visible : false,
-    show_slice : true,
-    show_arrow : true,
-    show_mic_record: false,
-    show_mic_play: false,
-    show_time: true,
-    minimize_annotation_widget : true,
-    creator_name : "",
-    creator_avatar : "",
-    tags : false,
-    tag_titles : false,
-    pause_on_write : true,
-    max_tags : 8,
-    polemics : [{
-        keyword: "++",
-        background_color: "#00a000",
-        text_color: "#ffffff"
-    },{
-        keyword: "--",
-        background_color: "#c00000",
-        text_color: "#ffffff"
-    },{
-        keyword: "??",
-        background_color: "#0000e0",
-        text_color: "#ffffff"
-    },{
-        keyword: "==",
-        background_color: "#f0e000",
-        text_color: "#000000"
-    }],
-    slice_annotation_type: "chap",
-    annotation_type: "Contributions",
-    post_at_segment_time: false,
-    segment_annotation_type: "chap",
-    api_serializer: "ldt_annotate",
-    api_endpoint_template: "",
-    api_method: "POST",
-    // Id that will be used as localStorage key
-    editable_storage: "",
-    project_id: "",
-    after_send_timeout: 0,
-    close_after_send: false,
-    tag_prefix: "#",
-    pause_when_displaying: false,
-    custom_send_button: false,
-    custom_cancel_button: false,
-    custom_description_placeholder: false,
-    preview_mode: false,
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.messages = {
-    en: {
-        from_time: "from",
-        to_time: "to",
-        at_time: "at",
-        submit: "Submit",
-        preview_submit: "You cannot submit annotations in preview mode",
-        cancel: "Cancel",
-        add_keywords_: "Add keywords:",
-        add_polemic_keywords_: "Add polemic attributes :",
-        your_name_: "Your name:",
-        annotate_video: "New note",
-        type_title: "Annotation title",
-        type_description: "Enter a new note...",
-        wait_while_processing: "Please wait while your annotation is being processed...",
-        error_while_contacting: "An error happened while contacting the server. Your annotation has not been saved.",
-        annotation_saved: "Thank you, your annotation has been saved.",
-        share_annotation: "Would you like to share it on social networks ?",
-        close_widget: "Hide the annotation form",
-        "polemic++": "Agree",
-        "polemic--": "Disagree",
-        "polemic??": "Question",
-        "polemic==": "Reference",
-        "in_tooltip": "Set begin time to current player time",
-        "out_tooltip": "Set begin time to current player time",
-        "play_tooltip": "Play the fragment"
-    },
-    fr: {
-        from_time: "de",
-        to_time: "à",
-        at_time: "à",
-        submit: "Envoyer",
-        preview_submit: "Vous ne pouvez pas envoyer d'annotation en mode aperçu",
-        cancel: "Annuler",
-        add_keywords_: "Ajouter des mots-clés\u00a0:",
-        add_polemic_keywords_: "Ajouter des attributs polémiques\u00a0:",
-        your_name_: "Votre nom\u00a0:",
-        annotate_video: "Entrez une nouvelle note...",
-        type_title: "Titre de l'annotation",
-        type_description: "Prenez vos notes...",
-        wait_while_processing: "Veuillez patienter pendant le traitement de votre annotation...",
-        error_while_contacting: "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée.",
-        annotation_saved: "Merci, votre annotation a été enregistrée.",
-        share_annotation: "Souhaitez-vous la partager sur les réseaux sociaux ?",
-        close_widget: "Cacher le formulaire de création d'annotations",
-        "polemic++": "Accord",
-        "polemic--": "Désaccord",
-        "polemic??": "Question",
-        "polemic==": "Référence",
-        "in_tooltip": "Utiliser le temps courant comme début",
-        "out_tooltip": "Utiliser le temps courant comme fin",
-        "play_tooltip": "Jouer le fragment"
-    }
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.template =
-    '{{#show_slice}}<div class="Ldt-CreateAnnotation-Slice Ldt-TraceMe"></div>{{/show_slice}}'
-    + '{{^show_slice}}{{#show_arrow}}<div class="Ldt-CreateAnnotation-Arrow"></div>{{/show_arrow}}{{/show_slice}}'
-    + '<div class="Ldt-CreateAnnotation"><div class="Ldt-CreateAnnotation-Inner">'
-    + '<form class="Ldt-CreateAnnotation-Screen Ldt-CreateAnnotation-Main">'
-    + '<h3><span class="Ldt-CreateAnnotation-h3Left">{{l10n.annotate_video}}{{#show_title_field}}</span></h3>'
-    + '<h3><span class="Ldt-CreateAnnotation-h3Left"><input class="Ldt-CreateAnnotation-Title empty" placeholder="{{l10n.type_title}}" />{{/show_title_field}}'
-    + '{{#show_time}}<span class="Ldt-CreateAnnotation-Times"> {{#show_slice}}{{l10n.from_time}} {{/show_slice}}{{^show_slice}}{{l10n.at_time}} {{/show_slice}} <span class="Ldt-CreateAnnotation-Begin">00:00</span>{{/show_time}}'
-    + '{{#show_slice}} {{l10n.to_time}} <span class="Ldt-CreateAnnotation-End">{{end}}</span>{{/show_slice}}</span></span>'
-    + '{{#show_creator_field}}{{l10n.your_name_}} <input class="Ldt-CreateAnnotation-Creator empty" value="{{creator_name}}" {{#creator_field_readonly}}readonly{{/creator_field_readonly}}/>{{/show_creator_field}}</h3>'
-    + '{{#show_controls}}<div class="Ldt-CreateAnnotation-Controls">'
-    +   '<span title="{{l10n.in_tooltip}}" class="Ldt-CreateAnnotation-Control-In">In</span>'
-    +   '<span title="{{l10n.out_tooltip}}" class="Ldt-CreateAnnotation-Control-Out">Out</span>'
-    +   '<span title="{{l10n.play_tooltip}}" class="Ldt-CreateAnnotation-Control-Play">Play</span>'
-    + '</div>{{/show_controls}}'
-    + '<textarea class="Ldt-CreateAnnotation-Description Ldt-TraceMe empty" placeholder="{{#custom_description_placeholder}}{{custom_description_placeholder}}{{/custom_description_placeholder}}{{^custom_description_placeholder}}{{l10n.type_description}}{{/custom_description_placeholder}}"></textarea>'
-    + '{{#show_creator_field}}<div class="Ldt-CreateAnnotation-Avatar"><img src="{{creator_avatar}}" title="{{creator_name}}"></img></div>{{/show_creator_field}}'
-    + '<div class="Ldt-CreateAnnotation-SubmitArea Ldt-TraceMe">'
-    +  '{{#preview_mode}}<input type="button" class="Ldt-CreateAnnotation-PreviewSubmit" title="{{l10n.preview_submit}}" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}'
-    +  '{{^preview_mode}}<input type="submit" class="Ldt-CreateAnnotation-Submit" value="{{#custom_send_button}}{{custom_send_button}}{{/custom_send_button}}{{^custom_send_button}}{{l10n.submit}}{{/custom_send_button}}" />{{/preview_mode}}'
-    +   '<input type="button" class="Ldt-CreateAnnotation-Cancel" value="{{#custom_cancel_button}}{{custom_cancel_button}}{{/custom_cancel_button}}{{^custom_cancel_button}}{{l10n.cancel}}{{/custom_cancel_button}}" />'
-    +   '<div class="Ldt-CreateAnnotation-Begin Ldt-CreateAnnotation-Times">00:00</div>'
-    + '</div>'
-    + '{{#show_mic_record}}<div class="Ldt-CreateAnnotation-RecBlock"><div class="Ldt-CreateAnnotation-RecLabel">Add voice annotation</div>'
-    + '    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="220" height="160">'
-    + '        <param name="movie" value="{{record_swf}}" />'
-    + '        <param name="quality" value="high" />'
-    + '        <param name="bgcolor" value="#ffffff" />'
-    + '        <param name="play" value="true" />'
-    + '        <param name="loop" value="true" />'
-    + '        <param name="wmode" value="transparent" />'
-    + '        <param name="scale" value="showall" />'
-    + '        <param name="menu" value="true" />'
-    + '        <param name="devicefont" value="false" />'
-    + '        <param name="salign" value="" />'
-    + '        <param name="allowScriptAccess" value="always" />'
-    + '        <param name="allowFullScreen" value="true" />'
-    + '        <param name="flashvars" value="playVisible={{show_mic_play}}">'
-    + '        <embed src="{{record_swf}}"" quality="high" bgcolor="#ffffff"'
-    + '             width="220" height="160" name="ExternalInterfaceExample" align="middle"'
-    + '             play="true" loop="false" quality="high" allowScriptAccess="always" '
-    + '             type="application/x-shockwave-flash" allowFullScreen="true" wmode="transparent" '
-    + '             flashvars="playVisible={{show_mic_play}}"'
-    + '             pluginspage="http://www.macromedia.com/go/getflashplayer">'
-    + '        </embed>'
-    + '    </object>'
-    + '</div>{{/show_mic_record}}' 
-    + '{{#tags.length}}<div class="Ldt-CreateAnnotation-Tags"><div class="Ldt-CreateAnnotation-TagTitle">{{l10n.add_keywords_}}</div><ul class="Ldt-CreateAnnotation-TagList">'
-    + '{{#tags}}<li class="Ldt-CreateAnnotation-TagLi" tag-id="{{id}}" data-text="{{tag_prefix}}{{title}}"><span class="Ldt-CreateAnnotation-TagButton">{{title}}</span></li>{{/tags}}</ul></div>{{/tags.length}}'
-    + '{{#polemics.length}}<div class="Ldt-CreateAnnotation-Polemics"><div class="Ldt-CreateAnnotation-PolemicTitle">{{l10n.add_polemic_keywords_}}</div><ul class="Ldt-CreateAnnotation-PolemicList">'
-    + '{{#polemics}}<li class="Ldt-CreateAnnotation-PolemicLi" style="background-color: {{background_color}}; color: {{text_color}}" data-text="{{keyword}}">{{keyword}}</li>{{/polemics}}</ul></div>{{/polemics.length}}'
-    + '<div style="clear: both;"></div></form>'
-    + '<div class="Ldt-CreateAnnotation-Screen Ldt-CreateAnnotation-Wait"><div class="Ldt-CreateAnnotation-InnerBox">{{l10n.wait_while_processing}}</div></div>'
-    + '<div class="Ldt-CreateAnnotation-Screen Ldt-CreateAnnotation-Error">{{^always_visible}}<a title="{{l10n.close_widget}}" class="Ldt-CreateAnnotation-Close" href="#"></a>{{/always_visible}}<div class="Ldt-CreateAnnotation-InnerBox">{{l10n.error_while_contacting}}</div></div>'
-    + '<div class="Ldt-CreateAnnotation-Screen Ldt-CreateAnnotation-Saved">{{^always_visible}}<a title="{{l10n.close_widget}}" class="Ldt-CreateAnnotation-Close" href="#"></a>{{/always_visible}}<div class="Ldt-CreateAnnotation-InnerBox">{{l10n.annotation_saved}}</div></div>'
-    + '</div></div>';
-    
-IriSP.Widgets.CreateAnnotation.prototype.draw = function() {
-    var _this = this;
-    
-    this.begin = new IriSP.Model.Time();
-    this.end = this.source.getDuration();
-    
-    this.tag_prefix = this.tag_prefix || "";
-    
-    if (this.tag_titles && !this.tags) {
-		if(!(this.tag_titles.length==1 && this.tag_titles[0]=="")){
-			this.tags = IriSP._(this.tag_titles).map(function(_tag_title) {
-				var _tag,
-					_tags = _this.source.getTags().searchByTitle(_tag_title, true);
-				if (_tags.length) {
-					_tag = _tags[0];
-				} else {
-					_tag = new IriSP.Model.Tag(false, _this.source);
-					_this.source.getTags().push(_tag);
-					_tag.title = _tag_title;
-				}
-				return _tag;
-			});
-        }
-        else{
-        	// we forced no tags if this.tag_titles = [''] (and not false)
-        	this.tags = true;
-        }
-    }
-    if (!this.tags) {
-        this.tags = this.source.getTags()
-            .sortBy(function (_tag) {
-                return -_tag.getAnnotations().length;
-            })
-            .slice(0, this.max_tags)
-            .map(function(_tag) {
-                return _tag;
-            });
-        /* We have to use the map function because Mustache doesn't like our tags object */
-    }
-    this.record_swf = IriSP.getLib("recordMicSwf");
-    this.renderTemplate();
-    if (this.show_mic_record) {
-        this.recorder = this.$.find("embed")[0];
-        
-        window.setAudioUrl = function(_url) {
-            _this.audio_url = _url;
-        }
-    }
-    if (this.show_slice) {
-        this.insertSubwidget(
-            this.$.find(".Ldt-CreateAnnotation-Slice"),
-            {
-                type: "Slice",
-                show_arrow: this.show_arrow,
-                annotation_type: this.slice_annotation_type,
-                onBoundsChanged: function(_from, _to) {
-                    _this.setBeginEnd(_from, _to);
-                }
-            },
-            "slice"
-        );
-    } else {
-        if (this.show_arrow) {
-            this.insertSubwidget(this.$.find(".Ldt-CreateAnnotation-Arrow"), {type: "Arrow"},"arrow");
-        }
-        this.onMediaEvent("timeupdate", function(_time) {
-            // Do not update timecode if description is not empty
-            if (_this.$.find(".Ldt-CreateAnnotation-Description").val().trim() == "") {
-                _this.setBeginEnd(_time, _time);
-                if (_this.arrow) {
-                    _this.arrow.moveToTime(_time);
-                }
-            };
-        });
-    }
-    this.$.find(".Ldt-CreateAnnotation-Cancel").click(function() {
-        _this.player.trigger("CreateAnnotation.hide");
-    });
-    this.$.find(".Ldt-CreateAnnotation-Close").click(function() {
-        _this.close_after_send
-        ? _this.player.trigger("CreateAnnotation.hide")
-        : _this.showScreen("Main");
-        return false;
-    });
-    this.$.find(".Ldt-CreateAnnotation-TagLi, .Ldt-CreateAnnotation-PolemicLi").click(function() {
-        _this.addKeyword(IriSP.jQuery(this).attr("data-text"));
-        return false;
-    });
-    this.$.find(".Ldt-CreateAnnotation-PolemicLi").each(function() {
-        var _el = IriSP.jQuery(this),
-            _kw = _el.attr("data-text"),
-            _msg = _this.l10n["polemic" + _kw];
-        if (_msg) {
-            _el.attr("title",_msg);
-        }
-    });
-    this.$.find(".Ldt-CreateAnnotation-Description").bind("change keyup input paste", this.functionWrapper("onDescriptionChange"));
-    if (this.show_title_field) {
-        this.$.find(".Ldt-CreateAnnotation-Title").bind("change keyup input paste", this.functionWrapper("onTitleChange"));
-    }
-    if (this.show_creator_field) {
-        this.$.find(".Ldt-CreateAnnotation-Creator").bind("change keyup input paste", this.functionWrapper("onCreatorChange"));
-    }
-    this.$.find("[class^='Ldt-CreateAnnotation-Control-']").click(function() {
-        var action = this.className.replace('Ldt-CreateAnnotation-Control-', '');
-        switch (action) {
-            case "In":
-               // Set In bound to current player time
-               this.setBegin(_this.media.getCurrentTime());
-               break;
-            case "Out":
-               // Set In bound to current player time
-               this.setEnd(_this.media.getCurrentTime() || _this.media.duration);
-               break;
-            case "Play":
-               this.media.setCurrentTime(_this.begin);
-               this.media.play();
-               break;
-        }
-        return false;
-    });
-
-    if (this.start_visible) {
-        this.show();
-    } else {
-        this.$.hide();
-        this.hide();
-    }
-    
-    this.onMdpEvent("CreateAnnotation.toggle","toggle");
-    this.onMdpEvent("CreateAnnotation.hide", "hide");
-    this.onMdpEvent("CreateAnnotation.show", "show");
-    this.$.find("form").submit(this.functionWrapper("onSubmit"));
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.setBegin = function (t) {
-    this.begin = new IriSP.Model.Time(t || 0);
-    this.$.find(".Ldt-CreateAnnotation-Begin").html(this.begin.toString());
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.setEnd = function (t) {
-    this.end = new IriSP.Model.Time(t || 0);
-    this.$.find(".Ldt-CreateAnnotation-End").html(this.end.toString());
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.setBeginEnd = function (begin, end) {
-    this.setBegin(begin);
-    this.setEnd(end);
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.showScreen = function(_screenName) {
-    this.$.find('.Ldt-CreateAnnotation-' + _screenName).show()
-        .siblings().hide();
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.show = function() {
-    if (!this.visible){
-        this.visible = true;
-        if (this.pause_when_displaying){
-            this.media.pause();
-        }
-        this.showScreen('Main');
-        this.$.find(".Ldt-CreateAnnotation-Description").val("").css("border-color", "#666666").addClass("empty");
-        if (this.show_title_field) {
-            this.$.find(".Ldt-CreateAnnotation-Title").val("").css("border-color", "#666666").addClass("empty");
-        }
-        if (this.show_creator_field) {
-            this.$.find(".Ldt-CreateAnnotation-Creator").val(this.creator_name).css("border-color", "#666666");
-            if (!this.creator_name) {
-                this.$.find(".Ldt-CreateAnnotation-Creator").addClass("empty");
-            }
-        }
-        this.$.find(".Ldt-CreateAnnotation-TagLi, .Ldt-CreateAnnotation-PolemicLi").removeClass("selected");
-        this.$.slideDown();
-        if (this.minimize_annotation_widget) {
-            this.player.trigger("Annotation.minimize");
-        }
-    }
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.hide = function() {
-    if (this.visible){
-        if (this.recorder) {
-            this.recorder.stopRecord();
-        }
-        if (!this.always_visible) {
-            this.visible = false;
-            this.$.slideUp();
-            if (this.minimize_annotation_widget) {
-                this.player.trigger("Annotation.maximize");
-            }
-        }
-    }
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.toggle = function() {
-    if (!this.always_visible) {
-        if (this.visible) {
-            this.hide();
-        } else {
-            var t = this.media.getCurrentTime() || 0;
-            this.setBeginEnd(t, t);
-            if (this.slice_widget) {
-                this.slice_widget.setBounds(this.begin, this.end);
-            }
-            this.show();
-            // Set focus on textarea
-            this.$.find(".Ldt-CreateAnnotation-Description").focus();
-        }
-    }
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.addKeyword = function(_keyword) {
-    var _field = this.$.find(".Ldt-CreateAnnotation-Description"),
-        _rx = IriSP.Model.regexpFromTextOrArray(_keyword),
-        _contents = _field.val();
-    _contents = ( !!_contents.match(_rx)
-        ? _contents.replace(_rx,"")
-        : _contents + " " + _keyword
-    );
-    _field.val(_contents.replace(/\s{2,}/g,' ').replace(/(^\s+|\s+$)/g,''));
-    this.onDescriptionChange();
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.pauseOnWrite = function() {
-    if (this.pause_on_write && !this.media.getPaused()) {
-        this.media.pause();
-    }
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.onDescriptionChange = function(e) {
-    if (e !== undefined && e.keyCode == 13 && !e.shiftKey) {
-        // Return: submit. Use shift-Return to insert a LF
-        this.onSubmit();
-        return true;
-    }
-    var _field = this.$.find(".Ldt-CreateAnnotation-Description"),
-        _contents = _field.val();
-    _field.css("border-color", !!_contents ? "#666666" : "#ff0000");
-    if (!!_contents) {
-        _field.removeClass("empty");
-    } else {
-        _field.addClass("empty");
-    }
-    this.$.find(".Ldt-CreateAnnotation-TagLi, .Ldt-CreateAnnotation-PolemicLi").each(function() {
-        var _rx = IriSP.Model.regexpFromTextOrArray(IriSP.jQuery(this).attr("data-text"));
-        if (_contents.match(_rx)) {
-            IriSP.jQuery(this).addClass("selected");
-        } else {
-            IriSP.jQuery(this).removeClass("selected");
-        }
-    });
-    this.pauseOnWrite();
-    return !!_contents;
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.onTitleChange = function() {
-    var _field = this.$.find(".Ldt-CreateAnnotation-Title"),
-        _contents = _field.val();
-    _field.css("border-color", !!_contents ? "#666666" : "#ff0000");
-    if (!!_contents) {
-        _field.removeClass("empty");
-    } else {
-        _field.addClass("empty");
-    }
-    this.pauseOnWrite();
-    return !!_contents;
-};
-
-
-IriSP.Widgets.CreateAnnotation.prototype.onCreatorChange = function() {
-    var _field = this.$.find(".Ldt-CreateAnnotation-Creator"),
-        _contents = _field.val();
-    _field.css("border-color", !!_contents ? "#666666" : "#ff0000");
-    if (!!_contents) {
-        _field.removeClass("empty");
-    } else {
-        _field.addClass("empty");
-    }
-    this.pauseOnWrite();
-    return !!_contents;
-};
-
-IriSP.Widgets.CreateAnnotation.prototype.onSubmit = function() {
-    /* If mandatory fields are empty, we cancel the sending */
-    if (!this.onDescriptionChange() || (this.show_title_field && !this.onTitleChange()) || (this.show_creator_field && !this.onCreatorChange())) {
-        return false;
-    }
-    
-    if (this.recorder) {
-        this.recorder.stopRecord();
-    }
-    
-    var _this = this,
-        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* We create a List to send to the server that will contains the annotation */
-        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* We create a source object using a specific serializer for export */
-        _local_export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers['ldt_localstorage']}), /* Source object using a specific serializer for local export */
-        _annotation = new IriSP.Model.Annotation(false, _export), /* We create an annotation in the source with a generated ID (param. false) */
-        _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* We get the AnnotationType in which the annotation will be added */
-        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)), /* If it doesn't already exists, we create it */
-        _url = Mustache.to_html(this.api_endpoint_template, {id: this.source.projectId}); /* We make the url to send the request to, must include project id */
-    
-    /* If we created an AnnotationType on the spot ... */
-    if (!_annotationTypes.length) {
-        /* ... We must not send its id to the server ... */
-        _annotationType.dont_send_id = true;
-        /* ... And we must include its title. */
-        _annotationType.title = this.annotation_type;
-    }
-    
-    /*
-     * Will fill the generated annotation object's data
-     * WARNING: If we're on a MASHUP, these datas must refer the ORIGINAL MEDIA
-     * */
-    _annotation.setMedia(this.source.currentMedia.id); /* Annotated media ID */
-    
-    if (this.post_at_segment_time){
-        var _currentTime = this.media.getCurrentTime() 
-        var _segmentsAnnotations = this.source.getAnnotationsByTypeTitle(this.segments_annotation_type)
-        var _currentSegments = _segmentsAnnotations.filter(function(_segment){
-            return (_currentTime >= _segment.begin && _currentTime <= _segment.end)
-        });
-        if (_currentSegments.length == 0){
-            _annotation.setBegin(this.begin); /* Widget starting timecode */
-            _annotation.setEnd(this.end); /* Widget end timecode */
-        }
-        else {
-            _annotation.setBegin(_currentSegments[0].begin); /* Segment starting timecode */
-            _annotation.setEnd(_currentSegments[0].end); /* Segment end timecode */
-        }
-    }
-    else {
-        _annotation.setBeginEnd(this.begin, this.end); /* Widget end/start timecodes */
-    }
-    _annotation.setAnnotationType(_annotationType.id); /* Annotation type ID */
-    if (this.show_title_field) {
-        /* Title field, only if it's visible */
-        _annotation.title = this.$.find(".Ldt-CreateAnnotation-Title").val();
-    }if (this.project_id != ""){
-    	/* Project id, only if it's been specifiec in the config */
-    	_annotation.project_id = this.project_id;
-    }
-    _annotation.created = new Date(); /* Annotation creation date */
-    _annotation.description = this.$.find(".Ldt-CreateAnnotation-Description").val(); /* Description field */
-   
-    var tagIds = Array.prototype.map.call(
-        this.$.find(".Ldt-CreateAnnotation-TagLi.selected"),
-        function(el) { return IriSP.jQuery(el).attr("tag-id"); }
-    );
-        
-    IriSP._(_annotation.description.match(/#[^\s#.,;]+/g)).each(function(_tt) {
-        var _tag,
-            _tag_title = _tt.replace(/^#/,''),
-            _tags = _this.source.getTags().searchByTitle(_tag_title, true);
-        if (_tags.length) {
-            _tag = _tags[0];
-        } else {
-            _tag = new IriSP.Model.Tag(false, _this.source);
-            _this.source.getTags().push(_tag);
-            _tag.title = _tag_title;
-        }
-        if (tagIds.indexOf(_tag.id) === -1) {
-            tagIds.push(_tag.id);
-        }
-    });
-    _annotation.setTags(IriSP._(tagIds).uniq()); /* Tag ids list */
-    if (this.audio_url) {
-        _annotation.audio = {
-            src: "mic",
-            mimetype: "audio/mp3",
-            href: this.audio_url
-        };
-    }
-    if (this.show_creator_field) {
-        _annotation.creator = this.$.find(".Ldt-CreateAnnotation-Creator").val();
-    } else {
-        _annotation.creator = this.creator_name;
-    }
-    _exportedAnnotations.push(_annotation); /* Ajout de l'annotation à la liste à exporter */
-    
-    if (this.editable_storage != '') {
-        // Append to localStorage annotations
-
-        // FIXME: handle movie ids
-        _local_export.addList("annotation", _exportedAnnotations); /* Ajout de la liste à exporter à l'objet Source */
-        _this.source.merge(_local_export); /* On ajoute la nouvelle annotation au recueil original */
-        // Import previously saved local annotations
-        if (window.localStorage[this.editable_storage]) {
-            _local_export.deSerialize(window.localStorage[this.editable_storage]);
-        }
-        // Save everything back
-        window.localStorage[_this.editable_storage] = _local_export.serialize();
-        _this.player.trigger("AnnotationsList.refresh"); /* On force le rafraîchissement du widget AnnotationsList */
-        _this.player.trigger("Annotation.create", _annotation);
-        _this.$.find(".Ldt-CreateAnnotation-Description").val("");
-    }
-    
-    if (_url !== "") {
-        _exportedAnnotations.push(_annotation); /* We add the annotation in the list to export */
-        _export.addList("annotation",_exportedAnnotations); /* We add the list to the source object */ 
-        var _this = this;
-        /* We send the AJAX request to the server ! */
-        IriSP.jQuery.ajax({
-            url: _url,
-            type: this.api_method,
-            contentType: 'application/json',
-            data: _export.serialize(), /* Source is serialized */
-            success: function(_data) {
-                _this.showScreen('Saved'); 
-                if (_this.after_send_timeout) { 
-                    window.setTimeout(
-                        function() {
-                            _this.close_after_send
-                                ? _this.player.trigger("CreateAnnotation.hide")
-                                : _this.player.trigger("CreateAnnotation.show");
-                        },
-                        _this.after_send_timeout
-                    );
-                }
-                _export.getAnnotations().removeElement(_annotation, true); /* We delete the sent annotation to avoid redundancy */
-                _export.deSerialize(_data); /* Data deserialization */
-                _this.source.merge(_export); /* We merge the deserialized data with the current source data */
-                if (_this.pause_on_write && _this.media.getPaused()) {
-                    _this.media.play();
-                }
-                _this.player.trigger("AnnotationsList.refresh"); 
-            },
-            error: function(_xhr, _error, _thrown) {
-                IriSP.log("Error when sending annotation", _thrown);
-                _export.getAnnotations().removeElement(_annotation, true);
-                _this.showScreen('Error');
-                window.setTimeout(function(){
-                    _this.showScreen("Main")
-                },
-                                  (_this.after_send_timeout || 5000));
-            }
-        });
-        this.showScreen('Wait');
-    };
-    return false;
-};
-
--- a/src/ldt/ldt/static/ldt/metadataplayer/CurrentSegmentInfobox.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-.Ldt-CurrentSegmentInfobox{
-	background: url(img/pinstripe.png);
-	width: 535px;
-	max-height: 280px;
-	margin: 0px;
-	margin-top: 4px;
-	border-style: solid;
-	border-width: 1px;
-	border-color: #b7b7b7;
-}
-
-.Ldt-CurrentSegmentInfobox-Element{
-	margin: 5px;
-	vertical-align: top;
-}
-
-.Ldt-CurrentSegmentInfobox-Tags-Ul{
-	list-style: none;
-	margin: 0px;
-}
-
-.Ldt-CurrentSegmentInfobox-Tags{
-	margin: 0px;
-}
-
-.Ldt-CurrentSegmentInfobox-Tags-Li{
-	display: inline-block;
-	background-color: #ffffff;
-	margin: 2px;
-	padding: 2px;
-	border: solid 1px;
-	border-color: #aeaeae;
-}
-
-.Ldt-CurrentSegmentInfobox-Title{
-	color: #0068c4;
-    font-size: 15px;
-    font-weight: bold;
-}
-
-.Ldt-CurrentSegmentInfobox-Description{
-	font-size: 13px;
-	font-weight: bold;
-}
-
-textarea.Ldt-CurrentSegmentInfobox-DescriptionInput.Ldt-CurrentSegmentInfobox-Description{
-	display: inline-block;
-	width: 95%;
-}
-
-.Ldt-CurrentSegmentInfobox-Tags{
-}
-
-.Ldt-CurrentSegmentInfobox-NoSegment{
-	font-size: 15px;
-	font-weight: bold;
-}
-
-.Ldt-CurrentSegmentInfobox-SubmitButton{
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 14px;
-    width: 100px;
-    margin: 2px;
-    margin-top: 5px;
-    padding: 2px;
-    font-size: 11px;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    text-align: center;
-    vertical-align: middle;
-}
-
-.Ldt-CurrentSegmentInfobox-CancelButton{
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 14px;
-    width: 100px;
-    margin: 2px;
-    margin-top: 5px;
-    margin-right: 5px;
-    padding: 2px;
-    font-size: 11px;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    text-align: center;
-    vertical-align: middle;
-}
-
-.Ldt-CurrentSegmentInfobox-CreateTagButton{
-	display: block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 14px;
-    width: 75px;
-    margin: 2px;
-    padding: 2px;
-    font-size: 11px;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    text-align: center;
-    vertical-align: middle;
-}
-
-.Ldt-CurrentSegmentInfobox-Tags-Li-Input{
-	width: 80px;
-}
-
-.Ldt-CurrentSegmentInfobox-EditButton{
-	float: right;
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 18px;
-    width: 95px;
-    font-size: 14px;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    margin-right: 5px;
-    margin-left: 5px;
-    margin-bottom: 5px;
-    margin-top: 5px;
-    padding: 4px;
-    text-align: center;
-	vertical-align: middle;
-	line-height: 18px;
-}
-
-.Ldt-CurrentSegmentInfobox-EditButton:hover, .Ldt-CurrentSegmentInfobox-CreateTagInput-Add:hover{
-	background-color: #e15581;
-	border-color: #222222 #e87d9f #f0adc3 #68273c;
-}
-
-.Ldt-CurrentSegmentInfobox-CreateTagButton:hover, .Ldt-CurrentSegmentInfobox-CancelButton:hover,
-.Ldt-CurrentSegmentInfobox-SubmitButton:hover{
-	background-color: #e15581;
-	border-color: #222222 #e87d9f #f0adc3 #68273c;
-}
-
-.Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton{
-	font-weight: bold;
-	color: #d93c71
-}
-
-.Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton:hover{
-	color: #e16e93
-}
-
-.Ldt-CurrentSegmentInfobox-FieldsHeader{
-	margin: 5px;
-}
-
-.Ldt-CurrentSegmentInfobox-TagsHeader{
-	margin-top: 10px;
-	margin-left: 5px;
-}
-
-.Ldt-CurrentSegmentInfobox-CreateTagInput{
-    border: 2px solid #848484;
-    margin: 5px 2px;
-    padding: 4px;
-}
-
-.Ldt-CurrentSegmentInfobox-CreateTagInput-Add{
-    margin: 5px;
-    padding: 4px;
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 14px;
-    width: 14px;
-    font-size: 14px;
-    font-style: bold;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    padding: 4px;
-    text-align: center;
-	vertical-align: middle;
-	line-height: 14px;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/CurrentSegmentInfobox.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/* Widget displays info on the current segment, with possibility of config for editing description and tags */
-
-IriSP.Widgets.CurrentSegmentInfobox = function(player, config){
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.defaults = {
-    annotation_type: "chap",
-    editable_segments: false,
-    empty_message: false,
-    project_id: false,
-    api_serializer: "ldt_annotate",
-    api_method: "PUT",
-    api_endpoint_template: "",
-    new_tag_button: true,
-    show_headers: false,
-    custom_edit_text: false,
-    empty_description_placeholder: false,
-};
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.template = 
-      '<div class="Ldt-CurrentSegmentInfobox">'
-    +   '<div class="Ldt-CurrentSegmentInfobox-SelectedSegment">'
-    +     '{{#editable_segments}}<div class="Ldt-CurrentSegmentInfobox-EditButton">{{edit}}</div>{{/editable_segments}}'
-    +     '<div class="Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-Title">{{title}}</div>'
-    +     '<div class="Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-Description">{{description}}</div>' 
-    +     '{{^description}}{{^tags.length}}{{#description_placeholder}}<div class="Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-Description-placeholder">{{description_placeholder}}</div>{{/description_placeholder}}{{/tags.length}}{{/description}}' 
-    +     '<div class="Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-Tags">'
-    +         '{{#tags.length}}'
-    +         '<ul class="Ldt-CurrentSegmentInfobox-Tags-Ul">'
-    +         '{{#tags}}'
-    +             '{{#.}}'
-    +             '<li class="Ldt-CurrentSegmentInfobox-Tags-Li">'
-    +                 '<span>{{.}}</span>'
-    +             '</li>'
-    +             '{{/.}}'
-    +         '{{/tags}}'
-    +         '</ul>'
-    +         '{{/tags.length}}'
-    +     '</div>'
-    +   '</div>'
-    + '</div>'
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.editTemplate = 
-      '<div class="Ldt-CurrentSegmentInfobox">'
-    +   '<div class="Ldt-CurrentSegmentInfobox-SelectedSegment">'
-    +     '{{#headers}}<div class="Ldt-CurrentSegmentInfobox-FieldsHeader">{{fields_header}}</div>{{/headers}}'
-    +     '<input type="text" class="Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-TitleInput Ldt-CurrentSegmentInfobox-Title" value="{{title}}"></input>'   
-    +     '<textarea class="Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-DescriptionInput Ldt-CurrentSegmentInfobox-Description">{{description}}</textarea>'
-    +     '<div class="Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-Tags">'
-    +         '{{#headers}}<div class="Ldt-CurrentSegmentInfobox-TagsHeader">{{tags_header}}</div>{{/headers}}'
-    +     '{{#new_tag_button}}'
-    +         '<div class="Ldt-CurrentSegmentInfobox-CreateTagButton">{{new_tag}}</div>'
-    +     '{{/new_tag_button}}'
-    +     '{{^new_tag_button}}'
-    +         '<input class="Ldt-CurrentSegmentInfobox-CreateTagInput" placeholder="{{new_tag}}"></input>'
-    +         '<div class="Ldt-CurrentSegmentInfobox-CreateTagInput-Add">+</div>'
-    +     '{{/new_tag_button}}'
-    +         '<ul class="Ldt-CurrentSegmentInfobox-Tags-Ul">'
-    +         '{{#tags}}'
-    +             '{{#.}}'
-    +             '<li class="Ldt-CurrentSegmentInfobox-Tags-Li">'
-    +                 '<input type="text" class="Ldt-CurrentSegmentInfobox-Tags-Li-Input" value="{{.}}"></input>'
-    +                 '<div class="Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton">{{delete_tag}}</div>'
-    +             '</li>'
-    +             '{{/.}}'
-    +         '{{/tags}}'
-    +         '</ul>'
-    +     '</div>'
-    +     '<div class="Ldt-CurrentSegmentInfobox-SubmitButton">{{submit}}</div>'
-    +     '<div class="Ldt-CurrentSegmentInfobox-CancelButton">{{cancel}}</div>'
-    +   '</div>'
-    + '</div>'
-    
-IriSP.Widgets.CurrentSegmentInfobox.prototype.messages = {
-    fr : {
-        submit : "Soumettre",
-        cancel : "Annuler",
-        edit : "Editer",
-        new_tag : "Nouveau tag",
-        delete_tag : "Supprimer",
-        fields_header : "Commentaire associé à ce segment",
-        tags_header : "Mots-clés associés à ce segment",
-        empty : "Le player vidéo ne lit actuellement aucun segment"
-    },
-    en: {
-        submit : "Submit",
-        cancel : "Cancel",
-        edit : "Edit",
-        new_tag : "New tag",
-        delete_tag : "Delete tag",
-        fields_header : "Current segment content",
-        tags_header : "Current segment tags",
-        empty : "The player currently doesn't read any segment"
-    }
-}    
-    
-IriSP.Widgets.CurrentSegmentInfobox.prototype.draw = function() {
-    var _this = this;
-    this.segments = this.getWidgetAnnotations();
-    this.renderTemplate();
-    this.currentSegment = false;
-    this.clearBox();
-    this.refresh();
-    this.onMediaEvent("timeupdate", "refresh");
-    this.onMediaEvent("settimerange", function(_timeRange){
-        var _segmentBegin = _timeRange[0],
-            _segmentEnd = _timeRange[1],
-            _list = _this.segments.filter(function(_segment){
-                return _segment.begin.milliseconds == _segmentBegin.milliseconds && _segment.end.milliseconds == _segmentEnd.milliseconds
-            });
-        if (_list.length >0){
-            _this.$.toggleClass("editing", false);
-            if (_this.currentSegment.id != _list[0].id){
-                _this.currentSegment = _list[0];
-                _data = {
-                        editable_segments: _this.editable_segments,
-                        edit: _this.custom_edit_text ? _this.custom_edit_text : _this.l10n.edit,
-                        title: _this.currentSegment.title,
-                        description : _this.currentSegment.description,
-                        description_placeholder : _this.empty_description_placeholder,
-                        tags : _this.currentSegment.getTagTexts()
-                }
-                _this.$.html(Mustache.to_html(_this.template, _data))
-                if(_this.editable_segments&&_this.currentSegment){
-                    _this.$.find(".Ldt-CurrentSegmentInfobox").click(_this.functionWrapper("enableEditMode"));            
-                }
-            }
-        }
-    });
-    
-    if(this.editable_segments&&this.currentSegment){
-        this.$.find(".Ldt-CurrentSegmentInfobox").click(_this.functionWrapper("enableEditMode"));        
-    }
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.enableEditMode = function() {
-    var _this = this;
-    if(this.currentSegment){
-        _data = {
-            title: this.currentSegment.title,
-            description : this.currentSegment.description,
-            tags : this.currentSegment.getTagTexts(),
-            submit : this.l10n.submit,
-            cancel : this.l10n.cancel,
-            headers : this.show_headers,
-            tags_header : this.custom_tags_header ? this.custom_tags_header : this.l10n.tags_header,
-            fields_header : this.custom_fields_header ? this.custom_fields_header : this.l10n.fields_header,
-            new_tag : this.l10n.new_tag,
-            delete_tag : this.l10n.delete_tag,
-            new_tag_button : this.new_tag_button,
-        }
-        this.$.toggleClass("editing", true);
-        this.$.html(Mustache.to_html(this.editTemplate, _data));
-        this.$.find(".Ldt-CurrentSegmentInfobox-CancelButton").click(this.functionWrapper("disableEditMode"));
-        if (this.new_tag_button){
-            this.$.find(".Ldt-CurrentSegmentInfobox-CreateTagButton").click(this.functionWrapper("insertTagInput"));            
-        } else {
-            this.$.find(".Ldt-CurrentSegmentInfobox-CreateTagInput").keypress(this.functionWrapper("insertTagInputKeypress"));
-            this.$.find(".Ldt-CurrentSegmentInfobox-CreateTagInput-Add").click(this.functionWrapper("insertTagInputKeypress"));
-        }
-        this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton").click(this.functionWrapper("deleteTagInput"));
-        this.$.find(".Ldt-CurrentSegmentInfobox-SubmitButton").click(this.functionWrapper("onSubmit"))
-    }
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.disableEditMode = function() {
-    if(this.currentSegment){
-        _data = {
-                editable_segments: this.editable_segments,
-                edit: this.custom_edit_text ? this.custom_edit_text : this.l10n.edit,
-                title: this.currentSegment.title,
-                description : this.currentSegment.description,
-                description_placeholder : this.empty_description_placeholder,
-                tags : this.currentSegment.getTagTexts()
-            }
-        this.$.toggleClass("editing", false);
-        this.$.html(Mustache.to_html(this.template, _data));
-        this.$.find(".Ldt-CurrentSegmentInfobox").click(this.functionWrapper("enableEditMode")); 
-    }
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.insertTagInput = function() {
-    if((!this.currentSegment.getTagTexts().length)&&(!this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Ul").length)){
-        this.$.find(".Ldt-CurrentSegmentInfobox-Tags").prepend('<ul class="Ldt-CurrentSegmentInfobox-Tags-Ul"></ul>')
-    }
-    this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Ul").append(
-        '<li class="Ldt-CurrentSegmentInfobox-Tags-Li">'
-        +'<input type="text" class="Ldt-CurrentSegmentInfobox-Tags-Li-Input" value=""></input>'
-        +'<div class="Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton">'+this.l10n.delete_tag+'</div>'
-        +'</li>');
-    this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton").click(this.functionWrapper("deleteTagInput"));
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.insertTagInputKeypress = function(event) {
-    var keycode = (event.keyCode ? event.keyCode : event.which);
-    if(keycode == '13' || event.type == 'click'){
-        if((!this.currentSegment.getTagTexts().length)&&(!this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Ul").length)){
-            this.$.find(".Ldt-CurrentSegmentInfobox-Tags").prepend('<ul class="Ldt-CurrentSegmentInfobox-Tags-Ul"></ul>')
-        }
-        this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Ul").append(
-            '<li class="Ldt-CurrentSegmentInfobox-Tags-Li">'
-            +'<input type="text" class="Ldt-CurrentSegmentInfobox-Tags-Li-Input" value="'+ this.$.find(".Ldt-CurrentSegmentInfobox-CreateTagInput").val() +'"></input>'
-            +'<div class="Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton">'+this.l10n.delete_tag+'</div>'
-            +'</li>');
-        this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Li-DeleteTagButton").click(this.functionWrapper("deleteTagInput"));
-        this.$.find(".Ldt-CurrentSegmentInfobox-CreateTagInput").val("");
-        return false;
-    }
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.deleteTagInput = function(clickEvent) {
-    $(clickEvent.currentTarget).parent().remove();
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.onSubmit = function() {
-    new_tags_titles = this.$.find(".Ldt-CurrentSegmentInfobox-Tags-Li-Input").map(function(){
-        if($(this).val()){
-            return $(this).val()
-        }
-    });
-    new_title = this.$.find(".Ldt-CurrentSegmentInfobox-TitleInput").val()
-    new_description = this.$.find(".Ldt-CurrentSegmentInfobox-DescriptionInput").val()
-    
-    var _this = this,
-        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* We create an Annotations List to send to the server */
-        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* We create a source object using a specific serializer for export */
-        _annotation = new IriSP.Model.Annotation(this.currentSegment.id, _export); /* We create an annotation in the source with a generated ID (param. false) */
-    
-    _annotation.setAnnotationType(this.currentSegment.getAnnotationType().id);
-    _annotation.setMedia(this.currentSegment.getMedia().id);
-    _annotation.setBegin(this.currentSegment.begin);
-    _annotation.setEnd(this.currentSegment.end);
-    _annotation.created = this.currentSegment.created;
-    _annotation.creator = this.currentSegment.creator;
-    _annotation.title = new_title /* Title field */
-    _annotation.description = new_description /* Description field */
-    var _tagIds = IriSP._(new_tags_titles).map(function(_title) {
-        var _tags = _this.source.getTags(true).searchByTitle(_title, true);
-        if (_tags.length) {
-            var _tag = _tags[0];
-        }
-        else {
-            _tag = new IriSP.Model.Tag(_title.replace(/\W/g,'_'), _this.source);
-            _tag.title = _title;
-            _this.source.getTags().push(_tag);
-        }
-        return _tag.id;
-    });
-    _annotation.setTags(_tagIds);
-    _annotation.project_id = this.project_id;
-    
-    _exportedAnnotations.push(_annotation); /* We add the annotation in the list to export */
-    _export.addList("annotation",_exportedAnnotations); /* We add the list to the source object */    
-    
-    _url = Mustache.to_html(this.api_endpoint_template, {annotation_id: this.currentSegment.id});
-    
-    IriSP.jQuery.ajax({
-        url: _url,
-        type: this.api_method,
-        contentType: 'application/json',
-        data: _export.serialize(), /* Source is serialized */
-        success: function(_data) {
-            _export.getAnnotations().removeElement(_annotation, true); /* We delete the sent annotation to avoid redundancy */
-            _export.deSerialize(_data); /* Data deserialization */
-            _this.source.merge(_export); /* We merge the deserialized data with the current source data */
-            _this.segments.forEach(function(_segment){
-                if (_segment.id == _annotation.id){
-                    _this.segments.removeElement(_segment)
-                }
-            })
-            _this.segments.push(_annotation)
-            _this.currentSegment = _annotation
-            _data = {
-                    editable_segments: _this.editable_segments,
-                    edit: _this.custom_edit_text ? _this.custom_edit_text : _this.l10n.edit,
-                    title: _this.currentSegment.title,
-                    description : _this.currentSegment.description,
-                    description_placeholder : _this.empty_description_placeholder,
-                    tags : _this.currentSegment.getTagTexts()
-                }
-            _this.$.html(Mustache.to_html(_this.template, _data))
-            if(_this.editable_segments&&_this.currentSegment){
-                _this.$.find(".Ldt-CurrentSegmentInfobox").click(_this.functionWrapper("enableEditMode"));             
-            }
-            _this.$.toggleClass("editing", false);
-        },
-        error: function(_xhr, _error, _thrown) {
-            IriSP.log("Error when sending annotation", _thrown);
-            _export.getAnnotations().removeElement(_annotation, true);
-        }
-    });
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.refresh = function() {
-    if(!this.media.getTimeRange()){
-        var _currentTime = this.media.getCurrentTime();
-        var _list = this.segments.filter(function(_segment){
-            return (_segment.begin <= _currentTime && _segment.end >= _currentTime);
-        })
-        
-        if (_list.length > 0){
-            if (this.currentSegment.id != _list[0].id){
-                this.currentSegment = _list[0];
-                _data = {
-                    editable_segments: this.editable_segments,
-                    edit: this.custom_edit_text ? this.custom_edit_text : this.l10n.edit,
-                    title: this.currentSegment.title,
-                    description : this.currentSegment.description,
-                    description_placeholder : this.empty_description_placeholder,
-                    tags : this.currentSegment.getTagTexts()
-                }
-                this.$.html(Mustache.to_html(this.template, _data))
-                if(this.editable_segments&&this.currentSegment){
-                    this.$.find(".Ldt-CurrentSegmentInfobox").click(this.functionWrapper("enableEditMode"));             
-                }
-            }
-        }
-        else {
-            this.currentSegment = false;
-            this.clearBox();
-        }
-    }
-}
-
-IriSP.Widgets.CurrentSegmentInfobox.prototype.clearBox = function(){
-    var _empty_message = this.l10n.empty
-    if (this.empty_message) {
-        _empty_message = this.empty_message
-    }
-    this.$.find(".Ldt-CurrentSegmentInfobox").html("<div class='Ldt-CurrentSegmentInfobox-Element Ldt-CurrentSegmentInfobox-NoSegment'>"+_empty_message+"</div>");
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/DailymotionPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-IriSP.Widgets.DailymotionPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.DailymotionPlayer.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.DailymotionPlayer.prototype.defaults = {
-    aspect_ratio: 14/9
-};
-
-IriSP.Widgets.DailymotionPlayer.prototype.draw = function() {
-
-    if (typeof this.video === "undefined") {
-        this.video = this.media.video;
-    }
-
-    this.height = this.height || Math.floor(this.width / this.aspect_ratio);
-
-    var _media = this.media,
-        videoid = null,
-        _this = this,
-        state = {
-            pause: true,
-            apiready: false,
-            volume: 0,
-            time: 0,
-            duration: 0
-        };
-
-    var m = this.video.match(/www.dailymotion.com\/video\/(.+)/);
-    if (m) {
-        videoid = m[1];
-    }
-
-    var player_url = Mustache.to_html('{{ protocol }}//www.dailymotion.com/embed/video/{{ videoid }}', {
-        protocol: document.location.protocol.search('http') == 0 ? document.location.protocol : 'http:',
-        videoid: videoid
-    });
-    var params = {
-        'api': 'postMessage',
-        'chromeless': 1,
-        'id': 'dm_player',
-        'related': 0,
-        'autoplay': 1
-    };
-
-    _this.$.html(Mustache.to_html('<iframe id="{{ id }}" src="{{ player_url }}?{{ params }}" width="{{ width }}" height="{{ height }}" frameborder="0"></iframe>', {
-        player_url: player_url,
-        params: Object.keys(params).reduce(function(a,k){a.push(k+'='+encodeURIComponent(params[k]));return a;},[]).join('&'),
-        width: this.width,
-        height: this.height,
-        id: params.id
-    }));
-
-    function setup_media_methods () {
-        var dest = _this.$.find("#" + params.id)[0].contentWindow;
-        var execute = function(c, v) {
-            if (v !== undefined)
-                c = c + "=" + v;
-            dest.postMessage(c, "*");
-        };
-
-        _media.getCurrentTime = function() {
-            return state.time;
-        };
-        _media.getVolume = function() {
-            return state.volume;
-        };
-        _media.getPaused = function() {
-            return state.pause;
-        };
-        _media.getMuted = function() {
-            return state.muted;
-        };
-        _media.setCurrentTime = function(_milliseconds) {
-            execute("seek", _milliseconds / 1000);
-        };
-        _media.setVolume = function(_vol) {
-            execute("volume", _vol * 100);
-        };
-        _media.mute = function() {
-            execute("muted", 1);
-        };
-        _media.unmute = function() {
-            execute("muted", 0);
-        };
-        _media.play = function() {
-            execute("play");
-        };
-        _media.pause = function() {
-            execute("pause");
-        };
-    };
-
-    window.addEventListener("message", function (event) {
-        // Parse event.data (query-string for to object)
-
-        // Duck-checking if event.data is a string
-        if (event.data.split === undefined)
-            return;
-
-        var info = event.data.split("&").map( function(s) { return s.split("="); }).reduce( function(o, v) { o[v[0]] = decodeURIComponent(v[1]); return o; }, {});
-
-        switch (info.event) {
-        case "apiready":
-            state.apiready = true;
-            setup_media_methods();
-            break;
-        //case "canplay":
-        //    break;
-        case "durationchange":
-            if (info.duration.slice(-2) == "sc") {
-                state.duration = 1000 * Number(info.duration.slice(0, -2));
-                _media.setDuration(state.duration);
-            }
-            break;
-        case "ended":
-            state.pause = true;
-            break;
-        case "loadedmetadata":
-            _media.trigger("loadedmetadata");
-            break;
-        case "pause":
-            state.pause = true;
-            _media.trigger("pause");
-            break;
-        case "play":
-            state.pause = false;
-            _media.trigger("play");
-            break;
-            //case "playing":
-            //    break;
-            //case "progress":
-            //  Loading progress
-            //    break;
-        case "seeked":
-            state.time = new IriSP.Model.Time(1000 * Number(info.time));
-            _media.trigger("seeked");            
-            break;
-        case "timeupdate":
-            state.time = new IriSP.Model.Time(1000 * Number(info.time));
-            _media.trigger("timeupdate", state.time);
-            break;
-        case "volumechange":
-            state.muted = (info.muted == "true");
-            state.volume = Number(info.volume) / 100;
-            break;
-        }
-    }, false);
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/EnrichedPlan.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-.Ldt-EnrichedPlan-Slide {
-    border-bottom: 2px dotted #ccc;
-    padding-top: 4px;
-    cursor: pointer;
-}
-
-.Ldt-EnrichedPlan-SlideItem {
-    max-height: 3000px;
-    transition: max-height .6s;
-}
-
-.Ldt-EnrichedPlan-SlideItem.filtered_out {
-    max-height: 0px;
-    overflow: hidden;
-}
-
-.Ldt-EnrichedPlan-SlideTimecode {
-    display: inline-block;
-    width: 24px;
-    color: #999 !important;
-    font-size: 9px !important;
-    width: 24px;
-    vertical-align: top;
-}
-
-.Ldt-EnrichedPlan-SlideThumbnail {
-    display: inline-block;
-    width: 180px;
-    height: 100px;
-    padding-left: 10px;
-    margin: 0;
-    vertical-align: top;
-}
-
-.Ldt-EnrichedPlan-SlideThumbnail img {
-    max-width: 180px;
-    max-height: 100px;
-    margin: auto;
-    border: 1px solid #ccc;
-}
-
-.Ldt-EnrichedPlan-SlideContent {
-    display: inline-block;
-    width: calc(100% - 220px);
-    transition: width .4s;
-}
-
-.Ldt-EnrichedPlan-SlideThumbnail.filtered_out + .Ldt-EnrichedPlan-SlideContent {
-    width: calc(100% - 40px);
-}
-
-.Ldt-EnrichedPlan-SlideTitle {
-    display: inline-block;
-    font-size: 14px;
-    width: 100%;
-    height: 1em;
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}
-
-.Ldt-EnrichedPlan-SlideTitle1 {
-    text-transform: uppercase;
-    font-size: 13px;
-    font-weight: 600;
-}
-
-.Ldt-EnrichedPlan-Note {
-    font-weight: normal;
-    font-size: 14px;
-    font-family: Roboto-italic;
-}
-.Ldt-EnrichedPlan-Note:hover {
-    background-color: #eee;
-}
-
-.Ldt-EnrichedPlan-Note-Teacher {
-    color: #e5007e;
-    font-style: italic;
-}
-.Ldt-EnrichedPlan-Note-Own {
-    color: #66ccff;
-}
-.Ldt-EnrichedPlan-Note-Other {
-    color: #996633;
-}
-
-.Ldt-EnrichedPlan-Note-Text {
-    line-height: 22px;
-    word-wrap: break-word;
-}
-
-.Ldt-EnrichedPlan-Note-Author {
-    text-transform: uppercase;
-    font-size: 10px;
-}
-
-.Ldt-EnrichedPlan-Content {
-    margin-top: 37px;
-}
-
-.Ldt-EnrichedPlan-Controls {
-    height: 36px;
-    padding: 9px 0px 6px 0px;
-    border-bottom: 1px solid #000;
-    overflow-y: hidden;
-    overflow-x: hidden;
-    position: absolute;
-    top: 0px;
-    left: 0px;
-    right: 0px;
-    z-index: 1;
-    background-color: #fff;
-}
-
-.Ldt-EnrichedPlan-Control-Label {
-    display: inline-block;
-    text-transform: uppercase;
-    line-height: 10px;
-    font-family: Roboto;
-    font-size: 10px;
-    font-weight: 100;
-    width: 80px;
-    position: relative;
-}
-.Ldt-EnrichedPlan-Controls .Ldt-EnrichedPlan-Search-Input {
-    float: right;
-    font-family: Roboto;
-    font-size: 16px;
-    width: calc(100% - 340px);
-}
-
-.Ldt-EnrichedPlan-Note.non_matching {
-    display: none;
-}
-
-.Ldt-EnrichedPlan-Control- {
-    font-style: normal;
-}
-    /**********************************************************/
-/* Base for label styling */
-.Ldt-EnrichedPlan-Control-Checkbox:not(:checked),
-.Ldt-EnrichedPlan-Control-Checkbox:checked {
-  position: absolute;
-  left: -9999px;
-}
-.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label,
-.Ldt-EnrichedPlan-Control-Checkbox:checked + label {
-  position: relative;
-  padding-left: 20px;
-  cursor: pointer;
-}
-
-/* checkbox aspect */
-.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label:before,
-.Ldt-EnrichedPlan-Control-Checkbox:checked + label:before {
-  content: '';
-  position: absolute;
-  left:0; top: 2px;
-  width: 13px; height: 13px;
-  border: 1px solid #aaa;
-}
-/* checked mark aspect */
-.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label:after,
-.Ldt-EnrichedPlan-Control-Checkbox:checked + label:after {
-    content: '\2a2f';
-    font-style: normal;
-    position: absolute;
-    top: 3px; left: -1px;
-    font-size: 20px;
-    transition: all .2s;
-}
-/* checked mark aspect changes */
-.Ldt-EnrichedPlan-Control-Checkbox:not(:checked) + label:after {
-  opacity: 0;
-}
-.Ldt-EnrichedPlan-Control-Checkbox:checked + label:after {
-  opacity: 1;
-}
-/* disabled checkbox */
-.Ldt-EnrichedPlan-Control-Checkbox:disabled:not(:checked) + label:before,
-.Ldt-EnrichedPlan-Control-Checkbox:disabled:checked + label:before {
-  box-shadow: none;
-  border-color: #bbb;
-  background-color: #ddd;
-}
-.Ldt-EnrichedPlan-Control-Checkbox:disabled:checked + label:after {
-  color: #999;
-}
-.Ldt-EnrichedPlan-Control-Checkbox:disabled + label {
-  color: #aaa;
-}
-/* accessibility */
-.Ldt-EnrichedPlan-Control-Checkbox:checked:focus + label:before,
-.Ldt-EnrichedPlan-Control-Checkbox:not(:checked):focus + label:before {
-  border: 1px dotted blue;
-}
-
-/* hover style just for information */
-label:hover:before {
-  border: 1px solid #4778d9!important;
-}
-
-/* hover style just for information */
-label:hover:before {
-    background-color: #ededed;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/EnrichedPlan.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/* TODO
-- add callbacks
- */
-
-IriSP.Widgets.EnrichedPlan = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-}
-
-IriSP.Widgets.EnrichedPlan.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.EnrichedPlan.prototype.defaults = {
-    // Main type for slide segmentation
-    annotation_type: "Slides",
-    // If no annotation type list is specified, use all other types
-    annotation_types: [],
-    show_controls: true,
-    show_slides: true,
-    show_teacher_notes: true,
-    show_other_notes: true,
-    show_own_notes: true
-}
-
-IriSP.Widgets.EnrichedPlan.prototype.template =
-      '<div class="Ldt-EnrichedPlan-Container">'
-    + '{{#show_controls}}<form class="Ldt-EnrichedPlan-Controls">'
-    + ' <input id="{{prefix}}teacher_note_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Note-Teacher" {{#show_teacher_notes}}checked{{/show_teacher_notes}} type="checkbox">'
-    + ' <label for="{{prefix}}teacher_note_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Note-Teacher">Notes Enseignant</label>'
-    + ' <input id="{{prefix}}other_note_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Note-Other" {{#show_other_notes}}checked{{/show_other_notes}} type="checkbox">'
-    + ' <label for="{{prefix}}other_note_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Note-Other">Notes Autres</label>'
-    + ' <input id="{{prefix}}simplified_plan_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Note-Own" {{#show_own_notes}}checked{{/show_own_notes}} type="checkbox">'
-    + ' <label for="{{prefix}}simplified_plan_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Note-Own">Notes perso.</label>'
-    + ' <input id="{{prefix}}slide_display_checkbox" class="Ldt-EnrichedPlan-Control-Checkbox Ldt-EnrichedPlan-Slide-Display" {{#show_slides}}checked{{/show_slides}} type="checkbox">'
-    + ' <label for="{{prefix}}slide_display_checkbox" class="Ldt-EnrichedPlan-Control-Label Ldt-EnrichedPlan-Slide-Display">Diapo<br/>&nbsp;</label>'
-    + ' <input class="Ldt-EnrichedPlan-Search-Input" type="search" incremental placeholder="Recherchez"/>'
-    + '</form>{{/show_controls}}'
-    + '<div class="Ldt-EnrichedPlan-Content"></div>'
-    + '</div>';
-
-IriSP.Widgets.EnrichedPlan.prototype.slideTemplate =
-      '<div data-id="{{ id }}" class="Ldt-EnrichedPlan-Slide">'
-    + '  <div class="Ldt-EnrichedPlan-SlideItem Ldt-EnrichedPlan-SlideTimecode">{{ begin }}</div>'
-    + '  <div data-timecode="{{begintc}}" class="Ldt-EnrichedPlan-SlideItem {{^show_slides}}filtered_out{{/show_slides}} Ldt-EnrichedPlan-SlideThumbnail Ldt-EnrichedPlan-Slide-Display"><img title="{{ begin }} - {{ atitle }}" src="{{ thumbnail }}"></div>'
-    + '  <div class="Ldt-EnrichedPlan-SlideContent">'
-    + '     <div data-timecode="{{begintc}}" class="Ldt-EnrichedPlan-SlideTitle Ldt-EnrichedPlan-SlideTitle{{ level }}">{{ atitle }}</div>'
-    + '     <div class="Ldt-EnrichedPlan-SlideNotes">{{{ notes }}}</div>'
-    + '  </div>'
-    + '</div>';
-
-IriSP.Widgets.EnrichedPlan.prototype.annotationTemplate = '<div title="{{ begin }} - {{ atitle }}" data-id="{{ id }}" data-timecode="{{begintc}}" class="Ldt-EnrichedPlan-SlideItem Ldt-EnrichedPlan-Note {{category}} {{filtered}}"><span class="Ldt-EnrichedPlan-Note-Text">{{{ text }}}</span> <span class="Ldt-EnrichedPlan-Note-Author">{{ author }}</span></div>';
-
-IriSP.Widgets.EnrichedPlan.prototype.draw = function() {
-    var _this = this;
-    // Generate a unique prefix, so that ids of input fields
-    // (necessary for label association) are unique too.
-    _this.prefix = "TODO";
-    // slides content: title, level (for toc)
-    var _slides = this.getWidgetAnnotations().sortBy(function(_annotation) {
-        return _annotation.begin;
-    });
-    // All other annotations
-    var _annotations = this.media.getAnnotations().filter( function (a) {
-        return a.getAnnotationType().title != _this.annotation_type;
-    }).sortBy(function(_annotation) {
-        return _annotation.begin;
-    });
-
-    // Reference annotations in each slide: assume that end time is
-    // correctly set.
-    _slides.forEach( function (slide) {
-        slide.annotations = _annotations.filter( function (a) {
-            return a.begin >= slide.begin && a.begin <= slide.end;
-        });
-    });
-
-    _this.renderTemplate();
-    var container = _this.$.find('.Ldt-EnrichedPlan-Container');
-    var content = _this.$.find('.Ldt-EnrichedPlan-Content');
-
-    // Returns the note category: Own, Other, Teacher
-    function note_category(a) {
-        return a.title.indexOf('Anonyme') < 0 ? "Own" : "Other";
-    };
-
-    _slides.forEach(function(slide) {
-        var _html = Mustache.to_html(_this.slideTemplate, {
-            id : slide.id,
-            atitle : IriSP.textFieldHtml(slide.title),
-            level: slide.content.level || 1,
-            begin : slide.begin.toString(),
-            begintc: slide.begin.milliseconds,
-            thumbnail: slide.thumbnail,
-            show_slides: _this.show_slides,
-            notes: slide.annotations.map( function (a) {
-                return Mustache.to_html(_this.annotationTemplate, {
-                    id: a.id,
-                    text: IriSP.textFieldHtml(a.description || a.title),
-                    author: a.creator,
-                    begin: a.begin.toString(),
-                    begintc: a.begin.milliseconds,
-                    atitle: a.title.slice(0, 20),
-                    // FIXME: Temporary hack waiting for a proper metadata definition
-                    category: "Ldt-EnrichedPlan-Note-" + note_category(a),
-                    filtered: ( (note_category(a) == 'Own' && ! _this.show_own_notes)
-                                || (note_category(a) == 'Other' && ! _this.show_other_notes)
-                                || (note_category(a) == 'Teacher' && ! _this.show_teacher_notes) ) ? 'filtered_out' : ''
-                });
-            }).join("\n")
-        });
-        var _el = IriSP.jQuery(_html);
-        content.append(_el);
-    });
-
-    container.on("click", "[data-timecode]", function () {
-        _this.media.setCurrentTime(Number(this.dataset.timecode));
-    });
-
-    container.on("click", ".Ldt-EnrichedPlan-Control-Checkbox", function () {
-        var classname = _.first(_.filter(this.classList, function (s) { return s != "Ldt-EnrichedPlan-Control-Checkbox"; }));
-        if (classname !== undefined) {
-            if ($(this).is(':checked')) {
-                content.find(".Ldt-EnrichedPlan-Slide ." + classname).removeClass("filtered_out");
-            } else {
-                content.find(".Ldt-EnrichedPlan-Slide ." + classname).addClass("filtered_out");
-             }
-        }
-
-    });
-
-    container.find(".Ldt-EnrichedPlan-Search-Input").on("search", function () {
-        var q = $(this).val().toLocaleLowerCase();
-        if (q === "") {
-            // Show all
-            content.find(".Ldt-EnrichedPlan-Note").removeClass("non_matching");
-        } else {
-            $(".Ldt-EnrichedPlan-Note").each( function () {
-                var node = $(this);
-                if (node.text().toLocaleLowerCase().indexOf(q) > -1) {
-                    node.removeClass("non_matching");
-                } else {
-                    node.addClass("non_matching");
-                }
-            });
-        }
-    });
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/HelloWorld.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-.Ldt-HelloWorld p {
-    text-align: center; font-size: 12px; margin: 2px 0;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/HelloWorld.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/* Shows an example of a widget, with :
- * - Use of source data
- * - Use of templating
- * - Use of internationalization
- */
-
-IriSP.Widgets.HelloWorld = function(player, config) {
-    console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget");
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.HelloWorld.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.HelloWorld.prototype.defaults = {
-    text: "world"
-};
-
-IriSP.Widgets.HelloWorld.prototype.template =
-    '<div class="Ldt-HelloWorld"><p>{{l10n.Hello}} {{text}}</p><p>Looks like we have {{source.contents.annotation.length}} annotations in this feed</p></div>';
-
-IriSP.Widgets.HelloWorld.prototype.messages = {
-    "fr": {
-        "Hello" : "Bonjour,"
-    },
-    "en" : {
-        "Hello" : "Hello,"
-    }
-};
-
-IriSP.Widgets.HelloWorld.prototype.draw = function() {
-    this.renderTemplate();
-    console.log("HelloWorldWidget was drawn");
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Highlighter.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-.currentAnnotation  {
-    border: solid 3px red;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/Highlighter.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-IriSP.Widgets.Highlighter = function(player, config) {
-    var _this = this;
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.throttledRefresh = IriSP._.throttle(function() {
-        console.log("highlighter Refresh");
-        _this.update();
-    }, 800);
-};
-
-/**
- * Highlighter widget
- * This widgets highlights the current annotations by setting the
- * .activeAnnotation class on appropriate .Ldt-Highlighter-Annotation
- * elements. These elements *must* have data-begin and data-end properties specifying their bounds (in ms) (and data-media specifying the media-id)
- */
-IriSP.Widgets.Highlighter.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Highlighter.prototype.defaults =  {
-}
-
-IriSP.Widgets.Highlighter.prototype.update = function() {
-    var  _this = this;
-    var _currentTime = _this.media.getCurrentTime();
-    _this.$.find(".Ldt-Highlighter-Annotation", document).toggleClass("currentAnnotation", function () {
-        return (this.dataset.media === _this.media.id && this.dataset.begin <= _currentTime && _currentTime < this.dataset.end);
-    });
-    console.log(_this.$.find(".currentAnnotation"));
-    return false;
-};
-
-IriSP.Widgets.Highlighter.prototype.draw = function() {
-    var  _this = this;
-    
-    var _events = [
-        "timeupdate",
-        "seeked",
-        "loadedmetadata"
-    ];
-    for (var _i = 0; _i < _events.length; _i++) {
-        _this.onMediaEvent(_events[_i], _this.throttledRefresh);
-    }
-    _this.throttledRefresh();
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/HtmlMashupPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,345 +0,0 @@
-IriSP.Widgets.HtmlMashupPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.HtmlMashupPlayer.prototype = new IriSP.Widgets.Widget();
-
-
-IriSP.Widgets.HtmlMashupPlayer.prototype.defaults = {
-    aspect_ratio: 14/9,
-    background: "#333333"
-};
-
-IriSP.Widgets.HtmlMashupPlayer.prototype.draw = function() {
-    
-    if (!this.height && this.aspect_ratio) {
-        this.height = this.width / this.aspect_ratio;
-        this.$.css("height", this.height);
-    }
-    
-    if (this.background) {
-        this.$.css("background", this.background);
-    }
-    
-    var mashup = this.media,
-        sel = this.$,
-        width = this.width,
-        height = this.height,
-        url_transform = this.url_transform;
-    
-    mashup.currentMedia = null;
-    mashup.currentAnnotation = null;
-    mashup.seeking = false;
-    var mashupSegmentBegin,
-        mashupSegmentEnd,
-        mashupTimecode = 0,
- //       seekdiv = $(".video-wait"),
-        mashupTimedelta;
-        
-/*    
-    function showSeek() {
-        if (currentMedia.seeking) {
-            seekdiv.show();
-        }
-    }
-*/
-
-    function changeCurrentAnnotation() {
-        if (mashupTimecode >= mashup.duration) {
-            if (!mashup.paused) {
-                mashup.paused = true;
-                mashup.trigger("pause");
-            }
-            mashupTimecode = 0;
-        }
-        var _annotation = mashup.getAnnotationAtTime( mashupTimecode );
-        if (typeof _annotation === "undefined") {
-            if (mashup.currentMedia) {
-                mashup.currentMedia.pause();
-                if (!mashup.paused) {
-                    mashup.paused = true;
-                    mashup.trigger("pause");
-                }
-            }
-            return;
-        }
-        mashup.currentAnnotation = _annotation;
-        mashupSegmentBegin = mashup.currentAnnotation.annotation.begin.milliseconds;
-        mashupSegmentEnd = mashup.currentAnnotation.annotation.end.milliseconds;
-        mashupTimedelta = mashupSegmentBegin - mashup.currentAnnotation.begin.milliseconds;
-        mashup.currentMedia = mashup.currentAnnotation.getMedia();
-        mashup.getMedias().forEach(function(_media) {
-            if (_media !== mashup.currentMedia) {
-                _media.hide();
-                _media.pause();
-            } else {
-                _media.show();
-            }
-        });
-        
-        mashup.currentMedia.setCurrentTime( mashupTimecode + mashupTimedelta);
-        mashup.currentMedia.seeking = true;
-        
-        if (!mashup.paused) {
-            mashup.currentMedia.play();
-            mashup.seeking = true;
-//            setTimeout(showSeek,200);
-        }
-        mashup.trigger("timeupdate", new IriSP.Model.Time(mashupTimecode));
-
-    }
-    
-    mashup.getMedias().forEach(addMedia);
-    changeCurrentAnnotation();
-    mashup.trigger("loadedmetadata");
-    
-    function addMedia(media) {
-        if (media.has_player) {
-            return;
-        }
-        media.has_player = true;
-        var videourl = media.video;
-        if (typeof url_transform === "function") {
-            videourl = url_transform(media.video);
-        }
-        var videoid = "video_" + media.id,
-            videoElement;
-        
-        media.show = function() {
-            
-            if (document.getElementById(videoid)) {
-                return;
-            }
-            
-            media.loaded = false;
-            media.paused = true;
-            var videoSelector = $('<video>');
-            
-            videoSelector.attr({
-                id : videoid,
-                width : width,
-                height : height
-            }).css({
-                width: width,
-                height: height
-            });
-            
-            if (typeof videourl === "string") {
-                videoSelector.attr( "src", videourl );
-            } else {
-                for (var i = 0; i < videourl.length; i++) {
-                    var _srcNode = IriSP.jQuery('<source>');
-                    _srcNode.attr({
-                        src: videourl[i].src,
-                        type: videourl[i].type
-                    });
-                    videoSelector.append(_srcNode);
-                }
-            }
-            
-            sel.append(videoSelector);
-            
-            videoElement = videoSelector[0];
-            
-            // Binding DOM events to media
-            
-            function getVolume() {
-                media.muted = videoElement.muted;
-                media.volume = videoElement.volume;
-            }
-            
-            videoSelector.on("loadedmetadata", function() {
-                getVolume();
-                media.loaded = true;
-                media.trigger("loadedmetadata");
-                media.trigger("volumechange");
-            });
-            
-            videoSelector.on("timeupdate", function() {
-                media.trigger("timeupdate", new IriSP.Model.Time(1000*videoElement.currentTime));
-            });
-            
-            videoSelector.on("volumechange", function() {
-                getVolume();
-                media.trigger("volumechange");
-            });
-            
-            videoSelector.on("play", function() {
-                media.trigger("play");
-            });
-            
-            videoSelector.on("pause", function() {
-                media.trigger("pause");
-            });
-            
-            videoSelector.on("seeking", function() {
-                media.trigger("seeking");
-            });
-            
-            videoSelector.on("seeked", function() {
-                media.trigger("seeked");
-            });
-        };
-        
-        media.hide = function() {
-            videoElement = undefined;
-            sel.find("#" + videoid).remove();
-        };
-        
-        // Binding functions to Media Element Functions
-        
-        var deferredTime = undefined,
-            deferredPlayPause = undefined;
-        
-        media.on("setcurrenttime", function(_milliseconds) {
-            if (videoElement && videoElement.readyState >= videoElement.HAVE_METADATA) {
-                try {
-                    videoElement.currentTime = (_milliseconds / 1000);
-                    deferredTime = undefined;
-                } catch(err) {
-                    deferredTime = _milliseconds;
-                }
-            } else {
-                deferredTime = _milliseconds;
-            }
-        });
-        
-        media.on("setvolume", function(_vol) {
-            if (videoElement && videoElement.readyState >= videoElement.HAVE_METADATA) {
-                media.volume = _vol;
-                videoElement.volume = _vol;
-            }
-        });
-        
-        media.on("setmuted", function(_muted) {
-            if (videoElement && videoElement.readyState >= videoElement.HAVE_METADATA) {
-                media.muted = _muted;
-                videoElement.muted = _muted;
-            }
-        });
-        
-        media.on("setplay", function() {
-            if (videoElement && videoElement.readyState >= videoElement.HAVE_METADATA) {
-                try {
-                    videoElement.play();
-                    deferredPlayPause = undefined;
-                } catch(err) {
-                    deferredPlayPause = true;
-                }
-            } else {
-                deferredPlayPause = true;
-            }
-        });
-
-        media.on("setpause", function() {
-            if (videoElement && videoElement.readyState >= videoElement.HAVE_METADATA) {
-                try {
-                    videoElement.pause();
-                    deferredPlayPause = undefined;
-                } catch(err) {
-                    deferredPlayPause = false;
-                }
-            } else {
-                deferredPlayPause = false;
-            }
-        });
-        
-        media.on("loadedmetadata", function() {
-            if (typeof deferredTime !== "undefined") {
-                media.setCurrentTime(deferredTime);
-            }
-            if (typeof deferredPlayPause !== "undefined") {
-                if (deferredPlayPause) {
-                    media.play();
-                } else {
-                    media.pause();
-                }
-            }
-        });
-        
-        // Binding UI Events and Mashup Playing to Media
-        
-        media.on("play", function() {
-            if (media === mashup.currentMedia) {
-                mashup.trigger("play");
-            }
-        });
-        
-        media.on("pause", function() {
-            if (media === mashup.currentMedia) {
-                mashup.trigger("pause");
-            }
-        });
-        
-        media.on("timeupdate", function(_time) {
-            if (!mashup.paused && media === mashup.currentMedia && !media.seeking) {
-                if ( _time < mashupSegmentEnd ) {
-                    if ( _time >= mashupSegmentBegin ) {
-                        mashupTimecode = _time - mashupTimedelta;
-                    } else {
-                        mashupTimecode = mashupSegmentBegin - mashupTimedelta;
-                        media.setCurrentTime(mashupSegmentBegin);
-                    }
-                } else {
-                    mashupTimecode = mashupSegmentEnd - mashupTimedelta;
-                    media.pause();
-                    changeCurrentAnnotation();
-                }
-                mashup.trigger("timeupdate", new IriSP.Model.Time(mashupTimecode));
-            }
-        });
-        
-        media.on("seeked", function() {
-            media.seeking = false;
-            if (media === mashup.currentMedia && mashup.seeking) {
-                mashup.seeking = false;
-            }
-//            seekdiv.hide();
-        });
-        
-        media.on("volumechange", function() {
-            mashup.muted = media.muted;
-            mashup.volume = media.volume;
-            mashup.trigger("volumechange");
-        });
-        
-    }
-
-    // Mashup Events
-    
-    mashup.on("setcurrenttime", function(_milliseconds) {
-        mashupTimecode = _milliseconds;
-        changeCurrentAnnotation();
-    });
-    
-    mashup.on("setvolume", function(_vol) {
-        mashup.getMedias().forEach(function(_media) {
-            _media.setVolume(_vol);
-        });
-        mashup.volume = _vol;
-    });
-    
-    mashup.on("setmuted", function(_muted) {
-        mashup.getMedias().forEach(function(_media) {
-            _media.setMuted(_muted);
-        });
-        mashup.muted = _muted;
-    });
-    
-    mashup.on("setplay", function() {
-        mashup.paused = false;
-        changeCurrentAnnotation();
-    });
-    
-    mashup.on("setpause", function() {
-        mashup.paused = true;
-        if (mashup.currentMedia) {
-            mashup.currentMedia.pause();
-        }
-    });
-    
-    mashup.on("loadedmetadata", function() {
-        changeCurrentAnnotation();
-    });
-    
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/HtmlPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-IriSP.Widgets.HtmlPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.HtmlPlayer.prototype = new IriSP.Widgets.Widget();
-
-
-IriSP.Widgets.HtmlPlayer.prototype.defaults = {
-};
-
-IriSP.Widgets.HtmlPlayer.prototype.draw = function() {
-
-    IriSP.htmlPlayer(this.media, this.$, this);
-    
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/ImageDisplay.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-.Ldt-ImageDisplay-Container {
-    width: 100%;
-    height: 100%;
-    background-color: white;
-    background-repeat: no-repeat;
-    background-position: center;
-    background-size: contain;
-}
-
-.Ldt-ImageDisplay-Image {
-    max-width: 100%;
-    max-height: 100%;
-}
-
-.Ldt-ImageDisplay-Overlay {
-    width: 30%;
-    min-width: 20px;
-    height: 100%;
-    opacity: 0.1;
-    position: absolute;
-    top: 0px;
-    bottom: 0px;
-}
-
-.Ldt-ImageDisplay-Overlay:hover {
-}
-
-.Ldt-ImageDisplay-Overlay-Left {
-    left: 0px;
-    cursor: url(img/left_arrow.svg) 20 20, pointer;
-}
-
-.Ldt-ImageDisplay-Overlay-Right {
-    right: 0px;
-    cursor: url(img/right_arrow.svg) 20 20, pointer;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/ImageDisplay.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/* This widget displays the image associated to the annotation in the given container */
-
-IriSP.Widgets.ImageDisplay = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-}
-
-IriSP.Widgets.ImageDisplay.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.ImageDisplay.prototype.defaults = {
-    annotation_type: "Slides"
-    // container: "imageContainer"
-}
-
-IriSP.Widgets.ImageDisplay.prototype.template = '<div class="Ldt-ImageDisplay-Container"><div class="Ldt-ImageDisplay-Overlay Ldt-ImageDisplay-Overlay-Left"></div><div class="Ldt-ImageDisplay-Overlay Ldt-ImageDisplay-Overlay-Right"></div></div>';
-
-IriSP.Widgets.ImageDisplay.prototype.annotationTemplate = '';
-
-IriSP.Widgets.ImageDisplay.prototype.update = function(annotation) {
-    // Update the widget with data corresponding to the annotation
-    this.image.css("background-image", "url(" + annotation.thumbnail + ")");
-    this.image.attr("title", IriSP.textFieldHtml(annotation.title) + " - " + annotation.begin.toString());
-};
-
-IriSP.Widgets.ImageDisplay.prototype.draw = function() {
-    var _annotations = this.getWidgetAnnotations().sortBy(function(_annotation) {
-        return _annotation.begin;
-    });
-    var _this = this;
-    _this.renderTemplate();
-    _this.image = _this.$.find(".Ldt-ImageDisplay-Container");
-
-    _this.$.find(".Ldt-ImageDisplay-Overlay-Left").on("click", function () { _this.navigate(-1); });
-    _this.$.find(".Ldt-ImageDisplay-Overlay-Right").on("click", function () { _this.navigate(+1); });
-
-    _annotations.forEach(function(_a) {
-        _a.on("enter", function() {
-            _this.update(_a);
-        });
-    });
-    if (_annotations.length)
-        _this.update(_annotations[0]);
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/JwpPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-IriSP.Widgets.JwpPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.JwpPlayer.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.JwpPlayer.prototype.defaults = {
-};
-
-IriSP.Widgets.JwpPlayer.prototype.draw = function() {
-    
-    var _opts = {},
-        _player = jwplayer(this.$[0]),
-        _seekPause = false,
-        _pauseState = true;
-    
-    if (typeof this.video === "undefined") {
-        this.video = this.media.video;
-    }
-        
-    _opts.file = this.video;
-    _opts.flashplayer = IriSP.getLib("jwPlayerSWF");
-    _opts.primary = "flash";
-    _opts.fallback = false;
-    _opts.controls = false;
-    _opts.width = this.width;
-    if (this.height) {
-        _opts.height = this.height;
-    }
-    
-    if (this.autostart) { // There seems to be an autostart bug
-        //_opts.autostart = true;
-        //_pauseState = false;
-        //this.media.trigger("play");
-    }
-    
-    if (this.url_transform) {
-        _opts.file = this.url_transform(_opts.file);
-    }
-
-    // Binding functions to jwplayer
-
-    var _media = this.media;
-    
-    _media.on("setcurrenttime", function(_milliseconds) {
-        _seekPause = _pauseState;
-        _player.seek(_milliseconds / 1000);
-    });
-    
-    _media.on("setvolume", function(_vol) {
-        _player.setVolume(Math.floor(_vol*100));
-        _media.volume = _vol;
-    });
-    
-    _media.on("setmuted", function(_muted) {
-        _player.setMute(_muted);
-        _media.muted = _muted;
-    });
-    
-    _media.on("setplay", function() {
-        _player.play(true);
-        _media.paused = false;
-    });
-    
-    _media.on("setpause", function() {
-        _player.pause(true);
-        _media.paused = true;
-    });
-    
-    // Binding jwplater events to media
-    
-    function getVolume() {
-        _media.muted = _player.getMute();
-        _media.volume = _player.getVolume() / 100;
-    }
-    
-    _opts.events = {
-        onReady: function() {
-            getVolume();
-            _media.currentTime = new IriSP.Model.Time(1000*_player.getPosition() || 0);
-            _media.trigger("loadedmetadata");
-        },
-        onTime: function(_progress) {
-            if (_seekPause) {
-                _player.pause(true);
-                _seekPause = false;
-            } else {
-                if (_pauseState && _player.getState() === "PLAYING") {
-                    _pauseState = false;
-                    _media.trigger("play");
-                }
-            }
-            _media.trigger("timeupdate", new IriSP.Model.Time(_progress.position * 1000));
-        },
-        onPlay: function() {
-            if (!_seekPause) {
-                _pauseState = false;
-                _media.trigger("play");
-            }
-        },
-        onPause: function() {
-            _pauseState = true;
-            _media.trigger("pause");
-        },
-        onSeek: function() {
-            _media.trigger("seeked");
-        },
-        onMute: function(_event) {
-            _media.muted = _event.mute;
-            _media.trigger("volumechange");
-        },
-        onVolume: function(_event) {
-            _media.volume = _event.volume / 100;
-            _media.trigger("volumechange");
-        }
-    };
-    
-    _player = _player.setup(_opts);
-    
-    this.jwplayer = _player;
-    
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/KnowledgeConcierge.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-.Ldt-Kc-Slider {
-    width: 100%; height: 8px; margin: 3px 0; font-size: 8px;
-}
-
-.Ldt-Kc-Canvas {
-    border: 1px solid #999999;
-}
-
-.Ldt-Kc-Related {
-    display: none;
-}
-
-.Ldt-Kc-Related-Empty {
-    text-align: center; font-weight: bold; font-style: italic;
-    font-size: 14px; color: #999999; margin: 5px 0;
-}
-
-.Ldt-Kc-Related h2 {
-    border: none;
-    color: #330099;
-    font-size: 18px;
-    margin: 8px 0 2px;
-    padding: 0 5px;
-}
-
-h3.Ldt-Kc-For-Keywords {
-    border-bottom: 1px solid #666666;
-    color: #000000;
-    font-size: 12px;
-    margin: 2px 0 5px;
-    padding: 0 5px 5px;
-    text-align: right;
-}
-
-.Ldt-Kc-Keywords {
-    color: #d000c0; font-weight: bold;
-}
-
-.Ldt-Kc-Related-Item {
-    width: 235px; float: left; margin: 4px 0; padding: 4px 0;
-}
-
-.Ldt-Kc-Related-Item:hover {
-    background: #e8e8e8;
-}
-
-.Ldt-Kc-Related-Item:nth-child(even) {
-    margin-left: 10px;
-}
-
-.Ldt-Kc-Related-Item a {
-    text-decoration: none;
-}
-
-.Ldt-Kc-Related-Item img {
-    max-width: 80px; max-height: 60px; float: left;
-}
-
-.Ldt-Kc-Related-Item h3, .Ldt-Kc-Related-Item p {
-    margin: 0 0 5px 85px;
-}
-
-.Ldt-Kc-Related-Item h3 {
-    font-size: 14px; font-weight: 600;
-}
-
-.Ldt-Kc-Related-Item h3 a {
-     color: #330099;
-}
-
-.Ldt-Kc-Related-Item h3 a:hover {
-    text-decoration: underline;
-}
-
-.Ldt-Kc-Related-Item p {
-    font-size: 12px;
-}
-
-.Ldt-Kc-Item-Duration {
-    color: #c00000;
-}
-
-.Ldt-Kc-Row {
-    border-bottom: 1px solid #CCCCCC;
-    clear: both; float: left; width: 100%;
-}
-
-.Ldt-Kc-Clearer {
-    clear: both;
-}
-
-.Ldt-Kc-Waiting {
-    display: none;
-    height: 128px;
-    width: 100%;
-    background:url(img/loader.gif) center no-repeat;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/KnowledgeConcierge.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-IriSP.Widgets.KnowledgeConcierge = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.KnowledgeConcierge.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.KnowledgeConcierge.prototype.defaults = {
-    width: 600,
-    height: 500,
-    sketch_path: "tmgraph",
-    sketch_files: [ "tmgraph.pde", "physics.pde", "model.pde", "javascript.pde", "menu.pde", "event.pde", "constants.pde", "initialdata.pde"],
-    kc_api_root: "/kn-concierge/",
-    related_api_endpoint: "",
-    use_word_boundaries: false,
-    related_data_type: 'json', // SET TO "jsonp" FOR CROSS-DOMAIN OPERATION
-    related_count: 8,
-};
-
-IriSP.Widgets.KnowledgeConcierge.prototype.messages = {
-    "fr": {
-        related_videos: "Vidéos liées",
-        duration_: "Durée\u00a0:",
-        for_keywords_: "pour le(s) mots-clé(s)\u00a0:",
-        no_matching_videos: "Pas de vidéos correspondantes"
-    },
-    "en": {
-        related_videos: "Related Videos",
-        duration_: "Duration:",
-        for_keywords_: "for keyword(s):",
-        no_matching_videos: "No matching videos"
-    }
-};
-
-IriSP.Widgets.KnowledgeConcierge.prototype.template =
-    '<div class="Ldt-Kc-Slider"></div><canvas class="Ldt-Kc-Canvas" />'
-    + '<div class="Ldt-Kc-Related"><h2>{{ l10n.related_videos }}</h2>'
-    + '<h3 class="Ldt-Kc-For-Keywords">{{l10n.for_keywords_}} <span class="Ldt-Kc-Keywords"></span></h3>'
-    + '<div class="Ldt-Kc-Waiting"></div>'
-    + '<div class="Ldt-Kc-Related-List"></div></div>';
-
-IriSP.Widgets.KnowledgeConcierge.prototype.draw = function() {
-    this.renderTemplate();
-    var _canvasHeight = this.height - 16,
-        _canvasWidth = this.width - 2,
-        _canvas = this.$.find(".Ldt-Kc-Canvas"),
-        _tmpId = IriSP._.uniqueId("Processing-"),
-        _slider = this.$.find(".Ldt-Kc-Slider"),
-        radius = .375 * Math.min(_canvasHeight, _canvasWidth);
-    _canvas.attr({
-        width: _canvasWidth,
-        height: _canvasHeight,
-        id: _tmpId
-    }).css({
-        width: _canvasWidth,
-        height: _canvasHeight
-    });
-    var _this = this,
-        _pjsfiles = IriSP._(this.sketch_files).map(function(_f) { return _this.sketch_path + "/" + _f; }),
-        _selectedText = "",
-        currentNodesList = "",
-        relatedCache = {},
-        relatedRequests = {},
-        relatedTemplate = '<div class="Ldt-Kc-Related-Item"><a href="{{ widget.video_url_base }}{{ media.iri_id }}#keyword={{ escaped_keyword }}"><img src="{{ media.image }}"></a>'
-            + '<h3><a href="{{ widget.video_url_base }}{{ media.iri_id }}#keyword={{ escaped_keyword }}">{{ media.title }}</a></h3><p>{{ description }}</p>'
-            + '<p>{{ widget.l10n.duration_ }} <span class="Ldt-Kc-Item-Duration">{{ duration }}</span></p>'
-            + '</a><div class="Ldt-Kc-Clearer"></div></div>';
-            
-    Processing.loadSketchFromSources(_canvas[0],_pjsfiles);
-    
-    function renderRelated() {
-        var keywords = currentNodesList;
-        _this.$.find(".Ldt-Kc-Related").show();
-        if (typeof relatedCache[keywords] === "undefined") {
-            return;
-        }
-        _this.$.find(".Ldt-Kc-Waiting").hide();
-        if (relatedCache[keywords].length) {
-            var _html = '<div class="Ldt-Kc-Row">';
-            IriSP._(relatedCache[keywords]).each(function(media, i) {
-                var _tmpldata = {
-                    widget: _this,
-                    media: media,
-                    description: media.description.replace(/(\n|\r|\r\n)/mg,' ').replace(/(^.{120,140})[\s].+$/m,'$1&hellip;'),
-                    duration: new IriSP.Model.Time(media.duration).toString(),
-                    escaped_keyword: encodeURIComponent(keywords.split(",")[0])
-                };
-                _html += Mustache.to_html(relatedTemplate, _tmpldata);
-                if (i % 2) {
-                    _html += '</div><div class="Ldt-Kc-Row">';
-                }
-            });
-            _html += '</div>';
-            _this.$.find(".Ldt-Kc-Related-List").html(_html);
-        } else {
-            _this.$.find(".Ldt-Kc-Related-List").html("<p class='Ldt-Kc-Related-Empty'>" + _this.l10n.no_matching_videos + "</p>");
-        }
-    }    
-
-    function triggerSearch(text) {
-        if (_selectedText !== text) {
-            _selectedText = text;
-            _this.source.getAnnotations().search(text);
-        }
-    }
-    
-    function searchNodes(tags) {
-        var _tlist = (_this.use_word_boundaries ? IriSP._(tags).map(function(t) { return "\\\\y" + t + "\\\\y" }) : tags),
-            _q = "(?i)(" + _tlist.join("|") + ")";
-        jQuery.getJSON(
-            _this.kc_api_root + "topics.jsp",
-            {
-                proj: _this.project_id,
-                q: _q
-            },
-            function(data) {
-                if (data && data.items && data.items.length) {
-                    for (var i=0, l=data.items.length; i<l; i++) {
-                        var node = data.items[i];
-                        if (i == 0) {
-                            _pjs.initNode(node.id, node.name, node.grp, node.uid, node.proj);
-                            var node = _pjs.findNode(node.id, node.proj);
-                        } else {
-                            var node = _pjs.newNode(node.id, node.name, node.grp, node.uid, node.proj);
-                            node.root = true;
-                            node.fix();
-                        }
-                        _fns.countassoc(node.id, node.proj);
-                        if (l > 1) {
-                            node.position(Math.floor(radius*Math.sin(2 * Math.PI * i / l)),Math.floor(radius*Math.cos(2 * Math.PI * i / l)));
-                        }
-                    }
-                }
-            }
-        );
-    }
-    
-    function showRelated(nodetexts) {
-        currentNodesList = nodetexts;
-        _this.$.find(".Ldt-Kc-Related-List").html("");
-        _this.$.find(".Ldt-Kc-Keywords").html(nodetexts.replace(/\,/g,", "));
-        if (typeof relatedCache[nodetexts] === "undefined") {
-            _this.$.find(".Ldt-Kc-Waiting").show();
-            if (relatedRequests[nodetexts]) {
-                return;
-            }
-            relatedRequests[nodetexts] = true;
-            IriSP.jQuery.ajax({
-                url: _this.related_api_endpoint,
-                data: {
-                    format: _this.related_data_type,
-                    keywords: nodetexts
-                },
-                dataType: _this.related_data_type,
-                success: function(data) {
-                    relatedCache[nodetexts] = IriSP._(data.objects)
-                        .chain()
-                        .filter(function(o) {
-                            return o.iri_id !== _this.media.id;
-                        })
-                        .sortBy(function(o) {
-                            return - o.score;
-                        })
-                        .first(_this.related_count)
-                        .value();
-                    renderRelated();
-                }
-            });
-        } else {
-            renderRelated();
-        }
-    }
-    
-    function rootNode(id, proj) {
-        jQuery.getJSON(
-            _this.kc_api_root + "topic.jsp",
-            {
-                id: id,
-                proj: proj
-            },
-            function(response) {
-                if (response != null && response.items.length > 0){
-                    item = response.items[0];
-                    _pjs.initNode(item.id, item.name, item.grp, item.uid, item.proj);
-                    _fns.countassoc(item.id, item.proj);
-                }
-            }
-        );
-    }
-    
-    function bindJavascript() {
-        _pjs = Processing.getInstanceById(_tmpId);
-        if (_pjs && typeof _pjs.bindJavascript === "function") {
-            setTimeout(function() {
-                _pjs.bindJavascript(_fns);
-                _pjs.setSize(_canvasWidth,_canvasHeight);
-                var _edit = false,
-                    _teamMode = true;
-                _pjs.saveMode("en",false,_teamMode,false,"both",_edit);
-                rootNode(_this.topic_id, _this.project_id);
-                _slider.slider({
-                    min: -20,
-                    max: 20,
-                    value: 0,
-                    range: "min",
-                    slide: function(event, ui) {
-                        _pjs.zoom(Math.exp(ui.value / 10));
-                    }
-                });
-            }, 1000);
-        } else {
-            setTimeout(bindJavascript, 1000); 
-        }
-    }
-    var currentSelection = null;
-    var _fns = {
-        adjacentnodes: function(id, proj, adj, both) {
-            jQuery.ajax({
-                url: _this.kc_api_root + "associations-bd.jsp",
-                cache: false,
-                data: {
-                    id: id,
-                    proj: proj,
-                    both: both,
-                    adj: adj
-                },
-                success: function(response) {
-                    if (response.items.length > 0){
-                        for(i = 0, end = response.items.length; i < end; i++) {
-                            item = response.items[i];
-                            _pjs.addEdge(item.asc_id, item.id, item.from_proj, item.to_id, item.to_proj,
-                                        item.r_name, item.r_from,  item.r_to, item.uid, item.proj);
-                            _pjs.setNodeName( item.id,   item.from_proj,item.name);
-                            _pjs.setNodeValue(item.id,   item.from_proj,item.name,   item.grp,   item.abst,   item.from_uid);
-                            if (item.from_assoc!=null) {
-                                _pjs.setNodeAssoc(item.id, item.from_proj, item.from_assoc);
-                            }
-                            _pjs.setNodeName( item.to_id,item.to_proj,  item.to_name);
-                            _pjs.setNodeValue(item.to_id,item.to_proj,  item.to_name,item.to_grp,item.to_abst,item.to_uid);
-                            if (item.to_assoc!=null) {
-                                _pjs.setNodeAssoc(item.to_id, item.to_proj, item.to_assoc);
-                            }
-                        }
-                        return response;
-                    } else {
-                        //.debug('No such topic.');
-                        return null;
-                    }
-                }
-            });
-        },
-        setscale: function(scl){
-            _slider.slider("value", 10*Math.log(scl));
-        },
-        countassoc: function(id, proj) {
-            jQuery.ajax({
-                url: _this.kc_api_root + "count-assoc.jsp",
-                data: {
-                    id: id,
-                    proj: proj
-                },
-                success: function(response) {
-                    if (response.items.length > 0){
-                        for(i = 0, end = response.items.length; i < end; i++) {
-                            item = response.items[i];
-                            _pjs.setNodeValue(item.id, item.proj, item.name, item.grp, item.abst);
-                            if (item.assoc!=null) _pjs.setNodeAssoc(item.id, item.proj, item.assoc);
-                            if (item.mass!=null) _pjs.setNodeMass( item.id, item.proj, item.mass);
-                        }
-                    }
-                }
-            });
-        },
-        username: function() {
-            var nodes = _pjs.getNodes().values().toArray(),
-                nodetexts = IriSP._(nodes).chain().pluck("name").sortBy().value().join(",");
-            showRelated(nodetexts);
-        },
-        mousemove: function(selection) {
-            if (selection !== currentSelection) {
-                if (selection) {
-                    triggerSearch(selection.name);
-                }
-                currentSelection = selection;
-            }
-        },
-        click: function(selection) {
-            if (selection) {
-                triggerSearch(selection.name);
-                showRelated(selection.name);
-            } else {
-                triggerSearch();
-            }
-        }
-    };
-    var uselessfuncts = [
-        "selectnode", "selectedge", "topicnode","group_shapes",
-        "allbackup", "allretrieve", "new_topic", "pedia", "set_mode",
-        "new_relation", "startexpand", "endexpand", "new_select" //, "mouseover" //, "username"
-    ];
-    
-    IriSP._(uselessfuncts).each(function(funcname) {
-        _fns[funcname] = function() {
-//            console.log("Function", funcname, "called with arguments", arguments);
-        }
-    });
-    
-    this.getWidgetAnnotations().forEach(function(annotation) {
-        annotation.on("click", function() {
-            var _tags = annotation.getTagTexts();
-            if (_tags.length) {
-                searchNodes(_tags);
-            }
-        });
-    });
-    
-    this.source.getTags().forEach(function(tag) {
-        tag.on("click", function() {
-            if (tag.title) {
-                searchNodes([tag.title]);
-            }
-        });
-    });
-    
-    var keywmatch = document.location.hash.match(/keyword=([^#?&]+)/);
-    if (keywmatch) {
-        this.player.on("widgets-loaded", function() {
-            triggerSearch(decodeURIComponent(keywmatch[1]));
-        });
-    }
-    
-    bindJavascript();
-    
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/LatestAnnotation.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-.Ldt-LatestAnnotation{
-	background: url(img/pinstripe.png);
-	width: 535px;
-	max-height: 180px;
-	margin: 0px;
-	margin-top: 4px;
-	border-style: solid;
-	border-width: 1px;
-	border-color: #b7b7b7;
-}
-
-.Ldt-LatestAnnotation-Element{
-	margin: 5px;
-	display: inline-block;
-	vertical-align: top;
-}
-
-.Ldt-LatestAnnotation-Box{
-	background-color: #ffffff;
-	margin: 3px;
-}
-
-.Ldt-LatestAnnotation-CreationDate{
-	color: #f7268e;
-}
-
-.Ldt-LatestAnnotation-Content{
-	text-align: justify;
-}
-
-.Ldt-LatestAnnotation-Title{
-	color: #0068c4;
-    font-size: 14px;
-    font-weight: bold;
-}
-
-.Ldt-LatestAnnotation-NoAnnotation{
-	font-size: 14px;
-    font-weight: bold;
-}
-
-.Ldt-LatestAnnotation-CopyEditButton{
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    float: right;
-    cursor: pointer;
-    height: 14px;
-    width: 100px;
-    margin: 2px;
-    padding: 2px;
-    font-size: 11px;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    text-align: center;
-    vertical-align: middle;
-}
-
-.Ldt-LatestAnnotation-CopyEditButton:hover{
-	background-color: #e15581;
-	border-color: #222222 #e87d9f #f0adc3 #68273c;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/LatestAnnotation.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,303 +0,0 @@
-/* Widget that displays the last annotation that was posted, optionally for current segment, optionally for a given username */
-
-IriSP.Widgets.LatestAnnotation = function(player, config){
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.LatestAnnotation.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.LatestAnnotation.prototype.defaults = {
-    pre_draw_callback: function(){
-        return this.importUsers();
-    },
-    from_user: false,
-    filter_by_segment: false,
-    segments_annotation_type: "chap",
-    hide_without_segment: false,
-    annotation_type: "contribution",
-    /*
-     * Set to a username if you only want to display annotations from a given user
-     */
-    show_only_annotation_from_user: false,
-    /*
-     * Displays a button that copy currently displayed annotation into CreateAnnotation input field
-     */
-    copy_and_edit_button: false,
-    hide_annotations_list: false,
-    /*
-     * Allows clicks on an annotation from Annotations to display the annotation content into this widget
-     */
-    selectable_annotations: false,
-    empty_message: false,
-    starts_hidden: false,
-    show_header: false,
-    custom_header: false,
-    make_name_string_function: function(params){
-        return params.username ? params.username : "Anonymous";
-    }, 
-};
-
-IriSP.Widgets.LatestAnnotation.prototype.messages = {
-    fr : {
-        copy_and_edit: "Copier et Editer",
-        empty : "Aucune annotation à afficher",
-        header: "Dernière annotation"
-    },
-    en: {
-        copy_and_edit: "Copy and Edit",
-        empty: "No annotation to display",
-        header: "Last annotation"
-    }
-}
-
-IriSP.Widgets.LatestAnnotation.prototype.template = 
-    "{{#show_header}}"
-    + "<p class='Ldt-LatestAnnotation-header'>"
-    +     "{{#custom_header}}{{custom_header}}{{/custom_header}}"
-    +     "{{^custom_header}}{{l10n.header}}{{/custom_header}}"
-    + "</p>"
-    + "{{/show_header}}"
-    + "<div class='Ldt-LatestAnnotation'>"
-    + "</div>";
-
-IriSP.Widgets.LatestAnnotation.prototype.annotationTemplate =
-    "<div class='Ldt-LatestAnnotation-Box'>"
-    + "{{#copy_and_edit_button}}<div class='Ldt-LatestAnnotation-CopyEditButton'>{{button_text}}</div>{{/copy_and_edit_button}}"
-    +     "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-CreationDate'>{{{annotation_created}}}</div>" 
-    +     "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Title'>{{{annotation_creator}}}{{#annotation_title}}: {{{annotation_title}}}{{/annotation_title}}</div>" 
-    +     "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Content'>"
-    +         "{{{annotation_content}}}"
-    +     "</div>"
-    + "</div>"
-
-
-IriSP.Widgets.LatestAnnotation.prototype.importUsers = function(){
-    if (!this.source.users_data){
-        this.usernames = Array();
-        var _this = this,
-            _list = this.getWidgetAnnotations(),
-            usernames_list_string = "";
-        
-        _list.forEach(function(_annotation){
-            if(_this.usernames.indexOf(_annotation.creator) == -1){
-                _this.usernames.push(_annotation.creator);
-            }
-        });
-        this.usernames.forEach(function(_username){
-            usernames_list_string+=_username+","
-        })
-        usernames_list_string = usernames_list_string.substring(0, usernames_list_string.length - 1);
-        _url = Mustache.to_html(this.api_users_endpoint, {usernames_list_string: encodeURIComponent(usernames_list_string), usernames_list_length: this.usernames.length});
-        return IriSP.jQuery.ajax({
-            async: false,
-            url: _url,
-            type: "GET",
-            success: function(_data) {
-                _this.source.users_data = _data.objects
-            },
-            error: function(_xhr, _error, _thrown) {
-                console.log(_xhr)
-                console.log(_error)
-                console.log(_thrown)
-            }
-        })
-    }
-}
-    
-IriSP.Widgets.LatestAnnotation.prototype.draw = function(){
-    var _this = this;
-    this.renderTemplate();
-    
-    this.annotationContainer_$ = this.$.find('.Ldt-LatestAnnotation');
-    
-    if (this.selectable_annotations){
-        this.onMdpEvent("AnnotationsList.refresh", function(){
-            _this.getWidgetAnnotations().forEach(function(_annotation){
-                _annotation.off("click");
-                _annotation.on("click", function(){
-                    var _user = {},
-                        _user_display_string = "",
-                        _users = this.source.users_data.filter(function(_user_data){
-                            return _user_data.username == _annotation.creator
-                        });
-                    if (_users.length == 0){
-                        _user.username = _annotation.creator;
-                    }
-                    else {
-                        _user = _users[0];
-                    }
-                    _user_display_string = _this.make_name_string_function(_user)
-                    _html = Mustache.to_html(_this.annotationTemplate, {
-                        annotation_created: _annotation.created.toLocaleDateString()+", "+_annotation.created.toLocaleTimeString(),
-                        annotation_creator: _user_display_string,
-                        annotation_title: _annotation.title,
-                        annotation_content: _annotation.description,
-                        copy_and_edit_button: _this.copy_and_edit_button,
-                        button_text: _this.l10n.copy_and_edit,
-                    });
-                    _this.annotationContainer_$.html(_html);
-                    _this.selectedAnnotation = true;
-                });
-            }); 
-        });
-        
-        this.segments = _this.source.getAnnotationsByTypeTitle(this.segments_annotation_type)
-        this.segments.forEach(function(_segment){
-            _segment.on("click", function(){
-                _this.selectedAnnotation = false;
-            })
-        })
-        this.currentSegment = false;
-    }
-    
-    this.onMediaEvent("timeupdate", function(){
-        _this.refresh();
-    });
-    this.onMediaEvent("settimerange", function(_timeRange){
-        _this.refresh(_timeRange);
-    })
-    
-    if (this.starts_hidden){
-        this.visible = true;
-        this.hide();
-    }
-    else{
-        this.visible = false;
-        this.show();
-    }
-    
-    this.selectedAnnotation = false; // This flag tells the widget if it must display last annotation (false) or clicked annotation (true)
-    this.player.trigger("AnnotationsList.refresh");
-    this.refresh();
-}
-
-
-IriSP.Widgets.LatestAnnotation.prototype.refresh = function(_timeRange){
-    _timeRange = typeof _timeRange !== 'undefined' ? _timeRange : false ;
-    var _this = this;
-    if (this.hide_without_segment){
-        if (!_timeRange && !this.media.getTimeRange()){
-            var _currentTime = this.media.getCurrentTime();
-            var _currentSegments = this.segments.filter(function(_segment){
-                return (_currentTime >= _segment.begin && _currentTime <= _segment.end)
-            });
-            if (_currentSegments.length == 0){
-                this.currentSegment = false;
-                this.selectedAnnotation = false;
-            }
-            else {
-                this.currentSegment = _currentSegments[0]
-            }
-        }
-        else {
-            var _segmentBegin = _timeRange? _timeRange[0] : this.media.getTimeRange()[0],
-                _segmentEnd = _timeRange? _timeRange[1] : this.media.getTimeRange()[1];
-            if ((!this.currentSegment)||(this.currentSegment.begin != _segmentBegin || this.currentSegment.end != _segmentEnd)) {
-                var _currentSegments = this.segments.filter(function(_segment){
-                    return _segment.begin == _segmentBegin && _segment.end == _segmentEnd
-                });
-                if (_currentSegments.length > 0){
-                    this.selectedAnnotation = false;
-                    this.currentSegment = _currentSegments[0];
-                }
-            }
-        }
-        if (!this.currentSegment){
-            if (this.visible){
-                this.hide();
-            }
-        }
-        else {
-            if (!this.visible){
-                this.show();
-            }
-        }
-    }
-    
-    if (this.visible && !this.selectedAnnotation){
-        var _list = this.getWidgetAnnotations();
-        
-        if(this.filter_by_segment){
-            if (!this.currentSegment) {
-                _list = _list.filter(function(_annotation){
-                    return false;
-                });
-            }
-            else {
-                _list = _list.filter(function(_annotation){
-                    _annotationTime = (_annotation.begin+_annotation.end)/2;
-                    return (_this.currentSegment.begin <= _annotationTime && _this.currentSegment.end >= _annotationTime);
-                });
-            }
-        }
-        _list = _list.sortBy(function(_annotation){
-            return _annotation.created;
-        });
-        
-        var _latestAnnotation = false,
-            _html="",
-            _user_display_string = "",
-            _user = {};
-        if (_list.length != 0){
-            _latestAnnotation = _list.pop();
-            _users = this.source.users_data.filter(function(_user_data){
-                return _user_data.username == _latestAnnotation.creator
-            })
-            if (_users.length == 0){
-                _user.username = _latestAnnotation.creator;
-            }
-            else {
-                _user = _users[0];
-            }
-            _user_display_string = this.make_name_string_function(_user)
-            _html = Mustache.to_html(this.annotationTemplate, {
-                annotation_created: _latestAnnotation.created.toLocaleDateString()+", "+_latestAnnotation.created.toLocaleTimeString(),
-                annotation_creator: _user_display_string,
-                annotation_title: _latestAnnotation.title,
-                annotation_content: _latestAnnotation.description,
-                copy_and_edit_button: this.copy_and_edit_button,
-                button_text: this.l10n.copy_and_edit,
-            });
-        }
-        else {
-            var _empty_message = this.l10n.empty
-            if (this.empty_message) {
-                _empty_message = this.empty_message
-            }
-            _html = "<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-NoAnnotation'>"+_empty_message+"</div>";
-        }
-        this.annotationContainer_$.html(_html);    
-    }
-
-    if(this.copy_and_edit_button){
-        this.copyAndEditButton_$ = this.$.find('.Ldt-LatestAnnotation-CopyEditButton');
-        this.copyAndEditButton_$.click(this.functionWrapper("copy_and_edit"));
-    }
-}
-
-IriSP.Widgets.LatestAnnotation.prototype.copy_and_edit = function(){
-    this.player.trigger("CreateAnnotation.show");
-    if (this.hide_annotations_list){
-        this.player.trigger("AnnotationsList.hide");
-    }
-    annotationText = $('.Ldt-LatestAnnotation-Content').get(0).innerHTML;
-    
-    $('.Ldt-CreateAnnotation-Description').removeClass('empty');
-    $('.Ldt-CreateAnnotation-Description').val(annotationText);
-}
-
-IriSP.Widgets.LatestAnnotation.prototype.hide = function() {
-    if (this.visible){
-        this.visible = false;
-        this.$.find('.Ldt-LatestAnnotation-header').hide();
-        this.annotationContainer_$.hide()
-    }
-}
-
-IriSP.Widgets.LatestAnnotation.prototype.show = function() {
-    if(!this.visible){
-        this.visible = true;
-        this.$.find('.Ldt-LatestAnnotation-header').show();
-        this.annotationContainer_$.show()
-    }
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/LdtPlayer-core.js	Mon Sep 02 15:00:08 2024 +0200
+++ b/src/ldt/ldt/static/ldt/metadataplayer/LdtPlayer-core.js	Wed Sep 04 15:36:55 2024 +0200
@@ -416,7 +416,7 @@
 `),S=0;S<h.length;S++)h[S].length&&(S>0||!d)&&(h[S]=m+h[S]);return h.join(`
 `)},Writer.prototype.renderPartial=function(n,l,d,m){if(d){var h=this.getConfigTags(m),S=isFunction$1(d)?d(n[1]):d[n[1]];if(S!=null){var k=n[6],A=n[5],B=n[4],M=S;A==0&&B&&(M=this.indentPartial(S,B,k));var j=this.parse(M,h);return this.renderTokens(j,l,d,M,m)}}},Writer.prototype.unescapedValue=function(n,l){var d=l.lookup(n[1]);if(d!=null)return d},Writer.prototype.escapedValue=function(n,l,d){var m=this.getConfigEscape(d)||mustache.escape,h=l.lookup(n[1]);if(h!=null)return typeof h=="number"&&m===mustache.escape?String(h):m(h)},Writer.prototype.rawValue=function(n){return n[1]},Writer.prototype.getConfigTags=function(n){return isArray$4(n)?n:n&&typeof n=="object"?n.tags:void 0},Writer.prototype.getConfigEscape=function(n){if(n&&typeof n=="object"&&!isArray$4(n))return n.escape};var mustache={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){defaultWriter.templateCache=t},get templateCache(){return defaultWriter.templateCache}},defaultWriter=new Writer;mustache.clearCache=function(){return defaultWriter.clearCache()},mustache.parse=function(n,l){return defaultWriter.parse(n,l)},mustache.render=function(n,l,d,m){if(typeof n!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+typeStr(n)+'" was given as the first argument for mustache#render(template, view, partials)');return defaultWriter.render(n,l,d,m)},mustache.escape=escapeHtml,mustache.Scanner=Scanner,mustache.Context=Context,mustache.Writer=Writer;function widgetsBase(t){var l;const n={};return n.Widget=(l=class{constructor(d,m){if(typeof d>"u")return;this.__subwidgets=[];var h=m.type||"(unknown)",S=_$1.defaults({},m,d&&d.config?d.config.default_options:{},this.constructor.defaults),k=this;_$1(S).forEach(function(B,M){k[M]=B}),this.$=jQuery("#"+this.container),typeof this.width>"u"?this.width=this.$.width():this.$.css("width",this.width),typeof this.height<"u"&&this.$.css("height",this.height),this.player=d||new t.FakeClass(["on","trigger","off","loadWidget","loadMetadata"]),this.$.addClass("Ldt-TraceMe Ldt-Widget").attr("widget-type",h),this.l10n=typeof this.constructor.messages[t.language]<"u"?this.constructor.messages[t.language]:t.language.length>2&&typeof this.constructor.messages[t.language.substr(0,2)]<"u"?this.constructor.messages[t.language.substr(0,2)]:this.constructor.messages.en;function A(){if(k.localannotations&&(k.localsource=d.loadLocalAnnotations(k.localannotations),k.source.merge(k.localsource)),k.media_id)k.media=this.getElement(k.media_id);else{var B={is_mashup:k.is_mashup||!1};k.media=k.source.getCurrentMedia(B)}k.pre_draw_callback?jQuery.when(k.pre_draw_callback()).done(k.draw()):k.draw(),k.player.trigger("widget-loaded")}this.metadata?(this.source=d.loadMetadata(this.metadata),this.source.onLoad(A)):this.source&&A()}toString(){return"Widget "+this.type}templateToHtml(d){return mustache.render(d,this)}renderTemplate(){this.$.append(this.templateToHtml(this.constructor.template))}functionWrapper(d){var m=this,h=this[d];if(typeof h<"u")return function(){return h.apply(m,Array.prototype.slice.call(arguments,0))};console.log("Error, Unknown function IriSP.Widgets."+this.type+"."+d)}getFunctionOrName(d){switch(typeof d){case"function":return d;case"string":return this.functionWrapper(d);default:return}}onMdpEvent(d,m){this.player.on(d,this.getFunctionOrName(m))}onMediaEvent(d,m){this.media.on(d,this.getFunctionOrName(m))}getWidgetAnnotations(){var d=null;return typeof this.annotation_type>"u"?d=this.media.getAnnotations():this.annotation_type.elementType==="annotationType"?d=this.annotation_type.getAnnotations():d=this.media.getAnnotationsByTypeTitle(this.annotation_type),typeof this.annotation_filter<"u"?this.annotation_filter(d):d}getWidgetAnnotationsAtTime(){var d=this.media.getCurrentTime();return this.getWidgetAnnotations().filter(function(m){return m.begin<=d&&m.end>d})}isLoaded(){var d=!_$1(this.__subwidgets).some(function(m){return!(m&&m.isLoaded())});return d}insertSubwidget(d,m,h){var S=d.attr("id"),k=this,A=this.__subwidgets.length;this.__subwidgets.push(null),typeof S>"u"&&(S=_$1.uniqueId(this.container+"_sub_widget_"+m.type),d.attr("id",S)),m.container=S,k.player.loadWidget(m,function(B){h&&(k[h]=B),k.__subwidgets[A]=B})}navigate(d){for(var m=this,h=m.media.getCurrentTime(),S=m.getWidgetAnnotations().sortBy(function(A){return A.begin}),k=0;k<S.length;k++)if(S[k].begin<=h&&h<S[k].end){k=Math.min(S.length-1,Math.max(0,k+d)),m.media.setCurrentTime(S[k].begin);break}}exportAnnotations(d){var m=this;d===void 0&&(d=this.getWidgetAnnotations());var h=jQuery,S=mustache.render(`[video:{{url}}]
 `,{url:m.media.url})+d.map(function(k){return mustache.render("[{{ a.begin }}]{{ a.title }} {{ a.description }}[{{ a.end }}]",{a:k})}).join(`
-`);h("<pre>").addClass("exportContainer").text(S).dialog({title:"Annotation export",open:function(k,A){var B;document.selection?(B=document.body.createTextRange(),B.moveToElementText(this[0]),B.select()):window.getSelection&&(B=document.createRange(),B.selectNode(this[0]),window.getSelection().addRange(B))},autoOpen:!0,width:"80%",minHeight:"400",height:400,buttons:[{text:"Close",click:function(){h(this).dialog("close")}},{text:"Download",click:function(){a=document.createElement("a"),a.setAttribute("href","data:text/plain;base64,"+btoa(S)),a.setAttribute("download","Annotations - "+m.media.title.replace(/[^ \w]/g,"")+".txt"),a.click()}}]})}draw(){}generateUid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var m=Math.random()*16|0,h=d==="x"?m:m&3|8;return h.toString(16)})}},Cr(l,"defaults",{}),Cr(l,"template",""),Cr(l,"messages",{en:{}}),l),n}const AdaptivePlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){console.log("DRAW ADAPTIVE PLAYER"),typeof this.video>"u"&&(this.video=this.media.video);var l=["autostart","video","height","width","url_transform"],d={},m=document.createElement("video").canPlayType(this.mime_type);d.type=m!=="no"?this.normal_player:this.fallback_player,console.log("CAN PLAY : ",d,m);for(var h=0;h<l.length;h++)typeof this[l[h]]<"u"&&(d[l[h]]=this[l[h]]);this.insertSubwidget(this.$,d)}},Cr(n,"defaults",{mime_type:'video/mp4; codecs="avc1.42E01E"',normal_player:"HtmlPlayer",fallback_player:"HtmlPlayer"}),n},helloWorldStyles={},HelloWorld=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"draw",function(){this.renderTemplate(),console.log("HelloWorldWidget was drawn")});console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget")}},Cr(n,"defaults",{text:"world"}),Cr(n,"template",'<div class="Ldt-HelloWorld"><p>{{l10n.Hello}} {{text}}</p><p>Looks like we have <span class="Ldt-HelloWorld-annotations">{{source.contents.annotation.length}} annotations</span> in this feed</p></div>'),Cr(n,"messages",{fr:{Hello:"Bonjour,"},en:{Hello:"Hello,"}}),n},annotationStyles={},Annotation=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastAnnotation=!1,this.minimized=this.start_minimized||!1,this.bounds=[0,0]}draw(){var l=this,d;function m(k){var A=l.getWidgetAnnotationsAtTime();A.length||(l.$.find(".Ldt-Annotation-Inner").addClass("Ldt-Annotation-Empty"),l.arrow&&l.arrow.moveToTime(k),l.bounds=[k,k],l.sendBounds())}function h(){if(d){var k=d.title,A=d.description.replace(/(^\s+|\s+$)/g,""),B=d.found&&l.source.getAnnotations().regexp||!1;l.$.find(".Ldt-Annotation-Title").html(IriSP.textFieldHtml(k,B)||"("+l.l10n.untitled+")"),A?(l.$.find(".Ldt-Annotation-Description-Block").removeClass("Ldt-Annotation-EmptyBlock"),l.$.find(".Ldt-Annotation-Description").html(IriSP.textFieldHtml(A,B))):l.$.find(".Ldt-Annotation-Description-Block").addClass("Ldt-Annotation-EmptyBlock")}}function S(k){d=k;var A=typeof k.url<"u"?k.url:document.location.href.replace(/#.*$/,"")+"#id="+k.id,B=l.l10n.watching+k.title+(l.site_name?l.l10n.on_site+l.site_name:""),M=k.getTags(),j=l.$.find(".Ldt-Annotation-Tags");j.empty(),M.length?(l.$.find(".Ldt-Annotation-Tags-Block").removeClass("Ldt-Annotation-EmptyBlock"),M.forEach(function(I){var P=I.title.replace(/(^\s+|\s+$)/g,"");if(P){var $=IriSP.jQuery('<li class="Ldt-Annotation-TagLabel"></li>').append(IriSP.jQuery("<span>").text(P));$.click(function(){l.search_on_tag_click&&l.source.getAnnotations().search(P),I.trigger("click")}),j.append($)}})):l.$.find(".Ldt-Annotation-Tags-Block").addClass("Ldt-Annotation-EmptyBlock"),h(),l.show_creator&&l.$.find(".Ldt-Annotation-Creator").text(k.creator),l.show_annotation_type&&(l.$.find(".Ldt-Annotation-Type").text(k.getAnnotationType().title),l.$.find(".Ldt-Annotation-Type").attr("title",k.getAnnotationType().description)),l.$.find(".Ldt-Annotation-Begin").text(k.begin.toString()),l.$.find(".Ldt-Annotation-End").text(k.end.toString()),k.elementType==="mashedAnnotation"?(l.$.find(".Ldt-Annotation-Inner").addClass("Ldt-Annotation-isMashup"),l.$.find(".Ldt-Annotation-MashupMedia").text(k.getMedia().title),l.$.find(".Ldt-Annotation-MashupBegin").text(k.annotation.begin.toString()),l.$.find(".Ldt-Annotation-MashupEnd").text(k.annotation.end.toString())):l.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-isMashup"),typeof l.socialWidget<"u"?l.socialWidget.updateUrls(A,B):setTimeout(function(){typeof l.socialWidget<"u"&&l.socialWidget.updateUrls(A,B)},800),l.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty"),l.bounds=[k.begin,k.end],l.arrow&&l.arrow.moveToTime((1-l.arrow_position)*k.begin+l.arrow_position*k.end),l.sendBounds()}this.renderTemplate(),this.$.find(".Ldt-Annotation-Title").click(function(){return d&&l.media.setCurrentTime(d.begin),!1}),this.show_social&&this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"),{type:"Social"},"socialWidget"),this.show_arrow&&this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"),{type:"Arrow",width:this.width},"arrow"),this.onMediaEvent("timeupdate",m),this.onMdpEvent("Annotation.hide","hide"),this.onMdpEvent("Annotation.show","show"),this.onMdpEvent("Annotation.minimize","minimize"),this.onMdpEvent("Annotation.maximize","maximize"),this.onMdpEvent("Annotation.getBounds","sendBounds"),this.$.find(".Ldt-Annotation-MaxMinButton").click(this.functionWrapper("toggleSize")),this.$.on("resize",function(){l.width=l.$.parent().width(),l.$.css({width:l.width})}),this.getWidgetAnnotations().forEach(function(k){k.on("enter",function(){S(k)})}),this.source.getAnnotations().on("found",h),this.source.getAnnotations().on("not-found",h),this.source.getAnnotations().on("search-cleared",h),IriSP.attachDndData(this.$.find("h3"),function(){return{title:d.title,description:d.description,image:d.thumbnail,uri:typeof d.url<"u"?d.url:document.location.href.replace(/#.*$/,"")+"#id="+d.id,text:"["+d.begin.toString()+"] "+d.title}})}sendBounds(){this.player.trigger("Annotation.boundsChanged",this.bounds)}drawAnnotation(l){this.lastAnnotation=l.id}hide(){this.$.slideUp()}show(){this.$.slideDown()}toggleSize(){this.minimized?this.maximize():this.minimize()}minimize(){this.minimized=!0,this.$.find(".Ldt-Annotation-Inner").addClass("Ldt-Annotation-Minimized")}maximize(){this.minimized=!1,this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Minimized")}},Cr(n,"messages",{fr:{watching:"Je regarde ",on_site:" sur ",tags_:"Mots-clés :",description_:"Description :",creator_:"Créé par :",excerpt_from:"Extrait de :",untitled:"Segment sans titre"},en:{watching:"I'm watching ",on_site:" on ",tags_:"Keywords:",description_:"Description:",creator_:"Created by :",excerpt_from:"Excerpt from:",untitled:"Untitled segment"}}),Cr(n,"template",'{{#show_arrow}}<div class="Ldt-Annotation-Arrow"></div>{{/show_arrow}}<div class="Ldt-Annotation-Widget {{^show_arrow}}Ldt-Annotation-ShowTop{{/show_arrow}}"><div class="Ldt-Annotation-Inner Ldt-Annotation-Empty{{#start_minimized}} Ldt-Annotation-Minimized{{/start_minimized}}"><div class="Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-MaxMinButton"></div>{{#show_social}}<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></div>{{/show_social}}<h3 class="Ldt-Annotation-HiddenWhenEmpty">{{#show_annotation_type}}<span class="Ldt-Annotation-Type"></span> » {{/show_annotation_type}}<a class="Ldt-Annotation-Title" href="#"></a> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3><h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3><div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Creator-Block"><div class="Ldt-Annotation-Label">{{l10n.creator_}}</div>{{#show_creator}}<p class="Ldt-Annotation-Labelled Ldt-Annotation-Creator"></p></div>{{/show_creator}}{{#show_description}}<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div><p class="Ldt-Annotation-Labelled Ldt-Annotation-Description"></p></div>{{/show_description}}<div class="Ldt-Annotation-Tags-Block Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Cleared"><div class="Ldt-Annotation-Label">{{l10n.tags_}}</div><ul class="Ldt-Annotation-Labelled Ldt-Annotation-Tags"></ul></div></div></div></div>'),Cr(n,"defaults",{annotation_type:"chap",start_minimized:!1,show_arrow:!0,show_creator:!0,show_description:!0,arrow_position:.5,site_name:"Lignes de Temps",search_on_tag_click:!0,show_social:!0,show_annotation_type:!1}),n},annotationsControllerStyles={},AnnotationsController=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate();var l=this;this.element_$=this.$.find(".Ldt-AnnotationsController"),this.displayButton_$=this.$.find(".Ldt-AnnotationsController-ShowAnnotationsListButton"),this.writeButton_$=this.$.find(".Ldt-AnnotationsController-ShowCreateAnnotationButton"),this.writeButton_$.click(function(){l.writeButton_$.hasClass("selected")?(l.player.trigger("CreateAnnotation.hide"),l.toggle_widgets?l.player.trigger("AnnotationsList.show"):l.display_or_write&&l.player.trigger("AnnotationsList.hide")):(l.player.trigger("CreateAnnotation.show"),l.display_or_write&&l.player.trigger("AnnotationsList.hide"))}),this.displayButton_$.click(function(){l.displayButton_$.hasClass("selected")?(l.player.trigger("AnnotationsList.hide"),l.toggle_widgets?l.player.trigger("CreateAnnotation.show"):l.display_or_write&&l.player.trigger("CreateAnnotation.hide")):(l.player.trigger("AnnotationsList.show"),l.display_or_write&&l.player.trigger("CreateAnnotation.hide"))}),this.hide_without_segment&&(this.onMediaEvent("timeupdate",function(){l.refresh()}),this.onMediaEvent("settimerange",function(d){l.refresh(d)}),this.segments=this.source.getAnnotationsByTypeTitle(this.segments_annotation_type),this.currentSegment=!1),this.createAnnotationEnabled=!1,this.onMdpEvent("CreateAnnotation.hide",function(){l.hide_when_writing&&l.show(),l.createAnnotationEnabled=!1,l.writeButton_$.toggleClass("selected",!1)}),this.onMdpEvent("CreateAnnotation.show",function(){l.hide_when_writing&&l.hide(),l.createAnnotationEnabled=!0,l.writeButton_$.toggleClass("selected",!0)}),this.onMdpEvent("AnnotationsList.hide",function(){l.displayButton_$.toggleClass("selected",!1)}),this.onMdpEvent("AnnotationsList.show",function(){l.displayButton_$.toggleClass("selected",!0)}),this.starts_hidden?(this.visible=!0,this.hide()):(this.visible=!1,this.show()),this.starting_widget&&this.visible&&(this.starting_widget=="AnnotationsList"?this.player.trigger("AnnotationsList.show"):this.starting_widget=="CreateAnnotation"&&this.player.trigger("CreateAnnotation.show"))}refresh(l){if(l=typeof l<"u"?l:!1,l||this.media.getTimeRange()&&(l=this.media.getTimeRange()),this.hide_without_segment){if(!l&&!this.media.getTimeRange())_currentTime=this.media.getCurrentTime(),_currentSegments=this.segments.filter(function(h){return _currentTime>=h.begin&&_currentTime<=h.end}),_currentSegments.length>0?currentSegment=!0:currentSegment=!1;else{var d=l[0],m=l[1];_currentSegments=this.segments.filter(function(h){return d==h.begin&&m==h.end}),_currentSegments.length>0?currentSegment=!0:currentSegment=!1}!currentSegment&&_currentSegments.length==0?(this.visible||this.hide_when_writing)&&(this.writeButton_$.toggleClass("selected",!1),this.displayButton_$.toggleClass("selected",!1),this.player.trigger("CreateAnnotation.hide"),this.player.trigger("AnnotationsList.hide"),this.hide()):this.visible||(this.createAnnotationEnabled||this.show(),this.writeButton_$.toggleClass("selected",!1),this.displayButton_$.toggleClass("selected",!1),this.starting_widget=="AnnotationsList"&&this.player.trigger("AnnotationsList.show"),this.starting_widget=="CreateAnnotation"&&this.player.trigger("CreateAnnotation.show"))}}hide(){this.visible&&(this.visible=!1,this.element_$.hide())}show(){this.visible||(this.visible=!0,this.element_$.show())}},Cr(n,"defaults",{display_or_write:!1,toggle_widgets:!1,starts_hidden:!1,hide_without_segment:!1,hide_when_writing:!0,starting_widget:!1,always_show_widget:!1,segments_annotation_type:"chap",custom_write_text:!1,custom_display_text:!1}),Cr(n,"template","<div class='Ldt-AnnotationsController'><div class='Ldt-AnnotationsController-ButtonsContainer'>    <div class='Ldt-AnnotationsController-Button Ldt-AnnotationsController-ShowCreateAnnotationButton'>{{#custom_write_text}}{{/custom_write_text}}{{custom_write_text}}{{^custom_write_text}}{{l10n.write}}{{/custom_write_text}}</div>    <div class='Ldt-AnnotationsController-Button Ldt-AnnotationsController-ShowAnnotationsListButton'>{{#custom_display_text}}{{/custom_display_text}}{{custom_display_text}}{{^custom_display_text}}{{l10n.display}}{{/custom_display_text}}</div></div></div>"),Cr(n,"messages",{en:{write:"Write",display:"Display"},fr:{write:"Ecrire",display:"Voir"}}),n},annotationsListStyles={},AnnotationsList=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastIds=[];var m=this;this.throttledRefresh=_$1.throttle(function(h){m.refresh(h)},800),this.searchString=!1,this.lastSearch=!1,this.localSource=void 0}importUsers(){if(!this.source.users_data&&this.api_users_endpoint){this.usernames=Array();var l=this,d=this.getWidgetAnnotations(),m="";return d.forEach(function(h){l.usernames.indexOf(h.creator)==-1&&l.usernames.push(h.creator)}),this.usernames.forEach(function(h){m+=h+","}),m=m.substring(0,m.length-1),_url=mustache.render(this.api_users_endpoint,{usernames_list_string:encodeURIComponent(m),usernames_list_length:this.usernames.length}),jQuery.ajax({async:!1,url:_url,type:"GET",success:function(h){l.source.users_data=h.objects},error:function(h,S,k){console.log(h),console.log(S),console.log(k)}})}}ajaxSource(){var l=this.media.getCurrentTime(),d=this.media.duration;this.lastAjaxQuery=l;var m=mustache.render(this.ajax_url,{media:this.source.currentMedia.id,begin:Math.max(0,l-this.ajax_granularity),end:Math.min(d.milliseconds,l+this.ajax_granularity)});this.currentSource=this.player.loadMetadata(_$1.defaults({url:m},this.metadata))}showScreen(l){this.$.find(".Ldt-AnnotationsList-Screen"+l).show().siblings().hide()}ajaxMashup(){var l=this.media.getCurrentTime(),d=this.source.currentMedia.getAnnotationAtTime(l);if(typeof d<"u"&&d.id!==this.lastMashupAnnotation){this.lastMashupAnnotation=d.id;var m=d.getMedia(),h=mustache.render(this.ajax_url,{media:m.id,begin:Math.max(0,d.annotation.begin.milliseconds-this.ajax_granularity),end:Math.min(m.duration.milliseconds,d.annotation.end.milliseconds+this.ajax_granularity)});this.currentSource=this.player.loadMetadata(_$1.defaults({url:h},this.metadata))}}importAnnotations(){var l=this,d=jQuery,m=d("<textarea>");d("<div>").append(d("<span>").addClass("importAnnotationsLabel").text(l.messages.import_annotations)).addClass("importContainer").dialog({title:"Annotation import",autoOpen:!0,width:"80%",minHeight:"400",height:400,buttons:[{text:"Close",click:function(){d(this).dialog("close")}},{text:"Import",click:function(){var h=/(\[[\d:]+\])/;console.log("Import data");for(var S=m[0].value.split(h).filter(function(P){return!P.match(/^\s*$/)}),k=null,A=null,B=null,M=null,j=0;j<S.length;j++){var I=S[j];I.match(h)?(M=="text"?(A=t.timestamp2ms(I.slice(1,-1)),TODO.createAnnotation(k,A,B),k=A,A=null,B=null):(B=null,k=t.timestamp2ms(I.slice(1,-1)),A=null),M="timestamp"):(B=I,M="text"),M=="text"&&k!==null&&TODO.createAnnotation(k,k,B)}}}]})}refresh(l){if(l=typeof l<"u"&&l,this.currentSource.status!==t.Model._SOURCE_STATUS_READY)return 0;var d=this,m=this.media.getCurrentTime(),h=this.annotation_type?this.currentSource.getAnnotationsByTypeTitle(this.annotation_type):this.currentSource.getAnnotations();if(this.mashupMode){var S=this.source.currentMedia.getAnnotationAtTime(m);if(typeof S<"u"){m=m-S.begin+S.annotation.begin;var k=S.getMedia().id;h=h.filter(function(N){return N.getMedia().id===k})}}h=h.filter(function(N){return N.found!==!1}),this.filter_by_segments&&!(this.show_filters&&this.segment_filter&&this.ignoresegmentcheckbox_$[0].checked)&&(_segmentsAnnotation=this.currentSource.getAnnotationsByTypeTitle(this.segments_annotation_type),this.media.getTimeRange()?_currentSegments=_segmentsAnnotation.filter(function(N){return d.media.getTimeRange()[0]==N.begin&&d.media.getTimeRange()[1]==N.end}):_currentSegments=_segmentsAnnotation.filter(function(N){return m>=N.begin&&m<=N.end}),_currentSegments.length==0?h=h.filter(function(N){return!1}):h=h.filter(function(N){return _annotation_time=(N.begin+N.end)/2,_currentSegments[0].begin<=_annotation_time&&_currentSegments[0].end>=_annotation_time}),this.annotations_count_header&&this.annotations_count!=h.length&&(this.annotations_count=h.length,this.refreshHeader())),this.show_only_annotation_from_user&&(h=h.filter(function(N){return N.creator==d.show_only_annotation_from_user})),this.limit_count&&(h=h.sortBy(function(N){return Math.abs((N.begin+N.end)/2-m)}).slice(0,this.limit_count)),this.newest_first?h=h.sortBy(function(N){return-N.created.valueOf()}):h=h.sortBy(function(N){return N.begin}),this.show_filters&&(this.user_filter&&(_username=this.userselect_$[0].options[this.userselect_$[0].selectedIndex].value,_username!="false"&&(h=h.filter(function(N){return N.creator==_username}))),this.keyword_filter&&(_keyword=this.keywordinput_$[0].value,_keyword!=""&&(h=h.filter(function(N){return N.description.toLowerCase().match(_keyword.toLowerCase())}))),this.date_filter&&this.datefilterinput_$[0].value!=""&&(_date=this.datefilterinput_$.datepicker("getDate"),h=h.filter(function(N){return N.created.getDate()==_date.getDate()&&N.created.getMonth()==_date.getMonth()&&N.created.getFullYear()==_date.getFullYear()})),this.latest_contributions_filter&&this.latestcontributionscheckbox_$[0].checked&&(h=h.sortBy(function(N){return-N.created.valueOf()}),this.usernames.forEach(function(N){latest_ann=h.filter(function(F){return F.creator==N})[0],h=h.filter(function(F){return F.id==(latest_ann?latest_ann.id:!1)||F.creator!=N})})));var A=h.idIndex;if(l||!_$1.isEqual(A,this.lastIds)||this.searchString!==this.lastSearch){if(this.lastSearch=this.searchString,this.lastIds=A,this.list_$.html(""),h.forEach(function(N){var F=typeof N.url<"u"&&N.url?N.url:typeof d.source.projectId<"u"&&typeof N.project<"u"&&N.project&&d.source.projectId!==N.project?mustache.render(d.foreign_url,{project:N.project,media:N.media.id,annotation:N.id,annotationType:N.annotationType.id}):document.location.href.replace(/#.*$/,"")+"#id="+N.id+"&t="+N.begin/1e3,U=N.project!=d.source.projectId,J="",te=N.description,se=typeof N.thumbnail<"u"&&N.thumbnail?N.thumbnail:d.default_thumbnail;if(d.show_creator&&N.creator){var de=[],Q={},ve="";d.source.users_data&&(de=d.source.users_data.filter(function(y){return y.username==N.creator})),de.length==0?Q.username=N.creator:Q=de[0],ve=d.make_name_string_function(Q)}if(d.show_title&&N.title)var J=N.title;var he;_$1(d.polemics).each(function(y){var w=t.Model.regexpFromTextOrArray(y.keyword,!0);w.test(J+" "+te)&&(he=y.background_color)});var ke=!1;if(d.show_creation_date&&(ke=N.created.toLocaleDateString()+", "+N.created.toLocaleTimeString().replace(/\u200E/g,"").replace(/^([^\d]*\d{1,2}:\d{1,2}):\d{1,2}([^\d]*)$/,"$1$2")),d.tags==!0)var T=N.getTagTexts();else var T=!1;var u={id:N.id,media_id:N.getMedia().id,htitle:t.textFieldHtml(J),title:J,creator:ve,hdescription:t.textFieldHtml(te),description:te,begin:N.begin.toString(),end:N.end.toString(),created:ke,show_timecode:d.show_timecode,show_end_time:d.show_end_time,show_title:d.show_title&&J,thumbnail:se,url:F,tags:T,specific_style:typeof he<"u"?"background-color: "+he:"",l10n:d.l10n,editable:d.editable,external:U,show_publish:d.show_publish,show_creator:d.show_creator,show_twitter:d.show_twitter,twitter_param:jQuery.param({url:F,text:t.textFieldHtml(J)+(d.twitter_hashtag?" #"+d.twitter_hashtag:"")}),allow_annotations_deletion:d.allow_annotations_deletion},p=mustache.render(d.constructor.annotationTemplate,u),b=jQuery(p),e=function(){d.$.find(".Ldt-AnnotationsList-li").removeClass("selected"),b.addClass("selected")},c=function(){d.$.find(".Ldt-AnnotationsList-li").removeClass("selected")};b.mouseover(function(){N.trigger("select")}).mouseout(function(){N.trigger("unselect")}).click(function(){d.filter_by_segments&&d.media.getTimeRange()&&(_ann_time=(N.begin+N.end)/2,(_ann_time<=d.media.getTimeRange()[0]||_ann_time>=d.media.getTimeRange()[1])&&d.media.resetTimeRange()),N.trigger("click")}).appendTo(d.list_$),t.attachDndData(b.find("[draggable]"),{title:J,description:te,uri:F,image:N.thumbnail,text:"["+N.begin.toString()+"] "+J}),b.on("remove",function(){N.off("select",e),N.off("unselect",c)}),N.on("select",e),N.on("unselect",c)}),this.$.find(".Ldt-AnnotationsList-Tag-Li").each(function(){var N=jQuery(this);N.text().replace(/(^\s+|\s+$)/g,"")||N.remove()}),this.editable){var B=d,M=jQuery,j=function(N,F){var U="#FF9999",J="#99FF99";F===void 0&&(F=N);var te=M(N.dataset.editable_type==="multiline"?"<textarea>":"<input>").addClass("editableInput").insertBefore(M(F));te[0].value=N.dataset.editable_value,M(te).show().focus(),M(N).addClass("editing");function se(ve){M(N).removeClass("editing"),te.remove();var he=M(N).css("background-color");M(N).stop().css("background-color",ve).animate({backgroundColor:he},1e3)}function de(ve){se(U)}function Q(){var ve=te[0].value;if(ve==N.dataset.editable_value){se(J);return}if(ve==""){$(N.dataset.editable_id),B.player.trigger("Annotation.delete",N.dataset.editable_id);return}else{var he=ve;if(N.dataset.editable_type=="timestamp"&&(he=t.timestamp2ms(ve),Number.isNaN(he))){de();return}N.dataset.editable_value=ve,ve=he,M(N).text(he)}var ke=I(N.dataset.editable_id);ke===void 0?(console.log("Strange error: cannot find edited annotation"),se(U)):(N.dataset.editable_value=ve,N.dataset.editable_field=="begin"?ke.setBegin(ve):N.dataset.editable_field=="end"?ke.setEnd(ve):ke[N.dataset.editable_field]=ve,ke.modified=new Date,ke.contributor=B.player.config.username||"COCo User",B.player.addLocalAnnotation(ke),B.player.trigger("Annotation.update",ke),se(J))}M(te).bind("keydown",function(ve){ve.which==13?(ve.preventDefault(),Q()):ve.which==27&&(ve.preventDefault(),de())}).bind("blur",function(ve){Q()})},I=function(N){return B.player.getLocalAnnotation(N)},P=function(){B.player.saveLocalAnnotations(),B.source.merge(B.player.localSource)},$=function(N){B.source.getAnnotations().removeId(N,!0),B.player.deleteLocalAnnotation(N),B.refresh(!0)};this.$.find(".Ldt-AnnotationsList-Delete").click(function(N){var F=I(this.dataset.editable_id);confirm(mustache.render(B.l10n.confirm_delete_message,{annotation:F}))&&$(this.dataset.editable_id),B.refresh(!0)}),this.$.find(".Ldt-AnnotationsList-Edit").click(function(N){if(B.on_edit){var F=I(this.dataset.editable_id);B.on_edit(F)}else{var U=M(this).parents(".Ldt-AnnotationsList-li").find(".Ldt-AnnotationsList-TitleContent.Ldt-live-editable");j(U[0])}}),this.$.find(".Ldt-AnnotationsList-PublishAnnotation").click(function(N){var F=I(this.dataset.editable_id);if(confirm(mustache.render(B.l10n.confirm_publish_message,{annotation:F}))){var U=mustache.render(B.api_endpoint_template,{id:B.source.projectId});if(U!==""){var J=B.player.sourceManager.newLocalSource({serializer:t.serializers[B.api_serializer]});if(B.publish_type){var te=B.source.getAnnotationTypes().filter(function(de){return de.title==B.publish_type});te.length==1&&F.setAnnotationType(te[0].id)}var se=new t.Model.List(B.player.sourceManager);se.push(F),J.addList("annotation",se),jQuery.ajax({url:U,type:B.api_method,contentType:"application/json",data:J.serialize(),success:function(de){M(this).addClass("published");var Q=I(F.id);Q.setTags(["published"]),P(),B.player.trigger("Annotation.publish",F)},error:function(de,Q,ve){t.log("Error when sending annotation",ve)}})}}}),this.$.find(".Ldt-AnnotationsList-TimeEdit").dblclick(function(N){var F=this,U=I(F.dataset.editable_id);U!==void 0&&(U.setBegin(B.media.getCurrentTime().milliseconds),P(),B.player.trigger("Annotation.update",U),B.refresh(!0))})}if(this.$.find(".Ldt-AnnotationsList-Tag-Li").click(function(){d.source.getAnnotations().search(jQuery(this).text().replace(/(^\s+|\s+$)/g,""))}),this.$.find(".Ldt-Annotation-Timecode").click(function(){d.media.setCurrentTime(Number(this.dataset.timecode))}),this.$.find(".Ldt-AnnotationsList-Play").click(function(){var N=jQuery(this),F=N.attr("data-annotation-id");d.jwplayers[F]&&jwplayer(d.jwplayers[F]).play(),d.media.pause()}),this.source.getAnnotations().searching){var z=d.source.getAnnotations().regexp||!1;this.$.find(".Ldt-AnnotationsList-Title a, .Ldt-AnnotationsList-Description").each(function(){var N=jQuery(this);N.html(t.textFieldHtml(N.text(),z))})}this.$.find(".Ldt-AnnotationsList-DeleteButton").click(d.functionWrapper("onDeleteClick"))}return this.ajax_url&&(this.mashupMode?this.ajaxMashup():Math.abs(m-this.lastAjaxQuery)>this.ajax_granularity&&this.ajaxSource()),h.length}onDeleteClick(l){_list=this.getWidgetAnnotations(),ann_id=l.target.dataset.annotation,delete_preview_$=this.$.find(".Ldt-AnnotationsList-ul-ToDelete"),delete_preview_$.html(""),_list=_list.filter(function(I){return I.id==ann_id});var d=_list[0],m="",h="",S=this;if(d.creator){var k=[],A={};S.source.users_data&&(k=S.source.users_data.filter(function(I){return I.username==d.creator})),k.length==0?A.username=d.creator:A=k[0],h=S.make_name_string_function(A)}if(d.title){var B=d.title;B.substr(0,m.length+1)==m+":"&&(m=""),m=m+(m==""?"":": ")+d.title}var M=!1;this.show_creation_date&&(M=d.created.toLocaleDateString()+", "+d.created.toLocaleTimeString());var j={id:d.id,media_id:d.getMedia().id,htitle:t.textFieldHtml(m),hdescription:t.textFieldHtml(d.description),begin:d.begin.toString(),end:d.end.toString(),created:M,show_timecode:this.show_timecode,show_creator:this.show_creator,creator:h,tags:!1,l10n:this.l10n,allow_annotations_deletion:!1};_html=mustache.render(this.constructor.annotationTemplate,j),delete_preview_$.html(_html),this.$.find(".Ldt-AnnotationsList-ConfirmDelete").click(function(){S.sendDelete(ann_id)}),this.showScreen("Delete")}refreshHeader(){var l=" ("+this.annotations_count+" "+this.annotations_count_header_string+")";this.$.find(".Ldt-AnnotationsList-header").html(""),this.$.find(".Ldt-AnnotationsList-header").html(this.custom_header&&typeof this.custom_header=="string"?this.custom_header+l:this.l10n.header+l)}hide(){var l=this;this.visible&&(this.visible=!1,this.widget_$.slideUp(function(){l.$.find(".Ldt-AnnotationsList-header").hide()}),this.showScreen("Main"))}show(){this.visible||(this.visible=!0,this.$.find(".Ldt-AnnotationsList-header").show(),this.widget_$.slideDown(),this.showScreen("Main"))}toggle(){this.always_visible||(this.visible?this.hide():this.show())}revertToMainScreen(){this.$.find(".Ldt-AnnotationsList-ScreenMain").is(":hidden")&&this.showScreen("Main")}sendDelete(l){var d=this,m=mustache.render(this.api_delete_endpoint,{annotation_id:l,project_id:this.project_id});jQuery.ajax({url:m,type:this.api_delete_method,contentType:"application/json",success:function(h){d.showScreen("Success"),window.setTimeout(d.functionWrapper("revertToMainScreen"),d.after_send_timeout||2e3),d.currentSource.getAnnotations().removeId(l),d.player.trigger("AnnotationsList.refresh")},error:function(h,S,k){t.log("Error when sending annotation",k),d.showScreen("Error"),window.setTimeout(d.functionWrapper("revertToMainScreen"),d.after_send_timeout||2e3)}}),this.showScreen("Sending")}draw(){this.jwplayers={},this.mashupMode=this.media.elementType==="mashup",this.renderTemplate();var l=this;this.list_$=this.$.find(".Ldt-AnnotationsList-ul"),this.widget_$=this.$.find(".Ldt-AnnotationsListWidget"),this.widget_max_height&&this.widget_$.css("max-height",this.widget_max_height),this.show_filters&&(this.user_filter&&(this.userselect_$=this.$.find("#Ldt-AnnotationsList-userFilter"),this.userselect_$.change(function(){l.player.trigger("AnnotationsList.refresh")}),this.userselect_$.html("<option selected value='false'>"+this.l10n.everyone+"</option>"),this.usernames.forEach(function(h){var S=l.source.users_data.filter(function(A){return A.username==h}),k={};S.length==0?k.username=h:k=S[0],l.userselect_$.append("<option value='"+h+"'>"+l.make_name_string_function(k)+"</option>")})),this.keyword_filter&&(this.keywordinput_$=this.$.find("#Ldt-AnnotationsList-keywordsFilter"),this.keywordinput_$.keyup(function(){l.player.trigger("AnnotationsList.refresh")})),this.segment_filter&&(this.ignoresegmentcheckbox_$=this.$.find("#Ldt-AnnotationsList-ignoreSegmentsFilter"),this.ignoresegmentcheckbox_$.click(function(){l.player.trigger("AnnotationsList.refresh")})),this.date_filter&&(this.datefilterinput_$=this.$.find("#Ldt-AnnotationsList-dateFilter"),this.datefilterinput_$.datepicker({dateFormat:"dd/mm/yy"}),this.datefilterinput_$.change(function(){l.player.trigger("AnnotationsList.refresh")}),this.current_day_filter&&(currentDate=new Date,this.datefilterinput_$.datepicker("setDate",currentDate))),this.latest_contributions_filter&&(this.latestcontributionscheckbox_$=this.$.find("#Ldt-AnnotationsList-latestContributionsFilter"),this.latestcontributionscheckbox_$.click(function(){l.player.trigger("AnnotationsList.refresh")}))),this.source.getAnnotations().on("search",function(h){l.searchString=h,l.source!==l.currentSource&&(l.currentSource.getAnnotations().search(h),l.throttledRefresh())}),this.source.getAnnotations().on("found",function(){l.throttledRefresh()}),this.source.getAnnotations().on("not-found",function(){l.throttledRefresh()}),this.source.getAnnotations().on("clear-search",function(){l.searchString=!1,l.source!==l.currentSource&&l.currentSource.getAnnotations().trigger("clear-search")}),this.$.find(".Ldt-AnnotationsList-Close").click(function(){l.showScreen("Main")}),this.source.getAnnotations().on("search-cleared",function(){l.throttledRefresh()}),this.onMdpEvent("AnnotationsList.refresh",function(){l.ajax_url&&(l.mashupMode?l.ajaxMashup():l.ajaxSource()),l.throttledRefresh(!1)}),this.onMdpEvent("AnnotationsList.update",function(){l.ajax_url&&(l.mashupMode?l.ajaxMashup():l.ajaxSource()),l.throttledRefresh(!0)}),this.ajax_url?this.mashupMode?this.ajaxMashup():this.ajaxSource():this.currentSource=this.source,this.refresh_interval&&window.setInterval(function(){l.currentSource.get()},this.refresh_interval),this.annotations_count_header&&(this.annotations_count=!1),this.onMdpEvent("AnnotationsList.toggle","toggle"),this.onMdpEvent("AnnotationsList.hide","hide"),this.onMdpEvent("AnnotationsList.show","show"),this.onMdpEvent("createAnnotationWidget.addedAnnotation",this.throttledRefresh);for(var d=["timeupdate","seeked","loadedmetadata","settimerange"],m=0;m<d.length;m++)this.onMediaEvent(d[m],this.throttledRefresh);this.throttledRefresh(),this.showScreen("Main"),this.$.find(".Ldt-AnnotationsList-CancelDelete").click(function(){l.showScreen("Main")}),this.visible=!0,this.start_visible||this.hide()}},Cr(n,"defaults",{pre_draw_callback:function(){return this.importUsers()},ajax_url:!1,ajax_granularity:6e5,default_thumbnail:"",custom_external_icon:"",foreign_url:"",annotation_type:!1,refresh_interval:0,limit_count:20,newest_first:!1,show_title:!0,show_audio:!0,show_creator:!0,show_controls:!1,show_end_time:!0,show_publish:!1,show_twitter:!1,twitter_hashtag:"",on_edit:void 0,publish_type:"PublicContribution",api_endpoint_template:"",api_serializer:"ldt_annotate",api_method:"POST",editable:!1,editable_storage:"",widget_max_height:680,always_visible:!1,start_visible:!0,show_audio:!0,show_filters:!1,keyword_filter:!0,date_filter:!0,user_filter:!0,segment_filter:!0,latest_contributions_filter:!1,current_day_filter:!0,show_header:!1,custom_header:!1,annotations_count_header:!0,annotations_count_header_string:"annotations",show_creation_date:!1,show_timecode:!0,show_end_time:!0,project_id:"",allow_annotations_deletion:!1,api_delete_endpoint:"",api_delete_method:"DELETE",api_users_endpoint:"",api_users_method:"GET",make_name_string_function:function(l){return l.username?l.username:"Anonymous"},filter_by_segments:!1,segment_filter:!0,segments_annotation_type:"chap",show_only_annotation_from_user:!1,tags:!0,polemics:[{keyword:"++",background_color:"#c9ecc6"},{keyword:"--",background_color:"#f9c5c6"},{keyword:"??",background_color:"#cec5f9"},{keyword:"==",background_color:"#f9f4c6"}]}),Cr(n,"messages",{en:{voice_annotation:"Voice Annotation",now_playing:"Now playing...",previous:"Previous",next:"Next",set_time:"Double-click to update to current player time",edit_annotation:"Edit note",delete_annotation:"Delete note",publish_annotation:"Make note public",import_annotations:"Paste or load notes in this field and press Import.",confirm_delete_message:"You are about to delete {{ annotation.title }}. Are you sure you want to delete it?",confirm_publish_message:"You are about to publish {{ annotation.title }}. Are you sure you want to make it public?",tweet_annotation:"Tweet annotation",external_annotation:"This annotation was submitted to another project",everyone:"Everyone",header:"Annotations for this content",segment_filter:"All cuttings",latest_contributions:"Latest contributions",close_widget:"Close",confirm:"Confirm",cancel:"Cancel",annotation_deletion_delete:"You will delete this annotation",annotation_deletion_sending:"Your deletion request is being sent ... ",annotation_deletion_success:"The annotation has been deleted.",annotation_deletion_error:"There was an error contacting the server. The annotation has not been deleted."},fr:{voice_annotation:"Annotation Vocale",now_playing:"Lecture en cours...",previous:"Précédent",next:"Suivant",set_time:"Double-cliquer pour fixer au temps du lecteur",edit_annotation:"Éditer la note",delete_annotation:"Supprimer la note",publish_annotation:"Rendre la note publique",import_annotations:"Copiez ou chargez des notes dans ce champ et appuyez sur Import",confirm_delete_message:"Vous allez supprimer {{ annotation.title }}. Êtes-vous certain(e) ?",confirm_publish_message:"Vous allez publier {{ annotation.title }}. Êtes-vous certain(e) ?",tweet_annotation:"Tweeter l'annotation",external_annotation:"Cette annotation a été postée sur un autre projet",everyone:"Tous",header:"Annotations sur ce contenu",segment_filter:"Tous les segments",latest_contributions:"Dernières contributions",close_widget:"Fermer",confirm:"Confirmer",cancel:"Annuler",annotation_deletion_delete:"Vous allez supprimer cette annotation",annotation_deletion_sending:"Votre demande de suppression est en cours d'envoi ... ",annotation_deletion_success:"L'annotation a été supprimée.",annotation_deletion_error:"Une erreur s'est produite en contactant le serveur. L'annotation n'a pas été supprimée."}}),Cr(n,"template",'{{#show_header}}<p class="Ldt-AnnotationsList-header">{{#custom_header}}{{custom_header}}{{/custom_header}}{{^custom_header}}{{l10n.header}}{{/custom_header}}</p>{{/show_header}}<div class="Ldt-AnnotationsListWidget"><div class="Ldt-AnnotationsList-ScreenMain">{{#show_filters}}<div class="Ldt-AnnotationsList-Filters">{{#keyword_filter}}<input class="Ldt-AnnotationsList-filter-text" id="Ldt-AnnotationsList-keywordsFilter" type="text" value=""></input>{{/keyword_filter}}{{#user_filter}}<select class="Ldt-AnnotationsList-filter-dropdown" id="Ldt-AnnotationsList-userFilter"><option selected value="">{{l10n.everyone}}</option></select>{{/user_filter}}{{#date_filter}}<label class="Ldt-AnnotationsList-filter-date">Date: <input id="Ldt-AnnotationsList-dateFilter" type="text"></input></label>{{/date_filter}}{{#segment_filter}}<label class="Ldt-AnnotationsList-filter-checkbox"><input type="checkbox" id="Ldt-AnnotationsList-ignoreSegmentsFilter">{{l10n.segment_filter}}</label>{{/segment_filter}}{{#latest_contributions_filter}}<label class="Ldt-AnnotationsList-filter-checkbox"><input type="checkbox" id="Ldt-AnnotationsList-latestContributionsFilter">{{l10n.latest_contributions}}</label>{{/latest_contributions_filter}}</div>{{/show_filters}}{{#show_controls}}<div class="Ldt-AnnotationsList-Controls"><span class="Ldt-AnnotationsList-Control-Prev">{{ l10n.previous }}</span> | <span class="Ldt-AnnotationsList-Control-Next">{{ l10n.next }}</span></div>{{/show_controls}}{{#show_audio}}<div class="Ldt-AnnotationsList-Audio"></div>{{/show_audio}}<ul class="Ldt-AnnotationsList-ul"></ul></div>{{#allow_annotations_deletion}}<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenDelete"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_delete}}<ul class="Ldt-AnnotationsList-ul-ToDelete"></ul><a class="Ldt-AnnotationsList-ConfirmDelete">{{l10n.confirm}}</a> <a class="Ldt-AnnotationsList-CancelDelete">{{l10n.cancel}}</a></div><div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSending"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_sending}}</div><div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSuccess"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_success}}</div><div data.annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenError"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_error}}</div>{{/allow_annotations_deletion}}</div>'),Cr(n,"annotationTemplate",'<li class="Ldt-AnnotationsList-li Ldt-Highlighter-Annotation Ldt-TraceMe" data-annotation="{{ id }}" data-begin="{{ begin_ms }}" data-end="{{ end_ms }}" trace-info="annotation-id:{{id}}, media-id:{{media_id}}" style="{{specific_style}}"><div data-annotation="{{ id }}" class="Ldt-AnnotationsList-ThumbContainer Ldt-AnnotationsList-Annotation-Screen Ldt-AnnotationsList-Annotation-ScreenMain"><a {{#url}}href="{{url}}"{{/url}} draggable="true"><img title="{{^external}}{{ begin }} - {{ end }}{{/external}}{{#external}}{{l10n.external_annotation}}{{/external}}" class="Ldt-AnnotationsList-Thumbnail" src="{{thumbnail}}" />{{#external}}<div title="{{l10n.external_annotation}}" class="Ldt-AnnotationsList-External-Icon"></div>{{/external}}</a></div>{{#allow_annotations_deletion}}<div data-annotation="{{ id }}" class="Ldt-AnnotationsList-DeleteButton">&#10006;</div>{{/allow_annotations_deletion}}{{#show_timecode}}<div title="{{l10n.set_time}}" class="Ldt-AnnotationsList-Duration"><span class="Ldt-AnnotationsList-Begin Ldt-live-editable Ldt-AnnotationsList-TimeEdit" data-editable_value="{{begin}}" data-editable_id="{{id}}" data-editable_field="begin" data-editable_type="timestamp">{{begin}}</span>{{#show_end_time}} - <span class="Ldt-AnnotationsList-End Ldt-live-editable" data-editable_value="{{end}}" data-editable_id="{{id}}" data-editable_field="end" data-editable_type="timestamp">{{end}}</span>{{/show_end_time}}</div>{{/show_timecode}}<h3 class="Ldt-AnnotationsList-Title Ldt-Annotation-Timecode" data-timecode="{{ begin_ms }}" draggable="true">{{#show_title}}<span class="Ldt-AnnotationsList-TitleContent Ldt-live-editable" data-editable_value="{{title}}" data-editable_type="multiline" data-editable_id="{{id}}" data-editable_field="title">{{{htitle}}}</span>{{/show_title}}{{#show_creator}}<span class="Ldt-AnnotationsList-Creator">{{ creator }}</span>{{/show_creator}}</h3><p class="Ldt-AnnotationsList-Description Ldt-live-editable" data-editable_type="multiline" data-editable_value="{{description}}" data-editable_id="{{id}}" data-editable_field="description">{{{hdescription}}}</p>{{#created}}<div class="Ldt-AnnotationsList-CreationDate">{{{created}}}</div>{{/created}}{{#tags.length}}<ul class="Ldt-AnnotationsList-Tags">{{#tags}}{{#.}}<li class="Ldt-AnnotationsList-Tag-Li"><span>{{.}}</span></li>{{/.}}{{/tags}}</ul>{{/tags.length}}{{#audio}}<div class="Ldt-AnnotationsList-Play" data-annotation-id="{{id}}">{{l10n.voice_annotation}}</div>{{/audio}}<div class="Ldt-AnnotationsList-EditControls">{{#show_twitter}}<a title="{{l10n.tweet_annotation}}" target="_blank" href="https://twitter.com/intent/tweet?{{twitter_param}}"><img width="16" height="16" src="metadataplayer/img/twitter.svg"></a>{{/show_twitter}}{{#show_publish}}<div title="{{l10n.publish_annotation}}" class="Ldt-AnnotationsList-PublishAnnotation" data-editable_id="{{id}}"></div>{{/show_publish}}{{#editable}}<div title="{{l10n.edit_annotation}}" class="Ldt-AnnotationsList-Edit" data-editable_id="{{id}}"></div><div title="{{l10n.delete_annotation}}" class="Ldt-AnnotationsList-Delete" data-editable_id="{{id}}"></div>{{/editable}}</div></li>'),n};var raphael_min={exports:{}};(function(t,n){(function(l,d){t.exports=d()})(window,function(){return function(l){var d={};function m(h){if(d[h])return d[h].exports;var S=d[h]={i:h,l:!1,exports:{}};return l[h].call(S.exports,S,S.exports,m),S.l=!0,S.exports}return m.m=l,m.c=d,m.d=function(h,S,k){m.o(h,S)||Object.defineProperty(h,S,{enumerable:!0,get:k})},m.r=function(h){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})},m.t=function(h,S){if(1&S&&(h=m(h)),8&S||4&S&&typeof h=="object"&&h&&h.__esModule)return h;var k=Object.create(null);if(m.r(k),Object.defineProperty(k,"default",{enumerable:!0,value:h}),2&S&&typeof h!="string")for(var A in h)m.d(k,A,(function(B){return h[B]}).bind(null,A));return k},m.n=function(h){var S=h&&h.__esModule?function(){return h.default}:function(){return h};return m.d(S,"a",S),S},m.o=function(h,S){return Object.prototype.hasOwnProperty.call(h,S)},m.p="",m(m.s=1)}([function(l,d,m){var h,S;h=[m(2)],(S=(function(k){function A(ae){if(A.is(ae,"function"))return B?ae():k.on("raphael.DOMload",ae);if(A.is(ae,v))return A._engine.create[U](A,ae.splice(0,3+A.is(ae[0],w))).add(ae);var ye=Array.prototype.slice.call(arguments,0);if(A.is(ye[ye.length-1],"function")){var Ce=ye.pop();return B?Ce.call(A._engine.create[U](A,ye)):k.on("raphael.DOMload",function(){Ce.call(A._engine.create[U](A,ye))})}return A._engine.create[U](A,arguments)}A.version="2.3.0",A.eve=k;var B,M,j=/[, ]+/,I={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},P=/\{(\d+)\}/g,$="hasOwnProperty",z={doc:document,win:window},N={was:Object.prototype[$].call(z.win,"Raphael"),is:z.win.Raphael},F=function(){this.ca=this.customAttributes={}},U="apply",J="concat",te="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,se="",de=" ",Q=String,ve="split",he="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[ve](de),ke={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},T=Q.prototype.toLowerCase,u=Math,p=u.max,b=u.min,e=u.abs,c=u.pow,y=u.PI,w="number",v="array",o=Object.prototype.toString,x=(A._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),E={NaN:1,Infinity:1,"-Infinity":1},R=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,H=u.round,Y=parseFloat,Z=parseInt,L=Q.prototype.toUpperCase,D=A._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},ee=A._availableAnimAttrs={blur:w,"clip-rect":"csv",cx:w,cy:w,fill:"colour","fill-opacity":w,"font-size":w,height:w,opacity:w,path:"path",r:w,rx:w,ry:w,stroke:"colour","stroke-opacity":w,"stroke-width":w,transform:"transform",width:w,x:w,y:w},oe=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,fe={hs:1,rg:1},ue=/,?([achlmqrstvxz]),?/gi,qe=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,rt=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Ve=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,et=(A._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),mt=function(ae,ye){return Y(ae)-Y(ye)},Ye=function(ae){return ae},We=A._rectPath=function(ae,ye,Ce,Pe,ze){return ze?[["M",ae+ze,ye],["l",Ce-2*ze,0],["a",ze,ze,0,0,1,ze,ze],["l",0,Pe-2*ze],["a",ze,ze,0,0,1,-ze,ze],["l",2*ze-Ce,0],["a",ze,ze,0,0,1,-ze,-ze],["l",0,2*ze-Pe],["a",ze,ze,0,0,1,ze,-ze],["z"]]:[["M",ae,ye],["l",Ce,0],["l",0,Pe],["l",-Ce,0],["z"]]},Xe=function(ae,ye,Ce,Pe){return Pe==null&&(Pe=Ce),[["M",ae,ye],["m",0,-Pe],["a",Ce,Pe,0,1,1,0,2*Pe],["a",Ce,Pe,0,1,1,0,-2*Pe],["z"]]},Ge=A._getPath={path:function(ae){return ae.attr("path")},circle:function(ae){var ye=ae.attrs;return Xe(ye.cx,ye.cy,ye.r)},ellipse:function(ae){var ye=ae.attrs;return Xe(ye.cx,ye.cy,ye.rx,ye.ry)},rect:function(ae){var ye=ae.attrs;return We(ye.x,ye.y,ye.width,ye.height,ye.r)},image:function(ae){var ye=ae.attrs;return We(ye.x,ye.y,ye.width,ye.height)},text:function(ae){var ye=ae._getBBox();return We(ye.x,ye.y,ye.width,ye.height)},set:function(ae){var ye=ae._getBBox();return We(ye.x,ye.y,ye.width,ye.height)}},nt=A.mapPath=function(ae,ye){if(!ye)return ae;var Ce,Pe,ze,Je,ge,we,Ae;for(ze=0,ge=(ae=Ot(ae)).length;ze<ge;ze++)for(Je=1,we=(Ae=ae[ze]).length;Je<we;Je+=2)Ce=ye.x(Ae[Je],Ae[Je+1]),Pe=ye.y(Ae[Je],Ae[Je+1]),Ae[Je]=Ce,Ae[Je+1]=Pe;return ae};if(A._g=z,A.type=z.win.SVGAngle||z.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",A.type=="VML"){var Et,Le=z.doc.createElement("div");if(Le.innerHTML='<v:shape adj="1"/>',(Et=Le.firstChild).style.behavior="url(#default#VML)",!Et||typeof Et.adj!="object")return A.type=se;Le=null}function Oe(ae){if(typeof ae=="function"||Object(ae)!==ae)return ae;var ye=new ae.constructor;for(var Ce in ae)ae[$](Ce)&&(ye[Ce]=Oe(ae[Ce]));return ye}A.svg=!(A.vml=A.type=="VML"),A._Paper=F,A.fn=M=F.prototype=A.prototype,A._id=0,A.is=function(ae,ye){return(ye=T.call(ye))=="finite"?!E[$](+ae):ye=="array"?ae instanceof Array:ye=="null"&&ae===null||ye==typeof ae&&ae!==null||ye=="object"&&ae===Object(ae)||ye=="array"&&Array.isArray&&Array.isArray(ae)||o.call(ae).slice(8,-1).toLowerCase()==ye},A.angle=function(ae,ye,Ce,Pe,ze,Je){if(ze==null){var ge=ae-Ce,we=ye-Pe;return ge||we?(180+180*u.atan2(-we,-ge)/y+360)%360:0}return A.angle(ae,ye,ze,Je)-A.angle(Ce,Pe,ze,Je)},A.rad=function(ae){return ae%360*y/180},A.deg=function(ae){return Math.round(180*ae/y%360*1e3)/1e3},A.snapTo=function(ae,ye,Ce){if(Ce=A.is(Ce,"finite")?Ce:10,A.is(ae,v)){for(var Pe=ae.length;Pe--;)if(e(ae[Pe]-ye)<=Ce)return ae[Pe]}else{var ze=ye%(ae=+ae);if(ze<Ce)return ye-ze;if(ze>ae-Ce)return ye-ze+ae}return ye};var $t,dt;A.createUUID=($t=/[xy]/g,dt=function(ae){var ye=16*u.random()|0;return(ae=="x"?ye:3&ye|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace($t,dt).toUpperCase()}),A.setWindow=function(ae){k("raphael.setWindow",A,z.win,ae),z.win=ae,z.doc=z.win.document,A._engine.initWin&&A._engine.initWin(z.win)};var gt=function(ae){if(A.vml){var ye,Ce=/^\s+|\s+$/g;try{var Pe=new ActiveXObject("htmlfile");Pe.write("<body>"),Pe.close(),ye=Pe.body}catch{ye=createPopup().document.body}var ze=ye.createTextRange();gt=$e(function(ge){try{ye.style.color=Q(ge).replace(Ce,se);var we=ze.queryCommandValue("ForeColor");return"#"+("000000"+(we=(255&we)<<16|65280&we|(16711680&we)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var Je=z.doc.createElement("i");Je.title="Raphaël Colour Picker",Je.style.display="none",z.doc.body.appendChild(Je),gt=$e(function(ge){return Je.style.color=ge,z.doc.defaultView.getComputedStyle(Je,se).getPropertyValue("color")})}return gt(ae)},Lt=function(){return"hsb("+[this.h,this.s,this.b]+")"},xe=function(){return"hsl("+[this.h,this.s,this.l]+")"},X=function(){return this.hex},pe=function(ae,ye,Ce){if(ye==null&&A.is(ae,"object")&&"r"in ae&&"g"in ae&&"b"in ae&&(Ce=ae.b,ye=ae.g,ae=ae.r),ye==null&&A.is(ae,"string")){var Pe=A.getRGB(ae);ae=Pe.r,ye=Pe.g,Ce=Pe.b}return(ae>1||ye>1||Ce>1)&&(ae/=255,ye/=255,Ce/=255),[ae,ye,Ce]},je=function(ae,ye,Ce,Pe){var ze={r:ae*=255,g:ye*=255,b:Ce*=255,hex:A.rgb(ae,ye,Ce),toString:X};return A.is(Pe,"finite")&&(ze.opacity=Pe),ze};function $e(ae,ye,Ce){return function Pe(){var ze=Array.prototype.slice.call(arguments,0),Je=ze.join("␀"),ge=Pe.cache=Pe.cache||{},we=Pe.count=Pe.count||[];return ge[$](Je)?(function(Ae,Ue){for(var ht=0,_t=Ae.length;ht<_t;ht++)if(Ae[ht]===Ue)return Ae.push(Ae.splice(ht,1)[0])}(we,Je),Ce?Ce(ge[Je]):ge[Je]):(we.length>=1e3&&delete ge[we.shift()],we.push(Je),ge[Je]=ae[U](ye,ze),Ce?Ce(ge[Je]):ge[Je])}}A.color=function(ae){var ye;return A.is(ae,"object")&&"h"in ae&&"s"in ae&&"b"in ae?(ye=A.hsb2rgb(ae),ae.r=ye.r,ae.g=ye.g,ae.b=ye.b,ae.hex=ye.hex):A.is(ae,"object")&&"h"in ae&&"s"in ae&&"l"in ae?(ye=A.hsl2rgb(ae),ae.r=ye.r,ae.g=ye.g,ae.b=ye.b,ae.hex=ye.hex):(A.is(ae,"string")&&(ae=A.getRGB(ae)),A.is(ae,"object")&&"r"in ae&&"g"in ae&&"b"in ae?(ye=A.rgb2hsl(ae),ae.h=ye.h,ae.s=ye.s,ae.l=ye.l,ye=A.rgb2hsb(ae),ae.v=ye.b):(ae={hex:"none"}).r=ae.g=ae.b=ae.h=ae.s=ae.v=ae.l=-1),ae.toString=X,ae},A.hsb2rgb=function(ae,ye,Ce,Pe){var ze,Je,ge,we,Ae;return this.is(ae,"object")&&"h"in ae&&"s"in ae&&"b"in ae&&(Ce=ae.b,ye=ae.s,Pe=ae.o,ae=ae.h),we=(Ae=Ce*ye)*(1-e((ae=(ae*=360)%360/60)%2-1)),ze=Je=ge=Ce-Ae,je(ze+=[Ae,we,0,0,we,Ae][ae=~~ae],Je+=[we,Ae,Ae,we,0,0][ae],ge+=[0,0,we,Ae,Ae,we][ae],Pe)},A.hsl2rgb=function(ae,ye,Ce,Pe){var ze,Je,ge,we,Ae;return this.is(ae,"object")&&"h"in ae&&"s"in ae&&"l"in ae&&(Ce=ae.l,ye=ae.s,ae=ae.h),(ae>1||ye>1||Ce>1)&&(ae/=360,ye/=100,Ce/=100),we=(Ae=2*ye*(Ce<.5?Ce:1-Ce))*(1-e((ae=(ae*=360)%360/60)%2-1)),ze=Je=ge=Ce-Ae/2,je(ze+=[Ae,we,0,0,we,Ae][ae=~~ae],Je+=[we,Ae,Ae,we,0,0][ae],ge+=[0,0,we,Ae,Ae,we][ae],Pe)},A.rgb2hsb=function(ae,ye,Ce){var Pe,ze;return ae=(Ce=pe(ae,ye,Ce))[0],ye=Ce[1],Ce=Ce[2],{h:(((ze=(Pe=p(ae,ye,Ce))-b(ae,ye,Ce))==0?null:Pe==ae?(ye-Ce)/ze:Pe==ye?(Ce-ae)/ze+2:(ae-ye)/ze+4)+360)%6*60/360,s:ze==0?0:ze/Pe,b:Pe,toString:Lt}},A.rgb2hsl=function(ae,ye,Ce){var Pe,ze,Je,ge;return ae=(Ce=pe(ae,ye,Ce))[0],ye=Ce[1],Ce=Ce[2],Pe=((ze=p(ae,ye,Ce))+(Je=b(ae,ye,Ce)))/2,{h:(((ge=ze-Je)==0?null:ze==ae?(ye-Ce)/ge:ze==ye?(Ce-ae)/ge+2:(ae-ye)/ge+4)+360)%6*60/360,s:ge==0?0:Pe<.5?ge/(2*Pe):ge/(2-2*Pe),l:Pe,toString:xe}},A._path2string=function(){return this.join(",").replace(ue,"$1")},A._preload=function(ae,ye){var Ce=z.doc.createElement("img");Ce.style.cssText="position:absolute;left:-9999em;top:-9999em",Ce.onload=function(){ye.call(this),this.onload=null,z.doc.body.removeChild(this)},Ce.onerror=function(){z.doc.body.removeChild(this)},z.doc.body.appendChild(Ce),Ce.src=ae};function He(){return this.hex}function Fe(ae,ye){for(var Ce=[],Pe=0,ze=ae.length;ze-2*!ye>Pe;Pe+=2){var Je=[{x:+ae[Pe-2],y:+ae[Pe-1]},{x:+ae[Pe],y:+ae[Pe+1]},{x:+ae[Pe+2],y:+ae[Pe+3]},{x:+ae[Pe+4],y:+ae[Pe+5]}];ye?Pe?ze-4==Pe?Je[3]={x:+ae[0],y:+ae[1]}:ze-2==Pe&&(Je[2]={x:+ae[0],y:+ae[1]},Je[3]={x:+ae[2],y:+ae[3]}):Je[0]={x:+ae[ze-2],y:+ae[ze-1]}:ze-4==Pe?Je[3]=Je[2]:Pe||(Je[0]={x:+ae[Pe],y:+ae[Pe+1]}),Ce.push(["C",(-Je[0].x+6*Je[1].x+Je[2].x)/6,(-Je[0].y+6*Je[1].y+Je[2].y)/6,(Je[1].x+6*Je[2].x-Je[3].x)/6,(Je[1].y+6*Je[2].y-Je[3].y)/6,Je[2].x,Je[2].y])}return Ce}A.getRGB=$e(function(ae){if(!ae||(ae=Q(ae)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:He};if(ae=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:He};!fe[$](ae.toLowerCase().substring(0,2))&&ae.charAt()!="#"&&(ae=gt(ae));var ye,Ce,Pe,ze,Je,ge,we=ae.match(x);return we?(we[2]&&(Pe=Z(we[2].substring(5),16),Ce=Z(we[2].substring(3,5),16),ye=Z(we[2].substring(1,3),16)),we[3]&&(Pe=Z((Je=we[3].charAt(3))+Je,16),Ce=Z((Je=we[3].charAt(2))+Je,16),ye=Z((Je=we[3].charAt(1))+Je,16)),we[4]&&(ge=we[4][ve](oe),ye=Y(ge[0]),ge[0].slice(-1)=="%"&&(ye*=2.55),Ce=Y(ge[1]),ge[1].slice(-1)=="%"&&(Ce*=2.55),Pe=Y(ge[2]),ge[2].slice(-1)=="%"&&(Pe*=2.55),we[1].toLowerCase().slice(0,4)=="rgba"&&(ze=Y(ge[3])),ge[3]&&ge[3].slice(-1)=="%"&&(ze/=100)),we[5]?(ge=we[5][ve](oe),ye=Y(ge[0]),ge[0].slice(-1)=="%"&&(ye*=2.55),Ce=Y(ge[1]),ge[1].slice(-1)=="%"&&(Ce*=2.55),Pe=Y(ge[2]),ge[2].slice(-1)=="%"&&(Pe*=2.55),(ge[0].slice(-3)=="deg"||ge[0].slice(-1)=="°")&&(ye/=360),we[1].toLowerCase().slice(0,4)=="hsba"&&(ze=Y(ge[3])),ge[3]&&ge[3].slice(-1)=="%"&&(ze/=100),A.hsb2rgb(ye,Ce,Pe,ze)):we[6]?(ge=we[6][ve](oe),ye=Y(ge[0]),ge[0].slice(-1)=="%"&&(ye*=2.55),Ce=Y(ge[1]),ge[1].slice(-1)=="%"&&(Ce*=2.55),Pe=Y(ge[2]),ge[2].slice(-1)=="%"&&(Pe*=2.55),(ge[0].slice(-3)=="deg"||ge[0].slice(-1)=="°")&&(ye/=360),we[1].toLowerCase().slice(0,4)=="hsla"&&(ze=Y(ge[3])),ge[3]&&ge[3].slice(-1)=="%"&&(ze/=100),A.hsl2rgb(ye,Ce,Pe,ze)):((we={r:ye,g:Ce,b:Pe,toString:He}).hex="#"+(16777216|Pe|Ce<<8|ye<<16).toString(16).slice(1),A.is(ze,"finite")&&(we.opacity=ze),we)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:He}},A),A.hsb=$e(function(ae,ye,Ce){return A.hsb2rgb(ae,ye,Ce).hex}),A.hsl=$e(function(ae,ye,Ce){return A.hsl2rgb(ae,ye,Ce).hex}),A.rgb=$e(function(ae,ye,Ce){function Pe(ze){return ze+.5|0}return"#"+(16777216|Pe(Ce)|Pe(ye)<<8|Pe(ae)<<16).toString(16).slice(1)}),A.getColor=function(ae){var ye=this.getColor.start=this.getColor.start||{h:0,s:1,b:ae||.75},Ce=this.hsb2rgb(ye.h,ye.s,ye.b);return ye.h+=.075,ye.h>1&&(ye.h=0,ye.s-=.2,ye.s<=0&&(this.getColor.start={h:0,s:1,b:ye.b})),Ce.hex},A.getColor.reset=function(){delete this.start},A.parsePathString=function(ae){if(!ae)return null;var ye=Me(ae);if(ye.arr)return ot(ye.arr);var Ce={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},Pe=[];return A.is(ae,v)&&A.is(ae[0],v)&&(Pe=ot(ae)),Pe.length||Q(ae).replace(qe,function(ze,Je,ge){var we=[],Ae=Je.toLowerCase();if(ge.replace(Ve,function(Ue,ht){ht&&we.push(+ht)}),Ae=="m"&&we.length>2&&(Pe.push([Je][J](we.splice(0,2))),Ae="l",Je=Je=="m"?"l":"L"),Ae=="r")Pe.push([Je][J](we));else for(;we.length>=Ce[Ae]&&(Pe.push([Je][J](we.splice(0,Ce[Ae]))),Ce[Ae]););}),Pe.toString=A._path2string,ye.arr=ot(Pe),Pe},A.parseTransformString=$e(function(ae){if(!ae)return null;var ye=[];return A.is(ae,v)&&A.is(ae[0],v)&&(ye=ot(ae)),ye.length||Q(ae).replace(rt,function(Ce,Pe,ze){var Je=[];T.call(Pe),ze.replace(Ve,function(ge,we){we&&Je.push(+we)}),ye.push([Pe][J](Je))}),ye.toString=A._path2string,ye},this,function(ae){if(!ae)return ae;for(var ye=[],Ce=0;Ce<ae.length;Ce++){for(var Pe=[],ze=0;ze<ae[Ce].length;ze++)Pe.push(ae[Ce][ze]);ye.push(Pe)}return ye});var Me=function(ae){var ye=Me.ps=Me.ps||{};return ye[ae]?ye[ae].sleep=100:ye[ae]={sleep:100},setTimeout(function(){for(var Ce in ye)ye[$](Ce)&&Ce!=ae&&(ye[Ce].sleep--,!ye[Ce].sleep&&delete ye[Ce])}),ye[ae]};function Rt(ae,ye,Ce,Pe,ze){return ae*(ae*(-3*ye+9*Ce-9*Pe+3*ze)+6*ye-12*Ce+6*Pe)-3*ye+3*Ce}function yt(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){Ae==null&&(Ae=1);for(var Ue=(Ae=Ae>1?1:Ae<0?0:Ae)/2,ht=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],_t=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],Ct=0,At=0;At<12;At++){var Qt=Ue*ht[At]+Ue,ir=Rt(Qt,ae,Ce,ze,ge),tr=Rt(Qt,ye,Pe,Je,we),Zt=ir*ir+tr*tr;Ct+=_t[At]*u.sqrt(Zt)}return Ue*Ct}function le(ae,ye,Ce,Pe,ze,Je,ge,we){if(!(p(ae,Ce)<b(ze,ge)||b(ae,Ce)>p(ze,ge)||p(ye,Pe)<b(Je,we)||b(ye,Pe)>p(Je,we))){var Ae=(ae-Ce)*(Je-we)-(ye-Pe)*(ze-ge);if(Ae){var Ue=((ae*Pe-ye*Ce)*(ze-ge)-(ae-Ce)*(ze*we-Je*ge))/Ae,ht=((ae*Pe-ye*Ce)*(Je-we)-(ye-Pe)*(ze*we-Je*ge))/Ae,_t=+Ue.toFixed(2),Ct=+ht.toFixed(2);if(!(_t<+b(ae,Ce).toFixed(2)||_t>+p(ae,Ce).toFixed(2)||_t<+b(ze,ge).toFixed(2)||_t>+p(ze,ge).toFixed(2)||Ct<+b(ye,Pe).toFixed(2)||Ct>+p(ye,Pe).toFixed(2)||Ct<+b(Je,we).toFixed(2)||Ct>+p(Je,we).toFixed(2)))return{x:Ue,y:ht}}}}function wt(ae,ye,Ce){var Pe=A.bezierBBox(ae),ze=A.bezierBBox(ye);if(!A.isBBoxIntersect(Pe,ze))return Ce?0:[];for(var Je=yt.apply(0,ae),ge=yt.apply(0,ye),we=p(~~(Je/5),1),Ae=p(~~(ge/5),1),Ue=[],ht=[],_t={},Ct=Ce?0:[],At=0;At<we+1;At++){var Qt=A.findDotsAtSegment.apply(A,ae.concat(At/we));Ue.push({x:Qt.x,y:Qt.y,t:At/we})}for(At=0;At<Ae+1;At++)Qt=A.findDotsAtSegment.apply(A,ye.concat(At/Ae)),ht.push({x:Qt.x,y:Qt.y,t:At/Ae});for(At=0;At<we;At++)for(var ir=0;ir<Ae;ir++){var tr=Ue[At],Zt=Ue[At+1],Br=ht[ir],pr=ht[ir+1],_r=e(Zt.x-tr.x)<.001?"y":"x",fr=e(pr.x-Br.x)<.001?"y":"x",Gr=le(tr.x,tr.y,Zt.x,Zt.y,Br.x,Br.y,pr.x,pr.y);if(Gr){if(_t[Gr.x.toFixed(4)]==Gr.y.toFixed(4))continue;_t[Gr.x.toFixed(4)]=Gr.y.toFixed(4);var Nr=tr.t+e((Gr[_r]-tr[_r])/(Zt[_r]-tr[_r]))*(Zt.t-tr.t),Zr=Br.t+e((Gr[fr]-Br[fr])/(pr[fr]-Br[fr]))*(pr.t-Br.t);Nr>=0&&Nr<=1.001&&Zr>=0&&Zr<=1.001&&(Ce?Ct++:Ct.push({x:Gr.x,y:Gr.y,t1:b(Nr,1),t2:b(Zr,1)}))}}return Ct}function at(ae,ye,Ce){ae=A._path2curve(ae),ye=A._path2curve(ye);for(var Pe,ze,Je,ge,we,Ae,Ue,ht,_t,Ct,At=Ce?0:[],Qt=0,ir=ae.length;Qt<ir;Qt++){var tr=ae[Qt];if(tr[0]=="M")Pe=we=tr[1],ze=Ae=tr[2];else{tr[0]=="C"?(_t=[Pe,ze].concat(tr.slice(1)),Pe=_t[6],ze=_t[7]):(_t=[Pe,ze,Pe,ze,we,Ae,we,Ae],Pe=we,ze=Ae);for(var Zt=0,Br=ye.length;Zt<Br;Zt++){var pr=ye[Zt];if(pr[0]=="M")Je=Ue=pr[1],ge=ht=pr[2];else{pr[0]=="C"?(Ct=[Je,ge].concat(pr.slice(1)),Je=Ct[6],ge=Ct[7]):(Ct=[Je,ge,Je,ge,Ue,ht,Ue,ht],Je=Ue,ge=ht);var _r=wt(_t,Ct,Ce);if(Ce)At+=_r;else{for(var fr=0,Gr=_r.length;fr<Gr;fr++)_r[fr].segment1=Qt,_r[fr].segment2=Zt,_r[fr].bez1=_t,_r[fr].bez2=Ct;At=At.concat(_r)}}}}}return At}A.findDotsAtSegment=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){var Ue=1-Ae,ht=c(Ue,3),_t=c(Ue,2),Ct=Ae*Ae,At=Ct*Ae,Qt=ht*ae+3*_t*Ae*Ce+3*Ue*Ae*Ae*ze+At*ge,ir=ht*ye+3*_t*Ae*Pe+3*Ue*Ae*Ae*Je+At*we,tr=ae+2*Ae*(Ce-ae)+Ct*(ze-2*Ce+ae),Zt=ye+2*Ae*(Pe-ye)+Ct*(Je-2*Pe+ye),Br=Ce+2*Ae*(ze-Ce)+Ct*(ge-2*ze+Ce),pr=Pe+2*Ae*(Je-Pe)+Ct*(we-2*Je+Pe),_r=Ue*ae+Ae*Ce,fr=Ue*ye+Ae*Pe,Gr=Ue*ze+Ae*ge,Nr=Ue*Je+Ae*we,Zr=90-180*u.atan2(tr-Br,Zt-pr)/y;return(tr>Br||Zt<pr)&&(Zr+=180),{x:Qt,y:ir,m:{x:tr,y:Zt},n:{x:Br,y:pr},start:{x:_r,y:fr},end:{x:Gr,y:Nr},alpha:Zr}},A.bezierBBox=function(ae,ye,Ce,Pe,ze,Je,ge,we){A.is(ae,"array")||(ae=[ae,ye,Ce,Pe,ze,Je,ge,we]);var Ae=Pt.apply(null,ae);return{x:Ae.min.x,y:Ae.min.y,x2:Ae.max.x,y2:Ae.max.y,width:Ae.max.x-Ae.min.x,height:Ae.max.y-Ae.min.y}},A.isPointInsideBBox=function(ae,ye,Ce){return ye>=ae.x&&ye<=ae.x2&&Ce>=ae.y&&Ce<=ae.y2},A.isBBoxIntersect=function(ae,ye){var Ce=A.isPointInsideBBox;return Ce(ye,ae.x,ae.y)||Ce(ye,ae.x2,ae.y)||Ce(ye,ae.x,ae.y2)||Ce(ye,ae.x2,ae.y2)||Ce(ae,ye.x,ye.y)||Ce(ae,ye.x2,ye.y)||Ce(ae,ye.x,ye.y2)||Ce(ae,ye.x2,ye.y2)||(ae.x<ye.x2&&ae.x>ye.x||ye.x<ae.x2&&ye.x>ae.x)&&(ae.y<ye.y2&&ae.y>ye.y||ye.y<ae.y2&&ye.y>ae.y)},A.pathIntersection=function(ae,ye){return at(ae,ye)},A.pathIntersectionNumber=function(ae,ye){return at(ae,ye,1)},A.isPointInsidePath=function(ae,ye,Ce){var Pe=A.pathBBox(ae);return A.isPointInsideBBox(Pe,ye,Ce)&&at(ae,[["M",ye,Ce],["H",Pe.x2+10]],1)%2==1},A._removedFactory=function(ae){return function(){k("raphael.log",null,"Raphaël: you are calling to method “"+ae+"” of removed object",ae)}};var Be=A.pathBBox=function(ae){var ye=Me(ae);if(ye.bbox)return Oe(ye.bbox);if(!ae)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var Ce,Pe=0,ze=0,Je=[],ge=[],we=0,Ae=(ae=Ot(ae)).length;we<Ae;we++)if((Ce=ae[we])[0]=="M")Pe=Ce[1],ze=Ce[2],Je.push(Pe),ge.push(ze);else{var Ue=Pt(Pe,ze,Ce[1],Ce[2],Ce[3],Ce[4],Ce[5],Ce[6]);Je=Je[J](Ue.min.x,Ue.max.x),ge=ge[J](Ue.min.y,Ue.max.y),Pe=Ce[5],ze=Ce[6]}var ht=b[U](0,Je),_t=b[U](0,ge),Ct=p[U](0,Je),At=p[U](0,ge),Qt=Ct-ht,ir=At-_t,tr={x:ht,y:_t,x2:Ct,y2:At,width:Qt,height:ir,cx:ht+Qt/2,cy:_t+ir/2};return ye.bbox=Oe(tr),tr},ot=function(ae){var ye=Oe(ae);return ye.toString=A._path2string,ye},tt=A._pathToRelative=function(ae){var ye=Me(ae);if(ye.rel)return ot(ye.rel);A.is(ae,v)&&A.is(ae&&ae[0],v)||(ae=A.parsePathString(ae));var Ce=[],Pe=0,ze=0,Je=0,ge=0,we=0;ae[0][0]=="M"&&(Je=Pe=ae[0][1],ge=ze=ae[0][2],we++,Ce.push(["M",Pe,ze]));for(var Ae=we,Ue=ae.length;Ae<Ue;Ae++){var ht=Ce[Ae]=[],_t=ae[Ae];if(_t[0]!=T.call(_t[0]))switch(ht[0]=T.call(_t[0]),ht[0]){case"a":ht[1]=_t[1],ht[2]=_t[2],ht[3]=_t[3],ht[4]=_t[4],ht[5]=_t[5],ht[6]=+(_t[6]-Pe).toFixed(3),ht[7]=+(_t[7]-ze).toFixed(3);break;case"v":ht[1]=+(_t[1]-ze).toFixed(3);break;case"m":Je=_t[1],ge=_t[2];default:for(var Ct=1,At=_t.length;Ct<At;Ct++)ht[Ct]=+(_t[Ct]-(Ct%2?Pe:ze)).toFixed(3)}else{ht=Ce[Ae]=[],_t[0]=="m"&&(Je=_t[1]+Pe,ge=_t[2]+ze);for(var Qt=0,ir=_t.length;Qt<ir;Qt++)Ce[Ae][Qt]=_t[Qt]}var tr=Ce[Ae].length;switch(Ce[Ae][0]){case"z":Pe=Je,ze=ge;break;case"h":Pe+=+Ce[Ae][tr-1];break;case"v":ze+=+Ce[Ae][tr-1];break;default:Pe+=+Ce[Ae][tr-2],ze+=+Ce[Ae][tr-1]}}return Ce.toString=A._path2string,ye.rel=ot(Ce),Ce},kt=A._pathToAbsolute=function(ae){var ye=Me(ae);if(ye.abs)return ot(ye.abs);if(A.is(ae,v)&&A.is(ae&&ae[0],v)||(ae=A.parsePathString(ae)),!ae||!ae.length)return[["M",0,0]];var Ce=[],Pe=0,ze=0,Je=0,ge=0,we=0;ae[0][0]=="M"&&(Je=Pe=+ae[0][1],ge=ze=+ae[0][2],we++,Ce[0]=["M",Pe,ze]);for(var Ae,Ue,ht=ae.length==3&&ae[0][0]=="M"&&ae[1][0].toUpperCase()=="R"&&ae[2][0].toUpperCase()=="Z",_t=we,Ct=ae.length;_t<Ct;_t++){if(Ce.push(Ae=[]),(Ue=ae[_t])[0]!=L.call(Ue[0]))switch(Ae[0]=L.call(Ue[0]),Ae[0]){case"A":Ae[1]=Ue[1],Ae[2]=Ue[2],Ae[3]=Ue[3],Ae[4]=Ue[4],Ae[5]=Ue[5],Ae[6]=+(Ue[6]+Pe),Ae[7]=+(Ue[7]+ze);break;case"V":Ae[1]=+Ue[1]+ze;break;case"H":Ae[1]=+Ue[1]+Pe;break;case"R":for(var At=[Pe,ze][J](Ue.slice(1)),Qt=2,ir=At.length;Qt<ir;Qt++)At[Qt]=+At[Qt]+Pe,At[++Qt]=+At[Qt]+ze;Ce.pop(),Ce=Ce[J](Fe(At,ht));break;case"M":Je=+Ue[1]+Pe,ge=+Ue[2]+ze;default:for(Qt=1,ir=Ue.length;Qt<ir;Qt++)Ae[Qt]=+Ue[Qt]+(Qt%2?Pe:ze)}else if(Ue[0]=="R")At=[Pe,ze][J](Ue.slice(1)),Ce.pop(),Ce=Ce[J](Fe(At,ht)),Ae=["R"][J](Ue.slice(-2));else for(var tr=0,Zt=Ue.length;tr<Zt;tr++)Ae[tr]=Ue[tr];switch(Ae[0]){case"Z":Pe=Je,ze=ge;break;case"H":Pe=Ae[1];break;case"V":ze=Ae[1];break;case"M":Je=Ae[Ae.length-2],ge=Ae[Ae.length-1];default:Pe=Ae[Ae.length-2],ze=Ae[Ae.length-1]}}return Ce.toString=A._path2string,ye.abs=ot(Ce),Ce},Yt=function(ae,ye,Ce,Pe){return[ae,ye,Ce,Pe,Ce,Pe]},pt=function(ae,ye,Ce,Pe,ze,Je){return[1/3*ae+2/3*Ce,1/3*ye+2/3*Pe,1/3*ze+2/3*Ce,1/3*Je+2/3*Pe,ze,Je]},It=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae,Ue){var ht,_t=120*y/180,Ct=y/180*(+ze||0),At=[],Qt=$e(function(V,ie,be){return{x:V*u.cos(be)-ie*u.sin(be),y:V*u.sin(be)+ie*u.cos(be)}});if(Ue)Nr=Ue[0],Zr=Ue[1],fr=Ue[2],Gr=Ue[3];else{ae=(ht=Qt(ae,ye,-Ct)).x,ye=ht.y,we=(ht=Qt(we,Ae,-Ct)).x,Ae=ht.y;var ir=(ae-we)/2,tr=(ye-Ae)/2,Zt=ir*ir/(Ce*Ce)+tr*tr/(Pe*Pe);Zt>1&&(Ce*=Zt=u.sqrt(Zt),Pe*=Zt);var Br=Ce*Ce,pr=Pe*Pe,_r=(Je==ge?-1:1)*u.sqrt(e((Br*pr-Br*tr*tr-pr*ir*ir)/(Br*tr*tr+pr*ir*ir))),fr=_r*Ce*tr/Pe+(ae+we)/2,Gr=_r*-Pe*ir/Ce+(ye+Ae)/2,Nr=u.asin(((ye-Gr)/Pe).toFixed(9)),Zr=u.asin(((Ae-Gr)/Pe).toFixed(9));(Nr=ae<fr?y-Nr:Nr)<0&&(Nr=2*y+Nr),(Zr=we<fr?y-Zr:Zr)<0&&(Zr=2*y+Zr),ge&&Nr>Zr&&(Nr-=2*y),!ge&&Zr>Nr&&(Zr-=2*y)}var Sn=Zr-Nr;if(e(Sn)>_t){var qn=Zr,ii=we,si=Ae;Zr=Nr+_t*(ge&&Zr>Nr?1:-1),we=fr+Ce*u.cos(Zr),Ae=Gr+Pe*u.sin(Zr),At=It(we,Ae,Ce,Pe,ze,0,ge,ii,si,[Zr,qn,fr,Gr])}Sn=Zr-Nr;var vn=u.cos(Nr),on=u.sin(Nr),Bn=u.cos(Zr),Hi=u.sin(Zr),Xi=u.tan(Sn/4),Kn=4/3*Ce*Xi,ta=4/3*Pe*Xi,ma=[ae,ye],yi=[ae+Kn*on,ye-ta*vn],Rn=[we+Kn*Hi,Ae-ta*Bn],Ui=[we,Ae];if(yi[0]=2*ma[0]-yi[0],yi[1]=2*ma[1]-yi[1],Ue)return[yi,Rn,Ui][J](At);for(var ra=[],Wi=0,Bi=(At=[yi,Rn,Ui][J](At).join()[ve](",")).length;Wi<Bi;Wi++)ra[Wi]=Wi%2?Qt(At[Wi-1],At[Wi],Ct).y:Qt(At[Wi],At[Wi+1],Ct).x;return ra},Fr=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){var Ue=1-Ae;return{x:c(Ue,3)*ae+3*c(Ue,2)*Ae*Ce+3*Ue*Ae*Ae*ze+c(Ae,3)*ge,y:c(Ue,3)*ye+3*c(Ue,2)*Ae*Pe+3*Ue*Ae*Ae*Je+c(Ae,3)*we}},Pt=$e(function(ae,ye,Ce,Pe,ze,Je,ge,we){var Ae,Ue=ze-2*Ce+ae-(ge-2*ze+Ce),ht=2*(Ce-ae)-2*(ze-Ce),_t=ae-Ce,Ct=(-ht+u.sqrt(ht*ht-4*Ue*_t))/2/Ue,At=(-ht-u.sqrt(ht*ht-4*Ue*_t))/2/Ue,Qt=[ye,we],ir=[ae,ge];return e(Ct)>"1e12"&&(Ct=.5),e(At)>"1e12"&&(At=.5),Ct>0&&Ct<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,Ct),ir.push(Ae.x),Qt.push(Ae.y)),At>0&&At<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,At),ir.push(Ae.x),Qt.push(Ae.y)),Ue=Je-2*Pe+ye-(we-2*Je+Pe),_t=ye-Pe,Ct=(-(ht=2*(Pe-ye)-2*(Je-Pe))+u.sqrt(ht*ht-4*Ue*_t))/2/Ue,At=(-ht-u.sqrt(ht*ht-4*Ue*_t))/2/Ue,e(Ct)>"1e12"&&(Ct=.5),e(At)>"1e12"&&(At=.5),Ct>0&&Ct<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,Ct),ir.push(Ae.x),Qt.push(Ae.y)),At>0&&At<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,At),ir.push(Ae.x),Qt.push(Ae.y)),{min:{x:b[U](0,ir),y:b[U](0,Qt)},max:{x:p[U](0,ir),y:p[U](0,Qt)}}}),Ot=A._path2curve=$e(function(ae,ye){var Ce=!ye&&Me(ae);if(!ye&&Ce.curve)return ot(Ce.curve);for(var Pe=kt(ae),ze=ye&&kt(ye),Je={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},ge={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},we=function(_r,fr,Gr){var Nr,Zr;if(!_r)return["C",fr.x,fr.y,fr.x,fr.y,fr.x,fr.y];switch(!(_r[0]in{T:1,Q:1})&&(fr.qx=fr.qy=null),_r[0]){case"M":fr.X=_r[1],fr.Y=_r[2];break;case"A":_r=["C"][J](It[U](0,[fr.x,fr.y][J](_r.slice(1))));break;case"S":Gr=="C"||Gr=="S"?(Nr=2*fr.x-fr.bx,Zr=2*fr.y-fr.by):(Nr=fr.x,Zr=fr.y),_r=["C",Nr,Zr][J](_r.slice(1));break;case"T":Gr=="Q"||Gr=="T"?(fr.qx=2*fr.x-fr.qx,fr.qy=2*fr.y-fr.qy):(fr.qx=fr.x,fr.qy=fr.y),_r=["C"][J](pt(fr.x,fr.y,fr.qx,fr.qy,_r[1],_r[2]));break;case"Q":fr.qx=_r[1],fr.qy=_r[2],_r=["C"][J](pt(fr.x,fr.y,_r[1],_r[2],_r[3],_r[4]));break;case"L":_r=["C"][J](Yt(fr.x,fr.y,_r[1],_r[2]));break;case"H":_r=["C"][J](Yt(fr.x,fr.y,_r[1],fr.y));break;case"V":_r=["C"][J](Yt(fr.x,fr.y,fr.x,_r[1]));break;case"Z":_r=["C"][J](Yt(fr.x,fr.y,fr.X,fr.Y))}return _r},Ae=function(_r,fr){if(_r[fr].length>7){_r[fr].shift();for(var Gr=_r[fr];Gr.length;)ht[fr]="A",ze&&(_t[fr]="A"),_r.splice(fr++,0,["C"][J](Gr.splice(0,6)));_r.splice(fr,1),ir=p(Pe.length,ze&&ze.length||0)}},Ue=function(_r,fr,Gr,Nr,Zr){_r&&fr&&_r[Zr][0]=="M"&&fr[Zr][0]!="M"&&(fr.splice(Zr,0,["M",Nr.x,Nr.y]),Gr.bx=0,Gr.by=0,Gr.x=_r[Zr][1],Gr.y=_r[Zr][2],ir=p(Pe.length,ze&&ze.length||0))},ht=[],_t=[],Ct="",At="",Qt=0,ir=p(Pe.length,ze&&ze.length||0);Qt<ir;Qt++){Pe[Qt]&&(Ct=Pe[Qt][0]),Ct!="C"&&(ht[Qt]=Ct,Qt&&(At=ht[Qt-1])),Pe[Qt]=we(Pe[Qt],Je,At),ht[Qt]!="A"&&Ct=="C"&&(ht[Qt]="C"),Ae(Pe,Qt),ze&&(ze[Qt]&&(Ct=ze[Qt][0]),Ct!="C"&&(_t[Qt]=Ct,Qt&&(At=_t[Qt-1])),ze[Qt]=we(ze[Qt],ge,At),_t[Qt]!="A"&&Ct=="C"&&(_t[Qt]="C"),Ae(ze,Qt)),Ue(Pe,ze,Je,ge,Qt),Ue(ze,Pe,ge,Je,Qt);var tr=Pe[Qt],Zt=ze&&ze[Qt],Br=tr.length,pr=ze&&Zt.length;Je.x=tr[Br-2],Je.y=tr[Br-1],Je.bx=Y(tr[Br-4])||Je.x,Je.by=Y(tr[Br-3])||Je.y,ge.bx=ze&&(Y(Zt[pr-4])||ge.x),ge.by=ze&&(Y(Zt[pr-3])||ge.y),ge.x=ze&&Zt[pr-2],ge.y=ze&&Zt[pr-1]}return ze||(Ce.curve=ot(Pe)),ze?[Pe,ze]:Pe},null,ot),Te=(A._parseDots=$e(function(ae){for(var ye=[],Ce=0,Pe=ae.length;Ce<Pe;Ce++){var ze={},Je=ae[Ce].match(/^([^:]*):?([\d\.]*)/);if(ze.color=A.getRGB(Je[1]),ze.color.error)return null;ze.opacity=ze.color.opacity,ze.color=ze.color.hex,Je[2]&&(ze.offset=Je[2]+"%"),ye.push(ze)}for(Ce=1,Pe=ye.length-1;Ce<Pe;Ce++)if(!ye[Ce].offset){for(var ge=Y(ye[Ce-1].offset||0),we=0,Ae=Ce+1;Ae<Pe;Ae++)if(ye[Ae].offset){we=ye[Ae].offset;break}we||(we=100,Ae=Pe);for(var Ue=((we=Y(we))-ge)/(Ae-Ce+1);Ce<Ae;Ce++)ge+=Ue,ye[Ce].offset=ge+"%"}return ye}),A._tear=function(ae,ye){ae==ye.top&&(ye.top=ae.prev),ae==ye.bottom&&(ye.bottom=ae.next),ae.next&&(ae.next.prev=ae.prev),ae.prev&&(ae.prev.next=ae.next)}),me=(A._tofront=function(ae,ye){ye.top!==ae&&(Te(ae,ye),ae.next=null,ae.prev=ye.top,ye.top.next=ae,ye.top=ae)},A._toback=function(ae,ye){ye.bottom!==ae&&(Te(ae,ye),ae.next=ye.bottom,ae.prev=null,ye.bottom.prev=ae,ye.bottom=ae)},A._insertafter=function(ae,ye,Ce){Te(ae,Ce),ye==Ce.top&&(Ce.top=ae),ye.next&&(ye.next.prev=ae),ae.next=ye.next,ae.prev=ye,ye.next=ae},A._insertbefore=function(ae,ye,Ce){Te(ae,Ce),ye==Ce.bottom&&(Ce.bottom=ae),ye.prev&&(ye.prev.next=ae),ae.prev=ye.prev,ye.prev=ae,ae.next=ye},A.toMatrix=function(ae,ye){var Ce=Be(ae),Pe={_:{transform:se},getBBox:function(){return Ce}};return ce(Pe,ye),Pe.matrix}),ce=(A.transformPath=function(ae,ye){return nt(ae,me(ae,ye))},A._extractTransform=function(ae,ye){if(ye==null)return ae._.transform;ye=Q(ye).replace(/\.{3}|\u2026/g,ae._.transform||se);var Ce,Pe,ze=A.parseTransformString(ye),Je=0,ge=1,we=1,Ae=ae._,Ue=new Re;if(Ae.transform=ze||[],ze)for(var ht=0,_t=ze.length;ht<_t;ht++){var Ct,At,Qt,ir,tr,Zt=ze[ht],Br=Zt.length,pr=Q(Zt[0]).toLowerCase(),_r=Zt[0]!=pr,fr=_r?Ue.invert():0;pr=="t"&&Br==3?_r?(Ct=fr.x(0,0),At=fr.y(0,0),Qt=fr.x(Zt[1],Zt[2]),ir=fr.y(Zt[1],Zt[2]),Ue.translate(Qt-Ct,ir-At)):Ue.translate(Zt[1],Zt[2]):pr=="r"?Br==2?(tr=tr||ae.getBBox(1),Ue.rotate(Zt[1],tr.x+tr.width/2,tr.y+tr.height/2),Je+=Zt[1]):Br==4&&(_r?(Qt=fr.x(Zt[2],Zt[3]),ir=fr.y(Zt[2],Zt[3]),Ue.rotate(Zt[1],Qt,ir)):Ue.rotate(Zt[1],Zt[2],Zt[3]),Je+=Zt[1]):pr=="s"?Br==2||Br==3?(tr=tr||ae.getBBox(1),Ue.scale(Zt[1],Zt[Br-1],tr.x+tr.width/2,tr.y+tr.height/2),ge*=Zt[1],we*=Zt[Br-1]):Br==5&&(_r?(Qt=fr.x(Zt[3],Zt[4]),ir=fr.y(Zt[3],Zt[4]),Ue.scale(Zt[1],Zt[2],Qt,ir)):Ue.scale(Zt[1],Zt[2],Zt[3],Zt[4]),ge*=Zt[1],we*=Zt[2]):pr=="m"&&Br==7&&Ue.add(Zt[1],Zt[2],Zt[3],Zt[4],Zt[5],Zt[6]),Ae.dirtyT=1,ae.matrix=Ue}ae.matrix=Ue,Ae.sx=ge,Ae.sy=we,Ae.deg=Je,Ae.dx=Ce=Ue.e,Ae.dy=Pe=Ue.f,ge==1&&we==1&&!Je&&Ae.bbox?(Ae.bbox.x+=+Ce,Ae.bbox.y+=+Pe):Ae.dirtyT=1}),ne=function(ae){var ye=ae[0];switch(ye.toLowerCase()){case"t":return[ye,0,0];case"m":return[ye,1,0,0,1,0,0];case"r":return ae.length==4?[ye,0,ae[2],ae[3]]:[ye,0];case"s":return ae.length==5?[ye,1,1,ae[3],ae[4]]:ae.length==3?[ye,1,1]:[ye,1]}},_e=A._equaliseTransform=function(ae,ye){ye=Q(ye).replace(/\.{3}|\u2026/g,ae),ae=A.parseTransformString(ae)||[],ye=A.parseTransformString(ye)||[];for(var Ce,Pe,ze,Je,ge=p(ae.length,ye.length),we=[],Ae=[],Ue=0;Ue<ge;Ue++){if(ze=ae[Ue]||ne(ye[Ue]),Je=ye[Ue]||ne(ze),ze[0]!=Je[0]||ze[0].toLowerCase()=="r"&&(ze[2]!=Je[2]||ze[3]!=Je[3])||ze[0].toLowerCase()=="s"&&(ze[3]!=Je[3]||ze[4]!=Je[4]))return;for(we[Ue]=[],Ae[Ue]=[],Ce=0,Pe=p(ze.length,Je.length);Ce<Pe;Ce++)Ce in ze&&(we[Ue][Ce]=ze[Ce]),Ce in Je&&(Ae[Ue][Ce]=Je[Ce])}return{from:we,to:Ae}};function Re(ae,ye,Ce,Pe,ze,Je){ae!=null?(this.a=+ae,this.b=+ye,this.c=+Ce,this.d=+Pe,this.e=+ze,this.f=+Je):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}A._getContainer=function(ae,ye,Ce,Pe){var ze;if((ze=Pe!=null||A.is(ae,"object")?ae:z.doc.getElementById(ae))!=null)return ze.tagName?ye==null?{container:ze,width:ze.style.pixelWidth||ze.offsetWidth,height:ze.style.pixelHeight||ze.offsetHeight}:{container:ze,width:ye,height:Ce}:{container:1,x:ae,y:ye,width:Ce,height:Pe}},A.pathToRelative=tt,A._engine={},A.path2curve=Ot,A.matrix=function(ae,ye,Ce,Pe,ze,Je){return new Re(ae,ye,Ce,Pe,ze,Je)},function(ae){function ye(Pe){return Pe[0]*Pe[0]+Pe[1]*Pe[1]}function Ce(Pe){var ze=u.sqrt(ye(Pe));Pe[0]&&(Pe[0]/=ze),Pe[1]&&(Pe[1]/=ze)}ae.add=function(Pe,ze,Je,ge,we,Ae){var Ue,ht,_t,Ct,At=[[],[],[]],Qt=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],ir=[[Pe,Je,we],[ze,ge,Ae],[0,0,1]];for(Pe&&Pe instanceof Re&&(ir=[[Pe.a,Pe.c,Pe.e],[Pe.b,Pe.d,Pe.f],[0,0,1]]),Ue=0;Ue<3;Ue++)for(ht=0;ht<3;ht++){for(Ct=0,_t=0;_t<3;_t++)Ct+=Qt[Ue][_t]*ir[_t][ht];At[Ue][ht]=Ct}this.a=At[0][0],this.b=At[1][0],this.c=At[0][1],this.d=At[1][1],this.e=At[0][2],this.f=At[1][2]},ae.invert=function(){var Pe=this,ze=Pe.a*Pe.d-Pe.b*Pe.c;return new Re(Pe.d/ze,-Pe.b/ze,-Pe.c/ze,Pe.a/ze,(Pe.c*Pe.f-Pe.d*Pe.e)/ze,(Pe.b*Pe.e-Pe.a*Pe.f)/ze)},ae.clone=function(){return new Re(this.a,this.b,this.c,this.d,this.e,this.f)},ae.translate=function(Pe,ze){this.add(1,0,0,1,Pe,ze)},ae.scale=function(Pe,ze,Je,ge){ze==null&&(ze=Pe),(Je||ge)&&this.add(1,0,0,1,Je,ge),this.add(Pe,0,0,ze,0,0),(Je||ge)&&this.add(1,0,0,1,-Je,-ge)},ae.rotate=function(Pe,ze,Je){Pe=A.rad(Pe),ze=ze||0,Je=Je||0;var ge=+u.cos(Pe).toFixed(9),we=+u.sin(Pe).toFixed(9);this.add(ge,we,-we,ge,ze,Je),this.add(1,0,0,1,-ze,-Je)},ae.x=function(Pe,ze){return Pe*this.a+ze*this.c+this.e},ae.y=function(Pe,ze){return Pe*this.b+ze*this.d+this.f},ae.get=function(Pe){return+this[Q.fromCharCode(97+Pe)].toFixed(4)},ae.toString=function(){return A.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},ae.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},ae.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},ae.split=function(){var Pe={};Pe.dx=this.e,Pe.dy=this.f;var ze=[[this.a,this.c],[this.b,this.d]];Pe.scalex=u.sqrt(ye(ze[0])),Ce(ze[0]),Pe.shear=ze[0][0]*ze[1][0]+ze[0][1]*ze[1][1],ze[1]=[ze[1][0]-ze[0][0]*Pe.shear,ze[1][1]-ze[0][1]*Pe.shear],Pe.scaley=u.sqrt(ye(ze[1])),Ce(ze[1]),Pe.shear/=Pe.scaley;var Je=-ze[0][1],ge=ze[1][1];return ge<0?(Pe.rotate=A.deg(u.acos(ge)),Je<0&&(Pe.rotate=360-Pe.rotate)):Pe.rotate=A.deg(u.asin(Je)),Pe.isSimple=!(+Pe.shear.toFixed(9)||Pe.scalex.toFixed(9)!=Pe.scaley.toFixed(9)&&Pe.rotate),Pe.isSuperSimple=!+Pe.shear.toFixed(9)&&Pe.scalex.toFixed(9)==Pe.scaley.toFixed(9)&&!Pe.rotate,Pe.noRotation=!+Pe.shear.toFixed(9)&&!Pe.rotate,Pe},ae.toTransformString=function(Pe){var ze=Pe||this[ve]();return ze.isSimple?(ze.scalex=+ze.scalex.toFixed(4),ze.scaley=+ze.scaley.toFixed(4),ze.rotate=+ze.rotate.toFixed(4),(ze.dx||ze.dy?"t"+[ze.dx,ze.dy]:se)+(ze.scalex!=1||ze.scaley!=1?"s"+[ze.scalex,ze.scaley,0,0]:se)+(ze.rotate?"r"+[ze.rotate,0,0]:se)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(Re.prototype);for(var lt=function(){this.returnValue=!1},Ze=function(){return this.originalEvent.preventDefault()},ct=function(){this.cancelBubble=!0},Nt=function(){return this.originalEvent.stopPropagation()},Ut=function(ae){var ye=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,Ce=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;return{x:ae.clientX+Ce,y:ae.clientY+ye}},Mr=z.doc.addEventListener?function(ae,ye,Ce,Pe){var ze=function(ge){var we=Ut(ge);return Ce.call(Pe,ge,we.x,we.y)};if(ae.addEventListener(ye,ze,!1),te&&ke[ye]){var Je=function(ge){for(var we=Ut(ge),Ae=ge,Ue=0,ht=ge.targetTouches&&ge.targetTouches.length;Ue<ht;Ue++)if(ge.targetTouches[Ue].target==ae){(ge=ge.targetTouches[Ue]).originalEvent=Ae,ge.preventDefault=Ze,ge.stopPropagation=Nt;break}return Ce.call(Pe,ge,we.x,we.y)};ae.addEventListener(ke[ye],Je,!1)}return function(){return ae.removeEventListener(ye,ze,!1),te&&ke[ye]&&ae.removeEventListener(ke[ye],Je,!1),!0}}:z.doc.attachEvent?function(ae,ye,Ce,Pe){var ze=function(Je){Je=Je||z.win.event;var ge=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,we=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,Ae=Je.clientX+we,Ue=Je.clientY+ge;return Je.preventDefault=Je.preventDefault||lt,Je.stopPropagation=Je.stopPropagation||ct,Ce.call(Pe,Je,Ae,Ue)};return ae.attachEvent("on"+ye,ze),function(){return ae.detachEvent("on"+ye,ze),!0}}:void 0,Xt=[],Sr=function(ae){for(var ye,Ce=ae.clientX,Pe=ae.clientY,ze=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,Je=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,ge=Xt.length;ge--;){if(ye=Xt[ge],te&&ae.touches){for(var we,Ae=ae.touches.length;Ae--;)if((we=ae.touches[Ae]).identifier==ye.el._drag.id){Ce=we.clientX,Pe=we.clientY,(ae.originalEvent?ae.originalEvent:ae).preventDefault();break}}else ae.preventDefault();var Ue,ht=ye.el.node,_t=ht.nextSibling,Ct=ht.parentNode,At=ht.style.display;z.win.opera&&Ct.removeChild(ht),ht.style.display="none",Ue=ye.el.paper.getElementByPoint(Ce,Pe),ht.style.display=At,z.win.opera&&(_t?Ct.insertBefore(ht,_t):Ct.appendChild(ht)),Ue&&k("raphael.drag.over."+ye.el.id,ye.el,Ue),Ce+=Je,Pe+=ze,k("raphael.drag.move."+ye.el.id,ye.move_scope||ye.el,Ce-ye.el._drag.x,Pe-ye.el._drag.y,Ce,Pe,ae)}},rr=function(ae){A.unmousemove(Sr).unmouseup(rr);for(var ye,Ce=Xt.length;Ce--;)(ye=Xt[Ce]).el._drag={},k("raphael.drag.end."+ye.el.id,ye.end_scope||ye.start_scope||ye.move_scope||ye.el,ae);Xt=[]},er=A.el={},kr=he.length;kr--;)(function(ae){A[ae]=er[ae]=function(ye,Ce){return A.is(ye,"function")&&(this.events=this.events||[],this.events.push({name:ae,f:ye,unbind:Mr(this.shape||this.node||z.doc,ae,ye,Ce||this)})),this},A["un"+ae]=er["un"+ae]=function(ye){for(var Ce=this.events||[],Pe=Ce.length;Pe--;)Ce[Pe].name!=ae||!A.is(ye,"undefined")&&Ce[Pe].f!=ye||(Ce[Pe].unbind(),Ce.splice(Pe,1),!Ce.length&&delete this.events);return this}})(he[kr]);er.data=function(ae,ye){var Ce=et[this.id]=et[this.id]||{};if(arguments.length==0)return Ce;if(arguments.length==1){if(A.is(ae,"object")){for(var Pe in ae)ae[$](Pe)&&this.data(Pe,ae[Pe]);return this}return k("raphael.data.get."+this.id,this,Ce[ae],ae),Ce[ae]}return Ce[ae]=ye,k("raphael.data.set."+this.id,this,ye,ae),this},er.removeData=function(ae){return ae==null?delete et[this.id]:et[this.id]&&delete et[this.id][ae],this},er.getData=function(){return Oe(et[this.id]||{})},er.hover=function(ae,ye,Ce,Pe){return this.mouseover(ae,Ce).mouseout(ye,Pe||Ce)},er.unhover=function(ae,ye){return this.unmouseover(ae).unmouseout(ye)};var vr=[];er.drag=function(ae,ye,Ce,Pe,ze,Je){function ge(we){(we.originalEvent||we).preventDefault();var Ae=we.clientX,Ue=we.clientY,ht=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,_t=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;if(this._drag.id=we.identifier,te&&we.touches){for(var Ct,At=we.touches.length;At--;)if(Ct=we.touches[At],this._drag.id=Ct.identifier,Ct.identifier==this._drag.id){Ae=Ct.clientX,Ue=Ct.clientY;break}}this._drag.x=Ae+_t,this._drag.y=Ue+ht,!Xt.length&&A.mousemove(Sr).mouseup(rr),Xt.push({el:this,move_scope:Pe,start_scope:ze,end_scope:Je}),ye&&k.on("raphael.drag.start."+this.id,ye),ae&&k.on("raphael.drag.move."+this.id,ae),Ce&&k.on("raphael.drag.end."+this.id,Ce),k("raphael.drag.start."+this.id,ze||Pe||this,this._drag.x,this._drag.y,we)}return this._drag={},vr.push({el:this,start:ge}),this.mousedown(ge),this},er.onDragOver=function(ae){ae?k.on("raphael.drag.over."+this.id,ae):k.unbind("raphael.drag.over."+this.id)},er.undrag=function(){for(var ae=vr.length;ae--;)vr[ae].el==this&&(this.unmousedown(vr[ae].start),vr.splice(ae,1),k.unbind("raphael.drag.*."+this.id));!vr.length&&A.unmousemove(Sr).unmouseup(rr),Xt=[]},M.circle=function(ae,ye,Ce){var Pe=A._engine.circle(this,ae||0,ye||0,Ce||0);return this.__set__&&this.__set__.push(Pe),Pe},M.rect=function(ae,ye,Ce,Pe,ze){var Je=A._engine.rect(this,ae||0,ye||0,Ce||0,Pe||0,ze||0);return this.__set__&&this.__set__.push(Je),Je},M.ellipse=function(ae,ye,Ce,Pe){var ze=A._engine.ellipse(this,ae||0,ye||0,Ce||0,Pe||0);return this.__set__&&this.__set__.push(ze),ze},M.path=function(ae){ae&&!A.is(ae,"string")&&!A.is(ae[0],v)&&(ae+=se);var ye=A._engine.path(A.format[U](A,arguments),this);return this.__set__&&this.__set__.push(ye),ye},M.image=function(ae,ye,Ce,Pe,ze){var Je=A._engine.image(this,ae||"about:blank",ye||0,Ce||0,Pe||0,ze||0);return this.__set__&&this.__set__.push(Je),Je},M.text=function(ae,ye,Ce){var Pe=A._engine.text(this,ae||0,ye||0,Q(Ce));return this.__set__&&this.__set__.push(Pe),Pe},M.set=function(ae){!A.is(ae,"array")&&(ae=Array.prototype.splice.call(arguments,0,arguments.length));var ye=new Kr(ae);return this.__set__&&this.__set__.push(ye),ye.paper=this,ye.type="set",ye},M.setStart=function(ae){this.__set__=ae||this.set()},M.setFinish=function(ae){var ye=this.__set__;return delete this.__set__,ye},M.getSize=function(){var ae=this.canvas.parentNode;return{width:ae.offsetWidth,height:ae.offsetHeight}},M.setSize=function(ae,ye){return A._engine.setSize.call(this,ae,ye)},M.setViewBox=function(ae,ye,Ce,Pe,ze){return A._engine.setViewBox.call(this,ae,ye,Ce,Pe,ze)},M.top=M.bottom=null,M.raphael=A;function Pr(){return this.x+de+this.y+de+this.width+" × "+this.height}M.getElementByPoint=function(ae,ye){var Ce,Pe,ze,Je,ge,we,Ae,Ue=this.canvas,ht=z.doc.elementFromPoint(ae,ye);if(z.win.opera&&ht.tagName=="svg"){var _t=(Pe=(Ce=Ue).getBoundingClientRect(),ze=Ce.ownerDocument,Je=ze.body,ge=ze.documentElement,we=ge.clientTop||Je.clientTop||0,Ae=ge.clientLeft||Je.clientLeft||0,{y:Pe.top+(z.win.pageYOffset||ge.scrollTop||Je.scrollTop)-we,x:Pe.left+(z.win.pageXOffset||ge.scrollLeft||Je.scrollLeft)-Ae}),Ct=Ue.createSVGRect();Ct.x=ae-_t.x,Ct.y=ye-_t.y,Ct.width=Ct.height=1;var At=Ue.getIntersectionList(Ct,null);At.length&&(ht=At[At.length-1])}if(!ht)return null;for(;ht.parentNode&&ht!=Ue.parentNode&&!ht.raphael;)ht=ht.parentNode;return ht==this.canvas.parentNode&&(ht=Ue),ht=ht&&ht.raphael?this.getById(ht.raphaelid):null},M.getElementsByBBox=function(ae){var ye=this.set();return this.forEach(function(Ce){A.isBBoxIntersect(Ce.getBBox(),ae)&&ye.push(Ce)}),ye},M.getById=function(ae){for(var ye=this.bottom;ye;){if(ye.id==ae)return ye;ye=ye.next}return null},M.forEach=function(ae,ye){for(var Ce=this.bottom;Ce;){if(ae.call(ye,Ce)===!1)return this;Ce=Ce.next}return this},M.getElementsByPoint=function(ae,ye){var Ce=this.set();return this.forEach(function(Pe){Pe.isPointInside(ae,ye)&&Ce.push(Pe)}),Ce},er.isPointInside=function(ae,ye){var Ce=this.realPath=Ge[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(Ce=A.transformPath(Ce,this.attr("transform"))),A.isPointInsidePath(Ce,ae,ye)},er.getBBox=function(ae){if(this.removed)return{};var ye=this._;return ae?(!ye.dirty&&ye.bboxwt||(this.realPath=Ge[this.type](this),ye.bboxwt=Be(this.realPath),ye.bboxwt.toString=Pr,ye.dirty=0),ye.bboxwt):((ye.dirty||ye.dirtyT||!ye.bbox)&&(!ye.dirty&&this.realPath||(ye.bboxwt=0,this.realPath=Ge[this.type](this)),ye.bbox=Be(nt(this.realPath,this.matrix)),ye.bbox.toString=Pr,ye.dirty=ye.dirtyT=0),ye.bbox)},er.clone=function(){if(this.removed)return null;var ae=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(ae),ae},er.glow=function(ae){if(this.type=="text")return null;var ye={width:((ae=ae||{}).width||10)+(+this.attr("stroke-width")||1),fill:ae.fill||!1,opacity:ae.opacity==null?.5:ae.opacity,offsetx:ae.offsetx||0,offsety:ae.offsety||0,color:ae.color||"#000"},Ce=ye.width/2,Pe=this.paper,ze=Pe.set(),Je=this.realPath||Ge[this.type](this);Je=this.matrix?nt(Je,this.matrix):Je;for(var ge=1;ge<Ce+1;ge++)ze.push(Pe.path(Je).attr({stroke:ye.color,fill:ye.fill?ye.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(ye.width/Ce*ge).toFixed(3),opacity:+(ye.opacity/Ce).toFixed(3)}));return ze.insertBefore(this).translate(ye.offsetx,ye.offsety)};var Tr=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){return Ae==null?yt(ae,ye,Ce,Pe,ze,Je,ge,we):A.findDotsAtSegment(ae,ye,Ce,Pe,ze,Je,ge,we,function(Ue,ht,_t,Ct,At,Qt,ir,tr,Zt){if(!(Zt<0||yt(Ue,ht,_t,Ct,At,Qt,ir,tr)<Zt)){var Br,pr=.5,_r=1-pr;for(Br=yt(Ue,ht,_t,Ct,At,Qt,ir,tr,_r);e(Br-Zt)>.01;)Br=yt(Ue,ht,_t,Ct,At,Qt,ir,tr,_r+=(Br<Zt?1:-1)*(pr/=2));return _r}}(ae,ye,Ce,Pe,ze,Je,ge,we,Ae))},br=function(ae,ye){return function(Ce,Pe,ze){for(var Je,ge,we,Ae,Ue,ht="",_t={},Ct=0,At=0,Qt=(Ce=Ot(Ce)).length;At<Qt;At++){if((we=Ce[At])[0]=="M")Je=+we[1],ge=+we[2];else{if(Ct+(Ae=Tr(Je,ge,we[1],we[2],we[3],we[4],we[5],we[6]))>Pe){if(ye&&!_t.start){if(ht+=["C"+(Ue=Tr(Je,ge,we[1],we[2],we[3],we[4],we[5],we[6],Pe-Ct)).start.x,Ue.start.y,Ue.m.x,Ue.m.y,Ue.x,Ue.y],ze)return ht;_t.start=ht,ht=["M"+Ue.x,Ue.y+"C"+Ue.n.x,Ue.n.y,Ue.end.x,Ue.end.y,we[5],we[6]].join(),Ct+=Ae,Je=+we[5],ge=+we[6];continue}if(!ae&&!ye)return{x:(Ue=Tr(Je,ge,we[1],we[2],we[3],we[4],we[5],we[6],Pe-Ct)).x,y:Ue.y,alpha:Ue.alpha}}Ct+=Ae,Je=+we[5],ge=+we[6]}ht+=we.shift()+we}return _t.end=ht,(Ue=ae?Ct:ye?_t:A.findDotsAtSegment(Je,ge,we[0],we[1],we[2],we[3],we[4],we[5],1)).alpha&&(Ue={x:Ue.x,y:Ue.y,alpha:Ue.alpha}),Ue}},Ar=br(1),gr=br(),dr=br(0,1);A.getTotalLength=Ar,A.getPointAtLength=gr,A.getSubpath=function(ae,ye,Ce){if(this.getTotalLength(ae)-Ce<1e-6)return dr(ae,ye).end;var Pe=dr(ae,Ce,1);return ye?dr(Pe,ye).end:Pe},er.getTotalLength=function(){var ae=this.getPath();if(ae)return this.node.getTotalLength?this.node.getTotalLength():Ar(ae)},er.getPointAtLength=function(ae){var ye=this.getPath();if(ye)return gr(ye,ae)},er.getPath=function(){var ae,ye=A._getPath[this.type];if(this.type!="text"&&this.type!="set")return ye&&(ae=ye(this)),ae},er.getSubpath=function(ae,ye){var Ce=this.getPath();if(Ce)return A.getSubpath(Ce,ae,ye)};var lr=A.easing_formulas={linear:function(ae){return ae},"<":function(ae){return c(ae,1.7)},">":function(ae){return c(ae,.48)},"<>":function(ae){var ye=.48-ae/1.04,Ce=u.sqrt(.1734+ye*ye),Pe=Ce-ye,ze=-Ce-ye,Je=c(e(Pe),1/3)*(Pe<0?-1:1)+c(e(ze),1/3)*(ze<0?-1:1)+.5;return 3*(1-Je)*Je*Je+Je*Je*Je},backIn:function(ae){var ye=1.70158;return ae*ae*((ye+1)*ae-ye)},backOut:function(ae){var ye=1.70158;return(ae-=1)*ae*((ye+1)*ae+ye)+1},elastic:function(ae){return ae==!!ae?ae:c(2,-10*ae)*u.sin(2*y*(ae-.075)/.3)+1},bounce:function(ae){var ye=7.5625,Ce=2.75;return ae<1/Ce?ye*ae*ae:ae<2/Ce?ye*(ae-=1.5/Ce)*ae+.75:ae<2.5/Ce?ye*(ae-=2.25/Ce)*ae+.9375:ye*(ae-=2.625/Ce)*ae+.984375}};lr.easeIn=lr["ease-in"]=lr["<"],lr.easeOut=lr["ease-out"]=lr[">"],lr.easeInOut=lr["ease-in-out"]=lr["<>"],lr["back-in"]=lr.backIn,lr["back-out"]=lr.backOut;var Kt=[],Bt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(ae){setTimeout(ae,16)},Ft=function(){for(var ae=+new Date,ye=0;ye<Kt.length;ye++){var Ce=Kt[ye];if(!Ce.el.removed&&!Ce.paused){var Pe,ze,Je=ae-Ce.start,ge=Ce.ms,we=Ce.easing,Ae=Ce.from,Ue=Ce.diff,ht=Ce.to,_t=(Ce.t,Ce.el),Ct={},At={};if(Ce.initstatus?(Je=(Ce.initstatus*Ce.anim.top-Ce.prev)/(Ce.percent-Ce.prev)*ge,Ce.status=Ce.initstatus,delete Ce.initstatus,Ce.stop&&Kt.splice(ye--,1)):Ce.status=(Ce.prev+(Ce.percent-Ce.prev)*(Je/ge))/Ce.anim.top,!(Je<0))if(Je<ge){var Qt=we(Je/ge);for(var ir in Ae)if(Ae[$](ir)){switch(ee[ir]){case w:Pe=+Ae[ir]+Qt*ge*Ue[ir];break;case"colour":Pe="rgb("+[cr(H(Ae[ir].r+Qt*ge*Ue[ir].r)),cr(H(Ae[ir].g+Qt*ge*Ue[ir].g)),cr(H(Ae[ir].b+Qt*ge*Ue[ir].b))].join(",")+")";break;case"path":Pe=[];for(var tr=0,Zt=Ae[ir].length;tr<Zt;tr++){Pe[tr]=[Ae[ir][tr][0]];for(var Br=1,pr=Ae[ir][tr].length;Br<pr;Br++)Pe[tr][Br]=+Ae[ir][tr][Br]+Qt*ge*Ue[ir][tr][Br];Pe[tr]=Pe[tr].join(de)}Pe=Pe.join(de);break;case"transform":if(Ue[ir].real)for(Pe=[],tr=0,Zt=Ae[ir].length;tr<Zt;tr++)for(Pe[tr]=[Ae[ir][tr][0]],Br=1,pr=Ae[ir][tr].length;Br<pr;Br++)Pe[tr][Br]=Ae[ir][tr][Br]+Qt*ge*Ue[ir][tr][Br];else{var _r=function(Gr){return+Ae[ir][Gr]+Qt*ge*Ue[ir][Gr]};Pe=[["m",_r(0),_r(1),_r(2),_r(3),_r(4),_r(5)]]}break;case"csv":if(ir=="clip-rect")for(Pe=[],tr=4;tr--;)Pe[tr]=+Ae[ir][tr]+Qt*ge*Ue[ir][tr];break;default:var fr=[][J](Ae[ir]);for(Pe=[],tr=_t.paper.customAttributes[ir].length;tr--;)Pe[tr]=+fr[tr]+Qt*ge*Ue[ir][tr]}Ct[ir]=Pe}_t.attr(Ct),function(Gr,Nr,Zr){setTimeout(function(){k("raphael.anim.frame."+Gr,Nr,Zr)})}(_t.id,_t,Ce.anim)}else{if(function(Gr,Nr,Zr){setTimeout(function(){k("raphael.anim.frame."+Nr.id,Nr,Zr),k("raphael.anim.finish."+Nr.id,Nr,Zr),A.is(Gr,"function")&&Gr.call(Nr)})}(Ce.callback,_t,Ce.anim),_t.attr(ht),Kt.splice(ye--,1),Ce.repeat>1&&!Ce.next){for(ze in ht)ht[$](ze)&&(At[ze]=Ce.totalOrigin[ze]);Ce.el.attr(At),ar(Ce.anim,Ce.el,Ce.anim.percents[0],null,Ce.totalOrigin,Ce.repeat-1)}Ce.next&&!Ce.stop&&ar(Ce.anim,Ce.el,Ce.next,null,Ce.totalOrigin,Ce.repeat)}}}Kt.length&&Bt(Ft)},cr=function(ae){return ae>255?255:ae<0?0:ae};function nr(ae,ye,Ce,Pe,ze,Je){var ge=3*ye,we=3*(Pe-ye)-ge,Ae=1-ge-we,Ue=3*Ce,ht=3*(ze-Ce)-Ue,_t=1-Ue-ht;function Ct(At){return((Ae*At+we)*At+ge)*At}return function(At,Qt){var ir=function(tr,Zt){var Br,pr,_r,fr,Gr,Nr;for(_r=tr,Nr=0;Nr<8;Nr++){if(fr=Ct(_r)-tr,e(fr)<Zt)return _r;if(e(Gr=(3*Ae*_r+2*we)*_r+ge)<1e-6)break;_r-=fr/Gr}if(pr=1,(_r=tr)<(Br=0))return Br;if(_r>pr)return pr;for(;Br<pr;){if(fr=Ct(_r),e(fr-tr)<Zt)return _r;tr>fr?Br=_r:pr=_r,_r=(pr-Br)/2+Br}return _r}(At,Qt);return((_t*ir+ht)*ir+Ue)*ir}(ae,1/(200*Je))}function Vt(ae,ye){var Ce=[],Pe={};if(this.ms=ye,this.times=1,ae){for(var ze in ae)ae[$](ze)&&(Pe[Y(ze)]=ae[ze],Ce.push(Y(ze)));Ce.sort(mt)}this.anim=Pe,this.top=Ce[Ce.length-1],this.percents=Ce}function ar(ae,ye,Ce,Pe,ze,Je){Ce=Y(Ce);var ge,we,Ae,Ue,ht,_t,Ct=ae.ms,At={},Qt={},ir={};if(Pe)for(Zt=0,Br=Kt.length;Zt<Br;Zt++){var tr=Kt[Zt];if(tr.el.id==ye.id&&tr.anim==ae){tr.percent!=Ce?(Kt.splice(Zt,1),Ae=1):we=tr,ye.attr(tr.totalOrigin);break}}else Pe=+Qt;for(var Zt=0,Br=ae.percents.length;Zt<Br;Zt++){if(ae.percents[Zt]==Ce||ae.percents[Zt]>Pe*ae.top){Ce=ae.percents[Zt],ht=ae.percents[Zt-1]||0,Ct=Ct/ae.top*(Ce-ht),Ue=ae.percents[Zt+1],ge=ae.anim[Ce];break}Pe&&ye.attr(ae.anim[ae.percents[Zt]])}if(ge){if(we)we.initstatus=Pe,we.start=new Date-we.ms*Pe;else{for(var pr in ge)if(ge[$](pr)&&(ee[$](pr)||ye.paper.customAttributes[$](pr)))switch(At[pr]=ye.attr(pr),At[pr]==null&&(At[pr]=D[pr]),Qt[pr]=ge[pr],ee[pr]){case w:ir[pr]=(Qt[pr]-At[pr])/Ct;break;case"colour":At[pr]=A.getRGB(At[pr]);var _r=A.getRGB(Qt[pr]);ir[pr]={r:(_r.r-At[pr].r)/Ct,g:(_r.g-At[pr].g)/Ct,b:(_r.b-At[pr].b)/Ct};break;case"path":var fr=Ot(At[pr],Qt[pr]),Gr=fr[1];for(At[pr]=fr[0],ir[pr]=[],Zt=0,Br=At[pr].length;Zt<Br;Zt++){ir[pr][Zt]=[0];for(var Nr=1,Zr=At[pr][Zt].length;Nr<Zr;Nr++)ir[pr][Zt][Nr]=(Gr[Zt][Nr]-At[pr][Zt][Nr])/Ct}break;case"transform":var Sn=ye._,qn=_e(Sn[pr],Qt[pr]);if(qn)for(At[pr]=qn.from,Qt[pr]=qn.to,ir[pr]=[],ir[pr].real=!0,Zt=0,Br=At[pr].length;Zt<Br;Zt++)for(ir[pr][Zt]=[At[pr][Zt][0]],Nr=1,Zr=At[pr][Zt].length;Nr<Zr;Nr++)ir[pr][Zt][Nr]=(Qt[pr][Zt][Nr]-At[pr][Zt][Nr])/Ct;else{var ii=ye.matrix||new Re,si={_:{transform:Sn.transform},getBBox:function(){return ye.getBBox(1)}};At[pr]=[ii.a,ii.b,ii.c,ii.d,ii.e,ii.f],ce(si,Qt[pr]),Qt[pr]=si._.transform,ir[pr]=[(si.matrix.a-ii.a)/Ct,(si.matrix.b-ii.b)/Ct,(si.matrix.c-ii.c)/Ct,(si.matrix.d-ii.d)/Ct,(si.matrix.e-ii.e)/Ct,(si.matrix.f-ii.f)/Ct]}break;case"csv":var vn=Q(ge[pr])[ve](j),on=Q(At[pr])[ve](j);if(pr=="clip-rect")for(At[pr]=on,ir[pr]=[],Zt=on.length;Zt--;)ir[pr][Zt]=(vn[Zt]-At[pr][Zt])/Ct;Qt[pr]=vn;break;default:for(vn=[][J](ge[pr]),on=[][J](At[pr]),ir[pr]=[],Zt=ye.paper.customAttributes[pr].length;Zt--;)ir[pr][Zt]=((vn[Zt]||0)-(on[Zt]||0))/Ct}var Bn=ge.easing,Hi=A.easing_formulas[Bn];if(!Hi)if((Hi=Q(Bn).match(R))&&Hi.length==5){var Xi=Hi;Hi=function(Kn){return nr(Kn,+Xi[1],+Xi[2],+Xi[3],+Xi[4],Ct)}}else Hi=Ye;if(tr={anim:ae,percent:Ce,timestamp:_t=ge.start||ae.start||+new Date,start:_t+(ae.del||0),status:0,initstatus:Pe||0,stop:!1,ms:Ct,easing:Hi,from:At,diff:ir,to:Qt,el:ye,callback:ge.callback,prev:ht,next:Ue,repeat:Je||ae.times,origin:ye.attr(),totalOrigin:ze},Kt.push(tr),Pe&&!we&&!Ae&&(tr.stop=!0,tr.start=new Date-Ct*Pe,Kt.length==1))return Ft();Ae&&(tr.start=new Date-tr.ms*Pe),Kt.length==1&&Bt(Ft)}k("raphael.anim.start."+ye.id,ye,ae)}}function qr(ae){for(var ye=0;ye<Kt.length;ye++)Kt[ye].el.paper==ae&&Kt.splice(ye--,1)}er.animateWith=function(ae,ye,Ce,Pe,ze,Je){if(this.removed)return Je&&Je.call(this),this;var ge=Ce instanceof Vt?Ce:A.animation(Ce,Pe,ze,Je);ar(ge,this,ge.percents[0],null,this.attr());for(var we=0,Ae=Kt.length;we<Ae;we++)if(Kt[we].anim==ye&&Kt[we].el==ae){Kt[Ae-1].start=Kt[we].start;break}return this},er.onAnimation=function(ae){return ae?k.on("raphael.anim.frame."+this.id,ae):k.unbind("raphael.anim.frame."+this.id),this},Vt.prototype.delay=function(ae){var ye=new Vt(this.anim,this.ms);return ye.times=this.times,ye.del=+ae||0,ye},Vt.prototype.repeat=function(ae){var ye=new Vt(this.anim,this.ms);return ye.del=this.del,ye.times=u.floor(p(ae,0))||1,ye},A.animation=function(ae,ye,Ce,Pe){if(ae instanceof Vt)return ae;!A.is(Ce,"function")&&Ce||(Pe=Pe||Ce||null,Ce=null),ae=Object(ae),ye=+ye||0;var ze,Je,ge={};for(Je in ae)ae[$](Je)&&Y(Je)!=Je&&Y(Je)+"%"!=Je&&(ze=!0,ge[Je]=ae[Je]);if(ze)return Ce&&(ge.easing=Ce),Pe&&(ge.callback=Pe),new Vt({100:ge},ye);if(Pe){var we=0;for(var Ae in ae){var Ue=Z(Ae);ae[$](Ae)&&Ue>we&&(we=Ue)}!ae[we+="%"].callback&&(ae[we].callback=Pe)}return new Vt(ae,ye)},er.animate=function(ae,ye,Ce,Pe){if(this.removed)return Pe&&Pe.call(this),this;var ze=ae instanceof Vt?ae:A.animation(ae,ye,Ce,Pe);return ar(ze,this,ze.percents[0],null,this.attr()),this},er.setTime=function(ae,ye){return ae&&ye!=null&&this.status(ae,b(ye,ae.ms)/ae.ms),this},er.status=function(ae,ye){var Ce,Pe,ze=[],Je=0;if(ye!=null)return ar(ae,this,-1,b(ye,1)),this;for(Ce=Kt.length;Je<Ce;Je++)if((Pe=Kt[Je]).el.id==this.id&&(!ae||Pe.anim==ae)){if(ae)return Pe.status;ze.push({anim:Pe.anim,status:Pe.status})}return ae?0:ze},er.pause=function(ae){for(var ye=0;ye<Kt.length;ye++)Kt[ye].el.id!=this.id||ae&&Kt[ye].anim!=ae||k("raphael.anim.pause."+this.id,this,Kt[ye].anim)!==!1&&(Kt[ye].paused=!0);return this},er.resume=function(ae){for(var ye=0;ye<Kt.length;ye++)if(Kt[ye].el.id==this.id&&(!ae||Kt[ye].anim==ae)){var Ce=Kt[ye];k("raphael.anim.resume."+this.id,this,Ce.anim)!==!1&&(delete Ce.paused,this.status(Ce.anim,Ce.status))}return this},er.stop=function(ae){for(var ye=0;ye<Kt.length;ye++)Kt[ye].el.id!=this.id||ae&&Kt[ye].anim!=ae||k("raphael.anim.stop."+this.id,this,Kt[ye].anim)!==!1&&Kt.splice(ye--,1);return this},k.on("raphael.remove",qr),k.on("raphael.clear",qr),er.toString=function(){return"Raphaël’s object"};var Vr,Wr,Rr,bt,Kr=function(ae){if(this.items=[],this.length=0,this.type="set",ae)for(var ye=0,Ce=ae.length;ye<Ce;ye++)!ae[ye]||ae[ye].constructor!=er.constructor&&ae[ye].constructor!=Kr||(this[this.items.length]=this.items[this.items.length]=ae[ye],this.length++)},Ur=Kr.prototype;for(var ti in Ur.push=function(){for(var ae,ye,Ce=0,Pe=arguments.length;Ce<Pe;Ce++)!(ae=arguments[Ce])||ae.constructor!=er.constructor&&ae.constructor!=Kr||(this[ye=this.items.length]=this.items[ye]=ae,this.length++);return this},Ur.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Ur.forEach=function(ae,ye){for(var Ce=0,Pe=this.items.length;Ce<Pe;Ce++)if(ae.call(ye,this.items[Ce],Ce)===!1)return this;return this},er)er[$](ti)&&(Ur[ti]=function(ae){return function(){var ye=arguments;return this.forEach(function(Ce){Ce[ae][U](Ce,ye)})}}(ti));return Ur.attr=function(ae,ye){if(ae&&A.is(ae,v)&&A.is(ae[0],"object"))for(var Ce=0,Pe=ae.length;Ce<Pe;Ce++)this.items[Ce].attr(ae[Ce]);else for(var ze=0,Je=this.items.length;ze<Je;ze++)this.items[ze].attr(ae,ye);return this},Ur.clear=function(){for(;this.length;)this.pop()},Ur.splice=function(ae,ye,Ce){ae=ae<0?p(this.length+ae,0):ae,ye=p(0,b(this.length-ae,ye));var Pe,ze=[],Je=[],ge=[];for(Pe=2;Pe<arguments.length;Pe++)ge.push(arguments[Pe]);for(Pe=0;Pe<ye;Pe++)Je.push(this[ae+Pe]);for(;Pe<this.length-ae;Pe++)ze.push(this[ae+Pe]);var we=ge.length;for(Pe=0;Pe<we+ze.length;Pe++)this.items[ae+Pe]=this[ae+Pe]=Pe<we?ge[Pe]:ze[Pe-we];for(Pe=this.items.length=this.length-=ye-we;this[Pe];)delete this[Pe++];return new Kr(Je)},Ur.exclude=function(ae){for(var ye=0,Ce=this.length;ye<Ce;ye++)if(this[ye]==ae)return this.splice(ye,1),!0},Ur.animate=function(ae,ye,Ce,Pe){(A.is(Ce,"function")||!Ce)&&(Pe=Ce||null);var ze,Je,ge=this.items.length,we=ge,Ae=this;if(!ge)return this;Pe&&(Je=function(){!--ge&&Pe.call(Ae)}),Ce=A.is(Ce,"string")?Ce:Je;var Ue=A.animation(ae,ye,Ce,Je);for(ze=this.items[--we].animate(Ue);we--;)this.items[we]&&!this.items[we].removed&&this.items[we].animateWith(ze,Ue,Ue),this.items[we]&&!this.items[we].removed||ge--;return this},Ur.insertAfter=function(ae){for(var ye=this.items.length;ye--;)this.items[ye].insertAfter(ae);return this},Ur.getBBox=function(){for(var ae=[],ye=[],Ce=[],Pe=[],ze=this.items.length;ze--;)if(!this.items[ze].removed){var Je=this.items[ze].getBBox();ae.push(Je.x),ye.push(Je.y),Ce.push(Je.x+Je.width),Pe.push(Je.y+Je.height)}return{x:ae=b[U](0,ae),y:ye=b[U](0,ye),x2:Ce=p[U](0,Ce),y2:Pe=p[U](0,Pe),width:Ce-ae,height:Pe-ye}},Ur.clone=function(ae){ae=this.paper.set();for(var ye=0,Ce=this.items.length;ye<Ce;ye++)ae.push(this.items[ye].clone());return ae},Ur.toString=function(){return"Raphaël‘s set"},Ur.glow=function(ae){var ye=this.paper.set();return this.forEach(function(Ce,Pe){var ze=Ce.glow(ae);ze!=null&&ze.forEach(function(Je,ge){ye.push(Je)})}),ye},Ur.isPointInside=function(ae,ye){var Ce=!1;return this.forEach(function(Pe){if(Pe.isPointInside(ae,ye))return Ce=!0,!1}),Ce},A.registerFont=function(ae){if(!ae.face)return ae;this.fonts=this.fonts||{};var ye={w:ae.w,face:{},glyphs:{}},Ce=ae.face["font-family"];for(var Pe in ae.face)ae.face[$](Pe)&&(ye.face[Pe]=ae.face[Pe]);if(this.fonts[Ce]?this.fonts[Ce].push(ye):this.fonts[Ce]=[ye],!ae.svg){for(var ze in ye.face["units-per-em"]=Z(ae.face["units-per-em"],10),ae.glyphs)if(ae.glyphs[$](ze)){var Je=ae.glyphs[ze];if(ye.glyphs[ze]={w:Je.w,k:{},d:Je.d&&"M"+Je.d.replace(/[mlcxtrv]/g,function(we){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[we]||"M"})+"z"},Je.k)for(var ge in Je.k)Je[$](ge)&&(ye.glyphs[ze].k[ge]=Je.k[ge])}}return ae},M.getFont=function(ae,ye,Ce,Pe){if(Pe=Pe||"normal",Ce=Ce||"normal",ye=+ye||{normal:400,bold:700,lighter:300,bolder:800}[ye]||400,A.fonts){var ze,Je=A.fonts[ae];if(!Je){var ge=new RegExp("(^|\\s)"+ae.replace(/[^\w\d\s+!~.:_-]/g,se)+"(\\s|$)","i");for(var we in A.fonts)if(A.fonts[$](we)&&ge.test(we)){Je=A.fonts[we];break}}if(Je)for(var Ae=0,Ue=Je.length;Ae<Ue&&((ze=Je[Ae]).face["font-weight"]!=ye||ze.face["font-style"]!=Ce&&ze.face["font-style"]||ze.face["font-stretch"]!=Pe);Ae++);return ze}},M.print=function(ae,ye,Ce,Pe,ze,Je,ge,we){Je=Je||"middle",ge=p(b(ge||0,1),-1),we=p(b(we||1,3),1);var Ae,Ue=Q(Ce)[ve](se),ht=0,_t=0,Ct=se;if(A.is(Pe,"string")&&(Pe=this.getFont(Pe)),Pe){Ae=(ze||16)/Pe.face["units-per-em"];for(var At=Pe.face.bbox[ve](j),Qt=+At[0],ir=At[3]-At[1],tr=0,Zt=+At[1]+(Je=="baseline"?ir+ +Pe.face.descent:ir/2),Br=0,pr=Ue.length;Br<pr;Br++){if(Ue[Br]==`
+`);h("<pre>").addClass("exportContainer").text(S).dialog({title:"Annotation export",open:function(k,A){var B;document.selection?(B=document.body.createTextRange(),B.moveToElementText(this[0]),B.select()):window.getSelection&&(B=document.createRange(),B.selectNode(this[0]),window.getSelection().addRange(B))},autoOpen:!0,width:"80%",minHeight:"400",height:400,buttons:[{text:"Close",click:function(){h(this).dialog("close")}},{text:"Download",click:function(){a=document.createElement("a"),a.setAttribute("href","data:text/plain;base64,"+btoa(S)),a.setAttribute("download","Annotations - "+m.media.title.replace(/[^ \w]/g,"")+".txt"),a.click()}}]})}draw(){}generateUid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(d){var m=Math.random()*16|0,h=d==="x"?m:m&3|8;return h.toString(16)})}},Cr(l,"defaults",{}),Cr(l,"template",""),Cr(l,"messages",{en:{}}),l),n}const AdaptivePlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){typeof this.video>"u"&&(this.video=this.media.video);var l=["autostart","video","height","width","url_transform"],d={},m=document.createElement("video").canPlayType(this.mime_type);d.type=m!=="no"?this.normal_player:this.fallback_player;for(var h=0;h<l.length;h++)typeof this[l[h]]<"u"&&(d[l[h]]=this[l[h]]);this.insertSubwidget(this.$,d)}},Cr(n,"defaults",{mime_type:'video/mp4; codecs="avc1.42E01E"',normal_player:"HtmlPlayer",fallback_player:"HtmlPlayer"}),n},helloWorldStyles={},HelloWorld=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"draw",function(){this.renderTemplate(),console.log("HelloWorldWidget was drawn")});console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget")}},Cr(n,"defaults",{text:"world"}),Cr(n,"template",'<div class="Ldt-HelloWorld"><p>{{l10n.Hello}} {{text}}</p><p>Looks like we have <span class="Ldt-HelloWorld-annotations">{{source.contents.annotation.length}} annotations</span> in this feed</p></div>'),Cr(n,"messages",{fr:{Hello:"Bonjour,"},en:{Hello:"Hello,"}}),n},annotationStyles={},Annotation=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastAnnotation=!1,this.minimized=this.start_minimized||!1,this.bounds=[0,0]}draw(){var l=this,d;function m(k){var A=l.getWidgetAnnotationsAtTime();A.length||(l.$.find(".Ldt-Annotation-Inner").addClass("Ldt-Annotation-Empty"),l.arrow&&l.arrow.moveToTime(k),l.bounds=[k,k],l.sendBounds())}function h(){if(d){var k=d.title,A=d.description.replace(/(^\s+|\s+$)/g,""),B=d.found&&l.source.getAnnotations().regexp||!1;l.$.find(".Ldt-Annotation-Title").html(IriSP.textFieldHtml(k,B)||"("+l.l10n.untitled+")"),A?(l.$.find(".Ldt-Annotation-Description-Block").removeClass("Ldt-Annotation-EmptyBlock"),l.$.find(".Ldt-Annotation-Description").html(IriSP.textFieldHtml(A,B))):l.$.find(".Ldt-Annotation-Description-Block").addClass("Ldt-Annotation-EmptyBlock")}}function S(k){d=k;var A=typeof k.url<"u"?k.url:document.location.href.replace(/#.*$/,"")+"#id="+k.id,B=l.l10n.watching+k.title+(l.site_name?l.l10n.on_site+l.site_name:""),M=k.getTags(),j=l.$.find(".Ldt-Annotation-Tags");j.empty(),M.length?(l.$.find(".Ldt-Annotation-Tags-Block").removeClass("Ldt-Annotation-EmptyBlock"),M.forEach(function(I){var P=I.title.replace(/(^\s+|\s+$)/g,"");if(P){var $=IriSP.jQuery('<li class="Ldt-Annotation-TagLabel"></li>').append(IriSP.jQuery("<span>").text(P));$.click(function(){l.search_on_tag_click&&l.source.getAnnotations().search(P),I.trigger("click")}),j.append($)}})):l.$.find(".Ldt-Annotation-Tags-Block").addClass("Ldt-Annotation-EmptyBlock"),h(),l.show_creator&&l.$.find(".Ldt-Annotation-Creator").text(k.creator),l.show_annotation_type&&(l.$.find(".Ldt-Annotation-Type").text(k.getAnnotationType().title),l.$.find(".Ldt-Annotation-Type").attr("title",k.getAnnotationType().description)),l.$.find(".Ldt-Annotation-Begin").text(k.begin.toString()),l.$.find(".Ldt-Annotation-End").text(k.end.toString()),k.elementType==="mashedAnnotation"?(l.$.find(".Ldt-Annotation-Inner").addClass("Ldt-Annotation-isMashup"),l.$.find(".Ldt-Annotation-MashupMedia").text(k.getMedia().title),l.$.find(".Ldt-Annotation-MashupBegin").text(k.annotation.begin.toString()),l.$.find(".Ldt-Annotation-MashupEnd").text(k.annotation.end.toString())):l.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-isMashup"),typeof l.socialWidget<"u"?l.socialWidget.updateUrls(A,B):setTimeout(function(){typeof l.socialWidget<"u"&&l.socialWidget.updateUrls(A,B)},800),l.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Empty"),l.bounds=[k.begin,k.end],l.arrow&&l.arrow.moveToTime((1-l.arrow_position)*k.begin+l.arrow_position*k.end),l.sendBounds()}this.renderTemplate(),this.$.find(".Ldt-Annotation-Title").click(function(){return d&&l.media.setCurrentTime(d.begin),!1}),this.show_social&&this.insertSubwidget(this.$.find(".Ldt-Annotation-Social"),{type:"Social"},"socialWidget"),this.show_arrow&&this.insertSubwidget(this.$.find(".Ldt-Annotation-Arrow"),{type:"Arrow",width:this.width},"arrow"),this.onMediaEvent("timeupdate",m),this.onMdpEvent("Annotation.hide","hide"),this.onMdpEvent("Annotation.show","show"),this.onMdpEvent("Annotation.minimize","minimize"),this.onMdpEvent("Annotation.maximize","maximize"),this.onMdpEvent("Annotation.getBounds","sendBounds"),this.$.find(".Ldt-Annotation-MaxMinButton").click(this.functionWrapper("toggleSize")),this.$.on("resize",function(){l.width=l.$.parent().width(),l.$.css({width:l.width})}),this.getWidgetAnnotations().forEach(function(k){k.on("enter",function(){S(k)})}),this.source.getAnnotations().on("found",h),this.source.getAnnotations().on("not-found",h),this.source.getAnnotations().on("search-cleared",h),IriSP.attachDndData(this.$.find("h3"),function(){return{title:d.title,description:d.description,image:d.thumbnail,uri:typeof d.url<"u"?d.url:document.location.href.replace(/#.*$/,"")+"#id="+d.id,text:"["+d.begin.toString()+"] "+d.title}})}sendBounds(){this.player.trigger("Annotation.boundsChanged",this.bounds)}drawAnnotation(l){this.lastAnnotation=l.id}hide(){this.$.slideUp()}show(){this.$.slideDown()}toggleSize(){this.minimized?this.maximize():this.minimize()}minimize(){this.minimized=!0,this.$.find(".Ldt-Annotation-Inner").addClass("Ldt-Annotation-Minimized")}maximize(){this.minimized=!1,this.$.find(".Ldt-Annotation-Inner").removeClass("Ldt-Annotation-Minimized")}},Cr(n,"messages",{fr:{watching:"Je regarde ",on_site:" sur ",tags_:"Mots-clés :",description_:"Description :",creator_:"Créé par :",excerpt_from:"Extrait de :",untitled:"Segment sans titre"},en:{watching:"I'm watching ",on_site:" on ",tags_:"Keywords:",description_:"Description:",creator_:"Created by :",excerpt_from:"Excerpt from:",untitled:"Untitled segment"}}),Cr(n,"template",'{{#show_arrow}}<div class="Ldt-Annotation-Arrow"></div>{{/show_arrow}}<div class="Ldt-Annotation-Widget {{^show_arrow}}Ldt-Annotation-ShowTop{{/show_arrow}}"><div class="Ldt-Annotation-Inner Ldt-Annotation-Empty{{#start_minimized}} Ldt-Annotation-Minimized{{/start_minimized}}"><div class="Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-MaxMinButton"></div>{{#show_social}}<div class="Ldt-Annotation-Social Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty"></div>{{/show_social}}<h3 class="Ldt-Annotation-HiddenWhenEmpty">{{#show_annotation_type}}<span class="Ldt-Annotation-Type"></span> » {{/show_annotation_type}}<a class="Ldt-Annotation-Title" href="#"></a> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">(<span class="Ldt-Annotation-Begin"></span> - <span class="Ldt-Annotation-End"></span>)</span></h3><h3 class="Ldt-Annotation-MashupOrigin Ldt-Annotation-HiddenWhenEmpty">{{l10n.excerpt_from}} <span class="Ldt-Annotation-MashupMedia"></span> <span class="Ldt-Annotation-Time Ldt-Annotation-HiddenWhenMinimized">(<span class="Ldt-Annotation-MashupBegin"></span> - <span class="Ldt-Annotation-MashupEnd"></span>)</span></h3><div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Creator-Block"><div class="Ldt-Annotation-Label">{{l10n.creator_}}</div>{{#show_creator}}<p class="Ldt-Annotation-Labelled Ldt-Annotation-Creator"></p></div>{{/show_creator}}{{#show_description}}<div class="Ldt-Annotation-Cleared Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Description-Block"><div class="Ldt-Annotation-Label">{{l10n.description_}}</div><p class="Ldt-Annotation-Labelled Ldt-Annotation-Description"></p></div>{{/show_description}}<div class="Ldt-Annotation-Tags-Block Ldt-Annotation-HiddenWhenMinimized Ldt-Annotation-HiddenWhenEmpty Ldt-Annotation-Cleared"><div class="Ldt-Annotation-Label">{{l10n.tags_}}</div><ul class="Ldt-Annotation-Labelled Ldt-Annotation-Tags"></ul></div></div></div></div>'),Cr(n,"defaults",{annotation_type:"chap",start_minimized:!1,show_arrow:!0,show_creator:!0,show_description:!0,arrow_position:.5,site_name:"Lignes de Temps",search_on_tag_click:!0,show_social:!0,show_annotation_type:!1}),n},annotationsControllerStyles={},AnnotationsController=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate();var l=this;this.element_$=this.$.find(".Ldt-AnnotationsController"),this.displayButton_$=this.$.find(".Ldt-AnnotationsController-ShowAnnotationsListButton"),this.writeButton_$=this.$.find(".Ldt-AnnotationsController-ShowCreateAnnotationButton"),this.writeButton_$.click(function(){l.writeButton_$.hasClass("selected")?(l.player.trigger("CreateAnnotation.hide"),l.toggle_widgets?l.player.trigger("AnnotationsList.show"):l.display_or_write&&l.player.trigger("AnnotationsList.hide")):(l.player.trigger("CreateAnnotation.show"),l.display_or_write&&l.player.trigger("AnnotationsList.hide"))}),this.displayButton_$.click(function(){l.displayButton_$.hasClass("selected")?(l.player.trigger("AnnotationsList.hide"),l.toggle_widgets?l.player.trigger("CreateAnnotation.show"):l.display_or_write&&l.player.trigger("CreateAnnotation.hide")):(l.player.trigger("AnnotationsList.show"),l.display_or_write&&l.player.trigger("CreateAnnotation.hide"))}),this.hide_without_segment&&(this.onMediaEvent("timeupdate",function(){l.refresh()}),this.onMediaEvent("settimerange",function(d){l.refresh(d)}),this.segments=this.source.getAnnotationsByTypeTitle(this.segments_annotation_type),this.currentSegment=!1),this.createAnnotationEnabled=!1,this.onMdpEvent("CreateAnnotation.hide",function(){l.hide_when_writing&&l.show(),l.createAnnotationEnabled=!1,l.writeButton_$.toggleClass("selected",!1)}),this.onMdpEvent("CreateAnnotation.show",function(){l.hide_when_writing&&l.hide(),l.createAnnotationEnabled=!0,l.writeButton_$.toggleClass("selected",!0)}),this.onMdpEvent("AnnotationsList.hide",function(){l.displayButton_$.toggleClass("selected",!1)}),this.onMdpEvent("AnnotationsList.show",function(){l.displayButton_$.toggleClass("selected",!0)}),this.starts_hidden?(this.visible=!0,this.hide()):(this.visible=!1,this.show()),this.starting_widget&&this.visible&&(this.starting_widget=="AnnotationsList"?this.player.trigger("AnnotationsList.show"):this.starting_widget=="CreateAnnotation"&&this.player.trigger("CreateAnnotation.show"))}refresh(l){if(l=typeof l<"u"?l:!1,l||this.media.getTimeRange()&&(l=this.media.getTimeRange()),this.hide_without_segment){if(!l&&!this.media.getTimeRange())_currentTime=this.media.getCurrentTime(),_currentSegments=this.segments.filter(function(h){return _currentTime>=h.begin&&_currentTime<=h.end}),_currentSegments.length>0?currentSegment=!0:currentSegment=!1;else{var d=l[0],m=l[1];_currentSegments=this.segments.filter(function(h){return d==h.begin&&m==h.end}),_currentSegments.length>0?currentSegment=!0:currentSegment=!1}!currentSegment&&_currentSegments.length==0?(this.visible||this.hide_when_writing)&&(this.writeButton_$.toggleClass("selected",!1),this.displayButton_$.toggleClass("selected",!1),this.player.trigger("CreateAnnotation.hide"),this.player.trigger("AnnotationsList.hide"),this.hide()):this.visible||(this.createAnnotationEnabled||this.show(),this.writeButton_$.toggleClass("selected",!1),this.displayButton_$.toggleClass("selected",!1),this.starting_widget=="AnnotationsList"&&this.player.trigger("AnnotationsList.show"),this.starting_widget=="CreateAnnotation"&&this.player.trigger("CreateAnnotation.show"))}}hide(){this.visible&&(this.visible=!1,this.element_$.hide())}show(){this.visible||(this.visible=!0,this.element_$.show())}},Cr(n,"defaults",{display_or_write:!1,toggle_widgets:!1,starts_hidden:!1,hide_without_segment:!1,hide_when_writing:!0,starting_widget:!1,always_show_widget:!1,segments_annotation_type:"chap",custom_write_text:!1,custom_display_text:!1}),Cr(n,"template","<div class='Ldt-AnnotationsController'><div class='Ldt-AnnotationsController-ButtonsContainer'>    <div class='Ldt-AnnotationsController-Button Ldt-AnnotationsController-ShowCreateAnnotationButton'>{{#custom_write_text}}{{/custom_write_text}}{{custom_write_text}}{{^custom_write_text}}{{l10n.write}}{{/custom_write_text}}</div>    <div class='Ldt-AnnotationsController-Button Ldt-AnnotationsController-ShowAnnotationsListButton'>{{#custom_display_text}}{{/custom_display_text}}{{custom_display_text}}{{^custom_display_text}}{{l10n.display}}{{/custom_display_text}}</div></div></div>"),Cr(n,"messages",{en:{write:"Write",display:"Display"},fr:{write:"Ecrire",display:"Voir"}}),n},annotationsListStyles={},AnnotationsList=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastIds=[];var m=this;this.throttledRefresh=_$1.throttle(function(h){m.refresh(h)},800),this.searchString=!1,this.lastSearch=!1,this.localSource=void 0}importUsers(){if(!this.source.users_data&&this.api_users_endpoint){this.usernames=Array();var l=this,d=this.getWidgetAnnotations(),m="";return d.forEach(function(h){l.usernames.indexOf(h.creator)==-1&&l.usernames.push(h.creator)}),this.usernames.forEach(function(h){m+=h+","}),m=m.substring(0,m.length-1),_url=mustache.render(this.api_users_endpoint,{usernames_list_string:encodeURIComponent(m),usernames_list_length:this.usernames.length}),jQuery.ajax({async:!1,url:_url,type:"GET",success:function(h){l.source.users_data=h.objects},error:function(h,S,k){console.log(h),console.log(S),console.log(k)}})}}ajaxSource(){var l=this.media.getCurrentTime(),d=this.media.duration;this.lastAjaxQuery=l;var m=mustache.render(this.ajax_url,{media:this.source.currentMedia.id,begin:Math.max(0,l-this.ajax_granularity),end:Math.min(d.milliseconds,l+this.ajax_granularity)});this.currentSource=this.player.loadMetadata(_$1.defaults({url:m},this.metadata))}showScreen(l){this.$.find(".Ldt-AnnotationsList-Screen"+l).show().siblings().hide()}ajaxMashup(){var l=this.media.getCurrentTime(),d=this.source.currentMedia.getAnnotationAtTime(l);if(typeof d<"u"&&d.id!==this.lastMashupAnnotation){this.lastMashupAnnotation=d.id;var m=d.getMedia(),h=mustache.render(this.ajax_url,{media:m.id,begin:Math.max(0,d.annotation.begin.milliseconds-this.ajax_granularity),end:Math.min(m.duration.milliseconds,d.annotation.end.milliseconds+this.ajax_granularity)});this.currentSource=this.player.loadMetadata(_$1.defaults({url:h},this.metadata))}}importAnnotations(){var l=this,d=jQuery,m=d("<textarea>");d("<div>").append(d("<span>").addClass("importAnnotationsLabel").text(l.messages.import_annotations)).addClass("importContainer").dialog({title:"Annotation import",autoOpen:!0,width:"80%",minHeight:"400",height:400,buttons:[{text:"Close",click:function(){d(this).dialog("close")}},{text:"Import",click:function(){for(var h=/(\[[\d:]+\])/,S=m[0].value.split(h).filter(function(P){return!P.match(/^\s*$/)}),k=null,A=null,B=null,M=null,j=0;j<S.length;j++){var I=S[j];I.match(h)?(M=="text"?(A=t.timestamp2ms(I.slice(1,-1)),TODO.createAnnotation(k,A,B),k=A,A=null,B=null):(B=null,k=t.timestamp2ms(I.slice(1,-1)),A=null),M="timestamp"):(B=I,M="text"),M=="text"&&k!==null&&TODO.createAnnotation(k,k,B)}}}]})}refresh(l){if(l=typeof l<"u"&&l,this.currentSource.status!==t.Model._SOURCE_STATUS_READY)return 0;var d=this,m=this.media.getCurrentTime(),h=this.annotation_type?this.currentSource.getAnnotationsByTypeTitle(this.annotation_type):this.currentSource.getAnnotations();if(this.mashupMode){var S=this.source.currentMedia.getAnnotationAtTime(m);if(typeof S<"u"){m=m-S.begin+S.annotation.begin;var k=S.getMedia().id;h=h.filter(function(N){return N.getMedia().id===k})}}h=h.filter(function(N){return N.found!==!1}),this.filter_by_segments&&!(this.show_filters&&this.segment_filter&&this.ignoresegmentcheckbox_$[0].checked)&&(_segmentsAnnotation=this.currentSource.getAnnotationsByTypeTitle(this.segments_annotation_type),this.media.getTimeRange()?_currentSegments=_segmentsAnnotation.filter(function(N){return d.media.getTimeRange()[0]==N.begin&&d.media.getTimeRange()[1]==N.end}):_currentSegments=_segmentsAnnotation.filter(function(N){return m>=N.begin&&m<=N.end}),_currentSegments.length==0?h=h.filter(function(N){return!1}):h=h.filter(function(N){return _annotation_time=(N.begin+N.end)/2,_currentSegments[0].begin<=_annotation_time&&_currentSegments[0].end>=_annotation_time}),this.annotations_count_header&&this.annotations_count!=h.length&&(this.annotations_count=h.length,this.refreshHeader())),this.show_only_annotation_from_user&&(h=h.filter(function(N){return N.creator==d.show_only_annotation_from_user})),this.limit_count&&(h=h.sortBy(function(N){return Math.abs((N.begin+N.end)/2-m)}).slice(0,this.limit_count)),this.newest_first?h=h.sortBy(function(N){return-N.created.valueOf()}):h=h.sortBy(function(N){return N.begin}),this.show_filters&&(this.user_filter&&(_username=this.userselect_$[0].options[this.userselect_$[0].selectedIndex].value,_username!="false"&&(h=h.filter(function(N){return N.creator==_username}))),this.keyword_filter&&(_keyword=this.keywordinput_$[0].value,_keyword!=""&&(h=h.filter(function(N){return N.description.toLowerCase().match(_keyword.toLowerCase())}))),this.date_filter&&this.datefilterinput_$[0].value!=""&&(_date=this.datefilterinput_$.datepicker("getDate"),h=h.filter(function(N){return N.created.getDate()==_date.getDate()&&N.created.getMonth()==_date.getMonth()&&N.created.getFullYear()==_date.getFullYear()})),this.latest_contributions_filter&&this.latestcontributionscheckbox_$[0].checked&&(h=h.sortBy(function(N){return-N.created.valueOf()}),this.usernames.forEach(function(N){latest_ann=h.filter(function(F){return F.creator==N})[0],h=h.filter(function(F){return F.id==(latest_ann?latest_ann.id:!1)||F.creator!=N})})));var A=h.idIndex;if(l||!_$1.isEqual(A,this.lastIds)||this.searchString!==this.lastSearch){if(this.lastSearch=this.searchString,this.lastIds=A,this.list_$.html(""),h.forEach(function(N){var F=typeof N.url<"u"&&N.url?N.url:typeof d.source.projectId<"u"&&typeof N.project<"u"&&N.project&&d.source.projectId!==N.project?mustache.render(d.foreign_url,{project:N.project,media:N.media.id,annotation:N.id,annotationType:N.annotationType.id}):document.location.href.replace(/#.*$/,"")+"#id="+N.id+"&t="+N.begin/1e3,U=N.project!=d.source.projectId,J="",te=N.description,se=typeof N.thumbnail<"u"&&N.thumbnail?N.thumbnail:d.default_thumbnail;if(d.show_creator&&N.creator){var de=[],Q={},ve="";d.source.users_data&&(de=d.source.users_data.filter(function(y){return y.username==N.creator})),de.length==0?Q.username=N.creator:Q=de[0],ve=d.make_name_string_function(Q)}if(d.show_title&&N.title)var J=N.title;var he;_$1(d.polemics).each(function(y){var w=t.Model.regexpFromTextOrArray(y.keyword,!0);w.test(J+" "+te)&&(he=y.background_color)});var ke=!1;if(d.show_creation_date&&(ke=N.created.toLocaleDateString()+", "+N.created.toLocaleTimeString().replace(/\u200E/g,"").replace(/^([^\d]*\d{1,2}:\d{1,2}):\d{1,2}([^\d]*)$/,"$1$2")),d.tags==!0)var T=N.getTagTexts();else var T=!1;var u={id:N.id,media_id:N.getMedia().id,htitle:t.textFieldHtml(J),title:J,creator:ve,hdescription:t.textFieldHtml(te),description:te,begin:N.begin.toString(),end:N.end.toString(),created:ke,show_timecode:d.show_timecode,show_end_time:d.show_end_time,show_title:d.show_title&&J,thumbnail:se,url:F,tags:T,specific_style:typeof he<"u"?"background-color: "+he:"",l10n:d.l10n,editable:d.editable,external:U,show_publish:d.show_publish,show_creator:d.show_creator,show_twitter:d.show_twitter,twitter_param:jQuery.param({url:F,text:t.textFieldHtml(J)+(d.twitter_hashtag?" #"+d.twitter_hashtag:"")}),allow_annotations_deletion:d.allow_annotations_deletion},p=mustache.render(d.constructor.annotationTemplate,u),b=jQuery(p),e=function(){d.$.find(".Ldt-AnnotationsList-li").removeClass("selected"),b.addClass("selected")},c=function(){d.$.find(".Ldt-AnnotationsList-li").removeClass("selected")};b.mouseover(function(){N.trigger("select")}).mouseout(function(){N.trigger("unselect")}).click(function(){d.filter_by_segments&&d.media.getTimeRange()&&(_ann_time=(N.begin+N.end)/2,(_ann_time<=d.media.getTimeRange()[0]||_ann_time>=d.media.getTimeRange()[1])&&d.media.resetTimeRange()),N.trigger("click")}).appendTo(d.list_$),t.attachDndData(b.find("[draggable]"),{title:J,description:te,uri:F,image:N.thumbnail,text:"["+N.begin.toString()+"] "+J}),b.on("remove",function(){N.off("select",e),N.off("unselect",c)}),N.on("select",e),N.on("unselect",c)}),this.$.find(".Ldt-AnnotationsList-Tag-Li").each(function(){var N=jQuery(this);N.text().replace(/(^\s+|\s+$)/g,"")||N.remove()}),this.editable){var B=d,M=jQuery,j=function(N,F){var U="#FF9999",J="#99FF99";F===void 0&&(F=N);var te=M(N.dataset.editable_type==="multiline"?"<textarea>":"<input>").addClass("editableInput").insertBefore(M(F));te[0].value=N.dataset.editable_value,M(te).show().focus(),M(N).addClass("editing");function se(ve){M(N).removeClass("editing"),te.remove();var he=M(N).css("background-color");M(N).stop().css("background-color",ve).animate({backgroundColor:he},1e3)}function de(ve){se(U)}function Q(){var ve=te[0].value;if(ve==N.dataset.editable_value){se(J);return}if(ve==""){$(N.dataset.editable_id),B.player.trigger("Annotation.delete",N.dataset.editable_id);return}else{var he=ve;if(N.dataset.editable_type=="timestamp"&&(he=t.timestamp2ms(ve),Number.isNaN(he))){de();return}N.dataset.editable_value=ve,ve=he,M(N).text(he)}var ke=I(N.dataset.editable_id);ke===void 0?(console.log("Strange error: cannot find edited annotation"),se(U)):(N.dataset.editable_value=ve,N.dataset.editable_field=="begin"?ke.setBegin(ve):N.dataset.editable_field=="end"?ke.setEnd(ve):ke[N.dataset.editable_field]=ve,ke.modified=new Date,ke.contributor=B.player.config.username||"COCo User",B.player.addLocalAnnotation(ke),B.player.trigger("Annotation.update",ke),se(J))}M(te).bind("keydown",function(ve){ve.which==13?(ve.preventDefault(),Q()):ve.which==27&&(ve.preventDefault(),de())}).bind("blur",function(ve){Q()})},I=function(N){return B.player.getLocalAnnotation(N)},P=function(){B.player.saveLocalAnnotations(),B.source.merge(B.player.localSource)},$=function(N){B.source.getAnnotations().removeId(N,!0),B.player.deleteLocalAnnotation(N),B.refresh(!0)};this.$.find(".Ldt-AnnotationsList-Delete").click(function(N){var F=I(this.dataset.editable_id);confirm(mustache.render(B.l10n.confirm_delete_message,{annotation:F}))&&$(this.dataset.editable_id),B.refresh(!0)}),this.$.find(".Ldt-AnnotationsList-Edit").click(function(N){if(B.on_edit){var F=I(this.dataset.editable_id);B.on_edit(F)}else{var U=M(this).parents(".Ldt-AnnotationsList-li").find(".Ldt-AnnotationsList-TitleContent.Ldt-live-editable");j(U[0])}}),this.$.find(".Ldt-AnnotationsList-PublishAnnotation").click(function(N){var F=I(this.dataset.editable_id);if(confirm(mustache.render(B.l10n.confirm_publish_message,{annotation:F}))){var U=mustache.render(B.api_endpoint_template,{id:B.source.projectId});if(U!==""){var J=B.player.sourceManager.newLocalSource({serializer:t.serializers[B.api_serializer]});if(B.publish_type){var te=B.source.getAnnotationTypes().filter(function(de){return de.title==B.publish_type});te.length==1&&F.setAnnotationType(te[0].id)}var se=new t.Model.List(B.player.sourceManager);se.push(F),J.addList("annotation",se),jQuery.ajax({url:U,type:B.api_method,contentType:"application/json",data:J.serialize(),success:function(de){M(this).addClass("published");var Q=I(F.id);Q.setTags(["published"]),P(),B.player.trigger("Annotation.publish",F)},error:function(de,Q,ve){t.log("Error when sending annotation",ve)}})}}}),this.$.find(".Ldt-AnnotationsList-TimeEdit").dblclick(function(N){var F=this,U=I(F.dataset.editable_id);U!==void 0&&(U.setBegin(B.media.getCurrentTime().milliseconds),P(),B.player.trigger("Annotation.update",U),B.refresh(!0))})}if(this.$.find(".Ldt-AnnotationsList-Tag-Li").click(function(){d.source.getAnnotations().search(jQuery(this).text().replace(/(^\s+|\s+$)/g,""))}),this.$.find(".Ldt-Annotation-Timecode").click(function(){d.media.setCurrentTime(Number(this.dataset.timecode))}),this.$.find(".Ldt-AnnotationsList-Play").click(function(){var N=jQuery(this),F=N.attr("data-annotation-id");d.jwplayers[F]&&jwplayer(d.jwplayers[F]).play(),d.media.pause()}),this.source.getAnnotations().searching){var z=d.source.getAnnotations().regexp||!1;this.$.find(".Ldt-AnnotationsList-Title a, .Ldt-AnnotationsList-Description").each(function(){var N=jQuery(this);N.html(t.textFieldHtml(N.text(),z))})}this.$.find(".Ldt-AnnotationsList-DeleteButton").click(d.functionWrapper("onDeleteClick"))}return this.ajax_url&&(this.mashupMode?this.ajaxMashup():Math.abs(m-this.lastAjaxQuery)>this.ajax_granularity&&this.ajaxSource()),h.length}onDeleteClick(l){_list=this.getWidgetAnnotations(),ann_id=l.target.dataset.annotation,delete_preview_$=this.$.find(".Ldt-AnnotationsList-ul-ToDelete"),delete_preview_$.html(""),_list=_list.filter(function(I){return I.id==ann_id});var d=_list[0],m="",h="",S=this;if(d.creator){var k=[],A={};S.source.users_data&&(k=S.source.users_data.filter(function(I){return I.username==d.creator})),k.length==0?A.username=d.creator:A=k[0],h=S.make_name_string_function(A)}if(d.title){var B=d.title;B.substr(0,m.length+1)==m+":"&&(m=""),m=m+(m==""?"":": ")+d.title}var M=!1;this.show_creation_date&&(M=d.created.toLocaleDateString()+", "+d.created.toLocaleTimeString());var j={id:d.id,media_id:d.getMedia().id,htitle:t.textFieldHtml(m),hdescription:t.textFieldHtml(d.description),begin:d.begin.toString(),end:d.end.toString(),created:M,show_timecode:this.show_timecode,show_creator:this.show_creator,creator:h,tags:!1,l10n:this.l10n,allow_annotations_deletion:!1};_html=mustache.render(this.constructor.annotationTemplate,j),delete_preview_$.html(_html),this.$.find(".Ldt-AnnotationsList-ConfirmDelete").click(function(){S.sendDelete(ann_id)}),this.showScreen("Delete")}refreshHeader(){var l=" ("+this.annotations_count+" "+this.annotations_count_header_string+")";this.$.find(".Ldt-AnnotationsList-header").html(""),this.$.find(".Ldt-AnnotationsList-header").html(this.custom_header&&typeof this.custom_header=="string"?this.custom_header+l:this.l10n.header+l)}hide(){var l=this;this.visible&&(this.visible=!1,this.widget_$.slideUp(function(){l.$.find(".Ldt-AnnotationsList-header").hide()}),this.showScreen("Main"))}show(){this.visible||(this.visible=!0,this.$.find(".Ldt-AnnotationsList-header").show(),this.widget_$.slideDown(),this.showScreen("Main"))}toggle(){this.always_visible||(this.visible?this.hide():this.show())}revertToMainScreen(){this.$.find(".Ldt-AnnotationsList-ScreenMain").is(":hidden")&&this.showScreen("Main")}sendDelete(l){var d=this,m=mustache.render(this.api_delete_endpoint,{annotation_id:l,project_id:this.project_id});jQuery.ajax({url:m,type:this.api_delete_method,contentType:"application/json",success:function(h){d.showScreen("Success"),window.setTimeout(d.functionWrapper("revertToMainScreen"),d.after_send_timeout||2e3),d.currentSource.getAnnotations().removeId(l),d.player.trigger("AnnotationsList.refresh")},error:function(h,S,k){t.log("Error when sending annotation",k),d.showScreen("Error"),window.setTimeout(d.functionWrapper("revertToMainScreen"),d.after_send_timeout||2e3)}}),this.showScreen("Sending")}draw(){this.jwplayers={},this.mashupMode=this.media.elementType==="mashup",this.renderTemplate();var l=this;this.list_$=this.$.find(".Ldt-AnnotationsList-ul"),this.widget_$=this.$.find(".Ldt-AnnotationsListWidget"),this.widget_max_height&&this.widget_$.css("max-height",this.widget_max_height),this.show_filters&&(this.user_filter&&(this.userselect_$=this.$.find("#Ldt-AnnotationsList-userFilter"),this.userselect_$.change(function(){l.player.trigger("AnnotationsList.refresh")}),this.userselect_$.html("<option selected value='false'>"+this.l10n.everyone+"</option>"),this.usernames.forEach(function(h){var S=l.source.users_data.filter(function(A){return A.username==h}),k={};S.length==0?k.username=h:k=S[0],l.userselect_$.append("<option value='"+h+"'>"+l.make_name_string_function(k)+"</option>")})),this.keyword_filter&&(this.keywordinput_$=this.$.find("#Ldt-AnnotationsList-keywordsFilter"),this.keywordinput_$.keyup(function(){l.player.trigger("AnnotationsList.refresh")})),this.segment_filter&&(this.ignoresegmentcheckbox_$=this.$.find("#Ldt-AnnotationsList-ignoreSegmentsFilter"),this.ignoresegmentcheckbox_$.click(function(){l.player.trigger("AnnotationsList.refresh")})),this.date_filter&&(this.datefilterinput_$=this.$.find("#Ldt-AnnotationsList-dateFilter"),this.datefilterinput_$.datepicker({dateFormat:"dd/mm/yy"}),this.datefilterinput_$.change(function(){l.player.trigger("AnnotationsList.refresh")}),this.current_day_filter&&(currentDate=new Date,this.datefilterinput_$.datepicker("setDate",currentDate))),this.latest_contributions_filter&&(this.latestcontributionscheckbox_$=this.$.find("#Ldt-AnnotationsList-latestContributionsFilter"),this.latestcontributionscheckbox_$.click(function(){l.player.trigger("AnnotationsList.refresh")}))),this.source.getAnnotations().on("search",function(h){l.searchString=h,l.source!==l.currentSource&&(l.currentSource.getAnnotations().search(h),l.throttledRefresh())}),this.source.getAnnotations().on("found",function(){l.throttledRefresh()}),this.source.getAnnotations().on("not-found",function(){l.throttledRefresh()}),this.source.getAnnotations().on("clear-search",function(){l.searchString=!1,l.source!==l.currentSource&&l.currentSource.getAnnotations().trigger("clear-search")}),this.$.find(".Ldt-AnnotationsList-Close").click(function(){l.showScreen("Main")}),this.source.getAnnotations().on("search-cleared",function(){l.throttledRefresh()}),this.onMdpEvent("AnnotationsList.refresh",function(){l.ajax_url&&(l.mashupMode?l.ajaxMashup():l.ajaxSource()),l.throttledRefresh(!1)}),this.onMdpEvent("AnnotationsList.update",function(){l.ajax_url&&(l.mashupMode?l.ajaxMashup():l.ajaxSource()),l.throttledRefresh(!0)}),this.ajax_url?this.mashupMode?this.ajaxMashup():this.ajaxSource():this.currentSource=this.source,this.refresh_interval&&window.setInterval(function(){l.currentSource.get()},this.refresh_interval),this.annotations_count_header&&(this.annotations_count=!1),this.onMdpEvent("AnnotationsList.toggle","toggle"),this.onMdpEvent("AnnotationsList.hide","hide"),this.onMdpEvent("AnnotationsList.show","show"),this.onMdpEvent("createAnnotationWidget.addedAnnotation",this.throttledRefresh);for(var d=["timeupdate","seeked","loadedmetadata","settimerange"],m=0;m<d.length;m++)this.onMediaEvent(d[m],this.throttledRefresh);this.throttledRefresh(),this.showScreen("Main"),this.$.find(".Ldt-AnnotationsList-CancelDelete").click(function(){l.showScreen("Main")}),this.visible=!0,this.start_visible||this.hide()}},Cr(n,"defaults",{pre_draw_callback:function(){return this.importUsers()},ajax_url:!1,ajax_granularity:6e5,default_thumbnail:"",custom_external_icon:"",foreign_url:"",annotation_type:!1,refresh_interval:0,limit_count:20,newest_first:!1,show_title:!0,show_audio:!0,show_creator:!0,show_controls:!1,show_end_time:!0,show_publish:!1,show_twitter:!1,twitter_hashtag:"",on_edit:void 0,publish_type:"PublicContribution",api_endpoint_template:"",api_serializer:"ldt_annotate",api_method:"POST",editable:!1,editable_storage:"",widget_max_height:680,always_visible:!1,start_visible:!0,show_audio:!0,show_filters:!1,keyword_filter:!0,date_filter:!0,user_filter:!0,segment_filter:!0,latest_contributions_filter:!1,current_day_filter:!0,show_header:!1,custom_header:!1,annotations_count_header:!0,annotations_count_header_string:"annotations",show_creation_date:!1,show_timecode:!0,show_end_time:!0,project_id:"",allow_annotations_deletion:!1,api_delete_endpoint:"",api_delete_method:"DELETE",api_users_endpoint:"",api_users_method:"GET",make_name_string_function:function(l){return l.username?l.username:"Anonymous"},filter_by_segments:!1,segment_filter:!0,segments_annotation_type:"chap",show_only_annotation_from_user:!1,tags:!0,polemics:[{keyword:"++",background_color:"#c9ecc6"},{keyword:"--",background_color:"#f9c5c6"},{keyword:"??",background_color:"#cec5f9"},{keyword:"==",background_color:"#f9f4c6"}]}),Cr(n,"messages",{en:{voice_annotation:"Voice Annotation",now_playing:"Now playing...",previous:"Previous",next:"Next",set_time:"Double-click to update to current player time",edit_annotation:"Edit note",delete_annotation:"Delete note",publish_annotation:"Make note public",import_annotations:"Paste or load notes in this field and press Import.",confirm_delete_message:"You are about to delete {{ annotation.title }}. Are you sure you want to delete it?",confirm_publish_message:"You are about to publish {{ annotation.title }}. Are you sure you want to make it public?",tweet_annotation:"Tweet annotation",external_annotation:"This annotation was submitted to another project",everyone:"Everyone",header:"Annotations for this content",segment_filter:"All cuttings",latest_contributions:"Latest contributions",close_widget:"Close",confirm:"Confirm",cancel:"Cancel",annotation_deletion_delete:"You will delete this annotation",annotation_deletion_sending:"Your deletion request is being sent ... ",annotation_deletion_success:"The annotation has been deleted.",annotation_deletion_error:"There was an error contacting the server. The annotation has not been deleted."},fr:{voice_annotation:"Annotation Vocale",now_playing:"Lecture en cours...",previous:"Précédent",next:"Suivant",set_time:"Double-cliquer pour fixer au temps du lecteur",edit_annotation:"Éditer la note",delete_annotation:"Supprimer la note",publish_annotation:"Rendre la note publique",import_annotations:"Copiez ou chargez des notes dans ce champ et appuyez sur Import",confirm_delete_message:"Vous allez supprimer {{ annotation.title }}. Êtes-vous certain(e) ?",confirm_publish_message:"Vous allez publier {{ annotation.title }}. Êtes-vous certain(e) ?",tweet_annotation:"Tweeter l'annotation",external_annotation:"Cette annotation a été postée sur un autre projet",everyone:"Tous",header:"Annotations sur ce contenu",segment_filter:"Tous les segments",latest_contributions:"Dernières contributions",close_widget:"Fermer",confirm:"Confirmer",cancel:"Annuler",annotation_deletion_delete:"Vous allez supprimer cette annotation",annotation_deletion_sending:"Votre demande de suppression est en cours d'envoi ... ",annotation_deletion_success:"L'annotation a été supprimée.",annotation_deletion_error:"Une erreur s'est produite en contactant le serveur. L'annotation n'a pas été supprimée."}}),Cr(n,"template",'{{#show_header}}<p class="Ldt-AnnotationsList-header">{{#custom_header}}{{custom_header}}{{/custom_header}}{{^custom_header}}{{l10n.header}}{{/custom_header}}</p>{{/show_header}}<div class="Ldt-AnnotationsListWidget"><div class="Ldt-AnnotationsList-ScreenMain">{{#show_filters}}<div class="Ldt-AnnotationsList-Filters">{{#keyword_filter}}<input class="Ldt-AnnotationsList-filter-text" id="Ldt-AnnotationsList-keywordsFilter" type="text" value=""></input>{{/keyword_filter}}{{#user_filter}}<select class="Ldt-AnnotationsList-filter-dropdown" id="Ldt-AnnotationsList-userFilter"><option selected value="">{{l10n.everyone}}</option></select>{{/user_filter}}{{#date_filter}}<label class="Ldt-AnnotationsList-filter-date">Date: <input id="Ldt-AnnotationsList-dateFilter" type="text"></input></label>{{/date_filter}}{{#segment_filter}}<label class="Ldt-AnnotationsList-filter-checkbox"><input type="checkbox" id="Ldt-AnnotationsList-ignoreSegmentsFilter">{{l10n.segment_filter}}</label>{{/segment_filter}}{{#latest_contributions_filter}}<label class="Ldt-AnnotationsList-filter-checkbox"><input type="checkbox" id="Ldt-AnnotationsList-latestContributionsFilter">{{l10n.latest_contributions}}</label>{{/latest_contributions_filter}}</div>{{/show_filters}}{{#show_controls}}<div class="Ldt-AnnotationsList-Controls"><span class="Ldt-AnnotationsList-Control-Prev">{{ l10n.previous }}</span> | <span class="Ldt-AnnotationsList-Control-Next">{{ l10n.next }}</span></div>{{/show_controls}}{{#show_audio}}<div class="Ldt-AnnotationsList-Audio"></div>{{/show_audio}}<ul class="Ldt-AnnotationsList-ul"></ul></div>{{#allow_annotations_deletion}}<div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenDelete"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_delete}}<ul class="Ldt-AnnotationsList-ul-ToDelete"></ul><a class="Ldt-AnnotationsList-ConfirmDelete">{{l10n.confirm}}</a> <a class="Ldt-AnnotationsList-CancelDelete">{{l10n.cancel}}</a></div><div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSending"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_sending}}</div><div data-annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenSuccess"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_success}}</div><div data.annotation="{{id}}" class="Ldt-AnnotationsList-Screen Ldt-AnnotationsList-ScreenError"><a title="{{l10n.close_widget}}" class="Ldt-AnnotationsList-Close" href="#"></a>{{l10n.annotation_deletion_error}}</div>{{/allow_annotations_deletion}}</div>'),Cr(n,"annotationTemplate",'<li class="Ldt-AnnotationsList-li Ldt-Highlighter-Annotation Ldt-TraceMe" data-annotation="{{ id }}" data-begin="{{ begin_ms }}" data-end="{{ end_ms }}" trace-info="annotation-id:{{id}}, media-id:{{media_id}}" style="{{specific_style}}"><div data-annotation="{{ id }}" class="Ldt-AnnotationsList-ThumbContainer Ldt-AnnotationsList-Annotation-Screen Ldt-AnnotationsList-Annotation-ScreenMain"><a {{#url}}href="{{url}}"{{/url}} draggable="true"><img title="{{^external}}{{ begin }} - {{ end }}{{/external}}{{#external}}{{l10n.external_annotation}}{{/external}}" class="Ldt-AnnotationsList-Thumbnail" src="{{thumbnail}}" />{{#external}}<div title="{{l10n.external_annotation}}" class="Ldt-AnnotationsList-External-Icon"></div>{{/external}}</a></div>{{#allow_annotations_deletion}}<div data-annotation="{{ id }}" class="Ldt-AnnotationsList-DeleteButton">&#10006;</div>{{/allow_annotations_deletion}}{{#show_timecode}}<div title="{{l10n.set_time}}" class="Ldt-AnnotationsList-Duration"><span class="Ldt-AnnotationsList-Begin Ldt-live-editable Ldt-AnnotationsList-TimeEdit" data-editable_value="{{begin}}" data-editable_id="{{id}}" data-editable_field="begin" data-editable_type="timestamp">{{begin}}</span>{{#show_end_time}} - <span class="Ldt-AnnotationsList-End Ldt-live-editable" data-editable_value="{{end}}" data-editable_id="{{id}}" data-editable_field="end" data-editable_type="timestamp">{{end}}</span>{{/show_end_time}}</div>{{/show_timecode}}<h3 class="Ldt-AnnotationsList-Title Ldt-Annotation-Timecode" data-timecode="{{ begin_ms }}" draggable="true">{{#show_title}}<span class="Ldt-AnnotationsList-TitleContent Ldt-live-editable" data-editable_value="{{title}}" data-editable_type="multiline" data-editable_id="{{id}}" data-editable_field="title">{{{htitle}}}</span>{{/show_title}}{{#show_creator}}<span class="Ldt-AnnotationsList-Creator">{{ creator }}</span>{{/show_creator}}</h3><p class="Ldt-AnnotationsList-Description Ldt-live-editable" data-editable_type="multiline" data-editable_value="{{description}}" data-editable_id="{{id}}" data-editable_field="description">{{{hdescription}}}</p>{{#created}}<div class="Ldt-AnnotationsList-CreationDate">{{{created}}}</div>{{/created}}{{#tags.length}}<ul class="Ldt-AnnotationsList-Tags">{{#tags}}{{#.}}<li class="Ldt-AnnotationsList-Tag-Li"><span>{{.}}</span></li>{{/.}}{{/tags}}</ul>{{/tags.length}}{{#audio}}<div class="Ldt-AnnotationsList-Play" data-annotation-id="{{id}}">{{l10n.voice_annotation}}</div>{{/audio}}<div class="Ldt-AnnotationsList-EditControls">{{#show_twitter}}<a title="{{l10n.tweet_annotation}}" target="_blank" href="https://twitter.com/intent/tweet?{{twitter_param}}"><img width="16" height="16" src="metadataplayer/img/twitter.svg"></a>{{/show_twitter}}{{#show_publish}}<div title="{{l10n.publish_annotation}}" class="Ldt-AnnotationsList-PublishAnnotation" data-editable_id="{{id}}"></div>{{/show_publish}}{{#editable}}<div title="{{l10n.edit_annotation}}" class="Ldt-AnnotationsList-Edit" data-editable_id="{{id}}"></div><div title="{{l10n.delete_annotation}}" class="Ldt-AnnotationsList-Delete" data-editable_id="{{id}}"></div>{{/editable}}</div></li>'),n};var raphael_min={exports:{}};(function(t,n){(function(l,d){t.exports=d()})(window,function(){return function(l){var d={};function m(h){if(d[h])return d[h].exports;var S=d[h]={i:h,l:!1,exports:{}};return l[h].call(S.exports,S,S.exports,m),S.l=!0,S.exports}return m.m=l,m.c=d,m.d=function(h,S,k){m.o(h,S)||Object.defineProperty(h,S,{enumerable:!0,get:k})},m.r=function(h){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})},m.t=function(h,S){if(1&S&&(h=m(h)),8&S||4&S&&typeof h=="object"&&h&&h.__esModule)return h;var k=Object.create(null);if(m.r(k),Object.defineProperty(k,"default",{enumerable:!0,value:h}),2&S&&typeof h!="string")for(var A in h)m.d(k,A,(function(B){return h[B]}).bind(null,A));return k},m.n=function(h){var S=h&&h.__esModule?function(){return h.default}:function(){return h};return m.d(S,"a",S),S},m.o=function(h,S){return Object.prototype.hasOwnProperty.call(h,S)},m.p="",m(m.s=1)}([function(l,d,m){var h,S;h=[m(2)],(S=(function(k){function A(ae){if(A.is(ae,"function"))return B?ae():k.on("raphael.DOMload",ae);if(A.is(ae,v))return A._engine.create[U](A,ae.splice(0,3+A.is(ae[0],w))).add(ae);var ye=Array.prototype.slice.call(arguments,0);if(A.is(ye[ye.length-1],"function")){var Ce=ye.pop();return B?Ce.call(A._engine.create[U](A,ye)):k.on("raphael.DOMload",function(){Ce.call(A._engine.create[U](A,ye))})}return A._engine.create[U](A,arguments)}A.version="2.3.0",A.eve=k;var B,M,j=/[, ]+/,I={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},P=/\{(\d+)\}/g,$="hasOwnProperty",z={doc:document,win:window},N={was:Object.prototype[$].call(z.win,"Raphael"),is:z.win.Raphael},F=function(){this.ca=this.customAttributes={}},U="apply",J="concat",te="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,se="",de=" ",Q=String,ve="split",he="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[ve](de),ke={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},T=Q.prototype.toLowerCase,u=Math,p=u.max,b=u.min,e=u.abs,c=u.pow,y=u.PI,w="number",v="array",o=Object.prototype.toString,x=(A._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),E={NaN:1,Infinity:1,"-Infinity":1},R=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,H=u.round,Y=parseFloat,Z=parseInt,L=Q.prototype.toUpperCase,D=A._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},ee=A._availableAnimAttrs={blur:w,"clip-rect":"csv",cx:w,cy:w,fill:"colour","fill-opacity":w,"font-size":w,height:w,opacity:w,path:"path",r:w,rx:w,ry:w,stroke:"colour","stroke-opacity":w,"stroke-width":w,transform:"transform",width:w,x:w,y:w},oe=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,fe={hs:1,rg:1},ue=/,?([achlmqrstvxz]),?/gi,qe=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,rt=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Ve=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,et=(A._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),mt=function(ae,ye){return Y(ae)-Y(ye)},Ye=function(ae){return ae},We=A._rectPath=function(ae,ye,Ce,Pe,ze){return ze?[["M",ae+ze,ye],["l",Ce-2*ze,0],["a",ze,ze,0,0,1,ze,ze],["l",0,Pe-2*ze],["a",ze,ze,0,0,1,-ze,ze],["l",2*ze-Ce,0],["a",ze,ze,0,0,1,-ze,-ze],["l",0,2*ze-Pe],["a",ze,ze,0,0,1,ze,-ze],["z"]]:[["M",ae,ye],["l",Ce,0],["l",0,Pe],["l",-Ce,0],["z"]]},Xe=function(ae,ye,Ce,Pe){return Pe==null&&(Pe=Ce),[["M",ae,ye],["m",0,-Pe],["a",Ce,Pe,0,1,1,0,2*Pe],["a",Ce,Pe,0,1,1,0,-2*Pe],["z"]]},Ge=A._getPath={path:function(ae){return ae.attr("path")},circle:function(ae){var ye=ae.attrs;return Xe(ye.cx,ye.cy,ye.r)},ellipse:function(ae){var ye=ae.attrs;return Xe(ye.cx,ye.cy,ye.rx,ye.ry)},rect:function(ae){var ye=ae.attrs;return We(ye.x,ye.y,ye.width,ye.height,ye.r)},image:function(ae){var ye=ae.attrs;return We(ye.x,ye.y,ye.width,ye.height)},text:function(ae){var ye=ae._getBBox();return We(ye.x,ye.y,ye.width,ye.height)},set:function(ae){var ye=ae._getBBox();return We(ye.x,ye.y,ye.width,ye.height)}},nt=A.mapPath=function(ae,ye){if(!ye)return ae;var Ce,Pe,ze,Je,ge,we,Ae;for(ze=0,ge=(ae=Ot(ae)).length;ze<ge;ze++)for(Je=1,we=(Ae=ae[ze]).length;Je<we;Je+=2)Ce=ye.x(Ae[Je],Ae[Je+1]),Pe=ye.y(Ae[Je],Ae[Je+1]),Ae[Je]=Ce,Ae[Je+1]=Pe;return ae};if(A._g=z,A.type=z.win.SVGAngle||z.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML",A.type=="VML"){var Et,Le=z.doc.createElement("div");if(Le.innerHTML='<v:shape adj="1"/>',(Et=Le.firstChild).style.behavior="url(#default#VML)",!Et||typeof Et.adj!="object")return A.type=se;Le=null}function Oe(ae){if(typeof ae=="function"||Object(ae)!==ae)return ae;var ye=new ae.constructor;for(var Ce in ae)ae[$](Ce)&&(ye[Ce]=Oe(ae[Ce]));return ye}A.svg=!(A.vml=A.type=="VML"),A._Paper=F,A.fn=M=F.prototype=A.prototype,A._id=0,A.is=function(ae,ye){return(ye=T.call(ye))=="finite"?!E[$](+ae):ye=="array"?ae instanceof Array:ye=="null"&&ae===null||ye==typeof ae&&ae!==null||ye=="object"&&ae===Object(ae)||ye=="array"&&Array.isArray&&Array.isArray(ae)||o.call(ae).slice(8,-1).toLowerCase()==ye},A.angle=function(ae,ye,Ce,Pe,ze,Je){if(ze==null){var ge=ae-Ce,we=ye-Pe;return ge||we?(180+180*u.atan2(-we,-ge)/y+360)%360:0}return A.angle(ae,ye,ze,Je)-A.angle(Ce,Pe,ze,Je)},A.rad=function(ae){return ae%360*y/180},A.deg=function(ae){return Math.round(180*ae/y%360*1e3)/1e3},A.snapTo=function(ae,ye,Ce){if(Ce=A.is(Ce,"finite")?Ce:10,A.is(ae,v)){for(var Pe=ae.length;Pe--;)if(e(ae[Pe]-ye)<=Ce)return ae[Pe]}else{var ze=ye%(ae=+ae);if(ze<Ce)return ye-ze;if(ze>ae-Ce)return ye-ze+ae}return ye};var $t,dt;A.createUUID=($t=/[xy]/g,dt=function(ae){var ye=16*u.random()|0;return(ae=="x"?ye:3&ye|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace($t,dt).toUpperCase()}),A.setWindow=function(ae){k("raphael.setWindow",A,z.win,ae),z.win=ae,z.doc=z.win.document,A._engine.initWin&&A._engine.initWin(z.win)};var gt=function(ae){if(A.vml){var ye,Ce=/^\s+|\s+$/g;try{var Pe=new ActiveXObject("htmlfile");Pe.write("<body>"),Pe.close(),ye=Pe.body}catch{ye=createPopup().document.body}var ze=ye.createTextRange();gt=$e(function(ge){try{ye.style.color=Q(ge).replace(Ce,se);var we=ze.queryCommandValue("ForeColor");return"#"+("000000"+(we=(255&we)<<16|65280&we|(16711680&we)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var Je=z.doc.createElement("i");Je.title="Raphaël Colour Picker",Je.style.display="none",z.doc.body.appendChild(Je),gt=$e(function(ge){return Je.style.color=ge,z.doc.defaultView.getComputedStyle(Je,se).getPropertyValue("color")})}return gt(ae)},Lt=function(){return"hsb("+[this.h,this.s,this.b]+")"},xe=function(){return"hsl("+[this.h,this.s,this.l]+")"},X=function(){return this.hex},pe=function(ae,ye,Ce){if(ye==null&&A.is(ae,"object")&&"r"in ae&&"g"in ae&&"b"in ae&&(Ce=ae.b,ye=ae.g,ae=ae.r),ye==null&&A.is(ae,"string")){var Pe=A.getRGB(ae);ae=Pe.r,ye=Pe.g,Ce=Pe.b}return(ae>1||ye>1||Ce>1)&&(ae/=255,ye/=255,Ce/=255),[ae,ye,Ce]},je=function(ae,ye,Ce,Pe){var ze={r:ae*=255,g:ye*=255,b:Ce*=255,hex:A.rgb(ae,ye,Ce),toString:X};return A.is(Pe,"finite")&&(ze.opacity=Pe),ze};function $e(ae,ye,Ce){return function Pe(){var ze=Array.prototype.slice.call(arguments,0),Je=ze.join("␀"),ge=Pe.cache=Pe.cache||{},we=Pe.count=Pe.count||[];return ge[$](Je)?(function(Ae,Ue){for(var ht=0,_t=Ae.length;ht<_t;ht++)if(Ae[ht]===Ue)return Ae.push(Ae.splice(ht,1)[0])}(we,Je),Ce?Ce(ge[Je]):ge[Je]):(we.length>=1e3&&delete ge[we.shift()],we.push(Je),ge[Je]=ae[U](ye,ze),Ce?Ce(ge[Je]):ge[Je])}}A.color=function(ae){var ye;return A.is(ae,"object")&&"h"in ae&&"s"in ae&&"b"in ae?(ye=A.hsb2rgb(ae),ae.r=ye.r,ae.g=ye.g,ae.b=ye.b,ae.hex=ye.hex):A.is(ae,"object")&&"h"in ae&&"s"in ae&&"l"in ae?(ye=A.hsl2rgb(ae),ae.r=ye.r,ae.g=ye.g,ae.b=ye.b,ae.hex=ye.hex):(A.is(ae,"string")&&(ae=A.getRGB(ae)),A.is(ae,"object")&&"r"in ae&&"g"in ae&&"b"in ae?(ye=A.rgb2hsl(ae),ae.h=ye.h,ae.s=ye.s,ae.l=ye.l,ye=A.rgb2hsb(ae),ae.v=ye.b):(ae={hex:"none"}).r=ae.g=ae.b=ae.h=ae.s=ae.v=ae.l=-1),ae.toString=X,ae},A.hsb2rgb=function(ae,ye,Ce,Pe){var ze,Je,ge,we,Ae;return this.is(ae,"object")&&"h"in ae&&"s"in ae&&"b"in ae&&(Ce=ae.b,ye=ae.s,Pe=ae.o,ae=ae.h),we=(Ae=Ce*ye)*(1-e((ae=(ae*=360)%360/60)%2-1)),ze=Je=ge=Ce-Ae,je(ze+=[Ae,we,0,0,we,Ae][ae=~~ae],Je+=[we,Ae,Ae,we,0,0][ae],ge+=[0,0,we,Ae,Ae,we][ae],Pe)},A.hsl2rgb=function(ae,ye,Ce,Pe){var ze,Je,ge,we,Ae;return this.is(ae,"object")&&"h"in ae&&"s"in ae&&"l"in ae&&(Ce=ae.l,ye=ae.s,ae=ae.h),(ae>1||ye>1||Ce>1)&&(ae/=360,ye/=100,Ce/=100),we=(Ae=2*ye*(Ce<.5?Ce:1-Ce))*(1-e((ae=(ae*=360)%360/60)%2-1)),ze=Je=ge=Ce-Ae/2,je(ze+=[Ae,we,0,0,we,Ae][ae=~~ae],Je+=[we,Ae,Ae,we,0,0][ae],ge+=[0,0,we,Ae,Ae,we][ae],Pe)},A.rgb2hsb=function(ae,ye,Ce){var Pe,ze;return ae=(Ce=pe(ae,ye,Ce))[0],ye=Ce[1],Ce=Ce[2],{h:(((ze=(Pe=p(ae,ye,Ce))-b(ae,ye,Ce))==0?null:Pe==ae?(ye-Ce)/ze:Pe==ye?(Ce-ae)/ze+2:(ae-ye)/ze+4)+360)%6*60/360,s:ze==0?0:ze/Pe,b:Pe,toString:Lt}},A.rgb2hsl=function(ae,ye,Ce){var Pe,ze,Je,ge;return ae=(Ce=pe(ae,ye,Ce))[0],ye=Ce[1],Ce=Ce[2],Pe=((ze=p(ae,ye,Ce))+(Je=b(ae,ye,Ce)))/2,{h:(((ge=ze-Je)==0?null:ze==ae?(ye-Ce)/ge:ze==ye?(Ce-ae)/ge+2:(ae-ye)/ge+4)+360)%6*60/360,s:ge==0?0:Pe<.5?ge/(2*Pe):ge/(2-2*Pe),l:Pe,toString:xe}},A._path2string=function(){return this.join(",").replace(ue,"$1")},A._preload=function(ae,ye){var Ce=z.doc.createElement("img");Ce.style.cssText="position:absolute;left:-9999em;top:-9999em",Ce.onload=function(){ye.call(this),this.onload=null,z.doc.body.removeChild(this)},Ce.onerror=function(){z.doc.body.removeChild(this)},z.doc.body.appendChild(Ce),Ce.src=ae};function He(){return this.hex}function Fe(ae,ye){for(var Ce=[],Pe=0,ze=ae.length;ze-2*!ye>Pe;Pe+=2){var Je=[{x:+ae[Pe-2],y:+ae[Pe-1]},{x:+ae[Pe],y:+ae[Pe+1]},{x:+ae[Pe+2],y:+ae[Pe+3]},{x:+ae[Pe+4],y:+ae[Pe+5]}];ye?Pe?ze-4==Pe?Je[3]={x:+ae[0],y:+ae[1]}:ze-2==Pe&&(Je[2]={x:+ae[0],y:+ae[1]},Je[3]={x:+ae[2],y:+ae[3]}):Je[0]={x:+ae[ze-2],y:+ae[ze-1]}:ze-4==Pe?Je[3]=Je[2]:Pe||(Je[0]={x:+ae[Pe],y:+ae[Pe+1]}),Ce.push(["C",(-Je[0].x+6*Je[1].x+Je[2].x)/6,(-Je[0].y+6*Je[1].y+Je[2].y)/6,(Je[1].x+6*Je[2].x-Je[3].x)/6,(Je[1].y+6*Je[2].y-Je[3].y)/6,Je[2].x,Je[2].y])}return Ce}A.getRGB=$e(function(ae){if(!ae||(ae=Q(ae)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:He};if(ae=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:He};!fe[$](ae.toLowerCase().substring(0,2))&&ae.charAt()!="#"&&(ae=gt(ae));var ye,Ce,Pe,ze,Je,ge,we=ae.match(x);return we?(we[2]&&(Pe=Z(we[2].substring(5),16),Ce=Z(we[2].substring(3,5),16),ye=Z(we[2].substring(1,3),16)),we[3]&&(Pe=Z((Je=we[3].charAt(3))+Je,16),Ce=Z((Je=we[3].charAt(2))+Je,16),ye=Z((Je=we[3].charAt(1))+Je,16)),we[4]&&(ge=we[4][ve](oe),ye=Y(ge[0]),ge[0].slice(-1)=="%"&&(ye*=2.55),Ce=Y(ge[1]),ge[1].slice(-1)=="%"&&(Ce*=2.55),Pe=Y(ge[2]),ge[2].slice(-1)=="%"&&(Pe*=2.55),we[1].toLowerCase().slice(0,4)=="rgba"&&(ze=Y(ge[3])),ge[3]&&ge[3].slice(-1)=="%"&&(ze/=100)),we[5]?(ge=we[5][ve](oe),ye=Y(ge[0]),ge[0].slice(-1)=="%"&&(ye*=2.55),Ce=Y(ge[1]),ge[1].slice(-1)=="%"&&(Ce*=2.55),Pe=Y(ge[2]),ge[2].slice(-1)=="%"&&(Pe*=2.55),(ge[0].slice(-3)=="deg"||ge[0].slice(-1)=="°")&&(ye/=360),we[1].toLowerCase().slice(0,4)=="hsba"&&(ze=Y(ge[3])),ge[3]&&ge[3].slice(-1)=="%"&&(ze/=100),A.hsb2rgb(ye,Ce,Pe,ze)):we[6]?(ge=we[6][ve](oe),ye=Y(ge[0]),ge[0].slice(-1)=="%"&&(ye*=2.55),Ce=Y(ge[1]),ge[1].slice(-1)=="%"&&(Ce*=2.55),Pe=Y(ge[2]),ge[2].slice(-1)=="%"&&(Pe*=2.55),(ge[0].slice(-3)=="deg"||ge[0].slice(-1)=="°")&&(ye/=360),we[1].toLowerCase().slice(0,4)=="hsla"&&(ze=Y(ge[3])),ge[3]&&ge[3].slice(-1)=="%"&&(ze/=100),A.hsl2rgb(ye,Ce,Pe,ze)):((we={r:ye,g:Ce,b:Pe,toString:He}).hex="#"+(16777216|Pe|Ce<<8|ye<<16).toString(16).slice(1),A.is(ze,"finite")&&(we.opacity=ze),we)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:He}},A),A.hsb=$e(function(ae,ye,Ce){return A.hsb2rgb(ae,ye,Ce).hex}),A.hsl=$e(function(ae,ye,Ce){return A.hsl2rgb(ae,ye,Ce).hex}),A.rgb=$e(function(ae,ye,Ce){function Pe(ze){return ze+.5|0}return"#"+(16777216|Pe(Ce)|Pe(ye)<<8|Pe(ae)<<16).toString(16).slice(1)}),A.getColor=function(ae){var ye=this.getColor.start=this.getColor.start||{h:0,s:1,b:ae||.75},Ce=this.hsb2rgb(ye.h,ye.s,ye.b);return ye.h+=.075,ye.h>1&&(ye.h=0,ye.s-=.2,ye.s<=0&&(this.getColor.start={h:0,s:1,b:ye.b})),Ce.hex},A.getColor.reset=function(){delete this.start},A.parsePathString=function(ae){if(!ae)return null;var ye=Me(ae);if(ye.arr)return ot(ye.arr);var Ce={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},Pe=[];return A.is(ae,v)&&A.is(ae[0],v)&&(Pe=ot(ae)),Pe.length||Q(ae).replace(qe,function(ze,Je,ge){var we=[],Ae=Je.toLowerCase();if(ge.replace(Ve,function(Ue,ht){ht&&we.push(+ht)}),Ae=="m"&&we.length>2&&(Pe.push([Je][J](we.splice(0,2))),Ae="l",Je=Je=="m"?"l":"L"),Ae=="r")Pe.push([Je][J](we));else for(;we.length>=Ce[Ae]&&(Pe.push([Je][J](we.splice(0,Ce[Ae]))),Ce[Ae]););}),Pe.toString=A._path2string,ye.arr=ot(Pe),Pe},A.parseTransformString=$e(function(ae){if(!ae)return null;var ye=[];return A.is(ae,v)&&A.is(ae[0],v)&&(ye=ot(ae)),ye.length||Q(ae).replace(rt,function(Ce,Pe,ze){var Je=[];T.call(Pe),ze.replace(Ve,function(ge,we){we&&Je.push(+we)}),ye.push([Pe][J](Je))}),ye.toString=A._path2string,ye},this,function(ae){if(!ae)return ae;for(var ye=[],Ce=0;Ce<ae.length;Ce++){for(var Pe=[],ze=0;ze<ae[Ce].length;ze++)Pe.push(ae[Ce][ze]);ye.push(Pe)}return ye});var Me=function(ae){var ye=Me.ps=Me.ps||{};return ye[ae]?ye[ae].sleep=100:ye[ae]={sleep:100},setTimeout(function(){for(var Ce in ye)ye[$](Ce)&&Ce!=ae&&(ye[Ce].sleep--,!ye[Ce].sleep&&delete ye[Ce])}),ye[ae]};function Rt(ae,ye,Ce,Pe,ze){return ae*(ae*(-3*ye+9*Ce-9*Pe+3*ze)+6*ye-12*Ce+6*Pe)-3*ye+3*Ce}function yt(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){Ae==null&&(Ae=1);for(var Ue=(Ae=Ae>1?1:Ae<0?0:Ae)/2,ht=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],_t=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],Ct=0,At=0;At<12;At++){var Qt=Ue*ht[At]+Ue,ir=Rt(Qt,ae,Ce,ze,ge),tr=Rt(Qt,ye,Pe,Je,we),Zt=ir*ir+tr*tr;Ct+=_t[At]*u.sqrt(Zt)}return Ue*Ct}function le(ae,ye,Ce,Pe,ze,Je,ge,we){if(!(p(ae,Ce)<b(ze,ge)||b(ae,Ce)>p(ze,ge)||p(ye,Pe)<b(Je,we)||b(ye,Pe)>p(Je,we))){var Ae=(ae-Ce)*(Je-we)-(ye-Pe)*(ze-ge);if(Ae){var Ue=((ae*Pe-ye*Ce)*(ze-ge)-(ae-Ce)*(ze*we-Je*ge))/Ae,ht=((ae*Pe-ye*Ce)*(Je-we)-(ye-Pe)*(ze*we-Je*ge))/Ae,_t=+Ue.toFixed(2),Ct=+ht.toFixed(2);if(!(_t<+b(ae,Ce).toFixed(2)||_t>+p(ae,Ce).toFixed(2)||_t<+b(ze,ge).toFixed(2)||_t>+p(ze,ge).toFixed(2)||Ct<+b(ye,Pe).toFixed(2)||Ct>+p(ye,Pe).toFixed(2)||Ct<+b(Je,we).toFixed(2)||Ct>+p(Je,we).toFixed(2)))return{x:Ue,y:ht}}}}function wt(ae,ye,Ce){var Pe=A.bezierBBox(ae),ze=A.bezierBBox(ye);if(!A.isBBoxIntersect(Pe,ze))return Ce?0:[];for(var Je=yt.apply(0,ae),ge=yt.apply(0,ye),we=p(~~(Je/5),1),Ae=p(~~(ge/5),1),Ue=[],ht=[],_t={},Ct=Ce?0:[],At=0;At<we+1;At++){var Qt=A.findDotsAtSegment.apply(A,ae.concat(At/we));Ue.push({x:Qt.x,y:Qt.y,t:At/we})}for(At=0;At<Ae+1;At++)Qt=A.findDotsAtSegment.apply(A,ye.concat(At/Ae)),ht.push({x:Qt.x,y:Qt.y,t:At/Ae});for(At=0;At<we;At++)for(var ir=0;ir<Ae;ir++){var tr=Ue[At],Zt=Ue[At+1],Br=ht[ir],pr=ht[ir+1],_r=e(Zt.x-tr.x)<.001?"y":"x",fr=e(pr.x-Br.x)<.001?"y":"x",Gr=le(tr.x,tr.y,Zt.x,Zt.y,Br.x,Br.y,pr.x,pr.y);if(Gr){if(_t[Gr.x.toFixed(4)]==Gr.y.toFixed(4))continue;_t[Gr.x.toFixed(4)]=Gr.y.toFixed(4);var Nr=tr.t+e((Gr[_r]-tr[_r])/(Zt[_r]-tr[_r]))*(Zt.t-tr.t),Zr=Br.t+e((Gr[fr]-Br[fr])/(pr[fr]-Br[fr]))*(pr.t-Br.t);Nr>=0&&Nr<=1.001&&Zr>=0&&Zr<=1.001&&(Ce?Ct++:Ct.push({x:Gr.x,y:Gr.y,t1:b(Nr,1),t2:b(Zr,1)}))}}return Ct}function at(ae,ye,Ce){ae=A._path2curve(ae),ye=A._path2curve(ye);for(var Pe,ze,Je,ge,we,Ae,Ue,ht,_t,Ct,At=Ce?0:[],Qt=0,ir=ae.length;Qt<ir;Qt++){var tr=ae[Qt];if(tr[0]=="M")Pe=we=tr[1],ze=Ae=tr[2];else{tr[0]=="C"?(_t=[Pe,ze].concat(tr.slice(1)),Pe=_t[6],ze=_t[7]):(_t=[Pe,ze,Pe,ze,we,Ae,we,Ae],Pe=we,ze=Ae);for(var Zt=0,Br=ye.length;Zt<Br;Zt++){var pr=ye[Zt];if(pr[0]=="M")Je=Ue=pr[1],ge=ht=pr[2];else{pr[0]=="C"?(Ct=[Je,ge].concat(pr.slice(1)),Je=Ct[6],ge=Ct[7]):(Ct=[Je,ge,Je,ge,Ue,ht,Ue,ht],Je=Ue,ge=ht);var _r=wt(_t,Ct,Ce);if(Ce)At+=_r;else{for(var fr=0,Gr=_r.length;fr<Gr;fr++)_r[fr].segment1=Qt,_r[fr].segment2=Zt,_r[fr].bez1=_t,_r[fr].bez2=Ct;At=At.concat(_r)}}}}}return At}A.findDotsAtSegment=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){var Ue=1-Ae,ht=c(Ue,3),_t=c(Ue,2),Ct=Ae*Ae,At=Ct*Ae,Qt=ht*ae+3*_t*Ae*Ce+3*Ue*Ae*Ae*ze+At*ge,ir=ht*ye+3*_t*Ae*Pe+3*Ue*Ae*Ae*Je+At*we,tr=ae+2*Ae*(Ce-ae)+Ct*(ze-2*Ce+ae),Zt=ye+2*Ae*(Pe-ye)+Ct*(Je-2*Pe+ye),Br=Ce+2*Ae*(ze-Ce)+Ct*(ge-2*ze+Ce),pr=Pe+2*Ae*(Je-Pe)+Ct*(we-2*Je+Pe),_r=Ue*ae+Ae*Ce,fr=Ue*ye+Ae*Pe,Gr=Ue*ze+Ae*ge,Nr=Ue*Je+Ae*we,Zr=90-180*u.atan2(tr-Br,Zt-pr)/y;return(tr>Br||Zt<pr)&&(Zr+=180),{x:Qt,y:ir,m:{x:tr,y:Zt},n:{x:Br,y:pr},start:{x:_r,y:fr},end:{x:Gr,y:Nr},alpha:Zr}},A.bezierBBox=function(ae,ye,Ce,Pe,ze,Je,ge,we){A.is(ae,"array")||(ae=[ae,ye,Ce,Pe,ze,Je,ge,we]);var Ae=Pt.apply(null,ae);return{x:Ae.min.x,y:Ae.min.y,x2:Ae.max.x,y2:Ae.max.y,width:Ae.max.x-Ae.min.x,height:Ae.max.y-Ae.min.y}},A.isPointInsideBBox=function(ae,ye,Ce){return ye>=ae.x&&ye<=ae.x2&&Ce>=ae.y&&Ce<=ae.y2},A.isBBoxIntersect=function(ae,ye){var Ce=A.isPointInsideBBox;return Ce(ye,ae.x,ae.y)||Ce(ye,ae.x2,ae.y)||Ce(ye,ae.x,ae.y2)||Ce(ye,ae.x2,ae.y2)||Ce(ae,ye.x,ye.y)||Ce(ae,ye.x2,ye.y)||Ce(ae,ye.x,ye.y2)||Ce(ae,ye.x2,ye.y2)||(ae.x<ye.x2&&ae.x>ye.x||ye.x<ae.x2&&ye.x>ae.x)&&(ae.y<ye.y2&&ae.y>ye.y||ye.y<ae.y2&&ye.y>ae.y)},A.pathIntersection=function(ae,ye){return at(ae,ye)},A.pathIntersectionNumber=function(ae,ye){return at(ae,ye,1)},A.isPointInsidePath=function(ae,ye,Ce){var Pe=A.pathBBox(ae);return A.isPointInsideBBox(Pe,ye,Ce)&&at(ae,[["M",ye,Ce],["H",Pe.x2+10]],1)%2==1},A._removedFactory=function(ae){return function(){k("raphael.log",null,"Raphaël: you are calling to method “"+ae+"” of removed object",ae)}};var Be=A.pathBBox=function(ae){var ye=Me(ae);if(ye.bbox)return Oe(ye.bbox);if(!ae)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var Ce,Pe=0,ze=0,Je=[],ge=[],we=0,Ae=(ae=Ot(ae)).length;we<Ae;we++)if((Ce=ae[we])[0]=="M")Pe=Ce[1],ze=Ce[2],Je.push(Pe),ge.push(ze);else{var Ue=Pt(Pe,ze,Ce[1],Ce[2],Ce[3],Ce[4],Ce[5],Ce[6]);Je=Je[J](Ue.min.x,Ue.max.x),ge=ge[J](Ue.min.y,Ue.max.y),Pe=Ce[5],ze=Ce[6]}var ht=b[U](0,Je),_t=b[U](0,ge),Ct=p[U](0,Je),At=p[U](0,ge),Qt=Ct-ht,ir=At-_t,tr={x:ht,y:_t,x2:Ct,y2:At,width:Qt,height:ir,cx:ht+Qt/2,cy:_t+ir/2};return ye.bbox=Oe(tr),tr},ot=function(ae){var ye=Oe(ae);return ye.toString=A._path2string,ye},tt=A._pathToRelative=function(ae){var ye=Me(ae);if(ye.rel)return ot(ye.rel);A.is(ae,v)&&A.is(ae&&ae[0],v)||(ae=A.parsePathString(ae));var Ce=[],Pe=0,ze=0,Je=0,ge=0,we=0;ae[0][0]=="M"&&(Je=Pe=ae[0][1],ge=ze=ae[0][2],we++,Ce.push(["M",Pe,ze]));for(var Ae=we,Ue=ae.length;Ae<Ue;Ae++){var ht=Ce[Ae]=[],_t=ae[Ae];if(_t[0]!=T.call(_t[0]))switch(ht[0]=T.call(_t[0]),ht[0]){case"a":ht[1]=_t[1],ht[2]=_t[2],ht[3]=_t[3],ht[4]=_t[4],ht[5]=_t[5],ht[6]=+(_t[6]-Pe).toFixed(3),ht[7]=+(_t[7]-ze).toFixed(3);break;case"v":ht[1]=+(_t[1]-ze).toFixed(3);break;case"m":Je=_t[1],ge=_t[2];default:for(var Ct=1,At=_t.length;Ct<At;Ct++)ht[Ct]=+(_t[Ct]-(Ct%2?Pe:ze)).toFixed(3)}else{ht=Ce[Ae]=[],_t[0]=="m"&&(Je=_t[1]+Pe,ge=_t[2]+ze);for(var Qt=0,ir=_t.length;Qt<ir;Qt++)Ce[Ae][Qt]=_t[Qt]}var tr=Ce[Ae].length;switch(Ce[Ae][0]){case"z":Pe=Je,ze=ge;break;case"h":Pe+=+Ce[Ae][tr-1];break;case"v":ze+=+Ce[Ae][tr-1];break;default:Pe+=+Ce[Ae][tr-2],ze+=+Ce[Ae][tr-1]}}return Ce.toString=A._path2string,ye.rel=ot(Ce),Ce},kt=A._pathToAbsolute=function(ae){var ye=Me(ae);if(ye.abs)return ot(ye.abs);if(A.is(ae,v)&&A.is(ae&&ae[0],v)||(ae=A.parsePathString(ae)),!ae||!ae.length)return[["M",0,0]];var Ce=[],Pe=0,ze=0,Je=0,ge=0,we=0;ae[0][0]=="M"&&(Je=Pe=+ae[0][1],ge=ze=+ae[0][2],we++,Ce[0]=["M",Pe,ze]);for(var Ae,Ue,ht=ae.length==3&&ae[0][0]=="M"&&ae[1][0].toUpperCase()=="R"&&ae[2][0].toUpperCase()=="Z",_t=we,Ct=ae.length;_t<Ct;_t++){if(Ce.push(Ae=[]),(Ue=ae[_t])[0]!=L.call(Ue[0]))switch(Ae[0]=L.call(Ue[0]),Ae[0]){case"A":Ae[1]=Ue[1],Ae[2]=Ue[2],Ae[3]=Ue[3],Ae[4]=Ue[4],Ae[5]=Ue[5],Ae[6]=+(Ue[6]+Pe),Ae[7]=+(Ue[7]+ze);break;case"V":Ae[1]=+Ue[1]+ze;break;case"H":Ae[1]=+Ue[1]+Pe;break;case"R":for(var At=[Pe,ze][J](Ue.slice(1)),Qt=2,ir=At.length;Qt<ir;Qt++)At[Qt]=+At[Qt]+Pe,At[++Qt]=+At[Qt]+ze;Ce.pop(),Ce=Ce[J](Fe(At,ht));break;case"M":Je=+Ue[1]+Pe,ge=+Ue[2]+ze;default:for(Qt=1,ir=Ue.length;Qt<ir;Qt++)Ae[Qt]=+Ue[Qt]+(Qt%2?Pe:ze)}else if(Ue[0]=="R")At=[Pe,ze][J](Ue.slice(1)),Ce.pop(),Ce=Ce[J](Fe(At,ht)),Ae=["R"][J](Ue.slice(-2));else for(var tr=0,Zt=Ue.length;tr<Zt;tr++)Ae[tr]=Ue[tr];switch(Ae[0]){case"Z":Pe=Je,ze=ge;break;case"H":Pe=Ae[1];break;case"V":ze=Ae[1];break;case"M":Je=Ae[Ae.length-2],ge=Ae[Ae.length-1];default:Pe=Ae[Ae.length-2],ze=Ae[Ae.length-1]}}return Ce.toString=A._path2string,ye.abs=ot(Ce),Ce},Yt=function(ae,ye,Ce,Pe){return[ae,ye,Ce,Pe,Ce,Pe]},pt=function(ae,ye,Ce,Pe,ze,Je){return[1/3*ae+2/3*Ce,1/3*ye+2/3*Pe,1/3*ze+2/3*Ce,1/3*Je+2/3*Pe,ze,Je]},It=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae,Ue){var ht,_t=120*y/180,Ct=y/180*(+ze||0),At=[],Qt=$e(function(V,ie,be){return{x:V*u.cos(be)-ie*u.sin(be),y:V*u.sin(be)+ie*u.cos(be)}});if(Ue)Nr=Ue[0],Zr=Ue[1],fr=Ue[2],Gr=Ue[3];else{ae=(ht=Qt(ae,ye,-Ct)).x,ye=ht.y,we=(ht=Qt(we,Ae,-Ct)).x,Ae=ht.y;var ir=(ae-we)/2,tr=(ye-Ae)/2,Zt=ir*ir/(Ce*Ce)+tr*tr/(Pe*Pe);Zt>1&&(Ce*=Zt=u.sqrt(Zt),Pe*=Zt);var Br=Ce*Ce,pr=Pe*Pe,_r=(Je==ge?-1:1)*u.sqrt(e((Br*pr-Br*tr*tr-pr*ir*ir)/(Br*tr*tr+pr*ir*ir))),fr=_r*Ce*tr/Pe+(ae+we)/2,Gr=_r*-Pe*ir/Ce+(ye+Ae)/2,Nr=u.asin(((ye-Gr)/Pe).toFixed(9)),Zr=u.asin(((Ae-Gr)/Pe).toFixed(9));(Nr=ae<fr?y-Nr:Nr)<0&&(Nr=2*y+Nr),(Zr=we<fr?y-Zr:Zr)<0&&(Zr=2*y+Zr),ge&&Nr>Zr&&(Nr-=2*y),!ge&&Zr>Nr&&(Zr-=2*y)}var Sn=Zr-Nr;if(e(Sn)>_t){var qn=Zr,ii=we,si=Ae;Zr=Nr+_t*(ge&&Zr>Nr?1:-1),we=fr+Ce*u.cos(Zr),Ae=Gr+Pe*u.sin(Zr),At=It(we,Ae,Ce,Pe,ze,0,ge,ii,si,[Zr,qn,fr,Gr])}Sn=Zr-Nr;var vn=u.cos(Nr),on=u.sin(Nr),Bn=u.cos(Zr),Hi=u.sin(Zr),Xi=u.tan(Sn/4),Kn=4/3*Ce*Xi,ta=4/3*Pe*Xi,ma=[ae,ye],yi=[ae+Kn*on,ye-ta*vn],Rn=[we+Kn*Hi,Ae-ta*Bn],Ui=[we,Ae];if(yi[0]=2*ma[0]-yi[0],yi[1]=2*ma[1]-yi[1],Ue)return[yi,Rn,Ui][J](At);for(var ra=[],Wi=0,Bi=(At=[yi,Rn,Ui][J](At).join()[ve](",")).length;Wi<Bi;Wi++)ra[Wi]=Wi%2?Qt(At[Wi-1],At[Wi],Ct).y:Qt(At[Wi],At[Wi+1],Ct).x;return ra},Fr=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){var Ue=1-Ae;return{x:c(Ue,3)*ae+3*c(Ue,2)*Ae*Ce+3*Ue*Ae*Ae*ze+c(Ae,3)*ge,y:c(Ue,3)*ye+3*c(Ue,2)*Ae*Pe+3*Ue*Ae*Ae*Je+c(Ae,3)*we}},Pt=$e(function(ae,ye,Ce,Pe,ze,Je,ge,we){var Ae,Ue=ze-2*Ce+ae-(ge-2*ze+Ce),ht=2*(Ce-ae)-2*(ze-Ce),_t=ae-Ce,Ct=(-ht+u.sqrt(ht*ht-4*Ue*_t))/2/Ue,At=(-ht-u.sqrt(ht*ht-4*Ue*_t))/2/Ue,Qt=[ye,we],ir=[ae,ge];return e(Ct)>"1e12"&&(Ct=.5),e(At)>"1e12"&&(At=.5),Ct>0&&Ct<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,Ct),ir.push(Ae.x),Qt.push(Ae.y)),At>0&&At<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,At),ir.push(Ae.x),Qt.push(Ae.y)),Ue=Je-2*Pe+ye-(we-2*Je+Pe),_t=ye-Pe,Ct=(-(ht=2*(Pe-ye)-2*(Je-Pe))+u.sqrt(ht*ht-4*Ue*_t))/2/Ue,At=(-ht-u.sqrt(ht*ht-4*Ue*_t))/2/Ue,e(Ct)>"1e12"&&(Ct=.5),e(At)>"1e12"&&(At=.5),Ct>0&&Ct<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,Ct),ir.push(Ae.x),Qt.push(Ae.y)),At>0&&At<1&&(Ae=Fr(ae,ye,Ce,Pe,ze,Je,ge,we,At),ir.push(Ae.x),Qt.push(Ae.y)),{min:{x:b[U](0,ir),y:b[U](0,Qt)},max:{x:p[U](0,ir),y:p[U](0,Qt)}}}),Ot=A._path2curve=$e(function(ae,ye){var Ce=!ye&&Me(ae);if(!ye&&Ce.curve)return ot(Ce.curve);for(var Pe=kt(ae),ze=ye&&kt(ye),Je={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},ge={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},we=function(_r,fr,Gr){var Nr,Zr;if(!_r)return["C",fr.x,fr.y,fr.x,fr.y,fr.x,fr.y];switch(!(_r[0]in{T:1,Q:1})&&(fr.qx=fr.qy=null),_r[0]){case"M":fr.X=_r[1],fr.Y=_r[2];break;case"A":_r=["C"][J](It[U](0,[fr.x,fr.y][J](_r.slice(1))));break;case"S":Gr=="C"||Gr=="S"?(Nr=2*fr.x-fr.bx,Zr=2*fr.y-fr.by):(Nr=fr.x,Zr=fr.y),_r=["C",Nr,Zr][J](_r.slice(1));break;case"T":Gr=="Q"||Gr=="T"?(fr.qx=2*fr.x-fr.qx,fr.qy=2*fr.y-fr.qy):(fr.qx=fr.x,fr.qy=fr.y),_r=["C"][J](pt(fr.x,fr.y,fr.qx,fr.qy,_r[1],_r[2]));break;case"Q":fr.qx=_r[1],fr.qy=_r[2],_r=["C"][J](pt(fr.x,fr.y,_r[1],_r[2],_r[3],_r[4]));break;case"L":_r=["C"][J](Yt(fr.x,fr.y,_r[1],_r[2]));break;case"H":_r=["C"][J](Yt(fr.x,fr.y,_r[1],fr.y));break;case"V":_r=["C"][J](Yt(fr.x,fr.y,fr.x,_r[1]));break;case"Z":_r=["C"][J](Yt(fr.x,fr.y,fr.X,fr.Y))}return _r},Ae=function(_r,fr){if(_r[fr].length>7){_r[fr].shift();for(var Gr=_r[fr];Gr.length;)ht[fr]="A",ze&&(_t[fr]="A"),_r.splice(fr++,0,["C"][J](Gr.splice(0,6)));_r.splice(fr,1),ir=p(Pe.length,ze&&ze.length||0)}},Ue=function(_r,fr,Gr,Nr,Zr){_r&&fr&&_r[Zr][0]=="M"&&fr[Zr][0]!="M"&&(fr.splice(Zr,0,["M",Nr.x,Nr.y]),Gr.bx=0,Gr.by=0,Gr.x=_r[Zr][1],Gr.y=_r[Zr][2],ir=p(Pe.length,ze&&ze.length||0))},ht=[],_t=[],Ct="",At="",Qt=0,ir=p(Pe.length,ze&&ze.length||0);Qt<ir;Qt++){Pe[Qt]&&(Ct=Pe[Qt][0]),Ct!="C"&&(ht[Qt]=Ct,Qt&&(At=ht[Qt-1])),Pe[Qt]=we(Pe[Qt],Je,At),ht[Qt]!="A"&&Ct=="C"&&(ht[Qt]="C"),Ae(Pe,Qt),ze&&(ze[Qt]&&(Ct=ze[Qt][0]),Ct!="C"&&(_t[Qt]=Ct,Qt&&(At=_t[Qt-1])),ze[Qt]=we(ze[Qt],ge,At),_t[Qt]!="A"&&Ct=="C"&&(_t[Qt]="C"),Ae(ze,Qt)),Ue(Pe,ze,Je,ge,Qt),Ue(ze,Pe,ge,Je,Qt);var tr=Pe[Qt],Zt=ze&&ze[Qt],Br=tr.length,pr=ze&&Zt.length;Je.x=tr[Br-2],Je.y=tr[Br-1],Je.bx=Y(tr[Br-4])||Je.x,Je.by=Y(tr[Br-3])||Je.y,ge.bx=ze&&(Y(Zt[pr-4])||ge.x),ge.by=ze&&(Y(Zt[pr-3])||ge.y),ge.x=ze&&Zt[pr-2],ge.y=ze&&Zt[pr-1]}return ze||(Ce.curve=ot(Pe)),ze?[Pe,ze]:Pe},null,ot),Te=(A._parseDots=$e(function(ae){for(var ye=[],Ce=0,Pe=ae.length;Ce<Pe;Ce++){var ze={},Je=ae[Ce].match(/^([^:]*):?([\d\.]*)/);if(ze.color=A.getRGB(Je[1]),ze.color.error)return null;ze.opacity=ze.color.opacity,ze.color=ze.color.hex,Je[2]&&(ze.offset=Je[2]+"%"),ye.push(ze)}for(Ce=1,Pe=ye.length-1;Ce<Pe;Ce++)if(!ye[Ce].offset){for(var ge=Y(ye[Ce-1].offset||0),we=0,Ae=Ce+1;Ae<Pe;Ae++)if(ye[Ae].offset){we=ye[Ae].offset;break}we||(we=100,Ae=Pe);for(var Ue=((we=Y(we))-ge)/(Ae-Ce+1);Ce<Ae;Ce++)ge+=Ue,ye[Ce].offset=ge+"%"}return ye}),A._tear=function(ae,ye){ae==ye.top&&(ye.top=ae.prev),ae==ye.bottom&&(ye.bottom=ae.next),ae.next&&(ae.next.prev=ae.prev),ae.prev&&(ae.prev.next=ae.next)}),me=(A._tofront=function(ae,ye){ye.top!==ae&&(Te(ae,ye),ae.next=null,ae.prev=ye.top,ye.top.next=ae,ye.top=ae)},A._toback=function(ae,ye){ye.bottom!==ae&&(Te(ae,ye),ae.next=ye.bottom,ae.prev=null,ye.bottom.prev=ae,ye.bottom=ae)},A._insertafter=function(ae,ye,Ce){Te(ae,Ce),ye==Ce.top&&(Ce.top=ae),ye.next&&(ye.next.prev=ae),ae.next=ye.next,ae.prev=ye,ye.next=ae},A._insertbefore=function(ae,ye,Ce){Te(ae,Ce),ye==Ce.bottom&&(Ce.bottom=ae),ye.prev&&(ye.prev.next=ae),ae.prev=ye.prev,ye.prev=ae,ae.next=ye},A.toMatrix=function(ae,ye){var Ce=Be(ae),Pe={_:{transform:se},getBBox:function(){return Ce}};return ce(Pe,ye),Pe.matrix}),ce=(A.transformPath=function(ae,ye){return nt(ae,me(ae,ye))},A._extractTransform=function(ae,ye){if(ye==null)return ae._.transform;ye=Q(ye).replace(/\.{3}|\u2026/g,ae._.transform||se);var Ce,Pe,ze=A.parseTransformString(ye),Je=0,ge=1,we=1,Ae=ae._,Ue=new Re;if(Ae.transform=ze||[],ze)for(var ht=0,_t=ze.length;ht<_t;ht++){var Ct,At,Qt,ir,tr,Zt=ze[ht],Br=Zt.length,pr=Q(Zt[0]).toLowerCase(),_r=Zt[0]!=pr,fr=_r?Ue.invert():0;pr=="t"&&Br==3?_r?(Ct=fr.x(0,0),At=fr.y(0,0),Qt=fr.x(Zt[1],Zt[2]),ir=fr.y(Zt[1],Zt[2]),Ue.translate(Qt-Ct,ir-At)):Ue.translate(Zt[1],Zt[2]):pr=="r"?Br==2?(tr=tr||ae.getBBox(1),Ue.rotate(Zt[1],tr.x+tr.width/2,tr.y+tr.height/2),Je+=Zt[1]):Br==4&&(_r?(Qt=fr.x(Zt[2],Zt[3]),ir=fr.y(Zt[2],Zt[3]),Ue.rotate(Zt[1],Qt,ir)):Ue.rotate(Zt[1],Zt[2],Zt[3]),Je+=Zt[1]):pr=="s"?Br==2||Br==3?(tr=tr||ae.getBBox(1),Ue.scale(Zt[1],Zt[Br-1],tr.x+tr.width/2,tr.y+tr.height/2),ge*=Zt[1],we*=Zt[Br-1]):Br==5&&(_r?(Qt=fr.x(Zt[3],Zt[4]),ir=fr.y(Zt[3],Zt[4]),Ue.scale(Zt[1],Zt[2],Qt,ir)):Ue.scale(Zt[1],Zt[2],Zt[3],Zt[4]),ge*=Zt[1],we*=Zt[2]):pr=="m"&&Br==7&&Ue.add(Zt[1],Zt[2],Zt[3],Zt[4],Zt[5],Zt[6]),Ae.dirtyT=1,ae.matrix=Ue}ae.matrix=Ue,Ae.sx=ge,Ae.sy=we,Ae.deg=Je,Ae.dx=Ce=Ue.e,Ae.dy=Pe=Ue.f,ge==1&&we==1&&!Je&&Ae.bbox?(Ae.bbox.x+=+Ce,Ae.bbox.y+=+Pe):Ae.dirtyT=1}),ne=function(ae){var ye=ae[0];switch(ye.toLowerCase()){case"t":return[ye,0,0];case"m":return[ye,1,0,0,1,0,0];case"r":return ae.length==4?[ye,0,ae[2],ae[3]]:[ye,0];case"s":return ae.length==5?[ye,1,1,ae[3],ae[4]]:ae.length==3?[ye,1,1]:[ye,1]}},_e=A._equaliseTransform=function(ae,ye){ye=Q(ye).replace(/\.{3}|\u2026/g,ae),ae=A.parseTransformString(ae)||[],ye=A.parseTransformString(ye)||[];for(var Ce,Pe,ze,Je,ge=p(ae.length,ye.length),we=[],Ae=[],Ue=0;Ue<ge;Ue++){if(ze=ae[Ue]||ne(ye[Ue]),Je=ye[Ue]||ne(ze),ze[0]!=Je[0]||ze[0].toLowerCase()=="r"&&(ze[2]!=Je[2]||ze[3]!=Je[3])||ze[0].toLowerCase()=="s"&&(ze[3]!=Je[3]||ze[4]!=Je[4]))return;for(we[Ue]=[],Ae[Ue]=[],Ce=0,Pe=p(ze.length,Je.length);Ce<Pe;Ce++)Ce in ze&&(we[Ue][Ce]=ze[Ce]),Ce in Je&&(Ae[Ue][Ce]=Je[Ce])}return{from:we,to:Ae}};function Re(ae,ye,Ce,Pe,ze,Je){ae!=null?(this.a=+ae,this.b=+ye,this.c=+Ce,this.d=+Pe,this.e=+ze,this.f=+Je):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}A._getContainer=function(ae,ye,Ce,Pe){var ze;if((ze=Pe!=null||A.is(ae,"object")?ae:z.doc.getElementById(ae))!=null)return ze.tagName?ye==null?{container:ze,width:ze.style.pixelWidth||ze.offsetWidth,height:ze.style.pixelHeight||ze.offsetHeight}:{container:ze,width:ye,height:Ce}:{container:1,x:ae,y:ye,width:Ce,height:Pe}},A.pathToRelative=tt,A._engine={},A.path2curve=Ot,A.matrix=function(ae,ye,Ce,Pe,ze,Je){return new Re(ae,ye,Ce,Pe,ze,Je)},function(ae){function ye(Pe){return Pe[0]*Pe[0]+Pe[1]*Pe[1]}function Ce(Pe){var ze=u.sqrt(ye(Pe));Pe[0]&&(Pe[0]/=ze),Pe[1]&&(Pe[1]/=ze)}ae.add=function(Pe,ze,Je,ge,we,Ae){var Ue,ht,_t,Ct,At=[[],[],[]],Qt=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],ir=[[Pe,Je,we],[ze,ge,Ae],[0,0,1]];for(Pe&&Pe instanceof Re&&(ir=[[Pe.a,Pe.c,Pe.e],[Pe.b,Pe.d,Pe.f],[0,0,1]]),Ue=0;Ue<3;Ue++)for(ht=0;ht<3;ht++){for(Ct=0,_t=0;_t<3;_t++)Ct+=Qt[Ue][_t]*ir[_t][ht];At[Ue][ht]=Ct}this.a=At[0][0],this.b=At[1][0],this.c=At[0][1],this.d=At[1][1],this.e=At[0][2],this.f=At[1][2]},ae.invert=function(){var Pe=this,ze=Pe.a*Pe.d-Pe.b*Pe.c;return new Re(Pe.d/ze,-Pe.b/ze,-Pe.c/ze,Pe.a/ze,(Pe.c*Pe.f-Pe.d*Pe.e)/ze,(Pe.b*Pe.e-Pe.a*Pe.f)/ze)},ae.clone=function(){return new Re(this.a,this.b,this.c,this.d,this.e,this.f)},ae.translate=function(Pe,ze){this.add(1,0,0,1,Pe,ze)},ae.scale=function(Pe,ze,Je,ge){ze==null&&(ze=Pe),(Je||ge)&&this.add(1,0,0,1,Je,ge),this.add(Pe,0,0,ze,0,0),(Je||ge)&&this.add(1,0,0,1,-Je,-ge)},ae.rotate=function(Pe,ze,Je){Pe=A.rad(Pe),ze=ze||0,Je=Je||0;var ge=+u.cos(Pe).toFixed(9),we=+u.sin(Pe).toFixed(9);this.add(ge,we,-we,ge,ze,Je),this.add(1,0,0,1,-ze,-Je)},ae.x=function(Pe,ze){return Pe*this.a+ze*this.c+this.e},ae.y=function(Pe,ze){return Pe*this.b+ze*this.d+this.f},ae.get=function(Pe){return+this[Q.fromCharCode(97+Pe)].toFixed(4)},ae.toString=function(){return A.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},ae.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},ae.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},ae.split=function(){var Pe={};Pe.dx=this.e,Pe.dy=this.f;var ze=[[this.a,this.c],[this.b,this.d]];Pe.scalex=u.sqrt(ye(ze[0])),Ce(ze[0]),Pe.shear=ze[0][0]*ze[1][0]+ze[0][1]*ze[1][1],ze[1]=[ze[1][0]-ze[0][0]*Pe.shear,ze[1][1]-ze[0][1]*Pe.shear],Pe.scaley=u.sqrt(ye(ze[1])),Ce(ze[1]),Pe.shear/=Pe.scaley;var Je=-ze[0][1],ge=ze[1][1];return ge<0?(Pe.rotate=A.deg(u.acos(ge)),Je<0&&(Pe.rotate=360-Pe.rotate)):Pe.rotate=A.deg(u.asin(Je)),Pe.isSimple=!(+Pe.shear.toFixed(9)||Pe.scalex.toFixed(9)!=Pe.scaley.toFixed(9)&&Pe.rotate),Pe.isSuperSimple=!+Pe.shear.toFixed(9)&&Pe.scalex.toFixed(9)==Pe.scaley.toFixed(9)&&!Pe.rotate,Pe.noRotation=!+Pe.shear.toFixed(9)&&!Pe.rotate,Pe},ae.toTransformString=function(Pe){var ze=Pe||this[ve]();return ze.isSimple?(ze.scalex=+ze.scalex.toFixed(4),ze.scaley=+ze.scaley.toFixed(4),ze.rotate=+ze.rotate.toFixed(4),(ze.dx||ze.dy?"t"+[ze.dx,ze.dy]:se)+(ze.scalex!=1||ze.scaley!=1?"s"+[ze.scalex,ze.scaley,0,0]:se)+(ze.rotate?"r"+[ze.rotate,0,0]:se)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(Re.prototype);for(var lt=function(){this.returnValue=!1},Ze=function(){return this.originalEvent.preventDefault()},ct=function(){this.cancelBubble=!0},Nt=function(){return this.originalEvent.stopPropagation()},Ut=function(ae){var ye=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,Ce=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;return{x:ae.clientX+Ce,y:ae.clientY+ye}},Mr=z.doc.addEventListener?function(ae,ye,Ce,Pe){var ze=function(ge){var we=Ut(ge);return Ce.call(Pe,ge,we.x,we.y)};if(ae.addEventListener(ye,ze,!1),te&&ke[ye]){var Je=function(ge){for(var we=Ut(ge),Ae=ge,Ue=0,ht=ge.targetTouches&&ge.targetTouches.length;Ue<ht;Ue++)if(ge.targetTouches[Ue].target==ae){(ge=ge.targetTouches[Ue]).originalEvent=Ae,ge.preventDefault=Ze,ge.stopPropagation=Nt;break}return Ce.call(Pe,ge,we.x,we.y)};ae.addEventListener(ke[ye],Je,!1)}return function(){return ae.removeEventListener(ye,ze,!1),te&&ke[ye]&&ae.removeEventListener(ke[ye],Je,!1),!0}}:z.doc.attachEvent?function(ae,ye,Ce,Pe){var ze=function(Je){Je=Je||z.win.event;var ge=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,we=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,Ae=Je.clientX+we,Ue=Je.clientY+ge;return Je.preventDefault=Je.preventDefault||lt,Je.stopPropagation=Je.stopPropagation||ct,Ce.call(Pe,Je,Ae,Ue)};return ae.attachEvent("on"+ye,ze),function(){return ae.detachEvent("on"+ye,ze),!0}}:void 0,Xt=[],Sr=function(ae){for(var ye,Ce=ae.clientX,Pe=ae.clientY,ze=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,Je=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft,ge=Xt.length;ge--;){if(ye=Xt[ge],te&&ae.touches){for(var we,Ae=ae.touches.length;Ae--;)if((we=ae.touches[Ae]).identifier==ye.el._drag.id){Ce=we.clientX,Pe=we.clientY,(ae.originalEvent?ae.originalEvent:ae).preventDefault();break}}else ae.preventDefault();var Ue,ht=ye.el.node,_t=ht.nextSibling,Ct=ht.parentNode,At=ht.style.display;z.win.opera&&Ct.removeChild(ht),ht.style.display="none",Ue=ye.el.paper.getElementByPoint(Ce,Pe),ht.style.display=At,z.win.opera&&(_t?Ct.insertBefore(ht,_t):Ct.appendChild(ht)),Ue&&k("raphael.drag.over."+ye.el.id,ye.el,Ue),Ce+=Je,Pe+=ze,k("raphael.drag.move."+ye.el.id,ye.move_scope||ye.el,Ce-ye.el._drag.x,Pe-ye.el._drag.y,Ce,Pe,ae)}},rr=function(ae){A.unmousemove(Sr).unmouseup(rr);for(var ye,Ce=Xt.length;Ce--;)(ye=Xt[Ce]).el._drag={},k("raphael.drag.end."+ye.el.id,ye.end_scope||ye.start_scope||ye.move_scope||ye.el,ae);Xt=[]},er=A.el={},kr=he.length;kr--;)(function(ae){A[ae]=er[ae]=function(ye,Ce){return A.is(ye,"function")&&(this.events=this.events||[],this.events.push({name:ae,f:ye,unbind:Mr(this.shape||this.node||z.doc,ae,ye,Ce||this)})),this},A["un"+ae]=er["un"+ae]=function(ye){for(var Ce=this.events||[],Pe=Ce.length;Pe--;)Ce[Pe].name!=ae||!A.is(ye,"undefined")&&Ce[Pe].f!=ye||(Ce[Pe].unbind(),Ce.splice(Pe,1),!Ce.length&&delete this.events);return this}})(he[kr]);er.data=function(ae,ye){var Ce=et[this.id]=et[this.id]||{};if(arguments.length==0)return Ce;if(arguments.length==1){if(A.is(ae,"object")){for(var Pe in ae)ae[$](Pe)&&this.data(Pe,ae[Pe]);return this}return k("raphael.data.get."+this.id,this,Ce[ae],ae),Ce[ae]}return Ce[ae]=ye,k("raphael.data.set."+this.id,this,ye,ae),this},er.removeData=function(ae){return ae==null?delete et[this.id]:et[this.id]&&delete et[this.id][ae],this},er.getData=function(){return Oe(et[this.id]||{})},er.hover=function(ae,ye,Ce,Pe){return this.mouseover(ae,Ce).mouseout(ye,Pe||Ce)},er.unhover=function(ae,ye){return this.unmouseover(ae).unmouseout(ye)};var vr=[];er.drag=function(ae,ye,Ce,Pe,ze,Je){function ge(we){(we.originalEvent||we).preventDefault();var Ae=we.clientX,Ue=we.clientY,ht=z.doc.documentElement.scrollTop||z.doc.body.scrollTop,_t=z.doc.documentElement.scrollLeft||z.doc.body.scrollLeft;if(this._drag.id=we.identifier,te&&we.touches){for(var Ct,At=we.touches.length;At--;)if(Ct=we.touches[At],this._drag.id=Ct.identifier,Ct.identifier==this._drag.id){Ae=Ct.clientX,Ue=Ct.clientY;break}}this._drag.x=Ae+_t,this._drag.y=Ue+ht,!Xt.length&&A.mousemove(Sr).mouseup(rr),Xt.push({el:this,move_scope:Pe,start_scope:ze,end_scope:Je}),ye&&k.on("raphael.drag.start."+this.id,ye),ae&&k.on("raphael.drag.move."+this.id,ae),Ce&&k.on("raphael.drag.end."+this.id,Ce),k("raphael.drag.start."+this.id,ze||Pe||this,this._drag.x,this._drag.y,we)}return this._drag={},vr.push({el:this,start:ge}),this.mousedown(ge),this},er.onDragOver=function(ae){ae?k.on("raphael.drag.over."+this.id,ae):k.unbind("raphael.drag.over."+this.id)},er.undrag=function(){for(var ae=vr.length;ae--;)vr[ae].el==this&&(this.unmousedown(vr[ae].start),vr.splice(ae,1),k.unbind("raphael.drag.*."+this.id));!vr.length&&A.unmousemove(Sr).unmouseup(rr),Xt=[]},M.circle=function(ae,ye,Ce){var Pe=A._engine.circle(this,ae||0,ye||0,Ce||0);return this.__set__&&this.__set__.push(Pe),Pe},M.rect=function(ae,ye,Ce,Pe,ze){var Je=A._engine.rect(this,ae||0,ye||0,Ce||0,Pe||0,ze||0);return this.__set__&&this.__set__.push(Je),Je},M.ellipse=function(ae,ye,Ce,Pe){var ze=A._engine.ellipse(this,ae||0,ye||0,Ce||0,Pe||0);return this.__set__&&this.__set__.push(ze),ze},M.path=function(ae){ae&&!A.is(ae,"string")&&!A.is(ae[0],v)&&(ae+=se);var ye=A._engine.path(A.format[U](A,arguments),this);return this.__set__&&this.__set__.push(ye),ye},M.image=function(ae,ye,Ce,Pe,ze){var Je=A._engine.image(this,ae||"about:blank",ye||0,Ce||0,Pe||0,ze||0);return this.__set__&&this.__set__.push(Je),Je},M.text=function(ae,ye,Ce){var Pe=A._engine.text(this,ae||0,ye||0,Q(Ce));return this.__set__&&this.__set__.push(Pe),Pe},M.set=function(ae){!A.is(ae,"array")&&(ae=Array.prototype.splice.call(arguments,0,arguments.length));var ye=new Kr(ae);return this.__set__&&this.__set__.push(ye),ye.paper=this,ye.type="set",ye},M.setStart=function(ae){this.__set__=ae||this.set()},M.setFinish=function(ae){var ye=this.__set__;return delete this.__set__,ye},M.getSize=function(){var ae=this.canvas.parentNode;return{width:ae.offsetWidth,height:ae.offsetHeight}},M.setSize=function(ae,ye){return A._engine.setSize.call(this,ae,ye)},M.setViewBox=function(ae,ye,Ce,Pe,ze){return A._engine.setViewBox.call(this,ae,ye,Ce,Pe,ze)},M.top=M.bottom=null,M.raphael=A;function Pr(){return this.x+de+this.y+de+this.width+" × "+this.height}M.getElementByPoint=function(ae,ye){var Ce,Pe,ze,Je,ge,we,Ae,Ue=this.canvas,ht=z.doc.elementFromPoint(ae,ye);if(z.win.opera&&ht.tagName=="svg"){var _t=(Pe=(Ce=Ue).getBoundingClientRect(),ze=Ce.ownerDocument,Je=ze.body,ge=ze.documentElement,we=ge.clientTop||Je.clientTop||0,Ae=ge.clientLeft||Je.clientLeft||0,{y:Pe.top+(z.win.pageYOffset||ge.scrollTop||Je.scrollTop)-we,x:Pe.left+(z.win.pageXOffset||ge.scrollLeft||Je.scrollLeft)-Ae}),Ct=Ue.createSVGRect();Ct.x=ae-_t.x,Ct.y=ye-_t.y,Ct.width=Ct.height=1;var At=Ue.getIntersectionList(Ct,null);At.length&&(ht=At[At.length-1])}if(!ht)return null;for(;ht.parentNode&&ht!=Ue.parentNode&&!ht.raphael;)ht=ht.parentNode;return ht==this.canvas.parentNode&&(ht=Ue),ht=ht&&ht.raphael?this.getById(ht.raphaelid):null},M.getElementsByBBox=function(ae){var ye=this.set();return this.forEach(function(Ce){A.isBBoxIntersect(Ce.getBBox(),ae)&&ye.push(Ce)}),ye},M.getById=function(ae){for(var ye=this.bottom;ye;){if(ye.id==ae)return ye;ye=ye.next}return null},M.forEach=function(ae,ye){for(var Ce=this.bottom;Ce;){if(ae.call(ye,Ce)===!1)return this;Ce=Ce.next}return this},M.getElementsByPoint=function(ae,ye){var Ce=this.set();return this.forEach(function(Pe){Pe.isPointInside(ae,ye)&&Ce.push(Pe)}),Ce},er.isPointInside=function(ae,ye){var Ce=this.realPath=Ge[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(Ce=A.transformPath(Ce,this.attr("transform"))),A.isPointInsidePath(Ce,ae,ye)},er.getBBox=function(ae){if(this.removed)return{};var ye=this._;return ae?(!ye.dirty&&ye.bboxwt||(this.realPath=Ge[this.type](this),ye.bboxwt=Be(this.realPath),ye.bboxwt.toString=Pr,ye.dirty=0),ye.bboxwt):((ye.dirty||ye.dirtyT||!ye.bbox)&&(!ye.dirty&&this.realPath||(ye.bboxwt=0,this.realPath=Ge[this.type](this)),ye.bbox=Be(nt(this.realPath,this.matrix)),ye.bbox.toString=Pr,ye.dirty=ye.dirtyT=0),ye.bbox)},er.clone=function(){if(this.removed)return null;var ae=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(ae),ae},er.glow=function(ae){if(this.type=="text")return null;var ye={width:((ae=ae||{}).width||10)+(+this.attr("stroke-width")||1),fill:ae.fill||!1,opacity:ae.opacity==null?.5:ae.opacity,offsetx:ae.offsetx||0,offsety:ae.offsety||0,color:ae.color||"#000"},Ce=ye.width/2,Pe=this.paper,ze=Pe.set(),Je=this.realPath||Ge[this.type](this);Je=this.matrix?nt(Je,this.matrix):Je;for(var ge=1;ge<Ce+1;ge++)ze.push(Pe.path(Je).attr({stroke:ye.color,fill:ye.fill?ye.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(ye.width/Ce*ge).toFixed(3),opacity:+(ye.opacity/Ce).toFixed(3)}));return ze.insertBefore(this).translate(ye.offsetx,ye.offsety)};var Tr=function(ae,ye,Ce,Pe,ze,Je,ge,we,Ae){return Ae==null?yt(ae,ye,Ce,Pe,ze,Je,ge,we):A.findDotsAtSegment(ae,ye,Ce,Pe,ze,Je,ge,we,function(Ue,ht,_t,Ct,At,Qt,ir,tr,Zt){if(!(Zt<0||yt(Ue,ht,_t,Ct,At,Qt,ir,tr)<Zt)){var Br,pr=.5,_r=1-pr;for(Br=yt(Ue,ht,_t,Ct,At,Qt,ir,tr,_r);e(Br-Zt)>.01;)Br=yt(Ue,ht,_t,Ct,At,Qt,ir,tr,_r+=(Br<Zt?1:-1)*(pr/=2));return _r}}(ae,ye,Ce,Pe,ze,Je,ge,we,Ae))},br=function(ae,ye){return function(Ce,Pe,ze){for(var Je,ge,we,Ae,Ue,ht="",_t={},Ct=0,At=0,Qt=(Ce=Ot(Ce)).length;At<Qt;At++){if((we=Ce[At])[0]=="M")Je=+we[1],ge=+we[2];else{if(Ct+(Ae=Tr(Je,ge,we[1],we[2],we[3],we[4],we[5],we[6]))>Pe){if(ye&&!_t.start){if(ht+=["C"+(Ue=Tr(Je,ge,we[1],we[2],we[3],we[4],we[5],we[6],Pe-Ct)).start.x,Ue.start.y,Ue.m.x,Ue.m.y,Ue.x,Ue.y],ze)return ht;_t.start=ht,ht=["M"+Ue.x,Ue.y+"C"+Ue.n.x,Ue.n.y,Ue.end.x,Ue.end.y,we[5],we[6]].join(),Ct+=Ae,Je=+we[5],ge=+we[6];continue}if(!ae&&!ye)return{x:(Ue=Tr(Je,ge,we[1],we[2],we[3],we[4],we[5],we[6],Pe-Ct)).x,y:Ue.y,alpha:Ue.alpha}}Ct+=Ae,Je=+we[5],ge=+we[6]}ht+=we.shift()+we}return _t.end=ht,(Ue=ae?Ct:ye?_t:A.findDotsAtSegment(Je,ge,we[0],we[1],we[2],we[3],we[4],we[5],1)).alpha&&(Ue={x:Ue.x,y:Ue.y,alpha:Ue.alpha}),Ue}},Ar=br(1),gr=br(),dr=br(0,1);A.getTotalLength=Ar,A.getPointAtLength=gr,A.getSubpath=function(ae,ye,Ce){if(this.getTotalLength(ae)-Ce<1e-6)return dr(ae,ye).end;var Pe=dr(ae,Ce,1);return ye?dr(Pe,ye).end:Pe},er.getTotalLength=function(){var ae=this.getPath();if(ae)return this.node.getTotalLength?this.node.getTotalLength():Ar(ae)},er.getPointAtLength=function(ae){var ye=this.getPath();if(ye)return gr(ye,ae)},er.getPath=function(){var ae,ye=A._getPath[this.type];if(this.type!="text"&&this.type!="set")return ye&&(ae=ye(this)),ae},er.getSubpath=function(ae,ye){var Ce=this.getPath();if(Ce)return A.getSubpath(Ce,ae,ye)};var lr=A.easing_formulas={linear:function(ae){return ae},"<":function(ae){return c(ae,1.7)},">":function(ae){return c(ae,.48)},"<>":function(ae){var ye=.48-ae/1.04,Ce=u.sqrt(.1734+ye*ye),Pe=Ce-ye,ze=-Ce-ye,Je=c(e(Pe),1/3)*(Pe<0?-1:1)+c(e(ze),1/3)*(ze<0?-1:1)+.5;return 3*(1-Je)*Je*Je+Je*Je*Je},backIn:function(ae){var ye=1.70158;return ae*ae*((ye+1)*ae-ye)},backOut:function(ae){var ye=1.70158;return(ae-=1)*ae*((ye+1)*ae+ye)+1},elastic:function(ae){return ae==!!ae?ae:c(2,-10*ae)*u.sin(2*y*(ae-.075)/.3)+1},bounce:function(ae){var ye=7.5625,Ce=2.75;return ae<1/Ce?ye*ae*ae:ae<2/Ce?ye*(ae-=1.5/Ce)*ae+.75:ae<2.5/Ce?ye*(ae-=2.25/Ce)*ae+.9375:ye*(ae-=2.625/Ce)*ae+.984375}};lr.easeIn=lr["ease-in"]=lr["<"],lr.easeOut=lr["ease-out"]=lr[">"],lr.easeInOut=lr["ease-in-out"]=lr["<>"],lr["back-in"]=lr.backIn,lr["back-out"]=lr.backOut;var Kt=[],Bt=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(ae){setTimeout(ae,16)},Ft=function(){for(var ae=+new Date,ye=0;ye<Kt.length;ye++){var Ce=Kt[ye];if(!Ce.el.removed&&!Ce.paused){var Pe,ze,Je=ae-Ce.start,ge=Ce.ms,we=Ce.easing,Ae=Ce.from,Ue=Ce.diff,ht=Ce.to,_t=(Ce.t,Ce.el),Ct={},At={};if(Ce.initstatus?(Je=(Ce.initstatus*Ce.anim.top-Ce.prev)/(Ce.percent-Ce.prev)*ge,Ce.status=Ce.initstatus,delete Ce.initstatus,Ce.stop&&Kt.splice(ye--,1)):Ce.status=(Ce.prev+(Ce.percent-Ce.prev)*(Je/ge))/Ce.anim.top,!(Je<0))if(Je<ge){var Qt=we(Je/ge);for(var ir in Ae)if(Ae[$](ir)){switch(ee[ir]){case w:Pe=+Ae[ir]+Qt*ge*Ue[ir];break;case"colour":Pe="rgb("+[cr(H(Ae[ir].r+Qt*ge*Ue[ir].r)),cr(H(Ae[ir].g+Qt*ge*Ue[ir].g)),cr(H(Ae[ir].b+Qt*ge*Ue[ir].b))].join(",")+")";break;case"path":Pe=[];for(var tr=0,Zt=Ae[ir].length;tr<Zt;tr++){Pe[tr]=[Ae[ir][tr][0]];for(var Br=1,pr=Ae[ir][tr].length;Br<pr;Br++)Pe[tr][Br]=+Ae[ir][tr][Br]+Qt*ge*Ue[ir][tr][Br];Pe[tr]=Pe[tr].join(de)}Pe=Pe.join(de);break;case"transform":if(Ue[ir].real)for(Pe=[],tr=0,Zt=Ae[ir].length;tr<Zt;tr++)for(Pe[tr]=[Ae[ir][tr][0]],Br=1,pr=Ae[ir][tr].length;Br<pr;Br++)Pe[tr][Br]=Ae[ir][tr][Br]+Qt*ge*Ue[ir][tr][Br];else{var _r=function(Gr){return+Ae[ir][Gr]+Qt*ge*Ue[ir][Gr]};Pe=[["m",_r(0),_r(1),_r(2),_r(3),_r(4),_r(5)]]}break;case"csv":if(ir=="clip-rect")for(Pe=[],tr=4;tr--;)Pe[tr]=+Ae[ir][tr]+Qt*ge*Ue[ir][tr];break;default:var fr=[][J](Ae[ir]);for(Pe=[],tr=_t.paper.customAttributes[ir].length;tr--;)Pe[tr]=+fr[tr]+Qt*ge*Ue[ir][tr]}Ct[ir]=Pe}_t.attr(Ct),function(Gr,Nr,Zr){setTimeout(function(){k("raphael.anim.frame."+Gr,Nr,Zr)})}(_t.id,_t,Ce.anim)}else{if(function(Gr,Nr,Zr){setTimeout(function(){k("raphael.anim.frame."+Nr.id,Nr,Zr),k("raphael.anim.finish."+Nr.id,Nr,Zr),A.is(Gr,"function")&&Gr.call(Nr)})}(Ce.callback,_t,Ce.anim),_t.attr(ht),Kt.splice(ye--,1),Ce.repeat>1&&!Ce.next){for(ze in ht)ht[$](ze)&&(At[ze]=Ce.totalOrigin[ze]);Ce.el.attr(At),ar(Ce.anim,Ce.el,Ce.anim.percents[0],null,Ce.totalOrigin,Ce.repeat-1)}Ce.next&&!Ce.stop&&ar(Ce.anim,Ce.el,Ce.next,null,Ce.totalOrigin,Ce.repeat)}}}Kt.length&&Bt(Ft)},cr=function(ae){return ae>255?255:ae<0?0:ae};function nr(ae,ye,Ce,Pe,ze,Je){var ge=3*ye,we=3*(Pe-ye)-ge,Ae=1-ge-we,Ue=3*Ce,ht=3*(ze-Ce)-Ue,_t=1-Ue-ht;function Ct(At){return((Ae*At+we)*At+ge)*At}return function(At,Qt){var ir=function(tr,Zt){var Br,pr,_r,fr,Gr,Nr;for(_r=tr,Nr=0;Nr<8;Nr++){if(fr=Ct(_r)-tr,e(fr)<Zt)return _r;if(e(Gr=(3*Ae*_r+2*we)*_r+ge)<1e-6)break;_r-=fr/Gr}if(pr=1,(_r=tr)<(Br=0))return Br;if(_r>pr)return pr;for(;Br<pr;){if(fr=Ct(_r),e(fr-tr)<Zt)return _r;tr>fr?Br=_r:pr=_r,_r=(pr-Br)/2+Br}return _r}(At,Qt);return((_t*ir+ht)*ir+Ue)*ir}(ae,1/(200*Je))}function Vt(ae,ye){var Ce=[],Pe={};if(this.ms=ye,this.times=1,ae){for(var ze in ae)ae[$](ze)&&(Pe[Y(ze)]=ae[ze],Ce.push(Y(ze)));Ce.sort(mt)}this.anim=Pe,this.top=Ce[Ce.length-1],this.percents=Ce}function ar(ae,ye,Ce,Pe,ze,Je){Ce=Y(Ce);var ge,we,Ae,Ue,ht,_t,Ct=ae.ms,At={},Qt={},ir={};if(Pe)for(Zt=0,Br=Kt.length;Zt<Br;Zt++){var tr=Kt[Zt];if(tr.el.id==ye.id&&tr.anim==ae){tr.percent!=Ce?(Kt.splice(Zt,1),Ae=1):we=tr,ye.attr(tr.totalOrigin);break}}else Pe=+Qt;for(var Zt=0,Br=ae.percents.length;Zt<Br;Zt++){if(ae.percents[Zt]==Ce||ae.percents[Zt]>Pe*ae.top){Ce=ae.percents[Zt],ht=ae.percents[Zt-1]||0,Ct=Ct/ae.top*(Ce-ht),Ue=ae.percents[Zt+1],ge=ae.anim[Ce];break}Pe&&ye.attr(ae.anim[ae.percents[Zt]])}if(ge){if(we)we.initstatus=Pe,we.start=new Date-we.ms*Pe;else{for(var pr in ge)if(ge[$](pr)&&(ee[$](pr)||ye.paper.customAttributes[$](pr)))switch(At[pr]=ye.attr(pr),At[pr]==null&&(At[pr]=D[pr]),Qt[pr]=ge[pr],ee[pr]){case w:ir[pr]=(Qt[pr]-At[pr])/Ct;break;case"colour":At[pr]=A.getRGB(At[pr]);var _r=A.getRGB(Qt[pr]);ir[pr]={r:(_r.r-At[pr].r)/Ct,g:(_r.g-At[pr].g)/Ct,b:(_r.b-At[pr].b)/Ct};break;case"path":var fr=Ot(At[pr],Qt[pr]),Gr=fr[1];for(At[pr]=fr[0],ir[pr]=[],Zt=0,Br=At[pr].length;Zt<Br;Zt++){ir[pr][Zt]=[0];for(var Nr=1,Zr=At[pr][Zt].length;Nr<Zr;Nr++)ir[pr][Zt][Nr]=(Gr[Zt][Nr]-At[pr][Zt][Nr])/Ct}break;case"transform":var Sn=ye._,qn=_e(Sn[pr],Qt[pr]);if(qn)for(At[pr]=qn.from,Qt[pr]=qn.to,ir[pr]=[],ir[pr].real=!0,Zt=0,Br=At[pr].length;Zt<Br;Zt++)for(ir[pr][Zt]=[At[pr][Zt][0]],Nr=1,Zr=At[pr][Zt].length;Nr<Zr;Nr++)ir[pr][Zt][Nr]=(Qt[pr][Zt][Nr]-At[pr][Zt][Nr])/Ct;else{var ii=ye.matrix||new Re,si={_:{transform:Sn.transform},getBBox:function(){return ye.getBBox(1)}};At[pr]=[ii.a,ii.b,ii.c,ii.d,ii.e,ii.f],ce(si,Qt[pr]),Qt[pr]=si._.transform,ir[pr]=[(si.matrix.a-ii.a)/Ct,(si.matrix.b-ii.b)/Ct,(si.matrix.c-ii.c)/Ct,(si.matrix.d-ii.d)/Ct,(si.matrix.e-ii.e)/Ct,(si.matrix.f-ii.f)/Ct]}break;case"csv":var vn=Q(ge[pr])[ve](j),on=Q(At[pr])[ve](j);if(pr=="clip-rect")for(At[pr]=on,ir[pr]=[],Zt=on.length;Zt--;)ir[pr][Zt]=(vn[Zt]-At[pr][Zt])/Ct;Qt[pr]=vn;break;default:for(vn=[][J](ge[pr]),on=[][J](At[pr]),ir[pr]=[],Zt=ye.paper.customAttributes[pr].length;Zt--;)ir[pr][Zt]=((vn[Zt]||0)-(on[Zt]||0))/Ct}var Bn=ge.easing,Hi=A.easing_formulas[Bn];if(!Hi)if((Hi=Q(Bn).match(R))&&Hi.length==5){var Xi=Hi;Hi=function(Kn){return nr(Kn,+Xi[1],+Xi[2],+Xi[3],+Xi[4],Ct)}}else Hi=Ye;if(tr={anim:ae,percent:Ce,timestamp:_t=ge.start||ae.start||+new Date,start:_t+(ae.del||0),status:0,initstatus:Pe||0,stop:!1,ms:Ct,easing:Hi,from:At,diff:ir,to:Qt,el:ye,callback:ge.callback,prev:ht,next:Ue,repeat:Je||ae.times,origin:ye.attr(),totalOrigin:ze},Kt.push(tr),Pe&&!we&&!Ae&&(tr.stop=!0,tr.start=new Date-Ct*Pe,Kt.length==1))return Ft();Ae&&(tr.start=new Date-tr.ms*Pe),Kt.length==1&&Bt(Ft)}k("raphael.anim.start."+ye.id,ye,ae)}}function qr(ae){for(var ye=0;ye<Kt.length;ye++)Kt[ye].el.paper==ae&&Kt.splice(ye--,1)}er.animateWith=function(ae,ye,Ce,Pe,ze,Je){if(this.removed)return Je&&Je.call(this),this;var ge=Ce instanceof Vt?Ce:A.animation(Ce,Pe,ze,Je);ar(ge,this,ge.percents[0],null,this.attr());for(var we=0,Ae=Kt.length;we<Ae;we++)if(Kt[we].anim==ye&&Kt[we].el==ae){Kt[Ae-1].start=Kt[we].start;break}return this},er.onAnimation=function(ae){return ae?k.on("raphael.anim.frame."+this.id,ae):k.unbind("raphael.anim.frame."+this.id),this},Vt.prototype.delay=function(ae){var ye=new Vt(this.anim,this.ms);return ye.times=this.times,ye.del=+ae||0,ye},Vt.prototype.repeat=function(ae){var ye=new Vt(this.anim,this.ms);return ye.del=this.del,ye.times=u.floor(p(ae,0))||1,ye},A.animation=function(ae,ye,Ce,Pe){if(ae instanceof Vt)return ae;!A.is(Ce,"function")&&Ce||(Pe=Pe||Ce||null,Ce=null),ae=Object(ae),ye=+ye||0;var ze,Je,ge={};for(Je in ae)ae[$](Je)&&Y(Je)!=Je&&Y(Je)+"%"!=Je&&(ze=!0,ge[Je]=ae[Je]);if(ze)return Ce&&(ge.easing=Ce),Pe&&(ge.callback=Pe),new Vt({100:ge},ye);if(Pe){var we=0;for(var Ae in ae){var Ue=Z(Ae);ae[$](Ae)&&Ue>we&&(we=Ue)}!ae[we+="%"].callback&&(ae[we].callback=Pe)}return new Vt(ae,ye)},er.animate=function(ae,ye,Ce,Pe){if(this.removed)return Pe&&Pe.call(this),this;var ze=ae instanceof Vt?ae:A.animation(ae,ye,Ce,Pe);return ar(ze,this,ze.percents[0],null,this.attr()),this},er.setTime=function(ae,ye){return ae&&ye!=null&&this.status(ae,b(ye,ae.ms)/ae.ms),this},er.status=function(ae,ye){var Ce,Pe,ze=[],Je=0;if(ye!=null)return ar(ae,this,-1,b(ye,1)),this;for(Ce=Kt.length;Je<Ce;Je++)if((Pe=Kt[Je]).el.id==this.id&&(!ae||Pe.anim==ae)){if(ae)return Pe.status;ze.push({anim:Pe.anim,status:Pe.status})}return ae?0:ze},er.pause=function(ae){for(var ye=0;ye<Kt.length;ye++)Kt[ye].el.id!=this.id||ae&&Kt[ye].anim!=ae||k("raphael.anim.pause."+this.id,this,Kt[ye].anim)!==!1&&(Kt[ye].paused=!0);return this},er.resume=function(ae){for(var ye=0;ye<Kt.length;ye++)if(Kt[ye].el.id==this.id&&(!ae||Kt[ye].anim==ae)){var Ce=Kt[ye];k("raphael.anim.resume."+this.id,this,Ce.anim)!==!1&&(delete Ce.paused,this.status(Ce.anim,Ce.status))}return this},er.stop=function(ae){for(var ye=0;ye<Kt.length;ye++)Kt[ye].el.id!=this.id||ae&&Kt[ye].anim!=ae||k("raphael.anim.stop."+this.id,this,Kt[ye].anim)!==!1&&Kt.splice(ye--,1);return this},k.on("raphael.remove",qr),k.on("raphael.clear",qr),er.toString=function(){return"Raphaël’s object"};var Vr,Wr,Rr,bt,Kr=function(ae){if(this.items=[],this.length=0,this.type="set",ae)for(var ye=0,Ce=ae.length;ye<Ce;ye++)!ae[ye]||ae[ye].constructor!=er.constructor&&ae[ye].constructor!=Kr||(this[this.items.length]=this.items[this.items.length]=ae[ye],this.length++)},Ur=Kr.prototype;for(var ti in Ur.push=function(){for(var ae,ye,Ce=0,Pe=arguments.length;Ce<Pe;Ce++)!(ae=arguments[Ce])||ae.constructor!=er.constructor&&ae.constructor!=Kr||(this[ye=this.items.length]=this.items[ye]=ae,this.length++);return this},Ur.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Ur.forEach=function(ae,ye){for(var Ce=0,Pe=this.items.length;Ce<Pe;Ce++)if(ae.call(ye,this.items[Ce],Ce)===!1)return this;return this},er)er[$](ti)&&(Ur[ti]=function(ae){return function(){var ye=arguments;return this.forEach(function(Ce){Ce[ae][U](Ce,ye)})}}(ti));return Ur.attr=function(ae,ye){if(ae&&A.is(ae,v)&&A.is(ae[0],"object"))for(var Ce=0,Pe=ae.length;Ce<Pe;Ce++)this.items[Ce].attr(ae[Ce]);else for(var ze=0,Je=this.items.length;ze<Je;ze++)this.items[ze].attr(ae,ye);return this},Ur.clear=function(){for(;this.length;)this.pop()},Ur.splice=function(ae,ye,Ce){ae=ae<0?p(this.length+ae,0):ae,ye=p(0,b(this.length-ae,ye));var Pe,ze=[],Je=[],ge=[];for(Pe=2;Pe<arguments.length;Pe++)ge.push(arguments[Pe]);for(Pe=0;Pe<ye;Pe++)Je.push(this[ae+Pe]);for(;Pe<this.length-ae;Pe++)ze.push(this[ae+Pe]);var we=ge.length;for(Pe=0;Pe<we+ze.length;Pe++)this.items[ae+Pe]=this[ae+Pe]=Pe<we?ge[Pe]:ze[Pe-we];for(Pe=this.items.length=this.length-=ye-we;this[Pe];)delete this[Pe++];return new Kr(Je)},Ur.exclude=function(ae){for(var ye=0,Ce=this.length;ye<Ce;ye++)if(this[ye]==ae)return this.splice(ye,1),!0},Ur.animate=function(ae,ye,Ce,Pe){(A.is(Ce,"function")||!Ce)&&(Pe=Ce||null);var ze,Je,ge=this.items.length,we=ge,Ae=this;if(!ge)return this;Pe&&(Je=function(){!--ge&&Pe.call(Ae)}),Ce=A.is(Ce,"string")?Ce:Je;var Ue=A.animation(ae,ye,Ce,Je);for(ze=this.items[--we].animate(Ue);we--;)this.items[we]&&!this.items[we].removed&&this.items[we].animateWith(ze,Ue,Ue),this.items[we]&&!this.items[we].removed||ge--;return this},Ur.insertAfter=function(ae){for(var ye=this.items.length;ye--;)this.items[ye].insertAfter(ae);return this},Ur.getBBox=function(){for(var ae=[],ye=[],Ce=[],Pe=[],ze=this.items.length;ze--;)if(!this.items[ze].removed){var Je=this.items[ze].getBBox();ae.push(Je.x),ye.push(Je.y),Ce.push(Je.x+Je.width),Pe.push(Je.y+Je.height)}return{x:ae=b[U](0,ae),y:ye=b[U](0,ye),x2:Ce=p[U](0,Ce),y2:Pe=p[U](0,Pe),width:Ce-ae,height:Pe-ye}},Ur.clone=function(ae){ae=this.paper.set();for(var ye=0,Ce=this.items.length;ye<Ce;ye++)ae.push(this.items[ye].clone());return ae},Ur.toString=function(){return"Raphaël‘s set"},Ur.glow=function(ae){var ye=this.paper.set();return this.forEach(function(Ce,Pe){var ze=Ce.glow(ae);ze!=null&&ze.forEach(function(Je,ge){ye.push(Je)})}),ye},Ur.isPointInside=function(ae,ye){var Ce=!1;return this.forEach(function(Pe){if(Pe.isPointInside(ae,ye))return Ce=!0,!1}),Ce},A.registerFont=function(ae){if(!ae.face)return ae;this.fonts=this.fonts||{};var ye={w:ae.w,face:{},glyphs:{}},Ce=ae.face["font-family"];for(var Pe in ae.face)ae.face[$](Pe)&&(ye.face[Pe]=ae.face[Pe]);if(this.fonts[Ce]?this.fonts[Ce].push(ye):this.fonts[Ce]=[ye],!ae.svg){for(var ze in ye.face["units-per-em"]=Z(ae.face["units-per-em"],10),ae.glyphs)if(ae.glyphs[$](ze)){var Je=ae.glyphs[ze];if(ye.glyphs[ze]={w:Je.w,k:{},d:Je.d&&"M"+Je.d.replace(/[mlcxtrv]/g,function(we){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[we]||"M"})+"z"},Je.k)for(var ge in Je.k)Je[$](ge)&&(ye.glyphs[ze].k[ge]=Je.k[ge])}}return ae},M.getFont=function(ae,ye,Ce,Pe){if(Pe=Pe||"normal",Ce=Ce||"normal",ye=+ye||{normal:400,bold:700,lighter:300,bolder:800}[ye]||400,A.fonts){var ze,Je=A.fonts[ae];if(!Je){var ge=new RegExp("(^|\\s)"+ae.replace(/[^\w\d\s+!~.:_-]/g,se)+"(\\s|$)","i");for(var we in A.fonts)if(A.fonts[$](we)&&ge.test(we)){Je=A.fonts[we];break}}if(Je)for(var Ae=0,Ue=Je.length;Ae<Ue&&((ze=Je[Ae]).face["font-weight"]!=ye||ze.face["font-style"]!=Ce&&ze.face["font-style"]||ze.face["font-stretch"]!=Pe);Ae++);return ze}},M.print=function(ae,ye,Ce,Pe,ze,Je,ge,we){Je=Je||"middle",ge=p(b(ge||0,1),-1),we=p(b(we||1,3),1);var Ae,Ue=Q(Ce)[ve](se),ht=0,_t=0,Ct=se;if(A.is(Pe,"string")&&(Pe=this.getFont(Pe)),Pe){Ae=(ze||16)/Pe.face["units-per-em"];for(var At=Pe.face.bbox[ve](j),Qt=+At[0],ir=At[3]-At[1],tr=0,Zt=+At[1]+(Je=="baseline"?ir+ +Pe.face.descent:ir/2),Br=0,pr=Ue.length;Br<pr;Br++){if(Ue[Br]==`
 `)ht=0,fr=0,_t=0,tr+=ir*we;else{var _r=_t&&Pe.glyphs[Ue[Br-1]]||{},fr=Pe.glyphs[Ue[Br]];ht+=_t?(_r.w||Pe.w)+(_r.k&&_r.k[Ue[Br]]||0)+Pe.w*ge:0,_t=1}fr&&fr.d&&(Ct+=A.transformPath(fr.d,["t",ht*Ae,tr*Ae,"s",Ae,Ae,Qt,Zt,"t",(ae-Qt)/Ae,(ye-Zt)/Ae]))}}return this.path(Ct).attr({fill:"#000",stroke:"none"})},M.add=function(ae){if(A.is(ae,"array"))for(var ye,Ce=this.set(),Pe=0,ze=ae.length;Pe<ze;Pe++)ye=ae[Pe]||{},I[$](ye.type)&&Ce.push(this[ye.type]().attr(ye));return Ce},A.format=function(ae,ye){var Ce=A.is(ye,v)?[0][J](ye):arguments;return ae&&A.is(ae,"string")&&Ce.length-1&&(ae=ae.replace(P,function(Pe,ze){return Ce[++ze]==null?se:Ce[ze]})),ae||se},A.fullfill=(Vr=/\{([^\}]+)\}/g,Wr=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(ae,ye){return String(ae).replace(Vr,function(Ce,Pe){return function(ze,Je,ge){var we=ge;return Je.replace(Wr,function(Ae,Ue,ht,_t,Ct){Ue=Ue||_t,we&&(Ue in we&&(we=we[Ue]),typeof we=="function"&&Ct&&(we=we()))}),we=(we==null||we==ge?ze:we)+""}(Ce,Pe,ye)})}),A.ninja=function(){if(N.was)z.win.Raphael=N.is;else{window.Raphael=void 0;try{delete window.Raphael}catch{}}return A},A.st=Ur,k.on("raphael.DOMload",function(){B=!0}),(Rr=document).readyState==null&&Rr.addEventListener&&(Rr.addEventListener("DOMContentLoaded",bt=function(){Rr.removeEventListener("DOMContentLoaded",bt,!1),Rr.readyState="complete"},!1),Rr.readyState="loading"),function ae(){/in/.test(Rr.readyState)?setTimeout(ae,9):A.eve("raphael.DOMload")}(),A}).apply(d,h))===void 0||(l.exports=S)},function(l,d,m){var h,S;h=[m(0),m(3),m(4)],(S=(function(k){return k}).apply(d,h))===void 0||(l.exports=S)},function(l,d,m){var h,S,k,A,B,M,j,I,P,$,z,N,F,U;A="hasOwnProperty",B=/[\.\/]/,M=/\s*,\s*/,j=function(J,te){return J-te},I={n:{}},P=function(){for(var J=0,te=this.length;J<te;J++)if(this[J]!==void 0)return this[J]},$=function(){for(var J=this.length;--J;)if(this[J]!==void 0)return this[J]},z=Object.prototype.toString,N=String,F=Array.isArray||function(J){return J instanceof Array||z.call(J)=="[object Array]"},(U=function(J,te){var se,de=k,Q=Array.prototype.slice.call(arguments,2),ve=U.listeners(J),he=0,ke=[],T={},u=[],p=S;u.firstDefined=P,u.lastDefined=$,S=J,k=0;for(var b=0,e=ve.length;b<e;b++)"zIndex"in ve[b]&&(ke.push(ve[b].zIndex),ve[b].zIndex<0&&(T[ve[b].zIndex]=ve[b]));for(ke.sort(j);ke[he]<0;)if(se=T[ke[he++]],u.push(se.apply(te,Q)),k)return k=de,u;for(b=0;b<e;b++)if("zIndex"in(se=ve[b]))if(se.zIndex==ke[he]){if(u.push(se.apply(te,Q)),k)break;do if((se=T[ke[++he]])&&u.push(se.apply(te,Q)),k)break;while(se)}else T[se.zIndex]=se;else if(u.push(se.apply(te,Q)),k)break;return k=de,S=p,u})._events=I,U.listeners=function(J){var te,se,de,Q,ve,he,ke,T,u=F(J)?J:J.split(B),p=I,b=[p],e=[];for(Q=0,ve=u.length;Q<ve;Q++){for(T=[],he=0,ke=b.length;he<ke;he++)for(se=[(p=b[he].n)[u[Q]],p["*"]],de=2;de--;)(te=se[de])&&(T.push(te),e=e.concat(te.f||[]));b=T}return e},U.separator=function(J){J?(J="["+(J=N(J).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",B=new RegExp(J)):B=/[\.\/]/},U.on=function(J,te){if(typeof te!="function")return function(){};for(var se=F(J)?F(J[0])?J:[J]:N(J).split(M),de=0,Q=se.length;de<Q;de++)(function(ve){for(var he,ke=F(ve)?ve:N(ve).split(B),T=I,u=0,p=ke.length;u<p;u++)T=(T=T.n).hasOwnProperty(ke[u])&&T[ke[u]]||(T[ke[u]]={n:{}});for(T.f=T.f||[],u=0,p=T.f.length;u<p;u++)if(T.f[u]==te){he=!0;break}!he&&T.f.push(te)})(se[de]);return function(ve){+ve==+ve&&(te.zIndex=+ve)}},U.f=function(J){var te=[].slice.call(arguments,1);return function(){U.apply(null,[J,null].concat(te).concat([].slice.call(arguments,0)))}},U.stop=function(){k=1},U.nt=function(J){var te=F(S)?S.join("."):S;return J?new RegExp("(?:\\.|\\/|^)"+J+"(?:\\.|\\/|$)").test(te):te},U.nts=function(){return F(S)?S:S.split(B)},U.off=U.unbind=function(J,te){if(J){var se=F(J)?F(J[0])?J:[J]:N(J).split(M);if(se.length>1)for(var de=0,Q=se.length;de<Q;de++)U.off(se[de],te);else{se=F(J)?J:N(J).split(B);var ve,he,ke,T,u,p=[I];for(de=0,Q=se.length;de<Q;de++)for(T=0;T<p.length;T+=ke.length-2){if(ke=[T,1],ve=p[T].n,se[de]!="*")ve[se[de]]&&ke.push(ve[se[de]]);else for(he in ve)ve[A](he)&&ke.push(ve[he]);p.splice.apply(p,ke)}for(de=0,Q=p.length;de<Q;de++)for(ve=p[de];ve.n;){if(te){if(ve.f){for(T=0,u=ve.f.length;T<u;T++)if(ve.f[T]==te){ve.f.splice(T,1);break}!ve.f.length&&delete ve.f}for(he in ve.n)if(ve.n[A](he)&&ve.n[he].f){var b=ve.n[he].f;for(T=0,u=b.length;T<u;T++)if(b[T]==te){b.splice(T,1);break}!b.length&&delete ve.n[he].f}}else for(he in delete ve.f,ve.n)ve.n[A](he)&&ve.n[he].f&&delete ve.n[he].f;ve=ve.n}}}else U._events=I={n:{}}},U.once=function(J,te){var se=function(){return U.off(J,se),te.apply(this,arguments)};return U.on(J,se)},U.version="0.5.0",U.toString=function(){return"You are running Eve 0.5.0"},l.exports?l.exports=U:(h=(function(){return U}).apply(d,[]))===void 0||(l.exports=h)},function(l,d,m){var h,S;h=[m(0)],(S=(function(k){if(!k||k.svg){var A="hasOwnProperty",B=String,M=parseFloat,j=parseInt,I=Math,P=I.max,$=I.abs,z=I.pow,N=/[, ]+/,F=k.eve,U="",J=" ",te="http://www.w3.org/1999/xlink",se={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},de={};k.toString=function(){return`Your browser supports SVG.
 You are running Raphaël `+this.version};var Q=function(x,E){if(E)for(var R in typeof x=="string"&&(x=Q(x)),E)E[A](R)&&(R.substring(0,6)=="xlink:"?x.setAttributeNS(te,R.substring(6),B(E[R])):x.setAttribute(R,B(E[R])));else(x=k._g.doc.createElementNS("http://www.w3.org/2000/svg",x)).style&&(x.style.webkitTapHighlightColor="rgba(0,0,0,0)");return x},ve=function(x,E){var R="linear",H=x.id+E,Y=.5,Z=.5,L=x.node,D=x.paper,ee=L.style,oe=k._g.doc.getElementById(H);if(!oe){if(E=(E=B(E).replace(k._radial_gradient,function(mt,Ye,We){if(R="radial",Ye&&We){Y=M(Ye);var Xe=2*((Z=M(We))>.5)-1;z(Y-.5,2)+z(Z-.5,2)>.25&&(Z=I.sqrt(.25-z(Y-.5,2))*Xe+.5)&&Z!=.5&&(Z=Z.toFixed(5)-1e-5*Xe)}return U})).split(/\s*\-\s*/),R=="linear"){var fe=E.shift();if(fe=-M(fe),isNaN(fe))return null;var ue=[0,0,I.cos(k.rad(fe)),I.sin(k.rad(fe))],qe=1/(P($(ue[2]),$(ue[3]))||1);ue[2]*=qe,ue[3]*=qe,ue[2]<0&&(ue[0]=-ue[2],ue[2]=0),ue[3]<0&&(ue[1]=-ue[3],ue[3]=0)}var rt=k._parseDots(E);if(!rt)return null;if(H=H.replace(/[\(\)\s,\xb0#]/g,"_"),x.gradient&&H!=x.gradient.id&&(D.defs.removeChild(x.gradient),delete x.gradient),!x.gradient){oe=Q(R+"Gradient",{id:H}),x.gradient=oe,Q(oe,R=="radial"?{fx:Y,fy:Z}:{x1:ue[0],y1:ue[1],x2:ue[2],y2:ue[3],gradientTransform:x.matrix.invert()}),D.defs.appendChild(oe);for(var Ve=0,et=rt.length;Ve<et;Ve++)oe.appendChild(Q("stop",{offset:rt[Ve].offset?rt[Ve].offset:Ve?"100%":"0%","stop-color":rt[Ve].color||"#fff","stop-opacity":isFinite(rt[Ve].opacity)?rt[Ve].opacity:1}))}}return Q(L,{fill:he(H),opacity:1,"fill-opacity":1}),ee.fill=U,ee.opacity=1,ee.fillOpacity=1,1},he=function(x){if((E=document.documentMode)&&(E===9||E===10))return"url('#"+x+"')";var E,R=document.location;return"url('"+(R.protocol+"//"+R.host+R.pathname+R.search)+"#"+x+"')"},ke=function(x){var E=x.getBBox(1);Q(x.pattern,{patternTransform:x.matrix.invert()+" translate("+E.x+","+E.y+")"})},T=function(x,E,R){if(x.type=="path"){for(var H,Y,Z,L,D,ee=B(E).toLowerCase().split("-"),oe=x.paper,fe=R?"end":"start",ue=x.node,qe=x.attrs,rt=qe["stroke-width"],Ve=ee.length,et="classic",mt=3,Ye=3,We=5;Ve--;)switch(ee[Ve]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":et=ee[Ve];break;case"wide":Ye=5;break;case"narrow":Ye=2;break;case"long":mt=5;break;case"short":mt=2}if(et=="open"?(mt+=2,Ye+=2,We+=2,Z=1,L=R?4:1,D={fill:"none",stroke:qe.stroke}):(L=Z=mt/2,D={fill:qe.stroke,stroke:"none"}),x._.arrows?R?(x._.arrows.endPath&&de[x._.arrows.endPath]--,x._.arrows.endMarker&&de[x._.arrows.endMarker]--):(x._.arrows.startPath&&de[x._.arrows.startPath]--,x._.arrows.startMarker&&de[x._.arrows.startMarker]--):x._.arrows={},et!="none"){var Xe="raphael-marker-"+et,Ge="raphael-marker-"+fe+et+mt+Ye+"-obj"+x.id;k._g.doc.getElementById(Xe)?de[Xe]++:(oe.defs.appendChild(Q(Q("path"),{"stroke-linecap":"round",d:se[et],id:Xe})),de[Xe]=1);var nt,Et=k._g.doc.getElementById(Ge);Et?(de[Ge]++,nt=Et.getElementsByTagName("use")[0]):(Et=Q(Q("marker"),{id:Ge,markerHeight:Ye,markerWidth:mt,orient:"auto",refX:L,refY:Ye/2}),nt=Q(Q("use"),{"xlink:href":"#"+Xe,transform:(R?"rotate(180 "+mt/2+" "+Ye/2+") ":U)+"scale("+mt/We+","+Ye/We+")","stroke-width":(1/((mt/We+Ye/We)/2)).toFixed(4)}),Et.appendChild(nt),oe.defs.appendChild(Et),de[Ge]=1),Q(nt,D);var Le=Z*(et!="diamond"&&et!="oval");R?(H=x._.arrows.startdx*rt||0,Y=k.getTotalLength(qe.path)-Le*rt):(H=Le*rt,Y=k.getTotalLength(qe.path)-(x._.arrows.enddx*rt||0)),(D={})["marker-"+fe]="url(#"+Ge+")",(Y||H)&&(D.d=k.getSubpath(qe.path,H,Y)),Q(ue,D),x._.arrows[fe+"Path"]=Xe,x._.arrows[fe+"Marker"]=Ge,x._.arrows[fe+"dx"]=Le,x._.arrows[fe+"Type"]=et,x._.arrows[fe+"String"]=E}else R?(H=x._.arrows.startdx*rt||0,Y=k.getTotalLength(qe.path)-H):(H=0,Y=k.getTotalLength(qe.path)-(x._.arrows.enddx*rt||0)),x._.arrows[fe+"Path"]&&Q(ue,{d:k.getSubpath(qe.path,H,Y)}),delete x._.arrows[fe+"Path"],delete x._.arrows[fe+"Marker"],delete x._.arrows[fe+"dx"],delete x._.arrows[fe+"Type"],delete x._.arrows[fe+"String"];for(D in de)if(de[A](D)&&!de[D]){var Oe=k._g.doc.getElementById(D);Oe&&Oe.parentNode.removeChild(Oe)}}},u={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},p=function(x,E,R){if(E=u[B(E).toLowerCase()]){for(var H=x.attrs["stroke-width"]||"1",Y={round:H,square:H,butt:0}[x.attrs["stroke-linecap"]||R["stroke-linecap"]]||0,Z=[],L=E.length;L--;)Z[L]=E[L]*H+(L%2?1:-1)*Y;Q(x.node,{"stroke-dasharray":Z.join(",")})}else Q(x.node,{"stroke-dasharray":"none"})},b=function(x,E){var R=x.node,H=x.attrs,Y=R.style.visibility;for(var Z in R.style.visibility="hidden",E)if(E[A](Z)){if(!k._availableAttrs[A](Z))continue;var L=E[Z];switch(H[Z]=L,Z){case"blur":x.blur(L);break;case"title":var D=R.getElementsByTagName("title");if(D.length&&(D=D[0]))D.firstChild.nodeValue=L;else{D=Q("title");var ee=k._g.doc.createTextNode(L);D.appendChild(ee),R.appendChild(D)}break;case"href":case"target":var oe=R.parentNode;if(oe.tagName.toLowerCase()!="a"){var fe=Q("a");oe.insertBefore(fe,R),fe.appendChild(R),oe=fe}Z=="target"?oe.setAttributeNS(te,"show",L=="blank"?"new":L):oe.setAttributeNS(te,Z,L);break;case"cursor":R.style.cursor=L;break;case"transform":x.transform(L);break;case"arrow-start":T(x,L);break;case"arrow-end":T(x,L,1);break;case"clip-rect":var ue=B(L).split(N);if(ue.length==4){x.clip&&x.clip.parentNode.parentNode.removeChild(x.clip.parentNode);var qe=Q("clipPath"),rt=Q("rect");qe.id=k.createUUID(),Q(rt,{x:ue[0],y:ue[1],width:ue[2],height:ue[3]}),qe.appendChild(rt),x.paper.defs.appendChild(qe),Q(R,{"clip-path":"url(#"+qe.id+")"}),x.clip=rt}if(!L){var Ve=R.getAttribute("clip-path");if(Ve){var et=k._g.doc.getElementById(Ve.replace(/(^url\(#|\)$)/g,U));et&&et.parentNode.removeChild(et),Q(R,{"clip-path":U}),delete x.clip}}break;case"path":x.type=="path"&&(Q(R,{d:L?H.path=k._pathToAbsolute(L):"M0,0"}),x._.dirty=1,x._.arrows&&("startString"in x._.arrows&&T(x,x._.arrows.startString),"endString"in x._.arrows&&T(x,x._.arrows.endString,1)));break;case"width":if(R.setAttribute(Z,L),x._.dirty=1,!H.fx)break;Z="x",L=H.x;case"x":H.fx&&(L=-H.x-(H.width||0));case"rx":if(Z=="rx"&&x.type=="rect")break;case"cx":R.setAttribute(Z,L),x.pattern&&ke(x),x._.dirty=1;break;case"height":if(R.setAttribute(Z,L),x._.dirty=1,!H.fy)break;Z="y",L=H.y;case"y":H.fy&&(L=-H.y-(H.height||0));case"ry":if(Z=="ry"&&x.type=="rect")break;case"cy":R.setAttribute(Z,L),x.pattern&&ke(x),x._.dirty=1;break;case"r":x.type=="rect"?Q(R,{rx:L,ry:L}):R.setAttribute(Z,L),x._.dirty=1;break;case"src":x.type=="image"&&R.setAttributeNS(te,"href",L);break;case"stroke-width":x._.sx==1&&x._.sy==1||(L/=P($(x._.sx),$(x._.sy))||1),R.setAttribute(Z,L),H["stroke-dasharray"]&&p(x,H["stroke-dasharray"],E),x._.arrows&&("startString"in x._.arrows&&T(x,x._.arrows.startString),"endString"in x._.arrows&&T(x,x._.arrows.endString,1));break;case"stroke-dasharray":p(x,L,E);break;case"fill":var mt=B(L).match(k._ISURL);if(mt){qe=Q("pattern");var Ye=Q("image");qe.id=k.createUUID(),Q(qe,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),Q(Ye,{x:0,y:0,"xlink:href":mt[1]}),qe.appendChild(Ye),function(Et){k._preload(mt[1],function(){var Le=this.offsetWidth,Oe=this.offsetHeight;Q(Et,{width:Le,height:Oe}),Q(Ye,{width:Le,height:Oe})})}(qe),x.paper.defs.appendChild(qe),Q(R,{fill:"url(#"+qe.id+")"}),x.pattern=qe,x.pattern&&ke(x);break}var We=k.getRGB(L);if(We.error){if((x.type=="circle"||x.type=="ellipse"||B(L).charAt()!="r")&&ve(x,L)){if("opacity"in H||"fill-opacity"in H){var Xe=k._g.doc.getElementById(R.getAttribute("fill").replace(/^url\(#|\)$/g,U));if(Xe){var Ge=Xe.getElementsByTagName("stop");Q(Ge[Ge.length-1],{"stop-opacity":("opacity"in H?H.opacity:1)*("fill-opacity"in H?H["fill-opacity"]:1)})}}H.gradient=L,H.fill="none";break}}else delete E.gradient,delete H.gradient,!k.is(H.opacity,"undefined")&&k.is(E.opacity,"undefined")&&Q(R,{opacity:H.opacity}),!k.is(H["fill-opacity"],"undefined")&&k.is(E["fill-opacity"],"undefined")&&Q(R,{"fill-opacity":H["fill-opacity"]});We[A]("opacity")&&Q(R,{"fill-opacity":We.opacity>1?We.opacity/100:We.opacity});case"stroke":We=k.getRGB(L),R.setAttribute(Z,We.hex),Z=="stroke"&&We[A]("opacity")&&Q(R,{"stroke-opacity":We.opacity>1?We.opacity/100:We.opacity}),Z=="stroke"&&x._.arrows&&("startString"in x._.arrows&&T(x,x._.arrows.startString),"endString"in x._.arrows&&T(x,x._.arrows.endString,1));break;case"gradient":(x.type=="circle"||x.type=="ellipse"||B(L).charAt()!="r")&&ve(x,L);break;case"opacity":H.gradient&&!H[A]("stroke-opacity")&&Q(R,{"stroke-opacity":L>1?L/100:L});case"fill-opacity":if(H.gradient){(Xe=k._g.doc.getElementById(R.getAttribute("fill").replace(/^url\(#|\)$/g,U)))&&(Ge=Xe.getElementsByTagName("stop"),Q(Ge[Ge.length-1],{"stop-opacity":L}));break}default:Z=="font-size"&&(L=j(L,10)+"px");var nt=Z.replace(/(\-.)/g,function(Et){return Et.substring(1).toUpperCase()});R.style[nt]=L,x._.dirty=1,R.setAttribute(Z,L)}}e(x,E),R.style.visibility=Y},e=function(x,E){if(x.type=="text"&&(E[A]("text")||E[A]("font")||E[A]("font-size")||E[A]("x")||E[A]("y"))){var R=x.attrs,H=x.node,Y=H.firstChild?j(k._g.doc.defaultView.getComputedStyle(H.firstChild,U).getPropertyValue("font-size"),10):10;if(E[A]("text")){for(R.text=E.text;H.firstChild;)H.removeChild(H.firstChild);for(var Z,L=B(E.text).split(`
 `),D=[],ee=0,oe=L.length;ee<oe;ee++)Z=Q("tspan"),ee&&Q(Z,{dy:1.2*Y,x:R.x}),Z.appendChild(k._g.doc.createTextNode(L[ee])),H.appendChild(Z),D[ee]=Z}else for(ee=0,oe=(D=H.getElementsByTagName("tspan")).length;ee<oe;ee++)ee?Q(D[ee],{dy:1.2*Y,x:R.x}):Q(D[0],{dy:0});Q(H,{x:R.x,y:R.y}),x._.dirty=1;var fe=x._getBBox(),ue=R.y-(fe.y+fe.height/2);ue&&k.is(ue,"finite")&&Q(D[0],{dy:ue})}},c=function(x){return x.parentNode&&x.parentNode.tagName.toLowerCase()==="a"?x.parentNode:x},y=function(x,E){this[0]=this.node=x,x.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),x.raphaelid=this.id,this.matrix=k.matrix(),this.realPath=null,this.paper=E,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!E.bottom&&(E.bottom=this),this.prev=E.top,E.top&&(E.top.next=this),E.top=this,this.next=null},w=k.el;y.prototype=w,w.constructor=y,k._engine.path=function(x,E){var R=Q("path");E.canvas&&E.canvas.appendChild(R);var H=new y(R,E);return H.type="path",b(H,{fill:"none",stroke:"#000",path:x}),H},w.rotate=function(x,E,R){if(this.removed)return this;if((x=B(x).split(N)).length-1&&(E=M(x[1]),R=M(x[2])),x=M(x[0]),R==null&&(E=R),E==null||R==null){var H=this.getBBox(1);E=H.x+H.width/2,R=H.y+H.height/2}return this.transform(this._.transform.concat([["r",x,E,R]])),this},w.scale=function(x,E,R,H){if(this.removed)return this;if((x=B(x).split(N)).length-1&&(E=M(x[1]),R=M(x[2]),H=M(x[3])),x=M(x[0]),E==null&&(E=x),H==null&&(R=H),R==null||H==null)var Y=this.getBBox(1);return R=R??Y.x+Y.width/2,H=H??Y.y+Y.height/2,this.transform(this._.transform.concat([["s",x,E,R,H]])),this},w.translate=function(x,E){return this.removed?this:((x=B(x).split(N)).length-1&&(E=M(x[1])),x=M(x[0])||0,E=+E||0,this.transform(this._.transform.concat([["t",x,E]])),this)},w.transform=function(x){var E=this._;if(x==null)return E.transform;if(k._extractTransform(this,x),this.clip&&Q(this.clip,{transform:this.matrix.invert()}),this.pattern&&ke(this),this.node&&Q(this.node,{transform:this.matrix}),E.sx!=1||E.sy!=1){var R=this.attrs[A]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":R})}return this},w.hide=function(){return this.removed||(this.node.style.display="none"),this},w.show=function(){return this.removed||(this.node.style.display=""),this},w.remove=function(){var x=c(this.node);if(!this.removed&&x.parentNode){var E=this.paper;for(var R in E.__set__&&E.__set__.exclude(this),F.unbind("raphael.*.*."+this.id),this.gradient&&E.defs.removeChild(this.gradient),k._tear(this,E),x.parentNode.removeChild(x),this.removeData(),this)this[R]=typeof this[R]=="function"?k._removedFactory(R):null;this.removed=!0}},w._getBBox=function(){if(this.node.style.display=="none"){this.show();var x=!0}var E,R=!1;this.paper.canvas.parentElement?E=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(E=this.paper.canvas.parentNode.style),E&&E.display=="none"&&(R=!0,E.display="");var H={};try{H=this.node.getBBox()}catch{H={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{H=H||{},R&&(E.display="none")}return x&&this.hide(),H},w.attr=function(x,E){if(this.removed)return this;if(x==null){var R={};for(var H in this.attrs)this.attrs[A](H)&&(R[H]=this.attrs[H]);return R.gradient&&R.fill=="none"&&(R.fill=R.gradient)&&delete R.gradient,R.transform=this._.transform,R}if(E==null&&k.is(x,"string")){if(x=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(x=="transform")return this._.transform;for(var Y=x.split(N),Z={},L=0,D=Y.length;L<D;L++)(x=Y[L])in this.attrs?Z[x]=this.attrs[x]:k.is(this.paper.customAttributes[x],"function")?Z[x]=this.paper.customAttributes[x].def:Z[x]=k._availableAttrs[x];return D-1?Z:Z[Y[0]]}if(E==null&&k.is(x,"array")){for(Z={},L=0,D=x.length;L<D;L++)Z[x[L]]=this.attr(x[L]);return Z}if(E!=null){var ee={};ee[x]=E}else x!=null&&k.is(x,"object")&&(ee=x);for(var oe in ee)F("raphael.attr."+oe+"."+this.id,this,ee[oe]);for(oe in this.paper.customAttributes)if(this.paper.customAttributes[A](oe)&&ee[A](oe)&&k.is(this.paper.customAttributes[oe],"function")){var fe=this.paper.customAttributes[oe].apply(this,[].concat(ee[oe]));for(var ue in this.attrs[oe]=ee[oe],fe)fe[A](ue)&&(ee[ue]=fe[ue])}return b(this,ee),this},w.toFront=function(){if(this.removed)return this;var x=c(this.node);x.parentNode.appendChild(x);var E=this.paper;return E.top!=this&&k._tofront(this,E),this},w.toBack=function(){if(this.removed)return this;var x=c(this.node),E=x.parentNode;return E.insertBefore(x,E.firstChild),k._toback(this,this.paper),this.paper,this},w.insertAfter=function(x){if(this.removed||!x)return this;var E=c(this.node),R=c(x.node||x[x.length-1].node);return R.nextSibling?R.parentNode.insertBefore(E,R.nextSibling):R.parentNode.appendChild(E),k._insertafter(this,x,this.paper),this},w.insertBefore=function(x){if(this.removed||!x)return this;var E=c(this.node),R=c(x.node||x[0].node);return R.parentNode.insertBefore(E,R),k._insertbefore(this,x,this.paper),this},w.blur=function(x){var E=this;if(+x!=0){var R=Q("filter"),H=Q("feGaussianBlur");E.attrs.blur=x,R.id=k.createUUID(),Q(H,{stdDeviation:+x||1.5}),R.appendChild(H),E.paper.defs.appendChild(R),E._blur=R,Q(E.node,{filter:"url(#"+R.id+")"})}else E._blur&&(E._blur.parentNode.removeChild(E._blur),delete E._blur,delete E.attrs.blur),E.node.removeAttribute("filter");return E},k._engine.circle=function(x,E,R,H){var Y=Q("circle");x.canvas&&x.canvas.appendChild(Y);var Z=new y(Y,x);return Z.attrs={cx:E,cy:R,r:H,fill:"none",stroke:"#000"},Z.type="circle",Q(Y,Z.attrs),Z},k._engine.rect=function(x,E,R,H,Y,Z){var L=Q("rect");x.canvas&&x.canvas.appendChild(L);var D=new y(L,x);return D.attrs={x:E,y:R,width:H,height:Y,rx:Z||0,ry:Z||0,fill:"none",stroke:"#000"},D.type="rect",Q(L,D.attrs),D},k._engine.ellipse=function(x,E,R,H,Y){var Z=Q("ellipse");x.canvas&&x.canvas.appendChild(Z);var L=new y(Z,x);return L.attrs={cx:E,cy:R,rx:H,ry:Y,fill:"none",stroke:"#000"},L.type="ellipse",Q(Z,L.attrs),L},k._engine.image=function(x,E,R,H,Y,Z){var L=Q("image");Q(L,{x:R,y:H,width:Y,height:Z,preserveAspectRatio:"none"}),L.setAttributeNS(te,"href",E),x.canvas&&x.canvas.appendChild(L);var D=new y(L,x);return D.attrs={x:R,y:H,width:Y,height:Z,src:E},D.type="image",D},k._engine.text=function(x,E,R,H){var Y=Q("text");x.canvas&&x.canvas.appendChild(Y);var Z=new y(Y,x);return Z.attrs={x:E,y:R,"text-anchor":"middle",text:H,"font-family":k._availableAttrs["font-family"],"font-size":k._availableAttrs["font-size"],stroke:"none",fill:"#000"},Z.type="text",b(Z,Z.attrs),Z},k._engine.setSize=function(x,E){return this.width=x||this.width,this.height=E||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},k._engine.create=function(){var x=k._getContainer.apply(0,arguments),E=x&&x.container;if(!E)throw new Error("SVG container not found.");var R,H=x.x,Y=x.y,Z=x.width,L=x.height,D=Q("svg"),ee="overflow:hidden;";return H=H||0,Y=Y||0,Q(D,{height:L=L||342,version:1.1,width:Z=Z||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),E==1?(D.style.cssText=ee+"position:absolute;left:"+H+"px;top:"+Y+"px",k._g.doc.body.appendChild(D),R=1):(D.style.cssText=ee+"position:relative",E.firstChild?E.insertBefore(D,E.firstChild):E.appendChild(D)),(E=new k._Paper).width=Z,E.height=L,E.canvas=D,E.clear(),E._left=E._top=0,R&&(E.renderfix=function(){}),E.renderfix(),E},k._engine.setViewBox=function(x,E,R,H,Y){F("raphael.setViewBox",this,this._viewBox,[x,E,R,H,Y]);var Z,L,D=this.getSize(),ee=P(R/D.width,H/D.height),oe=this.top,fe=Y?"xMidYMid meet":"xMinYMin";for(x==null?(this._vbSize&&(ee=1),delete this._vbSize,Z="0 0 "+this.width+J+this.height):(this._vbSize=ee,Z=x+J+E+J+R+J+H),Q(this.canvas,{viewBox:Z,preserveAspectRatio:fe});ee&&oe;)L="stroke-width"in oe.attrs?oe.attrs["stroke-width"]:1,oe.attr({"stroke-width":L}),oe._.dirty=1,oe._.dirtyT=1,oe=oe.prev;return this._viewBox=[x,E,R,H,!!Y],this},k.prototype.renderfix=function(){var x,E=this.canvas,R=E.style;try{x=E.getScreenCTM()||E.createSVGMatrix()}catch{x=E.createSVGMatrix()}var H=-x.e%1,Y=-x.f%1;(H||Y)&&(H&&(this._left=(this._left+H)%1,R.left=this._left+"px"),Y&&(this._top=(this._top+Y)%1,R.top=this._top+"px"))},k.prototype.clear=function(){k.eve("raphael.clear",this);for(var x=this.canvas;x.firstChild;)x.removeChild(x.firstChild);this.bottom=this.top=null,(this.desc=Q("desc")).appendChild(k._g.doc.createTextNode("Created with Raphaël "+k.version)),x.appendChild(this.desc),x.appendChild(this.defs=Q("defs"))},k.prototype.remove=function(){for(var x in F("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[x]=typeof this[x]=="function"?k._removedFactory(x):null};var v=k.st;for(var o in w)w[A](o)&&!v[A](o)&&(v[o]=function(x){return function(){var E=arguments;return this.forEach(function(R){R[x].apply(R,E)})}}(o))}}).apply(d,h))===void 0||(l.exports=S)},function(l,d,m){var h,S;h=[m(0)],(S=(function(k){if(!k||k.vml){var A="hasOwnProperty",B=String,M=parseFloat,j=Math,I=j.round,P=j.max,$=j.min,z=j.abs,N=/[, ]+/,F=k.eve,U=" ",J="",te={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},se=/([clmz]),?([^clmz]*)/gi,de=/ progid:\S+Blur\([^\)]+\)/g,Q=/-?[^,\s-]+/g,ve="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",he=21600,ke={path:1,rect:1,image:1},T={circle:1,ellipse:1},u=function(E,R,H){var Y=k.matrix();return Y.rotate(-E,.5,.5),{dx:Y.x(R,H),dy:Y.y(R,H)}},p=function(E,R,H,Y,Z,L){var D=E._,ee=E.matrix,oe=D.fillpos,fe=E.node,ue=fe.style,qe=1,rt="",Ve=he/R,et=he/H;if(ue.visibility="hidden",R&&H){if(fe.coordsize=z(Ve)+U+z(et),ue.rotation=L*(R*H<0?-1:1),L){var mt=u(L,Y,Z);Y=mt.dx,Z=mt.dy}if(R<0&&(rt+="x"),H<0&&(rt+=" y")&&(qe=-1),ue.flip=rt,fe.coordorigin=Y*-Ve+U+Z*-et,oe||D.fillsize){var Ye=fe.getElementsByTagName("fill");Ye=Ye&&Ye[0],fe.removeChild(Ye),oe&&(mt=u(L,ee.x(oe[0],oe[1]),ee.y(oe[0],oe[1])),Ye.position=mt.dx*qe+U+mt.dy*qe),D.fillsize&&(Ye.size=D.fillsize[0]*z(R)+U+D.fillsize[1]*z(H)),fe.appendChild(Ye)}ue.visibility="visible"}};k.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
@@ -773,5 +773,5 @@
 `,B(j),B(M.body),B(`\r
 `)}),B("--"+k.boundary+"--"),k.request.postambleCRLF&&B(`\r
 `),A},m.prototype.onRequest=function(h){var S=this,k=S.isChunked(h),A=h.data||h;S.setHeaders(k),S.chunked=k,S.body=S.build(A,k)},multipart.Multipart=m,multipart}var redirect={},hasRequiredRedirect;function requireRedirect(){if(hasRequiredRedirect)return redirect;hasRequiredRedirect=1;var t=require$$2$2,n=/^https?:/;function l(d){this.request=d,this.followRedirect=!0,this.followRedirects=!0,this.followAllRedirects=!1,this.followOriginalHttpMethod=!1,this.allowRedirect=function(){return!0},this.maxRedirects=10,this.redirects=[],this.redirectsFollowed=0,this.removeRefererHeader=!1}return l.prototype.onRequest=function(d){var m=this;d.maxRedirects!==void 0&&(m.maxRedirects=d.maxRedirects),typeof d.followRedirect=="function"&&(m.allowRedirect=d.followRedirect),d.followRedirect!==void 0&&(m.followRedirects=!!d.followRedirect),d.followAllRedirects!==void 0&&(m.followAllRedirects=d.followAllRedirects),(m.followRedirects||m.followAllRedirects)&&(m.redirects=m.redirects||[]),d.removeRefererHeader!==void 0&&(m.removeRefererHeader=d.removeRefererHeader),d.followOriginalHttpMethod!==void 0&&(m.followOriginalHttpMethod=d.followOriginalHttpMethod)},l.prototype.redirectTo=function(d){var m=this,h=m.request,S=null;if(d.statusCode>=300&&d.statusCode<400&&d.caseless.has("location")){var k=d.caseless.get("location");if(h.debug("redirect",k),m.followAllRedirects)S=k;else if(m.followRedirects)switch(h.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:S=k;break}}else if(d.statusCode===401){var A=h._auth.onResponse(d);A&&(h.setHeader("authorization",A),S=h.uri)}return S},l.prototype.onResponse=function(d){var m=this,h=m.request,S=m.redirectTo(d);if(!S||!m.allowRedirect.call(h,d))return!1;if(h.debug("redirect to",S),d.resume&&d.resume(),m.redirectsFollowed>=m.maxRedirects)return h.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+h.uri.href)),!1;m.redirectsFollowed+=1,n.test(S)||(S=t.resolve(h.uri.href,S));var k=h.uri;return h.uri=t.parse(S),h.uri.protocol!==k.protocol&&delete h.agent,m.redirects.push({statusCode:d.statusCode,redirectUri:S}),m.followAllRedirects&&h.method!=="HEAD"&&d.statusCode!==401&&d.statusCode!==307&&(h.method=m.followOriginalHttpMethod?h.method:"GET"),delete h.src,delete h.req,delete h._started,d.statusCode!==401&&d.statusCode!==307&&(delete h.body,delete h._form,h.headers&&(h.removeHeader("host"),h.removeHeader("content-type"),h.removeHeader("content-length"),h.uri.hostname!==h.originalHost.split(":")[0]&&h.removeHeader("authorization"))),m.removeRefererHeader||h.setHeader("referer",k.href),h.emit("redirect"),h.init(),!0},redirect.Redirect=l,redirect}var tunnel={},tunnelAgent={},hasRequiredTunnelAgent;function requireTunnelAgent(){if(hasRequiredTunnelAgent)return tunnelAgent;hasRequiredTunnelAgent=1;var t=require$$1$5,n=requireStreamHttp(),l=requireHttpsBrowserify(),d=requireEvents(),m=requireAssert$1(),h=util$6,S=safeBufferExports$1.Buffer;tunnelAgent.httpOverHttp=k,tunnelAgent.httpsOverHttp=A,tunnelAgent.httpOverHttps=B,tunnelAgent.httpsOverHttps=M;function k(z){var N=new j(z);return N.request=n.request,N}function A(z){var N=new j(z);return N.request=n.request,N.createSocket=I,N.defaultPort=443,N}function B(z){var N=new j(z);return N.request=l.request,N}function M(z){var N=new j(z);return N.request=l.request,N.createSocket=I,N.defaultPort=443,N}function j(z){var N=this;N.options=z||{},N.proxyOptions=N.options.proxy||{},N.maxSockets=N.options.maxSockets||n.Agent.defaultMaxSockets,N.requests=[],N.sockets=[],N.on("free",function(U,J,te){for(var se=0,de=N.requests.length;se<de;++se){var Q=N.requests[se];if(Q.host===J&&Q.port===te){N.requests.splice(se,1),Q.request.onSocket(U);return}}U.destroy(),N.removeSocket(U)})}h.inherits(j,d.EventEmitter),j.prototype.addRequest=function(N,F){var U=this;if(typeof F=="string"&&(F={host:F,port:arguments[2],path:arguments[3]}),U.sockets.length>=this.maxSockets){U.requests.push({host:F.host,port:F.port,request:N});return}U.createConnection({host:F.host,port:F.port,request:N})},j.prototype.createConnection=function(N){var F=this;F.createSocket(N,function(U){U.on("free",J),U.on("close",te),U.on("agentRemove",te),N.request.onSocket(U);function J(){F.emit("free",U,N.host,N.port)}function te(se){F.removeSocket(U),U.removeListener("free",J),U.removeListener("close",te),U.removeListener("agentRemove",te)}})},j.prototype.createSocket=function(N,F){var U=this,J={};U.sockets.push(J);var te=P({},U.proxyOptions,{method:"CONNECT",path:N.host+":"+N.port,agent:!1});te.proxyAuth&&(te.headers=te.headers||{},te.headers["Proxy-Authorization"]="Basic "+S.from(te.proxyAuth).toString("base64")),$("making CONNECT request");var se=U.request(te);se.useChunkedEncodingByDefault=!1,se.once("response",de),se.once("upgrade",Q),se.once("connect",ve),se.once("error",he),se.end();function de(ke){ke.upgrade=!0}function Q(ke,T,u){process$1.nextTick(function(){ve(ke,T,u)})}function ve(ke,T,u){if(se.removeAllListeners(),T.removeAllListeners(),ke.statusCode===200)m.equal(u.length,0),$("tunneling connection has established"),U.sockets[U.sockets.indexOf(J)]=T,F(T);else{$("tunneling socket could not be established, statusCode=%d",ke.statusCode);var p=new Error("tunneling socket could not be established, statusCode="+ke.statusCode);p.code="ECONNRESET",N.request.emit("error",p),U.removeSocket(J)}}function he(ke){se.removeAllListeners(),$(`tunneling socket could not be established, cause=%s
-`,ke.message,ke.stack);var T=new Error("tunneling socket could not be established, cause="+ke.message);T.code="ECONNRESET",N.request.emit("error",T),U.removeSocket(J)}},j.prototype.removeSocket=function(N){var F=this.sockets.indexOf(N);if(F!==-1){this.sockets.splice(F,1);var U=this.requests.shift();U&&this.createConnection(U)}};function I(z,N){var F=this;j.prototype.createSocket.call(F,z,function(U){var J=t.connect(0,P({},F.options,{servername:z.host,socket:U}));F.sockets[F.sockets.indexOf(U)]=J,N(J)})}function P(z){for(var N=1,F=arguments.length;N<F;++N){var U=arguments[N];if(typeof U=="object")for(var J=Object.keys(U),te=0,se=J.length;te<se;++te){var de=J[te];U[de]!==void 0&&(z[de]=U[de])}}return z}var $;return process$1.env.NODE_DEBUG&&/\btunnel\b/.test(process$1.env.NODE_DEBUG)?$=function(){var z=Array.prototype.slice.call(arguments);typeof z[0]=="string"?z[0]="TUNNEL: "+z[0]:z.unshift("TUNNEL:"),console.error.apply(console,z)}:$=function(){},tunnelAgent.debug=$,tunnelAgent}var hasRequiredTunnel;function requireTunnel(){if(hasRequiredTunnel)return tunnel;hasRequiredTunnel=1;var t=require$$2$2,n=requireTunnelAgent(),l=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],d=["proxy-authorization"];function m(M){var j=M.port,I=M.protocol,P=M.hostname+":";return j?P+=j:I==="https:"?P+="443":P+="80",P}function h(M,j){var I=j.reduce(function(P,$){return P[$.toLowerCase()]=!0,P},{});return Object.keys(M).filter(function(P){return I[P.toLowerCase()]}).reduce(function(P,$){return P[$]=M[$],P},{})}function S(M,j){var I=M.proxy,P={proxy:{host:I.hostname,port:+I.port,proxyAuth:I.auth,headers:j},headers:M.headers,ca:M.ca,cert:M.cert,key:M.key,passphrase:M.passphrase,pfx:M.pfx,ciphers:M.ciphers,rejectUnauthorized:M.rejectUnauthorized,secureOptions:M.secureOptions,secureProtocol:M.secureProtocol};return P}function k(M,j){var I=M.protocol==="https:"?"https":"http",P=j.protocol==="https:"?"Https":"Http";return[I,P].join("Over")}function A(M){var j=M.uri,I=M.proxy,P=k(j,I);return n[P]}function B(M){this.request=M,this.proxyHeaderWhiteList=l,this.proxyHeaderExclusiveList=[],typeof M.tunnel<"u"&&(this.tunnelOverride=M.tunnel)}return B.prototype.isEnabled=function(){var M=this,j=M.request;return typeof M.tunnelOverride<"u"?M.tunnelOverride:j.uri.protocol==="https:"},B.prototype.setup=function(M){var j=this,I=j.request;if(M=M||{},typeof I.proxy=="string"&&(I.proxy=t.parse(I.proxy)),!I.proxy||!I.tunnel)return!1;M.proxyHeaderWhiteList&&(j.proxyHeaderWhiteList=M.proxyHeaderWhiteList),M.proxyHeaderExclusiveList&&(j.proxyHeaderExclusiveList=M.proxyHeaderExclusiveList);var P=j.proxyHeaderExclusiveList.concat(d),$=j.proxyHeaderWhiteList.concat(P),z=h(I.headers,$);z.host=m(I.uri),P.forEach(I.removeHeader,I);var N=A(I),F=S(I,z);return I.agent=N(F),!0},B.defaultProxyHeaderWhiteList=l,B.defaultProxyHeaderExclusiveList=d,tunnel.Tunnel=B,tunnel}var performanceNow={exports:{}},hasRequiredPerformanceNow;function requirePerformanceNow(){return hasRequiredPerformanceNow||(hasRequiredPerformanceNow=1,(function(){var t,n,l,d,m,h;typeof performance<"u"&&performance!==null&&performance.now?performanceNow.exports=function(){return performance.now()}:typeof process$1<"u"&&process$1!==null&&process$1.hrtime?(performanceNow.exports=function(){return(t()-m)/1e6},n=process$1.hrtime,t=function(){var S;return S=n(),S[0]*1e9+S[1]},d=t(),h=process$1.uptime()*1e9,m=d-h):Date.now?(performanceNow.exports=function(){return Date.now()-l},l=Date.now()):(performanceNow.exports=function(){return new Date().getTime()-l},l=new Date().getTime())}).call(commonjsGlobal)),performanceNow.exports}var request$2,hasRequiredRequest;function requireRequest(){if(hasRequiredRequest)return request$2;hasRequiredRequest=1;var t=requireStreamHttp(),n=requireHttpsBrowserify(),l=require$$2$2,d=util$6,m=requireStreamBrowserify(),h=requireLib$5(),S=requireAwsSign2(),k=requireAws4(),A=requireLib$2(),B=requireMimeTypes(),M=requireCaseless(),j=requireForeverAgent(),I=requireBrowser(),P=extend$1,$=requireIsstream(),z=requireIsTypedarray().strict,N=helpers$1,F=cookies$1,U=requireGetProxyFromURI(),J=requireQuerystring().Querystring,te=requireHar().Har,se=requireAuth().Auth,de=requireOauth().OAuth,Q=requireHawk(),ve=requireMultipart().Multipart,he=requireRedirect().Redirect,ke=requireTunnel().Tunnel,T=requirePerformanceNow(),u=safeBufferExports$1.Buffer,p=N.safeStringify,b=N.isReadStream,e=N.toBase64,c=N.defer,y=N.copy,w=N.version,v=F.jar(),o={};function x(L,D){var ee={};for(var oe in D){var fe=L.indexOf(oe)===-1;fe&&(ee[oe]=D[oe])}return ee}function E(L,D){var ee={};for(var oe in D){var fe=L.indexOf(oe)!==-1,ue=typeof D[oe]=="function";fe&&ue||(ee[oe]=D[oe])}return ee}function R(){var L=this;return{uri:L.uri,method:L.method,headers:L.headers}}function H(){var L=this;return{statusCode:L.statusCode,body:L.body,headers:L.headers,request:R.call(L.request)}}function Y(L){var D=this;L.har&&(D._har=new te(D),L=D._har.options(L)),m.Stream.call(D);var ee=Object.keys(Y.prototype),oe=x(ee,L);P(D,oe),L=E(ee,L),D.readable=!0,D.writable=!0,L.method&&(D.explicitMethod=!0),D._qs=new J(D),D._auth=new se(D),D._oauth=new de(D),D._multipart=new ve(D),D._redirect=new he(D),D._tunnel=new ke(D),D.init(L)}d.inherits(Y,m.Stream),Y.debug=process$1.env.NODE_DEBUG&&/\brequest\b/.test(process$1.env.NODE_DEBUG);function Z(){Y.debug&&console.error("REQUEST %s",d.format.apply(d,arguments))}return Y.prototype.debug=Z,Y.prototype.init=function(L){var D=this;L||(L={}),D.headers=D.headers?y(D.headers):{};for(var ee in D.headers)typeof D.headers[ee]>"u"&&delete D.headers[ee];if(M.httpify(D,D.headers),D.method||(D.method=L.method||"GET"),D.localAddress||(D.localAddress=L.localAddress),D._qs.init(L),Z(L),!D.pool&&D.pool!==!1&&(D.pool=o),D.dests=D.dests||[],D.__isRequestRequest=!0,!D._callback&&D.callback&&(D._callback=D.callback,D.callback=function(){D._callbackCalled||(D._callbackCalled=!0,D._callback.apply(D,arguments))},D.on("error",D.callback.bind()),D.on("complete",D.callback.bind(D,null))),!D.uri&&D.url&&(D.uri=D.url,delete D.url),D.baseUrl){if(typeof D.baseUrl!="string")return D.emit("error",new Error("options.baseUrl must be a string"));if(typeof D.uri!="string")return D.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(D.uri.indexOf("//")===0||D.uri.indexOf("://")!==-1)return D.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var oe=D.baseUrl.lastIndexOf("/")===D.baseUrl.length-1,fe=D.uri.indexOf("/")===0;oe&&fe?D.uri=D.baseUrl+D.uri.slice(1):oe||fe?D.uri=D.baseUrl+D.uri:D.uri===""?D.uri=D.baseUrl:D.uri=D.baseUrl+"/"+D.uri,delete D.baseUrl}if(!D.uri)return D.emit("error",new Error("options.uri is a required argument"));if(typeof D.uri=="string"&&(D.uri=l.parse(D.uri)),D.uri.href||(D.uri.href=l.format(D.uri)),D.uri.protocol==="unix:")return D.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(D.uri.host==="unix"&&D.enableUnixSocket(),D.strictSSL===!1&&(D.rejectUnauthorized=!1),D.uri.pathname||(D.uri.pathname="/"),!(D.uri.host||D.uri.hostname&&D.uri.port)&&!D.uri.isUnix){var ue=l.format(D.uri),qe='Invalid URI "'+ue+'"';return Object.keys(L).length===0&&(qe+=". This can be caused by a crappy redirection."),D.abort(),D.emit("error",new Error(qe))}if(D.hasOwnProperty("proxy")||(D.proxy=U(D.uri)),D.tunnel=D._tunnel.isEnabled(),D.proxy&&D._tunnel.setup(L),D._redirect.onRequest(L),D.setHost=!1,!D.hasHeader("host")){var rt=D.originalHostHeaderName||"host";D.setHeader(rt,D.uri.host),D.uri.port&&(D.uri.port==="80"&&D.uri.protocol==="http:"||D.uri.port==="443"&&D.uri.protocol==="https:")&&D.setHeader(rt,D.uri.hostname),D.setHost=!0}if(D.jar(D._jar||L.jar),D.uri.port||(D.uri.protocol==="http:"?D.uri.port=80:D.uri.protocol==="https:"&&(D.uri.port=443)),D.proxy&&!D.tunnel?(D.port=D.proxy.port,D.host=D.proxy.hostname):(D.port=D.uri.port,D.host=D.uri.hostname),L.form&&D.form(L.form),L.formData){var Ve=L.formData,et=D.form(),mt=function(Lt,xe){xe&&xe.hasOwnProperty("value")&&xe.hasOwnProperty("options")?et.append(Lt,xe.value,xe.options):et.append(Lt,xe)};for(var Ye in Ve)if(Ve.hasOwnProperty(Ye)){var We=Ve[Ye];if(We instanceof Array)for(var Xe=0;Xe<We.length;Xe++)mt(Ye,We[Xe]);else mt(Ye,We)}}if(L.qs&&D.qs(L.qs),D.uri.path?D.path=D.uri.path:D.path=D.uri.pathname+(D.uri.search||""),D.path.length===0&&(D.path="/"),L.aws&&D.aws(L.aws),L.hawk&&D.hawk(L.hawk),L.httpSignature&&D.httpSignature(L.httpSignature),L.auth&&(Object.prototype.hasOwnProperty.call(L.auth,"username")&&(L.auth.user=L.auth.username),Object.prototype.hasOwnProperty.call(L.auth,"password")&&(L.auth.pass=L.auth.password),D.auth(L.auth.user,L.auth.pass,L.auth.sendImmediately,L.auth.bearer)),D.gzip&&!D.hasHeader("accept-encoding")&&D.setHeader("accept-encoding","gzip, deflate"),D.uri.auth&&!D.hasHeader("authorization")){var Ge=D.uri.auth.split(":").map(function(Lt){return D._qs.unescape(Lt)});D.auth(Ge[0],Ge.slice(1).join(":"),!0)}if(!D.tunnel&&D.proxy&&D.proxy.auth&&!D.hasHeader("proxy-authorization")){var nt=D.proxy.auth.split(":").map(function(Lt){return D._qs.unescape(Lt)}),Et="Basic "+e(nt.join(":"));D.setHeader("proxy-authorization",Et)}D.proxy&&!D.tunnel&&(D.path=D.uri.protocol+"//"+D.uri.host+D.path),L.json&&D.json(L.json),L.multipart&&D.multipart(L.multipart),L.time&&(D.timing=!0,D.elapsedTime=D.elapsedTime||0);function Le(){if(z(D.body)&&(D.body=u.from(D.body)),!D.hasHeader("content-length")){var Lt;typeof D.body=="string"?Lt=u.byteLength(D.body):Array.isArray(D.body)?Lt=D.body.reduce(function(xe,X){return xe+X.length},0):Lt=D.body.length,Lt?D.setHeader("content-length",Lt):D.emit("error",new Error("Argument error, options.body."))}}D.body&&!$(D.body)&&Le(),L.oauth?D.oauth(L.oauth):D._oauth.params&&D.hasHeader("authorization")&&D.oauth(D._oauth.params);var Oe=D.proxy&&!D.tunnel?D.proxy.protocol:D.uri.protocol,$t={"http:":t,"https:":n},dt=D.httpModules||{};if(D.httpModule=dt[Oe]||$t[Oe],!D.httpModule)return D.emit("error",new Error("Invalid protocol: "+Oe));if(L.ca&&(D.ca=L.ca),!D.agent)if(L.agentOptions&&(D.agentOptions=L.agentOptions),L.agentClass)D.agentClass=L.agentClass;else if(L.forever){var gt=w();gt.major===0&&gt.minor<=10?D.agentClass=Oe==="http:"?j:j.SSL:(D.agentClass=D.httpModule.Agent,D.agentOptions=D.agentOptions||{},D.agentOptions.keepAlive=!0)}else D.agentClass=D.httpModule.Agent;D.pool===!1?D.agent=!1:D.agent=D.agent||D.getNewAgent(),D.on("pipe",function(Lt){if(D.ntick&&D._started&&D.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),D.src=Lt,b(Lt))D.hasHeader("content-type")||D.setHeader("content-type",B.lookup(Lt.path));else{if(Lt.headers)for(var xe in Lt.headers)D.hasHeader(xe)||D.setHeader(xe,Lt.headers[xe]);D._json&&!D.hasHeader("content-type")&&D.setHeader("content-type","application/json"),Lt.method&&!D.explicitMethod&&(D.method=Lt.method)}}),c(function(){if(!D._aborted){var Lt=function(){if(D._form&&(D._auth.hasAuth?D._auth.hasAuth&&D._auth.sentAuth&&D._form.pipe(D):D._form.pipe(D)),D._multipart&&D._multipart.chunked&&D._multipart.body.pipe(D),D.body)$(D.body)?D.body.pipe(D):(Le(),Array.isArray(D.body)?D.body.forEach(function(xe){D.write(xe)}):D.write(D.body),D.end());else if(D.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),D.requestBodyStream.pipe(D);else if(!D.src){if(D._auth.hasAuth&&!D._auth.sentAuth){D.end();return}D.method!=="GET"&&typeof D.method<"u"&&D.setHeader("content-length",0),D.end()}};D._form&&!D.hasHeader("content-length")?(D.setHeader(D._form.getHeaders(),!0),D._form.getLength(function(xe,X){!xe&&!isNaN(X)&&D.setHeader("content-length",X),Lt()})):Lt(),D.ntick=!0}})},Y.prototype.getNewAgent=function(){var L=this,D=L.agentClass,ee={};if(L.agentOptions)for(var oe in L.agentOptions)ee[oe]=L.agentOptions[oe];L.ca&&(ee.ca=L.ca),L.ciphers&&(ee.ciphers=L.ciphers),L.secureProtocol&&(ee.secureProtocol=L.secureProtocol),L.secureOptions&&(ee.secureOptions=L.secureOptions),typeof L.rejectUnauthorized<"u"&&(ee.rejectUnauthorized=L.rejectUnauthorized),L.cert&&L.key&&(ee.key=L.key,ee.cert=L.cert),L.pfx&&(ee.pfx=L.pfx),L.passphrase&&(ee.passphrase=L.passphrase);var fe="";D!==L.httpModule.Agent&&(fe+=D.name);var ue=L.proxy;typeof ue=="string"&&(ue=l.parse(ue));var qe=ue&&ue.protocol==="https:"||this.uri.protocol==="https:";return qe&&(ee.ca&&(fe&&(fe+=":"),fe+=ee.ca),typeof ee.rejectUnauthorized<"u"&&(fe&&(fe+=":"),fe+=ee.rejectUnauthorized),ee.cert&&(fe&&(fe+=":"),fe+=ee.cert.toString("ascii")+ee.key.toString("ascii")),ee.pfx&&(fe&&(fe+=":"),fe+=ee.pfx.toString("ascii")),ee.ciphers&&(fe&&(fe+=":"),fe+=ee.ciphers),ee.secureProtocol&&(fe&&(fe+=":"),fe+=ee.secureProtocol),ee.secureOptions&&(fe&&(fe+=":"),fe+=ee.secureOptions)),L.pool===o&&!fe&&Object.keys(ee).length===0&&L.httpModule.globalAgent?L.httpModule.globalAgent:(fe=L.uri.protocol+fe,L.pool[fe]||(L.pool[fe]=new D(ee),L.pool.maxSockets&&(L.pool[fe].maxSockets=L.pool.maxSockets)),L.pool[fe])},Y.prototype.start=function(){var L=this;if(L.timing)var D=new Date().getTime(),ee=T();if(!L._aborted){L._started=!0,L.method=L.method||"GET",L.href=L.uri.href,L.src&&L.src.stat&&L.src.stat.size&&!L.hasHeader("content-length")&&L.setHeader("content-length",L.src.stat.size),L._aws&&L.aws(L._aws,!0);var oe=y(L);delete oe.auth,Z("make request",L.uri.href),delete oe.timeout;try{L.req=L.httpModule.request(oe)}catch(ue){L.emit("error",ue);return}L.timing&&(L.startTime=D,L.startTimeNow=ee,L.timings={});var fe;L.timeout&&!L.timeoutTimer&&(L.timeout<0?fe=0:typeof L.timeout=="number"&&isFinite(L.timeout)&&(fe=L.timeout)),L.req.on("response",L.onRequestResponse.bind(L)),L.req.on("error",L.onRequestError.bind(L)),L.req.on("drain",function(){L.emit("drain")}),L.req.on("socket",function(ue){var qe=ue._connecting||ue.connecting;if(L.timing&&(L.timings.socket=T()-L.startTimeNow,qe)){var rt=function(){L.timings.lookup=T()-L.startTimeNow},Ve=function(){L.timings.connect=T()-L.startTimeNow};ue.once("lookup",rt),ue.once("connect",Ve),L.req.once("error",function(){ue.removeListener("lookup",rt),ue.removeListener("connect",Ve)})}var et=function(){L.req.setTimeout(fe,function(){if(L.req){L.abort();var Ye=new Error("ESOCKETTIMEDOUT");Ye.code="ESOCKETTIMEDOUT",Ye.connect=!1,L.emit("error",Ye)}})};if(fe!==void 0)if(qe){var mt=function(){ue.removeListener("connect",mt),L.clearTimeout(),et()};ue.on("connect",mt),L.req.on("error",function(Ye){ue.removeListener("connect",mt)}),L.timeoutTimer=setTimeout(function(){ue.removeListener("connect",mt),L.abort();var Ye=new Error("ETIMEDOUT");Ye.code="ETIMEDOUT",Ye.connect=!0,L.emit("error",Ye)},fe)}else et();L.emit("socket",ue)}),L.emit("request",L.req)}},Y.prototype.onRequestError=function(L){var D=this;if(!D._aborted){if(D.req&&D.req._reusedSocket&&L.code==="ECONNRESET"&&D.agent.addRequestNoreuse){D.agent={addRequest:D.agent.addRequestNoreuse.bind(D.agent)},D.start(),D.req.end();return}D.clearTimeout(),D.emit("error",L)}},Y.prototype.onRequestResponse=function(L){var D=this;if(D.timing&&(D.timings.response=T()-D.startTimeNow),Z("onRequestResponse",D.uri.href,L.statusCode,L.headers),L.on("end",function(){D.timing&&(D.timings.end=T()-D.startTimeNow,L.timingStart=D.startTime,D.timings.socket||(D.timings.socket=0),D.timings.lookup||(D.timings.lookup=D.timings.socket),D.timings.connect||(D.timings.connect=D.timings.lookup),D.timings.response||(D.timings.response=D.timings.connect),Z("elapsed time",D.timings.end),D.elapsedTime+=Math.round(D.timings.end),L.elapsedTime=D.elapsedTime,L.timings=D.timings,L.timingPhases={wait:D.timings.socket,dns:D.timings.lookup-D.timings.socket,tcp:D.timings.connect-D.timings.lookup,firstByte:D.timings.response-D.timings.connect,download:D.timings.end-D.timings.response,total:D.timings.end}),Z("response end",D.uri.href,L.statusCode,L.headers)}),D._aborted){Z("aborted",D.uri.href),L.resume();return}if(D.response=L,L.request=D,L.toJSON=H,D.httpModule===n&&D.strictSSL&&(!L.hasOwnProperty("socket")||!L.socket.authorized)){Z("strict ssl error",D.uri.href);var ee=L.hasOwnProperty("socket")?L.socket.authorizationError:D.uri.href+" does not support SSL";D.emit("error",new Error("SSL Error: "+ee));return}D.originalHost=D.getHeader("host"),D.originalHostHeaderName||(D.originalHostHeaderName=D.hasHeader("host")),D.setHost&&D.removeHeader("host"),D.clearTimeout();var oe=D._jar&&D._jar.setCookie?D._jar:v,fe=function(mt){try{oe.setCookie(mt,D.uri.href,{ignoreError:!0})}catch(Ye){D.emit("error",Ye)}};if(L.caseless=M(L.headers),L.caseless.has("set-cookie")&&!D._disableCookies){var ue=L.caseless.has("set-cookie");Array.isArray(L.headers[ue])?L.headers[ue].forEach(fe):fe(L.headers[ue])}if(!D._redirect.onResponse(L)){{L.on("close",function(){D._ended||D.response.emit("end")}),L.once("end",function(){D._ended=!0});var qe=function(mt){return D.method==="HEAD"||mt>=100&&mt<200||mt===204||mt===304},rt;if(D.gzip&&!qe(L.statusCode)){var Ve=L.headers["content-encoding"]||"identity";Ve=Ve.trim().toLowerCase();var et={flush:h.Z_SYNC_FLUSH,finishFlush:h.Z_SYNC_FLUSH};Ve==="gzip"?(rt=h.createGunzip(et),L.pipe(rt)):Ve==="deflate"?(rt=h.createInflate(et),L.pipe(rt)):(Ve!=="identity"&&Z("ignoring unrecognized Content-Encoding "+Ve),rt=L)}else rt=L;D.encoding&&(D.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):rt.setEncoding(D.encoding)),D._paused&&rt.pause(),D.responseContent=rt,D.emit("response",L),D.dests.forEach(function(mt){D.pipeDest(mt)}),rt.on("data",function(mt){D.timing&&!D.responseStarted&&(D.responseStartTime=new Date().getTime(),L.responseStartTime=D.responseStartTime),D._destdata=!0,D.emit("data",mt)}),rt.once("end",function(mt){D.emit("end",mt)}),rt.on("error",function(mt){D.emit("error",mt)}),rt.on("close",function(){D.emit("close")}),D.callback?D.readResponseBody(L):D.on("end",function(){if(D._aborted){Z("aborted",D.uri.href);return}D.emit("complete",L)})}Z("finish init function",D.uri.href)}},Y.prototype.readResponseBody=function(L){var D=this;Z("reading response's body");var ee=[],oe=0,fe=[];D.on("data",function(ue){u.isBuffer(ue)?ue.length&&(oe+=ue.length,ee.push(ue)):fe.push(ue)}),D.on("end",function(){if(Z("end event",D.uri.href),D._aborted){Z("aborted",D.uri.href),ee=[],oe=0;return}if(oe?(Z("has body",D.uri.href,oe),L.body=u.concat(ee,oe),D.encoding!==null&&(L.body=L.body.toString(D.encoding)),ee=[],oe=0):fe.length&&(D.encoding==="utf8"&&fe[0].length>0&&fe[0][0]==="\uFEFF"&&(fe[0]=fe[0].substring(1)),L.body=fe.join("")),D._json)try{L.body=JSON.parse(L.body,D._jsonReviver)}catch{Z("invalid JSON received",D.uri.href)}Z("emitting complete",D.uri.href),typeof L.body>"u"&&!D._json&&(L.body=D.encoding===null?u.alloc(0):""),D.emit("complete",L,L.body)})},Y.prototype.abort=function(){var L=this;L._aborted=!0,L.req?L.req.abort():L.response&&L.response.destroy(),L.clearTimeout(),L.emit("abort")},Y.prototype.pipeDest=function(L){var D=this,ee=D.response;if(L.headers&&!L.headersSent){if(ee.caseless.has("content-type")){var oe=ee.caseless.has("content-type");L.setHeader?L.setHeader(oe,ee.headers[oe]):L.headers[oe]=ee.headers[oe]}if(ee.caseless.has("content-length")){var fe=ee.caseless.has("content-length");L.setHeader?L.setHeader(fe,ee.headers[fe]):L.headers[fe]=ee.headers[fe]}}if(L.setHeader&&!L.headersSent){for(var ue in ee.headers)(!D.gzip||ue!=="content-encoding")&&L.setHeader(ue,ee.headers[ue]);L.statusCode=ee.statusCode}D.pipefilter&&D.pipefilter(ee,L)},Y.prototype.qs=function(L,D){var ee=this,oe;!D&&ee.uri.query?oe=ee._qs.parse(ee.uri.query):oe={};for(var fe in L)oe[fe]=L[fe];var ue=ee._qs.stringify(oe);return ue===""||(ee.uri=l.parse(ee.uri.href.split("?")[0]+"?"+ue),ee.url=ee.uri,ee.path=ee.uri.path,ee.uri.host==="unix"&&ee.enableUnixSocket()),ee},Y.prototype.form=function(L){var D=this;return L?(/^application\/x-www-form-urlencoded\b/.test(D.getHeader("content-type"))||D.setHeader("content-type","application/x-www-form-urlencoded"),D.body=typeof L=="string"?D._qs.rfc3986(L.toString("utf8")):D._qs.stringify(L).toString("utf8"),D):(D._form=new I,D._form.on("error",function(ee){ee.message="form-data: "+ee.message,D.emit("error",ee),D.abort()}),D._form)},Y.prototype.multipart=function(L){var D=this;return D._multipart.onRequest(L),D._multipart.chunked||(D.body=D._multipart.body),D},Y.prototype.json=function(L){var D=this;return D.hasHeader("accept")||D.setHeader("accept","application/json"),typeof D.jsonReplacer=="function"&&(D._jsonReplacer=D.jsonReplacer),D._json=!0,typeof L=="boolean"?D.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(D.getHeader("content-type"))?D.body=D._qs.rfc3986(D.body):D.body=p(D.body,D._jsonReplacer),D.hasHeader("content-type")||D.setHeader("content-type","application/json")):(D.body=p(L,D._jsonReplacer),D.hasHeader("content-type")||D.setHeader("content-type","application/json")),typeof D.jsonReviver=="function"&&(D._jsonReviver=D.jsonReviver),D},Y.prototype.getHeader=function(L,D){var ee=this,oe,fe,ue;return D||(D=ee.headers),Object.keys(D).forEach(function(qe){qe.length===L.length&&(fe=new RegExp(L,"i"),ue=qe.match(fe),ue&&(oe=D[qe]))}),oe},Y.prototype.enableUnixSocket=function(){var L=this.uri.path.split(":"),D=L[0],ee=L[1];this.socketPath=D,this.uri.pathname=ee,this.uri.path=ee,this.uri.host=D,this.uri.hostname=D,this.uri.isUnix=!0},Y.prototype.auth=function(L,D,ee,oe){var fe=this;return fe._auth.onRequest(L,D,ee,oe),fe},Y.prototype.aws=function(L,D){var ee=this;if(!D)return ee._aws=L,ee;if(L.sign_version===4||L.sign_version==="4"){var oe={host:ee.uri.host,path:ee.uri.path,method:ee.method,headers:ee.headers,body:ee.body};L.service&&(oe.service=L.service);var fe=k.sign(oe,{accessKeyId:L.key,secretAccessKey:L.secret,sessionToken:L.session});ee.setHeader("authorization",fe.headers.Authorization),ee.setHeader("x-amz-date",fe.headers["X-Amz-Date"]),fe.headers["X-Amz-Security-Token"]&&ee.setHeader("x-amz-security-token",fe.headers["X-Amz-Security-Token"])}else{var ue=new Date;ee.setHeader("date",ue.toUTCString());var qe={key:L.key,secret:L.secret,verb:ee.method.toUpperCase(),date:ue,contentType:ee.getHeader("content-type")||"",md5:ee.getHeader("content-md5")||"",amazonHeaders:S.canonicalizeHeaders(ee.headers)},rt=ee.uri.path;L.bucket&&rt?qe.resource="/"+L.bucket+rt:L.bucket&&!rt?qe.resource="/"+L.bucket:!L.bucket&&rt?qe.resource=rt:!L.bucket&&!rt&&(qe.resource="/"),qe.resource=S.canonicalizeResource(qe.resource),ee.setHeader("authorization",S.authorization(qe))}return ee},Y.prototype.httpSignature=function(L){var D=this;return A.signRequest({getHeader:function(ee){return D.getHeader(ee,D.headers)},setHeader:function(ee,oe){D.setHeader(ee,oe)},method:D.method,path:D.path},L),Z("httpSignature authorization",D.getHeader("authorization")),D},Y.prototype.hawk=function(L){var D=this;D.setHeader("Authorization",Q.header(D.uri,D.method,L))},Y.prototype.oauth=function(L){var D=this;return D._oauth.onRequest(L),D},Y.prototype.jar=function(L){var D=this,ee;if(D._redirect.redirectsFollowed===0&&(D.originalCookieHeader=D.getHeader("cookie")),!L)ee=!1,D._disableCookies=!0;else{var oe=L.getCookieString?L:v,fe=D.uri.href;oe&&(ee=oe.getCookieString(fe))}return ee&&ee.length&&(D.originalCookieHeader?D.setHeader("cookie",D.originalCookieHeader+"; "+ee):D.setHeader("cookie",ee)),D._jar=L,D},Y.prototype.pipe=function(L,D){var ee=this;if(ee.response)if(ee._destdata)ee.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(ee._ended)ee.emit("error",new Error("You cannot pipe after the response has been ended."));else return m.Stream.prototype.pipe.call(ee,L,D),ee.pipeDest(L),L;else return ee.dests.push(L),m.Stream.prototype.pipe.call(ee,L,D),L},Y.prototype.write=function(){var L=this;if(!L._aborted&&(L._started||L.start(),L.req))return L.req.write.apply(L.req,arguments)},Y.prototype.end=function(L){var D=this;D._aborted||(L&&D.write(L),D._started||D.start(),D.req&&D.req.end())},Y.prototype.pause=function(){var L=this;L.responseContent?L.responseContent.pause.apply(L.responseContent,arguments):L._paused=!0},Y.prototype.resume=function(){var L=this;L.responseContent?L.responseContent.resume.apply(L.responseContent,arguments):L._paused=!1},Y.prototype.destroy=function(){var L=this;this.clearTimeout(),L._ended?L.response&&L.response.destroy():L.end()},Y.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)},Y.defaultProxyHeaderWhiteList=ke.defaultProxyHeaderWhiteList.slice(),Y.defaultProxyHeaderExclusiveList=ke.defaultProxyHeaderExclusiveList.slice(),Y.prototype.toJSON=R,request$2=Y,request$2}var extend=extend$1,cookies=cookies$1,helpers=helpers$1,paramsHaveRequestBody=helpers.paramsHaveRequestBody;function initParams(t,n,l){typeof n=="function"&&(l=n);var d={};return n!==null&&typeof n=="object"?extend(d,n,{uri:t}):typeof t=="string"?extend(d,{uri:t}):extend(d,t),d.callback=l||d.callback,d}function request$1(t,n,l){if(typeof t>"u")throw new Error("undefined is not a valid uri or options object.");var d=initParams(t,n,l);if(d.method==="HEAD"&&paramsHaveRequestBody(d))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new request$1.Request(d)}function verbFunc(t){var n=t.toUpperCase();return function(l,d,m){var h=initParams(l,d,m);return h.method=n,request$1(h,h.callback)}}request$1.get=verbFunc("get"),request$1.head=verbFunc("head"),request$1.options=verbFunc("options"),request$1.post=verbFunc("post"),request$1.put=verbFunc("put"),request$1.patch=verbFunc("patch"),request$1.del=verbFunc("delete"),request$1.delete=verbFunc("delete"),request$1.jar=function(t){return cookies.jar(t)},request$1.cookie=function(t){return cookies.parse(t)};function wrapRequestMethod(t,n,l,d){return function(m,h,S){var k=initParams(m,h,S),A={};return extend(!0,A,n,k),A.pool=k.pool||n.pool,d&&(A.method=d.toUpperCase()),typeof l=="function"&&(t=l),t(A,A.callback)}}request$1.defaults=function(t,n){var l=this;t=t||{},typeof t=="function"&&(n=t,t={});var d=wrapRequestMethod(l,t,n),m=["get","head","post","put","patch","del","delete"];return m.forEach(function(h){d[h]=wrapRequestMethod(l[h],t,n,h)}),d.cookie=wrapRequestMethod(l.cookie,t,n),d.jar=l.jar,d.defaults=l.defaults,d},request$1.forever=function(t,n){var l={};return n&&extend(l,n),t&&(l.agentOptions=t),l.forever=!0,request$1.defaults(l)};var request_1=request$1;request$1.Request=requireRequest(),request$1.initParams=initParams,Object.defineProperty(request$1,"debug",{enumerable:!0,get:function(){return request$1.Request.debug},set:function(t){request$1.Request.debug=t}});var sha1$1={exports:{}},crypt={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(l,d){return l<<d|l>>>32-d},rotr:function(l,d){return l<<32-d|l>>>d},endian:function(l){if(l.constructor==Number)return n.rotl(l,8)&16711935|n.rotl(l,24)&4278255360;for(var d=0;d<l.length;d++)l[d]=n.endian(l[d]);return l},randomBytes:function(l){for(var d=[];l>0;l--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(l){for(var d=[],m=0,h=0;m<l.length;m++,h+=8)d[h>>>5]|=l[m]<<24-h%32;return d},wordsToBytes:function(l){for(var d=[],m=0;m<l.length*32;m+=8)d.push(l[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(l){for(var d=[],m=0;m<l.length;m++)d.push((l[m]>>>4).toString(16)),d.push((l[m]&15).toString(16));return d.join("")},hexToBytes:function(l){for(var d=[],m=0;m<l.length;m+=2)d.push(parseInt(l.substr(m,2),16));return d},bytesToBase64:function(l){for(var d=[],m=0;m<l.length;m+=3)for(var h=l[m]<<16|l[m+1]<<8|l[m+2],S=0;S<4;S++)m*8+S*6<=l.length*8?d.push(t.charAt(h>>>6*(3-S)&63)):d.push("=");return d.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,h=0;m<l.length;h=++m%4)h!=0&&d.push((t.indexOf(l.charAt(m-1))&Math.pow(2,-2*h+8)-1)<<h*2|t.indexOf(l.charAt(m))>>>6-h*2);return d}};crypt.exports=n})();var cryptExports=crypt.exports,charenc={utf8:{stringToBytes:function(t){return charenc.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(charenc.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var n=[],l=0;l<t.length;l++)n.push(t.charCodeAt(l)&255);return n},bytesToString:function(t){for(var n=[],l=0;l<t.length;l++)n.push(String.fromCharCode(t[l]));return n.join("")}}},charenc_1=charenc;(function(){var t=cryptExports,n=charenc_1.utf8,l=charenc_1.bin,d=function(h){h.constructor==String?h=n.stringToBytes(h):typeof Buffer$C<"u"&&typeof Buffer$C.isBuffer=="function"&&Buffer$C.isBuffer(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||(h=h.toString());var S=t.bytesToWords(h),k=h.length*8,A=[],B=1732584193,M=-271733879,j=-1732584194,I=271733878,P=-1009589776;S[k>>5]|=128<<24-k%32,S[(k+64>>>9<<4)+15]=k;for(var $=0;$<S.length;$+=16){for(var z=B,N=M,F=j,U=I,J=P,te=0;te<80;te++){if(te<16)A[te]=S[$+te];else{var se=A[te-3]^A[te-8]^A[te-14]^A[te-16];A[te]=se<<1|se>>>31}var de=(B<<5|B>>>27)+P+(A[te]>>>0)+(te<20?(M&j|~M&I)+1518500249:te<40?(M^j^I)+1859775393:te<60?(M&j|M&I|j&I)-1894007588:(M^j^I)-899497514);P=I,I=j,j=M<<30|M>>>2,M=B,B=de}B+=z,M+=N,j+=F,I+=U,P+=J}return[B,M,j,I,P]},m=function(h,S){var k=t.wordsToBytes(d(h));return S&&S.asBytes?k:S&&S.asString?l.bytesToString(k):t.bytesToHex(k)};m._blocksize=16,m._digestsize=20,sha1$1.exports=m})();var sha1Exports=sha1$1.exports,php2js$1={rawurlencode:function(t){return t=(t+"").toString(),encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/\+/g," ")},http_build_query:function(t,n,l){var d,m,h=[],S=function(A,B,M){var j,I=[];if(B===!0?B="1":B===!1&&(B="0"),B!=null)if(typeof B=="object"){for(j in B)B[j]!=null&&I.push(S(A+"["+j+"]",B[j],M));return I.join(M)}else{if(typeof B!="function")return php2js$1.urlencode(A)+"="+php2js$1.urlencode(B);throw new Error("There was an error processing for http_build_query().")}else return""};l||(l="&");for(m in t){d=t[m],n&&!isNaN(m)&&(m=String(n)+m);var k=S(m,d,l);k!==""&&h.push(k)}return h.join(l)},urlencode:function(t){return t=(t+"").toString(),encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}},php2js_1=php2js$1,request=request_1,sha1=sha1Exports,php2js=php2js_1,APIConfig={url:"http://api.jwplatform.com/v1/videos/create",key:"",secret:"",format:"json",kit:"php-1.4"},jwplayer$1={makeRequest:function(t,n){request({url:t,method:"GET",headers:{"Content-Type":"MyContentType","Custom-Header":"Custom Value"}},n)},setArguments:function(t,n){t.api_nonce=Math.floor(Math.random()*1e8),t.api_timestamp=Math.floor(Date.now()/1e3),t.api_key=APIConfig.key,t.api_format=APIConfig.format,t.api_kit=APIConfig.kit;var l={};Object.keys(t).sort().forEach(function(h){l[h]=t[h]});var d="";Object.keys(l).forEach(function(h){d!=""&&(d+="&"),d+=php2js.rawurlencode(h)+"="+php2js.rawurlencode(l[h])}),t.api_signature=sha1(d+APIConfig.secret);var m=APIConfig.url+"?"+php2js.http_build_query(t,"","&");jwplayer$1.makeRequest(m,n)}},jwplayer_1=jwplayer$1;const JwpPlayerWidget=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l={},d=jwplayer_1.Player(this.$[0]),m=!1,h=!0;typeof this.video>"u"&&(this.video=this.media.video),l.file=this.video,l.primary="flash",l.fallback=!1,l.controls=!1,l.width=this.width,this.height&&(l.height=this.height),this.autostart,this.url_transform&&(l.file=this.url_transform(l.file));var S=this.media;S.on("setcurrenttime",function(A){m=h,d.seek(A/1e3)}),S.on("setvolume",function(A){d.setVolume(Math.floor(A*100)),S.volume=A}),S.on("setmuted",function(A){d.setMute(A),S.muted=A}),S.on("setplay",function(){d.play(!0),S.paused=!1}),S.on("setpause",function(){d.pause(!0),S.paused=!0});function k(){S.muted=d.getMute(),S.volume=d.getVolume()/100}l.events={onReady:function(){k(),S.currentTime=new t.Model.Time(1e3*d.getPosition()||0),S.trigger("loadedmetadata")},onTime:function(A){m?(d.pause(!0),m=!1):h&&d.getState()==="PLAYING"&&(h=!1,S.trigger("play")),S.trigger("timeupdate",new t.Model.Time(A.position*1e3))},onPlay:function(){m||(h=!1,S.trigger("play"))},onPause:function(){h=!0,S.trigger("pause")},onSeek:function(){S.trigger("seeked")},onMute:function(A){S.muted=A.mute,S.trigger("volumechange")},onVolume:function(A){S.volume=A.volume/100,S.trigger("volumechange")}},d=d.setup(l),this.jwplayer=d}},Cr(n,"defaults",{}),n},latestAnnotationStyles={},LatestAnnotation=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}importUsers(){if(!this.source.users_data){this.usernames=Array();var l=this,d=this.getWidgetAnnotations(),m="";return d.forEach(function(h){l.usernames.indexOf(h.creator)==-1&&l.usernames.push(h.creator)}),this.usernames.forEach(function(h){m+=h+","}),m=m.substring(0,m.length-1),_url=mustache.render(this.api_users_endpoint,{usernames_list_string:encodeURIComponent(m),usernames_list_length:this.usernames.length}),jQuery.ajax({async:!1,url:_url,type:"GET",success:function(h){l.source.users_data=h.objects},error:function(h,S,k){console.log(h),console.log(S),console.log(k)}})}}draw(){var l=this;this.renderTemplate(),this.annotationContainer_$=this.$.find(".Ldt-LatestAnnotation"),this.selectable_annotations&&(this.onMdpEvent("AnnotationsList.refresh",function(){l.getWidgetAnnotations().forEach(function(d){d.off("click"),d.on("click",function(){var m={},h="",S=this.source.users_data.filter(function(k){return k.username==d.creator});S.length==0?m.username=d.creator:m=S[0],h=l.make_name_string_function(m),_html=mustache.render(l.annotationTemplate,{annotation_created:d.created.toLocaleDateString()+", "+d.created.toLocaleTimeString(),annotation_creator:h,annotation_title:d.title,annotation_content:d.description,copy_and_edit_button:l.copy_and_edit_button,button_text:l.l10n.copy_and_edit}),l.annotationContainer_$.html(_html),l.selectedAnnotation=!0})})}),this.segments=l.source.getAnnotationsByTypeTitle(this.segments_annotation_type),this.segments.forEach(function(d){d.on("click",function(){l.selectedAnnotation=!1})}),this.currentSegment=!1),this.onMediaEvent("timeupdate",function(){l.refresh()}),this.onMediaEvent("settimerange",function(d){l.refresh(d)}),this.starts_hidden?(this.visible=!0,this.hide()):(this.visible=!1,this.show()),this.selectedAnnotation=!1,this.player.trigger("AnnotationsList.refresh"),this.refresh()}refresh(l){l=typeof l<"u"?l:!1;var d=this;if(this.hide_without_segment){if(!l&&!this.media.getTimeRange()){var m=this.media.getCurrentTime(),h=this.segments.filter(function($){return m>=$.begin&&m<=$.end});h.length==0?(this.currentSegment=!1,this.selectedAnnotation=!1):this.currentSegment=h[0]}else{var S=l?l[0]:this.media.getTimeRange()[0],k=l?l[1]:this.media.getTimeRange()[1];if(!this.currentSegment||this.currentSegment.begin!=S||this.currentSegment.end!=k){var h=this.segments.filter(function(z){return z.begin==S&&z.end==k});h.length>0&&(this.selectedAnnotation=!1,this.currentSegment=h[0])}}this.currentSegment?this.visible||this.show():this.visible&&this.hide()}if(this.visible&&!this.selectedAnnotation){var A=this.getWidgetAnnotations();this.filter_by_segment&&(this.currentSegment?A=A.filter(function($){return _annotationTime=($.begin+$.end)/2,d.currentSegment.begin<=_annotationTime&&d.currentSegment.end>=_annotationTime}):A=A.filter(function($){return!1})),A=A.sortBy(function($){return $.created});var B=!1,M="",j="",I={};if(A.length!=0)B=A.pop(),_users=this.source.users_data.filter(function($){return $.username==B.creator}),_users.length==0?I.username=B.creator:I=_users[0],j=this.make_name_string_function(I),M=mustache.render(this.annotationTemplate,{annotation_created:B.created.toLocaleDateString()+", "+B.created.toLocaleTimeString(),annotation_creator:j,annotation_title:B.title,annotation_content:B.description,copy_and_edit_button:this.copy_and_edit_button,button_text:this.l10n.copy_and_edit});else{var P=this.l10n.empty;this.empty_message&&(P=this.empty_message),M="<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-NoAnnotation'>"+P+"</div>"}this.annotationContainer_$.html(M)}this.copy_and_edit_button&&(this.copyAndEditButton_$=this.$.find(".Ldt-LatestAnnotation-CopyEditButton"),this.copyAndEditButton_$.click(this.functionWrapper("copy_and_edit")))}copy_and_edit(){this.player.trigger("CreateAnnotation.show"),this.hide_annotations_list&&this.player.trigger("AnnotationsList.hide"),annotationText=jQuery(".Ldt-LatestAnnotation-Content").get(0).innerHTML,jQuery(".Ldt-CreateAnnotation-Description").removeClass("empty"),jQuery(".Ldt-CreateAnnotation-Description").val(annotationText)}hide(){this.visible&&(this.visible=!1,this.$.find(".Ldt-LatestAnnotation-header").hide(),this.annotationContainer_$.hide())}show(){this.visible||(this.visible=!0,this.$.find(".Ldt-LatestAnnotation-header").show(),this.annotationContainer_$.show())}},Cr(n,"defaults",{pre_draw_callback:function(){return this.importUsers()},from_user:!1,filter_by_segment:!1,segments_annotation_type:"chap",hide_without_segment:!1,annotation_type:"contribution",show_only_annotation_from_user:!1,copy_and_edit_button:!1,hide_annotations_list:!1,selectable_annotations:!1,empty_message:!1,starts_hidden:!1,show_header:!1,custom_header:!1,make_name_string_function:function(l){return l.username?l.username:"Anonymous"}}),Cr(n,"messages",{fr:{copy_and_edit:"Copier et Editer",empty:"Aucune annotation à afficher",header:"Dernière annotation"},en:{copy_and_edit:"Copy and Edit",empty:"No annotation to display",header:"Last annotation"}}),Cr(n,"template","{{#show_header}}<p class='Ldt-LatestAnnotation-header'>{{#custom_header}}{{custom_header}}{{/custom_header}}{{^custom_header}}{{l10n.header}}{{/custom_header}}</p>{{/show_header}}<div class='Ldt-LatestAnnotation'></div>"),Cr(n,"annotationTemplate","<div class='Ldt-LatestAnnotation-Box'>{{#copy_and_edit_button}}<div class='Ldt-LatestAnnotation-CopyEditButton'>{{button_text}}</div>{{/copy_and_edit_button}}<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-CreationDate'>{{{annotation_created}}}</div><div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Title'>{{{annotation_creator}}}{{#annotation_title}}: {{{annotation_title}}}{{/annotation_title}}</div><div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Content'>{{{annotation_content}}}</div></div>"),n},mashupPlayerStyles={},MashupPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.is_mashup=!0}draw(){var l=this,d=this.media,m=null,h=null,S,k,A=0,B=!1,M,j,I=d.getMedias();d.paused=!this.autostart&&!this.autoplay;function P(){A>=d.duration&&(d.paused||(d.paused=!0,d.trigger("pause")),A=0);var F=d.getAnnotationAtTime(A);if(typeof F>"u"){m&&(m.pause(),d.paused||(d.paused=!0,d.trigger("pause")));return}if(F!==h){h=F,S=h.annotation.begin.milliseconds,k=h.annotation.end.milliseconds,j=S-h.begin.milliseconds,m=h.getMedia();for(var U=0;U<I.length;U++)I[U].id!==m.id?(l.split_screen||I[U].hide(),I[U].pause()):I[U].show();var J=[],te=d.getAnnotations().filter(function(se){return se.begin>=h.end&&se.getMedia()!==m});_$1(te).each(function(se){var de=se.getMedia();_$1(J).indexOf(de.id)===-1&&(J.push(de.id),de.setCurrentTime(se.annotation.begin.getSeconds()),de.seeking=!0)})}m.setCurrentTime(A+j),m.seeking=!0,d.paused||(m.play(),B=!0,M.show()),d.trigger("timeupdate",new t.Model.Time(A))}this.height||(this.height=Math.floor(this.width/this.aspect_ratio),this.$.css({height:this.height})),this.$.css({background:this.background});var $=Math.ceil(Math.sqrt(I.length)),z=this.split_screen?this.width/$:this.width,N=this.split_screen?this.height/$:this.height;_$1(I).each(function(F,U){var J=jQuery('<div class="Ldt-MashupPlayer-Media"><div class="Ldt-MashupPlayer-Subwidget"></div></div>');J.css({top:l.split_screen?N*Math.floor(U/$):0,left:l.split_screen?z*(U%$):0,height:N,width:z,display:l.split_screen?"block":"none"}),l.$.append(J),l.insertSubwidget(J.find(".Ldt-MashupPlayer-Subwidget"),_$1({type:l.player_type,media_id:F.id,height:N,width:z,url_transform:l.url_transform}).extend(l.player_options)),F.loadedMetadata=!1,F.show=function(){J.show()},F.hide=function(){J.hide()},F.on("loadedmetadata",function(){F.loadedMetadata=!0;for(var te=!0,se=0;se<I.length;se++)te=te&&I[se].loadedMetadata;te&&(M.fadeOut(),P(),d.trigger("loadedmetadata"))}),F.on("timeupdate",function(te){!d.paused&&F===m&&!F.seeking&&(te<k?te>=S?A=te-j:(A=S-j,F.setCurrentTime(S)):(A=k-j,F.pause(),P()),d.trigger("timeupdate",new t.Model.Time(A)))}),F.on("seeked",function(){F.seeking=!1,F===m&&B&&(B=!1,M.hide())}),F.on("play",function(){F===m&&d.trigger("play")}),F.on("pause",function(){F===m&&d.trigger("pause")}),F.on("volumechange",function(){d.muted=F.muted,d.volume=F.volume,d.trigger("volumechange")})}),M=jQuery('<div class="Ldt-MashupPlayer-Waiting"></div>'),this.$.append(M),d.on("setcurrenttime",function(F){A=F,P()}),d.on("setvolume",function(F){for(var U=0;U<I.length;U++)I[U].setVolume(F);d.volume=F}),d.on("setmuted",function(F){for(var U=0;U<I.length;U++)I[U].setMuted(F);d.muted=F}),d.on("setplay",function(){d.paused=!1,P()}),d.on("setpause",function(){d.paused=!0,m&&m.pause()}),d.on("loadedmetadata",P)}},Cr(n,"defaults",{aspect_ratio:14/9,split_screen:!1,player_type:"PopcornPlayer",background:"#000000"}),n},Mediafragment=function(t){return class extends t.Widgets.Widget{constructor(n,l){if(super(n,l),this.last_hash_key="",this.last_hash_value="",this.last_extra_key="",this.last_extra_value="",window.onhashchange=this.functionWrapper("goToHash"),typeof window.addEventListener<"u"){var d=this;window.addEventListener("message",function(m){/^#/.test(m.data)&&d.setWindowHash(m.data)})}this.onMdpEvent("Mediafragment.setHashToAnnotation","setHashToAnnotation"),this.blocked=!1}draw(){this.onMediaEvent("setpause","setHashToTime");var n=this;this.getWidgetAnnotations().forEach(function(l){l.on("click",function(){n.setHashToAnnotation(l)})}),this.media.loadedMetadata?this.goToHash():this.onMediaEvent("loadedmetadata","goToHash")}setWindowHash(n){typeof window.history<"u"&&typeof window.history.replaceState<"u"?window.history.replaceState({},"",n):document.location.hash=n}getLastHash(){var n=document.location.hash.replace(/^#/,"").split("&");return n=_$1(n).filter(function(l){return l&&!/^(id|t)=/.test(l)}),this.last_hash_key&&n.push(this.last_hash_key+"="+this.last_hash_value),this.last_extra_key&&n.push(this.last_extra_key+"="+this.last_extra_value),"#"+n.join("&")}goToHash(){if(document.location.hash!==this.getLastHash())for(var n=document.location.hash.replace(/^#/,"").split("&"),l=0;l<n.length;l++){var d=n[l].split("=");if(d[0]=="id"||d[0]=="t"){if(this.last_hash_key=d[0],this.last_hash_value=d[1],this.last_hash_key=="id"){var m=this.source.getElement(this.last_hash_value);if(typeof m<"u")this.media.setCurrentTime(m.begin);else continue}this.last_hash_key=="t"&&this.media.setCurrentTime(1e3*this.last_hash_value);break}}}setHashToAnnotation(n){this.setHash("id",n.id,"t",n.begin/1e3)}setHashToTime(){this.setHash("t",this.media.getCurrentTime().getSeconds())}setHash(n,l,d,m){if(!this.blocked&&(this.last_hash_key!==n||this.last_hash_value!==l)){this.last_hash_key=n,this.last_hash_value=l,this.last_extra_key=d,this.last_extra_value=m;var h=this.getLastHash();this.setWindowHash(h),window.parent!==window&&window.parent.postMessage(h,"*"),this.block()}}unblock(){typeof this.blockTimeout<"u"&&window.clearTimeout(this.blockTimeout),this.blockTimeout=void 0,this.blocked=!1}block(){typeof this.blockTimeout<"u"&&window.clearTimeout(this.blockTimeout),this.blocked=!0,this.blockTimeout=window.setTimeout(this.functionWrapper("unblock"),1500)}}},mediaListStyles={},MediaList=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastMedia=!1}onSearch(l){this.searchString=typeof l<"u"?l:"";var d=this.refresh(!0);this.searchString&&(d?this.player.trigger("search.matchFound"):this.player.trigger("search.noMatchFound"))}draw(){this.$.addClass("Ldt-MediaListWidget"),this.renderTemplate();var l=this;typeof this.media.getMedias=="function"&&this.media.on("enter-annotation",function(d){l.redraw(d.getMedia())}),this.redraw()}getSegments(l){var d=this,m=this.$.width()/l.duration.milliseconds;return this.getWidgetAnnotations().filter(function(h){return h.getMedia().id==l.id}).map(function(h){var S=h.type=h.annotation;return{left:m*S.begin,width:m*(S.end-S.begin),color:typeof S.color<"u"&&S.color?S.color:d.default_color}})}redraw(l){if(typeof l<"u"){this.$.find(".Ldt-MediaList-Other h2").html(this.l10n.other_media),this.$.find(".Ldt-MediaList-NowPlaying").show(),this.$.find(".Ldt-MediaList-Now-Thumbnail").attr("src",l.thumbnail||this.default_thumbnail),this.$.find(".Ldt-MediaList-Now-Title a").html(l.title),this.$.find(".Ldt-MediaList-Now-Description").html(l.description);var d=l.url||mustache.render(this.media_url_template,{media:l.id});this.$.find(".Ldt-MediaList-NowContainer a").attr("href",d);var m=mustache.render(this.mediaViewTemplate,{segments:this.getSegments(l)});this.$.find(".Ldt-MediaList-Now-MediaView").html(m)}else this.$.find(".Ldt-MediaList-Other h2").html(this.l10n.all_media),this.$.find(".Ldt-MediaList-NowPlaying").hide();var h=this,S=this.source.getMedias().filter(function(A){return A.id!==h.lastMedia});if(S.length){this.$.find(".Ldt-MediaList-Other").show();var k=S.map(function(A){return mustache.render(h.mediaTemplate,{thumbnail:A.thumbnail||h.default_thumbnail,url:A.url||mustache.render(h.media_url_template,{media:A.id}),title:A.title,description:A.description,segments:h.getSegments(A)})}).join("");this.$.find(".Ldt-MediaList-OtherList").html(k)}else this.$.find(".Ldt-MediaList-Other").hide()}},Cr(n,"messages",{fr:{now_playing:"Vidéo en cours",all_media:"Toutes les vidéos",other_media:"Autres vidéos"},en:{now_playing:"Now playing",all_media:"All videos",other_media:"Other videos"}}),Cr(n,"defaults",{default_thumbnail:"http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",media_url_template:"http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/",default_color:"#000080"}),Cr(n,"template",'<div class="Ldt-MediaList-NowPlaying"><h2>{{l10n.now_playing}}</h2><hr /><div class="Ldt-MediaList-NowContainer"><div class="Ldt-MediaList-Now-ThumbContainer"><a href="" target="_blank"><img class="Ldt-MediaList-Now-Thumbnail" src="" /></a></div><h3 class="Ldt-MediaList-Now-Title"><a href="" target="_blank"></a></h3><p class="Ldt-MediaList-Now-Description"></p><div class="Ldt-MediaList-Now-MediaView"></div></div></div><div class="Ldt-MediaList-Other"><h2></h2><hr /><ul class="Ldt-MediaList-OtherList"></ul></div>'),Cr(n,"mediaViewTemplate",'<div class="Ldt-MediaList-MediaView-Background"></div>{{#segments}}<div class="Ldt-MediaList-Segment" style="background: {{color}}; left: {{left}}px; width: {{width}}px;"></div>{{/segments}}'),Cr(n,"mediaTemplate",'<li class="Ldt-MediaList-OtherList-li"><div class="Ldt-MediaList-Other-ThumbContainer"><a href="{{url}}" target="_blank"><img class="Ldt-MediaList-Other-Thumbnail" src="{{thumbnail}}" /></a></div><h3 class="Ldt-MediaList-Other-Title"><a href="{{url}}" target="_blank">{{title}}</a></h3><p class="Ldt-MediaList-Other-Description">{{description}}</p><div class="Ldt-MediaList-Other-MediaView">'+MediaList.mediaViewTemplate+"</div></li>"),n},noteTakingStyles={},NoteTaking=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this,d,m=jQuery;l.renderTemplate(),d=l.$.find(".Ldt-NoteTaking-Text");function h(){m(d).val(window.localStorage[l.editable_storage])}function S(){window.localStorage[l.editable_storage]=m(d).val()}window.localStorage[l.editable_storage]&&h(),m.fn.insertAtCaret=function(A){return this.each(function(){if(this.selectionStart!==void 0){var B=this.selectionStart,M=this.selectionEnd,j=this.scrollTop;this.value=this.value.substring(0,B)+A+this.value.substring(M,this.value.length),this.focus(),this.selectionStart=B+A.length,this.selectionEnd=B+A.length,this.scrollTop=j}else this.value+=A,this.focus(),this.value=this.value})};function k(A,B){var M=A.selectionStart;return A.value.substring(M-B,M+B)}m(d).keydown(function(A){if(A.keyCode==13&&(A.ctrlKey||A.metaKey)){A.preventDefault();var B=/\[([\d:]+)\]/.exec(k(d[0],8));B?l.media.setCurrentTime(t.timestamp2ms(B[1])):(m(d).insertAtCaret("["+new t.Model.Time(l.media.getCurrentTime()).toString()+"]"),S())}}).on("input",function(A){console.log("Change"),S()}).on("dblclick",function(A){var B=/\[([\d:]+)\]/.exec(k(d[0],8));B&&(A.preventDefault(),l.media.setCurrentTime(t.timestamp2ms(B[1])))})}},Cr(n,"defaults",{editable_storage:""}),Cr(n,"template",'<textarea class="Ldt-NoteTaking-Text"></textarea>'),n},placeholderPlayerStyles={},PlaceholderPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate();var l=!0,d=0,m=new t.Model.Time(0),h=this.media,S=this.$.find(".Ldt-PlaceholderPlayer");function k(){l||(m=new t.Model.Time(new Date().valueOf()-d),m<=h.duration?(h.trigger("timeupdate",m),setTimeout(k,100)):(m=h.duration,h.pause())),S.text(m.toString(!0))}h.on("setcurrenttime",function(A){d=new Date().valueOf()-A,m=new t.Model.Time(A),h.trigger("seeked"),h.trigger("timeupdate",m),S.text(m.toString(!0))}),h.on("setplay",function(){l=!1,d=new Date().valueOf()-m,h.trigger("play"),k()}),h.on("setpause",function(){l=!0,h.trigger("pause"),k()}),h.trigger("loadedmetadata"),h.trigger("setcurrenttime",0),this.autostart&&h.trigger("setplay")}},Cr(n,"defaults",{autostart:!1}),Cr(n,"template",'<div class="Ldt-PlaceholderPlayer">(loading)</div>'),n},polemicStyles={},Polemic=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}getPolemics(l){return(typeof l>"u"||!l)&&(l=this.default_version),this.polemics.constructor===Array?this.polemics:this.polemics[l]}drawNoStackgraph(l,d){var m=this;if(this.is_stackgraph=!1,l){let S=function(k,A,F,M,j){var I=mustache.render('<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-id:{{id}}, media-id:{{media_id}}, polemic:{{polemic}}, time:{{time}}" polemic-color="{{color}}" tweet-title="{{title}}" annotation-id="{{id}}" style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',{id:j.id,media_id:m.source.currentMedia.id,polemic:F,left:k,top:A,color:M,width:m.element_width-1,height:m.element_height,title:j.title,time:j.begin.toString()}),P=jQuery(I);P.on("mouseover",function(){j.trigger("select")}).on("mouseout",function(){j.trigger("unselect")}).on("click",function(){return j.trigger("click"),!1}),t.attachDndData(P,{title:j.title,description:j.description,image:j.thumbnail,uri:typeof j.url<"u"?j.url:document.location.href.replace(/#.*$/,"")+"#id="+j.id,text:"["+j.begin.toString()+"] "+j.title});for(var $=[],z=j.content&&j.content.polemic_version||m.default_version,N=m.getPolemics(z)||[],F,U,J=0;J<N.length;J++)F=N[J],U=t.Model.regexpFromTextOrArray(F.keywords),U.test(j.description)&&$.push(F.color);j.on("select",function(){m.tooltip&&m.tooltip.show(+Math.floor(k+(m.element_width-1)/2),+A,j.title,$.length>1?$:M),m.$tweets.each(function(){var te=jQuery(this);te.css("opacity",te.attr("annotation-id")==j.id?1:.3)})}),j.on("unselect",function(){m.tooltip&&m.tooltip.hide(),m.$tweets.css("opacity",1)}),j.on("found",function(){P.css({background:m.foundcolor,opacity:1})}),j.on("not-found",function(){P.css({background:M,opacity:.3})}),m.$zone.append(P)};this.height=(2+l)*this.element_height,this.$zone.css({width:this.width+"px",height:this.height+"px",position:"relative"});var h=0;_$1(d).forEach(function(k){var A=m.height;k.annotations.forEach(function(B){A-=m.element_height,S(h,A,"none",m.defaultcolor,B)}),_$1(k.polemicStacks).forEach(function(B){var M=B.polemicDef.color,j=B.polemicDef.name;B.annotations.forEach(function(I){A-=m.element_height,S(h,A,j,M,I)})}),h+=m.element_width}),this.$tweets=this.$.find(".Ldt-Polemic-TweetDiv"),this.source.getAnnotations().on("search-cleared",function(){m.$tweets.each(function(){var k=jQuery(this);k.css({background:k.attr("polemic-color"),opacity:1})})})}else this.$zone.hide()}drawStackgraph(l,d){this.is_stackgraph=!0;var m=this;this.height=(2+this.max_elements)*this.element_height,this.$zone.css({width:this.width+"px",height:this.height+"px",position:"relative"});var h=0,S="",k=this.max_elements*this.element_height/l;function A(B,M,j,I,P,$,z,N){S+=mustache.render('<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-block, media-id={{media_id}}, polemic={{polemic}}, time:{{begin}}" pos-x="{{posx}}" pos-y="{{top}}" annotation-counts="{{nums}}" begin-time="{{begin}}" end-time="{{end}}" style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',{nums:P,posx:Math.floor(B+(m.element_width-1)/2),media_id:m.source.currentMedia.id,polemic:N,left:B,top:M,color:I,width:m.element_width-1,height:j,begin:$,end:z})}_$1(d).forEach(function(B){var M=m.height,j=B.annotations.length+"|"+m.defaultcolor+","+_$1(B.polemicStacks).map(function(P){return P.annotations.length+"|"+P.polemicDef.color}).join(",");if(B.annotations.length){var I=Math.ceil(k*B.annotations.length);M-=I,A(h,M,I,m.defaultcolor,j,B.begin,B.end,"none")}_$1(B.polemicStacks).forEach(function(P){if(P.annotations.length){var $=P.polemicDef.color,z=P.polemicDef.name,N=Math.ceil(k*P.annotations.length);M-=N,A(h,M,N,$,j,B.begin,B.end,z)}}),h+=m.element_width}),this.$zone.append(S),this.$tweets=this.$.find(".Ldt-Polemic-TweetDiv"),this.$tweets.mouseover(function(){var B=jQuery(this),M=B.attr("annotation-counts").split(","),j="<p>"+m.l10n.from_+B.attr("begin-time")+m.l10n._to_+B.attr("end-time")+"</p>";j=_$1.reduce(M,function(I,P){var $=P.split("|");return I+='<div class="Ldt-Tooltip-AltColor" style="background: '+$[1]+'"></div><p>'+$[0]+m.l10n._annotations+"</p>",I},j),m.tooltip&&m.tooltip.show(+B.attr("pos-x"),+B.attr("pos-y"),j)}).mouseout(function(){m.tooltip&&m.tooltip.hide()})}draw(){console.log("LDRAW PoLEMIC"),this.onMediaEvent("timeupdate","onTimeupdate"),this.$zone=jQuery("<div>"),this.$zone.addClass("Ldt-Polemic"),this.$.append(this.$zone),this.$elapsed=jQuery("<div>").css({background:"#cccccc",position:"absolute",top:0,left:0,width:0,height:"100%"}),this.$zone.append(this.$elapsed);for(var l=[],d=Math.floor(this.width/this.element_width),m=this.source.getDuration(),h=0,S=this.getWidgetAnnotations(),k=this,A=0;A<d;A++){var B=new t.Model.Time(A*m/d),M=new t.Model.Time((A+1)*m/d),j=0,I={begin:B.toString(),end:M.toString(),annotations:S.filter(function(P){return P.begin>=B&&P.begin<M}),polemicStacks:{}};I.annotations=I.annotations.filter(function(P){for(var $=P.content&&P.content.polemic_version||k.default_version,z=k.getPolemics($)||[],N,F,U,J,te=!0,se=0;se<z.length;se++)N=z[se],J=t.Model.regexpFromTextOrArray(N.keywords),J.test(P.description)&&(F=$+"_"+N.name,U=I.polemicStacks[F]||(I.polemicStacks[F]={polemicDef:N,annotations:[]}),U.annotations.push(P),te=!1,j++);return te}),j+=I.annotations.length,h=Math.max(h,j),l.push(I)}console.log("SLICES",l,S),h<this.max_elements?this.drawNoStackgraph(h,l):this.drawStackgraph(h,l),this.$position=jQuery("<div>").addClass("Ldt-Polemic-Position"),this.$zone.append(this.$position),this.$zone.on("click",function(P){var $=P.pageX-k.$zone.offset().left;k.media.setCurrentTime(k.media.duration*$/k.width)}),this.$.append('<div class="Ldt-Polemic-Tooltip"></div>'),this.insertSubwidget(this.$.find(".Ldt-Polemic-Tooltip"),{type:"Tooltip",min_x:0,max_x:this.width},"tooltip")}onTimeupdate(l){var d=Math.floor(this.width*l/this.media.duration);this.$elapsed.css({width:d+"px"}),this.$position.css({left:d+"px"})}},Cr(n,"messages",{fr:{from_:"de ",_to_:" à ",_annotations:" annotation(s)"},en:{from_:"from ",_to_:" to ",_annotations:" annotation(s)"}}),Cr(n,"defaults",{element_width:5,element_height:5,max_elements:20,annotation_type:"tweet",defaultcolor:"#585858",foundcolor:"#fc00ff",default_version:"1",polemics:{1:[{name:"OK",keywords:["++"],color:"#1D973D"},{name:"KO",keywords:["--"],color:"#CE0A15"},{name:"REF",keywords:["==","http://"],color:"#C5A62D"},{name:"Q",keywords:["?"],color:"#036AAE"}],2:[{name:"OK",keywords:["++"],color:"#1D973D"},{name:"KO",keywords:["!!"],color:"#CE0A15"},{name:"REF",keywords:["==","http://"],color:"#C5A62D"},{name:"Q",keywords:["?"],color:"#036AAE"}]}}),n},PopcornPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){typeof this.video>"u"&&(this.video=this.media.video),this.url_transform&&(this.video=this.url_transform(this.video));var l=this.video;if(/^(https?:\/\/)?(www\.)?youtube\.com/.test(this.video)){for(var d=this.video.split(/[?&]/),m={},h=1;h<d.length;h++){var S=d[h].split("=");m[S[0]]=decodeURIComponent(S[1])}m.controls=0,m.modestbranding=1,(this.autostart||this.autoplay)&&(m.autoplay=1),l=d[0]+"?"+jQuery.param(m)}var k=global$1.Popcorn.smart("#"+this.container,l);(this.autostart||this.autoplay)&&k.autoplay(!0);var A=this.media;A.on("setcurrenttime",function(M){k.currentTime(M/1e3)}),A.on("setvolume",function(M){k.volume(M),A.volume=M}),A.on("setmuted",function(M){k.muted(M),A.muted=M}),A.on("setplay",function(){k.play()}),A.on("setpause",function(){k.pause()}),A.on("settimerange",function(M){A.timeRange=M;try{(A.getCurrentTime()>M[0]||A.getCurrentTime()<M)&&k.currentTime(M[0]/1e3)}catch{}}),A.on("resettimerange",function(){A.timeRange=!1});function B(){A.muted=k.muted(),A.volume=k.volume()}k.on("loadedmetadata",function(){B(),A.trigger("loadedmetadata"),A.trigger("volumechange")}),k.on("timeupdate",function(){A.trigger("timeupdate",new t.Model.Time(1e3*k.currentTime()))}),k.on("volumechange",function(){B(),A.trigger("volumechange")}),k.on("play",function(M){A.trigger("play")}),k.on("pause",function(){A.trigger("pause")}),k.on("seeked",function(){A.trigger("seeked")})}},Cr(n,"defaults",{}),n},quizStyles={},Quiz=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}update(l){var d=this;if(this.quiz_activated&&this.correct[l.id]!=1&&this.correct[l.id]!=0){d.quiz_displayed=!0,this.media.pause(),this.annotation=l;var m=l.content.data.question,h=l.content.data.answers,S=l.content.data.resource;jQuery(".Ldt-Quiz-Votes").hide(),jQuery(".Ldt-Pause-Add-Question").hide(),jQuery(".Ldt-Quiz-Container .Ldt-Quiz-Title").html(m);var k=0,A=mustache.render('<span class="Ldt-Quiz-Correct-Answer">{{ correctness.0 }}</span> / <span class="Ldt-Quiz-Incorrect-Answer">{{ correctness.1 }}</span>',{correctness:this.globalScore()});jQuery(".Ldt-Quiz-Index").html(mustache.render("Q{{index}}/{{total}}",{index:l.number+1,total:this.totalAmount})),jQuery(".Ldt-Quiz-Score").html(A),this.question=new t.Widgets.UniqueChoiceQuestion(l),this.resource=new t.Widgets.UniqueChoiceQuestion(S),l.content.data.type=="multiple_choice"?(this.question=new t.Widgets.MultipleChoiceQuestion(l),this.resource=new t.Widgets.MultipleChoiceQuestion(S)):l.content.data.type=="unique_choice"&&(this.question=new t.Widgets.UniqueChoiceQuestion(l),this.resource=new t.Widgets.UniqueChoiceQuestion(S));var B="";for(k=0;k<h.length;k++)B+='<div class="quiz-question-block"><p>'+this.question.renderQuizTemplate(h[k],k)+'<span class="quiz-question-label">'+h[k].content+"</span></p></div>";var M="";S!=null&&(M='<div class="quiz-resource-block" id="resource" >'+S+"</div>"),jQuery(".Ldt-Quiz-Questions").html(M+B),jQuery(".Ldt-Quiz-Overlay").fadeIn(),jQuery(".Ldt-Quiz-Submit").fadeIn(),jQuery(".quiz-question-label").click(function(){var j=jQuery(this).siblings("input");j.prop("checked")&&j.prop("type")=="radio"?d.answer():j.prop("checked",!j.prop("checked"))}),jQuery(".Ldt-Quiz-Submit-Skip-Link").click({media:this.media},function(j){d.hide(),d.player.trigger("QuizCreator.skip"),j.data.media.play()})}}hide(){var l=this;jQuery(".Ldt-Quiz-Votes").hide(),jQuery(".Ldt-Quiz-Overlay").hide(),jQuery(".Ldt-Pause-Add-Question").hide(),l.quiz_displayed=!1}answer(){var l=this;function d(j){return(j||"").replace(/\s(\d+:\d+)/,function(I,P){return' <a href="#t='+t.timestamp2ms(P)/1e3+'">'+P+"</a>"})}var m=l.annotation.content.data.answers,h=0,S=0,k=[];l.$.find(".Ldt-Quiz-Question-Check").each(function(j){var I=jQuery(this).is(":checked");k.push(I?1:0);var P=m[h];P.correct&&!I||!P.correct&&I?(S+=1,jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-incorrect-feedback">'+d(P.feedback)+"</div>")):jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-correct-feedback">'+d(P.feedback)+"</div>"),h++}),S?(jQuery(".Ldt-Quiz-Result").html("Mauvaise réponse"),jQuery(".Ldt-Quiz-Result").css({"background-color":"red"}),this.correct[this.annotation.id]=0):(jQuery(".Ldt-Quiz-Result").html("Bonne réponse !"),jQuery(".Ldt-Quiz-Result").css({"background-color":"green"}),this.correct[this.annotation.id]=1),jQuery(".Ldt-Quiz-Result").animate({height:"100%"},500,"linear",function(){jQuery(".Ldt-Quiz-Result").delay(2e3).animate({height:"0%"},500)});var A=this.annotation.number+1,B=this.globalScore(),M="";M+='<span class="Ldt-Quiz-Correct-Answer">'+B[0]+'</span> / <span class="Ldt-Quiz-Incorrect-Answer">'+B[1]+"</span>",jQuery(".Ldt-Quiz-Index").html("Q"+A+"/"+this.totalAmount),jQuery(".Ldt-Quiz-Score").html(M),this.submit(this.user,this.userid,this.annotation.id,S?"wrong_answer":"right_answer",k.join("")),jQuery(".Ldt-Quiz-Submit").fadeOut(400,function(){jQuery(".Ldt-Quiz-Votes").show()})}globalScore(){var l=_.values(this.correct),d=l.filter(function(h){return h==1}).length,m=l.filter(function(h){return h==0}).length;return[d,m]}refresh(){var l=this.getWidgetAnnotations().sortBy(function(m){return m.begin}),d=this;d.totalAmount=l.length,d.number=0,d.correct={},d.keys={},l.forEach(function(m){d.correct[m.id]=-1,d.keys[d.number]=m.id,m.number=d.number++})}draw(){var l=this;l.quiz_displayed=!1,this.onMediaEvent("enter-annotation",function(d){var m=l.getWidgetAnnotations().filter(function(h){return h===d});m.number===void 0&&l.refresh(),m.length&&l.update(m[0])}),this.onMdpEvent("Quiz.activate",function(){l.quiz_activated=!0}),this.onMdpEvent("Quiz.deactivate",function(){l.quiz_activated=!1,l.hide()}),this.onMdpEvent("Quiz.hide",function(){l.hide()}),this.onMdpEvent("Quiz.refresh",function(){l.refresh()}),this.onMediaEvent("pause",function(){l.quiz_displayed||jQuery(".Ldt-Pause-Add-Question").show()}),this.onMediaEvent("play",function(){jQuery(".Ldt-Pause-Add-Question").hide()}),l.overlay=jQuery("<div class='Ldt-Quiz-Overlay'></div>").appendTo(jQuery("#"+l.container)),l.PauseAddQuestion=jQuery("<div class='Ldt-Pause-Add-Question' title='Ajoutez une question !'>").on("click",function(){l.player.trigger("QuizCreator.create")}).appendTo(jQuery("#"+l.container)),l.overlay.html(this.template),jQuery(".Ldt-Quiz-Overlay").hide(),jQuery(".Ldt-Quiz-Submit input").click(function(){l.answer()}),jQuery(".Ldt-Quiz-Submit-Skip-Link").click({media:this.media},function(d){l.submit(l.user,l.userid,l.annotation.id,"skipped_answer",0),l.hide(),l.player.trigger("QuizCreator.skip"),d.data.media.play()}),jQuery('.Ldt-Quiz-Votes-Buttons input[type="button"], .Ldt-Quiz-Votes-Buttons a').click({media:this.media},function(d){var m,h;jQuery(this).hasClass("Ldt-Quiz-Vote-Useful")?(m="useful",h=1):jQuery(this).hasClass("Ldt-Quiz-Vote-Useless")?(m="useless",h=-1,jQuery(".Ldt-Ctrl-Quiz-Create").addClass("button_highlight").delay(5e3).queue(function(){jQuery(this).removeClass("button_highlight").dequeue()})):(m="skipped_vote",h=0),l.submit(l.user,l.userid,l.annotation.id,m,h),d.data.media.play(),l.hide(),jQuery(".Ldt-Pause-Add-Question").hide(),l.player.trigger("QuizCreator.skip")}),l.refresh()}},Cr(n,"defaults",{quiz_activated:!0,api_serializer:"ldt_annotate",analytics_api:"",api_method:"POST",user:"",userid:""}),Cr(n,"template",'<div class="Ldt-Quiz-Container"><div class="Ldt-Quiz-Header">  <div class="Ldt-Quiz-Index"></div><div class="Ldt-Quiz-Score"></div></div><div class="Ldt-Quiz-Content">  <h1 class="Ldt-Quiz-Title">{{question}}</h1>  <div class="Ldt-Quiz-Questions">  </div></div><div class="Ldt-Quiz-Footer">  <div class="Ldt-Quiz-Votes">      <span class="Ldt-Quiz-Votes-Question">Avez-vous trouvé cette question utile ?</span>      <div class="Ldt-Quiz-Votes-Buttons">          <div class="Ldt-Quiz-Vote-Skip-Block"><a href="#" class="Ldt-Quiz-Vote-Skip">Passer</a></div>          <div><input type="button" value="Non" class="Ldt-Quiz-Vote-Useless" /></div>          <div><input type="button" value="Oui" class="Ldt-Quiz-Vote-Useful" /></div>      </div>  </div>  <div class="Ldt-Quiz-Submit">      <div class="Ldt-Quiz-Submit-Button"><input type="button" value="Valider" /></div>      <div class="Ldt-Quiz-Submit-Skip-Link"><a href="#">Passer</a></div><div style="clear:both;"></div>  </div>  <div class="Ldt-Quiz-Result">Bonne réponse</div></div></div>'),Cr(n,"annotationTemplate",""),n},UniqueChoiceQuestion=function(t){return class extends t.Widgets.Widget{constructor(n){this.annotation=n}renderQuizTemplate(n,l){return'<input type="radio" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question" data-question="'+l+'" value="'+l+'" />'}renderTemplate(n,l){var d=this.generateUid();return'<input type="radio" id="'+d+'" class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question" data-question="'+l+'" value="'+l+'" /><label for="'+d+'" title="Veuillez sélectionner la réponse correcte"></label>'}renderFullTemplate(n,l){var d=n&&n.correct?"checked":"",m=this.generateUid();return'<input type="radio" id="'+m+'" '+d+' class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question" data-question="'+l+'" value="'+l+'" /><label for="'+m+'"></label>'}}},MultipleChoiceQuestion=function(t){return class extends t.Widgets.Widget{constructor(n){this.annotation=n}renderQuizTemplate(n,l){return'<input type="checkbox" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question['+l+']" data-question="'+l+'" value="'+l+'" /> '}renderTemplate(n,l){var d=this.generateUid();return'<input type="checkbox" id="'+d+'" class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+l+']" data-question="'+l+'" value="'+l+'" /><label for="'+d+'" title="Veuillez sélectionner la ou les réponses correctes"></label>'}renderFullTemplate(n,l){var d=n&&n.correct?"checked":"",m=this.generateUid();return'<input type="checkbox" id="'+m+'" '+d+' class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+l+']" data-question="'+l+'" value="'+l+'" /><label for="'+m+'"></label> '}submit(n,l,d,m,h){var S=this,k=mustache.render(this.analytics_api,{id:this.source.projectId}),A={username:n,useruuid:l,subject:d,property:m,value:h,session:S.session_id};jQuery.ajax({url:k,type:this.api_method,contentType:"application/json",data:JSON.stringify(A),success:function(B){},error:function(B,M,j){t.log("Error when sending annotation",j)}})}}},quizCreatorStyles={},QuizCreator=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}skip(){this.$.find(".Ldt-QuizCreator-Time").val(""),this.$.find(".Ldt-QuizCreator-Question-Area").val(""),this.$.find(".Ldt-QuizCreator-Resource-Area").val(""),this.$.find(".Ldt-QuizCreator-Questions-Block").html(""),this.current_annotation=void 0}nbAnswers(){var l=this.$.find(".Ldt-QuizCreator-Questions-Answer").length;return l}draw(){var l=this;this.onMediaEvent("timeupdate",function(d){l.setBegin(d)}),this.onMdpEvent("QuizCreator.show",function(){l.setBegin(l.media.currentTime)}),this.onMdpEvent("QuizCreator.create",function(){l.skip(),l.setBegin(l.media.currentTime)}),this.onMdpEvent("QuizCreator.skip",function(){l.skip()}),this.onMdpEvent("QuizCreator.edit",function(d){l.skip(),l.addQuestion(d)}),this.$.on("click",".Ldt-QuizCreator-Remove",function(){jQuery(this).parents(".Ldt-QuizCreator-Questions-Answer").remove()}),this.begin=new t.Model.Time,this.end=this.source.getDuration(),this.answers=[],this.renderTemplate(),this.question=new t.Widgets.UniqueChoiceQuestion,this.$.find(".Ldt-QuizCreator-Question-Type").bind("change",this.functionWrapper("onQuestionTypeChange")),this.$.find(".Ldt-QuizCreator-Question-Add").bind("click",this.functionWrapper("onQuestionAdd")),this.$.find(".Ldt-QuizCreator-Question-Save").bind("click",this.functionWrapper("onSave")),this.$.find(".Ldt-QuizCreator-Time").keyup(function(){var d=l.$.find(".Ldt-QuizCreator-Time").val();l.begin=t.timestamp2ms(d),l.end=l.begin+1e3}),this.onMediaEvent("timeupdate",function(d){l.getDescription()&&l.setBegin(d)})}getDescription(){return this.$.find(".Ldt-QuizCreator-Question-Area").val().trim()}addQuestion(l,d){var m=this;l.content.data.type=="multiple_choice"?this.question=new t.Widgets.MultipleChoiceQuestion(l):l.content.data.type=="unique_choice"&&(this.question=new t.Widgets.UniqueChoiceQuestion(l));var h=l.content.data.answers;this.answers=[],this.$.find(".Ldt-QuizCreator-Time").val(l.begin),this.$.find(".Ldt-QuizCreator-Question-Area").val(l.content.data.question),this.$.find(".Ldt-QuizCreator-Resource-Area").val(l.content.data.resource),this.$.find(".Ldt-QuizCreator-Questions-Block").html(""),h.forEach(function(S){m.onQuestionAdd(null,S)}),m.current_annotation=l}onQuestionTypeChange(l){var d=this.$.find(".Ldt-QuizCreator-Question-Type"),m=d.val(),h=this;switch(m){case"unique_choice":this.question=new t.Widgets.UniqueChoiceQuestion;break;case"multiple_choice":this.question=new t.Widgets.MultipleChoiceQuestion;break}var S="";h.$.find(".Ldt-QuizCreator-Questions-Block").html(S),this.pauseOnWrite()}onQuestionAdd(l,d){var m='<div class="Ldt-QuizCreator-Questions-Answer">Réponse <div class="Ldt-QuizCreator-Questions-Answer-Correct">'+this.question.renderFullTemplate(d,this.nbAnswers())+'</div><br /><div class="Ldt-QuizCreator-Questions-Answer-Content"><input type="text" class="Ldt-QuizCreator-Answer-Content" data-question="'+this.nbAnswers()+'" id="question'+this.nbAnswers()+'"'+(d?' value="'+d.content+'"':"")+'/><br />Commentaire <br/><textarea class="Ldt-QuizCreator-Answer-Feedback" data-question="'+this.nbAnswers()+'" id="feedback'+this.nbAnswers()+'">'+(d?d.feedback:"")+'</textarea></div><div class="Ldt-QuizCreator-Questions-Answer-Delete"><div class="Ldt-QuizCreator-Remove">&nbsp;</div></div></div>';this.$.find(".Ldt-QuizCreator-Questions-Block").append(m),this.$.find(".Ldt-QuizCreator-Answer-Content").last().focus(),this.pauseOnWrite()}pauseOnWrite(){this.pause_on_write&&!this.media.getPaused()&&this.media.pause()}setBegin(l){this.begin=new t.Model.Time(l||0),this.end=this.begin+500,this.$.find(".Ldt-QuizCreator-Time").val(this.begin.toString())}get_local_annotation(l){return this.player.getLocalAnnotation(l)}save_local_annotations(){this.player.saveLocalAnnotations(),this.source.merge(this.player.localSource)}delete_local_annotation(l){this.source.getAnnotations().removeId(l),this.player.deleteLocalAnnotation(l),this.current_annotation=void 0,this.refresh(!0)}show(){this.$.find(".Ldt-QuizCreator-Question-Area").focus()}hide(){this.$.find(".Ldt-QuizCreator-Questions-Block").html(""),this.$.find(".Ldt-QuizCreator-Question-Area").val(""),this.$.find(".Ldt-QuizCreator-Resource-Area").val(""),this.$.find(".Ldt-QuizCreator-Time").val("")}onSave(l,d){var m=!1;if(this.nbAnswers()<=0)return alert("Vous devez spécifier au moins une réponse à votre question !"),!1;if(!this.$.find(".quiz-question-edition:checked").length)return alert("Vous n'avez pas indiqué de bonne réponse."),!1;var h;if(this.current_annotation)m=!1,h=this.current_annotation;else{m=!0;var S=this.source.getAnnotationTypes().searchByTitle(this.annotation_type,!0),k=S.length?S[0]:new t.Model.AnnotationType(!1,this.player.localSource);S.length||(k.dont_send_id=!0,k.title=this.annotation_type),h=new t.Model.Annotation(!1,this.player.localSource),h.created=new Date,h.creator=this.creator_name,h.setAnnotationType(k.id),this.player.localSource.getMedias().push(this.source.currentMedia),h.setMedia(this.source.currentMedia.id)}h.setBeginEnd(this.begin,this.end),h.modified=new Date,h.contributor=this.creator_name,h.description=this.getDescription(),h.title=h.description,h.content={},h.content.data={},h.content.data.type=this.$.find(".Ldt-QuizCreator-Question-Type").val(),h.content.data.question=h.description,h.content.data.resource=this.$.find(".Ldt-QuizCreator-Resource-Area").val(),h.content.data.answers=jQuery.makeArray(jQuery(".Ldt-QuizCreator-Questions-Answer").map(function(A){return{content:jQuery(this).find(".Ldt-QuizCreator-Answer-Content").val(),feedback:jQuery(this).find(".Ldt-QuizCreator-Answer-Feedback").val(),correct:jQuery(this).find(".Ldt-Quiz-Question-Check").is(":checked")}})),this.current_annotation=h,m?(this.player.addLocalAnnotation(h),this.source.merge([h]),this.player.trigger("Annotation.create",h)):(this.player.saveLocalAnnotations(),this.player.trigger("Annotation.update",h)),this.player.trigger("AnnotationsList.update"),this.player.trigger("Quiz.refresh")}},Cr(n,"defaults",{creator_name:"",tags:!1,tag_titles:!1,pause_on_write:!0,annotation_type:"Quiz",api_serializer:"ldt_annotate",api_endpoint_template:"",api_method:"POST"}),Cr(n,"messages",{en:{},fr:{}}),Cr(n,"template",'<div class="Ldt-QuizCreator-Ui Ldt-TraceMe"><div class="Ldt-QuizCreator-Question-Form"><textarea class="Ldt-QuizCreator-Question-Area" placeholder="Votre question"></textarea><br /><textarea class="Ldt-QuizCreator-Resource-Area" placeholder="Ressources (lien vers une image, etc.)"></textarea><br /></div><p>Type de question  <select name="type" class="Ldt-QuizCreator-Question-Type"><option value="unique_choice">Choix unique</option><option value="multiple_choice">Choix multiple</option></select> à <input type="text" placeholder="hh:mm:ss" size="6" class="Ldt-QuizCreator-Time" /><div class="Ldt-QuizCreator-Questions-Block"></div><div>  <button class="Ldt-QuizCreator-Question-Add">Ajouter une réponse</button><hr>  <button class="Ldt-QuizCreator-Question-Save">Sauvegarder</button></div></div>'),n},segmentsStyles={},Segments=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}do_draw(l){this.width!=this.$.parent().width()&&this.scale_to_parent&&(this.width=this.$.parent().width(),this.$.css({width:this.width+"px"}));var d=this,m=this.getWidgetAnnotations().filter(function(M){return M.getDuration()>0&&M.getMedia().id==d.media.id}),h=this.width/this.source.getDuration(),S=this.$.find(".Ldt-Segments-List"),k=[],A=1;function B(M,j,I,P){function $(N){return Math.floor(240*(1-P)+N*P)}for(var z=(65536*$(M)+256*$(j)+$(I)).toString(16);z.length<6;)z="0"+z;return"#"+z}l&&this.$.find(".Ldt-Segments-Segment").remove(),m.forEach(function(M,j){var I=M.begin*h,P=M.getDuration()*h,$=Math.floor(I+P/2),z=M.title+(M.description?"<br/>"+M.description:""),N=_$1(k).find(function(T){return!_$1(T.annotations).find(function(u){return u.begin<M.end&&u.end>M.begin})});N||(N={index:k.length,annotations:[]},k.push(N)),N.annotations.push(M);var F=(1-d.overlap)*N.index*d.line_height,U=typeof M.color<"u"&&M.color?M.color:d.colors[j%d.colors.length],J=parseInt(U.substr(1,2),16),te=parseInt(U.substr(3,2),16),se=parseInt(U.substr(5,2),16),de=B(J,te,se,.5),Q=B(J,te,se,.2),ve={color:U,medcolor:de,lowcolor:Q,text:(M.creator?M.creator+" : ":"")+z.replace(/(\n|\r|\r\n)/gm," ").replace(/(^.{120,140})[\s].+$/m,"$1&hellip;"),left:I,width:P,top:F,height:d.line_height-1,id:M.id,media_id:M.getMedia().id,from:M.begin.toString(),to:M.end.toString()},he=mustache.render(d.constructor.annotationTemplate,ve),ke=jQuery(he);ke.on("mouseover",function(){M.trigger("select")}).on("mouseout",function(){M.trigger("unselect")}).on("click",function(){d.use_timerange&&(d.media.getTimeRange()?d.media.getTimeRange()[0]==M.begin||d.media.getTimeRange()[1]==M.end?(d.media.resetTimeRange(),d.$segments.each(function(){var T=jQuery(this);T.css("background",Q).removeClass("selected"),M.trigger("select")})):(d.media.setCurrentTime(M.begin),d.media.setTimeRange(M.begin,M.end),d.media.play(),d.$segments.each(function(){var T=jQuery(this);T.css("background",Q).removeClass("selected")}),ke.css("background",d.selected_color).addClass("selected")):(d.media.setCurrentTime(M.begin),d.media.setTimeRange(M.begin,M.end),d.media.play(),d.$segments.each(function(){var T=jQuery(this);T.css("background",Q).removeClass("selected")}),ke.css("background",d.selected_color).addClass("selected"))),M.trigger("click")}).appendTo(S),t.attachDndData(ke,{title:M.title,description:M.description,uri:typeof M.url<"u"?M.url:document.location.href.replace(/#.*$/,"")+"#id="+M.id,image:M.thumbnail,text:"["+M.begin.toString()+"] "+M.title}),M.on("select",function(){d.$segments.each(function(){var T=jQuery(this);T.css({background:T.hasClass("found")?d.faded_found_color:T.attr("data-low-color")}),T.css({background:T.hasClass("selected")?d.faded_selected_color:T.attr("data-low-color")})}),ke.css({background:ke.hasClass("found")?d.found_color:U,background:ke.hasClass("selected")?d.selected_color:U,"z-index":++A}),d.tooltip&&d.tooltip.show($,F,ve.text,ve.color)}),M.on("unselect",function(){d.tooltip&&d.tooltip.hide(),d.$segments.each(function(){var T=jQuery(this);T.css("background",T.hasClass("found")?d.found_color:T.attr("data-medium-color")),T.css("background",T.hasClass("selected")?d.selected_color:T.attr("data-medium-color"))})}),M.on("found",function(){ke.css("background",d.found_color).addClass("found")}),M.on("not-found",function(){ke.css("background",Q).removeClass("found")})}),this.onMediaEvent("resettimerange",function(){d.$segments.each(function(){var M=jQuery(this);M.removeClass("selected")})}),this.$.css({width:this.width+"px",height:((1-this.overlap)*k.length+this.overlap)*this.line_height+"px",background:this.background,margin:"1px 0"}),this.$segments=this.$.find(".Ldt-Segments-Segment")}draw(){var l=this;l.onMediaEvent("timeupdate","onTimeupdate"),l.renderTemplate(),l.do_draw(),this.no_tooltip||l.insertSubwidget(l.$.find(".Ldt-Segments-Tooltip"),{type:"Tooltip",min_x:0,max_x:this.width},"tooltip"),l.source.getAnnotations().on("search",function(){searching=!0}),l.source.getAnnotations().on("search-cleared",function(){searching=!1,_this.$segments.each(function(){var d=jQuery(this);d.css("background",d.attr("data-medium-color")).removeClass("found")})}),this.$.on("resize",function(){l.do_draw(!0)})}onTimeupdate(l){var d=Math.floor(this.width*l/this.media.duration);this.$.find(".Ldt-Segments-Position").css({left:d+"px"})}},Cr(n,"defaults",{annotation_type:"chap",colors:["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],line_height:8,background:"#e0e0e0",overlap:.25,found_color:"#FF00FC",faded_found_color:"#ff80fc",selected_color:"#74d600",faded_selected_color:"#baf9b5",no_tooltip:!1,use_timerange:!1,scale_to_parent:!0}),Cr(n,"template",'<div class="Ldt-Segments-List"></div><div class="Ldt-Segments-Position"></div><div class="Ldt-Segments-Tooltip"></div>'),Cr(n,"annotationTemplate",'<div class="Ldt-Segments-Segment Ldt-TraceMe" trace-info="segment-id:{{id}}, media-id:{{media_id}}, from:{{from}}, to:{{to}}" segment-text="{{text}}"style="top:{{top}}px; height:{{height}}px; left:{{left}}px; width:{{width}}px; background:{{medcolor}}" data-base-color="{{color}}" data-low-color="{{lowcolor}}" data-medium-color="{{medcolor}}"></div>'),n},shortcutsStyles={},Shortcuts=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this;Mousetrap.bindGlobal("ctrl+space",function(d){return d.preventDefault(),l.media.getPaused()?l.media.play():l.media.pause(),!1}),Mousetrap.bindGlobal("ctrl+left",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.max(0,l.media.getCurrentTime()-l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+shift+left",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.max(0,l.media.getCurrentTime()-5*l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+right",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.min(l.media.duration,l.media.getCurrentTime()+l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+shift+right",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.min(l.media.duration,l.media.getCurrentTime()+5*l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+a",function(d){return d.preventDefault(),l.player.trigger("CreateAnnotation.toggle"),!1})}},Cr(n,"defaults",{time_increment:2e3}),n},sliceStyles={},Slice=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.sliding=!1}draw(){this.renderTemplate(),this.$slider=this.$.find(".Ldt-Slice"),this.show_arrow&&this.insertSubwidget(this.$.find(".Ldt-Slice-Arrow"),{type:"Arrow"},"arrow"),this.min=0,this.max=this.media.duration.valueOf();var l=this,d;this.$slider.slider({range:!0,values:[0,this.max],min:0,max:this.max,change:function(m,h){l.arrow&&l.arrow.moveToTime((h.values[0]+h.values[1])/2),l.onBoundsChanged&&l.onBoundsChanged(h.values[0],h.values[1])},start:function(){l.sliding=!0,l.media.getPaused()||l.media.pause(),d=l.media.getCurrentTime()},slide:function(m,h){l.media.setCurrentTime(h.value)},stop:function(){l.sliding=!1,l.media.setCurrentTime(d)}}),this.$slider.find(".ui-slider-handle:first").addClass("Ldt-Slice-left-handle"),this.$slider.find(".ui-slider-handle:last").addClass("Ldt-Slice-right-handle"),this.getWidgetAnnotations().forEach(function(m){m.on("enter",function(){l.setBounds(m.begin,m.end)})}),this.player.on("annotation-click",function(m){l.setBounds(m.begin,m.end)})}setBounds(l,d){this.$slider.slider("values",[l,d])}show(){this.$slider.show()}hide(){this.$slider.hide()}},Cr(n,"defaults",{show_arrow:!1}),Cr(n,"template",'<div class="Ldt-Slice"></div>{{#show_arrow}}<div class="Ldt-Slice-Arrow"></div>{{/show_arrow}}'),n},slidePreviewStyles={},SlidePreview=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.getWidgetAnnotations().sortBy(function(m){return m.begin});var l=this;l.renderTemplate();var d=l.$.find(".Ldt-SlidePreview-Slides");this.getWidgetAnnotations().forEach(function(m){var h={id:m.id,content:t.textFieldHtml(m.title),begin:m.begin.toString(),ms:m.begin.milliseconds,thumbnail:m.thumbnail},S=mustache.render(l.annotationTemplate,h),k=jQuery(S);d.append(k)}),l.$.on("click",".Ldt-SlidePreview-Item",function(){l.media.setCurrentTime(Number(this.dataset.timecode))})}},Cr(n,"defaults",{annotation_type:"Slides"}),Cr(n,"template",'<div class="Ldt-SlidePreview-Container"><div class="Ldt-SlidePreview-Slides"></div></div>'),Cr(n,"annotationTemplate",'<div data-id="{{ id }}" data-timecode="{{ ms }}" class="Ldt-SlidePreview-Item"><img title="{{ begin }} - {{ atitle }}" class="Ldt-AnnotationsList-Thumbnail" src="{{ thumbnail }}"></div>'),n},sliderStyles={},Slider=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"calculateHandleCss",function(d){return{height:2+d+"px",width:2+d+"px","margin-left":-Math.ceil(2+d/2)+"px"}})}draw(){this.renderTemplate(),this.$time=this.$.find(".Ldt-Slider-Time"),this.$slider=this.$.find(".Ldt-Slider");var d=this;this.$slider.slider({range:"min",value:0,min:0,max:this.source.getDuration().milliseconds,slide:function(m,h){d.media.setCurrentTime(h.value),d.player.trigger("Mediafragment.setHashToTime")}}),this.$handle=this.$slider.find(".ui-slider-handle"),this.onMediaEvent("timeupdate","onTimeupdate"),this.onMdpEvent("Player.MouseOver","onMouseover"),this.onMdpEvent("Player.MouseOut","onMouseout"),this.minimize_timeout&&(this.$slider.css(this.calculateSliderCss(this.minimized_height)),this.$handle.css(this.calculateHandleCss(this.minimized_height)),this.maximized=!1,this.timeoutId=!1),this.$slider.mouseover(function(){d.$time.show(),d.onMouseover()}).mouseout(this.functionWrapper("onMouseout")).mousemove(function(m){var h=m.pageX-d.$.offset().left,S=new t.Model.Time(d.media.duration*h/d.width);d.$time.text(S.toString()).css("left",h)})}onTimeupdate(d){this.$slider.slider("value",d),this.player.trigger("Arrow.updatePosition",{widget:this.type,time:d})}onMouseover(){this.minimize_timeout&&(this.timeoutId&&(window.clearTimeout(this.timeoutId),this.timeoutId=!1),this.maximized||(this.animateToHeight(this.maximized_height),this.maximized=!0))}onMouseout(){if(this.$time.hide(),this.minimize_timeout){this.timeoutId&&(window.clearTimeout(this.timeoutId),this.timeoutId=!1);var d=this;this.timeoutId=window.setTimeout(function(){d.maximized&&(d.animateToHeight(d.minimized_height),d.maximized=!1),d.timeoutId=!1},this.minimize_timeout)}}animateToHeight(d){this.$slider.stop().animate(this.calculateSliderCss(d),500,function(){jQuery(this).css("overflow","visible")}),this.$handle.stop().animate(this.calculateHandleCss(d),500,function(){jQuery(this).css("overflow","visible")})}calculateSliderCss(d){return{height:d+"px","margin-top":this.minimized_height-d+"px"}}},Cr(n,"defaults",{minimized_height:4,maximized_height:4,minimize_timeout:1500}),Cr(n,"template",'<div class="Ldt-Slider"></div><div class="Ldt-Slider-Time">00:00</div>'),n},slideVideoPlayerStyles={},SlideVideoPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"template",'<div class="Ldt-SlideVideoPlayer">  <div class="Ldt-SlideVideoPlayer-slide Ldt-SlideVideoPlayer-panel">  </div>  <div class="Ldt-SlideVideoPlayer-video Ldt-SlideVideoPlayer-panel">  </div></div>')}draw(){var d=this;d.renderTemplate(),this.insertSubwidget(d.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide"),{type:"ImageDisplay",annotation_type:d.annotation_type},"slide"),this.insertSubwidget(d.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video"),{type:d.playerModule,video:d.video,width:"100%",url_transform:d.url_transform},"player"),d.mode=="pip"?(d.$.find(".Ldt-SlideVideoPlayer-panel").append('<div class="Ldt-SlideVideoPlayer-pip-menu"><div class="Ldt-SlideVideoPlayer-pip-menu-toggle"></div></div>'),d.$.on("click",".Ldt-SlideVideoPlayer-pip-menu-toggle",function(){d.toggleMainDisplay()}),window.setTimeout(function(){d.setMainDisplay("video")},1500)):window.setTimeout(function(){d.$.find(".Ldt-SlideVideoPlayer").touchSplit({orientation:screen.height>screen.width?"vertical":"horizontal",leftMin:20,topMin:20})},1500)}toggleMainDisplay(){this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video").hasClass("Ldt-SlideVideoPlayer-pip-main")?this.setMainDisplay("slides"):this.setMainDisplay("video")}setMainDisplay(d){var m=this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video"),h=this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide");if(d=="slides"){var S=m;m=h,h=S}m.removeClass("Ldt-SlideVideoPlayer-pip-pip").addClass("Ldt-SlideVideoPlayer-pip-main"),h.removeClass("Ldt-SlideVideoPlayer-pip-main").addClass("Ldt-SlideVideoPlayer-pip-pip")}},Cr(n,"defaults",{playerModule:"HtmlPlayer",mode:"sidebyside"}),n},socialStyles={},Social=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate(),this.clipId=_$1.uniqueId("Ldt-Social-CopyBtn-"),this.$.find(".Ldt-Social-CopyBtn").attr("id",this.clipId);var l=this;this.$.find(".Ldt-Social-Url").click(function(){return l.toggleCopy(),!1}).on("dragstart",function(d){d.originalEvent.dataTransfer.setData("text/x-iri-title",l.text),d.originalEvent.dataTransfer.setData("text/x-iri-uri",l.url)}),this.$.find(".Ldt-Social-Input").focus(function(){this.select()}),this.$.find(".Ldt-Social-Ext").click(function(){return window.open(jQuery(this).attr("href"),"_blank","height=300,width=450,left=100,top=100,toolbar=0,menubar=0,status=0,location=0"),!1}),this.updateUrls(this.url,this.text)}toggleCopy(){var l=this.$.find(".Ldt-Social-UrlPop");l.toggle(),this.$.find(".Ldt-Social-Input").val(this.url).focus()}updateUrls(l,d){this.url=l,this.text=d,this.$.find(".Ldt-Social-Fb").attr("href","http://www.facebook.com/share.php?"+jQuery.param({u:l,t:d})),this.$.find(".Ldt-Social-Twitter").attr("href","https://twitter.com/intent/tweet?"+jQuery.param({url:l,text:d})),this.$.find(".Ldt-Social-Gplus").attr("href","https://plus.google.com/share?"+jQuery.param({url:l,title:d})),this.$.find(".Ldt-Social-Mail").attr("href","mailto:?"+jQuery.param({subject:d,body:d+": "+l}))}},Cr(n,"defaults",{text:"",url:"",show_url:!0,show_twitter:!0,show_fb:!0,show_gplus:!0,show_mail:!0}),Cr(n,"template",'<span class="Ldt-Social">{{#show_url}}<div class="Ldt-Social-Url-Container"><a href="#" draggable="true" target="_blank" class="Ldt-Social-Square Ldt-Social-Url Ldt-TraceMe" title="{{l10n.share_link}}"></a><div class="Ldt-Social-UrlPop"><input class="Ldt-Social-Input"/></div></div>{{/show_url}}{{#show_fb}}<a href="#" target="_blank" class="Ldt-Social-Fb Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Facebook"></a>{{/show_fb}}{{#show_twitter}}<a href="#" target="_blank" class="Ldt-Social-Twitter Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Twitter"></a>{{/show_twitter}}{{#show_gplus}}<a href="#" target="_blank" class="Ldt-Social-Gplus Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Google+"></a>{{/show_gplus}}{{#show_mail}}<a href="#" target="_blank" class="Ldt-Social-Mail Ldt-TraceMe" title="{{l10n.share_mail}}"></a>{{/show_mail}}</span>'),Cr(n,"messages",{fr:{share_on:"Partager sur",share_mail:"Envoyer par courriel",share_link:"Partager le lien hypertexte",copy:"Copier"},en:{share_on:"Share on",share_mail:"Share by e-mail",share_link:"Share hypertext link",copy:"Copy"}}),n},Sparkline=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){for(var l=[],d=this.source.getDuration(),m=0,h=this.getWidgetAnnotations(),S=0;S<this.slice_count;S++){var k=S*d/this.slice_count,A=(S+1)*d/this.slice_count,B=0;h.forEach(function(N){if(N.begin<A&&N.end>=k){var F=N.getDuration().milliseconds;F?B+=(Math.min(N.end,A)-Math.max(N.begin,k))/F:B+=1}}),m=Math.max(m,B),l.push(B)}if(m){this.paper=new Raphael(this.$[0],this.width,this.height);var M=(this.height-this.margin)/m,j=this.width/this.slice_count,I=this,P=_$1(l).map(function(N){return I.margin+I.height-M*N}).value(),$=_$1(P).reduce(function(N,F,U){return N+(U?"C"+U*j+" "+P[U-1]+" "+U*j+" "+F+" "+(U+.5)*j+" "+F:"M0 "+F+"L"+.5*j+" "+F)},"")+"L"+this.width+" "+P[P.length-1],z=$+"L"+this.width+" "+this.height+"L0 "+this.height;this.paper.path(z).attr({stroke:"none",fill:this.fillColor}),this.paper.path($).attr({fill:"none",stroke:this.lineColor,"stroke-width":this.lineWidth}),this.rectangleProgress=this.paper.rect(0,0,0,this.height).attr({stroke:"none",fill:"#808080",opacity:.3}),this.ligneProgress=this.paper.path("M0 0L0 "+this.height).attr({stroke:"#ff00ff","line-width":2}),this.$.click(function(N){var F=N.pageX-I.$.offset().left;I.media.setCurrentTime(I.media.duration*F/I.width)}),this.onMediaEvent("timeupdate","onTimeupdate")}}onTimeupdate(l){var d=Math.floor(this.width*l/this.media.duration);this.rectangleProgress.attr({width:d}),this.ligneProgress.attr({path:"M"+d+" 0L"+d+" "+this.height})}},Cr(n,"defaults",{lineColor:"#7492b4",fillColor:"#aeaeb8",lineWidth:2,slice_count:20,height:50,margin:5}),n},SpelSyncHtml=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget")}draw(){this.renderTemplate();var l=this.$.find("iframe")[0],d=this.src.replace(/#.*$/,"");this.getWidgetAnnotations().forEach(function(m){m.on("enter",function(){m.content&&m.content.data&&m.content.data.ref_text&&(l.src=d+"#"+m.content.data.ref_text)})})}},Cr(n,"defaults",{src:"about:blank"}),Cr(n,"template",'<div class="Ldt-SpelSyncHtml"><iframe src="{{src}}" {{#width}}width="{{width}}"{{/width}} {{#height}}height="{{height}}"{{/height}}</div>'),n},tagcloudStyles={},Tagcloud=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"stopword_lists",{fr:["aussi","avec","aux","bien","car","cette","comme","dans","des","donc","dont","elle","encore","entre","est","être","eux","faire","fait","http","ici","ils","les","leur","leurs","mais","mes","même","mon","notre","non","nos","nous","ont","par","pas","peu","peut","plus","pour","quand","que","qui","quoi","sans","ses","son","sont","sur","tes","très","the","ton","tous","tout","une","votre","vos","vous"],en:["about","again","are","and","because","being","but","can","done","have","for","from","get","here","http","like","more","one","our","she","that","the","their","then","there","they","this","very","what","when","where","who","why","will","with","www","you","your"]});this.stopwords=_$1.uniq([].concat(this.custom_stopwords).concat(this.stopword_lists[this.stopword_language]))}draw(){if(this.segment_annotation_type){var d=this;this.source.getAnnotationsByTypeTitle(this.segment_annotation_type).forEach(function(m){m.on("enter",function(){d.redraw(m.begin,m.end)})})}else this.redraw()}redraw(d,m){var h=/https?:\/\/[0-9a-zA-Z\.%\/-_]+/g,S={},k=this,A=this.getWidgetAnnotations();if(!this.include_titles&&!this.include_descriptions)var B=/[^\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»\/]{3,}/g;else var B=/[^\s\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»:\/]{3,}/g;if(typeof d<"u"&&typeof m<"u"&&(A=A.filter(function(P){return P.begin>=d&&P.end<=m})),this.remove_zero_duration&&(A=A.filter(function(P){return P.getDuration()>0})),A.forEach(function(P){var $=(k.include_titles?P.title:"")+" "+(k.include_descriptions?P.description:"")+" "+(k.include_tag_texts?P.getTagTexts():"");_$1($.toLowerCase().replace(h,"").match(B)).each(function(z){z=z.trim(),_$1(k.stopwords).indexOf(z)==-1&&(!k.exclude_pattern||!k.exclude_pattern.test(z))&&(S[z]=1+(S[z]||0))})}),S=_$1(S).chain().map(function(P,$){return{word:$,count:P}}).filter(function(P){return P.count>k.min_count}).sortBy(function(P){return-P.count}).first(this.tag_count).value(),S&&S.length){var M=S[0].count,j=Math.min(S[S.length-1].count,M-1),I=(this.max_font_size-this.min_font_size)/Math.sqrt(M-j);_$1(S).each(function(P){P.size=Math.floor(k.min_font_size+I*Math.sqrt(P.count-j))})}this.$.html(mustache.render(this.template,{words:S})),this.$.find(".Ldt-Tagcloud-item").click(function(){var P=jQuery(this).attr("content");k.source.getAnnotations().searchByTags(P)}),this.source.getAnnotations().on("search",this.functionWrapper("onSearch")),this.source.getAnnotations().on("search-cleared",this.functionWrapper("onSearch"))}onSearch(d){if(d=typeof d<"u"?d:"",d)var m=t.Model.regexpFromTextOrArray(d);this.$.find(".Ldt-Tagcloud-item").each(function(){var h=jQuery(this),S=h.attr("content");d?h.html(S.replace(m,'<span class="Ldt-Tagcloud-active">$1</span>')):h.html(S)})}},Cr(n,"template",'<div class="Ldt-Tagcloud-Container"><ul class="Ldt-Tagcloud-List">{{#words}}<li class="Ldt-Tagcloud-item Ldt-TraceMe" trace-info="tag:{{word}}" content="{{word}}" style="font-size: {{size}}px">{{word}}</li>{{/words}}</ul></div>'),Cr(n,"defaults",{include_titles:!0,include_descriptions:!0,include_tag_texts:!0,tag_count:30,stopword_language:"fr",custom_stopwords:[],exclude_pattern:!1,annotation_type:!1,segment_annotation_type:!1,min_font_size:10,max_font_size:26,min_count:2,remove_zero_duration:!1}),n},Title=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate()}},Cr(n,"defaults",{media_title:!1}),Cr(n,"template",'<div class="Ldt-TitleWidget"><h2>{{#media_title}}{{media.title}}{{/media_title}}{{^media_title}}{{source.title}}{{/media_title}}</h2></div>'),n},tooltipStyles={},Tooltip=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){const l=this;this.renderTemplate(),this.$.parent().css({position:"relative"}),this.$tooltip=this.$.find(".Ldt-Tooltip"),this.$tip=this.$.find(".Ldt-Tooltip-Tip"),this.$sw=this.$.find(".Ldt-Tooltip-Border-SW"),this.$se=this.$.find(".Ldt-Tooltip-Border-SE"),this.__halfWidth=Math.floor((this.$.find(".Ldt-Tooltip-Main").width()||192)/2),this.__borderWidth=this.$.find(".Ldt-Tooltip-Border-Left").width(),this.__tipDelta=this.__halfWidth-Math.floor(this.$tip.width()/2),this.__maxShift=this.__tipDelta-this.__borderWidth,this.$.mouseover(function(){l.$tooltip.hide()}),this.hide()}show(l,d,m,h){if(typeof h<"u")if(typeof h=="string")this.$.find(".Ldt-Tooltip-Color").html(""),this.$.find(".Ldt-Tooltip-Color").show().css("background-color",h),this.$.find(".Ldt-Tooltip-Color").show().css("height","");else{var S=this.$.find(".Ldt-Tooltip-Color");S.html(""),S.show();for(var k=0;k<h.length;k++)S.append('<div style="float: left; height: 10px; width: 10px; background-color: '+h[k]+'">');this.$.find(".Ldt-Tooltip-Color").css("height",h.length*10+"px")}else this.$.find(".Ldt-Tooltip-Color").hide();this.$.find(".Ldt-Tooltip-Text").html(m),this.$tooltip.show();var A=0;typeof this.min_x<"u"&&l-this.__halfWidth<this.min_x&&(A=Math.max(l-this.__halfWidth-this.min_x,-this.__maxShift)),typeof this.max_x<"u"&&+l+this.__halfWidth>this.max_x&&(A=Math.min(+l+this.__halfWidth-this.max_x,this.__maxShift)),this.$tooltip.css({left:l-A+"px",top:d+"px"}),this.$tip.css({left:this.__tipDelta+A+"px"}),this.$sw.css({width:this.__tipDelta+A-this.__borderWidth+"px"}),this.$se.css({width:this.__tipDelta-A-this.__borderWidth+"px"})}hide(){this.$tooltip.hide()}},Cr(n,"defaults",{}),Cr(n,"template",'<div class="Ldt-Tooltip"><div class="Ldt-Tooltip-Main"><div class="Ldt-Tooltip-Corner-NW"></div><div class="Ldt-Tooltip-Border-Top"></div><div class="Ldt-Tooltip-Corner-NE"></div><div class="Ldt-Tooltip-Border-Left"></div><div class="Ldt-Tooltip-Border-Right"></div><div class="Ldt-Tooltip-Corner-SW"></div><div class="Ldt-Tooltip-Border-SW"></div><div class="Ldt-Tooltip-Tip"></div><div class="Ldt-Tooltip-Border-SE"></div><div class="Ldt-Tooltip-Corner-SE"></div><div class="Ldt-Tooltip-Inner"><div class="Ldt-Tooltip-Color"></div><p class="Ldt-Tooltip-Text"></p></div></div></div>'),n},transcriptStyles={},Transcript=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this.getWidgetAnnotations(),d=this,m;if(d.renderTemplate(),m=d.$.find(".Ldt-TranscriptWidget"),d.use_vtt_track){var h=d.player.widgets.filter(function(k){return k.type=="HtmlPlayer"});if(h){var S=h[0].$.find("video")[0];S.addEventListener("loadedmetadata",function(){var k=S.textTracks[0],A=k.cues,B=1;Array.prototype.forEach.apply(A,[function(M){M.id="cue"+B;var j=mustache.render(d.annotationTemplate,{id:M.id,content:M.text,begin:1e3*M.startTime,end:1e3*M.endTime});B+=1;var I=jQuery(j);m.append(I)}]),k.addEventListener("cuechange",function(){var M=k.activeCues;M.length>0&&(d.$.find(".Ldt-Transcript-Annotation.active").removeClass("active"),Array.prototype.forEach.apply(M,[function(j){d.$.find("#"+j.id).addClass("active")}]))},!1),m.on("click",".Ldt-Transcript-Annotation",function(){d.media.setCurrentTime(this.dataset.begin)})})}else console.log("cannot find a video object")}else l.forEach(function(k){var A={id:k.id,content:t.textFieldHtml(k.title),begin:k.begin.toString(),end:k.end.toString()},B=mustache.render(d.annotationTemplate,A),M=jQuery(B);m.append(M)})}},Cr(n,"defaults",{annotation_type:"Caption",use_vtt_track:!1}),Cr(n,"template",'<div class="Ldt-TranscriptWidget"></div>'),Cr(n,"annotationTemplate",'<span data-begin="{{ begin }}" data-end="{{ end }}" data-id="{{ id }}" class="Ldt-Transcript-Annotation">{{ content }}</span>  '),n},tweetStyles={},Tweet=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastAnnotation=!1}draw(){this.renderTemplate(),this.pinned=this.pin_at_start;var l=this;this.$.find(".Ldt-Tweet-Pin").click(function(){l.pinned=!l.pinned;var d=jQuery(this);l.pinned?(d.addClass("active").attr("title",l.l10n.dont_keep_visible),l.cancelTimeout()):(d.removeClass("active").attr("title",l.l10n.keep_visible),l.hideTimeout())}),this.$.find(".Ldt-Tweet-Close").click(function(){l.hide()}),this.$.hide(),this.getWidgetAnnotations().forEach(function(d){d.on("click",function(){l.show(d)})})}show(l){if(typeof l<"u"&&typeof l.source<"u"){var d=[[/#(\w+)/gm,function(I){return'<a href="http://twitter.com/search?q=%23'+I[1]+'" target="_blank">'},"</a>"]],m=_$1(l.source.entities.urls).sortBy(function(I){return I.indices[0]}),h=0,S="";_$1(m).each(function(I){I.indices[0]>=h&&(S+=l.source.text.substring(h,I.indices[0]),S+=typeof I.expanded_url<"u"&&I.expanded_url!==null?I.expanded_url:I.url,h=I.indices[1])}),S+=l.source.text.substring(h);for(var k=0;k<this.polemics.length;k++){var A=t.Model.regexpFromTextOrArray(this.polemics[k].keywords);d.push([A,'<span style="background: '+this.polemics[k].color+'">',"</span>"])}var A=l.found&&_this.source.getAnnotations().regexp||!1,B=l.source.user?l.source.user.profile_image_url:l.source.profile_image_url,M=l.source.user?l.source.user.screen_name:l.source.from_user,j=l.source.user?l.source.user.name:l.source.from_user_name;this.$.find(".Ldt-Tweet-Avatar").attr("src",B),this.$.find(".Ldt-Tweet-ScreenName").html("@"+M),this.$.find(".Ldt-Tweet-ProfileLink").attr("href","https://twitter.com/"+M),this.$.find(".Ldt-Tweet-FullName").html(j),this.$.find(".Ldt-Tweet-Contents").html(t.textFieldHtml(S,A,d)),this.$.find(".Ldt-Tweet-Time").html(this.l10n.original_time+new Date(l.source.created_at).toLocaleTimeString()+" / "+this.l10n.video_time+l.begin.toString()),this.$.find(".Ldt-Tweet-Retweet").attr("href","https://twitter.com/intent/retweet?tweet_id="+l.source.id_str),this.$.find(".Ldt-Tweet-Reply").attr("href","https://twitter.com/intent/tweet?in_reply_to="+l.source.id_str),this.$.find(".Ldt-Tweet-Original").attr("href","https://twitter.com/"+M+"/status/"+l.source.id_str),this.player.trigger("Annotation.minimize"),this.$.slideDown(),this.cancelTimeout(),this.pinned||this.hideTimeout()}else this.hide()}hide(){this.player.trigger("Annotation.maximize"),this.$.slideUp(),this.cancelTimeout()}cancelTimeout(){typeof this.hide_timer<"u"&&(window.clearTimeout(this.hide_timer),this.hide_timer=void 0)}hideTimeout(){this.cancelTimeout(),this.hide_timer=window.setTimeout(this.functionWrapper("hide"),this.hide_timeout)}},Cr(n,"defaults",{hide_timeout:1e4,polemics:[{keywords:["++"],color:"#30d765"},{keywords:["--"],color:"#f51123"},{keywords:["=="],color:"#f1e24a"},{keywords:["??"],color:"#05aae6"}],annotation_type:"tweet",pin_at_start:!1}),Cr(n,"messages",{fr:{retweet:"Retweeter",reply:"Répondre",keep_visible:"Empêcher la fermeture automatique",dont_keep_visible:"Permettre la fermeture automatique",close_widget:"Fermer l'affichage du tweet",original_time:"Heure d'envoi : ",video_time:"Temps de la vidéo : ",show_original:"Voir l'original"},en:{retweet:"Retweet",reply:"Reply",keep_visible:"Keep visible",dont_keep_visible:"Don't keep visible",close_widget:"Close tweet display",original_time:"Tweet sent at: ",video_time:"Video time: ",show_original:"Show original"}}),Cr(n,"template",'<div class="Ldt-Tweet-Widget"><div class="Ldt-Tweet-Inner"><div class="Ldt-Tweet-PinClose-Buttons"><a href="#" class="Ldt-Tweet-Pin Ldt-TraceMe{{#pin_at_start}} active" title="{{l10n.dont_keep_visible}}{{/pin_at_start}}{{^pin_at_start}}" title="{{l10n.keep_visible}}{{/pin_at_start}}"></a><a href="#" class="Ldt-Tweet-Close Ldt-TraceMe" title="{{l10n.close_widget}}"></a></div><div class="Ldt-Tweet-AvatarContainer"><a href="#" class="Ldt-Tweet-ProfileLink" target="_blank"><img src="" class="Ldt-Tweet-Avatar"/></a></div><h3><a href="#" class="Ldt-Tweet-ProfileLink Ldt-Tweet-ScreenName" target="_blank"></a> (<span class="Ldt-Tweet-FullName"></span>)</h3><p class="Ldt-Tweet-Contents"></p><div class="Ldt-Tweet-Bottom"><span class="Ldt-Tweet-Time"></span><a class="Ldt-Tweet-Original" href="" target="_blank">{{l10n.show_original}}</a><a href="" target="_blank" class="Ldt-Tweet-Retweet"><div class="Ldt-Tweet-Icon"></div>{{l10n.retweet}}</a><a href="" target="_blank" class="Ldt-Tweet-Reply"><div class="Ldt-Tweet-Icon"></div>{{l10n.reply}}</a></div></div></div>'),n},AutoPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){console.log("CONSTRUCT AUTOPLAYER"),super(l,d)}draw(){console.log("DRAW AUTOPLAYER"),typeof this.video>"u"&&(this.video=this.media.video);for(var l=["live","provider","autostart","streamer","video","height","width","url_transform"],d={},m=[{regexp:/^rtmp:\/\//,type:"JwpPlayer"},{regexp:/\.(mp4|m4v|mp3)$/,type:"AdaptivePlayer"},{regexp:/\.(ogg|ogv|webm)$/,type:"HtmlPlayer"},{regexp:/^(https?:\/\/)?(www\.)?youtube\.com/,type:"PopcornPlayer"},{regexp:/^(https?:\/\/)?(www\.)?vimeo\.com/,type:"PopcornPlayer"},{regexp:/^(https?:\/\/)?(www\.)?dailymotion\.com/,type:"DailymotionPlayer"}],h=/^rtmp:\/\//,S=0;S<m.length;S++)if(this.video&&m[S].regexp.test(this.video.toLowerCase())){d.type=m[S].type;break}if(typeof d.type>"u"&&(d.type=this.default_type),d.type==="AdaptivePlayer"){var k=document.createElement("video").canPlayType('video/mp4; codecs="avc1.42E01E"');d.type=k!=="no"?"HtmlPlayer":"JwpPlayer"}h.test(this.video)&&(d.provider="rtmp",d.live=!0);for(var S=0;S<l.length;S++)typeof this[l[S]]<"u"&&(d[l[S]]=this[l[S]]);this.insertSubwidget(this.$,d)}},Cr(n,"defaults",{default_type:"HtmlPlayer"}),n},MultiSegments=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this,d=[],m=null,h={},S={};_$1(this).each(function(k,A){/^segments_/.test(A)&&(h[A.replace(/^segments_/,"")]=k),/^annotation_/.test(A)&&(S[A.replace(/^annotation_/,"")]=k)}),this.source.getAnnotationTypes().forEach(function(k){var A=k.getAnnotations().filter(function(j){return j.getDuration()>0&&j.getMedia().id==l.media.id});if(A.length){var B=!1,M={segmentWidget:jQuery("<div>"),annotationWidget:jQuery("<div>"),hasSegmentsNow:function(){var j=l.media.getCurrentTime();return!!A.filter(function(I){return I.begin<=j&&I.end>j}).length},hide:function(){B&&(B=!1,this.annotationWidget.slideUp())},show:function(){B||(B=!0,this.annotationWidget.slideDown())}};M.segmentWidget.addClass("Ldt-MultiSegments-Segment").appendTo(l.$),l.show_all||M.segmentWidget.on("mouseenter",function(){M.hasSegmentsNow()&&(m=M)}),M.annotationWidget.addClass("Ldt-MultiSegments-Annotation").appendTo(l.$).hide(),l.insertSubwidget(M.segmentWidget,_$1({type:"Segments",annotation_type:k,width:"100%"}).extend(h).value()),l.insertSubwidget(M.annotationWidget,_$1({type:"Annotation",annotation_type:k,width:"100%"}).extend(S).value()),d.push(M)}}),jQuery(document).on("click",".Ldt-Segments-Segment",function(k){!l.show_all&&m&&!m.hasSegmentsNow()&&(m=void 0),_$1(d).each(function(A){jQuery(k.target).parent().parent()[0]==A.segmentWidget[0]?(m=A,A.show()):A.hide()})})}},Cr(n,"defaults",{annotation_show_arrow:!0,annotation_start_minimized:!1,annotation_show_annotation_type:!0,show_all:!1}),n};function widgets(t){return{AdaptivePlayer:AdaptivePlayer(t),AutoPlayer:AutoPlayer(t),HelloWorld:HelloWorld(t),Annotation:Annotation(t),AnnotationsController:AnnotationsController(t),AnnotationsList:AnnotationsList(t),Arrow:Arrow(t),Controller:Controller(t),CreateAnnotation:CreateAnnotation(t),CurrentSegmentInfobox:CurrentSegmentInfobox(t),DailymotionPlayer:DailymotionPlayer(t),EnrichedPlan:EnrichedPlan(t),Highlighter:Highlighter(t),HtmlMashupPlayer:HtmlMashupPlayer(t),HtmlPlayer:HtmlPlayer(t),ImageDisplay:ImageDisplay(t),JwpPlayer:JwpPlayerWidget(t),LatestAnnotation:LatestAnnotation(t),MashupPlayer:MashupPlayer(t),Mediafragment:Mediafragment(t),MediaList:MediaList(t),MultiSegments:MultiSegments(t),NoteTaking:NoteTaking(t),PlaceholderPlayer:PlaceholderPlayer(t),Polemic:Polemic(t),PopcornPlayer:PopcornPlayer(t),Quiz:Quiz(t),UniqueChoiceQuestion:UniqueChoiceQuestion(t),MultipleChoiceQuestion:MultipleChoiceQuestion(t),QuizCreator:QuizCreator(t),Segments:Segments(t),Shortcuts:Shortcuts(t),Slice:Slice(t),SlidePreview:SlidePreview(t),Slider:Slider(t),SlideVideoPlayer:SlideVideoPlayer(t),Social:Social(t),Sparkline:Sparkline(t),SpelSyncHtml:SpelSyncHtml(t),Tagcloud:Tagcloud(t),Title:Title(t),Tooltip:Tooltip(t),Transcript:Transcript(t),Tweet:Tweet(t),styles:{annotationStyles,helloWorldStyles,annotationsControllerStyles,annotationsListStyles,controllerStyles,createAnnotationStyles,currentSegmentInfoboxStyles,enrichedPlanStyles,highlighterStyles,imageDisplayStyles,latestAnnotationStyles,mashupPlayerStyles,mediaListStyles,noteTakingStyles,placeholderPlayerStyles,polemicStyles,quizStyles,quizCreatorStyles,segmentsStyles,shortcutsStyles,sliceStyles,slidePreviewStyles,sliderStyles,slideVideoPlayerStyles,socialStyles,tagcloudStyles,tooltipStyles,transcriptStyles,tweetStyles}}}typeof window.IriSP>"u"&&(window.IriSP=IriSP$1),IriSP$1.Model=Model(IriSP$1),IriSP$1.htmlPlayer=htmlPlayer,Object.assign(IriSP$1,utils$r(IriSP$1)),IriSP$1.iFrameUpdater=iFrameUpdater,IriSP$1.serializers=serializers(IriSP$1),Object.assign(IriSP$1,defaults()),metadataplayer(IriSP$1),IriSP$1.Widgets=widgetsBase(IriSP$1),Object.assign(IriSP$1.Widgets,widgets(IriSP$1));const main={IriSP:IriSP$1,style};return main});
+`,ke.message,ke.stack);var T=new Error("tunneling socket could not be established, cause="+ke.message);T.code="ECONNRESET",N.request.emit("error",T),U.removeSocket(J)}},j.prototype.removeSocket=function(N){var F=this.sockets.indexOf(N);if(F!==-1){this.sockets.splice(F,1);var U=this.requests.shift();U&&this.createConnection(U)}};function I(z,N){var F=this;j.prototype.createSocket.call(F,z,function(U){var J=t.connect(0,P({},F.options,{servername:z.host,socket:U}));F.sockets[F.sockets.indexOf(U)]=J,N(J)})}function P(z){for(var N=1,F=arguments.length;N<F;++N){var U=arguments[N];if(typeof U=="object")for(var J=Object.keys(U),te=0,se=J.length;te<se;++te){var de=J[te];U[de]!==void 0&&(z[de]=U[de])}}return z}var $;return process$1.env.NODE_DEBUG&&/\btunnel\b/.test(process$1.env.NODE_DEBUG)?$=function(){var z=Array.prototype.slice.call(arguments);typeof z[0]=="string"?z[0]="TUNNEL: "+z[0]:z.unshift("TUNNEL:"),console.error.apply(console,z)}:$=function(){},tunnelAgent.debug=$,tunnelAgent}var hasRequiredTunnel;function requireTunnel(){if(hasRequiredTunnel)return tunnel;hasRequiredTunnel=1;var t=require$$2$2,n=requireTunnelAgent(),l=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],d=["proxy-authorization"];function m(M){var j=M.port,I=M.protocol,P=M.hostname+":";return j?P+=j:I==="https:"?P+="443":P+="80",P}function h(M,j){var I=j.reduce(function(P,$){return P[$.toLowerCase()]=!0,P},{});return Object.keys(M).filter(function(P){return I[P.toLowerCase()]}).reduce(function(P,$){return P[$]=M[$],P},{})}function S(M,j){var I=M.proxy,P={proxy:{host:I.hostname,port:+I.port,proxyAuth:I.auth,headers:j},headers:M.headers,ca:M.ca,cert:M.cert,key:M.key,passphrase:M.passphrase,pfx:M.pfx,ciphers:M.ciphers,rejectUnauthorized:M.rejectUnauthorized,secureOptions:M.secureOptions,secureProtocol:M.secureProtocol};return P}function k(M,j){var I=M.protocol==="https:"?"https":"http",P=j.protocol==="https:"?"Https":"Http";return[I,P].join("Over")}function A(M){var j=M.uri,I=M.proxy,P=k(j,I);return n[P]}function B(M){this.request=M,this.proxyHeaderWhiteList=l,this.proxyHeaderExclusiveList=[],typeof M.tunnel<"u"&&(this.tunnelOverride=M.tunnel)}return B.prototype.isEnabled=function(){var M=this,j=M.request;return typeof M.tunnelOverride<"u"?M.tunnelOverride:j.uri.protocol==="https:"},B.prototype.setup=function(M){var j=this,I=j.request;if(M=M||{},typeof I.proxy=="string"&&(I.proxy=t.parse(I.proxy)),!I.proxy||!I.tunnel)return!1;M.proxyHeaderWhiteList&&(j.proxyHeaderWhiteList=M.proxyHeaderWhiteList),M.proxyHeaderExclusiveList&&(j.proxyHeaderExclusiveList=M.proxyHeaderExclusiveList);var P=j.proxyHeaderExclusiveList.concat(d),$=j.proxyHeaderWhiteList.concat(P),z=h(I.headers,$);z.host=m(I.uri),P.forEach(I.removeHeader,I);var N=A(I),F=S(I,z);return I.agent=N(F),!0},B.defaultProxyHeaderWhiteList=l,B.defaultProxyHeaderExclusiveList=d,tunnel.Tunnel=B,tunnel}var performanceNow={exports:{}},hasRequiredPerformanceNow;function requirePerformanceNow(){return hasRequiredPerformanceNow||(hasRequiredPerformanceNow=1,(function(){var t,n,l,d,m,h;typeof performance<"u"&&performance!==null&&performance.now?performanceNow.exports=function(){return performance.now()}:typeof process$1<"u"&&process$1!==null&&process$1.hrtime?(performanceNow.exports=function(){return(t()-m)/1e6},n=process$1.hrtime,t=function(){var S;return S=n(),S[0]*1e9+S[1]},d=t(),h=process$1.uptime()*1e9,m=d-h):Date.now?(performanceNow.exports=function(){return Date.now()-l},l=Date.now()):(performanceNow.exports=function(){return new Date().getTime()-l},l=new Date().getTime())}).call(commonjsGlobal)),performanceNow.exports}var request$2,hasRequiredRequest;function requireRequest(){if(hasRequiredRequest)return request$2;hasRequiredRequest=1;var t=requireStreamHttp(),n=requireHttpsBrowserify(),l=require$$2$2,d=util$6,m=requireStreamBrowserify(),h=requireLib$5(),S=requireAwsSign2(),k=requireAws4(),A=requireLib$2(),B=requireMimeTypes(),M=requireCaseless(),j=requireForeverAgent(),I=requireBrowser(),P=extend$1,$=requireIsstream(),z=requireIsTypedarray().strict,N=helpers$1,F=cookies$1,U=requireGetProxyFromURI(),J=requireQuerystring().Querystring,te=requireHar().Har,se=requireAuth().Auth,de=requireOauth().OAuth,Q=requireHawk(),ve=requireMultipart().Multipart,he=requireRedirect().Redirect,ke=requireTunnel().Tunnel,T=requirePerformanceNow(),u=safeBufferExports$1.Buffer,p=N.safeStringify,b=N.isReadStream,e=N.toBase64,c=N.defer,y=N.copy,w=N.version,v=F.jar(),o={};function x(L,D){var ee={};for(var oe in D){var fe=L.indexOf(oe)===-1;fe&&(ee[oe]=D[oe])}return ee}function E(L,D){var ee={};for(var oe in D){var fe=L.indexOf(oe)!==-1,ue=typeof D[oe]=="function";fe&&ue||(ee[oe]=D[oe])}return ee}function R(){var L=this;return{uri:L.uri,method:L.method,headers:L.headers}}function H(){var L=this;return{statusCode:L.statusCode,body:L.body,headers:L.headers,request:R.call(L.request)}}function Y(L){var D=this;L.har&&(D._har=new te(D),L=D._har.options(L)),m.Stream.call(D);var ee=Object.keys(Y.prototype),oe=x(ee,L);P(D,oe),L=E(ee,L),D.readable=!0,D.writable=!0,L.method&&(D.explicitMethod=!0),D._qs=new J(D),D._auth=new se(D),D._oauth=new de(D),D._multipart=new ve(D),D._redirect=new he(D),D._tunnel=new ke(D),D.init(L)}d.inherits(Y,m.Stream),Y.debug=process$1.env.NODE_DEBUG&&/\brequest\b/.test(process$1.env.NODE_DEBUG);function Z(){Y.debug&&console.error("REQUEST %s",d.format.apply(d,arguments))}return Y.prototype.debug=Z,Y.prototype.init=function(L){var D=this;L||(L={}),D.headers=D.headers?y(D.headers):{};for(var ee in D.headers)typeof D.headers[ee]>"u"&&delete D.headers[ee];if(M.httpify(D,D.headers),D.method||(D.method=L.method||"GET"),D.localAddress||(D.localAddress=L.localAddress),D._qs.init(L),Z(L),!D.pool&&D.pool!==!1&&(D.pool=o),D.dests=D.dests||[],D.__isRequestRequest=!0,!D._callback&&D.callback&&(D._callback=D.callback,D.callback=function(){D._callbackCalled||(D._callbackCalled=!0,D._callback.apply(D,arguments))},D.on("error",D.callback.bind()),D.on("complete",D.callback.bind(D,null))),!D.uri&&D.url&&(D.uri=D.url,delete D.url),D.baseUrl){if(typeof D.baseUrl!="string")return D.emit("error",new Error("options.baseUrl must be a string"));if(typeof D.uri!="string")return D.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(D.uri.indexOf("//")===0||D.uri.indexOf("://")!==-1)return D.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var oe=D.baseUrl.lastIndexOf("/")===D.baseUrl.length-1,fe=D.uri.indexOf("/")===0;oe&&fe?D.uri=D.baseUrl+D.uri.slice(1):oe||fe?D.uri=D.baseUrl+D.uri:D.uri===""?D.uri=D.baseUrl:D.uri=D.baseUrl+"/"+D.uri,delete D.baseUrl}if(!D.uri)return D.emit("error",new Error("options.uri is a required argument"));if(typeof D.uri=="string"&&(D.uri=l.parse(D.uri)),D.uri.href||(D.uri.href=l.format(D.uri)),D.uri.protocol==="unix:")return D.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(D.uri.host==="unix"&&D.enableUnixSocket(),D.strictSSL===!1&&(D.rejectUnauthorized=!1),D.uri.pathname||(D.uri.pathname="/"),!(D.uri.host||D.uri.hostname&&D.uri.port)&&!D.uri.isUnix){var ue=l.format(D.uri),qe='Invalid URI "'+ue+'"';return Object.keys(L).length===0&&(qe+=". This can be caused by a crappy redirection."),D.abort(),D.emit("error",new Error(qe))}if(D.hasOwnProperty("proxy")||(D.proxy=U(D.uri)),D.tunnel=D._tunnel.isEnabled(),D.proxy&&D._tunnel.setup(L),D._redirect.onRequest(L),D.setHost=!1,!D.hasHeader("host")){var rt=D.originalHostHeaderName||"host";D.setHeader(rt,D.uri.host),D.uri.port&&(D.uri.port==="80"&&D.uri.protocol==="http:"||D.uri.port==="443"&&D.uri.protocol==="https:")&&D.setHeader(rt,D.uri.hostname),D.setHost=!0}if(D.jar(D._jar||L.jar),D.uri.port||(D.uri.protocol==="http:"?D.uri.port=80:D.uri.protocol==="https:"&&(D.uri.port=443)),D.proxy&&!D.tunnel?(D.port=D.proxy.port,D.host=D.proxy.hostname):(D.port=D.uri.port,D.host=D.uri.hostname),L.form&&D.form(L.form),L.formData){var Ve=L.formData,et=D.form(),mt=function(Lt,xe){xe&&xe.hasOwnProperty("value")&&xe.hasOwnProperty("options")?et.append(Lt,xe.value,xe.options):et.append(Lt,xe)};for(var Ye in Ve)if(Ve.hasOwnProperty(Ye)){var We=Ve[Ye];if(We instanceof Array)for(var Xe=0;Xe<We.length;Xe++)mt(Ye,We[Xe]);else mt(Ye,We)}}if(L.qs&&D.qs(L.qs),D.uri.path?D.path=D.uri.path:D.path=D.uri.pathname+(D.uri.search||""),D.path.length===0&&(D.path="/"),L.aws&&D.aws(L.aws),L.hawk&&D.hawk(L.hawk),L.httpSignature&&D.httpSignature(L.httpSignature),L.auth&&(Object.prototype.hasOwnProperty.call(L.auth,"username")&&(L.auth.user=L.auth.username),Object.prototype.hasOwnProperty.call(L.auth,"password")&&(L.auth.pass=L.auth.password),D.auth(L.auth.user,L.auth.pass,L.auth.sendImmediately,L.auth.bearer)),D.gzip&&!D.hasHeader("accept-encoding")&&D.setHeader("accept-encoding","gzip, deflate"),D.uri.auth&&!D.hasHeader("authorization")){var Ge=D.uri.auth.split(":").map(function(Lt){return D._qs.unescape(Lt)});D.auth(Ge[0],Ge.slice(1).join(":"),!0)}if(!D.tunnel&&D.proxy&&D.proxy.auth&&!D.hasHeader("proxy-authorization")){var nt=D.proxy.auth.split(":").map(function(Lt){return D._qs.unescape(Lt)}),Et="Basic "+e(nt.join(":"));D.setHeader("proxy-authorization",Et)}D.proxy&&!D.tunnel&&(D.path=D.uri.protocol+"//"+D.uri.host+D.path),L.json&&D.json(L.json),L.multipart&&D.multipart(L.multipart),L.time&&(D.timing=!0,D.elapsedTime=D.elapsedTime||0);function Le(){if(z(D.body)&&(D.body=u.from(D.body)),!D.hasHeader("content-length")){var Lt;typeof D.body=="string"?Lt=u.byteLength(D.body):Array.isArray(D.body)?Lt=D.body.reduce(function(xe,X){return xe+X.length},0):Lt=D.body.length,Lt?D.setHeader("content-length",Lt):D.emit("error",new Error("Argument error, options.body."))}}D.body&&!$(D.body)&&Le(),L.oauth?D.oauth(L.oauth):D._oauth.params&&D.hasHeader("authorization")&&D.oauth(D._oauth.params);var Oe=D.proxy&&!D.tunnel?D.proxy.protocol:D.uri.protocol,$t={"http:":t,"https:":n},dt=D.httpModules||{};if(D.httpModule=dt[Oe]||$t[Oe],!D.httpModule)return D.emit("error",new Error("Invalid protocol: "+Oe));if(L.ca&&(D.ca=L.ca),!D.agent)if(L.agentOptions&&(D.agentOptions=L.agentOptions),L.agentClass)D.agentClass=L.agentClass;else if(L.forever){var gt=w();gt.major===0&&gt.minor<=10?D.agentClass=Oe==="http:"?j:j.SSL:(D.agentClass=D.httpModule.Agent,D.agentOptions=D.agentOptions||{},D.agentOptions.keepAlive=!0)}else D.agentClass=D.httpModule.Agent;D.pool===!1?D.agent=!1:D.agent=D.agent||D.getNewAgent(),D.on("pipe",function(Lt){if(D.ntick&&D._started&&D.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),D.src=Lt,b(Lt))D.hasHeader("content-type")||D.setHeader("content-type",B.lookup(Lt.path));else{if(Lt.headers)for(var xe in Lt.headers)D.hasHeader(xe)||D.setHeader(xe,Lt.headers[xe]);D._json&&!D.hasHeader("content-type")&&D.setHeader("content-type","application/json"),Lt.method&&!D.explicitMethod&&(D.method=Lt.method)}}),c(function(){if(!D._aborted){var Lt=function(){if(D._form&&(D._auth.hasAuth?D._auth.hasAuth&&D._auth.sentAuth&&D._form.pipe(D):D._form.pipe(D)),D._multipart&&D._multipart.chunked&&D._multipart.body.pipe(D),D.body)$(D.body)?D.body.pipe(D):(Le(),Array.isArray(D.body)?D.body.forEach(function(xe){D.write(xe)}):D.write(D.body),D.end());else if(D.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),D.requestBodyStream.pipe(D);else if(!D.src){if(D._auth.hasAuth&&!D._auth.sentAuth){D.end();return}D.method!=="GET"&&typeof D.method<"u"&&D.setHeader("content-length",0),D.end()}};D._form&&!D.hasHeader("content-length")?(D.setHeader(D._form.getHeaders(),!0),D._form.getLength(function(xe,X){!xe&&!isNaN(X)&&D.setHeader("content-length",X),Lt()})):Lt(),D.ntick=!0}})},Y.prototype.getNewAgent=function(){var L=this,D=L.agentClass,ee={};if(L.agentOptions)for(var oe in L.agentOptions)ee[oe]=L.agentOptions[oe];L.ca&&(ee.ca=L.ca),L.ciphers&&(ee.ciphers=L.ciphers),L.secureProtocol&&(ee.secureProtocol=L.secureProtocol),L.secureOptions&&(ee.secureOptions=L.secureOptions),typeof L.rejectUnauthorized<"u"&&(ee.rejectUnauthorized=L.rejectUnauthorized),L.cert&&L.key&&(ee.key=L.key,ee.cert=L.cert),L.pfx&&(ee.pfx=L.pfx),L.passphrase&&(ee.passphrase=L.passphrase);var fe="";D!==L.httpModule.Agent&&(fe+=D.name);var ue=L.proxy;typeof ue=="string"&&(ue=l.parse(ue));var qe=ue&&ue.protocol==="https:"||this.uri.protocol==="https:";return qe&&(ee.ca&&(fe&&(fe+=":"),fe+=ee.ca),typeof ee.rejectUnauthorized<"u"&&(fe&&(fe+=":"),fe+=ee.rejectUnauthorized),ee.cert&&(fe&&(fe+=":"),fe+=ee.cert.toString("ascii")+ee.key.toString("ascii")),ee.pfx&&(fe&&(fe+=":"),fe+=ee.pfx.toString("ascii")),ee.ciphers&&(fe&&(fe+=":"),fe+=ee.ciphers),ee.secureProtocol&&(fe&&(fe+=":"),fe+=ee.secureProtocol),ee.secureOptions&&(fe&&(fe+=":"),fe+=ee.secureOptions)),L.pool===o&&!fe&&Object.keys(ee).length===0&&L.httpModule.globalAgent?L.httpModule.globalAgent:(fe=L.uri.protocol+fe,L.pool[fe]||(L.pool[fe]=new D(ee),L.pool.maxSockets&&(L.pool[fe].maxSockets=L.pool.maxSockets)),L.pool[fe])},Y.prototype.start=function(){var L=this;if(L.timing)var D=new Date().getTime(),ee=T();if(!L._aborted){L._started=!0,L.method=L.method||"GET",L.href=L.uri.href,L.src&&L.src.stat&&L.src.stat.size&&!L.hasHeader("content-length")&&L.setHeader("content-length",L.src.stat.size),L._aws&&L.aws(L._aws,!0);var oe=y(L);delete oe.auth,Z("make request",L.uri.href),delete oe.timeout;try{L.req=L.httpModule.request(oe)}catch(ue){L.emit("error",ue);return}L.timing&&(L.startTime=D,L.startTimeNow=ee,L.timings={});var fe;L.timeout&&!L.timeoutTimer&&(L.timeout<0?fe=0:typeof L.timeout=="number"&&isFinite(L.timeout)&&(fe=L.timeout)),L.req.on("response",L.onRequestResponse.bind(L)),L.req.on("error",L.onRequestError.bind(L)),L.req.on("drain",function(){L.emit("drain")}),L.req.on("socket",function(ue){var qe=ue._connecting||ue.connecting;if(L.timing&&(L.timings.socket=T()-L.startTimeNow,qe)){var rt=function(){L.timings.lookup=T()-L.startTimeNow},Ve=function(){L.timings.connect=T()-L.startTimeNow};ue.once("lookup",rt),ue.once("connect",Ve),L.req.once("error",function(){ue.removeListener("lookup",rt),ue.removeListener("connect",Ve)})}var et=function(){L.req.setTimeout(fe,function(){if(L.req){L.abort();var Ye=new Error("ESOCKETTIMEDOUT");Ye.code="ESOCKETTIMEDOUT",Ye.connect=!1,L.emit("error",Ye)}})};if(fe!==void 0)if(qe){var mt=function(){ue.removeListener("connect",mt),L.clearTimeout(),et()};ue.on("connect",mt),L.req.on("error",function(Ye){ue.removeListener("connect",mt)}),L.timeoutTimer=setTimeout(function(){ue.removeListener("connect",mt),L.abort();var Ye=new Error("ETIMEDOUT");Ye.code="ETIMEDOUT",Ye.connect=!0,L.emit("error",Ye)},fe)}else et();L.emit("socket",ue)}),L.emit("request",L.req)}},Y.prototype.onRequestError=function(L){var D=this;if(!D._aborted){if(D.req&&D.req._reusedSocket&&L.code==="ECONNRESET"&&D.agent.addRequestNoreuse){D.agent={addRequest:D.agent.addRequestNoreuse.bind(D.agent)},D.start(),D.req.end();return}D.clearTimeout(),D.emit("error",L)}},Y.prototype.onRequestResponse=function(L){var D=this;if(D.timing&&(D.timings.response=T()-D.startTimeNow),Z("onRequestResponse",D.uri.href,L.statusCode,L.headers),L.on("end",function(){D.timing&&(D.timings.end=T()-D.startTimeNow,L.timingStart=D.startTime,D.timings.socket||(D.timings.socket=0),D.timings.lookup||(D.timings.lookup=D.timings.socket),D.timings.connect||(D.timings.connect=D.timings.lookup),D.timings.response||(D.timings.response=D.timings.connect),Z("elapsed time",D.timings.end),D.elapsedTime+=Math.round(D.timings.end),L.elapsedTime=D.elapsedTime,L.timings=D.timings,L.timingPhases={wait:D.timings.socket,dns:D.timings.lookup-D.timings.socket,tcp:D.timings.connect-D.timings.lookup,firstByte:D.timings.response-D.timings.connect,download:D.timings.end-D.timings.response,total:D.timings.end}),Z("response end",D.uri.href,L.statusCode,L.headers)}),D._aborted){Z("aborted",D.uri.href),L.resume();return}if(D.response=L,L.request=D,L.toJSON=H,D.httpModule===n&&D.strictSSL&&(!L.hasOwnProperty("socket")||!L.socket.authorized)){Z("strict ssl error",D.uri.href);var ee=L.hasOwnProperty("socket")?L.socket.authorizationError:D.uri.href+" does not support SSL";D.emit("error",new Error("SSL Error: "+ee));return}D.originalHost=D.getHeader("host"),D.originalHostHeaderName||(D.originalHostHeaderName=D.hasHeader("host")),D.setHost&&D.removeHeader("host"),D.clearTimeout();var oe=D._jar&&D._jar.setCookie?D._jar:v,fe=function(mt){try{oe.setCookie(mt,D.uri.href,{ignoreError:!0})}catch(Ye){D.emit("error",Ye)}};if(L.caseless=M(L.headers),L.caseless.has("set-cookie")&&!D._disableCookies){var ue=L.caseless.has("set-cookie");Array.isArray(L.headers[ue])?L.headers[ue].forEach(fe):fe(L.headers[ue])}if(!D._redirect.onResponse(L)){{L.on("close",function(){D._ended||D.response.emit("end")}),L.once("end",function(){D._ended=!0});var qe=function(mt){return D.method==="HEAD"||mt>=100&&mt<200||mt===204||mt===304},rt;if(D.gzip&&!qe(L.statusCode)){var Ve=L.headers["content-encoding"]||"identity";Ve=Ve.trim().toLowerCase();var et={flush:h.Z_SYNC_FLUSH,finishFlush:h.Z_SYNC_FLUSH};Ve==="gzip"?(rt=h.createGunzip(et),L.pipe(rt)):Ve==="deflate"?(rt=h.createInflate(et),L.pipe(rt)):(Ve!=="identity"&&Z("ignoring unrecognized Content-Encoding "+Ve),rt=L)}else rt=L;D.encoding&&(D.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):rt.setEncoding(D.encoding)),D._paused&&rt.pause(),D.responseContent=rt,D.emit("response",L),D.dests.forEach(function(mt){D.pipeDest(mt)}),rt.on("data",function(mt){D.timing&&!D.responseStarted&&(D.responseStartTime=new Date().getTime(),L.responseStartTime=D.responseStartTime),D._destdata=!0,D.emit("data",mt)}),rt.once("end",function(mt){D.emit("end",mt)}),rt.on("error",function(mt){D.emit("error",mt)}),rt.on("close",function(){D.emit("close")}),D.callback?D.readResponseBody(L):D.on("end",function(){if(D._aborted){Z("aborted",D.uri.href);return}D.emit("complete",L)})}Z("finish init function",D.uri.href)}},Y.prototype.readResponseBody=function(L){var D=this;Z("reading response's body");var ee=[],oe=0,fe=[];D.on("data",function(ue){u.isBuffer(ue)?ue.length&&(oe+=ue.length,ee.push(ue)):fe.push(ue)}),D.on("end",function(){if(Z("end event",D.uri.href),D._aborted){Z("aborted",D.uri.href),ee=[],oe=0;return}if(oe?(Z("has body",D.uri.href,oe),L.body=u.concat(ee,oe),D.encoding!==null&&(L.body=L.body.toString(D.encoding)),ee=[],oe=0):fe.length&&(D.encoding==="utf8"&&fe[0].length>0&&fe[0][0]==="\uFEFF"&&(fe[0]=fe[0].substring(1)),L.body=fe.join("")),D._json)try{L.body=JSON.parse(L.body,D._jsonReviver)}catch{Z("invalid JSON received",D.uri.href)}Z("emitting complete",D.uri.href),typeof L.body>"u"&&!D._json&&(L.body=D.encoding===null?u.alloc(0):""),D.emit("complete",L,L.body)})},Y.prototype.abort=function(){var L=this;L._aborted=!0,L.req?L.req.abort():L.response&&L.response.destroy(),L.clearTimeout(),L.emit("abort")},Y.prototype.pipeDest=function(L){var D=this,ee=D.response;if(L.headers&&!L.headersSent){if(ee.caseless.has("content-type")){var oe=ee.caseless.has("content-type");L.setHeader?L.setHeader(oe,ee.headers[oe]):L.headers[oe]=ee.headers[oe]}if(ee.caseless.has("content-length")){var fe=ee.caseless.has("content-length");L.setHeader?L.setHeader(fe,ee.headers[fe]):L.headers[fe]=ee.headers[fe]}}if(L.setHeader&&!L.headersSent){for(var ue in ee.headers)(!D.gzip||ue!=="content-encoding")&&L.setHeader(ue,ee.headers[ue]);L.statusCode=ee.statusCode}D.pipefilter&&D.pipefilter(ee,L)},Y.prototype.qs=function(L,D){var ee=this,oe;!D&&ee.uri.query?oe=ee._qs.parse(ee.uri.query):oe={};for(var fe in L)oe[fe]=L[fe];var ue=ee._qs.stringify(oe);return ue===""||(ee.uri=l.parse(ee.uri.href.split("?")[0]+"?"+ue),ee.url=ee.uri,ee.path=ee.uri.path,ee.uri.host==="unix"&&ee.enableUnixSocket()),ee},Y.prototype.form=function(L){var D=this;return L?(/^application\/x-www-form-urlencoded\b/.test(D.getHeader("content-type"))||D.setHeader("content-type","application/x-www-form-urlencoded"),D.body=typeof L=="string"?D._qs.rfc3986(L.toString("utf8")):D._qs.stringify(L).toString("utf8"),D):(D._form=new I,D._form.on("error",function(ee){ee.message="form-data: "+ee.message,D.emit("error",ee),D.abort()}),D._form)},Y.prototype.multipart=function(L){var D=this;return D._multipart.onRequest(L),D._multipart.chunked||(D.body=D._multipart.body),D},Y.prototype.json=function(L){var D=this;return D.hasHeader("accept")||D.setHeader("accept","application/json"),typeof D.jsonReplacer=="function"&&(D._jsonReplacer=D.jsonReplacer),D._json=!0,typeof L=="boolean"?D.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(D.getHeader("content-type"))?D.body=D._qs.rfc3986(D.body):D.body=p(D.body,D._jsonReplacer),D.hasHeader("content-type")||D.setHeader("content-type","application/json")):(D.body=p(L,D._jsonReplacer),D.hasHeader("content-type")||D.setHeader("content-type","application/json")),typeof D.jsonReviver=="function"&&(D._jsonReviver=D.jsonReviver),D},Y.prototype.getHeader=function(L,D){var ee=this,oe,fe,ue;return D||(D=ee.headers),Object.keys(D).forEach(function(qe){qe.length===L.length&&(fe=new RegExp(L,"i"),ue=qe.match(fe),ue&&(oe=D[qe]))}),oe},Y.prototype.enableUnixSocket=function(){var L=this.uri.path.split(":"),D=L[0],ee=L[1];this.socketPath=D,this.uri.pathname=ee,this.uri.path=ee,this.uri.host=D,this.uri.hostname=D,this.uri.isUnix=!0},Y.prototype.auth=function(L,D,ee,oe){var fe=this;return fe._auth.onRequest(L,D,ee,oe),fe},Y.prototype.aws=function(L,D){var ee=this;if(!D)return ee._aws=L,ee;if(L.sign_version===4||L.sign_version==="4"){var oe={host:ee.uri.host,path:ee.uri.path,method:ee.method,headers:ee.headers,body:ee.body};L.service&&(oe.service=L.service);var fe=k.sign(oe,{accessKeyId:L.key,secretAccessKey:L.secret,sessionToken:L.session});ee.setHeader("authorization",fe.headers.Authorization),ee.setHeader("x-amz-date",fe.headers["X-Amz-Date"]),fe.headers["X-Amz-Security-Token"]&&ee.setHeader("x-amz-security-token",fe.headers["X-Amz-Security-Token"])}else{var ue=new Date;ee.setHeader("date",ue.toUTCString());var qe={key:L.key,secret:L.secret,verb:ee.method.toUpperCase(),date:ue,contentType:ee.getHeader("content-type")||"",md5:ee.getHeader("content-md5")||"",amazonHeaders:S.canonicalizeHeaders(ee.headers)},rt=ee.uri.path;L.bucket&&rt?qe.resource="/"+L.bucket+rt:L.bucket&&!rt?qe.resource="/"+L.bucket:!L.bucket&&rt?qe.resource=rt:!L.bucket&&!rt&&(qe.resource="/"),qe.resource=S.canonicalizeResource(qe.resource),ee.setHeader("authorization",S.authorization(qe))}return ee},Y.prototype.httpSignature=function(L){var D=this;return A.signRequest({getHeader:function(ee){return D.getHeader(ee,D.headers)},setHeader:function(ee,oe){D.setHeader(ee,oe)},method:D.method,path:D.path},L),Z("httpSignature authorization",D.getHeader("authorization")),D},Y.prototype.hawk=function(L){var D=this;D.setHeader("Authorization",Q.header(D.uri,D.method,L))},Y.prototype.oauth=function(L){var D=this;return D._oauth.onRequest(L),D},Y.prototype.jar=function(L){var D=this,ee;if(D._redirect.redirectsFollowed===0&&(D.originalCookieHeader=D.getHeader("cookie")),!L)ee=!1,D._disableCookies=!0;else{var oe=L.getCookieString?L:v,fe=D.uri.href;oe&&(ee=oe.getCookieString(fe))}return ee&&ee.length&&(D.originalCookieHeader?D.setHeader("cookie",D.originalCookieHeader+"; "+ee):D.setHeader("cookie",ee)),D._jar=L,D},Y.prototype.pipe=function(L,D){var ee=this;if(ee.response)if(ee._destdata)ee.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(ee._ended)ee.emit("error",new Error("You cannot pipe after the response has been ended."));else return m.Stream.prototype.pipe.call(ee,L,D),ee.pipeDest(L),L;else return ee.dests.push(L),m.Stream.prototype.pipe.call(ee,L,D),L},Y.prototype.write=function(){var L=this;if(!L._aborted&&(L._started||L.start(),L.req))return L.req.write.apply(L.req,arguments)},Y.prototype.end=function(L){var D=this;D._aborted||(L&&D.write(L),D._started||D.start(),D.req&&D.req.end())},Y.prototype.pause=function(){var L=this;L.responseContent?L.responseContent.pause.apply(L.responseContent,arguments):L._paused=!0},Y.prototype.resume=function(){var L=this;L.responseContent?L.responseContent.resume.apply(L.responseContent,arguments):L._paused=!1},Y.prototype.destroy=function(){var L=this;this.clearTimeout(),L._ended?L.response&&L.response.destroy():L.end()},Y.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)},Y.defaultProxyHeaderWhiteList=ke.defaultProxyHeaderWhiteList.slice(),Y.defaultProxyHeaderExclusiveList=ke.defaultProxyHeaderExclusiveList.slice(),Y.prototype.toJSON=R,request$2=Y,request$2}var extend=extend$1,cookies=cookies$1,helpers=helpers$1,paramsHaveRequestBody=helpers.paramsHaveRequestBody;function initParams(t,n,l){typeof n=="function"&&(l=n);var d={};return n!==null&&typeof n=="object"?extend(d,n,{uri:t}):typeof t=="string"?extend(d,{uri:t}):extend(d,t),d.callback=l||d.callback,d}function request$1(t,n,l){if(typeof t>"u")throw new Error("undefined is not a valid uri or options object.");var d=initParams(t,n,l);if(d.method==="HEAD"&&paramsHaveRequestBody(d))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new request$1.Request(d)}function verbFunc(t){var n=t.toUpperCase();return function(l,d,m){var h=initParams(l,d,m);return h.method=n,request$1(h,h.callback)}}request$1.get=verbFunc("get"),request$1.head=verbFunc("head"),request$1.options=verbFunc("options"),request$1.post=verbFunc("post"),request$1.put=verbFunc("put"),request$1.patch=verbFunc("patch"),request$1.del=verbFunc("delete"),request$1.delete=verbFunc("delete"),request$1.jar=function(t){return cookies.jar(t)},request$1.cookie=function(t){return cookies.parse(t)};function wrapRequestMethod(t,n,l,d){return function(m,h,S){var k=initParams(m,h,S),A={};return extend(!0,A,n,k),A.pool=k.pool||n.pool,d&&(A.method=d.toUpperCase()),typeof l=="function"&&(t=l),t(A,A.callback)}}request$1.defaults=function(t,n){var l=this;t=t||{},typeof t=="function"&&(n=t,t={});var d=wrapRequestMethod(l,t,n),m=["get","head","post","put","patch","del","delete"];return m.forEach(function(h){d[h]=wrapRequestMethod(l[h],t,n,h)}),d.cookie=wrapRequestMethod(l.cookie,t,n),d.jar=l.jar,d.defaults=l.defaults,d},request$1.forever=function(t,n){var l={};return n&&extend(l,n),t&&(l.agentOptions=t),l.forever=!0,request$1.defaults(l)};var request_1=request$1;request$1.Request=requireRequest(),request$1.initParams=initParams,Object.defineProperty(request$1,"debug",{enumerable:!0,get:function(){return request$1.Request.debug},set:function(t){request$1.Request.debug=t}});var sha1$1={exports:{}},crypt={exports:{}};(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(l,d){return l<<d|l>>>32-d},rotr:function(l,d){return l<<32-d|l>>>d},endian:function(l){if(l.constructor==Number)return n.rotl(l,8)&16711935|n.rotl(l,24)&4278255360;for(var d=0;d<l.length;d++)l[d]=n.endian(l[d]);return l},randomBytes:function(l){for(var d=[];l>0;l--)d.push(Math.floor(Math.random()*256));return d},bytesToWords:function(l){for(var d=[],m=0,h=0;m<l.length;m++,h+=8)d[h>>>5]|=l[m]<<24-h%32;return d},wordsToBytes:function(l){for(var d=[],m=0;m<l.length*32;m+=8)d.push(l[m>>>5]>>>24-m%32&255);return d},bytesToHex:function(l){for(var d=[],m=0;m<l.length;m++)d.push((l[m]>>>4).toString(16)),d.push((l[m]&15).toString(16));return d.join("")},hexToBytes:function(l){for(var d=[],m=0;m<l.length;m+=2)d.push(parseInt(l.substr(m,2),16));return d},bytesToBase64:function(l){for(var d=[],m=0;m<l.length;m+=3)for(var h=l[m]<<16|l[m+1]<<8|l[m+2],S=0;S<4;S++)m*8+S*6<=l.length*8?d.push(t.charAt(h>>>6*(3-S)&63)):d.push("=");return d.join("")},base64ToBytes:function(l){l=l.replace(/[^A-Z0-9+\/]/ig,"");for(var d=[],m=0,h=0;m<l.length;h=++m%4)h!=0&&d.push((t.indexOf(l.charAt(m-1))&Math.pow(2,-2*h+8)-1)<<h*2|t.indexOf(l.charAt(m))>>>6-h*2);return d}};crypt.exports=n})();var cryptExports=crypt.exports,charenc={utf8:{stringToBytes:function(t){return charenc.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(charenc.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var n=[],l=0;l<t.length;l++)n.push(t.charCodeAt(l)&255);return n},bytesToString:function(t){for(var n=[],l=0;l<t.length;l++)n.push(String.fromCharCode(t[l]));return n.join("")}}},charenc_1=charenc;(function(){var t=cryptExports,n=charenc_1.utf8,l=charenc_1.bin,d=function(h){h.constructor==String?h=n.stringToBytes(h):typeof Buffer$C<"u"&&typeof Buffer$C.isBuffer=="function"&&Buffer$C.isBuffer(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||(h=h.toString());var S=t.bytesToWords(h),k=h.length*8,A=[],B=1732584193,M=-271733879,j=-1732584194,I=271733878,P=-1009589776;S[k>>5]|=128<<24-k%32,S[(k+64>>>9<<4)+15]=k;for(var $=0;$<S.length;$+=16){for(var z=B,N=M,F=j,U=I,J=P,te=0;te<80;te++){if(te<16)A[te]=S[$+te];else{var se=A[te-3]^A[te-8]^A[te-14]^A[te-16];A[te]=se<<1|se>>>31}var de=(B<<5|B>>>27)+P+(A[te]>>>0)+(te<20?(M&j|~M&I)+1518500249:te<40?(M^j^I)+1859775393:te<60?(M&j|M&I|j&I)-1894007588:(M^j^I)-899497514);P=I,I=j,j=M<<30|M>>>2,M=B,B=de}B+=z,M+=N,j+=F,I+=U,P+=J}return[B,M,j,I,P]},m=function(h,S){var k=t.wordsToBytes(d(h));return S&&S.asBytes?k:S&&S.asString?l.bytesToString(k):t.bytesToHex(k)};m._blocksize=16,m._digestsize=20,sha1$1.exports=m})();var sha1Exports=sha1$1.exports,php2js$1={rawurlencode:function(t){return t=(t+"").toString(),encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/\+/g," ")},http_build_query:function(t,n,l){var d,m,h=[],S=function(A,B,M){var j,I=[];if(B===!0?B="1":B===!1&&(B="0"),B!=null)if(typeof B=="object"){for(j in B)B[j]!=null&&I.push(S(A+"["+j+"]",B[j],M));return I.join(M)}else{if(typeof B!="function")return php2js$1.urlencode(A)+"="+php2js$1.urlencode(B);throw new Error("There was an error processing for http_build_query().")}else return""};l||(l="&");for(m in t){d=t[m],n&&!isNaN(m)&&(m=String(n)+m);var k=S(m,d,l);k!==""&&h.push(k)}return h.join(l)},urlencode:function(t){return t=(t+"").toString(),encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}},php2js_1=php2js$1,request=request_1,sha1=sha1Exports,php2js=php2js_1,APIConfig={url:"http://api.jwplatform.com/v1/videos/create",key:"",secret:"",format:"json",kit:"php-1.4"},jwplayer$1={makeRequest:function(t,n){request({url:t,method:"GET",headers:{"Content-Type":"MyContentType","Custom-Header":"Custom Value"}},n)},setArguments:function(t,n){t.api_nonce=Math.floor(Math.random()*1e8),t.api_timestamp=Math.floor(Date.now()/1e3),t.api_key=APIConfig.key,t.api_format=APIConfig.format,t.api_kit=APIConfig.kit;var l={};Object.keys(t).sort().forEach(function(h){l[h]=t[h]});var d="";Object.keys(l).forEach(function(h){d!=""&&(d+="&"),d+=php2js.rawurlencode(h)+"="+php2js.rawurlencode(l[h])}),t.api_signature=sha1(d+APIConfig.secret);var m=APIConfig.url+"?"+php2js.http_build_query(t,"","&");jwplayer$1.makeRequest(m,n)}},jwplayer_1=jwplayer$1;const JwpPlayerWidget=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l={},d=jwplayer_1.Player(this.$[0]),m=!1,h=!0;typeof this.video>"u"&&(this.video=this.media.video),l.file=this.video,l.primary="flash",l.fallback=!1,l.controls=!1,l.width=this.width,this.height&&(l.height=this.height),this.autostart,this.url_transform&&(l.file=this.url_transform(l.file));var S=this.media;S.on("setcurrenttime",function(A){m=h,d.seek(A/1e3)}),S.on("setvolume",function(A){d.setVolume(Math.floor(A*100)),S.volume=A}),S.on("setmuted",function(A){d.setMute(A),S.muted=A}),S.on("setplay",function(){d.play(!0),S.paused=!1}),S.on("setpause",function(){d.pause(!0),S.paused=!0});function k(){S.muted=d.getMute(),S.volume=d.getVolume()/100}l.events={onReady:function(){k(),S.currentTime=new t.Model.Time(1e3*d.getPosition()||0),S.trigger("loadedmetadata")},onTime:function(A){m?(d.pause(!0),m=!1):h&&d.getState()==="PLAYING"&&(h=!1,S.trigger("play")),S.trigger("timeupdate",new t.Model.Time(A.position*1e3))},onPlay:function(){m||(h=!1,S.trigger("play"))},onPause:function(){h=!0,S.trigger("pause")},onSeek:function(){S.trigger("seeked")},onMute:function(A){S.muted=A.mute,S.trigger("volumechange")},onVolume:function(A){S.volume=A.volume/100,S.trigger("volumechange")}},d=d.setup(l),this.jwplayer=d}},Cr(n,"defaults",{}),n},latestAnnotationStyles={},LatestAnnotation=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}importUsers(){if(!this.source.users_data){this.usernames=Array();var l=this,d=this.getWidgetAnnotations(),m="";return d.forEach(function(h){l.usernames.indexOf(h.creator)==-1&&l.usernames.push(h.creator)}),this.usernames.forEach(function(h){m+=h+","}),m=m.substring(0,m.length-1),_url=mustache.render(this.api_users_endpoint,{usernames_list_string:encodeURIComponent(m),usernames_list_length:this.usernames.length}),jQuery.ajax({async:!1,url:_url,type:"GET",success:function(h){l.source.users_data=h.objects},error:function(h,S,k){console.log(h),console.log(S),console.log(k)}})}}draw(){var l=this;this.renderTemplate(),this.annotationContainer_$=this.$.find(".Ldt-LatestAnnotation"),this.selectable_annotations&&(this.onMdpEvent("AnnotationsList.refresh",function(){l.getWidgetAnnotations().forEach(function(d){d.off("click"),d.on("click",function(){var m={},h="",S=this.source.users_data.filter(function(k){return k.username==d.creator});S.length==0?m.username=d.creator:m=S[0],h=l.make_name_string_function(m),_html=mustache.render(l.annotationTemplate,{annotation_created:d.created.toLocaleDateString()+", "+d.created.toLocaleTimeString(),annotation_creator:h,annotation_title:d.title,annotation_content:d.description,copy_and_edit_button:l.copy_and_edit_button,button_text:l.l10n.copy_and_edit}),l.annotationContainer_$.html(_html),l.selectedAnnotation=!0})})}),this.segments=l.source.getAnnotationsByTypeTitle(this.segments_annotation_type),this.segments.forEach(function(d){d.on("click",function(){l.selectedAnnotation=!1})}),this.currentSegment=!1),this.onMediaEvent("timeupdate",function(){l.refresh()}),this.onMediaEvent("settimerange",function(d){l.refresh(d)}),this.starts_hidden?(this.visible=!0,this.hide()):(this.visible=!1,this.show()),this.selectedAnnotation=!1,this.player.trigger("AnnotationsList.refresh"),this.refresh()}refresh(l){l=typeof l<"u"?l:!1;var d=this;if(this.hide_without_segment){if(!l&&!this.media.getTimeRange()){var m=this.media.getCurrentTime(),h=this.segments.filter(function($){return m>=$.begin&&m<=$.end});h.length==0?(this.currentSegment=!1,this.selectedAnnotation=!1):this.currentSegment=h[0]}else{var S=l?l[0]:this.media.getTimeRange()[0],k=l?l[1]:this.media.getTimeRange()[1];if(!this.currentSegment||this.currentSegment.begin!=S||this.currentSegment.end!=k){var h=this.segments.filter(function(z){return z.begin==S&&z.end==k});h.length>0&&(this.selectedAnnotation=!1,this.currentSegment=h[0])}}this.currentSegment?this.visible||this.show():this.visible&&this.hide()}if(this.visible&&!this.selectedAnnotation){var A=this.getWidgetAnnotations();this.filter_by_segment&&(this.currentSegment?A=A.filter(function($){return _annotationTime=($.begin+$.end)/2,d.currentSegment.begin<=_annotationTime&&d.currentSegment.end>=_annotationTime}):A=A.filter(function($){return!1})),A=A.sortBy(function($){return $.created});var B=!1,M="",j="",I={};if(A.length!=0)B=A.pop(),_users=this.source.users_data.filter(function($){return $.username==B.creator}),_users.length==0?I.username=B.creator:I=_users[0],j=this.make_name_string_function(I),M=mustache.render(this.annotationTemplate,{annotation_created:B.created.toLocaleDateString()+", "+B.created.toLocaleTimeString(),annotation_creator:j,annotation_title:B.title,annotation_content:B.description,copy_and_edit_button:this.copy_and_edit_button,button_text:this.l10n.copy_and_edit});else{var P=this.l10n.empty;this.empty_message&&(P=this.empty_message),M="<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-NoAnnotation'>"+P+"</div>"}this.annotationContainer_$.html(M)}this.copy_and_edit_button&&(this.copyAndEditButton_$=this.$.find(".Ldt-LatestAnnotation-CopyEditButton"),this.copyAndEditButton_$.click(this.functionWrapper("copy_and_edit")))}copy_and_edit(){this.player.trigger("CreateAnnotation.show"),this.hide_annotations_list&&this.player.trigger("AnnotationsList.hide"),annotationText=jQuery(".Ldt-LatestAnnotation-Content").get(0).innerHTML,jQuery(".Ldt-CreateAnnotation-Description").removeClass("empty"),jQuery(".Ldt-CreateAnnotation-Description").val(annotationText)}hide(){this.visible&&(this.visible=!1,this.$.find(".Ldt-LatestAnnotation-header").hide(),this.annotationContainer_$.hide())}show(){this.visible||(this.visible=!0,this.$.find(".Ldt-LatestAnnotation-header").show(),this.annotationContainer_$.show())}},Cr(n,"defaults",{pre_draw_callback:function(){return this.importUsers()},from_user:!1,filter_by_segment:!1,segments_annotation_type:"chap",hide_without_segment:!1,annotation_type:"contribution",show_only_annotation_from_user:!1,copy_and_edit_button:!1,hide_annotations_list:!1,selectable_annotations:!1,empty_message:!1,starts_hidden:!1,show_header:!1,custom_header:!1,make_name_string_function:function(l){return l.username?l.username:"Anonymous"}}),Cr(n,"messages",{fr:{copy_and_edit:"Copier et Editer",empty:"Aucune annotation à afficher",header:"Dernière annotation"},en:{copy_and_edit:"Copy and Edit",empty:"No annotation to display",header:"Last annotation"}}),Cr(n,"template","{{#show_header}}<p class='Ldt-LatestAnnotation-header'>{{#custom_header}}{{custom_header}}{{/custom_header}}{{^custom_header}}{{l10n.header}}{{/custom_header}}</p>{{/show_header}}<div class='Ldt-LatestAnnotation'></div>"),Cr(n,"annotationTemplate","<div class='Ldt-LatestAnnotation-Box'>{{#copy_and_edit_button}}<div class='Ldt-LatestAnnotation-CopyEditButton'>{{button_text}}</div>{{/copy_and_edit_button}}<div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-CreationDate'>{{{annotation_created}}}</div><div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Title'>{{{annotation_creator}}}{{#annotation_title}}: {{{annotation_title}}}{{/annotation_title}}</div><div class='Ldt-LatestAnnotation-Element Ldt-LatestAnnotation-Content'>{{{annotation_content}}}</div></div>"),n},mashupPlayerStyles={},MashupPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.is_mashup=!0}draw(){var l=this,d=this.media,m=null,h=null,S,k,A=0,B=!1,M,j,I=d.getMedias();d.paused=!this.autostart&&!this.autoplay;function P(){A>=d.duration&&(d.paused||(d.paused=!0,d.trigger("pause")),A=0);var F=d.getAnnotationAtTime(A);if(typeof F>"u"){m&&(m.pause(),d.paused||(d.paused=!0,d.trigger("pause")));return}if(F!==h){h=F,S=h.annotation.begin.milliseconds,k=h.annotation.end.milliseconds,j=S-h.begin.milliseconds,m=h.getMedia();for(var U=0;U<I.length;U++)I[U].id!==m.id?(l.split_screen||I[U].hide(),I[U].pause()):I[U].show();var J=[],te=d.getAnnotations().filter(function(se){return se.begin>=h.end&&se.getMedia()!==m});_$1(te).each(function(se){var de=se.getMedia();_$1(J).indexOf(de.id)===-1&&(J.push(de.id),de.setCurrentTime(se.annotation.begin.getSeconds()),de.seeking=!0)})}m.setCurrentTime(A+j),m.seeking=!0,d.paused||(m.play(),B=!0,M.show()),d.trigger("timeupdate",new t.Model.Time(A))}this.height||(this.height=Math.floor(this.width/this.aspect_ratio),this.$.css({height:this.height})),this.$.css({background:this.background});var $=Math.ceil(Math.sqrt(I.length)),z=this.split_screen?this.width/$:this.width,N=this.split_screen?this.height/$:this.height;_$1(I).each(function(F,U){var J=jQuery('<div class="Ldt-MashupPlayer-Media"><div class="Ldt-MashupPlayer-Subwidget"></div></div>');J.css({top:l.split_screen?N*Math.floor(U/$):0,left:l.split_screen?z*(U%$):0,height:N,width:z,display:l.split_screen?"block":"none"}),l.$.append(J),l.insertSubwidget(J.find(".Ldt-MashupPlayer-Subwidget"),_$1({type:l.player_type,media_id:F.id,height:N,width:z,url_transform:l.url_transform}).extend(l.player_options)),F.loadedMetadata=!1,F.show=function(){J.show()},F.hide=function(){J.hide()},F.on("loadedmetadata",function(){F.loadedMetadata=!0;for(var te=!0,se=0;se<I.length;se++)te=te&&I[se].loadedMetadata;te&&(M.fadeOut(),P(),d.trigger("loadedmetadata"))}),F.on("timeupdate",function(te){!d.paused&&F===m&&!F.seeking&&(te<k?te>=S?A=te-j:(A=S-j,F.setCurrentTime(S)):(A=k-j,F.pause(),P()),d.trigger("timeupdate",new t.Model.Time(A)))}),F.on("seeked",function(){F.seeking=!1,F===m&&B&&(B=!1,M.hide())}),F.on("play",function(){F===m&&d.trigger("play")}),F.on("pause",function(){F===m&&d.trigger("pause")}),F.on("volumechange",function(){d.muted=F.muted,d.volume=F.volume,d.trigger("volumechange")})}),M=jQuery('<div class="Ldt-MashupPlayer-Waiting"></div>'),this.$.append(M),d.on("setcurrenttime",function(F){A=F,P()}),d.on("setvolume",function(F){for(var U=0;U<I.length;U++)I[U].setVolume(F);d.volume=F}),d.on("setmuted",function(F){for(var U=0;U<I.length;U++)I[U].setMuted(F);d.muted=F}),d.on("setplay",function(){d.paused=!1,P()}),d.on("setpause",function(){d.paused=!0,m&&m.pause()}),d.on("loadedmetadata",P)}},Cr(n,"defaults",{aspect_ratio:14/9,split_screen:!1,player_type:"PopcornPlayer",background:"#000000"}),n},Mediafragment=function(t){return class extends t.Widgets.Widget{constructor(n,l){if(super(n,l),this.last_hash_key="",this.last_hash_value="",this.last_extra_key="",this.last_extra_value="",window.onhashchange=this.functionWrapper("goToHash"),typeof window.addEventListener<"u"){var d=this;window.addEventListener("message",function(m){/^#/.test(m.data)&&d.setWindowHash(m.data)})}this.onMdpEvent("Mediafragment.setHashToAnnotation","setHashToAnnotation"),this.blocked=!1}draw(){this.onMediaEvent("setpause","setHashToTime");var n=this;this.getWidgetAnnotations().forEach(function(l){l.on("click",function(){n.setHashToAnnotation(l)})}),this.media.loadedMetadata?this.goToHash():this.onMediaEvent("loadedmetadata","goToHash")}setWindowHash(n){typeof window.history<"u"&&typeof window.history.replaceState<"u"?window.history.replaceState({},"",n):document.location.hash=n}getLastHash(){var n=document.location.hash.replace(/^#/,"").split("&");return n=_$1(n).filter(function(l){return l&&!/^(id|t)=/.test(l)}),this.last_hash_key&&n.push(this.last_hash_key+"="+this.last_hash_value),this.last_extra_key&&n.push(this.last_extra_key+"="+this.last_extra_value),"#"+n.join("&")}goToHash(){if(document.location.hash!==this.getLastHash())for(var n=document.location.hash.replace(/^#/,"").split("&"),l=0;l<n.length;l++){var d=n[l].split("=");if(d[0]=="id"||d[0]=="t"){if(this.last_hash_key=d[0],this.last_hash_value=d[1],this.last_hash_key=="id"){var m=this.source.getElement(this.last_hash_value);if(typeof m<"u")this.media.setCurrentTime(m.begin);else continue}this.last_hash_key=="t"&&this.media.setCurrentTime(1e3*this.last_hash_value);break}}}setHashToAnnotation(n){this.setHash("id",n.id,"t",n.begin/1e3)}setHashToTime(){this.setHash("t",this.media.getCurrentTime().getSeconds())}setHash(n,l,d,m){if(!this.blocked&&(this.last_hash_key!==n||this.last_hash_value!==l)){this.last_hash_key=n,this.last_hash_value=l,this.last_extra_key=d,this.last_extra_value=m;var h=this.getLastHash();this.setWindowHash(h),window.parent!==window&&window.parent.postMessage(h,"*"),this.block()}}unblock(){typeof this.blockTimeout<"u"&&window.clearTimeout(this.blockTimeout),this.blockTimeout=void 0,this.blocked=!1}block(){typeof this.blockTimeout<"u"&&window.clearTimeout(this.blockTimeout),this.blocked=!0,this.blockTimeout=window.setTimeout(this.functionWrapper("unblock"),1500)}}},mediaListStyles={},MediaList=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastMedia=!1}onSearch(l){this.searchString=typeof l<"u"?l:"";var d=this.refresh(!0);this.searchString&&(d?this.player.trigger("search.matchFound"):this.player.trigger("search.noMatchFound"))}draw(){this.$.addClass("Ldt-MediaListWidget"),this.renderTemplate();var l=this;typeof this.media.getMedias=="function"&&this.media.on("enter-annotation",function(d){l.redraw(d.getMedia())}),this.redraw()}getSegments(l){var d=this,m=this.$.width()/l.duration.milliseconds;return this.getWidgetAnnotations().filter(function(h){return h.getMedia().id==l.id}).map(function(h){var S=h.type=h.annotation;return{left:m*S.begin,width:m*(S.end-S.begin),color:typeof S.color<"u"&&S.color?S.color:d.default_color}})}redraw(l){if(typeof l<"u"){this.$.find(".Ldt-MediaList-Other h2").html(this.l10n.other_media),this.$.find(".Ldt-MediaList-NowPlaying").show(),this.$.find(".Ldt-MediaList-Now-Thumbnail").attr("src",l.thumbnail||this.default_thumbnail),this.$.find(".Ldt-MediaList-Now-Title a").html(l.title),this.$.find(".Ldt-MediaList-Now-Description").html(l.description);var d=l.url||mustache.render(this.media_url_template,{media:l.id});this.$.find(".Ldt-MediaList-NowContainer a").attr("href",d);var m=mustache.render(this.mediaViewTemplate,{segments:this.getSegments(l)});this.$.find(".Ldt-MediaList-Now-MediaView").html(m)}else this.$.find(".Ldt-MediaList-Other h2").html(this.l10n.all_media),this.$.find(".Ldt-MediaList-NowPlaying").hide();var h=this,S=this.source.getMedias().filter(function(A){return A.id!==h.lastMedia});if(S.length){this.$.find(".Ldt-MediaList-Other").show();var k=S.map(function(A){return mustache.render(h.mediaTemplate,{thumbnail:A.thumbnail||h.default_thumbnail,url:A.url||mustache.render(h.media_url_template,{media:A.id}),title:A.title,description:A.description,segments:h.getSegments(A)})}).join("");this.$.find(".Ldt-MediaList-OtherList").html(k)}else this.$.find(".Ldt-MediaList-Other").hide()}},Cr(n,"messages",{fr:{now_playing:"Vidéo en cours",all_media:"Toutes les vidéos",other_media:"Autres vidéos"},en:{now_playing:"Now playing",all_media:"All videos",other_media:"Other videos"}}),Cr(n,"defaults",{default_thumbnail:"http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",media_url_template:"http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/",default_color:"#000080"}),Cr(n,"template",'<div class="Ldt-MediaList-NowPlaying"><h2>{{l10n.now_playing}}</h2><hr /><div class="Ldt-MediaList-NowContainer"><div class="Ldt-MediaList-Now-ThumbContainer"><a href="" target="_blank"><img class="Ldt-MediaList-Now-Thumbnail" src="" /></a></div><h3 class="Ldt-MediaList-Now-Title"><a href="" target="_blank"></a></h3><p class="Ldt-MediaList-Now-Description"></p><div class="Ldt-MediaList-Now-MediaView"></div></div></div><div class="Ldt-MediaList-Other"><h2></h2><hr /><ul class="Ldt-MediaList-OtherList"></ul></div>'),Cr(n,"mediaViewTemplate",'<div class="Ldt-MediaList-MediaView-Background"></div>{{#segments}}<div class="Ldt-MediaList-Segment" style="background: {{color}}; left: {{left}}px; width: {{width}}px;"></div>{{/segments}}'),Cr(n,"mediaTemplate",'<li class="Ldt-MediaList-OtherList-li"><div class="Ldt-MediaList-Other-ThumbContainer"><a href="{{url}}" target="_blank"><img class="Ldt-MediaList-Other-Thumbnail" src="{{thumbnail}}" /></a></div><h3 class="Ldt-MediaList-Other-Title"><a href="{{url}}" target="_blank">{{title}}</a></h3><p class="Ldt-MediaList-Other-Description">{{description}}</p><div class="Ldt-MediaList-Other-MediaView">'+MediaList.mediaViewTemplate+"</div></li>"),n},noteTakingStyles={},NoteTaking=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this,d,m=jQuery;l.renderTemplate(),d=l.$.find(".Ldt-NoteTaking-Text");function h(){m(d).val(window.localStorage[l.editable_storage])}function S(){window.localStorage[l.editable_storage]=m(d).val()}window.localStorage[l.editable_storage]&&h(),m.fn.insertAtCaret=function(A){return this.each(function(){if(this.selectionStart!==void 0){var B=this.selectionStart,M=this.selectionEnd,j=this.scrollTop;this.value=this.value.substring(0,B)+A+this.value.substring(M,this.value.length),this.focus(),this.selectionStart=B+A.length,this.selectionEnd=B+A.length,this.scrollTop=j}else this.value+=A,this.focus(),this.value=this.value})};function k(A,B){var M=A.selectionStart;return A.value.substring(M-B,M+B)}m(d).keydown(function(A){if(A.keyCode==13&&(A.ctrlKey||A.metaKey)){A.preventDefault();var B=/\[([\d:]+)\]/.exec(k(d[0],8));B?l.media.setCurrentTime(t.timestamp2ms(B[1])):(m(d).insertAtCaret("["+new t.Model.Time(l.media.getCurrentTime()).toString()+"]"),S())}}).on("input",function(A){S()}).on("dblclick",function(A){var B=/\[([\d:]+)\]/.exec(k(d[0],8));B&&(A.preventDefault(),l.media.setCurrentTime(t.timestamp2ms(B[1])))})}},Cr(n,"defaults",{editable_storage:""}),Cr(n,"template",'<textarea class="Ldt-NoteTaking-Text"></textarea>'),n},placeholderPlayerStyles={},PlaceholderPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate();var l=!0,d=0,m=new t.Model.Time(0),h=this.media,S=this.$.find(".Ldt-PlaceholderPlayer");function k(){l||(m=new t.Model.Time(new Date().valueOf()-d),m<=h.duration?(h.trigger("timeupdate",m),setTimeout(k,100)):(m=h.duration,h.pause())),S.text(m.toString(!0))}h.on("setcurrenttime",function(A){d=new Date().valueOf()-A,m=new t.Model.Time(A),h.trigger("seeked"),h.trigger("timeupdate",m),S.text(m.toString(!0))}),h.on("setplay",function(){l=!1,d=new Date().valueOf()-m,h.trigger("play"),k()}),h.on("setpause",function(){l=!0,h.trigger("pause"),k()}),h.trigger("loadedmetadata"),h.trigger("setcurrenttime",0),this.autostart&&h.trigger("setplay")}},Cr(n,"defaults",{autostart:!1}),Cr(n,"template",'<div class="Ldt-PlaceholderPlayer">(loading)</div>'),n},polemicStyles={},Polemic=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}getPolemics(l){return(typeof l>"u"||!l)&&(l=this.default_version),this.polemics.constructor===Array?this.polemics:this.polemics[l]}drawNoStackgraph(l,d){var m=this;if(this.is_stackgraph=!1,l){let S=function(k,A,F,M,j){var I=mustache.render('<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-id:{{id}}, media-id:{{media_id}}, polemic:{{polemic}}, time:{{time}}" polemic-color="{{color}}" tweet-title="{{title}}" annotation-id="{{id}}" style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',{id:j.id,media_id:m.source.currentMedia.id,polemic:F,left:k,top:A,color:M,width:m.element_width-1,height:m.element_height,title:j.title,time:j.begin.toString()}),P=jQuery(I);P.on("mouseover",function(){j.trigger("select")}).on("mouseout",function(){j.trigger("unselect")}).on("click",function(){return j.trigger("click"),!1}),t.attachDndData(P,{title:j.title,description:j.description,image:j.thumbnail,uri:typeof j.url<"u"?j.url:document.location.href.replace(/#.*$/,"")+"#id="+j.id,text:"["+j.begin.toString()+"] "+j.title});for(var $=[],z=j.content&&j.content.polemic_version||m.default_version,N=m.getPolemics(z)||[],F,U,J=0;J<N.length;J++)F=N[J],U=t.Model.regexpFromTextOrArray(F.keywords),U.test(j.description)&&$.push(F.color);j.on("select",function(){m.tooltip&&m.tooltip.show(+Math.floor(k+(m.element_width-1)/2),+A,j.title,$.length>1?$:M),m.$tweets.each(function(){var te=jQuery(this);te.css("opacity",te.attr("annotation-id")==j.id?1:.3)})}),j.on("unselect",function(){m.tooltip&&m.tooltip.hide(),m.$tweets.css("opacity",1)}),j.on("found",function(){P.css({background:m.foundcolor,opacity:1})}),j.on("not-found",function(){P.css({background:M,opacity:.3})}),m.$zone.append(P)};this.height=(2+l)*this.element_height,this.$zone.css({width:this.width+"px",height:this.height+"px",position:"relative"});var h=0;_$1(d).forEach(function(k){var A=m.height;k.annotations.forEach(function(B){A-=m.element_height,S(h,A,"none",m.defaultcolor,B)}),_$1(k.polemicStacks).forEach(function(B){var M=B.polemicDef.color,j=B.polemicDef.name;B.annotations.forEach(function(I){A-=m.element_height,S(h,A,j,M,I)})}),h+=m.element_width}),this.$tweets=this.$.find(".Ldt-Polemic-TweetDiv"),this.source.getAnnotations().on("search-cleared",function(){m.$tweets.each(function(){var k=jQuery(this);k.css({background:k.attr("polemic-color"),opacity:1})})})}else this.$zone.hide()}drawStackgraph(l,d){this.is_stackgraph=!0;var m=this;this.height=(2+this.max_elements)*this.element_height,this.$zone.css({width:this.width+"px",height:this.height+"px",position:"relative"});var h=0,S="",k=this.max_elements*this.element_height/l;function A(B,M,j,I,P,$,z,N){S+=mustache.render('<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-block, media-id={{media_id}}, polemic={{polemic}}, time:{{begin}}" pos-x="{{posx}}" pos-y="{{top}}" annotation-counts="{{nums}}" begin-time="{{begin}}" end-time="{{end}}" style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',{nums:P,posx:Math.floor(B+(m.element_width-1)/2),media_id:m.source.currentMedia.id,polemic:N,left:B,top:M,color:I,width:m.element_width-1,height:j,begin:$,end:z})}_$1(d).forEach(function(B){var M=m.height,j=B.annotations.length+"|"+m.defaultcolor+","+_$1(B.polemicStacks).map(function(P){return P.annotations.length+"|"+P.polemicDef.color}).join(",");if(B.annotations.length){var I=Math.ceil(k*B.annotations.length);M-=I,A(h,M,I,m.defaultcolor,j,B.begin,B.end,"none")}_$1(B.polemicStacks).forEach(function(P){if(P.annotations.length){var $=P.polemicDef.color,z=P.polemicDef.name,N=Math.ceil(k*P.annotations.length);M-=N,A(h,M,N,$,j,B.begin,B.end,z)}}),h+=m.element_width}),this.$zone.append(S),this.$tweets=this.$.find(".Ldt-Polemic-TweetDiv"),this.$tweets.mouseover(function(){var B=jQuery(this),M=B.attr("annotation-counts").split(","),j="<p>"+m.l10n.from_+B.attr("begin-time")+m.l10n._to_+B.attr("end-time")+"</p>";j=_$1.reduce(M,function(I,P){var $=P.split("|");return I+='<div class="Ldt-Tooltip-AltColor" style="background: '+$[1]+'"></div><p>'+$[0]+m.l10n._annotations+"</p>",I},j),m.tooltip&&m.tooltip.show(+B.attr("pos-x"),+B.attr("pos-y"),j)}).mouseout(function(){m.tooltip&&m.tooltip.hide()})}draw(){this.onMediaEvent("timeupdate","onTimeupdate"),this.$zone=jQuery("<div>"),this.$zone.addClass("Ldt-Polemic"),this.$.append(this.$zone),this.$elapsed=jQuery("<div>").css({background:"#cccccc",position:"absolute",top:0,left:0,width:0,height:"100%"}),this.$zone.append(this.$elapsed);for(var l=[],d=Math.floor(this.width/this.element_width),m=this.source.getDuration(),h=0,S=this.getWidgetAnnotations(),k=this,A=0;A<d;A++){var B=new t.Model.Time(A*m/d),M=new t.Model.Time((A+1)*m/d),j=0,I={begin:B.toString(),end:M.toString(),annotations:S.filter(function(P){return P.begin>=B&&P.begin<M}),polemicStacks:{}};I.annotations=I.annotations.filter(function(P){for(var $=P.content&&P.content.polemic_version||k.default_version,z=k.getPolemics($)||[],N,F,U,J,te=!0,se=0;se<z.length;se++)N=z[se],J=t.Model.regexpFromTextOrArray(N.keywords),J.test(P.description)&&(F=$+"_"+N.name,U=I.polemicStacks[F]||(I.polemicStacks[F]={polemicDef:N,annotations:[]}),U.annotations.push(P),te=!1,j++);return te}),j+=I.annotations.length,h=Math.max(h,j),l.push(I)}h<this.max_elements?this.drawNoStackgraph(h,l):this.drawStackgraph(h,l),this.$position=jQuery("<div>").addClass("Ldt-Polemic-Position"),this.$zone.append(this.$position),this.$zone.on("click",function(P){var $=P.pageX-k.$zone.offset().left;k.media.setCurrentTime(k.media.duration*$/k.width)}),this.$.append('<div class="Ldt-Polemic-Tooltip"></div>'),this.insertSubwidget(this.$.find(".Ldt-Polemic-Tooltip"),{type:"Tooltip",min_x:0,max_x:this.width},"tooltip")}onTimeupdate(l){var d=Math.floor(this.width*l/this.media.duration);this.$elapsed.css({width:d+"px"}),this.$position.css({left:d+"px"})}},Cr(n,"messages",{fr:{from_:"de ",_to_:" à ",_annotations:" annotation(s)"},en:{from_:"from ",_to_:" to ",_annotations:" annotation(s)"}}),Cr(n,"defaults",{element_width:5,element_height:5,max_elements:20,annotation_type:"tweet",defaultcolor:"#585858",foundcolor:"#fc00ff",default_version:"1",polemics:{1:[{name:"OK",keywords:["++"],color:"#1D973D"},{name:"KO",keywords:["--"],color:"#CE0A15"},{name:"REF",keywords:["==","http://"],color:"#C5A62D"},{name:"Q",keywords:["?"],color:"#036AAE"}],2:[{name:"OK",keywords:["++"],color:"#1D973D"},{name:"KO",keywords:["!!"],color:"#CE0A15"},{name:"REF",keywords:["==","http://"],color:"#C5A62D"},{name:"Q",keywords:["?"],color:"#036AAE"}]}}),n},PopcornPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){typeof this.video>"u"&&(this.video=this.media.video),this.url_transform&&(this.video=this.url_transform(this.video));var l=this.video;if(/^(https?:\/\/)?(www\.)?youtube\.com/.test(this.video)){for(var d=this.video.split(/[?&]/),m={},h=1;h<d.length;h++){var S=d[h].split("=");m[S[0]]=decodeURIComponent(S[1])}m.controls=0,m.modestbranding=1,(this.autostart||this.autoplay)&&(m.autoplay=1),l=d[0]+"?"+jQuery.param(m)}var k=global$1.Popcorn.smart("#"+this.container,l);(this.autostart||this.autoplay)&&k.autoplay(!0);var A=this.media;A.on("setcurrenttime",function(M){k.currentTime(M/1e3)}),A.on("setvolume",function(M){k.volume(M),A.volume=M}),A.on("setmuted",function(M){k.muted(M),A.muted=M}),A.on("setplay",function(){k.play()}),A.on("setpause",function(){k.pause()}),A.on("settimerange",function(M){A.timeRange=M;try{(A.getCurrentTime()>M[0]||A.getCurrentTime()<M)&&k.currentTime(M[0]/1e3)}catch{}}),A.on("resettimerange",function(){A.timeRange=!1});function B(){A.muted=k.muted(),A.volume=k.volume()}k.on("loadedmetadata",function(){B(),A.trigger("loadedmetadata"),A.trigger("volumechange")}),k.on("timeupdate",function(){A.trigger("timeupdate",new t.Model.Time(1e3*k.currentTime()))}),k.on("volumechange",function(){B(),A.trigger("volumechange")}),k.on("play",function(M){A.trigger("play")}),k.on("pause",function(){A.trigger("pause")}),k.on("seeked",function(){A.trigger("seeked")})}},Cr(n,"defaults",{}),n},quizStyles={},Quiz=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}update(l){var d=this;if(this.quiz_activated&&this.correct[l.id]!=1&&this.correct[l.id]!=0){d.quiz_displayed=!0,this.media.pause(),this.annotation=l;var m=l.content.data.question,h=l.content.data.answers,S=l.content.data.resource;jQuery(".Ldt-Quiz-Votes").hide(),jQuery(".Ldt-Pause-Add-Question").hide(),jQuery(".Ldt-Quiz-Container .Ldt-Quiz-Title").html(m);var k=0,A=mustache.render('<span class="Ldt-Quiz-Correct-Answer">{{ correctness.0 }}</span> / <span class="Ldt-Quiz-Incorrect-Answer">{{ correctness.1 }}</span>',{correctness:this.globalScore()});jQuery(".Ldt-Quiz-Index").html(mustache.render("Q{{index}}/{{total}}",{index:l.number+1,total:this.totalAmount})),jQuery(".Ldt-Quiz-Score").html(A),this.question=new t.Widgets.UniqueChoiceQuestion(l),this.resource=new t.Widgets.UniqueChoiceQuestion(S),l.content.data.type=="multiple_choice"?(this.question=new t.Widgets.MultipleChoiceQuestion(l),this.resource=new t.Widgets.MultipleChoiceQuestion(S)):l.content.data.type=="unique_choice"&&(this.question=new t.Widgets.UniqueChoiceQuestion(l),this.resource=new t.Widgets.UniqueChoiceQuestion(S));var B="";for(k=0;k<h.length;k++)B+='<div class="quiz-question-block"><p>'+this.question.renderQuizTemplate(h[k],k)+'<span class="quiz-question-label">'+h[k].content+"</span></p></div>";var M="";S!=null&&(M='<div class="quiz-resource-block" id="resource" >'+S+"</div>"),jQuery(".Ldt-Quiz-Questions").html(M+B),jQuery(".Ldt-Quiz-Overlay").fadeIn(),jQuery(".Ldt-Quiz-Submit").fadeIn(),jQuery(".quiz-question-label").click(function(){var j=jQuery(this).siblings("input");j.prop("checked")&&j.prop("type")=="radio"?d.answer():j.prop("checked",!j.prop("checked"))}),jQuery(".Ldt-Quiz-Submit-Skip-Link").click({media:this.media},function(j){d.hide(),d.player.trigger("QuizCreator.skip"),j.data.media.play()})}}hide(){var l=this;jQuery(".Ldt-Quiz-Votes").hide(),jQuery(".Ldt-Quiz-Overlay").hide(),jQuery(".Ldt-Pause-Add-Question").hide(),l.quiz_displayed=!1}answer(){var l=this;function d(j){return(j||"").replace(/\s(\d+:\d+)/,function(I,P){return' <a href="#t='+t.timestamp2ms(P)/1e3+'">'+P+"</a>"})}var m=l.annotation.content.data.answers,h=0,S=0,k=[];l.$.find(".Ldt-Quiz-Question-Check").each(function(j){var I=jQuery(this).is(":checked");k.push(I?1:0);var P=m[h];P.correct&&!I||!P.correct&&I?(S+=1,jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-incorrect-feedback">'+d(P.feedback)+"</div>")):jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-correct-feedback">'+d(P.feedback)+"</div>"),h++}),S?(jQuery(".Ldt-Quiz-Result").html("Mauvaise réponse"),jQuery(".Ldt-Quiz-Result").css({"background-color":"red"}),this.correct[this.annotation.id]=0):(jQuery(".Ldt-Quiz-Result").html("Bonne réponse !"),jQuery(".Ldt-Quiz-Result").css({"background-color":"green"}),this.correct[this.annotation.id]=1),jQuery(".Ldt-Quiz-Result").animate({height:"100%"},500,"linear",function(){jQuery(".Ldt-Quiz-Result").delay(2e3).animate({height:"0%"},500)});var A=this.annotation.number+1,B=this.globalScore(),M="";M+='<span class="Ldt-Quiz-Correct-Answer">'+B[0]+'</span> / <span class="Ldt-Quiz-Incorrect-Answer">'+B[1]+"</span>",jQuery(".Ldt-Quiz-Index").html("Q"+A+"/"+this.totalAmount),jQuery(".Ldt-Quiz-Score").html(M),this.submit(this.user,this.userid,this.annotation.id,S?"wrong_answer":"right_answer",k.join("")),jQuery(".Ldt-Quiz-Submit").fadeOut(400,function(){jQuery(".Ldt-Quiz-Votes").show()})}globalScore(){var l=_.values(this.correct),d=l.filter(function(h){return h==1}).length,m=l.filter(function(h){return h==0}).length;return[d,m]}refresh(){var l=this.getWidgetAnnotations().sortBy(function(m){return m.begin}),d=this;d.totalAmount=l.length,d.number=0,d.correct={},d.keys={},l.forEach(function(m){d.correct[m.id]=-1,d.keys[d.number]=m.id,m.number=d.number++})}draw(){var l=this;l.quiz_displayed=!1,this.onMediaEvent("enter-annotation",function(d){var m=l.getWidgetAnnotations().filter(function(h){return h===d});m.number===void 0&&l.refresh(),m.length&&l.update(m[0])}),this.onMdpEvent("Quiz.activate",function(){l.quiz_activated=!0}),this.onMdpEvent("Quiz.deactivate",function(){l.quiz_activated=!1,l.hide()}),this.onMdpEvent("Quiz.hide",function(){l.hide()}),this.onMdpEvent("Quiz.refresh",function(){l.refresh()}),this.onMediaEvent("pause",function(){l.quiz_displayed||jQuery(".Ldt-Pause-Add-Question").show()}),this.onMediaEvent("play",function(){jQuery(".Ldt-Pause-Add-Question").hide()}),l.overlay=jQuery("<div class='Ldt-Quiz-Overlay'></div>").appendTo(jQuery("#"+l.container)),l.PauseAddQuestion=jQuery("<div class='Ldt-Pause-Add-Question' title='Ajoutez une question !'>").on("click",function(){l.player.trigger("QuizCreator.create")}).appendTo(jQuery("#"+l.container)),l.overlay.html(this.template),jQuery(".Ldt-Quiz-Overlay").hide(),jQuery(".Ldt-Quiz-Submit input").click(function(){l.answer()}),jQuery(".Ldt-Quiz-Submit-Skip-Link").click({media:this.media},function(d){l.submit(l.user,l.userid,l.annotation.id,"skipped_answer",0),l.hide(),l.player.trigger("QuizCreator.skip"),d.data.media.play()}),jQuery('.Ldt-Quiz-Votes-Buttons input[type="button"], .Ldt-Quiz-Votes-Buttons a').click({media:this.media},function(d){var m,h;jQuery(this).hasClass("Ldt-Quiz-Vote-Useful")?(m="useful",h=1):jQuery(this).hasClass("Ldt-Quiz-Vote-Useless")?(m="useless",h=-1,jQuery(".Ldt-Ctrl-Quiz-Create").addClass("button_highlight").delay(5e3).queue(function(){jQuery(this).removeClass("button_highlight").dequeue()})):(m="skipped_vote",h=0),l.submit(l.user,l.userid,l.annotation.id,m,h),d.data.media.play(),l.hide(),jQuery(".Ldt-Pause-Add-Question").hide(),l.player.trigger("QuizCreator.skip")}),l.refresh()}},Cr(n,"defaults",{quiz_activated:!0,api_serializer:"ldt_annotate",analytics_api:"",api_method:"POST",user:"",userid:""}),Cr(n,"template",'<div class="Ldt-Quiz-Container"><div class="Ldt-Quiz-Header">  <div class="Ldt-Quiz-Index"></div><div class="Ldt-Quiz-Score"></div></div><div class="Ldt-Quiz-Content">  <h1 class="Ldt-Quiz-Title">{{question}}</h1>  <div class="Ldt-Quiz-Questions">  </div></div><div class="Ldt-Quiz-Footer">  <div class="Ldt-Quiz-Votes">      <span class="Ldt-Quiz-Votes-Question">Avez-vous trouvé cette question utile ?</span>      <div class="Ldt-Quiz-Votes-Buttons">          <div class="Ldt-Quiz-Vote-Skip-Block"><a href="#" class="Ldt-Quiz-Vote-Skip">Passer</a></div>          <div><input type="button" value="Non" class="Ldt-Quiz-Vote-Useless" /></div>          <div><input type="button" value="Oui" class="Ldt-Quiz-Vote-Useful" /></div>      </div>  </div>  <div class="Ldt-Quiz-Submit">      <div class="Ldt-Quiz-Submit-Button"><input type="button" value="Valider" /></div>      <div class="Ldt-Quiz-Submit-Skip-Link"><a href="#">Passer</a></div><div style="clear:both;"></div>  </div>  <div class="Ldt-Quiz-Result">Bonne réponse</div></div></div>'),Cr(n,"annotationTemplate",""),n},UniqueChoiceQuestion=function(t){return class extends t.Widgets.Widget{constructor(n){this.annotation=n}renderQuizTemplate(n,l){return'<input type="radio" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question" data-question="'+l+'" value="'+l+'" />'}renderTemplate(n,l){var d=this.generateUid();return'<input type="radio" id="'+d+'" class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question" data-question="'+l+'" value="'+l+'" /><label for="'+d+'" title="Veuillez sélectionner la réponse correcte"></label>'}renderFullTemplate(n,l){var d=n&&n.correct?"checked":"",m=this.generateUid();return'<input type="radio" id="'+m+'" '+d+' class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question" data-question="'+l+'" value="'+l+'" /><label for="'+m+'"></label>'}}},MultipleChoiceQuestion=function(t){return class extends t.Widgets.Widget{constructor(n){this.annotation=n}renderQuizTemplate(n,l){return'<input type="checkbox" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+l+'" name="question['+l+']" data-question="'+l+'" value="'+l+'" /> '}renderTemplate(n,l){var d=this.generateUid();return'<input type="checkbox" id="'+d+'" class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+l+']" data-question="'+l+'" value="'+l+'" /><label for="'+d+'" title="Veuillez sélectionner la ou les réponses correctes"></label>'}renderFullTemplate(n,l){var d=n&&n.correct?"checked":"",m=this.generateUid();return'<input type="checkbox" id="'+m+'" '+d+' class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+l+']" data-question="'+l+'" value="'+l+'" /><label for="'+m+'"></label> '}submit(n,l,d,m,h){var S=this,k=mustache.render(this.analytics_api,{id:this.source.projectId}),A={username:n,useruuid:l,subject:d,property:m,value:h,session:S.session_id};jQuery.ajax({url:k,type:this.api_method,contentType:"application/json",data:JSON.stringify(A),success:function(B){},error:function(B,M,j){t.log("Error when sending annotation",j)}})}}},quizCreatorStyles={},QuizCreator=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}skip(){this.$.find(".Ldt-QuizCreator-Time").val(""),this.$.find(".Ldt-QuizCreator-Question-Area").val(""),this.$.find(".Ldt-QuizCreator-Resource-Area").val(""),this.$.find(".Ldt-QuizCreator-Questions-Block").html(""),this.current_annotation=void 0}nbAnswers(){var l=this.$.find(".Ldt-QuizCreator-Questions-Answer").length;return l}draw(){var l=this;this.onMediaEvent("timeupdate",function(d){l.setBegin(d)}),this.onMdpEvent("QuizCreator.show",function(){l.setBegin(l.media.currentTime)}),this.onMdpEvent("QuizCreator.create",function(){l.skip(),l.setBegin(l.media.currentTime)}),this.onMdpEvent("QuizCreator.skip",function(){l.skip()}),this.onMdpEvent("QuizCreator.edit",function(d){l.skip(),l.addQuestion(d)}),this.$.on("click",".Ldt-QuizCreator-Remove",function(){jQuery(this).parents(".Ldt-QuizCreator-Questions-Answer").remove()}),this.begin=new t.Model.Time,this.end=this.source.getDuration(),this.answers=[],this.renderTemplate(),this.question=new t.Widgets.UniqueChoiceQuestion,this.$.find(".Ldt-QuizCreator-Question-Type").bind("change",this.functionWrapper("onQuestionTypeChange")),this.$.find(".Ldt-QuizCreator-Question-Add").bind("click",this.functionWrapper("onQuestionAdd")),this.$.find(".Ldt-QuizCreator-Question-Save").bind("click",this.functionWrapper("onSave")),this.$.find(".Ldt-QuizCreator-Time").keyup(function(){var d=l.$.find(".Ldt-QuizCreator-Time").val();l.begin=t.timestamp2ms(d),l.end=l.begin+1e3}),this.onMediaEvent("timeupdate",function(d){l.getDescription()&&l.setBegin(d)})}getDescription(){return this.$.find(".Ldt-QuizCreator-Question-Area").val().trim()}addQuestion(l,d){var m=this;l.content.data.type=="multiple_choice"?this.question=new t.Widgets.MultipleChoiceQuestion(l):l.content.data.type=="unique_choice"&&(this.question=new t.Widgets.UniqueChoiceQuestion(l));var h=l.content.data.answers;this.answers=[],this.$.find(".Ldt-QuizCreator-Time").val(l.begin),this.$.find(".Ldt-QuizCreator-Question-Area").val(l.content.data.question),this.$.find(".Ldt-QuizCreator-Resource-Area").val(l.content.data.resource),this.$.find(".Ldt-QuizCreator-Questions-Block").html(""),h.forEach(function(S){m.onQuestionAdd(null,S)}),m.current_annotation=l}onQuestionTypeChange(l){var d=this.$.find(".Ldt-QuizCreator-Question-Type"),m=d.val(),h=this;switch(m){case"unique_choice":this.question=new t.Widgets.UniqueChoiceQuestion;break;case"multiple_choice":this.question=new t.Widgets.MultipleChoiceQuestion;break}var S="";h.$.find(".Ldt-QuizCreator-Questions-Block").html(S),this.pauseOnWrite()}onQuestionAdd(l,d){var m='<div class="Ldt-QuizCreator-Questions-Answer">Réponse <div class="Ldt-QuizCreator-Questions-Answer-Correct">'+this.question.renderFullTemplate(d,this.nbAnswers())+'</div><br /><div class="Ldt-QuizCreator-Questions-Answer-Content"><input type="text" class="Ldt-QuizCreator-Answer-Content" data-question="'+this.nbAnswers()+'" id="question'+this.nbAnswers()+'"'+(d?' value="'+d.content+'"':"")+'/><br />Commentaire <br/><textarea class="Ldt-QuizCreator-Answer-Feedback" data-question="'+this.nbAnswers()+'" id="feedback'+this.nbAnswers()+'">'+(d?d.feedback:"")+'</textarea></div><div class="Ldt-QuizCreator-Questions-Answer-Delete"><div class="Ldt-QuizCreator-Remove">&nbsp;</div></div></div>';this.$.find(".Ldt-QuizCreator-Questions-Block").append(m),this.$.find(".Ldt-QuizCreator-Answer-Content").last().focus(),this.pauseOnWrite()}pauseOnWrite(){this.pause_on_write&&!this.media.getPaused()&&this.media.pause()}setBegin(l){this.begin=new t.Model.Time(l||0),this.end=this.begin+500,this.$.find(".Ldt-QuizCreator-Time").val(this.begin.toString())}get_local_annotation(l){return this.player.getLocalAnnotation(l)}save_local_annotations(){this.player.saveLocalAnnotations(),this.source.merge(this.player.localSource)}delete_local_annotation(l){this.source.getAnnotations().removeId(l),this.player.deleteLocalAnnotation(l),this.current_annotation=void 0,this.refresh(!0)}show(){this.$.find(".Ldt-QuizCreator-Question-Area").focus()}hide(){this.$.find(".Ldt-QuizCreator-Questions-Block").html(""),this.$.find(".Ldt-QuizCreator-Question-Area").val(""),this.$.find(".Ldt-QuizCreator-Resource-Area").val(""),this.$.find(".Ldt-QuizCreator-Time").val("")}onSave(l,d){var m=!1;if(this.nbAnswers()<=0)return alert("Vous devez spécifier au moins une réponse à votre question !"),!1;if(!this.$.find(".quiz-question-edition:checked").length)return alert("Vous n'avez pas indiqué de bonne réponse."),!1;var h;if(this.current_annotation)m=!1,h=this.current_annotation;else{m=!0;var S=this.source.getAnnotationTypes().searchByTitle(this.annotation_type,!0),k=S.length?S[0]:new t.Model.AnnotationType(!1,this.player.localSource);S.length||(k.dont_send_id=!0,k.title=this.annotation_type),h=new t.Model.Annotation(!1,this.player.localSource),h.created=new Date,h.creator=this.creator_name,h.setAnnotationType(k.id),this.player.localSource.getMedias().push(this.source.currentMedia),h.setMedia(this.source.currentMedia.id)}h.setBeginEnd(this.begin,this.end),h.modified=new Date,h.contributor=this.creator_name,h.description=this.getDescription(),h.title=h.description,h.content={},h.content.data={},h.content.data.type=this.$.find(".Ldt-QuizCreator-Question-Type").val(),h.content.data.question=h.description,h.content.data.resource=this.$.find(".Ldt-QuizCreator-Resource-Area").val(),h.content.data.answers=jQuery.makeArray(jQuery(".Ldt-QuizCreator-Questions-Answer").map(function(A){return{content:jQuery(this).find(".Ldt-QuizCreator-Answer-Content").val(),feedback:jQuery(this).find(".Ldt-QuizCreator-Answer-Feedback").val(),correct:jQuery(this).find(".Ldt-Quiz-Question-Check").is(":checked")}})),this.current_annotation=h,m?(this.player.addLocalAnnotation(h),this.source.merge([h]),this.player.trigger("Annotation.create",h)):(this.player.saveLocalAnnotations(),this.player.trigger("Annotation.update",h)),this.player.trigger("AnnotationsList.update"),this.player.trigger("Quiz.refresh")}},Cr(n,"defaults",{creator_name:"",tags:!1,tag_titles:!1,pause_on_write:!0,annotation_type:"Quiz",api_serializer:"ldt_annotate",api_endpoint_template:"",api_method:"POST"}),Cr(n,"messages",{en:{},fr:{}}),Cr(n,"template",'<div class="Ldt-QuizCreator-Ui Ldt-TraceMe"><div class="Ldt-QuizCreator-Question-Form"><textarea class="Ldt-QuizCreator-Question-Area" placeholder="Votre question"></textarea><br /><textarea class="Ldt-QuizCreator-Resource-Area" placeholder="Ressources (lien vers une image, etc.)"></textarea><br /></div><p>Type de question  <select name="type" class="Ldt-QuizCreator-Question-Type"><option value="unique_choice">Choix unique</option><option value="multiple_choice">Choix multiple</option></select> à <input type="text" placeholder="hh:mm:ss" size="6" class="Ldt-QuizCreator-Time" /><div class="Ldt-QuizCreator-Questions-Block"></div><div>  <button class="Ldt-QuizCreator-Question-Add">Ajouter une réponse</button><hr>  <button class="Ldt-QuizCreator-Question-Save">Sauvegarder</button></div></div>'),n},segmentsStyles={},Segments=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}do_draw(l){this.width!=this.$.parent().width()&&this.scale_to_parent&&(this.width=this.$.parent().width(),this.$.css({width:this.width+"px"}));var d=this,m=this.getWidgetAnnotations().filter(function(M){return M.getDuration()>0&&M.getMedia().id==d.media.id}),h=this.width/this.source.getDuration(),S=this.$.find(".Ldt-Segments-List"),k=[],A=1;function B(M,j,I,P){function $(N){return Math.floor(240*(1-P)+N*P)}for(var z=(65536*$(M)+256*$(j)+$(I)).toString(16);z.length<6;)z="0"+z;return"#"+z}l&&this.$.find(".Ldt-Segments-Segment").remove(),m.forEach(function(M,j){var I=M.begin*h,P=M.getDuration()*h,$=Math.floor(I+P/2),z=M.title+(M.description?"<br/>"+M.description:""),N=_$1(k).find(function(T){return!_$1(T.annotations).find(function(u){return u.begin<M.end&&u.end>M.begin})});N||(N={index:k.length,annotations:[]},k.push(N)),N.annotations.push(M);var F=(1-d.overlap)*N.index*d.line_height,U=typeof M.color<"u"&&M.color?M.color:d.colors[j%d.colors.length],J=parseInt(U.substr(1,2),16),te=parseInt(U.substr(3,2),16),se=parseInt(U.substr(5,2),16),de=B(J,te,se,.5),Q=B(J,te,se,.2),ve={color:U,medcolor:de,lowcolor:Q,text:(M.creator?M.creator+" : ":"")+z.replace(/(\n|\r|\r\n)/gm," ").replace(/(^.{120,140})[\s].+$/m,"$1&hellip;"),left:I,width:P,top:F,height:d.line_height-1,id:M.id,media_id:M.getMedia().id,from:M.begin.toString(),to:M.end.toString()},he=mustache.render(d.constructor.annotationTemplate,ve),ke=jQuery(he);ke.on("mouseover",function(){M.trigger("select")}).on("mouseout",function(){M.trigger("unselect")}).on("click",function(){d.use_timerange&&(d.media.getTimeRange()?d.media.getTimeRange()[0]==M.begin||d.media.getTimeRange()[1]==M.end?(d.media.resetTimeRange(),d.$segments.each(function(){var T=jQuery(this);T.css("background",Q).removeClass("selected"),M.trigger("select")})):(d.media.setCurrentTime(M.begin),d.media.setTimeRange(M.begin,M.end),d.media.play(),d.$segments.each(function(){var T=jQuery(this);T.css("background",Q).removeClass("selected")}),ke.css("background",d.selected_color).addClass("selected")):(d.media.setCurrentTime(M.begin),d.media.setTimeRange(M.begin,M.end),d.media.play(),d.$segments.each(function(){var T=jQuery(this);T.css("background",Q).removeClass("selected")}),ke.css("background",d.selected_color).addClass("selected"))),M.trigger("click")}).appendTo(S),t.attachDndData(ke,{title:M.title,description:M.description,uri:typeof M.url<"u"?M.url:document.location.href.replace(/#.*$/,"")+"#id="+M.id,image:M.thumbnail,text:"["+M.begin.toString()+"] "+M.title}),M.on("select",function(){d.$segments.each(function(){var T=jQuery(this);T.css({background:T.hasClass("found")?d.faded_found_color:T.attr("data-low-color")}),T.css({background:T.hasClass("selected")?d.faded_selected_color:T.attr("data-low-color")})}),ke.css({background:ke.hasClass("found")?d.found_color:U,background:ke.hasClass("selected")?d.selected_color:U,"z-index":++A}),d.tooltip&&d.tooltip.show($,F,ve.text,ve.color)}),M.on("unselect",function(){d.tooltip&&d.tooltip.hide(),d.$segments.each(function(){var T=jQuery(this);T.css("background",T.hasClass("found")?d.found_color:T.attr("data-medium-color")),T.css("background",T.hasClass("selected")?d.selected_color:T.attr("data-medium-color"))})}),M.on("found",function(){ke.css("background",d.found_color).addClass("found")}),M.on("not-found",function(){ke.css("background",Q).removeClass("found")})}),this.onMediaEvent("resettimerange",function(){d.$segments.each(function(){var M=jQuery(this);M.removeClass("selected")})}),this.$.css({width:this.width+"px",height:((1-this.overlap)*k.length+this.overlap)*this.line_height+"px",background:this.background,margin:"1px 0"}),this.$segments=this.$.find(".Ldt-Segments-Segment")}draw(){var l=this;l.onMediaEvent("timeupdate","onTimeupdate"),l.renderTemplate(),l.do_draw(),this.no_tooltip||l.insertSubwidget(l.$.find(".Ldt-Segments-Tooltip"),{type:"Tooltip",min_x:0,max_x:this.width},"tooltip"),l.source.getAnnotations().on("search",function(){searching=!0}),l.source.getAnnotations().on("search-cleared",function(){searching=!1,_this.$segments.each(function(){var d=jQuery(this);d.css("background",d.attr("data-medium-color")).removeClass("found")})}),this.$.on("resize",function(){l.do_draw(!0)})}onTimeupdate(l){var d=Math.floor(this.width*l/this.media.duration);this.$.find(".Ldt-Segments-Position").css({left:d+"px"})}},Cr(n,"defaults",{annotation_type:"chap",colors:["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],line_height:8,background:"#e0e0e0",overlap:.25,found_color:"#FF00FC",faded_found_color:"#ff80fc",selected_color:"#74d600",faded_selected_color:"#baf9b5",no_tooltip:!1,use_timerange:!1,scale_to_parent:!0}),Cr(n,"template",'<div class="Ldt-Segments-List"></div><div class="Ldt-Segments-Position"></div><div class="Ldt-Segments-Tooltip"></div>'),Cr(n,"annotationTemplate",'<div class="Ldt-Segments-Segment Ldt-TraceMe" trace-info="segment-id:{{id}}, media-id:{{media_id}}, from:{{from}}, to:{{to}}" segment-text="{{text}}"style="top:{{top}}px; height:{{height}}px; left:{{left}}px; width:{{width}}px; background:{{medcolor}}" data-base-color="{{color}}" data-low-color="{{lowcolor}}" data-medium-color="{{medcolor}}"></div>'),n},shortcutsStyles={},Shortcuts=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this;Mousetrap.bindGlobal("ctrl+space",function(d){return d.preventDefault(),l.media.getPaused()?l.media.play():l.media.pause(),!1}),Mousetrap.bindGlobal("ctrl+left",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.max(0,l.media.getCurrentTime()-l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+shift+left",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.max(0,l.media.getCurrentTime()-5*l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+right",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.min(l.media.duration,l.media.getCurrentTime()+l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+shift+right",function(d){return d.preventDefault(),l.media.setCurrentTime(Math.min(l.media.duration,l.media.getCurrentTime()+5*l.time_increment)),!1}),Mousetrap.bindGlobal("ctrl+a",function(d){return d.preventDefault(),l.player.trigger("CreateAnnotation.toggle"),!1})}},Cr(n,"defaults",{time_increment:2e3}),n},sliceStyles={},Slice=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.sliding=!1}draw(){this.renderTemplate(),this.$slider=this.$.find(".Ldt-Slice"),this.show_arrow&&this.insertSubwidget(this.$.find(".Ldt-Slice-Arrow"),{type:"Arrow"},"arrow"),this.min=0,this.max=this.media.duration.valueOf();var l=this,d;this.$slider.slider({range:!0,values:[0,this.max],min:0,max:this.max,change:function(m,h){l.arrow&&l.arrow.moveToTime((h.values[0]+h.values[1])/2),l.onBoundsChanged&&l.onBoundsChanged(h.values[0],h.values[1])},start:function(){l.sliding=!0,l.media.getPaused()||l.media.pause(),d=l.media.getCurrentTime()},slide:function(m,h){l.media.setCurrentTime(h.value)},stop:function(){l.sliding=!1,l.media.setCurrentTime(d)}}),this.$slider.find(".ui-slider-handle:first").addClass("Ldt-Slice-left-handle"),this.$slider.find(".ui-slider-handle:last").addClass("Ldt-Slice-right-handle"),this.getWidgetAnnotations().forEach(function(m){m.on("enter",function(){l.setBounds(m.begin,m.end)})}),this.player.on("annotation-click",function(m){l.setBounds(m.begin,m.end)})}setBounds(l,d){this.$slider.slider("values",[l,d])}show(){this.$slider.show()}hide(){this.$slider.hide()}},Cr(n,"defaults",{show_arrow:!1}),Cr(n,"template",'<div class="Ldt-Slice"></div>{{#show_arrow}}<div class="Ldt-Slice-Arrow"></div>{{/show_arrow}}'),n},slidePreviewStyles={},SlidePreview=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.getWidgetAnnotations().sortBy(function(m){return m.begin});var l=this;l.renderTemplate();var d=l.$.find(".Ldt-SlidePreview-Slides");this.getWidgetAnnotations().forEach(function(m){var h={id:m.id,content:t.textFieldHtml(m.title),begin:m.begin.toString(),ms:m.begin.milliseconds,thumbnail:m.thumbnail},S=mustache.render(l.annotationTemplate,h),k=jQuery(S);d.append(k)}),l.$.on("click",".Ldt-SlidePreview-Item",function(){l.media.setCurrentTime(Number(this.dataset.timecode))})}},Cr(n,"defaults",{annotation_type:"Slides"}),Cr(n,"template",'<div class="Ldt-SlidePreview-Container"><div class="Ldt-SlidePreview-Slides"></div></div>'),Cr(n,"annotationTemplate",'<div data-id="{{ id }}" data-timecode="{{ ms }}" class="Ldt-SlidePreview-Item"><img title="{{ begin }} - {{ atitle }}" class="Ldt-AnnotationsList-Thumbnail" src="{{ thumbnail }}"></div>'),n},sliderStyles={},Slider=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"calculateHandleCss",function(d){return{height:2+d+"px",width:2+d+"px","margin-left":-Math.ceil(2+d/2)+"px"}})}draw(){this.renderTemplate(),this.$time=this.$.find(".Ldt-Slider-Time"),this.$slider=this.$.find(".Ldt-Slider");var d=this;this.$slider.slider({range:"min",value:0,min:0,max:this.source.getDuration().milliseconds,slide:function(m,h){d.media.setCurrentTime(h.value),d.player.trigger("Mediafragment.setHashToTime")}}),this.$handle=this.$slider.find(".ui-slider-handle"),this.onMediaEvent("timeupdate","onTimeupdate"),this.onMdpEvent("Player.MouseOver","onMouseover"),this.onMdpEvent("Player.MouseOut","onMouseout"),this.minimize_timeout&&(this.$slider.css(this.calculateSliderCss(this.minimized_height)),this.$handle.css(this.calculateHandleCss(this.minimized_height)),this.maximized=!1,this.timeoutId=!1),this.$slider.mouseover(function(){d.$time.show(),d.onMouseover()}).mouseout(this.functionWrapper("onMouseout")).mousemove(function(m){var h=m.pageX-d.$.offset().left,S=new t.Model.Time(d.media.duration*h/d.width);d.$time.text(S.toString()).css("left",h)})}onTimeupdate(d){this.$slider.slider("value",d),this.player.trigger("Arrow.updatePosition",{widget:this.type,time:d})}onMouseover(){this.minimize_timeout&&(this.timeoutId&&(window.clearTimeout(this.timeoutId),this.timeoutId=!1),this.maximized||(this.animateToHeight(this.maximized_height),this.maximized=!0))}onMouseout(){if(this.$time.hide(),this.minimize_timeout){this.timeoutId&&(window.clearTimeout(this.timeoutId),this.timeoutId=!1);var d=this;this.timeoutId=window.setTimeout(function(){d.maximized&&(d.animateToHeight(d.minimized_height),d.maximized=!1),d.timeoutId=!1},this.minimize_timeout)}}animateToHeight(d){this.$slider.stop().animate(this.calculateSliderCss(d),500,function(){jQuery(this).css("overflow","visible")}),this.$handle.stop().animate(this.calculateHandleCss(d),500,function(){jQuery(this).css("overflow","visible")})}calculateSliderCss(d){return{height:d+"px","margin-top":this.minimized_height-d+"px"}}},Cr(n,"defaults",{minimized_height:4,maximized_height:4,minimize_timeout:1500}),Cr(n,"template",'<div class="Ldt-Slider"></div><div class="Ldt-Slider-Time">00:00</div>'),n},slideVideoPlayerStyles={},SlideVideoPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"template",'<div class="Ldt-SlideVideoPlayer">  <div class="Ldt-SlideVideoPlayer-slide Ldt-SlideVideoPlayer-panel">  </div>  <div class="Ldt-SlideVideoPlayer-video Ldt-SlideVideoPlayer-panel">  </div></div>')}draw(){var d=this;d.renderTemplate(),this.insertSubwidget(d.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide"),{type:"ImageDisplay",annotation_type:d.annotation_type},"slide"),this.insertSubwidget(d.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video"),{type:d.playerModule,video:d.video,width:"100%",url_transform:d.url_transform},"player"),d.mode=="pip"?(d.$.find(".Ldt-SlideVideoPlayer-panel").append('<div class="Ldt-SlideVideoPlayer-pip-menu"><div class="Ldt-SlideVideoPlayer-pip-menu-toggle"></div></div>'),d.$.on("click",".Ldt-SlideVideoPlayer-pip-menu-toggle",function(){d.toggleMainDisplay()}),window.setTimeout(function(){d.setMainDisplay("video")},1500)):window.setTimeout(function(){d.$.find(".Ldt-SlideVideoPlayer").touchSplit({orientation:screen.height>screen.width?"vertical":"horizontal",leftMin:20,topMin:20})},1500)}toggleMainDisplay(){this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video").hasClass("Ldt-SlideVideoPlayer-pip-main")?this.setMainDisplay("slides"):this.setMainDisplay("video")}setMainDisplay(d){var m=this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video"),h=this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide");if(d=="slides"){var S=m;m=h,h=S}m.removeClass("Ldt-SlideVideoPlayer-pip-pip").addClass("Ldt-SlideVideoPlayer-pip-main"),h.removeClass("Ldt-SlideVideoPlayer-pip-main").addClass("Ldt-SlideVideoPlayer-pip-pip")}},Cr(n,"defaults",{playerModule:"HtmlPlayer",mode:"sidebyside"}),n},socialStyles={},Social=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate(),this.clipId=_$1.uniqueId("Ldt-Social-CopyBtn-"),this.$.find(".Ldt-Social-CopyBtn").attr("id",this.clipId);var l=this;this.$.find(".Ldt-Social-Url").click(function(){return l.toggleCopy(),!1}).on("dragstart",function(d){d.originalEvent.dataTransfer.setData("text/x-iri-title",l.text),d.originalEvent.dataTransfer.setData("text/x-iri-uri",l.url)}),this.$.find(".Ldt-Social-Input").focus(function(){this.select()}),this.$.find(".Ldt-Social-Ext").click(function(){return window.open(jQuery(this).attr("href"),"_blank","height=300,width=450,left=100,top=100,toolbar=0,menubar=0,status=0,location=0"),!1}),this.updateUrls(this.url,this.text)}toggleCopy(){var l=this.$.find(".Ldt-Social-UrlPop");l.toggle(),this.$.find(".Ldt-Social-Input").val(this.url).focus()}updateUrls(l,d){this.url=l,this.text=d,this.$.find(".Ldt-Social-Fb").attr("href","http://www.facebook.com/share.php?"+jQuery.param({u:l,t:d})),this.$.find(".Ldt-Social-Twitter").attr("href","https://twitter.com/intent/tweet?"+jQuery.param({url:l,text:d})),this.$.find(".Ldt-Social-Gplus").attr("href","https://plus.google.com/share?"+jQuery.param({url:l,title:d})),this.$.find(".Ldt-Social-Mail").attr("href","mailto:?"+jQuery.param({subject:d,body:d+": "+l}))}},Cr(n,"defaults",{text:"",url:"",show_url:!0,show_twitter:!0,show_fb:!0,show_gplus:!0,show_mail:!0}),Cr(n,"template",'<span class="Ldt-Social">{{#show_url}}<div class="Ldt-Social-Url-Container"><a href="#" draggable="true" target="_blank" class="Ldt-Social-Square Ldt-Social-Url Ldt-TraceMe" title="{{l10n.share_link}}"></a><div class="Ldt-Social-UrlPop"><input class="Ldt-Social-Input"/></div></div>{{/show_url}}{{#show_fb}}<a href="#" target="_blank" class="Ldt-Social-Fb Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Facebook"></a>{{/show_fb}}{{#show_twitter}}<a href="#" target="_blank" class="Ldt-Social-Twitter Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Twitter"></a>{{/show_twitter}}{{#show_gplus}}<a href="#" target="_blank" class="Ldt-Social-Gplus Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Google+"></a>{{/show_gplus}}{{#show_mail}}<a href="#" target="_blank" class="Ldt-Social-Mail Ldt-TraceMe" title="{{l10n.share_mail}}"></a>{{/show_mail}}</span>'),Cr(n,"messages",{fr:{share_on:"Partager sur",share_mail:"Envoyer par courriel",share_link:"Partager le lien hypertexte",copy:"Copier"},en:{share_on:"Share on",share_mail:"Share by e-mail",share_link:"Share hypertext link",copy:"Copy"}}),n},Sparkline=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){for(var l=[],d=this.source.getDuration(),m=0,h=this.getWidgetAnnotations(),S=0;S<this.slice_count;S++){var k=S*d/this.slice_count,A=(S+1)*d/this.slice_count,B=0;h.forEach(function(N){if(N.begin<A&&N.end>=k){var F=N.getDuration().milliseconds;F?B+=(Math.min(N.end,A)-Math.max(N.begin,k))/F:B+=1}}),m=Math.max(m,B),l.push(B)}if(m){this.paper=new Raphael(this.$[0],this.width,this.height);var M=(this.height-this.margin)/m,j=this.width/this.slice_count,I=this,P=_$1(l).map(function(N){return I.margin+I.height-M*N}).value(),$=_$1(P).reduce(function(N,F,U){return N+(U?"C"+U*j+" "+P[U-1]+" "+U*j+" "+F+" "+(U+.5)*j+" "+F:"M0 "+F+"L"+.5*j+" "+F)},"")+"L"+this.width+" "+P[P.length-1],z=$+"L"+this.width+" "+this.height+"L0 "+this.height;this.paper.path(z).attr({stroke:"none",fill:this.fillColor}),this.paper.path($).attr({fill:"none",stroke:this.lineColor,"stroke-width":this.lineWidth}),this.rectangleProgress=this.paper.rect(0,0,0,this.height).attr({stroke:"none",fill:"#808080",opacity:.3}),this.ligneProgress=this.paper.path("M0 0L0 "+this.height).attr({stroke:"#ff00ff","line-width":2}),this.$.click(function(N){var F=N.pageX-I.$.offset().left;I.media.setCurrentTime(I.media.duration*F/I.width)}),this.onMediaEvent("timeupdate","onTimeupdate")}}onTimeupdate(l){var d=Math.floor(this.width*l/this.media.duration);this.rectangleProgress.attr({width:d}),this.ligneProgress.attr({path:"M"+d+" 0L"+d+" "+this.height})}},Cr(n,"defaults",{lineColor:"#7492b4",fillColor:"#aeaeb8",lineWidth:2,slice_count:20,height:50,margin:5}),n},SpelSyncHtml=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget")}draw(){this.renderTemplate();var l=this.$.find("iframe")[0],d=this.src.replace(/#.*$/,"");this.getWidgetAnnotations().forEach(function(m){m.on("enter",function(){m.content&&m.content.data&&m.content.data.ref_text&&(l.src=d+"#"+m.content.data.ref_text)})})}},Cr(n,"defaults",{src:"about:blank"}),Cr(n,"template",'<div class="Ldt-SpelSyncHtml"><iframe src="{{src}}" {{#width}}width="{{width}}"{{/width}} {{#height}}height="{{height}}"{{/height}}</div>'),n},tagcloudStyles={},Tagcloud=function(t){var n;return n=class extends t.Widgets.Widget{constructor(d,m){super(d,m);Cr(this,"stopword_lists",{fr:["aussi","avec","aux","bien","car","cette","comme","dans","des","donc","dont","elle","encore","entre","est","être","eux","faire","fait","http","ici","ils","les","leur","leurs","mais","mes","même","mon","notre","non","nos","nous","ont","par","pas","peu","peut","plus","pour","quand","que","qui","quoi","sans","ses","son","sont","sur","tes","très","the","ton","tous","tout","une","votre","vos","vous"],en:["about","again","are","and","because","being","but","can","done","have","for","from","get","here","http","like","more","one","our","she","that","the","their","then","there","they","this","very","what","when","where","who","why","will","with","www","you","your"]});this.stopwords=_$1.uniq([].concat(this.custom_stopwords).concat(this.stopword_lists[this.stopword_language]))}draw(){if(this.segment_annotation_type){var d=this;this.source.getAnnotationsByTypeTitle(this.segment_annotation_type).forEach(function(m){m.on("enter",function(){d.redraw(m.begin,m.end)})})}else this.redraw()}redraw(d,m){var h=/https?:\/\/[0-9a-zA-Z\.%\/-_]+/g,S={},k=this,A=this.getWidgetAnnotations();if(!this.include_titles&&!this.include_descriptions)var B=/[^\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»\/]{3,}/g;else var B=/[^\s\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»:\/]{3,}/g;if(typeof d<"u"&&typeof m<"u"&&(A=A.filter(function(P){return P.begin>=d&&P.end<=m})),this.remove_zero_duration&&(A=A.filter(function(P){return P.getDuration()>0})),A.forEach(function(P){var $=(k.include_titles?P.title:"")+" "+(k.include_descriptions?P.description:"")+" "+(k.include_tag_texts?P.getTagTexts():"");_$1($.toLowerCase().replace(h,"").match(B)).each(function(z){z=z.trim(),_$1(k.stopwords).indexOf(z)==-1&&(!k.exclude_pattern||!k.exclude_pattern.test(z))&&(S[z]=1+(S[z]||0))})}),S=_$1(S).chain().map(function(P,$){return{word:$,count:P}}).filter(function(P){return P.count>k.min_count}).sortBy(function(P){return-P.count}).first(this.tag_count).value(),S&&S.length){var M=S[0].count,j=Math.min(S[S.length-1].count,M-1),I=(this.max_font_size-this.min_font_size)/Math.sqrt(M-j);_$1(S).each(function(P){P.size=Math.floor(k.min_font_size+I*Math.sqrt(P.count-j))})}this.$.html(mustache.render(this.constructor.template,{words:S})),this.$.find(".Ldt-Tagcloud-item").click(function(){var P=jQuery(this).attr("content");k.source.getAnnotations().searchByTags(P)}),this.source.getAnnotations().on("search",this.functionWrapper("onSearch")),this.source.getAnnotations().on("search-cleared",this.functionWrapper("onSearch"))}onSearch(d){if(d=typeof d<"u"?d:"",d)var m=t.Model.regexpFromTextOrArray(d);this.$.find(".Ldt-Tagcloud-item").each(function(){var h=jQuery(this),S=h.attr("content");d?h.html(S.replace(m,'<span class="Ldt-Tagcloud-active">$1</span>')):h.html(S)})}},Cr(n,"template",'<div class="Ldt-Tagcloud-Container"><ul class="Ldt-Tagcloud-List">{{#words}}<li class="Ldt-Tagcloud-item Ldt-TraceMe" trace-info="tag:{{word}}" content="{{word}}" style="font-size: {{size}}px">{{word}}</li>{{/words}}</ul></div>'),Cr(n,"defaults",{include_titles:!0,include_descriptions:!0,include_tag_texts:!0,tag_count:30,stopword_language:"fr",custom_stopwords:[],exclude_pattern:!1,annotation_type:!1,segment_annotation_type:!1,min_font_size:10,max_font_size:26,min_count:2,remove_zero_duration:!1}),n},Title=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){this.renderTemplate()}},Cr(n,"defaults",{media_title:!1}),Cr(n,"template",'<div class="Ldt-TitleWidget"><h2>{{#media_title}}{{media.title}}{{/media_title}}{{^media_title}}{{source.title}}{{/media_title}}</h2></div>'),n},tooltipStyles={},Tooltip=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){const l=this;this.renderTemplate(),this.$.parent().css({position:"relative"}),this.$tooltip=this.$.find(".Ldt-Tooltip"),this.$tip=this.$.find(".Ldt-Tooltip-Tip"),this.$sw=this.$.find(".Ldt-Tooltip-Border-SW"),this.$se=this.$.find(".Ldt-Tooltip-Border-SE"),this.__halfWidth=Math.floor((this.$.find(".Ldt-Tooltip-Main").width()||192)/2),this.__borderWidth=this.$.find(".Ldt-Tooltip-Border-Left").width(),this.__tipDelta=this.__halfWidth-Math.floor(this.$tip.width()/2),this.__maxShift=this.__tipDelta-this.__borderWidth,this.$.mouseover(function(){l.$tooltip.hide()}),this.hide()}show(l,d,m,h){if(typeof h<"u")if(typeof h=="string")this.$.find(".Ldt-Tooltip-Color").html(""),this.$.find(".Ldt-Tooltip-Color").show().css("background-color",h),this.$.find(".Ldt-Tooltip-Color").show().css("height","");else{var S=this.$.find(".Ldt-Tooltip-Color");S.html(""),S.show();for(var k=0;k<h.length;k++)S.append('<div style="float: left; height: 10px; width: 10px; background-color: '+h[k]+'">');this.$.find(".Ldt-Tooltip-Color").css("height",h.length*10+"px")}else this.$.find(".Ldt-Tooltip-Color").hide();this.$.find(".Ldt-Tooltip-Text").html(m),this.$tooltip.show();var A=0;typeof this.min_x<"u"&&l-this.__halfWidth<this.min_x&&(A=Math.max(l-this.__halfWidth-this.min_x,-this.__maxShift)),typeof this.max_x<"u"&&+l+this.__halfWidth>this.max_x&&(A=Math.min(+l+this.__halfWidth-this.max_x,this.__maxShift)),this.$tooltip.css({left:l-A+"px",top:d+"px"}),this.$tip.css({left:this.__tipDelta+A+"px"}),this.$sw.css({width:this.__tipDelta+A-this.__borderWidth+"px"}),this.$se.css({width:this.__tipDelta-A-this.__borderWidth+"px"})}hide(){this.$tooltip.hide()}},Cr(n,"defaults",{}),Cr(n,"template",'<div class="Ldt-Tooltip"><div class="Ldt-Tooltip-Main"><div class="Ldt-Tooltip-Corner-NW"></div><div class="Ldt-Tooltip-Border-Top"></div><div class="Ldt-Tooltip-Corner-NE"></div><div class="Ldt-Tooltip-Border-Left"></div><div class="Ldt-Tooltip-Border-Right"></div><div class="Ldt-Tooltip-Corner-SW"></div><div class="Ldt-Tooltip-Border-SW"></div><div class="Ldt-Tooltip-Tip"></div><div class="Ldt-Tooltip-Border-SE"></div><div class="Ldt-Tooltip-Corner-SE"></div><div class="Ldt-Tooltip-Inner"><div class="Ldt-Tooltip-Color"></div><p class="Ldt-Tooltip-Text"></p></div></div></div>'),n},transcriptStyles={},Transcript=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this.getWidgetAnnotations(),d=this,m;if(d.renderTemplate(),m=d.$.find(".Ldt-TranscriptWidget"),d.use_vtt_track){var h=d.player.widgets.filter(function(k){return k.type=="HtmlPlayer"});if(h){var S=h[0].$.find("video")[0];S.addEventListener("loadedmetadata",function(){var k=S.textTracks[0],A=k.cues,B=1;Array.prototype.forEach.apply(A,[function(M){M.id="cue"+B;var j=mustache.render(d.annotationTemplate,{id:M.id,content:M.text,begin:1e3*M.startTime,end:1e3*M.endTime});B+=1;var I=jQuery(j);m.append(I)}]),k.addEventListener("cuechange",function(){var M=k.activeCues;M.length>0&&(d.$.find(".Ldt-Transcript-Annotation.active").removeClass("active"),Array.prototype.forEach.apply(M,[function(j){d.$.find("#"+j.id).addClass("active")}]))},!1),m.on("click",".Ldt-Transcript-Annotation",function(){d.media.setCurrentTime(this.dataset.begin)})})}else console.log("cannot find a video object")}else l.forEach(function(k){var A={id:k.id,content:t.textFieldHtml(k.title),begin:k.begin.toString(),end:k.end.toString()},B=mustache.render(d.annotationTemplate,A),M=jQuery(B);m.append(M)})}},Cr(n,"defaults",{annotation_type:"Caption",use_vtt_track:!1}),Cr(n,"template",'<div class="Ldt-TranscriptWidget"></div>'),Cr(n,"annotationTemplate",'<span data-begin="{{ begin }}" data-end="{{ end }}" data-id="{{ id }}" class="Ldt-Transcript-Annotation">{{ content }}</span>  '),n},tweetStyles={},Tweet=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d),this.lastAnnotation=!1}draw(){this.renderTemplate(),this.pinned=this.pin_at_start;var l=this;this.$.find(".Ldt-Tweet-Pin").click(function(){l.pinned=!l.pinned;var d=jQuery(this);l.pinned?(d.addClass("active").attr("title",l.l10n.dont_keep_visible),l.cancelTimeout()):(d.removeClass("active").attr("title",l.l10n.keep_visible),l.hideTimeout())}),this.$.find(".Ldt-Tweet-Close").click(function(){l.hide()}),this.$.hide(),this.getWidgetAnnotations().forEach(function(d){d.on("click",function(){l.show(d)})})}show(l){if(typeof l<"u"&&typeof l.source<"u"){var d=[[/#(\w+)/gm,function(I){return'<a href="http://twitter.com/search?q=%23'+I[1]+'" target="_blank">'},"</a>"]],m=_$1(l.source.entities.urls).sortBy(function(I){return I.indices[0]}),h=0,S="";_$1(m).each(function(I){I.indices[0]>=h&&(S+=l.source.text.substring(h,I.indices[0]),S+=typeof I.expanded_url<"u"&&I.expanded_url!==null?I.expanded_url:I.url,h=I.indices[1])}),S+=l.source.text.substring(h);for(var k=0;k<this.polemics.length;k++){var A=t.Model.regexpFromTextOrArray(this.polemics[k].keywords);d.push([A,'<span style="background: '+this.polemics[k].color+'">',"</span>"])}var A=l.found&&_this.source.getAnnotations().regexp||!1,B=l.source.user?l.source.user.profile_image_url:l.source.profile_image_url,M=l.source.user?l.source.user.screen_name:l.source.from_user,j=l.source.user?l.source.user.name:l.source.from_user_name;this.$.find(".Ldt-Tweet-Avatar").attr("src",B),this.$.find(".Ldt-Tweet-ScreenName").html("@"+M),this.$.find(".Ldt-Tweet-ProfileLink").attr("href","https://twitter.com/"+M),this.$.find(".Ldt-Tweet-FullName").html(j),this.$.find(".Ldt-Tweet-Contents").html(t.textFieldHtml(S,A,d)),this.$.find(".Ldt-Tweet-Time").html(this.l10n.original_time+new Date(l.source.created_at).toLocaleTimeString()+" / "+this.l10n.video_time+l.begin.toString()),this.$.find(".Ldt-Tweet-Retweet").attr("href","https://twitter.com/intent/retweet?tweet_id="+l.source.id_str),this.$.find(".Ldt-Tweet-Reply").attr("href","https://twitter.com/intent/tweet?in_reply_to="+l.source.id_str),this.$.find(".Ldt-Tweet-Original").attr("href","https://twitter.com/"+M+"/status/"+l.source.id_str),this.player.trigger("Annotation.minimize"),this.$.slideDown(),this.cancelTimeout(),this.pinned||this.hideTimeout()}else this.hide()}hide(){this.player.trigger("Annotation.maximize"),this.$.slideUp(),this.cancelTimeout()}cancelTimeout(){typeof this.hide_timer<"u"&&(window.clearTimeout(this.hide_timer),this.hide_timer=void 0)}hideTimeout(){this.cancelTimeout(),this.hide_timer=window.setTimeout(this.functionWrapper("hide"),this.hide_timeout)}},Cr(n,"defaults",{hide_timeout:1e4,polemics:[{keywords:["++"],color:"#30d765"},{keywords:["--"],color:"#f51123"},{keywords:["=="],color:"#f1e24a"},{keywords:["??"],color:"#05aae6"}],annotation_type:"tweet",pin_at_start:!1}),Cr(n,"messages",{fr:{retweet:"Retweeter",reply:"Répondre",keep_visible:"Empêcher la fermeture automatique",dont_keep_visible:"Permettre la fermeture automatique",close_widget:"Fermer l'affichage du tweet",original_time:"Heure d'envoi : ",video_time:"Temps de la vidéo : ",show_original:"Voir l'original"},en:{retweet:"Retweet",reply:"Reply",keep_visible:"Keep visible",dont_keep_visible:"Don't keep visible",close_widget:"Close tweet display",original_time:"Tweet sent at: ",video_time:"Video time: ",show_original:"Show original"}}),Cr(n,"template",'<div class="Ldt-Tweet-Widget"><div class="Ldt-Tweet-Inner"><div class="Ldt-Tweet-PinClose-Buttons"><a href="#" class="Ldt-Tweet-Pin Ldt-TraceMe{{#pin_at_start}} active" title="{{l10n.dont_keep_visible}}{{/pin_at_start}}{{^pin_at_start}}" title="{{l10n.keep_visible}}{{/pin_at_start}}"></a><a href="#" class="Ldt-Tweet-Close Ldt-TraceMe" title="{{l10n.close_widget}}"></a></div><div class="Ldt-Tweet-AvatarContainer"><a href="#" class="Ldt-Tweet-ProfileLink" target="_blank"><img src="" class="Ldt-Tweet-Avatar"/></a></div><h3><a href="#" class="Ldt-Tweet-ProfileLink Ldt-Tweet-ScreenName" target="_blank"></a> (<span class="Ldt-Tweet-FullName"></span>)</h3><p class="Ldt-Tweet-Contents"></p><div class="Ldt-Tweet-Bottom"><span class="Ldt-Tweet-Time"></span><a class="Ldt-Tweet-Original" href="" target="_blank">{{l10n.show_original}}</a><a href="" target="_blank" class="Ldt-Tweet-Retweet"><div class="Ldt-Tweet-Icon"></div>{{l10n.retweet}}</a><a href="" target="_blank" class="Ldt-Tweet-Reply"><div class="Ldt-Tweet-Icon"></div>{{l10n.reply}}</a></div></div></div>'),n},AutoPlayer=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){typeof this.video>"u"&&(this.video=this.media.video);for(var l=["live","provider","autostart","streamer","video","height","width","url_transform"],d={},m=[{regexp:/^rtmp:\/\//,type:"JwpPlayer"},{regexp:/\.(mp4|m4v|mp3)$/,type:"AdaptivePlayer"},{regexp:/\.(ogg|ogv|webm)$/,type:"HtmlPlayer"},{regexp:/^(https?:\/\/)?(www\.)?youtube\.com/,type:"PopcornPlayer"},{regexp:/^(https?:\/\/)?(www\.)?vimeo\.com/,type:"PopcornPlayer"},{regexp:/^(https?:\/\/)?(www\.)?dailymotion\.com/,type:"DailymotionPlayer"}],h=/^rtmp:\/\//,S=0;S<m.length;S++)if(this.video&&m[S].regexp.test(this.video.toLowerCase())){d.type=m[S].type;break}if(typeof d.type>"u"&&(d.type=this.default_type),d.type==="AdaptivePlayer"){var k=document.createElement("video").canPlayType('video/mp4; codecs="avc1.42E01E"');d.type=k!=="no"?"HtmlPlayer":"JwpPlayer"}h.test(this.video)&&(d.provider="rtmp",d.live=!0);for(var S=0;S<l.length;S++)typeof this[l[S]]<"u"&&(d[l[S]]=this[l[S]]);this.insertSubwidget(this.$,d)}},Cr(n,"defaults",{default_type:"HtmlPlayer"}),n},MultiSegments=function(t){var n;return n=class extends t.Widgets.Widget{constructor(l,d){super(l,d)}draw(){var l=this,d=[],m=null,h={},S={};_$1(this).each(function(k,A){/^segments_/.test(A)&&(h[A.replace(/^segments_/,"")]=k),/^annotation_/.test(A)&&(S[A.replace(/^annotation_/,"")]=k)}),this.source.getAnnotationTypes().forEach(function(k){var A=k.getAnnotations().filter(function(j){return j.getDuration()>0&&j.getMedia().id==l.media.id});if(A.length){var B=!1,M={segmentWidget:jQuery("<div>"),annotationWidget:jQuery("<div>"),hasSegmentsNow:function(){var j=l.media.getCurrentTime();return!!A.filter(function(I){return I.begin<=j&&I.end>j}).length},hide:function(){B&&(B=!1,this.annotationWidget.slideUp())},show:function(){B||(B=!0,this.annotationWidget.slideDown())}};M.segmentWidget.addClass("Ldt-MultiSegments-Segment").appendTo(l.$),l.show_all||M.segmentWidget.on("mouseenter",function(){M.hasSegmentsNow()&&(m=M)}),M.annotationWidget.addClass("Ldt-MultiSegments-Annotation").appendTo(l.$).hide(),l.insertSubwidget(M.segmentWidget,_$1({type:"Segments",annotation_type:k,width:"100%"}).extend(h).value()),l.insertSubwidget(M.annotationWidget,_$1({type:"Annotation",annotation_type:k,width:"100%"}).extend(S).value()),d.push(M)}}),jQuery(document).on("click",".Ldt-Segments-Segment",function(k){!l.show_all&&m&&!m.hasSegmentsNow()&&(m=void 0),_$1(d).each(function(A){jQuery(k.target).parent().parent()[0]==A.segmentWidget[0]?(m=A,A.show()):A.hide()})})}},Cr(n,"defaults",{annotation_show_arrow:!0,annotation_start_minimized:!1,annotation_show_annotation_type:!0,show_all:!1}),n};function widgets(t){return{AdaptivePlayer:AdaptivePlayer(t),AutoPlayer:AutoPlayer(t),HelloWorld:HelloWorld(t),Annotation:Annotation(t),AnnotationsController:AnnotationsController(t),AnnotationsList:AnnotationsList(t),Arrow:Arrow(t),Controller:Controller(t),CreateAnnotation:CreateAnnotation(t),CurrentSegmentInfobox:CurrentSegmentInfobox(t),DailymotionPlayer:DailymotionPlayer(t),EnrichedPlan:EnrichedPlan(t),Highlighter:Highlighter(t),HtmlMashupPlayer:HtmlMashupPlayer(t),HtmlPlayer:HtmlPlayer(t),ImageDisplay:ImageDisplay(t),JwpPlayer:JwpPlayerWidget(t),LatestAnnotation:LatestAnnotation(t),MashupPlayer:MashupPlayer(t),Mediafragment:Mediafragment(t),MediaList:MediaList(t),MultiSegments:MultiSegments(t),NoteTaking:NoteTaking(t),PlaceholderPlayer:PlaceholderPlayer(t),Polemic:Polemic(t),PopcornPlayer:PopcornPlayer(t),Quiz:Quiz(t),UniqueChoiceQuestion:UniqueChoiceQuestion(t),MultipleChoiceQuestion:MultipleChoiceQuestion(t),QuizCreator:QuizCreator(t),Segments:Segments(t),Shortcuts:Shortcuts(t),Slice:Slice(t),SlidePreview:SlidePreview(t),Slider:Slider(t),SlideVideoPlayer:SlideVideoPlayer(t),Social:Social(t),Sparkline:Sparkline(t),SpelSyncHtml:SpelSyncHtml(t),Tagcloud:Tagcloud(t),Title:Title(t),Tooltip:Tooltip(t),Transcript:Transcript(t),Tweet:Tweet(t),styles:{annotationStyles,helloWorldStyles,annotationsControllerStyles,annotationsListStyles,controllerStyles,createAnnotationStyles,currentSegmentInfoboxStyles,enrichedPlanStyles,highlighterStyles,imageDisplayStyles,latestAnnotationStyles,mashupPlayerStyles,mediaListStyles,noteTakingStyles,placeholderPlayerStyles,polemicStyles,quizStyles,quizCreatorStyles,segmentsStyles,shortcutsStyles,sliceStyles,slidePreviewStyles,sliderStyles,slideVideoPlayerStyles,socialStyles,tagcloudStyles,tooltipStyles,transcriptStyles,tweetStyles}}}typeof window.IriSP>"u"&&(window.IriSP=IriSP$1),IriSP$1.Model=Model(IriSP$1),IriSP$1.htmlPlayer=htmlPlayer,Object.assign(IriSP$1,utils$r(IriSP$1)),IriSP$1.iFrameUpdater=iFrameUpdater,IriSP$1.serializers=serializers(IriSP$1),Object.assign(IriSP$1,defaults()),metadataplayer(IriSP$1),IriSP$1.Widgets=widgetsBase(IriSP$1),Object.assign(IriSP$1.Widgets,widgets(IriSP$1));const main={IriSP:IriSP$1,style};return main});
 //# sourceMappingURL=LdtPlayer-core.js.map
--- a/src/ldt/ldt/static/ldt/metadataplayer/Markers.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,186 +0,0 @@
-
-.Ldt-Markers-Marker {
-    position: absolute; 
-    margin-left: -1px; 
-    border: 1px solid #ffffff;
-}
-
-.Ldt-Markers-MarkerBall {
-	background: #ffffff;
-}
-
-.Ldt-Markers-MarkerBall:hover {
-	background: #bebebe;
-}
-
-.Ldt-Markers-List{
-	overflow: hidden;
-}
-
-.Ldt-Markers-Position {
-    background: #fc00ff;
-    position: relative;
-    left: 0;
-    margin-left: -1px;
-    width: 2px;
-    bottom: -1px;
-    z-index: 80000;
-}
-
-.Ldt-Markers-Inputs{
-	background-color: #e0e0e0;
-	margin-top: 1px;
-}
-
-.Ldt-Markers-RoundButton{
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 20px;
-    width: 20px;
-    border-radius: 20px;
-    font-size: 25px;
-    font-style: bold;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    margin-right: 0px;
-    margin-left: 13px;
-    margin-bottom: 10px;
-    margin-top: 10px;
-    padding: 4px;
-    text-align: center;
-	vertical-align: top;
-	line-height: 20px;
-}
-
-.Ldt-Markers-RoundButton.Ldt-Markers-CannotCreate,
-.Ldt-Markers-RoundButton.Ldt-Markers-PreviewDelete{
-	background-color: #999999;
-	border-color: #797979 #444444 #222222 #696969;
-}
-
-.Ldt-Markers-RoundButton.Ldt-Markers-Delete{
-	line-height: 23px;
-	text-indent: 2px;
-}
-
-.Ldt-Markers-RoundButton.Ldt-Markers-PreviewDelete{
-	line-height: 23px;
-	text-indent: 2px;
-}
-
-.Ldt-Markers-Info{
-	width: 90%;
-	display: inline-block;
-	margin: 0px;
-}
-
-.Ldt-Markers-Screen{
-	margin: 0px;
-}
-
-.Ldt-Markers-ScreenSending, .Ldt-Markers-ScreenFailure, .Ldt-Markers-ScreenSuccess, 
-.Ldt-Markers-ScreenConfirmDelete, .Ldt-Markers-ScreenDeleteSuccess{
-	text-align: center;
-	vertical-align: middle;
-	line-height: 125px;
-	font-size: 18px;
-	font-weight: bold;
-	color: #68273C;
-}
-
-.Ldt-Markers-Screen-InnerBox{
-    border: 1px solid #CCCCCC;
-    background: #FFFFFF;
-    color: #FF3B77; text-align: center;
-    font-size: 13px; font-weight: bold;
-}
-
-a.Ldt-Markers-Close {
-    position: relative; 
-    float: right;
-    right: 2px;
-    top: 2px;
-    display: inline-block; width: 17px; height: 17px; margin: 4px;
-    background: url(img/widget-control.png);
-}
-
-a.Ldt-Markers-Screen-SubmitDelete, a.Ldt-Markers-Screen-CancelDelete {
-	color: #3366BB;
-	cursor: pointer;
-}
-
-a.Ldt-Markers-Screen-SubmitDelete:hover, a.Ldt-Markers-Screen-CancelDelete:hover {
-	color: #3a75ff;
-}
-
-.Ldt-Markers-MarkerDescription{
-	width: 90%;
-	border: 1px solid #68273c;
-	margin: 10px;
-	padding: 10px;
-	background: #ffffff;
-	overflow: scroll;
-}
-
-.Ldt-Markers-MarkerDescription:hover{
-	border: 2px solid #e87d9f;
-}
-
-.Ldt-Markers-MarkerEdit{
-	width: 100%;
-	margin: 10px;
-}
-
-.Ldt-Markers-MarkerTextArea{
-	height: auto;
-	width: auto;
-	max-width: 82%;
-	max-height: 100%;
-	padding: 10px;
-	background: #ffffff;
-	border: 2px solid #e87d9f;
-	margin: 0px;
-}
-
-.Ldt-Markers-Buttons{
-	display: inline-block;
-	width: 17%;
-	vertical-align: top;
-}
-
-.Ldt-Markers-MarkerSend, .Ldt-Markers-MarkerPreviewSend, .Ldt-Markers-MarkerCancel{
-	display: inline-block;
-    background-color: #d93c71;
-    color: #ffffff;
-    cursor: pointer;
-    height: 20px;
-    width: 80px;
-    font-size: 11;
-    font-style: bold;
-    border: 1px solid;
-    border-color: #eca3bc #631e34 #36101c #e16e93;
-    cursor: pointer;
-    margin-right: 5px;
-    margin-left: 5px;
-    margin-bottom: 10px;
-    margin-top: 0px;
-    padding: 4px;
-    text-align: center;
-	vertical-align: top;
-	line-height: 20px;
-	vertical-align: top;
-}
-
-.Ldt-Markers-RoundButton:hover, .Ldt-Markers-MarkerSend:hover, .Ldt-Markers-MarkerPreviewSend:hover, .Ldt-Markers-MarkerCancel:hover{
-	background-color: #e15581;
-	border-color: #222222 #e87d9f #f0adc3 #68273c;
-}
-
-.Ldt-Markers-RoundButton.Ldt-Markers-CannotCreate:hover, 
-.Ldt-Markers-RoundButton.Ldt-Markers-PreviewDelete:hover{	
-	background-color: #999999;
-	border-color: #797979 #444444 #222222 #696969;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Markers.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,632 +0,0 @@
-
-IriSP.Widgets.Markers = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Markers.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Markers.prototype.defaults = {
-    pre_draw_callback: function(){
-        return this.importUsers();
-    },
-    annotation_type: "markers",
-    line_height: 8,
-    background: "#e0e0e0",
-    marker_color: "#ff80fc",
-    placeholder_color: "#ffffff",
-    hover_color: "#e15581",
-    selected_color: "#74d600",
-    ball_radius: 4,
-    pause_on_write: true,
-    play_on_submit: true,
-    api_serializer: "ldt_annotate",
-    api_endpoint_template_create: "",
-    api_endpoint_template_edit: "",
-    api_endpoint_template_delete: "",
-    api_method_create: "POST",
-    api_method_edit: "PUT",
-    api_method_delete: "DELETE",
-    project_id: "",
-    creator_name: "",
-    after_send_timeout: 0,
-    markers_gap: 2000,
-    allow_empty_markers: false,
-    close_after_send: false,
-    custom_send_button: false,
-    custom_cancel_button: false,
-    preview_mode: false,
-    filter_per_user: false,
-    api_users_endpoint: "",
-    make_username_string_function: function(params){
-        return params.username ? params.username : "Anonymous";
-    },
-    hide_if_empty: false,
-};
-
-IriSP.Widgets.Markers.prototype.template = 
-    '<div class="Ldt-Markers-Display" style="height:{{line_height}}px;">'
-    +     '<div class="Ldt-Markers-List" style="height:{{line_height}}px; position: relative;"></div>'
-    +     '<div class="Ldt-Markers-Position" style="height: {{line_height}}px; top: -{{line_height}};"></div>'
-    + '</div>'
-    + '<div class="Ldt-Markers-Inputs">'
-    +     '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenMain">'
-    +         '<div class="Ldt-Markers-RoundButton Ldt-Markers-CannotCreate" title="{{#preview_mode}}{{l10n.preview_mode_submit}}{{/preview_mode}}{{^preview_mode}}{{l10n.cannot_create}}{{/preview_mode}}">+</div>'
-    +         '<div class="Ldt-Markers-RoundButton Ldt-Markers-Create">+</div>'
-    +         '{{^preview_mode}}<div class="Ldt-Markers-RoundButton Ldt-Markers-Delete">&#10006;</div>{{/preview_mode}}'
-    +         '{{#preview_mode}}<div class="Ldt-Markers-RoundButton Ldt-Markers-PreviewDelete" title="{{l10n.preview_mode_delete}}">&#10006;</div>{{/preview_mode}}'
-    +         '{{#filter_per_user}}{{#preview_mode}}<select class="Ldt-Markers-userFilter-dropdown" id="Ldt-Markers-userFilter"></select>{{/preview_mode}}{{/filter_per_user}}'
-    +         '<div class="Ldt-Markers-Info"></div>'
-    +     '</div>'
-    +     '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenSending">'  
-    +         '<div class="Ldt-Markers-Screen-InnerBox">{{l10n.wait_while_processing}}</div>'
-    +     '</div>'
-    +     '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenSuccess">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'    
-    +         '<div class="Ldt-Markers-Screen-InnerBox">{{l10n.annotation_saved}}</div>'
-    +     '</div>'
-    +     '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenDeleteSuccess">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'    
-    +         '<div class="Ldt-Markers-Screen-InnerBox">{{l10n.delete_saved}}</div>'
-    +     '</div>'
-    +     '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenFailure">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'
-    +         '<div class="Ldt-Markers-Screen-InnerBox">{{l10n.error_while_contacting}}</div>'
-    +     '</div>'
-    +     '<div class="Ldt-Markers-Screen Ldt-Markers-ScreenConfirmDelete">'
-    +         '<a title="{{l10n.close_widget}}" class="Ldt-Markers-Close" href="#"></a>'
-    +         '<div class="Ldt-Markers-Screen-InnerBox">'
-    +           '{{l10n.delete_text}} '
-    +           '<a class="Ldt-Markers-Screen-SubmitDelete">{{l10n.submit_delete}}</a> '
-    +           '<a class="Ldt-Markers-Screen-CancelDelete">{{l10n.cancel}}</a>'
-    +         '</div>'
-    +     '</div>'
-    + '</div>';
-
-
-IriSP.Widgets.Markers.prototype.markerTemplate = 
-    '<div class="Ldt-Markers-Marker" style="height:{{height}}px; left:{{left}}px; width: 2px; background-color: black;">' +
-        '<div class="Ldt-Markers-MarkerBall" style="background-color: {{marker_color}}; position: relative; width: {{ball_diameter}}px; height: {{ball_diameter}}px; left: {{ball_left}}px; top: {{ball_top}}px; border: 1px solid; border-radius: {{ball_radius}}px"></div>' + 
-    '</div>';
-
-IriSP.Widgets.Markers.prototype.markerPlaceholderTemplate = 
-    '<div class="Ldt-Markers-Marker Ldt-Markers-PlaceholderMarker" style="height:{{height}}px; left:{{left}}px; width: 2px; background-color: black;">' +
-        '<div class="Ldt-Markers-MarkerBall" style="background-color: {{marker_color}}; position: relative; width: {{ball_diameter}}px; height: {{ball_diameter}}px; left: {{ball_left}}px; top: {{ball_top}}px; border: 1px solid; border-radius: {{ball_radius}}px"></div>' + 
-    '</div>'; 
-
-IriSP.Widgets.Markers.prototype.infoTemplate = 
-    '{{^edit}}<div class="Ldt-Markers-MarkerDescription">{{marker_info}}</div>{{/edit}}' +
-    '{{#edit}}<div class="Ldt-Markers-MarkerEdit">' + 
-        '<textarea class="Ldt-Markers-MarkerTextArea" cols="60" rows="4">{{marker_info}}</textarea>' +
-        '<div class="Ldt-Markers-Buttons">' +
-            '{{^preview_mode}}<div class="Ldt-Markers-MarkerSend">{{send}}</div>{{/preview_mode}}' +
-            '{{#preview_mode}}<div class="Ldt-Markers-MarkerPreviewSend" title="{{preview_mode_text}}">{{send}}</div>{{/preview_mode}}' +
-            '<div class="Ldt-Markers-MarkerCancel">{{cancel}}</div>' +
-        '</div>' +
-    '</div>{{/edit}}'
-
-IriSP.Widgets.Markers.prototype.messages = {
-    en : {
-        send : "Send",
-        submit_delete: "Delete",
-        cancel : "Cancel",
-        preview_mode_submit: "You cannot submit a marker in preview mode.",
-        preview_mode_delete: "You cannot delete a marker in preview mode",
-        wait_while_processing: "Please wait while your annotation is being processed...",
-        delete_text: "The selected marker will be deleted. Continue?",
-        error_while_contacting: "An error happened while contacting the server. Your annotation has not been saved.",
-        annotation_saved: "Thank you, your annotation has been saved.",
-        delete_saved: "Thank you, your annotation has been deleted",
-        close_widget: "Close",
-        cannot_create: "Cannot create marker on this timecode"
-    },
-    fr : {
-        send : "Envoyer",
-        submit_delete: "Supprimer",
-        cancel : "Annuler",
-        preview_mode_submit: "Vous ne pouvez pas créer ou éditer de marqueur en mode aperçu",
-        preview_mode_delete: "Vous ne pouvez pas supprimer de marqueur en mode aperçu",
-        wait_while_processing: "Veuillez patienter pendant le traitement de votre annotation...",
-        delete_text: "Le marqueur sélectionné sera supprimé. Continuer?",
-        error_while_contacting: "Une erreur s'est produite en contactant le serveur. Votre annotation n'a pas été enregistrée.",
-        annotation_saved: "Merci, votre annotation a été enregistrée.",
-        delete_saved: "Merci, votre annotation a été supprimée",
-        close_widget: "Fermer",
-        cannot_create: "Impossible de créer un marqueur sur ce timecode"
-    }
-}
-
-IriSP.Widgets.Markers.prototype.importUsers = function(){
-    if (this.filter_per_user && this.preview_mode){
-        this.usernames = Array();
-        if (!this.source.users_data && this.api_users_endpoint){
-            var _this = this,
-                _list = this.getWidgetAnnotations(),
-                usernames_list_string = "";
-
-            _list.forEach(function(_annotation){
-                if(_this.usernames.indexOf(_annotation.creator) == -1){
-                    _this.usernames.push(_annotation.creator);
-                }
-            });
-            this.usernames.forEach(function(_username){
-                usernames_list_string+=_username+","
-            })
-            usernames_list_string = usernames_list_string.substring(0, usernames_list_string.length - 1);
-            _url = Mustache.to_html(this.api_users_endpoint, {usernames_list_string: encodeURIComponent(usernames_list_string), usernames_list_length: this.usernames.length});
-            return IriSP.jQuery.ajax({
-                async: false,
-                url: _url,
-                type: "GET",
-                success: function(_data) {
-                    _this.source.users_data = _data.objects
-                },
-                error: function(_xhr, _error, _thrown) {
-                    console.log(_xhr)
-                    console.log(_error)
-                    console.log(_thrown)
-                }
-            })
-        }
-    }
-}
-
-IriSP.Widgets.Markers.prototype.draw = function(){
-    var _this = this;
-    this.renderTemplate();
-    if ((!this.filter_per_user) || (!this.preview_mode) || (this.usernames.length <= 1)){
-        this.$.find(".Ldt-Markers-userFilter-dropdown").hide();
-    }
-    else {
-        this.usernames.forEach(function(_user){
-            var _users = _this.source.users_data.filter(function(_user_data){
-                return _user_data.username == _user;
-            }),
-               _user_data = {};
-            if (_users.length == 0){
-                _user_data.username = _user;
-            }
-            else{
-                _user_data = _users[0];
-            }
-            _this.$.find(".Ldt-Markers-userFilter-dropdown").append("<option value='"+_user+"'>"+_this.make_name_string_function(_user_data)+"</option>")
-        }); 
-        this.$.find(".Ldt-Markers-userFilter-dropdown").change(this.functionWrapper("drawMarkers"))
-        this.$.find(".Ldt-Markers-userFilter-dropdown").change(this.functionWrapper("clearSelectedMarker"))
-        
-    }
-    
-    this.markers = this.getWidgetAnnotations().filter(function(_ann) {
-        return ((_ann.getDuration() == 0) || (_ann.begin == _ann.end));
-    });
-    if (this.hide_if_empty && this.markers.length <= 0){
-        this.$.hide();
-    } 
-    else {
-        this.drawMarkers();
-        
-        this.$.find(".Ldt-Markers-Create").click(this.functionWrapper("onCreateClick"));
-        this.$.find(".Ldt-Markers-Delete").click(this.functionWrapper("onDeleteClick"));
-        this.$.find(".Ldt-Markers-RoundButton").hide()
-        this.updateCreateButtonState(this.media.getCurrentTime())
-        this.$.find(".Ldt-Markers-Screen-SubmitDelete").click(this.functionWrapper("sendDelete"));
-        this.$.find(".Ldt-Markers-Screen-CancelDelete").click(function(){
-            _this.showScreen("Main");
-            _this.cancelEdit();
-        })
-        this.showScreen("Main");
-        this.$.css({
-            margin: "1px 0",
-            background: this.background
-        });
-        
-        this.$.find(".Ldt-Markers-Close").click(this.functionWrapper("revertToMainScreen"));
-        
-        this.onMediaEvent("timeupdate", this.functionWrapper("updatePosition"));
-        this.onMediaEvent("timeupdate", this.functionWrapper("updateCreateButtonState"));
-        this.onMediaEvent("play", this.functionWrapper("clearSelectedMarker"));
-        this.onMdpEvent("Markers.refresh", this.functionWrapper("drawMarkers"));
-       
-        this.newMarkerTimeCode = 0;
-        this.selectedMarker = false;
-    }
-}
-
-
-IriSP.Widgets.Markers.prototype.updatePosition = function(_time) {    
-    var _x = Math.floor( this.width * _time / this.media.duration);
-    this.$.find('.Ldt-Markers-Position').css({
-        left: _x + "px"
-    });
-}
-
-IriSP.Widgets.Markers.prototype.updateCreateButtonState = function(_time){
-    _this = this
-    var can_create = this.preview_mode? false : this.markers.every(function(_marker){   
-        return ((_time < (_marker.begin-_this.markers_gap))||(_time > (_marker.begin+_this.markers_gap)))
-    });
-    if (can_create){
-        if ((this.$.find(".Ldt-Markers-Create").is(":hidden"))&&(this.$.find(".Ldt-Markers-Delete").is(":hidden")||this.$.find(".Ldt-Markers-PreviewDelete").is(":hidden"))){
-            this.$.find(".Ldt-Markers-RoundButton").hide();
-            this.$.find(".Ldt-Markers-Create").show();
-        }
-    }
-    else {
-        if ((this.$.find(".Ldt-Markers-CannotCreate").is(":hidden"))&&(this.$.find(".Ldt-Markers-Delete").is(":hidden")||this.$.find(".Ldt-Markers-PreviewDelete").is(":hidden"))){
-            this.$.find(".Ldt-Markers-RoundButton").hide();
-            this.$.find(".Ldt-Markers-CannotCreate").show();
-        }
-    }
-}
-
-IriSP.Widgets.Markers.prototype.onCreateClick = function(){
-    this.pauseOnWrite();
-    if (!this.selectedMarker){
-        this.newMarkerCurrentTime = this.media.getCurrentTime();
-        this.showPlaceholder(this.media.getCurrentTime());
-        this.startEdit();
-    }
-}
-
-IriSP.Widgets.Markers.prototype.onDeleteClick = function(){
-    _this = this;
-    this.pauseOnWrite();
-    if(this.selectedMarker){
-        this.showScreen("ConfirmDelete");
-    }
-    else {
-        // Click on "x" without a selected marker: back to initial state
-        this.cancelEdit();
-    }
-}
-
-IriSP.Widgets.Markers.prototype.startEdit = function(){
-    if (this.selectedMarker){
-        _divHtml = Mustache.to_html(this.infoTemplate, {
-            edit: true,
-            preview_mode: this.preview_mode,
-            preview_mode_text: this.l10n.preview_mode_submit,
-            marker_info: this.selectedMarker.description,
-            send: this.custom_send_button? this.custom_send_button : this.l10n.send,
-            cancel: this.custom_cancel_button? this.custom_cancel_button :this.l10n.cancel
-        })
-    }
-    else {
-        _divHtml = Mustache.to_html(this.infoTemplate, {
-            edit: true,
-            marker_info: "",
-            preview_mode: this.preview_mode,
-            preview_mode_text: this.l10n.preview_mode_submit,
-            send: this.custom_send_button? this.custom_send_button : this.l10n.send,
-            cancel: this.custom_cancel_button? this.custom_cancel_button :this.l10n.cancel
-        })
-    }
-    this.$.find(".Ldt-Markers-Info").html(_divHtml);
-    this.$.find(".Ldt-Markers-MarkerSend").click(this.functionWrapper("onSubmit"));
-    this.$.find(".Ldt-Markers-MarkerCancel").click(this.functionWrapper("cancelEdit"));
-    this.$.find(".Ldt-Markers-MarkerTextArea").bind("change keyup input paste", this.functionWrapper("onDescriptionChange"));
-    this.$.find(".Ldt-Markers-RoundButton").hide();
-    if (this.preview_mode){
-        this.$.find(".Ldt-Markers-PreviewDelete").show(); 
-    }
-    else {
-        this.$.find(".Ldt-Markers-Delete").show();
-    }
-    this.editing = true;
-}
-
-IriSP.Widgets.Markers.prototype.cancelEdit = function(){
-    if (this.selectedMarker){
-        // Click on "cancel" while editing a marker: back to visualization state
-        _divHtml = Mustache.to_html(this.infoTemplate, {
-            edit: false,
-            marker_info: this.selectedMarker.description,
-        })
-        this.$.find(".Ldt-Markers-Info").html(_divHtml);
-        if (!this.preview_mode){
-            this.$.find(".Ldt-Markers-MarkerDescription").click(this.functionWrapper("startEdit"));
-        }
-    }
-    else {
-        // Click on "cancel" while editing a marker: back to initial state
-        this.hidePlaceholder();
-        this.$.find(".Ldt-Markers-Info").html("");
-        this.$.find(".Ldt-Markers-RoundButton").hide()
-        this.$.find(".Ldt-Markers-Create").show()
-        this.updateCreateButtonState(this.media.getCurrentTime())
-    }
-    this.editing = false;
-}
-
-IriSP.Widgets.Markers.prototype.onDescriptionChange = function(){
-    // Returns false if the textarea is empty, true if there is text in it
-    if(!this.allow_empty_markers){
-        var _field = this.$.find(".Ldt-Markers-MarkerTextArea"),
-            _contents = _field.val();
-        _field.css("border-color", !!_contents ? "#e87d9f" : "#ff0000");
-        if (!!_contents) {
-            _field.removeClass("empty");
-        } else {
-            _field.addClass("empty");
-        }
-        this.pauseOnWrite();
-        return !!_contents;
-    }
-    else {
-        // If the widget is configured to allow to post empty markers, it returns true
-        return true
-    }
-};
-
-IriSP.Widgets.Markers.prototype.pauseOnWrite = function(){
-    if (this.pause_on_write && !this.media.getPaused()) {
-        this.media.pause();
-    }
-};
-
-IriSP.Widgets.Markers.prototype.showScreen = function(_screenName) {
-    this.$.find('.Ldt-Markers-Screen' + _screenName).show()
-        .siblings().hide();
-}
-
-IriSP.Widgets.Markers.prototype.revertToMainScreen = function(){
-    if (this.$.find(".Ldt-Markers-ScreenMain").is(":hidden")){
-        this.showScreen("Main");
-        this.cancelEdit();
-        if (this.selectedMarker){
-            this.$.find(".Ldt-Markers-RoundButton").hide();
-            if (this.preview_mode){
-                this.$.find(".Ldt-Markers-PreviewDelete").show(); 
-            }
-            else {
-                this.$.find(".Ldt-Markers-Delete").show();
-            }
-        }
-        else {
-            this.$.find(".Ldt-Markers-RoundButton").hide();
-            this.$.find(".Ldt-Markers-Create").show();
-            this.updateCreateButtonState();
-        }
-    }
-}
-
-IriSP.Widgets.Markers.prototype.hidePlaceholder = function(){
-    this.$.find(".Ldt-Markers-PlaceholderMarker").remove();
-}
-
-IriSP.Widgets.Markers.prototype.showPlaceholder = function(_time){   
-    var _scale = this.width / this.source.getDuration(),
-        _left = _time * _scale -1,
-        _data = {
-            left: _left,
-            height: this.line_height-1,
-            ball_top: (this.ball_radius*2 > this.line_height) ? 0 : ((this.line_height - this.ball_radius*2)/2)-1,
-            ball_radius: (this.ball_radius*2 > this.line_height) ? this.line_height/2 : this.ball_radius,
-            ball_diameter: (this.ball_radius*2 > this.line_height) ? this.line_height/2 : this.ball_radius*2,
-            ball_left: -this.ball_radius,
-            marker_color: this.placeholder_color
-        },
-        _html = Mustache.to_html(this.markerPlaceholderTemplate, _data),
-        _el = IriSP.jQuery(_html);
-        
-    list_$ = this.$.find(".Ldt-Markers-List");
-    _el.appendTo(list_$);
-}
-
-IriSP.Widgets.Markers.prototype.clearSelectedMarker = function(){
-    if (this.selectedMarker){
-        var _divHtml = "";
-        
-        this.selectedMarker = false;
-        this.$.find(".Ldt-Markers-Info").html(_divHtml);
-        this.$.find(".Ldt-Markers-RoundButton").hide();
-        this.$.find(".Ldt-Markers-Create").show();
-        this.$.find(".Ldt-Markers-MarkerBall").toggleClass("selected", false);
-        this.updateCreateButtonState(this.media.getCurrentTime())
-    }
-}
-
-IriSP.Widgets.Markers.prototype.drawMarkers = function(){
-    var _this = this,
-        _scale = this.width / this.source.getDuration(),
-        list_$ = this.$.find('.Ldt-Markers-List'),
-        _displayed_markers = this.markers;
-
-    this.$.remove("Ldt-Markers-Marker");
-    list_$.html("");
-    
-    if (this.filter_per_user && this.usernames.length > 1){
-        var _username = this.$.find(".Ldt-Markers-userFilter-dropdown")[0].options[this.$.find(".Ldt-Markers-userFilter-dropdown")[0].selectedIndex].value;
-        _displayed_markers = _displayed_markers.filter(function(_marker){
-            return _marker.creator == _username;
-        })
-    }
-    
-    _displayed_markers.forEach(function(_marker){
-        var _left = _marker.begin * _scale -1,
-            _data = {
-                left: _left,
-                height: _this.line_height-1,
-                ball_top: (_this.ball_radius*2 > _this.line_height) ? 0 : ((_this.line_height - _this.ball_radius*2)/2)-1,
-                ball_radius: (_this.ball_radius*2 > _this.line_height) ? _this.line_height/2 : _this.ball_radius,
-                ball_diameter: (_this.ball_radius*2 > _this.line_height) ? _this.line_height/2 : _this.ball_radius*2,
-                ball_left: -_this.ball_radius,
-                marker_color: ((_this.selectedMarker)&&(_this.selectedMarker.id == _marker.id))? _this.selected_color : _this.marker_color
-            },
-            _html = Mustache.to_html(_this.markerTemplate, _data),
-            _el = IriSP.jQuery(_html);
-        
-        if ((_this.selectedMarker)&&(_this.selectedMarker.id == _marker.id)){
-            _el.children().toggleClass("selected", true);
-        }
-        
-        _el.mouseover(function(){
-                if (!((_this.selectedMarker)&&(_this.selectedMarker.id == _marker.id))){
-                    _el.children().css("background-color", _this.hover_color);
-                };
-            })
-           .mouseout(function(){
-              if (!((_this.selectedMarker)&&(_this.selectedMarker.id == _marker.id))){
-                  _el.children().css("background-color", _this.marker_color);
-              };
-           })
-           .click(function(){
-               _this.showScreen("Main");
-               _this.cancelEdit();
-               _this.hidePlaceholder();
-               if (!((_this.selectedMarker)&&(_this.selectedMarker.id == _marker.id))){
-                  // if there either is no marker selected or we click a different marker
-                  list_$.find(".Ldt-Markers-MarkerBall").css("background-color", _this.marker_color)
-                  list_$.find(".Ldt-Markers-MarkerBall").toggleClass("selected", false);
-                  _el.children().toggleClass("selected", true);
-                  _el.children().css("background-color", _this.selected_color)
-                  _this.selectedMarker = _marker;
-                  
-                  _divHtml = Mustache.to_html(_this.infoTemplate, {
-                      edit: false,
-                      marker_info: _marker.description,
-                  })
-                  
-                  _this.$.find(".Ldt-Markers-Info").html(_divHtml);
-                  if (!_this.preview_mode){
-                      _this.$.find(".Ldt-Markers-MarkerDescription").click(_this.functionWrapper("startEdit"));
-                  }
-                  _this.$.find(".Ldt-Markers-RoundButton").hide();
-                  if (_this.preview_mode){
-                      _this.$.find(".Ldt-Markers-PreviewDelete").show(); 
-                  }
-                  else {
-                      _this.$.find(".Ldt-Markers-Delete").show();
-                  }
-
-               }
-               else {
-                   // if we click the currently selected marker, we unselect it
-                   _el.children().css("background-color", _this.hover_color);
-                   _this.clearSelectedMarker();
-               }
-               
-               if (_this.selectedMarker) {
-                   // Only if we select a new marker do we pause video and time jump
-                   _this.media.pause();
-                   _marker.trigger("click");
-               }
-           })
-           .appendTo(list_$);
-    })
-}
-
-
-IriSP.Widgets.Markers.prototype.onSubmit = function(){
-    
-    /* If mandatory fields are empty, we cancel the sending */
-    if (!this.allow_empty_markers && !this.onDescriptionChange()){
-        return false;
-    }
-    
-    /* We pause the video if it's still playing */
-    if (!this.media.getPaused()){
-        this.media.pause();
-    }
-    
-    var _this = this,
-        _exportedAnnotations = new IriSP.Model.List(this.player.sourceManager), /* We create a List to send to the server that will contains the annotation */
-        _export = this.player.sourceManager.newLocalSource({serializer: IriSP.serializers[this.api_serializer]}), /* We create a source object using a specific serializer for export */
-        _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* We get the AnnotationType in which the annotation will be added */
-        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, _export)); /* If it doesn't already exists, we create it */
-    if (this.selectedMarker){
-        var _annotation = this.selectedMarker,
-            _url = Mustache.to_html(this.api_endpoint_template_edit, {annotation_id: this.selectedMarker ? this.selectedMarker.id : ""});
-        _annotation.source = _export
-        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(); /* Description field */
-    }
-    else {
-        var _annotation = new IriSP.Model.Annotation(false, _export),
-            _url = Mustache.to_html(this.api_endpoint_template_create);
-        
-        /* If we created an AnnotationType on the spot ... */
-        if (!_annotationTypes.length) {
-            /* ... We must not send its id to the server ... */
-            _annotationType.dont_send_id = true;
-            /* ... And we must include its title. */
-            _annotationType.title = this.annotation_type;
-        }
-        
-        _annotation.setMedia(this.source.currentMedia.id); /* Annotated media ID */
-        if (!this.selectedMarker){
-            _annotation.setBegin(this.newMarkerCurrentTime);
-            _annotation.setEnd(this.newMarkerCurrentTime);
-        }
-        _annotation.setAnnotationType(_annotationType.id); /* AnnotationType ID */
-        if (this.project_id != ""){
-            /* Project id, only if it's been specifiec in the config */
-            _annotation.project_id = this.project_id;
-        }
-        _annotation.created = new Date(); /* Creation date */
-        _annotation.description = this.$.find(".Ldt-Markers-MarkerTextArea").val(); /* Description field */
-        _annotation.creator = this.creator_name;
-    }
-    _annotation.project_id = this.project_id;
-    
-    _exportedAnnotations.push(_annotation); /* We add the annotation in the list to export */
-    _export.addList("annotation",_exportedAnnotations); /* We add the list to the source object */ 
-    
-    /* We send the AJAX request to the server ! */
-    IriSP.jQuery.ajax({
-        url: _url,
-        type: this.selectedMarker ? this.api_method_edit : this.api_method_create,
-        contentType: 'application/json',
-        data: _export.serialize(),
-        success: function(_data) {
-            _this.showScreen('Success');
-            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
-            _export.getAnnotations().removeElement(_annotation, true); /* We delete the sent annotation to avoid redundancy */
-            _export.deSerialize(_data); /* Data deserialization */
-            _annotation.id = _data.id;
-            _this.source.merge(_export); /* We merge the deserialized data with the current source data */
-            if (_this.pause_on_write && _this.media.getPaused() && _this.play_on_submit) {
-                _this.media.play();
-            }
-            _this.markers.push(_annotation);
-            _this.selectedMarker = _annotation;
-            _this.drawMarkers();
-            _this.player.trigger("AnnotationsList.refresh");
-            _this.player.trigger("Markers.refresh");
-        },
-        error: function(_xhr, _error, _thrown) {
-            IriSP.log("Error when sending annotation", _thrown);
-            _export.getAnnotations().removeElement(_annotation, true);
-            _this.showScreen('Failure');
-            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
-        }
-    });
-    this.showScreen('Sending');
-    
-    return false;
-};
-
-IriSP.Widgets.Markers.prototype.sendDelete = function(){
-    _this = this;
-    _url = Mustache.to_html(this.api_endpoint_template_delete, {annotation_id: this.selectedMarker ? this.selectedMarker.id : "", project_id: this.selectedMarker.project_id? this.selectedMarker.project_id : this.project_id});
-    IriSP.jQuery.ajax({
-        url: _url,
-        type: this.api_method_delete,
-        contentType: 'application/json',
-        success: function(_data) {
-            _this.showScreen('DeleteSuccess');
-            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
-            if (_this.pause_on_write && _this.media.getPaused() && _this.play_on_submit) {
-                _this.media.play();
-            }
-            _this.markers.removeElement(_this.selectedMarker);
-            _this.selectedMarker = false
-            _this.player.trigger("AnnotationsList.refresh");
-            _this.player.trigger("Markers.refresh");
-        },
-        error: function(_xhr, _error, _thrown) {
-            IriSP.log("Error when sending annotation", _thrown);
-            _this.showScreen('Failure');
-            window.setTimeout(_this.functionWrapper("revertToMainScreen"),(_this.after_send_timeout || 5000));
-        }
-    });
-    this.showScreen("Sending")
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/MashupPlayer.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-.Ldt-MashupPlayer-Media {
-    position: absolute;
-}
-
-.Ldt-MashupPlayer-Waiting {
-    position: absolute; left: 0; top: 0; width: 100%; height: 100%;
-    background-color: rgba(120, 120, 140, .6);
-    background-image: url(img/reel.gif);
-    background-position: center;
-    background-repeat: no-repeat;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/MashupPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-IriSP.Widgets.MashupPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.is_mashup = true;
-};
-
-IriSP.Widgets.MashupPlayer.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.MashupPlayer.prototype.defaults = {
-    aspect_ratio: 14/9,
-    split_screen: false,
-    player_type: "PopcornPlayer",
-    background: "#000000"
-};
-
-IriSP.Widgets.MashupPlayer.prototype.draw = function() {
-    var _this = this,
-        _mashup = this.media,
-        _currentMedia = null,
-        _currentAnnotation = null,
-        _segmentBegin,
-        _segmentEnd,
-        _timecode = 0,
-        _seeking = false,
-        _seekdiv,
-        _timedelta,
-        medialist = _mashup.getMedias();
-    
-    _mashup.paused = (!this.autostart && !this.autoplay);
-    
-    function changeCurrentAnnotation() {
-        if (_timecode >= _mashup.duration) {
-            if (!_mashup.paused) {
-                _mashup.paused = true;
-                _mashup.trigger("pause");
-            }
-            _timecode = 0;
-        }
-        var _annotation = _mashup.getAnnotationAtTime( _timecode );
-        if (typeof _annotation === "undefined") {
-            if (_currentMedia) {
-                _currentMedia.pause();
-                if (!_mashup.paused) {
-                    _mashup.paused = true;
-                    _mashup.trigger("pause");
-                }
-            }
-            return;
-        }
-        if (_annotation !== _currentAnnotation) {
-            _currentAnnotation = _annotation;
-            _segmentBegin = _currentAnnotation.annotation.begin.milliseconds;
-            _segmentEnd = _currentAnnotation.annotation.end.milliseconds;
-            _timedelta = _segmentBegin - _currentAnnotation.begin.milliseconds;
-            _currentMedia = _currentAnnotation.getMedia();
-            
-            for (var _i = 0; _i < medialist.length; _i++) {
-                if (medialist[_i].id !== _currentMedia.id) {
-                    if (!_this.split_screen) {
-                        medialist[_i].hide();
-                    }
-                    medialist[_i].pause();
-                } else {
-                    medialist[_i].show();
-                }
-            }
-            
-    /* PRELOADING */
-            var _preloadedMedias = [],
-                _toPreload = _mashup.getAnnotations().filter(function(_a) {
-                return (_a.begin >= _currentAnnotation.end && _a.getMedia() !== _currentMedia);
-            });
-            IriSP._(_toPreload).each(function(_a) {
-                var _media = _a.getMedia();
-                if (IriSP._(_preloadedMedias).indexOf(_media.id) === -1) {
-                    _preloadedMedias.push(_media.id);
-                    _media.setCurrentTime(_a.annotation.begin.getSeconds());
-                    _media.seeking = true;
-/*
-                    console.log("Preloading ", _media.id, " at t=", _a.annotation.begin.getSeconds());
-*/
-                }
-            });
-            
-    //        console.log("Changed segment: media="+ this.currentMedia.id + ", from=" + this.segmentBegin + " to=" + this.segmentEnd +", timedelta = ", this.timedelta)
-    //    } else {
-    //        console.log("changeCurrentAnnotation called, but segment hasn't changed");
-        }
-        
-        _currentMedia.setCurrentTime( _timecode + _timedelta);
-        _currentMedia.seeking = true;
-        
-        if (!_mashup.paused) {
-            _currentMedia.play();
-            _seeking = true;
-            _seekdiv.show();
-        }
-/*
-        console.log("Setting time of media", _currentMedia.id, "to", _timecode + _timedelta)     
-*/
-        _mashup.trigger("timeupdate", new IriSP.Model.Time(_timecode));
-
-    }
-    
-    if (!this.height) {
-        this.height = Math.floor(this.width/this.aspect_ratio);
-        this.$.css({
-            height: this.height
-        });
-    }
-    
-    this.$.css({
-        background: this.background
-    });
-    
-    var _grid = Math.ceil(Math.sqrt(medialist.length)),
-        _width = (this.split_screen ? this.width / _grid : this.width),
-        _height = (this.split_screen ? this.height / _grid : this.height);
-
-    IriSP._(medialist).each(function(_media, _key) {
-        var _el = IriSP.jQuery('<div class="Ldt-MashupPlayer-Media"><div class="Ldt-MashupPlayer-Subwidget"></div></div>');
-        _el.css({
-            top: (_this.split_screen ? _height * Math.floor(_key / _grid) : 0),
-            left: (_this.split_screen ? _width * (_key % _grid) : 0),
-            height: _height,
-            width: _width,
-            display: (_this.split_screen ? "block" : "none")
-        });
-        _this.$.append(_el);
-        
-        _this.insertSubwidget(
-            _el.find(".Ldt-MashupPlayer-Subwidget"),
-            IriSP._({
-                type: _this.player_type,
-                media_id: _media.id,
-                height: _height,
-                width: _width,
-                url_transform: _this.url_transform
-            }).extend(_this.player_options)
-        );
-        
-        _media.loadedMetadata = false;
-        _media.show = function() {
-            _el.show();
-        };
-        _media.hide = function() {
-            _el.hide();
-        };
-        _media.on("loadedmetadata", function() {
-            _media.loadedMetadata = true;
-            var _allLoaded = true;
-            for (var _i = 0; _i < medialist.length; _i++) {
-                _allLoaded = _allLoaded && medialist[_i].loadedMetadata;
-            }
-            if (_allLoaded) {
-                _seekdiv.fadeOut();
-                changeCurrentAnnotation();
-                _mashup.trigger("loadedmetadata");
-            }
-        });
-        _media.on("timeupdate", function(_time) {
-            if (!_mashup.paused && _media === _currentMedia && !_media.seeking) {
-/*
-                var _status = "Timeupdate from " + _media.id + " at time " + _time;
-*/
-                if ( _time < _segmentEnd ) {
-                    if ( _time >= _segmentBegin ) {
-                        _timecode = _time - _timedelta;
-/*
-                        _status += " within segment";
-*/
-                    } else {
-                        _timecode = _segmentBegin - _timedelta;
-                        _media.setCurrentTime(_segmentBegin);
-/*
-                        _status += " before segment";
-*/
-                    }
-                } else {
-                    _timecode = _segmentEnd - _timedelta;
-                    _media.pause();
-                    changeCurrentAnnotation();
-/*
-                    _status += " after segment";
-*/
-                }
-/*
-                _status += " (" + _segmentBegin + " to " + _segmentEnd + ")" + ", translated to " + _timecode;
-                console.log(_status);
-*/
-                _mashup.trigger("timeupdate", new IriSP.Model.Time(_timecode));
-            }
-        });
-        _media.on("seeked", function() {
-            _media.seeking = false;
-            if (_media === _currentMedia && _seeking) {
-                _seeking = false;
-                _seekdiv.hide();
-            }
-        });
-        _media.on("play", function() {
-            if (_media === _currentMedia) {
-                _mashup.trigger("play");
-            }
-        });
-        _media.on("pause", function() {
-            if (_media === _currentMedia) {
-                _mashup.trigger("pause");
-            }
-        });
-        _media.on("volumechange", function() {
-            _mashup.muted = _media.muted;
-            _mashup.volume = _media.volume;
-            _mashup.trigger("volumechange");
-        });
-    });
-    
-    _seekdiv = IriSP.jQuery('<div class="Ldt-MashupPlayer-Waiting"></div>');
-    
-    this.$.append(_seekdiv);
-
-    // Binding functions to Popcorn
-    
-    _mashup.on("setcurrenttime", function(_milliseconds) {
-        _timecode = _milliseconds;
-        changeCurrentAnnotation();
-    });
-    
-    _mashup.on("setvolume", function(_vol) {
-        for (var _i = 0; _i < medialist.length; _i++) {
-            medialist[_i].setVolume(_vol);
-        }
-        _mashup.volume = _vol;
-    });
-    
-    _mashup.on("setmuted", function(_muted) {
-        for (var _i = 0; _i < medialist.length; _i++) {
-            medialist[_i].setMuted(_muted);
-        }
-        _mashup.muted = _muted;
-    });
-    
-    _mashup.on("setplay", function() {
-        _mashup.paused = false;
-        changeCurrentAnnotation();
-    });
-    
-    _mashup.on("setpause", function() {
-        _mashup.paused = true;
-        if (_currentMedia) {
-            _currentMedia.pause();
-        }
-    });
-    
-    _mashup.on("loadedmetadata", changeCurrentAnnotation);
-   
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/MediaList.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-.Ldt-MediaListWidget a {
-    text-decoration: none;
-}
-
-.Ldt-MediaListWidget h2 {
-    clear: both;
-}
-
-.Ldt-MediaList-NowContainer {
-    min-height: 60px;
-    margin: 2px 0;
-}
-
-h3.Ldt-MediaList-Now-Title {
-    font-size: 13px;
-    margin: 2px 2px 0 82px;
-    font-weight: bold;
-}
-
-.Ldt-MediaListWidget h3 a {
-    color: #0068c4;
-}
-
-p.Ldt-MediaList-Now-Description {
-    margin: 2px 0 2px 82px;
-    font-size: 12px;
-    color: #666666;
-}
-
-ul.Ldt-MediaList-OtherList {
-    list-style: none;
-    padding: 2px;
-    margin: 0;
-}
-
-li.Ldt-MediaList-OtherList-li {
-    width: 100%;
-    clear: both;
-    margin: 2px 0;
-    padding: 2px 0;
-    min-height: 48px;
-}
-
-.Ldt-MediaList-OtherList-li:hover, .Ldt-MediaList-NowContainer:hover {
-    background: url(img/pinstripe-grey.png);
-}
-
-.Ldt-MediaList-Now-ThumbContainer, .Ldt-MediaList-Other-ThumbContainer {
-    float: left;
-    width: 80px;
-    height: 50px;
-    text-align: center;
-    margin: 2px 0;
-}
-
-.Ldt-MediaList-Now-ThumbContainer {
-    float: left;
-    width: 80px;
-    height: 50px;
-    text-align: center;
-    margin: 2px 0;
-}
-
-.Ldt-MediaList-Other-ThumbContainer {
-    width: 60px;
-    height: 38px;
-}
-
-.Ldt-MediaList-Now-Thumbnail, .Ldt-MediaList-Other-Thumbnail {
-    border: none;
-    max-width: 100%;
-    max-height: 100%;
-    margin: 0 auto;
-}
-
-h3.Ldt-MediaList-Other-Title {
-    font-size: 12px;
-    margin: 2px 2px 0 62px;
-    font-weight: bold;
-}
-
-p.Ldt-MediaList-Other-Description {
-    margin: 2px 0 2px 62px;
-    font-size: 10px;
-    color: #666666;
-}
-
-.Ldt-MediaList-Now-MediaView {
-    clear: both; width: 100%; height: 12px; margin: 5px 0 0; overflow: hidden; position: relative;
-}
-
-.Ldt-MediaList-Other-MediaView {
-    clear: both; width: 100%; height: 6px; margin: 5px 0 0; overflow: hidden; position: relative;
-}
-
-.Ldt-MediaList-MediaView-Background {
-    position: absolute; top: 0; left: 0; width: 100%; height: 100%; filter: alpha(opacity=50); opacity: 0.5; background: #999999;
-}
-
-.Ldt-MediaList-Segment {
-    position: absolute; top: 0; height: 100%; border-style: none solid; margin-left: -1px; border-color: #ffffff; border-width: 1px;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/MediaList.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-IriSP.Widgets.MediaList = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.lastMedia = false;
-};
-
-IriSP.Widgets.MediaList.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.MediaList.prototype.messages = {
-    "fr": {
-        now_playing: "Vidéo en cours",
-        all_media: "Toutes les vidéos",
-        other_media: "Autres vidéos"
-    },
-    "en": {
-        now_playing: "Now playing",
-        all_media: "All videos",
-        other_media: "Other videos"
-    }
-};
-
-IriSP.Widgets.MediaList.prototype.defaults = {
-    default_thumbnail : "http://ldt.iri.centrepompidou.fr/static/site/ldt/css/imgs/video_sequence.png",
-    media_url_template : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/",
-    default_color : "#000080"
-};
-
-IriSP.Widgets.MediaList.prototype.template =
-    '<div class="Ldt-MediaList-NowPlaying"><h2>{{l10n.now_playing}}</h2><hr />'
-    + '<div class="Ldt-MediaList-NowContainer">'
-    + '<div class="Ldt-MediaList-Now-ThumbContainer"><a href="" target="_blank">'
-    + '<img class="Ldt-MediaList-Now-Thumbnail" src="" /></a></div>'
-    + '<h3 class="Ldt-MediaList-Now-Title"><a href="" target="_blank"></a></h3>'
-    + '<p class="Ldt-MediaList-Now-Description"></p><div class="Ldt-MediaList-Now-MediaView"></div></div></div>'
-    + '<div class="Ldt-MediaList-Other"><h2></h2><hr /><ul class="Ldt-MediaList-OtherList"></ul></div>';
-
-IriSP.Widgets.MediaList.prototype.mediaViewTemplate =
-    '<div class="Ldt-MediaList-MediaView-Background"></div>{{#segments}}<div class="Ldt-MediaList-Segment" style="background: {{color}}; left: {{left}}px; width: {{width}}px;"></div>{{/segments}}';
-
-IriSP.Widgets.MediaList.prototype.mediaTemplate =
-    '<li class="Ldt-MediaList-OtherList-li"><div class="Ldt-MediaList-Other-ThumbContainer"><a href="{{url}}" target="_blank">'
-    + '<img class="Ldt-MediaList-Other-Thumbnail" src="{{thumbnail}}" /></a></div>'
-    + '<h3 class="Ldt-MediaList-Other-Title"><a href="{{url}}" target="_blank">{{title}}</a></h3>'
-    + '<p class="Ldt-MediaList-Other-Description">{{description}}</p><div class="Ldt-MediaList-Other-MediaView">'
-    + IriSP.Widgets.MediaList.prototype.mediaViewTemplate + '</div></li>';
-
-
-IriSP.Widgets.MediaList.prototype.onSearch = function(searchString) {
-    this.searchString = typeof searchString !== "undefined" ? searchString : '';
-    var _n = this.refresh(true);
-    if (this.searchString) {
-        if (_n) {
-            this.player.trigger("search.matchFound");
-        } else {
-            this.player.trigger("search.noMatchFound");
-        }
-    }
-};
-
-IriSP.Widgets.MediaList.prototype.draw = function() {
-    this.$.addClass("Ldt-MediaListWidget")
-    this.renderTemplate();
-    var _this = this;
-    if (typeof this.media.getMedias === "function") {
-        this.media.on("enter-annotation", function(_a) {
-            _this.redraw(_a.getMedia());
-        });
-    }
-    this.redraw();
-};
-
-IriSP.Widgets.MediaList.prototype.getSegments = function(_media) {
-    var _this = this,
-        _scale = this.$.width()/_media.duration.milliseconds;
-    return this.getWidgetAnnotations()
-        .filter(function(_annotation) {
-            return _annotation.getMedia().id == _media.id;
-        })
-        .map(function(_a) {
-            var _annotation = ( _a.type = "mashedAnnotation" ? _a.annotation : _a );
-            return {
-                left: _scale * _annotation.begin,
-                width: _scale * (_annotation.end - _annotation.begin),
-                color: ( typeof _annotation.color !== "undefined" && _annotation.color ? _annotation.color : _this.default_color )
-            };
-        });
-};
-
-IriSP.Widgets.MediaList.prototype.redraw = function(_media) {
-    if (typeof _media !== "undefined") {
-        this.$.find('.Ldt-MediaList-Other h2').html(this.l10n.other_media);
-        this.$.find('.Ldt-MediaList-NowPlaying').show();
-        this.$.find('.Ldt-MediaList-Now-Thumbnail').attr("src", _media.thumbnail || this.default_thumbnail);
-        this.$.find('.Ldt-MediaList-Now-Title a').html(_media.title);
-        this.$.find('.Ldt-MediaList-Now-Description').html(_media.description);
-        var _url = _media.url || Mustache.to_html(
-                this.media_url_template, {
-                    media: _media.id
-                });
-        this.$.find('.Ldt-MediaList-NowContainer a').attr("href", _url);
-        var _mediaView = Mustache.to_html( this.mediaViewTemplate, {
-            segments: this.getSegments(_media)
-        });
-        this.$.find('.Ldt-MediaList-Now-MediaView').html(_mediaView);
-    } else {
-        this.$.find('.Ldt-MediaList-Other h2').html(this.l10n.all_media);
-        this.$.find('.Ldt-MediaList-NowPlaying').hide();
-    }
-    var _this = this,
-        _otherlist = this.source.getMedias().filter(function(_m) {
-            return (_m.id !== _this.lastMedia)
-        });
-    if (_otherlist.length) {
-        this.$.find('.Ldt-MediaList-Other').show();
-        var _html = _otherlist.map(function(_media) {
-            return Mustache.to_html(_this.mediaTemplate, {
-                thumbnail: _media.thumbnail || _this.default_thumbnail,
-                url: _media.url || Mustache.to_html(
-                    _this.media_url_template, {
-                        media: _media.id
-                    }),
-                title: _media.title,
-                description: _media.description,
-                segments: _this.getSegments(_media)
-            });
-        }).join("");
-        this.$.find('.Ldt-MediaList-OtherList').html(_html);
-    } else {
-        this.$.find('.Ldt-MediaList-Other').hide();
-    }
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Mediafragment.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-IriSP.Widgets.Mediafragment = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.last_hash_key = "";
-    this.last_hash_value = "";
-    this.last_extra_key = "";
-    this.last_extra_value = "";
-
-    window.onhashchange = this.functionWrapper("goToHash");
-    if (typeof window.addEventListener !== "undefined") {
-        var _this = this;
-        window.addEventListener('message', function(_msg) {
-            if (/^#/.test(_msg.data)) {
-                _this.setWindowHash(_msg.data);
-            }
-        });
-    };
-    this.onMdpEvent("Mediafragment.setHashToAnnotation","setHashToAnnotation");
-    this.blocked = false;
-};
-
-IriSP.Widgets.Mediafragment.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Mediafragment.prototype.draw = function() {
-    this.onMediaEvent("setpause","setHashToTime");
-    var _this = this;
-    this.getWidgetAnnotations().forEach(function(_annotation) {
-        _annotation.on("click", function() {
-            _this.setHashToAnnotation(_annotation);
-        });
-    });
-    if (this.media.loadedMetadata) {
-        this.goToHash();
-    } else {
-        this.onMediaEvent("loadedmetadata","goToHash");
-    }
-};
-
-IriSP.Widgets.Mediafragment.prototype.setWindowHash = function(_hash) {
-    if (typeof window.history !== "undefined" && typeof window.history.replaceState !== "undefined") {
-        window.history.replaceState({}, "", _hash);
-    } else {
-        document.location.hash = _hash;
-    }
-};
-
-IriSP.Widgets.Mediafragment.prototype.getLastHash = function() {
-    var _tab = document.location.hash.replace(/^#/,'').split('&');
-    _tab = IriSP._(_tab).filter(function(_el) {
-        return _el && !/^(id|t)=/.test(_el);
-    });
-    if (this.last_hash_key) {
-        _tab.push(this.last_hash_key + '=' + this.last_hash_value);
-    }
-    if (this.last_extra_key) {
-        _tab.push(this.last_extra_key + '=' + this.last_extra_value);
-    }
-    return '#' + _tab.join('&');
-};
-
-IriSP.Widgets.Mediafragment.prototype.goToHash = function() {
-    if (document.location.hash !== this.getLastHash()) {
-        var _tab = document.location.hash.replace(/^#/,'').split('&');
-        for (var _i = 0; _i < _tab.length; _i++) {
-            var _subtab = _tab[_i].split("=");
-            if (_subtab[0] == "id" || _subtab[0] == "t") {
-                this.last_hash_key = _subtab[0];
-                this.last_hash_value = _subtab[1];
-                if (this.last_hash_key == "id") {
-                    var _annotation = this.source.getElement(this.last_hash_value);
-                    if (typeof _annotation !== "undefined") {
-                        this.media.setCurrentTime(_annotation.begin);
-                    } else {
-                        /* Proceed parsing elements, maybe a t was specified */
-                        continue;
-                    }
-                }
-                if (this.last_hash_key == "t") {
-                    this.media.setCurrentTime(1000 * this.last_hash_value);
-                }
-                break;
-            }
-        }
-    }
-};
-
-IriSP.Widgets.Mediafragment.prototype.setHashToAnnotation = function(_annotation) {
-    this.setHash( 'id', _annotation.id, 't', _annotation.begin / 1000.0 );
-};
-
-IriSP.Widgets.Mediafragment.prototype.setHashToTime = function() {
-    this.setHash( 't', this.media.getCurrentTime().getSeconds() );
-};
-
-IriSP.Widgets.Mediafragment.prototype.setHash = function(_key, _value, _key2, _value2) {
-    if (!this.blocked && (this.last_hash_key !== _key || this.last_hash_value !== _value)) {
-        this.last_hash_key = _key;
-        this.last_hash_value = _value;
-        this.last_extra_key = _key2;
-        this.last_extra_value = _value2;
-
-        var _hash = this.getLastHash();
-        this.setWindowHash(_hash);
-        if (window.parent !== window) {
-            window.parent.postMessage(_hash,"*");
-        }
-        this.block();
-    }
-};
-
-IriSP.Widgets.Mediafragment.prototype.unblock = function() {
-    if (typeof this.blockTimeout !== "undefined") {
-        window.clearTimeout(this.blockTimeout);
-    }
-    this.blockTimeout = undefined;
-    this.blocked = false;
-};
-
-IriSP.Widgets.Mediafragment.prototype.block = function() {
-    if (typeof this.blockTimeout !== "undefined") {
-        window.clearTimeout(this.blockTimeout);
-    }
-    this.blocked = true;
-    this.blockTimeout = window.setTimeout(this.functionWrapper("unblock"), 1500);
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/MultiSegments.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-IriSP.Widgets.MultiSegments = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.MultiSegments.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.MultiSegments.prototype.defaults = {
-    annotation_show_arrow: true,
-    annotation_start_minimized: false,
-    annotation_show_annotation_type: true,
-    show_all: false
-};
-
-IriSP.Widgets.MultiSegments.prototype.draw = function() {
-    var _this = this,
-        lines = [],
-        currentLine = null,
-        segmentsopts = {},
-        annotationopts = {};
-    IriSP._(this).each(function(_v,_k) {
-        if (/^segments_/.test(_k)) {
-            segmentsopts[_k.replace(/^segments_/,"")] = _v;
-        }
-        if (/^annotation_/.test(_k)) {
-            annotationopts[_k.replace(/^annotation_/,"")] = _v;
-        }
-    });
-    this.source.getAnnotationTypes().forEach(function(_anntype) {
-        var segments = _anntype.getAnnotations().filter(function(_ann) {
-            return _ann.getDuration() > 0 && _ann.getMedia().id == _this.media.id;
-        });
-        if (segments.length) {
-            
-            var visible = false;
-            
-            var line = {
-                segmentWidget: IriSP.jQuery("<div>"),
-                annotationWidget: IriSP.jQuery("<div>"),
-                hasSegmentsNow: function() {
-                    var _time = _this.media.getCurrentTime();
-                    return !!segments.filter(function(_annotation) {
-                        return _annotation.begin <= _time && _annotation.end > _time;
-                    }).length;
-                },
-                hide: function() {
-                    if (visible) {
-                        visible = false;
-                        this.annotationWidget.slideUp();
-                    }
-                },
-                show: function() {
-                    if (!visible) {
-                        visible = true;
-                        this.annotationWidget.slideDown();
-                    }
-                }
-            };
-                
-                
-            line.segmentWidget
-                .addClass("Ldt-MultiSegments-Segment")
-                .appendTo(_this.$);
-                
-            if (!_this.show_all) {
-                line.segmentWidget.mouseenter(function() {
-                    if (line.hasSegmentsNow()) {
-                        currentLine = line;
-                        checkVisibilities();
-                    }
-                });
-            }
-            
-            line.annotationWidget
-                .addClass("Ldt-MultiSegments-Annotation")
-                .appendTo(_this.$)
-                .hide();
-                
-            _this.insertSubwidget(
-                line.segmentWidget,
-                IriSP._({
-                    type: "Segments",
-                    annotation_type: _anntype,
-                    width: '100%'
-                }).extend(segmentsopts)
-            );
-            
-            _this.insertSubwidget(
-                line.annotationWidget,
-                IriSP._({
-                    type: "Annotation",
-                    annotation_type: _anntype,
-                    width: '100%'
-                }).extend(annotationopts)
-            );
-            
-            lines.push(line);
-        }
-    });
-    
-    // open line on segment click
-    IriSP.jQuery(document).on("click",".Ldt-Segments-Segment",function(e){
-    	if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) {
-            currentLine = undefined;
-        }
-        IriSP._(lines).each(function(line) {
-        	if(IriSP.jQuery(e.target).parent().parent()[0]==line.segmentWidget[0]){
-        		currentLine = line;
-        		line.show();
-        	} else {
-                line.hide();
-            }
-        });
-    });
-    
-    //var _annotationWidgets = _this.$.find(".Ldt-MultiSegments-Annotation");
-    
-    function checkVisibilities(_time) {
-        /*if (!_this.show_all && currentLine && !currentLine.hasSegmentsNow()) {
-            currentLine = undefined;
-        }
-        IriSP._(lines).each(function(line) {
-            if (line.hasSegmentsNow()) {
-                if (!_this.show_all && !currentLine) {
-                    currentLine = line;
-                }
-                if (_this.show_all || line === currentLine) {
-                    line.show();
-                } else {
-                    line.hide();
-                }
-            } else {
-                line.hide();
-            }
-        });*/
-    }
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/NoteTaking.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-/* NoteTaking widget */
-.Ldt-NoteTaking-Text {
-    width: 100%;
-    min-height: 360px;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/NoteTaking.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/* This widget displays a note-taking view, that can be saved to localStorage */
-
-IriSP.Widgets.NoteTaking = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-}
-
-IriSP.Widgets.NoteTaking.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.NoteTaking.prototype.defaults = {
-    // Id that will be used as localStorage key
-    editable_storage: ""
-}
-
-IriSP.Widgets.NoteTaking.prototype.template = '<textarea class="Ldt-NoteTaking-Text"></textarea>';
-
-IriSP.Widgets.NoteTaking.prototype.draw = function() {
-    var widget = this;
-    var content;
-    var $ = IriSP.jQuery;
-
-    widget.renderTemplate();
-    content = widget.$.find('.Ldt-NoteTaking-Text');
-
-    function load_content() {
-        $(content).val(window.localStorage[widget.editable_storage]);
-    }
-    function save_content() {
-        window.localStorage[widget.editable_storage] = $(content).val();
-    }
-
-    // Load current transcript
-    if (window.localStorage[widget.editable_storage]) {
-        load_content();
-    }
-
-    // Thanks to http://stackoverflow.com/questions/4456545/how-to-insert-text-at-the-current-caret-position-in-a-textarea
-    $.fn.insertAtCaret = function(text) {
-        return this.each(function() {
-            if (this.selectionStart !== undefined) {
-                // mozilla/netscape support
-                var startPos = this.selectionStart,
-                    endPos = this.selectionEnd,
-                    scrollTop = this.scrollTop;
-                this.value = this.value.substring(0, startPos) + text + this.value.substring(endPos, this.value.length);
-                this.focus();
-                this.selectionStart = startPos + text.length;
-                this.selectionEnd = startPos + text.length;
-                this.scrollTop = scrollTop;
-            } else {
-                // IE input[type=text] and other browsers
-                this.value += text;
-                this.focus();
-                this.value = this.value;    // forces cursor to end
-            }
-        });
-    };
-
-    function getAroundCaret(el, length) {
-        // Return a selection of 2 * length characters around the caret
-        var startPos = el.selectionStart;
-        return el.value.substring(startPos - length, startPos + length);
-    };
-
-
-    $(content).keydown(function (_event) {
-        if (_event.keyCode == 13 && (_event.ctrlKey || _event.metaKey)) {
-            // Insert current timestamp
-            _event.preventDefault();
-            // Get current value
-            var match = /\[([\d:]+)\]/.exec(getAroundCaret(content[0], 8));
-            if (match) {
-                // Found a timecode. Go to position.
-                widget.media.setCurrentTime(IriSP.timestamp2ms(match[1]));
-            } else {
-                $(content).insertAtCaret("[" + (new IriSP.Model.Time(widget.media.getCurrentTime())).toString() + "]");
-                save_content();
-            }
-        }
-    }).on("input", function (_event) {
-        console.log("Change");
-        // Store updated value
-        save_content();
-    }).on("dblclick", function (_event) {
-            var match = /\[([\d:]+)\]/.exec(getAroundCaret(content[0], 8));
-            if (match) {
-                // Found a timecode. Go to position.
-                _event.preventDefault();
-                widget.media.setCurrentTime(IriSP.timestamp2ms(match[1]));
-            };
-    });
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/PlaceholderPlayer.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-.Ldt-PlaceholderPlayer {
-    font-size: 40px; text-align: center;
-    padding: 40px 0; font-weight: bolder;
-    background: #333333; color: #FFFFFF;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/PlaceholderPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/* This is a fake player, for when no video is available */
-
-IriSP.Widgets.PlaceholderPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.PlaceholderPlayer.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.PlaceholderPlayer.prototype.defaults = {
-    autostart: false
-};
-
-IriSP.Widgets.PlaceholderPlayer.prototype.template = '<div class="Ldt-PlaceholderPlayer">(loading)</div>';
-
-IriSP.Widgets.PlaceholderPlayer.prototype.draw = function() {
-    
-    this.renderTemplate();
-    
-    var paused = true,
-        timeDelta = 0,
-        currentTime = new IriSP.Model.Time(0),
-        media = this.media,
-        sel = this.$.find(".Ldt-PlaceholderPlayer");
-    
-    function updateTime() {
-        if (!paused) {
-            currentTime = new IriSP.Model.Time(new Date().valueOf() - timeDelta);
-            if (currentTime <= media.duration) {
-                media.trigger("timeupdate", currentTime);
-                setTimeout(updateTime, 100);
-            } else {
-                currentTime = media.duration;
-                media.pause();
-            }
-        }
-        sel.text(currentTime.toString(true));
-    }
-    
-    
-    // Binding functions to Popcorn
-    media.on("setcurrenttime", function(_milliseconds) {
-        timeDelta = new Date().valueOf() - _milliseconds;
-        currentTime = new IriSP.Model.Time(_milliseconds);
-        media.trigger("seeked");
-        media.trigger("timeupdate", currentTime);
-        sel.text(currentTime.toString(true));
-    });
-    
-    media.on("setplay", function() {
-        paused = false;
-        timeDelta = new Date().valueOf() - currentTime
-        media.trigger("play");
-        updateTime();
-    });
-    
-    media.on("setpause", function() {
-        paused = true;
-        media.trigger("pause");
-        updateTime();
-    });
-    
-    media.trigger("loadedmetadata");
-    media.trigger("setcurrenttime", 0);
-    
-    if (this.autostart) {
-        media.trigger("setplay");
-    }
-    
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Polemic.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
- * Polemic Widget CSS
- */
-
-.Ldt-Polemic {
-    border-style: solid none; border-color: #cccccc; border-width: 1px;
-}
-
-.Ldt-Polemic-Position {
-    background: #fc00ff;
-    position: absolute;
-    top: 0;
-    left: 0;
-    margin-left: -1px;
-    width: 2px;
-    height: 100%;
-}
-
-.Ldt-Polemic-TweetDiv {
-    position: absolute;
-}
-
--- a/src/ldt/ldt/static/ldt/metadataplayer/Polemic.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,414 +0,0 @@
-IriSP.Widgets.Polemic = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Polemic.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Polemic.prototype.messages = {
-    fr: {
-        from_: "de ",
-        _to_: " à ",
-        _annotations: " annotation(s)"
-    },
-    en: {
-        from_: "from ",
-        _to_: " to ",
-        _annotations: " annotation(s)"
-    }
-};
-
-IriSP.Widgets.Polemic.prototype.defaults = {
-    element_width : 5,
-    element_height : 5,
-    max_elements: 20,
-    annotation_type : "tweet",
-    defaultcolor : "#585858",
-    foundcolor : "#fc00ff",
-    default_version : "1",
-    polemics : {
-        "1" : [
-            {
-                "name" : "OK",
-                "keywords" : [ "++" ],
-                "color" : "#1D973D"
-            },
-            {
-                "name" : "KO",
-                "keywords" : [ "--" ],
-                "color" : "#CE0A15"
-            },
-            {
-                "name" : "REF",
-                "keywords" : [ "==", "http://" ],
-                "color" : "#C5A62D"
-            },
-            {
-                "name" : "Q",
-                "keywords" : [ "?" ],
-                "color" : "#036AAE"
-            }
-        ],
-        "2" : [
-            {
-                "name" : "OK",
-                "keywords" : [ "++" ],
-                "color" : "#1D973D"
-            },
-            {
-                "name" : "KO",
-                "keywords" : [ "!!" ],
-                "color" : "#CE0A15"
-            },
-            {
-                "name" : "REF",
-                "keywords" : [ "==", "http://" ],
-                "color" : "#C5A62D"
-            },
-            {
-                "name" : "Q",
-                "keywords" : [ "?" ],
-                "color" : "#036AAE"
-            }
-        ]
-    }
-};
-
-IriSP.Widgets.Polemic.prototype.getPolemics = function(version) {
-    if(typeof(version) === "undefined" || !version) {
-        version = this.default_version;
-    }
-    if(this.polemics.constructor === Array) {
-        return this.polemics;
-    } else {
-        return this.polemics[version];
-    }
-};
-
-IriSP.Widgets.Polemic.prototype.drawNoStackgraph = function(_max, _slices) {
-
-    var _this = this;
-    this.is_stackgraph = false;
-    if (_max) {
-
-        this.height = (2 + _max) * this.element_height;
-        this.$zone.css({
-            width: this.width + "px",
-            height: this.height + "px",
-            position: "relative"
-        });
-
-        var _x = 0;
-
-        function displayAnnotation(_elx, _ely, _pol, _col, _annotation) {
-            var _htmlAnnot = Mustache.to_html(
-                '<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-id:{{id}}, media-id:{{media_id}}, polemic:{{polemic}}, time:{{time}}" polemic-color="{{color}}"'
-                + ' tweet-title="{{title}}" annotation-id="{{id}}" style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',
-            {
-                id: _annotation.id,
-                media_id: _this.source.currentMedia.id,
-                polemic: _pol,
-                left: _elx,
-                top: _ely,
-                color: _col,
-                width: (_this.element_width-1),
-                height: _this.element_height,
-                title: _annotation.title,
-                time: _annotation.begin.toString()
-            });
-            var _el = IriSP.jQuery(_htmlAnnot);
-            _el.mouseover(function() {
-                _annotation.trigger("select");
-            }).mouseout(function() {
-                _annotation.trigger("unselect");
-            }).click(function() {
-                _annotation.trigger("click");
-                return false;
-            });
-            IriSP.attachDndData(_el, {
-                title: _annotation.title,
-                description: _annotation.description,
-                image: _annotation.thumbnail,
-                uri: (typeof _annotation.url !== "undefined"
-                    ? _annotation.url
-                    : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id)),
-            text: '[' + _annotation.begin.toString() + '] ' + _annotation.title
-            });
-            // test if annotation has several colors.
-            var colAr = [];
-            var _polemicVersion = (_annotation.content && _annotation.content.polemic_version) || _this.default_version,
-                _polemics = _this.getPolemics(_polemicVersion) || [],
-                _pol,
-                _polKey,
-                _polDef,
-                _rgxp;
-
-            for(var _j = 0; _j < _polemics.length; _j++) {
-                _pol = _polemics[_j];
-                _rgxp = IriSP.Model.regexpFromTextOrArray(_pol.keywords);
-                if(_rgxp.test(_annotation.description)) {
-                    colAr.push(_pol.color);
-                }
-            }
-
-            // display annotation
-            _annotation.on("select", function() {
-                if (_this.tooltip) {
-                    _this.tooltip.show(
-                        + Math.floor(_elx + (_this.element_width - 1) / 2),
-                        + _ely,
-                        _annotation.title,
-                        ( (colAr.length>1) ? colAr : _col )
-                    );
-                }
-                _this.$tweets.each(function() {
-                    var _e = IriSP.jQuery(this);
-                    _e.css(
-                        "opacity",
-                        ( _e.attr("annotation-id") == _annotation.id ? 1 : .3 )
-                    );
-                });
-            });
-            _annotation.on("unselect", function() {
-                if (_this.tooltip) {
-                    _this.tooltip.hide();
-                }
-                _this.$tweets.css("opacity",1);
-            });
-            _annotation.on("found", function() {
-                _el.css({
-                    "background" : _this.foundcolor,
-                    "opacity" : 1
-                });
-            });
-            _annotation.on("not-found", function() {
-                _el.css({
-                    "background" : _col,
-                    "opacity" : .3
-                });
-            });
-            _this.$zone.append(_el);
-        };
-
-        IriSP._(_slices).forEach(function(_slice) {
-            var _y = _this.height;
-            _slice.annotations.forEach(function(_annotation) {
-                _y -= _this.element_height;
-                displayAnnotation(_x, _y, "none", _this.defaultcolor, _annotation);
-            });
-            IriSP._(_slice.polemicStacks).forEach(function(_annotations) {
-                var _color = _annotations.polemicDef.color,
-                    _polemic = _annotations.polemicDef.name;
-                _annotations.annotations.forEach(function(_annotation) {
-                    _y -= _this.element_height;
-                    displayAnnotation(_x, _y, _polemic, _color, _annotation);
-                });
-            });
-            _x += _this.element_width;
-        });
-
-        this.$tweets = this.$.find(".Ldt-Polemic-TweetDiv");
-
-        this.source.getAnnotations().on("search-cleared", function() {
-            _this.$tweets.each(function() {
-                var _el = IriSP.jQuery(this);
-                _el.css({
-                    "background" : _el.attr("polemic-color"),
-                    "opacity" : 1
-                });
-            });
-        });
-
-    } else {
-        this.$zone.hide();
-    }
-}
-
-IriSP.Widgets.Polemic.prototype.drawStackgraph = function(_max, _slices) {
-    this.is_stackgraph = true;
-
-    var _this = this;
-
-    this.height = (2 + this.max_elements) * this.element_height;
-    this.$zone.css({
-        width: this.width + "px",
-        height: this.height + "px",
-        position: "relative"
-    });
-
-    var _x = 0,
-        _html = '',
-        _scale = this.max_elements * this.element_height / _max;
-
-    function displayStackElement(_x, _y, _h, _color, _nums, _begin, _end, _polemic) {
-        _html += Mustache.to_html(
-            '<div class="Ldt-Polemic-TweetDiv Ldt-TraceMe" trace-info="annotation-block, media-id={{media_id}}, polemic={{polemic}}, time:{{begin}}" pos-x="{{posx}}" pos-y="{{top}}" annotation-counts="{{nums}}" begin-time="{{begin}}" end-time="{{end}}"'
-            + ' style="width: {{width}}px; height: {{height}}px; top: {{top}}px; left: {{left}}px; background: {{color}}"></div>',
-        {
-            nums: _nums,
-            posx: Math.floor(_x + (_this.element_width - 1) / 2),
-            media_id: _this.source.currentMedia.id,
-            polemic: _polemic,
-            left: _x,
-            top: _y,
-            color: _color,
-            width: (_this.element_width-1),
-            height: _h,
-            begin: _begin,
-            end: _end
-        });
-    }
-
-    IriSP._(_slices).forEach(function(_slice) {
-        var _y = _this.height,
-            _nums = _slice.annotations.length + "|" + _this.defaultcolor + "," + IriSP._(_slice.polemicStacks).map(function(_annotations) {
-                return _annotations.annotations.length + "|" + _annotations.polemicDef.color;
-            }).join(",");
-        if (_slice.annotations.length) {
-            var _h = Math.ceil(_scale * _slice.annotations.length);
-            _y -= _h;
-            displayStackElement(_x, _y, _h, _this.defaultcolor, _nums, _slice.begin, _slice.end, "none");
-        }
-        IriSP._(_slice.polemicStacks).forEach(function(_annotations) {
-            if (_annotations.annotations.length) {
-                var _color = _annotations.polemicDef.color,
-                    _polemic = _annotations.polemicDef.name,
-                    _h = Math.ceil(_scale * _annotations.annotations.length);
-                _y -= _h;
-                displayStackElement(_x, _y, _h, _color, _nums, _slice.begin, _slice.end, _polemic);
-            }
-        });
-        _x += _this.element_width;
-    });
-
-    this.$zone.append(_html);
-
-    this.$tweets = this.$.find(".Ldt-Polemic-TweetDiv");
-
-    this.$tweets
-        .mouseover(function() {
-            var _el = IriSP.jQuery(this),
-                _nums = _el.attr("annotation-counts").split(","),
-                _html = '<p>' + _this.l10n.from_ + _el.attr("begin-time") + _this.l10n._to_ + _el.attr("end-time") + '</p>';
-            _html = IriSP._.reduce(_nums, function(_htmlStr, _countStr) {
-                var _components = _countStr.split("|");
-                _htmlStr += '<div class="Ldt-Tooltip-AltColor" style="background: ' + _components[1] + '"></div><p>' + _components[0] + _this.l10n._annotations + '</p>';
-                return _htmlStr;
-            }, _html);
-            if (_this.tooltip) {
-                _this.tooltip.show(+ _el.attr("pos-x"), + _el.attr("pos-y"), _html);
-            }
-        })
-        .mouseout(function() {
-            if (_this.tooltip) {
-                _this.tooltip.hide();
-            }
-        });
-}
-
-
-IriSP.Widgets.Polemic.prototype.draw = function() {
-
-    this.onMediaEvent("timeupdate", "onTimeupdate");
-    this.$zone = IriSP.jQuery('<div>');
-    this.$zone.addClass("Ldt-Polemic");
-    this.$.append(this.$zone);
-
-    this.$elapsed = IriSP.jQuery('<div>')
-        .css({
-            background: '#cccccc',
-            position: "absolute",
-            top: 0,
-            left: 0,
-            width: 0,
-            height: "100%"
-        });
-
-    this.$zone.append(this.$elapsed);
-
-    // we don't filter with null duration anymore
-    var _slices = [],
-        _slice_count = Math.floor( this.width / this.element_width ),
-        _duration = this.source.getDuration(),
-        _max = 0,
-        _list = this.getWidgetAnnotations(),
-        _this = this;
-
-    for (var _i = 0; _i < _slice_count; _i++) {
-        var _begin = new IriSP.Model.Time( _i * _duration / _slice_count ),
-            _end = new IriSP.Model.Time( ( _i + 1 ) * _duration / _slice_count ),
-            _count = 0,
-            _res = {
-                begin : _begin.toString(),
-                end : _end.toString(),
-                annotations : _list.filter(function(_annotation) {
-                    return _annotation.begin >= _begin && _annotation.begin < _end;
-                }),
-                polemicStacks : {}
-            };
-
-        _res.annotations = _res.annotations.filter(function(_annotation) {
-            var _polemicVersion = (_annotation.content && _annotation.content.polemic_version) || _this.default_version,
-                _polemics = _this.getPolemics(_polemicVersion) || [],
-                _pol,
-                _polKey,
-                _polDef,
-                _rgxp,
-                _notMatched = true;
-
-            for(var _j = 0; _j < _polemics.length; _j++) {
-                _pol = _polemics[_j];
-                _rgxp = IriSP.Model.regexpFromTextOrArray(_pol.keywords);
-
-                if(_rgxp.test(_annotation.description)) {
-                    _polKey = _polemicVersion + "_" + _pol.name;
-                    _polDef = _res.polemicStacks[_polKey] || (_res.polemicStacks[_polKey] = { 'polemicDef' : _pol, 'annotations': []});
-                    _polDef.annotations.push(_annotation);
-                    _notMatched = false;
-                    _count++;
-                }
-            }
-            return _notMatched;
-        });
-        _count += _res.annotations.length;
-
-        _max = Math.max(_max, _count);
-        _slices.push(_res);
-    }
-
-    if (_max < this.max_elements) {
-        this.drawNoStackgraph(_max, _slices);
-    } else {
-        this.drawStackgraph(_max, _slices);
-    }
-
-    this.$position = IriSP.jQuery('<div>').addClass("Ldt-Polemic-Position");
-
-    this.$zone.append(this.$position);
-
-    this.$zone.click(function(_e) {
-        var _x = _e.pageX - _this.$zone.offset().left;
-        _this.media.setCurrentTime(_this.media.duration * _x / _this.width);
-    });
-
-    this.$.append('<div class="Ldt-Polemic-Tooltip"></div>');
-
-    this.insertSubwidget(
-        this.$.find(".Ldt-Polemic-Tooltip"),
-        {
-            type: "Tooltip",
-            min_x: 0,
-            max_x: this.width
-        },
-        "tooltip"
-    );
-};
-
-IriSP.Widgets.Polemic.prototype.onTimeupdate = function(_time) {
-    var _x = Math.floor( this.width * _time / this.media.duration);
-    this.$elapsed.css({
-        width:  _x + "px"
-    });
-    this.$position.css({
-        left: _x + "px"
-    });
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/PopcornPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-IriSP.Widgets.PopcornPlayer = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.PopcornPlayer.prototype = new IriSP.Widgets.Widget();
-
-/* A Popcorn-based player for HTML5 Video, Youtube and Vimeo */
-
-IriSP.Widgets.PopcornPlayer.prototype.defaults = {
-};
-
-IriSP.Widgets.PopcornPlayer.prototype.draw = function() {
-    if (typeof this.video === "undefined") {
-        this.video = this.media.video;
-    }
-
-    if (this.url_transform) {
-        this.video = this.url_transform(this.video);
-    }
-
-    var _url = this.video;
-
-    if (/^(https?:\/\/)?(www\.)?youtube\.com/.test(this.video)) {
-        /* YOUTUBE */
-        var _urlparts = this.video.split(/[?&]/),
-            _params = {};
-        for (var i = 1; i < _urlparts.length; i++) {
-            var _ppart = _urlparts[i].split('=');
-            _params[_ppart[0]] = decodeURIComponent(_ppart[1]);
-        }
-        _params.controls = 0;
-        _params.modestbranding = 1;
-        if (this.autostart || this.autoplay) {
-            _params.autoplay = 1;
-        }
-        _url = _urlparts[0] + '?' + IriSP.jQuery.param(_params);
-
-    }// else {
-    //     /* DEFAULT HTML5 */
-    //     var _tmpId = IriSP._.uniqueId("popcorn"),
-    //         _videoEl = IriSP.jQuery('<video>');
-    //     _videoEl.attr({
-    //         id : _tmpId,
-    //         width : this.width,
-    //         height : this.height || undefined
-    //     });
-    //     if(typeof this.video === "string"){
-    //         _videoEl.attr("src",this.video);
-    //     } else {
-    //         for (var i = 0; i < this.video.length; i++) {
-    //             var _srcNode = IriSP.jQuery('<source>');
-    //             _srcNode.attr({
-    //                 src: this.video[i].src,
-    //                 type: this.video[i].type
-    //             });
-    //             _videoEl.append(_srcNode);
-    //         }
-    //     }
-    //     this.$.html(_videoEl);
-    // }
-
-    var _popcorn = Popcorn.smart("#"+this.container, _url);
-
-    if (this.autostart || this.autoplay) {
-        _popcorn.autoplay(true);
-    }
-
-    var _media = this.media;
-
-    // Binding functions to Popcorn
-
-    _media.on("setcurrenttime", function(_milliseconds) {
-        _popcorn.currentTime(_milliseconds / 1000);
-    });
-
-    _media.on("setvolume", function(_vol) {
-        _popcorn.volume(_vol);
-        _media.volume = _vol;
-    });
-
-    _media.on("setmuted", function(_muted) {
-        _popcorn.muted(_muted);
-        _media.muted = _muted;
-    });
-
-    _media.on("setplay", function() {
-        _popcorn.play();
-    });
-
-    _media.on("setpause", function() {
-        _popcorn.pause();
-    });
-    _media.on("settimerange", function(_timeRange){
-        _media.timeRange = _timeRange;
-        try {
-            if (_media.getCurrentTime() > _timeRange[0] || _media.getCurrentTime() < _timeRange){
-                _popcorn.currentTime(_timeRange[0] / 1000);
-            }
-        } catch (err) {
-        }
-    })
-    _media.on("resettimerange", function(){
-        _media.timeRange = false;
-    })
-    // Binding Popcorn events to media
-
-    function getVolume() {
-        _media.muted = _popcorn.muted();
-        _media.volume = _popcorn.volume();
-    }
-
-    _popcorn.on("loadedmetadata", function() {
-        getVolume();
-        _media.trigger("loadedmetadata");
-        _media.trigger("volumechange");
-    });
-
-    _popcorn.on("timeupdate", function() {
-        _media.trigger("timeupdate", new IriSP.Model.Time(1000*_popcorn.currentTime()));
-    });
-
-    _popcorn.on("volumechange", function() {
-        getVolume();
-        _media.trigger("volumechange");
-    });
-
-    _popcorn.on("play", function(e) {
-        _media.trigger("play");
-    });
-
-    _popcorn.on("pause", function() {
-        _media.trigger("pause");
-    });
-
-    _popcorn.on("seeked", function() {
-        _media.trigger("seeked");
-    });
-
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Quiz.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/* Nothing */
-
-.Ldt-Quiz-Container {
-  	position: absolute;
-  	height: calc(100% - 4px);
-  	top: 0px;
-  	width: calc(100% - 20px);
-	margin: auto;
-	border: 1px solid black;
-	font-size: 18pt;
-}
-
-.Ldt-Quiz-Title {
-    line-height: 1;
-    padding-top: 10px;
-    text-align: center;
-}
-
-.Ldt-Quiz-Header {
-	font-size: 12px;
-	color: black;
-	border-bottom: 1px solid green;
-	padding: 2px;
-    height: 22px;
-}
-
-.Ldt-Quiz-Content {
-    height: calc(100% - 82px);
-    overflow-y: auto;
-}
-
-.Ldt-Quiz-Footer {
-    height: 60px;
-	width: 100%;
-	position: absolute;
-	bottom: 0px;
-	border-top: 2px solid black;
-	background-color: white;
-}
-
-
-.Ldt-Quiz-Score {
-	display: inline-block;
-	position: absolute;
-	right: 20px;
-}
-
-.Ldt-Quiz-Index {
-	display: inline-block;
-}
-
-.Ldt-Quiz-Image {
-    max-width: 100%;
-    max-height: 100%;
-}
-
-.Ldt-Quiz-Questions {
-    height: calc(100% - 2.5em);
-    margin: 10px;
-    padding: 10px;
-    border-left: 5px solid gray;
-}
-
-.quiz-question-block {
-    padding-top: 10px;
-}
-.quiz-resource-block {
-    padding-top: 10px;
-    float: right;
-    max-height: 100%;
-    height: 100%;
-}
-.quiz-resource-block img {
-    max-height: 100%;
-    max-width: 100%;
-}
-
-.quiz-question-feedback {
-	font-size: 15px;
-}
-
-.quiz-question-feedback div {
-    display: inline-block;
-	height: 100%;
-}
-
-.quiz-question-correct-feedback:before, .quiz-question-incorrect-feedback:before {
-		                                    content: '';
-		                                    vertical-align: middle;
-		                                    display: inline-block;
-		                                    width: 48px;
-		                                    height: 48px;
-                                        }
-
-.quiz-question-correct-feedback:before {
-	background: url(img/valid_sprites.png) left top no-repeat;
-}
-
-.quiz-question-incorrect-feedback:before {
-	background: url(img/valid_sprites.png) -49px top no-repeat;
-}
-
-.Ldt-Quiz-Correct-Answer:before {
-	background: url(img/min_valid_sprites.png) left top no-repeat;
-}
-
-.Ldt-Quiz-Incorrect-Answer:before {
-	background: url(img/min_valid_sprites.png) -13px top no-repeat;
-}
-
-.Ldt-Quiz-Correct-Answer:before, .Ldt-Quiz-Incorrect-Answer:before {
-		                              content: '';
-		                              vertical-align: middle;
-		                              display: inline-block;
-		                              width: 12px;
-		                              height: 12px;
-                                  }
-
-.Ldt-Quiz-Submit {
-    margin: 10px;
-}
-
-.Ldt-Quiz-Submit .Ldt-Quiz-Submit-Skip-Link {
-    float: left;
-}
-
-.Ldt-Quiz-Submit-Skip-Link a {
-    text-decoration: none;
-    font-size: 16pt;
-}
-
-.Ldt-Quiz-Submit .Ldt-Quiz-Submit-Button {
-    float: right;
-}
-
-.Ldt-Quiz-Votes {
-    display: none;
-    height: 53px;
-    position: relative;
-}
-
-.Ldt-Quiz-Votes-Question {
-    font-size: 16px;
-    position: absolute;
-    top: 2px;
-    left: 0px;
-}
-
-.Ldt-Quiz-Votes-Buttons {
-    position: absolute;
-    bottom: 2px;
-    left: 0px;
-    right: 0px;
-}
-
-.Ldt-Quiz-Votes-Buttons div {
-    display: inline-block;
-    width: 33%;
-    text-align: center;
-}
-
-.Ldt-Quiz-Vote-Skip-Block {
-    width: 30% !important;
-    text-align: right;
-}
-
-.Ldt-Quiz-Vote-Skip-Block a {
-    text-decoration: none;
-}
-
-.Ldt-Quiz-Overlay {
-    position: absolute;
-    top: 0px;
-    background-color: white;
-    z-index: 5;
-    width: 100%;
-    height: 100%;
-}
-
-.Ldt-Pause-Add-Question {
-    background: url(img/quiz_add_question.svg) no-repeat;
-    background-position: center;
-    background-size: contain;
-  	position: absolute;
-    bottom: 40px;
-    right: 0px;
-    height: 15%;
-    width: 15%;
-    max-width: 64px;
-    max-height: 64px;
-    z-index: 10;
-}
-
-.Ldt-Quiz-Result {
-    position: absolute;
-	height: 0px;
-    bottom: 0;
-    left: 0;
-    right: 0;
-    background: #fde073;
-    text-align: center;
-    line-height: 2.5;
-    overflow: hidden;
-    -webkit-box-shadow: 0 0 5px black;
-    -moz-box-shadow:    0 0 5px black;
-    box-shadow:         0 0 5px black;
-}
-
-input[type="button"] {
-    border: none;
-    font-size: 18pt;
-    text-align: center;
-    background-color: #5BCE5B;
-    color: #fff;
-    cursor: pointer;
-}
-
-input[value="Non"] {
-    background-color: #F86060;
-}
-
-input.quiz-question:checked + .quiz-question-label {
-    text-decoration: underline;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/Quiz.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,388 +0,0 @@
-IriSP.Widgets.Quiz = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-}
-
-IriSP.Widgets.Quiz.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Quiz.prototype.defaults = {
-    // annotation_type: "at_quiz",
-	quiz_activated: true,
-	api_serializer: "ldt_annotate",
-    analytics_api: "",
-    api_method: "POST",
-    user: "",
-    userid:""
-}
-
-IriSP.Widgets.Quiz.prototype.template = '<div class="Ldt-Quiz-Container">'
-	                                    + '<div class="Ldt-Quiz-Header">'
-                                        + '  <div class="Ldt-Quiz-Index"></div><div class="Ldt-Quiz-Score"></div>'
-                                        + '</div>'
-                                        + '<div class="Ldt-Quiz-Content">'
-                                        + '  <h1 class="Ldt-Quiz-Title">{{question}}</h1>'
-                                        + '  <div class="Ldt-Quiz-Questions">'
-                                        + '  </div>'
-                                        + '</div>'
-                                        + '<div class="Ldt-Quiz-Footer">'
-                                        + '  <div class="Ldt-Quiz-Votes">'
-                                        + '      <span class="Ldt-Quiz-Votes-Question">Avez-vous trouvé cette question utile ?</span>'
-                                        + '      <div class="Ldt-Quiz-Votes-Buttons">'
-                                        + '          <div class="Ldt-Quiz-Vote-Skip-Block"><a href="#" class="Ldt-Quiz-Vote-Skip">Passer</a></div>'
-                                        + '          <div><input type="button" value="Non" class="Ldt-Quiz-Vote-Useless" /></div>'
-                                        + '          <div><input type="button" value="Oui" class="Ldt-Quiz-Vote-Useful" /></div>'
-                                        + '      </div>'
-                                        + '  </div>'
-                                        + '  <div class="Ldt-Quiz-Submit">'
-                                        + '      <div class="Ldt-Quiz-Submit-Button"><input type="button" value="Valider" /></div>'
-                                        + '      <div class="Ldt-Quiz-Submit-Skip-Link"><a href="#">Passer</a></div><div style="clear:both;"></div>'
-                                        + '  </div>'
-                                        + '  <div class="Ldt-Quiz-Result">Bonne réponse</div>'
-                                        + '</div>'
-										+ '</div>';
-
-IriSP.Widgets.Quiz.prototype.annotationTemplate = '';
-
-IriSP.Widgets.Quiz.prototype.update = function(annotation) {
-	var _this = this;
-
-	if (this.quiz_activated &&
-		this.correct[annotation.id] != 1 &&
-		this.correct[annotation.id] != 0) {
-
-		_this.quiz_displayed = true;
-
-		//Pause the current video
-		this.media.pause();
-
-		this.annotation = annotation;
-
-		var question = annotation.content.data.question;
-		var answers = annotation.content.data.answers;
-		var resource = annotation.content.data.resource;
-
-		$(".Ldt-Quiz-Votes").hide();
-        $(".Ldt-Pause-Add-Question").hide();
-		$(".Ldt-Quiz-Container .Ldt-Quiz-Title").html(question);
-
-		var i = 0;
-
-		var score = Mustache.to_html('<span class="Ldt-Quiz-Correct-Answer">{{ correctness.0 }}</span> / <span class="Ldt-Quiz-Incorrect-Answer">{{ correctness.1 }}</span>', { correctness: this.globalScore() });
-		$(".Ldt-Quiz-Index").html(Mustache.to_html("Q{{index}}/{{total}}", { index: annotation.number + 1,
-                                                                              total: this.totalAmount }));
-		$(".Ldt-Quiz-Score").html(score);
-		this.question = new IriSP.Widgets.UniqueChoiceQuestion(annotation);
-		this.resource = new IriSP.Widgets.UniqueChoiceQuestion(resource);
-
-		if (annotation.content.data.type == "multiple_choice") {
-			this.question = new IriSP.Widgets.MultipleChoiceQuestion(annotation);
-		this.resource = new IriSP.Widgets.MultipleChoiceQuestion(resource);
-		}
-		else if (annotation.content.data.type == "unique_choice") {
-			this.question = new IriSP.Widgets.UniqueChoiceQuestion(annotation);
-		this.resource = new IriSP.Widgets.UniqueChoiceQuestion(resource);
-		}
-
-		var output = "";
-		for (i = 0; i < answers.length; i++) {
-			output += '<div class="quiz-question-block"><p>' + this.question.renderQuizTemplate(answers[i], i) + '<span class="quiz-question-label">'+ answers[i].content + '</span></p></div>';
-		}
-
-
-		var QR = '';
-		//If there is an attached resource, display it on the resources overlay
-		if (resource != null) {
-            QR = '<div class="quiz-resource-block" id="resource" >' + resource + '</div>';
-        };
-		$(".Ldt-Quiz-Questions").html(QR + output);
-		$(".Ldt-Quiz-Overlay").fadeIn();
-
-		$(".Ldt-Quiz-Submit").fadeIn();
-
-		//Let's automatically check the checkbox/radio if we click on the label
-		$(".quiz-question-label").click(function() {
-            var input = $(this).siblings("input");
-            if (input.prop('checked') && input.prop('type') == 'radio') {
-                // Already checked. Consider a double click on unique question as a validation.
-		        _this.answer();
-            } else {
-                input.prop('checked', !input.prop('checked'));
-            }
-		});
-
-		//In case we click on the first "Skip" link
-		$(".Ldt-Quiz-Submit-Skip-Link").click({media: this.media}, function(event) {
-			_this.hide();
-			_this.player.trigger("QuizCreator.skip");
-			event.data.media.play();
-		});
-	}
-};
-
-IriSP.Widgets.Quiz.prototype.hide = function() {
-	var _this = this;
-
-	$(".Ldt-Quiz-Votes").hide();
-	$(".Ldt-Quiz-Overlay").hide();
-	$(".Ldt-Pause-Add-Question").hide();
-	_this.quiz_displayed = false;
-}
-
-IriSP.Widgets.Quiz.prototype.answer = function() {
-	var _this = this;
-
-    function insert_timecode_links (s) {
-        return (s || "").replace(/\s(\d+:\d+)/, function (match, timecode) {
-            return ' <a href="#t=' + (IriSP.timestamp2ms(timecode) / 1000) + '">' + timecode + '</a>';
-        });
-    };
-
-	var answers = _this.annotation.content.data.answers;
-
-    // Augment answers with the correct feedback
-    var i = 0;
-    var wrong = 0;
-    // Signature is an array giving the answers signature: 1 for checked, 0 for unchecked
-    // We cannot simply store the right answer index, since there may be multiple-choice questions
-    var signature = [];
-    _this.$.find(".Ldt-Quiz-Question-Check").each( function (code) {
-        var checked = $(this).is(":checked");
-        signature.push(checked ? 1 : 0);
-        var ans = answers[i];
-        if ((ans.correct && !checked)
-            || (!ans.correct && checked)) {
-            wrong += 1;
-            IriSP.jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-incorrect-feedback">'+ insert_timecode_links(ans.feedback) +'</div>');
-        } else {
-            IriSP.jQuery(this).parents(".quiz-question-block").append('<div class="quiz-question-feedback quiz-question-correct-feedback">'+ insert_timecode_links(ans.feedback) +'</div>');
-        }
-        i++;
-    });
-
-	if (wrong) {
-		$(".Ldt-Quiz-Result").html("Mauvaise réponse");
-		$(".Ldt-Quiz-Result").css({"background-color" : "red"});
-		this.correct[this.annotation.id] = 0;
-	} else {
-		$(".Ldt-Quiz-Result").html("Bonne réponse !");
-		$(".Ldt-Quiz-Result").css({"background-color" : "green"});
-		this.correct[this.annotation.id] = 1;
-	}
-
-	$(".Ldt-Quiz-Result").animate({height:"100%"},500, "linear", function() {
-		$(".Ldt-Quiz-Result").delay(2000).animate({ height:"0%" }, 500);
-	});
-
-	var question_number = this.annotation.number + 1;
-	var correctness = this.globalScore();
-	var score = "";
-	score += '<span class="Ldt-Quiz-Correct-Answer">' + correctness[0] +'</span> / <span class="Ldt-Quiz-Incorrect-Answer">' + correctness[1] + '</span>';
-	$(".Ldt-Quiz-Index").html("Q"+ question_number + "/" + this.totalAmount);
-	$(".Ldt-Quiz-Score").html(score);
-
-	this.submit(this.user, this.userid, this.annotation.id, wrong ? 'wrong_answer' : 'right_answer', signature.join(""));
-
-	//Hide the "Validate" button and display the UI dedicated to votes
-	$(".Ldt-Quiz-Submit").fadeOut(400, function () {
-	    $(".Ldt-Quiz-Votes").show();
-    });
-};
-
-IriSP.Widgets.Quiz.prototype.globalScore = function() {
-    // Return 2 variables to know how many right and wrong answers there are
-    var values = _.values(this.correct);
-    var ok = values.filter( function (s) { return s == 1; }).length;
-    var not_ok = values.filter( function (s) { return s == 0; }).length;
-	return [ok, not_ok];
-};
-
-IriSP.Widgets.Quiz.prototype.refresh = function() {
-    var _annotations = this.getWidgetAnnotations().sortBy(function(_annotation) {
-        return _annotation.begin;
-    });
-
-    var _this = this;
-
-	_this.totalAmount = _annotations.length;
-	_this.number = 0;
-	_this.correct = {};
-	_this.keys = {};
-
-    _annotations.forEach(function(_a) {
-		//Fix each annotation as "non-answered yet"
-		_this.correct[_a.id] = -1;
-		_this.keys[_this.number] = _a.id;
-		_a.number = _this.number++;
-    });
-
-}
-
-IriSP.Widgets.Quiz.prototype.draw = function() {
-	var _this = this;
-	_this.quiz_displayed = false;
-    this.onMediaEvent("enter-annotation", function (annotation) {
-        var an = _this.getWidgetAnnotations().filter( function (a) { return a === annotation; });
-        if (an.number === undefined) {
-            _this.refresh();
-        }
-        if (an.length) {
-            _this.update(an[0]);
-        };
-    });
-    this.onMdpEvent("Quiz.activate", function() {
-		_this.quiz_activated = true;
-    });
-
-    this.onMdpEvent("Quiz.deactivate", function() {
-		_this.quiz_activated = false;
-		_this.hide();
-    });
-
-    this.onMdpEvent("Quiz.hide", function() {
-		_this.hide();
-    });
-
-    this.onMdpEvent("Quiz.refresh", function() {
-		_this.refresh();
-    });
-
-    this.onMediaEvent("pause", function() {
-		if (! _this.quiz_displayed) {
-		    $(".Ldt-Pause-Add-Question").show();
-        }
-    });
-
-    this.onMediaEvent("play", function() {
-	   $(".Ldt-Pause-Add-Question").hide();
-    });
-
-    // Add Ldt-Quiz-Overlay widget on top of video player
-	_this.overlay = $("<div class='Ldt-Quiz-Overlay'></div>").appendTo($('#' + _this.container));
-	_this.PauseAddQuestion = $("<div class='Ldt-Pause-Add-Question' title='Ajoutez une question !'>")
-        .on("click", function() { _this.player.trigger("QuizCreator.create"); })
-        .appendTo($('#' + _this.container));
-	_this.overlay.html(this.template);
-
-	$(".Ldt-Quiz-Overlay").hide();
-
-    $(".Ldt-Quiz-Submit input").click(function() {
-		_this.answer();
-    });
-
-	//In case we click on the first "Skip" link
-	$(".Ldt-Quiz-Submit-Skip-Link").click({ media: this.media }, function(event) {
-		_this.submit(_this.user, _this.userid, _this.annotation.id, "skipped_answer", 0);
-		_this.hide();
-		_this.player.trigger("QuizCreator.skip");
-		event.data.media.play();
-	});
-
-    $(".Ldt-Quiz-Votes-Buttons input[type=\"button\"], .Ldt-Quiz-Votes-Buttons a").click({media: this.media}, function(event) {
-		var vote_prop, vote_val;
-
-		if ($(this).hasClass("Ldt-Quiz-Vote-Useful")) {
-			vote_prop = "useful";
-			vote_val = 1;
-		} else if ($(this).hasClass("Ldt-Quiz-Vote-Useless")) {
-			vote_prop = "useless";
-			vote_val = -1;
-
-			$(".Ldt-Ctrl-Quiz-Create").addClass("button_highlight").delay(5000).queue(function() {
-                $(this).removeClass("button_highlight").dequeue();
-            });
-		}else{
-			vote_prop = "skipped_vote";
-			vote_val = 0;
-		}
-
-		_this.submit(_this.user, _this.userid, _this.annotation.id, vote_prop, vote_val);
-
-		//Resume the current video
-		event.data.media.play();
-
-		_this.hide();
-		$(".Ldt-Pause-Add-Question").hide();
-
-		_this.player.trigger("QuizCreator.skip");
-	});
-
-    _this.refresh();
-};
-
-//Generates uid
-//source : http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
-IriSP.Widgets.Widget.prototype.generateUid = function () {
-    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
-        var r = Math.random()*16|0, v = c === 'x' ? r : (r&0x3|0x8);
-        return v.toString(16);
-    });
-}
-
-//UniqueChoice Question
-IriSP.Widgets.UniqueChoiceQuestion = function(annotation) {
-    this.annotation = annotation;
-}
-
-IriSP.Widgets.UniqueChoiceQuestion.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.UniqueChoiceQuestion.prototype.renderQuizTemplate = function(answer, identifier) {
-	return '<input type="radio" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-' + identifier + '" name="question" data-question="' + identifier + '" value="' + identifier + '" />';
-}
-
-IriSP.Widgets.UniqueChoiceQuestion.prototype.renderTemplate = function(answer, identifier) {
-	var id = this.generateUid();
-	return '<input type="radio" id="' + id + '" class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+ identifier +'" name="question" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'" title="Veuillez sélectionner la réponse correcte"></label>';
-}
-
-IriSP.Widgets.UniqueChoiceQuestion.prototype.renderFullTemplate = function(answer, identifier) {
-	var correct = (answer && answer.correct) ? "checked" : "";
-	var id = this.generateUid();
-	return '<input type="radio" id="'+ id +'" '+ correct +' class="quiz-question-edition Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+ identifier +'" name="question" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'"></label>';
-}
-
-
-//MultipleChoice Question
-IriSP.Widgets.MultipleChoiceQuestion = function(annotation) {
-    this.annotation = annotation;
-}
-
-IriSP.Widgets.MultipleChoiceQuestion.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.MultipleChoiceQuestion.prototype.renderQuizTemplate = function(answer, identifier) {
-	return '<input type="checkbox" class="quiz-question Ldt-Quiz-Question-Check Ldt-Quiz-Question-Check-'+ identifier + '" name="question['+ identifier +']" data-question="'+ identifier +'" value="' + identifier + '" /> ';
-}
-
-IriSP.Widgets.MultipleChoiceQuestion.prototype.renderTemplate = function(answer, identifier) {
-	var id = this.generateUid();
-	return '<input type="checkbox" id="'+ id +'" class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+ identifier +']" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'" title="Veuillez sélectionner la ou les réponses correctes"></label>';
-}
-
-IriSP.Widgets.MultipleChoiceQuestion.prototype.renderFullTemplate = function(answer, identifier) {
-	var correct = (answer && answer.correct) ? "checked" : "";
-	var id = this.generateUid();
-	return '<input type="checkbox" id="'+ id +'" '+ correct +' class="quiz-question-edition Ldt-Quiz-Question-Check" name="question['+ identifier +']" data-question="'+ identifier +'" value="' + identifier + '" /><label for="'+ id +'"></label> ';
-}
-
-IriSP.Widgets.Quiz.prototype.submit = function(user,user_id,question,prop,val) {
-    var _this = this;
-	var _url = Mustache.to_html(this.analytics_api, {id: this.source.projectId}),
-	donnees = {
-			"username": user,
-			"useruuid": user_id,
-			"subject": question,
-			"property": prop,
-		    "value": val,
-            "session": _this.session_id
-		};
-
-	IriSP.jQuery.ajax({
-        url: _url,
-        type: this.api_method,
-        contentType: 'application/json',
-        data: JSON.stringify(donnees),
-        success: function(_data) {
-        },
-        error: function(_xhr, _error, _thrown) {
-            IriSP.log("Error when sending annotation", _thrown);
-        }
-    });
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/QuizCreator.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-.Ldt-QuizCreator-Ui {
-	width: 100%;
-	padding: 10px;
-}
-
-.Ldt-QuizCreator-Form {
-	width: 100%;
-}
-
-.Ldt-QuizCreator-Question-Type {
-}
-
-.Ldt-QuizCreator-Question-Area,
-.Ldt-QuizCreator-Resource-Area {
-    width: calc(100% - 20px);
-}
-
-.Ldt-QuizCreator-Questions-Block {
-	width: 100%;
-}
-
-.Ldt-QuizCreator-Questions-Answer {
-	margin-top: 5px;
-	border-top: 1px solid black;
-}
-
-.Ldt-QuizCreator-Questions-Answer div {
-	display: inline-block;
-	vertical-align: middle;
-}
-
-.Ldt-QuizCreator-Questions-Answer-Content {
-	width: calc(100% - 80px);
-}
-
-.Ldt-QuizCreator-Questions-Answer-Content input, .Ldt-QuizCreator-Questions-Answer-Content textarea {
-	width: calc(100% - 20px);
-}
-
-.Ldt-QuizCreator-Questions-Answer-Time input {
-	width: 60px;
-}
-
-.Ldt-QuizCreator-Questions-Answer-Delete {
-	width: 15px;
-	height: 15px;
-}
-
-.Ldt-QuizCreator-Remove {
-	width: 15px;
-	height: 15px;
-    margin-left: 8px;
-	cursor: pointer;
-    background: url(img/delete.png);
-}
-
-input.quiz-question-edition {
-    display: none;
-}
-
-input.quiz-question-edition[type='radio'] + label,
-input.quiz-question-edition[type='checkbox'] + label {
-	height: 12px;
-	width: 24px;
-	display: inline-block;
-	background: url(img/min_wrong_toggle.png);
-	cursor: pointer;
-    content: "Mauvaise";
-}
-
-input.quiz-question-edition[type='radio']:checked + label,
-input.quiz-question-edition[type='checkbox']:checked + label {
-	background: url(img/min_right_toggle.png);
-    content: "Bonne";
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/QuizCreator.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,306 +0,0 @@
-/* TODO: Add Social Network Sharing */
-
-IriSP.Widgets.QuizCreator = function(player, config) {
-    var _this = this;
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.QuizCreator.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.QuizCreator.prototype.defaults = {
-    creator_name : "",
-    tags : false,
-    tag_titles : false,
-    pause_on_write : true,
-    annotation_type: "Quiz",
-    api_serializer: "ldt_annotate",
-    api_endpoint_template: "",
-    api_method: "POST"
-};
-
-IriSP.Widgets.QuizCreator.prototype.messages = {
-    en: {
-    },
-    fr: {
-    }
-};
-
-IriSP.Widgets.QuizCreator.prototype.template =
-	  '<div class="Ldt-QuizCreator-Ui Ldt-TraceMe">'
-	+	'<div class="Ldt-QuizCreator-Question-Form">'
-	+		'<textarea class="Ldt-QuizCreator-Question-Area" placeholder="Votre question"></textarea><br />'
-	+		'<textarea class="Ldt-QuizCreator-Resource-Area" placeholder="Ressources (lien vers une image, etc.)"></textarea><br />'
-	+	'</div>'
-	+		'<p>Type de question  '
-	+ 		'<select name="type" class="Ldt-QuizCreator-Question-Type">'
-	+			'<option value="unique_choice">Choix unique</option>'
-	+			'<option value="multiple_choice">Choix multiple</option>'
-	+		'</select>'
-	+		' à <input type="text" placeholder="hh:mm:ss" size="6" class="Ldt-QuizCreator-Time" />'
-	+ 	'<div class="Ldt-QuizCreator-Questions-Block">'
-	+ 	'</div>'
-	+	'<div>'
-    +   '  <button class="Ldt-QuizCreator-Question-Add">Ajouter une réponse</button><hr>'
-    +   '  <button class="Ldt-QuizCreator-Question-Save">Sauvegarder</button>'
-    +   '</div>'
-	+ '</div>';
-
-/* Hide and clear the interface is case of someone skipped or answer the current question in the Quiz panel*/
-IriSP.Widgets.QuizCreator.prototype.skip = function() {
-	this.$.find(".Ldt-QuizCreator-Time").val("");
-	this.$.find(".Ldt-QuizCreator-Question-Area").val("");
-	this.$.find(".Ldt-QuizCreator-Resource-Area").val("");
-	this.$.find(".Ldt-QuizCreator-Questions-Block").html("");
-    this.current_annotation = undefined;
-};
-
-IriSP.Widgets.QuizCreator.prototype.nbAnswers = function(){
-	var numItems = this.$.find('.Ldt-QuizCreator-Questions-Answer').length;
-	return numItems;
-};
-
-IriSP.Widgets.QuizCreator.prototype.draw = function() {
-	var _this = this;
-
-    this.onMediaEvent("timeupdate", function(_time) {
-    	_this.setBegin(_time);
-    });
-
-	this.onMdpEvent("QuizCreator.show", function() {
-		_this.setBegin(_this.media.currentTime);
-    });
-
-	this.onMdpEvent("QuizCreator.create", function() {
-		_this.skip();
-		_this.setBegin(_this.media.currentTime);
-    });
-
-    this.onMdpEvent("QuizCreator.skip", function() {
-		_this.skip();
-    });
-
-    this.onMdpEvent("QuizCreator.edit", function (_annotation) {
-		_this.skip();
-        _this.addQuestion(_annotation);
-    });
-
-	this.$.on("click", ".Ldt-QuizCreator-Remove", function() {
-        $(this).parents(".Ldt-QuizCreator-Questions-Answer").remove();
-	});
-
-    this.begin = new IriSP.Model.Time();
-    this.end = this.source.getDuration();
-	this.answers = [];
-
-    this.renderTemplate();
-
-	/* Quiz creator */
-
-	this.question = new IriSP.Widgets.UniqueChoiceQuestion();
-
-	this.$.find(".Ldt-QuizCreator-Question-Type").bind("change", this.functionWrapper("onQuestionTypeChange"));
-	this.$.find(".Ldt-QuizCreator-Question-Add").bind("click", this.functionWrapper("onQuestionAdd"));
-	this.$.find(".Ldt-QuizCreator-Question-Save").bind("click", this.functionWrapper("onSave"));
-
-	this.$.find(".Ldt-QuizCreator-Time").keyup(function() {
-		var str = _this.$.find(".Ldt-QuizCreator-Time").val();
-		_this.begin = IriSP.timestamp2ms(str);
-		_this.end = _this.begin + 1000;
-	});
-
-    this.onMediaEvent("timeupdate", function(_time) {
-        // Do not update timecode if description is not empty
-        if (_this.getDescription()) {
-            _this.setBegin(_time);
-        };
-    });
-};
-
-IriSP.Widgets.QuizCreator.prototype.getDescription = function() {
-    return this.$.find(".Ldt-QuizCreator-Question-Area").val().trim();
-};
-
-IriSP.Widgets.QuizCreator.prototype.addQuestion = function(annotation, number) {
-    var _this = this;
-
-	if (annotation.content.data.type == "multiple_choice") {
-		this.question = new IriSP.Widgets.MultipleChoiceQuestion(annotation);
-	}
-	else if (annotation.content.data.type == "unique_choice") {
-		this.question = new IriSP.Widgets.UniqueChoiceQuestion(annotation);
-	}
-
-	var answers = annotation.content.data.answers;
-
-	this.answers = [];
-
-
-	this.$.find(".Ldt-QuizCreator-Time").val(annotation.begin);
-	this.$.find(".Ldt-QuizCreator-Question-Area").val(annotation.content.data.question);
-	this.$.find(".Ldt-QuizCreator-Resource-Area").val(annotation.content.data.resource);
-	this.$.find(".Ldt-QuizCreator-Questions-Block").html('');
-    answers.forEach( function (ans) {
-        _this.onQuestionAdd(null, ans);
-    });
-    _this.current_annotation = annotation;
-};
-
-IriSP.Widgets.QuizCreator.prototype.onQuestionTypeChange = function(e) {
-
-    var _field = this.$.find(".Ldt-QuizCreator-Question-Type");
-    var _contents = _field.val();
-
-	var _this = this;
-	switch(_contents) {
-		case "unique_choice":
-			this.question = new IriSP.Widgets.UniqueChoiceQuestion();
-		break;
-
-		case "multiple_choice":
-			this.question = new IriSP.Widgets.MultipleChoiceQuestion();
-		break;
-	}
-
-	var output = "";
-
-	_this.$.find(".Ldt-QuizCreator-Questions-Block").html(output);
-
-    this.pauseOnWrite();
-};
-
-// Either e !== undefined, then it has been called by the interface and answer === undefined, generate an empty form.
-// Or e === null && answer !== undefined, an existing answer is provided.
-IriSP.Widgets.QuizCreator.prototype.onQuestionAdd = function(e, answer) {
-	var output = '<div class="Ldt-QuizCreator-Questions-Answer">'
-		+	'Réponse <div class="Ldt-QuizCreator-Questions-Answer-Correct">'+ this.question.renderFullTemplate(answer, this.nbAnswers()) +'</div><br />'
-		+ 	'<div class="Ldt-QuizCreator-Questions-Answer-Content">'
-		+		'<input type="text" class="Ldt-QuizCreator-Answer-Content" data-question="'+ this.nbAnswers() +'" id="question'+ this.nbAnswers() + '"' +  (answer ? ' value="'+ answer.content + '"' : "") + '/><br />'
-		+		'Commentaire <br/><textarea class="Ldt-QuizCreator-Answer-Feedback" data-question="'+ this.nbAnswers() +'" id="feedback'+ this.nbAnswers() +'">' + (answer ? answer.feedback : "") + '</textarea>'
-		+	'</div>'
-		+ 	'<div class="Ldt-QuizCreator-Questions-Answer-Delete"><div class="Ldt-QuizCreator-Remove">&nbsp;</div></div>'
-		+	'</div>';
-	this.$.find(".Ldt-QuizCreator-Questions-Block").append(output);
-	this.$.find(".Ldt-QuizCreator-Answer-Content").last().focus();
-
-    this.pauseOnWrite();
-};
-
-IriSP.Widgets.QuizCreator.prototype.pauseOnWrite = function() {
-    if (this.pause_on_write && !this.media.getPaused()) {
-        this.media.pause();
-    }
-};
-
-IriSP.Widgets.QuizCreator.prototype.setBegin = function (t) {
-    this.begin = new IriSP.Model.Time(t || 0);
-	this.end = this.begin + 500;
-    this.$.find(".Ldt-QuizCreator-Time").val(this.begin.toString());
-};
-
-IriSP.Widgets.QuizCreator.prototype.get_local_annotation = function (ident) {
-    return this.player.getLocalAnnotation(ident);
-};
-
-IriSP.Widgets.QuizCreator.prototype.save_local_annotations = function() {
-    this.player.saveLocalAnnotations();
-    // Merge modifications into widget source
-    this.source.merge(this.player.localSource);
-};
-
-IriSP.Widgets.QuizCreator.prototype.delete_local_annotation = function(ident) {
-    this.source.getAnnotations().removeId(ident);
-    this.player.deleteLocalAnnotation(ident);
-    this.current_annotation = undefined;
-    this.refresh(true);
-};
-
-IriSP.Widgets.QuizCreator.prototype.show = function() {
-	this.$.find(".Ldt-QuizCreator-Question-Area").focus();
-};
-
-IriSP.Widgets.QuizCreator.prototype.hide = function() {
-	this.$.find(".Ldt-QuizCreator-Questions-Block").html("");
-	this.$.find(".Ldt-QuizCreator-Question-Area").val("");
-	this.$.find(".Ldt-QuizCreator-Resource-Area").val("");
-	this.$.find(".Ldt-QuizCreator-Time").val("");
-};
-
-/* Save a local annotation */
-IriSP.Widgets.QuizCreator.prototype.onSave = function(event, should_publish) {
-    // Either the annotation already exists (then we overwrite its
-    // content) or it must be created.
-    var is_created = false;
-
-	if (this.nbAnswers() <= 0) {
-		alert("Vous devez spécifier au moins une réponse à votre question !");
-		return false;
-	};
-    // Check that there is at least 1 valid answer
-    if (! this.$.find(".quiz-question-edition:checked").length) {
-        alert("Vous n'avez pas indiqué de bonne réponse.");
-        return false;
-    };
-    var _annotation;
-    if (this.current_annotation) {
-        is_created = false;
-        _annotation = this.current_annotation;
-    } else {
-        is_created = true;
-        var _annotationTypes = this.source.getAnnotationTypes().searchByTitle(this.annotation_type, true), /* Récupération du type d'annotation dans lequel l'annotation doit être ajoutée */
-        _annotationType = (_annotationTypes.length ? _annotationTypes[0] : new IriSP.Model.AnnotationType(false, this.player.localSource)); /* Si le Type d'Annotation n'existe pas, il est créé à la volée */
-
-        /* Si nous avons dû générer un ID d'annotationType à la volée... */
-        if (!_annotationTypes.length) {
-            /* Il ne faudra pas envoyer l'ID généré au serveur */
-            _annotationType.dont_send_id = true;
-            /* Il faut inclure le titre dans le type d'annotation */
-            _annotationType.title = this.annotation_type;
-        }
-
-        _annotation = new IriSP.Model.Annotation(false, this.player.localSource); /* Création d'une annotation dans cette source avec un ID généré à la volée (param. false) */
-
-        // Initialize some fields in case of creation
-        _annotation.created = new Date(); /* Date de création de l'annotation */
-        _annotation.creator = this.creator_name;
-        _annotation.setAnnotationType(_annotationType.id); /* Id du type d'annotation */
-        this.player.localSource.getMedias().push(this.source.currentMedia);
-        _annotation.setMedia(this.source.currentMedia.id); /* Id du média annoté */
-    }
-
-    /*
-     * Nous remplissons les données de l'annotation
-     * */
-    _annotation.setBeginEnd(this.begin, this.end);
-    _annotation.modified = new Date(); /* Date de modification de l'annotation */
-    _annotation.contributor = this.creator_name;
-    _annotation.description = this.getDescription();
-    _annotation.title = _annotation.description;
-	_annotation.content = {};
-	_annotation.content.data = {};
-	_annotation.content.data.type = this.$.find(".Ldt-QuizCreator-Question-Type").val();
-	_annotation.content.data.question = _annotation.description;
-	_annotation.content.data.resource = this.$.find(".Ldt-QuizCreator-Resource-Area").val();
-    _annotation.content.data.answers = $.makeArray($(".Ldt-QuizCreator-Questions-Answer")
-                                                   .map(function (ans)
-                                                        {
-                                                            return {
-                                                                content: $(this).find(".Ldt-QuizCreator-Answer-Content").val(),
-                                                                feedback: $(this).find(".Ldt-QuizCreator-Answer-Feedback").val(),
-                                                                correct: $(this).find(".Ldt-Quiz-Question-Check").is(':checked')
-                                                            };
-                                                        }));
-    this.current_annotation = _annotation;
-    if (is_created) {
-        // Add the annotation to the localSource
-        this.player.addLocalAnnotation(_annotation);
-        // Update also the remote source
-        this.source.merge([ _annotation ]);
-        this.player.trigger("Annotation.create", _annotation);
-    } else {
-        // Update the annotation
-        this.player.saveLocalAnnotations();
-        this.player.trigger("Annotation.update", _annotation);
-    };
-    this.player.trigger("AnnotationsList.update"); /* On force le rafraîchissement des widgets AnnotationsList */
-    this.player.trigger("Quiz.refresh"); /* On force le rafraîchissement des widgets Quiz */
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Renkan.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-
-.Ldt-Renkan-Container {
-    position: relative; width: 100%; height: 100%;
-}
-
-.Ldt-Renkan a {
-    color: #303080;
-}
-
-
-.Rk-Main {
-    position: absolute; left: 0; top: 0; right: 0; bottom: 0;
-}
-
-.Rk-Render {
-    position: absolute; left: 0; top: 0; right: 0; bottom: 0;
-    background: #ffffff;
-}
-
-/* Canvas */
-
-.Rk-Editing-Space {
-    position: absolute; left: 0; top: 35px; right: 0; bottom: 0; overflow: hidden;
-    background: -moz-radial-gradient( center, circle, #ffffff 40%, #e0e0e0 90%);
-    background: -webkit-radial-gradient( center, circle, #ffffff 40%, #e0e0e0 90%);
-    background: -ms-radial-gradient( center, circle, #ffffff 40%, #e0e0e0 90%);
-}
-
-.Rk-Editing-Space-Full {
-    top: 0;
-}
-
-.Rk-Canvas {
-    position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 2;
-}
-
-/* Node Labels */
-
-.Rk-Labels {
-    position: absolute; left: 0; top: 0; z-index: 1;
-    font-family: "Segoe UI", "Helvetica Neue", Arial, Helvetica, sans-serif;
-}
-
-.Rk-Label {
-    position: absolute; width: 160px; margin-left: -80px; text-align: center; font-size: 13px; line-height: 13px;
-}
-
-.Rk-Edge-Label {
-    font-size: 11px; transform-origin: 50% 0; -moz-transform-origin: 50% 0;
-    -webkit-transform-origin: 50% 0; -ms-transform-origin: 50% 0;
-}
-
-/* Editors */
-
-.Rk-Editor {
-    position: absolute; left: 0; top: 0; z-index: 3;
-}
-
-.Rk-Notifications {
-    position: absolute; right: 15px; top: 15px; width: 200px;
-    padding: 10px; border-radius: 8px; display: none;
-    color: #ffffff; font-size: 13px; text-align: center; font-weight: bold;
-    background: rgba(20,20,20,.7);
-    background: -moz-linear-gradient(top, rgba(40,40,40,.7) 20%, rgba(0,0,0,.7) 80%);
-    background: -webkit-linear-gradient(top, rgba(40,40,40,.7) 20%, rgba(0,0,0,.7) 80%);
-    background: -ms-linear-gradient(top, rgba(40,40,40,.7) 20%, rgba(0,0,0,.7) 80%);
-    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#202020', endColorstr='#000000',GradientType=0 );
-}
-
-.Rk-CloseX {
-    float: right; cursor: pointer;
-}
-
-.Rk-Editor h2 {
-    font-size: 16px; font-weight: bold; padding: 0;
-}
-
-.Rk-Editor p, .Rk-Editor-p {
-    margin: 5px 0; font-size: 12px; clear: both; padding: 0;
-}
-
-.Rk-Editor-Label {
-    float: left; width: 80px;
-}
-
-.Rk-UserColor {
-    display: inline-block; width: 12px; height: 12px; border: 1px solid #666666; margin: -2px 2px;
-}
-
-.Rk-Display-Title a {
-    text-decoration: none; color: #000000;
-}
-
-.Rk-Display-Title a:hover {
-    text-decoration: underline;
-}
-
-.Rk-Display-URI {
-    font-style: italic;
-}
-
-.Rk-Display-ImgPreview {
-    margin: 5px auto; display: block; max-width: 255px !important; max-height: 120px !important;
-}
-
-
-.Rk-ZoomButtons {
-    position: absolute; left: 0; top: 35px; cursor: pointer;
-}
-
-.Rk-Editing-Space-Full .Rk-ZoomButtons {
-    top: 0;
-}
-
-.Rk-ZoomIn, .Rk-ZoomOut {
-    width: 21px; height: 20px; background: url(img/zoombuttons.png); margin: 5px;
-}
-
-.Rk-ZoomIn:hover {
-    background-position: 0 -20px;
-}
-
-.Rk-ZoomOut {
-    background-position: -21px 0;
-}
-
-.Rk-ZoomOut:hover {
-    background-position: -21px -20px;
-}
-
--- a/src/ldt/ldt/static/ldt/metadataplayer/Renkan.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-IriSP.Widgets.Renkan = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Renkan.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Renkan.prototype.defaults = {
-    annotation_regexp: /player\/([a-zA-Z0-9_-]+)\/.*id=([a-zA-Z0-9_-]+)/,
-    tag_regexp: /search=([^&=]+)/,
-    min_duration: 5000,
-    renkan_options: {}
-};
-
-IriSP.Widgets.Renkan.prototype.messages = {
-    "fr": {
-    },
-    "en": {
-    }
-};
-
-IriSP.Widgets.Renkan.prototype.template =
-    '<div class="Ldt-Renkan-Container"><div class="Ldt-Renkan"></div></div>';
-
-IriSP.Widgets.Renkan.prototype.draw = function() {
-    this.renderTemplate();
-    var _id = IriSP.Model.getUID();
-    this.$.find(".Ldt-Renkan").attr("id", _id);
-    var renkan_options = IriSP._.extend({
-        container: _id,
-        editor_mode: false,
-        show_bins: false,
-        show_top_bar: false,
-        force_resize: true,
-        language: IriSP.language
-    }, this.renkan_options);
-    this.renkan = new Rkns.Renkan(renkan_options);
-    this.node_times = [];
-    var _this = this,
-        _list = this.getWidgetAnnotations();
-    this.renkan.project.on("add:nodes", function(_node) {
-        var _uri = _node.get("uri"),
-            _annmatch = _uri.match(_this.annotation_regexp);
-        if (_annmatch) {
-            var _annotations = _list.filter(function(_ann) {
-                return _ann.getMedia().id == _annmatch[1] && _ann.id == _annmatch[2];
-            });
-            _annotations.forEach(function(_ann) {
-                var _duration = _ann.getDuration(),
-                    _preroll = + ( _duration < _this.min_duration ) * ( _this.min_duration / 2);
-                var _nt = {
-                    uri: _uri,
-                    selected: false,
-                    node: _node,
-                    annotation: _ann,
-                    begin: _ann.begin - _preroll,
-                    end: _ann.end + _preroll
-                };
-                _this.node_times.push(_nt);
-                var _annselected = false,
-                    _nodeselected = false;
-                _ann.on("select", function() {
-                    _annselected = true;
-                    if (!_nodeselected) {
-                        _node.trigger("select",true);
-                    }
-                });
-                _node.on("selected", function() {
-                    _nodeselected = true;
-                    if (!_annselected) {
-                        _ann.trigger("select",true);
-                    }
-                });
-                _ann.on("unselect", function() {
-                    _annselected = false;
-                    if (_nodeselected) {
-                        _node.trigger("unselect",true);
-                    }
-                });
-                _node.on("unselected", function() {
-                    _nodeselected = false;
-                    _nt.selected = false;
-                    if (_annselected) {
-                        _ann.trigger("unselect",true);
-                    }
-                });
-                _node.on("clicked", function() {
-                    _ann.trigger("click");
-                });
-            });
-        }
-        var _tagmatch = _uri.match(_this.tag_regexp);
-        if (_tagmatch) {
-            _node.on("select", function() {
-                _this.source.getAnnotations().search(_tagmatch[1]);
-            });
-            _node.on("unselect", function() {
-                _this.source.getAnnotations().search("");
-            });
-        }
-    });
-    Rkns.jsonIO(this.renkan, {
-        url: this.data
-    });
-    
-    this.onMediaEvent("timeupdate","onTimeupdate");
-    
-    this.$.find(".Rk-Editor").on("click", "a", function() {
-        var href = this.href,
-            times = _this.node_times.filter(function(t) {
-                return t.uri == href;
-            });
-        if (times.length) {
-            IriSP._(times).each(function(t) {
-                t.annotation.trigger("click");
-            });
-            return false;
-        }
-    });
-};
-
-IriSP.Widgets.Renkan.prototype.onTimeupdate = function(_time) {
-    IriSP._(this.node_times).each(function(_nt) {
-        if (_nt.begin <= _time && _nt.end >= _time) {
-            if (!_nt.selected) {
-                _nt.selected = true;
-                _nt.node.trigger("select");
-            }
-        } else {
-            if (_nt.selected) {
-                _nt.node.trigger("unselect");
-            }
-        }
-    });
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Segments.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*
- * Segments Widget
- */
-
-.Ldt-Segments-Segment {
-    position: absolute; margin-left: -1px; border: 1px solid #ffffff;
-}
-
-.Ldt-Segments-Position {
-    background: #fc00ff;
-    position: absolute;
-    top: -1px;
-    left: 0;
-    margin-left: -1px;
-    width: 2px;
-    bottom: -1px;
-    z-index: 80000;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Segments.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,241 +0,0 @@
-// TODO: Trigger IriSP.SegmentsWidget.click
-
-IriSP.Widgets.Segments = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Segments.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Segments.prototype.defaults = {
-    annotation_type : "chap",
-    colors: ["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],
-    line_height: 8,
-    background: "#e0e0e0",
-    overlap: .25,
-    found_color: "#FF00FC",
-    faded_found_color: "#ff80fc",
-    selected_color: "#74d600",
-    faded_selected_color: "#baf9b5",
-    no_tooltip: false,
-    use_timerange: false,
-    scale_to_parent: true
-};
-
-IriSP.Widgets.Segments.prototype.template =
-    '<div class="Ldt-Segments-List"></div>'
-    + '<div class="Ldt-Segments-Position"></div>'
-    + '<div class="Ldt-Segments-Tooltip"></div>';
-
-IriSP.Widgets.Segments.prototype.annotationTemplate =
-    '<div class="Ldt-Segments-Segment Ldt-TraceMe" trace-info="segment-id:{{id}}, media-id:{{media_id}}, from:{{from}}, to:{{to}}" segment-text="{{text}}"'
-    + 'style="top:{{top}}px; height:{{height}}px; left:{{left}}px; width:{{width}}px; background:{{medcolor}}" data-base-color="{{color}}" data-low-color="{{lowcolor}}" data-medium-color="{{medcolor}}"></div>';
-
-
-IriSP.Widgets.Segments.prototype.do_draw = function (isRedraw) {
-    if (this.width != this.$.parent().width() && this.scale_to_parent) {
-        // Reset width
-        this.width = this.$.parent().width();
-        this.$.css({ width : this.width + "px" });
-    }
-    var _this = this,
-        _list = this.getWidgetAnnotations().filter(function(_ann) {
-            return _ann.getDuration() > 0 && _ann.getMedia().id == _this.media.id;
-        }),
-        _scale = this.width / this.source.getDuration(),
-        list_$ = this.$.find('.Ldt-Segments-List'),
-        lines = [],
-        zindex = 1,
-        searching = false;
-    
-    function saturate(r, g, b, s) {
-        function satcomp(c) {
-            return Math.floor(240 * (1 - s) + c * s);
-        }
-        var res = ( 0x10000 * satcomp(r) + 0x100 * satcomp(g) + satcomp(b)).toString(16);
-        while (res.length < 6) {
-            res = "0" + res;
-        }
-        return "#" + res;
-    }
-
-    if (isRedraw) {
-        // Remove all previous elements before recreating them. Not very efficient.
-        this.$.find('.Ldt-Segments-Segment').remove();
-    }
-    _list.forEach(function(_annotation, _k) {
-        var _left = _annotation.begin * _scale,
-            _width = ( _annotation.getDuration() ) * _scale,
-            _center = Math.floor( _left + _width / 2 ),
-            _fulltext = _annotation.title + ( _annotation.description ? ( '<br/>' + _annotation.description ) : '' ),
-            line = IriSP._(lines).find(function(line) {
-                return !IriSP._(line.annotations).find(function(a) {
-                    return a.begin < _annotation.end && a.end > _annotation.begin;
-                });
-            });
-        if (!line) {
-            line = { index: lines.length, annotations: []};
-            lines.push(line); 
-        }
-        line.annotations.push(_annotation);
-        var _top = ((1 - _this.overlap) * line.index) * _this.line_height,
-            color = ( typeof _annotation.color !== "undefined" && _annotation.color ? _annotation.color : _this.colors[_k % _this.colors.length] ),
-            r = parseInt(color.substr(1,2),16),
-            g = parseInt(color.substr(3,2),16),
-            b = parseInt(color.substr(5,2),16),
-            medcolor = saturate(r, g, b, .5),
-            lowcolor = saturate(r, g, b, .2);
-        var _data = {
-            color : color,
-            medcolor: medcolor,
-            lowcolor: lowcolor,
-            text: (_annotation.creator ? (_annotation.creator + " : ") : "" ) + _fulltext.replace(/(\n|\r|\r\n)/mg,' ').replace(/(^.{120,140})[\s].+$/m,'$1&hellip;'),
-            left : _left,
-            width : _width,
-            top: _top,
-            height: _this.line_height - 1,
-            id : _annotation.id,
-            media_id : _annotation.getMedia().id,
-            from: _annotation.begin.toString(),
-            to: _annotation.end.toString()
-        };
-        var _html = Mustache.to_html(_this.annotationTemplate, _data),
-            _el = IriSP.jQuery(_html);
-        _el.mouseover(function() {
-                _annotation.trigger("select");
-            })
-            .mouseout(function() {
-                _annotation.trigger("unselect");
-            })
-            .click(function() {
-                if(_this.use_timerange){
-                    if(!_this.media.getTimeRange()){
-                        _this.media.setCurrentTime(_annotation.begin);
-                        _this.media.setTimeRange(_annotation.begin, _annotation.end);
-                        _this.media.play();
-                        _this.$segments.each(function(){
-                            var _segment = IriSP.jQuery(this);
-                            _segment.css("background", lowcolor).removeClass("selected");
-                        })
-                        _el.css("background", _this.selected_color).addClass("selected");
-                    }
-                    else if (_this.media.getTimeRange()[0]==_annotation.begin || _this.media.getTimeRange()[1]==_annotation.end){
-                        _this.media.resetTimeRange();
-                        _this.$segments.each(function(){
-                            var _segment = IriSP.jQuery(this);
-                            _segment.css("background", lowcolor).removeClass("selected");
-                            _annotation.trigger("select");
-                        })
-                    }
-                    else {
-                        _this.media.setCurrentTime(_annotation.begin);
-                        _this.media.setTimeRange(_annotation.begin, _annotation.end);
-                        _this.media.play();
-                        _this.$segments.each(function(){
-                            var _segment = IriSP.jQuery(this);
-                            _segment.css("background", lowcolor).removeClass("selected");
-                        })
-                        _el.css("background", _this.selected_color).addClass("selected");
-                    }
-                }
-                _annotation.trigger("click");
-            })
-            .appendTo(list_$);
-        IriSP.attachDndData(_el, {
-        	title: _annotation.title,
-        	description: _annotation.description,
-        	uri: (typeof _annotation.url !== "undefined" 
-                ? _annotation.url
-                : (document.location.href.replace(/#.*$/,'') + '#id='  + _annotation.id)),
-            image: _annotation.thumbnail,
-            text: '[' + _annotation.begin.toString() + '] ' + _annotation.title
-        });
-        _annotation.on("select", function() {
-            _this.$segments.each(function() {
-                var _segment = IriSP.jQuery(this);
-                _segment.css({
-                    background: _segment.hasClass("found") ? _this.faded_found_color : _segment.attr("data-low-color")
-                });
-                _segment.css({
-                    background: _segment.hasClass("selected") ? _this.faded_selected_color : _segment.attr("data-low-color")
-                })
-            });
-            _el.css({
-                background: _el.hasClass("found") ? _this.found_color: color,
-                background: _el.hasClass("selected") ? _this.selected_color: color,
-                "z-index": ++zindex
-            });
-            if (_this.tooltip) {
-                _this.tooltip.show( _center, _top, _data.text, _data.color );
-            }
-        });
-        _annotation.on("unselect", function() {
-            if (_this.tooltip) {
-                _this.tooltip.hide();
-            }
-            _this.$segments.each(function() {
-                var _segment = IriSP.jQuery(this);
-                _segment.css("background", _segment.hasClass("found") ? _this.found_color : _segment.attr(searching ? "data-low-color" : "data-medium-color"));
-                _segment.css("background", _segment.hasClass("selected") ? _this.selected_color : _segment.attr(searching ? "data-low-color" : "data-medium-color"));
-            });
-        });
-        _annotation.on("found", function() {
-            _el.css("background", _this.found_color).addClass("found");
-        });
-        _annotation.on("not-found", function() {
-            _el.css("background", lowcolor).removeClass("found");
-        });
-    });
-    
-    this.onMediaEvent("resettimerange", function(){
-        
-        _this.$segments.each(function(){
-            var _segment = IriSP.jQuery(this);
-            _segment.removeClass("selected");
-        })
-    });
-    
-    this.$.css({
-        width : this.width + "px",
-        height : (((1 - this.overlap) * lines.length + this.overlap) * this.line_height) + "px",
-        background : this.background,
-        margin: "1px 0"
-    });
-    this.$segments = this.$.find('.Ldt-Segments-Segment');
-};
-
-IriSP.Widgets.Segments.prototype.draw = function() {
-    var widget = this;
-    widget.onMediaEvent("timeupdate", "onTimeupdate");
-    widget.renderTemplate();
-    widget.do_draw();
-    if (!this.no_tooltip) {
-        widget.insertSubwidget(
-            widget.$.find(".Ldt-Segments-Tooltip"),
-            {
-                type: "Tooltip",
-                min_x: 0,
-                max_x: this.width
-            },
-            "tooltip"
-        );
-    };
-    widget.source.getAnnotations().on("search", function() {
-        searching = true;
-    });
-    widget.source.getAnnotations().on("search-cleared", function() {
-        searching = false;
-        _this.$segments.each(function() {
-            var _segment = IriSP.jQuery(this);
-            _segment.css("background", _segment.attr("data-medium-color")).removeClass("found");
-        });
-    });
-    this.$.on("resize", function () { widget.do_draw(true); });
-};
-
-IriSP.Widgets.Segments.prototype.onTimeupdate = function(_time) {    
-    var _x = Math.floor( this.width * _time / this.media.duration);
-    this.$.find('.Ldt-Segments-Position').css({
-        left: _x + "px"
-    });
-};
-
--- a/src/ldt/ldt/static/ldt/metadataplayer/Shortcuts.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-/* Empty file */
--- a/src/ldt/ldt/static/ldt/metadataplayer/Shortcuts.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-IriSP.Widgets.Shortcuts = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-/**
- * Keyboard shortcuts widget
- * This widgets add global shortcuts for common actions.
- * The default shortcuts are: 
- * - Control-space for play/pause
- * - Control-left for rewind (+shift to go faster)
- * - Control-right for forward (+shift to go faster)
- */
-IriSP.Widgets.Shortcuts.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Shortcuts.prototype.defaults =  {
-    // Time increment, in ms, for backward/forward navigation
-    time_increment: 2000
-}
-
-IriSP.Widgets.Shortcuts.prototype.draw = function() {
-    var  _this = this;
-    
-    /* Standard shortcuts */
-    Mousetrap.bindGlobal("ctrl+space", function (e) {
-        e.preventDefault();
-        if (! _this.media.getPaused()) {
-            _this.media.pause();
-        } else {
-            _this.media.play();
-        }
-        return false;
-    });
-    Mousetrap.bindGlobal("ctrl+left", function (e) {
-        // Backward
-        e.preventDefault();
-        _this.media.setCurrentTime(Math.max(0, _this.media.getCurrentTime() - _this.time_increment));
-        return false;
-    });
-    Mousetrap.bindGlobal("ctrl+shift+left", function (e) {
-        // Backward
-        e.preventDefault();
-        _this.media.setCurrentTime(Math.max(0, _this.media.getCurrentTime() - 5 * _this.time_increment));
-        return false;
-    });
-    Mousetrap.bindGlobal("ctrl+right", function (e) {
-        // Forward
-        e.preventDefault();
-        _this.media.setCurrentTime(Math.min(_this.media.duration, _this.media.getCurrentTime() + _this.time_increment));
-        return false;
-    });
-    Mousetrap.bindGlobal("ctrl+shift+right", function (e) {
-        // Forward
-        e.preventDefault();
-        _this.media.setCurrentTime(Math.min(_this.media.duration, _this.media.getCurrentTime() + 5 * _this.time_increment));
-        return false;
-    });
-    Mousetrap.bindGlobal("ctrl+a", function (e) {
-        // Annotate
-        e.preventDefault();
-        _this.player.trigger("CreateAnnotation.toggle");
-        return false;
-    });
-
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Slice.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/* Slider Widget */
-
-.Ldt-Slice {
-    border-radius: 0; border: none; padding: 0; margin: 12px 0 12px; background: #B6B8B8; height: 8px;
-}
-
-.Ldt-Slice .ui-slider-handle {
-    width: 7px; height: 20px; top: 0; border: none; margin: 0; padding: 0;
-    background: url(img/slice-handles.png); border-radius: 0; cursor: pointer;
-}
-
-.ui-slider-handle.Ldt-Slice-left-handle {
-    margin-left: -7px;
-}
-
-.ui-slider-handle.Ldt-Slice-right-handle {
-    margin-left: 0; background-position: -7px 0;
-}
-
-.Ldt-Slice .ui-slider-range {
-    background: url(img/pinstripe-purple.png);
-}
-
--- a/src/ldt/ldt/static/ldt/metadataplayer/Slice.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
- The Slider Widget shows time position and allows seek
- */
-
-IriSP.Widgets.Slice = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.sliding = false;
-};
-
-IriSP.Widgets.Slice.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Slice.prototype.defaults = {
-    show_arrow: false
-};
-
-IriSP.Widgets.Slice.prototype.template =
-    '<div class="Ldt-Slice"></div>'
-    + '{{#show_arrow}}<div class="Ldt-Slice-Arrow"></div>{{/show_arrow}}';
-
-IriSP.Widgets.Slice.prototype.draw = function() {
-    
-    this.renderTemplate();
-    
-    this.$slider = this.$.find(".Ldt-Slice");
-    
-    if (this.show_arrow) {
-        this.insertSubwidget(this.$.find(".Ldt-Slice-Arrow"), { type: "Arrow" },"arrow");
-    }
-    
-    this.min = 0;
-    this.max = this.media.duration.valueOf();
-    
-    var _this = this,
-        _currentTime;
-    
-    this.$slider.slider({
-        range: true,
-        values: [0, this.max],
-        min: 0,
-        max: this.max,
-        change: function(event, ui) {
-            if (_this.arrow) {
-                _this.arrow.moveToTime((ui.values[0]+ui.values[1])/2);
-            }
-            if (_this.onBoundsChanged) {
-                _this.onBoundsChanged(ui.values[0],ui.values[1]);
-            }
-        },
-        start: function() {
-            _this.sliding = true;
-            if (!_this.media.getPaused()) {
-                _this.media.pause();
-            }
-            _currentTime = _this.media.getCurrentTime();
-        },
-        slide: function(event, ui) {
-            _this.media.setCurrentTime(ui.value);
-        },
-        stop: function() {
-            _this.sliding = false;
-            _this.media.setCurrentTime(_currentTime);
-        }
-    });
-    
-    this.$slider.find(".ui-slider-handle:first").addClass("Ldt-Slice-left-handle");
-    this.$slider.find(".ui-slider-handle:last").addClass("Ldt-Slice-right-handle");
-    
-    this.getWidgetAnnotations().forEach(function(_a) {
-        _a.on("enter", function() {
-            _this.setBounds(_a.begin, _a.end);
-        });
-    });
-    this.player.on("annotation-click", function(_a) {
-        _this.setBounds(_a.begin, _a.end);
-    });
-};
-
-IriSP.Widgets.Slice.prototype.setBounds = function(begin, end) {
-    this.$slider.slider("values", [ begin, end ]);
-};
-
-IriSP.Widgets.Slice.prototype.show = function() {
-    this.$slider.show();
-};
-
-IriSP.Widgets.Slice.prototype.hide = function() {
-    this.$slider.hide();
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/SlidePreview.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-.Ldt-SlidePreview-Container {
-    background-color: #999;
-    left: 0px;
-    right: 0px;
-    height: 36px;
-    padding-left: 4px;
-    overflow: hidden;
-}
-.Ldt-SlidePreview-Slides {
-    display: -webkit-inline-flex;
-    display: inline-flex;
-    -webkit-flex-direction: row;
-    flex-direction:         row;
-    -webkit-flex-wrap: nowrap;
-    flex-wrap:         nowrap;
-    overflow-x: hidden;
-    left: 0px;
-    right: 0px;
-    height: 36px;
-    padding: 0;
-    padding-top: 12px;
-    margin: 0;
-    overflow-y: hidden;
-}
-.Ldt-SlidePreview-Item {
-    display: inline-block;
-    width: 20px;
-    height: 12px;
-    background-color: #fff;
-    transition: transform .2s ease-in-out;
-}
-.Ldt-SlidePreview-Item img {
-    max-width: 100%;
-    max-height: 100%;
-}
-.Ldt-SlidePreview-Item:hover {
-    -webkit-transform: scale(2.8);
-    z-index: 4;
-}
-.Ldt-SlidePreview-Item:hover + .slidepreviewitem {
-    -webkit-transform: scale(1.8);
-    z-index: 1;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/SlidePreview.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-IriSP.Widgets.SlidePreview = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-}
-
-IriSP.Widgets.SlidePreview.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.SlidePreview.prototype.defaults = {
-    annotation_type: "Slides"
-}
-
-IriSP.Widgets.SlidePreview.prototype.template = '<div class="Ldt-SlidePreview-Container"><div class="Ldt-SlidePreview-Slides"></div></div>';
-
-IriSP.Widgets.SlidePreview.prototype.annotationTemplate = '<div data-id="{{ id }}" data-timecode="{{ ms }}" class="Ldt-SlidePreview-Item"><img title="{{ begin }} - {{ atitle }}" class="Ldt-AnnotationsList-Thumbnail" src="{{ thumbnail }}"></div>';
-
-IriSP.Widgets.SlidePreview.prototype.draw = function() {
-    var _annotations = this.getWidgetAnnotations().sortBy(function(_annotation) {
-        return _annotation.begin;
-    });
-    var _this = this;
-    _this.renderTemplate();
-    var content = _this.$.find('.Ldt-SlidePreview-Slides');
-
-    this.getWidgetAnnotations().forEach(function(_a) {
-        var _data = {
-            id : _a.id,
-            content : IriSP.textFieldHtml(_a.title),
-            begin : _a.begin.toString(),
-            ms: _a.begin.milliseconds,
-            thumbnail: _a.thumbnail
-            };
-        var _html = Mustache.to_html(_this.annotationTemplate, _data);
-        var _el = IriSP.jQuery(_html);
-        content.append(_el);
-    });
-    _this.$.on("click", ".Ldt-SlidePreview-Item", function () {
-        _this.media.setCurrentTime(Number(this.dataset.timecode));
-    });
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/SlideVideoPlayer.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-.Ldt-SlideVideoPlayer-panel {
-    display: -webkit-flex;
-    display: flex;
-    width: 50%;
-    float: left;
-}
-
-.Ldt-SlideVideoPlayer {
-    width: 100%;
-    max-width: 100%;
-    height: 100%;
-    max-height: 100%;
-}
-
-.Ldt-SlideVideoPlayer-pip-main {
-    position: relative;
-    width: 100%;
-    height: 100%;
-    top: 0px;
-    left: 0px;
-    right: 0px;
-    bottom: 0px;
-    z-index: 1;
-}
-
-.Ldt-SlideVideoPlayer-pip-pip {
-    position: absolute;
-    width: 30%;
-    height: 30%;
-    right: 2px;
-    bottom: 2px;
-    z-index: 3;
-}
-
-.Ldt-SlideVideoPlayer h2 {
-    display: none;
-}
-.Ldt-SlideVideoPlayer-pip-menu {
-    position: absolute;
-    top: 0px;
-    right: 0px;
-    z-index: 10;
-    display: none;
-}
-.Ldt-SlideVideoPlayer-pip-pip:hover .Ldt-SlideVideoPlayer-pip-menu {
-    background-color: #000;
-    opacity: .5;
-    display: inline-block;
-}
-
-.Ldt-SlideVideoPlayer-pip-menu-toggle {
-    width: 18px;
-    height: 18px;
-    cursor: pointer;
-    background-image: url(img/pip_toggle.svg);
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/SlideVideoPlayer.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-IriSP.Widgets.SlideVideoPlayer = function(player, config) {
-    IriSP.loadCss(IriSP.getLib("cssSplitter"));
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.SlideVideoPlayer.prototype = new IriSP.Widgets.Widget();
-
-
-IriSP.Widgets.SlideVideoPlayer.prototype.defaults = {
-    playerModule: "HtmlPlayer",
-    // mode is either "sidebyside" or "pip"
-    mode: "sidebyside"
-};
-
-IriSP.Widgets.SlideVideoPlayer.prototype.template = '<div class="Ldt-SlideVideoPlayer">\
-  <div class="Ldt-SlideVideoPlayer-slide Ldt-SlideVideoPlayer-panel">\
-  </div>\
-  <div class="Ldt-SlideVideoPlayer-video Ldt-SlideVideoPlayer-panel">\
-  </div>\
-</div>';
-
-IriSP.Widgets.SlideVideoPlayer.prototype.draw = function() {
-    var _this = this;
-
-    _this.renderTemplate();
-    this.insertSubwidget(
-        _this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide"),
-            {
-                type: "ImageDisplay",
-                annotation_type: _this.annotation_type
-            },
-            "slide"
-        );
-    this.insertSubwidget(
-        _this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video"),
-            {
-                type: _this.playerModule,
-                video: _this.video,
-                width: '100%',
-                url_transform: _this.url_transform
-            },
-            "player"
-    );
-
-    if (_this.mode == 'pip') {
-        _this.$.find(".Ldt-SlideVideoPlayer-panel").append('<div class="Ldt-SlideVideoPlayer-pip-menu"><div class="Ldt-SlideVideoPlayer-pip-menu-toggle"></div></div>');
-        _this.$.on("click", ".Ldt-SlideVideoPlayer-pip-menu-toggle", function () {
-            _this.toggleMainDisplay();
-        });
-        window.setTimeout(function () {
-            _this.setMainDisplay('video');
-        }, 1500);
-    } else {
-        // Default : side by side
-        // FIXME: this should be better implemented through a signal sent
-        // when widgets are ready (and not just loaded)
-        window.setTimeout(function () {
-            _this.$.find(".Ldt-SlideVideoPlayer").touchSplit({ orientation: (screen.height > screen.width) ? 'vertical' : 'horizontal',
-                                                               leftMin: 20,
-                                                               topMin: 20
-                                                             });
-        }, 1500);
-    }
-};
-
-IriSP.Widgets.SlideVideoPlayer.prototype.toggleMainDisplay = function() {
-    if (this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video").hasClass("Ldt-SlideVideoPlayer-pip-main")) {
-        this.setMainDisplay('slides');
-    } else {
-        this.setMainDisplay('video');
-    }
-};
-
-// Set main display (in case of a "switch" display mode)
-// main is either 'video' or 'slides'
-IriSP.Widgets.SlideVideoPlayer.prototype.setMainDisplay = function(video_or_slides) {
-    var main = this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video");
-    var pip = this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide");
-    if (video_or_slides == 'slides') {
-        var temp = main;
-        main = pip;
-        pip = temp;
-    };
-    main.removeClass('Ldt-SlideVideoPlayer-pip-pip').addClass('Ldt-SlideVideoPlayer-pip-main');
-    pip.removeClass('Ldt-SlideVideoPlayer-pip-main').addClass('Ldt-SlideVideoPlayer-pip-pip');
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/Slider.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/* Slider Widget */
-
-.Ldt-Slider {
-    border: none;
-    border-radius: 0;
-    padding: 0;
-    margin: 0;
-    background: #B6B8B8;
-}
-
-.Ldt-Slider .ui-slider-handle {
-    border-radius: 8px;
-    top: -2px;
-    background: #fc00ff;
-    border: 1px solid #ffffff;
-}
-
-.Ldt-Slider .ui-slider-range {
-    background: #747474;
-}
-
-.Ldt-Slider-Time {
-    position: absolute;
-    bottom: 32px;
-    background: #ffffc0;
-    color: #000000;
-    border-radius: 3px;
-    z-index: 8;
-    font-size: 10px;
-    width: 34px;
-    border: 1px solid #999999;
-    padding: 1px;
-    margin-left: -20px;
-    display: none;
-    text-align: center;
-    font-weight: bold;
-    pointer-events: none;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/Slider.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
- The Slider Widget fits right under the video
- */
-
-IriSP.Widgets.Slider = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Slider.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Slider.prototype.defaults = {
-    minimized_height : 4,
-    maximized_height : 4,
-    minimize_timeout : 1500 /*  time before minimizing slider after mouseout,
-                                set to zero for fixed slider */
-};
-
-IriSP.Widgets.Slider.prototype.template =
-    '<div class="Ldt-Slider"></div><div class="Ldt-Slider-Time">00:00</div>';
-
-IriSP.Widgets.Slider.prototype.draw = function() {
-
-    this.renderTemplate();
-
-    this.$time = this.$.find(".Ldt-Slider-Time");
-
-    this.$slider = this.$.find(".Ldt-Slider");
-
-    var _this = this;
-
-    this.$slider.slider({
-        range: "min",
-        value: 0,
-        min: 0,
-        max: this.source.getDuration().milliseconds,
-        slide: function(event, ui) {
-            _this.media.setCurrentTime(ui.value);
-            _this.player.trigger("Mediafragment.setHashToTime");
-        }
-    });
-
-    this.$handle = this.$slider.find('.ui-slider-handle');
-
-    this.onMediaEvent("timeupdate","onTimeupdate");
-    this.onMdpEvent("Player.MouseOver","onMouseover");
-    this.onMdpEvent("Player.MouseOut","onMouseout");
-
-    if (this.minimize_timeout) {
-        this.$slider.css(this.calculateSliderCss(this.minimized_height));
-        this.$handle.css(this.calculateHandleCss(this.minimized_height));
-
-        this.maximized = false;
-        this.timeoutId = false;
-    }
-
-    this.$slider
-        .mouseover(function() {
-            _this.$time.show();
-            _this.onMouseover();
-        })
-        .mouseout(this.functionWrapper("onMouseout"))
-        .mousemove(function(_e) {
-            var _x = _e.pageX - _this.$.offset().left,
-                _t = new IriSP.Model.Time(_this.media.duration * _x / _this.width);
-            _this.$time.text(_t.toString()).css("left",_x);
-        });
-};
-
-IriSP.Widgets.Slider.prototype.onTimeupdate = function(_time) {
-    this.$slider.slider("value",_time);
-    this.player.trigger("Arrow.updatePosition",{widget: this.type, time: _time});
-};
-
-IriSP.Widgets.Slider.prototype.onMouseover = function() {
-    if (this.minimize_timeout) {
-        if (this.timeoutId) {
-            window.clearTimeout(this.timeoutId);
-            this.timeoutId = false;
-        }
-        if (!this.maximized) {
-           this.animateToHeight(this.maximized_height);
-           this.maximized = true;
-        }
-    }
-};
-
-IriSP.Widgets.Slider.prototype.onMouseout = function() {
-    this.$time.hide();
-    if (this.minimize_timeout) {
-        if (this.timeoutId) {
-            window.clearTimeout(this.timeoutId);
-            this.timeoutId = false;
-        }
-        var _this = this;
-        this.timeoutId = window.setTimeout(function() {
-            if (_this.maximized) {
-                _this.animateToHeight(_this.minimized_height);
-                _this.maximized = false;
-            }
-            _this.timeoutId = false;
-        }, this.minimize_timeout);
-    }
-};
-
-IriSP.Widgets.Slider.prototype.animateToHeight = function(_height) {
-    this.$slider.stop().animate(
-        this.calculateSliderCss(_height),
-        500,
-        function() {
-            IriSP.jQuery(this).css("overflow","visible");
-        });
-    this.$handle.stop().animate(
-        this.calculateHandleCss(_height),
-        500,
-        function() {
-            IriSP.jQuery(this).css("overflow","visible");
-        });
-};
-
-IriSP.Widgets.Slider.prototype.calculateSliderCss = function(_size) {
-    return {
-        height: _size + "px",
-        "margin-top": (this.minimized_height - _size) + "px"
-    };
-};
-
-IriSP.Widgets.Slider.prototype.calculateHandleCss = function(_size) {
-    return {
-        height: (2 + _size) + "px",
-        width: (2 + _size) + "px",
-        "margin-left": -Math.ceil(2 + _size / 2) + "px"
-    };
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Slideshare.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-/* Slideshare widget */
-
--- a/src/ldt/ldt/static/ldt/metadataplayer/Slideshare.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/* TODO: Add Slide synchronization */
-
-IriSP.Widgets.Slideshare = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Slideshare.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Slideshare.prototype.defaults = {
-    annotation_type: "slide",
-    sync: true,
-};
-
-IriSP.Widgets.Slideshare.prototype.messages = {
-    fr: {
-        slides_ : "Diapositives"
-    },
-    en: {
-        slides_ : "Slides"
-    }
-};
-
-IriSP.Widgets.Slideshare.prototype.template =
-    '<div class="Ldt-SlideShare"><h2>{{l10n.slides_}}</h2><hr /><div class="Ldt-SlideShare-Container"></div></div>';
-
-IriSP.Widgets.Slideshare.prototype.draw = function() {
-    
-    function insertSlideshare(_presentation, _slide) {
-        if (_lastEmbedded === _presentation) {
-            if (_embedObject && typeof _embedObject.jumpTo === "function") {
-                _embedObject.jumpTo(parseInt(_slide));
-            }
-        } else {
-            _lastEmbedded = _presentation;
-            var _id = IriSP.Model.getUID(),
-                _params = {
-                    allowScriptAccess: "always"
-                },
-                _atts = {
-                    id: _id
-                },
-                _flashvars = {
-                    doc : _presentation,
-                    startSlide : _slide
-                };
-            $container.html('<div id="' + _id + '"></div>');
-            swfobject.embedSWF(
-                "http://static.slidesharecdn.com/swf/ssplayer2.swf",
-                _id,
-                _this.embed_width,
-                _this.embed_height,
-                "8",
-                null,
-                _flashvars,
-                _params,
-                _atts
-            );
-            _embedObject = document.getElementById(_id);
-        }
-        $container.show();
-    }
-    
-    var _annotations = this.getWidgetAnnotations();
-    if (!_annotations.length) {
-        this.$.hide();
-    } else {
-        this.renderTemplate();
-        var _lastPres = "",
-            _embedObject = null,
-            _oembedCache = {},
-            _lastEmbedded = "",
-            _this = this,
-            $container = this.$.find(".Ldt-SlideShare-Container");
-            
-        this.embed_width = this.embed_width || $container.innerWidth();
-        this.embed_height = this.embed_height || Math.floor(this.embed_width * 3/4);
-        
-        _annotations.forEach(function(_a) {
-            _a.on("leave", function() {
-                $container.hide();
-                _lastPres = "";
-            });
-            _a.on("enter", function() {
-                var _description = _a.description,
-                    _isurl = /^https?:\/\//.test(_description),
-                    _presentation = _description.replace(/#.*$/,''),
-                    _slidematch = _description.match(/(#|\?|&)id=(\d+)/),
-                    _slide = parseInt(_slidematch && _slidematch.length > 2 ? _slidematch[2] : 1);
-                if (_presentation !== _lastPres) {
-                    if (_isurl) {
-                        if (typeof _oembedCache[_presentation] === "undefined") {
-                            var _ajaxUrl = "http://www.slideshare.net/api/oembed/1?url="
-                                + encodeURIComponent(_presentation)
-                                + "&format=jsonp&callback=?";
-                            IriSP.jQuery.getJSON(_ajaxUrl, function(_oembedData) {
-                                var _presmatch = _oembedData.html.match(/doc=([a-z0-9\-_%]+)/i);
-                                if (_presmatch && _presmatch.length > 1) {
-                                    _oembedCache[_presentation] =  _presmatch[1];
-                                    insertSlideshare(_presmatch[1], _slide);
-                                }
-                            });
-                        } else {
-                            insertSlideshare(_oembedCache[_presentation], _slide);
-                        }
-                    } else {
-                        insertSlideshare(_presentation, _slide);
-                    }
-                }
-                if (_this.sync && _embedObject && typeof _embedObject.jumpTo === "function") {
-                    _embedObject.jumpTo(parseInt(_slide));
-                }
-                _lastPres = _presentation;
-                
-            });
-        });
-    }
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Social.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-.Ldt-Social a {
-    display: inline-block; width: 24px; height: 24px; margin: 2px 0 0 2px; background: url(img/socialbuttons.png);
-}
-
-.Ldt-Social-Url-Container {
-    display: inline-block; width: 24px; height: 24px; margin: 2px 0 0 2px; position: relative;
-}
-
-a.Ldt-Social-Url {
-    margin: 0; background-position: -96px 0;
-}
-
-a.Ldt-Social-Url:hover {
-    background-position: -96px -24px;
-}
-
-.Ldt-Social-UrlPop {
-    position: absolute; left: 20px; top: -2px; background: url(img/socialcopy.png);
-    padding: 3px 0 0 12px; width: 218px; height: 27px;
-    display: none;
-}
-
-.Ldt-Social-Input, .Ldt-Social-CopyBtn {
-    font-size: 11px; margin: 1px; border: 1px solid #ccc; height: 16px;
-    padding: 1px; border-radius: 2px; display: inline-block;
-}
-
-.Ldt-Social-Input:hover, .Ldt-Social-CopyBtn.hover {
-    border-color: #8080ff;
-}
-
-.Ldt-Social-Input {
-    width: 200px;
-}
-
-.Ldt-Social-CopyBtn {
-    font-weight: bold; width: 50px; text-align: center; background: #f0f0ff;
-}
-
-.Ldt-Social-CopyBtn.hover {
-    background: #ffe0a0;
-}
-
-.Ldt-Social-CopyBtn.active {
-    background: #ff8000;
-}
-
-a.Ldt-Social-Twitter {
-    background-position: 0 0;
-}
-
-a.Ldt-Social-Twitter:hover {
-    background-position: 0 -24px;
-}
-
-a.Ldt-Social-Fb {
-    background-position: -24px 0;
-}
-
-a.Ldt-Social-Fb:hover {
-    background-position: -24px -24px;
-}
-
-a.Ldt-Social-Gplus {
-    background-position: -48px 0;
-}
-
-a.Ldt-Social-Gplus:hover {
-    background-position: -48px -24px;
-}
-
-a.Ldt-Social-Mail {
-    background-position: -72px 0;
-}
-
-a.Ldt-Social-Mail:hover {
-    background-position: -72px -24px;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Social.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-// TODO: Open share links in a small window
-
-IriSP.Widgets.Social = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Social.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Social.prototype.defaults = {
-    text: "",
-    url: "",
-    show_url: true,
-    show_twitter: true,
-    show_fb: true,
-    show_gplus: true,
-    show_mail: true
-};
-
-IriSP.Widgets.Social.prototype.template =
-    '<span class="Ldt-Social">{{#show_url}}<div class="Ldt-Social-Url-Container"><a href="#" draggable="true" target="_blank" class="Ldt-Social-Square Ldt-Social-Url Ldt-TraceMe" title="{{l10n.share_link}}">'
-    + '</a><div class="Ldt-Social-UrlPop"><input class="Ldt-Social-Input"/></div></div>{{/show_url}}'
-    + '{{#show_fb}}<a href="#" target="_blank" class="Ldt-Social-Fb Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Facebook"></a>{{/show_fb}}'
-    + '{{#show_twitter}}<a href="#" target="_blank" class="Ldt-Social-Twitter Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Twitter"></a>{{/show_twitter}}'
-    + '{{#show_gplus}}<a href="#" target="_blank" class="Ldt-Social-Gplus Ldt-Social-Ext Ldt-TraceMe" title="{{l10n.share_on}} Google+"></a>{{/show_gplus}}'
-    + '{{#show_mail}}<a href="#" target="_blank" class="Ldt-Social-Mail Ldt-TraceMe" title="{{l10n.share_mail}}"></a>{{/show_mail}}</span>';
-
-IriSP.Widgets.Social.prototype.messages = {
-    "fr": {
-        share_on: "Partager sur",
-        share_mail: "Envoyer par courriel",
-        share_link: "Partager le lien hypertexte",
-        copy: "Copier"
-    },
-    "en" : {
-        share_on: "Share on",
-        share_mail: "Share by e-mail",
-        share_link: "Share hypertext link",
-        copy: "Copy"
-    }
-};
-
-IriSP.Widgets.Social.prototype.draw = function() {
-    this.renderTemplate();
-    this.clipId = IriSP._.uniqueId("Ldt-Social-CopyBtn-");
-    this.$.find(".Ldt-Social-CopyBtn").attr("id", this.clipId);
-    var _this = this;
-    this.$.find(".Ldt-Social-Url").click(function() {
-        _this.toggleCopy();
-        return false;
-    }).on("dragstart", function(e) {
-    	e.originalEvent.dataTransfer.setData("text/x-iri-title",_this.text);
-    	e.originalEvent.dataTransfer.setData("text/x-iri-uri",_this.url);
-    });
-    this.$.find(".Ldt-Social-Input").focus(function() {
-        this.select();
-    });
-    this.$.find(".Ldt-Social-Ext").click(function() {
-        window.open(
-            IriSP.jQuery(this).attr("href"),
-            "_blank",
-            "height=300,width=450,left=100,top=100,toolbar=0,menubar=0,status=0,location=0");
-        return false;
-    });
-    this.updateUrls(this.url, this.text);
-};
-
-IriSP.Widgets.Social.prototype.toggleCopy = function() {
-    var _pop = this.$.find(".Ldt-Social-UrlPop");
-    _pop.toggle();
-    this.$.find(".Ldt-Social-Input").val(this.url).focus();
-};
-
-IriSP.Widgets.Social.prototype.updateUrls = function(_url, _text) {
-    this.url = _url;
-    this.text = _text;
-    this.$.find(".Ldt-Social-Fb").attr("href", "http://www.facebook.com/share.php?" + IriSP.jQuery.param({ u: _url, t: _text }));
-    this.$.find(".Ldt-Social-Twitter").attr("href", "https://twitter.com/intent/tweet?" + IriSP.jQuery.param({ url: _url, text: _text }));
-    this.$.find(".Ldt-Social-Gplus").attr("href", "https://plus.google.com/share?" + IriSP.jQuery.param({ url: _url, title: _text }));
-    this.$.find(".Ldt-Social-Mail").attr("href", "mailto:?" + IriSP.jQuery.param({ subject: _text, body: _text + ": " + _url }));
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Sparkline.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-IriSP.Widgets.Sparkline = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Sparkline.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Sparkline.prototype.defaults = {
-   lineColor : "#7492b4",
-   fillColor : "#aeaeb8",
-   lineWidth : 2,
-   slice_count : 20,
-   height : 50,
-   margin : 5
-};
-
-IriSP.Widgets.Sparkline.prototype.draw = function() {
-    var _slices = [],
-        _duration = this.source.getDuration(),
-        _max = 0,
-        _list = this.getWidgetAnnotations();
-    for (var _i = 0; _i < this.slice_count; _i++) {
-        var _begin = (_i*_duration/this.slice_count),
-            _end = ((_i+1)*_duration/this.slice_count),
-            _volume = 0;
-            _list.forEach(function(_annotation) {
-                if (_annotation.begin < _end && _annotation.end >= _begin) {
-                    var _d = _annotation.getDuration().milliseconds;
-                    if (!_d) {
-                        _volume += 1;
-                    } else {
-                        _volume += (Math.min(_annotation.end, _end) - Math.max(_annotation.begin, _begin)) / _d;
-                    }
-                }
-            });
-            _max = Math.max(_max, _volume);
-        _slices.push(_volume);
-    }
-    if (!_max) {
-        return;
-    }
-    this.paper = new Raphael(this.$[0], this.width, this.height);
-    var _scale = (this.height - this.margin) / _max,
-        _width = this.width / this.slice_count,
-        _this = this,
-        _y = IriSP._(_slices).map(function(_v) {
-            return _this.margin + _this.height - (_scale * _v);
-        }),
-        _d = IriSP._(_y).reduce(function(_memo, _v, _k) {
-               return _memo + ( _k
-                   ? 'C' + (_k * _width) + ' ' + _y[_k - 1] + ' ' + (_k * _width) + ' ' + _v + ' ' + ((_k + .5) * _width) + ' ' + _v
-                   : 'M0 ' + _v + 'L' + (.5*_width) + ' ' + _v );
-            },'') + 'L' + this.width + ' ' + _y[_y.length - 1],
-        _d2 = _d + 'L' + this.width + ' ' + this.height + 'L0 ' + this.height;
-    
-    this.paper.path(_d2).attr({
-        "stroke" : "none",
-        "fill" : this.fillColor
-    });
-         
-    this.paper.path(_d).attr({
-        "fill" : "none",
-        "stroke" : this.lineColor,
-        "stroke-width" : this.lineWidth
-    });
-    
-    this.rectangleProgress = this.paper.rect(0,0,0,this.height)
-        .attr({
-            "stroke" : "none",
-            "fill" : "#808080",
-            "opacity" : .3
-        });
-        
-    this.ligneProgress = this.paper.path("M0 0L0 "+this.height).attr({"stroke":"#ff00ff", "line-width" : 2});
-   
-    this.$.click(function(_e) {
-        var _x = _e.pageX - _this.$.offset().left;
-        _this.media.setCurrentTime(_this.media.duration * _x / _this.width);
-    });
-    
-    this.onMediaEvent("timeupdate","onTimeupdate");
-};
-
-IriSP.Widgets.Sparkline.prototype.onTimeupdate = function(_time) {
-    var _x = Math.floor( this.width * _time / this.media.duration);
-    this.rectangleProgress.attr({
-        "width" : _x
-    });
-    this.ligneProgress.attr({
-        "path" : "M" + _x + " 0L" + _x + " " + this.height
-    });
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/SpelSyncHtml.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-IriSP.Widgets.SpelSyncHtml = function(player, config) {
-    console.log("Calling IriSP.Widget's constructor from IriSP.HelloWorldWidget");
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.SpelSyncHtml.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.SpelSyncHtml.prototype.defaults = {
-    src: "about:blank"
-};
-
-IriSP.Widgets.SpelSyncHtml.prototype.template =
-    '<div class="Ldt-SpelSyncHtml"><iframe src="{{src}}" {{#width}}width="{{width}}"{{/width}} {{#height}}height="{{height}}"{{/height}}</div>';
-
-IriSP.Widgets.SpelSyncHtml.prototype.draw = function() {
-    this.renderTemplate();
-    var frame = this.$.find("iframe")[0],
-        basesrc = this.src.replace(/#.*$/,'');
-    this.getWidgetAnnotations().forEach(function(a) {
-        a.on("enter", function() {
-            if (a.content && a.content.data && a.content.data.ref_text) {
-                frame.src = basesrc + '#' + a.content.data.ref_text;
-            }
-        });
-    });
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Tagcloud.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
- * 
- */
-.Ldt-Tagcloud-Container {
-    border: 1px solid #b7b7b7;
-    padding: 1px;
-    margin: 0;
-}
-
-ul.Ldt-Tagcloud-List {
-    background: url(img/pinstripe.png);
-    padding: 5px;
-    margin: 0;
-    list-style: none;
-    text-align: center;
-}
-
-li.Ldt-Tagcloud-item {
-    display: inline-block;
-    margin: 2px;
-    cursor: pointer;
-}
-
-li.Ldt-Tagcloud-item:hover {
-    color: #0099ff;
-}
-
-.Ldt-Tagcloud-active {
-    color: #c000c0;
-    padding: 0; margin: 0;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Tagcloud.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-IriSP.Widgets.Tagcloud = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.stopwords = IriSP._.uniq([].concat(this.custom_stopwords).concat(this.stopword_lists[this.stopword_language]));
-};
-
-IriSP.Widgets.Tagcloud.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Tagcloud.prototype.template =
-    '<div class="Ldt-Tagcloud-Container"><ul class="Ldt-Tagcloud-List">'
-    + '{{#words}}<li class="Ldt-Tagcloud-item Ldt-TraceMe" trace-info="tag:{{word}}" content="{{word}}" style="font-size: {{size}}px">{{word}}</li>{{/words}}'
-    + '</ul></div>';
-
-IriSP.Widgets.Tagcloud.prototype.defaults = {
-    include_titles: true,
-    include_descriptions: true,
-    include_tag_texts: true,
-    tag_count: 30,
-    stopword_language: "fr",
-    custom_stopwords: [],
-    exclude_pattern: false,
-    annotation_type: false,
-    segment_annotation_type: false,
-    min_font_size: 10,
-    max_font_size: 26,
-    min_count: 2,
-    remove_zero_duration: false
-};
-
-IriSP.Widgets.Tagcloud.prototype.stopword_lists = {
-    "fr" : [
-        'aussi', 'avec', 'aux', 'bien', 'car', 'cette', 'comme', 'dans', 'des', 'donc', 'dont', 'elle', 'encore', 'entre', 'est',
-        'être', 'eux', 'faire', 'fait', 'http', 'ici', 'ils', 'les', 'leur', 'leurs', 'mais', 'mes', 'même', 'mon', 'notre',
-        'non', 'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'peut', 'plus', 'pour', 'quand', 'que', 'qui', 'quoi', 'sans',
-        'ses' ,'son', 'sont', 'sur', 'tes', 'très', 'the', 'ton', 'tous', 'tout', 'une', 'votre', 'vos', 'vous'
-    ],
-    "en" : [
-        'about', 'again', 'are', 'and', 'because', 'being', 'but', 'can', 'done', 'have', 'for', 'from',
-        'get', 'here', 'http', 'like', 'more', 'one', 'our', 'she', 'that', 'the', 'their', 'then', 'there',
-        'they', 'this', 'very', 'what', 'when', 'where', 'who', 'why', 'will', 'with', 'www', 'you', 'your'
-    ]
-};
-
-IriSP.Widgets.Tagcloud.prototype.draw = function() {
-    
-    if (this.segment_annotation_type) {
-        var _this = this;
-        this.source.getAnnotationsByTypeTitle(this.segment_annotation_type).forEach(function(_a) {
-            _a.on("enter", function() {
-                _this.redraw(_a.begin, _a.end);
-            });
-        });
-    } else {
-        this.redraw();
-    }
-};
-
-IriSP.Widgets.Tagcloud.prototype.redraw = function(_from, _to) {
-    var _urlRegExp = /https?:\/\/[0-9a-zA-Z\.%\/-_]+/g,
-        _words = {},
-        _this = this,
-        _annotations = this.getWidgetAnnotations();
-    
-    if(!this.include_titles && !this.include_descriptions){
-    	var _regexpword = /[^\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»\/]{3,}/g;
-    }
-    else{
-    	var _regexpword = /[^\s\.&;,'"!\?\d\(\)\+\[\]\\\…\-«»:\/]{3,}/g;
-    }
-        
-    if (typeof _from !== "undefined" && typeof _to !== "undefined") {
-        _annotations = _annotations.filter(function(_annotation) {
-            return _annotation.begin >= _from && _annotation.end <= _to;
-        });
-    }
-    
-    if(this.remove_zero_duration){
-    	_annotations = _annotations.filter(function(_annotation) {
-	        return _annotation.getDuration()>0;
-	    });
-    }
-    
-    _annotations.forEach(function(_annotation) {
-       var _txt =
-            (_this.include_titles ? _annotation.title : '')
-            + ' '
-            + (_this.include_descriptions ? _annotation.description : '')
-            + ' '
-            + (_this.include_tag_texts ? _annotation.getTagTexts() : '');
-       IriSP._(_txt.toLowerCase().replace(_urlRegExp, '').match(_regexpword)).each(function(_word) {
-    	   _word = _word.trim();
-           if (IriSP._(_this.stopwords).indexOf(_word) == -1 && (!_this.exclude_pattern || !_this.exclude_pattern.test(_word))) {
-               _words[_word] = 1 + (_words[_word] || 0);
-           }
-       });
-    });
-    _words = IriSP._(_words)
-        .chain()
-        .map(function(_v, _k) {
-            return {
-                "word" : _k,
-                "count" : _v
-            };
-        })
-        .filter(function(_v) {
-            return _v.count > _this.min_count;
-        })
-        .sortBy(function(_v) {
-            return - _v.count;
-        })
-        .first(this.tag_count)
-        .value();
-    if (_words.length) {
-        var _max = _words[0].count,
-            _min = Math.min(_words[_words.length - 1].count, _max - 1),
-            _scale = (this.max_font_size - this.min_font_size) / Math.sqrt(_max - _min);
-        IriSP._(_words).each(function(_word) {
-                _word.size = Math.floor( _this.min_font_size + _scale * Math.sqrt(_word.count - _min) );
-            });
-    }
-    this.$.html(Mustache.to_html(this.template,  {words: _words }));
-    this.$.find(".Ldt-Tagcloud-item").click(function() {
-        var _txt = IriSP.jQuery(this).attr("content");
-        _this.source.getAnnotations().searchByTags(_txt);
-    });
-    this.source.getAnnotations().on("search", this.functionWrapper("onSearch"));
-    this.source.getAnnotations().on("search-cleared", this.functionWrapper("onSearch"));
-};
-
-IriSP.Widgets.Tagcloud.prototype.onSearch = function(searchString) {
-    searchString = typeof searchString !== "undefined" ? searchString : '';
-    if (searchString) {
-        var _rgxp = IriSP.Model.regexpFromTextOrArray(searchString);
-    }
-    this.$.find(".Ldt-Tagcloud-item").each(function() {
-        var _el = IriSP.jQuery(this),
-            _txt = _el.attr("content");
-        if (searchString) {
-            _el.html(_txt.replace(_rgxp, '<span class="Ldt-Tagcloud-active">$1</span>'));
-        } else {
-            _el.html(_txt);
-        }
-    });
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Title.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-IriSP.Widgets.Title = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Title.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Title.prototype.defaults = {
-    media_title: false
-};
-
-IriSP.Widgets.Title.prototype.template =
-    '<div class="Ldt-TitleWidget"><h2>{{#media_title}}{{media.title}}{{/media_title}}{{^media_title}}{{source.title}}{{/media_title}}</h2></div>';
-
-
-IriSP.Widgets.Title.prototype.draw = function() {
-    this.renderTemplate();
-};
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Tooltip.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-.Ldt-Tooltip {
-    position: absolute;
-    height: 0; width: 0;
-    z-index: 100000;
-}
-
-.Ldt-Tooltip-Main {
-    position: absolute; bottom: 0; left: -96px;
-}
-
-.Ldt-Tooltip-Corner-NW,
-.Ldt-Tooltip-Corner-NE,
-.Ldt-Tooltip-Corner-SW,
-.Ldt-Tooltip-Corner-SE {
-    position: absolute; width: 6px; height: 6px; background: url(img/tooltip-corners.png);
-}
-
-.Ldt-Tooltip-Corner-NW,
-.Ldt-Tooltip-Corner-SW {
-    left: 0;
-}
-
-.Ldt-Tooltip-Corner-NE,
-.Ldt-Tooltip-Corner-SE {
-    right: 0;
-}
-
-.Ldt-Tooltip-Corner-NW,
-.Ldt-Tooltip-Corner-NE {
-    top: 0;
-}
-
-.Ldt-Tooltip-Corner-SW,
-.Ldt-Tooltip-Corner-SE {
-    bottom: 10px;
-}
-
-.Ldt-Tooltip-Corner-NW {
-    background-position: top left;
-}
-
-.Ldt-Tooltip-Corner-NE {
-    background-position: top right;
-}
-
-.Ldt-Tooltip-Corner-SW {
-    background-position: bottom left;
-}
-
-.Ldt-Tooltip-Corner-SE {
-    background-position: bottom right;
-}
-
-.Ldt-Tooltip-Border-Top,
-.Ldt-Tooltip-Border-SW,
-.Ldt-Tooltip-Border-SE {
-    position: absolute; height: 6px; background: url(img/tooltip-h-borders.png);
-}
-
-.Ldt-Tooltip-Border-Top {
-    left: 6px; right: 6px;
-}
-
-.Ldt-Tooltip-Border-SW,
-.Ldt-Tooltip-Border-SE {
-    bottom: 10px; background-position: bottom;
-}
-
-.Ldt-Tooltip-Border-SW {
-    left: 6px;
-}
-
-.Ldt-Tooltip-Border-SE {
-    right: 6px;
-}
-
-.Ldt-Tooltip-Tip {
-    position: absolute; height: 16px; width: 22px;
-    background: url(img/tooltip-tip.png);
-    bottom: 0;
-}
-
-.Ldt-Tooltip-Border-Left,
-.Ldt-Tooltip-Border-Right {
-    position: absolute; width: 6px; background: url(img/tooltip-v-borders.png);
-    top: 6px; bottom: 16px;
-}
-
-.Ldt-Tooltip-Border-Left {
-    left: 0; background-position: left;
-}
-
-.Ldt-Tooltip-Border-Right {
-    right: 0; background-position: right;
-}
-
-.Ldt-Tooltip-Inner {
-    min-height: 30px;
-    max-height: 140px;
-    width: 180px;
-    overflow: hidden;
-    margin: 6px 6px 16px;
-    background: url(img/tooltip-gradient.png) bottom;
-}
-
-
-.Ldt-Tooltip-Color {
-    float: left; margin: 8px 2px 2px 8px; width: 10px; height: 10px;
-}
-
-.Ldt-Tooltip-AltColor {
-    float: left; margin: 2px 2px 2px 3px; width: 10px; height: 10px;
-}
-
-.Ldt-Tooltip img {
-    max-width: 140px; max-height: 80px; margin: 2px 20px;
-}
-
-.Ldt-Tooltip p {
-    margin: 6px 8px;
-    font-size: 12px;
-    line-height: 14px;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Tooltip.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/* this widget displays a small tooltip */
-IriSP.Widgets.Tooltip = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-};
-
-IriSP.Widgets.Tooltip.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Tooltip.prototype.defaults = {
-    
-};
-
-IriSP.Widgets.Tooltip.prototype.template =
-    '<div class="Ldt-Tooltip"><div class="Ldt-Tooltip-Main"><div class="Ldt-Tooltip-Corner-NW"></div>'
-    + '<div class="Ldt-Tooltip-Border-Top"></div><div class="Ldt-Tooltip-Corner-NE"></div>'
-    + '<div class="Ldt-Tooltip-Border-Left"></div><div class="Ldt-Tooltip-Border-Right"></div>'
-    + '<div class="Ldt-Tooltip-Corner-SW"></div><div class="Ldt-Tooltip-Border-SW"></div>'
-    + '<div class="Ldt-Tooltip-Tip"></div><div class="Ldt-Tooltip-Border-SE"></div>'
-    + '<div class="Ldt-Tooltip-Corner-SE"></div><div class="Ldt-Tooltip-Inner">'
-    + '<div class="Ldt-Tooltip-Color"></div><p class="Ldt-Tooltip-Text"></p></div></div></div>';
-
-IriSP.Widgets.Tooltip.prototype.draw = function() {
-    _this = this;
-    this.renderTemplate();
-    this.$.parent().css({
-        "position" : "relative"
-    });
-    this.$tooltip = this.$.find(".Ldt-Tooltip");
-    this.$tip = this.$.find(".Ldt-Tooltip-Tip");
-    this.$sw = this.$.find(".Ldt-Tooltip-Border-SW");
-    this.$se = this.$.find(".Ldt-Tooltip-Border-SE");
-    this.__halfWidth = Math.floor(( this.$.find(".Ldt-Tooltip-Main").width() || 192)/2);
-    this.__borderWidth = this.$.find(".Ldt-Tooltip-Border-Left").width();
-    this.__tipDelta = this.__halfWidth - Math.floor(this.$tip.width()/2);
-    this.__maxShift = this.__tipDelta - this.__borderWidth;
-    this.$.mouseover(function() {
-        _this.$tooltip.hide();
-    });
-    this.hide();
-};
-
-IriSP.Widgets.Tooltip.prototype.show = function(x, y, text, color) {
-    
-    if (typeof color !== "undefined") {
-    	// one color or array of colors
-    	if (typeof color === "string") {
-    		this.$.find(".Ldt-Tooltip-Color").html("");
-    		this.$.find(".Ldt-Tooltip-Color").show().css("background-color", color);
-    		this.$.find(".Ldt-Tooltip-Color").show().css("height", "");
-    	}
-    	else{
-    		var d = this.$.find(".Ldt-Tooltip-Color");
-    		d.html("");
-    		d.show();
-    		for(var i=0; i<color.length; i++){
-    			d.append('<div style="float: left; height: 10px; width: 10px; background-color: ' + color[i] + '">')
-    		}
-    		this.$.find(".Ldt-Tooltip-Color").css("height", (color.length * 10) + "px");
-    	}
-    } else {
-        this.$.find(".Ldt-Tooltip-Color").hide();
-    }
-
-    this.$.find(".Ldt-Tooltip-Text").html(text);
-
-    this.$tooltip.show();
-    
-    var shift = 0;
-    
-    if (typeof this.min_x !== "undefined" && (x - this.__halfWidth < this.min_x)) {
-        shift = Math.max(x - this.__halfWidth - this.min_x, - this.__maxShift);
-    }
-    
-    if (typeof this.max_x !== "undefined" && (+x + this.__halfWidth > this.max_x)) {
-        shift = Math.min(+ x + this.__halfWidth - this.max_x, this.__maxShift);
-    }
-    
-    this.$tooltip.css({
-        "left" : (x - shift) + "px",
-        "top" : y + "px"
-    });
-    this.$tip.css({
-        "left": (this.__tipDelta + shift) + "px"
-    });
-    this.$sw.css({
-        "width": (this.__tipDelta + shift - this.__borderWidth) + "px"
-    });
-    this.$se.css({
-        "width": (this.__tipDelta - shift - this.__borderWidth) + "px"
-    });
-};
-
-IriSP.Widgets.Tooltip.prototype.hide = function() {
-    this.$tooltip.hide();
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Trace.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-IriSP.Widgets.Trace = function(player, config) {
-  IriSP.Widgets.Widget.call(this, player, config);
-    
-};
-
-IriSP.Widgets.Trace.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Trace.prototype.defaults = {
-    js_console : false,
-    url: "http://traces.advene.org:5000/",
-    requestmode: 'GET',
-    syncmode: "sync",
-    default_subject: "IRI",
-    tracer: null,
-    extend: false
-};
-
-IriSP.Widgets.Trace.prototype.draw = function() {
-  if (typeof window.tracemanager === "undefined") {
-      console.log("Tracemanager not found");
-      return;
-  }
-  var _this = this,
-    _medialisteners = {
-        "play" : 0,
-        "pause" : 0,
-        "volumechange" : 0,
-        "seeked" : 0,
-        "play" : 0,
-        "pause" : 0,
-        "timeupdate" : 10000
-    },
-    _annlisteners = {
-        search: 0,
-        "search-cleared": 0
-    };
-    IriSP._(_medialisteners).each(function(_ms, _listener) {
-        var _f = function(_arg) {
-            _this.eventHandler(_listener, _arg);
-        };
-        if (_ms) {
-            _f = IriSP._.throttle(_f, _ms);
-        }
-        _this.media.on(_listener, _f);
-    });
-    var _annotations = this.source.getAnnotations();
-    IriSP._(_annlisteners).each(function(_ms, _listener) {
-        var _f = function(_arg) {
-            _this.eventHandler(_listener, _arg);
-        };
-        if (_ms) {
-            _f = IriSP._.throttle(_f, _ms);
-        }
-        _annotations.on(_listener, _f);
-    });
-    
-    if (!this.tracer) {
-    
-        this.tracer = window.tracemanager.init_trace("test", {
-            url: this.url,
-            requestmode: this.requestmode,
-            syncmode: this.syncmode,
-            default_subject: this.default_subject
-        });
-    
-    }
-    
-    
-    
-    this.tracer.trace("TraceWidgetInit", {});
-
-    // Configure annotation creation/update/delete/publish tracing
-    _this.player.on("Annotation.create", function (a) {
-        _this.tracer.trace("AnnotationCreated", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
-    });
-    _this.player.on("Annotation.delete", function (aid) {
-        _this.tracer.trace("AnnotationDeleted", { id: aid });
-    });
-    _this.player.on("Annotation.update", function (a) {
-        _this.tracer.trace("AnnotationUpdated", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
-    });
-    _this.player.on("Annotation.publish", function (a) {
-        _this.tracer.trace("AnnotationPublished", { id: a.id, annotation_begin: a.begin.milliseconds, annotation_end: a.end.milliseconds, annotation_media: a.media.id, content_length: a.title.length, content_words: a.title.split(/\s+/).length });
-    });
-
-    _this.player.trigger("trace-ready");
-    this.mouseLocation = '';
-    IriSP.jQuery(".Ldt-Widget").on("mousedown mouseenter mouseleave", ".Ldt-TraceMe", function(_e) {
-        var _target = IriSP.jQuery(this);
-        
-        var _widget = _target.attr("widget-type") || _target.parents(".Ldt-Widget").attr("widget-type"),
-            _data = {
-                "type": _e.type,
-                "widget": _widget
-            },
-            _targetEl = _target[0],
-            _class = _targetEl.className,
-            _name = _targetEl.localName,
-            _id = _targetEl.id,
-            _value = _target.val(),
-            _traceInfo = _target.attr("trace-info");
-        _data.target = _name + (_id && _id.length ? '#' + IriSP.jqEscape(_id) : '') + (_class && _class.length ? ('.' + IriSP.jqEscape(_class).replace(/\s/g,'.')).replace(/\.Ldt-(Widget|TraceMe)/g,'') : '');
-        if (typeof _traceInfo == "string" && _traceInfo) {
-            _data.traceInfo = _traceInfo;
-        }
-        if (typeof _value == "string" && _value.length) {
-            _data.value = _value;
-        }
-        _this.eventHandler('UIEvent', _data);
-    });
-};
-
-IriSP.Widgets.Trace.prototype.eventHandler = function(_listener, _arg) {
-    var _traceName = 'Mdp_';
-    if (typeof _arg == "string" || typeof _arg == "number") {
-        _arg = { "value" : _arg };
-    }
-    if (typeof _arg == "undefined") {
-        _arg = {};
-    }
-    switch(_listener) {
-        case 'UIEvent':
-            _traceName += _arg.widget + '_' + _arg.type;
-            delete _arg.widget;
-            delete _arg.type;
-        break;
-        case 'play':
-        case 'pause':
-            _arg.milliseconds = this.media.getCurrentTime().milliseconds;
-        case 'timeupdate':
-        case 'seeked':
-        case 'volumechange':
-            _traceName += 'media_' + _listener;
-        break;
-        default:
-            _traceName += _listener.replace('.','_');
-    }
-    if (typeof this.extend === "object" && this.extend) {
-        IriSP._(_arg).extend(this.extend);
-    }
-    this.tracer.trace(_traceName, _arg);
-    if (this.js_console && typeof window.console !== "undefined" && typeof console.log !== "undefined") {
-        console.log("tracer.trace('" + _traceName + "', " + JSON.stringify(_arg) + ");");
-    }
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Transcript.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-.Ldt-Transcript-Annotation {
-    margin-right: .5em;
-}
-.Ldt-Transcript-Annotation:hover {
-    background-color: #bbb;
-}
-.Ldt-Transcript-Annotation.active {
-    background-color: #ddd;
-}
--- a/src/ldt/ldt/static/ldt/metadataplayer/Transcript.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/* This widget displays annotations as a transcript */
-
-IriSP.Widgets.Transcript = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-}
-
-IriSP.Widgets.Transcript.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Transcript.prototype.defaults = {
-    annotation_type: "Caption",
-    use_vtt_track: false
-}
-
-IriSP.Widgets.Transcript.prototype.template = '<div class="Ldt-TranscriptWidget"></div>';
-
-IriSP.Widgets.Transcript.prototype.annotationTemplate = '<span data-begin="{{ begin }}" data-end="{{ end }}" data-id="{{ id }}" class="Ldt-Transcript-Annotation">{{ content }}</span>  ';
-
-IriSP.Widgets.Transcript.prototype.draw = function() {
-    var _annotations = this.getWidgetAnnotations();
-    var _this = this;
-    var content;
-
-    _this.renderTemplate();
-    content = _this.$.find('.Ldt-TranscriptWidget');
-
-    if (_this.use_vtt_track) {
-        // Use webvtt track. It will only work with native video player.
-        var widgets =  _this.player.widgets.filter(function (w) { return w.type == "HtmlPlayer"; });
-        if (widgets) {
-            var v = widgets[0].$.find("video")[0];
-            // FIXME: allow to specify the used track
-            v.addEventListener("loadedmetadata", function () {
-                var track = v.textTracks[0];
-                var cues = track.cues;
-                var i = 1;
-                Array.prototype.forEach.apply(cues, [ function(_c) {
-                    _c.id = "cue" + i;
-                    var _html = Mustache.to_html(_this.annotationTemplate, {
-                        id : _c.id,
-                        content : _c.text,
-                        begin : 1000 * _c.startTime,
-                        end : 1000 * _c.endTime
-                    });
-                    i += 1;
-                    var _el = IriSP.jQuery(_html);
-                    content.append(_el);
-                } ]);
-                track.addEventListener("cuechange", function () {
-                    var acues = track.activeCues;
-                    if (acues.length > 0) {
-                        // Update attributes for active cues
-                        _this.$.find(".Ldt-Transcript-Annotation.active").removeClass("active");
-                        Array.prototype.forEach.apply(acues, [ function(_c) {
-                            _this.$.find("#" + _c.id).addClass("active");
-                        } ]);
-                    }
-                }, false);
-                content.on("click", ".Ldt-Transcript-Annotation", function () {
-                    _this.media.setCurrentTime(this.dataset.begin);
-                });
-            });
-        } else {
-            console.log("cannot find a video object");
-        }
-    } else {
-        // Populate with annotation data
-        _annotations.forEach(function(_a) {
-            var _data = {
-                id : _a.id,
-                content : IriSP.textFieldHtml(_a.title),
-                begin : _a.begin.toString(),
-                end : _a.end.toString()
-            };
-            var _html = Mustache.to_html(_this.annotationTemplate, _data);
-            var _el = IriSP.jQuery(_html);
-            content.append(_el);
-        });
-    };
-};
--- a/src/ldt/ldt/static/ldt/metadataplayer/Tweet.css	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-.Ldt-Tweet-Widget {
-    border: 1px solid #b7b7b7;
-    padding: 1px;
-    margin: 0;
-}
-
-.Ldt-Tweet-Widget a {
-    color: #0068C4;
-}
-
-.Ldt-Tweet-Widget a:hover {
-    color: #003366;
-}
-
-.Ldt-Tweet-Inner {
-    background: url(img/pinstripe.png);
-    padding: 5px;
-    margin: 0;
-    min-height: 50px;
-}
-
-.Ldt-Tweet-PinClose-Buttons {
-    float: right;
-}
-
-.Ldt-Tweet-PinClose-Buttons a {
-    display: inline-block; width: 17px; height: 17px; margin: 2px;
-    background: url(img/widget-control.png);
-}
-
-a.Ldt-Tweet-Pin {
-    background-position: 0 -17px;
-}
-
-a.Ldt-Tweet-Pin:hover, a.Ldt-Tweet-Pin.active {
-    background-position: -17px -17px;
-}
-
-a.Ldt-Tweet-Pin.active:hover {
-    background-position: 0 -17px;
-}
-
-a.Ldt-Tweet-Close:hover {
-    background-position: -17px 0;
-}
-
-.Ldt-Tweet-AvatarContainer {
-    float: left; width: 48px; height: 48px; margin: 2px 4px 2px 0;
-}
-
-.Ldt-Tweet-Avatar {
-    border: none; width: 48px; height: 48px;
-}
-
-.Ldt-Tweet-Inner h3 {
-    margin: 2px 0 5px 52px;
-    font-size: 14px;
-}
-
-a.Ldt-Tweet-ScreenName {
-    text-decoration: none;
-}
-
-a.Ldt-Tweet-ScreenName:hover {
-    text-decoration: underline;
-}
-
-p.Ldt-Tweet-Contents {
-    margin: 5px 0 5px 52px;
-    font-size: 12px;
-}
-
-.Ldt-Tweet-Bottom {
-    margin: 5px 0 0;
-    font-size: 12px;
-    text-align: right;
-}
-
-.Ldt-Tweet-Time {
-    display: inline-block;
-}
-
-.Ldt-Tweet-Bottom a {
-    display: inline-block;
-    margin-left: 12px;
-    text-decoration: none;
-}
-
-.Ldt-Tweet-Bottom a:hover {
-    text-decoration: underline;
-}
-
-.Ldt-Tweet-Icon {
-    display: inline-block; width: 16px; height: 16px;
-    margin: 0 2px -2px;
-    background: url(img/twitter_sprites.png);
-}
-
-.Ldt-Tweet-Retweet .Ldt-Tweet-Icon {
-    background-position: -80px 0;
-}
-
-.Ldt-Tweet-Retweet:hover .Ldt-Tweet-Icon {
-    background-position: -96px 0;
-}
-
-.Ldt-Tweet-Reply:hover .Ldt-Tweet-Icon {
-    background-position: -16px 0;
-}
\ No newline at end of file
--- a/src/ldt/ldt/static/ldt/metadataplayer/Tweet.js	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-IriSP.Widgets.Tweet = function(player, config) {
-    IriSP.Widgets.Widget.call(this, player, config);
-    this.lastAnnotation = false;
-};
-
-IriSP.Widgets.Tweet.prototype = new IriSP.Widgets.Widget();
-
-IriSP.Widgets.Tweet.prototype.defaults = {
-    hide_timeout: 10000,
-    polemics : [
-        {
-            "keywords" : [ "++" ],
-            "color" : "#30d765"
-        },
-        {
-            "keywords" : [ "--" ],
-            "color" : "#f51123"
-        },
-        {
-            "keywords" : [ "==" ],
-            "color" : "#f1e24a"  
-        },
-        {
-            "keywords" : [ "??" ],
-            "color" : "#05aae6"
-        }
-    ],
-    annotation_type: "tweet",
-    pin_at_start: false
-};
-
-IriSP.Widgets.Tweet.prototype.messages = {
-    "fr": {
-        retweet: "Retweeter",
-        reply: "Répondre",
-        keep_visible: "Empêcher la fermeture automatique",
-        dont_keep_visible: "Permettre la fermeture automatique",
-        close_widget: "Fermer l'affichage du tweet",
-        original_time: "Heure d'envoi\u00a0: ",
-        video_time: "Temps de la vidéo\u00a0: ",
-        show_original: "Voir l'original"
-    },
-    "en": {
-        retweet: "Retweet",
-        reply: "Reply",
-        keep_visible: "Keep visible",
-        dont_keep_visible: "Don't keep visible",
-        close_widget: "Close tweet display",
-        original_time: "Tweet sent at: ",
-        video_time: "Video time: ",
-        show_original: "Show original"
-    }
-};
-
-IriSP.Widgets.Tweet.prototype.template =
-    '<div class="Ldt-Tweet-Widget"><div class="Ldt-Tweet-Inner"><div class="Ldt-Tweet-PinClose-Buttons">'
-    + '<a href="#" class="Ldt-Tweet-Pin Ldt-TraceMe{{#pin_at_start}} active" title="{{l10n.dont_keep_visible}}{{/pin_at_start}}{{^pin_at_start}}" title="{{l10n.keep_visible}}{{/pin_at_start}}"></a>'
-    + '<a href="#" class="Ldt-Tweet-Close Ldt-TraceMe" title="{{l10n.close_widget}}"></a>'
-    + '</div><div class="Ldt-Tweet-AvatarContainer"><a href="#" class="Ldt-Tweet-ProfileLink" target="_blank">'
-    + '<img src="" class="Ldt-Tweet-Avatar"/></a></div><h3><a href="#" class="Ldt-Tweet-ProfileLink Ldt-Tweet-ScreenName" target="_blank">'
-    + '</a> (<span class="Ldt-Tweet-FullName"></span>)</h3><p class="Ldt-Tweet-Contents"></p><div class="Ldt-Tweet-Bottom">'
-    + '<span class="Ldt-Tweet-Time"></span>'
-    + '<a class="Ldt-Tweet-Original" href="" target="_blank">{{l10n.show_original}}</a>'
-    + '<a href="" target="_blank" class="Ldt-Tweet-Retweet"><div class="Ldt-Tweet-Icon"></div>{{l10n.retweet}}</a>'
-    + '<a href="" target="_blank" class="Ldt-Tweet-Reply"><div class="Ldt-Tweet-Icon"></div>{{l10n.reply}}</a></div></div></div>';
-    
-
-IriSP.Widgets.Tweet.prototype.draw = function() {
-    this.renderTemplate();
-    this.pinned = this.pin_at_start;
-    var _this = this;
-    this.$.find(".Ldt-Tweet-Pin").click(function() {
-        _this.pinned = !_this.pinned;
-        var _el = IriSP.jQuery(this);
-        if (_this.pinned) {
-            _el.addClass("active").attr("title",_this.l10n.dont_keep_visible);
-            _this.cancelTimeout();
-        } else {
-            _el.removeClass("active").attr("title",_this.l10n.keep_visible);
-            _this.hideTimeout();
-        }
-    });
-    this.$.find(".Ldt-Tweet-Close").click(function() {
-        _this.hide();
-    });
-    this.$.hide();
-    this.getWidgetAnnotations().forEach(function(_annotation) {
-        _annotation.on("click", function() {
-            _this.show(_annotation);
-        });
-    });
-};
-
-IriSP.Widgets.Tweet.prototype.show = function(_tweet) {
-    if (typeof _tweet !== "undefined" && typeof _tweet.source !== "undefined") {
-        var extend = [
-            [
-                /#(\w+)/gm,
-                function(matches) {
-                    return '<a href="http://twitter.com/search?q=%23' + matches[1] + '" target="_blank">';
-                },
-                '</a>'
-            ]
-        ];
-        var _urls = IriSP._(_tweet.source.entities.urls).sortBy(function(_entity) {
-            return _entity.indices[0];
-        });
-        
-        var _currentPos = 0,
-            _txt = '';
-        IriSP._(_urls).each(function(_url) {
-            if (_url.indices[0] >= _currentPos) {
-                _txt += _tweet.source.text.substring(_currentPos, _url.indices[0]);
-                _txt += (typeof _url.expanded_url !== "undefined" && _url.expanded_url !== null ? _url.expanded_url : _url.url);
-                _currentPos = _url.indices[1];
-            }
-        });
-        _txt += _tweet.source.text.substring(_currentPos);
-        
-        for (var _i = 0; _i < this.polemics.length; _i++) {
-            var rx = IriSP.Model.regexpFromTextOrArray(this.polemics[_i].keywords);
-            extend.push([
-                rx,
-                '<span style="background: ' + this.polemics[_i].color + '">',
-                '</span>'
-            ]);
-        }
-        var rx = (_tweet.found ? (_this.source.getAnnotations().regexp || false) : false),
-            profile_url = _tweet.source.user ? _tweet.source.user.profile_image_url : _tweet.source.profile_image_url,
-            screen_name = _tweet.source.user ? _tweet.source.user.screen_name :_tweet.source.from_user,
-            user_name = _tweet.source.user ? _tweet.source.user.name :_tweet.source.from_user_name;
-        this.$.find(".Ldt-Tweet-Avatar").attr("src", profile_url);
-        this.$.find(".Ldt-Tweet-ScreenName").html('@' + screen_name);
-        this.$.find(".Ldt-Tweet-ProfileLink").attr("href", "https://twitter.com/" + screen_name);
-        this.$.find(".Ldt-Tweet-FullName").html(user_name);
-        this.$.find(".Ldt-Tweet-Contents").html(IriSP.textFieldHtml(_txt, rx, extend));
-        this.$.find(".Ldt-Tweet-Time").html(this.l10n.original_time + new Date(_tweet.source.created_at).toLocaleTimeString() + " / " + this.l10n.video_time + _tweet.begin.toString());
-        this.$.find(".Ldt-Tweet-Retweet").attr("href", "https://twitter.com/intent/retweet?tweet_id=" + _tweet.source.id_str);
-        this.$.find(".Ldt-Tweet-Reply").attr("href", "https://twitter.com/intent/tweet?in_reply_to=" + _tweet.source.id_str);
-        this.$.find(".Ldt-Tweet-Original").attr("href", "https://twitter.com/" + screen_name + "/status/" + _tweet.source.id_str);
-        this.player.trigger("Annotation.minimize");
-        this.$.slideDown();
-        this.cancelTimeout();
-        if (!this.pinned) {
-            this.hideTimeout();
-        }
-    } else {
-        this.hide();
-    }
-};
-
-IriSP.Widgets.Tweet.prototype.hide = function() {
-    this.player.trigger("Annotation.maximize");
-    this.$.slideUp();
-    this.cancelTimeout();
-};
-
-IriSP.Widgets.Tweet.prototype.cancelTimeout = function() {
-    if (typeof this.hide_timer !== "undefined") {
-        window.clearTimeout(this.hide_timer);
-        this.hide_timer = undefined;
-    }  
-};
-
-IriSP.Widgets.Tweet.prototype.hideTimeout = function() {
-    this.cancelTimeout();
-    this.hide_timer = window.setTimeout(this.functionWrapper("hide"), this.hide_timeout);
-};
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/cancel_annotation.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/delete.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/edit.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/external.png has changed
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/fullscreen.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="22"
-   height="22"
-   viewBox="0 0 22.000001 22.000001"
-   id="svg4208"
-   version="1.1"
-   inkscape:version="0.48.4 r9939"
-   sodipodi:docname="FS.svg">
-  <defs
-     id="defs4210" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="20.48"
-     inkscape:cx="10.91933"
-     inkscape:cy="15.686744"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1680"
-     inkscape:window-height="1028"
-     inkscape:window-x="75"
-     inkscape:window-y="24"
-     inkscape:window-maximized="0" />
-  <metadata
-     id="metadata4213">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Calque 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(0,-1030.3622)">
-    <path
-       style="fill:#000000"
-       d="m 0.5522696,1051.6037 c -0.41889785,-0.4329 -0.41461065,-8.2715 0.00441,-8.2715 0.16357544,0 0.8770369,0.5915 1.5854719,1.3145 l 1.2880668,1.3142 1.0474543,-1.062 c 1.2537252,-1.2715 2.0021739,-1.362 2.9358328,-0.3551 0.9287537,1.0018 0.8386288,1.7291 -0.3721746,3.0037 l -1.0280047,1.0824 1.2720657,1.3309 c 0.6996343,0.732 1.2720656,1.4692 1.2720656,1.6382 0,0.433 -7.58640438,0.4375 -8.00530223,0.01 z m 12.8865874,-0.01 c 0,-0.169 0.572426,-0.9062 1.272067,-1.6382 l 1.27206,-1.3308 -1.027999,-1.0823 c -1.210804,-1.2748 -1.300935,-2.0022 -0.372175,-3.0039 0.933653,-1.0069 1.682103,-0.9164 2.935828,0.3551 l 1.047458,1.062 1.288068,-1.3143 c 0.708435,-0.7229 1.421896,-1.3144 1.585473,-1.3144 0.419128,0 0.423427,7.8386 0.0044,8.2715 -0.418887,0.4328 -8.005291,0.4283 -8.005291,-0.01 z M 0.25939424,1035.3076 c 0,-2.7627 0.0897934,-4.0772 0.29287536,-4.287 0.41889785,-0.4328 8.0053023,-0.4284 8.0053023,0.01 0,0.1691 -0.5724257,0.9063 -1.2720657,1.6383 l -1.2720656,1.3309 1.0280047,1.0823 c 1.2304351,1.2954 1.3179943,2.0686 0.3434664,3.0334 -0.9694075,0.9597 -1.6734008,0.8665 -2.907119,-0.3846 l -1.0474598,-1.0621 -1.2880668,1.3143 c -0.708435,0.723 -1.42189663,1.3143 -1.5854665,1.3143 -0.2212842,0 -0.29740536,-1.0197 -0.29740536,-3.9844 z m 19.58692376,2.6673 -1.274753,-1.3171 -1.050191,1.0649 c -1.236549,1.254 -1.939853,1.3476 -2.909856,0.3874 -0.974534,-0.9647 -0.886969,-1.738 0.343467,-3.0335 l 1.027999,-1.0821 -1.27206,-1.3311 c -0.699641,-0.732 -1.272067,-1.4691 -1.272067,-1.6382 0,-0.433 7.586405,-0.4374 8.005303,-0.01 0.427969,0.4422 0.413673,8.2714 -0.01511,8.2714 -0.169391,0 -0.881623,-0.5926 -1.582735,-1.3171 z"
-       id="path3020"
-       inkscape:connector-curvature="0" />
-  </g>
-</svg>
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/hand_left.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/hand_right.png has changed
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/left_arrow.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" id="arrow">
-  <path style="fill:none;stroke:#fff;stroke-width:6;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
-      d="M31,1 l-30,15 l30,15">
-  </path>
-  <path style="fill:none;stroke:#000;stroke-width:4;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
-      d="M31,1 l-30,15 l30,15">
-  </path>
-</svg>
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/loader.gif has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/min_right_toggle.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/min_valid_sprites.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/min_wrong_toggle.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/pinstripe-grey.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/pinstripe-purple.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/pinstripe.png has changed
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/pip_toggle.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="5.0797176mm"
-   height="5.0799999mm"
-   viewBox="0 0 17.998999 18"
-   id="svg19931"
-   version="1.1"
-   inkscape:version="0.91 r13725"
-   sodipodi:docname="pip_toggle.svg">
-  <defs
-     id="defs19933" />
-  <g
-     inkscape:label="Layer 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(-245.28621,-280.50506)">
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="23.586,59.714 22.193,57.364 20.805,59.714 "
-       id="polygon13969" />
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="22.971,59.364 21.417,59.364 22.496,57.544 22.193,57.364 21.894,57.544 22.193,57.364 21.894,57.187 20.19,60.063 24.199,60.063 22.193,56.679 21.894,57.187 22.193,57.364 21.894,57.544 "
-       id="polygon13971" />
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="20.805,66.874 22.193,69.224 23.586,66.874 "
-       id="polygon13973" />
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="21.417,67.224 22.971,67.224 21.894,69.044 22.193,69.224 22.496,69.044 22.193,69.224 22.496,69.399 24.199,66.522 20.19,66.522 22.193,69.909 22.496,69.399 22.193,69.224 22.496,69.044 "
-       id="polygon13975" />
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="25.818,64.685 28.168,63.294 25.818,61.903 "
-       id="polygon13977" />
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="26.168,64.071 26.168,62.517 27.988,63.595 28.168,63.294 27.988,62.993 28.168,63.294 28.347,62.993 25.468,61.29 25.468,65.298 28.855,63.294 28.347,62.993 28.168,63.294 27.988,62.993 "
-       id="polygon13979" />
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="18.659,61.903 16.31,63.294 18.659,64.685 "
-       id="polygon13981" />
-    <polygon
-       transform="translate(232.09221,226.21106)"
-       style="fill:#ffffff"
-       points="18.309,62.517 18.309,64.071 16.488,62.993 16.31,63.294 16.488,63.595 16.31,63.294 16.132,63.595 19.009,65.298 19.009,61.29 15.624,63.294 16.132,63.595 16.31,63.294 16.488,63.595 "
-       id="polygon13983" />
-    <path
-       inkscape:connector-curvature="0"
-       style="fill:#ffffff"
-       d="m 254.28521,298.00506 0,0.5 c 4.965,-0.002 9,-4.035 9,-9 0,-4.965 -4.035,-9 -9,-9 -4.963,0 -8.998,4.035 -8.999,9 10e-4,4.965 4.036,8.998 8.999,9 l 0,-0.5 0,-0.5 c -2.206,0 -4.202,-0.896 -5.653,-2.346 -1.45,-1.451 -2.346,-3.447 -2.346,-5.654 0,-2.207 0.896,-4.203 2.346,-5.654 1.451,-1.449 3.448,-2.346 5.653,-2.346 2.207,0 4.205,0.896 5.654,2.346 1.45,1.451 2.347,3.447 2.347,5.654 0,2.207 -0.896,4.203 -2.347,5.654 -1.449,1.449 -3.447,2.346 -5.654,2.346 l 0,0.5 0,0 z"
-       id="path13985" />
-  </g>
-</svg>
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/player-sprites.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/player_gradient.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/polemic.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/profile_arrow.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/publish_annotation.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/published_annotation.png has changed
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/quiz_add_question.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="26"
-   height="25"
-   viewBox="0 0 26.000001 25.000001"
-   id="svg4208"
-   version="1.1"
-   inkscape:version="0.48.4 r9939"
-   sodipodi:docname="buzz.svg">
-  <defs
-     id="defs4210" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="10.24"
-     inkscape:cx="28.406106"
-     inkscape:cy="5.347153"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1680"
-     inkscape:window-height="1028"
-     inkscape:window-x="75"
-     inkscape:window-y="24"
-     inkscape:window-maximized="0" />
-  <metadata
-     id="metadata4213">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Calque 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(0,-1027.3622)">
-    <g
-       id="g3115"
-       transform="matrix(0.13764231,0,0,0.14585411,-0.10960999,900.2163)">
-      <path
-         inkscape:connector-curvature="0"
-         id="path4152"
-         d="m 88.762577,966.09408 a 64.442296,17.911566 52.208592 0 0 -53.76267,-40.24111 64.442296,17.911566 52.208592 0 0 25.08146,61.71245 64.442296,17.911566 52.208592 0 0 53.763283,40.24068 64.442296,17.911566 52.208592 0 0 -25.082073,-61.71202 z"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:2.23528218;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="517.45343"
-         x="875.27667"
-         height="20.941669"
-         width="15.681897"
-         id="rect4311"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="519.57574"
-         x="762.16467"
-         height="19.048025"
-         width="13.667582"
-         id="rect4309"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="518.66687"
-         x="889.6543"
-         height="0.94452941"
-         width="1.1967648"
-         id="rect4313"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-3"
-         d="m 113.50338,1028.0563 9.89486,-7.4107 8.37707,-6.2729"
-         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <ellipse
-         sodipodi:ry="18.476786"
-         sodipodi:rx="64.438011"
-         sodipodi:cy="516.2522"
-         sodipodi:cx="826.67413"
-         d="m 891.11214,516.2522 c 0,10.20444 -28.84988,18.47678 -64.43801,18.47678 -35.58813,0 -64.43801,-8.27234 -64.43801,-18.47678 0,-10.20445 28.84988,-18.47679 64.43801,-18.47679 35.58813,0 64.43801,8.27234 64.43801,18.47679 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="18.476786"
-         rx="64.438011"
-         cy="516.2522"
-         cx="826.67413"
-         id="path4150"
-         style="fill:#666666;stroke:#000000;stroke-width:2.23541927;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156"
-         d="m 35.104607,925.77201 9.7327,-7.28939 8.23979,-6.17012"
-         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <ellipse
-         sodipodi:ry="8.1607332"
-         sodipodi:rx="36.851326"
-         sodipodi:cy="517.20477"
-         sodipodi:cx="827.2381"
-         d="m 864.08942,517.20477 c 0,4.50705 -16.4989,8.16074 -36.85132,8.16074 -20.35243,0 -36.85133,-3.65369 -36.85133,-8.16074 0,-4.50705 16.4989,-8.16073 36.85133,-8.16073 20.35242,0 36.85132,3.65368 36.85132,8.16073 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="8.1607332"
-         rx="36.851326"
-         cy="517.20477"
-         cx="827.2381"
-         id="path4317"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:1.30889452;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="907.08124"
-         x="233.80257"
-         height="3.9420969"
-         width="24.027122"
-         id="rect5190"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="906.15369"
-         x="235.03923"
-         height="4.2899289"
-         width="24.027122"
-         id="rect5190-9"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="905.3421"
-         x="236.39369"
-         height="4.2899289"
-         width="24.027122"
-         id="rect5190-9-1"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="904.47247"
-         x="237.51262"
-         height="4.0000691"
-         width="2.1789296"
-         id="rect5190-9-4"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="903.92175"
-         x="237.95427"
-         height="4.0000691"
-         width="2.1789296"
-         id="rect5190-9-4-4"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="908.00873"
-         x="233.77309"
-         height="2.5362754"
-         width="18.712299"
-         id="rect5190-9-0"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-4"
-         d="m 69.344687,935.29586 10.13887,-6.16215 8.58357,-5.21581"
-         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="954.03864"
-         x="285.80243"
-         height="3.3044052"
-         width="2.9445002"
-         id="rect5279"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="948.15442"
-         x="283.03458"
-         height="7.8841949"
-         width="6.0067806"
-         id="rect5279-2"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="951.83563"
-         x="286.62689"
-         height="2.3188813"
-         width="4.7700906"
-         id="rect5279-2-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="953.51678"
-         x="285.83188"
-         height="1.971049"
-         width="4.4167504"
-         id="rect5279-2-3-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-4-5"
-         d="m 114.62982,993.43082 9.47784,-7.0986 8.02405,-6.00861"
-         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="909.45807"
-         x="241.51714"
-         height="4.2899289"
-         width="24.027122"
-         id="rect5190-9-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <ellipse
-         sodipodi:ry="11.1082"
-         sodipodi:rx="36.846481"
-         sodipodi:cy="495.24258"
-         sodipodi:cx="824.92773"
-         d="m 861.77422,495.24258 c 0,6.13489 -16.49674,11.1082 -36.84649,11.1082 -20.34975,0 -36.84648,-4.97331 -36.84648,-11.1082 0,-6.13489 16.49673,-11.1082 36.84648,-11.1082 20.34975,0 36.84649,4.97331 36.84649,11.1082 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="11.1082"
-         rx="36.846481"
-         cy="495.24258"
-         cx="824.92773"
-         id="path4351"
-         style="fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.924097;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <path
-         id="path4564"
-         d="m 76.182057,895.08255 c 28.049053,-21.23075 69.407013,-14.64926 92.435693,14.54291 23.02867,29.19218 19.04627,70.22994 -9.00275,91.46064 -27.96073,21.2524 -111.393663,-84.75115 -83.432943,-106.00355 z"
-         stroke-miterlimit="10"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:4.48099518;stroke-miterlimit:10;stroke-dasharray:none;display:inline"
-         inkscape:connector-curvature="0" />
-      <g
-         id="flowRoot4822"
-         style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:sans-serif"
-         transform="translate(2.4859224,821.53368)">
-        <path
-           inkscape:connector-curvature="0"
-           id="path6077"
-           style="font-size:90.00000763px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Franklin Gothic;-inkscape-font-specification:Franklin Gothic"
-           d="m 123.24902,138.67423 8.9209,0 0,11.16211 -8.9209,0 0,-11.16211 z m 8.65723,-6.45996 -8.39355,0 0,-6.76758 q 0,-4.43848 1.23047,-7.29492 1.23046,-2.85645 5.18554,-6.63575 l 3.95508,-3.91113 q 2.50488,-2.3291 3.60352,-4.39453 1.14258,-2.06543 1.14258,-4.218753 0,-3.911133 -2.9004,-6.328125 -2.85644,-2.416992 -7.60254,-2.416992 -3.47167,0 -7.42675,1.538086 -3.91114,1.538086 -8.17383,4.482422 l 0,-8.26172 q 4.13086,-2.504883 8.34961,-3.735351 4.26269,-1.230469 8.78906,-1.230469 8.08594,0 12.96387,4.262695 4.92187,4.262696 4.92187,11.250001 0,3.339846 -1.58203,6.372076 -1.58203,2.98828 -5.53711,6.76757 l -3.86718,3.7793 q -2.06543,2.06543 -2.94434,3.25195 -0.83496,1.14258 -1.18652,2.24122 -0.26368,0.92285 -0.39551,2.24121 -0.13184,1.31836 -0.13184,3.60351 l 0,5.40528 z" />
-      </g>
-      <rect
-         y="923.16681"
-         x="45.770191"
-         height="100.00001"
-         width="15.000001"
-         id="rect4834"
-         style="fill:#ff0000;fill-opacity:1;stroke:none" />
-      <rect
-         transform="matrix(-0.00595846,-0.99998225,0.99997419,-0.00718432,0,0)"
-         y="-2.488034"
-         x="-980.66632"
-         height="99.91748"
-         width="14.282415"
-         id="rect4834-6"
-         style="fill:#ff0000;fill-opacity:1;stroke:none" />
-    </g>
-  </g>
-</svg>
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/quiz_off.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="22"
-   height="22"
-   viewBox="0 0 22.000001 22.000001"
-   id="svg4208"
-   version="1.1"
-   inkscape:version="0.48.4 r9939"
-   sodipodi:docname="quizzOff.svg">
-  <defs
-     id="defs4210" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="20.48"
-     inkscape:cx="26.114676"
-     inkscape:cy="19.183621"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1855"
-     inkscape:window-height="1056"
-     inkscape:window-x="65"
-     inkscape:window-y="24"
-     inkscape:window-maximized="1" />
-  <metadata
-     id="metadata4213">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Calque 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(0,-1030.3622)">
-    <g
-       id="g3090"
-       transform="matrix(0.13943692,0,0,0.1456598,-4.0481427,902.11583)">
-      <path
-         inkscape:connector-curvature="0"
-         id="path4152"
-         d="m 88.762577,966.09408 a 64.442296,17.911566 52.208592 0 0 -53.76267,-40.24111 64.442296,17.911566 52.208592 0 0 25.08146,61.71245 64.442296,17.911566 52.208592 0 0 53.763283,40.24068 64.442296,17.911566 52.208592 0 0 -25.082073,-61.71202 z"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:2.23528218;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="517.45343"
-         x="875.27667"
-         height="20.941669"
-         width="15.681897"
-         id="rect4311"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="519.57574"
-         x="762.16467"
-         height="19.048025"
-         width="13.667582"
-         id="rect4309"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="518.66687"
-         x="889.6543"
-         height="0.94452941"
-         width="1.1967648"
-         id="rect4313"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-3"
-         d="m 113.50338,1028.0563 9.89486,-7.4107 8.37707,-6.2729"
-         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <ellipse
-         sodipodi:ry="18.476786"
-         sodipodi:rx="64.438011"
-         sodipodi:cy="516.2522"
-         sodipodi:cx="826.67413"
-         d="m 891.11214,516.2522 c 0,10.20444 -28.84988,18.47678 -64.43801,18.47678 -35.58813,0 -64.43801,-8.27234 -64.43801,-18.47678 0,-10.20445 28.84988,-18.47679 64.43801,-18.47679 35.58813,0 64.43801,8.27234 64.43801,18.47679 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="18.476786"
-         rx="64.438011"
-         cy="516.2522"
-         cx="826.67413"
-         id="path4150"
-         style="fill:#666666;stroke:#000000;stroke-width:2.23541927;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156"
-         d="m 35.104607,925.77201 9.7327,-7.28939 8.23979,-6.17012"
-         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <ellipse
-         sodipodi:ry="8.1607332"
-         sodipodi:rx="36.851326"
-         sodipodi:cy="517.20477"
-         sodipodi:cx="827.2381"
-         d="m 864.08942,517.20477 c 0,4.50705 -16.4989,8.16074 -36.85132,8.16074 -20.35243,0 -36.85133,-3.65369 -36.85133,-8.16074 0,-4.50705 16.4989,-8.16073 36.85133,-8.16073 20.35242,0 36.85132,3.65368 36.85132,8.16073 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="8.1607332"
-         rx="36.851326"
-         cy="517.20477"
-         cx="827.2381"
-         id="path4317"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:1.30889452;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="907.08124"
-         x="233.80257"
-         height="3.9420969"
-         width="24.027122"
-         id="rect5190"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="906.15369"
-         x="235.03923"
-         height="4.2899289"
-         width="24.027122"
-         id="rect5190-9"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="905.3421"
-         x="236.39369"
-         height="4.2899289"
-         width="24.027122"
-         id="rect5190-9-1"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="904.47247"
-         x="237.51262"
-         height="4.0000691"
-         width="2.1789296"
-         id="rect5190-9-4"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="903.92175"
-         x="237.95427"
-         height="4.0000691"
-         width="2.1789296"
-         id="rect5190-9-4-4"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="908.00873"
-         x="233.77309"
-         height="2.5362754"
-         width="18.712299"
-         id="rect5190-9-0"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-4"
-         d="m 69.344687,935.29586 10.13887,-6.16215 8.58357,-5.21581"
-         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="954.03864"
-         x="285.80243"
-         height="3.3044052"
-         width="2.9445002"
-         id="rect5279"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="948.15442"
-         x="283.03458"
-         height="7.8841949"
-         width="6.0067806"
-         id="rect5279-2"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="951.83563"
-         x="286.62689"
-         height="2.3188813"
-         width="4.7700906"
-         id="rect5279-2-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="953.51678"
-         x="285.83188"
-         height="1.971049"
-         width="4.4167504"
-         id="rect5279-2-3-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-4-5"
-         d="m 114.62982,993.43082 9.47784,-7.0986 8.02405,-6.00861"
-         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="909.45807"
-         x="241.51714"
-         height="4.2899289"
-         width="24.027122"
-         id="rect5190-9-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <ellipse
-         sodipodi:ry="11.1082"
-         sodipodi:rx="36.846481"
-         sodipodi:cy="495.24258"
-         sodipodi:cx="824.92773"
-         d="m 861.77422,495.24258 c 0,6.13489 -16.49674,11.1082 -36.84649,11.1082 -20.34975,0 -36.84648,-4.97331 -36.84648,-11.1082 0,-6.13489 16.49673,-11.1082 36.84648,-11.1082 20.34975,0 36.84649,4.97331 36.84649,11.1082 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="11.1082"
-         rx="36.846481"
-         cy="495.24258"
-         cx="824.92773"
-         id="path4351"
-         style="fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.924097;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <path
-         id="path4564"
-         d="m 76.182057,895.08255 c 28.049053,-21.23075 69.407013,-14.64926 92.435693,14.54291 23.02867,29.19218 19.04627,70.22994 -9.00275,91.46064 -27.96073,21.2524 -111.393663,-84.75115 -83.432943,-106.00355 z"
-         stroke-miterlimit="10"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:4.48099518;stroke-miterlimit:10;stroke-dasharray:none;display:inline"
-         inkscape:connector-curvature="0" />
-    </g>
-  </g>
-</svg>
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/quiz_on.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="22"
-   height="22"
-   viewBox="0 0 22.000001 22.000002"
-   id="svg4208"
-   version="1.1"
-   inkscape:version="0.48.4 r9939"
-   sodipodi:docname="quizzOn.svg">
-  <defs
-     id="defs4210" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="14.481547"
-     inkscape:cx="20.213132"
-     inkscape:cy="13.840792"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     inkscape:window-width="1855"
-     inkscape:window-height="1056"
-     inkscape:window-x="65"
-     inkscape:window-y="24"
-     inkscape:window-maximized="1" />
-  <metadata
-     id="metadata4213">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Calque 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(0,-1030.3622)">
-    <g
-       id="g3065"
-       transform="matrix(0.13987874,0,0,0.14224716,-4.400635,906.61726)">
-      <path
-         inkscape:connector-curvature="0"
-         id="path4152"
-         d="m 91.229014,959.93306 a 64.4423,17.911567 52.208592 0 0 -53.76267,-40.2411 64.4423,17.911567 52.208592 0 0 25.08146,61.7124 64.4423,17.911567 52.208592 0 0 53.763276,40.24074 64.4423,17.911567 52.208592 0 0 -25.082066,-61.71204 z"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:#000000;stroke-width:2.23528218;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="511.73264"
-         x="871.82239"
-         height="20.941671"
-         width="15.681898"
-         id="rect4311"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="513.85492"
-         x="758.71033"
-         height="19.048027"
-         width="13.667583"
-         id="rect4309"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         y="512.94604"
-         x="886.19995"
-         height="0.94452947"
-         width="1.1967649"
-         id="rect4313"
-         style="fill:#b3b3b3;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-3"
-         d="m 115.96981,1021.8953 9.89486,-7.4107 8.37708,-6.2729"
-         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <ellipse
-         sodipodi:ry="18.476788"
-         sodipodi:rx="64.438011"
-         sodipodi:cy="510.5314"
-         sodipodi:cx="823.21979"
-         d="m 887.6578,510.5314 c 0,10.20445 -28.84988,18.47679 -64.43801,18.47679 -35.58813,0 -64.43801,-8.27234 -64.43801,-18.47679 0,-10.20445 28.84988,-18.47678 64.43801,-18.47678 35.58813,0 64.43801,8.27233 64.43801,18.47678 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="18.476788"
-         rx="64.438011"
-         cy="510.5314"
-         cx="823.21979"
-         id="path4150"
-         style="fill:#666666;stroke:#000000;stroke-width:2.23541927;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156"
-         d="m 37.571044,919.61096 9.7327,-7.2894 8.23979,-6.1701"
-         style="fill:none;stroke:#000000;stroke-width:2.23528218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <ellipse
-         sodipodi:ry="8.1607332"
-         sodipodi:rx="36.85133"
-         sodipodi:cy="511.48398"
-         sodipodi:cx="823.78375"
-         d="m 860.63508,511.48398 c 0,4.50705 -16.4989,8.16073 -36.85133,8.16073 -20.35243,0 -36.85133,-3.65368 -36.85133,-8.16073 0,-4.50705 16.4989,-8.16073 36.85133,-8.16073 20.35243,0 36.85133,3.65368 36.85133,8.16073 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="8.1607332"
-         rx="36.85133"
-         cy="511.48398"
-         cx="823.78375"
-         id="path4317"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:#000000;stroke-width:1.30889452;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="900.58234"
-         x="235.14644"
-         height="3.9420972"
-         width="24.027124"
-         id="rect5190"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="899.65472"
-         x="236.3831"
-         height="4.2899294"
-         width="24.027124"
-         id="rect5190-9"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="898.8432"
-         x="237.73756"
-         height="4.2899294"
-         width="24.027124"
-         id="rect5190-9-1"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="897.97357"
-         x="238.85649"
-         height="4.0000696"
-         width="2.1789298"
-         id="rect5190-9-4"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="897.42279"
-         x="239.29814"
-         height="4.0000696"
-         width="2.1789298"
-         id="rect5190-9-4-4"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="901.50983"
-         x="235.11696"
-         height="2.5362756"
-         width="18.712301"
-         id="rect5190-9-0"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-4"
-         d="m 71.811124,929.13486 10.13887,-6.1622 8.58357,-5.2158"
-         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="947.53973"
-         x="287.14633"
-         height="3.3044055"
-         width="2.9445004"
-         id="rect5279"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="941.65546"
-         x="284.37848"
-         height="7.8841953"
-         width="6.0067811"
-         id="rect5279-2"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="945.33673"
-         x="287.97079"
-         height="2.3188815"
-         width="4.7700911"
-         id="rect5279-2-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="947.01788"
-         x="287.17575"
-         height="1.9710491"
-         width="4.4167509"
-         id="rect5279-2-3-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <path
-         sodipodi:nodetypes="ccc"
-         inkscape:connector-curvature="0"
-         id="path4156-4-5"
-         d="m 117.09625,987.26976 9.47784,-7.0986 8.02406,-6.0086"
-         style="fill:none;stroke:#000000;stroke-width:1.30881441;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <rect
-         transform="matrix(0.98439737,0.17595972,-0.17595972,0.98439737,0,0)"
-         y="902.95917"
-         x="242.86101"
-         height="4.2899294"
-         width="24.027124"
-         id="rect5190-9-3"
-         style="fill:#e6e6e6;fill-opacity:1;stroke:none;display:inline" />
-      <ellipse
-         sodipodi:ry="11.108201"
-         sodipodi:rx="36.846485"
-         sodipodi:cy="489.52179"
-         sodipodi:cx="821.47339"
-         d="m 858.31987,489.52179 c 0,6.13489 -16.49673,11.1082 -36.84648,11.1082 -20.34975,0 -36.84649,-4.97331 -36.84649,-11.1082 0,-6.13489 16.49674,-11.1082 36.84649,-11.1082 20.34975,0 36.84648,4.97331 36.84648,11.1082 z"
-         transform="matrix(0.61175214,0.7910495,-0.80052922,0.59929372,0,0)"
-         ry="11.108201"
-         rx="36.846485"
-         cy="489.52179"
-         cx="821.47339"
-         id="path4351"
-         style="fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.924097;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
-      <path
-         id="path4564"
-         d="m 78.648494,888.92156 c 28.049046,-21.2308 69.407016,-14.6493 92.435696,14.5429 23.02867,29.1922 19.04627,70.2299 -9.00275,91.4606 -27.96073,21.25254 -111.393666,-84.7511 -83.432946,-106.0035 z"
-         stroke-miterlimit="10"
-         style="fill:#aa0000;fill-opacity:1;stroke:#000000;stroke-width:4.48099518;stroke-miterlimit:10;stroke-dasharray:none;display:inline"
-         inkscape:connector-curvature="0" />
-    </g>
-  </g>
-</svg>
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/reel.gif has changed
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/right_arrow.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" id="arrow">
-  <path style="fill:none;stroke:#fff;stroke-width:6;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
-      d="M1,1 l30,15 l-30,15">
-  </path>
-  <path style="fill:none;stroke:#000;stroke-width:4;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;"
-      d="M1,1 l30,15 l-30,15">
-  </path>
-</svg>
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/slice-handles.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/socialbuttons.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/socialcopy.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/submit_annotation.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/tag.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/time_edit.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-corners.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-gradient.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-h-borders.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-tip.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/tooltip-v-borders.png has changed
--- a/src/ldt/ldt/static/ldt/metadataplayer/img/twitter.svg	Mon Sep 02 15:00:08 2024 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   version="1.1"
-   id="twitter_logo"
-   x="0px"
-   y="0px"
-   width="42px"
-   height="42px"
-   viewBox="0 0 42 42"
-   xml:space="preserve"
-   inkscape:version="0.48.5 r10040"
-   sodipodi:docname="twitter.svg"><metadata
-     id="metadata11"><rdf:RDF><cc:Work
-         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
-     id="defs9" /><sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1680"
-     inkscape:window-height="1015"
-     id="namedview7"
-     showgrid="false"
-     inkscape:zoom="5.6190476"
-     inkscape:cx="-11.478814"
-     inkscape:cy="21"
-     inkscape:window-x="0"
-     inkscape:window-y="26"
-     inkscape:window-maximized="0"
-     inkscape:current-layer="g3" /><g
-     fill="#ddd"
-     stroke="black"
-     transform="matrix(.57079,0,0,-.57079,-42.80937,432.2052)"
-     id="g3"><path
-       d="M146.83,743.433c-0.469-0.979-1.341-2.217-2.618-3.711c-1.276-1.497-2.85-2.811-4.725-3.947   c0.051-0.411,0.091-0.799,0.116-1.158c0.202-5.559-1.143-11.324-3.008-16.127c-3.617-8.931-9.157-16.12-17.071-21   c-8.252-4.688-17.862-5.684-26.717-4.833c-5.879,0.667-11.673,2.568-16.055,6.149c8.014-0.948,15.494,1.75,21.407,6.11   c-6.57-0.164-11.34,4.541-13.595,9.98c1.016-0.265,2.079-0.234,3.047-0.157c1.193,0.113,2.325,0.222,3.437,0.465   c-4.188,1.338-7.853,3.797-9.766,7.502c-1.122,2.349-1.629,4.583-1.639,7.116c1.961-1.023,4.322-2.021,6.484-1.933   c-3.264,2.737-5.882,6.235-6.368,10.248c-0.308,3.345,0.539,6.4,1.759,9.242c4.881-5.311,10.359-9.685,16.678-12.375   c4.322-1.752,8.631-2.691,13.087-2.707c-0.515,3.94-0.115,7.749,1.757,10.982c2.204,3.477,5.42,5.492,9.023,6.498   c5.16,1.311,10.192-0.542,13.36-4.099c3.417,0.364,6.691,1.867,9.297,3.401c-1.107-3.319-3.263-6.619-6.407-8.199   C141.308,741.429,144.163,742.307,146.83,743.433z"
-       id="path5"
-       style="fill:#55acee;fill-opacity:1" /></g></svg>
\ No newline at end of file
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/twitter_sprites.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/valid_sprites.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/voiceannotation.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/white_arrow_long.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/widget-control.png has changed
Binary file src/ldt/ldt/static/ldt/metadataplayer/img/zoombuttons.png has changed