1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

New plugin AdBlockerDetector

This commit is contained in:
Daniel Neto 2024-04-16 14:48:52 -03:00
parent b705975eeb
commit 07f6aaabfc
148 changed files with 8728 additions and 6851 deletions

29
node_modules/.package-lock.json generated vendored
View file

@ -406,6 +406,11 @@
"utf-8-validate": "^5.0.5"
}
},
"node_modules/blockadblock": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/blockadblock/-/blockadblock-3.2.1.tgz",
"integrity": "sha512-EDHDL+61Jxjmx661b++9PG6HIE8j8fWXOik5oZ01gPsmuQN+n2WtLJg9IX0UT8f5dQVvF1vM7QhJ8wATffn83Q=="
},
"node_modules/bn.js": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz",
@ -430,9 +435,9 @@
}
},
"node_modules/bootstrap-fileinput": {
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/bootstrap-fileinput/-/bootstrap-fileinput-5.5.3.tgz",
"integrity": "sha512-GJexTYK8dA7wVE0jU6cVZ2Y4UmSZ6RL9163mRjyt6XBr8yFM7W8AYzOXGgbrZ8DwYIOR/ScE1dZOfU+fHxGLVQ==",
"version": "5.5.4",
"resolved": "https://registry.npmjs.org/bootstrap-fileinput/-/bootstrap-fileinput-5.5.4.tgz",
"integrity": "sha512-GixhM6PzfIzzAPLAP73O6EZCpOTGzka1kEBiS+AfviF+kfZQWBQEl8V4/Keto2kB570/yZtmi6/n/PbD5nvD2A==",
"hasInstallScript": true,
"dependencies": {
"bootstrap": ">= 3.4.1",
@ -635,9 +640,9 @@
}
},
"node_modules/dexie": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/dexie/-/dexie-4.0.1.tgz",
"integrity": "sha512-wSNn+TcCh+DuE2pdg058K3MhxA4g+IiZlW7yGz4cMd/t3z2rJXZcV3HDxZljbrICU2Iq0qY4UHnbolTMK/+bcA=="
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/dexie/-/dexie-4.0.4.tgz",
"integrity": "sha512-wFzwWSUdi+MC3jiFeQcCp9nInR7EaX8edzYY+4wmiITkQAiSnHpe4Wo2o5Ce5tJZe2nqt7mLW91MsW4GYx3ziQ=="
},
"node_modules/dom-walk": {
"version": "0.1.2",
@ -800,9 +805,9 @@
}
},
"node_modules/hls.js": {
"version": "1.5.7",
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.7.tgz",
"integrity": "sha512-Hnyf7ojTBtXHeOW1/t6wCBJSiK1WpoKF9yg7juxldDx8u3iswrkPt2wbOA/1NiwU4j27DSIVoIEJRAhcdMef/A=="
"version": "1.5.8",
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.5.8.tgz",
"integrity": "sha512-hJYMPfLhWO7/7+n4f9pn6bOheCGx0WgvVz7k3ouq3Pp1bja48NN+HeCQu3XCGYzqWQF/wo7Sk6dJAyWVJD8ECA=="
},
"node_modules/ieee754": {
"version": "1.2.1",
@ -1790,9 +1795,9 @@
}
},
"node_modules/tinymce": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-7.0.0.tgz",
"integrity": "sha512-ggXLfTRrUALAcjeJSRrZcJDOl6MgC2tPXe/zNOEkQXvTDgcKqFypPRoPpfpK5wejexjyaI/7dwETOntJ5MPBFg=="
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-7.0.1.tgz",
"integrity": "sha512-0a7DJnhniBx2psRuKcVQ9g4hujN6PAR4fPS0NSF1T1luH1RBDZVVEn2pGND6Ly+AW1lUm/cHOHjsasqBelMhbw=="
},
"node_modules/tinymce-langs": {
"version": "1.0.0",

1
node_modules/blockadblock/.gitattributes generated vendored Normal file
View file

@ -0,0 +1 @@
test.html linguist-vendored

21
node_modules/blockadblock/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Valentin Allaire <valentin.allaire@sitexw.fr>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

147
node_modules/blockadblock/README.md generated vendored Normal file
View file

@ -0,0 +1,147 @@
BlockAdBlock (v3.2.1)
===========
([FuckAdBlock](https://github.com/sitexw/FuckAdBlock) same project but with a more convenient name)
You can detect nasty ad blockers.
Online example: http://sitexw.fr/blockadblock/
Valid on
---------------------
- Google Chrome
- Mozilla Firefox
- Internet Explorer (8+)
- Safari
- Opera
Install via
---------------------
Manual:
```
Download "blockadblock.js" and add it to your website.
```
Bower:
```
bower install blockadblock
```
Node.js/io.js:
```
npm install blockadblock
```
Code example
---------------------
```javascript
// Function called if AdBlock is not detected
function adBlockNotDetected() {
alert('AdBlock is not enabled');
}
// Function called if AdBlock is detected
function adBlockDetected() {
alert('AdBlock is enabled');
}
// Recommended audit because AdBlock lock the file 'blockadblock.js'
// If the file is not called, the variable does not exist 'blockAdBlock'
// This means that AdBlock is present
if(typeof blockAdBlock === 'undefined') {
adBlockDetected();
} else {
blockAdBlock.onDetected(adBlockDetected);
blockAdBlock.onNotDetected(adBlockNotDetected);
// and|or
blockAdBlock.on(true, adBlockDetected);
blockAdBlock.on(false, adBlockNotDetected);
// and|or
blockAdBlock.on(true, adBlockDetected).onNotDetected(adBlockNotDetected);
}
// Change the options
blockAdBlock.setOption('checkOnLoad', false);
// and|or
blockAdBlock.setOption({
debug: true,
checkOnLoad: false,
resetOnEnd: false
});
```
Default options
---------------------
```javascript
// At launch, check if AdBlock is enabled
// Uses the method blockAdBlock.check()
checkOnLoad: true
// At the end of the check, is that it removes all events added ?
resetOnEnd: true
// The number of milliseconds between each check
loopCheckTime: 50
// The number of negative checks after which there is considered that AdBlock is not enabled
// Time (ms) = 50*(5-1) = 200ms (per default)
loopMaxNumber: 5
// CSS class used by the bait caught AdBlock
baitClass: 'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links'
// CSS style used to hide the bait of the users
baitStyle: 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;'
// Displays the debug in the console (available only from version 3.2 and more)
debug: false
```
Method available
---------------------
```javascript
// Allows to set options
// #options: string|object
// #value: string
blockAdBlock.setOption(options, value);
// Allows to check if AdBlock is enabled
// The parameter 'loop' allows checking without loop several times according to the value of 'loopMaxNumber'
// Example: loop=true => time~=200ms (time varies depending on the configuration)
// loop=false => time~=1ms
// #loop: boolean (default: true)
blockAdBlock.check(loop);
// Allows to manually simulate the presence of AdBlock or not
// #detected: boolean (AdBlock is detected ?)
blockAdBlock.emitEvent(detected);
// Allows to clear all events added via methods 'on', 'onDetected' and 'onNotDetected'
blockAdBlock.clearEvent();
// Allows to add an event if AdBlock is detected
// #detected: boolean (true: detected, false: not detected)
// #fn: function
blockAdBlock.on(detected, fn);
// Similar to blockAdBlock.on(true|false, fn)
blockAdBlock.onDetected(fn);
blockAdBlock.onNotDetected(fn);
```
Instance
---------------------
*(Available only from version 3.1 and more)*
By default, BlockAdBlock is instantiated automatically.
To block this automatic instantiation, simply create a variable "blockAdBlock" with a value (null, false, ...) before importing the script.
```html
<script>var blockAdBlock = false;</script>
<script src="./blockadblock.js"></script>
```
After that, you are free to create your own instances:
```javascript
blockAdBlock = new BlockAdBlock;
// and|or
myBlockAdBlock = new BlockAdBlock({
checkOnLoad: true,
resetOnEnd: true
});
```

250
node_modules/blockadblock/blockadblock.js generated vendored Normal file
View file

@ -0,0 +1,250 @@
/*
* BlockAdBlock 3.2.1
* Copyright (c) 2015 Valentin Allaire <valentin.allaire@sitexw.fr>
* Released under the MIT license
* https://github.com/sitexw/BlockAdBlock
*/
(function(window) {
var BlockAdBlock = function(options) {
this._options = {
checkOnLoad: false,
resetOnEnd: false,
loopCheckTime: 50,
loopMaxNumber: 5,
baitClass: 'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links',
baitStyle: 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;',
debug: false
};
this._var = {
version: '3.2.1',
bait: null,
checking: false,
loop: null,
loopNumber: 0,
event: { detected: [], notDetected: [] }
};
if(options !== undefined) {
this.setOption(options);
}
var self = this;
var eventCallback = function() {
setTimeout(function() {
if(self._options.checkOnLoad === true) {
if(self._options.debug === true) {
self._log('onload->eventCallback', 'A check loading is launched');
}
if(self._var.bait === null) {
self._creatBait();
}
setTimeout(function() {
self.check();
}, 1);
}
}, 1);
};
if(window.addEventListener !== undefined) {
window.addEventListener('load', eventCallback, false);
} else {
window.attachEvent('onload', eventCallback);
}
};
BlockAdBlock.prototype._options = null;
BlockAdBlock.prototype._var = null;
BlockAdBlock.prototype._bait = null;
BlockAdBlock.prototype._log = function(method, message) {
console.log('[BlockAdBlock]['+method+'] '+message);
};
BlockAdBlock.prototype.setOption = function(options, value) {
if(value !== undefined) {
var key = options;
options = {};
options[key] = value;
}
for(var option in options) {
this._options[option] = options[option];
if(this._options.debug === true) {
this._log('setOption', 'The option "'+option+'" he was assigned to "'+options[option]+'"');
}
}
return this;
};
BlockAdBlock.prototype._creatBait = function() {
var bait = document.createElement('div');
bait.setAttribute('class', this._options.baitClass);
bait.setAttribute('style', this._options.baitStyle);
this._var.bait = window.document.body.appendChild(bait);
this._var.bait.offsetParent;
this._var.bait.offsetHeight;
this._var.bait.offsetLeft;
this._var.bait.offsetTop;
this._var.bait.offsetWidth;
this._var.bait.clientHeight;
this._var.bait.clientWidth;
if(this._options.debug === true) {
this._log('_creatBait', 'Bait has been created');
}
};
BlockAdBlock.prototype._destroyBait = function() {
window.document.body.removeChild(this._var.bait);
this._var.bait = null;
if(this._options.debug === true) {
this._log('_destroyBait', 'Bait has been removed');
}
};
BlockAdBlock.prototype.check = function(loop) {
if(loop === undefined) {
loop = true;
}
if(this._options.debug === true) {
this._log('check', 'An audit was requested '+(loop===true?'with a':'without')+' loop');
}
if(this._var.checking === true) {
if(this._options.debug === true) {
this._log('check', 'A check was canceled because there is already an ongoing');
}
return false;
}
this._var.checking = true;
if(this._var.bait === null) {
this._creatBait();
}
var self = this;
this._var.loopNumber = 0;
if(loop === true) {
this._var.loop = setInterval(function() {
self._checkBait(loop);
}, this._options.loopCheckTime);
}
setTimeout(function() {
self._checkBait(loop);
}, 1);
if(this._options.debug === true) {
this._log('check', 'A check is in progress ...');
}
return true;
};
BlockAdBlock.prototype._checkBait = function(loop) {
var detected = false;
if(this._var.bait === null) {
this._creatBait();
}
if(window.document.body.getAttribute('abp') !== null
|| this._var.bait.offsetParent === null
|| this._var.bait.offsetHeight == 0
|| this._var.bait.offsetLeft == 0
|| this._var.bait.offsetTop == 0
|| this._var.bait.offsetWidth == 0
|| this._var.bait.clientHeight == 0
|| this._var.bait.clientWidth == 0) {
detected = true;
}
if(window.getComputedStyle !== undefined) {
var baitTemp = window.getComputedStyle(this._var.bait, null);
if(baitTemp && (baitTemp.getPropertyValue('display') == 'none' || baitTemp.getPropertyValue('visibility') == 'hidden')) {
detected = true;
}
}
if(this._options.debug === true) {
this._log('_checkBait', 'A check ('+(this._var.loopNumber+1)+'/'+this._options.loopMaxNumber+' ~'+(1+this._var.loopNumber*this._options.loopCheckTime)+'ms) was conducted and detection is '+(detected===true?'positive':'negative'));
}
if(loop === true) {
this._var.loopNumber++;
if(this._var.loopNumber >= this._options.loopMaxNumber) {
this._stopLoop();
}
}
if(detected === true) {
this._stopLoop();
this._destroyBait();
this.emitEvent(true);
if(loop === true) {
this._var.checking = false;
}
} else if(this._var.loop === null || loop === false) {
this._destroyBait();
this.emitEvent(false);
if(loop === true) {
this._var.checking = false;
}
}
};
BlockAdBlock.prototype._stopLoop = function(detected) {
clearInterval(this._var.loop);
this._var.loop = null;
this._var.loopNumber = 0;
if(this._options.debug === true) {
this._log('_stopLoop', 'A loop has been stopped');
}
};
BlockAdBlock.prototype.emitEvent = function(detected) {
if(this._options.debug === true) {
this._log('emitEvent', 'An event with a '+(detected===true?'positive':'negative')+' detection was called');
}
var fns = this._var.event[(detected===true?'detected':'notDetected')];
for(var i in fns) {
if(this._options.debug === true) {
this._log('emitEvent', 'Call function '+(parseInt(i)+1)+'/'+fns.length);
}
if(fns.hasOwnProperty(i)) {
fns[i]();
}
}
if(this._options.resetOnEnd === true) {
this.clearEvent();
}
return this;
};
BlockAdBlock.prototype.clearEvent = function() {
this._var.event.detected = [];
this._var.event.notDetected = [];
if(this._options.debug === true) {
this._log('clearEvent', 'The event list has been cleared');
}
};
BlockAdBlock.prototype.on = function(detected, fn) {
this._var.event[(detected===true?'detected':'notDetected')].push(fn);
if(this._options.debug === true) {
this._log('on', 'A type of event "'+(detected===true?'detected':'notDetected')+'" was added');
}
return this;
};
BlockAdBlock.prototype.onDetected = function(fn) {
return this.on(true, fn);
};
BlockAdBlock.prototype.onNotDetected = function(fn) {
return this.on(false, fn);
};
window.BlockAdBlock = BlockAdBlock;
if(window.blockAdBlock === undefined) {
window.blockAdBlock = new BlockAdBlock({
checkOnLoad: true,
resetOnEnd: true
});
}
})(window);

34
node_modules/blockadblock/bower.json generated vendored Normal file
View file

@ -0,0 +1,34 @@
{
"name": "blockadblock",
"version": "3.2.1",
"description": "Detects ad blockers (AdBlock, ...)",
"authors": [{
"name" : "Valentin Allaire",
"email" : "valentin.allaire@sitexw.fr",
"homepage" : "http://sitexw.fr/"
}],
"license": "MIT",
"keywords": [
"adblock",
"advertising",
"ad",
"block",
"lock",
"detection",
"detecting"
],
"main": "blockadblock.js",
"ignore": [
"package.json",
"README.md",
"test.html"
],
"homepage": "https://github.com/sitexw/BlockAdBlock",
"repository": {
"type": "git",
"url": "git://github.com/sitexw/BlockAdBlock.git"
},
"bugs": {
"url": "https://github.com/sitexw/BlockAdBlock/issues"
}
}

32
node_modules/blockadblock/package.json generated vendored Normal file
View file

@ -0,0 +1,32 @@
{
"name": "blockadblock",
"version": "3.2.1",
"description": "Detects ad blockers (AdBlock, ...)",
"author": {
"name" : "Valentin Allaire",
"email" : "valentin.allaire@sitexw.fr",
"url" : "http://sitexw.fr/"
},
"license": "MIT",
"keywords": [
"adblock",
"advertising",
"ad",
"block",
"lock",
"detection",
"detecting"
],
"main": "blockadblock.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"homepage": "https://github.com/sitexw/BlockAdBlock",
"repository": {
"type": "git",
"url": "git://github.com/sitexw/BlockAdBlock.git"
},
"bugs": {
"url": "https://github.com/sitexw/BlockAdBlock/issues"
}
}

228
node_modules/blockadblock/test.html generated vendored Normal file
View file

@ -0,0 +1,228 @@
<!doctype html>
<html>
<head>
<title>BlockAdBlock 3.2.1</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/styles/default.min.css" rel="stylesheet">
<style>
header {
margin-bottom: 20px;
}
.outline {
width: 302px;
height: 252px;
border: 1px solid #cccccc;
border-radius: 4px;
background-color: #f2dede;
}
.pub_300x250 {
width: 300px;
height: 250px;
background-color: #dff0d8;
}
h5.bg-success,
h5.bg-danger {
padding: 8px;
border: 1px solid #cccccc;
border-radius: 4px;
}
pre {
background-color: #f0f0f0;
}
</style>
</head>
<body>
<div class="container">
<header class="row">
<div class="col-sm-6">
<h1>BlockAdBlock <small>3.2.1</small></h1>
</div>
<div class="col-sm-6 text-right">
<h4>
<a href="https://github.com/sitexw/FuckAdBlock" style="color: #acc6d7;">FuckAdBlock</a>
&nbsp; &nbsp;
<a href="http://sitexw.fr/blockadblock/">Online example</a>
&nbsp; &nbsp;
<a href="https://github.com/sitexw/BlockAdBlock">GitHub</a>
</h4>
</div>
</header>
<div class="row">
<div class="col-sm-5">
<div class="outline">
<div class="pub_300x250"></div>
</div>
</div>
<div class="col-sm-7">
<h3 class="text-left">Publicity example<button class="btn btn-primary btn-xs pull-right" onclick="checkAgain();">Check again</button></h3>
<h5 class="bg-success" id="block-adb-not-enabled" style="display: none;">AdBlock is not enabled</h5>
<h5 class="bg-danger" id="block-adb-enabled" style="display: none;">AdBlock is enabled</h5>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h3 class="text-left">Valid on</h3>
<ul>
<li>Google Chrome</li>
<li>Mozilla Firefox</li>
<li>Internet Explorer (8+)</li>
<li>Safari</li>
<li>Opera</li>
</ul>
<h3 class="text-left">Install via</h3>
<p>Manual:</p>
<pre>Download "blockadblock.js" and add it to your website.</pre>
<p>Bower:</p>
<pre>bower install blockadblock</pre>
<p>Node.js/io.js:</p>
<pre>npm install blockadblock</pre>
<h3 class="text-left">Code example</h3>
<pre><code class="javascript">// Function called if AdBlock is not detected
function adBlockNotDetected() {
alert('AdBlock is not enabled');
}
// Function called if AdBlock is detected
function adBlockDetected() {
alert('AdBlock is enabled');
}
// Recommended audit because AdBlock lock the file 'blockadblock.js'
// If the file is not called, the variable does not exist 'blockAdBlock'
// This means that AdBlock is present
if(typeof blockAdBlock === 'undefined') {
adBlockDetected();
} else {
blockAdBlock.onDetected(adBlockDetected);
blockAdBlock.onNotDetected(adBlockNotDetected);
// and|or
blockAdBlock.on(true, adBlockDetected);
blockAdBlock.on(false, adBlockNotDetected);
// and|or
blockAdBlock.on(true, adBlockDetected).onNotDetected(adBlockNotDetected);
}
// Change the options
blockAdBlock.setOption('checkOnLoad', false);
// and|or
blockAdBlock.setOption({
debug: true,
checkOnLoad: false,
resetOnEnd: false
});</code></pre>
<h3 class="text-left">Default options</h3>
<pre><code class="javascript">// At launch, check if AdBlock is enabled
// Uses the method blockAdBlock.check()
checkOnLoad: true
// At the end of the check, is that it removes all events added ?
resetOnEnd: true
// The number of milliseconds between each check
loopCheckTime: 50
// The number of negative checks after which there is considered that AdBlock is not enabled
// Time (ms) = 50*(5-1) = 200ms (per default)
loopMaxNumber: 5
// CSS class used by the bait caught AdBlock
baitClass: 'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links'
// CSS style used to hide the bait of the users
baitStyle: 'width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;'
// Displays the debug in the console (available only from version 3.2 and more)
debug: false
</code></pre>
<h3 class="text-left">Method available</h3>
<pre><code class="javascript">// Allows to set options
// #options: string|object
// #value: string
blockAdBlock.setOption(options, value);
// Allows to check if AdBlock is enabled
// The parameter 'loop' allows checking without loop several times according to the value of 'loopMaxNumber'
// Example: loop=true => time~=200ms (time varies depending on the configuration)
// loop=false => time~=1ms
// #loop: boolean (default: true)
blockAdBlock.check(loop);
// Allows to manually simulate the presence of AdBlock or not
// #detected: boolean (AdBlock is detected ?)
blockAdBlock.emitEvent(detected);
// Allows to clear all events added via methods 'on', 'onDetected' and 'onNotDetected'
blockAdBlock.clearEvent();
// Allows to add an event if AdBlock is detected
// #detected: boolean (true: detected, false: not detected)
// #fn: function
blockAdBlock.on(detected, fn);
// Similar to blockAdBlock.on(true|false, fn)
blockAdBlock.onDetected(fn);
blockAdBlock.onNotDetected(fn);</code></pre>
<h3 class="text-left">Instance</h3>
<p>
<i>(Available only from version 3.1 and more)</i><br>
By default, BlockAdBlock is instantiated automatically.<br>
To block this automatic instantiation, simply create a variable "blockAdBlock" with a value (null, false, ...) before importing the script.
</p>
<pre><code class="html">&lt;script&gt;var blockAdBlock = false;&lt/script&gt;
&ltscript src="./blockadblock.js"&gt;&lt/script&gt;</code></pre>
After that, you are free to create your own instances:
<pre><code class="javascript">blockAdBlock = new BlockAdBlock;
// and|or
myBlockAdBlock = new BlockAdBlock({
checkOnLoad: true,
resetOnEnd: true
});</code></pre>
</div>
</div>
</div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="./blockadblock.js"></script>
<script>
function adBlockDetected() {
$('#block-adb-enabled').show();
$('#block-adb-not-enabled').hide();
}
function adBlockNotDetected() {
$('#block-adb-enabled').hide();
$('#block-adb-not-enabled').show();
}
if(typeof blockAdBlock === 'undefined') {
adBlockDetected();
} else {
blockAdBlock.setOption({ debug: true });
blockAdBlock.onDetected(adBlockDetected).onNotDetected(adBlockNotDetected);
}
function checkAgain() {
$('#block-adb-enabled').hide();
$('#block-adb-not-enabled').hide();
// setTimeout 300ms for the recheck is visible when you click on the button
setTimeout(function() {
if(typeof blockAdBlock === 'undefined') {
adBlockDetected();
} else {
blockAdBlock.onDetected(adBlockDetected).onNotDetected(adBlockNotDetected);
blockAdBlock.check();
}
}, 300);
}
</script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js"></script>
<script>
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
</script>
</body>
</html>

View file

@ -1,6 +1,14 @@
Change Log: `bootstrap-fileinput`
=================================
## version 5.5.4
**Date**: 09-Apr-2024
- (bug #1858): Correct Plugin Options & Themes Initialization.
- (bug #1857): Correct Finnish Translations.
- (enh #1833): Fix compliance with CSP not having unsafe-inline policy.
## version 5.5.3
**Date**: 11-Mar-2024

View file

@ -83,7 +83,7 @@ Step 1: Load the following assets on your page in the order mentioned.
```html
<!-- bootstrap 5.x or 4.x is supported. You can also use the bootstrap css 3.3.x versions -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" crossorigin="anonymous">
<!-- default icons used in the plugin are from Bootstrap 5.x icon library (which can be enabled by loading CSS below) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.min.css" crossorigin="anonymous">
@ -92,10 +92,10 @@ Step 1: Load the following assets on your page in the order mentioned.
<!-- link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" crossorigin="anonymous" -->
<!-- the fileinput plugin styling CSS file -->
<link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />
<!-- if using RTL (Right-To-Left) orientation, load the RTL CSS file after fileinput.css by uncommenting below -->
<!-- link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/css/fileinput-rtl.min.css" media="all" rel="stylesheet" type="text/css" /-->
<!-- link href="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/css/fileinput-rtl.min.css" media="all" rel="stylesheet" type="text/css" /-->
<!-- the jQuery Library -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
@ -106,29 +106,29 @@ Step 1: Load the following assets on your page in the order mentioned.
selected file (note: this will involve a small processing overhead in scanning of file contents locally). If you
do not load these scripts then the mime type parsing will largely be derived using the extension in the filename
and some basic file content parsing signatures. -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/js/plugins/buffer.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/js/plugins/filetype.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/js/plugins/buffer.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/js/plugins/filetype.min.js" type="text/javascript"></script>
<!-- piexif.min.js is needed for auto orienting image files OR when restoring exif data in resized images and when you
wish to resize images before upload. This must be loaded before fileinput.min.js -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/js/plugins/piexif.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/js/plugins/piexif.min.js" type="text/javascript"></script>
<!-- sortable.min.js is only needed if you wish to sort / rearrange files in initial preview.
This must be loaded before fileinput.min.js -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/js/plugins/sortable.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/js/plugins/sortable.min.js" type="text/javascript"></script>
<!-- bootstrap.bundle.min.js below is needed if you wish to zoom and preview file content in a detail modal
dialog. bootstrap 5.x or 4.x is supported. You can also use the bootstrap js 3.3.x versions. -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<!-- the main fileinput plugin script JS file -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/js/fileinput.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/js/fileinput.min.js"></script>
<!-- following theme script is needed to use the Font Awesome 5.x theme (`fas`). Uncomment if needed. -->
<!-- script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/themes/fas/theme.min.js"></script -->
<!-- script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/themes/fas/theme.min.js"></script -->
<!-- optionally if you need translation for your language then include the locale file as mentioned below (replace LANG.js with your language locale) -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.3/js/locales/LANG.js"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/bootstrap-fileinput@5.5.4/js/locales/LANG.js"></script>
```
With v5.2.1, the plugin is able to automatically detect the bootstrap library version and deliver the relevant bootstrap specific functionality (if you have loaded the bootstrap.min.js before fileinput.min.js). In case of any issues - you can explicitly set the bootstrap version by setting the following variable before the plugin initialization script.

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee RTL (Right To Left) default styling for bootstrap-fileinput.

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee RTL (Right To Left) default styling for bootstrap-fileinput.

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee default styling for bootstrap-fileinput.

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee default styling for bootstrap-fileinput.

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -124,6 +124,4 @@
close: 'Sulje esikatselu'
}
};
$.extend($.fn.fileinput.defaults, $.fn.fileinputLocales.fi);
}));

View file

@ -1,6 +1,6 @@
{
"name": "bootstrap-fileinput",
"version": "5.5.3",
"version": "5.5.4",
"homepage": "https://github.com/kartik-v/bootstrap-fileinput",
"authors": [
"Kartik Visweswaran <kartikv2@gmail.com>"

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee RTL (Right To Left) default styling for bootstrap-fileinput.

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee default styling for bootstrap-fileinput.

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome 4.x theme style for bootstrap-fileinput. Load this theme file after loading

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome 5.x theme style for bootstrap-fileinput. Load this theme file after loading

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee Explorer Font Awesome 6.x theme style for bootstrap-fileinput. Load this theme file after loading

View file

@ -1,5 +1,5 @@
/*!
* bootstrap-fileinput v5.5.3
* bootstrap-fileinput v5.5.4
* http://plugins.krajee.com/file-input
*
* Krajee Explorer theme style for bootstrap-fileinput. Load this theme file after loading `fileinput.css`.

2
node_modules/dexie/dist/dexie.d.ts generated vendored
View file

@ -4,7 +4,7 @@
*
* By David Fahlander, david.fahlander@gmail.com
*
* Version 4.0.1, Tue Mar 26 2024
* Version 4.0.4, Wed Apr 10 2024
*
* https://dexie.org
*

15
node_modules/dexie/dist/dexie.js generated vendored
View file

@ -4,7 +4,7 @@
*
* By David Fahlander, david.fahlander@gmail.com
*
* Version 4.0.1, Tue Mar 26 2024
* Version 4.0.4, Wed Apr 10 2024
*
* https://dexie.org
*
@ -1150,7 +1150,7 @@
}
}
var DEXIE_VERSION = '4.0.1';
var DEXIE_VERSION = '4.0.4';
var maxString = String.fromCharCode(65535);
var minKey = -Infinity;
var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@ -4585,8 +4585,9 @@
}, table: function (tableName) {
var table = core.table(tableName);
var schema = table.schema;
var primaryKey = schema.primaryKey;
var primaryKey = schema.primaryKey, indexes = schema.indexes;
var extractKey = primaryKey.extractKey, outbound = primaryKey.outbound;
var indexesWithAutoIncPK = primaryKey.autoIncrement && indexes.filter(function (index) { return index.compound && index.keyPath.includes(primaryKey.keyPath); });
var tableClone = __assign(__assign({}, table), { mutate: function (req) {
var trans = req.trans;
var mutatedParts = req.mutatedParts || (req.mutatedParts = {});
@ -4629,6 +4630,14 @@
return table.mutate(req).then(function (res) {
if (keys && (req.type === 'add' || req.type === 'put')) {
pkRangeSet.addKeys(res.results);
if (indexesWithAutoIncPK) {
indexesWithAutoIncPK.forEach(function (idx) {
var idxVals = req.values.map(function (v) { return idx.extractKey(v); });
var pkPos = idx.keyPath.findIndex(function (prop) { return prop === primaryKey.keyPath; });
res.results.forEach(function (pk) { return idxVals[pkPos] = pk; });
getRangeSet(idx.name).addKeys(idxVals);
});
}
}
trans.mutatedParts = extendObservabilitySet(trans.mutatedParts || {}, mutatedParts);
return res;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

15
node_modules/dexie/dist/dexie.mjs generated vendored
View file

@ -4,7 +4,7 @@
*
* By David Fahlander, david.fahlander@gmail.com
*
* Version 4.0.1, Tue Mar 26 2024
* Version 4.0.4, Wed Apr 10 2024
*
* https://dexie.org
*
@ -1144,7 +1144,7 @@ function tempTransaction(db, mode, storeNames, fn) {
}
}
var DEXIE_VERSION = '4.0.1';
var DEXIE_VERSION = '4.0.4';
var maxString = String.fromCharCode(65535);
var minKey = -Infinity;
var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@ -4579,8 +4579,9 @@ var observabilityMiddleware = {
}, table: function (tableName) {
var table = core.table(tableName);
var schema = table.schema;
var primaryKey = schema.primaryKey;
var primaryKey = schema.primaryKey, indexes = schema.indexes;
var extractKey = primaryKey.extractKey, outbound = primaryKey.outbound;
var indexesWithAutoIncPK = primaryKey.autoIncrement && indexes.filter(function (index) { return index.compound && index.keyPath.includes(primaryKey.keyPath); });
var tableClone = __assign(__assign({}, table), { mutate: function (req) {
var trans = req.trans;
var mutatedParts = req.mutatedParts || (req.mutatedParts = {});
@ -4623,6 +4624,14 @@ var observabilityMiddleware = {
return table.mutate(req).then(function (res) {
if (keys && (req.type === 'add' || req.type === 'put')) {
pkRangeSet.addKeys(res.results);
if (indexesWithAutoIncPK) {
indexesWithAutoIncPK.forEach(function (idx) {
var idxVals = req.values.map(function (v) { return idx.extractKey(v); });
var pkPos = idx.keyPath.findIndex(function (prop) { return prop === primaryKey.keyPath; });
res.results.forEach(function (pk) { return idxVals[pkPos] = pk; });
getRangeSet(idx.name).addKeys(idxVals);
});
}
}
trans.mutatedParts = extendObservabilitySet(trans.mutatedParts || {}, mutatedParts);
return res;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
*
* By David Fahlander, david.fahlander@gmail.com
*
* Version 4.0.1, Tue Mar 26 2024
* Version 4.0.4, Wed Apr 10 2024
*
* https://dexie.org
*
@ -1094,7 +1094,7 @@ function tempTransaction(db, mode, storeNames, fn) {
}
}
const DEXIE_VERSION = '4.0.1';
const DEXIE_VERSION = '4.0.4';
const maxString = String.fromCharCode(65535);
const minKey = -Infinity;
const INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@ -4467,8 +4467,9 @@ const observabilityMiddleware = {
table: (tableName) => {
const table = core.table(tableName);
const { schema } = table;
const { primaryKey } = schema;
const { primaryKey, indexes } = schema;
const { extractKey, outbound } = primaryKey;
const indexesWithAutoIncPK = primaryKey.autoIncrement && indexes.filter((index) => index.compound && index.keyPath.includes(primaryKey.keyPath));
const tableClone = {
...table,
mutate: (req) => {
@ -4513,6 +4514,14 @@ const observabilityMiddleware = {
return table.mutate(req).then((res) => {
if (keys && (req.type === 'add' || req.type === 'put')) {
pkRangeSet.addKeys(res.results);
if (indexesWithAutoIncPK) {
indexesWithAutoIncPK.forEach(idx => {
const idxVals = req.values.map(v => idx.extractKey(v));
const pkPos = idx.keyPath.findIndex(prop => prop === primaryKey.keyPath);
res.results.forEach(pk => idxVals[pkPos] = pk);
getRangeSet(idx.name).addKeys(idxVals);
});
}
}
trans.mutatedParts = extendObservabilitySet(trans.mutatedParts || {}, mutatedParts);
return res;

File diff suppressed because one or more lines are too long

2
node_modules/dexie/package.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "dexie",
"version": "4.0.1",
"version": "4.0.4",
"description": "A Minimalistic Wrapper for IndexedDB",
"main": "dist/dexie.js",
"module": "dist/dexie.mjs",

View file

@ -1,9 +0,0 @@
packages:
# The "dexie" package in the root
- '.'
# all packages in direct subdirs of addons/
- 'addons/*'
# all packages in direct subdirs of libs/
- 'libs/*'
# Dexie cloud todo app
- 'samples/dexie-cloud-todo-app'

3
node_modules/dexie/tsconfig.json generated vendored
View file

@ -1,3 +0,0 @@
{
"extends": "./src/tsconfig.json",
}

43
node_modules/hls.js/dist/hls.js generated vendored
View file

@ -552,7 +552,7 @@
// Some browsers don't allow to use bind on console object anyway
// fallback to default if needed
try {
exportedLogger.log("Debug logs enabled for \"" + id + "\" in hls.js version " + "1.5.7");
exportedLogger.log("Debug logs enabled for \"" + id + "\" in hls.js version " + "1.5.8");
} catch (e) {
exportedLogger = fakeLogger;
}
@ -3126,6 +3126,9 @@
var mms = (preferManagedMediaSource || !self.MediaSource) && self.ManagedMediaSource;
return mms || self.MediaSource || self.WebKitMediaSource;
}
function isManagedMediaSource(source) {
return typeof self !== 'undefined' && source === self.ManagedMediaSource;
}
// from http://mp4ra.org/codecs.html
// values indicate codec selection preference (lower is higher priority)
@ -3285,7 +3288,7 @@
if (parsedCodec && parsedCodec !== 'mp4a') {
return parsedCodec;
}
return levelCodec;
return levelCodec ? levelCodec.split(',')[0] : levelCodec;
}
function convertAVC1ToAVCOTI(codec) {
// Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
@ -5177,12 +5180,15 @@
Yes: "YES",
v2: "v2"
};
function getSkipValue(details, msn) {
function getSkipValue(details) {
var canSkipUntil = details.canSkipUntil,
canSkipDateRanges = details.canSkipDateRanges,
endSN = details.endSN;
var snChangeGoal = msn !== undefined ? msn - endSN : 0;
if (canSkipUntil && snChangeGoal < canSkipUntil) {
age = details.age;
// A Client SHOULD NOT request a Playlist Delta Update unless it already
// has a version of the Playlist that is no older than one-half of the Skip Boundary.
// @see: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.3.7
var playlistRecentEnough = age < canSkipUntil / 2;
if (canSkipUntil && playlistRecentEnough) {
if (canSkipDateRanges) {
return HlsSkip.v2;
}
@ -6371,7 +6377,7 @@
this.canLoad = false;
this.clearTimer();
};
_proto.switchParams = function switchParams(playlistUri, previous) {
_proto.switchParams = function switchParams(playlistUri, previous, current) {
var renditionReports = previous == null ? void 0 : previous.renditionReports;
if (renditionReports) {
var foundIndex = -1;
@ -6403,7 +6409,8 @@
part += 1;
}
}
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, HlsSkip.No);
var skip = current && getSkipValue(current);
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, skip);
}
}
};
@ -6532,7 +6539,7 @@
}
};
_proto.getDeliveryDirectives = function getDeliveryDirectives(details, previousDeliveryDirectives, msn, part) {
var skip = getSkipValue(details, msn);
var skip = getSkipValue(details);
if (previousDeliveryDirectives != null && previousDeliveryDirectives.skip && details.deltaUpdateFailed) {
msn = previousDeliveryDirectives.msn;
part = previousDeliveryDirectives.part;
@ -7074,6 +7081,9 @@
return;
}
var audioGroup = audioTracksByGroup.groups[audioGroupId];
if (!audioGroup) {
return;
}
// Default audio is any group with DEFAULT=YES, or if missing then any group with AUTOSELECT=YES, or all variants
tier.hasDefaultAudio = tier.hasDefaultAudio || audioTracksByGroup.hasDefaultAudio ? audioGroup.hasDefault : audioGroup.hasAutoSelect || !audioTracksByGroup.hasDefaultAudio && !audioTracksByGroup.hasAutoSelectAudio;
Object.keys(audioGroup.channels).forEach(function (channels) {
@ -17176,7 +17186,7 @@
if (trackLoaded) {
return;
}
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details);
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details, track.details);
this.loadPlaylist(hlsUrlParameters);
};
_proto.findTrackId = function findTrackId(currentTrack) {
@ -18085,7 +18095,7 @@
type: type,
url: url
});
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details);
var hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details, track.details);
this.loadPlaylist(hlsUrlParameters);
};
_createClass(SubtitleTrackController, [{
@ -18275,7 +18285,7 @@
};
this.hls = hls;
var logPrefix = '[buffer-controller]';
this.appendSource = hls.config.preferManagedMediaSource && typeof self !== 'undefined' && self.ManagedMediaSource;
this.appendSource = isManagedMediaSource(getMediaSource(hls.config.preferManagedMediaSource));
this.log = logger.log.bind(logger, logPrefix);
this.warn = logger.warn.bind(logger, logPrefix);
this.error = logger.error.bind(logger, logPrefix);
@ -18958,12 +18968,13 @@
}
var _loop = function _loop(trackName) {
if (!sourceBuffer[trackName]) {
var _track$levelCodec;
var track = tracks[trackName];
if (!track) {
throw Error("source buffer exists for track " + trackName + ", however track does not");
}
// use levelCodec as first priority
var codec = track.levelCodec || track.codec;
// use levelCodec as first priority unless it contains multiple comma-separated codec values
var codec = ((_track$levelCodec = track.levelCodec) == null ? void 0 : _track$levelCodec.indexOf(',')) === -1 ? track.levelCodec : track.codec;
if (codec) {
if (trackName.slice(0, 5) === 'audio') {
codec = getCodecCompatibleName(codec, _this11.appendSource);
@ -26549,7 +26560,7 @@
var levelDetails = level.details;
if (!levelDetails || levelDetails.live) {
// level not retrieved yet, or live playlist we need to (re)load it
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details);
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details, levelDetails);
this.loadPlaylist(hlsUrlParameters);
}
}
@ -29197,7 +29208,7 @@
* Get the video-dev/hls.js package version.
*/
function get() {
return "1.5.7";
return "1.5.8";
}
}, {
key: "Events",

View file

@ -200,7 +200,7 @@ export declare class BasePlaylistController implements NetworkComponentAPI {
protected clearTimer(): void;
startLoad(): void;
stopLoad(): void;
protected switchParams(playlistUri: string, previous: LevelDetails | undefined): HlsUrlParameters | undefined;
protected switchParams(playlistUri: string, previous: LevelDetails | undefined, current: LevelDetails | undefined): HlsUrlParameters | undefined;
protected loadPlaylist(hlsUrlParameters?: HlsUrlParameters): void;
protected shouldLoadPlaylist(playlist: Level | MediaPlaylist | null | undefined): boolean;
protected shouldReloadPlaylist(playlist: Level | MediaPlaylist | null | undefined): boolean;

File diff suppressed because one or more lines are too long

View file

@ -521,7 +521,7 @@
// Some browsers don't allow to use bind on console object anyway
// fallback to default if needed
try {
exportedLogger.log("Debug logs enabled for \"" + id + "\" in hls.js version " + "1.5.7");
exportedLogger.log("Debug logs enabled for \"" + id + "\" in hls.js version " + "1.5.8");
} catch (e) {
exportedLogger = fakeLogger;
}
@ -2689,6 +2689,9 @@
var mms = (preferManagedMediaSource || !self.MediaSource) && self.ManagedMediaSource;
return mms || self.MediaSource || self.WebKitMediaSource;
}
function isManagedMediaSource(source) {
return typeof self !== 'undefined' && source === self.ManagedMediaSource;
}
// from http://mp4ra.org/codecs.html
// values indicate codec selection preference (lower is higher priority)
@ -2848,7 +2851,7 @@
if (parsedCodec && parsedCodec !== 'mp4a') {
return parsedCodec;
}
return levelCodec;
return levelCodec ? levelCodec.split(',')[0] : levelCodec;
}
function convertAVC1ToAVCOTI(codec) {
// Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
@ -4651,12 +4654,15 @@
Yes: "YES",
v2: "v2"
};
function getSkipValue(details, msn) {
function getSkipValue(details) {
var canSkipUntil = details.canSkipUntil,
canSkipDateRanges = details.canSkipDateRanges,
endSN = details.endSN;
var snChangeGoal = msn !== undefined ? msn - endSN : 0;
if (canSkipUntil && snChangeGoal < canSkipUntil) {
age = details.age;
// A Client SHOULD NOT request a Playlist Delta Update unless it already
// has a version of the Playlist that is no older than one-half of the Skip Boundary.
// @see: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.3.7
var playlistRecentEnough = age < canSkipUntil / 2;
if (canSkipUntil && playlistRecentEnough) {
if (canSkipDateRanges) {
return HlsSkip.v2;
}
@ -5845,7 +5851,7 @@
this.canLoad = false;
this.clearTimer();
};
_proto.switchParams = function switchParams(playlistUri, previous) {
_proto.switchParams = function switchParams(playlistUri, previous, current) {
var renditionReports = previous == null ? void 0 : previous.renditionReports;
if (renditionReports) {
var foundIndex = -1;
@ -5877,7 +5883,8 @@
part += 1;
}
}
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, HlsSkip.No);
var skip = current && getSkipValue(current);
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, skip);
}
}
};
@ -6006,7 +6013,7 @@
}
};
_proto.getDeliveryDirectives = function getDeliveryDirectives(details, previousDeliveryDirectives, msn, part) {
var skip = getSkipValue(details, msn);
var skip = getSkipValue(details);
if (previousDeliveryDirectives != null && previousDeliveryDirectives.skip && details.deltaUpdateFailed) {
msn = previousDeliveryDirectives.msn;
part = previousDeliveryDirectives.part;
@ -6407,19 +6414,6 @@
tier.maxScore = Math.max(tier.maxScore, level.score);
tier.fragmentError += level.fragmentError;
tier.videoRanges[level.videoRange] = (tier.videoRanges[level.videoRange] || 0) + 1;
if (audioGroups) {
audioGroups.forEach(function (audioGroupId) {
if (!audioGroupId) {
return;
}
var audioGroup = audioTracksByGroup.groups[audioGroupId];
// Default audio is any group with DEFAULT=YES, or if missing then any group with AUTOSELECT=YES, or all variants
tier.hasDefaultAudio = tier.hasDefaultAudio || audioTracksByGroup.hasDefaultAudio ? audioGroup.hasDefault : audioGroup.hasAutoSelect || !audioTracksByGroup.hasDefaultAudio && !audioTracksByGroup.hasAutoSelectAudio;
Object.keys(audioGroup.channels).forEach(function (channels) {
tier.channels[channels] = (tier.channels[channels] || 0) + audioGroup.channels[channels];
});
});
}
return tiers;
}, {});
}
@ -7313,7 +7307,7 @@
};
this.hls = hls;
var logPrefix = '[buffer-controller]';
this.appendSource = hls.config.preferManagedMediaSource && typeof self !== 'undefined' && self.ManagedMediaSource;
this.appendSource = isManagedMediaSource(getMediaSource(hls.config.preferManagedMediaSource));
this.log = logger.log.bind(logger, logPrefix);
this.warn = logger.warn.bind(logger, logPrefix);
this.error = logger.error.bind(logger, logPrefix);
@ -7996,12 +7990,13 @@
}
var _loop = function _loop(trackName) {
if (!sourceBuffer[trackName]) {
var _track$levelCodec;
var track = tracks[trackName];
if (!track) {
throw Error("source buffer exists for track " + trackName + ", however track does not");
}
// use levelCodec as first priority
var codec = track.levelCodec || track.codec;
// use levelCodec as first priority unless it contains multiple comma-separated codec values
var codec = ((_track$levelCodec = track.levelCodec) == null ? void 0 : _track$levelCodec.indexOf(',')) === -1 ? track.levelCodec : track.codec;
if (codec) {
if (trackName.slice(0, 5) === 'audio') {
codec = getCodecCompatibleName(codec, _this11.appendSource);
@ -10377,7 +10372,7 @@
var levelDetails = level.details;
if (!levelDetails || levelDetails.live) {
// level not retrieved yet, or live playlist we need to (re)load it
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details);
var hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details, levelDetails);
this.loadPlaylist(hlsUrlParameters);
}
}
@ -21048,7 +21043,7 @@
* Get the video-dev/hls.js package version.
*/
function get() {
return "1.5.7";
return "1.5.8";
}
}, {
key: "Events",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -411,7 +411,7 @@ function enableLogs(debugConfig, id) {
// Some browsers don't allow to use bind on console object anyway
// fallback to default if needed
try {
exportedLogger.log(`Debug logs enabled for "${id}" in hls.js version ${"1.5.7"}`);
exportedLogger.log(`Debug logs enabled for "${id}" in hls.js version ${"1.5.8"}`);
} catch (e) {
exportedLogger = fakeLogger;
}
@ -2489,6 +2489,9 @@ function getMediaSource(preferManagedMediaSource = true) {
const mms = (preferManagedMediaSource || !self.MediaSource) && self.ManagedMediaSource;
return mms || self.MediaSource || self.WebKitMediaSource;
}
function isManagedMediaSource(source) {
return typeof self !== 'undefined' && source === self.ManagedMediaSource;
}
// from http://mp4ra.org/codecs.html
// values indicate codec selection preference (lower is higher priority)
@ -2632,7 +2635,7 @@ function pickMostCompleteCodecName(parsedCodec, levelCodec) {
if (parsedCodec && parsedCodec !== 'mp4a') {
return parsedCodec;
}
return levelCodec;
return levelCodec ? levelCodec.split(',')[0] : levelCodec;
}
function convertAVC1ToAVCOTI(codec) {
// Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
@ -4438,14 +4441,17 @@ var HlsSkip = {
Yes: "YES",
v2: "v2"
};
function getSkipValue(details, msn) {
function getSkipValue(details) {
const {
canSkipUntil,
canSkipDateRanges,
endSN
age
} = details;
const snChangeGoal = msn !== undefined ? msn - endSN : 0;
if (canSkipUntil && snChangeGoal < canSkipUntil) {
// A Client SHOULD NOT request a Playlist Delta Update unless it already
// has a version of the Playlist that is no older than one-half of the Skip Boundary.
// @see: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.3.7
const playlistRecentEnough = age < canSkipUntil / 2;
if (canSkipUntil && playlistRecentEnough) {
if (canSkipDateRanges) {
return HlsSkip.v2;
}
@ -5571,7 +5577,7 @@ class BasePlaylistController {
this.canLoad = false;
this.clearTimer();
}
switchParams(playlistUri, previous) {
switchParams(playlistUri, previous, current) {
const renditionReports = previous == null ? void 0 : previous.renditionReports;
if (renditionReports) {
let foundIndex = -1;
@ -5603,7 +5609,8 @@ class BasePlaylistController {
part += 1;
}
}
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, HlsSkip.No);
const skip = current && getSkipValue(current);
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, skip);
}
}
}
@ -5731,7 +5738,7 @@ class BasePlaylistController {
}
}
getDeliveryDirectives(details, previousDeliveryDirectives, msn, part) {
let skip = getSkipValue(details, msn);
let skip = getSkipValue(details);
if (previousDeliveryDirectives != null && previousDeliveryDirectives.skip && details.deltaUpdateFailed) {
msn = previousDeliveryDirectives.msn;
part = previousDeliveryDirectives.part;
@ -6110,19 +6117,6 @@ function getCodecTiers(levels, audioTracksByGroup, minAutoLevel, maxAutoLevel) {
tier.maxScore = Math.max(tier.maxScore, level.score);
tier.fragmentError += level.fragmentError;
tier.videoRanges[level.videoRange] = (tier.videoRanges[level.videoRange] || 0) + 1;
if (audioGroups) {
audioGroups.forEach(audioGroupId => {
if (!audioGroupId) {
return;
}
const audioGroup = audioTracksByGroup.groups[audioGroupId];
// Default audio is any group with DEFAULT=YES, or if missing then any group with AUTOSELECT=YES, or all variants
tier.hasDefaultAudio = tier.hasDefaultAudio || audioTracksByGroup.hasDefaultAudio ? audioGroup.hasDefault : audioGroup.hasAutoSelect || !audioTracksByGroup.hasDefaultAudio && !audioTracksByGroup.hasAutoSelectAudio;
Object.keys(audioGroup.channels).forEach(channels => {
tier.channels[channels] = (tier.channels[channels] || 0) + audioGroup.channels[channels];
});
});
}
return tiers;
}, {});
}
@ -7027,7 +7021,7 @@ class BufferController {
};
this.hls = hls;
const logPrefix = '[buffer-controller]';
this.appendSource = hls.config.preferManagedMediaSource && typeof self !== 'undefined' && self.ManagedMediaSource;
this.appendSource = isManagedMediaSource(getMediaSource(hls.config.preferManagedMediaSource));
this.log = logger.log.bind(logger, logPrefix);
this.warn = logger.warn.bind(logger, logPrefix);
this.error = logger.error.bind(logger, logPrefix);
@ -7730,12 +7724,13 @@ class BufferController {
}
for (const trackName in tracks) {
if (!sourceBuffer[trackName]) {
var _track$levelCodec;
const track = tracks[trackName];
if (!track) {
throw Error(`source buffer exists for track ${trackName}, however track does not`);
}
// use levelCodec as first priority
let codec = track.levelCodec || track.codec;
// use levelCodec as first priority unless it contains multiple comma-separated codec values
let codec = ((_track$levelCodec = track.levelCodec) == null ? void 0 : _track$levelCodec.indexOf(',')) === -1 ? track.levelCodec : track.codec;
if (codec) {
if (trackName.slice(0, 5) === 'audio') {
codec = getCodecCompatibleName(codec, this.appendSource);
@ -9950,7 +9945,7 @@ class LevelController extends BasePlaylistController {
const levelDetails = level.details;
if (!levelDetails || levelDetails.live) {
// level not retrieved yet, or live playlist we need to (re)load it
const hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details);
const hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details, levelDetails);
this.loadPlaylist(hlsUrlParameters);
}
}
@ -19712,7 +19707,7 @@ class Hls {
* Get the video-dev/hls.js package version.
*/
static get version() {
return "1.5.7";
return "1.5.8";
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

43
node_modules/hls.js/dist/hls.mjs generated vendored
View file

@ -411,7 +411,7 @@ function enableLogs(debugConfig, id) {
// Some browsers don't allow to use bind on console object anyway
// fallback to default if needed
try {
exportedLogger.log(`Debug logs enabled for "${id}" in hls.js version ${"1.5.7"}`);
exportedLogger.log(`Debug logs enabled for "${id}" in hls.js version ${"1.5.8"}`);
} catch (e) {
exportedLogger = fakeLogger;
}
@ -2884,6 +2884,9 @@ function getMediaSource(preferManagedMediaSource = true) {
const mms = (preferManagedMediaSource || !self.MediaSource) && self.ManagedMediaSource;
return mms || self.MediaSource || self.WebKitMediaSource;
}
function isManagedMediaSource(source) {
return typeof self !== 'undefined' && source === self.ManagedMediaSource;
}
// from http://mp4ra.org/codecs.html
// values indicate codec selection preference (lower is higher priority)
@ -3027,7 +3030,7 @@ function pickMostCompleteCodecName(parsedCodec, levelCodec) {
if (parsedCodec && parsedCodec !== 'mp4a') {
return parsedCodec;
}
return levelCodec;
return levelCodec ? levelCodec.split(',')[0] : levelCodec;
}
function convertAVC1ToAVCOTI(codec) {
// Convert avc1 codec string from RFC-4281 to RFC-6381 for MediaSource.isTypeSupported
@ -4922,14 +4925,17 @@ var HlsSkip = {
Yes: "YES",
v2: "v2"
};
function getSkipValue(details, msn) {
function getSkipValue(details) {
const {
canSkipUntil,
canSkipDateRanges,
endSN
age
} = details;
const snChangeGoal = msn !== undefined ? msn - endSN : 0;
if (canSkipUntil && snChangeGoal < canSkipUntil) {
// A Client SHOULD NOT request a Playlist Delta Update unless it already
// has a version of the Playlist that is no older than one-half of the Skip Boundary.
// @see: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.3.7
const playlistRecentEnough = age < canSkipUntil / 2;
if (canSkipUntil && playlistRecentEnough) {
if (canSkipDateRanges) {
return HlsSkip.v2;
}
@ -6055,7 +6061,7 @@ class BasePlaylistController {
this.canLoad = false;
this.clearTimer();
}
switchParams(playlistUri, previous) {
switchParams(playlistUri, previous, current) {
const renditionReports = previous == null ? void 0 : previous.renditionReports;
if (renditionReports) {
let foundIndex = -1;
@ -6087,7 +6093,8 @@ class BasePlaylistController {
part += 1;
}
}
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, HlsSkip.No);
const skip = current && getSkipValue(current);
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, skip);
}
}
}
@ -6215,7 +6222,7 @@ class BasePlaylistController {
}
}
getDeliveryDirectives(details, previousDeliveryDirectives, msn, part) {
let skip = getSkipValue(details, msn);
let skip = getSkipValue(details);
if (previousDeliveryDirectives != null && previousDeliveryDirectives.skip && details.deltaUpdateFailed) {
msn = previousDeliveryDirectives.msn;
part = previousDeliveryDirectives.part;
@ -6725,6 +6732,9 @@ function getCodecTiers(levels, audioTracksByGroup, minAutoLevel, maxAutoLevel) {
return;
}
const audioGroup = audioTracksByGroup.groups[audioGroupId];
if (!audioGroup) {
return;
}
// Default audio is any group with DEFAULT=YES, or if missing then any group with AUTOSELECT=YES, or all variants
tier.hasDefaultAudio = tier.hasDefaultAudio || audioTracksByGroup.hasDefaultAudio ? audioGroup.hasDefault : audioGroup.hasAutoSelect || !audioTracksByGroup.hasDefaultAudio && !audioTracksByGroup.hasAutoSelectAudio;
Object.keys(audioGroup.channels).forEach(channels => {
@ -16665,7 +16675,7 @@ class AudioTrackController extends BasePlaylistController {
if (trackLoaded) {
return;
}
const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details);
const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details, track.details);
this.loadPlaylist(hlsUrlParameters);
}
findTrackId(currentTrack) {
@ -17581,7 +17591,7 @@ class SubtitleTrackController extends BasePlaylistController {
type,
url
});
const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details);
const hlsUrlParameters = this.switchParams(track.url, lastTrack == null ? void 0 : lastTrack.details, track.details);
this.loadPlaylist(hlsUrlParameters);
}
}
@ -17736,7 +17746,7 @@ class BufferController {
};
this.hls = hls;
const logPrefix = '[buffer-controller]';
this.appendSource = hls.config.preferManagedMediaSource && typeof self !== 'undefined' && self.ManagedMediaSource;
this.appendSource = isManagedMediaSource(getMediaSource(hls.config.preferManagedMediaSource));
this.log = logger.log.bind(logger, logPrefix);
this.warn = logger.warn.bind(logger, logPrefix);
this.error = logger.error.bind(logger, logPrefix);
@ -18439,12 +18449,13 @@ class BufferController {
}
for (const trackName in tracks) {
if (!sourceBuffer[trackName]) {
var _track$levelCodec;
const track = tracks[trackName];
if (!track) {
throw Error(`source buffer exists for track ${trackName}, however track does not`);
}
// use levelCodec as first priority
let codec = track.levelCodec || track.codec;
// use levelCodec as first priority unless it contains multiple comma-separated codec values
let codec = ((_track$levelCodec = track.levelCodec) == null ? void 0 : _track$levelCodec.indexOf(',')) === -1 ? track.levelCodec : track.codec;
if (codec) {
if (trackName.slice(0, 5) === 'audio') {
codec = getCodecCompatibleName(codec, this.appendSource);
@ -25770,7 +25781,7 @@ class LevelController extends BasePlaylistController {
const levelDetails = level.details;
if (!levelDetails || levelDetails.live) {
// level not retrieved yet, or live playlist we need to (re)load it
const hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details);
const hlsUrlParameters = this.switchParams(level.uri, lastLevel == null ? void 0 : lastLevel.details, levelDetails);
this.loadPlaylist(hlsUrlParameters);
}
}
@ -27712,7 +27723,7 @@ class Hls {
* Get the video-dev/hls.js package version.
*/
static get version() {
return "1.5.7";
return "1.5.8";
}
/**

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
node_modules/hls.js/package.json generated vendored
View file

@ -130,5 +130,5 @@
"url-toolkit": "2.2.5",
"wrangler": "3.22.4"
},
"version": "1.5.7"
"version": "1.5.8"
}

View file

@ -339,7 +339,11 @@ class AudioTrackController extends BasePlaylistController {
if (trackLoaded) {
return;
}
const hlsUrlParameters = this.switchParams(track.url, lastTrack?.details);
const hlsUrlParameters = this.switchParams(
track.url,
lastTrack?.details,
track.details,
);
this.loadPlaylist(hlsUrlParameters);
}

View file

@ -55,6 +55,7 @@ export default class BasePlaylistController implements NetworkComponentAPI {
protected switchParams(
playlistUri: string,
previous: LevelDetails | undefined,
current: LevelDetails | undefined,
): HlsUrlParameters | undefined {
const renditionReports = previous?.renditionReports;
if (renditionReports) {
@ -92,11 +93,8 @@ export default class BasePlaylistController implements NetworkComponentAPI {
part += 1;
}
}
return new HlsUrlParameters(
msn,
part >= 0 ? part : undefined,
HlsSkip.No,
);
const skip = current && getSkipValue(current);
return new HlsUrlParameters(msn, part >= 0 ? part : undefined, skip);
}
}
}
@ -298,7 +296,7 @@ export default class BasePlaylistController implements NetworkComponentAPI {
msn?: number,
part?: number,
): HlsUrlParameters {
let skip = getSkipValue(details, msn);
let skip = getSkipValue(details);
if (previousDeliveryDirectives?.skip && details.deltaUpdateFailed) {
msn = previousDeliveryDirectives.msn;
part = previousDeliveryDirectives.part;

View file

@ -6,7 +6,10 @@ import {
getCodecCompatibleName,
pickMostCompleteCodecName,
} from '../utils/codecs';
import { getMediaSource } from '../utils/mediasource-helper';
import {
getMediaSource,
isManagedMediaSource,
} from '../utils/mediasource-helper';
import { ElementaryStreamTypes } from '../loader/fragment';
import type { TrackSet } from '../types/track';
import BufferOperationQueue from './buffer-operation-queue';
@ -89,10 +92,9 @@ export default class BufferController implements ComponentAPI {
constructor(hls: Hls) {
this.hls = hls;
const logPrefix = '[buffer-controller]';
this.appendSource =
hls.config.preferManagedMediaSource &&
typeof self !== 'undefined' &&
(self as any).ManagedMediaSource;
this.appendSource = isManagedMediaSource(
getMediaSource(hls.config.preferManagedMediaSource),
);
this.log = logger.log.bind(logger, logPrefix);
this.warn = logger.warn.bind(logger, logPrefix);
this.error = logger.error.bind(logger, logPrefix);
@ -190,6 +192,7 @@ export default class BufferController implements ComponentAPI {
) {
const media = (this.media = data.media);
const MediaSource = getMediaSource(this.appendSource);
if (media && MediaSource) {
const ms = (this.mediaSource = new MediaSource());
this.log(`created media source: ${ms.constructor?.name}`);
@ -926,8 +929,11 @@ export default class BufferController implements ComponentAPI {
`source buffer exists for track ${trackName}, however track does not`,
);
}
// use levelCodec as first priority
let codec = track.levelCodec || track.codec;
// use levelCodec as first priority unless it contains multiple comma-separated codec values
let codec =
track.levelCodec?.indexOf(',') === -1
? track.levelCodec
: track.codec;
if (codec) {
if (trackName.slice(0, 5) === 'audio') {
codec = getCodecCompatibleName(codec, this.appendSource);

View file

@ -473,7 +473,11 @@ export default class LevelController extends BasePlaylistController {
const levelDetails = level.details;
if (!levelDetails || levelDetails.live) {
// level not retrieved yet, or live playlist we need to (re)load it
const hlsUrlParameters = this.switchParams(level.uri, lastLevel?.details);
const hlsUrlParameters = this.switchParams(
level.uri,
lastLevel?.details,
levelDetails,
);
this.loadPlaylist(hlsUrlParameters);
}
}

View file

@ -535,7 +535,11 @@ class SubtitleTrackController extends BasePlaylistController {
type,
url,
});
const hlsUrlParameters = this.switchParams(track.url, lastTrack?.details);
const hlsUrlParameters = this.switchParams(
track.url,
lastTrack?.details,
track.details,
);
this.loadPlaylist(hlsUrlParameters);
}

View file

@ -59,10 +59,13 @@ export const enum HlsSkip {
v2 = 'v2',
}
export function getSkipValue(details: LevelDetails, msn?: number): HlsSkip {
const { canSkipUntil, canSkipDateRanges, endSN } = details;
const snChangeGoal = msn !== undefined ? msn - endSN : 0;
if (canSkipUntil && snChangeGoal < canSkipUntil) {
export function getSkipValue(details: LevelDetails): HlsSkip {
const { canSkipUntil, canSkipDateRanges, age } = details;
// A Client SHOULD NOT request a Playlist Delta Update unless it already
// has a version of the Playlist that is no older than one-half of the Skip Boundary.
// @see: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.3.7
const playlistRecentEnough = age < canSkipUntil / 2;
if (canSkipUntil && playlistRecentEnough) {
if (canSkipDateRanges) {
return HlsSkip.v2;
}

View file

@ -193,7 +193,7 @@ export function pickMostCompleteCodecName(
if (parsedCodec && parsedCodec !== 'mp4a') {
return parsedCodec;
}
return levelCodec;
return levelCodec ? levelCodec.split(',')[0] : levelCodec;
}
export function convertAVC1ToAVCOTI(codec: string) {

View file

@ -15,3 +15,9 @@ export function getMediaSource(
((self as any).WebKitMediaSource as typeof MediaSource)
);
}
export function isManagedMediaSource(source: typeof MediaSource | undefined) {
return (
typeof self !== 'undefined' && source === (self as any).ManagedMediaSource
);
}

View file

@ -269,12 +269,15 @@ export function getCodecTiers(
tier.fragmentError += level.fragmentError;
tier.videoRanges[level.videoRange] =
(tier.videoRanges[level.videoRange] || 0) + 1;
if (audioGroups) {
if (__USE_ALT_AUDIO__ && audioGroups) {
audioGroups.forEach((audioGroupId) => {
if (!audioGroupId) {
return;
}
const audioGroup = audioTracksByGroup.groups[audioGroupId];
if (!audioGroup) {
return;
}
// Default audio is any group with DEFAULT=YES, or if missing then any group with AUTOSELECT=YES, or all variants
tier.hasDefaultAudio =
tier.hasDefaultAudio || audioTracksByGroup.hasDefaultAudio

9
node_modules/tinymce/CHANGELOG.md generated vendored
View file

@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## 7.0.1 - 2024-04-10
### Fixed
- Toggle list behavior generated wrong html when the `forced_root_block` option was set to `div`. #TINY-10488
- Tapping inside a composed text on Firefox Android would not close the autocompleter. #TINY-10715
- An inline editor toolbar now behaves correctly in horizontally scrolled containers. #TINY-10684
- Tooltips unintended shrinking and incorrectly positioned when shown in horizontally scrollable container. #TINY-10797
- The status bar was invisible when the editor's height is short. #TINY-10705
## 7.0.0 - 2024-03-20
### Added

20
node_modules/tinymce/README.md generated vendored
View file

@ -8,7 +8,7 @@ Used and trusted by millions of developers, TinyMCE is the worlds most custom
With more than 350M+ downloads every year, were also one of the most trusted enterprise-grade open source HTML editors on the internet. Theres currently more than 100M+ products worldwide, powered by Tiny. As a high powered WYSIWYG editor, TinyMCE is built to scale, designed to innovate, and thrives on delivering results to difficult edge-cases.
You can access a [full featured demo of TinyMCE](https://www.tiny.cloud/docs/tinymce/6/premium-full-featured/) in the docs on the TinyMCE website.
You can access a [full featured demo of TinyMCE](https://www.tiny.cloud/docs/tinymce/7/premium-full-featured/) in the docs on the TinyMCE website.
<p align="center">
<img alt="Screenshot of the TinyMCE Editor" src="https://www.tiny.cloud/storage/github-readme-images/tinymce-editor-6x.png"\>
@ -18,17 +18,17 @@ You can access a [full featured demo of TinyMCE](https://www.tiny.cloud/docs/tin
Getting started with the TinyMCE rich text editor is easy, and for simple configurations can be done in less than 5 minutes.
[TinyMCE Cloud Deployment Quick Start Guide](https://www.tiny.cloud/docs/tinymce/6/cloud-quick-start/)
[TinyMCE Cloud Deployment Quick Start Guide](https://www.tiny.cloud/docs/tinymce/7/cloud-quick-start/)
[TinyMCE Self-hosted Deployment Guide](https://www.tiny.cloud/docs/tinymce/6/npm-projects/)
[TinyMCE Self-hosted Deployment Guide](https://www.tiny.cloud/docs/tinymce/7/npm-projects/)
TinyMCE provides a range of configuration options that allow you to integrate it into your application. Start customizing with a [basic setup](https://www.tiny.cloud/docs/tinymce/6/basic-setup/).
TinyMCE provides a range of configuration options that allow you to integrate it into your application. Start customizing with a [basic setup](https://www.tiny.cloud/docs/tinymce/7/basic-setup/).
Configure it for one of three modes of editing:
- [TinyMCE classic editing mode](https://www.tiny.cloud/docs/tinymce/6/use-tinymce-classic/).
- [TinyMCE inline editing mode](https://www.tiny.cloud/docs/tinymce/6/use-tinymce-inline/).
- [TinyMCE distraction-free editing mode](https://www.tiny.cloud/docs/tinymce/6/use-tinymce-distraction-free/).
- [TinyMCE classic editing mode](https://www.tiny.cloud/docs/tinymce/7/use-tinymce-classic/).
- [TinyMCE inline editing mode](https://www.tiny.cloud/docs/tinymce/7/use-tinymce-inline/).
- [TinyMCE distraction-free editing mode](https://www.tiny.cloud/docs/tinymce/7/use-tinymce-distraction-free/).
## Features
@ -40,11 +40,11 @@ TinyMCE is easily integrated into your projects with the help of components such
- [tinymce-vue](https://github.com/tinymce/tinymce-vue)
- [tinymce-angular](https://github.com/tinymce/tinymce-angular)
With over 29 integrations, and 400+ APIs, see the TinyMCE docs for a full list of editor [integrations](https://www.tiny.cloud/docs/tinymce/6/integrations/).
With over 29 integrations, and 400+ APIs, see the TinyMCE docs for a full list of editor [integrations](https://www.tiny.cloud/docs/tinymce/7/integrations/).
### Customization
It is easy to [configure the UI](https://www.tiny.cloud/docs/tinymce/6/customize-ui/) of your rich text editor to match the design of your site, product or application. Due to its flexibility, you can [configure the editor](https://www.tiny.cloud/docs/tinymce/6/basic-setup/) with as much or as little functionality as you like, depending on your requirements.
It is easy to [configure the UI](https://www.tiny.cloud/docs/tinymce/7/customize-ui/) of your rich text editor to match the design of your site, product or application. Due to its flexibility, you can [configure the editor](https://www.tiny.cloud/docs/tinymce/7/basic-setup/) with as much or as little functionality as you like, depending on your requirements.
With [50+ powerful plugins available](https://www.tiny.cloud/tinymce/features/), and content editable as the basis of TinyMCE, adding additional functionality is as simple as including a single line of code.
@ -54,7 +54,7 @@ Realizing the full power of most plugins requires only a few lines more.
Sometimes your editor requirements can be quite unique, and you need the freedom and flexibility to innovate. Thanks to TinyMCE being open source, you can view the source code and develop your own extensions for custom functionality to meet your own requirements.
The TinyMCE [API](https://www.tiny.cloud/docs/tinymce/6/apis/tinymce.root/) is exposed to make it easier for you to write custom functionality that fits within the existing framework of TinyMCE [UI components](https://www.tiny.cloud/docs/tinymce/6/custom-ui-components/).
The TinyMCE [API](https://www.tiny.cloud/docs/tinymce/7/apis/tinymce.root/) is exposed to make it easier for you to write custom functionality that fits within the existing framework of TinyMCE [UI components](https://www.tiny.cloud/docs/tinymce/7/custom-ui-components/).
### Extended Features and Support

2
node_modules/tinymce/composer.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "tinymce/tinymce",
"version": "7.0.0",
"version": "7.0.1",
"description": "Web based JavaScript HTML WYSIWYG editor control.",
"license": [
"GPL-2.0-or-later"

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

2
node_modules/tinymce/package.json generated vendored
View file

@ -1,6 +1,6 @@
{
"name": "tinymce",
"version": "7.0.0",
"version": "7.0.1",
"repository": {
"type": "git",
"url": "https://github.com/tinymce/tinymce.git",

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=t=>i(t)||"default"===t?"":t,h=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];if(d(r=n)&&!/\btox\-/.test(r.className))return a.some(n);if(s(n,e))break}var r;return a.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),m=(t,s,r,n,i,l)=>{l.length>1?((t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=c(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:h(t,i)})})(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:h(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,c(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{m(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),m(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the List Styles plugin.")}))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=("allow_html_in_named_anchor",e=>e.options.get("allow_html_in_named_anchor"));const a="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),d=(e,a)=>{const r=s(e);r?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{const n=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{var t;l(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},c=e=>(e=>r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];c(n)&&n.attr("contenteditable",e)}},u=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{const t=(e=>{const t=s(e);return t?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(d(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>{const o=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,n=u(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:u(e)})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>l(e)})})(e)}))}))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("autolink_pattern"),o=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(a=o.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var n,o,r,a})(e));const l=(void 0,e=>undefined===e);const i=e=>!(e=>null==e)(e),c=Object.hasOwnProperty,d=e=>"\ufeff"===e;var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const f=e=>/^[(\[{ \u00a0]$/.test(e),g=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!d(t)&&n(t))return o}return-1},m=(e,t)=>{var o;const a=e.schema.getVoidElements(),s=n(e),{dom:i,selection:d}=e;if(null!==i.getParent(d.getNode(),"a[href]"))return null;const m=d.getRng(),k=u(i,(e=>{return i.isBlock(e)||(t=a,n=e.nodeName.toLowerCase(),c.call(t,n))||"false"===i.getContentEditable(e);var t,n})),{container:p,offset:y}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=3===n.nodeType?n.data.length:n.childNodes.length;return{container:n,offset:o}})(m.endContainer,m.endOffset),w=null!==(o=i.getParent(p,i.isBlock))&&void 0!==o?o:i.getRoot(),h=k.backwards(p,y+t,((e,t)=>{const n=e.data,o=g(n,t,(r=f,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),w);if(!h)return null;let v=h.container;const _=k.backwards(h.container,h.offset,((e,t)=>{v=e;const n=g(e.data,t,f);return-1===n?n:n+1}),w),A=i.createRng();_?A.setStart(_.container,_.offset):A.setStart(v,0),A.setEnd(h.container,h.offset);const C=A.toString().replace(/\uFEFF/g,"").match(s);if(C){let t=C[0];return $="www.",(b=t).length>=4&&b.substr(0,4)===$?t=r(e)+"://"+t:((e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!l(o)||r+t.length<=o)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:A,url:t}}var b,$;return null},k=(e,t)=>{const{dom:n,selection:r}=e,{rng:l,url:i}=t,c=r.getBookmark();r.setRng(l);const d="createlink",u={command:d,ui:!1,value:i};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,i),e.dispatch("ExecCommand",u);const t=o(e);if(s(t)){const o=r.getNode();n.setAttrib(o,"target",t),"_blank"!==t||a(e)||n.setAttrib(o,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},p=e=>{const t=m(e,-1);i(t)&&k(e,t)},y=p;e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=m(e,0);i(t)&&k(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?p(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&y(e)}))})(e)}))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),s=o("min_height"),i=o("max_height"),n=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),l=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},g=(e,t,o,s)=>{var i;const n=parseInt(null!==(i=e.getStyle(t,o,s))&&void 0!==i?i:"",10);return isNaN(n)?0:n},a=(e,o,r,c)=>{var d;const f=e.dom,u=e.getDoc();if(!u)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void l(e,!0);const m=u.documentElement,h=c?c():n(e),p=null!==(d=s(e))&&void 0!==d?d:e.getElement().offsetHeight;let y=p;const S=g(f,m,"margin-top",!0),v=g(f,m,"margin-bottom",!0);let C=m.offsetHeight+S+v+h;C<0&&(C=0);const b=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+b>p&&(y=C+b);const w=i(e);if(w&&y>w?(y=w,l(e,!0)):l(e,!1),y!==o.get()){const s=y-o.get();if(f.setStyle(e.getContainer(),"height",y+"px"),o.set(y),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(r)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&s<0&&a(e,o,r,c)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(e=>{let t=0;return{get:()=>t,set:e=>{t=e}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{a(e,t)}))})(e,o),((e,o)=>{let s,i,l=()=>r(e);e.on("init",(i=>{s=0;const r=n(e),g=e.dom;g.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r,"min-height":0}):g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r}),a(e,o,i,l),s+=1})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{if(1===s)i=e.getContainer().offsetHeight,a(e,o,t,l),s+=1;else if(2===s){const t=i<e.getContainer().offsetHeight;if(t){const t=e.dom,o=e.getDoc();t.setStyles(o.documentElement,{"min-height":0}),t.setStyles(e.getBody(),{"min-height":"inherit"})}l=t?(0,()=>0):l,s+=1}else a(e,o,t,l)}))})(e,o)}}))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t));const r=(void 0,t=>undefined===t);var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),d=i("autosave_retention"),m=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},v=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},f=t=>{var e;const r=parseInt(null!==(e=a.getItem(m(t)+"time"))&&void 0!==e?e:"0",10)||0;return!((new Date).getTime()-r>d(t)&&(p(t,!1),1))},p=(t,e)=>{const r=m(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},g=t=>{const e=m(t);!v(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},y=t=>{var e;const r=m(t);f(t)&&(t.setContent(null!==(e=a.getItem(r+"draft"))&&void 0!==e?e:"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};var D=tinymce.util.Tools.resolve("tinymce.EditorManager");const h=t=>e=>{e.setEnabled(f(t));const r=()=>e.setEnabled(f(t));return t.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(D.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=c(t);o.setEditorInterval(t,(()=>{g(t)}),e)})(t);const e=()=>{(t=>{t.undoManager.transact((()=>{y(t),p(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),(t=>({hasDraft:()=>f(t),storeDraft:()=>g(t),restoreDraft:()=>y(t),removeDraft:e=>p(t,e),isEmpty:e=>v(t,e)}))(t))))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const o=(e=>e.getContent({source_view:!0}))(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:o},onSubmit:o=>{((e,o)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(o)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,o.getData().code),o.close()}})})(e)}))})(e),(e=>{const o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:o})})(e),{})))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>e=>typeof e===t,o=t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(o=r=t,(n=String).prototype.isPrototypeOf(o)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===n.name)?"string":e;var o,r,n,i})(t),r=e("boolean"),n=t=>!(t=>null==t)(t),i=e("function"),s=e("number"),l=(!1,()=>false);class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return n(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=(t,e)=>{for(let o=0,r=t.length;o<r;o++)e(t[o],o)},c=t=>{if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}},d=c,h=(t,e)=>{const o=t.dom;if(1!==o.nodeType)return!1;{const t=o;if(void 0!==t.matches)return t.matches(e);if(void 0!==t.msMatchesSelector)return t.msMatchesSelector(e);if(void 0!==t.webkitMatchesSelector)return t.webkitMatchesSelector(e);if(void 0!==t.mozMatchesSelector)return t.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}};"undefined"!=typeof window?window:Function("return this;")();const m=t=>e=>(t=>t.dom.nodeType)(e)===t,g=m(1),f=m(3),v=m(9),y=m(11),p=(t,e)=>{t.dom.removeAttribute(e)},w=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?t=>d(t.dom.getRootNode()):t=>v(t)?t:d(t.dom.ownerDocument),b=t=>d(t.dom.host),N=t=>{const e=f(t)?t.dom.parentNode:t.dom;if(null==e||null===e.ownerDocument)return!1;const o=e.ownerDocument;return(t=>{const e=w(t);return y(o=e)&&n(o.dom.host)?a.some(e):a.none();var o})(d(e)).fold((()=>o.body.contains(e)),(r=N,i=b,t=>r(i(t))));var r,i},S=t=>"rtl"===((t,e)=>{const o=t.dom,r=window.getComputedStyle(o).getPropertyValue(e);return""!==r||N(t)?r:((t,e)=>(t=>void 0!==t.style&&i(t.style.getPropertyValue))(t)?t.style.getPropertyValue(e):"")(o,e)})(t,"direction")?"rtl":"ltr",A=(t,e)=>((t,o)=>((t,e)=>{const o=[];for(let r=0,n=t.length;r<n;r++){const n=t[r];e(n,r)&&o.push(n)}return o})(((t,e)=>{const o=t.length,r=new Array(o);for(let n=0;n<o;n++){const o=t[n];r[n]=e(o,n)}return r})(t.dom.childNodes,d),(t=>h(t,e))))(t),E=("li",t=>g(t)&&"li"===t.dom.nodeName.toLowerCase());const T=(t,e,n)=>{u(e,(e=>{const c=d(e),m=E(c),f=((t,e)=>{return(e?(o=t,r="ol,ul",((t,e,o)=>{let n=t.dom;const s=i(o)?o:l;for(;n.parentNode;){n=n.parentNode;const t=d(n);if(h(t,r))return a.some(t);if(s(t))break}return a.none()})(o,0,n)):a.some(t)).getOr(t);var o,r,n})(c,m);var v;(v=f,(t=>a.from(t.dom.parentNode).map(d))(v).filter(g)).each((e=>{if(t.setStyle(f.dom,"direction",null),S(e)===n?p(f,"dir"):((t,e,n)=>{((t,e,n)=>{if(!(o(n)||r(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",e,":: Value ",n,":: Element ",t),new Error("Attribute value was not simple");t.setAttribute(e,n+"")})(t.dom,e,n)})(f,"dir",n),S(f)!==n&&t.setStyle(f.dom,"direction",n),m){const e=A(f,"li[dir],li[style]");u(e,(e=>{p(e,"dir"),t.setStyle(e.dom,"direction",null)}))}}))}))},C=(t,e)=>{t.selection.isEditable()&&(T(t.dom,t.selection.getSelectedBlocks(),e),t.nodeChanged())},D=(t,e)=>o=>{const r=r=>{const n=d(r.element);o.setActive(S(n)===e),o.setEnabled(t.selection.isEditable())};return t.on("NodeChange",r),o.setEnabled(t.selection.isEditable()),()=>t.off("NodeChange",r)};t.add("directionality",(t=>{(t=>{t.addCommand("mceDirectionLTR",(()=>{C(t,"ltr")})),t.addCommand("mceDirectionRTL",(()=>{C(t,"rtl")}))})(t),(t=>{t.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:()=>t.execCommand("mceDirectionLTR"),onSetup:D(t,"ltr")}),t.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:()=>t.execCommand("mceDirectionRTL"),onSetup:D(t,"rtl")})})(t)}))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

View file

@ -1,4 +1,4 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void 0===n?void 0:n.name)===o.name)?"string":t;var s,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=("function",e=>"function"==typeof e);var c=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),i=tinymce.util.Tools.resolve("tinymce.EditorManager"),l=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Tools");const p=e=>t=>t.options.get(e),u=p("importcss_merge_classes"),m=p("importcss_exclusive"),f=p("importcss_selector_converter"),y=p("importcss_selector_filter"),d=p("importcss_groups"),h=p("importcss_append"),_=p("importcss_file_filter"),g=p("skin"),v=p("skin_url"),b=Array.prototype.push,x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s={};const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=a.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),u(e)?s.classes=n:s.attributes={class:n},s},k=(e,t)=>null===t||m(e),w=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);b.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(r,n))).concat(e);var r,n}}})(),r={},n=T(y(e)),p=(e=>a.map(e,(e=>a.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(d(e)),u=(t,s)=>{if(((e,t,s,r)=>!(k(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{k(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;const n=f(e);return o=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||c.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};a.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let p,u=t.href;if(u=(e=>{const t=l.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{const s=g(e);if(s){const r=v(e),o=r?e.documentBaseURI.toAbsolute(r):i.baseURL+"/skins/ui/"+s,n=i.baseURL+"/skins/content/";return t===o+"/content"+(e.inline?".inline":"")+".min.css"||-1!==t.indexOf(n)}return!1})(e,u)){a.each(t.imports,(e=>{c(e,!0)}));try{p=t.cssRules||t.rules}catch(e){}a.each(p,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):e.selectorText&&a.each(e.selectorText.split(","),(e=>{o.push(a.trim(e))}))}))}};a.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{a.each(t.styleSheets,(e=>{c(e)}))}catch(e){}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>a.grep(e,(e=>!e.filter||e.filter(t))))(p,e);if(s.length>0)a.each(s,(s=>{const r=u(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=u(e,null);s&&t.addItem(s)}}}));const m=t.toFormats();e.dispatch("addStyleModifications",{items:m,replace:!h(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),w(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();

View file

@ -1,5 +1,5 @@
/**
* TinyMCE version 7.0.0 (2024-03-20)
* TinyMCE version 7.0.1 (2024-04-10)
*/
(function () {

Some files were not shown because too many files have changed in this diff Show more