stremiok 2.2.7 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/README.md +12 -5
- package/config.xml +3 -1
- package/css/modern.css +146 -0
- package/css/style.css +7 -3
- package/index.html +36 -35
- package/js/focus.js +13 -2
- package/js/iptv.js +85 -6
- package/js/player-audio.js +5 -5
- package/js/player-controls.js +4 -4
- package/js/player-core.js +221 -13
- package/js/player-quality.js +14 -8
- package/js/player-store.js +2 -1
- package/js/player-subs.js +2 -2
- package/js/stremio.js +121 -4
- package/js/stvod.js +11 -4
- package/js/util.js +49 -13
- package/js/vendor/SHAKA-LICENSE +281 -0
- package/js/vendor/shaka-player.compiled.js +1983 -0
- package/js/view-core.js +46 -3
- package/js/view-detail.js +47 -6
- package/js/view-discover.js +10 -5
- package/js/view-home.js +72 -7
- package/js/view-settings.js +83 -30
- package/js/ytplay.js +31 -4
- package/package.json +1 -1
- package/service/index.js +185 -35
package/js/stremio.js
CHANGED
|
@@ -162,6 +162,8 @@ var Stremio = (function () {
|
|
|
162
162
|
function getPrefs() {
|
|
163
163
|
var p = U.store.get(PREFS_KEY, {}) || {};
|
|
164
164
|
return { posterShape: p.posterShape || 'portrait', accent: p.accent || 'indigo', bg: p.bg || 'dark',
|
|
165
|
+
look: p.look === 'modern' ? 'modern' : 'classic', // Settings > Appearance: Classic, or Modern (a backdrop behind Home, the title's logo, rounder posters)
|
|
166
|
+
effects: p.effects === 'light' || p.effects === 'full' ? p.effects : 'auto', // ...Modern's blur and motion: by the TV (auto), off (light) or on (full)
|
|
165
167
|
zoom: [110, 120, 130, 140].indexOf(p.zoom) !== -1 ? p.zoom : 100, // Settings > Appearance: everything bigger (percent)
|
|
166
168
|
rowCards: p.rowCards === 'all' || [50, 100, 200].indexOf(p.rowCards) !== -1 ? p.rowCards : 30, // Settings > Home: titles in a Home row ('all': Unlimited)
|
|
167
169
|
formatsAuto: p.formatsAuto !== false, // Settings > Formats: mark "Not working" on its own
|
|
@@ -543,12 +545,97 @@ var Stremio = (function () {
|
|
|
543
545
|
var t = p.host + path;
|
|
544
546
|
return t.length > 64 ? t.slice(0, 61) + '…' : t;
|
|
545
547
|
}
|
|
548
|
+
// ---- Export configuration (Settings › Content › Export configuration) ----
|
|
549
|
+
// The file import reads (parseSetupList): a line an addon link, playlist link or API key, what
|
|
550
|
+
// any StremioK imports, and #!stremiok <kind> <JSON> lines, comments to an older one: playlist
|
|
551
|
+
// (a playlist's name, guide link, off), stalker (a portal) and store (one of EXPORT_STORE, what
|
|
552
|
+
// you chose in Settings: not caches, history, progress or your Trakt sign-in; integrations
|
|
553
|
+
// without the three keys, which have their own lines, or Trakt's). Imported settings replace
|
|
554
|
+
// yours, only those in EXPORT_STORE.
|
|
555
|
+
var EXPORT_LINE = '#!stremiok ';
|
|
556
|
+
var EXPORT_STORE = ['stremiok.prefs', 'stremiok.feeds', 'stremiok.searchfeeds', 'stremiok.sourcefeeds', 'stremiok.ranking', 'stremiok.server', 'stremiok.formats',
|
|
557
|
+
'stremiok.resblock', 'stremiok.subcfg', 'stremiok.audiocfg', 'stremiok.playercfg', 'stremiok.private', 'stremiok.youtube', 'stremiok.appshortcuts',
|
|
558
|
+
'stremiok.appsallowed', 'stremiok.aiomanager', 'stremiok.iptv.stalkerall', 'stremiok.iptv.stalkerkeep', 'stremiok.iptv.every', 'stremiok.local.matching', 'stremiok.local.hidden',
|
|
559
|
+
'stremiok.addonsoff', 'stremiok.integrations'];
|
|
560
|
+
function plural(n, one) { return n + ' ' + one + (n === 1 ? '' : 's'); }
|
|
561
|
+
function iptvLists() { return (_hasIptv && IPTV.getPlaylists) ? IPTV.getPlaylists() : []; }
|
|
562
|
+
// What there is to export: [{ key, label }] (settings always).
|
|
563
|
+
function exportGroups() {
|
|
564
|
+
var lists = iptvLists(), integ = getIntegrations(), out = [], n = getAddonUrls().length;
|
|
565
|
+
var pl = lists.filter(function (p) { return !p.mac; }).length, st = lists.length - pl;
|
|
566
|
+
var keys = Object.keys(KEY_NAMES).filter(function (k) { return integ[k]; }).map(function (k) { return KEY_NAMES[k].replace(/ key$/, ''); });
|
|
567
|
+
if (n) { out.push({ key: 'addons', label: plural(n, 'addon') + ', in your order' }); }
|
|
568
|
+
if (pl) { out.push({ key: 'playlists', label: plural(pl, 'IPTV playlist') + ' (their logins too)' }); }
|
|
569
|
+
if (st) { out.push({ key: 'stalker', label: plural(st, 'Stalker portal') + ' (their MAC addresses)' }); }
|
|
570
|
+
if (keys.length) { out.push({ key: 'keys', label: 'API keys: ' + keys.join(', ') }); }
|
|
571
|
+
out.push({ key: 'settings', label: 'Your settings: look, Home, playback, subtitles, sources, streaming server, YouTube…' });
|
|
572
|
+
return out;
|
|
573
|
+
}
|
|
574
|
+
function settingsValue(key) {
|
|
575
|
+
var v = U.store.get(key, null);
|
|
576
|
+
if (key !== INTEG_KEY || !v || typeof v !== 'object') { return v; }
|
|
577
|
+
var o = {}, n = 0; // (integrations: the three keys have lines of their own; Trakt's aren't for another TV)
|
|
578
|
+
Object.keys(v).forEach(function (k) { if (!KEY_NAMES[k] && !/^trakt/.test(k) && v[k]) { o[k] = v[k]; n++; } });
|
|
579
|
+
return n ? o : null;
|
|
580
|
+
}
|
|
581
|
+
// The file, with what's in keys (exportGroups' keys).
|
|
582
|
+
function exportSetup(keys, version) {
|
|
583
|
+
var want = {}, out = [], integ = getIntegrations(), lists = iptvLists();
|
|
584
|
+
(keys || []).forEach(function (k) { want[k] = true; });
|
|
585
|
+
out.push('# StremioK configuration, exported ' + new Date(Date.now()).toISOString().slice(0, 10) + (version ? ' from StremioK ' + version : '') + '.');
|
|
586
|
+
out.push('# It holds your addon links, playlist logins, API keys and MAC addresses: keep it private.');
|
|
587
|
+
out.push('# To import it: Settings › Content › Import configuration file (▣ From your phone: choose this file, or paste it).');
|
|
588
|
+
if (want.addons) { out.push(''); getAddonUrls().forEach(function (u) { out.push(u); }); }
|
|
589
|
+
if (want.playlists) {
|
|
590
|
+
out.push('');
|
|
591
|
+
lists.filter(function (p) { return !p.mac; }).forEach(function (p) {
|
|
592
|
+
out.push(p.url);
|
|
593
|
+
var d = { url: p.url };
|
|
594
|
+
if (p.name) { d.name = p.name; }
|
|
595
|
+
if (p.guide) { d.guide = p.guide; }
|
|
596
|
+
if (p.off) { d.off = true; }
|
|
597
|
+
if (d.name || d.guide || d.off) { out.push(EXPORT_LINE + 'playlist ' + JSON.stringify(d)); }
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
if (want.stalker) {
|
|
601
|
+
out.push('');
|
|
602
|
+
lists.filter(function (p) { return p.mac; }).forEach(function (p) {
|
|
603
|
+
var d = { url: p.url, mac: p.mac };
|
|
604
|
+
['name', 'guide', 'genres', 'off'].forEach(function (k) { if (p[k]) { d[k] = p[k]; } });
|
|
605
|
+
out.push(EXPORT_LINE + 'stalker ' + JSON.stringify(d));
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
if (want.keys) { out.push(''); Object.keys(KEY_NAMES).forEach(function (k) { if (integ[k]) { out.push(integ[k]); } }); }
|
|
609
|
+
if (want.settings) {
|
|
610
|
+
out.push('');
|
|
611
|
+
EXPORT_STORE.forEach(function (key) {
|
|
612
|
+
var v = settingsValue(key);
|
|
613
|
+
if (v !== null && v !== undefined) { out.push(EXPORT_LINE + 'store ' + JSON.stringify({ k: key.replace(/^stremiok\./, ''), v: v })); }
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
return out.join('\n') + '\n';
|
|
617
|
+
}
|
|
546
618
|
function parseSetupList(text) {
|
|
547
619
|
var out = { items: [], ignored: 0 }, seen = {}, mine = getAddonUrls(), integ = getIntegrations();
|
|
548
|
-
var
|
|
620
|
+
var have = iptvLists(), lists = have.map(function (x) { return x.url; }), details = {}, store = [];
|
|
549
621
|
function push(it) { var k = it.kind + ' ' + it.value; if (seen[k]) { return; } seen[k] = 1; out.items.push(it); }
|
|
622
|
+
function stremiokLine(rest) { // (an export's own lines: see exportSetup)
|
|
623
|
+
var m = /^([a-z]+)\s+(\{[\s\S]*\})$/.exec(rest), o = null;
|
|
624
|
+
try { o = m ? JSON.parse(m[2]) : null; } catch (e) { o = null; }
|
|
625
|
+
if (!o || typeof o !== 'object') { out.ignored++; return; }
|
|
626
|
+
if (m[1] === 'playlist' && typeof o.url === 'string') { details[o.url] = o; return; }
|
|
627
|
+
if (m[1] === 'stalker' && typeof o.url === 'string' && _hasIptv && IPTV.macOf && IPTV.macOf(o.mac)) {
|
|
628
|
+
var mac = IPTV.macOf(o.mac);
|
|
629
|
+
push({ kind: 'stalker', value: o.url + '|' + mac, info: o, label: 'Stalker portal · ' + (typeof o.name === 'string' && o.name ? o.name.slice(0, 60) : shortLink(o.url)),
|
|
630
|
+
have: have.some(function (p) { return p.url === o.url && p.mac === mac; }), note: '' });
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
if (m[1] === 'store' && typeof o.k === 'string' && EXPORT_STORE.indexOf('stremiok.' + o.k) !== -1 && o.v !== undefined && o.v !== null) { store.push(o); return; }
|
|
634
|
+
out.ignored++;
|
|
635
|
+
}
|
|
550
636
|
('' + (text || '')).split(/\r?\n/).forEach(function (line) {
|
|
551
637
|
var value = line.trim(), key = null;
|
|
638
|
+
if (value.indexOf(EXPORT_LINE) === 0) { stremiokLine(value.slice(EXPORT_LINE.length).trim()); return; }
|
|
552
639
|
if (!value || value.charAt(0) === '#') { return; }
|
|
553
640
|
if (/^[A-Za-z0-9]{8}$/.test(value)) { key = 'omdb'; }
|
|
554
641
|
else if (/^[A-Za-z0-9]{32}$/.test(value)) { key = 'tmdb'; }
|
|
@@ -565,14 +652,44 @@ var Stremio = (function () {
|
|
|
565
652
|
out.ignored++;
|
|
566
653
|
}
|
|
567
654
|
});
|
|
655
|
+
out.items.forEach(function (it) { // (a playlist's name, guide link, off: with it)
|
|
656
|
+
var d = it.kind === 'playlist' && details[it.value];
|
|
657
|
+
if (d) { it.info = d; if (typeof d.name === 'string' && d.name) { it.label = 'IPTV playlist · ' + d.name.slice(0, 60); } }
|
|
658
|
+
});
|
|
659
|
+
if (store.length) { push({ kind: 'settings', value: 'settings', entries: store, label: 'Your settings (' + plural(store.length, 'part') + ')', have: false, note: 'replaces yours' }); }
|
|
568
660
|
return out;
|
|
569
661
|
}
|
|
662
|
+
function playlistDetails(id, d) {
|
|
663
|
+
if (typeof d.name === 'string' && d.name.trim()) { iptvRenamePlaylist(id, d.name.trim()); }
|
|
664
|
+
if (typeof d.guide === 'string' && d.guide) { iptvSetPlaylistGuide(id, d.guide); }
|
|
665
|
+
if (d.off === true) { iptvSetPlaylistOff(id, true); }
|
|
666
|
+
}
|
|
570
667
|
// Import the chosen lines (parseSetupList's items): what was added, as importSetupList says.
|
|
571
668
|
function applySetupEntries(items) {
|
|
572
|
-
var result = { addons: 0, playlists: 0, omdb: false, tmdb: false, mdblist: false, ignored: 0 };
|
|
669
|
+
var result = { addons: 0, playlists: 0, omdb: false, tmdb: false, mdblist: false, settings: false, ignored: 0 };
|
|
573
670
|
(items || []).forEach(function (it) {
|
|
574
671
|
if (KEY_NAMES[it.kind]) { setIntegration(it.kind, it.value); result[it.kind] = true; }
|
|
575
|
-
else if (it.kind === 'playlist') {
|
|
672
|
+
else if (it.kind === 'playlist') {
|
|
673
|
+
var pid = iptvAddPlaylist(it.value);
|
|
674
|
+
if (pid) { result.playlists++; if (it.info) { playlistDetails(pid, it.info); } } else { result.ignored++; }
|
|
675
|
+
} else if (it.kind === 'stalker') {
|
|
676
|
+
var sid = iptvAddStalker(it.info.url, it.info.mac);
|
|
677
|
+
if (!sid) { result.ignored++; return; }
|
|
678
|
+
result.playlists++;
|
|
679
|
+
playlistDetails(sid, it.info);
|
|
680
|
+
if (Array.isArray(it.info.genres) && it.info.genres.length && IPTV.setStalkerGroups) { IPTV.setStalkerGroups(sid, it.info.genres.filter(function (g) { return /^[\w.-]{1,40}$/.test('' + g); }).map(String)); }
|
|
681
|
+
} else if (it.kind === 'settings') {
|
|
682
|
+
it.entries.forEach(function (o) {
|
|
683
|
+
var key = 'stremiok.' + o.k;
|
|
684
|
+
if (EXPORT_STORE.indexOf(key) === -1) { return; }
|
|
685
|
+
if (key === INTEG_KEY && typeof o.v === 'object') { // (merged: your keys stay, unless the file has its own lines for them)
|
|
686
|
+
var cur = U.store.get(INTEG_KEY, {}) || {};
|
|
687
|
+
Object.keys(o.v).forEach(function (k) { if (!KEY_NAMES[k] && !/^trakt/.test(k)) { cur[k] = o.v[k]; } });
|
|
688
|
+
U.store.set(INTEG_KEY, cur);
|
|
689
|
+
} else { U.store.set(key, o.v); }
|
|
690
|
+
});
|
|
691
|
+
result.settings = true;
|
|
692
|
+
}
|
|
576
693
|
else if (it.kind === 'addon') {
|
|
577
694
|
var added = addAddon(it.value);
|
|
578
695
|
if (added) { result.addons++; if (!addonOrigin(added)) { setAddonOrigin(added, 'config'); } } else { result.ignored++; }
|
|
@@ -2252,7 +2369,7 @@ var Stremio = (function () {
|
|
|
2252
2369
|
getIntroSegments: getIntroSegments,
|
|
2253
2370
|
tmdbValidate: tmdbValidate, mdblistValidate: mdblistValidate, omdbValidate: omdbValidate,
|
|
2254
2371
|
tmdbFindTvId: tmdbFindTvId, tmdbSeasonEpisodes: tmdbSeasonEpisodes, tmdbImg: tmdbImg,
|
|
2255
|
-
tmdbTitleExtras: tmdbTitleExtras, tmdbExtrasById: tmdbExtrasById, tmdbEpisodeCast: tmdbEpisodeCast, tmdbEpisodeTrailer: tmdbEpisodeTrailer, setHideWords: setHideWords, hideWordHit: hideWordHit, normalizeAddonUrl: normalizeManifestUrl, debridOf: debridOf, addonOrigin: addonOrigin, setAddonOrigin: setAddonOrigin, parseSetupList: parseSetupList, applySetupEntries: applySetupEntries, sizeLimitHit: sizeLimitHit, setSizeLimit: setSizeLimit, gbText: gbText, runtimeMinutes: runtimeMinutes, tmdbPeople: tmdbPeople, tmdbPerson: tmdbPerson, tmdbBrowse: tmdbBrowse, tmdbTitleTrailers: tmdbTitleTrailers, tmdbProviders: tmdbProviders, tmdbProvidersKept: tmdbProvidersKept, tmdbGenres: tmdbGenres, tmdbWhereToWatch: tmdbWhereToWatch, watchRegion: watchRegion, autoWatchRegion: autoWatchRegion, tmdbImdbId: tmdbImdbId, findFilm: findFilm, hasTmdb: function () { return !!tmdbKey(); },
|
|
2372
|
+
tmdbTitleExtras: tmdbTitleExtras, tmdbExtrasById: tmdbExtrasById, tmdbEpisodeCast: tmdbEpisodeCast, tmdbEpisodeTrailer: tmdbEpisodeTrailer, setHideWords: setHideWords, hideWordHit: hideWordHit, normalizeAddonUrl: normalizeManifestUrl, debridOf: debridOf, addonOrigin: addonOrigin, setAddonOrigin: setAddonOrigin, parseSetupList: parseSetupList, applySetupEntries: applySetupEntries, exportGroups: exportGroups, exportSetup: exportSetup, sizeLimitHit: sizeLimitHit, setSizeLimit: setSizeLimit, gbText: gbText, runtimeMinutes: runtimeMinutes, tmdbPeople: tmdbPeople, tmdbPerson: tmdbPerson, tmdbBrowse: tmdbBrowse, tmdbTitleTrailers: tmdbTitleTrailers, tmdbProviders: tmdbProviders, tmdbProvidersKept: tmdbProvidersKept, tmdbGenres: tmdbGenres, tmdbWhereToWatch: tmdbWhereToWatch, watchRegion: watchRegion, autoWatchRegion: autoWatchRegion, tmdbImdbId: tmdbImdbId, findFilm: findFilm, hasTmdb: function () { return !!tmdbKey(); },
|
|
2256
2373
|
mdblistRatings: mdblistRatings,
|
|
2257
2374
|
omdbSeasonRatings: omdbSeasonRatings,
|
|
2258
2375
|
loadAddons: loadAddons, listCatalogs: listCatalogs, getCatalog: getCatalog,
|
package/js/stvod.js
CHANGED
|
@@ -27,10 +27,15 @@ var StVod = (function () {
|
|
|
27
27
|
for (var i = 0; i < l.length; i++) { if (l[i].id === id) { return l[i]; } }
|
|
28
28
|
return null;
|
|
29
29
|
}
|
|
30
|
+
// How long the service keeps what it read of a portal (Settings › Content › IPTV › Stalker films
|
|
31
|
+
// and series): 10 minutes, 5, or 0 (not kept).
|
|
32
|
+
var KEEP_KEY = 'stremiok.iptv.stalkerkeep', KEEPS = [10, 5, 0];
|
|
33
|
+
function keepMinutes() { var m = U.store.get(KEEP_KEY, 10); return KEEPS.indexOf(m) !== -1 ? m : 10; }
|
|
34
|
+
function setKeepMinutes(m) { U.store.set(KEEP_KEY, KEEPS.indexOf(+m) !== -1 ? +m : 10); }
|
|
30
35
|
// The service's answer ({ why }: an error).
|
|
31
36
|
function ask(acc, more) {
|
|
32
37
|
if (typeof YTPlay === 'undefined' || !YTPlay.stalkerVod) { return Promise.reject(new Error('Stalker portals are read by StremioK’s service (not in a desktop browser)')); }
|
|
33
|
-
return YTPlay.stalkerVod(acc.url, acc.mac, more).then(function (r) {
|
|
38
|
+
return YTPlay.stalkerVod(acc.url, acc.mac, more + '&keep=' + keepMinutes()).then(function (r) {
|
|
34
39
|
if (!r || r.why) { throw new Error((r && r.why) || 'no answer'); }
|
|
35
40
|
return r;
|
|
36
41
|
});
|
|
@@ -65,7 +70,8 @@ var StVod = (function () {
|
|
|
65
70
|
if ((c && Date.now() - c.at < (c.none ? CATS_RETRY_MS : CATS_FRESH_MS)) || _catsAsked[sk]) { return; }
|
|
66
71
|
_catsAsked[sk] = true; // (once a launch: a portal that didn't answer is asked again at the next)
|
|
67
72
|
function either(p) { return p.then(null, function (e) { return { failed: e }; }); }
|
|
68
|
-
|
|
73
|
+
var fresh = _reloaded[acc.id] ? '&fresh=1' : ''; // (Reload: the service's kept lists let go too)
|
|
74
|
+
Promise.all([either(ask(acc, '&type=movie&do=cats' + fresh)), either(ask(acc, '&type=series&do=cats' + fresh))]).then(function (r) {
|
|
69
75
|
if (r[0].failed && r[1].failed) { U.log('iptv', 'Stalker “' + acc.label + '”: its films and series couldn’t be read (' + U.problem(r[0].failed) + ')'); return; }
|
|
70
76
|
var all = catsAll(), keep = {}, o = { sig: sk, movie: catList(r[0]), series: catList(r[1]), at: Date.now() };
|
|
71
77
|
if (!o.movie.length && !o.series.length) { o.none = true; U.log('iptv', 'Stalker “' + acc.label + '”: no films or series'); }
|
|
@@ -80,7 +86,8 @@ var StVod = (function () {
|
|
|
80
86
|
});
|
|
81
87
|
});
|
|
82
88
|
}
|
|
83
|
-
// Reload on a portal (Settings › Content › IPTV): its categories asked again now
|
|
89
|
+
// Reload on a portal (Settings › Content › IPTV): its categories asked again now, and the
|
|
90
|
+
// service's kept lists of it let go (fresh=1).
|
|
84
91
|
function reload(id) {
|
|
85
92
|
var acc = account(id), all = catsAll();
|
|
86
93
|
if (!acc) { return; }
|
|
@@ -283,5 +290,5 @@ var StVod = (function () {
|
|
|
283
290
|
})).then(function (all) { return [].concat.apply([], all).filter(Boolean); });
|
|
284
291
|
}
|
|
285
292
|
|
|
286
|
-
return { accounts: accounts, isEnabled: isEnabled, onChange: onChange, reload: reload, synthAddon: synthAddon, catalog: catalog, meta: meta, streams: streams, refreshCats: refreshCats };
|
|
293
|
+
return { accounts: accounts, keepMinutes: keepMinutes, setKeepMinutes: setKeepMinutes, isEnabled: isEnabled, onChange: onChange, reload: reload, synthAddon: synthAddon, catalog: catalog, meta: meta, streams: streams, refreshCats: refreshCats };
|
|
287
294
|
})();
|
package/js/util.js
CHANGED
|
@@ -382,12 +382,12 @@ var U = (function () {
|
|
|
382
382
|
return cut ? out.replace(/[ \t]{2,}/g, ' ').replace(/^[ \t]+|[ \t]+$/gm, '') : out;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
/* Request headers a stream needs (IPTV's http-user-agent / http-referrer): only
|
|
386
|
-
|
|
387
|
-
ASCII on one line (a line break would add a header of its own) and a sane length;
|
|
388
|
-
Referer must be an http(s) link. The names Stremio uses ("User-Agent", "Referer"
|
|
389
|
-
read too. Returns null when nothing usable is left. */
|
|
390
|
-
var HEADER_MAX = { ua: 512, ref: 2048 };
|
|
385
|
+
/* Request headers a stream needs (IPTV's http-user-agent / http-referrer, a cookie): only
|
|
386
|
+
these three (the ones the TV's player takes), as { ua, ref, cookie }. Each is kept to
|
|
387
|
+
printable ASCII on one line (a line break would add a header of its own) and a sane length;
|
|
388
|
+
a Referer must be an http(s) link. The names Stremio uses ("User-Agent", "Referer",
|
|
389
|
+
"Cookie") are read too. Returns null when nothing usable is left. */
|
|
390
|
+
var HEADER_MAX = { ua: 512, ref: 2048, cookie: 3000 }; // (a cookie: within what a newer TV's service reads of a request, 8 KB)
|
|
391
391
|
function headerValue(v, max) {
|
|
392
392
|
if (typeof v !== 'string') { return ''; }
|
|
393
393
|
v = v.trim();
|
|
@@ -397,11 +397,13 @@ var U = (function () {
|
|
|
397
397
|
if (!h || typeof h !== 'object') { return null; }
|
|
398
398
|
var ua = headerValue(h.ua != null ? h.ua : (h['User-Agent'] || h['user-agent']), HEADER_MAX.ua);
|
|
399
399
|
var ref = headerValue(h.ref != null ? h.ref : (h.Referer || h.referer), HEADER_MAX.ref);
|
|
400
|
+
var cookie = headerValue(h.cookie != null ? h.cookie : (h.Cookie || h.COOKIE), HEADER_MAX.cookie);
|
|
400
401
|
if (ref && !/^https?:\/\/[^\s]+$/i.test(ref)) { ref = ''; }
|
|
401
|
-
if (!ua && !ref) { return null; }
|
|
402
|
+
if (!ua && !ref && !cookie) { return null; }
|
|
402
403
|
var out = {};
|
|
403
404
|
if (ua) { out.ua = ua; }
|
|
404
405
|
if (ref) { out.ref = ref; }
|
|
406
|
+
if (cookie) { out.cookie = cookie; }
|
|
405
407
|
return out;
|
|
406
408
|
}
|
|
407
409
|
|
|
@@ -1113,8 +1115,9 @@ var U = (function () {
|
|
|
1113
1115
|
function showOn(item) { // the image is in the browser now: put it on this node
|
|
1114
1116
|
if (item.bg) { item.img.style.backgroundImage = cssUrl(item.src); } else { item.img.src = item.src; }
|
|
1115
1117
|
}
|
|
1116
|
-
function failOn(item) { // it can't load: this node's own fallback
|
|
1117
|
-
|
|
1118
|
+
function failOn(item) { // it can't load: this node's own fallback (a background's: its __bgFail)
|
|
1119
|
+
var f = item.bg ? item.img.__bgFail : item.img.onerror;
|
|
1120
|
+
if (typeof f === 'function') { try { f.call(item.img); } catch (e) {} }
|
|
1118
1121
|
}
|
|
1119
1122
|
// A download that neither loads nor fails (a stalled host) gives up after this, so a
|
|
1120
1123
|
// few of them can't hold every slot and stop all later artwork.
|
|
@@ -1241,7 +1244,7 @@ var U = (function () {
|
|
|
1241
1244
|
function done(ok) {
|
|
1242
1245
|
if (finished) { return; }
|
|
1243
1246
|
stop();
|
|
1244
|
-
if (ok) { markLoaded(it.src); if (it.bg) { showOn(it); } } else { _failedAt.set(it.src, Date.now()); }
|
|
1247
|
+
if (ok) { markLoaded(it.src); if (it.bg) { showOn(it); } } else { _failedAt.set(it.src, Date.now()); if (it.bg) { failOn(it); } }
|
|
1245
1248
|
var waiting = _inflight[it.src] || [];
|
|
1246
1249
|
delete _inflight[it.src];
|
|
1247
1250
|
waiting.forEach(function (w) { if (ok) { showOn(w); } else { failOn(w); } });
|
|
@@ -1305,6 +1308,16 @@ var U = (function () {
|
|
|
1305
1308
|
// role: 'poster' | 'landscape' | 'still' (episode thumbnail) | 'hero' (a title page's
|
|
1306
1309
|
// backdrop) | 'logo' | 'cast' (a cast card) | 'profile' (a person page's photo)
|
|
1307
1310
|
var TMDB_W = { poster: 342, landscape: 780, still: 300, hero: 1280, logo: 500, cast: 185, profile: 342 };
|
|
1311
|
+
// A backdrop behind a page (the Modern look's Home, a title's page): its pictures to try, the
|
|
1312
|
+
// best first. A YouTube video's thumbnail (hqdefault: 480x360, bars above and below) gives
|
|
1313
|
+
// way to its 1280x720 ones (maxresdefault, else hq720; an older video may have neither, so
|
|
1314
|
+
// the thumbnail last). Anything else: its 'hero' size.
|
|
1315
|
+
function heroImages(url) {
|
|
1316
|
+
var yt = typeof url === 'string' && url.match(/^(https:\/\/i\.ytimg\.com\/vi\/[\w-]{6,20}\/)(?:hq|mq|sd)?default\.jpg$/);
|
|
1317
|
+
if (yt) { return [yt[1] + 'maxresdefault.jpg', yt[1] + 'hq720.jpg', url]; }
|
|
1318
|
+
var one = cardImage(url, 'hero');
|
|
1319
|
+
return one ? [one] : [];
|
|
1320
|
+
}
|
|
1308
1321
|
function cardImage(url, role) {
|
|
1309
1322
|
if (!url || typeof url !== 'string') { return null; }
|
|
1310
1323
|
if (/^\/\//.test(url)) { url = 'https:' + url; } // (a scheme-relative link)
|
|
@@ -1408,7 +1421,7 @@ var U = (function () {
|
|
|
1408
1421
|
[[255, 210, 87], [138, 90, 0]] // gold ratings
|
|
1409
1422
|
];
|
|
1410
1423
|
// Drawn over video or pictures: keep their own (light-on-dark) look.
|
|
1411
|
-
var KEEP_DARK = /#osd|#player-|#subs|#sub-menu|#skip-prompt|#stream-info|#cast-strip|#yt-links|#yt-card|#toast|#hold-hint|#spinner|\.skip-btn|\.pb-btn|\.sm-|\.si-|\.card \.cap|\.card-new|\.card-watched|\.card-rating|\.grid-cell|\.r-|\.spin\b/;
|
|
1424
|
+
var KEEP_DARK = /#osd|#player-|#subs|#sub-menu|#skip-prompt|#stream-info|#cast-strip|#yt-links|#yt-card|#toast|#hold-hint|#spinner|\.skip-btn|\.pb-btn|\.sm-|\.si-|\.card \.cap|\.card-new|\.card-watched|\.card-rating|\.card-epg|\.grid-cell|\.r-|\.spin\b/;
|
|
1412
1425
|
var LIGHT_EXTRA = '.card .cap { color: #ffffff }\n' +
|
|
1413
1426
|
// title logos are made for dark backgrounds: a soft dark outline keeps them readable
|
|
1414
1427
|
'.detail-logo, .home-info-logo { -webkit-filter: drop-shadow(0 0 2px rgba(0,0,0,0.85)) drop-shadow(0 0 6px rgba(0,0,0,0.45)); ' +
|
|
@@ -1428,6 +1441,26 @@ var U = (function () {
|
|
|
1428
1441
|
s.height = on ? Math.ceil(1080 / _zoom) + 'px' : '';
|
|
1429
1442
|
s.webkitTransform = s.transform = on ? 'scale(' + _zoom + ')' : '';
|
|
1430
1443
|
s.webkitTransformOrigin = s.transformOrigin = on ? '0 0' : '';
|
|
1444
|
+
var cl = document.body.classList; // (zoom-110 … zoom-140: the Modern look's room for each, css/modern.css)
|
|
1445
|
+
if (cl) { [110, 120, 130, 140].forEach(function (z) { cl.remove('zoom-' + z); }); if (on) { cl.add('zoom-' + Math.round(_zoom * 100)); } }
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
// Look (Settings › Appearance): 'modern' puts look-modern on the page (css/modern.css), and
|
|
1449
|
+
// fx-full for its blur and motion: 'auto' where the TV's browser can blur what's behind a
|
|
1450
|
+
// panel (Tizen 6, 2021 TVs, and later), so not on older ones, where they'd slow it down.
|
|
1451
|
+
function canBlur() {
|
|
1452
|
+
try { return !!(window.CSS && CSS.supports && (CSS.supports('backdrop-filter', 'blur(2px)') || CSS.supports('-webkit-backdrop-filter', 'blur(2px)'))); } catch (e) { return false; }
|
|
1453
|
+
}
|
|
1454
|
+
var _look = 'classic';
|
|
1455
|
+
function look() { return _look; }
|
|
1456
|
+
function setLook(lk, fx, light) { // (light: Light Gray or White, bg-light: css/modern.css's fills for them)
|
|
1457
|
+
_look = lk === 'modern' ? 'modern' : 'classic';
|
|
1458
|
+
var b = document.body;
|
|
1459
|
+
if (!b || !b.classList) { return; }
|
|
1460
|
+
var full = _look === 'modern' && (fx === 'full' || (fx !== 'light' && canBlur()));
|
|
1461
|
+
b.classList[_look === 'modern' ? 'add' : 'remove']('look-modern');
|
|
1462
|
+
b.classList[full ? 'add' : 'remove']('fx-full');
|
|
1463
|
+
b.classList[light ? 'add' : 'remove']('bg-light');
|
|
1431
1464
|
}
|
|
1432
1465
|
|
|
1433
1466
|
// bg: 'dark' (the stylesheet's own), 'black', 'gray' or 'white' (the last two with dark text)
|
|
@@ -1442,7 +1475,10 @@ var U = (function () {
|
|
|
1442
1475
|
if (light) {
|
|
1443
1476
|
pairs.push([THEME_BASE.bg, light.page, 'bg'], [[22, 27, 38], light.panel, 'bg'], [[26, 31, 43], light.card, 'bg'],
|
|
1444
1477
|
[[42, 51, 70], light.raised, 'bg'], [[38, 48, 74], light.raised, 'bg'], [[23, 32, 58], light.deep, 'bg'],
|
|
1445
|
-
[[58, 33, 48], [243, 214, 220], 'bg'], [[255, 255, 255], [17, 17, 17], 'color']
|
|
1478
|
+
[[58, 33, 48], [243, 214, 220], 'bg'], [[255, 255, 255], [17, 17, 17], 'color'],
|
|
1479
|
+
// the Guide: its channel column, the strip behind the programs (the lines
|
|
1480
|
+
// between them), the program on now
|
|
1481
|
+
[[18, 23, 34], light.deep, 'bg'], [[14, 18, 25], light.page, 'bg'], [[34, 43, 61], light.raised, 'bg']);
|
|
1446
1482
|
LIGHT_TEXT.forEach(function (t) { pairs.push([t[0], t[1], 'text']); });
|
|
1447
1483
|
}
|
|
1448
1484
|
var el = byId('theme-override');
|
|
@@ -1626,7 +1662,7 @@ var U = (function () {
|
|
|
1626
1662
|
postJSON: postJSON, redactUrl: redactUrl, problem: problem, problemDetail: problemDetail, listOf: listOf, lru: lru, cachedJSON: cachedJSON,
|
|
1627
1663
|
parseUrl: parseUrl, urlProblem: urlProblem, isPlaylistUrl: isPlaylistUrl, isManifestUrl: isManifestUrl,
|
|
1628
1664
|
isPrivateHost: isPrivateHost, urlIsPrivate: urlIsPrivate, setLocalPolicy: setLocalPolicy, sanitizeHeaders: sanitizeHeaders, drawable: drawable,
|
|
1629
|
-
log: log, logEntries: logEntries, clearLog: clearLog, bigStore: bigStore, diskInfo: diskInfo,
|
|
1665
|
+
look: look, setLook: setLook, canBlur: canBlur, heroImages: heroImages, log: log, logEntries: logEntries, clearLog: clearLog, bigStore: bigStore, diskInfo: diskInfo,
|
|
1630
1666
|
store: store, toast: toast, spinner: spinner,
|
|
1631
1667
|
deferImage: deferImage, deferBg: deferBg, cardImage: cardImage, prioritizeImages: prioritizeImages, requeueImages: requeueImages,
|
|
1632
1668
|
fmtTime: fmtTime, dayLabel: dayLabel, settleAll: settleAll, cancelToken: cancelToken, isHidden: isHidden, whenVisible: whenVisible, crumb: crumb, sessionStart: sessionStart, sessionState: sessionState, mark: mark, startupMarks: startupMarks, loadScript: loadScript, qrModules: qrModules, qrCanvas: qrCanvas, qrScale: qrScale,
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
203
|
+
|
|
204
|
+
-----
|
|
205
|
+
|
|
206
|
+
Contains code from https://github.com/mozilla/language-mapping-list
|
|
207
|
+
|
|
208
|
+
The MIT License (MIT)
|
|
209
|
+
|
|
210
|
+
Copyright (c) 2013 Ali Al Dallal
|
|
211
|
+
|
|
212
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
213
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
214
|
+
the Software without restriction, including without limitation the rights to
|
|
215
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
216
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
217
|
+
subject to the following conditions:
|
|
218
|
+
|
|
219
|
+
The above copyright notice and this permission notice shall be included in all
|
|
220
|
+
copies or substantial portions of the Software.
|
|
221
|
+
|
|
222
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
223
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
224
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
225
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
226
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
227
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
228
|
+
|
|
229
|
+
-----
|
|
230
|
+
|
|
231
|
+
Contains code from https://github.com/TobiasNickel/tXml
|
|
232
|
+
(See lib/util/tXml.js)
|
|
233
|
+
|
|
234
|
+
tXml MIT License Agreement
|
|
235
|
+
|
|
236
|
+
Copyright 2015 Tobias Nickel
|
|
237
|
+
|
|
238
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
239
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
240
|
+
in the Software without restriction, including without limitation the rights
|
|
241
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
242
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
243
|
+
furnished to do so, subject to the following conditions:
|
|
244
|
+
|
|
245
|
+
The above copyright notice and this permission notice shall be included in
|
|
246
|
+
all copies or substantial portions of the Software.
|
|
247
|
+
|
|
248
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
249
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
250
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
251
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
252
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
253
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
254
|
+
SOFTWARE.
|
|
255
|
+
|
|
256
|
+
-----
|
|
257
|
+
|
|
258
|
+
Contains code from https://github.com/toji/gl-matrix
|
|
259
|
+
(See ui/gl_matrix/matrix_4x4.js and ui/gl_matrix/matrix_quaternion.js)
|
|
260
|
+
|
|
261
|
+
The MIT License (MIT)
|
|
262
|
+
|
|
263
|
+
Copyright (c) 2015-2021, Brandon Jones, Colin MacKenzie IV.
|
|
264
|
+
|
|
265
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
266
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
267
|
+
in the Software without restriction, including without limitation the rights
|
|
268
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
269
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
270
|
+
furnished to do so, subject to the following conditions:
|
|
271
|
+
|
|
272
|
+
The above copyright notice and this permission notice shall be included in
|
|
273
|
+
all copies or substantial portions of the Software.
|
|
274
|
+
|
|
275
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
276
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
277
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
278
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
279
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
280
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
281
|
+
SOFTWARE.
|